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

void * xcrealloc(void *ptr,size_t nmemb,size_t size)

{
  void *pvVar1;
  uint uVar2;
  char *message;
  uint unaff_EBX;
  uint unaff_ESI;
  
  if (nmemb < (uint)(0xffffffff / (ulonglong)size)) {
    pvVar1 = (void *)xrealloc(ptr,size * nmemb);
    return pvVar1;
  }
  xcrealloc((void *)nmemb,(size_t)(0xffffffff % (ulonglong)size),size);
  uVar2 = (uint)(0xffffffff / (ulonglong)unaff_ESI);
  if (unaff_EBX < uVar2) {
    pvVar1 = (void *)xcalloc(unaff_EBX,unaff_ESI);
    return pvVar1;
  }
  message = (char *)dcgettext(0,
                              "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"
                              ,5,uVar2,0x3122e,&_GLOBAL_OFFSET_TABLE_,nmemb);
  error(message,unaff_EBX);
                    /* WARNING: Subroutine does not return */
  xexit(1);
}



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

void FUN_000311d0(undefined4 param_1,uint param_2,uint param_3)

{
  uint uVar1;
  undefined4 uVar2;
  uint unaff_EBX;
  uint unaff_ESI;
  
  if (param_2 < (uint)(0xffffffff / (ulonglong)param_3)) {
    xrealloc(param_1,param_3 * param_2);
    return;
  }
  FUN_0001e980();
  uVar1 = (uint)(0xffffffff / (ulonglong)unaff_ESI);
  if (unaff_EBX < uVar1) {
    xcalloc(unaff_EBX,unaff_ESI);
    return;
  }
  uVar2 = dcgettext(0,
                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"
                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2);
  error(uVar2,unaff_EBX);
                    /* WARNING: Subroutine does not return */
  xexit(1);
}


PUSH ESI
MOV EAX,0xffffffff
XOR EDX,EDX
PUSH EBX
CALL 0x000153d0
ADD EBX,0x41e22
SUB ESP,0x4
MOV ECX,dword ptr [ESP + 0x18]
MOV ESI,dword ptr [ESP + 0x14]
DIV ECX
CMP EAX,ESI
JBE 0x0003120b
IMUL ECX,ESI
SUB ESP,0x8
PUSH ECX
PUSH dword ptr [ESP + 0x1c]
CALL 0x00014220
ADD ESP,0x14
POP EBX
POP ESI
RET
MOV EAX,ESI
CALL 0x0001e980
LEA ESI,[ESI]
LEA ESI,[ESI]
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_000311d0(undefined4 param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  uint unaff_EBX;\n  uint unaff_ESI;\n  \n  if (param_2 < (uint)(0xffffffff / (ulonglong)param_3)) {\n    xrealloc(param_1,param_3 * param_2);\n    return;\n  }\n  FUN_0001e980();\n  uVar1 = (uint)(0xffffffff / (ulonglong)unaff_ESI);\n  if (unaff_EBX < uVar1) {\n    xcalloc(unaff_EBX,unaff_ESI);\n    return;\n  }\n  uVar2 = dcgettext(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2);\n  error(uVar2,unaff_EBX);\n                    /* WARNING: Subroutine does not return */\n  xexit(1);\n}\n\n" comment (function_definition "void FUN_000311d0(undefined4 param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  uint unaff_EBX;\n  uint unaff_ESI;\n  \n  if (param_2 < (uint)(0xffffffff / (ulonglong)param_3)) {\n    xrealloc(param_1,param_3 * param_2);\n    return;\n  }\n  FUN_0001e980();\n  uVar1 = (uint)(0xffffffff / (ulonglong)unaff_ESI);\n  if (unaff_EBX < uVar1) {\n    xcalloc(unaff_EBX,unaff_ESI);\n    return;\n  }\n  uVar2 = dcgettext(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2);\n  error(uVar2,unaff_EBX);\n                    /* WARNING: Subroutine does not return */\n  xexit(1);\n}" primitive_type (function_declarator "FUN_000311d0(undefined4 param_1,uint param_2,uint param_3)" identifier (parameter_list "(undefined4 param_1,uint param_2,uint param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  undefined4 uVar2;\n  uint unaff_EBX;\n  uint unaff_ESI;\n  \n  if (param_2 < (uint)(0xffffffff / (ulonglong)param_3)) {\n    xrealloc(param_1,param_3 * param_2);\n    return;\n  }\n  FUN_0001e980();\n  uVar1 = (uint)(0xffffffff / (ulonglong)unaff_ESI);\n  if (unaff_EBX < uVar1) {\n    xcalloc(unaff_EBX,unaff_ESI);\n    return;\n  }\n  uVar2 = dcgettext(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2);\n  error(uVar2,unaff_EBX);\n                    /* WARNING: Subroutine does not return */\n  xexit(1);\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "uint unaff_EBX;" type_identifier identifier ;) (declaration "uint unaff_ESI;" type_identifier identifier ;) (if_statement "if (param_2 < (uint)(0xffffffff / (ulonglong)param_3)) {\n    xrealloc(param_1,param_3 * param_2);\n    return;\n  }" if (parenthesized_expression "(param_2 < (uint)(0xffffffff / (ulonglong)param_3))" ( (binary_expression "param_2 < (uint)(0xffffffff / (ulonglong)param_3)" identifier < (call_expression "(uint)(0xffffffff / (ulonglong)param_3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xffffffff / (ulonglong)param_3)" ( (binary_expression "0xffffffff / (ulonglong)param_3" number_literal / (cast_expression "(ulonglong)param_3" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) )))) )) (compound_statement "{\n    xrealloc(param_1,param_3 * param_2);\n    return;\n  }" { (expression_statement "xrealloc(param_1,param_3 * param_2);" (call_expression "xrealloc(param_1,param_3 * param_2)" identifier (argument_list "(param_1,param_3 * param_2)" ( identifier , (binary_expression "param_3 * param_2" identifier * identifier) ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_0001e980();" (call_expression "FUN_0001e980()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar1 = (uint)(0xffffffff / (ulonglong)unaff_ESI);" (assignment_expression "uVar1 = (uint)(0xffffffff / (ulonglong)unaff_ESI)" identifier = (call_expression "(uint)(0xffffffff / (ulonglong)unaff_ESI)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xffffffff / (ulonglong)unaff_ESI)" ( (binary_expression "0xffffffff / (ulonglong)unaff_ESI" number_literal / (cast_expression "(ulonglong)unaff_ESI" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) )))) ;) (if_statement "if (unaff_EBX < uVar1) {\n    xcalloc(unaff_EBX,unaff_ESI);\n    return;\n  }" if (parenthesized_expression "(unaff_EBX < uVar1)" ( (binary_expression "unaff_EBX < uVar1" identifier < identifier) )) (compound_statement "{\n    xcalloc(unaff_EBX,unaff_ESI);\n    return;\n  }" { (expression_statement "xcalloc(unaff_EBX,unaff_ESI);" (call_expression "xcalloc(unaff_EBX,unaff_ESI)" identifier (argument_list "(unaff_EBX,unaff_ESI)" ( identifier , identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "uVar2 = dcgettext(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2);" (assignment_expression "uVar2 = dcgettext(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2)" identifier = (call_expression "dcgettext(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2)" identifier (argument_list "(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2)" ( number_literal , (string_literal ""Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"" " string_content escape_sequence string_content escape_sequence ") , number_literal , identifier , number_literal , (pointer_expression "&__DT_PLTGOT" & identifier) , identifier )))) ;) (expression_statement "error(uVar2,unaff_EBX);" (call_expression "error(uVar2,unaff_EBX)" identifier (argument_list "(uVar2,unaff_EBX)" ( identifier , identifier ))) ;) comment (expression_statement "xexit(1);" (call_expression "xexit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid * xcrealloc(void *ptr,size_t nmemb,size_t size)\n\n{\n  void *pvVar1;\n  uint uVar2;\n  char *message;\n  uint unaff_EBX;\n  uint unaff_ESI;\n  \n  if (nmemb < (uint)(0xffffffff / (ulonglong)size)) {\n    pvVar1 = (void *)xrealloc(ptr,size * nmemb);\n    return pvVar1;\n  }\n  xcrealloc((void *)nmemb,(size_t)(0xffffffff % (ulonglong)size),size);\n  uVar2 = (uint)(0xffffffff / (ulonglong)unaff_ESI);\n  if (unaff_EBX < uVar2) {\n    pvVar1 = (void *)xcalloc(unaff_EBX,unaff_ESI);\n    return pvVar1;\n  }\n  message = (char *)dcgettext(0,\n                              "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                              ,5,uVar2,0x3122e,&_GLOBAL_OFFSET_TABLE_,nmemb);\n  error(message,unaff_EBX);\n                    /* WARNING: Subroutine does not return */\n  xexit(1);\n}\n\n" comment comment (function_definition "void * xcrealloc(void *ptr,size_t nmemb,size_t size)\n\n{\n  void *pvVar1;\n  uint uVar2;\n  char *message;\n  uint unaff_EBX;\n  uint unaff_ESI;\n  \n  if (nmemb < (uint)(0xffffffff / (ulonglong)size)) {\n    pvVar1 = (void *)xrealloc(ptr,size * nmemb);\n    return pvVar1;\n  }\n  xcrealloc((void *)nmemb,(size_t)(0xffffffff % (ulonglong)size),size);\n  uVar2 = (uint)(0xffffffff / (ulonglong)unaff_ESI);\n  if (unaff_EBX < uVar2) {\n    pvVar1 = (void *)xcalloc(unaff_EBX,unaff_ESI);\n    return pvVar1;\n  }\n  message = (char *)dcgettext(0,\n                              "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                              ,5,uVar2,0x3122e,&_GLOBAL_OFFSET_TABLE_,nmemb);\n  error(message,unaff_EBX);\n                    /* WARNING: Subroutine does not return */\n  xexit(1);\n}" primitive_type (pointer_declarator "* xcrealloc(void *ptr,size_t nmemb,size_t size)" * (function_declarator "xcrealloc(void *ptr,size_t nmemb,size_t size)" identifier (parameter_list "(void *ptr,size_t nmemb,size_t size)" ( (parameter_declaration "void *ptr" primitive_type (pointer_declarator "*ptr" * identifier)) , (parameter_declaration "size_t nmemb" primitive_type identifier) , (parameter_declaration "size_t size" primitive_type identifier) )))) (compound_statement "{\n  void *pvVar1;\n  uint uVar2;\n  char *message;\n  uint unaff_EBX;\n  uint unaff_ESI;\n  \n  if (nmemb < (uint)(0xffffffff / (ulonglong)size)) {\n    pvVar1 = (void *)xrealloc(ptr,size * nmemb);\n    return pvVar1;\n  }\n  xcrealloc((void *)nmemb,(size_t)(0xffffffff % (ulonglong)size),size);\n  uVar2 = (uint)(0xffffffff / (ulonglong)unaff_ESI);\n  if (unaff_EBX < uVar2) {\n    pvVar1 = (void *)xcalloc(unaff_EBX,unaff_ESI);\n    return pvVar1;\n  }\n  message = (char *)dcgettext(0,\n                              "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                              ,5,uVar2,0x3122e,&_GLOBAL_OFFSET_TABLE_,nmemb);\n  error(message,unaff_EBX);\n                    /* WARNING: Subroutine does not return */\n  xexit(1);\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "char *message;" primitive_type (pointer_declarator "*message" * identifier) ;) (declaration "uint unaff_EBX;" type_identifier identifier ;) (declaration "uint unaff_ESI;" type_identifier identifier ;) (if_statement "if (nmemb < (uint)(0xffffffff / (ulonglong)size)) {\n    pvVar1 = (void *)xrealloc(ptr,size * nmemb);\n    return pvVar1;\n  }" if (parenthesized_expression "(nmemb < (uint)(0xffffffff / (ulonglong)size))" ( (binary_expression "nmemb < (uint)(0xffffffff / (ulonglong)size)" identifier < (call_expression "(uint)(0xffffffff / (ulonglong)size)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xffffffff / (ulonglong)size)" ( (binary_expression "0xffffffff / (ulonglong)size" number_literal / (cast_expression "(ulonglong)size" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) )))) )) (compound_statement "{\n    pvVar1 = (void *)xrealloc(ptr,size * nmemb);\n    return pvVar1;\n  }" { (expression_statement "pvVar1 = (void *)xrealloc(ptr,size * nmemb);" (assignment_expression "pvVar1 = (void *)xrealloc(ptr,size * nmemb)" identifier = (cast_expression "(void *)xrealloc(ptr,size * nmemb)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xrealloc(ptr,size * nmemb)" identifier (argument_list "(ptr,size * nmemb)" ( identifier , (binary_expression "size * nmemb" identifier * identifier) ))))) ;) (return_statement "return pvVar1;" return identifier ;) })) (expression_statement "xcrealloc((void *)nmemb,(size_t)(0xffffffff % (ulonglong)size),size);" (call_expression "xcrealloc((void *)nmemb,(size_t)(0xffffffff % (ulonglong)size),size)" identifier (argument_list "((void *)nmemb,(size_t)(0xffffffff % (ulonglong)size),size)" ( (cast_expression "(void *)nmemb" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , (cast_expression "(size_t)(0xffffffff % (ulonglong)size)" ( (type_descriptor "size_t" primitive_type) ) (parenthesized_expression "(0xffffffff % (ulonglong)size)" ( (binary_expression "0xffffffff % (ulonglong)size" number_literal % (cast_expression "(ulonglong)size" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) ))) , identifier ))) ;) (expression_statement "uVar2 = (uint)(0xffffffff / (ulonglong)unaff_ESI);" (assignment_expression "uVar2 = (uint)(0xffffffff / (ulonglong)unaff_ESI)" identifier = (call_expression "(uint)(0xffffffff / (ulonglong)unaff_ESI)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xffffffff / (ulonglong)unaff_ESI)" ( (binary_expression "0xffffffff / (ulonglong)unaff_ESI" number_literal / (cast_expression "(ulonglong)unaff_ESI" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) )))) ;) (if_statement "if (unaff_EBX < uVar2) {\n    pvVar1 = (void *)xcalloc(unaff_EBX,unaff_ESI);\n    return pvVar1;\n  }" if (parenthesized_expression "(unaff_EBX < uVar2)" ( (binary_expression "unaff_EBX < uVar2" identifier < identifier) )) (compound_statement "{\n    pvVar1 = (void *)xcalloc(unaff_EBX,unaff_ESI);\n    return pvVar1;\n  }" { (expression_statement "pvVar1 = (void *)xcalloc(unaff_EBX,unaff_ESI);" (assignment_expression "pvVar1 = (void *)xcalloc(unaff_EBX,unaff_ESI)" identifier = (cast_expression "(void *)xcalloc(unaff_EBX,unaff_ESI)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xcalloc(unaff_EBX,unaff_ESI)" identifier (argument_list "(unaff_EBX,unaff_ESI)" ( identifier , identifier ))))) ;) (return_statement "return pvVar1;" return identifier ;) })) (expression_statement "message = (char *)dcgettext(0,\n                              "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                              ,5,uVar2,0x3122e,&_GLOBAL_OFFSET_TABLE_,nmemb);" (assignment_expression "message = (char *)dcgettext(0,\n                              "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                              ,5,uVar2,0x3122e,&_GLOBAL_OFFSET_TABLE_,nmemb)" identifier = (cast_expression "(char *)dcgettext(0,\n                              "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                              ,5,uVar2,0x3122e,&_GLOBAL_OFFSET_TABLE_,nmemb)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,\n                              "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                              ,5,uVar2,0x3122e,&_GLOBAL_OFFSET_TABLE_,nmemb)" identifier (argument_list "(0,\n                              "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                              ,5,uVar2,0x3122e,&_GLOBAL_OFFSET_TABLE_,nmemb)" ( number_literal , (string_literal ""Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"" " string_content escape_sequence string_content escape_sequence ") , number_literal , identifier , number_literal , (pointer_expression "&_GLOBAL_OFFSET_TABLE_" & identifier) , identifier ))))) ;) (expression_statement "error(message,unaff_EBX);" (call_expression "error(message,unaff_EBX)" identifier (argument_list "(message,unaff_EBX)" ( identifier , identifier ))) ;) comment (expression_statement "xexit(1);" (call_expression "xexit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) })))
(translation_unit "void FUN_000311d0(undefined4 param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  uint unaff_EBX;\n  uint unaff_ESI;\n  \n  if (param_2 < (uint)(0xffffffff / (ulonglong)param_3)) {\n    xrealloc(param_1,param_3 * param_2);\n    return;\n  }\n  FUN_0001e980();\n  uVar1 = (uint)(0xffffffff / (ulonglong)unaff_ESI);\n  if (unaff_EBX < uVar1) {\n    xcalloc(unaff_EBX,unaff_ESI);\n    return;\n  }\n  uVar2 = dcgettext(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2);\n  error(uVar2,unaff_EBX);\n                    \n  xexit(1);\n}\n\n" (function_definition "void FUN_000311d0(undefined4 param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  uint unaff_EBX;\n  uint unaff_ESI;\n  \n  if (param_2 < (uint)(0xffffffff / (ulonglong)param_3)) {\n    xrealloc(param_1,param_3 * param_2);\n    return;\n  }\n  FUN_0001e980();\n  uVar1 = (uint)(0xffffffff / (ulonglong)unaff_ESI);\n  if (unaff_EBX < uVar1) {\n    xcalloc(unaff_EBX,unaff_ESI);\n    return;\n  }\n  uVar2 = dcgettext(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2);\n  error(uVar2,unaff_EBX);\n                    \n  xexit(1);\n}" primitive_type (function_declarator "FUN_000311d0(undefined4 param_1,uint param_2,uint param_3)" identifier (parameter_list "(undefined4 param_1,uint param_2,uint param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  undefined4 uVar2;\n  uint unaff_EBX;\n  uint unaff_ESI;\n  \n  if (param_2 < (uint)(0xffffffff / (ulonglong)param_3)) {\n    xrealloc(param_1,param_3 * param_2);\n    return;\n  }\n  FUN_0001e980();\n  uVar1 = (uint)(0xffffffff / (ulonglong)unaff_ESI);\n  if (unaff_EBX < uVar1) {\n    xcalloc(unaff_EBX,unaff_ESI);\n    return;\n  }\n  uVar2 = dcgettext(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2);\n  error(uVar2,unaff_EBX);\n                    \n  xexit(1);\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "uint unaff_EBX;" type_identifier identifier ;) (declaration "uint unaff_ESI;" type_identifier identifier ;) (if_statement "if (param_2 < (uint)(0xffffffff / (ulonglong)param_3)) {\n    xrealloc(param_1,param_3 * param_2);\n    return;\n  }" if (parenthesized_expression "(param_2 < (uint)(0xffffffff / (ulonglong)param_3))" ( (binary_expression "param_2 < (uint)(0xffffffff / (ulonglong)param_3)" identifier < (call_expression "(uint)(0xffffffff / (ulonglong)param_3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xffffffff / (ulonglong)param_3)" ( (binary_expression "0xffffffff / (ulonglong)param_3" number_literal / (cast_expression "(ulonglong)param_3" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) )))) )) (compound_statement "{\n    xrealloc(param_1,param_3 * param_2);\n    return;\n  }" { (expression_statement "xrealloc(param_1,param_3 * param_2);" (call_expression "xrealloc(param_1,param_3 * param_2)" identifier (argument_list "(param_1,param_3 * param_2)" ( identifier , (binary_expression "param_3 * param_2" identifier * identifier) ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_0001e980();" (call_expression "FUN_0001e980()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar1 = (uint)(0xffffffff / (ulonglong)unaff_ESI);" (assignment_expression "uVar1 = (uint)(0xffffffff / (ulonglong)unaff_ESI)" identifier = (call_expression "(uint)(0xffffffff / (ulonglong)unaff_ESI)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xffffffff / (ulonglong)unaff_ESI)" ( (binary_expression "0xffffffff / (ulonglong)unaff_ESI" number_literal / (cast_expression "(ulonglong)unaff_ESI" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) )))) ;) (if_statement "if (unaff_EBX < uVar1) {\n    xcalloc(unaff_EBX,unaff_ESI);\n    return;\n  }" if (parenthesized_expression "(unaff_EBX < uVar1)" ( (binary_expression "unaff_EBX < uVar1" identifier < identifier) )) (compound_statement "{\n    xcalloc(unaff_EBX,unaff_ESI);\n    return;\n  }" { (expression_statement "xcalloc(unaff_EBX,unaff_ESI);" (call_expression "xcalloc(unaff_EBX,unaff_ESI)" identifier (argument_list "(unaff_EBX,unaff_ESI)" ( identifier , identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "uVar2 = dcgettext(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2);" (assignment_expression "uVar2 = dcgettext(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2)" identifier = (call_expression "dcgettext(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2)" identifier (argument_list "(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2)" ( number_literal , (string_literal ""Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"" " string_content escape_sequence string_content escape_sequence ") , number_literal , identifier , number_literal , (pointer_expression "&__DT_PLTGOT" & identifier) , identifier )))) ;) (expression_statement "error(uVar2,unaff_EBX);" (call_expression "error(uVar2,unaff_EBX)" identifier (argument_list "(uVar2,unaff_EBX)" ( identifier , identifier ))) ;) (expression_statement "xexit(1);" (call_expression "xexit(1)" identifier (argument_list "(1)" ( number_literal ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (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 (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT * IDENT) ))) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression LIT / (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content escape_sequence string_content escape_sequence ") , LIT , IDENT , LIT , (pointer_expression & IDENT) , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) })))
(function_definition "void FUN_000311d0(undefined4 param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  uint unaff_EBX;\n  uint unaff_ESI;\n  \n  if (param_2 < (uint)(0xffffffff / (ulonglong)param_3)) {\n    xrealloc(param_1,param_3 * param_2);\n    return;\n  }\n  FUN_0001e980();\n  uVar1 = (uint)(0xffffffff / (ulonglong)unaff_ESI);\n  if (unaff_EBX < uVar1) {\n    xcalloc(unaff_EBX,unaff_ESI);\n    return;\n  }\n  uVar2 = dcgettext(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2);\n  error(uVar2,unaff_EBX);\n                    \n  xexit(1);\n}" (primitive_type "void") (function_declarator "FUN_000311d0(undefined4 param_1,uint param_2,uint param_3)" (identifier "FUN_000311d0") (parameter_list "(undefined4 param_1,uint param_2,uint param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (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  uint uVar1;\n  undefined4 uVar2;\n  uint unaff_EBX;\n  uint unaff_ESI;\n  \n  if (param_2 < (uint)(0xffffffff / (ulonglong)param_3)) {\n    xrealloc(param_1,param_3 * param_2);\n    return;\n  }\n  FUN_0001e980();\n  uVar1 = (uint)(0xffffffff / (ulonglong)unaff_ESI);\n  if (unaff_EBX < uVar1) {\n    xcalloc(unaff_EBX,unaff_ESI);\n    return;\n  }\n  uVar2 = dcgettext(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2);\n  error(uVar2,unaff_EBX);\n                    \n  xexit(1);\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "uint unaff_EBX;" (type_identifier "uint") (identifier "unaff_EBX") (; ";")) (declaration "uint unaff_ESI;" (type_identifier "uint") (identifier "unaff_ESI") (; ";")) (if_statement "if (param_2 < (uint)(0xffffffff / (ulonglong)param_3)) {\n    xrealloc(param_1,param_3 * param_2);\n    return;\n  }" (if "if") (parenthesized_expression "(param_2 < (uint)(0xffffffff / (ulonglong)param_3))" (( "(") (binary_expression "param_2 < (uint)(0xffffffff / (ulonglong)param_3)" (identifier "param_2") (< "<") (call_expression "(uint)(0xffffffff / (ulonglong)param_3)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(0xffffffff / (ulonglong)param_3)" (( "(") (binary_expression "0xffffffff / (ulonglong)param_3" (number_literal "0xffffffff") (/ "/") (cast_expression "(ulonglong)param_3" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "param_3"))) () ")")))) () ")")) (compound_statement "{\n    xrealloc(param_1,param_3 * param_2);\n    return;\n  }" ({ "{") (expression_statement "xrealloc(param_1,param_3 * param_2);" (call_expression "xrealloc(param_1,param_3 * param_2)" (identifier "xrealloc") (argument_list "(param_1,param_3 * param_2)" (( "(") (identifier "param_1") (, ",") (binary_expression "param_3 * param_2" (identifier "param_3") (* "*") (identifier "param_2")) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0001e980();" (call_expression "FUN_0001e980()" (identifier "FUN_0001e980") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "uVar1 = (uint)(0xffffffff / (ulonglong)unaff_ESI);" (assignment_expression "uVar1 = (uint)(0xffffffff / (ulonglong)unaff_ESI)" (identifier "uVar1") (= "=") (call_expression "(uint)(0xffffffff / (ulonglong)unaff_ESI)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(0xffffffff / (ulonglong)unaff_ESI)" (( "(") (binary_expression "0xffffffff / (ulonglong)unaff_ESI" (number_literal "0xffffffff") (/ "/") (cast_expression "(ulonglong)unaff_ESI" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "unaff_ESI"))) () ")")))) (; ";")) (if_statement "if (unaff_EBX < uVar1) {\n    xcalloc(unaff_EBX,unaff_ESI);\n    return;\n  }" (if "if") (parenthesized_expression "(unaff_EBX < uVar1)" (( "(") (binary_expression "unaff_EBX < uVar1" (identifier "unaff_EBX") (< "<") (identifier "uVar1")) () ")")) (compound_statement "{\n    xcalloc(unaff_EBX,unaff_ESI);\n    return;\n  }" ({ "{") (expression_statement "xcalloc(unaff_EBX,unaff_ESI);" (call_expression "xcalloc(unaff_EBX,unaff_ESI)" (identifier "xcalloc") (argument_list "(unaff_EBX,unaff_ESI)" (( "(") (identifier "unaff_EBX") (, ",") (identifier "unaff_ESI") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "uVar2 = dcgettext(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2);" (assignment_expression "uVar2 = dcgettext(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2)" (identifier "uVar2") (= "=") (call_expression "dcgettext(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2)" (identifier "dcgettext") (argument_list "(0,\n                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"\n                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2)" (( "(") (number_literal "0") (, ",") (string_literal ""Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"" (" """) (string_content "Attempt to allocate a zero") (escape_sequence "\'") (string_content "ed array with an excessive number of elements: 0x%lx") (escape_sequence "\n") (" """)) (, ",") (number_literal "5") (, ",") (identifier "uVar1") (, ",") (number_literal "0x3122e") (, ",") (pointer_expression "&__DT_PLTGOT" (& "&") (identifier "__DT_PLTGOT")) (, ",") (identifier "param_2") () ")")))) (; ";")) (expression_statement "error(uVar2,unaff_EBX);" (call_expression "error(uVar2,unaff_EBX)" (identifier "error") (argument_list "(uVar2,unaff_EBX)" (( "(") (identifier "uVar2") (, ",") (identifier "unaff_EBX") () ")"))) (; ";")) (expression_statement "xexit(1);" (call_expression "xexit(1)" (identifier "xexit") (argument_list "(1)" (( "(") (number_literal "1") () ")"))) (; ";")) (} "}")))

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

void * function_1(void *ptr,size_t var_1,size_t var_3)

{
  void *pvVar1;
  type_1 var_5;
  char *message;
  type_1 var_4;
  type_1 unaff_ESI;
  
  if (var_1 < (type_1)(0xffffffff / (type_2)var_3)) {
    pvVar1 = (void *)var_2(ptr,var_3 * var_1);
    return pvVar1;
  }
  function_1((void *)var_1,(size_t)(0xffffffff % (type_2)var_3),var_3);
  var_5 = (type_1)(0xffffffff / (type_2)unaff_ESI);
  if (var_4 < var_5) {
    pvVar1 = (void *)var_6(var_4,unaff_ESI);
    return pvVar1;
  }
  message = (char *)var_7(0,
                              "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"
                              ,5,var_5,0x3122e,&_GLOBAL_OFFSET_TABLE_,var_1);
  var_8(message,var_4);
                    /* WARNING: Subroutine does not return */
  var_9(1);
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (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 (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (identifier))))) (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_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))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence)) (number_literal) (identifier) (number_literal) (pointer_expression argument: (identifier)) (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))))))

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

void MASKED(undefined4 param_1,uint param_2,uint param_3)

{
  uint uVar1;
  undefined4 uVar2;
  uint unaff_EBX;
  uint unaff_ESI;
  
  if (param_2 < (uint)(0xffffffff / (ulonglong)param_3)) {
    xrealloc(param_1,param_3 * param_2);
    return;
  }
  FUN_0001e980();
  uVar1 = (uint)(0xffffffff / (ulonglong)unaff_ESI);
  if (unaff_EBX < uVar1) {
    xcalloc(unaff_EBX,unaff_ESI);
    return;
  }
  uVar2 = dcgettext(0,
                    "Attempt to allocate a zero\'ed array with an excessive number of elements: 0x%lx\n"
                    ,5,uVar1,0x3122e,&__DT_PLTGOT,param_2);
  error(uVar2,unaff_EBX);
                    /* WARNING: Subroutine does not return */
  xexit(1);
}

