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

wstring * __thiscall std::wstring::append(wstring *this,wchar_t *param_1,uint param_2)

{
  wchar_t *pwVar1;
  int iVar2;
  wchar_t *pwVar3;
  wchar_t wVar4;
  
  if (param_2 == 0) {
    return this;
  }
  pwVar3 = *(wchar_t **)this;
  if ((uint)(0xffffffeU - pwVar3[-3]) < param_2) {
                    /* WARNING: Subroutine does not return */
    __throw_length_error("basic_string::append");
  }
  wVar4 = pwVar3[-3] + param_2;
  if (((uint)pwVar3[-2] < (uint)wVar4) ||
     (pwVar1 = pwVar3 + -1, pwVar3 = *(wchar_t **)this, L'\0' < *pwVar1)) {
    if ((pwVar3 <= param_1) && (param_1 <= pwVar3 + pwVar3[-3])) {
      iVar2 = (int)param_1 - (int)pwVar3;
      reserve(this,wVar4);
      pwVar3 = *(wchar_t **)this;
      param_1 = (wchar_t *)(iVar2 + (int)pwVar3);
      pwVar1 = pwVar3 + pwVar3[-3];
      goto joined_r0x0026b194;
    }
    reserve(this,wVar4);
    pwVar3 = *(wchar_t **)this;
  }
  pwVar1 = pwVar3 + pwVar3[-3];
joined_r0x0026b194:
  if (param_2 == 1) {
    *pwVar1 = *param_1;
  }
  else {
    wmemcpy(pwVar1,param_1,param_2);
    pwVar3 = *(wchar_t **)this;
  }
  if (pwVar3 + -3 != (wchar_t *)PTR__S_empty_rep_storage_0038ed58) {
    pwVar3[-1] = L'\0';
    pwVar3[-3] = wVar4;
    pwVar3[wVar4] = L'\0';
  }
  return this;
}



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

int * FUN_0026b0d0(int *param_1,wchar_t *param_2,uint param_3)

{
  wchar_t *pwVar1;
  int iVar2;
  wchar_t *pwVar3;
  wchar_t wVar4;
  
  if (param_3 == 0) {
    return param_1;
  }
  pwVar3 = (wchar_t *)*param_1;
  if ((uint)(0xffffffeU - pwVar3[-3]) < param_3) {
                    /* WARNING: Subroutine does not return */
    FUN_0022c7a0("basic_string::append");
  }
  wVar4 = pwVar3[-3] + param_3;
  if (((uint)pwVar3[-2] < (uint)wVar4) ||
     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {
    if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {
      iVar2 = (int)param_2 - (int)pwVar3;
      FUN_0026adc0(param_1,wVar4);
      pwVar3 = (wchar_t *)*param_1;
      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);
      pwVar1 = pwVar3 + pwVar3[-3];
      goto joined_r0x0026b194;
    }
    FUN_0026adc0(param_1,wVar4);
    pwVar3 = (wchar_t *)*param_1;
  }
  pwVar1 = pwVar3 + pwVar3[-3];
joined_r0x0026b194:
  if (param_3 == 1) {
    *pwVar1 = *param_2;
  }
  else {
    wmemcpy(pwVar1,param_2,param_3);
    pwVar3 = (wchar_t *)*param_1;
  }
  if (pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58) {
    pwVar3[-1] = L'\0';
    pwVar3[-3] = wVar4;
    pwVar3[wVar4] = L'\0';
  }
  return param_1;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00035840
ADD EBX,0x123f27
SUB ESP,0x1c
MOV EBP,dword ptr [ESP + 0x38]
MOV ESI,dword ptr [ESP + 0x30]
TEST EBP,EBP
JZ 0x0026b157
MOV EDX,dword ptr [ESI]
MOV ECX,0xffffffe
MOV EDI,dword ptr [EDX + -0xc]
SUB ECX,EDI
CMP EBP,ECX
JA 0x0026b1cb
ADD EDI,EBP
CMP EDI,dword ptr [EDX + -0x8]
JBE 0x0026b1a0
CMP EDX,dword ptr [ESP + 0x34]
JA 0x0026b11f
MOV ECX,dword ptr [EDX + -0xc]
LEA ECX,[EDX + ECX*0x4]
CMP dword ptr [ESP + 0x34],ECX
JBE 0x0026b168
SUB ESP,0x8
PUSH EDI
PUSH ESI
CALL 0x0026adc0
MOV EDX,dword ptr [ESI]
ADD ESP,0x10
MOV ECX,dword ptr [EDX + -0xc]
LEA ECX,[EDX + ECX*0x4]
CMP EBP,0x1
JZ 0x0026b196
SUB ESP,0x4
PUSH EBP
PUSH dword ptr [ESP + 0x3c]
PUSH ECX
CALL 0x00029370
MOV EDX,dword ptr [ESI]
ADD ESP,0x10
LEA EAX,[EDX + -0xc]
CMP EAX,dword ptr [EBX + 0xfffffd58]
JNZ 0x0026b1b8
ADD ESP,0x1c
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [ESP + 0x34]
SUB ESP,0x8
SUB EAX,EDX
MOV dword ptr [ESP + 0x14],EAX
PUSH EDI
PUSH ESI
CALL 0x0026adc0
MOV EDX,dword ptr [ESI]
MOV EAX,dword ptr [ESP + 0x1c]
MOV ECX,dword ptr [EDX + -0xc]
ADD EAX,EDX
MOV dword ptr [ESP + 0x44],EAX
ADD ESP,0x10
LEA ECX,[EDX + ECX*0x4]
CMP EBP,0x1
JNZ 0x0026b139
MOV EAX,dword ptr [ESP + 0x34]
MOV EAX,dword ptr [EAX]
MOV dword ptr [ECX],EAX
JMP 0x0026b14c
MOV EDX,dword ptr [EDX + -0x4]
TEST EDX,EDX
MOV EDX,dword ptr [ESI]
JG 0x0026b10d
JMP 0x0026b12e
MOV dword ptr [EDX + -0x4],0x0
MOV dword ptr [EDX + -0xc],EDI
MOV dword ptr [EDX + EDI*0x4],0x0
JMP 0x0026b157
SUB ESP,0xc
LEA EAX,[EBX + 0xffef7be2]
PUSH EAX
CALL 0x0022c7a0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint * FUN_0026b0d0(int *param_1,wchar_t *param_2,uint param_3)\n\n{\n  wchar_t *pwVar1;\n  int iVar2;\n  wchar_t *pwVar3;\n  wchar_t wVar4;\n  \n  if (param_3 == 0) {\n    return param_1;\n  }\n  pwVar3 = (wchar_t *)*param_1;\n  if ((uint)(0xffffffeU - pwVar3[-3]) < param_3) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c7a0("basic_string::append");\n  }\n  wVar4 = pwVar3[-3] + param_3;\n  if (((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }\n    FUN_0026adc0(param_1,wVar4);\n    pwVar3 = (wchar_t *)*param_1;\n  }\n  pwVar1 = pwVar3 + pwVar3[-3];\njoined_r0x0026b194:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }\n  if (pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58) {\n    pwVar3[-1] = L'\0';\n    pwVar3[-3] = wVar4;\n    pwVar3[wVar4] = L'\0';\n  }\n  return param_1;\n}\n\n" comment (function_definition "int * FUN_0026b0d0(int *param_1,wchar_t *param_2,uint param_3)\n\n{\n  wchar_t *pwVar1;\n  int iVar2;\n  wchar_t *pwVar3;\n  wchar_t wVar4;\n  \n  if (param_3 == 0) {\n    return param_1;\n  }\n  pwVar3 = (wchar_t *)*param_1;\n  if ((uint)(0xffffffeU - pwVar3[-3]) < param_3) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c7a0("basic_string::append");\n  }\n  wVar4 = pwVar3[-3] + param_3;\n  if (((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }\n    FUN_0026adc0(param_1,wVar4);\n    pwVar3 = (wchar_t *)*param_1;\n  }\n  pwVar1 = pwVar3 + pwVar3[-3];\njoined_r0x0026b194:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }\n  if (pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58) {\n    pwVar3[-1] = L'\0';\n    pwVar3[-3] = wVar4;\n    pwVar3[wVar4] = L'\0';\n  }\n  return param_1;\n}" primitive_type (pointer_declarator "* FUN_0026b0d0(int *param_1,wchar_t *param_2,uint param_3)" * (function_declarator "FUN_0026b0d0(int *param_1,wchar_t *param_2,uint param_3)" identifier (parameter_list "(int *param_1,wchar_t *param_2,uint param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint param_3" type_identifier identifier) )))) (compound_statement "{\n  wchar_t *pwVar1;\n  int iVar2;\n  wchar_t *pwVar3;\n  wchar_t wVar4;\n  \n  if (param_3 == 0) {\n    return param_1;\n  }\n  pwVar3 = (wchar_t *)*param_1;\n  if ((uint)(0xffffffeU - pwVar3[-3]) < param_3) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c7a0("basic_string::append");\n  }\n  wVar4 = pwVar3[-3] + param_3;\n  if (((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }\n    FUN_0026adc0(param_1,wVar4);\n    pwVar3 = (wchar_t *)*param_1;\n  }\n  pwVar1 = pwVar3 + pwVar3[-3];\njoined_r0x0026b194:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }\n  if (pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58) {\n    pwVar3[-1] = L'\0';\n    pwVar3[-3] = wVar4;\n    pwVar3[wVar4] = L'\0';\n  }\n  return param_1;\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "wchar_t *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (declaration "wchar_t wVar4;" type_identifier identifier ;) (if_statement "if (param_3 == 0) {\n    return param_1;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    return param_1;\n  }" { (return_statement "return param_1;" return identifier ;) })) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if ((uint)(0xffffffeU - pwVar3[-3]) < param_3) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c7a0("basic_string::append");\n  }" if (parenthesized_expression "((uint)(0xffffffeU - pwVar3[-3]) < param_3)" ( (binary_expression "(uint)(0xffffffeU - pwVar3[-3]) < param_3" (call_expression "(uint)(0xffffffeU - pwVar3[-3])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xffffffeU - pwVar3[-3])" ( (binary_expression "0xffffffeU - pwVar3[-3]" number_literal - (subscript_expression "pwVar3[-3]" identifier [ number_literal ])) ))) < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c7a0("basic_string::append");\n  }" { comment (expression_statement "FUN_0022c7a0("basic_string::append");" (call_expression "FUN_0022c7a0("basic_string::append")" identifier (argument_list "("basic_string::append")" ( (string_literal ""basic_string::append"" " string_content ") ))) ;) })) (expression_statement "wVar4 = pwVar3[-3] + param_3;" (assignment_expression "wVar4 = pwVar3[-3] + param_3" identifier = (binary_expression "pwVar3[-3] + param_3" (subscript_expression "pwVar3[-3]" identifier [ number_literal ]) + identifier)) ;) (if_statement "if (((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }\n    FUN_0026adc0(param_1,wVar4);\n    pwVar3 = (wchar_t *)*param_1;\n  }" if (parenthesized_expression "(((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1))" ( (binary_expression "((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)" (parenthesized_expression "((uint)pwVar3[-2] < (uint)wVar4)" ( (binary_expression "(uint)pwVar3[-2] < (uint)wVar4" (cast_expression "(uint)pwVar3[-2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pwVar3[-2]" identifier [ number_literal ])) < (cast_expression "(uint)wVar4" ( (type_descriptor "uint" type_identifier) ) identifier)) )) || (parenthesized_expression "(pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)" ( (comma_expression "pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1" (assignment_expression "pwVar1 = pwVar3 + -1" identifier = (binary_expression "pwVar3 + -1" identifier + number_literal)) , (comma_expression "pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) , (binary_expression "L'\0' < *pwVar1" (char_literal "L'\0'" L' escape_sequence ') < (pointer_expression "*pwVar1" * identifier)))) ))) )) (compound_statement "{\n    if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }\n    FUN_0026adc0(param_1,wVar4);\n    pwVar3 = (wchar_t *)*param_1;\n  }" { (if_statement "if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }" if (parenthesized_expression "((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3]))" ( (binary_expression "(pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])" (parenthesized_expression "(pwVar3 <= param_2)" ( (binary_expression "pwVar3 <= param_2" identifier <= identifier) )) && (parenthesized_expression "(param_2 <= pwVar3 + pwVar3[-3])" ( (binary_expression "param_2 <= pwVar3 + pwVar3[-3]" identifier <= (binary_expression "pwVar3 + pwVar3[-3]" identifier + (subscript_expression "pwVar3[-3]" identifier [ number_literal ]))) ))) )) (compound_statement "{\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }" { (expression_statement "iVar2 = (int)param_2 - (int)pwVar3;" (assignment_expression "iVar2 = (int)param_2 - (int)pwVar3" identifier = (binary_expression "(int)param_2 - (int)pwVar3" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pwVar3" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "FUN_0026adc0(param_1,wVar4);" (call_expression "FUN_0026adc0(param_1,wVar4)" identifier (argument_list "(param_1,wVar4)" ( identifier , identifier ))) ;) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "param_2 = (wchar_t *)(iVar2 + (int)pwVar3);" (assignment_expression "param_2 = (wchar_t *)(iVar2 + (int)pwVar3)" identifier = (cast_expression "(wchar_t *)(iVar2 + (int)pwVar3)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + (int)pwVar3)" ( (binary_expression "iVar2 + (int)pwVar3" identifier + (cast_expression "(int)pwVar3" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "pwVar1 = pwVar3 + pwVar3[-3];" (assignment_expression "pwVar1 = pwVar3 + pwVar3[-3]" identifier = (binary_expression "pwVar3 + pwVar3[-3]" identifier + (subscript_expression "pwVar3[-3]" identifier [ number_literal ]))) ;) (goto_statement "goto joined_r0x0026b194;" goto statement_identifier ;) })) (expression_statement "FUN_0026adc0(param_1,wVar4);" (call_expression "FUN_0026adc0(param_1,wVar4)" identifier (argument_list "(param_1,wVar4)" ( identifier , identifier ))) ;) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (expression_statement "pwVar1 = pwVar3 + pwVar3[-3];" (assignment_expression "pwVar1 = pwVar3 + pwVar3[-3]" identifier = (binary_expression "pwVar3 + pwVar3[-3]" identifier + (subscript_expression "pwVar3[-3]" identifier [ number_literal ]))) ;) (labeled_statement "joined_r0x0026b194:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }" statement_identifier : (if_statement "if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }" if (parenthesized_expression "(param_3 == 1)" ( (binary_expression "param_3 == 1" identifier == number_literal) )) (compound_statement "{\n    *pwVar1 = *param_2;\n  }" { (expression_statement "*pwVar1 = *param_2;" (assignment_expression "*pwVar1 = *param_2" (pointer_expression "*pwVar1" * identifier) = (pointer_expression "*param_2" * identifier)) ;) }) (else_clause "else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }" else (compound_statement "{\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }" { (expression_statement "wmemcpy(pwVar1,param_2,param_3);" (call_expression "wmemcpy(pwVar1,param_2,param_3)" identifier (argument_list "(pwVar1,param_2,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })))) (if_statement "if (pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58) {\n    pwVar3[-1] = L'\0';\n    pwVar3[-3] = wVar4;\n    pwVar3[wVar4] = L'\0';\n  }" if (parenthesized_expression "(pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58)" ( (binary_expression "pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58" (binary_expression "pwVar3 + -3" identifier + number_literal) != (cast_expression "(wchar_t *)PTR_DAT_0038ed58" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    pwVar3[-1] = L'\0';\n    pwVar3[-3] = wVar4;\n    pwVar3[wVar4] = L'\0';\n  }" { (expression_statement "pwVar3[-1] = L'\0';" (assignment_expression "pwVar3[-1] = L'\0'" (subscript_expression "pwVar3[-1]" identifier [ number_literal ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (expression_statement "pwVar3[-3] = wVar4;" (assignment_expression "pwVar3[-3] = wVar4" (subscript_expression "pwVar3[-3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "pwVar3[wVar4] = L'\0';" (assignment_expression "pwVar3[wVar4] = L'\0'" (subscript_expression "pwVar3[wVar4]" identifier [ identifier ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) })) (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::append(wchar_t const*, unsigned int) */\n\nwstring * __thiscall std::wstring::append(wstring *this,wchar_t *param_1,uint param_2)\n\n{\n  wchar_t *pwVar1;\n  int iVar2;\n  wchar_t *pwVar3;\n  wchar_t wVar4;\n  \n  if (param_2 == 0) {\n    return this;\n  }\n  pwVar3 = *(wchar_t **)this;\n  if ((uint)(0xffffffeU - pwVar3[-3]) < param_2) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::append");\n  }\n  wVar4 = pwVar3[-3] + param_2;\n  if (((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = *(wchar_t **)this, L'\0' < *pwVar1)) {\n    if ((pwVar3 <= param_1) && (param_1 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_1 - (int)pwVar3;\n      reserve(this,wVar4);\n      pwVar3 = *(wchar_t **)this;\n      param_1 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }\n    reserve(this,wVar4);\n    pwVar3 = *(wchar_t **)this;\n  }\n  pwVar1 = pwVar3 + pwVar3[-3];\njoined_r0x0026b194:\n  if (param_2 == 1) {\n    *pwVar1 = *param_1;\n  }\n  else {\n    wmemcpy(pwVar1,param_1,param_2);\n    pwVar3 = *(wchar_t **)this;\n  }\n  if (pwVar3 + -3 != (wchar_t *)PTR__S_empty_rep_storage_0038ed58) {\n    pwVar3[-1] = L'\0';\n    pwVar3[-3] = wVar4;\n    pwVar3[wVar4] = L'\0';\n  }\n  return this;\n}\n\n" comment comment (ERROR "wstring * __thiscall std::wstring::append(wstring *this,wchar_t *param_1,uint param_2)" (binary_expression "wstring * __thiscall std::wstring::append(wstring *this" (binary_expression "wstring * __thiscall" identifier * identifier) (ERROR "std::wstring::append(wstring" identifier : : identifier : : identifier ( identifier) * identifier) , type_identifier (pointer_declarator "*param_1" * identifier) , identifier identifier )) (compound_statement "{\n  wchar_t *pwVar1;\n  int iVar2;\n  wchar_t *pwVar3;\n  wchar_t wVar4;\n  \n  if (param_2 == 0) {\n    return this;\n  }\n  pwVar3 = *(wchar_t **)this;\n  if ((uint)(0xffffffeU - pwVar3[-3]) < param_2) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::append");\n  }\n  wVar4 = pwVar3[-3] + param_2;\n  if (((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = *(wchar_t **)this, L'\0' < *pwVar1)) {\n    if ((pwVar3 <= param_1) && (param_1 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_1 - (int)pwVar3;\n      reserve(this,wVar4);\n      pwVar3 = *(wchar_t **)this;\n      param_1 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }\n    reserve(this,wVar4);\n    pwVar3 = *(wchar_t **)this;\n  }\n  pwVar1 = pwVar3 + pwVar3[-3];\njoined_r0x0026b194:\n  if (param_2 == 1) {\n    *pwVar1 = *param_1;\n  }\n  else {\n    wmemcpy(pwVar1,param_1,param_2);\n    pwVar3 = *(wchar_t **)this;\n  }\n  if (pwVar3 + -3 != (wchar_t *)PTR__S_empty_rep_storage_0038ed58) {\n    pwVar3[-1] = L'\0';\n    pwVar3[-3] = wVar4;\n    pwVar3[wVar4] = L'\0';\n  }\n  return this;\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "wchar_t *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (declaration "wchar_t wVar4;" type_identifier identifier ;) (if_statement "if (param_2 == 0) {\n    return this;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    return this;\n  }" { (return_statement "return this;" return identifier ;) })) (expression_statement "pwVar3 = *(wchar_t **)this;" (assignment_expression "pwVar3 = *(wchar_t **)this" identifier = (pointer_expression "*(wchar_t **)this" * (cast_expression "(wchar_t **)this" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (if_statement "if ((uint)(0xffffffeU - pwVar3[-3]) < param_2) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::append");\n  }" if (parenthesized_expression "((uint)(0xffffffeU - pwVar3[-3]) < param_2)" ( (binary_expression "(uint)(0xffffffeU - pwVar3[-3]) < param_2" (call_expression "(uint)(0xffffffeU - pwVar3[-3])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xffffffeU - pwVar3[-3])" ( (binary_expression "0xffffffeU - pwVar3[-3]" number_literal - (subscript_expression "pwVar3[-3]" identifier [ number_literal ])) ))) < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::append");\n  }" { comment (expression_statement "__throw_length_error("basic_string::append");" (call_expression "__throw_length_error("basic_string::append")" identifier (argument_list "("basic_string::append")" ( (string_literal ""basic_string::append"" " string_content ") ))) ;) })) (expression_statement "wVar4 = pwVar3[-3] + param_2;" (assignment_expression "wVar4 = pwVar3[-3] + param_2" identifier = (binary_expression "pwVar3[-3] + param_2" (subscript_expression "pwVar3[-3]" identifier [ number_literal ]) + identifier)) ;) (if_statement "if (((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = *(wchar_t **)this, L'\0' < *pwVar1)) {\n    if ((pwVar3 <= param_1) && (param_1 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_1 - (int)pwVar3;\n      reserve(this,wVar4);\n      pwVar3 = *(wchar_t **)this;\n      param_1 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }\n    reserve(this,wVar4);\n    pwVar3 = *(wchar_t **)this;\n  }" if (parenthesized_expression "(((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = *(wchar_t **)this, L'\0' < *pwVar1))" ( (binary_expression "((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = *(wchar_t **)this, L'\0' < *pwVar1)" (parenthesized_expression "((uint)pwVar3[-2] < (uint)wVar4)" ( (binary_expression "(uint)pwVar3[-2] < (uint)wVar4" (cast_expression "(uint)pwVar3[-2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pwVar3[-2]" identifier [ number_literal ])) < (cast_expression "(uint)wVar4" ( (type_descriptor "uint" type_identifier) ) identifier)) )) || (parenthesized_expression "(pwVar1 = pwVar3 + -1, pwVar3 = *(wchar_t **)this, L'\0' < *pwVar1)" ( (comma_expression "pwVar1 = pwVar3 + -1, pwVar3 = *(wchar_t **)this, L'\0' < *pwVar1" (assignment_expression "pwVar1 = pwVar3 + -1" identifier = (binary_expression "pwVar3 + -1" identifier + number_literal)) , (comma_expression "pwVar3 = *(wchar_t **)this, L'\0' < *pwVar1" (assignment_expression "pwVar3 = *(wchar_t **)this" identifier = (pointer_expression "*(wchar_t **)this" * (cast_expression "(wchar_t **)this" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) , (binary_expression "L'\0' < *pwVar1" (char_literal "L'\0'" L' escape_sequence ') < (pointer_expression "*pwVar1" * identifier)))) ))) )) (compound_statement "{\n    if ((pwVar3 <= param_1) && (param_1 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_1 - (int)pwVar3;\n      reserve(this,wVar4);\n      pwVar3 = *(wchar_t **)this;\n      param_1 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }\n    reserve(this,wVar4);\n    pwVar3 = *(wchar_t **)this;\n  }" { (if_statement "if ((pwVar3 <= param_1) && (param_1 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_1 - (int)pwVar3;\n      reserve(this,wVar4);\n      pwVar3 = *(wchar_t **)this;\n      param_1 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }" if (parenthesized_expression "((pwVar3 <= param_1) && (param_1 <= pwVar3 + pwVar3[-3]))" ( (binary_expression "(pwVar3 <= param_1) && (param_1 <= pwVar3 + pwVar3[-3])" (parenthesized_expression "(pwVar3 <= param_1)" ( (binary_expression "pwVar3 <= param_1" identifier <= identifier) )) && (parenthesized_expression "(param_1 <= pwVar3 + pwVar3[-3])" ( (binary_expression "param_1 <= pwVar3 + pwVar3[-3]" identifier <= (binary_expression "pwVar3 + pwVar3[-3]" identifier + (subscript_expression "pwVar3[-3]" identifier [ number_literal ]))) ))) )) (compound_statement "{\n      iVar2 = (int)param_1 - (int)pwVar3;\n      reserve(this,wVar4);\n      pwVar3 = *(wchar_t **)this;\n      param_1 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }" { (expression_statement "iVar2 = (int)param_1 - (int)pwVar3;" (assignment_expression "iVar2 = (int)param_1 - (int)pwVar3" identifier = (binary_expression "(int)param_1 - (int)pwVar3" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pwVar3" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "reserve(this,wVar4);" (call_expression "reserve(this,wVar4)" identifier (argument_list "(this,wVar4)" ( identifier , identifier ))) ;) (expression_statement "pwVar3 = *(wchar_t **)this;" (assignment_expression "pwVar3 = *(wchar_t **)this" identifier = (pointer_expression "*(wchar_t **)this" * (cast_expression "(wchar_t **)this" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "param_1 = (wchar_t *)(iVar2 + (int)pwVar3);" (assignment_expression "param_1 = (wchar_t *)(iVar2 + (int)pwVar3)" identifier = (cast_expression "(wchar_t *)(iVar2 + (int)pwVar3)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + (int)pwVar3)" ( (binary_expression "iVar2 + (int)pwVar3" identifier + (cast_expression "(int)pwVar3" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "pwVar1 = pwVar3 + pwVar3[-3];" (assignment_expression "pwVar1 = pwVar3 + pwVar3[-3]" identifier = (binary_expression "pwVar3 + pwVar3[-3]" identifier + (subscript_expression "pwVar3[-3]" identifier [ number_literal ]))) ;) (goto_statement "goto joined_r0x0026b194;" goto statement_identifier ;) })) (expression_statement "reserve(this,wVar4);" (call_expression "reserve(this,wVar4)" identifier (argument_list "(this,wVar4)" ( identifier , identifier ))) ;) (expression_statement "pwVar3 = *(wchar_t **)this;" (assignment_expression "pwVar3 = *(wchar_t **)this" identifier = (pointer_expression "*(wchar_t **)this" * (cast_expression "(wchar_t **)this" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })) (expression_statement "pwVar1 = pwVar3 + pwVar3[-3];" (assignment_expression "pwVar1 = pwVar3 + pwVar3[-3]" identifier = (binary_expression "pwVar3 + pwVar3[-3]" identifier + (subscript_expression "pwVar3[-3]" identifier [ number_literal ]))) ;) (labeled_statement "joined_r0x0026b194:\n  if (param_2 == 1) {\n    *pwVar1 = *param_1;\n  }\n  else {\n    wmemcpy(pwVar1,param_1,param_2);\n    pwVar3 = *(wchar_t **)this;\n  }" statement_identifier : (if_statement "if (param_2 == 1) {\n    *pwVar1 = *param_1;\n  }\n  else {\n    wmemcpy(pwVar1,param_1,param_2);\n    pwVar3 = *(wchar_t **)this;\n  }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n    *pwVar1 = *param_1;\n  }" { (expression_statement "*pwVar1 = *param_1;" (assignment_expression "*pwVar1 = *param_1" (pointer_expression "*pwVar1" * identifier) = (pointer_expression "*param_1" * identifier)) ;) }) (else_clause "else {\n    wmemcpy(pwVar1,param_1,param_2);\n    pwVar3 = *(wchar_t **)this;\n  }" else (compound_statement "{\n    wmemcpy(pwVar1,param_1,param_2);\n    pwVar3 = *(wchar_t **)this;\n  }" { (expression_statement "wmemcpy(pwVar1,param_1,param_2);" (call_expression "wmemcpy(pwVar1,param_1,param_2)" identifier (argument_list "(pwVar1,param_1,param_2)" ( identifier , identifier , identifier ))) ;) (expression_statement "pwVar3 = *(wchar_t **)this;" (assignment_expression "pwVar3 = *(wchar_t **)this" identifier = (pointer_expression "*(wchar_t **)this" * (cast_expression "(wchar_t **)this" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })))) (if_statement "if (pwVar3 + -3 != (wchar_t *)PTR__S_empty_rep_storage_0038ed58) {\n    pwVar3[-1] = L'\0';\n    pwVar3[-3] = wVar4;\n    pwVar3[wVar4] = L'\0';\n  }" if (parenthesized_expression "(pwVar3 + -3 != (wchar_t *)PTR__S_empty_rep_storage_0038ed58)" ( (binary_expression "pwVar3 + -3 != (wchar_t *)PTR__S_empty_rep_storage_0038ed58" (binary_expression "pwVar3 + -3" identifier + number_literal) != (cast_expression "(wchar_t *)PTR__S_empty_rep_storage_0038ed58" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    pwVar3[-1] = L'\0';\n    pwVar3[-3] = wVar4;\n    pwVar3[wVar4] = L'\0';\n  }" { (expression_statement "pwVar3[-1] = L'\0';" (assignment_expression "pwVar3[-1] = L'\0'" (subscript_expression "pwVar3[-1]" identifier [ number_literal ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (expression_statement "pwVar3[-3] = wVar4;" (assignment_expression "pwVar3[-3] = wVar4" (subscript_expression "pwVar3[-3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "pwVar3[wVar4] = L'\0';" (assignment_expression "pwVar3[wVar4] = L'\0'" (subscript_expression "pwVar3[wVar4]" identifier [ identifier ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) })) (return_statement "return this;" return identifier ;) }))
(translation_unit "int * FUN_0026b0d0(int *param_1,wchar_t *param_2,uint param_3)\n\n{\n  wchar_t *pwVar1;\n  int iVar2;\n  wchar_t *pwVar3;\n  wchar_t wVar4;\n  \n  if (param_3 == 0) {\n    return param_1;\n  }\n  pwVar3 = (wchar_t *)*param_1;\n  if ((uint)(0xffffffeU - pwVar3[-3]) < param_3) {\n                    \n    FUN_0022c7a0("basic_string::append");\n  }\n  wVar4 = pwVar3[-3] + param_3;\n  if (((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }\n    FUN_0026adc0(param_1,wVar4);\n    pwVar3 = (wchar_t *)*param_1;\n  }\n  pwVar1 = pwVar3 + pwVar3[-3];\njoined_r0x0026b194:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }\n  if (pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58) {\n    pwVar3[-1] = L'\0';\n    pwVar3[-3] = wVar4;\n    pwVar3[wVar4] = L'\0';\n  }\n  return param_1;\n}\n\n" (function_definition "int * FUN_0026b0d0(int *param_1,wchar_t *param_2,uint param_3)\n\n{\n  wchar_t *pwVar1;\n  int iVar2;\n  wchar_t *pwVar3;\n  wchar_t wVar4;\n  \n  if (param_3 == 0) {\n    return param_1;\n  }\n  pwVar3 = (wchar_t *)*param_1;\n  if ((uint)(0xffffffeU - pwVar3[-3]) < param_3) {\n                    \n    FUN_0022c7a0("basic_string::append");\n  }\n  wVar4 = pwVar3[-3] + param_3;\n  if (((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }\n    FUN_0026adc0(param_1,wVar4);\n    pwVar3 = (wchar_t *)*param_1;\n  }\n  pwVar1 = pwVar3 + pwVar3[-3];\njoined_r0x0026b194:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }\n  if (pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58) {\n    pwVar3[-1] = L'\0';\n    pwVar3[-3] = wVar4;\n    pwVar3[wVar4] = L'\0';\n  }\n  return param_1;\n}" primitive_type (pointer_declarator "* FUN_0026b0d0(int *param_1,wchar_t *param_2,uint param_3)" * (function_declarator "FUN_0026b0d0(int *param_1,wchar_t *param_2,uint param_3)" identifier (parameter_list "(int *param_1,wchar_t *param_2,uint param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint param_3" type_identifier identifier) )))) (compound_statement "{\n  wchar_t *pwVar1;\n  int iVar2;\n  wchar_t *pwVar3;\n  wchar_t wVar4;\n  \n  if (param_3 == 0) {\n    return param_1;\n  }\n  pwVar3 = (wchar_t *)*param_1;\n  if ((uint)(0xffffffeU - pwVar3[-3]) < param_3) {\n                    \n    FUN_0022c7a0("basic_string::append");\n  }\n  wVar4 = pwVar3[-3] + param_3;\n  if (((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }\n    FUN_0026adc0(param_1,wVar4);\n    pwVar3 = (wchar_t *)*param_1;\n  }\n  pwVar1 = pwVar3 + pwVar3[-3];\njoined_r0x0026b194:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }\n  if (pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58) {\n    pwVar3[-1] = L'\0';\n    pwVar3[-3] = wVar4;\n    pwVar3[wVar4] = L'\0';\n  }\n  return param_1;\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "wchar_t *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (declaration "wchar_t wVar4;" type_identifier identifier ;) (if_statement "if (param_3 == 0) {\n    return param_1;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    return param_1;\n  }" { (return_statement "return param_1;" return identifier ;) })) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if ((uint)(0xffffffeU - pwVar3[-3]) < param_3) {\n                    \n    FUN_0022c7a0("basic_string::append");\n  }" if (parenthesized_expression "((uint)(0xffffffeU - pwVar3[-3]) < param_3)" ( (binary_expression "(uint)(0xffffffeU - pwVar3[-3]) < param_3" (call_expression "(uint)(0xffffffeU - pwVar3[-3])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xffffffeU - pwVar3[-3])" ( (binary_expression "0xffffffeU - pwVar3[-3]" number_literal - (subscript_expression "pwVar3[-3]" identifier [ number_literal ])) ))) < identifier) )) (compound_statement "{\n                    \n    FUN_0022c7a0("basic_string::append");\n  }" { (expression_statement "FUN_0022c7a0("basic_string::append");" (call_expression "FUN_0022c7a0("basic_string::append")" identifier (argument_list "("basic_string::append")" ( (string_literal ""basic_string::append"" " string_content ") ))) ;) })) (expression_statement "wVar4 = pwVar3[-3] + param_3;" (assignment_expression "wVar4 = pwVar3[-3] + param_3" identifier = (binary_expression "pwVar3[-3] + param_3" (subscript_expression "pwVar3[-3]" identifier [ number_literal ]) + identifier)) ;) (if_statement "if (((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }\n    FUN_0026adc0(param_1,wVar4);\n    pwVar3 = (wchar_t *)*param_1;\n  }" if (parenthesized_expression "(((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1))" ( (binary_expression "((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)" (parenthesized_expression "((uint)pwVar3[-2] < (uint)wVar4)" ( (binary_expression "(uint)pwVar3[-2] < (uint)wVar4" (cast_expression "(uint)pwVar3[-2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pwVar3[-2]" identifier [ number_literal ])) < (cast_expression "(uint)wVar4" ( (type_descriptor "uint" type_identifier) ) identifier)) )) || (parenthesized_expression "(pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)" ( (comma_expression "pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1" (assignment_expression "pwVar1 = pwVar3 + -1" identifier = (binary_expression "pwVar3 + -1" identifier + number_literal)) , (comma_expression "pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) , (binary_expression "L'\0' < *pwVar1" (char_literal "L'\0'" L' escape_sequence ') < (pointer_expression "*pwVar1" * identifier)))) ))) )) (compound_statement "{\n    if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }\n    FUN_0026adc0(param_1,wVar4);\n    pwVar3 = (wchar_t *)*param_1;\n  }" { (if_statement "if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }" if (parenthesized_expression "((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3]))" ( (binary_expression "(pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])" (parenthesized_expression "(pwVar3 <= param_2)" ( (binary_expression "pwVar3 <= param_2" identifier <= identifier) )) && (parenthesized_expression "(param_2 <= pwVar3 + pwVar3[-3])" ( (binary_expression "param_2 <= pwVar3 + pwVar3[-3]" identifier <= (binary_expression "pwVar3 + pwVar3[-3]" identifier + (subscript_expression "pwVar3[-3]" identifier [ number_literal ]))) ))) )) (compound_statement "{\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }" { (expression_statement "iVar2 = (int)param_2 - (int)pwVar3;" (assignment_expression "iVar2 = (int)param_2 - (int)pwVar3" identifier = (binary_expression "(int)param_2 - (int)pwVar3" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pwVar3" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "FUN_0026adc0(param_1,wVar4);" (call_expression "FUN_0026adc0(param_1,wVar4)" identifier (argument_list "(param_1,wVar4)" ( identifier , identifier ))) ;) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "param_2 = (wchar_t *)(iVar2 + (int)pwVar3);" (assignment_expression "param_2 = (wchar_t *)(iVar2 + (int)pwVar3)" identifier = (cast_expression "(wchar_t *)(iVar2 + (int)pwVar3)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + (int)pwVar3)" ( (binary_expression "iVar2 + (int)pwVar3" identifier + (cast_expression "(int)pwVar3" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "pwVar1 = pwVar3 + pwVar3[-3];" (assignment_expression "pwVar1 = pwVar3 + pwVar3[-3]" identifier = (binary_expression "pwVar3 + pwVar3[-3]" identifier + (subscript_expression "pwVar3[-3]" identifier [ number_literal ]))) ;) (goto_statement "goto joined_r0x0026b194;" goto statement_identifier ;) })) (expression_statement "FUN_0026adc0(param_1,wVar4);" (call_expression "FUN_0026adc0(param_1,wVar4)" identifier (argument_list "(param_1,wVar4)" ( identifier , identifier ))) ;) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (expression_statement "pwVar1 = pwVar3 + pwVar3[-3];" (assignment_expression "pwVar1 = pwVar3 + pwVar3[-3]" identifier = (binary_expression "pwVar3 + pwVar3[-3]" identifier + (subscript_expression "pwVar3[-3]" identifier [ number_literal ]))) ;) (labeled_statement "joined_r0x0026b194:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }" statement_identifier : (if_statement "if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }" if (parenthesized_expression "(param_3 == 1)" ( (binary_expression "param_3 == 1" identifier == number_literal) )) (compound_statement "{\n    *pwVar1 = *param_2;\n  }" { (expression_statement "*pwVar1 = *param_2;" (assignment_expression "*pwVar1 = *param_2" (pointer_expression "*pwVar1" * identifier) = (pointer_expression "*param_2" * identifier)) ;) }) (else_clause "else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }" else (compound_statement "{\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }" { (expression_statement "wmemcpy(pwVar1,param_2,param_3);" (call_expression "wmemcpy(pwVar1,param_2,param_3)" identifier (argument_list "(pwVar1,param_2,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })))) (if_statement "if (pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58) {\n    pwVar3[-1] = L'\0';\n    pwVar3[-3] = wVar4;\n    pwVar3[wVar4] = L'\0';\n  }" if (parenthesized_expression "(pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58)" ( (binary_expression "pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58" (binary_expression "pwVar3 + -3" identifier + number_literal) != (cast_expression "(wchar_t *)PTR_DAT_0038ed58" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    pwVar3[-1] = L'\0';\n    pwVar3[-3] = wVar4;\n    pwVar3[wVar4] = L'\0';\n  }" { (expression_statement "pwVar3[-1] = L'\0';" (assignment_expression "pwVar3[-1] = L'\0'" (subscript_expression "pwVar3[-1]" identifier [ number_literal ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (expression_statement "pwVar3[-3] = wVar4;" (assignment_expression "pwVar3[-3] = wVar4" (subscript_expression "pwVar3[-3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "pwVar3[wVar4] = L'\0';" (assignment_expression "pwVar3[wVar4] = L'\0'" (subscript_expression "pwVar3[wVar4]" identifier [ identifier ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) })) (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 (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression LIT - (subscript_expression IDENT [ LIT ])) ))) < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression IDENT + LIT)) , (comma_expression (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) , (binary_expression (char_literal L' escape_sequence ') < (pointer_expression * IDENT)))) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) && (parenthesized_expression ( (binary_expression IDENT <= (binary_expression IDENT + (subscript_expression IDENT [ LIT ]))) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (subscript_expression IDENT [ LIT ]))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (subscript_expression IDENT [ LIT ]))) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) })))) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (char_literal L' escape_sequence ')) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (char_literal L' escape_sequence ')) ;) })) (return_statement return IDENT ;) })))
(function_definition "int * FUN_0026b0d0(int *param_1,wchar_t *param_2,uint param_3)\n\n{\n  wchar_t *pwVar1;\n  int iVar2;\n  wchar_t *pwVar3;\n  wchar_t wVar4;\n  \n  if (param_3 == 0) {\n    return param_1;\n  }\n  pwVar3 = (wchar_t *)*param_1;\n  if ((uint)(0xffffffeU - pwVar3[-3]) < param_3) {\n                    \n    FUN_0022c7a0("basic_string::append");\n  }\n  wVar4 = pwVar3[-3] + param_3;\n  if (((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }\n    FUN_0026adc0(param_1,wVar4);\n    pwVar3 = (wchar_t *)*param_1;\n  }\n  pwVar1 = pwVar3 + pwVar3[-3];\njoined_r0x0026b194:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }\n  if (pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58) {\n    pwVar3[-1] = L'\0';\n    pwVar3[-3] = wVar4;\n    pwVar3[wVar4] = L'\0';\n  }\n  return param_1;\n}" (primitive_type "int") (pointer_declarator "* FUN_0026b0d0(int *param_1,wchar_t *param_2,uint param_3)" (* "*") (function_declarator "FUN_0026b0d0(int *param_1,wchar_t *param_2,uint param_3)" (identifier "FUN_0026b0d0") (parameter_list "(int *param_1,wchar_t *param_2,uint param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "wchar_t *param_2" (type_identifier "wchar_t") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) () ")")))) (compound_statement "{\n  wchar_t *pwVar1;\n  int iVar2;\n  wchar_t *pwVar3;\n  wchar_t wVar4;\n  \n  if (param_3 == 0) {\n    return param_1;\n  }\n  pwVar3 = (wchar_t *)*param_1;\n  if ((uint)(0xffffffeU - pwVar3[-3]) < param_3) {\n                    \n    FUN_0022c7a0("basic_string::append");\n  }\n  wVar4 = pwVar3[-3] + param_3;\n  if (((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }\n    FUN_0026adc0(param_1,wVar4);\n    pwVar3 = (wchar_t *)*param_1;\n  }\n  pwVar1 = pwVar3 + pwVar3[-3];\njoined_r0x0026b194:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }\n  if (pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58) {\n    pwVar3[-1] = L'\0';\n    pwVar3[-3] = wVar4;\n    pwVar3[wVar4] = L'\0';\n  }\n  return param_1;\n}" ({ "{") (declaration "wchar_t *pwVar1;" (type_identifier "wchar_t") (pointer_declarator "*pwVar1" (* "*") (identifier "pwVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "wchar_t *pwVar3;" (type_identifier "wchar_t") (pointer_declarator "*pwVar3" (* "*") (identifier "pwVar3")) (; ";")) (declaration "wchar_t wVar4;" (type_identifier "wchar_t") (identifier "wVar4") (; ";")) (if_statement "if (param_3 == 0) {\n    return param_1;\n  }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return param_1;\n  }" ({ "{") (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" (identifier "pwVar3") (= "=") (cast_expression "(wchar_t *)*param_1" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (if_statement "if ((uint)(0xffffffeU - pwVar3[-3]) < param_3) {\n                    \n    FUN_0022c7a0("basic_string::append");\n  }" (if "if") (parenthesized_expression "((uint)(0xffffffeU - pwVar3[-3]) < param_3)" (( "(") (binary_expression "(uint)(0xffffffeU - pwVar3[-3]) < param_3" (call_expression "(uint)(0xffffffeU - pwVar3[-3])" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(0xffffffeU - pwVar3[-3])" (( "(") (binary_expression "0xffffffeU - pwVar3[-3]" (number_literal "0xffffffeU") (- "-") (subscript_expression "pwVar3[-3]" (identifier "pwVar3") ([ "[") (number_literal "-3") (] "]"))) () ")"))) (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n                    \n    FUN_0022c7a0("basic_string::append");\n  }" ({ "{") (expression_statement "FUN_0022c7a0("basic_string::append");" (call_expression "FUN_0022c7a0("basic_string::append")" (identifier "FUN_0022c7a0") (argument_list "("basic_string::append")" (( "(") (string_literal ""basic_string::append"" (" """) (string_content "basic_string::append") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "wVar4 = pwVar3[-3] + param_3;" (assignment_expression "wVar4 = pwVar3[-3] + param_3" (identifier "wVar4") (= "=") (binary_expression "pwVar3[-3] + param_3" (subscript_expression "pwVar3[-3]" (identifier "pwVar3") ([ "[") (number_literal "-3") (] "]")) (+ "+") (identifier "param_3"))) (; ";")) (if_statement "if (((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }\n    FUN_0026adc0(param_1,wVar4);\n    pwVar3 = (wchar_t *)*param_1;\n  }" (if "if") (parenthesized_expression "(((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1))" (( "(") (binary_expression "((uint)pwVar3[-2] < (uint)wVar4) ||\n     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)" (parenthesized_expression "((uint)pwVar3[-2] < (uint)wVar4)" (( "(") (binary_expression "(uint)pwVar3[-2] < (uint)wVar4" (cast_expression "(uint)pwVar3[-2]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "pwVar3[-2]" (identifier "pwVar3") ([ "[") (number_literal "-2") (] "]"))) (< "<") (cast_expression "(uint)wVar4" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "wVar4"))) () ")")) (|| "||") (parenthesized_expression "(pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)" (( "(") (comma_expression "pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1" (assignment_expression "pwVar1 = pwVar3 + -1" (identifier "pwVar1") (= "=") (binary_expression "pwVar3 + -1" (identifier "pwVar3") (+ "+") (number_literal "-1"))) (, ",") (comma_expression "pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1" (assignment_expression "pwVar3 = (wchar_t *)*param_1" (identifier "pwVar3") (= "=") (cast_expression "(wchar_t *)*param_1" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (, ",") (binary_expression "L'\0' < *pwVar1" (char_literal "L'\0'" (L' "L'") (escape_sequence "\0") (' "'")) (< "<") (pointer_expression "*pwVar1" (* "*") (identifier "pwVar1"))))) () ")"))) () ")")) (compound_statement "{\n    if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }\n    FUN_0026adc0(param_1,wVar4);\n    pwVar3 = (wchar_t *)*param_1;\n  }" ({ "{") (if_statement "if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }" (if "if") (parenthesized_expression "((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3]))" (( "(") (binary_expression "(pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])" (parenthesized_expression "(pwVar3 <= param_2)" (( "(") (binary_expression "pwVar3 <= param_2" (identifier "pwVar3") (<= "<=") (identifier "param_2")) () ")")) (&& "&&") (parenthesized_expression "(param_2 <= pwVar3 + pwVar3[-3])" (( "(") (binary_expression "param_2 <= pwVar3 + pwVar3[-3]" (identifier "param_2") (<= "<=") (binary_expression "pwVar3 + pwVar3[-3]" (identifier "pwVar3") (+ "+") (subscript_expression "pwVar3[-3]" (identifier "pwVar3") ([ "[") (number_literal "-3") (] "]")))) () ")"))) () ")")) (compound_statement "{\n      iVar2 = (int)param_2 - (int)pwVar3;\n      FUN_0026adc0(param_1,wVar4);\n      pwVar3 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);\n      pwVar1 = pwVar3 + pwVar3[-3];\n      goto joined_r0x0026b194;\n    }" ({ "{") (expression_statement "iVar2 = (int)param_2 - (int)pwVar3;" (assignment_expression "iVar2 = (int)param_2 - (int)pwVar3" (identifier "iVar2") (= "=") (binary_expression "(int)param_2 - (int)pwVar3" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (- "-") (cast_expression "(int)pwVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pwVar3")))) (; ";")) (expression_statement "FUN_0026adc0(param_1,wVar4);" (call_expression "FUN_0026adc0(param_1,wVar4)" (identifier "FUN_0026adc0") (argument_list "(param_1,wVar4)" (( "(") (identifier "param_1") (, ",") (identifier "wVar4") () ")"))) (; ";")) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" (identifier "pwVar3") (= "=") (cast_expression "(wchar_t *)*param_1" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "param_2 = (wchar_t *)(iVar2 + (int)pwVar3);" (assignment_expression "param_2 = (wchar_t *)(iVar2 + (int)pwVar3)" (identifier "param_2") (= "=") (cast_expression "(wchar_t *)(iVar2 + (int)pwVar3)" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + (int)pwVar3)" (( "(") (binary_expression "iVar2 + (int)pwVar3" (identifier "iVar2") (+ "+") (cast_expression "(int)pwVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pwVar3"))) () ")")))) (; ";")) (expression_statement "pwVar1 = pwVar3 + pwVar3[-3];" (assignment_expression "pwVar1 = pwVar3 + pwVar3[-3]" (identifier "pwVar1") (= "=") (binary_expression "pwVar3 + pwVar3[-3]" (identifier "pwVar3") (+ "+") (subscript_expression "pwVar3[-3]" (identifier "pwVar3") ([ "[") (number_literal "-3") (] "]")))) (; ";")) (goto_statement "goto joined_r0x0026b194;" (goto "goto") (statement_identifier "joined_r0x0026b194") (; ";")) (} "}"))) (expression_statement "FUN_0026adc0(param_1,wVar4);" (call_expression "FUN_0026adc0(param_1,wVar4)" (identifier "FUN_0026adc0") (argument_list "(param_1,wVar4)" (( "(") (identifier "param_1") (, ",") (identifier "wVar4") () ")"))) (; ";")) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" (identifier "pwVar3") (= "=") (cast_expression "(wchar_t *)*param_1" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (} "}"))) (expression_statement "pwVar1 = pwVar3 + pwVar3[-3];" (assignment_expression "pwVar1 = pwVar3 + pwVar3[-3]" (identifier "pwVar1") (= "=") (binary_expression "pwVar3 + pwVar3[-3]" (identifier "pwVar3") (+ "+") (subscript_expression "pwVar3[-3]" (identifier "pwVar3") ([ "[") (number_literal "-3") (] "]")))) (; ";")) (labeled_statement "joined_r0x0026b194:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }" (statement_identifier "joined_r0x0026b194") (: ":") (if_statement "if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }" (if "if") (parenthesized_expression "(param_3 == 1)" (( "(") (binary_expression "param_3 == 1" (identifier "param_3") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    *pwVar1 = *param_2;\n  }" ({ "{") (expression_statement "*pwVar1 = *param_2;" (assignment_expression "*pwVar1 = *param_2" (pointer_expression "*pwVar1" (* "*") (identifier "pwVar1")) (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (} "}")) (else_clause "else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }" (else "else") (compound_statement "{\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar3 = (wchar_t *)*param_1;\n  }" ({ "{") (expression_statement "wmemcpy(pwVar1,param_2,param_3);" (call_expression "wmemcpy(pwVar1,param_2,param_3)" (identifier "wmemcpy") (argument_list "(pwVar1,param_2,param_3)" (( "(") (identifier "pwVar1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" (identifier "pwVar3") (= "=") (cast_expression "(wchar_t *)*param_1" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (} "}"))))) (if_statement "if (pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58) {\n    pwVar3[-1] = L'\0';\n    pwVar3[-3] = wVar4;\n    pwVar3[wVar4] = L'\0';\n  }" (if "if") (parenthesized_expression "(pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58)" (( "(") (binary_expression "pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58" (binary_expression "pwVar3 + -3" (identifier "pwVar3") (+ "+") (number_literal "-3")) (!= "!=") (cast_expression "(wchar_t *)PTR_DAT_0038ed58" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_DAT_0038ed58"))) () ")")) (compound_statement "{\n    pwVar3[-1] = L'\0';\n    pwVar3[-3] = wVar4;\n    pwVar3[wVar4] = L'\0';\n  }" ({ "{") (expression_statement "pwVar3[-1] = L'\0';" (assignment_expression "pwVar3[-1] = L'\0'" (subscript_expression "pwVar3[-1]" (identifier "pwVar3") ([ "[") (number_literal "-1") (] "]")) (= "=") (char_literal "L'\0'" (L' "L'") (escape_sequence "\0") (' "'"))) (; ";")) (expression_statement "pwVar3[-3] = wVar4;" (assignment_expression "pwVar3[-3] = wVar4" (subscript_expression "pwVar3[-3]" (identifier "pwVar3") ([ "[") (number_literal "-3") (] "]")) (= "=") (identifier "wVar4")) (; ";")) (expression_statement "pwVar3[wVar4] = L'\0';" (assignment_expression "pwVar3[wVar4] = L'\0'" (subscript_expression "pwVar3[wVar4]" (identifier "pwVar3") ([ "[") (identifier "wVar4") (] "]")) (= "=") (char_literal "L'\0'" (L' "L'") (escape_sequence "\0") (' "'"))) (; ";")) (} "}"))) (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::append(wchar_t const*, unsigned int) */

wstring * __thiscall std::wstring::append(wstring *this,type_1 *var_4,type_2 var_1)

{
  type_1 *pwVar1;
  int var_6;
  type_1 *var_3;
  type_1 wVar4;
  
  if (var_1 == 0) {
    return this;
  }
  var_3 = *(type_1 **)this;
  if ((type_2)(0xffffffeU - var_3[-3]) < var_1) {
                    /* WARNING: Subroutine does not return */
    var_2("basic_string::append");
  }
  wVar4 = var_3[-3] + var_1;
  if (((type_2)var_3[-2] < (type_2)wVar4) ||
     (pwVar1 = var_3 + -1, var_3 = *(type_1 **)this, L'\0' < *pwVar1)) {
    if ((var_3 <= var_4) && (var_4 <= var_3 + var_3[-3])) {
      var_6 = (int)var_4 - (int)var_3;
      var_5(this,wVar4);
      var_3 = *(type_1 **)this;
      var_4 = (type_1 *)(var_6 + (int)var_3);
      pwVar1 = var_3 + var_3[-3];
      goto joined_r0x0026b194;
    }
    var_5(this,wVar4);
    var_3 = *(type_1 **)this;
  }
  pwVar1 = var_3 + var_3[-3];
joined_r0x0026b194:
  if (var_1 == 1) {
    *pwVar1 = *var_4;
  }
  else {
    var_7(pwVar1,var_4,var_1);
    var_3 = *(type_1 **)this;
  }
  if (var_3 + -3 != (type_1 *)PTR__S_empty_rep_storage_0038ed58) {
    var_3[-1] = L'\0';
    var_3[-3] = wVar4;
    var_3[wVar4] = L'\0';
  }
  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: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (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: (pointer_expression argument: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (number_literal) right: (subscript_expression argument: (identifier) index: (number_literal))))) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (identifier) index: (number_literal))) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) right: (comma_expression left: (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))) right: (binary_expression left: (char_literal (escape_sequence)) right: (pointer_expression argument: (identifier)))))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (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: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal))))) (goto_statement label: (statement_identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal))))) (labeled_statement label: (statement_identifier) (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))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (escape_sequence)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (identifier)) right: (char_literal (escape_sequence)))))) (return_statement (identifier)))))

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

int * MASKED(int *param_1,wchar_t *param_2,uint param_3)

{
  wchar_t *pwVar1;
  int iVar2;
  wchar_t *pwVar3;
  wchar_t wVar4;
  
  if (param_3 == 0) {
    return param_1;
  }
  pwVar3 = (wchar_t *)*param_1;
  if ((uint)(0xffffffeU - pwVar3[-3]) < param_3) {
                    /* WARNING: Subroutine does not return */
    FUN_0022c7a0("basic_string::append");
  }
  wVar4 = pwVar3[-3] + param_3;
  if (((uint)pwVar3[-2] < (uint)wVar4) ||
     (pwVar1 = pwVar3 + -1, pwVar3 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {
    if ((pwVar3 <= param_2) && (param_2 <= pwVar3 + pwVar3[-3])) {
      iVar2 = (int)param_2 - (int)pwVar3;
      FUN_0026adc0(param_1,wVar4);
      pwVar3 = (wchar_t *)*param_1;
      param_2 = (wchar_t *)(iVar2 + (int)pwVar3);
      pwVar1 = pwVar3 + pwVar3[-3];
      goto joined_r0x0026b194;
    }
    FUN_0026adc0(param_1,wVar4);
    pwVar3 = (wchar_t *)*param_1;
  }
  pwVar1 = pwVar3 + pwVar3[-3];
joined_r0x0026b194:
  if (param_3 == 1) {
    *pwVar1 = *param_2;
  }
  else {
    wmemcpy(pwVar1,param_2,param_3);
    pwVar3 = (wchar_t *)*param_1;
  }
  if (pwVar3 + -3 != (wchar_t *)PTR_DAT_0038ed58) {
    pwVar3[-1] = L'\0';
    pwVar3[-3] = wVar4;
    pwVar3[wVar4] = L'\0';
  }
  return param_1;
}

