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

void __regparm3 set_genstr_size(int size)

{
  char *pcVar1;
  
  if (genstr != (char *)0x0) {
    free(genstr);
  }
  pcVar1 = (char *)malloc(size);
  if (pcVar1 != (char *)0x0) {
    genstr = pcVar1;
    genlen = size;
    return;
  }
                    /* WARNING: Subroutine does not return */
  out_of_memory();
}



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

void __regparm3 FUN_00019710(size_t param_1)

{
  void *pvVar1;
  
  if (DAT_00029204 != (void *)0x0) {
    free(DAT_00029204);
  }
  pvVar1 = malloc(param_1);
  if (pvVar1 != (void *)0x0) {
    DAT_00029204 = pvVar1;
    DAT_00029200 = param_1;
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00019410();
}


PUSH EDI
PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x00011650
ADD EBX,0xf7ea
LEA EDI,[EBX + 0x300]
MOV EAX,dword ptr [EDI]
TEST EAX,EAX
JZ 0x00019738
SUB ESP,0xc
PUSH EAX
CALL 0x000110a0
ADD ESP,0x10
SUB ESP,0xc
PUSH ESI
CALL 0x00011180
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00019756
MOV dword ptr [EDI],EAX
LEA EAX,[EBX + 0x2fc]
MOV dword ptr [EAX],ESI
POP EBX
POP ESI
POP EDI
RET
CALL 0x00019410
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_00019710(size_t param_1)\n\n{\n  void *pvVar1;\n  \n  if (DAT_00029204 != (void *)0x0) {\n    free(DAT_00029204);\n  }\n  pvVar1 = malloc(param_1);\n  if (pvVar1 != (void *)0x0) {\n    DAT_00029204 = pvVar1;\n    DAT_00029200 = param_1;\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00019410();\n}\n\n" comment (function_definition "void __regparm3 FUN_00019710(size_t param_1)\n\n{\n  void *pvVar1;\n  \n  if (DAT_00029204 != (void *)0x0) {\n    free(DAT_00029204);\n  }\n  pvVar1 = malloc(param_1);\n  if (pvVar1 != (void *)0x0) {\n    DAT_00029204 = pvVar1;\n    DAT_00029200 = param_1;\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00019410();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00019710(size_t param_1)" identifier (parameter_list "(size_t param_1)" ( (parameter_declaration "size_t param_1" primitive_type identifier) ))) (compound_statement "{\n  void *pvVar1;\n  \n  if (DAT_00029204 != (void *)0x0) {\n    free(DAT_00029204);\n  }\n  pvVar1 = malloc(param_1);\n  if (pvVar1 != (void *)0x0) {\n    DAT_00029204 = pvVar1;\n    DAT_00029200 = param_1;\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00019410();\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (if_statement "if (DAT_00029204 != (void *)0x0) {\n    free(DAT_00029204);\n  }" if (parenthesized_expression "(DAT_00029204 != (void *)0x0)" ( (binary_expression "DAT_00029204 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(DAT_00029204);\n  }" { (expression_statement "free(DAT_00029204);" (call_expression "free(DAT_00029204)" identifier (argument_list "(DAT_00029204)" ( identifier ))) ;) })) (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    DAT_00029204 = pvVar1;\n    DAT_00029200 = param_1;\n    return;\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    DAT_00029204 = pvVar1;\n    DAT_00029200 = param_1;\n    return;\n  }" { (expression_statement "DAT_00029204 = pvVar1;" (assignment_expression "DAT_00029204 = pvVar1" identifier = identifier) ;) (expression_statement "DAT_00029200 = param_1;" (assignment_expression "DAT_00029200 = param_1" identifier = identifier) ;) (return_statement "return;" return ;) })) comment (expression_statement "FUN_00019410();" (call_expression "FUN_00019410()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 set_genstr_size(int size)\n\n{\n  char *pcVar1;\n  \n  if (genstr != (char *)0x0) {\n    free(genstr);\n  }\n  pcVar1 = (char *)malloc(size);\n  if (pcVar1 != (char *)0x0) {\n    genstr = pcVar1;\n    genlen = size;\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  out_of_memory();\n}\n\n" comment (function_definition "void __regparm3 set_genstr_size(int size)\n\n{\n  char *pcVar1;\n  \n  if (genstr != (char *)0x0) {\n    free(genstr);\n  }\n  pcVar1 = (char *)malloc(size);\n  if (pcVar1 != (char *)0x0) {\n    genstr = pcVar1;\n    genlen = size;\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  out_of_memory();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "set_genstr_size(int size)" identifier (parameter_list "(int size)" ( (parameter_declaration "int size" primitive_type identifier) ))) (compound_statement "{\n  char *pcVar1;\n  \n  if (genstr != (char *)0x0) {\n    free(genstr);\n  }\n  pcVar1 = (char *)malloc(size);\n  if (pcVar1 != (char *)0x0) {\n    genstr = pcVar1;\n    genlen = size;\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  out_of_memory();\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (if_statement "if (genstr != (char *)0x0) {\n    free(genstr);\n  }" if (parenthesized_expression "(genstr != (char *)0x0)" ( (binary_expression "genstr != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(genstr);\n  }" { (expression_statement "free(genstr);" (call_expression "free(genstr)" identifier (argument_list "(genstr)" ( identifier ))) ;) })) (expression_statement "pcVar1 = (char *)malloc(size);" (assignment_expression "pcVar1 = (char *)malloc(size)" identifier = (cast_expression "(char *)malloc(size)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(size)" identifier (argument_list "(size)" ( identifier ))))) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n    genstr = pcVar1;\n    genlen = size;\n    return;\n  }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    genstr = pcVar1;\n    genlen = size;\n    return;\n  }" { (expression_statement "genstr = pcVar1;" (assignment_expression "genstr = pcVar1" identifier = identifier) ;) (expression_statement "genlen = size;" (assignment_expression "genlen = size" identifier = identifier) ;) (return_statement "return;" return ;) })) comment (expression_statement "out_of_memory();" (call_expression "out_of_memory()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void __regparm3 FUN_00019710(size_t param_1)\n\n{\n  void *pvVar1;\n  \n  if (DAT_00029204 != (void *)0x0) {\n    free(DAT_00029204);\n  }\n  pvVar1 = malloc(param_1);\n  if (pvVar1 != (void *)0x0) {\n    DAT_00029204 = pvVar1;\n    DAT_00029200 = param_1;\n    return;\n  }\n                    \n  FUN_00019410();\n}\n\n" (function_definition "void __regparm3 FUN_00019710(size_t param_1)\n\n{\n  void *pvVar1;\n  \n  if (DAT_00029204 != (void *)0x0) {\n    free(DAT_00029204);\n  }\n  pvVar1 = malloc(param_1);\n  if (pvVar1 != (void *)0x0) {\n    DAT_00029204 = pvVar1;\n    DAT_00029200 = param_1;\n    return;\n  }\n                    \n  FUN_00019410();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00019710(size_t param_1)" identifier (parameter_list "(size_t param_1)" ( (parameter_declaration "size_t param_1" primitive_type identifier) ))) (compound_statement "{\n  void *pvVar1;\n  \n  if (DAT_00029204 != (void *)0x0) {\n    free(DAT_00029204);\n  }\n  pvVar1 = malloc(param_1);\n  if (pvVar1 != (void *)0x0) {\n    DAT_00029204 = pvVar1;\n    DAT_00029200 = param_1;\n    return;\n  }\n                    \n  FUN_00019410();\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (if_statement "if (DAT_00029204 != (void *)0x0) {\n    free(DAT_00029204);\n  }" if (parenthesized_expression "(DAT_00029204 != (void *)0x0)" ( (binary_expression "DAT_00029204 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(DAT_00029204);\n  }" { (expression_statement "free(DAT_00029204);" (call_expression "free(DAT_00029204)" identifier (argument_list "(DAT_00029204)" ( identifier ))) ;) })) (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    DAT_00029204 = pvVar1;\n    DAT_00029200 = param_1;\n    return;\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    DAT_00029204 = pvVar1;\n    DAT_00029200 = param_1;\n    return;\n  }" { (expression_statement "DAT_00029204 = pvVar1;" (assignment_expression "DAT_00029204 = pvVar1" identifier = identifier) ;) (expression_statement "DAT_00029200 = param_1;" (assignment_expression "DAT_00029200 = param_1" identifier = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_00019410();" (call_expression "FUN_00019410()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (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 { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void __regparm3 FUN_00019710(size_t param_1)\n\n{\n  void *pvVar1;\n  \n  if (DAT_00029204 != (void *)0x0) {\n    free(DAT_00029204);\n  }\n  pvVar1 = malloc(param_1);\n  if (pvVar1 != (void *)0x0) {\n    DAT_00029204 = pvVar1;\n    DAT_00029200 = param_1;\n    return;\n  }\n                    \n  FUN_00019410();\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00019710(size_t param_1)" (identifier "FUN_00019710") (parameter_list "(size_t param_1)" (( "(") (parameter_declaration "size_t param_1" (primitive_type "size_t") (identifier "param_1")) () ")"))) (compound_statement "{\n  void *pvVar1;\n  \n  if (DAT_00029204 != (void *)0x0) {\n    free(DAT_00029204);\n  }\n  pvVar1 = malloc(param_1);\n  if (pvVar1 != (void *)0x0) {\n    DAT_00029204 = pvVar1;\n    DAT_00029200 = param_1;\n    return;\n  }\n                    \n  FUN_00019410();\n}" ({ "{") (declaration "void *pvVar1;" (primitive_type "void") (pointer_declarator "*pvVar1" (* "*") (identifier "pvVar1")) (; ";")) (if_statement "if (DAT_00029204 != (void *)0x0) {\n    free(DAT_00029204);\n  }" (if "if") (parenthesized_expression "(DAT_00029204 != (void *)0x0)" (( "(") (binary_expression "DAT_00029204 != (void *)0x0" (identifier "DAT_00029204") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    free(DAT_00029204);\n  }" ({ "{") (expression_statement "free(DAT_00029204);" (call_expression "free(DAT_00029204)" (identifier "free") (argument_list "(DAT_00029204)" (( "(") (identifier "DAT_00029204") () ")"))) (; ";")) (} "}"))) (expression_statement "pvVar1 = malloc(param_1);" (assignment_expression "pvVar1 = malloc(param_1)" (identifier "pvVar1") (= "=") (call_expression "malloc(param_1)" (identifier "malloc") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (pvVar1 != (void *)0x0) {\n    DAT_00029204 = pvVar1;\n    DAT_00029200 = param_1;\n    return;\n  }" (if "if") (parenthesized_expression "(pvVar1 != (void *)0x0)" (( "(") (binary_expression "pvVar1 != (void *)0x0" (identifier "pvVar1") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    DAT_00029204 = pvVar1;\n    DAT_00029200 = param_1;\n    return;\n  }" ({ "{") (expression_statement "DAT_00029204 = pvVar1;" (assignment_expression "DAT_00029204 = pvVar1" (identifier "DAT_00029204") (= "=") (identifier "pvVar1")) (; ";")) (expression_statement "DAT_00029200 = param_1;" (assignment_expression "DAT_00029200 = param_1" (identifier "DAT_00029200") (= "=") (identifier "param_1")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_00019410();" (call_expression "FUN_00019410()" (identifier "FUN_00019410") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

void __regparm3 function_1(int size)

{
  char *var_4;
  
  if (var_1 != (char *)0x0) {
    var_2(var_1);
  }
  var_4 = (char *)var_3(size);
  if (var_4 != (char *)0x0) {
    var_1 = var_4;
    genlen = size;
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_5();
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (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 (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (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 (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

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

void __regparm3 MASKED(size_t param_1)

{
  void *pvVar1;
  
  if (DAT_00029204 != (void *)0x0) {
    free(DAT_00029204);
  }
  pvVar1 = malloc(param_1);
  if (pvVar1 != (void *)0x0) {
    DAT_00029204 = pvVar1;
    DAT_00029200 = param_1;
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00019410();
}

