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

void * safemalloc(size_t n,size_t size)

{
  int iVar1;
  void *pvVar2;
  size_t __size;
  int in_GS_OFFSET;
  char str [200];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (n <= (uint)(0x7fffffff / (ulonglong)size)) {
    __size = size * n;
    if (__size == 0) {
      __size = 1;
    }
    pvVar2 = malloc(__size);
    if (pvVar2 != (void *)0x0) goto LAB_0002be6a;
  }
  builtin_strncpy(str,"Out of memory!",0xf);
  modalfatalbox("%s",str);
  pvVar2 = (void *)0x0;
LAB_0002be6a:
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return pvVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

void * FUN_0002be10(uint param_1,uint param_2)

{
  void *pvVar1;
  size_t __size;
  int in_GS_OFFSET;
  undefined4 local_d8;
  undefined4 local_d4;
  undefined4 local_d0;
  undefined2 local_cc;
  undefined1 local_ca;
  int local_10;
  undefined4 uStack_c;
  
  uStack_c = 0x2be19;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_1 <= (uint)(0x7fffffff / (ulonglong)param_2)) {
    __size = param_2 * param_1;
    if (__size == 0) {
      __size = 1;
    }
    pvVar1 = malloc(__size);
    if (pvVar1 != (void *)0x0) goto LAB_0002be6a;
  }
  local_d8 = 0x2074754f;
  local_d4 = 0x6d20666f;
  local_d0 = 0x726f6d65;
  local_cc = 0x2179;
  local_ca = 0;
  FUN_00054240(&DAT_0006f927,&local_d8);
  pvVar1 = (void *)0x0;
LAB_0002be6a:
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return pvVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0005c430();
}


PUSH ESI
XOR EDX,EDX
PUSH EBX
CALL 0x0001a360
ADD EBX,0x759cb
SUB ESP,0xd4
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0xcc],EAX
XOR EAX,EAX
MOV ECX,dword ptr [ESP + 0xe4]
MOV EAX,0x7fffffff
MOV ESI,dword ptr [ESP + 0xe0]
DIV ECX
CMP EAX,ESI
JC 0x0002be88
IMUL ECX,ESI
MOV EAX,0x1
TEST ECX,ECX
CMOVZ ECX,EAX
SUB ESP,0xc
PUSH ECX
CALL 0x00018840
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0002be88
MOV EDX,dword ptr [ESP + 0xcc]
XOR EDX,dword ptr GS:[0x14]
JNZ 0x0002beca
ADD ESP,0xd4
POP EBX
POP ESI
RET
MOV EDX,0x2179
MOV dword ptr [ESP + 0x4],0x2074754f
LEA EAX,[ESP + 0x4]
SUB ESP,0x8
MOV dword ptr [ESP + 0x10],0x6d20666f
MOV dword ptr [ESP + 0x14],0x726f6d65
MOV word ptr [ESP + 0x18],DX
MOV byte ptr [ESP + 0x1a],0x0
PUSH EAX
LEA EAX,[EBX + 0xfffce143]
PUSH EAX
CALL 0x00054240
ADD ESP,0x10
XOR EAX,EAX
JMP 0x0002be6a
CALL 0x0005c430
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid * FUN_0002be10(uint param_1,uint param_2)\n\n{\n  void *pvVar1;\n  size_t __size;\n  int in_GS_OFFSET;\n  undefined4 local_d8;\n  undefined4 local_d4;\n  undefined4 local_d0;\n  undefined2 local_cc;\n  undefined1 local_ca;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x2be19;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 <= (uint)(0x7fffffff / (ulonglong)param_2)) {\n    __size = param_2 * param_1;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) goto LAB_0002be6a;\n  }\n  local_d8 = 0x2074754f;\n  local_d4 = 0x6d20666f;\n  local_d0 = 0x726f6d65;\n  local_cc = 0x2179;\n  local_ca = 0;\n  FUN_00054240(&DAT_0006f927,&local_d8);\n  pvVar1 = (void *)0x0;\nLAB_0002be6a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0005c430();\n}\n\n" comment (function_definition "void * FUN_0002be10(uint param_1,uint param_2)\n\n{\n  void *pvVar1;\n  size_t __size;\n  int in_GS_OFFSET;\n  undefined4 local_d8;\n  undefined4 local_d4;\n  undefined4 local_d0;\n  undefined2 local_cc;\n  undefined1 local_ca;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x2be19;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 <= (uint)(0x7fffffff / (ulonglong)param_2)) {\n    __size = param_2 * param_1;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) goto LAB_0002be6a;\n  }\n  local_d8 = 0x2074754f;\n  local_d4 = 0x6d20666f;\n  local_d0 = 0x726f6d65;\n  local_cc = 0x2179;\n  local_ca = 0;\n  FUN_00054240(&DAT_0006f927,&local_d8);\n  pvVar1 = (void *)0x0;\nLAB_0002be6a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0005c430();\n}" primitive_type (pointer_declarator "* FUN_0002be10(uint param_1,uint param_2)" * (function_declarator "FUN_0002be10(uint param_1,uint param_2)" identifier (parameter_list "(uint param_1,uint param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) )))) (compound_statement "{\n  void *pvVar1;\n  size_t __size;\n  int in_GS_OFFSET;\n  undefined4 local_d8;\n  undefined4 local_d4;\n  undefined4 local_d0;\n  undefined2 local_cc;\n  undefined1 local_ca;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x2be19;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 <= (uint)(0x7fffffff / (ulonglong)param_2)) {\n    __size = param_2 * param_1;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) goto LAB_0002be6a;\n  }\n  local_d8 = 0x2074754f;\n  local_d4 = 0x6d20666f;\n  local_d0 = 0x726f6d65;\n  local_cc = 0x2179;\n  local_ca = 0;\n  FUN_00054240(&DAT_0006f927,&local_d8);\n  pvVar1 = (void *)0x0;\nLAB_0002be6a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0005c430();\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "size_t __size;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 local_d8;" type_identifier identifier ;) (declaration "undefined4 local_d4;" type_identifier identifier ;) (declaration "undefined4 local_d0;" type_identifier identifier ;) (declaration "undefined2 local_cc;" type_identifier identifier ;) (declaration "undefined1 local_ca;" type_identifier identifier ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x2be19;" (assignment_expression "uStack_c = 0x2be19" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (param_1 <= (uint)(0x7fffffff / (ulonglong)param_2)) {\n    __size = param_2 * param_1;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) goto LAB_0002be6a;\n  }" if (parenthesized_expression "(param_1 <= (uint)(0x7fffffff / (ulonglong)param_2))" ( (binary_expression "param_1 <= (uint)(0x7fffffff / (ulonglong)param_2)" identifier <= (call_expression "(uint)(0x7fffffff / (ulonglong)param_2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0x7fffffff / (ulonglong)param_2)" ( (binary_expression "0x7fffffff / (ulonglong)param_2" number_literal / (cast_expression "(ulonglong)param_2" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) )))) )) (compound_statement "{\n    __size = param_2 * param_1;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) goto LAB_0002be6a;\n  }" { (expression_statement "__size = param_2 * param_1;" (assignment_expression "__size = param_2 * param_1" identifier = (binary_expression "param_2 * param_1" identifier * identifier)) ;) (if_statement "if (__size == 0) {\n      __size = 1;\n    }" if (parenthesized_expression "(__size == 0)" ( (binary_expression "__size == 0" identifier == number_literal) )) (compound_statement "{\n      __size = 1;\n    }" { (expression_statement "__size = 1;" (assignment_expression "__size = 1" identifier = number_literal) ;) })) (expression_statement "pvVar1 = malloc(__size);" (assignment_expression "pvVar1 = malloc(__size)" identifier = (call_expression "malloc(__size)" identifier (argument_list "(__size)" ( identifier )))) ;) (if_statement "if (pvVar1 != (void *)0x0) goto LAB_0002be6a;" if (parenthesized_expression "(pvVar1 != (void *)0x0)" ( (binary_expression "pvVar1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0002be6a;" goto statement_identifier ;)) })) (expression_statement "local_d8 = 0x2074754f;" (assignment_expression "local_d8 = 0x2074754f" identifier = number_literal) ;) (expression_statement "local_d4 = 0x6d20666f;" (assignment_expression "local_d4 = 0x6d20666f" identifier = number_literal) ;) (expression_statement "local_d0 = 0x726f6d65;" (assignment_expression "local_d0 = 0x726f6d65" identifier = number_literal) ;) (expression_statement "local_cc = 0x2179;" (assignment_expression "local_cc = 0x2179" identifier = number_literal) ;) (expression_statement "local_ca = 0;" (assignment_expression "local_ca = 0" identifier = number_literal) ;) (expression_statement "FUN_00054240(&DAT_0006f927,&local_d8);" (call_expression "FUN_00054240(&DAT_0006f927,&local_d8)" identifier (argument_list "(&DAT_0006f927,&local_d8)" ( (pointer_expression "&DAT_0006f927" & identifier) , (pointer_expression "&local_d8" & identifier) ))) ;) (expression_statement "pvVar1 = (void *)0x0;" (assignment_expression "pvVar1 = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_0002be6a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }" statement_identifier : (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return pvVar1;\n  }" { (return_statement "return pvVar1;" return identifier ;) }))) comment (expression_statement "FUN_0005c430();" (call_expression "FUN_0005c430()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid * safemalloc(size_t n,size_t size)\n\n{\n  int iVar1;\n  void *pvVar2;\n  size_t __size;\n  int in_GS_OFFSET;\n  char str [200];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (n <= (uint)(0x7fffffff / (ulonglong)size)) {\n    __size = size * n;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar2 = malloc(__size);\n    if (pvVar2 != (void *)0x0) goto LAB_0002be6a;\n  }\n  builtin_strncpy(str,"Out of memory!",0xf);\n  modalfatalbox("%s",str);\n  pvVar2 = (void *)0x0;\nLAB_0002be6a:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "void * safemalloc(size_t n,size_t size)\n\n{\n  int iVar1;\n  void *pvVar2;\n  size_t __size;\n  int in_GS_OFFSET;\n  char str [200];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (n <= (uint)(0x7fffffff / (ulonglong)size)) {\n    __size = size * n;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar2 = malloc(__size);\n    if (pvVar2 != (void *)0x0) goto LAB_0002be6a;\n  }\n  builtin_strncpy(str,"Out of memory!",0xf);\n  modalfatalbox("%s",str);\n  pvVar2 = (void *)0x0;\nLAB_0002be6a:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (pointer_declarator "* safemalloc(size_t n,size_t size)" * (function_declarator "safemalloc(size_t n,size_t size)" identifier (parameter_list "(size_t n,size_t size)" ( (parameter_declaration "size_t n" primitive_type identifier) , (parameter_declaration "size_t size" primitive_type identifier) )))) (compound_statement "{\n  int iVar1;\n  void *pvVar2;\n  size_t __size;\n  int in_GS_OFFSET;\n  char str [200];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (n <= (uint)(0x7fffffff / (ulonglong)size)) {\n    __size = size * n;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar2 = malloc(__size);\n    if (pvVar2 != (void *)0x0) goto LAB_0002be6a;\n  }\n  builtin_strncpy(str,"Out of memory!",0xf);\n  modalfatalbox("%s",str);\n  pvVar2 = (void *)0x0;\nLAB_0002be6a:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * identifier) ;) (declaration "size_t __size;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char str [200];" primitive_type (array_declarator "str [200]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (n <= (uint)(0x7fffffff / (ulonglong)size)) {\n    __size = size * n;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar2 = malloc(__size);\n    if (pvVar2 != (void *)0x0) goto LAB_0002be6a;\n  }" if (parenthesized_expression "(n <= (uint)(0x7fffffff / (ulonglong)size))" ( (binary_expression "n <= (uint)(0x7fffffff / (ulonglong)size)" identifier <= (call_expression "(uint)(0x7fffffff / (ulonglong)size)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0x7fffffff / (ulonglong)size)" ( (binary_expression "0x7fffffff / (ulonglong)size" number_literal / (cast_expression "(ulonglong)size" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) )))) )) (compound_statement "{\n    __size = size * n;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar2 = malloc(__size);\n    if (pvVar2 != (void *)0x0) goto LAB_0002be6a;\n  }" { (expression_statement "__size = size * n;" (assignment_expression "__size = size * n" identifier = (binary_expression "size * n" identifier * identifier)) ;) (if_statement "if (__size == 0) {\n      __size = 1;\n    }" if (parenthesized_expression "(__size == 0)" ( (binary_expression "__size == 0" identifier == number_literal) )) (compound_statement "{\n      __size = 1;\n    }" { (expression_statement "__size = 1;" (assignment_expression "__size = 1" identifier = number_literal) ;) })) (expression_statement "pvVar2 = malloc(__size);" (assignment_expression "pvVar2 = malloc(__size)" identifier = (call_expression "malloc(__size)" identifier (argument_list "(__size)" ( identifier )))) ;) (if_statement "if (pvVar2 != (void *)0x0) goto LAB_0002be6a;" if (parenthesized_expression "(pvVar2 != (void *)0x0)" ( (binary_expression "pvVar2 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0002be6a;" goto statement_identifier ;)) })) (expression_statement "builtin_strncpy(str,"Out of memory!",0xf);" (call_expression "builtin_strncpy(str,"Out of memory!",0xf)" identifier (argument_list "(str,"Out of memory!",0xf)" ( identifier , (string_literal ""Out of memory!"" " string_content ") , number_literal ))) ;) (expression_statement "modalfatalbox("%s",str);" (call_expression "modalfatalbox("%s",str)" identifier (argument_list "("%s",str)" ( (string_literal ""%s"" " string_content ") , identifier ))) ;) (expression_statement "pvVar2 = (void *)0x0;" (assignment_expression "pvVar2 = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_0002be6a:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar2;\n  }" statement_identifier : (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar2;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return pvVar2;\n  }" { (return_statement "return pvVar2;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void * FUN_0002be10(uint param_1,uint param_2)\n\n{\n  void *pvVar1;\n  size_t __size;\n  int in_GS_OFFSET;\n  undefined4 local_d8;\n  undefined4 local_d4;\n  undefined4 local_d0;\n  undefined2 local_cc;\n  undefined1 local_ca;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x2be19;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 <= (uint)(0x7fffffff / (ulonglong)param_2)) {\n    __size = param_2 * param_1;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) goto LAB_0002be6a;\n  }\n  local_d8 = 0x2074754f;\n  local_d4 = 0x6d20666f;\n  local_d0 = 0x726f6d65;\n  local_cc = 0x2179;\n  local_ca = 0;\n  FUN_00054240(&DAT_0006f927,&local_d8);\n  pvVar1 = (void *)0x0;\nLAB_0002be6a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }\n                    \n  FUN_0005c430();\n}\n\n" (function_definition "void * FUN_0002be10(uint param_1,uint param_2)\n\n{\n  void *pvVar1;\n  size_t __size;\n  int in_GS_OFFSET;\n  undefined4 local_d8;\n  undefined4 local_d4;\n  undefined4 local_d0;\n  undefined2 local_cc;\n  undefined1 local_ca;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x2be19;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 <= (uint)(0x7fffffff / (ulonglong)param_2)) {\n    __size = param_2 * param_1;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) goto LAB_0002be6a;\n  }\n  local_d8 = 0x2074754f;\n  local_d4 = 0x6d20666f;\n  local_d0 = 0x726f6d65;\n  local_cc = 0x2179;\n  local_ca = 0;\n  FUN_00054240(&DAT_0006f927,&local_d8);\n  pvVar1 = (void *)0x0;\nLAB_0002be6a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }\n                    \n  FUN_0005c430();\n}" primitive_type (pointer_declarator "* FUN_0002be10(uint param_1,uint param_2)" * (function_declarator "FUN_0002be10(uint param_1,uint param_2)" identifier (parameter_list "(uint param_1,uint param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) )))) (compound_statement "{\n  void *pvVar1;\n  size_t __size;\n  int in_GS_OFFSET;\n  undefined4 local_d8;\n  undefined4 local_d4;\n  undefined4 local_d0;\n  undefined2 local_cc;\n  undefined1 local_ca;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x2be19;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 <= (uint)(0x7fffffff / (ulonglong)param_2)) {\n    __size = param_2 * param_1;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) goto LAB_0002be6a;\n  }\n  local_d8 = 0x2074754f;\n  local_d4 = 0x6d20666f;\n  local_d0 = 0x726f6d65;\n  local_cc = 0x2179;\n  local_ca = 0;\n  FUN_00054240(&DAT_0006f927,&local_d8);\n  pvVar1 = (void *)0x0;\nLAB_0002be6a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }\n                    \n  FUN_0005c430();\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "size_t __size;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 local_d8;" type_identifier identifier ;) (declaration "undefined4 local_d4;" type_identifier identifier ;) (declaration "undefined4 local_d0;" type_identifier identifier ;) (declaration "undefined2 local_cc;" type_identifier identifier ;) (declaration "undefined1 local_ca;" type_identifier identifier ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x2be19;" (assignment_expression "uStack_c = 0x2be19" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (param_1 <= (uint)(0x7fffffff / (ulonglong)param_2)) {\n    __size = param_2 * param_1;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) goto LAB_0002be6a;\n  }" if (parenthesized_expression "(param_1 <= (uint)(0x7fffffff / (ulonglong)param_2))" ( (binary_expression "param_1 <= (uint)(0x7fffffff / (ulonglong)param_2)" identifier <= (call_expression "(uint)(0x7fffffff / (ulonglong)param_2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0x7fffffff / (ulonglong)param_2)" ( (binary_expression "0x7fffffff / (ulonglong)param_2" number_literal / (cast_expression "(ulonglong)param_2" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) )))) )) (compound_statement "{\n    __size = param_2 * param_1;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) goto LAB_0002be6a;\n  }" { (expression_statement "__size = param_2 * param_1;" (assignment_expression "__size = param_2 * param_1" identifier = (binary_expression "param_2 * param_1" identifier * identifier)) ;) (if_statement "if (__size == 0) {\n      __size = 1;\n    }" if (parenthesized_expression "(__size == 0)" ( (binary_expression "__size == 0" identifier == number_literal) )) (compound_statement "{\n      __size = 1;\n    }" { (expression_statement "__size = 1;" (assignment_expression "__size = 1" identifier = number_literal) ;) })) (expression_statement "pvVar1 = malloc(__size);" (assignment_expression "pvVar1 = malloc(__size)" identifier = (call_expression "malloc(__size)" identifier (argument_list "(__size)" ( identifier )))) ;) (if_statement "if (pvVar1 != (void *)0x0) goto LAB_0002be6a;" if (parenthesized_expression "(pvVar1 != (void *)0x0)" ( (binary_expression "pvVar1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0002be6a;" goto statement_identifier ;)) })) (expression_statement "local_d8 = 0x2074754f;" (assignment_expression "local_d8 = 0x2074754f" identifier = number_literal) ;) (expression_statement "local_d4 = 0x6d20666f;" (assignment_expression "local_d4 = 0x6d20666f" identifier = number_literal) ;) (expression_statement "local_d0 = 0x726f6d65;" (assignment_expression "local_d0 = 0x726f6d65" identifier = number_literal) ;) (expression_statement "local_cc = 0x2179;" (assignment_expression "local_cc = 0x2179" identifier = number_literal) ;) (expression_statement "local_ca = 0;" (assignment_expression "local_ca = 0" identifier = number_literal) ;) (expression_statement "FUN_00054240(&DAT_0006f927,&local_d8);" (call_expression "FUN_00054240(&DAT_0006f927,&local_d8)" identifier (argument_list "(&DAT_0006f927,&local_d8)" ( (pointer_expression "&DAT_0006f927" & identifier) , (pointer_expression "&local_d8" & identifier) ))) ;) (expression_statement "pvVar1 = (void *)0x0;" (assignment_expression "pvVar1 = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_0002be6a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }" statement_identifier : (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return pvVar1;\n  }" { (return_statement "return pvVar1;" return identifier ;) }))) (expression_statement "FUN_0005c430();" (call_expression "FUN_0005c430()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression LIT / (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , (pointer_expression & IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void * FUN_0002be10(uint param_1,uint param_2)\n\n{\n  void *pvVar1;\n  size_t __size;\n  int in_GS_OFFSET;\n  undefined4 local_d8;\n  undefined4 local_d4;\n  undefined4 local_d0;\n  undefined2 local_cc;\n  undefined1 local_ca;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x2be19;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 <= (uint)(0x7fffffff / (ulonglong)param_2)) {\n    __size = param_2 * param_1;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) goto LAB_0002be6a;\n  }\n  local_d8 = 0x2074754f;\n  local_d4 = 0x6d20666f;\n  local_d0 = 0x726f6d65;\n  local_cc = 0x2179;\n  local_ca = 0;\n  FUN_00054240(&DAT_0006f927,&local_d8);\n  pvVar1 = (void *)0x0;\nLAB_0002be6a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }\n                    \n  FUN_0005c430();\n}" (primitive_type "void") (pointer_declarator "* FUN_0002be10(uint param_1,uint param_2)" (* "*") (function_declarator "FUN_0002be10(uint param_1,uint param_2)" (identifier "FUN_0002be10") (parameter_list "(uint param_1,uint param_2)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")")))) (compound_statement "{\n  void *pvVar1;\n  size_t __size;\n  int in_GS_OFFSET;\n  undefined4 local_d8;\n  undefined4 local_d4;\n  undefined4 local_d0;\n  undefined2 local_cc;\n  undefined1 local_ca;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x2be19;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 <= (uint)(0x7fffffff / (ulonglong)param_2)) {\n    __size = param_2 * param_1;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) goto LAB_0002be6a;\n  }\n  local_d8 = 0x2074754f;\n  local_d4 = 0x6d20666f;\n  local_d0 = 0x726f6d65;\n  local_cc = 0x2179;\n  local_ca = 0;\n  FUN_00054240(&DAT_0006f927,&local_d8);\n  pvVar1 = (void *)0x0;\nLAB_0002be6a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }\n                    \n  FUN_0005c430();\n}" ({ "{") (declaration "void *pvVar1;" (primitive_type "void") (pointer_declarator "*pvVar1" (* "*") (identifier "pvVar1")) (; ";")) (declaration "size_t __size;" (primitive_type "size_t") (identifier "__size") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined4 local_d8;" (type_identifier "undefined4") (identifier "local_d8") (; ";")) (declaration "undefined4 local_d4;" (type_identifier "undefined4") (identifier "local_d4") (; ";")) (declaration "undefined4 local_d0;" (type_identifier "undefined4") (identifier "local_d0") (; ";")) (declaration "undefined2 local_cc;" (type_identifier "undefined2") (identifier "local_cc") (; ";")) (declaration "undefined1 local_ca;" (type_identifier "undefined1") (identifier "local_ca") (; ";")) (declaration "int local_10;" (primitive_type "int") (identifier "local_10") (; ";")) (declaration "undefined4 uStack_c;" (type_identifier "undefined4") (identifier "uStack_c") (; ";")) (expression_statement "uStack_c = 0x2be19;" (assignment_expression "uStack_c = 0x2be19" (identifier "uStack_c") (= "=") (number_literal "0x2be19")) (; ";")) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (param_1 <= (uint)(0x7fffffff / (ulonglong)param_2)) {\n    __size = param_2 * param_1;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) goto LAB_0002be6a;\n  }" (if "if") (parenthesized_expression "(param_1 <= (uint)(0x7fffffff / (ulonglong)param_2))" (( "(") (binary_expression "param_1 <= (uint)(0x7fffffff / (ulonglong)param_2)" (identifier "param_1") (<= "<=") (call_expression "(uint)(0x7fffffff / (ulonglong)param_2)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(0x7fffffff / (ulonglong)param_2)" (( "(") (binary_expression "0x7fffffff / (ulonglong)param_2" (number_literal "0x7fffffff") (/ "/") (cast_expression "(ulonglong)param_2" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "param_2"))) () ")")))) () ")")) (compound_statement "{\n    __size = param_2 * param_1;\n    if (__size == 0) {\n      __size = 1;\n    }\n    pvVar1 = malloc(__size);\n    if (pvVar1 != (void *)0x0) goto LAB_0002be6a;\n  }" ({ "{") (expression_statement "__size = param_2 * param_1;" (assignment_expression "__size = param_2 * param_1" (identifier "__size") (= "=") (binary_expression "param_2 * param_1" (identifier "param_2") (* "*") (identifier "param_1"))) (; ";")) (if_statement "if (__size == 0) {\n      __size = 1;\n    }" (if "if") (parenthesized_expression "(__size == 0)" (( "(") (binary_expression "__size == 0" (identifier "__size") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      __size = 1;\n    }" ({ "{") (expression_statement "__size = 1;" (assignment_expression "__size = 1" (identifier "__size") (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "pvVar1 = malloc(__size);" (assignment_expression "pvVar1 = malloc(__size)" (identifier "pvVar1") (= "=") (call_expression "malloc(__size)" (identifier "malloc") (argument_list "(__size)" (( "(") (identifier "__size") () ")")))) (; ";")) (if_statement "if (pvVar1 != (void *)0x0) goto LAB_0002be6a;" (if "if") (parenthesized_expression "(pvVar1 != (void *)0x0)" (( "(") (binary_expression "pvVar1 != (void *)0x0" (identifier "pvVar1") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_0002be6a;" (goto "goto") (statement_identifier "LAB_0002be6a") (; ";"))) (} "}"))) (expression_statement "local_d8 = 0x2074754f;" (assignment_expression "local_d8 = 0x2074754f" (identifier "local_d8") (= "=") (number_literal "0x2074754f")) (; ";")) (expression_statement "local_d4 = 0x6d20666f;" (assignment_expression "local_d4 = 0x6d20666f" (identifier "local_d4") (= "=") (number_literal "0x6d20666f")) (; ";")) (expression_statement "local_d0 = 0x726f6d65;" (assignment_expression "local_d0 = 0x726f6d65" (identifier "local_d0") (= "=") (number_literal "0x726f6d65")) (; ";")) (expression_statement "local_cc = 0x2179;" (assignment_expression "local_cc = 0x2179" (identifier "local_cc") (= "=") (number_literal "0x2179")) (; ";")) (expression_statement "local_ca = 0;" (assignment_expression "local_ca = 0" (identifier "local_ca") (= "=") (number_literal "0")) (; ";")) (expression_statement "FUN_00054240(&DAT_0006f927,&local_d8);" (call_expression "FUN_00054240(&DAT_0006f927,&local_d8)" (identifier "FUN_00054240") (argument_list "(&DAT_0006f927,&local_d8)" (( "(") (pointer_expression "&DAT_0006f927" (& "&") (identifier "DAT_0006f927")) (, ",") (pointer_expression "&local_d8" (& "&") (identifier "local_d8")) () ")"))) (; ";")) (expression_statement "pvVar1 = (void *)0x0;" (assignment_expression "pvVar1 = (void *)0x0" (identifier "pvVar1") (= "=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (labeled_statement "LAB_0002be6a:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }" (statement_identifier "LAB_0002be6a") (: ":") (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }" (if "if") (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return pvVar1;\n  }" ({ "{") (return_statement "return pvVar1;" (return "return") (identifier "pvVar1") (; ";")) (} "}")))) (expression_statement "FUN_0005c430();" (call_expression "FUN_0005c430()" (identifier "FUN_0005c430") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

void * function_1(size_t var_2,size_t var_3)

{
  int var_9;
  void *var_6;
  size_t var_4;
  int var_1;
  char str [200];
  
  var_9 = *(int *)(var_1 + 0x14);
  if (var_2 <= (uint)(0x7fffffff / (type_1)var_3)) {
    var_4 = var_3 * var_2;
    if (var_4 == 0) {
      var_4 = 1;
    }
    var_6 = var_5(var_4);
    if (var_6 != (void *)0x0) goto LAB_0002be6a;
  }
  var_7(str,"Out of memory!",0xf);
  var_8("%s",str);
  var_6 = (void *)0x0;
LAB_0002be6a:
  if (var_9 == *(int *)(var_1 + 0x14)) {
    return var_6;
  }
                    /* WARNING: Subroutine does not return */
  var_10();
}


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

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

void * MASKED(uint param_1,uint param_2)

{
  void *pvVar1;
  size_t __size;
  int in_GS_OFFSET;
  undefined4 local_d8;
  undefined4 local_d4;
  undefined4 local_d0;
  undefined2 local_cc;
  undefined1 local_ca;
  int local_10;
  undefined4 uStack_c;
  
  uStack_c = 0x2be19;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_1 <= (uint)(0x7fffffff / (ulonglong)param_2)) {
    __size = param_2 * param_1;
    if (__size == 0) {
      __size = 1;
    }
    pvVar1 = malloc(__size);
    if (pvVar1 != (void *)0x0) goto LAB_0002be6a;
  }
  local_d8 = 0x2074754f;
  local_d4 = 0x6d20666f;
  local_d0 = 0x726f6d65;
  local_cc = 0x2179;
  local_ca = 0;
  FUN_00054240(&DAT_0006f927,&local_d8);
  pvVar1 = (void *)0x0;
LAB_0002be6a:
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return pvVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0005c430();
}

