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

bfd_boolean __regparm3 push_type(pr_handle *info,char *type)

{
  FILE *pFVar1;
  FILE *pFVar2;
  char *pcVar3;
  uint uVar4;
  uint uVar5;
  
  pFVar2 = (FILE *)xmalloc(0x1c);
  uVar5 = 0;
  pFVar2->_flags = 0;
  uVar4 = (uint)&pFVar2->_IO_read_ptr & 0xfffffffc;
  pFVar2->_IO_write_end = (char *)0x0;
  do {
    *(undefined4 *)(uVar4 + uVar5) = 0;
    uVar5 = uVar5 + 4;
  } while (uVar5 < ((int)pFVar2 + (0x1c - uVar4) & 0xfffffffc));
  pcVar3 = (char *)xstrdup(type);
  pFVar2->_IO_read_end = (char *)0x3;
  pFVar2->_IO_read_ptr = pcVar3;
  pFVar1 = info->f;
  pFVar2->_IO_read_base = (char *)0x0;
  pFVar2->_flags = (int)pFVar1;
  info->f = pFVar2;
  return 1;
}



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

undefined4 __regparm3 FUN_00037020(undefined4 *param_1,undefined4 param_2)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  uint uVar3;
  
  puVar1 = (undefined4 *)xmalloc(0x1c);
  uVar3 = 0;
  *puVar1 = 0;
  puVar1[6] = 0;
  do {
    *(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;
    uVar3 = uVar3 + 4;
  } while (uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc));
  uVar2 = xstrdup(param_2);
  puVar1[2] = 3;
  puVar1[1] = uVar2;
  uVar2 = *param_1;
  puVar1[3] = 0;
  *puVar1 = uVar2;
  *param_1 = puVar1;
  return 1;
}


PUSH EBP
MOV EBP,ESP
PUSH EDI
MOV EDI,EAX
PUSH ESI
PUSH EBX
CALL 0x000143a0
ADD EBX,0x38fd3
SUB ESP,0x28
MOV dword ptr [EBP + -0x1c],EDX
PUSH 0x1c
CALL 0x000132b0
XOR EDX,EDX
LEA ECX,[EAX + 0x4]
MOV ESI,EAX
MOV dword ptr [EAX],0x0
AND ECX,0xfffffffc
MOV dword ptr [EAX + 0x18],0x0
SUB EAX,ECX
ADD EAX,0x1c
AND EAX,0xfffffffc
MOV dword ptr [ECX + EDX*0x1],0x0
ADD EDX,0x4
CMP EDX,EAX
JC 0x0003705f
POP EAX
PUSH dword ptr [EBP + -0x1c]
CALL 0x000132f0
MOV dword ptr [ESI + 0x8],0x3
ADD ESP,0x10
MOV dword ptr [ESI + 0x4],EAX
MOV EAX,dword ptr [EDI]
MOV dword ptr [ESI + 0xc],0x0
MOV dword ptr [ESI],EAX
MOV EAX,0x1
MOV dword ptr [EDI],ESI
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 __regparm3 FUN_00037020(undefined4 *param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  \n  puVar1 = (undefined4 *)xmalloc(0x1c);\n  uVar3 = 0;\n  *puVar1 = 0;\n  puVar1[6] = 0;\n  do {\n    *(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;\n    uVar3 = uVar3 + 4;\n  } while (uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc));\n  uVar2 = xstrdup(param_2);\n  puVar1[2] = 3;\n  puVar1[1] = uVar2;\n  uVar2 = *param_1;\n  puVar1[3] = 0;\n  *puVar1 = uVar2;\n  *param_1 = puVar1;\n  return 1;\n}\n\n" comment (function_definition "undefined4 __regparm3 FUN_00037020(undefined4 *param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  \n  puVar1 = (undefined4 *)xmalloc(0x1c);\n  uVar3 = 0;\n  *puVar1 = 0;\n  puVar1[6] = 0;\n  do {\n    *(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;\n    uVar3 = uVar3 + 4;\n  } while (uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc));\n  uVar2 = xstrdup(param_2);\n  puVar1[2] = 3;\n  puVar1[1] = uVar2;\n  uVar2 = *param_1;\n  puVar1[3] = 0;\n  *puVar1 = uVar2;\n  *param_1 = puVar1;\n  return 1;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00037020(undefined4 *param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 *param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  \n  puVar1 = (undefined4 *)xmalloc(0x1c);\n  uVar3 = 0;\n  *puVar1 = 0;\n  puVar1[6] = 0;\n  do {\n    *(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;\n    uVar3 = uVar3 + 4;\n  } while (uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc));\n  uVar2 = xstrdup(param_2);\n  puVar1[2] = 3;\n  puVar1[1] = uVar2;\n  uVar2 = *param_1;\n  puVar1[3] = 0;\n  *puVar1 = uVar2;\n  *param_1 = puVar1;\n  return 1;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "puVar1 = (undefined4 *)xmalloc(0x1c);" (assignment_expression "puVar1 = (undefined4 *)xmalloc(0x1c)" identifier = (cast_expression "(undefined4 *)xmalloc(0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x1c)" identifier (argument_list "(0x1c)" ( number_literal ))))) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "puVar1[6] = 0;" (assignment_expression "puVar1[6] = 0" (subscript_expression "puVar1[6]" identifier [ number_literal ]) = number_literal) ;) (do_statement "do {\n    *(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;\n    uVar3 = uVar3 + 4;\n  } while (uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc));" do (compound_statement "{\n    *(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;\n    uVar3 = uVar3 + 4;\n  }" { (expression_statement "*(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;" (assignment_expression "*(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0" (pointer_expression "*(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3)" * (cast_expression "(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3)" ( (binary_expression "((uint)(puVar1 + 1) & 0xfffffffc) + uVar3" (parenthesized_expression "((uint)(puVar1 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar1 + 1) & 0xfffffffc" (call_expression "(uint)(puVar1 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) ))) & number_literal) )) + identifier) )))) = number_literal) ;) (expression_statement "uVar3 = uVar3 + 4;" (assignment_expression "uVar3 = uVar3 + 4" identifier = (binary_expression "uVar3 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc))" ( (binary_expression "uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc)" identifier < (parenthesized_expression "((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc)" ( (binary_expression "(int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc" (binary_expression "(int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc))" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x1c - ((uint)(puVar1 + 1) & 0xfffffffc))" ( (binary_expression "0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)" number_literal - (parenthesized_expression "((uint)(puVar1 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar1 + 1) & 0xfffffffc" (call_expression "(uint)(puVar1 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) ))) & number_literal) ))) ))) & number_literal) ))) )) ;) (expression_statement "uVar2 = xstrdup(param_2);" (assignment_expression "uVar2 = xstrdup(param_2)" identifier = (call_expression "xstrdup(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "puVar1[2] = 3;" (assignment_expression "puVar1[2] = 3" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[1] = uVar2;" (assignment_expression "puVar1[1] = uVar2" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "puVar1[3] = 0;" (assignment_expression "puVar1[3] = 0" (subscript_expression "puVar1[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar1 = uVar2;" (assignment_expression "*puVar1 = uVar2" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "*param_1 = puVar1;" (assignment_expression "*param_1 = puVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nbfd_boolean __regparm3 push_type(pr_handle *info,char *type)\n\n{\n  FILE *pFVar1;\n  FILE *pFVar2;\n  char *pcVar3;\n  uint uVar4;\n  uint uVar5;\n  \n  pFVar2 = (FILE *)xmalloc(0x1c);\n  uVar5 = 0;\n  pFVar2->_flags = 0;\n  uVar4 = (uint)&pFVar2->_IO_read_ptr & 0xfffffffc;\n  pFVar2->_IO_write_end = (char *)0x0;\n  do {\n    *(undefined4 *)(uVar4 + uVar5) = 0;\n    uVar5 = uVar5 + 4;\n  } while (uVar5 < ((int)pFVar2 + (0x1c - uVar4) & 0xfffffffc));\n  pcVar3 = (char *)xstrdup(type);\n  pFVar2->_IO_read_end = (char *)0x3;\n  pFVar2->_IO_read_ptr = pcVar3;\n  pFVar1 = info->f;\n  pFVar2->_IO_read_base = (char *)0x0;\n  pFVar2->_flags = (int)pFVar1;\n  info->f = pFVar2;\n  return 1;\n}\n\n" comment (function_definition "bfd_boolean __regparm3 push_type(pr_handle *info,char *type)\n\n{\n  FILE *pFVar1;\n  FILE *pFVar2;\n  char *pcVar3;\n  uint uVar4;\n  uint uVar5;\n  \n  pFVar2 = (FILE *)xmalloc(0x1c);\n  uVar5 = 0;\n  pFVar2->_flags = 0;\n  uVar4 = (uint)&pFVar2->_IO_read_ptr & 0xfffffffc;\n  pFVar2->_IO_write_end = (char *)0x0;\n  do {\n    *(undefined4 *)(uVar4 + uVar5) = 0;\n    uVar5 = uVar5 + 4;\n  } while (uVar5 < ((int)pFVar2 + (0x1c - uVar4) & 0xfffffffc));\n  pcVar3 = (char *)xstrdup(type);\n  pFVar2->_IO_read_end = (char *)0x3;\n  pFVar2->_IO_read_ptr = pcVar3;\n  pFVar1 = info->f;\n  pFVar2->_IO_read_base = (char *)0x0;\n  pFVar2->_flags = (int)pFVar1;\n  info->f = pFVar2;\n  return 1;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "push_type(pr_handle *info,char *type)" identifier (parameter_list "(pr_handle *info,char *type)" ( (parameter_declaration "pr_handle *info" type_identifier (pointer_declarator "*info" * identifier)) , (parameter_declaration "char *type" primitive_type (pointer_declarator "*type" * identifier)) ))) (compound_statement "{\n  FILE *pFVar1;\n  FILE *pFVar2;\n  char *pcVar3;\n  uint uVar4;\n  uint uVar5;\n  \n  pFVar2 = (FILE *)xmalloc(0x1c);\n  uVar5 = 0;\n  pFVar2->_flags = 0;\n  uVar4 = (uint)&pFVar2->_IO_read_ptr & 0xfffffffc;\n  pFVar2->_IO_write_end = (char *)0x0;\n  do {\n    *(undefined4 *)(uVar4 + uVar5) = 0;\n    uVar5 = uVar5 + 4;\n  } while (uVar5 < ((int)pFVar2 + (0x1c - uVar4) & 0xfffffffc));\n  pcVar3 = (char *)xstrdup(type);\n  pFVar2->_IO_read_end = (char *)0x3;\n  pFVar2->_IO_read_ptr = pcVar3;\n  pFVar1 = info->f;\n  pFVar2->_IO_read_base = (char *)0x0;\n  pFVar2->_flags = (int)pFVar1;\n  info->f = pFVar2;\n  return 1;\n}" { (declaration "FILE *pFVar1;" type_identifier (pointer_declarator "*pFVar1" * identifier) ;) (declaration "FILE *pFVar2;" type_identifier (pointer_declarator "*pFVar2" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "pFVar2 = (FILE *)xmalloc(0x1c);" (assignment_expression "pFVar2 = (FILE *)xmalloc(0x1c)" identifier = (cast_expression "(FILE *)xmalloc(0x1c)" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x1c)" identifier (argument_list "(0x1c)" ( number_literal ))))) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (expression_statement "pFVar2->_flags = 0;" (assignment_expression "pFVar2->_flags = 0" (field_expression "pFVar2->_flags" identifier -> field_identifier) = number_literal) ;) (expression_statement "uVar4 = (uint)&pFVar2->_IO_read_ptr & 0xfffffffc;" (assignment_expression "uVar4 = (uint)&pFVar2->_IO_read_ptr & 0xfffffffc" identifier = (binary_expression "(uint)&pFVar2->_IO_read_ptr & 0xfffffffc" (binary_expression "(uint)&pFVar2->_IO_read_ptr" (parenthesized_expression "(uint)" ( identifier )) & (field_expression "pFVar2->_IO_read_ptr" identifier -> field_identifier)) & number_literal)) ;) (expression_statement "pFVar2->_IO_write_end = (char *)0x0;" (assignment_expression "pFVar2->_IO_write_end = (char *)0x0" (field_expression "pFVar2->_IO_write_end" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (do_statement "do {\n    *(undefined4 *)(uVar4 + uVar5) = 0;\n    uVar5 = uVar5 + 4;\n  } while (uVar5 < ((int)pFVar2 + (0x1c - uVar4) & 0xfffffffc));" do (compound_statement "{\n    *(undefined4 *)(uVar4 + uVar5) = 0;\n    uVar5 = uVar5 + 4;\n  }" { (expression_statement "*(undefined4 *)(uVar4 + uVar5) = 0;" (assignment_expression "*(undefined4 *)(uVar4 + uVar5) = 0" (pointer_expression "*(undefined4 *)(uVar4 + uVar5)" * (cast_expression "(undefined4 *)(uVar4 + uVar5)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar4 + uVar5)" ( (binary_expression "uVar4 + uVar5" identifier + identifier) )))) = number_literal) ;) (expression_statement "uVar5 = uVar5 + 4;" (assignment_expression "uVar5 = uVar5 + 4" identifier = (binary_expression "uVar5 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar5 < ((int)pFVar2 + (0x1c - uVar4) & 0xfffffffc))" ( (binary_expression "uVar5 < ((int)pFVar2 + (0x1c - uVar4) & 0xfffffffc)" identifier < (parenthesized_expression "((int)pFVar2 + (0x1c - uVar4) & 0xfffffffc)" ( (binary_expression "(int)pFVar2 + (0x1c - uVar4) & 0xfffffffc" (binary_expression "(int)pFVar2 + (0x1c - uVar4)" (cast_expression "(int)pFVar2" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x1c - uVar4)" ( (binary_expression "0x1c - uVar4" number_literal - identifier) ))) & number_literal) ))) )) ;) (expression_statement "pcVar3 = (char *)xstrdup(type);" (assignment_expression "pcVar3 = (char *)xstrdup(type)" identifier = (cast_expression "(char *)xstrdup(type)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xstrdup(type)" identifier (argument_list "(type)" ( identifier ))))) ;) (expression_statement "pFVar2->_IO_read_end = (char *)0x3;" (assignment_expression "pFVar2->_IO_read_end = (char *)0x3" (field_expression "pFVar2->_IO_read_end" identifier -> field_identifier) = (cast_expression "(char *)0x3" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pFVar2->_IO_read_ptr = pcVar3;" (assignment_expression "pFVar2->_IO_read_ptr = pcVar3" (field_expression "pFVar2->_IO_read_ptr" identifier -> field_identifier) = identifier) ;) (expression_statement "pFVar1 = info->f;" (assignment_expression "pFVar1 = info->f" identifier = (field_expression "info->f" identifier -> field_identifier)) ;) (expression_statement "pFVar2->_IO_read_base = (char *)0x0;" (assignment_expression "pFVar2->_IO_read_base = (char *)0x0" (field_expression "pFVar2->_IO_read_base" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pFVar2->_flags = (int)pFVar1;" (assignment_expression "pFVar2->_flags = (int)pFVar1" (field_expression "pFVar2->_flags" identifier -> field_identifier) = (cast_expression "(int)pFVar1" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "info->f = pFVar2;" (assignment_expression "info->f = pFVar2" (field_expression "info->f" identifier -> field_identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "undefined4 __regparm3 FUN_00037020(undefined4 *param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  \n  puVar1 = (undefined4 *)xmalloc(0x1c);\n  uVar3 = 0;\n  *puVar1 = 0;\n  puVar1[6] = 0;\n  do {\n    *(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;\n    uVar3 = uVar3 + 4;\n  } while (uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc));\n  uVar2 = xstrdup(param_2);\n  puVar1[2] = 3;\n  puVar1[1] = uVar2;\n  uVar2 = *param_1;\n  puVar1[3] = 0;\n  *puVar1 = uVar2;\n  *param_1 = puVar1;\n  return 1;\n}\n\n" (function_definition "undefined4 __regparm3 FUN_00037020(undefined4 *param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  \n  puVar1 = (undefined4 *)xmalloc(0x1c);\n  uVar3 = 0;\n  *puVar1 = 0;\n  puVar1[6] = 0;\n  do {\n    *(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;\n    uVar3 = uVar3 + 4;\n  } while (uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc));\n  uVar2 = xstrdup(param_2);\n  puVar1[2] = 3;\n  puVar1[1] = uVar2;\n  uVar2 = *param_1;\n  puVar1[3] = 0;\n  *puVar1 = uVar2;\n  *param_1 = puVar1;\n  return 1;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00037020(undefined4 *param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 *param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  \n  puVar1 = (undefined4 *)xmalloc(0x1c);\n  uVar3 = 0;\n  *puVar1 = 0;\n  puVar1[6] = 0;\n  do {\n    *(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;\n    uVar3 = uVar3 + 4;\n  } while (uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc));\n  uVar2 = xstrdup(param_2);\n  puVar1[2] = 3;\n  puVar1[1] = uVar2;\n  uVar2 = *param_1;\n  puVar1[3] = 0;\n  *puVar1 = uVar2;\n  *param_1 = puVar1;\n  return 1;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "puVar1 = (undefined4 *)xmalloc(0x1c);" (assignment_expression "puVar1 = (undefined4 *)xmalloc(0x1c)" identifier = (cast_expression "(undefined4 *)xmalloc(0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x1c)" identifier (argument_list "(0x1c)" ( number_literal ))))) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "puVar1[6] = 0;" (assignment_expression "puVar1[6] = 0" (subscript_expression "puVar1[6]" identifier [ number_literal ]) = number_literal) ;) (do_statement "do {\n    *(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;\n    uVar3 = uVar3 + 4;\n  } while (uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc));" do (compound_statement "{\n    *(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;\n    uVar3 = uVar3 + 4;\n  }" { (expression_statement "*(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;" (assignment_expression "*(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0" (pointer_expression "*(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3)" * (cast_expression "(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3)" ( (binary_expression "((uint)(puVar1 + 1) & 0xfffffffc) + uVar3" (parenthesized_expression "((uint)(puVar1 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar1 + 1) & 0xfffffffc" (call_expression "(uint)(puVar1 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) ))) & number_literal) )) + identifier) )))) = number_literal) ;) (expression_statement "uVar3 = uVar3 + 4;" (assignment_expression "uVar3 = uVar3 + 4" identifier = (binary_expression "uVar3 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc))" ( (binary_expression "uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc)" identifier < (parenthesized_expression "((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc)" ( (binary_expression "(int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc" (binary_expression "(int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc))" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x1c - ((uint)(puVar1 + 1) & 0xfffffffc))" ( (binary_expression "0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)" number_literal - (parenthesized_expression "((uint)(puVar1 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar1 + 1) & 0xfffffffc" (call_expression "(uint)(puVar1 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) ))) & number_literal) ))) ))) & number_literal) ))) )) ;) (expression_statement "uVar2 = xstrdup(param_2);" (assignment_expression "uVar2 = xstrdup(param_2)" identifier = (call_expression "xstrdup(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "puVar1[2] = 3;" (assignment_expression "puVar1[2] = 3" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[1] = uVar2;" (assignment_expression "puVar1[1] = uVar2" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "puVar1[3] = 0;" (assignment_expression "puVar1[3] = 0" (subscript_expression "puVar1[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar1 = uVar2;" (assignment_expression "*puVar1 = uVar2" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "*param_1 = puVar1;" (assignment_expression "*param_1 = puVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) )) + IDENT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT < (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression LIT - (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) ))) ))) & LIT) ))) )) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 __regparm3 FUN_00037020(undefined4 *param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  \n  puVar1 = (undefined4 *)xmalloc(0x1c);\n  uVar3 = 0;\n  *puVar1 = 0;\n  puVar1[6] = 0;\n  do {\n    *(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;\n    uVar3 = uVar3 + 4;\n  } while (uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc));\n  uVar2 = xstrdup(param_2);\n  puVar1[2] = 3;\n  puVar1[1] = uVar2;\n  uVar2 = *param_1;\n  puVar1[3] = 0;\n  *puVar1 = uVar2;\n  *param_1 = puVar1;\n  return 1;\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00037020(undefined4 *param_1,undefined4 param_2)" (identifier "FUN_00037020") (parameter_list "(undefined4 *param_1,undefined4 param_2)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  \n  puVar1 = (undefined4 *)xmalloc(0x1c);\n  uVar3 = 0;\n  *puVar1 = 0;\n  puVar1[6] = 0;\n  do {\n    *(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;\n    uVar3 = uVar3 + 4;\n  } while (uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc));\n  uVar2 = xstrdup(param_2);\n  puVar1[2] = 3;\n  puVar1[1] = uVar2;\n  uVar2 = *param_1;\n  puVar1[3] = 0;\n  *puVar1 = uVar2;\n  *param_1 = puVar1;\n  return 1;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (expression_statement "puVar1 = (undefined4 *)xmalloc(0x1c);" (assignment_expression "puVar1 = (undefined4 *)xmalloc(0x1c)" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)xmalloc(0x1c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(0x1c)" (identifier "xmalloc") (argument_list "(0x1c)" (( "(") (number_literal "0x1c") () ")"))))) (; ";")) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1[6] = 0;" (assignment_expression "puVar1[6] = 0" (subscript_expression "puVar1[6]" (identifier "puVar1") ([ "[") (number_literal "6") (] "]")) (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n    *(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;\n    uVar3 = uVar3 + 4;\n  } while (uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc));" (do "do") (compound_statement "{\n    *(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;\n    uVar3 = uVar3 + 4;\n  }" ({ "{") (expression_statement "*(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;" (assignment_expression "*(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0" (pointer_expression "*(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3)" (* "*") (cast_expression "(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3)" (( "(") (binary_expression "((uint)(puVar1 + 1) & 0xfffffffc) + uVar3" (parenthesized_expression "((uint)(puVar1 + 1) & 0xfffffffc)" (( "(") (binary_expression "(uint)(puVar1 + 1) & 0xfffffffc" (call_expression "(uint)(puVar1 + 1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(puVar1 + 1)" (( "(") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1")) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")")) (+ "+") (identifier "uVar3")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar3 = uVar3 + 4;" (assignment_expression "uVar3 = uVar3 + 4" (identifier "uVar3") (= "=") (binary_expression "uVar3 + 4" (identifier "uVar3") (+ "+") (number_literal "4"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc))" (( "(") (binary_expression "uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc)" (identifier "uVar3") (< "<") (parenthesized_expression "((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc)" (( "(") (binary_expression "(int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc" (binary_expression "(int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc))" (cast_expression "(int)puVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar1")) (+ "+") (parenthesized_expression "(0x1c - ((uint)(puVar1 + 1) & 0xfffffffc))" (( "(") (binary_expression "0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)" (number_literal "0x1c") (- "-") (parenthesized_expression "((uint)(puVar1 + 1) & 0xfffffffc)" (( "(") (binary_expression "(uint)(puVar1 + 1) & 0xfffffffc" (call_expression "(uint)(puVar1 + 1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(puVar1 + 1)" (( "(") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1")) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")"))) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")"))) () ")")) (; ";")) (expression_statement "uVar2 = xstrdup(param_2);" (assignment_expression "uVar2 = xstrdup(param_2)" (identifier "uVar2") (= "=") (call_expression "xstrdup(param_2)" (identifier "xstrdup") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (expression_statement "puVar1[2] = 3;" (assignment_expression "puVar1[2] = 3" (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "3")) (; ";")) (expression_statement "puVar1[1] = uVar2;" (assignment_expression "puVar1[1] = uVar2" (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" (identifier "uVar2") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "puVar1[3] = 0;" (assignment_expression "puVar1[3] = 0" (subscript_expression "puVar1[3]" (identifier "puVar1") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*puVar1 = uVar2;" (assignment_expression "*puVar1 = uVar2" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "*param_1 = puVar1;" (assignment_expression "*param_1 = puVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "puVar1")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}")))

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

type_1 __regparm3 function_1(type_2 *info,char *type)

{
  type_3 *pFVar1;
  type_3 *pFVar2;
  char *pcVar3;
  type_4 var_2;
  type_4 var_3;
  
  pFVar2 = (type_3 *)var_1(0x1c);
  var_3 = 0;
  pFVar2->_flags = 0;
  var_2 = (type_4)&pFVar2->_IO_read_ptr & 0xfffffffc;
  pFVar2->_IO_write_end = (char *)0x0;
  do {
    *(type_5 *)(var_2 + var_3) = 0;
    var_3 = var_3 + 4;
  } while (var_3 < ((int)pFVar2 + (0x1c - var_2) & 0xfffffffc));
  pcVar3 = (char *)var_4(type);
  pFVar2->_IO_read_end = (char *)0x3;
  pFVar2->_IO_read_ptr = pcVar3;
  pFVar1 = info->f;
  pFVar2->_IO_read_base = (char *)0x0;
  pFVar2->_flags = (int)pFVar1;
  info->f = pFVar2;
  return 1;
}


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

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

undefined4 __regparm3 MASKED(undefined4 *param_1,undefined4 param_2)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  uint uVar3;
  
  puVar1 = (undefined4 *)xmalloc(0x1c);
  uVar3 = 0;
  *puVar1 = 0;
  puVar1[6] = 0;
  do {
    *(undefined4 *)(((uint)(puVar1 + 1) & 0xfffffffc) + uVar3) = 0;
    uVar3 = uVar3 + 4;
  } while (uVar3 < ((int)puVar1 + (0x1c - ((uint)(puVar1 + 1) & 0xfffffffc)) & 0xfffffffc));
  uVar2 = xstrdup(param_2);
  puVar1[2] = 3;
  puVar1[1] = uVar2;
  uVar2 = *param_1;
  puVar1[3] = 0;
  *puVar1 = uVar2;
  *param_1 = puVar1;
  return 1;
}

