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

void * saferealloc(void *ptr,size_t n,size_t size)

{
  int iVar1;
  void *pvVar2;
  int in_GS_OFFSET;
  char str [200];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (n <= (uint)(0x7fffffff / (ulonglong)size)) {
    if (ptr == (void *)0x0) {
      pvVar2 = malloc(size * n);
    }
    else {
      pvVar2 = realloc(ptr,size * n);
    }
    if (pvVar2 != (void *)0x0) goto LAB_0001ce2d;
  }
  builtin_strncpy(str,"Out of memory!",0xf);
  modalfatalbox("%s",str);
  pvVar2 = (void *)0x0;
LAB_0001ce2d:
  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_0001cd90(void *param_1,uint param_2,uint param_3)

{
  void *pvVar1;
  int in_GS_OFFSET;
  undefined4 local_d8;
  undefined4 local_d4;
  undefined4 local_d0;
  undefined2 local_cc;
  undefined1 local_ca;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_2 <= (uint)(0x7fffffff / (ulonglong)param_3)) {
    if (param_1 == (void *)0x0) {
      pvVar1 = malloc(param_3 * param_2);
    }
    else {
      pvVar1 = realloc(param_1,param_3 * param_2);
    }
    if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;
  }
  local_d8 = 0x2074754f;
  local_d4 = 0x6d20666f;
  local_d0 = 0x726f6d65;
  local_cc = 0x2179;
  local_ca = 0;
  FUN_00066910("%s",&local_d8);
  pvVar1 = (void *)0x0;
LAB_0001ce2d:
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return pvVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006dad0();
}


PUSH EDI
XOR EDX,EDX
PUSH ESI
PUSH EBX
CALL 0x00015fa0
ADD EBX,0x87fd6
SUB ESP,0xd0
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0xcc],EAX
XOR EAX,EAX
MOV ECX,dword ptr [ESP + 0xe8]
MOV EAX,0x7fffffff
MOV EDI,dword ptr [ESP + 0xe4]
MOV ESI,dword ptr [ESP + 0xe0]
DIV ECX
CMP EAX,EDI
JC 0x0001cded
IMUL ECX,EDI
TEST ESI,ESI
JZ 0x0001ce50
SUB ESP,0x8
PUSH ECX
PUSH ESI
CALL 0x00014350
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0001ce2d
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 + 0xfffd88a7]
PUSH EAX
CALL 0x00066910
ADD ESP,0x10
XOR EAX,EAX
MOV EDX,dword ptr [ESP + 0xcc]
XOR EDX,dword ptr GS:[0x14]
JNZ 0x0001ce5e
ADD ESP,0xd0
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0xc
PUSH ECX
CALL 0x00014360
ADD ESP,0x10
JMP 0x0001cde9
CALL 0x0006dad0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid * FUN_0001cd90(void *param_1,uint param_2,uint param_3)\n\n{\n  void *pvVar1;\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  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_2 <= (uint)(0x7fffffff / (ulonglong)param_3)) {\n    if (param_1 == (void *)0x0) {\n      pvVar1 = malloc(param_3 * param_2);\n    }\n    else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }\n    if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;\n  }\n  local_d8 = 0x2074754f;\n  local_d4 = 0x6d20666f;\n  local_d0 = 0x726f6d65;\n  local_cc = 0x2179;\n  local_ca = 0;\n  FUN_00066910("%s",&local_d8);\n  pvVar1 = (void *)0x0;\nLAB_0001ce2d:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006dad0();\n}\n\n" comment (function_definition "void * FUN_0001cd90(void *param_1,uint param_2,uint param_3)\n\n{\n  void *pvVar1;\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  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_2 <= (uint)(0x7fffffff / (ulonglong)param_3)) {\n    if (param_1 == (void *)0x0) {\n      pvVar1 = malloc(param_3 * param_2);\n    }\n    else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }\n    if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;\n  }\n  local_d8 = 0x2074754f;\n  local_d4 = 0x6d20666f;\n  local_d0 = 0x726f6d65;\n  local_cc = 0x2179;\n  local_ca = 0;\n  FUN_00066910("%s",&local_d8);\n  pvVar1 = (void *)0x0;\nLAB_0001ce2d:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006dad0();\n}" primitive_type (pointer_declarator "* FUN_0001cd90(void *param_1,uint param_2,uint param_3)" * (function_declarator "FUN_0001cd90(void *param_1,uint param_2,uint param_3)" identifier (parameter_list "(void *param_1,uint param_2,uint param_3)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) )))) (compound_statement "{\n  void *pvVar1;\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  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_2 <= (uint)(0x7fffffff / (ulonglong)param_3)) {\n    if (param_1 == (void *)0x0) {\n      pvVar1 = malloc(param_3 * param_2);\n    }\n    else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }\n    if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;\n  }\n  local_d8 = 0x2074754f;\n  local_d4 = 0x6d20666f;\n  local_d0 = 0x726f6d65;\n  local_cc = 0x2179;\n  local_ca = 0;\n  FUN_00066910("%s",&local_d8);\n  pvVar1 = (void *)0x0;\nLAB_0001ce2d:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006dad0();\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * 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 ;) (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_2 <= (uint)(0x7fffffff / (ulonglong)param_3)) {\n    if (param_1 == (void *)0x0) {\n      pvVar1 = malloc(param_3 * param_2);\n    }\n    else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }\n    if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;\n  }" if (parenthesized_expression "(param_2 <= (uint)(0x7fffffff / (ulonglong)param_3))" ( (binary_expression "param_2 <= (uint)(0x7fffffff / (ulonglong)param_3)" identifier <= (call_expression "(uint)(0x7fffffff / (ulonglong)param_3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0x7fffffff / (ulonglong)param_3)" ( (binary_expression "0x7fffffff / (ulonglong)param_3" number_literal / (cast_expression "(ulonglong)param_3" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) )))) )) (compound_statement "{\n    if (param_1 == (void *)0x0) {\n      pvVar1 = malloc(param_3 * param_2);\n    }\n    else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }\n    if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;\n  }" { (if_statement "if (param_1 == (void *)0x0) {\n      pvVar1 = malloc(param_3 * param_2);\n    }\n    else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }" if (parenthesized_expression "(param_1 == (void *)0x0)" ( (binary_expression "param_1 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pvVar1 = malloc(param_3 * param_2);\n    }" { (expression_statement "pvVar1 = malloc(param_3 * param_2);" (assignment_expression "pvVar1 = malloc(param_3 * param_2)" identifier = (call_expression "malloc(param_3 * param_2)" identifier (argument_list "(param_3 * param_2)" ( (binary_expression "param_3 * param_2" identifier * identifier) )))) ;) }) (else_clause "else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }" else (compound_statement "{\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }" { (expression_statement "pvVar1 = realloc(param_1,param_3 * param_2);" (assignment_expression "pvVar1 = realloc(param_1,param_3 * param_2)" identifier = (call_expression "realloc(param_1,param_3 * param_2)" identifier (argument_list "(param_1,param_3 * param_2)" ( identifier , (binary_expression "param_3 * param_2" identifier * identifier) )))) ;) }))) (if_statement "if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;" 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_0001ce2d;" 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_00066910("%s",&local_d8);" (call_expression "FUN_00066910("%s",&local_d8)" identifier (argument_list "("%s",&local_d8)" ( (string_literal ""%s"" " string_content ") , (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_0001ce2d:\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_0006dad0();" (call_expression "FUN_0006dad0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid * saferealloc(void *ptr,size_t n,size_t size)\n\n{\n  int iVar1;\n  void *pvVar2;\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    if (ptr == (void *)0x0) {\n      pvVar2 = malloc(size * n);\n    }\n    else {\n      pvVar2 = realloc(ptr,size * n);\n    }\n    if (pvVar2 != (void *)0x0) goto LAB_0001ce2d;\n  }\n  builtin_strncpy(str,"Out of memory!",0xf);\n  modalfatalbox("%s",str);\n  pvVar2 = (void *)0x0;\nLAB_0001ce2d:\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 * saferealloc(void *ptr,size_t n,size_t size)\n\n{\n  int iVar1;\n  void *pvVar2;\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    if (ptr == (void *)0x0) {\n      pvVar2 = malloc(size * n);\n    }\n    else {\n      pvVar2 = realloc(ptr,size * n);\n    }\n    if (pvVar2 != (void *)0x0) goto LAB_0001ce2d;\n  }\n  builtin_strncpy(str,"Out of memory!",0xf);\n  modalfatalbox("%s",str);\n  pvVar2 = (void *)0x0;\nLAB_0001ce2d:\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 "* saferealloc(void *ptr,size_t n,size_t size)" * (function_declarator "saferealloc(void *ptr,size_t n,size_t size)" identifier (parameter_list "(void *ptr,size_t n,size_t size)" ( (parameter_declaration "void *ptr" primitive_type (pointer_declarator "*ptr" * identifier)) , (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  int in_GS_OFFSET;\n  char str [200];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (n <= (uint)(0x7fffffff / (ulonglong)size)) {\n    if (ptr == (void *)0x0) {\n      pvVar2 = malloc(size * n);\n    }\n    else {\n      pvVar2 = realloc(ptr,size * n);\n    }\n    if (pvVar2 != (void *)0x0) goto LAB_0001ce2d;\n  }\n  builtin_strncpy(str,"Out of memory!",0xf);\n  modalfatalbox("%s",str);\n  pvVar2 = (void *)0x0;\nLAB_0001ce2d:\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 "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    if (ptr == (void *)0x0) {\n      pvVar2 = malloc(size * n);\n    }\n    else {\n      pvVar2 = realloc(ptr,size * n);\n    }\n    if (pvVar2 != (void *)0x0) goto LAB_0001ce2d;\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    if (ptr == (void *)0x0) {\n      pvVar2 = malloc(size * n);\n    }\n    else {\n      pvVar2 = realloc(ptr,size * n);\n    }\n    if (pvVar2 != (void *)0x0) goto LAB_0001ce2d;\n  }" { (if_statement "if (ptr == (void *)0x0) {\n      pvVar2 = malloc(size * n);\n    }\n    else {\n      pvVar2 = realloc(ptr,size * n);\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      pvVar2 = malloc(size * n);\n    }" { (expression_statement "pvVar2 = malloc(size * n);" (assignment_expression "pvVar2 = malloc(size * n)" identifier = (call_expression "malloc(size * n)" identifier (argument_list "(size * n)" ( (binary_expression "size * n" identifier * identifier) )))) ;) }) (else_clause "else {\n      pvVar2 = realloc(ptr,size * n);\n    }" else (compound_statement "{\n      pvVar2 = realloc(ptr,size * n);\n    }" { (expression_statement "pvVar2 = realloc(ptr,size * n);" (assignment_expression "pvVar2 = realloc(ptr,size * n)" identifier = (call_expression "realloc(ptr,size * n)" identifier (argument_list "(ptr,size * n)" ( identifier , (binary_expression "size * n" identifier * identifier) )))) ;) }))) (if_statement "if (pvVar2 != (void *)0x0) goto LAB_0001ce2d;" 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_0001ce2d;" 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_0001ce2d:\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_0001cd90(void *param_1,uint param_2,uint param_3)\n\n{\n  void *pvVar1;\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  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_2 <= (uint)(0x7fffffff / (ulonglong)param_3)) {\n    if (param_1 == (void *)0x0) {\n      pvVar1 = malloc(param_3 * param_2);\n    }\n    else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }\n    if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;\n  }\n  local_d8 = 0x2074754f;\n  local_d4 = 0x6d20666f;\n  local_d0 = 0x726f6d65;\n  local_cc = 0x2179;\n  local_ca = 0;\n  FUN_00066910("%s",&local_d8);\n  pvVar1 = (void *)0x0;\nLAB_0001ce2d:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }\n                    \n  FUN_0006dad0();\n}\n\n" (function_definition "void * FUN_0001cd90(void *param_1,uint param_2,uint param_3)\n\n{\n  void *pvVar1;\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  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_2 <= (uint)(0x7fffffff / (ulonglong)param_3)) {\n    if (param_1 == (void *)0x0) {\n      pvVar1 = malloc(param_3 * param_2);\n    }\n    else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }\n    if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;\n  }\n  local_d8 = 0x2074754f;\n  local_d4 = 0x6d20666f;\n  local_d0 = 0x726f6d65;\n  local_cc = 0x2179;\n  local_ca = 0;\n  FUN_00066910("%s",&local_d8);\n  pvVar1 = (void *)0x0;\nLAB_0001ce2d:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }\n                    \n  FUN_0006dad0();\n}" primitive_type (pointer_declarator "* FUN_0001cd90(void *param_1,uint param_2,uint param_3)" * (function_declarator "FUN_0001cd90(void *param_1,uint param_2,uint param_3)" identifier (parameter_list "(void *param_1,uint param_2,uint param_3)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) )))) (compound_statement "{\n  void *pvVar1;\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  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_2 <= (uint)(0x7fffffff / (ulonglong)param_3)) {\n    if (param_1 == (void *)0x0) {\n      pvVar1 = malloc(param_3 * param_2);\n    }\n    else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }\n    if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;\n  }\n  local_d8 = 0x2074754f;\n  local_d4 = 0x6d20666f;\n  local_d0 = 0x726f6d65;\n  local_cc = 0x2179;\n  local_ca = 0;\n  FUN_00066910("%s",&local_d8);\n  pvVar1 = (void *)0x0;\nLAB_0001ce2d:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }\n                    \n  FUN_0006dad0();\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * 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 ;) (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_2 <= (uint)(0x7fffffff / (ulonglong)param_3)) {\n    if (param_1 == (void *)0x0) {\n      pvVar1 = malloc(param_3 * param_2);\n    }\n    else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }\n    if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;\n  }" if (parenthesized_expression "(param_2 <= (uint)(0x7fffffff / (ulonglong)param_3))" ( (binary_expression "param_2 <= (uint)(0x7fffffff / (ulonglong)param_3)" identifier <= (call_expression "(uint)(0x7fffffff / (ulonglong)param_3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0x7fffffff / (ulonglong)param_3)" ( (binary_expression "0x7fffffff / (ulonglong)param_3" number_literal / (cast_expression "(ulonglong)param_3" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) )))) )) (compound_statement "{\n    if (param_1 == (void *)0x0) {\n      pvVar1 = malloc(param_3 * param_2);\n    }\n    else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }\n    if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;\n  }" { (if_statement "if (param_1 == (void *)0x0) {\n      pvVar1 = malloc(param_3 * param_2);\n    }\n    else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }" if (parenthesized_expression "(param_1 == (void *)0x0)" ( (binary_expression "param_1 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pvVar1 = malloc(param_3 * param_2);\n    }" { (expression_statement "pvVar1 = malloc(param_3 * param_2);" (assignment_expression "pvVar1 = malloc(param_3 * param_2)" identifier = (call_expression "malloc(param_3 * param_2)" identifier (argument_list "(param_3 * param_2)" ( (binary_expression "param_3 * param_2" identifier * identifier) )))) ;) }) (else_clause "else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }" else (compound_statement "{\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }" { (expression_statement "pvVar1 = realloc(param_1,param_3 * param_2);" (assignment_expression "pvVar1 = realloc(param_1,param_3 * param_2)" identifier = (call_expression "realloc(param_1,param_3 * param_2)" identifier (argument_list "(param_1,param_3 * param_2)" ( identifier , (binary_expression "param_3 * param_2" identifier * identifier) )))) ;) }))) (if_statement "if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;" 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_0001ce2d;" 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_00066910("%s",&local_d8);" (call_expression "FUN_00066910("%s",&local_d8)" identifier (argument_list "("%s",&local_d8)" ( (string_literal ""%s"" " string_content ") , (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_0001ce2d:\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_0006dad0();" (call_expression "FUN_0006dad0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (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 ;) (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 { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT * IDENT) )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT * 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 ( (string_literal " string_content ") , (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_0001cd90(void *param_1,uint param_2,uint param_3)\n\n{\n  void *pvVar1;\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  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_2 <= (uint)(0x7fffffff / (ulonglong)param_3)) {\n    if (param_1 == (void *)0x0) {\n      pvVar1 = malloc(param_3 * param_2);\n    }\n    else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }\n    if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;\n  }\n  local_d8 = 0x2074754f;\n  local_d4 = 0x6d20666f;\n  local_d0 = 0x726f6d65;\n  local_cc = 0x2179;\n  local_ca = 0;\n  FUN_00066910("%s",&local_d8);\n  pvVar1 = (void *)0x0;\nLAB_0001ce2d:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }\n                    \n  FUN_0006dad0();\n}" (primitive_type "void") (pointer_declarator "* FUN_0001cd90(void *param_1,uint param_2,uint param_3)" (* "*") (function_declarator "FUN_0001cd90(void *param_1,uint param_2,uint param_3)" (identifier "FUN_0001cd90") (parameter_list "(void *param_1,uint param_2,uint param_3)" (( "(") (parameter_declaration "void *param_1" (primitive_type "void") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) () ")")))) (compound_statement "{\n  void *pvVar1;\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  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_2 <= (uint)(0x7fffffff / (ulonglong)param_3)) {\n    if (param_1 == (void *)0x0) {\n      pvVar1 = malloc(param_3 * param_2);\n    }\n    else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }\n    if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;\n  }\n  local_d8 = 0x2074754f;\n  local_d4 = 0x6d20666f;\n  local_d0 = 0x726f6d65;\n  local_cc = 0x2179;\n  local_ca = 0;\n  FUN_00066910("%s",&local_d8);\n  pvVar1 = (void *)0x0;\nLAB_0001ce2d:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }\n                    \n  FUN_0006dad0();\n}" ({ "{") (declaration "void *pvVar1;" (primitive_type "void") (pointer_declarator "*pvVar1" (* "*") (identifier "pvVar1")) (; ";")) (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") (; ";")) (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_2 <= (uint)(0x7fffffff / (ulonglong)param_3)) {\n    if (param_1 == (void *)0x0) {\n      pvVar1 = malloc(param_3 * param_2);\n    }\n    else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }\n    if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;\n  }" (if "if") (parenthesized_expression "(param_2 <= (uint)(0x7fffffff / (ulonglong)param_3))" (( "(") (binary_expression "param_2 <= (uint)(0x7fffffff / (ulonglong)param_3)" (identifier "param_2") (<= "<=") (call_expression "(uint)(0x7fffffff / (ulonglong)param_3)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(0x7fffffff / (ulonglong)param_3)" (( "(") (binary_expression "0x7fffffff / (ulonglong)param_3" (number_literal "0x7fffffff") (/ "/") (cast_expression "(ulonglong)param_3" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "param_3"))) () ")")))) () ")")) (compound_statement "{\n    if (param_1 == (void *)0x0) {\n      pvVar1 = malloc(param_3 * param_2);\n    }\n    else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }\n    if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;\n  }" ({ "{") (if_statement "if (param_1 == (void *)0x0) {\n      pvVar1 = malloc(param_3 * param_2);\n    }\n    else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }" (if "if") (parenthesized_expression "(param_1 == (void *)0x0)" (( "(") (binary_expression "param_1 == (void *)0x0" (identifier "param_1") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      pvVar1 = malloc(param_3 * param_2);\n    }" ({ "{") (expression_statement "pvVar1 = malloc(param_3 * param_2);" (assignment_expression "pvVar1 = malloc(param_3 * param_2)" (identifier "pvVar1") (= "=") (call_expression "malloc(param_3 * param_2)" (identifier "malloc") (argument_list "(param_3 * param_2)" (( "(") (binary_expression "param_3 * param_2" (identifier "param_3") (* "*") (identifier "param_2")) () ")")))) (; ";")) (} "}")) (else_clause "else {\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }" (else "else") (compound_statement "{\n      pvVar1 = realloc(param_1,param_3 * param_2);\n    }" ({ "{") (expression_statement "pvVar1 = realloc(param_1,param_3 * param_2);" (assignment_expression "pvVar1 = realloc(param_1,param_3 * param_2)" (identifier "pvVar1") (= "=") (call_expression "realloc(param_1,param_3 * param_2)" (identifier "realloc") (argument_list "(param_1,param_3 * param_2)" (( "(") (identifier "param_1") (, ",") (binary_expression "param_3 * param_2" (identifier "param_3") (* "*") (identifier "param_2")) () ")")))) (; ";")) (} "}")))) (if_statement "if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;" (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_0001ce2d;" (goto "goto") (statement_identifier "LAB_0001ce2d") (; ";"))) (} "}"))) (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_00066910("%s",&local_d8);" (call_expression "FUN_00066910("%s",&local_d8)" (identifier "FUN_00066910") (argument_list "("%s",&local_d8)" (( "(") (string_literal ""%s"" (" """) (string_content "%s") (" """)) (, ",") (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_0001ce2d:\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pvVar1;\n  }" (statement_identifier "LAB_0001ce2d") (: ":") (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_0006dad0();" (call_expression "FUN_0006dad0()" (identifier "FUN_0006dad0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

void * function_1(void *var_3,size_t var_2,size_t var_5)

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


(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (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: (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)) (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 (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 (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (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 (string_literal (string_content)) (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(void *param_1,uint param_2,uint param_3)

{
  void *pvVar1;
  int in_GS_OFFSET;
  undefined4 local_d8;
  undefined4 local_d4;
  undefined4 local_d0;
  undefined2 local_cc;
  undefined1 local_ca;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_2 <= (uint)(0x7fffffff / (ulonglong)param_3)) {
    if (param_1 == (void *)0x0) {
      pvVar1 = malloc(param_3 * param_2);
    }
    else {
      pvVar1 = realloc(param_1,param_3 * param_2);
    }
    if (pvVar1 != (void *)0x0) goto LAB_0001ce2d;
  }
  local_d8 = 0x2074754f;
  local_d4 = 0x6d20666f;
  local_d0 = 0x726f6d65;
  local_cc = 0x2179;
  local_ca = 0;
  FUN_00066910("%s",&local_d8);
  pvVar1 = (void *)0x0;
LAB_0001ce2d:
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return pvVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006dad0();
}

