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

int xatexit(_func_void *fn)

{
  xatexit *pxVar1;
  xatexit *pxVar2;
  int iVar3;
  int iVar4;
  
  if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {
    *(code **)PTR__xexit_cleanup_0007ffbc = xatexit_cleanup;
  }
  pxVar1 = xatexit_head;
  iVar3 = xatexit_head->ind;
  iVar4 = iVar3 + 1;
  if (0x1f < iVar3) {
    pxVar2 = (xatexit *)malloc(0x88);
    if (pxVar2 == (xatexit *)0x0) {
      return -1;
    }
    pxVar2->next = pxVar1;
    iVar4 = 1;
    pxVar2->ind = 0;
    iVar3 = 0;
    xatexit_head = pxVar2;
  }
  pxVar1 = xatexit_head;
  xatexit_head->ind = iVar4;
  pxVar1->fns[iVar3] = fn;
  return 0;
}



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

undefined4 FUN_00059930(undefined4 param_1)

{
  undefined *puVar1;
  undefined4 *puVar2;
  int iVar3;
  int iVar4;
  
  if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {
    *(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;
  }
  puVar1 = PTR_DAT_00080720;
  iVar3 = *(int *)(PTR_DAT_00080720 + 4);
  iVar4 = iVar3 + 1;
  if (0x1f < iVar3) {
    puVar2 = (undefined4 *)malloc(0x88);
    if (puVar2 == (undefined4 *)0x0) {
      return 0xffffffff;
    }
    *puVar2 = puVar1;
    iVar4 = 1;
    puVar2[1] = 0;
    iVar3 = 0;
    PTR_DAT_00080720 = (undefined *)puVar2;
  }
  puVar1 = PTR_DAT_00080720;
  *(int *)(PTR_DAT_00080720 + 4) = iVar4;
  *(undefined4 *)(puVar1 + iVar3 * 4 + 8) = param_1;
  return 0;
}


PUSH ESI
PUSH EBX
CALL 0x00016000
ADD EBX,0x266c9
SUB ESP,0x4
MOV EAX,dword ptr [EBX + 0xffffffbc]
MOV EDX,dword ptr [EAX]
TEST EDX,EDX
JZ 0x000599a0
MOV ESI,dword ptr [EBX + 0x720]
MOV EAX,dword ptr [ESI + 0x4]
LEA EDX,[EAX + 0x1]
CMP EAX,0x1f
JG 0x00059970
MOV dword ptr [ESI + 0x4],EDX
MOV EDX,dword ptr [ESP + 0x10]
MOV dword ptr [ESI + EAX*0x4 + 0x8],EDX
XOR EAX,EAX
ADD ESP,0x4
POP EBX
POP ESI
RET
SUB ESP,0xc
PUSH 0x88
CALL 0x00014370
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000599aa
MOV dword ptr [EAX],ESI
MOV EDX,0x1
MOV ESI,EAX
MOV dword ptr [EAX + 0x4],0x0
MOV dword ptr [EBX + 0x720],EAX
XOR EAX,EAX
JMP 0x0005995d
LEA EDX,[EBX + 0xfffd98e0]
MOV dword ptr [EAX],EDX
JMP 0x0005994c
MOV EAX,0xffffffff
JMP 0x0005996a
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_00059930(undefined4 param_1)\n\n{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {\n    *(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;\n  }\n  puVar1 = PTR_DAT_00080720;\n  iVar3 = *(int *)(PTR_DAT_00080720 + 4);\n  iVar4 = iVar3 + 1;\n  if (0x1f < iVar3) {\n    puVar2 = (undefined4 *)malloc(0x88);\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0xffffffff;\n    }\n    *puVar2 = puVar1;\n    iVar4 = 1;\n    puVar2[1] = 0;\n    iVar3 = 0;\n    PTR_DAT_00080720 = (undefined *)puVar2;\n  }\n  puVar1 = PTR_DAT_00080720;\n  *(int *)(PTR_DAT_00080720 + 4) = iVar4;\n  *(undefined4 *)(puVar1 + iVar3 * 4 + 8) = param_1;\n  return 0;\n}\n\n" comment (function_definition "undefined4 FUN_00059930(undefined4 param_1)\n\n{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {\n    *(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;\n  }\n  puVar1 = PTR_DAT_00080720;\n  iVar3 = *(int *)(PTR_DAT_00080720 + 4);\n  iVar4 = iVar3 + 1;\n  if (0x1f < iVar3) {\n    puVar2 = (undefined4 *)malloc(0x88);\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0xffffffff;\n    }\n    *puVar2 = puVar1;\n    iVar4 = 1;\n    puVar2[1] = 0;\n    iVar3 = 0;\n    PTR_DAT_00080720 = (undefined *)puVar2;\n  }\n  puVar1 = PTR_DAT_00080720;\n  *(int *)(PTR_DAT_00080720 + 4) = iVar4;\n  *(undefined4 *)(puVar1 + iVar3 * 4 + 8) = param_1;\n  return 0;\n}" type_identifier (function_declarator "FUN_00059930(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {\n    *(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;\n  }\n  puVar1 = PTR_DAT_00080720;\n  iVar3 = *(int *)(PTR_DAT_00080720 + 4);\n  iVar4 = iVar3 + 1;\n  if (0x1f < iVar3) {\n    puVar2 = (undefined4 *)malloc(0x88);\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0xffffffff;\n    }\n    *puVar2 = puVar1;\n    iVar4 = 1;\n    puVar2[1] = 0;\n    iVar3 = 0;\n    PTR_DAT_00080720 = (undefined *)puVar2;\n  }\n  puVar1 = PTR_DAT_00080720;\n  *(int *)(PTR_DAT_00080720 + 4) = iVar4;\n  *(undefined4 *)(puVar1 + iVar3 * 4 + 8) = param_1;\n  return 0;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (if_statement "if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {\n    *(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;\n  }" if (parenthesized_expression "(*(int *)PTR__xexit_cleanup_0007ffbc == 0)" ( (binary_expression "*(int *)PTR__xexit_cleanup_0007ffbc == 0" (pointer_expression "*(int *)PTR__xexit_cleanup_0007ffbc" * (cast_expression "(int *)PTR__xexit_cleanup_0007ffbc" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) == number_literal) )) (compound_statement "{\n    *(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;\n  }" { (expression_statement "*(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;" (assignment_expression "*(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0" (pointer_expression "*(code **)PTR__xexit_cleanup_0007ffbc" * (cast_expression "(code **)PTR__xexit_cleanup_0007ffbc" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) })) (expression_statement "puVar1 = PTR_DAT_00080720;" (assignment_expression "puVar1 = PTR_DAT_00080720" identifier = identifier) ;) (expression_statement "iVar3 = *(int *)(PTR_DAT_00080720 + 4);" (assignment_expression "iVar3 = *(int *)(PTR_DAT_00080720 + 4)" identifier = (pointer_expression "*(int *)(PTR_DAT_00080720 + 4)" * (cast_expression "(int *)(PTR_DAT_00080720 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_00080720 + 4)" ( (binary_expression "PTR_DAT_00080720 + 4" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = iVar3 + 1;" (assignment_expression "iVar4 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (if_statement "if (0x1f < iVar3) {\n    puVar2 = (undefined4 *)malloc(0x88);\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0xffffffff;\n    }\n    *puVar2 = puVar1;\n    iVar4 = 1;\n    puVar2[1] = 0;\n    iVar3 = 0;\n    PTR_DAT_00080720 = (undefined *)puVar2;\n  }" if (parenthesized_expression "(0x1f < iVar3)" ( (binary_expression "0x1f < iVar3" number_literal < identifier) )) (compound_statement "{\n    puVar2 = (undefined4 *)malloc(0x88);\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0xffffffff;\n    }\n    *puVar2 = puVar1;\n    iVar4 = 1;\n    puVar2[1] = 0;\n    iVar3 = 0;\n    PTR_DAT_00080720 = (undefined *)puVar2;\n  }" { (expression_statement "puVar2 = (undefined4 *)malloc(0x88);" (assignment_expression "puVar2 = (undefined4 *)malloc(0x88)" identifier = (cast_expression "(undefined4 *)malloc(0x88)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(0x88)" identifier (argument_list "(0x88)" ( number_literal ))))) ;) (if_statement "if (puVar2 == (undefined4 *)0x0) {\n      return 0xffffffff;\n    }" if (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" ( (binary_expression "puVar2 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0xffffffff;\n    }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "*puVar2 = puVar1;" (assignment_expression "*puVar2 = puVar1" (pointer_expression "*puVar2" * identifier) = identifier) ;) (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) (expression_statement "puVar2[1] = 0;" (assignment_expression "puVar2[1] = 0" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "PTR_DAT_00080720 = (undefined *)puVar2;" (assignment_expression "PTR_DAT_00080720 = (undefined *)puVar2" identifier = (cast_expression "(undefined *)puVar2" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) })) (expression_statement "puVar1 = PTR_DAT_00080720;" (assignment_expression "puVar1 = PTR_DAT_00080720" identifier = identifier) ;) (expression_statement "*(int *)(PTR_DAT_00080720 + 4) = iVar4;" (assignment_expression "*(int *)(PTR_DAT_00080720 + 4) = iVar4" (pointer_expression "*(int *)(PTR_DAT_00080720 + 4)" * (cast_expression "(int *)(PTR_DAT_00080720 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_00080720 + 4)" ( (binary_expression "PTR_DAT_00080720 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(puVar1 + iVar3 * 4 + 8) = param_1;" (assignment_expression "*(undefined4 *)(puVar1 + iVar3 * 4 + 8) = param_1" (pointer_expression "*(undefined4 *)(puVar1 + iVar3 * 4 + 8)" * (cast_expression "(undefined4 *)(puVar1 + iVar3 * 4 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + iVar3 * 4 + 8)" ( (binary_expression "puVar1 + iVar3 * 4 + 8" (binary_expression "puVar1 + iVar3 * 4" identifier + (binary_expression "iVar3 * 4" identifier * number_literal)) + number_literal) )))) = identifier) ;) (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\nint xatexit(_func_void *fn)\n\n{\n  xatexit *pxVar1;\n  xatexit *pxVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {\n    *(code **)PTR__xexit_cleanup_0007ffbc = xatexit_cleanup;\n  }\n  pxVar1 = xatexit_head;\n  iVar3 = xatexit_head->ind;\n  iVar4 = iVar3 + 1;\n  if (0x1f < iVar3) {\n    pxVar2 = (xatexit *)malloc(0x88);\n    if (pxVar2 == (xatexit *)0x0) {\n      return -1;\n    }\n    pxVar2->next = pxVar1;\n    iVar4 = 1;\n    pxVar2->ind = 0;\n    iVar3 = 0;\n    xatexit_head = pxVar2;\n  }\n  pxVar1 = xatexit_head;\n  xatexit_head->ind = iVar4;\n  pxVar1->fns[iVar3] = fn;\n  return 0;\n}\n\n" comment comment (function_definition "int xatexit(_func_void *fn)\n\n{\n  xatexit *pxVar1;\n  xatexit *pxVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {\n    *(code **)PTR__xexit_cleanup_0007ffbc = xatexit_cleanup;\n  }\n  pxVar1 = xatexit_head;\n  iVar3 = xatexit_head->ind;\n  iVar4 = iVar3 + 1;\n  if (0x1f < iVar3) {\n    pxVar2 = (xatexit *)malloc(0x88);\n    if (pxVar2 == (xatexit *)0x0) {\n      return -1;\n    }\n    pxVar2->next = pxVar1;\n    iVar4 = 1;\n    pxVar2->ind = 0;\n    iVar3 = 0;\n    xatexit_head = pxVar2;\n  }\n  pxVar1 = xatexit_head;\n  xatexit_head->ind = iVar4;\n  pxVar1->fns[iVar3] = fn;\n  return 0;\n}" primitive_type (function_declarator "xatexit(_func_void *fn)" identifier (parameter_list "(_func_void *fn)" ( (parameter_declaration "_func_void *fn" type_identifier (pointer_declarator "*fn" * identifier)) ))) (compound_statement "{\n  xatexit *pxVar1;\n  xatexit *pxVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {\n    *(code **)PTR__xexit_cleanup_0007ffbc = xatexit_cleanup;\n  }\n  pxVar1 = xatexit_head;\n  iVar3 = xatexit_head->ind;\n  iVar4 = iVar3 + 1;\n  if (0x1f < iVar3) {\n    pxVar2 = (xatexit *)malloc(0x88);\n    if (pxVar2 == (xatexit *)0x0) {\n      return -1;\n    }\n    pxVar2->next = pxVar1;\n    iVar4 = 1;\n    pxVar2->ind = 0;\n    iVar3 = 0;\n    xatexit_head = pxVar2;\n  }\n  pxVar1 = xatexit_head;\n  xatexit_head->ind = iVar4;\n  pxVar1->fns[iVar3] = fn;\n  return 0;\n}" { (declaration "xatexit *pxVar1;" type_identifier (pointer_declarator "*pxVar1" * identifier) ;) (declaration "xatexit *pxVar2;" type_identifier (pointer_declarator "*pxVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (if_statement "if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {\n    *(code **)PTR__xexit_cleanup_0007ffbc = xatexit_cleanup;\n  }" if (parenthesized_expression "(*(int *)PTR__xexit_cleanup_0007ffbc == 0)" ( (binary_expression "*(int *)PTR__xexit_cleanup_0007ffbc == 0" (pointer_expression "*(int *)PTR__xexit_cleanup_0007ffbc" * (cast_expression "(int *)PTR__xexit_cleanup_0007ffbc" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) == number_literal) )) (compound_statement "{\n    *(code **)PTR__xexit_cleanup_0007ffbc = xatexit_cleanup;\n  }" { (expression_statement "*(code **)PTR__xexit_cleanup_0007ffbc = xatexit_cleanup;" (assignment_expression "*(code **)PTR__xexit_cleanup_0007ffbc = xatexit_cleanup" (pointer_expression "*(code **)PTR__xexit_cleanup_0007ffbc" * (cast_expression "(code **)PTR__xexit_cleanup_0007ffbc" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) })) (expression_statement "pxVar1 = xatexit_head;" (assignment_expression "pxVar1 = xatexit_head" identifier = identifier) ;) (expression_statement "iVar3 = xatexit_head->ind;" (assignment_expression "iVar3 = xatexit_head->ind" identifier = (field_expression "xatexit_head->ind" identifier -> field_identifier)) ;) (expression_statement "iVar4 = iVar3 + 1;" (assignment_expression "iVar4 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (if_statement "if (0x1f < iVar3) {\n    pxVar2 = (xatexit *)malloc(0x88);\n    if (pxVar2 == (xatexit *)0x0) {\n      return -1;\n    }\n    pxVar2->next = pxVar1;\n    iVar4 = 1;\n    pxVar2->ind = 0;\n    iVar3 = 0;\n    xatexit_head = pxVar2;\n  }" if (parenthesized_expression "(0x1f < iVar3)" ( (binary_expression "0x1f < iVar3" number_literal < identifier) )) (compound_statement "{\n    pxVar2 = (xatexit *)malloc(0x88);\n    if (pxVar2 == (xatexit *)0x0) {\n      return -1;\n    }\n    pxVar2->next = pxVar1;\n    iVar4 = 1;\n    pxVar2->ind = 0;\n    iVar3 = 0;\n    xatexit_head = pxVar2;\n  }" { (expression_statement "pxVar2 = (xatexit *)malloc(0x88);" (assignment_expression "pxVar2 = (xatexit *)malloc(0x88)" identifier = (cast_expression "(xatexit *)malloc(0x88)" ( (type_descriptor "xatexit *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(0x88)" identifier (argument_list "(0x88)" ( number_literal ))))) ;) (if_statement "if (pxVar2 == (xatexit *)0x0) {\n      return -1;\n    }" if (parenthesized_expression "(pxVar2 == (xatexit *)0x0)" ( (binary_expression "pxVar2 == (xatexit *)0x0" identifier == (cast_expression "(xatexit *)0x0" ( (type_descriptor "xatexit *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "pxVar2->next = pxVar1;" (assignment_expression "pxVar2->next = pxVar1" (field_expression "pxVar2->next" identifier -> field_identifier) = identifier) ;) (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) (expression_statement "pxVar2->ind = 0;" (assignment_expression "pxVar2->ind = 0" (field_expression "pxVar2->ind" identifier -> field_identifier) = number_literal) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "xatexit_head = pxVar2;" (assignment_expression "xatexit_head = pxVar2" identifier = identifier) ;) })) (expression_statement "pxVar1 = xatexit_head;" (assignment_expression "pxVar1 = xatexit_head" identifier = identifier) ;) (expression_statement "xatexit_head->ind = iVar4;" (assignment_expression "xatexit_head->ind = iVar4" (field_expression "xatexit_head->ind" identifier -> field_identifier) = identifier) ;) (expression_statement "pxVar1->fns[iVar3] = fn;" (assignment_expression "pxVar1->fns[iVar3] = fn" (subscript_expression "pxVar1->fns[iVar3]" (field_expression "pxVar1->fns" identifier -> field_identifier) [ identifier ]) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_00059930(undefined4 param_1)\n\n{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {\n    *(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;\n  }\n  puVar1 = PTR_DAT_00080720;\n  iVar3 = *(int *)(PTR_DAT_00080720 + 4);\n  iVar4 = iVar3 + 1;\n  if (0x1f < iVar3) {\n    puVar2 = (undefined4 *)malloc(0x88);\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0xffffffff;\n    }\n    *puVar2 = puVar1;\n    iVar4 = 1;\n    puVar2[1] = 0;\n    iVar3 = 0;\n    PTR_DAT_00080720 = (undefined *)puVar2;\n  }\n  puVar1 = PTR_DAT_00080720;\n  *(int *)(PTR_DAT_00080720 + 4) = iVar4;\n  *(undefined4 *)(puVar1 + iVar3 * 4 + 8) = param_1;\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_00059930(undefined4 param_1)\n\n{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {\n    *(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;\n  }\n  puVar1 = PTR_DAT_00080720;\n  iVar3 = *(int *)(PTR_DAT_00080720 + 4);\n  iVar4 = iVar3 + 1;\n  if (0x1f < iVar3) {\n    puVar2 = (undefined4 *)malloc(0x88);\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0xffffffff;\n    }\n    *puVar2 = puVar1;\n    iVar4 = 1;\n    puVar2[1] = 0;\n    iVar3 = 0;\n    PTR_DAT_00080720 = (undefined *)puVar2;\n  }\n  puVar1 = PTR_DAT_00080720;\n  *(int *)(PTR_DAT_00080720 + 4) = iVar4;\n  *(undefined4 *)(puVar1 + iVar3 * 4 + 8) = param_1;\n  return 0;\n}" type_identifier (function_declarator "FUN_00059930(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {\n    *(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;\n  }\n  puVar1 = PTR_DAT_00080720;\n  iVar3 = *(int *)(PTR_DAT_00080720 + 4);\n  iVar4 = iVar3 + 1;\n  if (0x1f < iVar3) {\n    puVar2 = (undefined4 *)malloc(0x88);\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0xffffffff;\n    }\n    *puVar2 = puVar1;\n    iVar4 = 1;\n    puVar2[1] = 0;\n    iVar3 = 0;\n    PTR_DAT_00080720 = (undefined *)puVar2;\n  }\n  puVar1 = PTR_DAT_00080720;\n  *(int *)(PTR_DAT_00080720 + 4) = iVar4;\n  *(undefined4 *)(puVar1 + iVar3 * 4 + 8) = param_1;\n  return 0;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (if_statement "if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {\n    *(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;\n  }" if (parenthesized_expression "(*(int *)PTR__xexit_cleanup_0007ffbc == 0)" ( (binary_expression "*(int *)PTR__xexit_cleanup_0007ffbc == 0" (pointer_expression "*(int *)PTR__xexit_cleanup_0007ffbc" * (cast_expression "(int *)PTR__xexit_cleanup_0007ffbc" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) == number_literal) )) (compound_statement "{\n    *(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;\n  }" { (expression_statement "*(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;" (assignment_expression "*(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0" (pointer_expression "*(code **)PTR__xexit_cleanup_0007ffbc" * (cast_expression "(code **)PTR__xexit_cleanup_0007ffbc" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) })) (expression_statement "puVar1 = PTR_DAT_00080720;" (assignment_expression "puVar1 = PTR_DAT_00080720" identifier = identifier) ;) (expression_statement "iVar3 = *(int *)(PTR_DAT_00080720 + 4);" (assignment_expression "iVar3 = *(int *)(PTR_DAT_00080720 + 4)" identifier = (pointer_expression "*(int *)(PTR_DAT_00080720 + 4)" * (cast_expression "(int *)(PTR_DAT_00080720 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_00080720 + 4)" ( (binary_expression "PTR_DAT_00080720 + 4" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = iVar3 + 1;" (assignment_expression "iVar4 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (if_statement "if (0x1f < iVar3) {\n    puVar2 = (undefined4 *)malloc(0x88);\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0xffffffff;\n    }\n    *puVar2 = puVar1;\n    iVar4 = 1;\n    puVar2[1] = 0;\n    iVar3 = 0;\n    PTR_DAT_00080720 = (undefined *)puVar2;\n  }" if (parenthesized_expression "(0x1f < iVar3)" ( (binary_expression "0x1f < iVar3" number_literal < identifier) )) (compound_statement "{\n    puVar2 = (undefined4 *)malloc(0x88);\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0xffffffff;\n    }\n    *puVar2 = puVar1;\n    iVar4 = 1;\n    puVar2[1] = 0;\n    iVar3 = 0;\n    PTR_DAT_00080720 = (undefined *)puVar2;\n  }" { (expression_statement "puVar2 = (undefined4 *)malloc(0x88);" (assignment_expression "puVar2 = (undefined4 *)malloc(0x88)" identifier = (cast_expression "(undefined4 *)malloc(0x88)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(0x88)" identifier (argument_list "(0x88)" ( number_literal ))))) ;) (if_statement "if (puVar2 == (undefined4 *)0x0) {\n      return 0xffffffff;\n    }" if (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" ( (binary_expression "puVar2 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0xffffffff;\n    }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "*puVar2 = puVar1;" (assignment_expression "*puVar2 = puVar1" (pointer_expression "*puVar2" * identifier) = identifier) ;) (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) (expression_statement "puVar2[1] = 0;" (assignment_expression "puVar2[1] = 0" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "PTR_DAT_00080720 = (undefined *)puVar2;" (assignment_expression "PTR_DAT_00080720 = (undefined *)puVar2" identifier = (cast_expression "(undefined *)puVar2" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) })) (expression_statement "puVar1 = PTR_DAT_00080720;" (assignment_expression "puVar1 = PTR_DAT_00080720" identifier = identifier) ;) (expression_statement "*(int *)(PTR_DAT_00080720 + 4) = iVar4;" (assignment_expression "*(int *)(PTR_DAT_00080720 + 4) = iVar4" (pointer_expression "*(int *)(PTR_DAT_00080720 + 4)" * (cast_expression "(int *)(PTR_DAT_00080720 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_00080720 + 4)" ( (binary_expression "PTR_DAT_00080720 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(puVar1 + iVar3 * 4 + 8) = param_1;" (assignment_expression "*(undefined4 *)(puVar1 + iVar3 * 4 + 8) = param_1" (pointer_expression "*(undefined4 *)(puVar1 + iVar3 * 4 + 8)" * (cast_expression "(undefined4 *)(puVar1 + iVar3 * 4 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + iVar3 * 4 + 8)" ( (binary_expression "puVar1 + iVar3 * 4 + 8" (binary_expression "puVar1 + iVar3 * 4" identifier + (binary_expression "iVar3 * 4" identifier * number_literal)) + number_literal) )))) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT)) = IDENT) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + (binary_expression IDENT * LIT)) + LIT) )))) = IDENT) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_00059930(undefined4 param_1)\n\n{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {\n    *(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;\n  }\n  puVar1 = PTR_DAT_00080720;\n  iVar3 = *(int *)(PTR_DAT_00080720 + 4);\n  iVar4 = iVar3 + 1;\n  if (0x1f < iVar3) {\n    puVar2 = (undefined4 *)malloc(0x88);\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0xffffffff;\n    }\n    *puVar2 = puVar1;\n    iVar4 = 1;\n    puVar2[1] = 0;\n    iVar3 = 0;\n    PTR_DAT_00080720 = (undefined *)puVar2;\n  }\n  puVar1 = PTR_DAT_00080720;\n  *(int *)(PTR_DAT_00080720 + 4) = iVar4;\n  *(undefined4 *)(puVar1 + iVar3 * 4 + 8) = param_1;\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_00059930(undefined4 param_1)" (identifier "FUN_00059930") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {\n    *(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;\n  }\n  puVar1 = PTR_DAT_00080720;\n  iVar3 = *(int *)(PTR_DAT_00080720 + 4);\n  iVar4 = iVar3 + 1;\n  if (0x1f < iVar3) {\n    puVar2 = (undefined4 *)malloc(0x88);\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0xffffffff;\n    }\n    *puVar2 = puVar1;\n    iVar4 = 1;\n    puVar2[1] = 0;\n    iVar3 = 0;\n    PTR_DAT_00080720 = (undefined *)puVar2;\n  }\n  puVar1 = PTR_DAT_00080720;\n  *(int *)(PTR_DAT_00080720 + 4) = iVar4;\n  *(undefined4 *)(puVar1 + iVar3 * 4 + 8) = param_1;\n  return 0;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (if_statement "if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {\n    *(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;\n  }" (if "if") (parenthesized_expression "(*(int *)PTR__xexit_cleanup_0007ffbc == 0)" (( "(") (binary_expression "*(int *)PTR__xexit_cleanup_0007ffbc == 0" (pointer_expression "*(int *)PTR__xexit_cleanup_0007ffbc" (* "*") (cast_expression "(int *)PTR__xexit_cleanup_0007ffbc" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR__xexit_cleanup_0007ffbc"))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    *(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;\n  }" ({ "{") (expression_statement "*(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;" (assignment_expression "*(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0" (pointer_expression "*(code **)PTR__xexit_cleanup_0007ffbc" (* "*") (cast_expression "(code **)PTR__xexit_cleanup_0007ffbc" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "PTR__xexit_cleanup_0007ffbc"))) (= "=") (identifier "FUN_000598e0")) (; ";")) (} "}"))) (expression_statement "puVar1 = PTR_DAT_00080720;" (assignment_expression "puVar1 = PTR_DAT_00080720" (identifier "puVar1") (= "=") (identifier "PTR_DAT_00080720")) (; ";")) (expression_statement "iVar3 = *(int *)(PTR_DAT_00080720 + 4);" (assignment_expression "iVar3 = *(int *)(PTR_DAT_00080720 + 4)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(PTR_DAT_00080720 + 4)" (* "*") (cast_expression "(int *)(PTR_DAT_00080720 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_00080720 + 4)" (( "(") (binary_expression "PTR_DAT_00080720 + 4" (identifier "PTR_DAT_00080720") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "iVar4 = iVar3 + 1;" (assignment_expression "iVar4 = iVar3 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (0x1f < iVar3) {\n    puVar2 = (undefined4 *)malloc(0x88);\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0xffffffff;\n    }\n    *puVar2 = puVar1;\n    iVar4 = 1;\n    puVar2[1] = 0;\n    iVar3 = 0;\n    PTR_DAT_00080720 = (undefined *)puVar2;\n  }" (if "if") (parenthesized_expression "(0x1f < iVar3)" (( "(") (binary_expression "0x1f < iVar3" (number_literal "0x1f") (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n    puVar2 = (undefined4 *)malloc(0x88);\n    if (puVar2 == (undefined4 *)0x0) {\n      return 0xffffffff;\n    }\n    *puVar2 = puVar1;\n    iVar4 = 1;\n    puVar2[1] = 0;\n    iVar3 = 0;\n    PTR_DAT_00080720 = (undefined *)puVar2;\n  }" ({ "{") (expression_statement "puVar2 = (undefined4 *)malloc(0x88);" (assignment_expression "puVar2 = (undefined4 *)malloc(0x88)" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)malloc(0x88)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "malloc(0x88)" (identifier "malloc") (argument_list "(0x88)" (( "(") (number_literal "0x88") () ")"))))) (; ";")) (if_statement "if (puVar2 == (undefined4 *)0x0) {\n      return 0xffffffff;\n    }" (if "if") (parenthesized_expression "(puVar2 == (undefined4 *)0x0)" (( "(") (binary_expression "puVar2 == (undefined4 *)0x0" (identifier "puVar2") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      return 0xffffffff;\n    }" ({ "{") (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (expression_statement "*puVar2 = puVar1;" (assignment_expression "*puVar2 = puVar1" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (identifier "puVar1")) (; ";")) (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" (identifier "iVar4") (= "=") (number_literal "1")) (; ";")) (expression_statement "puVar2[1] = 0;" (assignment_expression "puVar2[1] = 0" (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "PTR_DAT_00080720 = (undefined *)puVar2;" (assignment_expression "PTR_DAT_00080720 = (undefined *)puVar2" (identifier "PTR_DAT_00080720") (= "=") (cast_expression "(undefined *)puVar2" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar2"))) (; ";")) (} "}"))) (expression_statement "puVar1 = PTR_DAT_00080720;" (assignment_expression "puVar1 = PTR_DAT_00080720" (identifier "puVar1") (= "=") (identifier "PTR_DAT_00080720")) (; ";")) (expression_statement "*(int *)(PTR_DAT_00080720 + 4) = iVar4;" (assignment_expression "*(int *)(PTR_DAT_00080720 + 4) = iVar4" (pointer_expression "*(int *)(PTR_DAT_00080720 + 4)" (* "*") (cast_expression "(int *)(PTR_DAT_00080720 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_00080720 + 4)" (( "(") (binary_expression "PTR_DAT_00080720 + 4" (identifier "PTR_DAT_00080720") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "iVar4")) (; ";")) (expression_statement "*(undefined4 *)(puVar1 + iVar3 * 4 + 8) = param_1;" (assignment_expression "*(undefined4 *)(puVar1 + iVar3 * 4 + 8) = param_1" (pointer_expression "*(undefined4 *)(puVar1 + iVar3 * 4 + 8)" (* "*") (cast_expression "(undefined4 *)(puVar1 + iVar3 * 4 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + iVar3 * 4 + 8)" (( "(") (binary_expression "puVar1 + iVar3 * 4 + 8" (binary_expression "puVar1 + iVar3 * 4" (identifier "puVar1") (+ "+") (binary_expression "iVar3 * 4" (identifier "iVar3") (* "*") (number_literal "4"))) (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "param_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 */

int function_1(type_1 *fn)

{
  function_1 *pxVar1;
  function_1 *var_3;
  int var_1;
  int iVar4;
  
  if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {
    *(type_2 **)PTR__xexit_cleanup_0007ffbc = xatexit_cleanup;
  }
  pxVar1 = xatexit_head;
  var_1 = xatexit_head->ind;
  iVar4 = var_1 + 1;
  if (0x1f < var_1) {
    var_3 = (function_1 *)var_2(0x88);
    if (var_3 == (function_1 *)0x0) {
      return -1;
    }
    var_3->next = pxVar1;
    iVar4 = 1;
    var_3->ind = 0;
    var_1 = 0;
    xatexit_head = var_3;
  }
  pxVar1 = xatexit_head;
  xatexit_head->ind = iVar4;
  pxVar1->fns[var_1] = fn;
  return 0;
}


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

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

undefined4 MASKED(undefined4 param_1)

{
  undefined *puVar1;
  undefined4 *puVar2;
  int iVar3;
  int iVar4;
  
  if (*(int *)PTR__xexit_cleanup_0007ffbc == 0) {
    *(code **)PTR__xexit_cleanup_0007ffbc = FUN_000598e0;
  }
  puVar1 = PTR_DAT_00080720;
  iVar3 = *(int *)(PTR_DAT_00080720 + 4);
  iVar4 = iVar3 + 1;
  if (0x1f < iVar3) {
    puVar2 = (undefined4 *)malloc(0x88);
    if (puVar2 == (undefined4 *)0x0) {
      return 0xffffffff;
    }
    *puVar2 = puVar1;
    iVar4 = 1;
    puVar2[1] = 0;
    iVar3 = 0;
    PTR_DAT_00080720 = (undefined *)puVar2;
  }
  puVar1 = PTR_DAT_00080720;
  *(int *)(PTR_DAT_00080720 + 4) = iVar4;
  *(undefined4 *)(puVar1 + iVar3 * 4 + 8) = param_1;
  return 0;
}

