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

char * __regparm3 plugin_strdup(bfd *abfd,char *str)

{
  size_t sVar1;
  char *__dest;
  undefined4 uVar2;
  char *fmt;
  
  sVar1 = strlen(str);
  __dest = (char *)bfd_alloc(abfd,sVar1 + 1,0);
  if (__dest == (char *)0x0) {
    uVar2 = bfd_get_error();
    fmt = (char *)dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);
    einfo(fmt,uVar2);
  }
  memcpy(__dest,str,sVar1 + 1);
  return __dest;
}



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

void * __regparm3 FUN_00036ea0(undefined4 param_1,char *param_2)

{
  size_t sVar1;
  void *__dest;
  undefined4 uVar2;
  undefined4 uVar3;
  
  sVar1 = strlen(param_2);
  __dest = (void *)bfd_alloc(param_1,sVar1 + 1,0);
  if (__dest == (void *)0x0) {
    uVar2 = bfd_get_error();
    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);
    FUN_00034dc0(uVar3,uVar2);
  }
  memcpy(__dest,param_2,sVar1 + 1);
  return __dest;
}


PUSH EBP
MOV EBP,EAX
PUSH EDI
MOV EDI,EDX
PUSH ESI
PUSH EBX
CALL 0x00017c50
ADD EBX,0x18b153
SUB ESP,0x28
PUSH EDX
CALL 0x00016870
ADD ESP,0xc
XOR EDX,EDX
LEA ESI,[EAX + 0x1]
PUSH EDX
PUSH ESI
PUSH EBP
CALL 0x00016350
ADD ESP,0x10
MOV EBP,EAX
TEST EAX,EAX
JZ 0x00036ef0
SUB ESP,0x4
PUSH ESI
PUSH EDI
PUSH EBP
CALL 0x00016250
ADD ESP,0x2c
MOV EAX,EBP
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x00016500
SUB ESP,0x4
MOV dword ptr [ESP + 0x10],EAX
LEA EAX,[EBX + 0xffebfe40]
PUSH 0x5
PUSH EAX
PUSH 0x0
CALL 0x00016380
POP EDX
POP ECX
MOV EDX,dword ptr [ESP + 0x14]
PUSH EDX
PUSH EAX
CALL 0x00034dc0
ADD ESP,0x10
JMP 0x00036ed5
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid * __regparm3 FUN_00036ea0(undefined4 param_1,char *param_2)\n\n{\n  size_t sVar1;\n  void *__dest;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  \n  sVar1 = strlen(param_2);\n  __dest = (void *)bfd_alloc(param_1,sVar1 + 1,0);\n  if (__dest == (void *)0x0) {\n    uVar2 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00034dc0(uVar3,uVar2);\n  }\n  memcpy(__dest,param_2,sVar1 + 1);\n  return __dest;\n}\n\n" comment (function_definition "void * __regparm3 FUN_00036ea0(undefined4 param_1,char *param_2)\n\n{\n  size_t sVar1;\n  void *__dest;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  \n  sVar1 = strlen(param_2);\n  __dest = (void *)bfd_alloc(param_1,sVar1 + 1,0);\n  if (__dest == (void *)0x0) {\n    uVar2 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00034dc0(uVar3,uVar2);\n  }\n  memcpy(__dest,param_2,sVar1 + 1);\n  return __dest;\n}" primitive_type (pointer_declarator "* __regparm3 FUN_00036ea0(undefined4 param_1,char *param_2)" * (ERROR "__regparm3" identifier) (function_declarator "FUN_00036ea0(undefined4 param_1,char *param_2)" identifier (parameter_list "(undefined4 param_1,char *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  size_t sVar1;\n  void *__dest;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  \n  sVar1 = strlen(param_2);\n  __dest = (void *)bfd_alloc(param_1,sVar1 + 1,0);\n  if (__dest == (void *)0x0) {\n    uVar2 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00034dc0(uVar3,uVar2);\n  }\n  memcpy(__dest,param_2,sVar1 + 1);\n  return __dest;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "sVar1 = strlen(param_2);" (assignment_expression "sVar1 = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "__dest = (void *)bfd_alloc(param_1,sVar1 + 1,0);" (assignment_expression "__dest = (void *)bfd_alloc(param_1,sVar1 + 1,0)" identifier = (cast_expression "(void *)bfd_alloc(param_1,sVar1 + 1,0)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "bfd_alloc(param_1,sVar1 + 1,0)" identifier (argument_list "(param_1,sVar1 + 1,0)" ( identifier , (binary_expression "sVar1 + 1" identifier + number_literal) , number_literal ))))) ;) (if_statement "if (__dest == (void *)0x0) {\n    uVar2 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00034dc0(uVar3,uVar2);\n  }" if (parenthesized_expression "(__dest == (void *)0x0)" ( (binary_expression "__dest == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar2 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00034dc0(uVar3,uVar2);\n  }" { (expression_statement "uVar2 = bfd_get_error();" (assignment_expression "uVar2 = bfd_get_error()" identifier = (call_expression "bfd_get_error()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);" (assignment_expression "uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5)" identifier = (call_expression "dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5)" identifier (argument_list "(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5)" ( number_literal , (string_literal ""%F%P: plugin_strdup failed to allocate memory: %s\n"" " string_content escape_sequence ") , number_literal )))) ;) (expression_statement "FUN_00034dc0(uVar3,uVar2);" (call_expression "FUN_00034dc0(uVar3,uVar2)" identifier (argument_list "(uVar3,uVar2)" ( identifier , identifier ))) ;) })) (expression_statement "memcpy(__dest,param_2,sVar1 + 1);" (call_expression "memcpy(__dest,param_2,sVar1 + 1)" identifier (argument_list "(__dest,param_2,sVar1 + 1)" ( identifier , identifier , (binary_expression "sVar1 + 1" identifier + number_literal) ))) ;) (return_statement "return __dest;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * __regparm3 plugin_strdup(bfd *abfd,char *str)\n\n{\n  size_t sVar1;\n  char *__dest;\n  undefined4 uVar2;\n  char *fmt;\n  \n  sVar1 = strlen(str);\n  __dest = (char *)bfd_alloc(abfd,sVar1 + 1,0);\n  if (__dest == (char *)0x0) {\n    uVar2 = bfd_get_error();\n    fmt = (char *)dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    einfo(fmt,uVar2);\n  }\n  memcpy(__dest,str,sVar1 + 1);\n  return __dest;\n}\n\n" comment (function_definition "char * __regparm3 plugin_strdup(bfd *abfd,char *str)\n\n{\n  size_t sVar1;\n  char *__dest;\n  undefined4 uVar2;\n  char *fmt;\n  \n  sVar1 = strlen(str);\n  __dest = (char *)bfd_alloc(abfd,sVar1 + 1,0);\n  if (__dest == (char *)0x0) {\n    uVar2 = bfd_get_error();\n    fmt = (char *)dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    einfo(fmt,uVar2);\n  }\n  memcpy(__dest,str,sVar1 + 1);\n  return __dest;\n}" primitive_type (pointer_declarator "* __regparm3 plugin_strdup(bfd *abfd,char *str)" * (ERROR "__regparm3" identifier) (function_declarator "plugin_strdup(bfd *abfd,char *str)" identifier (parameter_list "(bfd *abfd,char *str)" ( (parameter_declaration "bfd *abfd" type_identifier (pointer_declarator "*abfd" * identifier)) , (parameter_declaration "char *str" primitive_type (pointer_declarator "*str" * identifier)) )))) (compound_statement "{\n  size_t sVar1;\n  char *__dest;\n  undefined4 uVar2;\n  char *fmt;\n  \n  sVar1 = strlen(str);\n  __dest = (char *)bfd_alloc(abfd,sVar1 + 1,0);\n  if (__dest == (char *)0x0) {\n    uVar2 = bfd_get_error();\n    fmt = (char *)dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    einfo(fmt,uVar2);\n  }\n  memcpy(__dest,str,sVar1 + 1);\n  return __dest;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "char *fmt;" primitive_type (pointer_declarator "*fmt" * identifier) ;) (expression_statement "sVar1 = strlen(str);" (assignment_expression "sVar1 = strlen(str)" identifier = (call_expression "strlen(str)" identifier (argument_list "(str)" ( identifier )))) ;) (expression_statement "__dest = (char *)bfd_alloc(abfd,sVar1 + 1,0);" (assignment_expression "__dest = (char *)bfd_alloc(abfd,sVar1 + 1,0)" identifier = (cast_expression "(char *)bfd_alloc(abfd,sVar1 + 1,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "bfd_alloc(abfd,sVar1 + 1,0)" identifier (argument_list "(abfd,sVar1 + 1,0)" ( identifier , (binary_expression "sVar1 + 1" identifier + number_literal) , number_literal ))))) ;) (if_statement "if (__dest == (char *)0x0) {\n    uVar2 = bfd_get_error();\n    fmt = (char *)dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    einfo(fmt,uVar2);\n  }" if (parenthesized_expression "(__dest == (char *)0x0)" ( (binary_expression "__dest == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar2 = bfd_get_error();\n    fmt = (char *)dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    einfo(fmt,uVar2);\n  }" { (expression_statement "uVar2 = bfd_get_error();" (assignment_expression "uVar2 = bfd_get_error()" identifier = (call_expression "bfd_get_error()" identifier (argument_list "()" ( )))) ;) (expression_statement "fmt = (char *)dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);" (assignment_expression "fmt = (char *)dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5)" identifier = (cast_expression "(char *)dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5)" identifier (argument_list "(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5)" ( number_literal , (string_literal ""%F%P: plugin_strdup failed to allocate memory: %s\n"" " string_content escape_sequence ") , number_literal ))))) ;) (expression_statement "einfo(fmt,uVar2);" (call_expression "einfo(fmt,uVar2)" identifier (argument_list "(fmt,uVar2)" ( identifier , identifier ))) ;) })) (expression_statement "memcpy(__dest,str,sVar1 + 1);" (call_expression "memcpy(__dest,str,sVar1 + 1)" identifier (argument_list "(__dest,str,sVar1 + 1)" ( identifier , identifier , (binary_expression "sVar1 + 1" identifier + number_literal) ))) ;) (return_statement "return __dest;" return identifier ;) })))
(translation_unit "void * __regparm3 FUN_00036ea0(undefined4 param_1,char *param_2)\n\n{\n  size_t sVar1;\n  void *__dest;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  \n  sVar1 = strlen(param_2);\n  __dest = (void *)bfd_alloc(param_1,sVar1 + 1,0);\n  if (__dest == (void *)0x0) {\n    uVar2 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00034dc0(uVar3,uVar2);\n  }\n  memcpy(__dest,param_2,sVar1 + 1);\n  return __dest;\n}\n\n" (function_definition "void * __regparm3 FUN_00036ea0(undefined4 param_1,char *param_2)\n\n{\n  size_t sVar1;\n  void *__dest;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  \n  sVar1 = strlen(param_2);\n  __dest = (void *)bfd_alloc(param_1,sVar1 + 1,0);\n  if (__dest == (void *)0x0) {\n    uVar2 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00034dc0(uVar3,uVar2);\n  }\n  memcpy(__dest,param_2,sVar1 + 1);\n  return __dest;\n}" primitive_type (pointer_declarator "* __regparm3 FUN_00036ea0(undefined4 param_1,char *param_2)" * (ERROR "__regparm3" identifier) (function_declarator "FUN_00036ea0(undefined4 param_1,char *param_2)" identifier (parameter_list "(undefined4 param_1,char *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  size_t sVar1;\n  void *__dest;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  \n  sVar1 = strlen(param_2);\n  __dest = (void *)bfd_alloc(param_1,sVar1 + 1,0);\n  if (__dest == (void *)0x0) {\n    uVar2 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00034dc0(uVar3,uVar2);\n  }\n  memcpy(__dest,param_2,sVar1 + 1);\n  return __dest;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "sVar1 = strlen(param_2);" (assignment_expression "sVar1 = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "__dest = (void *)bfd_alloc(param_1,sVar1 + 1,0);" (assignment_expression "__dest = (void *)bfd_alloc(param_1,sVar1 + 1,0)" identifier = (cast_expression "(void *)bfd_alloc(param_1,sVar1 + 1,0)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "bfd_alloc(param_1,sVar1 + 1,0)" identifier (argument_list "(param_1,sVar1 + 1,0)" ( identifier , (binary_expression "sVar1 + 1" identifier + number_literal) , number_literal ))))) ;) (if_statement "if (__dest == (void *)0x0) {\n    uVar2 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00034dc0(uVar3,uVar2);\n  }" if (parenthesized_expression "(__dest == (void *)0x0)" ( (binary_expression "__dest == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar2 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00034dc0(uVar3,uVar2);\n  }" { (expression_statement "uVar2 = bfd_get_error();" (assignment_expression "uVar2 = bfd_get_error()" identifier = (call_expression "bfd_get_error()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);" (assignment_expression "uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5)" identifier = (call_expression "dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5)" identifier (argument_list "(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5)" ( number_literal , (string_literal ""%F%P: plugin_strdup failed to allocate memory: %s\n"" " string_content escape_sequence ") , number_literal )))) ;) (expression_statement "FUN_00034dc0(uVar3,uVar2);" (call_expression "FUN_00034dc0(uVar3,uVar2)" identifier (argument_list "(uVar3,uVar2)" ( identifier , identifier ))) ;) })) (expression_statement "memcpy(__dest,param_2,sVar1 + 1);" (call_expression "memcpy(__dest,param_2,sVar1 + 1)" identifier (argument_list "(__dest,param_2,sVar1 + 1)" ( identifier , identifier , (binary_expression "sVar1 + 1" identifier + number_literal) ))) ;) (return_statement "return __dest;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) , LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content escape_sequence ") , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT + LIT) ))) ;) (return_statement return IDENT ;) })))
(function_definition "void * __regparm3 FUN_00036ea0(undefined4 param_1,char *param_2)\n\n{\n  size_t sVar1;\n  void *__dest;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  \n  sVar1 = strlen(param_2);\n  __dest = (void *)bfd_alloc(param_1,sVar1 + 1,0);\n  if (__dest == (void *)0x0) {\n    uVar2 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00034dc0(uVar3,uVar2);\n  }\n  memcpy(__dest,param_2,sVar1 + 1);\n  return __dest;\n}" (primitive_type "void") (pointer_declarator "* __regparm3 FUN_00036ea0(undefined4 param_1,char *param_2)" (* "*") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00036ea0(undefined4 param_1,char *param_2)" (identifier "FUN_00036ea0") (parameter_list "(undefined4 param_1,char *param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")")))) (compound_statement "{\n  size_t sVar1;\n  void *__dest;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  \n  sVar1 = strlen(param_2);\n  __dest = (void *)bfd_alloc(param_1,sVar1 + 1,0);\n  if (__dest == (void *)0x0) {\n    uVar2 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00034dc0(uVar3,uVar2);\n  }\n  memcpy(__dest,param_2,sVar1 + 1);\n  return __dest;\n}" ({ "{") (declaration "size_t sVar1;" (primitive_type "size_t") (identifier "sVar1") (; ";")) (declaration "void *__dest;" (primitive_type "void") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (expression_statement "sVar1 = strlen(param_2);" (assignment_expression "sVar1 = strlen(param_2)" (identifier "sVar1") (= "=") (call_expression "strlen(param_2)" (identifier "strlen") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (expression_statement "__dest = (void *)bfd_alloc(param_1,sVar1 + 1,0);" (assignment_expression "__dest = (void *)bfd_alloc(param_1,sVar1 + 1,0)" (identifier "__dest") (= "=") (cast_expression "(void *)bfd_alloc(param_1,sVar1 + 1,0)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "bfd_alloc(param_1,sVar1 + 1,0)" (identifier "bfd_alloc") (argument_list "(param_1,sVar1 + 1,0)" (( "(") (identifier "param_1") (, ",") (binary_expression "sVar1 + 1" (identifier "sVar1") (+ "+") (number_literal "1")) (, ",") (number_literal "0") () ")"))))) (; ";")) (if_statement "if (__dest == (void *)0x0) {\n    uVar2 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00034dc0(uVar3,uVar2);\n  }" (if "if") (parenthesized_expression "(__dest == (void *)0x0)" (( "(") (binary_expression "__dest == (void *)0x0" (identifier "__dest") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    uVar2 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00034dc0(uVar3,uVar2);\n  }" ({ "{") (expression_statement "uVar2 = bfd_get_error();" (assignment_expression "uVar2 = bfd_get_error()" (identifier "uVar2") (= "=") (call_expression "bfd_get_error()" (identifier "bfd_get_error") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);" (assignment_expression "uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5)" (identifier "uVar3") (= "=") (call_expression "dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5)" (identifier "dcgettext") (argument_list "(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5)" (( "(") (number_literal "0") (, ",") (string_literal ""%F%P: plugin_strdup failed to allocate memory: %s\n"" (" """) (string_content "%F%P: plugin_strdup failed to allocate memory: %s") (escape_sequence "\n") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "FUN_00034dc0(uVar3,uVar2);" (call_expression "FUN_00034dc0(uVar3,uVar2)" (identifier "FUN_00034dc0") (argument_list "(uVar3,uVar2)" (( "(") (identifier "uVar3") (, ",") (identifier "uVar2") () ")"))) (; ";")) (} "}"))) (expression_statement "memcpy(__dest,param_2,sVar1 + 1);" (call_expression "memcpy(__dest,param_2,sVar1 + 1)" (identifier "memcpy") (argument_list "(__dest,param_2,sVar1 + 1)" (( "(") (identifier "__dest") (, ",") (identifier "param_2") (, ",") (binary_expression "sVar1 + 1" (identifier "sVar1") (+ "+") (number_literal "1")) () ")"))) (; ";")) (return_statement "return __dest;" (return "return") (identifier "__dest") (; ";")) (} "}")))

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

char * __regparm3 function_1(type_1 *abfd,char *str)

{
  size_t var_3;
  char *var_4;
  type_2 uVar2;
  char *fmt;
  
  var_3 = var_1(str);
  var_4 = (char *)var_2(abfd,var_3 + 1,0);
  if (var_4 == (char *)0x0) {
    uVar2 = var_5();
    fmt = (char *)var_6(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);
    var_7(fmt,uVar2);
  }
  var_8(var_4,str,var_3 + 1);
  return var_4;
}


(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (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: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal)) (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 (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (string_literal (string_content) (escape_sequence)) (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (binary_expression left: (identifier) right: (number_literal))))) (return_statement (identifier)))))

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

void * __regparm3 MASKED(undefined4 param_1,char *param_2)

{
  size_t sVar1;
  void *__dest;
  undefined4 uVar2;
  undefined4 uVar3;
  
  sVar1 = strlen(param_2);
  __dest = (void *)bfd_alloc(param_1,sVar1 + 1,0);
  if (__dest == (void *)0x0) {
    uVar2 = bfd_get_error();
    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);
    FUN_00034dc0(uVar3,uVar2);
  }
  memcpy(__dest,param_2,sVar1 + 1);
  return __dest;
}

