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

{
  uint uVar1;
  size_t sVar2;
  void *__dest;
  char *pcVar3;
  
  sVar2 = strlen(str);
  __dest = (void *)bfd_alloc(abfd,sVar2 + 1);
  if (__dest == (void *)0x0) {
    uVar1 = bfd_get_error();
    pcVar3 = (char *)dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);
    einfo(pcVar3,(ulong)uVar1);
  }
  pcVar3 = (char *)memcpy(__dest,str,sVar2 + 1);
  return pcVar3;
}



void FUN_0012b450(undefined8 param_1,char *param_2)

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


PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBP
MOV RBP,RDI
MOV RDI,RSI
PUSH RBX
SUB RSP,0x8
CALL 0x0010d330
MOV RDI,RBP
LEA RBX,[RAX + 0x1]
MOV RSI,RBX
CALL 0x0010d310
MOV RBP,RAX
TEST RAX,RAX
JZ 0x0012b4a0
MOV RDX,RBX
MOV RSI,R12
MOV RDI,RBP
CALL 0x0010d740
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
RET
CALL 0x0010d4b0
XOR EDI,EDI
MOV EDX,0x5
LEA RSI,[0x16f0d0]
MOV R13D,EAX
CALL 0x0010d300
MOV ESI,R13D
MOV RDI,RAX
XOR EAX,EAX
CALL 0x00129380
JMP 0x0012b47f
(translation_unit "void FUN_0012b450(undefined8 param_1,char *param_2)\n\n{\n  undefined4 uVar1;\n  size_t sVar2;\n  void *__dest;\n  undefined8 uVar3;\n  \n  sVar2 = strlen(param_2);\n  __dest = (void *)bfd_alloc(param_1,sVar2 + 1);\n  if (__dest == (void *)0x0) {\n    uVar1 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00129380(uVar3,uVar1);\n  }\n  memcpy(__dest,param_2,sVar2 + 1);\n  return;\n}\n\n" (function_definition "void FUN_0012b450(undefined8 param_1,char *param_2)\n\n{\n  undefined4 uVar1;\n  size_t sVar2;\n  void *__dest;\n  undefined8 uVar3;\n  \n  sVar2 = strlen(param_2);\n  __dest = (void *)bfd_alloc(param_1,sVar2 + 1);\n  if (__dest == (void *)0x0) {\n    uVar1 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00129380(uVar3,uVar1);\n  }\n  memcpy(__dest,param_2,sVar2 + 1);\n  return;\n}" primitive_type (function_declarator "FUN_0012b450(undefined8 param_1,char *param_2)" identifier (parameter_list "(undefined8 param_1,char *param_2)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  size_t sVar2;\n  void *__dest;\n  undefined8 uVar3;\n  \n  sVar2 = strlen(param_2);\n  __dest = (void *)bfd_alloc(param_1,sVar2 + 1);\n  if (__dest == (void *)0x0) {\n    uVar1 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00129380(uVar3,uVar1);\n  }\n  memcpy(__dest,param_2,sVar2 + 1);\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (expression_statement "sVar2 = strlen(param_2);" (assignment_expression "sVar2 = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "__dest = (void *)bfd_alloc(param_1,sVar2 + 1);" (assignment_expression "__dest = (void *)bfd_alloc(param_1,sVar2 + 1)" identifier = (cast_expression "(void *)bfd_alloc(param_1,sVar2 + 1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "bfd_alloc(param_1,sVar2 + 1)" identifier (argument_list "(param_1,sVar2 + 1)" ( identifier , (binary_expression "sVar2 + 1" identifier + number_literal) ))))) ;) (if_statement "if (__dest == (void *)0x0) {\n    uVar1 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00129380(uVar3,uVar1);\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    uVar1 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00129380(uVar3,uVar1);\n  }" { (expression_statement "uVar1 = bfd_get_error();" (assignment_expression "uVar1 = 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_00129380(uVar3,uVar1);" (call_expression "FUN_00129380(uVar3,uVar1)" identifier (argument_list "(uVar3,uVar1)" ( identifier , identifier ))) ;) })) (expression_statement "memcpy(__dest,param_2,sVar2 + 1);" (call_expression "memcpy(__dest,param_2,sVar2 + 1)" identifier (argument_list "(__dest,param_2,sVar2 + 1)" ( identifier , identifier , (binary_expression "sVar2 + 1" identifier + number_literal) ))) ;) (return_statement "return;" return ;) })))
(translation_unit "char * plugin_strdup(bfd *abfd,char *str)\n\n{\n  uint uVar1;\n  size_t sVar2;\n  void *__dest;\n  char *pcVar3;\n  \n  sVar2 = strlen(str);\n  __dest = (void *)bfd_alloc(abfd,sVar2 + 1);\n  if (__dest == (void *)0x0) {\n    uVar1 = bfd_get_error();\n    pcVar3 = (char *)dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    einfo(pcVar3,(ulong)uVar1);\n  }\n  pcVar3 = (char *)memcpy(__dest,str,sVar2 + 1);\n  return pcVar3;\n}\n\n" (function_definition "char * plugin_strdup(bfd *abfd,char *str)\n\n{\n  uint uVar1;\n  size_t sVar2;\n  void *__dest;\n  char *pcVar3;\n  \n  sVar2 = strlen(str);\n  __dest = (void *)bfd_alloc(abfd,sVar2 + 1);\n  if (__dest == (void *)0x0) {\n    uVar1 = bfd_get_error();\n    pcVar3 = (char *)dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    einfo(pcVar3,(ulong)uVar1);\n  }\n  pcVar3 = (char *)memcpy(__dest,str,sVar2 + 1);\n  return pcVar3;\n}" primitive_type (pointer_declarator "* plugin_strdup(bfd *abfd,char *str)" * (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  uint uVar1;\n  size_t sVar2;\n  void *__dest;\n  char *pcVar3;\n  \n  sVar2 = strlen(str);\n  __dest = (void *)bfd_alloc(abfd,sVar2 + 1);\n  if (__dest == (void *)0x0) {\n    uVar1 = bfd_get_error();\n    pcVar3 = (char *)dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    einfo(pcVar3,(ulong)uVar1);\n  }\n  pcVar3 = (char *)memcpy(__dest,str,sVar2 + 1);\n  return pcVar3;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (expression_statement "sVar2 = strlen(str);" (assignment_expression "sVar2 = strlen(str)" identifier = (call_expression "strlen(str)" identifier (argument_list "(str)" ( identifier )))) ;) (expression_statement "__dest = (void *)bfd_alloc(abfd,sVar2 + 1);" (assignment_expression "__dest = (void *)bfd_alloc(abfd,sVar2 + 1)" identifier = (cast_expression "(void *)bfd_alloc(abfd,sVar2 + 1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "bfd_alloc(abfd,sVar2 + 1)" identifier (argument_list "(abfd,sVar2 + 1)" ( identifier , (binary_expression "sVar2 + 1" identifier + number_literal) ))))) ;) (if_statement "if (__dest == (void *)0x0) {\n    uVar1 = bfd_get_error();\n    pcVar3 = (char *)dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    einfo(pcVar3,(ulong)uVar1);\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    uVar1 = bfd_get_error();\n    pcVar3 = (char *)dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    einfo(pcVar3,(ulong)uVar1);\n  }" { (expression_statement "uVar1 = bfd_get_error();" (assignment_expression "uVar1 = bfd_get_error()" identifier = (call_expression "bfd_get_error()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar3 = (char *)dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);" (assignment_expression "pcVar3 = (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(pcVar3,(ulong)uVar1);" (call_expression "einfo(pcVar3,(ulong)uVar1)" identifier (argument_list "(pcVar3,(ulong)uVar1)" ( identifier , (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier) ))) ;) })) (expression_statement "pcVar3 = (char *)memcpy(__dest,str,sVar2 + 1);" (assignment_expression "pcVar3 = (char *)memcpy(__dest,str,sVar2 + 1)" identifier = (cast_expression "(char *)memcpy(__dest,str,sVar2 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "memcpy(__dest,str,sVar2 + 1)" identifier (argument_list "(__dest,str,sVar2 + 1)" ( identifier , identifier , (binary_expression "sVar2 + 1" identifier + number_literal) ))))) ;) (return_statement "return pcVar3;" return identifier ;) })))
(translation_unit "void FUN_0012b450(undefined8 param_1,char *param_2)\n\n{\n  undefined4 uVar1;\n  size_t sVar2;\n  void *__dest;\n  undefined8 uVar3;\n  \n  sVar2 = strlen(param_2);\n  __dest = (void *)bfd_alloc(param_1,sVar2 + 1);\n  if (__dest == (void *)0x0) {\n    uVar1 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00129380(uVar3,uVar1);\n  }\n  memcpy(__dest,param_2,sVar2 + 1);\n  return;\n}\n\n" (function_definition "void FUN_0012b450(undefined8 param_1,char *param_2)\n\n{\n  undefined4 uVar1;\n  size_t sVar2;\n  void *__dest;\n  undefined8 uVar3;\n  \n  sVar2 = strlen(param_2);\n  __dest = (void *)bfd_alloc(param_1,sVar2 + 1);\n  if (__dest == (void *)0x0) {\n    uVar1 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00129380(uVar3,uVar1);\n  }\n  memcpy(__dest,param_2,sVar2 + 1);\n  return;\n}" primitive_type (function_declarator "FUN_0012b450(undefined8 param_1,char *param_2)" identifier (parameter_list "(undefined8 param_1,char *param_2)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  size_t sVar2;\n  void *__dest;\n  undefined8 uVar3;\n  \n  sVar2 = strlen(param_2);\n  __dest = (void *)bfd_alloc(param_1,sVar2 + 1);\n  if (__dest == (void *)0x0) {\n    uVar1 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00129380(uVar3,uVar1);\n  }\n  memcpy(__dest,param_2,sVar2 + 1);\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "undefined8 uVar3;" type_identifier identifier ;) (expression_statement "sVar2 = strlen(param_2);" (assignment_expression "sVar2 = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "__dest = (void *)bfd_alloc(param_1,sVar2 + 1);" (assignment_expression "__dest = (void *)bfd_alloc(param_1,sVar2 + 1)" identifier = (cast_expression "(void *)bfd_alloc(param_1,sVar2 + 1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "bfd_alloc(param_1,sVar2 + 1)" identifier (argument_list "(param_1,sVar2 + 1)" ( identifier , (binary_expression "sVar2 + 1" identifier + number_literal) ))))) ;) (if_statement "if (__dest == (void *)0x0) {\n    uVar1 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00129380(uVar3,uVar1);\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    uVar1 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00129380(uVar3,uVar1);\n  }" { (expression_statement "uVar1 = bfd_get_error();" (assignment_expression "uVar1 = 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_00129380(uVar3,uVar1);" (call_expression "FUN_00129380(uVar3,uVar1)" identifier (argument_list "(uVar3,uVar1)" ( identifier , identifier ))) ;) })) (expression_statement "memcpy(__dest,param_2,sVar2 + 1);" (call_expression "memcpy(__dest,param_2,sVar2 + 1)" identifier (argument_list "(__dest,param_2,sVar2 + 1)" ( identifier , identifier , (binary_expression "sVar2 + 1" identifier + number_literal) ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * 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) ))))) ;) (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 ;) })))
(function_definition "void FUN_0012b450(undefined8 param_1,char *param_2)\n\n{\n  undefined4 uVar1;\n  size_t sVar2;\n  void *__dest;\n  undefined8 uVar3;\n  \n  sVar2 = strlen(param_2);\n  __dest = (void *)bfd_alloc(param_1,sVar2 + 1);\n  if (__dest == (void *)0x0) {\n    uVar1 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00129380(uVar3,uVar1);\n  }\n  memcpy(__dest,param_2,sVar2 + 1);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0012b450(undefined8 param_1,char *param_2)" (identifier "FUN_0012b450") (parameter_list "(undefined8 param_1,char *param_2)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  size_t sVar2;\n  void *__dest;\n  undefined8 uVar3;\n  \n  sVar2 = strlen(param_2);\n  __dest = (void *)bfd_alloc(param_1,sVar2 + 1);\n  if (__dest == (void *)0x0) {\n    uVar1 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00129380(uVar3,uVar1);\n  }\n  memcpy(__dest,param_2,sVar2 + 1);\n  return;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "void *__dest;" (primitive_type "void") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "undefined8 uVar3;" (type_identifier "undefined8") (identifier "uVar3") (; ";")) (expression_statement "sVar2 = strlen(param_2);" (assignment_expression "sVar2 = strlen(param_2)" (identifier "sVar2") (= "=") (call_expression "strlen(param_2)" (identifier "strlen") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (expression_statement "__dest = (void *)bfd_alloc(param_1,sVar2 + 1);" (assignment_expression "__dest = (void *)bfd_alloc(param_1,sVar2 + 1)" (identifier "__dest") (= "=") (cast_expression "(void *)bfd_alloc(param_1,sVar2 + 1)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "bfd_alloc(param_1,sVar2 + 1)" (identifier "bfd_alloc") (argument_list "(param_1,sVar2 + 1)" (( "(") (identifier "param_1") (, ",") (binary_expression "sVar2 + 1" (identifier "sVar2") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (if_statement "if (__dest == (void *)0x0) {\n    uVar1 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00129380(uVar3,uVar1);\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    uVar1 = bfd_get_error();\n    uVar3 = dcgettext(0,"%F%P: plugin_strdup failed to allocate memory: %s\n",5);\n    FUN_00129380(uVar3,uVar1);\n  }" ({ "{") (expression_statement "uVar1 = bfd_get_error();" (assignment_expression "uVar1 = bfd_get_error()" (identifier "uVar1") (= "=") (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_00129380(uVar3,uVar1);" (call_expression "FUN_00129380(uVar3,uVar1)" (identifier "FUN_00129380") (argument_list "(uVar3,uVar1)" (( "(") (identifier "uVar3") (, ",") (identifier "uVar1") () ")"))) (; ";")) (} "}"))) (expression_statement "memcpy(__dest,param_2,sVar2 + 1);" (call_expression "memcpy(__dest,param_2,sVar2 + 1)" (identifier "memcpy") (argument_list "(__dest,param_2,sVar2 + 1)" (( "(") (identifier "__dest") (, ",") (identifier "param_2") (, ",") (binary_expression "sVar2 + 1" (identifier "sVar2") (+ "+") (number_literal "1")) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

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


(translation_unit (function_definition type: (primitive_type) 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: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator 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))))))) (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))))

void MASKED(undefined8 param_1,char *param_2)

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

