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

void __regparm2 save_stab(int type,int desc,bfd_vma value,char *string)

{
  int iVar1;
  char *pcVar2;
  
  iVar1 = saved_stabs_index;
  if (saved_stabs[saved_stabs_index].string != (char *)0x0) {
    free(saved_stabs[saved_stabs_index].string);
  }
  saved_stabs[iVar1].type = type;
  saved_stabs[iVar1].desc = desc;
  saved_stabs[iVar1].value = value;
  pcVar2 = (char *)xstrdup(string);
  saved_stabs[iVar1].string = pcVar2;
  saved_stabs_index = (saved_stabs_index + 1) % 0x10;
  return;
}



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

void __regparm2
FUN_0001c790(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,
            undefined4 param_5)

{
  int iVar1;
  undefined4 uVar2;
  int iVar3;
  
  iVar1 = DAT_00040c00;
  if ((void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0) {
    free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);
  }
  iVar3 = iVar1 * 0x14;
  *(undefined4 *)(&DAT_00040c20 + iVar3) = param_1;
  *(undefined4 *)(&DAT_00040c24 + iVar3) = param_2;
  *(undefined4 *)(&DAT_00040c28 + iVar3) = param_3;
  *(undefined4 *)(&DAT_00040c2c + iVar3) = param_4;
  uVar2 = xstrdup(param_5);
  (&DAT_00040c30)[iVar1 * 5] = uVar2;
  DAT_00040c00 = (DAT_00040c00 + 1) % 0x10;
  return;
}


PUSH EBP
MOV EBP,EDX
PUSH EDI
MOV EDI,EAX
PUSH ESI
PUSH EBX
CALL 0x000166c0
ADD EBX,0x23863
SUB ESP,0x1c
MOV EAX,dword ptr [ESP + 0x30]
MOV EDX,dword ptr [ESP + 0x34]
MOV dword ptr [ESP],EAX
MOV EAX,dword ptr [EBX + 0xc00]
MOV dword ptr [ESP + 0x4],EDX
LEA ESI,[EBX + 0xc20]
LEA EDX,[EAX + EAX*0x4]
MOV EDX,dword ptr [ESI + EDX*0x4 + 0x10]
TEST EDX,EDX
JZ 0x0001c7e0
MOV dword ptr [ESP + 0xc],EAX
SUB ESP,0xc
PUSH EDX
CALL 0x00013948
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
LEA ECX,[EAX + EAX*0x4]
SUB ESP,0xc
SHL ECX,0x2
LEA EAX,[EBX + ECX*0x1 + 0xc20]
ADD ESI,ECX
MOV dword ptr [ESI],EDI
MOV EDI,dword ptr [ESP + 0xc]
MOV dword ptr [EAX + 0x4],EBP
MOV EBP,dword ptr [ESP + 0x10]
MOV dword ptr [EAX + 0x8],EDI
MOV dword ptr [EAX + 0xc],EBP
PUSH dword ptr [ESP + 0x44]
CALL 0x00013310
MOV dword ptr [ESI + 0x10],EAX
MOV EAX,dword ptr [EBX + 0xc00]
ADD EAX,0x1
CDQ
SHR EDX,0x1c
ADD EAX,EDX
AND EAX,0xf
SUB EAX,EDX
MOV dword ptr [EBX + 0xc00],EAX
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm2\nFUN_0001c790(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 param_5)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  \n  iVar1 = DAT_00040c00;\n  if ((void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0) {\n    free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);\n  }\n  iVar3 = iVar1 * 0x14;\n  *(undefined4 *)(&DAT_00040c20 + iVar3) = param_1;\n  *(undefined4 *)(&DAT_00040c24 + iVar3) = param_2;\n  *(undefined4 *)(&DAT_00040c28 + iVar3) = param_3;\n  *(undefined4 *)(&DAT_00040c2c + iVar3) = param_4;\n  uVar2 = xstrdup(param_5);\n  (&DAT_00040c30)[iVar1 * 5] = uVar2;\n  DAT_00040c00 = (DAT_00040c00 + 1) % 0x10;\n  return;\n}\n\n" comment (function_definition "void __regparm2\nFUN_0001c790(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 param_5)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  \n  iVar1 = DAT_00040c00;\n  if ((void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0) {\n    free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);\n  }\n  iVar3 = iVar1 * 0x14;\n  *(undefined4 *)(&DAT_00040c20 + iVar3) = param_1;\n  *(undefined4 *)(&DAT_00040c24 + iVar3) = param_2;\n  *(undefined4 *)(&DAT_00040c28 + iVar3) = param_3;\n  *(undefined4 *)(&DAT_00040c2c + iVar3) = param_4;\n  uVar2 = xstrdup(param_5);\n  (&DAT_00040c30)[iVar1 * 5] = uVar2;\n  DAT_00040c00 = (DAT_00040c00 + 1) % 0x10;\n  return;\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "FUN_0001c790(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 param_5)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  \n  iVar1 = DAT_00040c00;\n  if ((void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0) {\n    free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);\n  }\n  iVar3 = iVar1 * 0x14;\n  *(undefined4 *)(&DAT_00040c20 + iVar3) = param_1;\n  *(undefined4 *)(&DAT_00040c24 + iVar3) = param_2;\n  *(undefined4 *)(&DAT_00040c28 + iVar3) = param_3;\n  *(undefined4 *)(&DAT_00040c2c + iVar3) = param_4;\n  uVar2 = xstrdup(param_5);\n  (&DAT_00040c30)[iVar1 * 5] = uVar2;\n  DAT_00040c00 = (DAT_00040c00 + 1) % 0x10;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar1 = DAT_00040c00;" (assignment_expression "iVar1 = DAT_00040c00" identifier = identifier) ;) (if_statement "if ((void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0) {\n    free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);\n  }" if (parenthesized_expression "((void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0)" ( (binary_expression "(void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0" (cast_expression "(void *)(&DAT_00040c30)[DAT_00040c00 * 5]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "(&DAT_00040c30)[DAT_00040c00 * 5]" (parenthesized_expression "(&DAT_00040c30)" ( (pointer_expression "&DAT_00040c30" & identifier) )) [ (binary_expression "DAT_00040c00 * 5" identifier * number_literal) ])) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);\n  }" { (expression_statement "free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);" (call_expression "free((void *)(&DAT_00040c30)[DAT_00040c00 * 5])" identifier (argument_list "((void *)(&DAT_00040c30)[DAT_00040c00 * 5])" ( (cast_expression "(void *)(&DAT_00040c30)[DAT_00040c00 * 5]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "(&DAT_00040c30)[DAT_00040c00 * 5]" (parenthesized_expression "(&DAT_00040c30)" ( (pointer_expression "&DAT_00040c30" & identifier) )) [ (binary_expression "DAT_00040c00 * 5" identifier * number_literal) ])) ))) ;) })) (expression_statement "iVar3 = iVar1 * 0x14;" (assignment_expression "iVar3 = iVar1 * 0x14" identifier = (binary_expression "iVar1 * 0x14" identifier * number_literal)) ;) (expression_statement "*(undefined4 *)(&DAT_00040c20 + iVar3) = param_1;" (assignment_expression "*(undefined4 *)(&DAT_00040c20 + iVar3) = param_1" (pointer_expression "*(undefined4 *)(&DAT_00040c20 + iVar3)" * (cast_expression "(undefined4 *)(&DAT_00040c20 + iVar3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&DAT_00040c20 + iVar3)" ( (binary_expression "&DAT_00040c20 + iVar3" (pointer_expression "&DAT_00040c20" & identifier) + identifier) )))) = identifier) ;) (expression_statement "*(undefined4 *)(&DAT_00040c24 + iVar3) = param_2;" (assignment_expression "*(undefined4 *)(&DAT_00040c24 + iVar3) = param_2" (pointer_expression "*(undefined4 *)(&DAT_00040c24 + iVar3)" * (cast_expression "(undefined4 *)(&DAT_00040c24 + iVar3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&DAT_00040c24 + iVar3)" ( (binary_expression "&DAT_00040c24 + iVar3" (pointer_expression "&DAT_00040c24" & identifier) + identifier) )))) = identifier) ;) (expression_statement "*(undefined4 *)(&DAT_00040c28 + iVar3) = param_3;" (assignment_expression "*(undefined4 *)(&DAT_00040c28 + iVar3) = param_3" (pointer_expression "*(undefined4 *)(&DAT_00040c28 + iVar3)" * (cast_expression "(undefined4 *)(&DAT_00040c28 + iVar3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&DAT_00040c28 + iVar3)" ( (binary_expression "&DAT_00040c28 + iVar3" (pointer_expression "&DAT_00040c28" & identifier) + identifier) )))) = identifier) ;) (expression_statement "*(undefined4 *)(&DAT_00040c2c + iVar3) = param_4;" (assignment_expression "*(undefined4 *)(&DAT_00040c2c + iVar3) = param_4" (pointer_expression "*(undefined4 *)(&DAT_00040c2c + iVar3)" * (cast_expression "(undefined4 *)(&DAT_00040c2c + iVar3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&DAT_00040c2c + iVar3)" ( (binary_expression "&DAT_00040c2c + iVar3" (pointer_expression "&DAT_00040c2c" & identifier) + identifier) )))) = identifier) ;) (expression_statement "uVar2 = xstrdup(param_5);" (assignment_expression "uVar2 = xstrdup(param_5)" identifier = (call_expression "xstrdup(param_5)" identifier (argument_list "(param_5)" ( identifier )))) ;) (expression_statement "(&DAT_00040c30)[iVar1 * 5] = uVar2;" (assignment_expression "(&DAT_00040c30)[iVar1 * 5] = uVar2" (subscript_expression "(&DAT_00040c30)[iVar1 * 5]" (parenthesized_expression "(&DAT_00040c30)" ( (pointer_expression "&DAT_00040c30" & identifier) )) [ (binary_expression "iVar1 * 5" identifier * number_literal) ]) = identifier) ;) (expression_statement "DAT_00040c00 = (DAT_00040c00 + 1) % 0x10;" (assignment_expression "DAT_00040c00 = (DAT_00040c00 + 1) % 0x10" identifier = (binary_expression "(DAT_00040c00 + 1) % 0x10" (parenthesized_expression "(DAT_00040c00 + 1)" ( (binary_expression "DAT_00040c00 + 1" identifier + number_literal) )) % number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm2 save_stab(int type,int desc,bfd_vma value,char *string)\n\n{\n  int iVar1;\n  char *pcVar2;\n  \n  iVar1 = saved_stabs_index;\n  if (saved_stabs[saved_stabs_index].string != (char *)0x0) {\n    free(saved_stabs[saved_stabs_index].string);\n  }\n  saved_stabs[iVar1].type = type;\n  saved_stabs[iVar1].desc = desc;\n  saved_stabs[iVar1].value = value;\n  pcVar2 = (char *)xstrdup(string);\n  saved_stabs[iVar1].string = pcVar2;\n  saved_stabs_index = (saved_stabs_index + 1) % 0x10;\n  return;\n}\n\n" comment (function_definition "void __regparm2 save_stab(int type,int desc,bfd_vma value,char *string)\n\n{\n  int iVar1;\n  char *pcVar2;\n  \n  iVar1 = saved_stabs_index;\n  if (saved_stabs[saved_stabs_index].string != (char *)0x0) {\n    free(saved_stabs[saved_stabs_index].string);\n  }\n  saved_stabs[iVar1].type = type;\n  saved_stabs[iVar1].desc = desc;\n  saved_stabs[iVar1].value = value;\n  pcVar2 = (char *)xstrdup(string);\n  saved_stabs[iVar1].string = pcVar2;\n  saved_stabs_index = (saved_stabs_index + 1) % 0x10;\n  return;\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "save_stab(int type,int desc,bfd_vma value,char *string)" identifier (parameter_list "(int type,int desc,bfd_vma value,char *string)" ( (parameter_declaration "int type" primitive_type identifier) , (parameter_declaration "int desc" primitive_type identifier) , (parameter_declaration "bfd_vma value" type_identifier identifier) , (parameter_declaration "char *string" primitive_type (pointer_declarator "*string" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  char *pcVar2;\n  \n  iVar1 = saved_stabs_index;\n  if (saved_stabs[saved_stabs_index].string != (char *)0x0) {\n    free(saved_stabs[saved_stabs_index].string);\n  }\n  saved_stabs[iVar1].type = type;\n  saved_stabs[iVar1].desc = desc;\n  saved_stabs[iVar1].value = value;\n  pcVar2 = (char *)xstrdup(string);\n  saved_stabs[iVar1].string = pcVar2;\n  saved_stabs_index = (saved_stabs_index + 1) % 0x10;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (expression_statement "iVar1 = saved_stabs_index;" (assignment_expression "iVar1 = saved_stabs_index" identifier = identifier) ;) (if_statement "if (saved_stabs[saved_stabs_index].string != (char *)0x0) {\n    free(saved_stabs[saved_stabs_index].string);\n  }" if (parenthesized_expression "(saved_stabs[saved_stabs_index].string != (char *)0x0)" ( (binary_expression "saved_stabs[saved_stabs_index].string != (char *)0x0" (field_expression "saved_stabs[saved_stabs_index].string" (subscript_expression "saved_stabs[saved_stabs_index]" identifier [ identifier ]) . field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(saved_stabs[saved_stabs_index].string);\n  }" { (expression_statement "free(saved_stabs[saved_stabs_index].string);" (call_expression "free(saved_stabs[saved_stabs_index].string)" identifier (argument_list "(saved_stabs[saved_stabs_index].string)" ( (field_expression "saved_stabs[saved_stabs_index].string" (subscript_expression "saved_stabs[saved_stabs_index]" identifier [ identifier ]) . field_identifier) ))) ;) })) (expression_statement "saved_stabs[iVar1].type = type;" (assignment_expression "saved_stabs[iVar1].type = type" (field_expression "saved_stabs[iVar1].type" (subscript_expression "saved_stabs[iVar1]" identifier [ identifier ]) . field_identifier) = identifier) ;) (expression_statement "saved_stabs[iVar1].desc = desc;" (assignment_expression "saved_stabs[iVar1].desc = desc" (field_expression "saved_stabs[iVar1].desc" (subscript_expression "saved_stabs[iVar1]" identifier [ identifier ]) . field_identifier) = identifier) ;) (expression_statement "saved_stabs[iVar1].value = value;" (assignment_expression "saved_stabs[iVar1].value = value" (field_expression "saved_stabs[iVar1].value" (subscript_expression "saved_stabs[iVar1]" identifier [ identifier ]) . field_identifier) = identifier) ;) (expression_statement "pcVar2 = (char *)xstrdup(string);" (assignment_expression "pcVar2 = (char *)xstrdup(string)" identifier = (cast_expression "(char *)xstrdup(string)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xstrdup(string)" identifier (argument_list "(string)" ( identifier ))))) ;) (expression_statement "saved_stabs[iVar1].string = pcVar2;" (assignment_expression "saved_stabs[iVar1].string = pcVar2" (field_expression "saved_stabs[iVar1].string" (subscript_expression "saved_stabs[iVar1]" identifier [ identifier ]) . field_identifier) = identifier) ;) (expression_statement "saved_stabs_index = (saved_stabs_index + 1) % 0x10;" (assignment_expression "saved_stabs_index = (saved_stabs_index + 1) % 0x10" identifier = (binary_expression "(saved_stabs_index + 1) % 0x10" (parenthesized_expression "(saved_stabs_index + 1)" ( (binary_expression "saved_stabs_index + 1" identifier + number_literal) )) % number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit "void __regparm2\nFUN_0001c790(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 param_5)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  \n  iVar1 = DAT_00040c00;\n  if ((void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0) {\n    free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);\n  }\n  iVar3 = iVar1 * 0x14;\n  *(undefined4 *)(&DAT_00040c20 + iVar3) = param_1;\n  *(undefined4 *)(&DAT_00040c24 + iVar3) = param_2;\n  *(undefined4 *)(&DAT_00040c28 + iVar3) = param_3;\n  *(undefined4 *)(&DAT_00040c2c + iVar3) = param_4;\n  uVar2 = xstrdup(param_5);\n  (&DAT_00040c30)[iVar1 * 5] = uVar2;\n  DAT_00040c00 = (DAT_00040c00 + 1) % 0x10;\n  return;\n}\n\n" (function_definition "void __regparm2\nFUN_0001c790(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 param_5)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  \n  iVar1 = DAT_00040c00;\n  if ((void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0) {\n    free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);\n  }\n  iVar3 = iVar1 * 0x14;\n  *(undefined4 *)(&DAT_00040c20 + iVar3) = param_1;\n  *(undefined4 *)(&DAT_00040c24 + iVar3) = param_2;\n  *(undefined4 *)(&DAT_00040c28 + iVar3) = param_3;\n  *(undefined4 *)(&DAT_00040c2c + iVar3) = param_4;\n  uVar2 = xstrdup(param_5);\n  (&DAT_00040c30)[iVar1 * 5] = uVar2;\n  DAT_00040c00 = (DAT_00040c00 + 1) % 0x10;\n  return;\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "FUN_0001c790(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 param_5)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  \n  iVar1 = DAT_00040c00;\n  if ((void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0) {\n    free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);\n  }\n  iVar3 = iVar1 * 0x14;\n  *(undefined4 *)(&DAT_00040c20 + iVar3) = param_1;\n  *(undefined4 *)(&DAT_00040c24 + iVar3) = param_2;\n  *(undefined4 *)(&DAT_00040c28 + iVar3) = param_3;\n  *(undefined4 *)(&DAT_00040c2c + iVar3) = param_4;\n  uVar2 = xstrdup(param_5);\n  (&DAT_00040c30)[iVar1 * 5] = uVar2;\n  DAT_00040c00 = (DAT_00040c00 + 1) % 0x10;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar1 = DAT_00040c00;" (assignment_expression "iVar1 = DAT_00040c00" identifier = identifier) ;) (if_statement "if ((void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0) {\n    free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);\n  }" if (parenthesized_expression "((void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0)" ( (binary_expression "(void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0" (cast_expression "(void *)(&DAT_00040c30)[DAT_00040c00 * 5]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "(&DAT_00040c30)[DAT_00040c00 * 5]" (parenthesized_expression "(&DAT_00040c30)" ( (pointer_expression "&DAT_00040c30" & identifier) )) [ (binary_expression "DAT_00040c00 * 5" identifier * number_literal) ])) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);\n  }" { (expression_statement "free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);" (call_expression "free((void *)(&DAT_00040c30)[DAT_00040c00 * 5])" identifier (argument_list "((void *)(&DAT_00040c30)[DAT_00040c00 * 5])" ( (cast_expression "(void *)(&DAT_00040c30)[DAT_00040c00 * 5]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "(&DAT_00040c30)[DAT_00040c00 * 5]" (parenthesized_expression "(&DAT_00040c30)" ( (pointer_expression "&DAT_00040c30" & identifier) )) [ (binary_expression "DAT_00040c00 * 5" identifier * number_literal) ])) ))) ;) })) (expression_statement "iVar3 = iVar1 * 0x14;" (assignment_expression "iVar3 = iVar1 * 0x14" identifier = (binary_expression "iVar1 * 0x14" identifier * number_literal)) ;) (expression_statement "*(undefined4 *)(&DAT_00040c20 + iVar3) = param_1;" (assignment_expression "*(undefined4 *)(&DAT_00040c20 + iVar3) = param_1" (pointer_expression "*(undefined4 *)(&DAT_00040c20 + iVar3)" * (cast_expression "(undefined4 *)(&DAT_00040c20 + iVar3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&DAT_00040c20 + iVar3)" ( (binary_expression "&DAT_00040c20 + iVar3" (pointer_expression "&DAT_00040c20" & identifier) + identifier) )))) = identifier) ;) (expression_statement "*(undefined4 *)(&DAT_00040c24 + iVar3) = param_2;" (assignment_expression "*(undefined4 *)(&DAT_00040c24 + iVar3) = param_2" (pointer_expression "*(undefined4 *)(&DAT_00040c24 + iVar3)" * (cast_expression "(undefined4 *)(&DAT_00040c24 + iVar3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&DAT_00040c24 + iVar3)" ( (binary_expression "&DAT_00040c24 + iVar3" (pointer_expression "&DAT_00040c24" & identifier) + identifier) )))) = identifier) ;) (expression_statement "*(undefined4 *)(&DAT_00040c28 + iVar3) = param_3;" (assignment_expression "*(undefined4 *)(&DAT_00040c28 + iVar3) = param_3" (pointer_expression "*(undefined4 *)(&DAT_00040c28 + iVar3)" * (cast_expression "(undefined4 *)(&DAT_00040c28 + iVar3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&DAT_00040c28 + iVar3)" ( (binary_expression "&DAT_00040c28 + iVar3" (pointer_expression "&DAT_00040c28" & identifier) + identifier) )))) = identifier) ;) (expression_statement "*(undefined4 *)(&DAT_00040c2c + iVar3) = param_4;" (assignment_expression "*(undefined4 *)(&DAT_00040c2c + iVar3) = param_4" (pointer_expression "*(undefined4 *)(&DAT_00040c2c + iVar3)" * (cast_expression "(undefined4 *)(&DAT_00040c2c + iVar3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&DAT_00040c2c + iVar3)" ( (binary_expression "&DAT_00040c2c + iVar3" (pointer_expression "&DAT_00040c2c" & identifier) + identifier) )))) = identifier) ;) (expression_statement "uVar2 = xstrdup(param_5);" (assignment_expression "uVar2 = xstrdup(param_5)" identifier = (call_expression "xstrdup(param_5)" identifier (argument_list "(param_5)" ( identifier )))) ;) (expression_statement "(&DAT_00040c30)[iVar1 * 5] = uVar2;" (assignment_expression "(&DAT_00040c30)[iVar1 * 5] = uVar2" (subscript_expression "(&DAT_00040c30)[iVar1 * 5]" (parenthesized_expression "(&DAT_00040c30)" ( (pointer_expression "&DAT_00040c30" & identifier) )) [ (binary_expression "iVar1 * 5" identifier * number_literal) ]) = identifier) ;) (expression_statement "DAT_00040c00 = (DAT_00040c00 + 1) % 0x10;" (assignment_expression "DAT_00040c00 = (DAT_00040c00 + 1) % 0x10" identifier = (binary_expression "(DAT_00040c00 + 1) % 0x10" (parenthesized_expression "(DAT_00040c00 + 1)" ( (binary_expression "DAT_00040c00 + 1" identifier + number_literal) )) % number_literal)) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ (binary_expression IDENT * LIT) ])) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ (binary_expression IDENT * LIT) ])) ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + IDENT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + IDENT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + IDENT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + IDENT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ (binary_expression IDENT * LIT) ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) % LIT)) ;) (return_statement return ;) })))
(function_definition "void __regparm2\nFUN_0001c790(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 param_5)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  \n  iVar1 = DAT_00040c00;\n  if ((void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0) {\n    free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);\n  }\n  iVar3 = iVar1 * 0x14;\n  *(undefined4 *)(&DAT_00040c20 + iVar3) = param_1;\n  *(undefined4 *)(&DAT_00040c24 + iVar3) = param_2;\n  *(undefined4 *)(&DAT_00040c28 + iVar3) = param_3;\n  *(undefined4 *)(&DAT_00040c2c + iVar3) = param_4;\n  uVar2 = xstrdup(param_5);\n  (&DAT_00040c30)[iVar1 * 5] = uVar2;\n  DAT_00040c00 = (DAT_00040c00 + 1) % 0x10;\n  return;\n}" (primitive_type "void") (ERROR "__regparm2" (identifier "__regparm2")) (function_declarator "FUN_0001c790(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 param_5)" (identifier "FUN_0001c790") (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 param_5)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (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")) (, ",") (parameter_declaration "undefined4 param_5" (type_identifier "undefined4") (identifier "param_5")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  \n  iVar1 = DAT_00040c00;\n  if ((void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0) {\n    free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);\n  }\n  iVar3 = iVar1 * 0x14;\n  *(undefined4 *)(&DAT_00040c20 + iVar3) = param_1;\n  *(undefined4 *)(&DAT_00040c24 + iVar3) = param_2;\n  *(undefined4 *)(&DAT_00040c28 + iVar3) = param_3;\n  *(undefined4 *)(&DAT_00040c2c + iVar3) = param_4;\n  uVar2 = xstrdup(param_5);\n  (&DAT_00040c30)[iVar1 * 5] = uVar2;\n  DAT_00040c00 = (DAT_00040c00 + 1) % 0x10;\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "iVar1 = DAT_00040c00;" (assignment_expression "iVar1 = DAT_00040c00" (identifier "iVar1") (= "=") (identifier "DAT_00040c00")) (; ";")) (if_statement "if ((void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0) {\n    free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);\n  }" (if "if") (parenthesized_expression "((void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0)" (( "(") (binary_expression "(void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0" (cast_expression "(void *)(&DAT_00040c30)[DAT_00040c00 * 5]" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "(&DAT_00040c30)[DAT_00040c00 * 5]" (parenthesized_expression "(&DAT_00040c30)" (( "(") (pointer_expression "&DAT_00040c30" (& "&") (identifier "DAT_00040c30")) () ")")) ([ "[") (binary_expression "DAT_00040c00 * 5" (identifier "DAT_00040c00") (* "*") (number_literal "5")) (] "]"))) (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);\n  }" ({ "{") (expression_statement "free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);" (call_expression "free((void *)(&DAT_00040c30)[DAT_00040c00 * 5])" (identifier "free") (argument_list "((void *)(&DAT_00040c30)[DAT_00040c00 * 5])" (( "(") (cast_expression "(void *)(&DAT_00040c30)[DAT_00040c00 * 5]" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "(&DAT_00040c30)[DAT_00040c00 * 5]" (parenthesized_expression "(&DAT_00040c30)" (( "(") (pointer_expression "&DAT_00040c30" (& "&") (identifier "DAT_00040c30")) () ")")) ([ "[") (binary_expression "DAT_00040c00 * 5" (identifier "DAT_00040c00") (* "*") (number_literal "5")) (] "]"))) () ")"))) (; ";")) (} "}"))) (expression_statement "iVar3 = iVar1 * 0x14;" (assignment_expression "iVar3 = iVar1 * 0x14" (identifier "iVar3") (= "=") (binary_expression "iVar1 * 0x14" (identifier "iVar1") (* "*") (number_literal "0x14"))) (; ";")) (expression_statement "*(undefined4 *)(&DAT_00040c20 + iVar3) = param_1;" (assignment_expression "*(undefined4 *)(&DAT_00040c20 + iVar3) = param_1" (pointer_expression "*(undefined4 *)(&DAT_00040c20 + iVar3)" (* "*") (cast_expression "(undefined4 *)(&DAT_00040c20 + iVar3)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(&DAT_00040c20 + iVar3)" (( "(") (binary_expression "&DAT_00040c20 + iVar3" (pointer_expression "&DAT_00040c20" (& "&") (identifier "DAT_00040c20")) (+ "+") (identifier "iVar3")) () ")")))) (= "=") (identifier "param_1")) (; ";")) (expression_statement "*(undefined4 *)(&DAT_00040c24 + iVar3) = param_2;" (assignment_expression "*(undefined4 *)(&DAT_00040c24 + iVar3) = param_2" (pointer_expression "*(undefined4 *)(&DAT_00040c24 + iVar3)" (* "*") (cast_expression "(undefined4 *)(&DAT_00040c24 + iVar3)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(&DAT_00040c24 + iVar3)" (( "(") (binary_expression "&DAT_00040c24 + iVar3" (pointer_expression "&DAT_00040c24" (& "&") (identifier "DAT_00040c24")) (+ "+") (identifier "iVar3")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (expression_statement "*(undefined4 *)(&DAT_00040c28 + iVar3) = param_3;" (assignment_expression "*(undefined4 *)(&DAT_00040c28 + iVar3) = param_3" (pointer_expression "*(undefined4 *)(&DAT_00040c28 + iVar3)" (* "*") (cast_expression "(undefined4 *)(&DAT_00040c28 + iVar3)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(&DAT_00040c28 + iVar3)" (( "(") (binary_expression "&DAT_00040c28 + iVar3" (pointer_expression "&DAT_00040c28" (& "&") (identifier "DAT_00040c28")) (+ "+") (identifier "iVar3")) () ")")))) (= "=") (identifier "param_3")) (; ";")) (expression_statement "*(undefined4 *)(&DAT_00040c2c + iVar3) = param_4;" (assignment_expression "*(undefined4 *)(&DAT_00040c2c + iVar3) = param_4" (pointer_expression "*(undefined4 *)(&DAT_00040c2c + iVar3)" (* "*") (cast_expression "(undefined4 *)(&DAT_00040c2c + iVar3)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(&DAT_00040c2c + iVar3)" (( "(") (binary_expression "&DAT_00040c2c + iVar3" (pointer_expression "&DAT_00040c2c" (& "&") (identifier "DAT_00040c2c")) (+ "+") (identifier "iVar3")) () ")")))) (= "=") (identifier "param_4")) (; ";")) (expression_statement "uVar2 = xstrdup(param_5);" (assignment_expression "uVar2 = xstrdup(param_5)" (identifier "uVar2") (= "=") (call_expression "xstrdup(param_5)" (identifier "xstrdup") (argument_list "(param_5)" (( "(") (identifier "param_5") () ")")))) (; ";")) (expression_statement "(&DAT_00040c30)[iVar1 * 5] = uVar2;" (assignment_expression "(&DAT_00040c30)[iVar1 * 5] = uVar2" (subscript_expression "(&DAT_00040c30)[iVar1 * 5]" (parenthesized_expression "(&DAT_00040c30)" (( "(") (pointer_expression "&DAT_00040c30" (& "&") (identifier "DAT_00040c30")) () ")")) ([ "[") (binary_expression "iVar1 * 5" (identifier "iVar1") (* "*") (number_literal "5")) (] "]")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "DAT_00040c00 = (DAT_00040c00 + 1) % 0x10;" (assignment_expression "DAT_00040c00 = (DAT_00040c00 + 1) % 0x10" (identifier "DAT_00040c00") (= "=") (binary_expression "(DAT_00040c00 + 1) % 0x10" (parenthesized_expression "(DAT_00040c00 + 1)" (( "(") (binary_expression "DAT_00040c00 + 1" (identifier "DAT_00040c00") (+ "+") (number_literal "1")) () ")")) (% "%") (number_literal "0x10"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void __regparm2 function_1(int type,int desc,type_1 value,char *string)

{
  int iVar1;
  char *pcVar2;
  
  iVar1 = var_3;
  if (saved_stabs[var_3].string != (char *)0x0) {
    var_1(saved_stabs[var_3].string);
  }
  saved_stabs[iVar1].type = type;
  saved_stabs[iVar1].desc = desc;
  saved_stabs[iVar1].value = value;
  pcVar2 = (char *)var_2(string);
  saved_stabs[iVar1].string = pcVar2;
  var_3 = (var_3 + 1) % 0x10;
  return;
}


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

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

void __regparm2
MASKED(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,
            undefined4 param_5)

{
  int iVar1;
  undefined4 uVar2;
  int iVar3;
  
  iVar1 = DAT_00040c00;
  if ((void *)(&DAT_00040c30)[DAT_00040c00 * 5] != (void *)0x0) {
    free((void *)(&DAT_00040c30)[DAT_00040c00 * 5]);
  }
  iVar3 = iVar1 * 0x14;
  *(undefined4 *)(&DAT_00040c20 + iVar3) = param_1;
  *(undefined4 *)(&DAT_00040c24 + iVar3) = param_2;
  *(undefined4 *)(&DAT_00040c28 + iVar3) = param_3;
  *(undefined4 *)(&DAT_00040c2c + iVar3) = param_4;
  uVar2 = xstrdup(param_5);
  (&DAT_00040c30)[iVar1 * 5] = uVar2;
  DAT_00040c00 = (DAT_00040c00 + 1) % 0x10;
  return;
}

