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

wstring * __thiscall
std::wstring::_M_replace_safe(wstring *this,uint param_1,uint param_2,wchar_t *param_3,uint param_4)

{
  wchar_t *__s1;
  
  _M_mutate(this,param_1,param_2,param_4);
  if (param_4 != 0) {
    __s1 = (wchar_t *)(*(int *)this + param_1 * 4);
    if (param_4 == 1) {
      *__s1 = *param_3;
      return this;
    }
    wmemcpy(__s1,param_3,param_4);
  }
  return this;
}



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

int * FUN_0026a750(int *param_1,int param_2,undefined4 param_3,wchar_t *param_4,size_t param_5)

{
  wchar_t *__s1;
  
  FUN_00269ef0(param_1,param_2,param_3,param_5);
  if (param_5 != 0) {
    __s1 = (wchar_t *)(*param_1 + param_2 * 4);
    if (param_5 == 1) {
      *__s1 = *param_4;
      return param_1;
    }
    wmemcpy(__s1,param_4,param_5);
  }
  return param_1;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00035840
ADD EBX,0x1248a7
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 0x00269ef0
ADD ESP,0x10
TEST ESI,ESI
JZ 0x0026a79c
MOV EAX,dword ptr [EDI]
LEA EAX,[EAX + EBP*0x4]
CMP ESI,0x1
JZ 0x0026a7b0
SUB ESP,0x4
PUSH ESI
PUSH dword ptr [ESP + 0x34]
PUSH EAX
CALL 0x00029370
ADD ESP,0x10
ADD ESP,0xc
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV ECX,dword ptr [ESP + 0x2c]
MOV EDX,dword ptr [ECX]
MOV dword ptr [EAX],EDX
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_0026a750(int *param_1,int param_2,undefined4 param_3,wchar_t *param_4,size_t param_5)\n\n{\n  wchar_t *__s1;\n  \n  FUN_00269ef0(param_1,param_2,param_3,param_5);\n  if (param_5 != 0) {\n    __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n    if (param_5 == 1) {\n      *__s1 = *param_4;\n      return param_1;\n    }\n    wmemcpy(__s1,param_4,param_5);\n  }\n  return param_1;\n}\n\n" comment (function_definition "int * FUN_0026a750(int *param_1,int param_2,undefined4 param_3,wchar_t *param_4,size_t param_5)\n\n{\n  wchar_t *__s1;\n  \n  FUN_00269ef0(param_1,param_2,param_3,param_5);\n  if (param_5 != 0) {\n    __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n    if (param_5 == 1) {\n      *__s1 = *param_4;\n      return param_1;\n    }\n    wmemcpy(__s1,param_4,param_5);\n  }\n  return param_1;\n}" primitive_type (pointer_declarator "* FUN_0026a750(int *param_1,int param_2,undefined4 param_3,wchar_t *param_4,size_t param_5)" * (function_declarator "FUN_0026a750(int *param_1,int param_2,undefined4 param_3,wchar_t *param_4,size_t param_5)" identifier (parameter_list "(int *param_1,int param_2,undefined4 param_3,wchar_t *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 "wchar_t *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "size_t param_5" primitive_type identifier) )))) (compound_statement "{\n  wchar_t *__s1;\n  \n  FUN_00269ef0(param_1,param_2,param_3,param_5);\n  if (param_5 != 0) {\n    __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n    if (param_5 == 1) {\n      *__s1 = *param_4;\n      return param_1;\n    }\n    wmemcpy(__s1,param_4,param_5);\n  }\n  return param_1;\n}" { (declaration "wchar_t *__s1;" type_identifier (pointer_declarator "*__s1" * identifier) ;) (expression_statement "FUN_00269ef0(param_1,param_2,param_3,param_5);" (call_expression "FUN_00269ef0(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    __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n    if (param_5 == 1) {\n      *__s1 = *param_4;\n      return param_1;\n    }\n    wmemcpy(__s1,param_4,param_5);\n  }" if (parenthesized_expression "(param_5 != 0)" ( (binary_expression "param_5 != 0" identifier != number_literal) )) (compound_statement "{\n    __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n    if (param_5 == 1) {\n      *__s1 = *param_4;\n      return param_1;\n    }\n    wmemcpy(__s1,param_4,param_5);\n  }" { (expression_statement "__s1 = (wchar_t *)(*param_1 + param_2 * 4);" (assignment_expression "__s1 = (wchar_t *)(*param_1 + param_2 * 4)" identifier = (cast_expression "(wchar_t *)(*param_1 + param_2 * 4)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + param_2 * 4)" ( (binary_expression "*param_1 + param_2 * 4" (pointer_expression "*param_1" * identifier) + (binary_expression "param_2 * 4" identifier * number_literal)) )))) ;) (if_statement "if (param_5 == 1) {\n      *__s1 = *param_4;\n      return param_1;\n    }" if (parenthesized_expression "(param_5 == 1)" ( (binary_expression "param_5 == 1" identifier == number_literal) )) (compound_statement "{\n      *__s1 = *param_4;\n      return param_1;\n    }" { (expression_statement "*__s1 = *param_4;" (assignment_expression "*__s1 = *param_4" (pointer_expression "*__s1" * identifier) = (pointer_expression "*param_4" * identifier)) ;) (return_statement "return param_1;" return identifier ;) })) (expression_statement "wmemcpy(__s1,param_4,param_5);" (call_expression "wmemcpy(__s1,param_4,param_5)" identifier (argument_list "(__s1,param_4,param_5)" ( 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::wstring::_M_replace_safe(unsigned int, unsigned int, wchar_t const*, unsigned int) */\n\nwstring * __thiscall\nstd::wstring::_M_replace_safe(wstring *this,uint param_1,uint param_2,wchar_t *param_3,uint param_4)\n\n{\n  wchar_t *__s1;\n  \n  _M_mutate(this,param_1,param_2,param_4);\n  if (param_4 != 0) {\n    __s1 = (wchar_t *)(*(int *)this + param_1 * 4);\n    if (param_4 == 1) {\n      *__s1 = *param_3;\n      return this;\n    }\n    wmemcpy(__s1,param_3,param_4);\n  }\n  return this;\n}\n\n" comment comment (ERROR "wstring * __thiscall\nstd::wstring::_M_replace_safe(wstring *this," (binary_expression "wstring * __thiscall\nstd::wstring::_M_replace_safe(wstring *this" (binary_expression "wstring * __thiscall" identifier * identifier) (ERROR "std::wstring::_M_replace_safe(wstring" identifier : : identifier : : identifier ( identifier) * identifier) ,) (declaration "uint param_1,uint param_2,wchar_t *param_3,uint param_4)\n\n{\n  wchar_t *__s1;" type_identifier identifier , (ERROR "uint" identifier) identifier , (ERROR "wchar_t" identifier) (pointer_declarator "*param_3" * identifier) , (ERROR "uint param_4)\n\n{\n  wchar_t" identifier identifier ) { identifier) (pointer_declarator "*__s1" * identifier) ;) (expression_statement "_M_mutate(this,param_1,param_2,param_4);" (call_expression "_M_mutate(this,param_1,param_2,param_4)" identifier (argument_list "(this,param_1,param_2,param_4)" ( identifier , identifier , identifier , identifier ))) ;) (if_statement "if (param_4 != 0) {\n    __s1 = (wchar_t *)(*(int *)this + param_1 * 4);\n    if (param_4 == 1) {\n      *__s1 = *param_3;\n      return this;\n    }\n    wmemcpy(__s1,param_3,param_4);\n  }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n    __s1 = (wchar_t *)(*(int *)this + param_1 * 4);\n    if (param_4 == 1) {\n      *__s1 = *param_3;\n      return this;\n    }\n    wmemcpy(__s1,param_3,param_4);\n  }" { (expression_statement "__s1 = (wchar_t *)(*(int *)this + param_1 * 4);" (assignment_expression "__s1 = (wchar_t *)(*(int *)this + param_1 * 4)" identifier = (cast_expression "(wchar_t *)(*(int *)this + param_1 * 4)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + param_1 * 4)" ( (binary_expression "*(int *)this + param_1 * 4" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + (binary_expression "param_1 * 4" identifier * number_literal)) )))) ;) (if_statement "if (param_4 == 1) {\n      *__s1 = *param_3;\n      return this;\n    }" if (parenthesized_expression "(param_4 == 1)" ( (binary_expression "param_4 == 1" identifier == number_literal) )) (compound_statement "{\n      *__s1 = *param_3;\n      return this;\n    }" { (expression_statement "*__s1 = *param_3;" (assignment_expression "*__s1 = *param_3" (pointer_expression "*__s1" * identifier) = (pointer_expression "*param_3" * identifier)) ;) (return_statement "return this;" return identifier ;) })) (expression_statement "wmemcpy(__s1,param_3,param_4);" (call_expression "wmemcpy(__s1,param_3,param_4)" identifier (argument_list "(__s1,param_3,param_4)" ( identifier , identifier , identifier ))) ;) })) (return_statement "return this;" return identifier ;) (ERROR "}" }))
(translation_unit "int * FUN_0026a750(int *param_1,int param_2,undefined4 param_3,wchar_t *param_4,size_t param_5)\n\n{\n  wchar_t *__s1;\n  \n  FUN_00269ef0(param_1,param_2,param_3,param_5);\n  if (param_5 != 0) {\n    __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n    if (param_5 == 1) {\n      *__s1 = *param_4;\n      return param_1;\n    }\n    wmemcpy(__s1,param_4,param_5);\n  }\n  return param_1;\n}\n\n" (function_definition "int * FUN_0026a750(int *param_1,int param_2,undefined4 param_3,wchar_t *param_4,size_t param_5)\n\n{\n  wchar_t *__s1;\n  \n  FUN_00269ef0(param_1,param_2,param_3,param_5);\n  if (param_5 != 0) {\n    __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n    if (param_5 == 1) {\n      *__s1 = *param_4;\n      return param_1;\n    }\n    wmemcpy(__s1,param_4,param_5);\n  }\n  return param_1;\n}" primitive_type (pointer_declarator "* FUN_0026a750(int *param_1,int param_2,undefined4 param_3,wchar_t *param_4,size_t param_5)" * (function_declarator "FUN_0026a750(int *param_1,int param_2,undefined4 param_3,wchar_t *param_4,size_t param_5)" identifier (parameter_list "(int *param_1,int param_2,undefined4 param_3,wchar_t *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 "wchar_t *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "size_t param_5" primitive_type identifier) )))) (compound_statement "{\n  wchar_t *__s1;\n  \n  FUN_00269ef0(param_1,param_2,param_3,param_5);\n  if (param_5 != 0) {\n    __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n    if (param_5 == 1) {\n      *__s1 = *param_4;\n      return param_1;\n    }\n    wmemcpy(__s1,param_4,param_5);\n  }\n  return param_1;\n}" { (declaration "wchar_t *__s1;" type_identifier (pointer_declarator "*__s1" * identifier) ;) (expression_statement "FUN_00269ef0(param_1,param_2,param_3,param_5);" (call_expression "FUN_00269ef0(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    __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n    if (param_5 == 1) {\n      *__s1 = *param_4;\n      return param_1;\n    }\n    wmemcpy(__s1,param_4,param_5);\n  }" if (parenthesized_expression "(param_5 != 0)" ( (binary_expression "param_5 != 0" identifier != number_literal) )) (compound_statement "{\n    __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n    if (param_5 == 1) {\n      *__s1 = *param_4;\n      return param_1;\n    }\n    wmemcpy(__s1,param_4,param_5);\n  }" { (expression_statement "__s1 = (wchar_t *)(*param_1 + param_2 * 4);" (assignment_expression "__s1 = (wchar_t *)(*param_1 + param_2 * 4)" identifier = (cast_expression "(wchar_t *)(*param_1 + param_2 * 4)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + param_2 * 4)" ( (binary_expression "*param_1 + param_2 * 4" (pointer_expression "*param_1" * identifier) + (binary_expression "param_2 * 4" identifier * number_literal)) )))) ;) (if_statement "if (param_5 == 1) {\n      *__s1 = *param_4;\n      return param_1;\n    }" if (parenthesized_expression "(param_5 == 1)" ( (binary_expression "param_5 == 1" identifier == number_literal) )) (compound_statement "{\n      *__s1 = *param_4;\n      return param_1;\n    }" { (expression_statement "*__s1 = *param_4;" (assignment_expression "*__s1 = *param_4" (pointer_expression "*__s1" * identifier) = (pointer_expression "*param_4" * identifier)) ;) (return_statement "return param_1;" return identifier ;) })) (expression_statement "wmemcpy(__s1,param_4,param_5);" (call_expression "wmemcpy(__s1,param_4,param_5)" identifier (argument_list "(__s1,param_4,param_5)" ( 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 { (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + (binary_expression IDENT * LIT)) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "int * FUN_0026a750(int *param_1,int param_2,undefined4 param_3,wchar_t *param_4,size_t param_5)\n\n{\n  wchar_t *__s1;\n  \n  FUN_00269ef0(param_1,param_2,param_3,param_5);\n  if (param_5 != 0) {\n    __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n    if (param_5 == 1) {\n      *__s1 = *param_4;\n      return param_1;\n    }\n    wmemcpy(__s1,param_4,param_5);\n  }\n  return param_1;\n}" (primitive_type "int") (pointer_declarator "* FUN_0026a750(int *param_1,int param_2,undefined4 param_3,wchar_t *param_4,size_t param_5)" (* "*") (function_declarator "FUN_0026a750(int *param_1,int param_2,undefined4 param_3,wchar_t *param_4,size_t param_5)" (identifier "FUN_0026a750") (parameter_list "(int *param_1,int param_2,undefined4 param_3,wchar_t *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 "wchar_t *param_4" (type_identifier "wchar_t") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "size_t param_5" (primitive_type "size_t") (identifier "param_5")) () ")")))) (compound_statement "{\n  wchar_t *__s1;\n  \n  FUN_00269ef0(param_1,param_2,param_3,param_5);\n  if (param_5 != 0) {\n    __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n    if (param_5 == 1) {\n      *__s1 = *param_4;\n      return param_1;\n    }\n    wmemcpy(__s1,param_4,param_5);\n  }\n  return param_1;\n}" ({ "{") (declaration "wchar_t *__s1;" (type_identifier "wchar_t") (pointer_declarator "*__s1" (* "*") (identifier "__s1")) (; ";")) (expression_statement "FUN_00269ef0(param_1,param_2,param_3,param_5);" (call_expression "FUN_00269ef0(param_1,param_2,param_3,param_5)" (identifier "FUN_00269ef0") (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    __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n    if (param_5 == 1) {\n      *__s1 = *param_4;\n      return param_1;\n    }\n    wmemcpy(__s1,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    __s1 = (wchar_t *)(*param_1 + param_2 * 4);\n    if (param_5 == 1) {\n      *__s1 = *param_4;\n      return param_1;\n    }\n    wmemcpy(__s1,param_4,param_5);\n  }" ({ "{") (expression_statement "__s1 = (wchar_t *)(*param_1 + param_2 * 4);" (assignment_expression "__s1 = (wchar_t *)(*param_1 + param_2 * 4)" (identifier "__s1") (= "=") (cast_expression "(wchar_t *)(*param_1 + param_2 * 4)" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + param_2 * 4)" (( "(") (binary_expression "*param_1 + param_2 * 4" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (binary_expression "param_2 * 4" (identifier "param_2") (* "*") (number_literal "4"))) () ")")))) (; ";")) (if_statement "if (param_5 == 1) {\n      *__s1 = *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      *__s1 = *param_4;\n      return param_1;\n    }" ({ "{") (expression_statement "*__s1 = *param_4;" (assignment_expression "*__s1 = *param_4" (pointer_expression "*__s1" (* "*") (identifier "__s1")) (= "=") (pointer_expression "*param_4" (* "*") (identifier "param_4"))) (; ";")) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (expression_statement "wmemcpy(__s1,param_4,param_5);" (call_expression "wmemcpy(__s1,param_4,param_5)" (identifier "wmemcpy") (argument_list "(__s1,param_4,param_5)" (( "(") (identifier "__s1") (, ",") (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::wstring::_M_replace_safe(unsigned int, unsigned int, wchar_t const*, unsigned int) */

wstring * __thiscall
std::wstring::_M_replace_safe(wstring *this,type_1 var_3,type_1 param_2,type_2 *param_3,type_1 var_2)

{
  type_2 *__s1;
  
  var_1(this,var_3,param_2,var_2);
  if (var_2 != 0) {
    __s1 = (type_2 *)(*(int *)this + var_3 * 4);
    if (var_2 == 1) {
      *__s1 = *param_3;
      return this;
    }
    var_4(__s1,param_3,var_2);
  }
  return this;
}


(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 (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (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 (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier)))) (return_statement (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (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,wchar_t *param_4,size_t param_5)

{
  wchar_t *__s1;
  
  FUN_00269ef0(param_1,param_2,param_3,param_5);
  if (param_5 != 0) {
    __s1 = (wchar_t *)(*param_1 + param_2 * 4);
    if (param_5 == 1) {
      *__s1 = *param_4;
      return param_1;
    }
    wmemcpy(__s1,param_4,param_5);
  }
  return param_1;
}

