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

void * cmalloc(size_t nmemb,size_t size)

{
  void *pvVar1;
  
  pvVar1 = (void *)0x0;
  if (nmemb < (uint)(0xffffffff / (ulonglong)size)) {
    pvVar1 = (void *)xmalloc(size * nmemb);
  }
  return pvVar1;
}



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

undefined4 FUN_0002bdc0(uint param_1,uint param_2)

{
  undefined4 uVar1;
  
  uVar1 = 0;
  if (param_1 < (uint)(0xffffffff / (ulonglong)param_2)) {
    uVar1 = xmalloc(param_2 * param_1);
  }
  return uVar1;
}


PUSH EDI
MOV EAX,0xffffffff
XOR EDX,EDX
PUSH ESI
PUSH EBX
MOV ECX,dword ptr [ESP + 0x14]
CALL 0x000143a0
ADD EBX,0x4422d
MOV EDI,dword ptr [ESP + 0x10]
DIV ECX
MOV ESI,EAX
XOR EAX,EAX
CMP ESI,EDI
JBE 0x0002bdf6
IMUL ECX,EDI
SUB ESP,0xc
PUSH ECX
CALL 0x000132b0
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_0002bdc0(uint param_1,uint param_2)\n\n{\n  undefined4 uVar1;\n  \n  uVar1 = 0;\n  if (param_1 < (uint)(0xffffffff / (ulonglong)param_2)) {\n    uVar1 = xmalloc(param_2 * param_1);\n  }\n  return uVar1;\n}\n\n" comment (function_definition "undefined4 FUN_0002bdc0(uint param_1,uint param_2)\n\n{\n  undefined4 uVar1;\n  \n  uVar1 = 0;\n  if (param_1 < (uint)(0xffffffff / (ulonglong)param_2)) {\n    uVar1 = xmalloc(param_2 * param_1);\n  }\n  return uVar1;\n}" type_identifier (function_declarator "FUN_0002bdc0(uint param_1,uint param_2)" identifier (parameter_list "(uint param_1,uint param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  uVar1 = 0;\n  if (param_1 < (uint)(0xffffffff / (ulonglong)param_2)) {\n    uVar1 = xmalloc(param_2 * param_1);\n  }\n  return uVar1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (if_statement "if (param_1 < (uint)(0xffffffff / (ulonglong)param_2)) {\n    uVar1 = xmalloc(param_2 * param_1);\n  }" if (parenthesized_expression "(param_1 < (uint)(0xffffffff / (ulonglong)param_2))" ( (binary_expression "param_1 < (uint)(0xffffffff / (ulonglong)param_2)" identifier < (call_expression "(uint)(0xffffffff / (ulonglong)param_2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xffffffff / (ulonglong)param_2)" ( (binary_expression "0xffffffff / (ulonglong)param_2" number_literal / (cast_expression "(ulonglong)param_2" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) )))) )) (compound_statement "{\n    uVar1 = xmalloc(param_2 * param_1);\n  }" { (expression_statement "uVar1 = xmalloc(param_2 * param_1);" (assignment_expression "uVar1 = xmalloc(param_2 * param_1)" identifier = (call_expression "xmalloc(param_2 * param_1)" identifier (argument_list "(param_2 * param_1)" ( (binary_expression "param_2 * param_1" identifier * identifier) )))) ;) })) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid * cmalloc(size_t nmemb,size_t size)\n\n{\n  void *pvVar1;\n  \n  pvVar1 = (void *)0x0;\n  if (nmemb < (uint)(0xffffffff / (ulonglong)size)) {\n    pvVar1 = (void *)xmalloc(size * nmemb);\n  }\n  return pvVar1;\n}\n\n" comment comment (function_definition "void * cmalloc(size_t nmemb,size_t size)\n\n{\n  void *pvVar1;\n  \n  pvVar1 = (void *)0x0;\n  if (nmemb < (uint)(0xffffffff / (ulonglong)size)) {\n    pvVar1 = (void *)xmalloc(size * nmemb);\n  }\n  return pvVar1;\n}" primitive_type (pointer_declarator "* cmalloc(size_t nmemb,size_t size)" * (function_declarator "cmalloc(size_t nmemb,size_t size)" identifier (parameter_list "(size_t nmemb,size_t size)" ( (parameter_declaration "size_t nmemb" primitive_type identifier) , (parameter_declaration "size_t size" primitive_type identifier) )))) (compound_statement "{\n  void *pvVar1;\n  \n  pvVar1 = (void *)0x0;\n  if (nmemb < (uint)(0xffffffff / (ulonglong)size)) {\n    pvVar1 = (void *)xmalloc(size * nmemb);\n  }\n  return pvVar1;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * 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)) ;) (if_statement "if (nmemb < (uint)(0xffffffff / (ulonglong)size)) {\n    pvVar1 = (void *)xmalloc(size * nmemb);\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 *)xmalloc(size * nmemb);\n  }" { (expression_statement "pvVar1 = (void *)xmalloc(size * nmemb);" (assignment_expression "pvVar1 = (void *)xmalloc(size * nmemb)" identifier = (cast_expression "(void *)xmalloc(size * nmemb)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(size * nmemb)" identifier (argument_list "(size * nmemb)" ( (binary_expression "size * nmemb" identifier * identifier) ))))) ;) })) (return_statement "return pvVar1;" return identifier ;) })))
(translation_unit "undefined4 FUN_0002bdc0(uint param_1,uint param_2)\n\n{\n  undefined4 uVar1;\n  \n  uVar1 = 0;\n  if (param_1 < (uint)(0xffffffff / (ulonglong)param_2)) {\n    uVar1 = xmalloc(param_2 * param_1);\n  }\n  return uVar1;\n}\n\n" (function_definition "undefined4 FUN_0002bdc0(uint param_1,uint param_2)\n\n{\n  undefined4 uVar1;\n  \n  uVar1 = 0;\n  if (param_1 < (uint)(0xffffffff / (ulonglong)param_2)) {\n    uVar1 = xmalloc(param_2 * param_1);\n  }\n  return uVar1;\n}" type_identifier (function_declarator "FUN_0002bdc0(uint param_1,uint param_2)" identifier (parameter_list "(uint param_1,uint param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  uVar1 = 0;\n  if (param_1 < (uint)(0xffffffff / (ulonglong)param_2)) {\n    uVar1 = xmalloc(param_2 * param_1);\n  }\n  return uVar1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (if_statement "if (param_1 < (uint)(0xffffffff / (ulonglong)param_2)) {\n    uVar1 = xmalloc(param_2 * param_1);\n  }" if (parenthesized_expression "(param_1 < (uint)(0xffffffff / (ulonglong)param_2))" ( (binary_expression "param_1 < (uint)(0xffffffff / (ulonglong)param_2)" identifier < (call_expression "(uint)(0xffffffff / (ulonglong)param_2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xffffffff / (ulonglong)param_2)" ( (binary_expression "0xffffffff / (ulonglong)param_2" number_literal / (cast_expression "(ulonglong)param_2" ( (type_descriptor "ulonglong" type_identifier) ) identifier)) )))) )) (compound_statement "{\n    uVar1 = xmalloc(param_2 * param_1);\n  }" { (expression_statement "uVar1 = xmalloc(param_2 * param_1);" (assignment_expression "uVar1 = xmalloc(param_2 * param_1)" identifier = (call_expression "xmalloc(param_2 * param_1)" identifier (argument_list "(param_2 * param_1)" ( (binary_expression "param_2 * param_1" identifier * identifier) )))) ;) })) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression LIT / (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT * IDENT) )))) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_0002bdc0(uint param_1,uint param_2)\n\n{\n  undefined4 uVar1;\n  \n  uVar1 = 0;\n  if (param_1 < (uint)(0xffffffff / (ulonglong)param_2)) {\n    uVar1 = xmalloc(param_2 * param_1);\n  }\n  return uVar1;\n}" (type_identifier "undefined4") (function_declarator "FUN_0002bdc0(uint param_1,uint param_2)" (identifier "FUN_0002bdc0") (parameter_list "(uint param_1,uint param_2)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  \n  uVar1 = 0;\n  if (param_1 < (uint)(0xffffffff / (ulonglong)param_2)) {\n    uVar1 = xmalloc(param_2 * param_1);\n  }\n  return uVar1;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" (identifier "uVar1") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_1 < (uint)(0xffffffff / (ulonglong)param_2)) {\n    uVar1 = xmalloc(param_2 * param_1);\n  }" (if "if") (parenthesized_expression "(param_1 < (uint)(0xffffffff / (ulonglong)param_2))" (( "(") (binary_expression "param_1 < (uint)(0xffffffff / (ulonglong)param_2)" (identifier "param_1") (< "<") (call_expression "(uint)(0xffffffff / (ulonglong)param_2)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(0xffffffff / (ulonglong)param_2)" (( "(") (binary_expression "0xffffffff / (ulonglong)param_2" (number_literal "0xffffffff") (/ "/") (cast_expression "(ulonglong)param_2" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "param_2"))) () ")")))) () ")")) (compound_statement "{\n    uVar1 = xmalloc(param_2 * param_1);\n  }" ({ "{") (expression_statement "uVar1 = xmalloc(param_2 * param_1);" (assignment_expression "uVar1 = xmalloc(param_2 * param_1)" (identifier "uVar1") (= "=") (call_expression "xmalloc(param_2 * param_1)" (identifier "xmalloc") (argument_list "(param_2 * param_1)" (( "(") (binary_expression "param_2 * param_1" (identifier "param_2") (* "*") (identifier "param_1")) () ")")))) (; ";")) (} "}"))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

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

void * function_1(size_t var_1,size_t var_3)

{
  void *pvVar1;
  
  pvVar1 = (void *)0x0;
  if (var_1 < (uint)(0xffffffff / (type_1)var_3)) {
    pvVar1 = (void *)var_2(var_3 * var_1);
  }
  return pvVar1;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)))))))) (return_statement (identifier)))))

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

undefined4 MASKED(uint param_1,uint param_2)

{
  undefined4 uVar1;
  
  uVar1 = 0;
  if (param_1 < (uint)(0xffffffff / (ulonglong)param_2)) {
    uVar1 = xmalloc(param_2 * param_1);
  }
  return uVar1;
}

