
/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */
/* operator new(unsigned int, std::nothrow_t const&) */

void * operator_new(uint param_1,nothrow_t *param_2)

{
  void *pvVar1;
  code *pcVar2;
  
  if (param_1 == 0) {
    param_1 = 1;
  }
  while( true ) {
    pvVar1 = malloc(param_1);
    if (pvVar1 != (void *)0x0) {
      return pvVar1;
    }
    pcVar2 = (code *)std::get_new_handler();
    if (pcVar2 == (code *)0x0) break;
                    /* try { // try from 001aa8a9 to 001aa8aa has its CatchHandler @ 001aa8ad */
    (*pcVar2)();
  }
  return (void *)0x0;
}



void * FUN_001aa860(size_t param_1)

{
  size_t sVar1;
  void *pvVar2;
  code *pcVar3;
  
  sVar1 = FUN_00058c4e();
  if (param_1 == 0) {
    param_1 = sVar1;
  }
  while( true ) {
    pvVar2 = malloc(param_1);
    if (pvVar2 != (void *)0x0) {
      return pvVar2;
    }
    pcVar3 = (code *)FUN_001aa950();
    if (pcVar3 == (code *)0x0) break;
                    /* try { // try from 001aa8a9 to 001aa8aa has its CatchHandler @ 001aa8ad */
    (*pcVar3)();
  }
  return (void *)0x0;
}


PUSH EBP
MOV EAX,0x1
CALL 0x00058c4e
ADD EBP,0x194795
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0xc
MOV ESI,dword ptr [ESP + 0x20]
TEST ESI,ESI
CMOVZ ESI,EAX
SUB ESP,0xc
MOV EBX,EBP
PUSH ESI
CALL 0x000287a0
ADD ESP,0x10
MOV EDI,EAX
TEST EAX,EAX
JZ 0x001aa8a0
ADD ESP,0xc
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x001aa950
TEST EAX,EAX
JZ 0x001aa894
CALL EAX
JMP 0x001aa880
(translation_unit "void * FUN_001aa860(size_t param_1)\n\n{\n  size_t sVar1;\n  void *pvVar2;\n  code *pcVar3;\n  \n  sVar1 = FUN_00058c4e();\n  if (param_1 == 0) {\n    param_1 = sVar1;\n  }\n  while( true ) {\n    pvVar2 = malloc(param_1);\n    if (pvVar2 != (void *)0x0) {\n      return pvVar2;\n    }\n    pcVar3 = (code *)FUN_001aa950();\n    if (pcVar3 == (code *)0x0) break;\n                    /* try { // try from 001aa8a9 to 001aa8aa has its CatchHandler @ 001aa8ad */\n    (*pcVar3)();\n  }\n  return (void *)0x0;\n}\n\n" (function_definition "void * FUN_001aa860(size_t param_1)\n\n{\n  size_t sVar1;\n  void *pvVar2;\n  code *pcVar3;\n  \n  sVar1 = FUN_00058c4e();\n  if (param_1 == 0) {\n    param_1 = sVar1;\n  }\n  while( true ) {\n    pvVar2 = malloc(param_1);\n    if (pvVar2 != (void *)0x0) {\n      return pvVar2;\n    }\n    pcVar3 = (code *)FUN_001aa950();\n    if (pcVar3 == (code *)0x0) break;\n                    /* try { // try from 001aa8a9 to 001aa8aa has its CatchHandler @ 001aa8ad */\n    (*pcVar3)();\n  }\n  return (void *)0x0;\n}" primitive_type (pointer_declarator "* FUN_001aa860(size_t param_1)" * (function_declarator "FUN_001aa860(size_t param_1)" identifier (parameter_list "(size_t param_1)" ( (parameter_declaration "size_t param_1" primitive_type identifier) )))) (compound_statement "{\n  size_t sVar1;\n  void *pvVar2;\n  code *pcVar3;\n  \n  sVar1 = FUN_00058c4e();\n  if (param_1 == 0) {\n    param_1 = sVar1;\n  }\n  while( true ) {\n    pvVar2 = malloc(param_1);\n    if (pvVar2 != (void *)0x0) {\n      return pvVar2;\n    }\n    pcVar3 = (code *)FUN_001aa950();\n    if (pcVar3 == (code *)0x0) break;\n                    /* try { // try from 001aa8a9 to 001aa8aa has its CatchHandler @ 001aa8ad */\n    (*pcVar3)();\n  }\n  return (void *)0x0;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * identifier) ;) (declaration "code *pcVar3;" type_identifier (pointer_declarator "*pcVar3" * identifier) ;) (expression_statement "sVar1 = FUN_00058c4e();" (assignment_expression "sVar1 = FUN_00058c4e()" identifier = (call_expression "FUN_00058c4e()" identifier (argument_list "()" ( )))) ;) (if_statement "if (param_1 == 0) {\n    param_1 = sVar1;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    param_1 = sVar1;\n  }" { (expression_statement "param_1 = sVar1;" (assignment_expression "param_1 = sVar1" identifier = identifier) ;) })) (while_statement "while( true ) {\n    pvVar2 = malloc(param_1);\n    if (pvVar2 != (void *)0x0) {\n      return pvVar2;\n    }\n    pcVar3 = (code *)FUN_001aa950();\n    if (pcVar3 == (code *)0x0) break;\n                    /* try { // try from 001aa8a9 to 001aa8aa has its CatchHandler @ 001aa8ad */\n    (*pcVar3)();\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    pvVar2 = malloc(param_1);\n    if (pvVar2 != (void *)0x0) {\n      return pvVar2;\n    }\n    pcVar3 = (code *)FUN_001aa950();\n    if (pcVar3 == (code *)0x0) break;\n                    /* try { // try from 001aa8a9 to 001aa8aa has its CatchHandler @ 001aa8ad */\n    (*pcVar3)();\n  }" { (expression_statement "pvVar2 = malloc(param_1);" (assignment_expression "pvVar2 = malloc(param_1)" identifier = (call_expression "malloc(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (pvVar2 != (void *)0x0) {\n      return pvVar2;\n    }" 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)) )) (compound_statement "{\n      return pvVar2;\n    }" { (return_statement "return pvVar2;" return identifier ;) })) (expression_statement "pcVar3 = (code *)FUN_001aa950();" (assignment_expression "pcVar3 = (code *)FUN_001aa950()" identifier = (cast_expression "(code *)FUN_001aa950()" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001aa950()" identifier (argument_list "()" ( ))))) ;) (if_statement "if (pcVar3 == (code *)0x0) break;" if (parenthesized_expression "(pcVar3 == (code *)0x0)" ( (binary_expression "pcVar3 == (code *)0x0" identifier == (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (break_statement "break;" break ;)) comment (expression_statement "(*pcVar3)();" (call_expression "(*pcVar3)()" (parenthesized_expression "(*pcVar3)" ( (pointer_expression "*pcVar3" * identifier) )) (argument_list "()" ( ))) ;) })) (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */\n/* operator new(unsigned int, std::nothrow_t const&) */\n\nvoid * operator_new(uint param_1,nothrow_t *param_2)\n\n{\n  void *pvVar1;\n  code *pcVar2;\n  \n  if (param_1 == 0) {\n    param_1 = 1;\n  }\n  while( true ) {\n    pvVar1 = malloc(param_1);\n    if (pvVar1 != (void *)0x0) {\n      return pvVar1;\n    }\n    pcVar2 = (code *)std::get_new_handler();\n    if (pcVar2 == (code *)0x0) break;\n                    /* try { // try from 001aa8a9 to 001aa8aa has its CatchHandler @ 001aa8ad */\n    (*pcVar2)();\n  }\n  return (void *)0x0;\n}\n\n" comment comment (function_definition "void * operator_new(uint param_1,nothrow_t *param_2)\n\n{\n  void *pvVar1;\n  code *pcVar2;\n  \n  if (param_1 == 0) {\n    param_1 = 1;\n  }\n  while( true ) {\n    pvVar1 = malloc(param_1);\n    if (pvVar1 != (void *)0x0) {\n      return pvVar1;\n    }\n    pcVar2 = (code *)std::get_new_handler();\n    if (pcVar2 == (code *)0x0) break;\n                    /* try { // try from 001aa8a9 to 001aa8aa has its CatchHandler @ 001aa8ad */\n    (*pcVar2)();\n  }\n  return (void *)0x0;\n}" primitive_type (pointer_declarator "* operator_new(uint param_1,nothrow_t *param_2)" * (function_declarator "operator_new(uint param_1,nothrow_t *param_2)" identifier (parameter_list "(uint param_1,nothrow_t *param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "nothrow_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  void *pvVar1;\n  code *pcVar2;\n  \n  if (param_1 == 0) {\n    param_1 = 1;\n  }\n  while( true ) {\n    pvVar1 = malloc(param_1);\n    if (pvVar1 != (void *)0x0) {\n      return pvVar1;\n    }\n    pcVar2 = (code *)std::get_new_handler();\n    if (pcVar2 == (code *)0x0) break;\n                    /* try { // try from 001aa8a9 to 001aa8aa has its CatchHandler @ 001aa8ad */\n    (*pcVar2)();\n  }\n  return (void *)0x0;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "code *pcVar2;" type_identifier (pointer_declarator "*pcVar2" * identifier) ;) (if_statement "if (param_1 == 0) {\n    param_1 = 1;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    param_1 = 1;\n  }" { (expression_statement "param_1 = 1;" (assignment_expression "param_1 = 1" identifier = number_literal) ;) })) (while_statement "while( true ) {\n    pvVar1 = malloc(param_1);\n    if (pvVar1 != (void *)0x0) {\n      return pvVar1;\n    }\n    pcVar2 = (code *)std::get_new_handler();\n    if (pcVar2 == (code *)0x0) break;\n                    /* try { // try from 001aa8a9 to 001aa8aa has its CatchHandler @ 001aa8ad */\n    (*pcVar2)();\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    pvVar1 = malloc(param_1);\n    if (pvVar1 != (void *)0x0) {\n      return pvVar1;\n    }\n    pcVar2 = (code *)std::get_new_handler();\n    if (pcVar2 == (code *)0x0) break;\n                    /* try { // try from 001aa8a9 to 001aa8aa has its CatchHandler @ 001aa8ad */\n    (*pcVar2)();\n  }" { (expression_statement "pvVar1 = malloc(param_1);" (assignment_expression "pvVar1 = malloc(param_1)" identifier = (call_expression "malloc(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (pvVar1 != (void *)0x0) {\n      return pvVar1;\n    }" 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)) )) (compound_statement "{\n      return pvVar1;\n    }" { (return_statement "return pvVar1;" return identifier ;) })) (ERROR "pcVar2 = (code *)std::" (assignment_expression "pcVar2 = (code *)std" identifier = (cast_expression "(code *)std" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) : :) (expression_statement "get_new_handler();" (call_expression "get_new_handler()" identifier (argument_list "()" ( ))) ;) (if_statement "if (pcVar2 == (code *)0x0) break;" if (parenthesized_expression "(pcVar2 == (code *)0x0)" ( (binary_expression "pcVar2 == (code *)0x0" identifier == (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (break_statement "break;" break ;)) comment (expression_statement "(*pcVar2)();" (call_expression "(*pcVar2)()" (parenthesized_expression "(*pcVar2)" ( (pointer_expression "*pcVar2" * identifier) )) (argument_list "()" ( ))) ;) })) (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "void * FUN_001aa860(size_t param_1)\n\n{\n  size_t sVar1;\n  void *pvVar2;\n  code *pcVar3;\n  \n  sVar1 = FUN_00058c4e();\n  if (param_1 == 0) {\n    param_1 = sVar1;\n  }\n  while( true ) {\n    pvVar2 = malloc(param_1);\n    if (pvVar2 != (void *)0x0) {\n      return pvVar2;\n    }\n    pcVar3 = (code *)FUN_001aa950();\n    if (pcVar3 == (code *)0x0) break;\n                    \n    (*pcVar3)();\n  }\n  return (void *)0x0;\n}\n\n" (function_definition "void * FUN_001aa860(size_t param_1)\n\n{\n  size_t sVar1;\n  void *pvVar2;\n  code *pcVar3;\n  \n  sVar1 = FUN_00058c4e();\n  if (param_1 == 0) {\n    param_1 = sVar1;\n  }\n  while( true ) {\n    pvVar2 = malloc(param_1);\n    if (pvVar2 != (void *)0x0) {\n      return pvVar2;\n    }\n    pcVar3 = (code *)FUN_001aa950();\n    if (pcVar3 == (code *)0x0) break;\n                    \n    (*pcVar3)();\n  }\n  return (void *)0x0;\n}" primitive_type (pointer_declarator "* FUN_001aa860(size_t param_1)" * (function_declarator "FUN_001aa860(size_t param_1)" identifier (parameter_list "(size_t param_1)" ( (parameter_declaration "size_t param_1" primitive_type identifier) )))) (compound_statement "{\n  size_t sVar1;\n  void *pvVar2;\n  code *pcVar3;\n  \n  sVar1 = FUN_00058c4e();\n  if (param_1 == 0) {\n    param_1 = sVar1;\n  }\n  while( true ) {\n    pvVar2 = malloc(param_1);\n    if (pvVar2 != (void *)0x0) {\n      return pvVar2;\n    }\n    pcVar3 = (code *)FUN_001aa950();\n    if (pcVar3 == (code *)0x0) break;\n                    \n    (*pcVar3)();\n  }\n  return (void *)0x0;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * identifier) ;) (declaration "code *pcVar3;" type_identifier (pointer_declarator "*pcVar3" * identifier) ;) (expression_statement "sVar1 = FUN_00058c4e();" (assignment_expression "sVar1 = FUN_00058c4e()" identifier = (call_expression "FUN_00058c4e()" identifier (argument_list "()" ( )))) ;) (if_statement "if (param_1 == 0) {\n    param_1 = sVar1;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    param_1 = sVar1;\n  }" { (expression_statement "param_1 = sVar1;" (assignment_expression "param_1 = sVar1" identifier = identifier) ;) })) (while_statement "while( true ) {\n    pvVar2 = malloc(param_1);\n    if (pvVar2 != (void *)0x0) {\n      return pvVar2;\n    }\n    pcVar3 = (code *)FUN_001aa950();\n    if (pcVar3 == (code *)0x0) break;\n                    \n    (*pcVar3)();\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    pvVar2 = malloc(param_1);\n    if (pvVar2 != (void *)0x0) {\n      return pvVar2;\n    }\n    pcVar3 = (code *)FUN_001aa950();\n    if (pcVar3 == (code *)0x0) break;\n                    \n    (*pcVar3)();\n  }" { (expression_statement "pvVar2 = malloc(param_1);" (assignment_expression "pvVar2 = malloc(param_1)" identifier = (call_expression "malloc(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (pvVar2 != (void *)0x0) {\n      return pvVar2;\n    }" 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)) )) (compound_statement "{\n      return pvVar2;\n    }" { (return_statement "return pvVar2;" return identifier ;) })) (expression_statement "pcVar3 = (code *)FUN_001aa950();" (assignment_expression "pcVar3 = (code *)FUN_001aa950()" identifier = (cast_expression "(code *)FUN_001aa950()" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001aa950()" identifier (argument_list "()" ( ))))) ;) (if_statement "if (pcVar3 == (code *)0x0) break;" if (parenthesized_expression "(pcVar3 == (code *)0x0)" ( (binary_expression "pcVar3 == (code *)0x0" identifier == (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (break_statement "break;" break ;)) (expression_statement "(*pcVar3)();" (call_expression "(*pcVar3)()" (parenthesized_expression "(*pcVar3)" ( (pointer_expression "*pcVar3" * identifier) )) (argument_list "()" ( ))) ;) })) (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (break_statement break ;)) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( ))) ;) })) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })))
(function_definition "void * FUN_001aa860(size_t param_1)\n\n{\n  size_t sVar1;\n  void *pvVar2;\n  code *pcVar3;\n  \n  sVar1 = FUN_00058c4e();\n  if (param_1 == 0) {\n    param_1 = sVar1;\n  }\n  while( true ) {\n    pvVar2 = malloc(param_1);\n    if (pvVar2 != (void *)0x0) {\n      return pvVar2;\n    }\n    pcVar3 = (code *)FUN_001aa950();\n    if (pcVar3 == (code *)0x0) break;\n                    \n    (*pcVar3)();\n  }\n  return (void *)0x0;\n}" (primitive_type "void") (pointer_declarator "* FUN_001aa860(size_t param_1)" (* "*") (function_declarator "FUN_001aa860(size_t param_1)" (identifier "FUN_001aa860") (parameter_list "(size_t param_1)" (( "(") (parameter_declaration "size_t param_1" (primitive_type "size_t") (identifier "param_1")) () ")")))) (compound_statement "{\n  size_t sVar1;\n  void *pvVar2;\n  code *pcVar3;\n  \n  sVar1 = FUN_00058c4e();\n  if (param_1 == 0) {\n    param_1 = sVar1;\n  }\n  while( true ) {\n    pvVar2 = malloc(param_1);\n    if (pvVar2 != (void *)0x0) {\n      return pvVar2;\n    }\n    pcVar3 = (code *)FUN_001aa950();\n    if (pcVar3 == (code *)0x0) break;\n                    \n    (*pcVar3)();\n  }\n  return (void *)0x0;\n}" ({ "{") (declaration "size_t sVar1;" (primitive_type "size_t") (identifier "sVar1") (; ";")) (declaration "void *pvVar2;" (primitive_type "void") (pointer_declarator "*pvVar2" (* "*") (identifier "pvVar2")) (; ";")) (declaration "code *pcVar3;" (type_identifier "code") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (expression_statement "sVar1 = FUN_00058c4e();" (assignment_expression "sVar1 = FUN_00058c4e()" (identifier "sVar1") (= "=") (call_expression "FUN_00058c4e()" (identifier "FUN_00058c4e") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (param_1 == 0) {\n    param_1 = sVar1;\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    param_1 = sVar1;\n  }" ({ "{") (expression_statement "param_1 = sVar1;" (assignment_expression "param_1 = sVar1" (identifier "param_1") (= "=") (identifier "sVar1")) (; ";")) (} "}"))) (while_statement "while( true ) {\n    pvVar2 = malloc(param_1);\n    if (pvVar2 != (void *)0x0) {\n      return pvVar2;\n    }\n    pcVar3 = (code *)FUN_001aa950();\n    if (pcVar3 == (code *)0x0) break;\n                    \n    (*pcVar3)();\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    pvVar2 = malloc(param_1);\n    if (pvVar2 != (void *)0x0) {\n      return pvVar2;\n    }\n    pcVar3 = (code *)FUN_001aa950();\n    if (pcVar3 == (code *)0x0) break;\n                    \n    (*pcVar3)();\n  }" ({ "{") (expression_statement "pvVar2 = malloc(param_1);" (assignment_expression "pvVar2 = malloc(param_1)" (identifier "pvVar2") (= "=") (call_expression "malloc(param_1)" (identifier "malloc") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (pvVar2 != (void *)0x0) {\n      return pvVar2;\n    }" (if "if") (parenthesized_expression "(pvVar2 != (void *)0x0)" (( "(") (binary_expression "pvVar2 != (void *)0x0" (identifier "pvVar2") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      return pvVar2;\n    }" ({ "{") (return_statement "return pvVar2;" (return "return") (identifier "pvVar2") (; ";")) (} "}"))) (expression_statement "pcVar3 = (code *)FUN_001aa950();" (assignment_expression "pcVar3 = (code *)FUN_001aa950()" (identifier "pcVar3") (= "=") (cast_expression "(code *)FUN_001aa950()" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_001aa950()" (identifier "FUN_001aa950") (argument_list "()" (( "(") () ")"))))) (; ";")) (if_statement "if (pcVar3 == (code *)0x0) break;" (if "if") (parenthesized_expression "(pcVar3 == (code *)0x0)" (( "(") (binary_expression "pcVar3 == (code *)0x0" (identifier "pcVar3") (== "==") (cast_expression "(code *)0x0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "(*pcVar3)();" (call_expression "(*pcVar3)()" (parenthesized_expression "(*pcVar3)" (( "(") (pointer_expression "*pcVar3" (* "*") (identifier "pcVar3")) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return (void *)0x0;" (return "return") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */
/* operator new(unsigned int, std::nothrow_t const&) */

void * function_1(type_1 var_1,type_2 *param_2)

{
  void *var_3;
  type_3 *var_5;
  
  if (var_1 == 0) {
    var_1 = 1;
  }
  while( true ) {
    var_3 = var_2(var_1);
    if (var_3 != (void *)0x0) {
      return var_3;
    }
    var_5 = (type_3 *)std::var_4();
    if (var_5 == (type_3 *)0x0) break;
                    /* try { // try from 001aa8a9 to 001aa8aa has its CatchHandler @ 001aa8ad */
    (*var_5)();
  }
  return (void *)0x0;
}


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

void * MASKED(size_t param_1)

{
  size_t sVar1;
  void *pvVar2;
  code *pcVar3;
  
  sVar1 = FUN_00058c4e();
  if (param_1 == 0) {
    param_1 = sVar1;
  }
  while( true ) {
    pvVar2 = malloc(param_1);
    if (pvVar2 != (void *)0x0) {
      return pvVar2;
    }
    pcVar3 = (code *)FUN_001aa950();
    if (pcVar3 == (code *)0x0) break;
                    /* try { // try from 001aa8a9 to 001aa8aa has its CatchHandler @ 001aa8ad */
    (*pcVar3)();
  }
  return (void *)0x0;
}

