
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

CURLcode ldap_done(connectdata *conn,CURLcode res,_Bool premature)

{
  int *piVar1;
  Curl_easy *pCVar2;
  
  pCVar2 = conn->data;
  piVar1 = (int *)(pCVar2->req).protop;
  if (piVar1 != (int *)0x0) {
    if (*piVar1 != 0) {
      ldap_abandon_ext(((conn->proto).tftpc)->state,*piVar1,0,0);
      *piVar1 = 0;
      pCVar2 = conn->data;
    }
    (pCVar2->req).protop = (void *)0x0;
    (*Curl_cfree)(piVar1);
  }
  return CURLE_OK;
}



undefined4 __regparm2 FUN_0005b360(undefined4 param_1,undefined4 param_2,int *param_3)

{
  int *piVar1;
  int iVar2;
  int unaff_EBX;
  
  entry(param_2,0x5b36c);
  iVar2 = *param_3;
  piVar1 = *(int **)(iVar2 + 0x148);
  if (piVar1 != (int *)0x0) {
    if (*piVar1 != 0) {
      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);
      *piVar1 = 0;
      iVar2 = *param_3;
    }
    *(undefined4 *)(iVar2 + 0x148) = 0;
    (**(code **)(unaff_EBX + 0x55d00))(piVar1);
  }
  return 0;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV EDI,dword ptr [ESP + 0x10]
CALL 0x00019ed0
ADD EBX,0x55474
MOV EAX,dword ptr [EDI]
MOV ESI,dword ptr [EAX + 0x148]
TEST ESI,ESI
JZ 0x0005b39d
MOV EDX,dword ptr [ESI]
TEST EDX,EDX
JNZ 0x0005b3a8
MOV dword ptr [EAX + 0x148],0x0
SUB ESP,0xc
LEA EAX,[EBX + 0x88c]
PUSH ESI
CALL dword ptr [EAX]
ADD ESP,0x10
POP EBX
XOR EAX,EAX
POP ESI
POP EDI
RET
PUSH 0x0
PUSH 0x0
PUSH EDX
MOV EAX,dword ptr [EDI + 0x4a4]
PUSH dword ptr [EAX]
CALL 0x00018740
MOV dword ptr [ESI],0x0
MOV EAX,dword ptr [EDI]
ADD ESP,0x10
JMP 0x0005b384
(translation_unit "undefined4 __regparm2 FUN_0005b360(undefined4 param_1,undefined4 param_2,int *param_3)\n\n{\n  int *piVar1;\n  int iVar2;\n  int unaff_EBX;\n  \n  entry(param_2,0x5b36c);\n  iVar2 = *param_3;\n  piVar1 = *(int **)(iVar2 + 0x148);\n  if (piVar1 != (int *)0x0) {\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }\n    *(undefined4 *)(iVar2 + 0x148) = 0;\n    (**(code **)(unaff_EBX + 0x55d00))(piVar1);\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 __regparm2 FUN_0005b360(undefined4 param_1,undefined4 param_2,int *param_3)\n\n{\n  int *piVar1;\n  int iVar2;\n  int unaff_EBX;\n  \n  entry(param_2,0x5b36c);\n  iVar2 = *param_3;\n  piVar1 = *(int **)(iVar2 + 0x148);\n  if (piVar1 != (int *)0x0) {\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }\n    *(undefined4 *)(iVar2 + 0x148) = 0;\n    (**(code **)(unaff_EBX + 0x55d00))(piVar1);\n  }\n  return 0;\n}" type_identifier (ERROR "__regparm2" identifier) (function_declarator "FUN_0005b360(undefined4 param_1,undefined4 param_2,int *param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int *param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int unaff_EBX;\n  \n  entry(param_2,0x5b36c);\n  iVar2 = *param_3;\n  piVar1 = *(int **)(iVar2 + 0x148);\n  if (piVar1 != (int *)0x0) {\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }\n    *(undefined4 *)(iVar2 + 0x148) = 0;\n    (**(code **)(unaff_EBX + 0x55d00))(piVar1);\n  }\n  return 0;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (expression_statement "entry(param_2,0x5b36c);" (call_expression "entry(param_2,0x5b36c)" identifier (argument_list "(param_2,0x5b36c)" ( identifier , number_literal ))) ;) (expression_statement "iVar2 = *param_3;" (assignment_expression "iVar2 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) (expression_statement "piVar1 = *(int **)(iVar2 + 0x148);" (assignment_expression "piVar1 = *(int **)(iVar2 + 0x148)" identifier = (pointer_expression "*(int **)(iVar2 + 0x148)" * (cast_expression "(int **)(iVar2 + 0x148)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar2 + 0x148)" ( (binary_expression "iVar2 + 0x148" identifier + number_literal) ))))) ;) (if_statement "if (piVar1 != (int *)0x0) {\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }\n    *(undefined4 *)(iVar2 + 0x148) = 0;\n    (**(code **)(unaff_EBX + 0x55d00))(piVar1);\n  }" if (parenthesized_expression "(piVar1 != (int *)0x0)" ( (binary_expression "piVar1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }\n    *(undefined4 *)(iVar2 + 0x148) = 0;\n    (**(code **)(unaff_EBX + 0x55d00))(piVar1);\n  }" { (if_statement "if (*piVar1 != 0) {\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }" if (parenthesized_expression "(*piVar1 != 0)" ( (binary_expression "*piVar1 != 0" (pointer_expression "*piVar1" * identifier) != number_literal) )) (compound_statement "{\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }" { (expression_statement "ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);" (call_expression "ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0)" identifier (argument_list "(*(undefined4 *)param_3[0x129],*piVar1,0,0)" ( (pointer_expression "*(undefined4 *)param_3[0x129]" * (cast_expression "(undefined4 *)param_3[0x129]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_3[0x129]" identifier [ number_literal ]))) , (pointer_expression "*piVar1" * identifier) , number_literal , number_literal ))) ;) (expression_statement "*piVar1 = 0;" (assignment_expression "*piVar1 = 0" (pointer_expression "*piVar1" * identifier) = number_literal) ;) (expression_statement "iVar2 = *param_3;" (assignment_expression "iVar2 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) })) (expression_statement "*(undefined4 *)(iVar2 + 0x148) = 0;" (assignment_expression "*(undefined4 *)(iVar2 + 0x148) = 0" (pointer_expression "*(undefined4 *)(iVar2 + 0x148)" * (cast_expression "(undefined4 *)(iVar2 + 0x148)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x148)" ( (binary_expression "iVar2 + 0x148" identifier + number_literal) )))) = number_literal) ;) (expression_statement "(**(code **)(unaff_EBX + 0x55d00))(piVar1);" (call_expression "(**(code **)(unaff_EBX + 0x55d00))(piVar1)" (parenthesized_expression "(**(code **)(unaff_EBX + 0x55d00))" ( (pointer_expression "**(code **)(unaff_EBX + 0x55d00)" * (pointer_expression "*(code **)(unaff_EBX + 0x55d00)" * (cast_expression "(code **)(unaff_EBX + 0x55d00)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBX + 0x55d00)" ( (binary_expression "unaff_EBX + 0x55d00" identifier + number_literal) ))))) )) (argument_list "(piVar1)" ( identifier ))) ;) })) (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: Enum "anon_enum_32": Some values do not have unique names */\n\nCURLcode ldap_done(connectdata *conn,CURLcode res,_Bool premature)\n\n{\n  int *piVar1;\n  Curl_easy *pCVar2;\n  \n  pCVar2 = conn->data;\n  piVar1 = (int *)(pCVar2->req).protop;\n  if (piVar1 != (int *)0x0) {\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(((conn->proto).tftpc)->state,*piVar1,0,0);\n      *piVar1 = 0;\n      pCVar2 = conn->data;\n    }\n    (pCVar2->req).protop = (void *)0x0;\n    (*Curl_cfree)(piVar1);\n  }\n  return CURLE_OK;\n}\n\n" comment comment (function_definition "CURLcode ldap_done(connectdata *conn,CURLcode res,_Bool premature)\n\n{\n  int *piVar1;\n  Curl_easy *pCVar2;\n  \n  pCVar2 = conn->data;\n  piVar1 = (int *)(pCVar2->req).protop;\n  if (piVar1 != (int *)0x0) {\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(((conn->proto).tftpc)->state,*piVar1,0,0);\n      *piVar1 = 0;\n      pCVar2 = conn->data;\n    }\n    (pCVar2->req).protop = (void *)0x0;\n    (*Curl_cfree)(piVar1);\n  }\n  return CURLE_OK;\n}" type_identifier (function_declarator "ldap_done(connectdata *conn,CURLcode res,_Bool premature)" identifier (parameter_list "(connectdata *conn,CURLcode res,_Bool premature)" ( (parameter_declaration "connectdata *conn" type_identifier (pointer_declarator "*conn" * identifier)) , (parameter_declaration "CURLcode res" type_identifier identifier) , (parameter_declaration "_Bool premature" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  Curl_easy *pCVar2;\n  \n  pCVar2 = conn->data;\n  piVar1 = (int *)(pCVar2->req).protop;\n  if (piVar1 != (int *)0x0) {\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(((conn->proto).tftpc)->state,*piVar1,0,0);\n      *piVar1 = 0;\n      pCVar2 = conn->data;\n    }\n    (pCVar2->req).protop = (void *)0x0;\n    (*Curl_cfree)(piVar1);\n  }\n  return CURLE_OK;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "Curl_easy *pCVar2;" type_identifier (pointer_declarator "*pCVar2" * identifier) ;) (expression_statement "pCVar2 = conn->data;" (assignment_expression "pCVar2 = conn->data" identifier = (field_expression "conn->data" identifier -> field_identifier)) ;) (expression_statement "piVar1 = (int *)(pCVar2->req).protop;" (assignment_expression "piVar1 = (int *)(pCVar2->req).protop" identifier = (cast_expression "(int *)(pCVar2->req).protop" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (field_expression "(pCVar2->req).protop" (parenthesized_expression "(pCVar2->req)" ( (field_expression "pCVar2->req" identifier -> field_identifier) )) . field_identifier))) ;) (if_statement "if (piVar1 != (int *)0x0) {\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(((conn->proto).tftpc)->state,*piVar1,0,0);\n      *piVar1 = 0;\n      pCVar2 = conn->data;\n    }\n    (pCVar2->req).protop = (void *)0x0;\n    (*Curl_cfree)(piVar1);\n  }" if (parenthesized_expression "(piVar1 != (int *)0x0)" ( (binary_expression "piVar1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(((conn->proto).tftpc)->state,*piVar1,0,0);\n      *piVar1 = 0;\n      pCVar2 = conn->data;\n    }\n    (pCVar2->req).protop = (void *)0x0;\n    (*Curl_cfree)(piVar1);\n  }" { (if_statement "if (*piVar1 != 0) {\n      ldap_abandon_ext(((conn->proto).tftpc)->state,*piVar1,0,0);\n      *piVar1 = 0;\n      pCVar2 = conn->data;\n    }" if (parenthesized_expression "(*piVar1 != 0)" ( (binary_expression "*piVar1 != 0" (pointer_expression "*piVar1" * identifier) != number_literal) )) (compound_statement "{\n      ldap_abandon_ext(((conn->proto).tftpc)->state,*piVar1,0,0);\n      *piVar1 = 0;\n      pCVar2 = conn->data;\n    }" { (expression_statement "ldap_abandon_ext(((conn->proto).tftpc)->state,*piVar1,0,0);" (call_expression "ldap_abandon_ext(((conn->proto).tftpc)->state,*piVar1,0,0)" identifier (argument_list "(((conn->proto).tftpc)->state,*piVar1,0,0)" ( (field_expression "((conn->proto).tftpc)->state" (parenthesized_expression "((conn->proto).tftpc)" ( (field_expression "(conn->proto).tftpc" (parenthesized_expression "(conn->proto)" ( (field_expression "conn->proto" identifier -> field_identifier) )) . field_identifier) )) -> field_identifier) , (pointer_expression "*piVar1" * identifier) , number_literal , number_literal ))) ;) (expression_statement "*piVar1 = 0;" (assignment_expression "*piVar1 = 0" (pointer_expression "*piVar1" * identifier) = number_literal) ;) (expression_statement "pCVar2 = conn->data;" (assignment_expression "pCVar2 = conn->data" identifier = (field_expression "conn->data" identifier -> field_identifier)) ;) })) (expression_statement "(pCVar2->req).protop = (void *)0x0;" (assignment_expression "(pCVar2->req).protop = (void *)0x0" (field_expression "(pCVar2->req).protop" (parenthesized_expression "(pCVar2->req)" ( (field_expression "pCVar2->req" identifier -> field_identifier) )) . field_identifier) = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "(*Curl_cfree)(piVar1);" (call_expression "(*Curl_cfree)(piVar1)" (parenthesized_expression "(*Curl_cfree)" ( (pointer_expression "*Curl_cfree" * identifier) )) (argument_list "(piVar1)" ( identifier ))) ;) })) (return_statement "return CURLE_OK;" return identifier ;) })))
(translation_unit "undefined4 __regparm2 FUN_0005b360(undefined4 param_1,undefined4 param_2,int *param_3)\n\n{\n  int *piVar1;\n  int iVar2;\n  int unaff_EBX;\n  \n  entry(param_2,0x5b36c);\n  iVar2 = *param_3;\n  piVar1 = *(int **)(iVar2 + 0x148);\n  if (piVar1 != (int *)0x0) {\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }\n    *(undefined4 *)(iVar2 + 0x148) = 0;\n    (**(code **)(unaff_EBX + 0x55d00))(piVar1);\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 __regparm2 FUN_0005b360(undefined4 param_1,undefined4 param_2,int *param_3)\n\n{\n  int *piVar1;\n  int iVar2;\n  int unaff_EBX;\n  \n  entry(param_2,0x5b36c);\n  iVar2 = *param_3;\n  piVar1 = *(int **)(iVar2 + 0x148);\n  if (piVar1 != (int *)0x0) {\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }\n    *(undefined4 *)(iVar2 + 0x148) = 0;\n    (**(code **)(unaff_EBX + 0x55d00))(piVar1);\n  }\n  return 0;\n}" type_identifier (ERROR "__regparm2" identifier) (function_declarator "FUN_0005b360(undefined4 param_1,undefined4 param_2,int *param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int *param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int unaff_EBX;\n  \n  entry(param_2,0x5b36c);\n  iVar2 = *param_3;\n  piVar1 = *(int **)(iVar2 + 0x148);\n  if (piVar1 != (int *)0x0) {\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }\n    *(undefined4 *)(iVar2 + 0x148) = 0;\n    (**(code **)(unaff_EBX + 0x55d00))(piVar1);\n  }\n  return 0;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (expression_statement "entry(param_2,0x5b36c);" (call_expression "entry(param_2,0x5b36c)" identifier (argument_list "(param_2,0x5b36c)" ( identifier , number_literal ))) ;) (expression_statement "iVar2 = *param_3;" (assignment_expression "iVar2 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) (expression_statement "piVar1 = *(int **)(iVar2 + 0x148);" (assignment_expression "piVar1 = *(int **)(iVar2 + 0x148)" identifier = (pointer_expression "*(int **)(iVar2 + 0x148)" * (cast_expression "(int **)(iVar2 + 0x148)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar2 + 0x148)" ( (binary_expression "iVar2 + 0x148" identifier + number_literal) ))))) ;) (if_statement "if (piVar1 != (int *)0x0) {\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }\n    *(undefined4 *)(iVar2 + 0x148) = 0;\n    (**(code **)(unaff_EBX + 0x55d00))(piVar1);\n  }" if (parenthesized_expression "(piVar1 != (int *)0x0)" ( (binary_expression "piVar1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }\n    *(undefined4 *)(iVar2 + 0x148) = 0;\n    (**(code **)(unaff_EBX + 0x55d00))(piVar1);\n  }" { (if_statement "if (*piVar1 != 0) {\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }" if (parenthesized_expression "(*piVar1 != 0)" ( (binary_expression "*piVar1 != 0" (pointer_expression "*piVar1" * identifier) != number_literal) )) (compound_statement "{\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }" { (expression_statement "ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);" (call_expression "ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0)" identifier (argument_list "(*(undefined4 *)param_3[0x129],*piVar1,0,0)" ( (pointer_expression "*(undefined4 *)param_3[0x129]" * (cast_expression "(undefined4 *)param_3[0x129]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_3[0x129]" identifier [ number_literal ]))) , (pointer_expression "*piVar1" * identifier) , number_literal , number_literal ))) ;) (expression_statement "*piVar1 = 0;" (assignment_expression "*piVar1 = 0" (pointer_expression "*piVar1" * identifier) = number_literal) ;) (expression_statement "iVar2 = *param_3;" (assignment_expression "iVar2 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) })) (expression_statement "*(undefined4 *)(iVar2 + 0x148) = 0;" (assignment_expression "*(undefined4 *)(iVar2 + 0x148) = 0" (pointer_expression "*(undefined4 *)(iVar2 + 0x148)" * (cast_expression "(undefined4 *)(iVar2 + 0x148)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x148)" ( (binary_expression "iVar2 + 0x148" identifier + number_literal) )))) = number_literal) ;) (expression_statement "(**(code **)(unaff_EBX + 0x55d00))(piVar1);" (call_expression "(**(code **)(unaff_EBX + 0x55d00))(piVar1)" (parenthesized_expression "(**(code **)(unaff_EBX + 0x55d00))" ( (pointer_expression "**(code **)(unaff_EBX + 0x55d00)" * (pointer_expression "*(code **)(unaff_EBX + 0x55d00)" * (cast_expression "(code **)(unaff_EBX + 0x55d00)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBX + 0x55d00)" ( (binary_expression "unaff_EBX + 0x55d00" identifier + number_literal) ))))) )) (argument_list "(piVar1)" ( identifier ))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) , (pointer_expression * IDENT) , LIT , LIT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (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 ( IDENT ))) ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 __regparm2 FUN_0005b360(undefined4 param_1,undefined4 param_2,int *param_3)\n\n{\n  int *piVar1;\n  int iVar2;\n  int unaff_EBX;\n  \n  entry(param_2,0x5b36c);\n  iVar2 = *param_3;\n  piVar1 = *(int **)(iVar2 + 0x148);\n  if (piVar1 != (int *)0x0) {\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }\n    *(undefined4 *)(iVar2 + 0x148) = 0;\n    (**(code **)(unaff_EBX + 0x55d00))(piVar1);\n  }\n  return 0;\n}" (type_identifier "undefined4") (ERROR "__regparm2" (identifier "__regparm2")) (function_declarator "FUN_0005b360(undefined4 param_1,undefined4 param_2,int *param_3)" (identifier "FUN_0005b360") (parameter_list "(undefined4 param_1,undefined4 param_2,int *param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int *param_3" (primitive_type "int") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int unaff_EBX;\n  \n  entry(param_2,0x5b36c);\n  iVar2 = *param_3;\n  piVar1 = *(int **)(iVar2 + 0x148);\n  if (piVar1 != (int *)0x0) {\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }\n    *(undefined4 *)(iVar2 + 0x148) = 0;\n    (**(code **)(unaff_EBX + 0x55d00))(piVar1);\n  }\n  return 0;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int unaff_EBX;" (primitive_type "int") (identifier "unaff_EBX") (; ";")) (expression_statement "entry(param_2,0x5b36c);" (call_expression "entry(param_2,0x5b36c)" (identifier "entry") (argument_list "(param_2,0x5b36c)" (( "(") (identifier "param_2") (, ",") (number_literal "0x5b36c") () ")"))) (; ";")) (expression_statement "iVar2 = *param_3;" (assignment_expression "iVar2 = *param_3" (identifier "iVar2") (= "=") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) (; ";")) (expression_statement "piVar1 = *(int **)(iVar2 + 0x148);" (assignment_expression "piVar1 = *(int **)(iVar2 + 0x148)" (identifier "piVar1") (= "=") (pointer_expression "*(int **)(iVar2 + 0x148)" (* "*") (cast_expression "(int **)(iVar2 + 0x148)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar2 + 0x148)" (( "(") (binary_expression "iVar2 + 0x148" (identifier "iVar2") (+ "+") (number_literal "0x148")) () ")"))))) (; ";")) (if_statement "if (piVar1 != (int *)0x0) {\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }\n    *(undefined4 *)(iVar2 + 0x148) = 0;\n    (**(code **)(unaff_EBX + 0x55d00))(piVar1);\n  }" (if "if") (parenthesized_expression "(piVar1 != (int *)0x0)" (( "(") (binary_expression "piVar1 != (int *)0x0" (identifier "piVar1") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if (*piVar1 != 0) {\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }\n    *(undefined4 *)(iVar2 + 0x148) = 0;\n    (**(code **)(unaff_EBX + 0x55d00))(piVar1);\n  }" ({ "{") (if_statement "if (*piVar1 != 0) {\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }" (if "if") (parenthesized_expression "(*piVar1 != 0)" (( "(") (binary_expression "*piVar1 != 0" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);\n      *piVar1 = 0;\n      iVar2 = *param_3;\n    }" ({ "{") (expression_statement "ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);" (call_expression "ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0)" (identifier "ldap_abandon_ext") (argument_list "(*(undefined4 *)param_3[0x129],*piVar1,0,0)" (( "(") (pointer_expression "*(undefined4 *)param_3[0x129]" (* "*") (cast_expression "(undefined4 *)param_3[0x129]" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_3[0x129]" (identifier "param_3") ([ "[") (number_literal "0x129") (] "]")))) (, ",") (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (, ",") (number_literal "0") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "*piVar1 = 0;" (assignment_expression "*piVar1 = 0" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar2 = *param_3;" (assignment_expression "iVar2 = *param_3" (identifier "iVar2") (= "=") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(iVar2 + 0x148) = 0;" (assignment_expression "*(undefined4 *)(iVar2 + 0x148) = 0" (pointer_expression "*(undefined4 *)(iVar2 + 0x148)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0x148)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x148)" (( "(") (binary_expression "iVar2 + 0x148" (identifier "iVar2") (+ "+") (number_literal "0x148")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "(**(code **)(unaff_EBX + 0x55d00))(piVar1);" (call_expression "(**(code **)(unaff_EBX + 0x55d00))(piVar1)" (parenthesized_expression "(**(code **)(unaff_EBX + 0x55d00))" (( "(") (pointer_expression "**(code **)(unaff_EBX + 0x55d00)" (* "*") (pointer_expression "*(code **)(unaff_EBX + 0x55d00)" (* "*") (cast_expression "(code **)(unaff_EBX + 0x55d00)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(unaff_EBX + 0x55d00)" (( "(") (binary_expression "unaff_EBX + 0x55d00" (identifier "unaff_EBX") (+ "+") (number_literal "0x55d00")) () ")"))))) () ")")) (argument_list "(piVar1)" (( "(") (identifier "piVar1") () ")"))) (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

type_1 function_1(type_2 *conn,type_1 res,type_3 premature)

{
  int *var_1;
  type_4 *pCVar2;
  
  pCVar2 = conn->data;
  var_1 = (int *)(pCVar2->req).protop;
  if (var_1 != (int *)0x0) {
    if (*var_1 != 0) {
      var_2(((conn->proto).tftpc)->state,*var_1,0,0);
      *var_1 = 0;
      pCVar2 = conn->data;
    }
    (pCVar2->req).protop = (void *)0x0;
    (*Curl_cfree)(var_1);
  }
  return CURLE_OK;
}


(translation_unit (function_definition type: (type_identifier) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal)))) (pointer_expression argument: (identifier)) (number_literal) (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (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: (number_literal))) (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 (identifier)))))) (return_statement (number_literal)))))

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

{
  int *piVar1;
  int iVar2;
  int unaff_EBX;
  
  entry(param_2,0x5b36c);
  iVar2 = *param_3;
  piVar1 = *(int **)(iVar2 + 0x148);
  if (piVar1 != (int *)0x0) {
    if (*piVar1 != 0) {
      ldap_abandon_ext(*(undefined4 *)param_3[0x129],*piVar1,0,0);
      *piVar1 = 0;
      iVar2 = *param_3;
    }
    *(undefined4 *)(iVar2 + 0x148) = 0;
    (**(code **)(unaff_EBX + 0x55d00))(piVar1);
  }
  return 0;
}

