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

bfd_boolean pr_typdef(void *p,char *name)

{
  bfd_boolean bVar1;
  char *__ptr;
  uint uVar2;
  
  bVar1 = substitute_type((pr_handle *)p,name);
  if (bVar1 != 0) {
    __ptr = pop_type((pr_handle *)((int)p + 8));
    if (__ptr != (char *)0x0) {
      if (*(int *)((int)p + 4) != 0) {
        uVar2 = 0;
        do {
                    /* WARNING: Load size is inaccurate */
          uVar2 = uVar2 + 1;
          putc(0x20,*p);
        } while (uVar2 < *(uint *)((int)p + 4));
      }
                    /* WARNING: Load size is inaccurate */
      fprintf(*p,"typedef %s;\n",__ptr);
      free(__ptr);
      return 1;
    }
  }
  return 0;
}



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

undefined4 FUN_00036a10(undefined4 *param_1)

{
  int iVar1;
  void *__ptr;
  uint uVar2;
  
  iVar1 = FUN_000356f0();
  if (iVar1 != 0) {
    __ptr = (void *)FUN_00034e50();
    if (__ptr != (void *)0x0) {
      if (param_1[1] != 0) {
        uVar2 = 0;
        do {
          uVar2 = uVar2 + 1;
          putc(0x20,(FILE *)*param_1);
        } while (uVar2 < (uint)param_1[1]);
      }
      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);
      free(__ptr);
      return 1;
    }
  }
  return 0;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000143a0
ADD EBX,0x395e7
SUB ESP,0xc
MOV EDI,dword ptr [ESP + 0x20]
MOV EDX,dword ptr [ESP + 0x24]
MOV EAX,EDI
CALL 0x000356f0
TEST EAX,EAX
JNZ 0x00036a40
ADD ESP,0xc
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EAX,[EDI + 0x8]
CALL 0x00034e50
MOV EBP,EAX
TEST EAX,EAX
JZ 0x00036a35
MOV EAX,dword ptr [EDI + 0x4]
TEST EAX,EAX
JZ 0x00036a77
XOR ESI,ESI
LEA ESI,[ESI]
NOP
SUB ESP,0x8
PUSH dword ptr [EDI]
ADD ESI,0x1
PUSH 0x20
CALL 0x00013690
ADD ESP,0x10
CMP ESI,dword ptr [EDI + 0x4]
JC 0x00036a60
SUB ESP,0x4
LEA EAX,[EBX + 0xfffe4298]
PUSH EBP
PUSH EAX
PUSH dword ptr [EDI]
CALL 0x00013868
MOV dword ptr [ESP],EBP
CALL 0x00013120
ADD ESP,0x10
MOV EAX,0x1
ADD ESP,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 FUN_00036a10(undefined4 *param_1)\n\n{\n  int iVar1;\n  void *__ptr;\n  uint uVar2;\n  \n  iVar1 = FUN_000356f0();\n  if (iVar1 != 0) {\n    __ptr = (void *)FUN_00034e50();\n    if (__ptr != (void *)0x0) {\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }\n  return 0;\n}\n\n" comment (function_definition "undefined4 FUN_00036a10(undefined4 *param_1)\n\n{\n  int iVar1;\n  void *__ptr;\n  uint uVar2;\n  \n  iVar1 = FUN_000356f0();\n  if (iVar1 != 0) {\n    __ptr = (void *)FUN_00034e50();\n    if (__ptr != (void *)0x0) {\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_00036a10(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  void *__ptr;\n  uint uVar2;\n  \n  iVar1 = FUN_000356f0();\n  if (iVar1 != 0) {\n    __ptr = (void *)FUN_00034e50();\n    if (__ptr != (void *)0x0) {\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = FUN_000356f0();" (assignment_expression "iVar1 = FUN_000356f0()" identifier = (call_expression "FUN_000356f0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n    __ptr = (void *)FUN_00034e50();\n    if (__ptr != (void *)0x0) {\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    __ptr = (void *)FUN_00034e50();\n    if (__ptr != (void *)0x0) {\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }" { (expression_statement "__ptr = (void *)FUN_00034e50();" (assignment_expression "__ptr = (void *)FUN_00034e50()" identifier = (cast_expression "(void *)FUN_00034e50()" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00034e50()" identifier (argument_list "()" ( ))))) ;) (if_statement "if (__ptr != (void *)0x0) {\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }" if (parenthesized_expression "(__ptr != (void *)0x0)" ( (binary_expression "__ptr != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }" { (if_statement "if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }" if (parenthesized_expression "(param_1[1] != 0)" ( (binary_expression "param_1[1] != 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (do_statement "do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);" do (compound_statement "{\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        }" { (expression_statement "uVar2 = uVar2 + 1;" (assignment_expression "uVar2 = uVar2 + 1" identifier = (binary_expression "uVar2 + 1" identifier + number_literal)) ;) (expression_statement "putc(0x20,(FILE *)*param_1);" (call_expression "putc(0x20,(FILE *)*param_1)" identifier (argument_list "(0x20,(FILE *)*param_1)" ( number_literal , (cast_expression "(FILE *)*param_1" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) ))) ;) }) while (parenthesized_expression "(uVar2 < (uint)param_1[1])" ( (binary_expression "uVar2 < (uint)param_1[1]" identifier < (cast_expression "(uint)param_1[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) )) ;) })) (expression_statement "fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);" (call_expression "fprintf((FILE *)*param_1,"typedef %s;\n",__ptr)" identifier (argument_list "((FILE *)*param_1,"typedef %s;\n",__ptr)" ( (cast_expression "(FILE *)*param_1" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) , (string_literal ""typedef %s;\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (return_statement "return 1;" return number_literal ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nbfd_boolean pr_typdef(void *p,char *name)\n\n{\n  bfd_boolean bVar1;\n  char *__ptr;\n  uint uVar2;\n  \n  bVar1 = substitute_type((pr_handle *)p,name);\n  if (bVar1 != 0) {\n    __ptr = pop_type((pr_handle *)((int)p + 8));\n    if (__ptr != (char *)0x0) {\n      if (*(int *)((int)p + 4) != 0) {\n        uVar2 = 0;\n        do {\n                    /* WARNING: Load size is inaccurate */\n          uVar2 = uVar2 + 1;\n          putc(0x20,*p);\n        } while (uVar2 < *(uint *)((int)p + 4));\n      }\n                    /* WARNING: Load size is inaccurate */\n      fprintf(*p,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }\n  return 0;\n}\n\n" comment comment (function_definition "bfd_boolean pr_typdef(void *p,char *name)\n\n{\n  bfd_boolean bVar1;\n  char *__ptr;\n  uint uVar2;\n  \n  bVar1 = substitute_type((pr_handle *)p,name);\n  if (bVar1 != 0) {\n    __ptr = pop_type((pr_handle *)((int)p + 8));\n    if (__ptr != (char *)0x0) {\n      if (*(int *)((int)p + 4) != 0) {\n        uVar2 = 0;\n        do {\n                    /* WARNING: Load size is inaccurate */\n          uVar2 = uVar2 + 1;\n          putc(0x20,*p);\n        } while (uVar2 < *(uint *)((int)p + 4));\n      }\n                    /* WARNING: Load size is inaccurate */\n      fprintf(*p,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }\n  return 0;\n}" type_identifier (function_declarator "pr_typdef(void *p,char *name)" identifier (parameter_list "(void *p,char *name)" ( (parameter_declaration "void *p" primitive_type (pointer_declarator "*p" * identifier)) , (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) ))) (compound_statement "{\n  bfd_boolean bVar1;\n  char *__ptr;\n  uint uVar2;\n  \n  bVar1 = substitute_type((pr_handle *)p,name);\n  if (bVar1 != 0) {\n    __ptr = pop_type((pr_handle *)((int)p + 8));\n    if (__ptr != (char *)0x0) {\n      if (*(int *)((int)p + 4) != 0) {\n        uVar2 = 0;\n        do {\n                    /* WARNING: Load size is inaccurate */\n          uVar2 = uVar2 + 1;\n          putc(0x20,*p);\n        } while (uVar2 < *(uint *)((int)p + 4));\n      }\n                    /* WARNING: Load size is inaccurate */\n      fprintf(*p,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }\n  return 0;\n}" { (declaration "bfd_boolean bVar1;" type_identifier identifier ;) (declaration "char *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "bVar1 = substitute_type((pr_handle *)p,name);" (assignment_expression "bVar1 = substitute_type((pr_handle *)p,name)" identifier = (call_expression "substitute_type((pr_handle *)p,name)" identifier (argument_list "((pr_handle *)p,name)" ( (cast_expression "(pr_handle *)p" ( (type_descriptor "pr_handle *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier )))) ;) (if_statement "if (bVar1 != 0) {\n    __ptr = pop_type((pr_handle *)((int)p + 8));\n    if (__ptr != (char *)0x0) {\n      if (*(int *)((int)p + 4) != 0) {\n        uVar2 = 0;\n        do {\n                    /* WARNING: Load size is inaccurate */\n          uVar2 = uVar2 + 1;\n          putc(0x20,*p);\n        } while (uVar2 < *(uint *)((int)p + 4));\n      }\n                    /* WARNING: Load size is inaccurate */\n      fprintf(*p,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }" if (parenthesized_expression "(bVar1 != 0)" ( (binary_expression "bVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    __ptr = pop_type((pr_handle *)((int)p + 8));\n    if (__ptr != (char *)0x0) {\n      if (*(int *)((int)p + 4) != 0) {\n        uVar2 = 0;\n        do {\n                    /* WARNING: Load size is inaccurate */\n          uVar2 = uVar2 + 1;\n          putc(0x20,*p);\n        } while (uVar2 < *(uint *)((int)p + 4));\n      }\n                    /* WARNING: Load size is inaccurate */\n      fprintf(*p,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }" { (expression_statement "__ptr = pop_type((pr_handle *)((int)p + 8));" (assignment_expression "__ptr = pop_type((pr_handle *)((int)p + 8))" identifier = (call_expression "pop_type((pr_handle *)((int)p + 8))" identifier (argument_list "((pr_handle *)((int)p + 8))" ( (cast_expression "(pr_handle *)((int)p + 8)" ( (type_descriptor "pr_handle *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)p + 8)" ( (binary_expression "(int)p + 8" (cast_expression "(int)p" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) )))) ;) (if_statement "if (__ptr != (char *)0x0) {\n      if (*(int *)((int)p + 4) != 0) {\n        uVar2 = 0;\n        do {\n                    /* WARNING: Load size is inaccurate */\n          uVar2 = uVar2 + 1;\n          putc(0x20,*p);\n        } while (uVar2 < *(uint *)((int)p + 4));\n      }\n                    /* WARNING: Load size is inaccurate */\n      fprintf(*p,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }" if (parenthesized_expression "(__ptr != (char *)0x0)" ( (binary_expression "__ptr != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      if (*(int *)((int)p + 4) != 0) {\n        uVar2 = 0;\n        do {\n                    /* WARNING: Load size is inaccurate */\n          uVar2 = uVar2 + 1;\n          putc(0x20,*p);\n        } while (uVar2 < *(uint *)((int)p + 4));\n      }\n                    /* WARNING: Load size is inaccurate */\n      fprintf(*p,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }" { (if_statement "if (*(int *)((int)p + 4) != 0) {\n        uVar2 = 0;\n        do {\n                    /* WARNING: Load size is inaccurate */\n          uVar2 = uVar2 + 1;\n          putc(0x20,*p);\n        } while (uVar2 < *(uint *)((int)p + 4));\n      }" if (parenthesized_expression "(*(int *)((int)p + 4) != 0)" ( (binary_expression "*(int *)((int)p + 4) != 0" (pointer_expression "*(int *)((int)p + 4)" * (cast_expression "(int *)((int)p + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)p + 4)" ( (binary_expression "(int)p + 4" (cast_expression "(int)p" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != number_literal) )) (compound_statement "{\n        uVar2 = 0;\n        do {\n                    /* WARNING: Load size is inaccurate */\n          uVar2 = uVar2 + 1;\n          putc(0x20,*p);\n        } while (uVar2 < *(uint *)((int)p + 4));\n      }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (do_statement "do {\n                    /* WARNING: Load size is inaccurate */\n          uVar2 = uVar2 + 1;\n          putc(0x20,*p);\n        } while (uVar2 < *(uint *)((int)p + 4));" do (compound_statement "{\n                    /* WARNING: Load size is inaccurate */\n          uVar2 = uVar2 + 1;\n          putc(0x20,*p);\n        }" { comment (expression_statement "uVar2 = uVar2 + 1;" (assignment_expression "uVar2 = uVar2 + 1" identifier = (binary_expression "uVar2 + 1" identifier + number_literal)) ;) (expression_statement "putc(0x20,*p);" (call_expression "putc(0x20,*p)" identifier (argument_list "(0x20,*p)" ( number_literal , (pointer_expression "*p" * identifier) ))) ;) }) while (parenthesized_expression "(uVar2 < *(uint *)((int)p + 4))" ( (binary_expression "uVar2 < *(uint *)((int)p + 4)" identifier < (pointer_expression "*(uint *)((int)p + 4)" * (cast_expression "(uint *)((int)p + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)p + 4)" ( (binary_expression "(int)p + 4" (cast_expression "(int)p" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) )) ;) })) comment (expression_statement "fprintf(*p,"typedef %s;\n",__ptr);" (call_expression "fprintf(*p,"typedef %s;\n",__ptr)" identifier (argument_list "(*p,"typedef %s;\n",__ptr)" ( (pointer_expression "*p" * identifier) , (string_literal ""typedef %s;\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (return_statement "return 1;" return number_literal ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_00036a10(undefined4 *param_1)\n\n{\n  int iVar1;\n  void *__ptr;\n  uint uVar2;\n  \n  iVar1 = FUN_000356f0();\n  if (iVar1 != 0) {\n    __ptr = (void *)FUN_00034e50();\n    if (__ptr != (void *)0x0) {\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_00036a10(undefined4 *param_1)\n\n{\n  int iVar1;\n  void *__ptr;\n  uint uVar2;\n  \n  iVar1 = FUN_000356f0();\n  if (iVar1 != 0) {\n    __ptr = (void *)FUN_00034e50();\n    if (__ptr != (void *)0x0) {\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_00036a10(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  void *__ptr;\n  uint uVar2;\n  \n  iVar1 = FUN_000356f0();\n  if (iVar1 != 0) {\n    __ptr = (void *)FUN_00034e50();\n    if (__ptr != (void *)0x0) {\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = FUN_000356f0();" (assignment_expression "iVar1 = FUN_000356f0()" identifier = (call_expression "FUN_000356f0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n    __ptr = (void *)FUN_00034e50();\n    if (__ptr != (void *)0x0) {\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    __ptr = (void *)FUN_00034e50();\n    if (__ptr != (void *)0x0) {\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }" { (expression_statement "__ptr = (void *)FUN_00034e50();" (assignment_expression "__ptr = (void *)FUN_00034e50()" identifier = (cast_expression "(void *)FUN_00034e50()" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00034e50()" identifier (argument_list "()" ( ))))) ;) (if_statement "if (__ptr != (void *)0x0) {\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }" if (parenthesized_expression "(__ptr != (void *)0x0)" ( (binary_expression "__ptr != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }" { (if_statement "if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }" if (parenthesized_expression "(param_1[1] != 0)" ( (binary_expression "param_1[1] != 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (do_statement "do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);" do (compound_statement "{\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        }" { (expression_statement "uVar2 = uVar2 + 1;" (assignment_expression "uVar2 = uVar2 + 1" identifier = (binary_expression "uVar2 + 1" identifier + number_literal)) ;) (expression_statement "putc(0x20,(FILE *)*param_1);" (call_expression "putc(0x20,(FILE *)*param_1)" identifier (argument_list "(0x20,(FILE *)*param_1)" ( number_literal , (cast_expression "(FILE *)*param_1" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) ))) ;) }) while (parenthesized_expression "(uVar2 < (uint)param_1[1])" ( (binary_expression "uVar2 < (uint)param_1[1]" identifier < (cast_expression "(uint)param_1[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) )) ;) })) (expression_statement "fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);" (call_expression "fprintf((FILE *)*param_1,"typedef %s;\n",__ptr)" identifier (argument_list "((FILE *)*param_1,"typedef %s;\n",__ptr)" ( (cast_expression "(FILE *)*param_1" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) , (string_literal ""typedef %s;\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (return_statement "return 1;" return number_literal ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( LIT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) ))) ;) }) while (parenthesized_expression ( (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) )) ;) })) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) , (string_literal " string_content escape_sequence ") , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return LIT ;) })) })) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_00036a10(undefined4 *param_1)\n\n{\n  int iVar1;\n  void *__ptr;\n  uint uVar2;\n  \n  iVar1 = FUN_000356f0();\n  if (iVar1 != 0) {\n    __ptr = (void *)FUN_00034e50();\n    if (__ptr != (void *)0x0) {\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_00036a10(undefined4 *param_1)" (identifier "FUN_00036a10") (parameter_list "(undefined4 *param_1)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  void *__ptr;\n  uint uVar2;\n  \n  iVar1 = FUN_000356f0();\n  if (iVar1 != 0) {\n    __ptr = (void *)FUN_00034e50();\n    if (__ptr != (void *)0x0) {\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "void *__ptr;" (primitive_type "void") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (expression_statement "iVar1 = FUN_000356f0();" (assignment_expression "iVar1 = FUN_000356f0()" (identifier "iVar1") (= "=") (call_expression "FUN_000356f0()" (identifier "FUN_000356f0") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    __ptr = (void *)FUN_00034e50();\n    if (__ptr != (void *)0x0) {\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    __ptr = (void *)FUN_00034e50();\n    if (__ptr != (void *)0x0) {\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }\n  }" ({ "{") (expression_statement "__ptr = (void *)FUN_00034e50();" (assignment_expression "__ptr = (void *)FUN_00034e50()" (identifier "__ptr") (= "=") (cast_expression "(void *)FUN_00034e50()" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00034e50()" (identifier "FUN_00034e50") (argument_list "()" (( "(") () ")"))))) (; ";")) (if_statement "if (__ptr != (void *)0x0) {\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }" (if "if") (parenthesized_expression "(__ptr != (void *)0x0)" (( "(") (binary_expression "__ptr != (void *)0x0" (identifier "__ptr") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }\n      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);\n      free(__ptr);\n      return 1;\n    }" ({ "{") (if_statement "if (param_1[1] != 0) {\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }" (if "if") (parenthesized_expression "(param_1[1] != 0)" (( "(") (binary_expression "param_1[1] != 0" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        uVar2 = 0;\n        do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);\n      }" ({ "{") (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        } while (uVar2 < (uint)param_1[1]);" (do "do") (compound_statement "{\n          uVar2 = uVar2 + 1;\n          putc(0x20,(FILE *)*param_1);\n        }" ({ "{") (expression_statement "uVar2 = uVar2 + 1;" (assignment_expression "uVar2 = uVar2 + 1" (identifier "uVar2") (= "=") (binary_expression "uVar2 + 1" (identifier "uVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "putc(0x20,(FILE *)*param_1);" (call_expression "putc(0x20,(FILE *)*param_1)" (identifier "putc") (argument_list "(0x20,(FILE *)*param_1)" (( "(") (number_literal "0x20") (, ",") (cast_expression "(FILE *)*param_1" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar2 < (uint)param_1[1])" (( "(") (binary_expression "uVar2 < (uint)param_1[1]" (identifier "uVar2") (< "<") (cast_expression "(uint)param_1[1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")))) () ")")) (; ";")) (} "}"))) (expression_statement "fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);" (call_expression "fprintf((FILE *)*param_1,"typedef %s;\n",__ptr)" (identifier "fprintf") (argument_list "((FILE *)*param_1,"typedef %s;\n",__ptr)" (( "(") (cast_expression "(FILE *)*param_1" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (, ",") (string_literal ""typedef %s;\n"" (" """) (string_content "typedef %s;") (escape_sequence "\n") (" """)) (, ",") (identifier "__ptr") () ")"))) (; ";")) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* 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_1 var_2;
  char *var_4;
  type_2 var_5;
  
  var_2 = var_1((type_3 *)p,name);
  if (var_2 != 0) {
    var_4 = var_3((type_3 *)((int)p + 8));
    if (var_4 != (char *)0x0) {
      if (*(int *)((int)p + 4) != 0) {
        var_5 = 0;
        do {
                    /* WARNING: Load size is inaccurate */
          var_5 = var_5 + 1;
          var_6(0x20,*p);
        } while (var_5 < *(type_2 *)((int)p + 4));
      }
                    /* WARNING: Load size is inaccurate */
      var_7(*p,"typedef %s;\n",var_4);
      var_8(var_4);
      return 1;
    }
  }
  return 0;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal) (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (identifier) index: (number_literal)))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))) (string_literal (string_content) (escape_sequence)) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement (number_literal)))))) (return_statement (number_literal)))))

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

undefined4 MASKED(undefined4 *param_1)

{
  int iVar1;
  void *__ptr;
  uint uVar2;
  
  iVar1 = FUN_000356f0();
  if (iVar1 != 0) {
    __ptr = (void *)FUN_00034e50();
    if (__ptr != (void *)0x0) {
      if (param_1[1] != 0) {
        uVar2 = 0;
        do {
          uVar2 = uVar2 + 1;
          putc(0x20,(FILE *)*param_1);
        } while (uVar2 < (uint)param_1[1]);
      }
      fprintf((FILE *)*param_1,"typedef %s;\n",__ptr);
      free(__ptr);
      return 1;
    }
  }
  return 0;
}

