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

bfd_boolean stab_variable(void *p,char *name,debug_var_kind kind,bfd_vma val)

{
  int iVar1;
  byte *__s;
  size_t sVar2;
  size_t sVar3;
  char *__s_00;
  bfd_boolean bVar4;
  byte *__s_01;
  char *pcVar5;
  int local_20;
  
  __s = (byte *)stab_pop_type((stab_write_handle *)((int)p + 0x38));
  switch(kind) {
  default:
                    /* WARNING: Subroutine does not return */
    abort();
  case DEBUG_GLOBAL:
    pcVar5 = "G";
    local_20 = 0x20;
    break;
  case DEBUG_STATIC:
    pcVar5 = "S";
    local_20 = 0x26;
    break;
  case DEBUG_LOCAL_STATIC:
    pcVar5 = "V";
    local_20 = 0x26;
    break;
  case DEBUG_LOCAL:
    pcVar5 = "";
    local_20 = 0x80;
    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {
      local_20 = 0x80;
      iVar1 = *(int *)((int)p + 0x3c);
      *(int *)((int)p + 0x3c) = iVar1 + 1;
      sVar2 = strlen((char *)__s);
      __s_01 = (byte *)xmalloc(sVar2 + 0x14);
      sprintf((char *)__s_01,"%ld=%s",iVar1,__s);
      free(__s);
      __s = __s_01;
    }
    break;
  case DEBUG_REGISTER:
    pcVar5 = "r";
    local_20 = 0x40;
  }
  sVar2 = strlen(name);
  sVar3 = strlen((char *)__s);
  __s_00 = (char *)xmalloc(sVar2 + 3 + sVar3);
  sprintf(__s_00,"%s:%s%s",name,pcVar5,__s);
  free(__s);
  bVar4 = stab_write_symbol((stab_write_handle *)p,local_20,0,val,__s_00);
  if (bVar4 != 0) {
    free(__s_00);
    bVar4 = 1;
  }
  return bVar4;
}



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

int FUN_00029050(int param_1,char *param_2,undefined4 param_3,undefined4 param_4)

{
  byte *__s;
  size_t sVar1;
  size_t sVar2;
  char *__s_00;
  int iVar3;
  byte *__s_01;
  char *pcVar4;
  
  __s = (byte *)FUN_00028700();
  switch(param_3) {
  default:
                    /* WARNING: Subroutine does not return */
    abort();
  case 1:
    pcVar4 = "G";
    break;
  case 2:
    pcVar4 = "S";
    break;
  case 3:
    pcVar4 = "V";
    break;
  case 4:
    pcVar4 = "";
    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {
      iVar3 = *(int *)(param_1 + 0x3c);
      *(int *)(param_1 + 0x3c) = iVar3 + 1;
      sVar1 = strlen((char *)__s);
      __s_01 = (byte *)xmalloc(sVar1 + 0x14);
      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);
      free(__s);
      __s = __s_01;
    }
    break;
  case 5:
    pcVar4 = "r";
  }
  sVar1 = strlen(param_2);
  sVar2 = strlen((char *)__s);
  __s_00 = (char *)xmalloc(sVar1 + 3 + sVar2);
  sprintf(__s_00,"%s:%s%s",param_2,pcVar4,__s);
  free(__s);
  iVar3 = FUN_000280c0(param_4,__s_00);
  if (iVar3 != 0) {
    free(__s_00);
    iVar3 = 1;
  }
  return iVar3;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000165d0
ADD EBX,0x15fa7
SUB ESP,0x1c
MOV EAX,dword ptr [ESP + 0x30]
MOV EDI,dword ptr [ESP + 0x38]
ADD EAX,0x38
CALL 0x00028700
CMP EDI,0x5
JA 0x0001398c
MOV ESI,EAX
MOV EAX,dword ptr [EBX + EDI*0x4 + 0xffff5100]
ADD EAX,EBX
JMP EAX
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_00029050(int param_1,char *param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  byte *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  int iVar3;\n  byte *__s_01;\n  char *pcVar4;\n  \n  __s = (byte *)FUN_00028700();\n  switch(param_3) {\n  default:\n                    /* WARNING: Subroutine does not return */\n    abort();\n  case 1:\n    pcVar4 = "G";\n    break;\n  case 2:\n    pcVar4 = "S";\n    break;\n  case 3:\n    pcVar4 = "V";\n    break;\n  case 4:\n    pcVar4 = "";\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case 5:\n    pcVar4 = "r";\n  }\n  sVar1 = strlen(param_2);\n  sVar2 = strlen((char *)__s);\n  __s_00 = (char *)xmalloc(sVar1 + 3 + sVar2);\n  sprintf(__s_00,"%s:%s%s",param_2,pcVar4,__s);\n  free(__s);\n  iVar3 = FUN_000280c0(param_4,__s_00);\n  if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }\n  return iVar3;\n}\n\n" comment (function_definition "int FUN_00029050(int param_1,char *param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  byte *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  int iVar3;\n  byte *__s_01;\n  char *pcVar4;\n  \n  __s = (byte *)FUN_00028700();\n  switch(param_3) {\n  default:\n                    /* WARNING: Subroutine does not return */\n    abort();\n  case 1:\n    pcVar4 = "G";\n    break;\n  case 2:\n    pcVar4 = "S";\n    break;\n  case 3:\n    pcVar4 = "V";\n    break;\n  case 4:\n    pcVar4 = "";\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case 5:\n    pcVar4 = "r";\n  }\n  sVar1 = strlen(param_2);\n  sVar2 = strlen((char *)__s);\n  __s_00 = (char *)xmalloc(sVar1 + 3 + sVar2);\n  sprintf(__s_00,"%s:%s%s",param_2,pcVar4,__s);\n  free(__s);\n  iVar3 = FUN_000280c0(param_4,__s_00);\n  if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }\n  return iVar3;\n}" primitive_type (function_declarator "FUN_00029050(int param_1,char *param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(int param_1,char *param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  byte *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  int iVar3;\n  byte *__s_01;\n  char *pcVar4;\n  \n  __s = (byte *)FUN_00028700();\n  switch(param_3) {\n  default:\n                    /* WARNING: Subroutine does not return */\n    abort();\n  case 1:\n    pcVar4 = "G";\n    break;\n  case 2:\n    pcVar4 = "S";\n    break;\n  case 3:\n    pcVar4 = "V";\n    break;\n  case 4:\n    pcVar4 = "";\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case 5:\n    pcVar4 = "r";\n  }\n  sVar1 = strlen(param_2);\n  sVar2 = strlen((char *)__s);\n  __s_00 = (char *)xmalloc(sVar1 + 3 + sVar2);\n  sprintf(__s_00,"%s:%s%s",param_2,pcVar4,__s);\n  free(__s);\n  iVar3 = FUN_000280c0(param_4,__s_00);\n  if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }\n  return iVar3;\n}" { (declaration "byte *__s;" type_identifier (pointer_declarator "*__s" * identifier) ;) (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__s_00;" primitive_type (pointer_declarator "*__s_00" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "byte *__s_01;" type_identifier (pointer_declarator "*__s_01" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (expression_statement "__s = (byte *)FUN_00028700();" (assignment_expression "__s = (byte *)FUN_00028700()" identifier = (cast_expression "(byte *)FUN_00028700()" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00028700()" identifier (argument_list "()" ( ))))) ;) (switch_statement "switch(param_3) {\n  default:\n                    /* WARNING: Subroutine does not return */\n    abort();\n  case 1:\n    pcVar4 = "G";\n    break;\n  case 2:\n    pcVar4 = "S";\n    break;\n  case 3:\n    pcVar4 = "V";\n    break;\n  case 4:\n    pcVar4 = "";\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case 5:\n    pcVar4 = "r";\n  }" switch (parenthesized_expression "(param_3)" ( identifier )) (compound_statement "{\n  default:\n                    /* WARNING: Subroutine does not return */\n    abort();\n  case 1:\n    pcVar4 = "G";\n    break;\n  case 2:\n    pcVar4 = "S";\n    break;\n  case 3:\n    pcVar4 = "V";\n    break;\n  case 4:\n    pcVar4 = "";\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case 5:\n    pcVar4 = "r";\n  }" { (case_statement "default:\n                    /* WARNING: Subroutine does not return */\n    abort();" default : comment (expression_statement "abort();" (call_expression "abort()" identifier (argument_list "()" ( ))) ;)) (case_statement "case 1:\n    pcVar4 = "G";\n    break;" case number_literal : (expression_statement "pcVar4 = "G";" (assignment_expression "pcVar4 = "G"" identifier = (string_literal ""G"" " string_content ")) ;) (break_statement "break;" break ;)) (case_statement "case 2:\n    pcVar4 = "S";\n    break;" case number_literal : (expression_statement "pcVar4 = "S";" (assignment_expression "pcVar4 = "S"" identifier = (string_literal ""S"" " string_content ")) ;) (break_statement "break;" break ;)) (case_statement "case 3:\n    pcVar4 = "V";\n    break;" case number_literal : (expression_statement "pcVar4 = "V";" (assignment_expression "pcVar4 = "V"" identifier = (string_literal ""V"" " string_content ")) ;) (break_statement "break;" break ;)) (case_statement "case 4:\n    pcVar4 = "";\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;" case number_literal : (expression_statement "pcVar4 = "";" (assignment_expression "pcVar4 = """ identifier = (string_literal """" " ")) ;) (if_statement "if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }" if (parenthesized_expression "((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0)" ( (binary_expression "(PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0" (parenthesized_expression "(PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4)" ( (binary_expression "PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4" (subscript_expression "PTR__sch_istable_0003efb4[(uint)*__s * 2]" identifier [ (binary_expression "(uint)*__s * 2" (binary_expression "(uint)*__s" (parenthesized_expression "(uint)" ( identifier )) * identifier) * number_literal) ]) & number_literal) )) == number_literal) )) (compound_statement "{\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }" { (expression_statement "iVar3 = *(int *)(param_1 + 0x3c);" (assignment_expression "iVar3 = *(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) = iVar3 + 1;" (assignment_expression "*(int *)(param_1 + 0x3c) = iVar3 + 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 "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "sVar1 = strlen((char *)__s);" (assignment_expression "sVar1 = strlen((char *)__s)" identifier = (call_expression "strlen((char *)__s)" identifier (argument_list "((char *)__s)" ( (cast_expression "(char *)__s" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "__s_01 = (byte *)xmalloc(sVar1 + 0x14);" (assignment_expression "__s_01 = (byte *)xmalloc(sVar1 + 0x14)" identifier = (cast_expression "(byte *)xmalloc(sVar1 + 0x14)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 + 0x14)" identifier (argument_list "(sVar1 + 0x14)" ( (binary_expression "sVar1 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "sprintf((char *)__s_01,"%ld=%s",iVar3,__s);" (call_expression "sprintf((char *)__s_01,"%ld=%s",iVar3,__s)" identifier (argument_list "((char *)__s_01,"%ld=%s",iVar3,__s)" ( (cast_expression "(char *)__s_01" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , (string_literal ""%ld=%s"" " string_content ") , identifier , identifier ))) ;) (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "__s = __s_01;" (assignment_expression "__s = __s_01" identifier = identifier) ;) })) (break_statement "break;" break ;)) (case_statement "case 5:\n    pcVar4 = "r";" case number_literal : (expression_statement "pcVar4 = "r";" (assignment_expression "pcVar4 = "r"" identifier = (string_literal ""r"" " string_content ")) ;)) })) (expression_statement "sVar1 = strlen(param_2);" (assignment_expression "sVar1 = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "sVar2 = strlen((char *)__s);" (assignment_expression "sVar2 = strlen((char *)__s)" identifier = (call_expression "strlen((char *)__s)" identifier (argument_list "((char *)__s)" ( (cast_expression "(char *)__s" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "__s_00 = (char *)xmalloc(sVar1 + 3 + sVar2);" (assignment_expression "__s_00 = (char *)xmalloc(sVar1 + 3 + sVar2)" identifier = (cast_expression "(char *)xmalloc(sVar1 + 3 + sVar2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 + 3 + sVar2)" identifier (argument_list "(sVar1 + 3 + sVar2)" ( (binary_expression "sVar1 + 3 + sVar2" (binary_expression "sVar1 + 3" identifier + number_literal) + identifier) ))))) ;) (expression_statement "sprintf(__s_00,"%s:%s%s",param_2,pcVar4,__s);" (call_expression "sprintf(__s_00,"%s:%s%s",param_2,pcVar4,__s)" identifier (argument_list "(__s_00,"%s:%s%s",param_2,pcVar4,__s)" ( identifier , (string_literal ""%s:%s%s"" " string_content ") , identifier , identifier , identifier ))) ;) (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "iVar3 = FUN_000280c0(param_4,__s_00);" (assignment_expression "iVar3 = FUN_000280c0(param_4,__s_00)" identifier = (call_expression "FUN_000280c0(param_4,__s_00)" identifier (argument_list "(param_4,__s_00)" ( identifier , identifier )))) ;) (if_statement "if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    free(__s_00);\n    iVar3 = 1;\n  }" { (expression_statement "free(__s_00);" (call_expression "free(__s_00)" identifier (argument_list "(__s_00)" ( identifier ))) ;) (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) })) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nbfd_boolean stab_variable(void *p,char *name,debug_var_kind kind,bfd_vma val)\n\n{\n  int iVar1;\n  byte *__s;\n  size_t sVar2;\n  size_t sVar3;\n  char *__s_00;\n  bfd_boolean bVar4;\n  byte *__s_01;\n  char *pcVar5;\n  int local_20;\n  \n  __s = (byte *)stab_pop_type((stab_write_handle *)((int)p + 0x38));\n  switch(kind) {\n  default:\n                    /* WARNING: Subroutine does not return */\n    abort();\n  case DEBUG_GLOBAL:\n    pcVar5 = "G";\n    local_20 = 0x20;\n    break;\n  case DEBUG_STATIC:\n    pcVar5 = "S";\n    local_20 = 0x26;\n    break;\n  case DEBUG_LOCAL_STATIC:\n    pcVar5 = "V";\n    local_20 = 0x26;\n    break;\n  case DEBUG_LOCAL:\n    pcVar5 = "";\n    local_20 = 0x80;\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      local_20 = 0x80;\n      iVar1 = *(int *)((int)p + 0x3c);\n      *(int *)((int)p + 0x3c) = iVar1 + 1;\n      sVar2 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar2 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar1,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case DEBUG_REGISTER:\n    pcVar5 = "r";\n    local_20 = 0x40;\n  }\n  sVar2 = strlen(name);\n  sVar3 = strlen((char *)__s);\n  __s_00 = (char *)xmalloc(sVar2 + 3 + sVar3);\n  sprintf(__s_00,"%s:%s%s",name,pcVar5,__s);\n  free(__s);\n  bVar4 = stab_write_symbol((stab_write_handle *)p,local_20,0,val,__s_00);\n  if (bVar4 != 0) {\n    free(__s_00);\n    bVar4 = 1;\n  }\n  return bVar4;\n}\n\n" comment comment (function_definition "bfd_boolean stab_variable(void *p,char *name,debug_var_kind kind,bfd_vma val)\n\n{\n  int iVar1;\n  byte *__s;\n  size_t sVar2;\n  size_t sVar3;\n  char *__s_00;\n  bfd_boolean bVar4;\n  byte *__s_01;\n  char *pcVar5;\n  int local_20;\n  \n  __s = (byte *)stab_pop_type((stab_write_handle *)((int)p + 0x38));\n  switch(kind) {\n  default:\n                    /* WARNING: Subroutine does not return */\n    abort();\n  case DEBUG_GLOBAL:\n    pcVar5 = "G";\n    local_20 = 0x20;\n    break;\n  case DEBUG_STATIC:\n    pcVar5 = "S";\n    local_20 = 0x26;\n    break;\n  case DEBUG_LOCAL_STATIC:\n    pcVar5 = "V";\n    local_20 = 0x26;\n    break;\n  case DEBUG_LOCAL:\n    pcVar5 = "";\n    local_20 = 0x80;\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      local_20 = 0x80;\n      iVar1 = *(int *)((int)p + 0x3c);\n      *(int *)((int)p + 0x3c) = iVar1 + 1;\n      sVar2 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar2 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar1,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case DEBUG_REGISTER:\n    pcVar5 = "r";\n    local_20 = 0x40;\n  }\n  sVar2 = strlen(name);\n  sVar3 = strlen((char *)__s);\n  __s_00 = (char *)xmalloc(sVar2 + 3 + sVar3);\n  sprintf(__s_00,"%s:%s%s",name,pcVar5,__s);\n  free(__s);\n  bVar4 = stab_write_symbol((stab_write_handle *)p,local_20,0,val,__s_00);\n  if (bVar4 != 0) {\n    free(__s_00);\n    bVar4 = 1;\n  }\n  return bVar4;\n}" type_identifier (function_declarator "stab_variable(void *p,char *name,debug_var_kind kind,bfd_vma val)" identifier (parameter_list "(void *p,char *name,debug_var_kind kind,bfd_vma val)" ( (parameter_declaration "void *p" primitive_type (pointer_declarator "*p" * identifier)) , (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) , (parameter_declaration "debug_var_kind kind" type_identifier identifier) , (parameter_declaration "bfd_vma val" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  byte *__s;\n  size_t sVar2;\n  size_t sVar3;\n  char *__s_00;\n  bfd_boolean bVar4;\n  byte *__s_01;\n  char *pcVar5;\n  int local_20;\n  \n  __s = (byte *)stab_pop_type((stab_write_handle *)((int)p + 0x38));\n  switch(kind) {\n  default:\n                    /* WARNING: Subroutine does not return */\n    abort();\n  case DEBUG_GLOBAL:\n    pcVar5 = "G";\n    local_20 = 0x20;\n    break;\n  case DEBUG_STATIC:\n    pcVar5 = "S";\n    local_20 = 0x26;\n    break;\n  case DEBUG_LOCAL_STATIC:\n    pcVar5 = "V";\n    local_20 = 0x26;\n    break;\n  case DEBUG_LOCAL:\n    pcVar5 = "";\n    local_20 = 0x80;\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      local_20 = 0x80;\n      iVar1 = *(int *)((int)p + 0x3c);\n      *(int *)((int)p + 0x3c) = iVar1 + 1;\n      sVar2 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar2 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar1,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case DEBUG_REGISTER:\n    pcVar5 = "r";\n    local_20 = 0x40;\n  }\n  sVar2 = strlen(name);\n  sVar3 = strlen((char *)__s);\n  __s_00 = (char *)xmalloc(sVar2 + 3 + sVar3);\n  sprintf(__s_00,"%s:%s%s",name,pcVar5,__s);\n  free(__s);\n  bVar4 = stab_write_symbol((stab_write_handle *)p,local_20,0,val,__s_00);\n  if (bVar4 != 0) {\n    free(__s_00);\n    bVar4 = 1;\n  }\n  return bVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte *__s;" type_identifier (pointer_declarator "*__s" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "char *__s_00;" primitive_type (pointer_declarator "*__s_00" * identifier) ;) (declaration "bfd_boolean bVar4;" type_identifier identifier ;) (declaration "byte *__s_01;" type_identifier (pointer_declarator "*__s_01" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "__s = (byte *)stab_pop_type((stab_write_handle *)((int)p + 0x38));" (assignment_expression "__s = (byte *)stab_pop_type((stab_write_handle *)((int)p + 0x38))" identifier = (cast_expression "(byte *)stab_pop_type((stab_write_handle *)((int)p + 0x38))" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (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) ))) ))))) ;) (switch_statement "switch(kind) {\n  default:\n                    /* WARNING: Subroutine does not return */\n    abort();\n  case DEBUG_GLOBAL:\n    pcVar5 = "G";\n    local_20 = 0x20;\n    break;\n  case DEBUG_STATIC:\n    pcVar5 = "S";\n    local_20 = 0x26;\n    break;\n  case DEBUG_LOCAL_STATIC:\n    pcVar5 = "V";\n    local_20 = 0x26;\n    break;\n  case DEBUG_LOCAL:\n    pcVar5 = "";\n    local_20 = 0x80;\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      local_20 = 0x80;\n      iVar1 = *(int *)((int)p + 0x3c);\n      *(int *)((int)p + 0x3c) = iVar1 + 1;\n      sVar2 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar2 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar1,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case DEBUG_REGISTER:\n    pcVar5 = "r";\n    local_20 = 0x40;\n  }" switch (parenthesized_expression "(kind)" ( identifier )) (compound_statement "{\n  default:\n                    /* WARNING: Subroutine does not return */\n    abort();\n  case DEBUG_GLOBAL:\n    pcVar5 = "G";\n    local_20 = 0x20;\n    break;\n  case DEBUG_STATIC:\n    pcVar5 = "S";\n    local_20 = 0x26;\n    break;\n  case DEBUG_LOCAL_STATIC:\n    pcVar5 = "V";\n    local_20 = 0x26;\n    break;\n  case DEBUG_LOCAL:\n    pcVar5 = "";\n    local_20 = 0x80;\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      local_20 = 0x80;\n      iVar1 = *(int *)((int)p + 0x3c);\n      *(int *)((int)p + 0x3c) = iVar1 + 1;\n      sVar2 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar2 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar1,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case DEBUG_REGISTER:\n    pcVar5 = "r";\n    local_20 = 0x40;\n  }" { (case_statement "default:\n                    /* WARNING: Subroutine does not return */\n    abort();" default : comment (expression_statement "abort();" (call_expression "abort()" identifier (argument_list "()" ( ))) ;)) (case_statement "case DEBUG_GLOBAL:\n    pcVar5 = "G";\n    local_20 = 0x20;\n    break;" case identifier : (expression_statement "pcVar5 = "G";" (assignment_expression "pcVar5 = "G"" identifier = (string_literal ""G"" " string_content ")) ;) (expression_statement "local_20 = 0x20;" (assignment_expression "local_20 = 0x20" identifier = number_literal) ;) (break_statement "break;" break ;)) (case_statement "case DEBUG_STATIC:\n    pcVar5 = "S";\n    local_20 = 0x26;\n    break;" case identifier : (expression_statement "pcVar5 = "S";" (assignment_expression "pcVar5 = "S"" identifier = (string_literal ""S"" " string_content ")) ;) (expression_statement "local_20 = 0x26;" (assignment_expression "local_20 = 0x26" identifier = number_literal) ;) (break_statement "break;" break ;)) (case_statement "case DEBUG_LOCAL_STATIC:\n    pcVar5 = "V";\n    local_20 = 0x26;\n    break;" case identifier : (expression_statement "pcVar5 = "V";" (assignment_expression "pcVar5 = "V"" identifier = (string_literal ""V"" " string_content ")) ;) (expression_statement "local_20 = 0x26;" (assignment_expression "local_20 = 0x26" identifier = number_literal) ;) (break_statement "break;" break ;)) (case_statement "case DEBUG_LOCAL:\n    pcVar5 = "";\n    local_20 = 0x80;\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      local_20 = 0x80;\n      iVar1 = *(int *)((int)p + 0x3c);\n      *(int *)((int)p + 0x3c) = iVar1 + 1;\n      sVar2 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar2 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar1,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;" case identifier : (expression_statement "pcVar5 = "";" (assignment_expression "pcVar5 = """ identifier = (string_literal """" " ")) ;) (expression_statement "local_20 = 0x80;" (assignment_expression "local_20 = 0x80" identifier = number_literal) ;) (if_statement "if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      local_20 = 0x80;\n      iVar1 = *(int *)((int)p + 0x3c);\n      *(int *)((int)p + 0x3c) = iVar1 + 1;\n      sVar2 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar2 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar1,__s);\n      free(__s);\n      __s = __s_01;\n    }" if (parenthesized_expression "((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0)" ( (binary_expression "(PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0" (parenthesized_expression "(PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4)" ( (binary_expression "PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4" (subscript_expression "PTR__sch_istable_0003efb4[(uint)*__s * 2]" identifier [ (binary_expression "(uint)*__s * 2" (binary_expression "(uint)*__s" (parenthesized_expression "(uint)" ( identifier )) * identifier) * number_literal) ]) & number_literal) )) == number_literal) )) (compound_statement "{\n      local_20 = 0x80;\n      iVar1 = *(int *)((int)p + 0x3c);\n      *(int *)((int)p + 0x3c) = iVar1 + 1;\n      sVar2 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar2 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar1,__s);\n      free(__s);\n      __s = __s_01;\n    }" { (expression_statement "local_20 = 0x80;" (assignment_expression "local_20 = 0x80" identifier = number_literal) ;) (expression_statement "iVar1 = *(int *)((int)p + 0x3c);" (assignment_expression "iVar1 = *(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 "*(int *)((int)p + 0x3c) = iVar1 + 1;" (assignment_expression "*(int *)((int)p + 0x3c) = iVar1 + 1" (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) )))) = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "sVar2 = strlen((char *)__s);" (assignment_expression "sVar2 = strlen((char *)__s)" identifier = (call_expression "strlen((char *)__s)" identifier (argument_list "((char *)__s)" ( (cast_expression "(char *)__s" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "__s_01 = (byte *)xmalloc(sVar2 + 0x14);" (assignment_expression "__s_01 = (byte *)xmalloc(sVar2 + 0x14)" identifier = (cast_expression "(byte *)xmalloc(sVar2 + 0x14)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 0x14)" identifier (argument_list "(sVar2 + 0x14)" ( (binary_expression "sVar2 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "sprintf((char *)__s_01,"%ld=%s",iVar1,__s);" (call_expression "sprintf((char *)__s_01,"%ld=%s",iVar1,__s)" identifier (argument_list "((char *)__s_01,"%ld=%s",iVar1,__s)" ( (cast_expression "(char *)__s_01" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , (string_literal ""%ld=%s"" " string_content ") , identifier , identifier ))) ;) (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "__s = __s_01;" (assignment_expression "__s = __s_01" identifier = identifier) ;) })) (break_statement "break;" break ;)) (case_statement "case DEBUG_REGISTER:\n    pcVar5 = "r";\n    local_20 = 0x40;" case identifier : (expression_statement "pcVar5 = "r";" (assignment_expression "pcVar5 = "r"" identifier = (string_literal ""r"" " string_content ")) ;) (expression_statement "local_20 = 0x40;" (assignment_expression "local_20 = 0x40" identifier = number_literal) ;)) })) (expression_statement "sVar2 = strlen(name);" (assignment_expression "sVar2 = strlen(name)" identifier = (call_expression "strlen(name)" identifier (argument_list "(name)" ( identifier )))) ;) (expression_statement "sVar3 = strlen((char *)__s);" (assignment_expression "sVar3 = strlen((char *)__s)" identifier = (call_expression "strlen((char *)__s)" identifier (argument_list "((char *)__s)" ( (cast_expression "(char *)__s" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "__s_00 = (char *)xmalloc(sVar2 + 3 + sVar3);" (assignment_expression "__s_00 = (char *)xmalloc(sVar2 + 3 + sVar3)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 3 + sVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 3 + sVar3)" identifier (argument_list "(sVar2 + 3 + sVar3)" ( (binary_expression "sVar2 + 3 + sVar3" (binary_expression "sVar2 + 3" identifier + number_literal) + identifier) ))))) ;) (expression_statement "sprintf(__s_00,"%s:%s%s",name,pcVar5,__s);" (call_expression "sprintf(__s_00,"%s:%s%s",name,pcVar5,__s)" identifier (argument_list "(__s_00,"%s:%s%s",name,pcVar5,__s)" ( identifier , (string_literal ""%s:%s%s"" " string_content ") , identifier , identifier , identifier ))) ;) (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "bVar4 = stab_write_symbol((stab_write_handle *)p,local_20,0,val,__s_00);" (assignment_expression "bVar4 = stab_write_symbol((stab_write_handle *)p,local_20,0,val,__s_00)" identifier = (call_expression "stab_write_symbol((stab_write_handle *)p,local_20,0,val,__s_00)" identifier (argument_list "((stab_write_handle *)p,local_20,0,val,__s_00)" ( (cast_expression "(stab_write_handle *)p" ( (type_descriptor "stab_write_handle *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier , number_literal , identifier , identifier )))) ;) (if_statement "if (bVar4 != 0) {\n    free(__s_00);\n    bVar4 = 1;\n  }" if (parenthesized_expression "(bVar4 != 0)" ( (binary_expression "bVar4 != 0" identifier != number_literal) )) (compound_statement "{\n    free(__s_00);\n    bVar4 = 1;\n  }" { (expression_statement "free(__s_00);" (call_expression "free(__s_00)" identifier (argument_list "(__s_00)" ( identifier ))) ;) (expression_statement "bVar4 = 1;" (assignment_expression "bVar4 = 1" identifier = number_literal) ;) })) (return_statement "return bVar4;" return identifier ;) })))
(translation_unit "int FUN_00029050(int param_1,char *param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  byte *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  int iVar3;\n  byte *__s_01;\n  char *pcVar4;\n  \n  __s = (byte *)FUN_00028700();\n  switch(param_3) {\n  default:\n                    \n    abort();\n  case 1:\n    pcVar4 = "G";\n    break;\n  case 2:\n    pcVar4 = "S";\n    break;\n  case 3:\n    pcVar4 = "V";\n    break;\n  case 4:\n    pcVar4 = "";\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case 5:\n    pcVar4 = "r";\n  }\n  sVar1 = strlen(param_2);\n  sVar2 = strlen((char *)__s);\n  __s_00 = (char *)xmalloc(sVar1 + 3 + sVar2);\n  sprintf(__s_00,"%s:%s%s",param_2,pcVar4,__s);\n  free(__s);\n  iVar3 = FUN_000280c0(param_4,__s_00);\n  if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }\n  return iVar3;\n}\n\n" (function_definition "int FUN_00029050(int param_1,char *param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  byte *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  int iVar3;\n  byte *__s_01;\n  char *pcVar4;\n  \n  __s = (byte *)FUN_00028700();\n  switch(param_3) {\n  default:\n                    \n    abort();\n  case 1:\n    pcVar4 = "G";\n    break;\n  case 2:\n    pcVar4 = "S";\n    break;\n  case 3:\n    pcVar4 = "V";\n    break;\n  case 4:\n    pcVar4 = "";\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case 5:\n    pcVar4 = "r";\n  }\n  sVar1 = strlen(param_2);\n  sVar2 = strlen((char *)__s);\n  __s_00 = (char *)xmalloc(sVar1 + 3 + sVar2);\n  sprintf(__s_00,"%s:%s%s",param_2,pcVar4,__s);\n  free(__s);\n  iVar3 = FUN_000280c0(param_4,__s_00);\n  if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }\n  return iVar3;\n}" primitive_type (function_declarator "FUN_00029050(int param_1,char *param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(int param_1,char *param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  byte *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  int iVar3;\n  byte *__s_01;\n  char *pcVar4;\n  \n  __s = (byte *)FUN_00028700();\n  switch(param_3) {\n  default:\n                    \n    abort();\n  case 1:\n    pcVar4 = "G";\n    break;\n  case 2:\n    pcVar4 = "S";\n    break;\n  case 3:\n    pcVar4 = "V";\n    break;\n  case 4:\n    pcVar4 = "";\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case 5:\n    pcVar4 = "r";\n  }\n  sVar1 = strlen(param_2);\n  sVar2 = strlen((char *)__s);\n  __s_00 = (char *)xmalloc(sVar1 + 3 + sVar2);\n  sprintf(__s_00,"%s:%s%s",param_2,pcVar4,__s);\n  free(__s);\n  iVar3 = FUN_000280c0(param_4,__s_00);\n  if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }\n  return iVar3;\n}" { (declaration "byte *__s;" type_identifier (pointer_declarator "*__s" * identifier) ;) (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__s_00;" primitive_type (pointer_declarator "*__s_00" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "byte *__s_01;" type_identifier (pointer_declarator "*__s_01" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (expression_statement "__s = (byte *)FUN_00028700();" (assignment_expression "__s = (byte *)FUN_00028700()" identifier = (cast_expression "(byte *)FUN_00028700()" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00028700()" identifier (argument_list "()" ( ))))) ;) (switch_statement "switch(param_3) {\n  default:\n                    \n    abort();\n  case 1:\n    pcVar4 = "G";\n    break;\n  case 2:\n    pcVar4 = "S";\n    break;\n  case 3:\n    pcVar4 = "V";\n    break;\n  case 4:\n    pcVar4 = "";\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case 5:\n    pcVar4 = "r";\n  }" switch (parenthesized_expression "(param_3)" ( identifier )) (compound_statement "{\n  default:\n                    \n    abort();\n  case 1:\n    pcVar4 = "G";\n    break;\n  case 2:\n    pcVar4 = "S";\n    break;\n  case 3:\n    pcVar4 = "V";\n    break;\n  case 4:\n    pcVar4 = "";\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case 5:\n    pcVar4 = "r";\n  }" { (case_statement "default:\n                    \n    abort();" default : (expression_statement "abort();" (call_expression "abort()" identifier (argument_list "()" ( ))) ;)) (case_statement "case 1:\n    pcVar4 = "G";\n    break;" case number_literal : (expression_statement "pcVar4 = "G";" (assignment_expression "pcVar4 = "G"" identifier = (string_literal ""G"" " string_content ")) ;) (break_statement "break;" break ;)) (case_statement "case 2:\n    pcVar4 = "S";\n    break;" case number_literal : (expression_statement "pcVar4 = "S";" (assignment_expression "pcVar4 = "S"" identifier = (string_literal ""S"" " string_content ")) ;) (break_statement "break;" break ;)) (case_statement "case 3:\n    pcVar4 = "V";\n    break;" case number_literal : (expression_statement "pcVar4 = "V";" (assignment_expression "pcVar4 = "V"" identifier = (string_literal ""V"" " string_content ")) ;) (break_statement "break;" break ;)) (case_statement "case 4:\n    pcVar4 = "";\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;" case number_literal : (expression_statement "pcVar4 = "";" (assignment_expression "pcVar4 = """ identifier = (string_literal """" " ")) ;) (if_statement "if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }" if (parenthesized_expression "((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0)" ( (binary_expression "(PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0" (parenthesized_expression "(PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4)" ( (binary_expression "PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4" (subscript_expression "PTR__sch_istable_0003efb4[(uint)*__s * 2]" identifier [ (binary_expression "(uint)*__s * 2" (binary_expression "(uint)*__s" (parenthesized_expression "(uint)" ( identifier )) * identifier) * number_literal) ]) & number_literal) )) == number_literal) )) (compound_statement "{\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }" { (expression_statement "iVar3 = *(int *)(param_1 + 0x3c);" (assignment_expression "iVar3 = *(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) = iVar3 + 1;" (assignment_expression "*(int *)(param_1 + 0x3c) = iVar3 + 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 "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "sVar1 = strlen((char *)__s);" (assignment_expression "sVar1 = strlen((char *)__s)" identifier = (call_expression "strlen((char *)__s)" identifier (argument_list "((char *)__s)" ( (cast_expression "(char *)__s" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "__s_01 = (byte *)xmalloc(sVar1 + 0x14);" (assignment_expression "__s_01 = (byte *)xmalloc(sVar1 + 0x14)" identifier = (cast_expression "(byte *)xmalloc(sVar1 + 0x14)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 + 0x14)" identifier (argument_list "(sVar1 + 0x14)" ( (binary_expression "sVar1 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "sprintf((char *)__s_01,"%ld=%s",iVar3,__s);" (call_expression "sprintf((char *)__s_01,"%ld=%s",iVar3,__s)" identifier (argument_list "((char *)__s_01,"%ld=%s",iVar3,__s)" ( (cast_expression "(char *)__s_01" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , (string_literal ""%ld=%s"" " string_content ") , identifier , identifier ))) ;) (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "__s = __s_01;" (assignment_expression "__s = __s_01" identifier = identifier) ;) })) (break_statement "break;" break ;)) (case_statement "case 5:\n    pcVar4 = "r";" case number_literal : (expression_statement "pcVar4 = "r";" (assignment_expression "pcVar4 = "r"" identifier = (string_literal ""r"" " string_content ")) ;)) })) (expression_statement "sVar1 = strlen(param_2);" (assignment_expression "sVar1 = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "sVar2 = strlen((char *)__s);" (assignment_expression "sVar2 = strlen((char *)__s)" identifier = (call_expression "strlen((char *)__s)" identifier (argument_list "((char *)__s)" ( (cast_expression "(char *)__s" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "__s_00 = (char *)xmalloc(sVar1 + 3 + sVar2);" (assignment_expression "__s_00 = (char *)xmalloc(sVar1 + 3 + sVar2)" identifier = (cast_expression "(char *)xmalloc(sVar1 + 3 + sVar2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 + 3 + sVar2)" identifier (argument_list "(sVar1 + 3 + sVar2)" ( (binary_expression "sVar1 + 3 + sVar2" (binary_expression "sVar1 + 3" identifier + number_literal) + identifier) ))))) ;) (expression_statement "sprintf(__s_00,"%s:%s%s",param_2,pcVar4,__s);" (call_expression "sprintf(__s_00,"%s:%s%s",param_2,pcVar4,__s)" identifier (argument_list "(__s_00,"%s:%s%s",param_2,pcVar4,__s)" ( identifier , (string_literal ""%s:%s%s"" " string_content ") , identifier , identifier , identifier ))) ;) (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "iVar3 = FUN_000280c0(param_4,__s_00);" (assignment_expression "iVar3 = FUN_000280c0(param_4,__s_00)" identifier = (call_expression "FUN_000280c0(param_4,__s_00)" identifier (argument_list "(param_4,__s_00)" ( identifier , identifier )))) ;) (if_statement "if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    free(__s_00);\n    iVar3 = 1;\n  }" { (expression_statement "free(__s_00);" (call_expression "free(__s_00)" identifier (argument_list "(__s_00)" ( identifier ))) ;) (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) })) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (switch_statement switch (parenthesized_expression ( IDENT )) (compound_statement { (case_statement default : (expression_statement (call_expression IDENT (argument_list ( ))) ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) (break_statement break ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) (break_statement break ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) (break_statement break ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (string_literal " ")) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * IDENT) * LIT) ]) & LIT) )) == LIT) )) (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 (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) )))) ;) (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 ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) , (string_literal " string_content ") , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (break_statement break ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;)) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression (binary_expression IDENT + LIT) + IDENT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , IDENT , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_00029050(int param_1,char *param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  byte *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  int iVar3;\n  byte *__s_01;\n  char *pcVar4;\n  \n  __s = (byte *)FUN_00028700();\n  switch(param_3) {\n  default:\n                    \n    abort();\n  case 1:\n    pcVar4 = "G";\n    break;\n  case 2:\n    pcVar4 = "S";\n    break;\n  case 3:\n    pcVar4 = "V";\n    break;\n  case 4:\n    pcVar4 = "";\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case 5:\n    pcVar4 = "r";\n  }\n  sVar1 = strlen(param_2);\n  sVar2 = strlen((char *)__s);\n  __s_00 = (char *)xmalloc(sVar1 + 3 + sVar2);\n  sprintf(__s_00,"%s:%s%s",param_2,pcVar4,__s);\n  free(__s);\n  iVar3 = FUN_000280c0(param_4,__s_00);\n  if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }\n  return iVar3;\n}" (primitive_type "int") (function_declarator "FUN_00029050(int param_1,char *param_2,undefined4 param_3,undefined4 param_4)" (identifier "FUN_00029050") (parameter_list "(int param_1,char *param_2,undefined4 param_3,undefined4 param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) () ")"))) (compound_statement "{\n  byte *__s;\n  size_t sVar1;\n  size_t sVar2;\n  char *__s_00;\n  int iVar3;\n  byte *__s_01;\n  char *pcVar4;\n  \n  __s = (byte *)FUN_00028700();\n  switch(param_3) {\n  default:\n                    \n    abort();\n  case 1:\n    pcVar4 = "G";\n    break;\n  case 2:\n    pcVar4 = "S";\n    break;\n  case 3:\n    pcVar4 = "V";\n    break;\n  case 4:\n    pcVar4 = "";\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case 5:\n    pcVar4 = "r";\n  }\n  sVar1 = strlen(param_2);\n  sVar2 = strlen((char *)__s);\n  __s_00 = (char *)xmalloc(sVar1 + 3 + sVar2);\n  sprintf(__s_00,"%s:%s%s",param_2,pcVar4,__s);\n  free(__s);\n  iVar3 = FUN_000280c0(param_4,__s_00);\n  if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }\n  return iVar3;\n}" ({ "{") (declaration "byte *__s;" (type_identifier "byte") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "size_t sVar1;" (primitive_type "size_t") (identifier "sVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "char *__s_00;" (primitive_type "char") (pointer_declarator "*__s_00" (* "*") (identifier "__s_00")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "byte *__s_01;" (type_identifier "byte") (pointer_declarator "*__s_01" (* "*") (identifier "__s_01")) (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (expression_statement "__s = (byte *)FUN_00028700();" (assignment_expression "__s = (byte *)FUN_00028700()" (identifier "__s") (= "=") (cast_expression "(byte *)FUN_00028700()" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00028700()" (identifier "FUN_00028700") (argument_list "()" (( "(") () ")"))))) (; ";")) (switch_statement "switch(param_3) {\n  default:\n                    \n    abort();\n  case 1:\n    pcVar4 = "G";\n    break;\n  case 2:\n    pcVar4 = "S";\n    break;\n  case 3:\n    pcVar4 = "V";\n    break;\n  case 4:\n    pcVar4 = "";\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case 5:\n    pcVar4 = "r";\n  }" (switch "switch") (parenthesized_expression "(param_3)" (( "(") (identifier "param_3") () ")")) (compound_statement "{\n  default:\n                    \n    abort();\n  case 1:\n    pcVar4 = "G";\n    break;\n  case 2:\n    pcVar4 = "S";\n    break;\n  case 3:\n    pcVar4 = "V";\n    break;\n  case 4:\n    pcVar4 = "";\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;\n  case 5:\n    pcVar4 = "r";\n  }" ({ "{") (case_statement "default:\n                    \n    abort();" (default "default") (: ":") (expression_statement "abort();" (call_expression "abort()" (identifier "abort") (argument_list "()" (( "(") () ")"))) (; ";"))) (case_statement "case 1:\n    pcVar4 = "G";\n    break;" (case "case") (number_literal "1") (: ":") (expression_statement "pcVar4 = "G";" (assignment_expression "pcVar4 = "G"" (identifier "pcVar4") (= "=") (string_literal ""G"" (" """) (string_content "G") (" """))) (; ";")) (break_statement "break;" (break "break") (; ";"))) (case_statement "case 2:\n    pcVar4 = "S";\n    break;" (case "case") (number_literal "2") (: ":") (expression_statement "pcVar4 = "S";" (assignment_expression "pcVar4 = "S"" (identifier "pcVar4") (= "=") (string_literal ""S"" (" """) (string_content "S") (" """))) (; ";")) (break_statement "break;" (break "break") (; ";"))) (case_statement "case 3:\n    pcVar4 = "V";\n    break;" (case "case") (number_literal "3") (: ":") (expression_statement "pcVar4 = "V";" (assignment_expression "pcVar4 = "V"" (identifier "pcVar4") (= "=") (string_literal ""V"" (" """) (string_content "V") (" """))) (; ";")) (break_statement "break;" (break "break") (; ";"))) (case_statement "case 4:\n    pcVar4 = "";\n    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }\n    break;" (case "case") (number_literal "4") (: ":") (expression_statement "pcVar4 = "";" (assignment_expression "pcVar4 = """ (identifier "pcVar4") (= "=") (string_literal """" (" """) (" """))) (; ";")) (if_statement "if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }" (if "if") (parenthesized_expression "((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0)" (( "(") (binary_expression "(PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0" (parenthesized_expression "(PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4)" (( "(") (binary_expression "PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4" (subscript_expression "PTR__sch_istable_0003efb4[(uint)*__s * 2]" (identifier "PTR__sch_istable_0003efb4") ([ "[") (binary_expression "(uint)*__s * 2" (binary_expression "(uint)*__s" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "__s")) (* "*") (number_literal "2")) (] "]")) (& "&") (number_literal "4")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar3 = *(int *)(param_1 + 0x3c);\n      *(int *)(param_1 + 0x3c) = iVar3 + 1;\n      sVar1 = strlen((char *)__s);\n      __s_01 = (byte *)xmalloc(sVar1 + 0x14);\n      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);\n      free(__s);\n      __s = __s_01;\n    }" ({ "{") (expression_statement "iVar3 = *(int *)(param_1 + 0x3c);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x3c)" (identifier "iVar3") (= "=") (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) = iVar3 + 1;" (assignment_expression "*(int *)(param_1 + 0x3c) = iVar3 + 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 "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "sVar1 = strlen((char *)__s);" (assignment_expression "sVar1 = strlen((char *)__s)" (identifier "sVar1") (= "=") (call_expression "strlen((char *)__s)" (identifier "strlen") (argument_list "((char *)__s)" (( "(") (cast_expression "(char *)__s" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "__s")) () ")")))) (; ";")) (expression_statement "__s_01 = (byte *)xmalloc(sVar1 + 0x14);" (assignment_expression "__s_01 = (byte *)xmalloc(sVar1 + 0x14)" (identifier "__s_01") (= "=") (cast_expression "(byte *)xmalloc(sVar1 + 0x14)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar1 + 0x14)" (identifier "xmalloc") (argument_list "(sVar1 + 0x14)" (( "(") (binary_expression "sVar1 + 0x14" (identifier "sVar1") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "sprintf((char *)__s_01,"%ld=%s",iVar3,__s);" (call_expression "sprintf((char *)__s_01,"%ld=%s",iVar3,__s)" (identifier "sprintf") (argument_list "((char *)__s_01,"%ld=%s",iVar3,__s)" (( "(") (cast_expression "(char *)__s_01" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "__s_01")) (, ",") (string_literal ""%ld=%s"" (" """) (string_content "%ld=%s") (" """)) (, ",") (identifier "iVar3") (, ",") (identifier "__s") () ")"))) (; ";")) (expression_statement "free(__s);" (call_expression "free(__s)" (identifier "free") (argument_list "(__s)" (( "(") (identifier "__s") () ")"))) (; ";")) (expression_statement "__s = __s_01;" (assignment_expression "__s = __s_01" (identifier "__s") (= "=") (identifier "__s_01")) (; ";")) (} "}"))) (break_statement "break;" (break "break") (; ";"))) (case_statement "case 5:\n    pcVar4 = "r";" (case "case") (number_literal "5") (: ":") (expression_statement "pcVar4 = "r";" (assignment_expression "pcVar4 = "r"" (identifier "pcVar4") (= "=") (string_literal ""r"" (" """) (string_content "r") (" """))) (; ";"))) (} "}"))) (expression_statement "sVar1 = strlen(param_2);" (assignment_expression "sVar1 = strlen(param_2)" (identifier "sVar1") (= "=") (call_expression "strlen(param_2)" (identifier "strlen") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (expression_statement "sVar2 = strlen((char *)__s);" (assignment_expression "sVar2 = strlen((char *)__s)" (identifier "sVar2") (= "=") (call_expression "strlen((char *)__s)" (identifier "strlen") (argument_list "((char *)__s)" (( "(") (cast_expression "(char *)__s" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "__s")) () ")")))) (; ";")) (expression_statement "__s_00 = (char *)xmalloc(sVar1 + 3 + sVar2);" (assignment_expression "__s_00 = (char *)xmalloc(sVar1 + 3 + sVar2)" (identifier "__s_00") (= "=") (cast_expression "(char *)xmalloc(sVar1 + 3 + sVar2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar1 + 3 + sVar2)" (identifier "xmalloc") (argument_list "(sVar1 + 3 + sVar2)" (( "(") (binary_expression "sVar1 + 3 + sVar2" (binary_expression "sVar1 + 3" (identifier "sVar1") (+ "+") (number_literal "3")) (+ "+") (identifier "sVar2")) () ")"))))) (; ";")) (expression_statement "sprintf(__s_00,"%s:%s%s",param_2,pcVar4,__s);" (call_expression "sprintf(__s_00,"%s:%s%s",param_2,pcVar4,__s)" (identifier "sprintf") (argument_list "(__s_00,"%s:%s%s",param_2,pcVar4,__s)" (( "(") (identifier "__s_00") (, ",") (string_literal ""%s:%s%s"" (" """) (string_content "%s:%s%s") (" """)) (, ",") (identifier "param_2") (, ",") (identifier "pcVar4") (, ",") (identifier "__s") () ")"))) (; ";")) (expression_statement "free(__s);" (call_expression "free(__s)" (identifier "free") (argument_list "(__s)" (( "(") (identifier "__s") () ")"))) (; ";")) (expression_statement "iVar3 = FUN_000280c0(param_4,__s_00);" (assignment_expression "iVar3 = FUN_000280c0(param_4,__s_00)" (identifier "iVar3") (= "=") (call_expression "FUN_000280c0(param_4,__s_00)" (identifier "FUN_000280c0") (argument_list "(param_4,__s_00)" (( "(") (identifier "param_4") (, ",") (identifier "__s_00") () ")")))) (; ";")) (if_statement "if (iVar3 != 0) {\n    free(__s_00);\n    iVar3 = 1;\n  }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    free(__s_00);\n    iVar3 = 1;\n  }" ({ "{") (expression_statement "free(__s_00);" (call_expression "free(__s_00)" (identifier "free") (argument_list "(__s_00)" (( "(") (identifier "__s_00") () ")"))) (; ";")) (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" (identifier "iVar3") (= "=") (number_literal "1")) (; ";")) (} "}"))) (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}")))

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

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

{
  int var_4;
  type_4 *var_3;
  size_t var_7;
  size_t var_10;
  char *__s_00;
  type_1 var_12;
  type_4 *__s_01;
  char *pcVar5;
  int local_20;
  
  var_3 = (type_4 *)var_1((type_5 *)((int)p + 0x38));
  switch(kind) {
  default:
                    /* WARNING: Subroutine does not return */
    var_2();
  case DEBUG_GLOBAL:
    pcVar5 = "G";
    local_20 = 0x20;
    break;
  case DEBUG_STATIC:
    pcVar5 = "S";
    local_20 = 0x26;
    break;
  case DEBUG_LOCAL_STATIC:
    pcVar5 = "V";
    local_20 = 0x26;
    break;
  case DEBUG_LOCAL:
    pcVar5 = "";
    local_20 = 0x80;
    if ((PTR__sch_istable_0003efb4[(uint)*var_3 * 2] & 4) == 0) {
      local_20 = 0x80;
      var_4 = *(int *)((int)p + 0x3c);
      *(int *)((int)p + 0x3c) = var_4 + 1;
      var_7 = var_5((char *)var_3);
      __s_01 = (type_4 *)var_6(var_7 + 0x14);
      var_8((char *)__s_01,"%ld=%s",var_4,var_3);
      var_9(var_3);
      var_3 = __s_01;
    }
    break;
  case DEBUG_REGISTER:
    pcVar5 = "r";
    local_20 = 0x40;
  }
  var_7 = var_5(name);
  var_10 = var_5((char *)var_3);
  __s_00 = (char *)var_6(var_7 + 3 + var_10);
  var_8(__s_00,"%s:%s%s",name,pcVar5,var_3);
  var_9(var_3);
  var_12 = var_11((type_5 *)p,local_20,0,val,__s_00);
  if (var_12 != 0) {
    var_9(__s_00);
    var_12 = 1;
  }
  return var_12;
}


(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: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (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))))) (switch_statement condition: (parenthesized_expression (identifier)) body: (compound_statement (case_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list)))) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (string_literal (string_content)))) (break_statement)) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (string_literal (string_content)))) (break_statement)) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (string_literal (string_content)))) (break_statement)) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (string_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (binary_expression left: (parenthesized_expression (identifier)) right: (identifier)) right: (number_literal))) right: (number_literal))) right: (number_literal))) consequence: (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 (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier)))))) (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 (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier)) (string_literal (string_content)) (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (break_statement)) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (string_literal (string_content))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)) (identifier) (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (return_statement (identifier)))))

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

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

{
  byte *__s;
  size_t sVar1;
  size_t sVar2;
  char *__s_00;
  int iVar3;
  byte *__s_01;
  char *pcVar4;
  
  __s = (byte *)FUN_00028700();
  switch(param_3) {
  default:
                    /* WARNING: Subroutine does not return */
    abort();
  case 1:
    pcVar4 = "G";
    break;
  case 2:
    pcVar4 = "S";
    break;
  case 3:
    pcVar4 = "V";
    break;
  case 4:
    pcVar4 = "";
    if ((PTR__sch_istable_0003efb4[(uint)*__s * 2] & 4) == 0) {
      iVar3 = *(int *)(param_1 + 0x3c);
      *(int *)(param_1 + 0x3c) = iVar3 + 1;
      sVar1 = strlen((char *)__s);
      __s_01 = (byte *)xmalloc(sVar1 + 0x14);
      sprintf((char *)__s_01,"%ld=%s",iVar3,__s);
      free(__s);
      __s = __s_01;
    }
    break;
  case 5:
    pcVar4 = "r";
  }
  sVar1 = strlen(param_2);
  sVar2 = strlen((char *)__s);
  __s_00 = (char *)xmalloc(sVar1 + 3 + sVar2);
  sprintf(__s_00,"%s:%s%s",param_2,pcVar4,__s);
  free(__s);
  iVar3 = FUN_000280c0(param_4,__s_00);
  if (iVar3 != 0) {
    free(__s_00);
    iVar3 = 1;
  }
  return iVar3;
}

