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

void * xnrealloc(void *p,size_t n,size_t s)

{
  size_t __size;
  void *pvVar1;
  
  __size = (size_t)((ulonglong)n * (ulonglong)s);
  if ((-1 < (int)__size) && ((int)((ulonglong)n * (ulonglong)s >> 0x20) == 0)) {
    if ((__size == 0) && (p != (void *)0x0)) {
      free(p);
      return (void *)0x0;
    }
    pvVar1 = realloc(p,__size);
    if ((pvVar1 != (void *)0x0) || (__size == 0)) {
      return pvVar1;
    }
  }
                    /* WARNING: Subroutine does not return */
  xalloc_die();
}



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

void * FUN_0002ee30(void *param_1,uint param_2,uint param_3)

{
  size_t __size;
  void *pvVar1;
  undefined4 uVar2;
  
  uVar2 = 0x2ee37;
  __size = (size_t)((ulonglong)param_2 * (ulonglong)param_3);
  if ((-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)) {
    if ((__size == 0) && (param_1 != (void *)0x0)) {
      free(param_1);
      return (void *)0x0;
    }
    pvVar1 = realloc(param_1,__size);
    if ((pvVar1 != (void *)0x0) || (__size == 0)) {
      return pvVar1;
    }
  }
                    /* WARNING: Subroutine does not return */
  FUN_0002f1c0(uVar2);
}


PUSH ESI
PUSH EBX
CALL 0x000142a0
ADD EBX,0x18fb5
SUB ESP,0x4
MOV EAX,dword ptr [ESP + 0x14]
MUL dword ptr [ESP + 0x18]
MOV ECX,dword ptr [ESP + 0x10]
SETO DL
TEST EAX,EAX
JS 0x0002ee94
MOVZX EDX,DL
TEST EDX,EDX
JNZ 0x0002ee94
MOV ESI,EAX
TEST EAX,EAX
JNZ 0x0002ee64
TEST ECX,ECX
JNZ 0x0002ee80
SUB ESP,0x8
PUSH ESI
PUSH ECX
CALL 0x000122f0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0002ee79
TEST ESI,ESI
JNZ 0x0002ee94
ADD ESP,0x4
POP EBX
POP ESI
RET
SUB ESP,0xc
PUSH ECX
CALL 0x00012740
ADD ESP,0x10
XOR EAX,EAX
ADD ESP,0x4
POP EBX
POP ESI
RET
CALL 0x0002f1c0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid * FUN_0002ee30(void *param_1,uint param_2,uint param_3)\n\n{\n  size_t __size;\n  void *pvVar1;\n  undefined4 uVar2;\n  \n  uVar2 = 0x2ee37;\n  __size = (size_t)((ulonglong)param_2 * (ulonglong)param_3);\n  if ((-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)) {\n    if ((__size == 0) && (param_1 != (void *)0x0)) {\n      free(param_1);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(param_1,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0002f1c0(uVar2);\n}\n\n" comment (function_definition "void * FUN_0002ee30(void *param_1,uint param_2,uint param_3)\n\n{\n  size_t __size;\n  void *pvVar1;\n  undefined4 uVar2;\n  \n  uVar2 = 0x2ee37;\n  __size = (size_t)((ulonglong)param_2 * (ulonglong)param_3);\n  if ((-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)) {\n    if ((__size == 0) && (param_1 != (void *)0x0)) {\n      free(param_1);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(param_1,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0002f1c0(uVar2);\n}" primitive_type (pointer_declarator "* FUN_0002ee30(void *param_1,uint param_2,uint param_3)" * (function_declarator "FUN_0002ee30(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  size_t __size;\n  void *pvVar1;\n  undefined4 uVar2;\n  \n  uVar2 = 0x2ee37;\n  __size = (size_t)((ulonglong)param_2 * (ulonglong)param_3);\n  if ((-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)) {\n    if ((__size == 0) && (param_1 != (void *)0x0)) {\n      free(param_1);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(param_1,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0002f1c0(uVar2);\n}" { (declaration "size_t __size;" primitive_type identifier ;) (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = 0x2ee37;" (assignment_expression "uVar2 = 0x2ee37" identifier = number_literal) ;) (expression_statement "__size = (size_t)((ulonglong)param_2 * (ulonglong)param_3);" (assignment_expression "__size = (size_t)((ulonglong)param_2 * (ulonglong)param_3)" identifier = (cast_expression "(size_t)((ulonglong)param_2 * (ulonglong)param_3)" ( (type_descriptor "size_t" primitive_type) ) (parenthesized_expression "((ulonglong)param_2 * (ulonglong)param_3)" ( (binary_expression "(ulonglong)param_2 * (ulonglong)param_3" (cast_expression "(ulonglong)param_2" ( (type_descriptor "ulonglong" type_identifier) ) identifier) * (cast_expression "(ulonglong)param_3" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) )))) ;) (if_statement "if ((-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)) {\n    if ((__size == 0) && (param_1 != (void *)0x0)) {\n      free(param_1);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(param_1,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }" if (parenthesized_expression "((-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0))" ( (binary_expression "(-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)" (parenthesized_expression "(-1 < (int)__size)" ( (binary_expression "-1 < (int)__size" number_literal < (cast_expression "(int)__size" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)" ( (binary_expression "(int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0" (cast_expression "(int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)param_2 * (ulonglong)param_3 >> 0x20)" ( (binary_expression "(ulonglong)param_2 * (ulonglong)param_3 >> 0x20" (binary_expression "(ulonglong)param_2 * (ulonglong)param_3" (cast_expression "(ulonglong)param_2" ( (type_descriptor "ulonglong" type_identifier) ) identifier) * (cast_expression "(ulonglong)param_3" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) >> number_literal) ))) == number_literal) ))) )) (compound_statement "{\n    if ((__size == 0) && (param_1 != (void *)0x0)) {\n      free(param_1);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(param_1,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }" { (if_statement "if ((__size == 0) && (param_1 != (void *)0x0)) {\n      free(param_1);\n      return (void *)0x0;\n    }" if (parenthesized_expression "((__size == 0) && (param_1 != (void *)0x0))" ( (binary_expression "(__size == 0) && (param_1 != (void *)0x0)" (parenthesized_expression "(__size == 0)" ( (binary_expression "__size == 0" identifier == number_literal) )) && (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      free(param_1);\n      return (void *)0x0;\n    }" { (expression_statement "free(param_1);" (call_expression "free(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pvVar1 = realloc(param_1,__size);" (assignment_expression "pvVar1 = realloc(param_1,__size)" identifier = (call_expression "realloc(param_1,__size)" identifier (argument_list "(param_1,__size)" ( identifier , identifier )))) ;) (if_statement "if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }" if (parenthesized_expression "((pvVar1 != (void *)0x0) || (__size == 0))" ( (binary_expression "(pvVar1 != (void *)0x0) || (__size == 0)" (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)) )) || (parenthesized_expression "(__size == 0)" ( (binary_expression "__size == 0" identifier == number_literal) ))) )) (compound_statement "{\n      return pvVar1;\n    }" { (return_statement "return pvVar1;" return identifier ;) })) })) comment (expression_statement "FUN_0002f1c0(uVar2);" (call_expression "FUN_0002f1c0(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid * xnrealloc(void *p,size_t n,size_t s)\n\n{\n  size_t __size;\n  void *pvVar1;\n  \n  __size = (size_t)((ulonglong)n * (ulonglong)s);\n  if ((-1 < (int)__size) && ((int)((ulonglong)n * (ulonglong)s >> 0x20) == 0)) {\n    if ((__size == 0) && (p != (void *)0x0)) {\n      free(p);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(p,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }\n                    /* WARNING: Subroutine does not return */\n  xalloc_die();\n}\n\n" comment comment (function_definition "void * xnrealloc(void *p,size_t n,size_t s)\n\n{\n  size_t __size;\n  void *pvVar1;\n  \n  __size = (size_t)((ulonglong)n * (ulonglong)s);\n  if ((-1 < (int)__size) && ((int)((ulonglong)n * (ulonglong)s >> 0x20) == 0)) {\n    if ((__size == 0) && (p != (void *)0x0)) {\n      free(p);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(p,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }\n                    /* WARNING: Subroutine does not return */\n  xalloc_die();\n}" primitive_type (pointer_declarator "* xnrealloc(void *p,size_t n,size_t s)" * (function_declarator "xnrealloc(void *p,size_t n,size_t s)" identifier (parameter_list "(void *p,size_t n,size_t s)" ( (parameter_declaration "void *p" primitive_type (pointer_declarator "*p" * identifier)) , (parameter_declaration "size_t n" primitive_type identifier) , (parameter_declaration "size_t s" primitive_type identifier) )))) (compound_statement "{\n  size_t __size;\n  void *pvVar1;\n  \n  __size = (size_t)((ulonglong)n * (ulonglong)s);\n  if ((-1 < (int)__size) && ((int)((ulonglong)n * (ulonglong)s >> 0x20) == 0)) {\n    if ((__size == 0) && (p != (void *)0x0)) {\n      free(p);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(p,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }\n                    /* WARNING: Subroutine does not return */\n  xalloc_die();\n}" { (declaration "size_t __size;" primitive_type identifier ;) (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (expression_statement "__size = (size_t)((ulonglong)n * (ulonglong)s);" (assignment_expression "__size = (size_t)((ulonglong)n * (ulonglong)s)" identifier = (cast_expression "(size_t)((ulonglong)n * (ulonglong)s)" ( (type_descriptor "size_t" primitive_type) ) (parenthesized_expression "((ulonglong)n * (ulonglong)s)" ( (binary_expression "(ulonglong)n * (ulonglong)s" (cast_expression "(ulonglong)n" ( (type_descriptor "ulonglong" type_identifier) ) identifier) * (cast_expression "(ulonglong)s" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) )))) ;) (if_statement "if ((-1 < (int)__size) && ((int)((ulonglong)n * (ulonglong)s >> 0x20) == 0)) {\n    if ((__size == 0) && (p != (void *)0x0)) {\n      free(p);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(p,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }" if (parenthesized_expression "((-1 < (int)__size) && ((int)((ulonglong)n * (ulonglong)s >> 0x20) == 0))" ( (binary_expression "(-1 < (int)__size) && ((int)((ulonglong)n * (ulonglong)s >> 0x20) == 0)" (parenthesized_expression "(-1 < (int)__size)" ( (binary_expression "-1 < (int)__size" number_literal < (cast_expression "(int)__size" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "((int)((ulonglong)n * (ulonglong)s >> 0x20) == 0)" ( (binary_expression "(int)((ulonglong)n * (ulonglong)s >> 0x20) == 0" (cast_expression "(int)((ulonglong)n * (ulonglong)s >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)n * (ulonglong)s >> 0x20)" ( (binary_expression "(ulonglong)n * (ulonglong)s >> 0x20" (binary_expression "(ulonglong)n * (ulonglong)s" (cast_expression "(ulonglong)n" ( (type_descriptor "ulonglong" type_identifier) ) identifier) * (cast_expression "(ulonglong)s" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) >> number_literal) ))) == number_literal) ))) )) (compound_statement "{\n    if ((__size == 0) && (p != (void *)0x0)) {\n      free(p);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(p,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }" { (if_statement "if ((__size == 0) && (p != (void *)0x0)) {\n      free(p);\n      return (void *)0x0;\n    }" if (parenthesized_expression "((__size == 0) && (p != (void *)0x0))" ( (binary_expression "(__size == 0) && (p != (void *)0x0)" (parenthesized_expression "(__size == 0)" ( (binary_expression "__size == 0" identifier == number_literal) )) && (parenthesized_expression "(p != (void *)0x0)" ( (binary_expression "p != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n      free(p);\n      return (void *)0x0;\n    }" { (expression_statement "free(p);" (call_expression "free(p)" identifier (argument_list "(p)" ( identifier ))) ;) (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pvVar1 = realloc(p,__size);" (assignment_expression "pvVar1 = realloc(p,__size)" identifier = (call_expression "realloc(p,__size)" identifier (argument_list "(p,__size)" ( identifier , identifier )))) ;) (if_statement "if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }" if (parenthesized_expression "((pvVar1 != (void *)0x0) || (__size == 0))" ( (binary_expression "(pvVar1 != (void *)0x0) || (__size == 0)" (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)) )) || (parenthesized_expression "(__size == 0)" ( (binary_expression "__size == 0" identifier == number_literal) ))) )) (compound_statement "{\n      return pvVar1;\n    }" { (return_statement "return pvVar1;" return identifier ;) })) })) comment (expression_statement "xalloc_die();" (call_expression "xalloc_die()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void * FUN_0002ee30(void *param_1,uint param_2,uint param_3)\n\n{\n  size_t __size;\n  void *pvVar1;\n  undefined4 uVar2;\n  \n  uVar2 = 0x2ee37;\n  __size = (size_t)((ulonglong)param_2 * (ulonglong)param_3);\n  if ((-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)) {\n    if ((__size == 0) && (param_1 != (void *)0x0)) {\n      free(param_1);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(param_1,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }\n                    \n  FUN_0002f1c0(uVar2);\n}\n\n" (function_definition "void * FUN_0002ee30(void *param_1,uint param_2,uint param_3)\n\n{\n  size_t __size;\n  void *pvVar1;\n  undefined4 uVar2;\n  \n  uVar2 = 0x2ee37;\n  __size = (size_t)((ulonglong)param_2 * (ulonglong)param_3);\n  if ((-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)) {\n    if ((__size == 0) && (param_1 != (void *)0x0)) {\n      free(param_1);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(param_1,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }\n                    \n  FUN_0002f1c0(uVar2);\n}" primitive_type (pointer_declarator "* FUN_0002ee30(void *param_1,uint param_2,uint param_3)" * (function_declarator "FUN_0002ee30(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  size_t __size;\n  void *pvVar1;\n  undefined4 uVar2;\n  \n  uVar2 = 0x2ee37;\n  __size = (size_t)((ulonglong)param_2 * (ulonglong)param_3);\n  if ((-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)) {\n    if ((__size == 0) && (param_1 != (void *)0x0)) {\n      free(param_1);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(param_1,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }\n                    \n  FUN_0002f1c0(uVar2);\n}" { (declaration "size_t __size;" primitive_type identifier ;) (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = 0x2ee37;" (assignment_expression "uVar2 = 0x2ee37" identifier = number_literal) ;) (expression_statement "__size = (size_t)((ulonglong)param_2 * (ulonglong)param_3);" (assignment_expression "__size = (size_t)((ulonglong)param_2 * (ulonglong)param_3)" identifier = (cast_expression "(size_t)((ulonglong)param_2 * (ulonglong)param_3)" ( (type_descriptor "size_t" primitive_type) ) (parenthesized_expression "((ulonglong)param_2 * (ulonglong)param_3)" ( (binary_expression "(ulonglong)param_2 * (ulonglong)param_3" (cast_expression "(ulonglong)param_2" ( (type_descriptor "ulonglong" type_identifier) ) identifier) * (cast_expression "(ulonglong)param_3" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) )))) ;) (if_statement "if ((-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)) {\n    if ((__size == 0) && (param_1 != (void *)0x0)) {\n      free(param_1);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(param_1,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }" if (parenthesized_expression "((-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0))" ( (binary_expression "(-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)" (parenthesized_expression "(-1 < (int)__size)" ( (binary_expression "-1 < (int)__size" number_literal < (cast_expression "(int)__size" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)" ( (binary_expression "(int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0" (cast_expression "(int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)param_2 * (ulonglong)param_3 >> 0x20)" ( (binary_expression "(ulonglong)param_2 * (ulonglong)param_3 >> 0x20" (binary_expression "(ulonglong)param_2 * (ulonglong)param_3" (cast_expression "(ulonglong)param_2" ( (type_descriptor "ulonglong" type_identifier) ) identifier) * (cast_expression "(ulonglong)param_3" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) >> number_literal) ))) == number_literal) ))) )) (compound_statement "{\n    if ((__size == 0) && (param_1 != (void *)0x0)) {\n      free(param_1);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(param_1,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }" { (if_statement "if ((__size == 0) && (param_1 != (void *)0x0)) {\n      free(param_1);\n      return (void *)0x0;\n    }" if (parenthesized_expression "((__size == 0) && (param_1 != (void *)0x0))" ( (binary_expression "(__size == 0) && (param_1 != (void *)0x0)" (parenthesized_expression "(__size == 0)" ( (binary_expression "__size == 0" identifier == number_literal) )) && (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      free(param_1);\n      return (void *)0x0;\n    }" { (expression_statement "free(param_1);" (call_expression "free(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pvVar1 = realloc(param_1,__size);" (assignment_expression "pvVar1 = realloc(param_1,__size)" identifier = (call_expression "realloc(param_1,__size)" identifier (argument_list "(param_1,__size)" ( identifier , identifier )))) ;) (if_statement "if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }" if (parenthesized_expression "((pvVar1 != (void *)0x0) || (__size == 0))" ( (binary_expression "(pvVar1 != (void *)0x0) || (__size == 0)" (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)) )) || (parenthesized_expression "(__size == 0)" ( (binary_expression "__size == 0" identifier == number_literal) ))) )) (compound_statement "{\n      return pvVar1;\n    }" { (return_statement "return pvVar1;" return identifier ;) })) })) (expression_statement "FUN_0002f1c0(uVar2);" (call_expression "FUN_0002f1c0(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) })))
(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 IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) && (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * (cast_expression ( (type_descriptor TYPE) ) IDENT)) >> LIT) ))) == LIT) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) || (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) (compound_statement { (return_statement return IDENT ;) })) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })))
(function_definition "void * FUN_0002ee30(void *param_1,uint param_2,uint param_3)\n\n{\n  size_t __size;\n  void *pvVar1;\n  undefined4 uVar2;\n  \n  uVar2 = 0x2ee37;\n  __size = (size_t)((ulonglong)param_2 * (ulonglong)param_3);\n  if ((-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)) {\n    if ((__size == 0) && (param_1 != (void *)0x0)) {\n      free(param_1);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(param_1,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }\n                    \n  FUN_0002f1c0(uVar2);\n}" (primitive_type "void") (pointer_declarator "* FUN_0002ee30(void *param_1,uint param_2,uint param_3)" (* "*") (function_declarator "FUN_0002ee30(void *param_1,uint param_2,uint param_3)" (identifier "FUN_0002ee30") (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  size_t __size;\n  void *pvVar1;\n  undefined4 uVar2;\n  \n  uVar2 = 0x2ee37;\n  __size = (size_t)((ulonglong)param_2 * (ulonglong)param_3);\n  if ((-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)) {\n    if ((__size == 0) && (param_1 != (void *)0x0)) {\n      free(param_1);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(param_1,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }\n                    \n  FUN_0002f1c0(uVar2);\n}" ({ "{") (declaration "size_t __size;" (primitive_type "size_t") (identifier "__size") (; ";")) (declaration "void *pvVar1;" (primitive_type "void") (pointer_declarator "*pvVar1" (* "*") (identifier "pvVar1")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (expression_statement "uVar2 = 0x2ee37;" (assignment_expression "uVar2 = 0x2ee37" (identifier "uVar2") (= "=") (number_literal "0x2ee37")) (; ";")) (expression_statement "__size = (size_t)((ulonglong)param_2 * (ulonglong)param_3);" (assignment_expression "__size = (size_t)((ulonglong)param_2 * (ulonglong)param_3)" (identifier "__size") (= "=") (cast_expression "(size_t)((ulonglong)param_2 * (ulonglong)param_3)" (( "(") (type_descriptor "size_t" (primitive_type "size_t")) () ")") (parenthesized_expression "((ulonglong)param_2 * (ulonglong)param_3)" (( "(") (binary_expression "(ulonglong)param_2 * (ulonglong)param_3" (cast_expression "(ulonglong)param_2" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "param_2")) (* "*") (cast_expression "(ulonglong)param_3" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "param_3"))) () ")")))) (; ";")) (if_statement "if ((-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)) {\n    if ((__size == 0) && (param_1 != (void *)0x0)) {\n      free(param_1);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(param_1,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }" (if "if") (parenthesized_expression "((-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0))" (( "(") (binary_expression "(-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)" (parenthesized_expression "(-1 < (int)__size)" (( "(") (binary_expression "-1 < (int)__size" (number_literal "-1") (< "<") (cast_expression "(int)__size" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__size"))) () ")")) (&& "&&") (parenthesized_expression "((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)" (( "(") (binary_expression "(int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0" (cast_expression "(int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((ulonglong)param_2 * (ulonglong)param_3 >> 0x20)" (( "(") (binary_expression "(ulonglong)param_2 * (ulonglong)param_3 >> 0x20" (binary_expression "(ulonglong)param_2 * (ulonglong)param_3" (cast_expression "(ulonglong)param_2" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "param_2")) (* "*") (cast_expression "(ulonglong)param_3" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "param_3"))) (>> ">>") (number_literal "0x20")) () ")"))) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    if ((__size == 0) && (param_1 != (void *)0x0)) {\n      free(param_1);\n      return (void *)0x0;\n    }\n    pvVar1 = realloc(param_1,__size);\n    if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }\n  }" ({ "{") (if_statement "if ((__size == 0) && (param_1 != (void *)0x0)) {\n      free(param_1);\n      return (void *)0x0;\n    }" (if "if") (parenthesized_expression "((__size == 0) && (param_1 != (void *)0x0))" (( "(") (binary_expression "(__size == 0) && (param_1 != (void *)0x0)" (parenthesized_expression "(__size == 0)" (( "(") (binary_expression "__size == 0" (identifier "__size") (== "==") (number_literal "0")) () ")")) (&& "&&") (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      free(param_1);\n      return (void *)0x0;\n    }" ({ "{") (expression_statement "free(param_1);" (call_expression "free(param_1)" (identifier "free") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (return_statement "return (void *)0x0;" (return "return") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (expression_statement "pvVar1 = realloc(param_1,__size);" (assignment_expression "pvVar1 = realloc(param_1,__size)" (identifier "pvVar1") (= "=") (call_expression "realloc(param_1,__size)" (identifier "realloc") (argument_list "(param_1,__size)" (( "(") (identifier "param_1") (, ",") (identifier "__size") () ")")))) (; ";")) (if_statement "if ((pvVar1 != (void *)0x0) || (__size == 0)) {\n      return pvVar1;\n    }" (if "if") (parenthesized_expression "((pvVar1 != (void *)0x0) || (__size == 0))" (( "(") (binary_expression "(pvVar1 != (void *)0x0) || (__size == 0)" (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"))) () ")")) (|| "||") (parenthesized_expression "(__size == 0)" (( "(") (binary_expression "__size == 0" (identifier "__size") (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      return pvVar1;\n    }" ({ "{") (return_statement "return pvVar1;" (return "return") (identifier "pvVar1") (; ";")) (} "}"))) (} "}"))) (expression_statement "FUN_0002f1c0(uVar2);" (call_expression "FUN_0002f1c0(uVar2)" (identifier "FUN_0002f1c0") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (} "}")))

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

void * function_1(void *var_2,size_t n,size_t s)

{
  size_t var_1;
  void *var_5;
  
  var_1 = (size_t)((type_1)n * (type_1)s);
  if ((-1 < (int)var_1) && ((int)((type_1)n * (type_1)s >> 0x20) == 0)) {
    if ((var_1 == 0) && (var_2 != (void *)0x0)) {
      var_3(var_2);
      return (void *)0x0;
    }
    var_5 = var_4(var_2,var_1);
    if ((var_5 != (void *)0x0) || (var_1 == 0)) {
      return var_5;
    }
  }
                    /* WARNING: Subroutine does not return */
  var_6();
}


(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: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))) right: (number_literal)))) right: (number_literal))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (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 (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) consequence: (compound_statement (return_statement (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))))

/* 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)

{
  size_t __size;
  void *pvVar1;
  undefined4 uVar2;
  
  uVar2 = 0x2ee37;
  __size = (size_t)((ulonglong)param_2 * (ulonglong)param_3);
  if ((-1 < (int)__size) && ((int)((ulonglong)param_2 * (ulonglong)param_3 >> 0x20) == 0)) {
    if ((__size == 0) && (param_1 != (void *)0x0)) {
      free(param_1);
      return (void *)0x0;
    }
    pvVar1 = realloc(param_1,__size);
    if ((pvVar1 != (void *)0x0) || (__size == 0)) {
      return pvVar1;
    }
  }
                    /* WARNING: Subroutine does not return */
  FUN_0002f1c0(uVar2);
}

