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

CURLcode curl_mime_type(curl_mimepart *part,char *mimetype)

{
  char *pcVar1;
  
  if (part == (curl_mimepart *)0x0) {
    return CURLE_BAD_FUNCTION_ARGUMENT;
  }
  (*Curl_cfree)(part->mimetype);
  part->mimetype = (char *)0x0;
  if (mimetype != (char *)0x0) {
    pcVar1 = (*Curl_cstrdup)(mimetype);
    part->mimetype = pcVar1;
    if (pcVar1 == (char *)0x0) {
      return CURLE_OUT_OF_MEMORY;
    }
  }
  return CURLE_OK;
}



/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

undefined4 curl_mime_type(int param_1,int param_2)

{
  int iVar1;
  
  if (param_1 == 0) {
    return 0x2b;
  }
  (*(code *)PTR_free_000b706c)(*(undefined4 *)(param_1 + 0x30));
  *(undefined4 *)(param_1 + 0x30) = 0;
  if (param_2 != 0) {
    iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);
    *(int *)(param_1 + 0x30) = iVar1;
    if (iVar1 == 0) {
      return 0x1b;
    }
  }
  return 0;
}


PUSH EDI
PUSH ESI
CALL 0x0001d807
ADD ESI,0x48859
PUSH EBX
MOV EBX,dword ptr [ESP + 0x10]
MOV EDI,dword ptr [ESP + 0x14]
TEST EBX,EBX
JZ 0x0006dfe0
SUB ESP,0xc
PUSH dword ptr [EBX + 0x30]
LEA EAX,[ESI + 0x88c]
CALL dword ptr [EAX]
MOV dword ptr [EBX + 0x30],0x0
ADD ESP,0x10
TEST EDI,EDI
JZ 0x0006dfcc
SUB ESP,0xc
LEA EAX,[ESI + 0x884]
PUSH EDI
CALL dword ptr [EAX]
MOV dword ptr [EBX + 0x30],EAX
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0006dfd8
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
RET
MOV EAX,0x1b
JMP 0x0006dfce
POP EBX
MOV EAX,0x2b
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n\nundefined4 curl_mime_type(int param_1,int param_2)\n\n{\n  int iVar1;\n  \n  if (param_1 == 0) {\n    return 0x2b;\n  }\n  (*(code *)PTR_free_000b706c)(*(undefined4 *)(param_1 + 0x30));\n  *(undefined4 *)(param_1 + 0x30) = 0;\n  if (param_2 != 0) {\n    iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);\n    *(int *)(param_1 + 0x30) = iVar1;\n    if (iVar1 == 0) {\n      return 0x1b;\n    }\n  }\n  return 0;\n}\n\n" comment (function_definition "undefined4 curl_mime_type(int param_1,int param_2)\n\n{\n  int iVar1;\n  \n  if (param_1 == 0) {\n    return 0x2b;\n  }\n  (*(code *)PTR_free_000b706c)(*(undefined4 *)(param_1 + 0x30));\n  *(undefined4 *)(param_1 + 0x30) = 0;\n  if (param_2 != 0) {\n    iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);\n    *(int *)(param_1 + 0x30) = iVar1;\n    if (iVar1 == 0) {\n      return 0x1b;\n    }\n  }\n  return 0;\n}" type_identifier (function_declarator "curl_mime_type(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if (param_1 == 0) {\n    return 0x2b;\n  }\n  (*(code *)PTR_free_000b706c)(*(undefined4 *)(param_1 + 0x30));\n  *(undefined4 *)(param_1 + 0x30) = 0;\n  if (param_2 != 0) {\n    iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);\n    *(int *)(param_1 + 0x30) = iVar1;\n    if (iVar1 == 0) {\n      return 0x1b;\n    }\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (param_1 == 0) {\n    return 0x2b;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0x2b;\n  }" { (return_statement "return 0x2b;" return number_literal ;) })) (expression_statement "(*(code *)PTR_free_000b706c)(*(undefined4 *)(param_1 + 0x30));" (call_expression "(*(code *)PTR_free_000b706c)(*(undefined4 *)(param_1 + 0x30))" (parenthesized_expression "(*(code *)PTR_free_000b706c)" ( (pointer_expression "*(code *)PTR_free_000b706c" * (cast_expression "(code *)PTR_free_000b706c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 0x30))" ( (pointer_expression "*(undefined4 *)(param_1 + 0x30)" * (cast_expression "(undefined4 *)(param_1 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x30) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x30) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x30)" * (cast_expression "(undefined4 *)(param_1 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (param_2 != 0) {\n    iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);\n    *(int *)(param_1 + 0x30) = iVar1;\n    if (iVar1 == 0) {\n      return 0x1b;\n    }\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);\n    *(int *)(param_1 + 0x30) = iVar1;\n    if (iVar1 == 0) {\n      return 0x1b;\n    }\n  }" { (expression_statement "iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);" (assignment_expression "iVar1 = (*(code *)PTR_strdup_000b7064)(param_2)" identifier = (call_expression "(*(code *)PTR_strdup_000b7064)(param_2)" (parenthesized_expression "(*(code *)PTR_strdup_000b7064)" ( (pointer_expression "*(code *)PTR_strdup_000b7064" * (cast_expression "(code *)PTR_strdup_000b7064" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "*(int *)(param_1 + 0x30) = iVar1;" (assignment_expression "*(int *)(param_1 + 0x30) = iVar1" (pointer_expression "*(int *)(param_1 + 0x30)" * (cast_expression "(int *)(param_1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar1 == 0) {\n      return 0x1b;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      return 0x1b;\n    }" { (return_statement "return 0x1b;" return number_literal ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nCURLcode curl_mime_type(curl_mimepart *part,char *mimetype)\n\n{\n  char *pcVar1;\n  \n  if (part == (curl_mimepart *)0x0) {\n    return CURLE_BAD_FUNCTION_ARGUMENT;\n  }\n  (*Curl_cfree)(part->mimetype);\n  part->mimetype = (char *)0x0;\n  if (mimetype != (char *)0x0) {\n    pcVar1 = (*Curl_cstrdup)(mimetype);\n    part->mimetype = pcVar1;\n    if (pcVar1 == (char *)0x0) {\n      return CURLE_OUT_OF_MEMORY;\n    }\n  }\n  return CURLE_OK;\n}\n\n" comment comment (function_definition "CURLcode curl_mime_type(curl_mimepart *part,char *mimetype)\n\n{\n  char *pcVar1;\n  \n  if (part == (curl_mimepart *)0x0) {\n    return CURLE_BAD_FUNCTION_ARGUMENT;\n  }\n  (*Curl_cfree)(part->mimetype);\n  part->mimetype = (char *)0x0;\n  if (mimetype != (char *)0x0) {\n    pcVar1 = (*Curl_cstrdup)(mimetype);\n    part->mimetype = pcVar1;\n    if (pcVar1 == (char *)0x0) {\n      return CURLE_OUT_OF_MEMORY;\n    }\n  }\n  return CURLE_OK;\n}" type_identifier (function_declarator "curl_mime_type(curl_mimepart *part,char *mimetype)" identifier (parameter_list "(curl_mimepart *part,char *mimetype)" ( (parameter_declaration "curl_mimepart *part" type_identifier (pointer_declarator "*part" * identifier)) , (parameter_declaration "char *mimetype" primitive_type (pointer_declarator "*mimetype" * identifier)) ))) (compound_statement "{\n  char *pcVar1;\n  \n  if (part == (curl_mimepart *)0x0) {\n    return CURLE_BAD_FUNCTION_ARGUMENT;\n  }\n  (*Curl_cfree)(part->mimetype);\n  part->mimetype = (char *)0x0;\n  if (mimetype != (char *)0x0) {\n    pcVar1 = (*Curl_cstrdup)(mimetype);\n    part->mimetype = pcVar1;\n    if (pcVar1 == (char *)0x0) {\n      return CURLE_OUT_OF_MEMORY;\n    }\n  }\n  return CURLE_OK;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (if_statement "if (part == (curl_mimepart *)0x0) {\n    return CURLE_BAD_FUNCTION_ARGUMENT;\n  }" if (parenthesized_expression "(part == (curl_mimepart *)0x0)" ( (binary_expression "part == (curl_mimepart *)0x0" identifier == (cast_expression "(curl_mimepart *)0x0" ( (type_descriptor "curl_mimepart *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return CURLE_BAD_FUNCTION_ARGUMENT;\n  }" { (return_statement "return CURLE_BAD_FUNCTION_ARGUMENT;" return identifier ;) })) (expression_statement "(*Curl_cfree)(part->mimetype);" (call_expression "(*Curl_cfree)(part->mimetype)" (parenthesized_expression "(*Curl_cfree)" ( (pointer_expression "*Curl_cfree" * identifier) )) (argument_list "(part->mimetype)" ( (field_expression "part->mimetype" identifier -> field_identifier) ))) ;) (expression_statement "part->mimetype = (char *)0x0;" (assignment_expression "part->mimetype = (char *)0x0" (field_expression "part->mimetype" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (mimetype != (char *)0x0) {\n    pcVar1 = (*Curl_cstrdup)(mimetype);\n    part->mimetype = pcVar1;\n    if (pcVar1 == (char *)0x0) {\n      return CURLE_OUT_OF_MEMORY;\n    }\n  }" if (parenthesized_expression "(mimetype != (char *)0x0)" ( (binary_expression "mimetype != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar1 = (*Curl_cstrdup)(mimetype);\n    part->mimetype = pcVar1;\n    if (pcVar1 == (char *)0x0) {\n      return CURLE_OUT_OF_MEMORY;\n    }\n  }" { (expression_statement "pcVar1 = (*Curl_cstrdup)(mimetype);" (assignment_expression "pcVar1 = (*Curl_cstrdup)(mimetype)" identifier = (call_expression "(*Curl_cstrdup)(mimetype)" (parenthesized_expression "(*Curl_cstrdup)" ( (pointer_expression "*Curl_cstrdup" * identifier) )) (argument_list "(mimetype)" ( identifier )))) ;) (expression_statement "part->mimetype = pcVar1;" (assignment_expression "part->mimetype = pcVar1" (field_expression "part->mimetype" identifier -> field_identifier) = identifier) ;) (if_statement "if (pcVar1 == (char *)0x0) {\n      return CURLE_OUT_OF_MEMORY;\n    }" if (parenthesized_expression "(pcVar1 == (char *)0x0)" ( (binary_expression "pcVar1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return CURLE_OUT_OF_MEMORY;\n    }" { (return_statement "return CURLE_OUT_OF_MEMORY;" return identifier ;) })) })) (return_statement "return CURLE_OK;" return identifier ;) })))
(translation_unit "undefined4 curl_mime_type(int param_1,int param_2)\n\n{\n  int iVar1;\n  \n  if (param_1 == 0) {\n    return 0x2b;\n  }\n  (*(code *)PTR_free_000b706c)(*(undefined4 *)(param_1 + 0x30));\n  *(undefined4 *)(param_1 + 0x30) = 0;\n  if (param_2 != 0) {\n    iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);\n    *(int *)(param_1 + 0x30) = iVar1;\n    if (iVar1 == 0) {\n      return 0x1b;\n    }\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 curl_mime_type(int param_1,int param_2)\n\n{\n  int iVar1;\n  \n  if (param_1 == 0) {\n    return 0x2b;\n  }\n  (*(code *)PTR_free_000b706c)(*(undefined4 *)(param_1 + 0x30));\n  *(undefined4 *)(param_1 + 0x30) = 0;\n  if (param_2 != 0) {\n    iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);\n    *(int *)(param_1 + 0x30) = iVar1;\n    if (iVar1 == 0) {\n      return 0x1b;\n    }\n  }\n  return 0;\n}" type_identifier (function_declarator "curl_mime_type(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if (param_1 == 0) {\n    return 0x2b;\n  }\n  (*(code *)PTR_free_000b706c)(*(undefined4 *)(param_1 + 0x30));\n  *(undefined4 *)(param_1 + 0x30) = 0;\n  if (param_2 != 0) {\n    iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);\n    *(int *)(param_1 + 0x30) = iVar1;\n    if (iVar1 == 0) {\n      return 0x1b;\n    }\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (param_1 == 0) {\n    return 0x2b;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0x2b;\n  }" { (return_statement "return 0x2b;" return number_literal ;) })) (expression_statement "(*(code *)PTR_free_000b706c)(*(undefined4 *)(param_1 + 0x30));" (call_expression "(*(code *)PTR_free_000b706c)(*(undefined4 *)(param_1 + 0x30))" (parenthesized_expression "(*(code *)PTR_free_000b706c)" ( (pointer_expression "*(code *)PTR_free_000b706c" * (cast_expression "(code *)PTR_free_000b706c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 0x30))" ( (pointer_expression "*(undefined4 *)(param_1 + 0x30)" * (cast_expression "(undefined4 *)(param_1 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x30) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x30) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x30)" * (cast_expression "(undefined4 *)(param_1 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (param_2 != 0) {\n    iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);\n    *(int *)(param_1 + 0x30) = iVar1;\n    if (iVar1 == 0) {\n      return 0x1b;\n    }\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);\n    *(int *)(param_1 + 0x30) = iVar1;\n    if (iVar1 == 0) {\n      return 0x1b;\n    }\n  }" { (expression_statement "iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);" (assignment_expression "iVar1 = (*(code *)PTR_strdup_000b7064)(param_2)" identifier = (call_expression "(*(code *)PTR_strdup_000b7064)(param_2)" (parenthesized_expression "(*(code *)PTR_strdup_000b7064)" ( (pointer_expression "*(code *)PTR_strdup_000b7064" * (cast_expression "(code *)PTR_strdup_000b7064" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "*(int *)(param_1 + 0x30) = iVar1;" (assignment_expression "*(int *)(param_1 + 0x30) = iVar1" (pointer_expression "*(int *)(param_1 + 0x30)" * (cast_expression "(int *)(param_1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar1 == 0) {\n      return 0x1b;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      return 0x1b;\n    }" { (return_statement "return 0x1b;" return number_literal ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) })) (return_statement return LIT ;) })))
(function_definition "undefined4 curl_mime_type(int param_1,int param_2)\n\n{\n  int iVar1;\n  \n  if (param_1 == 0) {\n    return 0x2b;\n  }\n  (*(code *)PTR_free_000b706c)(*(undefined4 *)(param_1 + 0x30));\n  *(undefined4 *)(param_1 + 0x30) = 0;\n  if (param_2 != 0) {\n    iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);\n    *(int *)(param_1 + 0x30) = iVar1;\n    if (iVar1 == 0) {\n      return 0x1b;\n    }\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "curl_mime_type(int param_1,int param_2)" (identifier "curl_mime_type") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  if (param_1 == 0) {\n    return 0x2b;\n  }\n  (*(code *)PTR_free_000b706c)(*(undefined4 *)(param_1 + 0x30));\n  *(undefined4 *)(param_1 + 0x30) = 0;\n  if (param_2 != 0) {\n    iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);\n    *(int *)(param_1 + 0x30) = iVar1;\n    if (iVar1 == 0) {\n      return 0x1b;\n    }\n  }\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (if_statement "if (param_1 == 0) {\n    return 0x2b;\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return 0x2b;\n  }" ({ "{") (return_statement "return 0x2b;" (return "return") (number_literal "0x2b") (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_free_000b706c)(*(undefined4 *)(param_1 + 0x30));" (call_expression "(*(code *)PTR_free_000b706c)(*(undefined4 *)(param_1 + 0x30))" (parenthesized_expression "(*(code *)PTR_free_000b706c)" (( "(") (pointer_expression "*(code *)PTR_free_000b706c" (* "*") (cast_expression "(code *)PTR_free_000b706c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_000b706c"))) () ")")) (argument_list "(*(undefined4 *)(param_1 + 0x30))" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x30)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x30)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) () ")"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x30) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x30) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x30)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x30)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_2 != 0) {\n    iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);\n    *(int *)(param_1 + 0x30) = iVar1;\n    if (iVar1 == 0) {\n      return 0x1b;\n    }\n  }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);\n    *(int *)(param_1 + 0x30) = iVar1;\n    if (iVar1 == 0) {\n      return 0x1b;\n    }\n  }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);" (assignment_expression "iVar1 = (*(code *)PTR_strdup_000b7064)(param_2)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_strdup_000b7064)(param_2)" (parenthesized_expression "(*(code *)PTR_strdup_000b7064)" (( "(") (pointer_expression "*(code *)PTR_strdup_000b7064" (* "*") (cast_expression "(code *)PTR_strdup_000b7064" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strdup_000b7064"))) () ")")) (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (expression_statement "*(int *)(param_1 + 0x30) = iVar1;" (assignment_expression "*(int *)(param_1 + 0x30) = iVar1" (pointer_expression "*(int *)(param_1 + 0x30)" (* "*") (cast_expression "(int *)(param_1 + 0x30)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (iVar1 == 0) {\n      return 0x1b;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return 0x1b;\n    }" ({ "{") (return_statement "return 0x1b;" (return "return") (number_literal "0x1b") (; ";")) (} "}"))) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

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

type_1 function_1(type_2 *var_1,char *var_2)

{
  char *var_3;
  
  if (var_1 == (type_2 *)0x0) {
    return CURLE_BAD_FUNCTION_ARGUMENT;
  }
  (*Curl_cfree)(var_1->var_2);
  var_1->var_2 = (char *)0x0;
  if (var_2 != (char *)0x0) {
    var_3 = (*Curl_cstrdup)(var_2);
    var_1->var_2 = var_3;
    if (var_3 == (char *)0x0) {
      return CURLE_OUT_OF_MEMORY;
    }
  }
  return CURLE_OK;
}


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

/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

undefined4 MASKED(int param_1,int param_2)

{
  int iVar1;
  
  if (param_1 == 0) {
    return 0x2b;
  }
  (*(code *)PTR_free_000b706c)(*(undefined4 *)(param_1 + 0x30));
  *(undefined4 *)(param_1 + 0x30) = 0;
  if (param_2 != 0) {
    iVar1 = (*(code *)PTR_strdup_000b7064)(param_2);
    *(int *)(param_1 + 0x30) = iVar1;
    if (iVar1 == 0) {
      return 0x1b;
    }
  }
  return 0;
}

