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

uint get_stab_string_offset(char *string,char *stabstr_secname)

{
  int *piVar1;
  segT secptr;
  subsegT subseg;
  size_t sVar2;
  segT paVar3;
  char *pcVar4;
  size_t local_20;
  
  sVar2 = strlen(string);
  subseg = now_subseg;
  secptr = now_seg;
  paVar3 = subseg_new(stabstr_secname,0);
  local_20 = *(size_t *)((int)paVar3->userdata + 0x2c);
  if (local_20 == 0) {
    pcVar4 = frag_more(1);
    *pcVar4 = '\0';
    *(undefined4 *)((int)paVar3->userdata + 0x2c) = 1;
    bfd_set_section_flags(stdoutput,paVar3,0x2008);
    local_20 = 1;
    if (paVar3->name == stabstr_secname) {
      local_20 = 1;
      pcVar4 = (char *)xstrdup(stabstr_secname);
      paVar3->name = pcVar4;
    }
  }
  if (sVar2 != 0) {
    pcVar4 = frag_more(sVar2 + 1);
    strcpy(pcVar4,string);
    piVar1 = (int *)((int)paVar3->userdata + 0x2c);
    *piVar1 = *piVar1 + sVar2 + 1;
    sVar2 = local_20;
  }
  subseg_set(secptr,subseg);
  return sVar2;
}



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

size_t FUN_00035460(char *param_1,int param_2)

{
  undefined4 uVar1;
  undefined4 uVar2;
  size_t sVar3;
  int *piVar4;
  undefined1 *puVar5;
  int iVar6;
  char *__dest;
  size_t local_20;
  
  sVar3 = strlen(param_1);
  uVar2 = DAT_00077760;
  uVar1 = DAT_0007763c;
  piVar4 = (int *)FUN_00036540(param_2,0);
  local_20 = *(size_t *)(piVar4[0x20] + 0x2c);
  if (local_20 == 0) {
    puVar5 = (undefined1 *)FUN_00024a50(1);
    *puVar5 = 0;
    *(undefined4 *)(piVar4[0x20] + 0x2c) = 1;
    bfd_set_section_flags(DAT_00077804,piVar4,0x2008);
    local_20 = 1;
    if (*piVar4 == param_2) {
      local_20 = 1;
      iVar6 = xstrdup(param_2);
      *piVar4 = iVar6;
    }
  }
  if (sVar3 != 0) {
    __dest = (char *)FUN_00024a50(sVar3 + 1);
    strcpy(__dest,param_1);
    *(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;
    sVar3 = local_20;
  }
  FUN_000365a0(uVar1,uVar2);
  return sVar3;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00016040
ADD EBX,0x38b97
SUB ESP,0x28
PUSH dword ptr [ESP + 0x3c]
CALL 0x00014440
POP ESI
POP EDI
MOV ESI,EAX
MOV EDI,EAX
LEA EAX,[EBX + 0x963c]
MOV EAX,dword ptr [EAX]
MOV dword ptr [ESP + 0xc],EAX
LEA EAX,[EBX + 0x9760]
MOV EAX,dword ptr [EAX]
MOV dword ptr [ESP + 0x10],EAX
PUSH 0x0
PUSH dword ptr [ESP + 0x40]
CALL 0x00036540
ADD ESP,0x10
MOV EBP,EAX
MOV EAX,dword ptr [EAX + 0x80]
MOV ECX,dword ptr [EAX + 0x2c]
TEST ECX,ECX
JZ 0x000354d8
TEST ESI,ESI
JNZ 0x00035538
SUB ESP,0x8
PUSH dword ptr [ESP + 0x10]
PUSH dword ptr [ESP + 0x10]
CALL 0x000365a0
ADD ESP,0x2c
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH 0x1
CALL 0x00024a50
ADD ESP,0xc
MOV byte ptr [EAX],0x0
MOV EAX,dword ptr [EBP + 0x80]
MOV dword ptr [EAX + 0x2c],0x1
LEA EAX,[EBX + 0x9804]
PUSH 0x2008
PUSH EBP
PUSH dword ptr [EAX]
CALL 0x00014730
ADD ESP,0x10
MOV ECX,0x1
MOV EAX,dword ptr [ESP + 0x34]
CMP dword ptr [EBP],EAX
JNZ 0x000354b6
MOV dword ptr [ESP + 0xc],ECX
SUB ESP,0xc
PUSH dword ptr [ESP + 0x40]
CALL 0x000142f0
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0xc]
MOV dword ptr [EBP],EAX
JMP 0x000354b6
MOV dword ptr [ESP + 0xc],ECX
ADD ESI,0x1
SUB ESP,0xc
PUSH ESI
CALL 0x00024a50
POP EDX
POP ECX
PUSH dword ptr [ESP + 0x38]
PUSH EAX
CALL 0x00014310
ADD ESP,0x10
MOV EAX,dword ptr [EBP + 0x80]
MOV ECX,dword ptr [ESP + 0xc]
ADD dword ptr [EAX + 0x2c],ESI
MOV EDI,ECX
JMP 0x000354ba
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nsize_t FUN_00035460(char *param_1,int param_2)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  size_t sVar3;\n  int *piVar4;\n  undefined1 *puVar5;\n  int iVar6;\n  char *__dest;\n  size_t local_20;\n  \n  sVar3 = strlen(param_1);\n  uVar2 = DAT_00077760;\n  uVar1 = DAT_0007763c;\n  piVar4 = (int *)FUN_00036540(param_2,0);\n  local_20 = *(size_t *)(piVar4[0x20] + 0x2c);\n  if (local_20 == 0) {\n    puVar5 = (undefined1 *)FUN_00024a50(1);\n    *puVar5 = 0;\n    *(undefined4 *)(piVar4[0x20] + 0x2c) = 1;\n    bfd_set_section_flags(DAT_00077804,piVar4,0x2008);\n    local_20 = 1;\n    if (*piVar4 == param_2) {\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }\n  }\n  if (sVar3 != 0) {\n    __dest = (char *)FUN_00024a50(sVar3 + 1);\n    strcpy(__dest,param_1);\n    *(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;\n    sVar3 = local_20;\n  }\n  FUN_000365a0(uVar1,uVar2);\n  return sVar3;\n}\n\n" comment (function_definition "size_t FUN_00035460(char *param_1,int param_2)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  size_t sVar3;\n  int *piVar4;\n  undefined1 *puVar5;\n  int iVar6;\n  char *__dest;\n  size_t local_20;\n  \n  sVar3 = strlen(param_1);\n  uVar2 = DAT_00077760;\n  uVar1 = DAT_0007763c;\n  piVar4 = (int *)FUN_00036540(param_2,0);\n  local_20 = *(size_t *)(piVar4[0x20] + 0x2c);\n  if (local_20 == 0) {\n    puVar5 = (undefined1 *)FUN_00024a50(1);\n    *puVar5 = 0;\n    *(undefined4 *)(piVar4[0x20] + 0x2c) = 1;\n    bfd_set_section_flags(DAT_00077804,piVar4,0x2008);\n    local_20 = 1;\n    if (*piVar4 == param_2) {\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }\n  }\n  if (sVar3 != 0) {\n    __dest = (char *)FUN_00024a50(sVar3 + 1);\n    strcpy(__dest,param_1);\n    *(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;\n    sVar3 = local_20;\n  }\n  FUN_000365a0(uVar1,uVar2);\n  return sVar3;\n}" primitive_type (function_declarator "FUN_00035460(char *param_1,int param_2)" identifier (parameter_list "(char *param_1,int param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  size_t sVar3;\n  int *piVar4;\n  undefined1 *puVar5;\n  int iVar6;\n  char *__dest;\n  size_t local_20;\n  \n  sVar3 = strlen(param_1);\n  uVar2 = DAT_00077760;\n  uVar1 = DAT_0007763c;\n  piVar4 = (int *)FUN_00036540(param_2,0);\n  local_20 = *(size_t *)(piVar4[0x20] + 0x2c);\n  if (local_20 == 0) {\n    puVar5 = (undefined1 *)FUN_00024a50(1);\n    *puVar5 = 0;\n    *(undefined4 *)(piVar4[0x20] + 0x2c) = 1;\n    bfd_set_section_flags(DAT_00077804,piVar4,0x2008);\n    local_20 = 1;\n    if (*piVar4 == param_2) {\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }\n  }\n  if (sVar3 != 0) {\n    __dest = (char *)FUN_00024a50(sVar3 + 1);\n    strcpy(__dest,param_1);\n    *(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;\n    sVar3 = local_20;\n  }\n  FUN_000365a0(uVar1,uVar2);\n  return sVar3;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "undefined1 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "size_t local_20;" primitive_type identifier ;) (expression_statement "sVar3 = strlen(param_1);" (assignment_expression "sVar3 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "uVar2 = DAT_00077760;" (assignment_expression "uVar2 = DAT_00077760" identifier = identifier) ;) (expression_statement "uVar1 = DAT_0007763c;" (assignment_expression "uVar1 = DAT_0007763c" identifier = identifier) ;) (expression_statement "piVar4 = (int *)FUN_00036540(param_2,0);" (assignment_expression "piVar4 = (int *)FUN_00036540(param_2,0)" identifier = (cast_expression "(int *)FUN_00036540(param_2,0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00036540(param_2,0)" identifier (argument_list "(param_2,0)" ( identifier , number_literal ))))) ;) (expression_statement "local_20 = *(size_t *)(piVar4[0x20] + 0x2c);" (assignment_expression "local_20 = *(size_t *)(piVar4[0x20] + 0x2c)" identifier = (pointer_expression "*(size_t *)(piVar4[0x20] + 0x2c)" * (cast_expression "(size_t *)(piVar4[0x20] + 0x2c)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4[0x20] + 0x2c)" ( (binary_expression "piVar4[0x20] + 0x2c" (subscript_expression "piVar4[0x20]" identifier [ number_literal ]) + number_literal) ))))) ;) (if_statement "if (local_20 == 0) {\n    puVar5 = (undefined1 *)FUN_00024a50(1);\n    *puVar5 = 0;\n    *(undefined4 *)(piVar4[0x20] + 0x2c) = 1;\n    bfd_set_section_flags(DAT_00077804,piVar4,0x2008);\n    local_20 = 1;\n    if (*piVar4 == param_2) {\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }\n  }" if (parenthesized_expression "(local_20 == 0)" ( (binary_expression "local_20 == 0" identifier == number_literal) )) (compound_statement "{\n    puVar5 = (undefined1 *)FUN_00024a50(1);\n    *puVar5 = 0;\n    *(undefined4 *)(piVar4[0x20] + 0x2c) = 1;\n    bfd_set_section_flags(DAT_00077804,piVar4,0x2008);\n    local_20 = 1;\n    if (*piVar4 == param_2) {\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }\n  }" { (expression_statement "puVar5 = (undefined1 *)FUN_00024a50(1);" (assignment_expression "puVar5 = (undefined1 *)FUN_00024a50(1)" identifier = (cast_expression "(undefined1 *)FUN_00024a50(1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00024a50(1)" identifier (argument_list "(1)" ( number_literal ))))) ;) (expression_statement "*puVar5 = 0;" (assignment_expression "*puVar5 = 0" (pointer_expression "*puVar5" * identifier) = number_literal) ;) (expression_statement "*(undefined4 *)(piVar4[0x20] + 0x2c) = 1;" (assignment_expression "*(undefined4 *)(piVar4[0x20] + 0x2c) = 1" (pointer_expression "*(undefined4 *)(piVar4[0x20] + 0x2c)" * (cast_expression "(undefined4 *)(piVar4[0x20] + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4[0x20] + 0x2c)" ( (binary_expression "piVar4[0x20] + 0x2c" (subscript_expression "piVar4[0x20]" identifier [ number_literal ]) + number_literal) )))) = number_literal) ;) (expression_statement "bfd_set_section_flags(DAT_00077804,piVar4,0x2008);" (call_expression "bfd_set_section_flags(DAT_00077804,piVar4,0x2008)" identifier (argument_list "(DAT_00077804,piVar4,0x2008)" ( identifier , identifier , number_literal ))) ;) (expression_statement "local_20 = 1;" (assignment_expression "local_20 = 1" identifier = number_literal) ;) (if_statement "if (*piVar4 == param_2) {\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }" if (parenthesized_expression "(*piVar4 == param_2)" ( (binary_expression "*piVar4 == param_2" (pointer_expression "*piVar4" * identifier) == identifier) )) (compound_statement "{\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }" { (expression_statement "local_20 = 1;" (assignment_expression "local_20 = 1" identifier = number_literal) ;) (expression_statement "iVar6 = xstrdup(param_2);" (assignment_expression "iVar6 = xstrdup(param_2)" identifier = (call_expression "xstrdup(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "*piVar4 = iVar6;" (assignment_expression "*piVar4 = iVar6" (pointer_expression "*piVar4" * identifier) = identifier) ;) })) })) (if_statement "if (sVar3 != 0) {\n    __dest = (char *)FUN_00024a50(sVar3 + 1);\n    strcpy(__dest,param_1);\n    *(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;\n    sVar3 = local_20;\n  }" if (parenthesized_expression "(sVar3 != 0)" ( (binary_expression "sVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    __dest = (char *)FUN_00024a50(sVar3 + 1);\n    strcpy(__dest,param_1);\n    *(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;\n    sVar3 = local_20;\n  }" { (expression_statement "__dest = (char *)FUN_00024a50(sVar3 + 1);" (assignment_expression "__dest = (char *)FUN_00024a50(sVar3 + 1)" identifier = (cast_expression "(char *)FUN_00024a50(sVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00024a50(sVar3 + 1)" identifier (argument_list "(sVar3 + 1)" ( (binary_expression "sVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "strcpy(__dest,param_1);" (call_expression "strcpy(__dest,param_1)" identifier (argument_list "(__dest,param_1)" ( identifier , identifier ))) ;) (expression_statement "*(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;" (assignment_expression "*(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1" (pointer_expression "*(int *)(piVar4[0x20] + 0x2c)" * (cast_expression "(int *)(piVar4[0x20] + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4[0x20] + 0x2c)" ( (binary_expression "piVar4[0x20] + 0x2c" (subscript_expression "piVar4[0x20]" identifier [ number_literal ]) + number_literal) )))) = (binary_expression "*(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1" (binary_expression "*(int *)(piVar4[0x20] + 0x2c) + sVar3" (pointer_expression "*(int *)(piVar4[0x20] + 0x2c)" * (cast_expression "(int *)(piVar4[0x20] + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4[0x20] + 0x2c)" ( (binary_expression "piVar4[0x20] + 0x2c" (subscript_expression "piVar4[0x20]" identifier [ number_literal ]) + number_literal) )))) + identifier) + number_literal)) ;) (expression_statement "sVar3 = local_20;" (assignment_expression "sVar3 = local_20" identifier = identifier) ;) })) (expression_statement "FUN_000365a0(uVar1,uVar2);" (call_expression "FUN_000365a0(uVar1,uVar2)" identifier (argument_list "(uVar1,uVar2)" ( identifier , identifier ))) ;) (return_statement "return sVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nuint get_stab_string_offset(char *string,char *stabstr_secname)\n\n{\n  int *piVar1;\n  segT secptr;\n  subsegT subseg;\n  size_t sVar2;\n  segT paVar3;\n  char *pcVar4;\n  size_t local_20;\n  \n  sVar2 = strlen(string);\n  subseg = now_subseg;\n  secptr = now_seg;\n  paVar3 = subseg_new(stabstr_secname,0);\n  local_20 = *(size_t *)((int)paVar3->userdata + 0x2c);\n  if (local_20 == 0) {\n    pcVar4 = frag_more(1);\n    *pcVar4 = '\0';\n    *(undefined4 *)((int)paVar3->userdata + 0x2c) = 1;\n    bfd_set_section_flags(stdoutput,paVar3,0x2008);\n    local_20 = 1;\n    if (paVar3->name == stabstr_secname) {\n      local_20 = 1;\n      pcVar4 = (char *)xstrdup(stabstr_secname);\n      paVar3->name = pcVar4;\n    }\n  }\n  if (sVar2 != 0) {\n    pcVar4 = frag_more(sVar2 + 1);\n    strcpy(pcVar4,string);\n    piVar1 = (int *)((int)paVar3->userdata + 0x2c);\n    *piVar1 = *piVar1 + sVar2 + 1;\n    sVar2 = local_20;\n  }\n  subseg_set(secptr,subseg);\n  return sVar2;\n}\n\n" comment comment (function_definition "uint get_stab_string_offset(char *string,char *stabstr_secname)\n\n{\n  int *piVar1;\n  segT secptr;\n  subsegT subseg;\n  size_t sVar2;\n  segT paVar3;\n  char *pcVar4;\n  size_t local_20;\n  \n  sVar2 = strlen(string);\n  subseg = now_subseg;\n  secptr = now_seg;\n  paVar3 = subseg_new(stabstr_secname,0);\n  local_20 = *(size_t *)((int)paVar3->userdata + 0x2c);\n  if (local_20 == 0) {\n    pcVar4 = frag_more(1);\n    *pcVar4 = '\0';\n    *(undefined4 *)((int)paVar3->userdata + 0x2c) = 1;\n    bfd_set_section_flags(stdoutput,paVar3,0x2008);\n    local_20 = 1;\n    if (paVar3->name == stabstr_secname) {\n      local_20 = 1;\n      pcVar4 = (char *)xstrdup(stabstr_secname);\n      paVar3->name = pcVar4;\n    }\n  }\n  if (sVar2 != 0) {\n    pcVar4 = frag_more(sVar2 + 1);\n    strcpy(pcVar4,string);\n    piVar1 = (int *)((int)paVar3->userdata + 0x2c);\n    *piVar1 = *piVar1 + sVar2 + 1;\n    sVar2 = local_20;\n  }\n  subseg_set(secptr,subseg);\n  return sVar2;\n}" type_identifier (function_declarator "get_stab_string_offset(char *string,char *stabstr_secname)" identifier (parameter_list "(char *string,char *stabstr_secname)" ( (parameter_declaration "char *string" primitive_type (pointer_declarator "*string" * identifier)) , (parameter_declaration "char *stabstr_secname" primitive_type (pointer_declarator "*stabstr_secname" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  segT secptr;\n  subsegT subseg;\n  size_t sVar2;\n  segT paVar3;\n  char *pcVar4;\n  size_t local_20;\n  \n  sVar2 = strlen(string);\n  subseg = now_subseg;\n  secptr = now_seg;\n  paVar3 = subseg_new(stabstr_secname,0);\n  local_20 = *(size_t *)((int)paVar3->userdata + 0x2c);\n  if (local_20 == 0) {\n    pcVar4 = frag_more(1);\n    *pcVar4 = '\0';\n    *(undefined4 *)((int)paVar3->userdata + 0x2c) = 1;\n    bfd_set_section_flags(stdoutput,paVar3,0x2008);\n    local_20 = 1;\n    if (paVar3->name == stabstr_secname) {\n      local_20 = 1;\n      pcVar4 = (char *)xstrdup(stabstr_secname);\n      paVar3->name = pcVar4;\n    }\n  }\n  if (sVar2 != 0) {\n    pcVar4 = frag_more(sVar2 + 1);\n    strcpy(pcVar4,string);\n    piVar1 = (int *)((int)paVar3->userdata + 0x2c);\n    *piVar1 = *piVar1 + sVar2 + 1;\n    sVar2 = local_20;\n  }\n  subseg_set(secptr,subseg);\n  return sVar2;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "segT secptr;" type_identifier identifier ;) (declaration "subsegT subseg;" type_identifier identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "segT paVar3;" type_identifier identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "size_t local_20;" primitive_type identifier ;) (expression_statement "sVar2 = strlen(string);" (assignment_expression "sVar2 = strlen(string)" identifier = (call_expression "strlen(string)" identifier (argument_list "(string)" ( identifier )))) ;) (expression_statement "subseg = now_subseg;" (assignment_expression "subseg = now_subseg" identifier = identifier) ;) (expression_statement "secptr = now_seg;" (assignment_expression "secptr = now_seg" identifier = identifier) ;) (expression_statement "paVar3 = subseg_new(stabstr_secname,0);" (assignment_expression "paVar3 = subseg_new(stabstr_secname,0)" identifier = (call_expression "subseg_new(stabstr_secname,0)" identifier (argument_list "(stabstr_secname,0)" ( identifier , number_literal )))) ;) (expression_statement "local_20 = *(size_t *)((int)paVar3->userdata + 0x2c);" (assignment_expression "local_20 = *(size_t *)((int)paVar3->userdata + 0x2c)" identifier = (pointer_expression "*(size_t *)((int)paVar3->userdata + 0x2c)" * (cast_expression "(size_t *)((int)paVar3->userdata + 0x2c)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)paVar3->userdata + 0x2c)" ( (binary_expression "(int)paVar3->userdata + 0x2c" (cast_expression "(int)paVar3->userdata" ( (type_descriptor "int" primitive_type) ) (field_expression "paVar3->userdata" identifier -> field_identifier)) + number_literal) ))))) ;) (if_statement "if (local_20 == 0) {\n    pcVar4 = frag_more(1);\n    *pcVar4 = '\0';\n    *(undefined4 *)((int)paVar3->userdata + 0x2c) = 1;\n    bfd_set_section_flags(stdoutput,paVar3,0x2008);\n    local_20 = 1;\n    if (paVar3->name == stabstr_secname) {\n      local_20 = 1;\n      pcVar4 = (char *)xstrdup(stabstr_secname);\n      paVar3->name = pcVar4;\n    }\n  }" if (parenthesized_expression "(local_20 == 0)" ( (binary_expression "local_20 == 0" identifier == number_literal) )) (compound_statement "{\n    pcVar4 = frag_more(1);\n    *pcVar4 = '\0';\n    *(undefined4 *)((int)paVar3->userdata + 0x2c) = 1;\n    bfd_set_section_flags(stdoutput,paVar3,0x2008);\n    local_20 = 1;\n    if (paVar3->name == stabstr_secname) {\n      local_20 = 1;\n      pcVar4 = (char *)xstrdup(stabstr_secname);\n      paVar3->name = pcVar4;\n    }\n  }" { (expression_statement "pcVar4 = frag_more(1);" (assignment_expression "pcVar4 = frag_more(1)" identifier = (call_expression "frag_more(1)" identifier (argument_list "(1)" ( number_literal )))) ;) (expression_statement "*pcVar4 = '\0';" (assignment_expression "*pcVar4 = '\0'" (pointer_expression "*pcVar4" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "*(undefined4 *)((int)paVar3->userdata + 0x2c) = 1;" (assignment_expression "*(undefined4 *)((int)paVar3->userdata + 0x2c) = 1" (pointer_expression "*(undefined4 *)((int)paVar3->userdata + 0x2c)" * (cast_expression "(undefined4 *)((int)paVar3->userdata + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)paVar3->userdata + 0x2c)" ( (binary_expression "(int)paVar3->userdata + 0x2c" (cast_expression "(int)paVar3->userdata" ( (type_descriptor "int" primitive_type) ) (field_expression "paVar3->userdata" identifier -> field_identifier)) + number_literal) )))) = number_literal) ;) (expression_statement "bfd_set_section_flags(stdoutput,paVar3,0x2008);" (call_expression "bfd_set_section_flags(stdoutput,paVar3,0x2008)" identifier (argument_list "(stdoutput,paVar3,0x2008)" ( identifier , identifier , number_literal ))) ;) (expression_statement "local_20 = 1;" (assignment_expression "local_20 = 1" identifier = number_literal) ;) (if_statement "if (paVar3->name == stabstr_secname) {\n      local_20 = 1;\n      pcVar4 = (char *)xstrdup(stabstr_secname);\n      paVar3->name = pcVar4;\n    }" if (parenthesized_expression "(paVar3->name == stabstr_secname)" ( (binary_expression "paVar3->name == stabstr_secname" (field_expression "paVar3->name" identifier -> field_identifier) == identifier) )) (compound_statement "{\n      local_20 = 1;\n      pcVar4 = (char *)xstrdup(stabstr_secname);\n      paVar3->name = pcVar4;\n    }" { (expression_statement "local_20 = 1;" (assignment_expression "local_20 = 1" identifier = number_literal) ;) (expression_statement "pcVar4 = (char *)xstrdup(stabstr_secname);" (assignment_expression "pcVar4 = (char *)xstrdup(stabstr_secname)" identifier = (cast_expression "(char *)xstrdup(stabstr_secname)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xstrdup(stabstr_secname)" identifier (argument_list "(stabstr_secname)" ( identifier ))))) ;) (expression_statement "paVar3->name = pcVar4;" (assignment_expression "paVar3->name = pcVar4" (field_expression "paVar3->name" identifier -> field_identifier) = identifier) ;) })) })) (if_statement "if (sVar2 != 0) {\n    pcVar4 = frag_more(sVar2 + 1);\n    strcpy(pcVar4,string);\n    piVar1 = (int *)((int)paVar3->userdata + 0x2c);\n    *piVar1 = *piVar1 + sVar2 + 1;\n    sVar2 = local_20;\n  }" if (parenthesized_expression "(sVar2 != 0)" ( (binary_expression "sVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    pcVar4 = frag_more(sVar2 + 1);\n    strcpy(pcVar4,string);\n    piVar1 = (int *)((int)paVar3->userdata + 0x2c);\n    *piVar1 = *piVar1 + sVar2 + 1;\n    sVar2 = local_20;\n  }" { (expression_statement "pcVar4 = frag_more(sVar2 + 1);" (assignment_expression "pcVar4 = frag_more(sVar2 + 1)" identifier = (call_expression "frag_more(sVar2 + 1)" identifier (argument_list "(sVar2 + 1)" ( (binary_expression "sVar2 + 1" identifier + number_literal) )))) ;) (expression_statement "strcpy(pcVar4,string);" (call_expression "strcpy(pcVar4,string)" identifier (argument_list "(pcVar4,string)" ( identifier , identifier ))) ;) (expression_statement "piVar1 = (int *)((int)paVar3->userdata + 0x2c);" (assignment_expression "piVar1 = (int *)((int)paVar3->userdata + 0x2c)" identifier = (cast_expression "(int *)((int)paVar3->userdata + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)paVar3->userdata + 0x2c)" ( (binary_expression "(int)paVar3->userdata + 0x2c" (cast_expression "(int)paVar3->userdata" ( (type_descriptor "int" primitive_type) ) (field_expression "paVar3->userdata" identifier -> field_identifier)) + number_literal) )))) ;) (expression_statement "*piVar1 = *piVar1 + sVar2 + 1;" (assignment_expression "*piVar1 = *piVar1 + sVar2 + 1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + sVar2 + 1" (binary_expression "*piVar1 + sVar2" (pointer_expression "*piVar1" * identifier) + identifier) + number_literal)) ;) (expression_statement "sVar2 = local_20;" (assignment_expression "sVar2 = local_20" identifier = identifier) ;) })) (expression_statement "subseg_set(secptr,subseg);" (call_expression "subseg_set(secptr,subseg)" identifier (argument_list "(secptr,subseg)" ( identifier , identifier ))) ;) (return_statement "return sVar2;" return identifier ;) })))
(translation_unit "size_t FUN_00035460(char *param_1,int param_2)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  size_t sVar3;\n  int *piVar4;\n  undefined1 *puVar5;\n  int iVar6;\n  char *__dest;\n  size_t local_20;\n  \n  sVar3 = strlen(param_1);\n  uVar2 = DAT_00077760;\n  uVar1 = DAT_0007763c;\n  piVar4 = (int *)FUN_00036540(param_2,0);\n  local_20 = *(size_t *)(piVar4[0x20] + 0x2c);\n  if (local_20 == 0) {\n    puVar5 = (undefined1 *)FUN_00024a50(1);\n    *puVar5 = 0;\n    *(undefined4 *)(piVar4[0x20] + 0x2c) = 1;\n    bfd_set_section_flags(DAT_00077804,piVar4,0x2008);\n    local_20 = 1;\n    if (*piVar4 == param_2) {\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }\n  }\n  if (sVar3 != 0) {\n    __dest = (char *)FUN_00024a50(sVar3 + 1);\n    strcpy(__dest,param_1);\n    *(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;\n    sVar3 = local_20;\n  }\n  FUN_000365a0(uVar1,uVar2);\n  return sVar3;\n}\n\n" (function_definition "size_t FUN_00035460(char *param_1,int param_2)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  size_t sVar3;\n  int *piVar4;\n  undefined1 *puVar5;\n  int iVar6;\n  char *__dest;\n  size_t local_20;\n  \n  sVar3 = strlen(param_1);\n  uVar2 = DAT_00077760;\n  uVar1 = DAT_0007763c;\n  piVar4 = (int *)FUN_00036540(param_2,0);\n  local_20 = *(size_t *)(piVar4[0x20] + 0x2c);\n  if (local_20 == 0) {\n    puVar5 = (undefined1 *)FUN_00024a50(1);\n    *puVar5 = 0;\n    *(undefined4 *)(piVar4[0x20] + 0x2c) = 1;\n    bfd_set_section_flags(DAT_00077804,piVar4,0x2008);\n    local_20 = 1;\n    if (*piVar4 == param_2) {\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }\n  }\n  if (sVar3 != 0) {\n    __dest = (char *)FUN_00024a50(sVar3 + 1);\n    strcpy(__dest,param_1);\n    *(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;\n    sVar3 = local_20;\n  }\n  FUN_000365a0(uVar1,uVar2);\n  return sVar3;\n}" primitive_type (function_declarator "FUN_00035460(char *param_1,int param_2)" identifier (parameter_list "(char *param_1,int param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  size_t sVar3;\n  int *piVar4;\n  undefined1 *puVar5;\n  int iVar6;\n  char *__dest;\n  size_t local_20;\n  \n  sVar3 = strlen(param_1);\n  uVar2 = DAT_00077760;\n  uVar1 = DAT_0007763c;\n  piVar4 = (int *)FUN_00036540(param_2,0);\n  local_20 = *(size_t *)(piVar4[0x20] + 0x2c);\n  if (local_20 == 0) {\n    puVar5 = (undefined1 *)FUN_00024a50(1);\n    *puVar5 = 0;\n    *(undefined4 *)(piVar4[0x20] + 0x2c) = 1;\n    bfd_set_section_flags(DAT_00077804,piVar4,0x2008);\n    local_20 = 1;\n    if (*piVar4 == param_2) {\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }\n  }\n  if (sVar3 != 0) {\n    __dest = (char *)FUN_00024a50(sVar3 + 1);\n    strcpy(__dest,param_1);\n    *(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;\n    sVar3 = local_20;\n  }\n  FUN_000365a0(uVar1,uVar2);\n  return sVar3;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "undefined1 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "size_t local_20;" primitive_type identifier ;) (expression_statement "sVar3 = strlen(param_1);" (assignment_expression "sVar3 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "uVar2 = DAT_00077760;" (assignment_expression "uVar2 = DAT_00077760" identifier = identifier) ;) (expression_statement "uVar1 = DAT_0007763c;" (assignment_expression "uVar1 = DAT_0007763c" identifier = identifier) ;) (expression_statement "piVar4 = (int *)FUN_00036540(param_2,0);" (assignment_expression "piVar4 = (int *)FUN_00036540(param_2,0)" identifier = (cast_expression "(int *)FUN_00036540(param_2,0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00036540(param_2,0)" identifier (argument_list "(param_2,0)" ( identifier , number_literal ))))) ;) (expression_statement "local_20 = *(size_t *)(piVar4[0x20] + 0x2c);" (assignment_expression "local_20 = *(size_t *)(piVar4[0x20] + 0x2c)" identifier = (pointer_expression "*(size_t *)(piVar4[0x20] + 0x2c)" * (cast_expression "(size_t *)(piVar4[0x20] + 0x2c)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4[0x20] + 0x2c)" ( (binary_expression "piVar4[0x20] + 0x2c" (subscript_expression "piVar4[0x20]" identifier [ number_literal ]) + number_literal) ))))) ;) (if_statement "if (local_20 == 0) {\n    puVar5 = (undefined1 *)FUN_00024a50(1);\n    *puVar5 = 0;\n    *(undefined4 *)(piVar4[0x20] + 0x2c) = 1;\n    bfd_set_section_flags(DAT_00077804,piVar4,0x2008);\n    local_20 = 1;\n    if (*piVar4 == param_2) {\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }\n  }" if (parenthesized_expression "(local_20 == 0)" ( (binary_expression "local_20 == 0" identifier == number_literal) )) (compound_statement "{\n    puVar5 = (undefined1 *)FUN_00024a50(1);\n    *puVar5 = 0;\n    *(undefined4 *)(piVar4[0x20] + 0x2c) = 1;\n    bfd_set_section_flags(DAT_00077804,piVar4,0x2008);\n    local_20 = 1;\n    if (*piVar4 == param_2) {\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }\n  }" { (expression_statement "puVar5 = (undefined1 *)FUN_00024a50(1);" (assignment_expression "puVar5 = (undefined1 *)FUN_00024a50(1)" identifier = (cast_expression "(undefined1 *)FUN_00024a50(1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00024a50(1)" identifier (argument_list "(1)" ( number_literal ))))) ;) (expression_statement "*puVar5 = 0;" (assignment_expression "*puVar5 = 0" (pointer_expression "*puVar5" * identifier) = number_literal) ;) (expression_statement "*(undefined4 *)(piVar4[0x20] + 0x2c) = 1;" (assignment_expression "*(undefined4 *)(piVar4[0x20] + 0x2c) = 1" (pointer_expression "*(undefined4 *)(piVar4[0x20] + 0x2c)" * (cast_expression "(undefined4 *)(piVar4[0x20] + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4[0x20] + 0x2c)" ( (binary_expression "piVar4[0x20] + 0x2c" (subscript_expression "piVar4[0x20]" identifier [ number_literal ]) + number_literal) )))) = number_literal) ;) (expression_statement "bfd_set_section_flags(DAT_00077804,piVar4,0x2008);" (call_expression "bfd_set_section_flags(DAT_00077804,piVar4,0x2008)" identifier (argument_list "(DAT_00077804,piVar4,0x2008)" ( identifier , identifier , number_literal ))) ;) (expression_statement "local_20 = 1;" (assignment_expression "local_20 = 1" identifier = number_literal) ;) (if_statement "if (*piVar4 == param_2) {\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }" if (parenthesized_expression "(*piVar4 == param_2)" ( (binary_expression "*piVar4 == param_2" (pointer_expression "*piVar4" * identifier) == identifier) )) (compound_statement "{\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }" { (expression_statement "local_20 = 1;" (assignment_expression "local_20 = 1" identifier = number_literal) ;) (expression_statement "iVar6 = xstrdup(param_2);" (assignment_expression "iVar6 = xstrdup(param_2)" identifier = (call_expression "xstrdup(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "*piVar4 = iVar6;" (assignment_expression "*piVar4 = iVar6" (pointer_expression "*piVar4" * identifier) = identifier) ;) })) })) (if_statement "if (sVar3 != 0) {\n    __dest = (char *)FUN_00024a50(sVar3 + 1);\n    strcpy(__dest,param_1);\n    *(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;\n    sVar3 = local_20;\n  }" if (parenthesized_expression "(sVar3 != 0)" ( (binary_expression "sVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    __dest = (char *)FUN_00024a50(sVar3 + 1);\n    strcpy(__dest,param_1);\n    *(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;\n    sVar3 = local_20;\n  }" { (expression_statement "__dest = (char *)FUN_00024a50(sVar3 + 1);" (assignment_expression "__dest = (char *)FUN_00024a50(sVar3 + 1)" identifier = (cast_expression "(char *)FUN_00024a50(sVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00024a50(sVar3 + 1)" identifier (argument_list "(sVar3 + 1)" ( (binary_expression "sVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "strcpy(__dest,param_1);" (call_expression "strcpy(__dest,param_1)" identifier (argument_list "(__dest,param_1)" ( identifier , identifier ))) ;) (expression_statement "*(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;" (assignment_expression "*(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1" (pointer_expression "*(int *)(piVar4[0x20] + 0x2c)" * (cast_expression "(int *)(piVar4[0x20] + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4[0x20] + 0x2c)" ( (binary_expression "piVar4[0x20] + 0x2c" (subscript_expression "piVar4[0x20]" identifier [ number_literal ]) + number_literal) )))) = (binary_expression "*(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1" (binary_expression "*(int *)(piVar4[0x20] + 0x2c) + sVar3" (pointer_expression "*(int *)(piVar4[0x20] + 0x2c)" * (cast_expression "(int *)(piVar4[0x20] + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar4[0x20] + 0x2c)" ( (binary_expression "piVar4[0x20] + 0x2c" (subscript_expression "piVar4[0x20]" identifier [ number_literal ]) + number_literal) )))) + identifier) + number_literal)) ;) (expression_statement "sVar3 = local_20;" (assignment_expression "sVar3 = local_20" identifier = identifier) ;) })) (expression_statement "FUN_000365a0(uVar1,uVar2);" (call_expression "FUN_000365a0(uVar1,uVar2)" identifier (argument_list "(uVar1,uVar2)" ( identifier , identifier ))) ;) (return_statement "return sVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * 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 = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) = (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) + IDENT) + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (return_statement return IDENT ;) })))
(function_definition "size_t FUN_00035460(char *param_1,int param_2)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  size_t sVar3;\n  int *piVar4;\n  undefined1 *puVar5;\n  int iVar6;\n  char *__dest;\n  size_t local_20;\n  \n  sVar3 = strlen(param_1);\n  uVar2 = DAT_00077760;\n  uVar1 = DAT_0007763c;\n  piVar4 = (int *)FUN_00036540(param_2,0);\n  local_20 = *(size_t *)(piVar4[0x20] + 0x2c);\n  if (local_20 == 0) {\n    puVar5 = (undefined1 *)FUN_00024a50(1);\n    *puVar5 = 0;\n    *(undefined4 *)(piVar4[0x20] + 0x2c) = 1;\n    bfd_set_section_flags(DAT_00077804,piVar4,0x2008);\n    local_20 = 1;\n    if (*piVar4 == param_2) {\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }\n  }\n  if (sVar3 != 0) {\n    __dest = (char *)FUN_00024a50(sVar3 + 1);\n    strcpy(__dest,param_1);\n    *(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;\n    sVar3 = local_20;\n  }\n  FUN_000365a0(uVar1,uVar2);\n  return sVar3;\n}" (primitive_type "size_t") (function_declarator "FUN_00035460(char *param_1,int param_2)" (identifier "FUN_00035460") (parameter_list "(char *param_1,int param_2)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  size_t sVar3;\n  int *piVar4;\n  undefined1 *puVar5;\n  int iVar6;\n  char *__dest;\n  size_t local_20;\n  \n  sVar3 = strlen(param_1);\n  uVar2 = DAT_00077760;\n  uVar1 = DAT_0007763c;\n  piVar4 = (int *)FUN_00036540(param_2,0);\n  local_20 = *(size_t *)(piVar4[0x20] + 0x2c);\n  if (local_20 == 0) {\n    puVar5 = (undefined1 *)FUN_00024a50(1);\n    *puVar5 = 0;\n    *(undefined4 *)(piVar4[0x20] + 0x2c) = 1;\n    bfd_set_section_flags(DAT_00077804,piVar4,0x2008);\n    local_20 = 1;\n    if (*piVar4 == param_2) {\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }\n  }\n  if (sVar3 != 0) {\n    __dest = (char *)FUN_00024a50(sVar3 + 1);\n    strcpy(__dest,param_1);\n    *(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;\n    sVar3 = local_20;\n  }\n  FUN_000365a0(uVar1,uVar2);\n  return sVar3;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "size_t sVar3;" (primitive_type "size_t") (identifier "sVar3") (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "undefined1 *puVar5;" (type_identifier "undefined1") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "char *__dest;" (primitive_type "char") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "size_t local_20;" (primitive_type "size_t") (identifier "local_20") (; ";")) (expression_statement "sVar3 = strlen(param_1);" (assignment_expression "sVar3 = strlen(param_1)" (identifier "sVar3") (= "=") (call_expression "strlen(param_1)" (identifier "strlen") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "uVar2 = DAT_00077760;" (assignment_expression "uVar2 = DAT_00077760" (identifier "uVar2") (= "=") (identifier "DAT_00077760")) (; ";")) (expression_statement "uVar1 = DAT_0007763c;" (assignment_expression "uVar1 = DAT_0007763c" (identifier "uVar1") (= "=") (identifier "DAT_0007763c")) (; ";")) (expression_statement "piVar4 = (int *)FUN_00036540(param_2,0);" (assignment_expression "piVar4 = (int *)FUN_00036540(param_2,0)" (identifier "piVar4") (= "=") (cast_expression "(int *)FUN_00036540(param_2,0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00036540(param_2,0)" (identifier "FUN_00036540") (argument_list "(param_2,0)" (( "(") (identifier "param_2") (, ",") (number_literal "0") () ")"))))) (; ";")) (expression_statement "local_20 = *(size_t *)(piVar4[0x20] + 0x2c);" (assignment_expression "local_20 = *(size_t *)(piVar4[0x20] + 0x2c)" (identifier "local_20") (= "=") (pointer_expression "*(size_t *)(piVar4[0x20] + 0x2c)" (* "*") (cast_expression "(size_t *)(piVar4[0x20] + 0x2c)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar4[0x20] + 0x2c)" (( "(") (binary_expression "piVar4[0x20] + 0x2c" (subscript_expression "piVar4[0x20]" (identifier "piVar4") ([ "[") (number_literal "0x20") (] "]")) (+ "+") (number_literal "0x2c")) () ")"))))) (; ";")) (if_statement "if (local_20 == 0) {\n    puVar5 = (undefined1 *)FUN_00024a50(1);\n    *puVar5 = 0;\n    *(undefined4 *)(piVar4[0x20] + 0x2c) = 1;\n    bfd_set_section_flags(DAT_00077804,piVar4,0x2008);\n    local_20 = 1;\n    if (*piVar4 == param_2) {\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }\n  }" (if "if") (parenthesized_expression "(local_20 == 0)" (( "(") (binary_expression "local_20 == 0" (identifier "local_20") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    puVar5 = (undefined1 *)FUN_00024a50(1);\n    *puVar5 = 0;\n    *(undefined4 *)(piVar4[0x20] + 0x2c) = 1;\n    bfd_set_section_flags(DAT_00077804,piVar4,0x2008);\n    local_20 = 1;\n    if (*piVar4 == param_2) {\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }\n  }" ({ "{") (expression_statement "puVar5 = (undefined1 *)FUN_00024a50(1);" (assignment_expression "puVar5 = (undefined1 *)FUN_00024a50(1)" (identifier "puVar5") (= "=") (cast_expression "(undefined1 *)FUN_00024a50(1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00024a50(1)" (identifier "FUN_00024a50") (argument_list "(1)" (( "(") (number_literal "1") () ")"))))) (; ";")) (expression_statement "*puVar5 = 0;" (assignment_expression "*puVar5 = 0" (pointer_expression "*puVar5" (* "*") (identifier "puVar5")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(piVar4[0x20] + 0x2c) = 1;" (assignment_expression "*(undefined4 *)(piVar4[0x20] + 0x2c) = 1" (pointer_expression "*(undefined4 *)(piVar4[0x20] + 0x2c)" (* "*") (cast_expression "(undefined4 *)(piVar4[0x20] + 0x2c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar4[0x20] + 0x2c)" (( "(") (binary_expression "piVar4[0x20] + 0x2c" (subscript_expression "piVar4[0x20]" (identifier "piVar4") ([ "[") (number_literal "0x20") (] "]")) (+ "+") (number_literal "0x2c")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "bfd_set_section_flags(DAT_00077804,piVar4,0x2008);" (call_expression "bfd_set_section_flags(DAT_00077804,piVar4,0x2008)" (identifier "bfd_set_section_flags") (argument_list "(DAT_00077804,piVar4,0x2008)" (( "(") (identifier "DAT_00077804") (, ",") (identifier "piVar4") (, ",") (number_literal "0x2008") () ")"))) (; ";")) (expression_statement "local_20 = 1;" (assignment_expression "local_20 = 1" (identifier "local_20") (= "=") (number_literal "1")) (; ";")) (if_statement "if (*piVar4 == param_2) {\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }" (if "if") (parenthesized_expression "(*piVar4 == param_2)" (( "(") (binary_expression "*piVar4 == param_2" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (== "==") (identifier "param_2")) () ")")) (compound_statement "{\n      local_20 = 1;\n      iVar6 = xstrdup(param_2);\n      *piVar4 = iVar6;\n    }" ({ "{") (expression_statement "local_20 = 1;" (assignment_expression "local_20 = 1" (identifier "local_20") (= "=") (number_literal "1")) (; ";")) (expression_statement "iVar6 = xstrdup(param_2);" (assignment_expression "iVar6 = xstrdup(param_2)" (identifier "iVar6") (= "=") (call_expression "xstrdup(param_2)" (identifier "xstrdup") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (expression_statement "*piVar4 = iVar6;" (assignment_expression "*piVar4 = iVar6" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (identifier "iVar6")) (; ";")) (} "}"))) (} "}"))) (if_statement "if (sVar3 != 0) {\n    __dest = (char *)FUN_00024a50(sVar3 + 1);\n    strcpy(__dest,param_1);\n    *(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;\n    sVar3 = local_20;\n  }" (if "if") (parenthesized_expression "(sVar3 != 0)" (( "(") (binary_expression "sVar3 != 0" (identifier "sVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    __dest = (char *)FUN_00024a50(sVar3 + 1);\n    strcpy(__dest,param_1);\n    *(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;\n    sVar3 = local_20;\n  }" ({ "{") (expression_statement "__dest = (char *)FUN_00024a50(sVar3 + 1);" (assignment_expression "__dest = (char *)FUN_00024a50(sVar3 + 1)" (identifier "__dest") (= "=") (cast_expression "(char *)FUN_00024a50(sVar3 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00024a50(sVar3 + 1)" (identifier "FUN_00024a50") (argument_list "(sVar3 + 1)" (( "(") (binary_expression "sVar3 + 1" (identifier "sVar3") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "strcpy(__dest,param_1);" (call_expression "strcpy(__dest,param_1)" (identifier "strcpy") (argument_list "(__dest,param_1)" (( "(") (identifier "__dest") (, ",") (identifier "param_1") () ")"))) (; ";")) (expression_statement "*(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;" (assignment_expression "*(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1" (pointer_expression "*(int *)(piVar4[0x20] + 0x2c)" (* "*") (cast_expression "(int *)(piVar4[0x20] + 0x2c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar4[0x20] + 0x2c)" (( "(") (binary_expression "piVar4[0x20] + 0x2c" (subscript_expression "piVar4[0x20]" (identifier "piVar4") ([ "[") (number_literal "0x20") (] "]")) (+ "+") (number_literal "0x2c")) () ")")))) (= "=") (binary_expression "*(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1" (binary_expression "*(int *)(piVar4[0x20] + 0x2c) + sVar3" (pointer_expression "*(int *)(piVar4[0x20] + 0x2c)" (* "*") (cast_expression "(int *)(piVar4[0x20] + 0x2c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar4[0x20] + 0x2c)" (( "(") (binary_expression "piVar4[0x20] + 0x2c" (subscript_expression "piVar4[0x20]" (identifier "piVar4") ([ "[") (number_literal "0x20") (] "]")) (+ "+") (number_literal "0x2c")) () ")")))) (+ "+") (identifier "sVar3")) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "sVar3 = local_20;" (assignment_expression "sVar3 = local_20" (identifier "sVar3") (= "=") (identifier "local_20")) (; ";")) (} "}"))) (expression_statement "FUN_000365a0(uVar1,uVar2);" (call_expression "FUN_000365a0(uVar1,uVar2)" (identifier "FUN_000365a0") (argument_list "(uVar1,uVar2)" (( "(") (identifier "uVar1") (, ",") (identifier "uVar2") () ")"))) (; ";")) (return_statement "return sVar3;" (return "return") (identifier "sVar3") (; ";")) (} "}")))

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

type_1 function_1(char *string,char *var_6)

{
  int *piVar1;
  type_2 secptr;
  type_3 subseg;
  size_t var_8;
  type_2 paVar3;
  char *pcVar4;
  size_t var_3;
  
  var_8 = var_1(string);
  subseg = now_subseg;
  secptr = now_seg;
  paVar3 = var_2(var_6,0);
  var_3 = *(size_t *)((int)paVar3->userdata + 0x2c);
  if (var_3 == 0) {
    pcVar4 = var_4(1);
    *pcVar4 = '\0';
    *(type_4 *)((int)paVar3->userdata + 0x2c) = 1;
    var_5(stdoutput,paVar3,0x2008);
    var_3 = 1;
    if (paVar3->name == var_6) {
      var_3 = 1;
      pcVar4 = (char *)var_7(var_6);
      paVar3->name = pcVar4;
    }
  }
  if (var_8 != 0) {
    pcVar4 = var_4(var_8 + 1);
    var_9(pcVar4,string);
    piVar1 = (int *)((int)paVar3->userdata + 0x2c);
    *piVar1 = *piVar1 + var_8 + 1;
    var_8 = var_3;
  }
  var_10(secptr,subseg);
  return var_8;
}


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

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

size_t MASKED(char *param_1,int param_2)

{
  undefined4 uVar1;
  undefined4 uVar2;
  size_t sVar3;
  int *piVar4;
  undefined1 *puVar5;
  int iVar6;
  char *__dest;
  size_t local_20;
  
  sVar3 = strlen(param_1);
  uVar2 = DAT_00077760;
  uVar1 = DAT_0007763c;
  piVar4 = (int *)FUN_00036540(param_2,0);
  local_20 = *(size_t *)(piVar4[0x20] + 0x2c);
  if (local_20 == 0) {
    puVar5 = (undefined1 *)FUN_00024a50(1);
    *puVar5 = 0;
    *(undefined4 *)(piVar4[0x20] + 0x2c) = 1;
    bfd_set_section_flags(DAT_00077804,piVar4,0x2008);
    local_20 = 1;
    if (*piVar4 == param_2) {
      local_20 = 1;
      iVar6 = xstrdup(param_2);
      *piVar4 = iVar6;
    }
  }
  if (sVar3 != 0) {
    __dest = (char *)FUN_00024a50(sVar3 + 1);
    strcpy(__dest,param_1);
    *(int *)(piVar4[0x20] + 0x2c) = *(int *)(piVar4[0x20] + 0x2c) + sVar3 + 1;
    sVar3 = local_20;
  }
  FUN_000365a0(uVar1,uVar2);
  return sVar3;
}

