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

bfd_boolean stab_set_type(void *p,bfd_boolean bitstringp)

{
  char *__s;
  size_t sVar1;
  char *__s_00;
  bfd_boolean bVar2;
  bfd_boolean local_20;
  
  local_20 = *(bfd_boolean *)(*(int *)((int)p + 0x38) + 0x10);
  __s = stab_pop_type((stab_write_handle *)((int)p + 0x38));
  sVar1 = strlen(__s);
  __s_00 = (char *)xmalloc(sVar1 + 0x1e);
  if (bitstringp == 0) {
    *__s_00 = '\0';
  }
  else {
    bitstringp = *(int *)((int)p + 0x3c);
    *(bfd_boolean *)((int)p + 0x3c) = bitstringp + 1;
    sprintf(__s_00,"%ld=@S;",bitstringp);
    local_20 = 1;
  }
  sVar1 = strlen(__s_00);
  sprintf(__s_00 + sVar1,"S%s",__s);
  free(__s);
  bVar2 = stab_push_string((stab_write_handle *)((int)p + 0x38),__s_00,bitstringp,local_20,0);
  if (bVar2 != 0) {
    free(__s_00);
    bVar2 = 1;
  }
  return bVar2;
}



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

int FUN_0002a000(int param_1,int param_2)

{
  char *__s;
  size_t sVar1;
  char *__s_00;
  int iVar2;
  undefined4 local_20;
  
  local_20 = *(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10);
  __s = (char *)FUN_00028700();
  sVar1 = strlen(__s);
  __s_00 = (char *)xmalloc(sVar1 + 0x1e);
  if (param_2 == 0) {
    *__s_00 = '\0';
  }
  else {
    iVar2 = *(int *)(param_1 + 0x3c);
    *(int *)(param_1 + 0x3c) = iVar2 + 1;
    sprintf(__s_00,"%ld=@S;",iVar2);
    local_20 = 1;
  }
  sVar1 = strlen(__s_00);
  sprintf(__s_00 + sVar1,"S%s",__s);
  free(__s);
  iVar2 = FUN_00029600(local_20,0);
  if (iVar2 != 0) {
    free(__s_00);
    iVar2 = 1;
  }
  return iVar2;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000165d0
ADD EBX,0x14ff7
SUB ESP,0x1c
MOV EDX,dword ptr [ESP + 0x30]
MOV EAX,dword ptr [EDX + 0x38]
LEA EBP,[EDX + 0x38]
MOV EAX,dword ptr [EAX + 0x10]
MOV dword ptr [ESP + 0xc],EAX
MOV EAX,EBP
CALL 0x00028700
SUB ESP,0xc
PUSH EAX
MOV EDI,EAX
CALL 0x000134e0
ADD EAX,0x1e
MOV dword ptr [ESP],EAX
CALL 0x000132e0
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0x34]
MOV EDX,dword ptr [ESP + 0x30]
MOV ESI,EAX
TEST ECX,ECX
JNZ 0x0002a0b0
MOV byte ptr [EAX],0x0
SUB ESP,0xc
PUSH ESI
CALL 0x000134e0
ADD ESP,0xc
LEA EDX,[EBX + 0xffff4f1a]
ADD EAX,ESI
PUSH EDI
PUSH EDX
PUSH EAX
CALL 0x000137a0
MOV dword ptr [ESP],EDI
CALL 0x00013948
POP EAX
POP EDX
PUSH 0x0
PUSH dword ptr [ESP + 0x18]
MOV ECX,dword ptr [ESP + 0x44]
MOV EDX,ESI
MOV EAX,EBP
CALL 0x00029600
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0002a0a5
SUB ESP,0xc
PUSH ESI
CALL 0x00013948
ADD ESP,0x10
MOV EAX,0x1
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [EDX + 0x3c]
SUB ESP,0x4
MOV dword ptr [ESP + 0x38],EAX
ADD EAX,0x1
MOV dword ptr [EDX + 0x3c],EAX
LEA EAX,[EBX + 0xffff4f12]
PUSH dword ptr [ESP + 0x38]
PUSH EAX
PUSH ESI
CALL 0x000137a0
ADD ESP,0x10
MOV dword ptr [ESP + 0xc],0x1
JMP 0x0002a054
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_0002a000(int param_1,int param_2)\n\n{\n  char *__s;\n  size_t sVar1;\n  char *__s_00;\n  int iVar2;\n  undefined4 local_20;\n  \n  local_20 = *(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10);\n  __s = (char *)FUN_00028700();\n  sVar1 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x1e);\n  if (param_2 == 0) {\n    *__s_00 = '\0';\n  }\n  else {\n    iVar2 = *(int *)(param_1 + 0x3c);\n    *(int *)(param_1 + 0x3c) = iVar2 + 1;\n    sprintf(__s_00,"%ld=@S;",iVar2);\n    local_20 = 1;\n  }\n  sVar1 = strlen(__s_00);\n  sprintf(__s_00 + sVar1,"S%s",__s);\n  free(__s);\n  iVar2 = FUN_00029600(local_20,0);\n  if (iVar2 != 0) {\n    free(__s_00);\n    iVar2 = 1;\n  }\n  return iVar2;\n}\n\n" comment (function_definition "int FUN_0002a000(int param_1,int param_2)\n\n{\n  char *__s;\n  size_t sVar1;\n  char *__s_00;\n  int iVar2;\n  undefined4 local_20;\n  \n  local_20 = *(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10);\n  __s = (char *)FUN_00028700();\n  sVar1 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x1e);\n  if (param_2 == 0) {\n    *__s_00 = '\0';\n  }\n  else {\n    iVar2 = *(int *)(param_1 + 0x3c);\n    *(int *)(param_1 + 0x3c) = iVar2 + 1;\n    sprintf(__s_00,"%ld=@S;",iVar2);\n    local_20 = 1;\n  }\n  sVar1 = strlen(__s_00);\n  sprintf(__s_00 + sVar1,"S%s",__s);\n  free(__s);\n  iVar2 = FUN_00029600(local_20,0);\n  if (iVar2 != 0) {\n    free(__s_00);\n    iVar2 = 1;\n  }\n  return iVar2;\n}" primitive_type (function_declarator "FUN_0002a000(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  char *__s;\n  size_t sVar1;\n  char *__s_00;\n  int iVar2;\n  undefined4 local_20;\n  \n  local_20 = *(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10);\n  __s = (char *)FUN_00028700();\n  sVar1 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x1e);\n  if (param_2 == 0) {\n    *__s_00 = '\0';\n  }\n  else {\n    iVar2 = *(int *)(param_1 + 0x3c);\n    *(int *)(param_1 + 0x3c) = iVar2 + 1;\n    sprintf(__s_00,"%ld=@S;",iVar2);\n    local_20 = 1;\n  }\n  sVar1 = strlen(__s_00);\n  sprintf(__s_00 + sVar1,"S%s",__s);\n  free(__s);\n  iVar2 = FUN_00029600(local_20,0);\n  if (iVar2 != 0) {\n    free(__s_00);\n    iVar2 = 1;\n  }\n  return iVar2;\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "char *__s_00;" primitive_type (pointer_declarator "*__s_00" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 local_20;" type_identifier identifier ;) (expression_statement "local_20 = *(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10);" (assignment_expression "local_20 = *(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10)" identifier = (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10)" * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x38) + 0x10)" ( (binary_expression "*(int *)(param_1 + 0x38) + 0x10" (pointer_expression "*(int *)(param_1 + 0x38)" * (cast_expression "(int *)(param_1 + 0x38)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x38)" ( (binary_expression "param_1 + 0x38" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "__s = (char *)FUN_00028700();" (assignment_expression "__s = (char *)FUN_00028700()" identifier = (cast_expression "(char *)FUN_00028700()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00028700()" identifier (argument_list "()" ( ))))) ;) (expression_statement "sVar1 = strlen(__s);" (assignment_expression "sVar1 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "__s_00 = (char *)xmalloc(sVar1 + 0x1e);" (assignment_expression "__s_00 = (char *)xmalloc(sVar1 + 0x1e)" identifier = (cast_expression "(char *)xmalloc(sVar1 + 0x1e)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 + 0x1e)" identifier (argument_list "(sVar1 + 0x1e)" ( (binary_expression "sVar1 + 0x1e" identifier + number_literal) ))))) ;) (if_statement "if (param_2 == 0) {\n    *__s_00 = '\0';\n  }\n  else {\n    iVar2 = *(int *)(param_1 + 0x3c);\n    *(int *)(param_1 + 0x3c) = iVar2 + 1;\n    sprintf(__s_00,"%ld=@S;",iVar2);\n    local_20 = 1;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    *__s_00 = '\0';\n  }" { (expression_statement "*__s_00 = '\0';" (assignment_expression "*__s_00 = '\0'" (pointer_expression "*__s_00" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) }) (else_clause "else {\n    iVar2 = *(int *)(param_1 + 0x3c);\n    *(int *)(param_1 + 0x3c) = iVar2 + 1;\n    sprintf(__s_00,"%ld=@S;",iVar2);\n    local_20 = 1;\n  }" else (compound_statement "{\n    iVar2 = *(int *)(param_1 + 0x3c);\n    *(int *)(param_1 + 0x3c) = iVar2 + 1;\n    sprintf(__s_00,"%ld=@S;",iVar2);\n    local_20 = 1;\n  }" { (expression_statement "iVar2 = *(int *)(param_1 + 0x3c);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x3c)" identifier = (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(param_1 + 0x3c) = iVar2 + 1;" (assignment_expression "*(int *)(param_1 + 0x3c) = iVar2 + 1" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (expression_statement "sprintf(__s_00,"%ld=@S;",iVar2);" (call_expression "sprintf(__s_00,"%ld=@S;",iVar2)" identifier (argument_list "(__s_00,"%ld=@S;",iVar2)" ( identifier , (string_literal ""%ld=@S;"" " string_content ") , identifier ))) ;) (expression_statement "local_20 = 1;" (assignment_expression "local_20 = 1" identifier = number_literal) ;) }))) (expression_statement "sVar1 = strlen(__s_00);" (assignment_expression "sVar1 = strlen(__s_00)" identifier = (call_expression "strlen(__s_00)" identifier (argument_list "(__s_00)" ( identifier )))) ;) (expression_statement "sprintf(__s_00 + sVar1,"S%s",__s);" (call_expression "sprintf(__s_00 + sVar1,"S%s",__s)" identifier (argument_list "(__s_00 + sVar1,"S%s",__s)" ( (binary_expression "__s_00 + sVar1" identifier + identifier) , (string_literal ""S%s"" " string_content ") , identifier ))) ;) (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "iVar2 = FUN_00029600(local_20,0);" (assignment_expression "iVar2 = FUN_00029600(local_20,0)" identifier = (call_expression "FUN_00029600(local_20,0)" identifier (argument_list "(local_20,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar2 != 0) {\n    free(__s_00);\n    iVar2 = 1;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    free(__s_00);\n    iVar2 = 1;\n  }" { (expression_statement "free(__s_00);" (call_expression "free(__s_00)" identifier (argument_list "(__s_00)" ( identifier ))) ;) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) })) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nbfd_boolean stab_set_type(void *p,bfd_boolean bitstringp)\n\n{\n  char *__s;\n  size_t sVar1;\n  char *__s_00;\n  bfd_boolean bVar2;\n  bfd_boolean local_20;\n  \n  local_20 = *(bfd_boolean *)(*(int *)((int)p + 0x38) + 0x10);\n  __s = stab_pop_type((stab_write_handle *)((int)p + 0x38));\n  sVar1 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x1e);\n  if (bitstringp == 0) {\n    *__s_00 = '\0';\n  }\n  else {\n    bitstringp = *(int *)((int)p + 0x3c);\n    *(bfd_boolean *)((int)p + 0x3c) = bitstringp + 1;\n    sprintf(__s_00,"%ld=@S;",bitstringp);\n    local_20 = 1;\n  }\n  sVar1 = strlen(__s_00);\n  sprintf(__s_00 + sVar1,"S%s",__s);\n  free(__s);\n  bVar2 = stab_push_string((stab_write_handle *)((int)p + 0x38),__s_00,bitstringp,local_20,0);\n  if (bVar2 != 0) {\n    free(__s_00);\n    bVar2 = 1;\n  }\n  return bVar2;\n}\n\n" comment (function_definition "bfd_boolean stab_set_type(void *p,bfd_boolean bitstringp)\n\n{\n  char *__s;\n  size_t sVar1;\n  char *__s_00;\n  bfd_boolean bVar2;\n  bfd_boolean local_20;\n  \n  local_20 = *(bfd_boolean *)(*(int *)((int)p + 0x38) + 0x10);\n  __s = stab_pop_type((stab_write_handle *)((int)p + 0x38));\n  sVar1 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x1e);\n  if (bitstringp == 0) {\n    *__s_00 = '\0';\n  }\n  else {\n    bitstringp = *(int *)((int)p + 0x3c);\n    *(bfd_boolean *)((int)p + 0x3c) = bitstringp + 1;\n    sprintf(__s_00,"%ld=@S;",bitstringp);\n    local_20 = 1;\n  }\n  sVar1 = strlen(__s_00);\n  sprintf(__s_00 + sVar1,"S%s",__s);\n  free(__s);\n  bVar2 = stab_push_string((stab_write_handle *)((int)p + 0x38),__s_00,bitstringp,local_20,0);\n  if (bVar2 != 0) {\n    free(__s_00);\n    bVar2 = 1;\n  }\n  return bVar2;\n}" type_identifier (function_declarator "stab_set_type(void *p,bfd_boolean bitstringp)" identifier (parameter_list "(void *p,bfd_boolean bitstringp)" ( (parameter_declaration "void *p" primitive_type (pointer_declarator "*p" * identifier)) , (parameter_declaration "bfd_boolean bitstringp" type_identifier identifier) ))) (compound_statement "{\n  char *__s;\n  size_t sVar1;\n  char *__s_00;\n  bfd_boolean bVar2;\n  bfd_boolean local_20;\n  \n  local_20 = *(bfd_boolean *)(*(int *)((int)p + 0x38) + 0x10);\n  __s = stab_pop_type((stab_write_handle *)((int)p + 0x38));\n  sVar1 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x1e);\n  if (bitstringp == 0) {\n    *__s_00 = '\0';\n  }\n  else {\n    bitstringp = *(int *)((int)p + 0x3c);\n    *(bfd_boolean *)((int)p + 0x3c) = bitstringp + 1;\n    sprintf(__s_00,"%ld=@S;",bitstringp);\n    local_20 = 1;\n  }\n  sVar1 = strlen(__s_00);\n  sprintf(__s_00 + sVar1,"S%s",__s);\n  free(__s);\n  bVar2 = stab_push_string((stab_write_handle *)((int)p + 0x38),__s_00,bitstringp,local_20,0);\n  if (bVar2 != 0) {\n    free(__s_00);\n    bVar2 = 1;\n  }\n  return bVar2;\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "char *__s_00;" primitive_type (pointer_declarator "*__s_00" * identifier) ;) (declaration "bfd_boolean bVar2;" type_identifier identifier ;) (declaration "bfd_boolean local_20;" type_identifier identifier ;) (expression_statement "local_20 = *(bfd_boolean *)(*(int *)((int)p + 0x38) + 0x10);" (assignment_expression "local_20 = *(bfd_boolean *)(*(int *)((int)p + 0x38) + 0x10)" identifier = (pointer_expression "*(bfd_boolean *)(*(int *)((int)p + 0x38) + 0x10)" * (cast_expression "(bfd_boolean *)(*(int *)((int)p + 0x38) + 0x10)" ( (type_descriptor "bfd_boolean *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)((int)p + 0x38) + 0x10)" ( (binary_expression "*(int *)((int)p + 0x38) + 0x10" (pointer_expression "*(int *)((int)p + 0x38)" * (cast_expression "(int *)((int)p + 0x38)" ( (type_descriptor "int *" primitive_type (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) )))) + number_literal) ))))) ;) (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(__s);" (assignment_expression "sVar1 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "__s_00 = (char *)xmalloc(sVar1 + 0x1e);" (assignment_expression "__s_00 = (char *)xmalloc(sVar1 + 0x1e)" identifier = (cast_expression "(char *)xmalloc(sVar1 + 0x1e)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 + 0x1e)" identifier (argument_list "(sVar1 + 0x1e)" ( (binary_expression "sVar1 + 0x1e" identifier + number_literal) ))))) ;) (if_statement "if (bitstringp == 0) {\n    *__s_00 = '\0';\n  }\n  else {\n    bitstringp = *(int *)((int)p + 0x3c);\n    *(bfd_boolean *)((int)p + 0x3c) = bitstringp + 1;\n    sprintf(__s_00,"%ld=@S;",bitstringp);\n    local_20 = 1;\n  }" if (parenthesized_expression "(bitstringp == 0)" ( (binary_expression "bitstringp == 0" identifier == number_literal) )) (compound_statement "{\n    *__s_00 = '\0';\n  }" { (expression_statement "*__s_00 = '\0';" (assignment_expression "*__s_00 = '\0'" (pointer_expression "*__s_00" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) }) (else_clause "else {\n    bitstringp = *(int *)((int)p + 0x3c);\n    *(bfd_boolean *)((int)p + 0x3c) = bitstringp + 1;\n    sprintf(__s_00,"%ld=@S;",bitstringp);\n    local_20 = 1;\n  }" else (compound_statement "{\n    bitstringp = *(int *)((int)p + 0x3c);\n    *(bfd_boolean *)((int)p + 0x3c) = bitstringp + 1;\n    sprintf(__s_00,"%ld=@S;",bitstringp);\n    local_20 = 1;\n  }" { (expression_statement "bitstringp = *(int *)((int)p + 0x3c);" (assignment_expression "bitstringp = *(int *)((int)p + 0x3c)" identifier = (pointer_expression "*(int *)((int)p + 0x3c)" * (cast_expression "(int *)((int)p + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)p + 0x3c)" ( (binary_expression "(int)p + 0x3c" (cast_expression "(int)p" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (expression_statement "*(bfd_boolean *)((int)p + 0x3c) = bitstringp + 1;" (assignment_expression "*(bfd_boolean *)((int)p + 0x3c) = bitstringp + 1" (pointer_expression "*(bfd_boolean *)((int)p + 0x3c)" * (cast_expression "(bfd_boolean *)((int)p + 0x3c)" ( (type_descriptor "bfd_boolean *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)p + 0x3c)" ( (binary_expression "(int)p + 0x3c" (cast_expression "(int)p" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (binary_expression "bitstringp + 1" identifier + number_literal)) ;) (expression_statement "sprintf(__s_00,"%ld=@S;",bitstringp);" (call_expression "sprintf(__s_00,"%ld=@S;",bitstringp)" identifier (argument_list "(__s_00,"%ld=@S;",bitstringp)" ( identifier , (string_literal ""%ld=@S;"" " string_content ") , identifier ))) ;) (expression_statement "local_20 = 1;" (assignment_expression "local_20 = 1" identifier = number_literal) ;) }))) (expression_statement "sVar1 = strlen(__s_00);" (assignment_expression "sVar1 = strlen(__s_00)" identifier = (call_expression "strlen(__s_00)" identifier (argument_list "(__s_00)" ( identifier )))) ;) (expression_statement "sprintf(__s_00 + sVar1,"S%s",__s);" (call_expression "sprintf(__s_00 + sVar1,"S%s",__s)" identifier (argument_list "(__s_00 + sVar1,"S%s",__s)" ( (binary_expression "__s_00 + sVar1" identifier + identifier) , (string_literal ""S%s"" " string_content ") , identifier ))) ;) (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "bVar2 = stab_push_string((stab_write_handle *)((int)p + 0x38),__s_00,bitstringp,local_20,0);" (assignment_expression "bVar2 = stab_push_string((stab_write_handle *)((int)p + 0x38),__s_00,bitstringp,local_20,0)" identifier = (call_expression "stab_push_string((stab_write_handle *)((int)p + 0x38),__s_00,bitstringp,local_20,0)" identifier (argument_list "((stab_write_handle *)((int)p + 0x38),__s_00,bitstringp,local_20,0)" ( (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) ))) , identifier , identifier , identifier , number_literal )))) ;) (if_statement "if (bVar2 != 0) {\n    free(__s_00);\n    bVar2 = 1;\n  }" if (parenthesized_expression "(bVar2 != 0)" ( (binary_expression "bVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    free(__s_00);\n    bVar2 = 1;\n  }" { (expression_statement "free(__s_00);" (call_expression "free(__s_00)" identifier (argument_list "(__s_00)" ( identifier ))) ;) (expression_statement "bVar2 = 1;" (assignment_expression "bVar2 = 1" identifier = number_literal) ;) })) (return_statement "return bVar2;" return identifier ;) })))
(translation_unit "int FUN_0002a000(int param_1,int param_2)\n\n{\n  char *__s;\n  size_t sVar1;\n  char *__s_00;\n  int iVar2;\n  undefined4 local_20;\n  \n  local_20 = *(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10);\n  __s = (char *)FUN_00028700();\n  sVar1 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x1e);\n  if (param_2 == 0) {\n    *__s_00 = '\0';\n  }\n  else {\n    iVar2 = *(int *)(param_1 + 0x3c);\n    *(int *)(param_1 + 0x3c) = iVar2 + 1;\n    sprintf(__s_00,"%ld=@S;",iVar2);\n    local_20 = 1;\n  }\n  sVar1 = strlen(__s_00);\n  sprintf(__s_00 + sVar1,"S%s",__s);\n  free(__s);\n  iVar2 = FUN_00029600(local_20,0);\n  if (iVar2 != 0) {\n    free(__s_00);\n    iVar2 = 1;\n  }\n  return iVar2;\n}\n\n" (function_definition "int FUN_0002a000(int param_1,int param_2)\n\n{\n  char *__s;\n  size_t sVar1;\n  char *__s_00;\n  int iVar2;\n  undefined4 local_20;\n  \n  local_20 = *(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10);\n  __s = (char *)FUN_00028700();\n  sVar1 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x1e);\n  if (param_2 == 0) {\n    *__s_00 = '\0';\n  }\n  else {\n    iVar2 = *(int *)(param_1 + 0x3c);\n    *(int *)(param_1 + 0x3c) = iVar2 + 1;\n    sprintf(__s_00,"%ld=@S;",iVar2);\n    local_20 = 1;\n  }\n  sVar1 = strlen(__s_00);\n  sprintf(__s_00 + sVar1,"S%s",__s);\n  free(__s);\n  iVar2 = FUN_00029600(local_20,0);\n  if (iVar2 != 0) {\n    free(__s_00);\n    iVar2 = 1;\n  }\n  return iVar2;\n}" primitive_type (function_declarator "FUN_0002a000(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  char *__s;\n  size_t sVar1;\n  char *__s_00;\n  int iVar2;\n  undefined4 local_20;\n  \n  local_20 = *(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10);\n  __s = (char *)FUN_00028700();\n  sVar1 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x1e);\n  if (param_2 == 0) {\n    *__s_00 = '\0';\n  }\n  else {\n    iVar2 = *(int *)(param_1 + 0x3c);\n    *(int *)(param_1 + 0x3c) = iVar2 + 1;\n    sprintf(__s_00,"%ld=@S;",iVar2);\n    local_20 = 1;\n  }\n  sVar1 = strlen(__s_00);\n  sprintf(__s_00 + sVar1,"S%s",__s);\n  free(__s);\n  iVar2 = FUN_00029600(local_20,0);\n  if (iVar2 != 0) {\n    free(__s_00);\n    iVar2 = 1;\n  }\n  return iVar2;\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "char *__s_00;" primitive_type (pointer_declarator "*__s_00" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 local_20;" type_identifier identifier ;) (expression_statement "local_20 = *(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10);" (assignment_expression "local_20 = *(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10)" identifier = (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10)" * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x38) + 0x10)" ( (binary_expression "*(int *)(param_1 + 0x38) + 0x10" (pointer_expression "*(int *)(param_1 + 0x38)" * (cast_expression "(int *)(param_1 + 0x38)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x38)" ( (binary_expression "param_1 + 0x38" identifier + number_literal) )))) + number_literal) ))))) ;) (expression_statement "__s = (char *)FUN_00028700();" (assignment_expression "__s = (char *)FUN_00028700()" identifier = (cast_expression "(char *)FUN_00028700()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00028700()" identifier (argument_list "()" ( ))))) ;) (expression_statement "sVar1 = strlen(__s);" (assignment_expression "sVar1 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "__s_00 = (char *)xmalloc(sVar1 + 0x1e);" (assignment_expression "__s_00 = (char *)xmalloc(sVar1 + 0x1e)" identifier = (cast_expression "(char *)xmalloc(sVar1 + 0x1e)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 + 0x1e)" identifier (argument_list "(sVar1 + 0x1e)" ( (binary_expression "sVar1 + 0x1e" identifier + number_literal) ))))) ;) (if_statement "if (param_2 == 0) {\n    *__s_00 = '\0';\n  }\n  else {\n    iVar2 = *(int *)(param_1 + 0x3c);\n    *(int *)(param_1 + 0x3c) = iVar2 + 1;\n    sprintf(__s_00,"%ld=@S;",iVar2);\n    local_20 = 1;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    *__s_00 = '\0';\n  }" { (expression_statement "*__s_00 = '\0';" (assignment_expression "*__s_00 = '\0'" (pointer_expression "*__s_00" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) }) (else_clause "else {\n    iVar2 = *(int *)(param_1 + 0x3c);\n    *(int *)(param_1 + 0x3c) = iVar2 + 1;\n    sprintf(__s_00,"%ld=@S;",iVar2);\n    local_20 = 1;\n  }" else (compound_statement "{\n    iVar2 = *(int *)(param_1 + 0x3c);\n    *(int *)(param_1 + 0x3c) = iVar2 + 1;\n    sprintf(__s_00,"%ld=@S;",iVar2);\n    local_20 = 1;\n  }" { (expression_statement "iVar2 = *(int *)(param_1 + 0x3c);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x3c)" identifier = (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(param_1 + 0x3c) = iVar2 + 1;" (assignment_expression "*(int *)(param_1 + 0x3c) = iVar2 + 1" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (expression_statement "sprintf(__s_00,"%ld=@S;",iVar2);" (call_expression "sprintf(__s_00,"%ld=@S;",iVar2)" identifier (argument_list "(__s_00,"%ld=@S;",iVar2)" ( identifier , (string_literal ""%ld=@S;"" " string_content ") , identifier ))) ;) (expression_statement "local_20 = 1;" (assignment_expression "local_20 = 1" identifier = number_literal) ;) }))) (expression_statement "sVar1 = strlen(__s_00);" (assignment_expression "sVar1 = strlen(__s_00)" identifier = (call_expression "strlen(__s_00)" identifier (argument_list "(__s_00)" ( identifier )))) ;) (expression_statement "sprintf(__s_00 + sVar1,"S%s",__s);" (call_expression "sprintf(__s_00 + sVar1,"S%s",__s)" identifier (argument_list "(__s_00 + sVar1,"S%s",__s)" ( (binary_expression "__s_00 + sVar1" identifier + identifier) , (string_literal ""S%s"" " string_content ") , identifier ))) ;) (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "iVar2 = FUN_00029600(local_20,0);" (assignment_expression "iVar2 = FUN_00029600(local_20,0)" identifier = (call_expression "FUN_00029600(local_20,0)" identifier (argument_list "(local_20,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar2 != 0) {\n    free(__s_00);\n    iVar2 = 1;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    free(__s_00);\n    iVar2 = 1;\n  }" { (expression_statement "free(__s_00);" (call_expression "free(__s_00)" identifier (argument_list "(__s_00)" ( identifier ))) ;) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) })) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) ;) (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 = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (char_literal ' escape_sequence ')) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (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) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) , (string_literal " string_content ") , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (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_0002a000(int param_1,int param_2)\n\n{\n  char *__s;\n  size_t sVar1;\n  char *__s_00;\n  int iVar2;\n  undefined4 local_20;\n  \n  local_20 = *(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10);\n  __s = (char *)FUN_00028700();\n  sVar1 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x1e);\n  if (param_2 == 0) {\n    *__s_00 = '\0';\n  }\n  else {\n    iVar2 = *(int *)(param_1 + 0x3c);\n    *(int *)(param_1 + 0x3c) = iVar2 + 1;\n    sprintf(__s_00,"%ld=@S;",iVar2);\n    local_20 = 1;\n  }\n  sVar1 = strlen(__s_00);\n  sprintf(__s_00 + sVar1,"S%s",__s);\n  free(__s);\n  iVar2 = FUN_00029600(local_20,0);\n  if (iVar2 != 0) {\n    free(__s_00);\n    iVar2 = 1;\n  }\n  return iVar2;\n}" (primitive_type "int") (function_declarator "FUN_0002a000(int param_1,int param_2)" (identifier "FUN_0002a000") (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  char *__s;\n  size_t sVar1;\n  char *__s_00;\n  int iVar2;\n  undefined4 local_20;\n  \n  local_20 = *(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10);\n  __s = (char *)FUN_00028700();\n  sVar1 = strlen(__s);\n  __s_00 = (char *)xmalloc(sVar1 + 0x1e);\n  if (param_2 == 0) {\n    *__s_00 = '\0';\n  }\n  else {\n    iVar2 = *(int *)(param_1 + 0x3c);\n    *(int *)(param_1 + 0x3c) = iVar2 + 1;\n    sprintf(__s_00,"%ld=@S;",iVar2);\n    local_20 = 1;\n  }\n  sVar1 = strlen(__s_00);\n  sprintf(__s_00 + sVar1,"S%s",__s);\n  free(__s);\n  iVar2 = FUN_00029600(local_20,0);\n  if (iVar2 != 0) {\n    free(__s_00);\n    iVar2 = 1;\n  }\n  return iVar2;\n}" ({ "{") (declaration "char *__s;" (primitive_type "char") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "size_t sVar1;" (primitive_type "size_t") (identifier "sVar1") (; ";")) (declaration "char *__s_00;" (primitive_type "char") (pointer_declarator "*__s_00" (* "*") (identifier "__s_00")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 local_20;" (type_identifier "undefined4") (identifier "local_20") (; ";")) (expression_statement "local_20 = *(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10);" (assignment_expression "local_20 = *(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10)" (identifier "local_20") (= "=") (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10)" (* "*") (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x38) + 0x10)" (( "(") (binary_expression "*(int *)(param_1 + 0x38) + 0x10" (pointer_expression "*(int *)(param_1 + 0x38)" (* "*") (cast_expression "(int *)(param_1 + 0x38)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x38)" (( "(") (binary_expression "param_1 + 0x38" (identifier "param_1") (+ "+") (number_literal "0x38")) () ")")))) (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "__s = (char *)FUN_00028700();" (assignment_expression "__s = (char *)FUN_00028700()" (identifier "__s") (= "=") (cast_expression "(char *)FUN_00028700()" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00028700()" (identifier "FUN_00028700") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "sVar1 = strlen(__s);" (assignment_expression "sVar1 = strlen(__s)" (identifier "sVar1") (= "=") (call_expression "strlen(__s)" (identifier "strlen") (argument_list "(__s)" (( "(") (identifier "__s") () ")")))) (; ";")) (expression_statement "__s_00 = (char *)xmalloc(sVar1 + 0x1e);" (assignment_expression "__s_00 = (char *)xmalloc(sVar1 + 0x1e)" (identifier "__s_00") (= "=") (cast_expression "(char *)xmalloc(sVar1 + 0x1e)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar1 + 0x1e)" (identifier "xmalloc") (argument_list "(sVar1 + 0x1e)" (( "(") (binary_expression "sVar1 + 0x1e" (identifier "sVar1") (+ "+") (number_literal "0x1e")) () ")"))))) (; ";")) (if_statement "if (param_2 == 0) {\n    *__s_00 = '\0';\n  }\n  else {\n    iVar2 = *(int *)(param_1 + 0x3c);\n    *(int *)(param_1 + 0x3c) = iVar2 + 1;\n    sprintf(__s_00,"%ld=@S;",iVar2);\n    local_20 = 1;\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    *__s_00 = '\0';\n  }" ({ "{") (expression_statement "*__s_00 = '\0';" (assignment_expression "*__s_00 = '\0'" (pointer_expression "*__s_00" (* "*") (identifier "__s_00")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (} "}")) (else_clause "else {\n    iVar2 = *(int *)(param_1 + 0x3c);\n    *(int *)(param_1 + 0x3c) = iVar2 + 1;\n    sprintf(__s_00,"%ld=@S;",iVar2);\n    local_20 = 1;\n  }" (else "else") (compound_statement "{\n    iVar2 = *(int *)(param_1 + 0x3c);\n    *(int *)(param_1 + 0x3c) = iVar2 + 1;\n    sprintf(__s_00,"%ld=@S;",iVar2);\n    local_20 = 1;\n  }" ({ "{") (expression_statement "iVar2 = *(int *)(param_1 + 0x3c);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x3c)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(param_1 + 0x3c)" (* "*") (cast_expression "(int *)(param_1 + 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")"))))) (; ";")) (expression_statement "*(int *)(param_1 + 0x3c) = iVar2 + 1;" (assignment_expression "*(int *)(param_1 + 0x3c) = iVar2 + 1" (pointer_expression "*(int *)(param_1 + 0x3c)" (* "*") (cast_expression "(int *)(param_1 + 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")")))) (= "=") (binary_expression "iVar2 + 1" (identifier "iVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "sprintf(__s_00,"%ld=@S;",iVar2);" (call_expression "sprintf(__s_00,"%ld=@S;",iVar2)" (identifier "sprintf") (argument_list "(__s_00,"%ld=@S;",iVar2)" (( "(") (identifier "__s_00") (, ",") (string_literal ""%ld=@S;"" (" """) (string_content "%ld=@S;") (" """)) (, ",") (identifier "iVar2") () ")"))) (; ";")) (expression_statement "local_20 = 1;" (assignment_expression "local_20 = 1" (identifier "local_20") (= "=") (number_literal "1")) (; ";")) (} "}")))) (expression_statement "sVar1 = strlen(__s_00);" (assignment_expression "sVar1 = strlen(__s_00)" (identifier "sVar1") (= "=") (call_expression "strlen(__s_00)" (identifier "strlen") (argument_list "(__s_00)" (( "(") (identifier "__s_00") () ")")))) (; ";")) (expression_statement "sprintf(__s_00 + sVar1,"S%s",__s);" (call_expression "sprintf(__s_00 + sVar1,"S%s",__s)" (identifier "sprintf") (argument_list "(__s_00 + sVar1,"S%s",__s)" (( "(") (binary_expression "__s_00 + sVar1" (identifier "__s_00") (+ "+") (identifier "sVar1")) (, ",") (string_literal ""S%s"" (" """) (string_content "S%s") (" """)) (, ",") (identifier "__s") () ")"))) (; ";")) (expression_statement "free(__s);" (call_expression "free(__s)" (identifier "free") (argument_list "(__s)" (( "(") (identifier "__s") () ")"))) (; ";")) (expression_statement "iVar2 = FUN_00029600(local_20,0);" (assignment_expression "iVar2 = FUN_00029600(local_20,0)" (identifier "iVar2") (= "=") (call_expression "FUN_00029600(local_20,0)" (identifier "FUN_00029600") (argument_list "(local_20,0)" (( "(") (identifier "local_20") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n    free(__s_00);\n    iVar2 = 1;\n  }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    free(__s_00);\n    iVar2 = 1;\n  }" ({ "{") (expression_statement "free(__s_00);" (call_expression "free(__s_00)" (identifier "free") (argument_list "(__s_00)" (( "(") (identifier "__s_00") () ")"))) (; ";")) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" (identifier "iVar2") (= "=") (number_literal "1")) (; ";")) (} "}"))) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}")))

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

type_1 function_1(void *p,type_1 var_5)

{
  char *__s;
  size_t var_4;
  char *var_7;
  type_1 var_10;
  type_1 local_20;
  
  local_20 = *(type_1 *)(*(int *)((int)p + 0x38) + 0x10);
  __s = var_1((type_2 *)((int)p + 0x38));
  var_4 = var_2(__s);
  var_7 = (char *)var_3(var_4 + 0x1e);
  if (var_5 == 0) {
    *var_7 = '\0';
  }
  else {
    var_5 = *(int *)((int)p + 0x3c);
    *(type_1 *)((int)p + 0x3c) = var_5 + 1;
    var_6(var_7,"%ld=@S;",var_5);
    local_20 = 1;
  }
  var_4 = var_2(var_7);
  var_6(var_7 + var_4,"S%s",__s);
  var_8(__s);
  var_10 = var_9((type_2 *)((int)p + 0x38),var_7,var_5,local_20,0);
  if (var_10 != 0) {
    var_8(var_7);
    var_10 = 1;
  }
  return var_10;
}


(translation_unit (function_definition type: (primitive_type) 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: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_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: (number_literal))))))) (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: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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))))))) (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: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)) (string_literal (string_content)) (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 (identifier) (number_literal))))) (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(int param_1,int param_2)

{
  char *__s;
  size_t sVar1;
  char *__s_00;
  int iVar2;
  undefined4 local_20;
  
  local_20 = *(undefined4 *)(*(int *)(param_1 + 0x38) + 0x10);
  __s = (char *)FUN_00028700();
  sVar1 = strlen(__s);
  __s_00 = (char *)xmalloc(sVar1 + 0x1e);
  if (param_2 == 0) {
    *__s_00 = '\0';
  }
  else {
    iVar2 = *(int *)(param_1 + 0x3c);
    *(int *)(param_1 + 0x3c) = iVar2 + 1;
    sprintf(__s_00,"%ld=@S;",iVar2);
    local_20 = 1;
  }
  sVar1 = strlen(__s_00);
  sprintf(__s_00 + sVar1,"S%s",__s);
  free(__s);
  iVar2 = FUN_00029600(local_20,0);
  if (iVar2 != 0) {
    free(__s_00);
    iVar2 = 1;
  }
  return iVar2;
}

