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

bfd_boolean stab_typed_constant(void *p,char *name,bfd_vma val)

{
  char *__s;
  size_t sVar1;
  size_t sVar2;
  char *__s_00;
  bfd_boolean bVar3;
  
  __s = stab_pop_type((stab_write_handle *)((int)p + 0x38));
  sVar1 = strlen(name);
  sVar2 = strlen(__s);
  __s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2);
  sprintf(__s_00,"%s:c=e%s,%ld",name,__s,(undefined4)val);
  free(__s);
  bVar3 = stab_write_symbol((stab_write_handle *)p,0x80,0,0,__s_00);
  if (bVar3 != 0) {
    free(__s_00);
    bVar3 = 1;
  }
  return bVar3;
}



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

int FUN_0002a510(undefined4 param_1,char *param_2,undefined4 param_3)

{
  char *__s;
  size_t sVar1;
  size_t sVar2;
  char *__s_00;
  int iVar3;
  
  __s = (char *)FUN_00029a00();
  sVar1 = strlen(param_2);
  sVar2 = strlen(__s);
  __s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2);
  sprintf(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3);
  free(__s);
  iVar3 = FUN_00029160(0,0,__s_00);
  if (iVar3 != 0) {
    free(__s_00);
    iVar3 = 1;
  }
  return iVar3;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000166c0
ADD EBX,0x15ae7
SUB ESP,0xc
MOV EAX,dword ptr [ESP + 0x20]
MOV EBP,dword ptr [ESP + 0x28]
ADD EAX,0x38
CALL 0x00029a00
SUB ESP,0xc
PUSH dword ptr [ESP + 0x30]
MOV ESI,EAX
CALL 0x000134e0
MOV dword ptr [ESP],ESI
MOV EDI,EAX
CALL 0x000134e0
LEA EAX,[EDI + EAX*0x1 + 0x14]
MOV dword ptr [ESP],EAX
CALL 0x000132e0
MOV dword ptr [ESP],EBP
MOV EDI,EAX
LEA EAX,[EBX + 0xffff4e8e]
PUSH ESI
PUSH dword ptr [ESP + 0x38]
PUSH EAX
PUSH EDI
CALL 0x000137a0
ADD ESP,0x14
PUSH ESI
CALL 0x00013948
ADD ESP,0xc
XOR ECX,ECX
MOV EDX,0x80
PUSH EDI
PUSH 0x0
PUSH 0x0
MOV EAX,dword ptr [ESP + 0x30]
CALL 0x00029160
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0002a5a6
SUB ESP,0xc
PUSH EDI
CALL 0x00013948
ADD ESP,0x10
MOV EAX,0x1
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_0002a510(undefined4 param_1,char *param_2,undefined4 param_3)\n\n{\n  char *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  int iVar3;\n  \n  __s = (char *)FUN_00029a00();\n  sVar1 = strlen(param_2);\n  sVar2 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2);\n  sprintf(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3);\n  free(__s);\n  iVar3 = FUN_00029160(0,0,__s_00);\n  if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }\n  return iVar3;\n}\n\n" comment (function_definition "int FUN_0002a510(undefined4 param_1,char *param_2,undefined4 param_3)\n\n{\n  char *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  int iVar3;\n  \n  __s = (char *)FUN_00029a00();\n  sVar1 = strlen(param_2);\n  sVar2 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2);\n  sprintf(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3);\n  free(__s);\n  iVar3 = FUN_00029160(0,0,__s_00);\n  if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }\n  return iVar3;\n}" primitive_type (function_declarator "FUN_0002a510(undefined4 param_1,char *param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,char *param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  char *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  int iVar3;\n  \n  __s = (char *)FUN_00029a00();\n  sVar1 = strlen(param_2);\n  sVar2 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2);\n  sprintf(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3);\n  free(__s);\n  iVar3 = FUN_00029160(0,0,__s_00);\n  if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }\n  return iVar3;\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__s_00;" primitive_type (pointer_declarator "*__s_00" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "__s = (char *)FUN_00029a00();" (assignment_expression "__s = (char *)FUN_00029a00()" identifier = (cast_expression "(char *)FUN_00029a00()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00029a00()" identifier (argument_list "()" ( ))))) ;) (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 "sVar2 = strlen(__s);" (assignment_expression "sVar2 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "__s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2);" (assignment_expression "__s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2)" identifier = (cast_expression "(char *)xmalloc(sVar1 + 0x14 + sVar2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 + 0x14 + sVar2)" identifier (argument_list "(sVar1 + 0x14 + sVar2)" ( (binary_expression "sVar1 + 0x14 + sVar2" (binary_expression "sVar1 + 0x14" identifier + number_literal) + identifier) ))))) ;) (expression_statement "sprintf(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3);" (call_expression "sprintf(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3)" identifier (argument_list "(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3)" ( identifier , (string_literal ""%s:c=e%s,%ld"" " string_content ") , identifier , identifier , identifier ))) ;) (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "iVar3 = FUN_00029160(0,0,__s_00);" (assignment_expression "iVar3 = FUN_00029160(0,0,__s_00)" identifier = (call_expression "FUN_00029160(0,0,__s_00)" identifier (argument_list "(0,0,__s_00)" ( number_literal , number_literal , identifier )))) ;) (if_statement "if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    free(__s_00);\n    iVar3 = 1;\n  }" { (expression_statement "free(__s_00);" (call_expression "free(__s_00)" identifier (argument_list "(__s_00)" ( identifier ))) ;) (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) })) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nbfd_boolean stab_typed_constant(void *p,char *name,bfd_vma val)\n\n{\n  char *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  bfd_boolean bVar3;\n  \n  __s = stab_pop_type((stab_write_handle *)((int)p + 0x38));\n  sVar1 = strlen(name);\n  sVar2 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2);\n  sprintf(__s_00,"%s:c=e%s,%ld",name,__s,(undefined4)val);\n  free(__s);\n  bVar3 = stab_write_symbol((stab_write_handle *)p,0x80,0,0,__s_00);\n  if (bVar3 != 0) {\n    free(__s_00);\n    bVar3 = 1;\n  }\n  return bVar3;\n}\n\n" comment comment (function_definition "bfd_boolean stab_typed_constant(void *p,char *name,bfd_vma val)\n\n{\n  char *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  bfd_boolean bVar3;\n  \n  __s = stab_pop_type((stab_write_handle *)((int)p + 0x38));\n  sVar1 = strlen(name);\n  sVar2 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2);\n  sprintf(__s_00,"%s:c=e%s,%ld",name,__s,(undefined4)val);\n  free(__s);\n  bVar3 = stab_write_symbol((stab_write_handle *)p,0x80,0,0,__s_00);\n  if (bVar3 != 0) {\n    free(__s_00);\n    bVar3 = 1;\n  }\n  return bVar3;\n}" type_identifier (function_declarator "stab_typed_constant(void *p,char *name,bfd_vma val)" identifier (parameter_list "(void *p,char *name,bfd_vma val)" ( (parameter_declaration "void *p" primitive_type (pointer_declarator "*p" * identifier)) , (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) , (parameter_declaration "bfd_vma val" type_identifier identifier) ))) (compound_statement "{\n  char *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  bfd_boolean bVar3;\n  \n  __s = stab_pop_type((stab_write_handle *)((int)p + 0x38));\n  sVar1 = strlen(name);\n  sVar2 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2);\n  sprintf(__s_00,"%s:c=e%s,%ld",name,__s,(undefined4)val);\n  free(__s);\n  bVar3 = stab_write_symbol((stab_write_handle *)p,0x80,0,0,__s_00);\n  if (bVar3 != 0) {\n    free(__s_00);\n    bVar3 = 1;\n  }\n  return bVar3;\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__s_00;" primitive_type (pointer_declarator "*__s_00" * identifier) ;) (declaration "bfd_boolean bVar3;" type_identifier identifier ;) (expression_statement "__s = stab_pop_type((stab_write_handle *)((int)p + 0x38));" (assignment_expression "__s = stab_pop_type((stab_write_handle *)((int)p + 0x38))" identifier = (call_expression "stab_pop_type((stab_write_handle *)((int)p + 0x38))" identifier (argument_list "((stab_write_handle *)((int)p + 0x38))" ( (cast_expression "(stab_write_handle *)((int)p + 0x38)" ( (type_descriptor "stab_write_handle *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)p + 0x38)" ( (binary_expression "(int)p + 0x38" (cast_expression "(int)p" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) )))) ;) (expression_statement "sVar1 = strlen(name);" (assignment_expression "sVar1 = strlen(name)" identifier = (call_expression "strlen(name)" identifier (argument_list "(name)" ( identifier )))) ;) (expression_statement "sVar2 = strlen(__s);" (assignment_expression "sVar2 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "__s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2);" (assignment_expression "__s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2)" identifier = (cast_expression "(char *)xmalloc(sVar1 + 0x14 + sVar2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 + 0x14 + sVar2)" identifier (argument_list "(sVar1 + 0x14 + sVar2)" ( (binary_expression "sVar1 + 0x14 + sVar2" (binary_expression "sVar1 + 0x14" identifier + number_literal) + identifier) ))))) ;) (expression_statement "sprintf(__s_00,"%s:c=e%s,%ld",name,__s,(undefined4)val);" (call_expression "sprintf(__s_00,"%s:c=e%s,%ld",name,__s,(undefined4)val)" identifier (argument_list "(__s_00,"%s:c=e%s,%ld",name,__s,(undefined4)val)" ( identifier , (string_literal ""%s:c=e%s,%ld"" " string_content ") , identifier , identifier , (cast_expression "(undefined4)val" ( (type_descriptor "undefined4" type_identifier) ) identifier) ))) ;) (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "bVar3 = stab_write_symbol((stab_write_handle *)p,0x80,0,0,__s_00);" (assignment_expression "bVar3 = stab_write_symbol((stab_write_handle *)p,0x80,0,0,__s_00)" identifier = (call_expression "stab_write_symbol((stab_write_handle *)p,0x80,0,0,__s_00)" identifier (argument_list "((stab_write_handle *)p,0x80,0,0,__s_00)" ( (cast_expression "(stab_write_handle *)p" ( (type_descriptor "stab_write_handle *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , number_literal , number_literal , number_literal , identifier )))) ;) (if_statement "if (bVar3 != 0) {\n    free(__s_00);\n    bVar3 = 1;\n  }" if (parenthesized_expression "(bVar3 != 0)" ( (binary_expression "bVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    free(__s_00);\n    bVar3 = 1;\n  }" { (expression_statement "free(__s_00);" (call_expression "free(__s_00)" identifier (argument_list "(__s_00)" ( identifier ))) ;) (expression_statement "bVar3 = 1;" (assignment_expression "bVar3 = 1" identifier = number_literal) ;) })) (return_statement "return bVar3;" return identifier ;) })))
(translation_unit "int FUN_0002a510(undefined4 param_1,char *param_2,undefined4 param_3)\n\n{\n  char *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  int iVar3;\n  \n  __s = (char *)FUN_00029a00();\n  sVar1 = strlen(param_2);\n  sVar2 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2);\n  sprintf(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3);\n  free(__s);\n  iVar3 = FUN_00029160(0,0,__s_00);\n  if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }\n  return iVar3;\n}\n\n" (function_definition "int FUN_0002a510(undefined4 param_1,char *param_2,undefined4 param_3)\n\n{\n  char *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  int iVar3;\n  \n  __s = (char *)FUN_00029a00();\n  sVar1 = strlen(param_2);\n  sVar2 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2);\n  sprintf(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3);\n  free(__s);\n  iVar3 = FUN_00029160(0,0,__s_00);\n  if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }\n  return iVar3;\n}" primitive_type (function_declarator "FUN_0002a510(undefined4 param_1,char *param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,char *param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  char *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  int iVar3;\n  \n  __s = (char *)FUN_00029a00();\n  sVar1 = strlen(param_2);\n  sVar2 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2);\n  sprintf(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3);\n  free(__s);\n  iVar3 = FUN_00029160(0,0,__s_00);\n  if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }\n  return iVar3;\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__s_00;" primitive_type (pointer_declarator "*__s_00" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "__s = (char *)FUN_00029a00();" (assignment_expression "__s = (char *)FUN_00029a00()" identifier = (cast_expression "(char *)FUN_00029a00()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00029a00()" identifier (argument_list "()" ( ))))) ;) (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 "sVar2 = strlen(__s);" (assignment_expression "sVar2 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "__s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2);" (assignment_expression "__s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2)" identifier = (cast_expression "(char *)xmalloc(sVar1 + 0x14 + sVar2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 + 0x14 + sVar2)" identifier (argument_list "(sVar1 + 0x14 + sVar2)" ( (binary_expression "sVar1 + 0x14 + sVar2" (binary_expression "sVar1 + 0x14" identifier + number_literal) + identifier) ))))) ;) (expression_statement "sprintf(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3);" (call_expression "sprintf(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3)" identifier (argument_list "(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3)" ( identifier , (string_literal ""%s:c=e%s,%ld"" " string_content ") , identifier , identifier , identifier ))) ;) (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "iVar3 = FUN_00029160(0,0,__s_00);" (assignment_expression "iVar3 = FUN_00029160(0,0,__s_00)" identifier = (call_expression "FUN_00029160(0,0,__s_00)" identifier (argument_list "(0,0,__s_00)" ( number_literal , number_literal , identifier )))) ;) (if_statement "if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    free(__s_00);\n    iVar3 = 1;\n  }" { (expression_statement "free(__s_00);" (call_expression "free(__s_00)" identifier (argument_list "(__s_00)" ( identifier ))) ;) (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) })) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( 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 ( (binary_expression (binary_expression IDENT + LIT) + IDENT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , IDENT , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , LIT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_0002a510(undefined4 param_1,char *param_2,undefined4 param_3)\n\n{\n  char *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  int iVar3;\n  \n  __s = (char *)FUN_00029a00();\n  sVar1 = strlen(param_2);\n  sVar2 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2);\n  sprintf(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3);\n  free(__s);\n  iVar3 = FUN_00029160(0,0,__s_00);\n  if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }\n  return iVar3;\n}" (primitive_type "int") (function_declarator "FUN_0002a510(undefined4 param_1,char *param_2,undefined4 param_3)" (identifier "FUN_0002a510") (parameter_list "(undefined4 param_1,char *param_2,undefined4 param_3)" (( "(") (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"))) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  char *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  int iVar3;\n  \n  __s = (char *)FUN_00029a00();\n  sVar1 = strlen(param_2);\n  sVar2 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2);\n  sprintf(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3);\n  free(__s);\n  iVar3 = FUN_00029160(0,0,__s_00);\n  if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }\n  return iVar3;\n}" ({ "{") (declaration "char *__s;" (primitive_type "char") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "size_t sVar1;" (primitive_type "size_t") (identifier "sVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "char *__s_00;" (primitive_type "char") (pointer_declarator "*__s_00" (* "*") (identifier "__s_00")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "__s = (char *)FUN_00029a00();" (assignment_expression "__s = (char *)FUN_00029a00()" (identifier "__s") (= "=") (cast_expression "(char *)FUN_00029a00()" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00029a00()" (identifier "FUN_00029a00") (argument_list "()" (( "(") () ")"))))) (; ";")) (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 "sVar2 = strlen(__s);" (assignment_expression "sVar2 = strlen(__s)" (identifier "sVar2") (= "=") (call_expression "strlen(__s)" (identifier "strlen") (argument_list "(__s)" (( "(") (identifier "__s") () ")")))) (; ";")) (expression_statement "__s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2);" (assignment_expression "__s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2)" (identifier "__s_00") (= "=") (cast_expression "(char *)xmalloc(sVar1 + 0x14 + sVar2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar1 + 0x14 + sVar2)" (identifier "xmalloc") (argument_list "(sVar1 + 0x14 + sVar2)" (( "(") (binary_expression "sVar1 + 0x14 + sVar2" (binary_expression "sVar1 + 0x14" (identifier "sVar1") (+ "+") (number_literal "0x14")) (+ "+") (identifier "sVar2")) () ")"))))) (; ";")) (expression_statement "sprintf(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3);" (call_expression "sprintf(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3)" (identifier "sprintf") (argument_list "(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3)" (( "(") (identifier "__s_00") (, ",") (string_literal ""%s:c=e%s,%ld"" (" """) (string_content "%s:c=e%s,%ld") (" """)) (, ",") (identifier "param_2") (, ",") (identifier "__s") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "free(__s);" (call_expression "free(__s)" (identifier "free") (argument_list "(__s)" (( "(") (identifier "__s") () ")"))) (; ";")) (expression_statement "iVar3 = FUN_00029160(0,0,__s_00);" (assignment_expression "iVar3 = FUN_00029160(0,0,__s_00)" (identifier "iVar3") (= "=") (call_expression "FUN_00029160(0,0,__s_00)" (identifier "FUN_00029160") (argument_list "(0,0,__s_00)" (( "(") (number_literal "0") (, ",") (number_literal "0") (, ",") (identifier "__s_00") () ")")))) (; ";")) (if_statement "if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    free(__s_00);\n    iVar3 = 1;\n  }" ({ "{") (expression_statement "free(__s_00);" (call_expression "free(__s_00)" (identifier "free") (argument_list "(__s_00)" (( "(") (identifier "__s_00") () ")"))) (; ";")) (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" (identifier "iVar3") (= "=") (number_literal "1")) (; ";")) (} "}"))) (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}")))

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

type_1 function_1(void *p,char *name,type_2 val)

{
  char *__s;
  size_t var_4;
  size_t var_5;
  char *__s_00;
  type_1 var_9;
  
  __s = var_1((type_3 *)((int)p + 0x38));
  var_4 = var_2(name);
  var_5 = var_2(__s);
  __s_00 = (char *)var_3(var_4 + 0x14 + var_5);
  var_6(__s_00,"%s:c=e%s,%ld",name,__s,(type_4)val);
  var_7(__s);
  var_9 = var_8((type_3 *)p,0x80,0,0,__s_00);
  if (var_9 != 0) {
    var_7(__s_00);
    var_9 = 1;
  }
  return var_9;
}


(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))) (parameter_declaration type: (type_identifier) 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)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (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))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (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 (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)) (identifier) (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (number_literal) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (return_statement (identifier)))))

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

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

{
  char *__s;
  size_t sVar1;
  size_t sVar2;
  char *__s_00;
  int iVar3;
  
  __s = (char *)FUN_00029a00();
  sVar1 = strlen(param_2);
  sVar2 = strlen(__s);
  __s_00 = (char *)xmalloc(sVar1 + 0x14 + sVar2);
  sprintf(__s_00,"%s:c=e%s,%ld",param_2,__s,param_3);
  free(__s);
  iVar3 = FUN_00029160(0,0,__s_00);
  if (iVar3 != 0) {
    free(__s_00);
    iVar3 = 1;
  }
  return iVar3;
}

