
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::string::_M_replace_safe(unsigned int, unsigned int, char const*, unsigned int) */

string * __thiscall
std::string::_M_replace_safe(string *this,uint param_1,uint param_2,char *param_3,uint param_4)

{
  _M_mutate(this,param_1,param_2,param_4);
  if (param_4 != 0) {
    if (param_4 == 1) {
      *(char *)(param_1 + *(int *)this) = *param_3;
      return this;
    }
    memcpy((char *)(param_1 + *(int *)this),param_3,param_4);
  }
  return this;
}



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

int * FUN_0021f430(int *param_1,int param_2,undefined4 param_3,undefined1 *param_4,size_t param_5)

{
  FUN_0021eb90(param_1,param_2,param_3,param_5);
  if (param_5 != 0) {
    if (param_5 == 1) {
      *(undefined1 *)(param_2 + *param_1) = *param_4;
      return param_1;
    }
    memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);
  }
  return param_1;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00035840
ADD EBX,0x16fbc7
SUB ESP,0xc
MOV EDI,dword ptr [ESP + 0x20]
MOV EBP,dword ptr [ESP + 0x24]
MOV ESI,dword ptr [ESP + 0x30]
PUSH ESI
PUSH dword ptr [ESP + 0x2c]
PUSH EBP
PUSH EDI
CALL 0x0021eb90
ADD ESP,0x10
TEST ESI,ESI
JZ 0x0021f479
ADD EBP,dword ptr [EDI]
CMP ESI,0x1
JZ 0x0021f488
SUB ESP,0x4
PUSH ESI
PUSH dword ptr [ESP + 0x34]
PUSH EBP
CALL 0x000295c0
ADD ESP,0x10
ADD ESP,0xc
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [ESP + 0x2c]
MOVZX EAX,byte ptr [EAX]
MOV byte ptr [EBP],AL
ADD ESP,0xc
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint * FUN_0021f430(int *param_1,int param_2,undefined4 param_3,undefined1 *param_4,size_t param_5)\n\n{\n  FUN_0021eb90(param_1,param_2,param_3,param_5);\n  if (param_5 != 0) {\n    if (param_5 == 1) {\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }\n    memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);\n  }\n  return param_1;\n}\n\n" comment (function_definition "int * FUN_0021f430(int *param_1,int param_2,undefined4 param_3,undefined1 *param_4,size_t param_5)\n\n{\n  FUN_0021eb90(param_1,param_2,param_3,param_5);\n  if (param_5 != 0) {\n    if (param_5 == 1) {\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }\n    memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);\n  }\n  return param_1;\n}" primitive_type (pointer_declarator "* FUN_0021f430(int *param_1,int param_2,undefined4 param_3,undefined1 *param_4,size_t param_5)" * (function_declarator "FUN_0021f430(int *param_1,int param_2,undefined4 param_3,undefined1 *param_4,size_t param_5)" identifier (parameter_list "(int *param_1,int param_2,undefined4 param_3,undefined1 *param_4,size_t param_5)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined1 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "size_t param_5" primitive_type identifier) )))) (compound_statement "{\n  FUN_0021eb90(param_1,param_2,param_3,param_5);\n  if (param_5 != 0) {\n    if (param_5 == 1) {\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }\n    memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);\n  }\n  return param_1;\n}" { (expression_statement "FUN_0021eb90(param_1,param_2,param_3,param_5);" (call_expression "FUN_0021eb90(param_1,param_2,param_3,param_5)" identifier (argument_list "(param_1,param_2,param_3,param_5)" ( identifier , identifier , identifier , identifier ))) ;) (if_statement "if (param_5 != 0) {\n    if (param_5 == 1) {\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }\n    memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);\n  }" if (parenthesized_expression "(param_5 != 0)" ( (binary_expression "param_5 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_5 == 1) {\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }\n    memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);\n  }" { (if_statement "if (param_5 == 1) {\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }" if (parenthesized_expression "(param_5 == 1)" ( (binary_expression "param_5 == 1" identifier == number_literal) )) (compound_statement "{\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }" { (expression_statement "*(undefined1 *)(param_2 + *param_1) = *param_4;" (assignment_expression "*(undefined1 *)(param_2 + *param_1) = *param_4" (pointer_expression "*(undefined1 *)(param_2 + *param_1)" * (cast_expression "(undefined1 *)(param_2 + *param_1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + *param_1)" ( (binary_expression "param_2 + *param_1" identifier + (pointer_expression "*param_1" * identifier)) )))) = (pointer_expression "*param_4" * identifier)) ;) (return_statement "return param_1;" return identifier ;) })) (expression_statement "memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);" (call_expression "memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5)" identifier (argument_list "((undefined1 *)(param_2 + *param_1),param_4,param_5)" ( (cast_expression "(undefined1 *)(param_2 + *param_1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + *param_1)" ( (binary_expression "param_2 + *param_1" identifier + (pointer_expression "*param_1" * identifier)) ))) , identifier , identifier ))) ;) })) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::string::_M_replace_safe(unsigned int, unsigned int, char const*, unsigned int) */\n\nstring * __thiscall\nstd::string::_M_replace_safe(string *this,uint param_1,uint param_2,char *param_3,uint param_4)\n\n{\n  _M_mutate(this,param_1,param_2,param_4);\n  if (param_4 != 0) {\n    if (param_4 == 1) {\n      *(char *)(param_1 + *(int *)this) = *param_3;\n      return this;\n    }\n    memcpy((char *)(param_1 + *(int *)this),param_3,param_4);\n  }\n  return this;\n}\n\n" comment comment (ERROR "string * __thiscall\nstd::string::_M_replace_safe(string *this," (binary_expression "string * __thiscall\nstd::string::_M_replace_safe(string *this" (binary_expression "string * __thiscall" identifier * identifier) (ERROR "std::string::_M_replace_safe(string" identifier : : identifier : : identifier ( identifier) * identifier) ,) (declaration "uint param_1,uint param_2,char *param_3,uint param_4)\n\n{\n  _M_mutate(this,param_1,param_2,param_4);" type_identifier identifier , (ERROR "uint" identifier) identifier , (ERROR "char" identifier) (pointer_declarator "*param_3" * identifier) , (ERROR "uint param_4)\n\n{" identifier identifier ) {) (function_declarator "_M_mutate(this,param_1,param_2,param_4)" identifier (parameter_list "(this,param_1,param_2,param_4)" ( (parameter_declaration "this" type_identifier) , (parameter_declaration "param_1" type_identifier) , (parameter_declaration "param_2" type_identifier) , (parameter_declaration "param_4" type_identifier) ))) ;) (if_statement "if (param_4 != 0) {\n    if (param_4 == 1) {\n      *(char *)(param_1 + *(int *)this) = *param_3;\n      return this;\n    }\n    memcpy((char *)(param_1 + *(int *)this),param_3,param_4);\n  }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_4 == 1) {\n      *(char *)(param_1 + *(int *)this) = *param_3;\n      return this;\n    }\n    memcpy((char *)(param_1 + *(int *)this),param_3,param_4);\n  }" { (if_statement "if (param_4 == 1) {\n      *(char *)(param_1 + *(int *)this) = *param_3;\n      return this;\n    }" if (parenthesized_expression "(param_4 == 1)" ( (binary_expression "param_4 == 1" identifier == number_literal) )) (compound_statement "{\n      *(char *)(param_1 + *(int *)this) = *param_3;\n      return this;\n    }" { (expression_statement "*(char *)(param_1 + *(int *)this) = *param_3;" (assignment_expression "*(char *)(param_1 + *(int *)this) = *param_3" (pointer_expression "*(char *)(param_1 + *(int *)this)" * (cast_expression "(char *)(param_1 + *(int *)this)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + *(int *)this)" ( (binary_expression "param_1 + *(int *)this" identifier + (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )))) = (pointer_expression "*param_3" * identifier)) ;) (return_statement "return this;" return identifier ;) })) (expression_statement "memcpy((char *)(param_1 + *(int *)this),param_3,param_4);" (call_expression "memcpy((char *)(param_1 + *(int *)this),param_3,param_4)" identifier (argument_list "((char *)(param_1 + *(int *)this),param_3,param_4)" ( (cast_expression "(char *)(param_1 + *(int *)this)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + *(int *)this)" ( (binary_expression "param_1 + *(int *)this" identifier + (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ))) , identifier , identifier ))) ;) })) (return_statement "return this;" return identifier ;) (ERROR "}" }))
(translation_unit "int * FUN_0021f430(int *param_1,int param_2,undefined4 param_3,undefined1 *param_4,size_t param_5)\n\n{\n  FUN_0021eb90(param_1,param_2,param_3,param_5);\n  if (param_5 != 0) {\n    if (param_5 == 1) {\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }\n    memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);\n  }\n  return param_1;\n}\n\n" (function_definition "int * FUN_0021f430(int *param_1,int param_2,undefined4 param_3,undefined1 *param_4,size_t param_5)\n\n{\n  FUN_0021eb90(param_1,param_2,param_3,param_5);\n  if (param_5 != 0) {\n    if (param_5 == 1) {\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }\n    memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);\n  }\n  return param_1;\n}" primitive_type (pointer_declarator "* FUN_0021f430(int *param_1,int param_2,undefined4 param_3,undefined1 *param_4,size_t param_5)" * (function_declarator "FUN_0021f430(int *param_1,int param_2,undefined4 param_3,undefined1 *param_4,size_t param_5)" identifier (parameter_list "(int *param_1,int param_2,undefined4 param_3,undefined1 *param_4,size_t param_5)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined1 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "size_t param_5" primitive_type identifier) )))) (compound_statement "{\n  FUN_0021eb90(param_1,param_2,param_3,param_5);\n  if (param_5 != 0) {\n    if (param_5 == 1) {\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }\n    memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);\n  }\n  return param_1;\n}" { (expression_statement "FUN_0021eb90(param_1,param_2,param_3,param_5);" (call_expression "FUN_0021eb90(param_1,param_2,param_3,param_5)" identifier (argument_list "(param_1,param_2,param_3,param_5)" ( identifier , identifier , identifier , identifier ))) ;) (if_statement "if (param_5 != 0) {\n    if (param_5 == 1) {\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }\n    memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);\n  }" if (parenthesized_expression "(param_5 != 0)" ( (binary_expression "param_5 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_5 == 1) {\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }\n    memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);\n  }" { (if_statement "if (param_5 == 1) {\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }" if (parenthesized_expression "(param_5 == 1)" ( (binary_expression "param_5 == 1" identifier == number_literal) )) (compound_statement "{\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }" { (expression_statement "*(undefined1 *)(param_2 + *param_1) = *param_4;" (assignment_expression "*(undefined1 *)(param_2 + *param_1) = *param_4" (pointer_expression "*(undefined1 *)(param_2 + *param_1)" * (cast_expression "(undefined1 *)(param_2 + *param_1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + *param_1)" ( (binary_expression "param_2 + *param_1" identifier + (pointer_expression "*param_1" * identifier)) )))) = (pointer_expression "*param_4" * identifier)) ;) (return_statement "return param_1;" return identifier ;) })) (expression_statement "memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);" (call_expression "memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5)" identifier (argument_list "((undefined1 *)(param_2 + *param_1),param_4,param_5)" ( (cast_expression "(undefined1 *)(param_2 + *param_1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + *param_1)" ( (binary_expression "param_2 + *param_1" identifier + (pointer_expression "*param_1" * identifier)) ))) , identifier , identifier ))) ;) })) (return_statement "return param_1;" return 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) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (pointer_expression * IDENT)) )))) = (pointer_expression * IDENT)) ;) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (pointer_expression * IDENT)) ))) , IDENT , IDENT ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "int * FUN_0021f430(int *param_1,int param_2,undefined4 param_3,undefined1 *param_4,size_t param_5)\n\n{\n  FUN_0021eb90(param_1,param_2,param_3,param_5);\n  if (param_5 != 0) {\n    if (param_5 == 1) {\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }\n    memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);\n  }\n  return param_1;\n}" (primitive_type "int") (pointer_declarator "* FUN_0021f430(int *param_1,int param_2,undefined4 param_3,undefined1 *param_4,size_t param_5)" (* "*") (function_declarator "FUN_0021f430(int *param_1,int param_2,undefined4 param_3,undefined1 *param_4,size_t param_5)" (identifier "FUN_0021f430") (parameter_list "(int *param_1,int param_2,undefined4 param_3,undefined1 *param_4,size_t param_5)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined1 *param_4" (type_identifier "undefined1") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "size_t param_5" (primitive_type "size_t") (identifier "param_5")) () ")")))) (compound_statement "{\n  FUN_0021eb90(param_1,param_2,param_3,param_5);\n  if (param_5 != 0) {\n    if (param_5 == 1) {\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }\n    memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);\n  }\n  return param_1;\n}" ({ "{") (expression_statement "FUN_0021eb90(param_1,param_2,param_3,param_5);" (call_expression "FUN_0021eb90(param_1,param_2,param_3,param_5)" (identifier "FUN_0021eb90") (argument_list "(param_1,param_2,param_3,param_5)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (identifier "param_5") () ")"))) (; ";")) (if_statement "if (param_5 != 0) {\n    if (param_5 == 1) {\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }\n    memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);\n  }" (if "if") (parenthesized_expression "(param_5 != 0)" (( "(") (binary_expression "param_5 != 0" (identifier "param_5") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_5 == 1) {\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }\n    memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);\n  }" ({ "{") (if_statement "if (param_5 == 1) {\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }" (if "if") (parenthesized_expression "(param_5 == 1)" (( "(") (binary_expression "param_5 == 1" (identifier "param_5") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      *(undefined1 *)(param_2 + *param_1) = *param_4;\n      return param_1;\n    }" ({ "{") (expression_statement "*(undefined1 *)(param_2 + *param_1) = *param_4;" (assignment_expression "*(undefined1 *)(param_2 + *param_1) = *param_4" (pointer_expression "*(undefined1 *)(param_2 + *param_1)" (* "*") (cast_expression "(undefined1 *)(param_2 + *param_1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + *param_1)" (( "(") (binary_expression "param_2 + *param_1" (identifier "param_2") (+ "+") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) () ")")))) (= "=") (pointer_expression "*param_4" (* "*") (identifier "param_4"))) (; ";")) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (expression_statement "memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);" (call_expression "memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5)" (identifier "memcpy") (argument_list "((undefined1 *)(param_2 + *param_1),param_4,param_5)" (( "(") (cast_expression "(undefined1 *)(param_2 + *param_1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + *param_1)" (( "(") (binary_expression "param_2 + *param_1" (identifier "param_2") (+ "+") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) () ")"))) (, ",") (identifier "param_4") (, ",") (identifier "param_5") () ")"))) (; ";")) (} "}"))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::string::_M_replace_safe(unsigned int, unsigned int, char const*, unsigned int) */

string * __thiscall
std::string::_M_replace_safe(string *type_2,type_1 type_3,type_1 type_4,char *param_3,type_1 type_5)

{
  function_1(type_2,type_3,type_4,type_5);
  if (type_5 != 0) {
    if (type_5 == 1) {
      *(char *)(type_3 + *(int *)type_2) = *param_3;
      return type_2;
    }
    var_1((char *)(type_3 + *(int *)type_2),param_3,type_5);
  }
  return type_2;
}


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

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

int * MASKED(int *param_1,int param_2,undefined4 param_3,undefined1 *param_4,size_t param_5)

{
  FUN_0021eb90(param_1,param_2,param_3,param_5);
  if (param_5 != 0) {
    if (param_5 == 1) {
      *(undefined1 *)(param_2 + *param_1) = *param_4;
      return param_1;
    }
    memcpy((undefined1 *)(param_2 + *param_1),param_4,param_5);
  }
  return param_1;
}

