
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int ssl_servername_cb(SSL *s,int *ad,void *arg)

{
  char *pcVar1;
  int iVar2;
  
  pcVar1 = SSL_get_servername((SSL *)s,0);
  iVar2 = SSL_get_servername_type((SSL *)s);
  if (iVar2 != -1) {
    iVar2 = SSL_session_reused(s);
    *(uint *)((int)arg + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);
    return 0;
  }
  BIO_printf((BIO *)bio_err,"Can\'t use SSL_get_servername\n");
  return 0;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 FUN_00054f20(SSL *param_1,undefined4 param_2,int param_3)

{
  char *pcVar1;
  int iVar2;
  
  pcVar1 = SSL_get_servername(param_1,0);
  iVar2 = SSL_get_servername_type(param_1);
  if (iVar2 != -1) {
    iVar2 = SSL_session_reused(param_1);
    *(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);
    return 0;
  }
  BIO_printf(DAT_000cc58c,"Can\'t use SSL_get_servername\n");
  return 0;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV ESI,dword ptr [ESP + 0x10]
CALL 0x0002c850
ADD EBX,0x6fb4c
SUB ESP,0x8
PUSH 0x0
PUSH ESI
CALL 0x00027110
MOV dword ptr [ESP],ESI
MOV EDI,EAX
CALL 0x00028f10
ADD ESP,0x10
CMP EAX,-0x1
JZ 0x00054f80
SUB ESP,0xc
PUSH ESI
CALL 0x000282a0
ADD ESP,0x10
TEST EDI,EDI
SETNZ DL
TEST EAX,EAX
SETZ AL
MOVZX EAX,AL
AND EAX,EDX
MOV EDX,dword ptr [ESP + 0x18]
MOV dword ptr [EDX + 0x4],EAX
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0x8
LEA EAX,[EBX + 0xfffca3be]
PUSH EAX
LEA EAX,[EBX + 0x7b14]
PUSH dword ptr [EAX]
CALL 0x00027240
ADD ESP,0x10
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_00054f20(SSL *param_1,undefined4 param_2,int param_3)\n\n{\n  char *pcVar1;\n  int iVar2;\n  \n  pcVar1 = SSL_get_servername(param_1,0);\n  iVar2 = SSL_get_servername_type(param_1);\n  if (iVar2 != -1) {\n    iVar2 = SSL_session_reused(param_1);\n    *(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }\n  BIO_printf(DAT_000cc58c,"Can\'t use SSL_get_servername\n");\n  return 0;\n}\n\n" comment (function_definition "undefined4 FUN_00054f20(SSL *param_1,undefined4 param_2,int param_3)\n\n{\n  char *pcVar1;\n  int iVar2;\n  \n  pcVar1 = SSL_get_servername(param_1,0);\n  iVar2 = SSL_get_servername_type(param_1);\n  if (iVar2 != -1) {\n    iVar2 = SSL_session_reused(param_1);\n    *(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }\n  BIO_printf(DAT_000cc58c,"Can\'t use SSL_get_servername\n");\n  return 0;\n}" type_identifier (function_declarator "FUN_00054f20(SSL *param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(SSL *param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "SSL *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  \n  pcVar1 = SSL_get_servername(param_1,0);\n  iVar2 = SSL_get_servername_type(param_1);\n  if (iVar2 != -1) {\n    iVar2 = SSL_session_reused(param_1);\n    *(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }\n  BIO_printf(DAT_000cc58c,"Can\'t use SSL_get_servername\n");\n  return 0;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "pcVar1 = SSL_get_servername(param_1,0);" (assignment_expression "pcVar1 = SSL_get_servername(param_1,0)" identifier = (call_expression "SSL_get_servername(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal )))) ;) (expression_statement "iVar2 = SSL_get_servername_type(param_1);" (assignment_expression "iVar2 = SSL_get_servername_type(param_1)" identifier = (call_expression "SSL_get_servername_type(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar2 != -1) {\n    iVar2 = SSL_session_reused(param_1);\n    *(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }" if (parenthesized_expression "(iVar2 != -1)" ( (binary_expression "iVar2 != -1" identifier != number_literal) )) (compound_statement "{\n    iVar2 = SSL_session_reused(param_1);\n    *(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }" { (expression_statement "iVar2 = SSL_session_reused(param_1);" (assignment_expression "iVar2 = SSL_session_reused(param_1)" identifier = (call_expression "SSL_session_reused(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "*(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);" (assignment_expression "*(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0)" (pointer_expression "*(uint *)(param_3 + 4)" * (cast_expression "(uint *)(param_3 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) )))) = (call_expression "(uint)(iVar2 == 0 && pcVar1 != (char *)0x0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar2 == 0 && pcVar1 != (char *)0x0)" ( (binary_expression "iVar2 == 0 && pcVar1 != (char *)0x0" (binary_expression "iVar2 == 0" identifier == number_literal) && (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) )))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "BIO_printf(DAT_000cc58c,"Can\'t use SSL_get_servername\n");" (call_expression "BIO_printf(DAT_000cc58c,"Can\'t use SSL_get_servername\n")" identifier (argument_list "(DAT_000cc58c,"Can\'t use SSL_get_servername\n")" ( identifier , (string_literal ""Can\'t use SSL_get_servername\n"" " string_content escape_sequence string_content escape_sequence ") ))) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint ssl_servername_cb(SSL *s,int *ad,void *arg)\n\n{\n  char *pcVar1;\n  int iVar2;\n  \n  pcVar1 = SSL_get_servername((SSL *)s,0);\n  iVar2 = SSL_get_servername_type((SSL *)s);\n  if (iVar2 != -1) {\n    iVar2 = SSL_session_reused(s);\n    *(uint *)((int)arg + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }\n  BIO_printf((BIO *)bio_err,"Can\'t use SSL_get_servername\n");\n  return 0;\n}\n\n" comment comment (function_definition "int ssl_servername_cb(SSL *s,int *ad,void *arg)\n\n{\n  char *pcVar1;\n  int iVar2;\n  \n  pcVar1 = SSL_get_servername((SSL *)s,0);\n  iVar2 = SSL_get_servername_type((SSL *)s);\n  if (iVar2 != -1) {\n    iVar2 = SSL_session_reused(s);\n    *(uint *)((int)arg + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }\n  BIO_printf((BIO *)bio_err,"Can\'t use SSL_get_servername\n");\n  return 0;\n}" primitive_type (function_declarator "ssl_servername_cb(SSL *s,int *ad,void *arg)" identifier (parameter_list "(SSL *s,int *ad,void *arg)" ( (parameter_declaration "SSL *s" type_identifier (pointer_declarator "*s" * identifier)) , (parameter_declaration "int *ad" primitive_type (pointer_declarator "*ad" * identifier)) , (parameter_declaration "void *arg" primitive_type (pointer_declarator "*arg" * identifier)) ))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  \n  pcVar1 = SSL_get_servername((SSL *)s,0);\n  iVar2 = SSL_get_servername_type((SSL *)s);\n  if (iVar2 != -1) {\n    iVar2 = SSL_session_reused(s);\n    *(uint *)((int)arg + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }\n  BIO_printf((BIO *)bio_err,"Can\'t use SSL_get_servername\n");\n  return 0;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "pcVar1 = SSL_get_servername((SSL *)s,0);" (assignment_expression "pcVar1 = SSL_get_servername((SSL *)s,0)" identifier = (call_expression "SSL_get_servername((SSL *)s,0)" identifier (argument_list "((SSL *)s,0)" ( (cast_expression "(SSL *)s" ( (type_descriptor "SSL *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , number_literal )))) ;) (expression_statement "iVar2 = SSL_get_servername_type((SSL *)s);" (assignment_expression "iVar2 = SSL_get_servername_type((SSL *)s)" identifier = (call_expression "SSL_get_servername_type((SSL *)s)" identifier (argument_list "((SSL *)s)" ( (cast_expression "(SSL *)s" ( (type_descriptor "SSL *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if (iVar2 != -1) {\n    iVar2 = SSL_session_reused(s);\n    *(uint *)((int)arg + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }" if (parenthesized_expression "(iVar2 != -1)" ( (binary_expression "iVar2 != -1" identifier != number_literal) )) (compound_statement "{\n    iVar2 = SSL_session_reused(s);\n    *(uint *)((int)arg + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }" { (expression_statement "iVar2 = SSL_session_reused(s);" (assignment_expression "iVar2 = SSL_session_reused(s)" identifier = (call_expression "SSL_session_reused(s)" identifier (argument_list "(s)" ( identifier )))) ;) (expression_statement "*(uint *)((int)arg + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);" (assignment_expression "*(uint *)((int)arg + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0)" (pointer_expression "*(uint *)((int)arg + 4)" * (cast_expression "(uint *)((int)arg + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)arg + 4)" ( (binary_expression "(int)arg + 4" (cast_expression "(int)arg" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (call_expression "(uint)(iVar2 == 0 && pcVar1 != (char *)0x0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar2 == 0 && pcVar1 != (char *)0x0)" ( (binary_expression "iVar2 == 0 && pcVar1 != (char *)0x0" (binary_expression "iVar2 == 0" identifier == number_literal) && (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) )))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "BIO_printf((BIO *)bio_err,"Can\'t use SSL_get_servername\n");" (call_expression "BIO_printf((BIO *)bio_err,"Can\'t use SSL_get_servername\n")" identifier (argument_list "((BIO *)bio_err,"Can\'t use SSL_get_servername\n")" ( (cast_expression "(BIO *)bio_err" ( (type_descriptor "BIO *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (string_literal ""Can\'t use SSL_get_servername\n"" " string_content escape_sequence string_content escape_sequence ") ))) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_00054f20(SSL *param_1,undefined4 param_2,int param_3)\n\n{\n  char *pcVar1;\n  int iVar2;\n  \n  pcVar1 = SSL_get_servername(param_1,0);\n  iVar2 = SSL_get_servername_type(param_1);\n  if (iVar2 != -1) {\n    iVar2 = SSL_session_reused(param_1);\n    *(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }\n  BIO_printf(DAT_000cc58c,"Can\'t use SSL_get_servername\n");\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_00054f20(SSL *param_1,undefined4 param_2,int param_3)\n\n{\n  char *pcVar1;\n  int iVar2;\n  \n  pcVar1 = SSL_get_servername(param_1,0);\n  iVar2 = SSL_get_servername_type(param_1);\n  if (iVar2 != -1) {\n    iVar2 = SSL_session_reused(param_1);\n    *(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }\n  BIO_printf(DAT_000cc58c,"Can\'t use SSL_get_servername\n");\n  return 0;\n}" type_identifier (function_declarator "FUN_00054f20(SSL *param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(SSL *param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "SSL *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  \n  pcVar1 = SSL_get_servername(param_1,0);\n  iVar2 = SSL_get_servername_type(param_1);\n  if (iVar2 != -1) {\n    iVar2 = SSL_session_reused(param_1);\n    *(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }\n  BIO_printf(DAT_000cc58c,"Can\'t use SSL_get_servername\n");\n  return 0;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "pcVar1 = SSL_get_servername(param_1,0);" (assignment_expression "pcVar1 = SSL_get_servername(param_1,0)" identifier = (call_expression "SSL_get_servername(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal )))) ;) (expression_statement "iVar2 = SSL_get_servername_type(param_1);" (assignment_expression "iVar2 = SSL_get_servername_type(param_1)" identifier = (call_expression "SSL_get_servername_type(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar2 != -1) {\n    iVar2 = SSL_session_reused(param_1);\n    *(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }" if (parenthesized_expression "(iVar2 != -1)" ( (binary_expression "iVar2 != -1" identifier != number_literal) )) (compound_statement "{\n    iVar2 = SSL_session_reused(param_1);\n    *(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }" { (expression_statement "iVar2 = SSL_session_reused(param_1);" (assignment_expression "iVar2 = SSL_session_reused(param_1)" identifier = (call_expression "SSL_session_reused(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "*(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);" (assignment_expression "*(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0)" (pointer_expression "*(uint *)(param_3 + 4)" * (cast_expression "(uint *)(param_3 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) )))) = (call_expression "(uint)(iVar2 == 0 && pcVar1 != (char *)0x0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar2 == 0 && pcVar1 != (char *)0x0)" ( (binary_expression "iVar2 == 0 && pcVar1 != (char *)0x0" (binary_expression "iVar2 == 0" identifier == number_literal) && (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) )))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "BIO_printf(DAT_000cc58c,"Can\'t use SSL_get_servername\n");" (call_expression "BIO_printf(DAT_000cc58c,"Can\'t use SSL_get_servername\n")" identifier (argument_list "(DAT_000cc58c,"Can\'t use SSL_get_servername\n")" ( identifier , (string_literal ""Can\'t use SSL_get_servername\n"" " string_content escape_sequence string_content escape_sequence ") ))) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (binary_expression IDENT == LIT) && (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT))) )))) ;) (return_statement return LIT ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content escape_sequence string_content escape_sequence ") ))) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_00054f20(SSL *param_1,undefined4 param_2,int param_3)\n\n{\n  char *pcVar1;\n  int iVar2;\n  \n  pcVar1 = SSL_get_servername(param_1,0);\n  iVar2 = SSL_get_servername_type(param_1);\n  if (iVar2 != -1) {\n    iVar2 = SSL_session_reused(param_1);\n    *(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }\n  BIO_printf(DAT_000cc58c,"Can\'t use SSL_get_servername\n");\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_00054f20(SSL *param_1,undefined4 param_2,int param_3)" (identifier "FUN_00054f20") (parameter_list "(SSL *param_1,undefined4 param_2,int param_3)" (( "(") (parameter_declaration "SSL *param_1" (type_identifier "SSL") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  \n  pcVar1 = SSL_get_servername(param_1,0);\n  iVar2 = SSL_get_servername_type(param_1);\n  if (iVar2 != -1) {\n    iVar2 = SSL_session_reused(param_1);\n    *(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }\n  BIO_printf(DAT_000cc58c,"Can\'t use SSL_get_servername\n");\n  return 0;\n}" ({ "{") (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (expression_statement "pcVar1 = SSL_get_servername(param_1,0);" (assignment_expression "pcVar1 = SSL_get_servername(param_1,0)" (identifier "pcVar1") (= "=") (call_expression "SSL_get_servername(param_1,0)" (identifier "SSL_get_servername") (argument_list "(param_1,0)" (( "(") (identifier "param_1") (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "iVar2 = SSL_get_servername_type(param_1);" (assignment_expression "iVar2 = SSL_get_servername_type(param_1)" (identifier "iVar2") (= "=") (call_expression "SSL_get_servername_type(param_1)" (identifier "SSL_get_servername_type") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (iVar2 != -1) {\n    iVar2 = SSL_session_reused(param_1);\n    *(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }" (if "if") (parenthesized_expression "(iVar2 != -1)" (( "(") (binary_expression "iVar2 != -1" (identifier "iVar2") (!= "!=") (number_literal "-1")) () ")")) (compound_statement "{\n    iVar2 = SSL_session_reused(param_1);\n    *(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);\n    return 0;\n  }" ({ "{") (expression_statement "iVar2 = SSL_session_reused(param_1);" (assignment_expression "iVar2 = SSL_session_reused(param_1)" (identifier "iVar2") (= "=") (call_expression "SSL_session_reused(param_1)" (identifier "SSL_session_reused") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "*(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);" (assignment_expression "*(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0)" (pointer_expression "*(uint *)(param_3 + 4)" (* "*") (cast_expression "(uint *)(param_3 + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 4)" (( "(") (binary_expression "param_3 + 4" (identifier "param_3") (+ "+") (number_literal "4")) () ")")))) (= "=") (call_expression "(uint)(iVar2 == 0 && pcVar1 != (char *)0x0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(iVar2 == 0 && pcVar1 != (char *)0x0)" (( "(") (binary_expression "iVar2 == 0 && pcVar1 != (char *)0x0" (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) (&& "&&") (binary_expression "pcVar1 != (char *)0x0" (identifier "pcVar1") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")))) () ")")))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "BIO_printf(DAT_000cc58c,"Can\'t use SSL_get_servername\n");" (call_expression "BIO_printf(DAT_000cc58c,"Can\'t use SSL_get_servername\n")" (identifier "BIO_printf") (argument_list "(DAT_000cc58c,"Can\'t use SSL_get_servername\n")" (( "(") (identifier "DAT_000cc58c") (, ",") (string_literal ""Can\'t use SSL_get_servername\n"" (" """) (string_content "Can") (escape_sequence "\'") (string_content "t use SSL_get_servername") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int function_1(type_1 *s,int *ad,void *arg)

{
  char *var_5;
  int var_3;
  
  var_5 = var_1((type_1 *)s,0);
  var_3 = var_2((type_1 *)s);
  if (var_3 != -1) {
    var_3 = var_4(s);
    *(type_2 *)((int)arg + 4) = (type_2)(var_3 == 0 && var_5 != (char *)0x0);
    return 0;
  }
  var_6((type_3 *)bio_err,"Can\'t use SSL_get_servername\n");
  return 0;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))))))) (return_statement (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence))))) (return_statement (number_literal)))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 MASKED(SSL *param_1,undefined4 param_2,int param_3)

{
  char *pcVar1;
  int iVar2;
  
  pcVar1 = SSL_get_servername(param_1,0);
  iVar2 = SSL_get_servername_type(param_1);
  if (iVar2 != -1) {
    iVar2 = SSL_session_reused(param_1);
    *(uint *)(param_3 + 4) = (uint)(iVar2 == 0 && pcVar1 != (char *)0x0);
    return 0;
  }
  BIO_printf(DAT_000cc58c,"Can\'t use SSL_get_servername\n");
  return 0;
}

