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

void Curl_thread_destroy(pthread_t *hnd)

{
  if (hnd != (pthread_t *)0x0) {
    pthread_detach(*hnd);
    (*Curl_cfree)(hnd);
    return;
  }
  return;
}



void __regparm3 FUN_0005a100(undefined4 param_1,undefined4 param_2)

{
  int unaff_EBX;
  pthread_t *unaff_retaddr;
  
  entry(param_2,0x5a107);
  if (unaff_retaddr != (pthread_t *)0x0) {
    pthread_detach(*unaff_retaddr);
                    /* WARNING: Could not recover jumptable at 0x0005a133. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    (**(code **)(unaff_EBX + 0x56f65))();
    return;
  }
  return;
}


PUSH ESI
PUSH EBX
CALL 0x00019ed0
ADD EBX,0x566d9
SUB ESP,0x4
MOV ESI,dword ptr [ESP + 0x10]
TEST ESI,ESI
JZ 0x0005a138
SUB ESP,0xc
PUSH dword ptr [ESI]
CALL 0x00018ec0
LEA EAX,[EBX + 0x88c]
MOV dword ptr [ESP + 0x20],ESI
MOV EAX,dword ptr [EAX]
ADD ESP,0x14
POP EBX
POP ESI
JMP EAX
ADD ESP,0x4
POP EBX
POP ESI
RET
(translation_unit "void __regparm3 FUN_0005a100(undefined4 param_1,undefined4 param_2)\n\n{\n  int unaff_EBX;\n  pthread_t *unaff_retaddr;\n  \n  entry(param_2,0x5a107);\n  if (unaff_retaddr != (pthread_t *)0x0) {\n    pthread_detach(*unaff_retaddr);\n                    /* WARNING: Could not recover jumptable at 0x0005a133. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (**(code **)(unaff_EBX + 0x56f65))();\n    return;\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0005a100(undefined4 param_1,undefined4 param_2)\n\n{\n  int unaff_EBX;\n  pthread_t *unaff_retaddr;\n  \n  entry(param_2,0x5a107);\n  if (unaff_retaddr != (pthread_t *)0x0) {\n    pthread_detach(*unaff_retaddr);\n                    /* WARNING: Could not recover jumptable at 0x0005a133. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (**(code **)(unaff_EBX + 0x56f65))();\n    return;\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0005a100(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int unaff_EBX;\n  pthread_t *unaff_retaddr;\n  \n  entry(param_2,0x5a107);\n  if (unaff_retaddr != (pthread_t *)0x0) {\n    pthread_detach(*unaff_retaddr);\n                    /* WARNING: Could not recover jumptable at 0x0005a133. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (**(code **)(unaff_EBX + 0x56f65))();\n    return;\n  }\n  return;\n}" { (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "pthread_t *unaff_retaddr;" type_identifier (pointer_declarator "*unaff_retaddr" * identifier) ;) (expression_statement "entry(param_2,0x5a107);" (call_expression "entry(param_2,0x5a107)" identifier (argument_list "(param_2,0x5a107)" ( identifier , number_literal ))) ;) (if_statement "if (unaff_retaddr != (pthread_t *)0x0) {\n    pthread_detach(*unaff_retaddr);\n                    /* WARNING: Could not recover jumptable at 0x0005a133. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (**(code **)(unaff_EBX + 0x56f65))();\n    return;\n  }" if (parenthesized_expression "(unaff_retaddr != (pthread_t *)0x0)" ( (binary_expression "unaff_retaddr != (pthread_t *)0x0" identifier != (cast_expression "(pthread_t *)0x0" ( (type_descriptor "pthread_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pthread_detach(*unaff_retaddr);\n                    /* WARNING: Could not recover jumptable at 0x0005a133. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n    (**(code **)(unaff_EBX + 0x56f65))();\n    return;\n  }" { (expression_statement "pthread_detach(*unaff_retaddr);" (call_expression "pthread_detach(*unaff_retaddr)" identifier (argument_list "(*unaff_retaddr)" ( (pointer_expression "*unaff_retaddr" * identifier) ))) ;) comment comment (expression_statement "(**(code **)(unaff_EBX + 0x56f65))();" (call_expression "(**(code **)(unaff_EBX + 0x56f65))()" (parenthesized_expression "(**(code **)(unaff_EBX + 0x56f65))" ( (pointer_expression "**(code **)(unaff_EBX + 0x56f65)" * (pointer_expression "*(code **)(unaff_EBX + 0x56f65)" * (cast_expression "(code **)(unaff_EBX + 0x56f65)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBX + 0x56f65)" ( (binary_expression "unaff_EBX + 0x56f65" identifier + number_literal) ))))) )) (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid Curl_thread_destroy(pthread_t *hnd)\n\n{\n  if (hnd != (pthread_t *)0x0) {\n    pthread_detach(*hnd);\n    (*Curl_cfree)(hnd);\n    return;\n  }\n  return;\n}\n\n" comment (function_definition "void Curl_thread_destroy(pthread_t *hnd)\n\n{\n  if (hnd != (pthread_t *)0x0) {\n    pthread_detach(*hnd);\n    (*Curl_cfree)(hnd);\n    return;\n  }\n  return;\n}" primitive_type (function_declarator "Curl_thread_destroy(pthread_t *hnd)" identifier (parameter_list "(pthread_t *hnd)" ( (parameter_declaration "pthread_t *hnd" type_identifier (pointer_declarator "*hnd" * identifier)) ))) (compound_statement "{\n  if (hnd != (pthread_t *)0x0) {\n    pthread_detach(*hnd);\n    (*Curl_cfree)(hnd);\n    return;\n  }\n  return;\n}" { (if_statement "if (hnd != (pthread_t *)0x0) {\n    pthread_detach(*hnd);\n    (*Curl_cfree)(hnd);\n    return;\n  }" if (parenthesized_expression "(hnd != (pthread_t *)0x0)" ( (binary_expression "hnd != (pthread_t *)0x0" identifier != (cast_expression "(pthread_t *)0x0" ( (type_descriptor "pthread_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pthread_detach(*hnd);\n    (*Curl_cfree)(hnd);\n    return;\n  }" { (expression_statement "pthread_detach(*hnd);" (call_expression "pthread_detach(*hnd)" identifier (argument_list "(*hnd)" ( (pointer_expression "*hnd" * identifier) ))) ;) (expression_statement "(*Curl_cfree)(hnd);" (call_expression "(*Curl_cfree)(hnd)" (parenthesized_expression "(*Curl_cfree)" ( (pointer_expression "*Curl_cfree" * identifier) )) (argument_list "(hnd)" ( identifier ))) ;) (return_statement "return;" return ;) })) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_0005a100(undefined4 param_1,undefined4 param_2)\n\n{\n  int unaff_EBX;\n  pthread_t *unaff_retaddr;\n  \n  entry(param_2,0x5a107);\n  if (unaff_retaddr != (pthread_t *)0x0) {\n    pthread_detach(*unaff_retaddr);\n                    \n                    \n    (**(code **)(unaff_EBX + 0x56f65))();\n    return;\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0005a100(undefined4 param_1,undefined4 param_2)\n\n{\n  int unaff_EBX;\n  pthread_t *unaff_retaddr;\n  \n  entry(param_2,0x5a107);\n  if (unaff_retaddr != (pthread_t *)0x0) {\n    pthread_detach(*unaff_retaddr);\n                    \n                    \n    (**(code **)(unaff_EBX + 0x56f65))();\n    return;\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0005a100(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int unaff_EBX;\n  pthread_t *unaff_retaddr;\n  \n  entry(param_2,0x5a107);\n  if (unaff_retaddr != (pthread_t *)0x0) {\n    pthread_detach(*unaff_retaddr);\n                    \n                    \n    (**(code **)(unaff_EBX + 0x56f65))();\n    return;\n  }\n  return;\n}" { (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "pthread_t *unaff_retaddr;" type_identifier (pointer_declarator "*unaff_retaddr" * identifier) ;) (expression_statement "entry(param_2,0x5a107);" (call_expression "entry(param_2,0x5a107)" identifier (argument_list "(param_2,0x5a107)" ( identifier , number_literal ))) ;) (if_statement "if (unaff_retaddr != (pthread_t *)0x0) {\n    pthread_detach(*unaff_retaddr);\n                    \n                    \n    (**(code **)(unaff_EBX + 0x56f65))();\n    return;\n  }" if (parenthesized_expression "(unaff_retaddr != (pthread_t *)0x0)" ( (binary_expression "unaff_retaddr != (pthread_t *)0x0" identifier != (cast_expression "(pthread_t *)0x0" ( (type_descriptor "pthread_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pthread_detach(*unaff_retaddr);\n                    \n                    \n    (**(code **)(unaff_EBX + 0x56f65))();\n    return;\n  }" { (expression_statement "pthread_detach(*unaff_retaddr);" (call_expression "pthread_detach(*unaff_retaddr)" identifier (argument_list "(*unaff_retaddr)" ( (pointer_expression "*unaff_retaddr" * identifier) ))) ;) (expression_statement "(**(code **)(unaff_EBX + 0x56f65))();" (call_expression "(**(code **)(unaff_EBX + 0x56f65))()" (parenthesized_expression "(**(code **)(unaff_EBX + 0x56f65))" ( (pointer_expression "**(code **)(unaff_EBX + 0x56f65)" * (pointer_expression "*(code **)(unaff_EBX + 0x56f65)" * (cast_expression "(code **)(unaff_EBX + 0x56f65)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBX + 0x56f65)" ( (binary_expression "unaff_EBX + 0x56f65" identifier + number_literal) ))))) )) (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( ))) ;) (return_statement return ;) })) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_0005a100(undefined4 param_1,undefined4 param_2)\n\n{\n  int unaff_EBX;\n  pthread_t *unaff_retaddr;\n  \n  entry(param_2,0x5a107);\n  if (unaff_retaddr != (pthread_t *)0x0) {\n    pthread_detach(*unaff_retaddr);\n                    \n                    \n    (**(code **)(unaff_EBX + 0x56f65))();\n    return;\n  }\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0005a100(undefined4 param_1,undefined4 param_2)" (identifier "FUN_0005a100") (parameter_list "(undefined4 param_1,undefined4 param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  int unaff_EBX;\n  pthread_t *unaff_retaddr;\n  \n  entry(param_2,0x5a107);\n  if (unaff_retaddr != (pthread_t *)0x0) {\n    pthread_detach(*unaff_retaddr);\n                    \n                    \n    (**(code **)(unaff_EBX + 0x56f65))();\n    return;\n  }\n  return;\n}" ({ "{") (declaration "int unaff_EBX;" (primitive_type "int") (identifier "unaff_EBX") (; ";")) (declaration "pthread_t *unaff_retaddr;" (type_identifier "pthread_t") (pointer_declarator "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (; ";")) (expression_statement "entry(param_2,0x5a107);" (call_expression "entry(param_2,0x5a107)" (identifier "entry") (argument_list "(param_2,0x5a107)" (( "(") (identifier "param_2") (, ",") (number_literal "0x5a107") () ")"))) (; ";")) (if_statement "if (unaff_retaddr != (pthread_t *)0x0) {\n    pthread_detach(*unaff_retaddr);\n                    \n                    \n    (**(code **)(unaff_EBX + 0x56f65))();\n    return;\n  }" (if "if") (parenthesized_expression "(unaff_retaddr != (pthread_t *)0x0)" (( "(") (binary_expression "unaff_retaddr != (pthread_t *)0x0" (identifier "unaff_retaddr") (!= "!=") (cast_expression "(pthread_t *)0x0" (( "(") (type_descriptor "pthread_t *" (type_identifier "pthread_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    pthread_detach(*unaff_retaddr);\n                    \n                    \n    (**(code **)(unaff_EBX + 0x56f65))();\n    return;\n  }" ({ "{") (expression_statement "pthread_detach(*unaff_retaddr);" (call_expression "pthread_detach(*unaff_retaddr)" (identifier "pthread_detach") (argument_list "(*unaff_retaddr)" (( "(") (pointer_expression "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) () ")"))) (; ";")) (expression_statement "(**(code **)(unaff_EBX + 0x56f65))();" (call_expression "(**(code **)(unaff_EBX + 0x56f65))()" (parenthesized_expression "(**(code **)(unaff_EBX + 0x56f65))" (( "(") (pointer_expression "**(code **)(unaff_EBX + 0x56f65)" (* "*") (pointer_expression "*(code **)(unaff_EBX + 0x56f65)" (* "*") (cast_expression "(code **)(unaff_EBX + 0x56f65)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(unaff_EBX + 0x56f65)" (( "(") (binary_expression "unaff_EBX + 0x56f65" (identifier "unaff_EBX") (+ "+") (number_literal "0x56f65")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(type_1 *var_1)

{
  if (var_1 != (type_1 *)0x0) {
    var_2(*var_1);
    (*Curl_cfree)(var_1);
    return;
  }
  return;
}


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

void __regparm3 MASKED(undefined4 param_1,undefined4 param_2)

{
  int unaff_EBX;
  pthread_t *unaff_retaddr;
  
  entry(param_2,0x5a107);
  if (unaff_retaddr != (pthread_t *)0x0) {
    pthread_detach(*unaff_retaddr);
                    /* WARNING: Could not recover jumptable at 0x0005a133. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    (**(code **)(unaff_EBX + 0x56f65))();
    return;
  }
  return;
}

