
/* std::wstring::TEMPNAMEPLACEHOLDERVALUE(std::initializer_list<wchar_t>) */

wstring * __thiscall std::wstring::operator+=(wstring *this,wchar_t *param_2,ulong param_3)

{
  wchar_t *pwVar1;
  wchar_t *pwVar2;
  ulong uVar3;
  long lVar4;
  
  if (param_3 == 0) {
    return this;
  }
  pwVar2 = *(wchar_t **)this;
  if (0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3) {
                    /* WARNING: Subroutine does not return */
    __throw_length_error("basic_string::append");
  }
  uVar3 = *(long *)(pwVar2 + -6) + param_3;
  if ((*(ulong *)(pwVar2 + -4) < uVar3) ||
     (pwVar1 = pwVar2 + -2, pwVar2 = *(wchar_t **)this, L'\0' < *pwVar1)) {
    if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {
      lVar4 = (long)param_2 - (long)pwVar2;
      reserve(this,uVar3);
      pwVar2 = *(wchar_t **)this;
      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);
      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);
      goto joined_r0x00356d20;
    }
    reserve(this,uVar3);
    pwVar2 = *(wchar_t **)this;
  }
  pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);
joined_r0x00356d20:
  if (param_3 == 1) {
    *pwVar1 = *param_2;
  }
  else {
    wmemcpy(pwVar1,param_2,param_3);
    pwVar2 = *(wchar_t **)this;
  }
  if (pwVar2 + -6 != (wchar_t *)PTR__S_empty_rep_storage_0043dcd8) {
    pwVar2[-2] = L'\0';
    *(ulong *)(pwVar2 + -6) = uVar3;
    pwVar2[uVar3] = L'\0';
  }
  return this;
}



long * thunk_FUN_00356c60(long *param_1,wchar_t *param_2,ulong param_3)

{
  wchar_t *pwVar1;
  wchar_t *pwVar2;
  ulong uVar3;
  long lVar4;
  
  if (param_3 == 0) {
    return param_1;
  }
  pwVar2 = (wchar_t *)*param_1;
  if (0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3) {
                    /* WARNING: Subroutine does not return */
    FUN_003195a0("basic_string::append");
  }
  uVar3 = *(long *)(pwVar2 + -6) + param_3;
  if ((*(ulong *)(pwVar2 + -4) < uVar3) ||
     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {
    if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {
      lVar4 = (long)param_2 - (long)pwVar2;
      FUN_003569f0(param_1,uVar3);
      pwVar2 = (wchar_t *)*param_1;
      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);
      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);
      goto joined_r0x00356d20;
    }
    FUN_003569f0(param_1,uVar3);
    pwVar2 = (wchar_t *)*param_1;
  }
  pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);
joined_r0x00356d20:
  if (param_3 == 1) {
    *pwVar1 = *param_2;
  }
  else {
    wmemcpy(pwVar1,param_2,param_3);
    pwVar2 = (wchar_t *)*param_1;
  }
  if (pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8) {
    pwVar2[-2] = L'\0';
    *(ulong *)(pwVar2 + -6) = uVar3;
    pwVar2[uVar3] = L'\0';
  }
  return param_1;
}


JMP 0x00356c60
(translation_unit "long * thunk_FUN_00356c60(long *param_1,wchar_t *param_2,ulong param_3)\n\n{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  ulong uVar3;\n  long lVar4;\n  \n  if (param_3 == 0) {\n    return param_1;\n  }\n  pwVar2 = (wchar_t *)*param_1;\n  if (0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3) {\n                    /* WARNING: Subroutine does not return */\n    FUN_003195a0("basic_string::append");\n  }\n  uVar3 = *(long *)(pwVar2 + -6) + param_3;\n  if ((*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }\n    FUN_003569f0(param_1,uVar3);\n    pwVar2 = (wchar_t *)*param_1;\n  }\n  pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\njoined_r0x00356d20:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = (wchar_t *)*param_1;\n  }\n  if (pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8) {\n    pwVar2[-2] = L'\0';\n    *(ulong *)(pwVar2 + -6) = uVar3;\n    pwVar2[uVar3] = L'\0';\n  }\n  return param_1;\n}\n\n" (function_definition "long * thunk_FUN_00356c60(long *param_1,wchar_t *param_2,ulong param_3)\n\n{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  ulong uVar3;\n  long lVar4;\n  \n  if (param_3 == 0) {\n    return param_1;\n  }\n  pwVar2 = (wchar_t *)*param_1;\n  if (0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3) {\n                    /* WARNING: Subroutine does not return */\n    FUN_003195a0("basic_string::append");\n  }\n  uVar3 = *(long *)(pwVar2 + -6) + param_3;\n  if ((*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }\n    FUN_003569f0(param_1,uVar3);\n    pwVar2 = (wchar_t *)*param_1;\n  }\n  pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\njoined_r0x00356d20:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = (wchar_t *)*param_1;\n  }\n  if (pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8) {\n    pwVar2[-2] = L'\0';\n    *(ulong *)(pwVar2 + -6) = uVar3;\n    pwVar2[uVar3] = L'\0';\n  }\n  return param_1;\n}" (sized_type_specifier "long" long) (pointer_declarator "* thunk_FUN_00356c60(long *param_1,wchar_t *param_2,ulong param_3)" * (function_declarator "thunk_FUN_00356c60(long *param_1,wchar_t *param_2,ulong param_3)" identifier (parameter_list "(long *param_1,wchar_t *param_2,ulong param_3)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "ulong param_3" type_identifier identifier) )))) (compound_statement "{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  ulong uVar3;\n  long lVar4;\n  \n  if (param_3 == 0) {\n    return param_1;\n  }\n  pwVar2 = (wchar_t *)*param_1;\n  if (0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3) {\n                    /* WARNING: Subroutine does not return */\n    FUN_003195a0("basic_string::append");\n  }\n  uVar3 = *(long *)(pwVar2 + -6) + param_3;\n  if ((*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }\n    FUN_003569f0(param_1,uVar3);\n    pwVar2 = (wchar_t *)*param_1;\n  }\n  pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\njoined_r0x00356d20:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = (wchar_t *)*param_1;\n  }\n  if (pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8) {\n    pwVar2[-2] = L'\0';\n    *(ulong *)(pwVar2 + -6) = uVar3;\n    pwVar2[uVar3] = L'\0';\n  }\n  return param_1;\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "wchar_t *pwVar2;" type_identifier (pointer_declarator "*pwVar2" * identifier) ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) 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 "pwVar2 = (wchar_t *)*param_1;" (assignment_expression "pwVar2 = (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 (0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3) {\n                    /* WARNING: Subroutine does not return */\n    FUN_003195a0("basic_string::append");\n  }" if (parenthesized_expression "(0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3)" ( (binary_expression "0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3" (binary_expression "0xffffffffffffffeU - *(long *)(pwVar2 + -6)" number_literal - (pointer_expression "*(long *)(pwVar2 + -6)" * (cast_expression "(long *)(pwVar2 + -6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -6)" ( (binary_expression "pwVar2 + -6" identifier + number_literal) ))))) < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_003195a0("basic_string::append");\n  }" { comment (expression_statement "FUN_003195a0("basic_string::append");" (call_expression "FUN_003195a0("basic_string::append")" identifier (argument_list "("basic_string::append")" ( (string_literal ""basic_string::append"" " string_content ") ))) ;) })) (expression_statement "uVar3 = *(long *)(pwVar2 + -6) + param_3;" (assignment_expression "uVar3 = *(long *)(pwVar2 + -6) + param_3" identifier = (binary_expression "*(long *)(pwVar2 + -6) + param_3" (pointer_expression "*(long *)(pwVar2 + -6)" * (cast_expression "(long *)(pwVar2 + -6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -6)" ( (binary_expression "pwVar2 + -6" identifier + number_literal) )))) + identifier)) ;) (if_statement "if ((*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }\n    FUN_003569f0(param_1,uVar3);\n    pwVar2 = (wchar_t *)*param_1;\n  }" if (parenthesized_expression "((*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1))" ( (binary_expression "(*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)" (parenthesized_expression "(*(ulong *)(pwVar2 + -4) < uVar3)" ( (binary_expression "*(ulong *)(pwVar2 + -4) < uVar3" (pointer_expression "*(ulong *)(pwVar2 + -4)" * (cast_expression "(ulong *)(pwVar2 + -4)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -4)" ( (binary_expression "pwVar2 + -4" identifier + number_literal) )))) < identifier) )) || (parenthesized_expression "(pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)" ( (comma_expression "pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1" (assignment_expression "pwVar1 = pwVar2 + -2" identifier = (binary_expression "pwVar2 + -2" identifier + number_literal)) , (comma_expression "pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1" (assignment_expression "pwVar2 = (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 ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }\n    FUN_003569f0(param_1,uVar3);\n    pwVar2 = (wchar_t *)*param_1;\n  }" { (if_statement "if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }" if (parenthesized_expression "((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6)))" ( (binary_expression "(pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))" (parenthesized_expression "(pwVar2 <= param_2)" ( (binary_expression "pwVar2 <= param_2" identifier <= identifier) )) && (parenthesized_expression "(param_2 <= pwVar2 + *(long *)(pwVar2 + -6))" ( (binary_expression "param_2 <= pwVar2 + *(long *)(pwVar2 + -6)" identifier <= (binary_expression "pwVar2 + *(long *)(pwVar2 + -6)" identifier + (pointer_expression "*(long *)(pwVar2 + -6)" * (cast_expression "(long *)(pwVar2 + -6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -6)" ( (binary_expression "pwVar2 + -6" identifier + number_literal) )))))) ))) )) (compound_statement "{\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }" { (expression_statement "lVar4 = (long)param_2 - (long)pwVar2;" (assignment_expression "lVar4 = (long)param_2 - (long)pwVar2" identifier = (binary_expression "(long)param_2 - (long)pwVar2" (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)pwVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (expression_statement "FUN_003569f0(param_1,uVar3);" (call_expression "FUN_003569f0(param_1,uVar3)" identifier (argument_list "(param_1,uVar3)" ( identifier , identifier ))) ;) (expression_statement "pwVar2 = (wchar_t *)*param_1;" (assignment_expression "pwVar2 = (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 *)(lVar4 + (long)pwVar2);" (assignment_expression "param_2 = (wchar_t *)(lVar4 + (long)pwVar2)" identifier = (cast_expression "(wchar_t *)(lVar4 + (long)pwVar2)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar4 + (long)pwVar2)" ( (binary_expression "lVar4 + (long)pwVar2" identifier + (cast_expression "(long)pwVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )))) ;) (expression_statement "pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);" (assignment_expression "pwVar1 = pwVar2 + *(long *)(pwVar2 + -6)" identifier = (binary_expression "pwVar2 + *(long *)(pwVar2 + -6)" identifier + (pointer_expression "*(long *)(pwVar2 + -6)" * (cast_expression "(long *)(pwVar2 + -6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -6)" ( (binary_expression "pwVar2 + -6" identifier + number_literal) )))))) ;) (goto_statement "goto joined_r0x00356d20;" goto statement_identifier ;) })) (expression_statement "FUN_003569f0(param_1,uVar3);" (call_expression "FUN_003569f0(param_1,uVar3)" identifier (argument_list "(param_1,uVar3)" ( identifier , identifier ))) ;) (expression_statement "pwVar2 = (wchar_t *)*param_1;" (assignment_expression "pwVar2 = (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 = pwVar2 + *(long *)(pwVar2 + -6);" (assignment_expression "pwVar1 = pwVar2 + *(long *)(pwVar2 + -6)" identifier = (binary_expression "pwVar2 + *(long *)(pwVar2 + -6)" identifier + (pointer_expression "*(long *)(pwVar2 + -6)" * (cast_expression "(long *)(pwVar2 + -6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -6)" ( (binary_expression "pwVar2 + -6" identifier + number_literal) )))))) ;) (labeled_statement "joined_r0x00356d20:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = (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    pwVar2 = (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    pwVar2 = (wchar_t *)*param_1;\n  }" else (compound_statement "{\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = (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 "pwVar2 = (wchar_t *)*param_1;" (assignment_expression "pwVar2 = (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 (pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8) {\n    pwVar2[-2] = L'\0';\n    *(ulong *)(pwVar2 + -6) = uVar3;\n    pwVar2[uVar3] = L'\0';\n  }" if (parenthesized_expression "(pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8)" ( (binary_expression "pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8" (binary_expression "pwVar2 + -6" identifier + number_literal) != (cast_expression "(wchar_t *)PTR_DAT_0043dcd8" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    pwVar2[-2] = L'\0';\n    *(ulong *)(pwVar2 + -6) = uVar3;\n    pwVar2[uVar3] = L'\0';\n  }" { (expression_statement "pwVar2[-2] = L'\0';" (assignment_expression "pwVar2[-2] = L'\0'" (subscript_expression "pwVar2[-2]" identifier [ number_literal ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (expression_statement "*(ulong *)(pwVar2 + -6) = uVar3;" (assignment_expression "*(ulong *)(pwVar2 + -6) = uVar3" (pointer_expression "*(ulong *)(pwVar2 + -6)" * (cast_expression "(ulong *)(pwVar2 + -6)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -6)" ( (binary_expression "pwVar2 + -6" identifier + number_literal) )))) = identifier) ;) (expression_statement "pwVar2[uVar3] = L'\0';" (assignment_expression "pwVar2[uVar3] = L'\0'" (subscript_expression "pwVar2[uVar3]" identifier [ identifier ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) })) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* std::wstring::TEMPNAMEPLACEHOLDERVALUE(std::initializer_list<wchar_t>) */\n\nwstring * __thiscall std::wstring::operator+=(wstring *this,wchar_t *param_2,ulong param_3)\n\n{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  ulong uVar3;\n  long lVar4;\n  \n  if (param_3 == 0) {\n    return this;\n  }\n  pwVar2 = *(wchar_t **)this;\n  if (0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::append");\n  }\n  uVar3 = *(long *)(pwVar2 + -6) + param_3;\n  if ((*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = *(wchar_t **)this, L'\0' < *pwVar1)) {\n    if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      reserve(this,uVar3);\n      pwVar2 = *(wchar_t **)this;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }\n    reserve(this,uVar3);\n    pwVar2 = *(wchar_t **)this;\n  }\n  pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\njoined_r0x00356d20:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = *(wchar_t **)this;\n  }\n  if (pwVar2 + -6 != (wchar_t *)PTR__S_empty_rep_storage_0043dcd8) {\n    pwVar2[-2] = L'\0';\n    *(ulong *)(pwVar2 + -6) = uVar3;\n    pwVar2[uVar3] = L'\0';\n  }\n  return this;\n}\n\n" comment (ERROR "wstring * __thiscall std::wstring::operator+=(wstring *this,wchar_t *param_2,ulong param_3)" (binary_expression "wstring * __thiscall std::wstring::operator+=(wstring *this,wchar_t *param_2,ulong param_3)" identifier * (assignment_expression "__thiscall std::wstring::operator+=(wstring *this,wchar_t *param_2,ulong param_3)" identifier (ERROR "std::wstring::operator" identifier : : identifier : : identifier) += (parenthesized_expression "(wstring *this,wchar_t *param_2,ulong param_3)" ( (comma_expression "wstring *this,wchar_t *param_2,ulong param_3" (binary_expression "wstring *this" identifier * identifier) , (comma_expression "wchar_t *param_2,ulong param_3" (binary_expression "wchar_t *param_2" identifier * identifier) , (ERROR "ulong" identifier) identifier)) ))))) (compound_statement "{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  ulong uVar3;\n  long lVar4;\n  \n  if (param_3 == 0) {\n    return this;\n  }\n  pwVar2 = *(wchar_t **)this;\n  if (0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::append");\n  }\n  uVar3 = *(long *)(pwVar2 + -6) + param_3;\n  if ((*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = *(wchar_t **)this, L'\0' < *pwVar1)) {\n    if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      reserve(this,uVar3);\n      pwVar2 = *(wchar_t **)this;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }\n    reserve(this,uVar3);\n    pwVar2 = *(wchar_t **)this;\n  }\n  pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\njoined_r0x00356d20:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = *(wchar_t **)this;\n  }\n  if (pwVar2 + -6 != (wchar_t *)PTR__S_empty_rep_storage_0043dcd8) {\n    pwVar2[-2] = L'\0';\n    *(ulong *)(pwVar2 + -6) = uVar3;\n    pwVar2[uVar3] = L'\0';\n  }\n  return this;\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "wchar_t *pwVar2;" type_identifier (pointer_declarator "*pwVar2" * identifier) ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (if_statement "if (param_3 == 0) {\n    return this;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    return this;\n  }" { (return_statement "return this;" return identifier ;) })) (expression_statement "pwVar2 = *(wchar_t **)this;" (assignment_expression "pwVar2 = *(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 (0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::append");\n  }" if (parenthesized_expression "(0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3)" ( (binary_expression "0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3" (binary_expression "0xffffffffffffffeU - *(long *)(pwVar2 + -6)" number_literal - (pointer_expression "*(long *)(pwVar2 + -6)" * (cast_expression "(long *)(pwVar2 + -6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -6)" ( (binary_expression "pwVar2 + -6" 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 "uVar3 = *(long *)(pwVar2 + -6) + param_3;" (assignment_expression "uVar3 = *(long *)(pwVar2 + -6) + param_3" identifier = (binary_expression "*(long *)(pwVar2 + -6) + param_3" (pointer_expression "*(long *)(pwVar2 + -6)" * (cast_expression "(long *)(pwVar2 + -6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -6)" ( (binary_expression "pwVar2 + -6" identifier + number_literal) )))) + identifier)) ;) (if_statement "if ((*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = *(wchar_t **)this, L'\0' < *pwVar1)) {\n    if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      reserve(this,uVar3);\n      pwVar2 = *(wchar_t **)this;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }\n    reserve(this,uVar3);\n    pwVar2 = *(wchar_t **)this;\n  }" if (parenthesized_expression "((*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = *(wchar_t **)this, L'\0' < *pwVar1))" ( (binary_expression "(*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = *(wchar_t **)this, L'\0' < *pwVar1)" (parenthesized_expression "(*(ulong *)(pwVar2 + -4) < uVar3)" ( (binary_expression "*(ulong *)(pwVar2 + -4) < uVar3" (pointer_expression "*(ulong *)(pwVar2 + -4)" * (cast_expression "(ulong *)(pwVar2 + -4)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -4)" ( (binary_expression "pwVar2 + -4" identifier + number_literal) )))) < identifier) )) || (parenthesized_expression "(pwVar1 = pwVar2 + -2, pwVar2 = *(wchar_t **)this, L'\0' < *pwVar1)" ( (comma_expression "pwVar1 = pwVar2 + -2, pwVar2 = *(wchar_t **)this, L'\0' < *pwVar1" (assignment_expression "pwVar1 = pwVar2 + -2" identifier = (binary_expression "pwVar2 + -2" identifier + number_literal)) , (comma_expression "pwVar2 = *(wchar_t **)this, L'\0' < *pwVar1" (assignment_expression "pwVar2 = *(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 ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      reserve(this,uVar3);\n      pwVar2 = *(wchar_t **)this;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }\n    reserve(this,uVar3);\n    pwVar2 = *(wchar_t **)this;\n  }" { (if_statement "if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      reserve(this,uVar3);\n      pwVar2 = *(wchar_t **)this;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }" if (parenthesized_expression "((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6)))" ( (binary_expression "(pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))" (parenthesized_expression "(pwVar2 <= param_2)" ( (binary_expression "pwVar2 <= param_2" identifier <= identifier) )) && (parenthesized_expression "(param_2 <= pwVar2 + *(long *)(pwVar2 + -6))" ( (binary_expression "param_2 <= pwVar2 + *(long *)(pwVar2 + -6)" identifier <= (binary_expression "pwVar2 + *(long *)(pwVar2 + -6)" identifier + (pointer_expression "*(long *)(pwVar2 + -6)" * (cast_expression "(long *)(pwVar2 + -6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -6)" ( (binary_expression "pwVar2 + -6" identifier + number_literal) )))))) ))) )) (compound_statement "{\n      lVar4 = (long)param_2 - (long)pwVar2;\n      reserve(this,uVar3);\n      pwVar2 = *(wchar_t **)this;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }" { (expression_statement "lVar4 = (long)param_2 - (long)pwVar2;" (assignment_expression "lVar4 = (long)param_2 - (long)pwVar2" identifier = (binary_expression "(long)param_2 - (long)pwVar2" (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)pwVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (expression_statement "reserve(this,uVar3);" (call_expression "reserve(this,uVar3)" identifier (argument_list "(this,uVar3)" ( identifier , identifier ))) ;) (expression_statement "pwVar2 = *(wchar_t **)this;" (assignment_expression "pwVar2 = *(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_2 = (wchar_t *)(lVar4 + (long)pwVar2);" (assignment_expression "param_2 = (wchar_t *)(lVar4 + (long)pwVar2)" identifier = (cast_expression "(wchar_t *)(lVar4 + (long)pwVar2)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar4 + (long)pwVar2)" ( (binary_expression "lVar4 + (long)pwVar2" identifier + (cast_expression "(long)pwVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )))) ;) (expression_statement "pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);" (assignment_expression "pwVar1 = pwVar2 + *(long *)(pwVar2 + -6)" identifier = (binary_expression "pwVar2 + *(long *)(pwVar2 + -6)" identifier + (pointer_expression "*(long *)(pwVar2 + -6)" * (cast_expression "(long *)(pwVar2 + -6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -6)" ( (binary_expression "pwVar2 + -6" identifier + number_literal) )))))) ;) (goto_statement "goto joined_r0x00356d20;" goto statement_identifier ;) })) (expression_statement "reserve(this,uVar3);" (call_expression "reserve(this,uVar3)" identifier (argument_list "(this,uVar3)" ( identifier , identifier ))) ;) (expression_statement "pwVar2 = *(wchar_t **)this;" (assignment_expression "pwVar2 = *(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 = pwVar2 + *(long *)(pwVar2 + -6);" (assignment_expression "pwVar1 = pwVar2 + *(long *)(pwVar2 + -6)" identifier = (binary_expression "pwVar2 + *(long *)(pwVar2 + -6)" identifier + (pointer_expression "*(long *)(pwVar2 + -6)" * (cast_expression "(long *)(pwVar2 + -6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -6)" ( (binary_expression "pwVar2 + -6" identifier + number_literal) )))))) ;) (labeled_statement "joined_r0x00356d20:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = *(wchar_t **)this;\n  }" statement_identifier : (if_statement "if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = *(wchar_t **)this;\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    pwVar2 = *(wchar_t **)this;\n  }" else (compound_statement "{\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = *(wchar_t **)this;\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 "pwVar2 = *(wchar_t **)this;" (assignment_expression "pwVar2 = *(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 (pwVar2 + -6 != (wchar_t *)PTR__S_empty_rep_storage_0043dcd8) {\n    pwVar2[-2] = L'\0';\n    *(ulong *)(pwVar2 + -6) = uVar3;\n    pwVar2[uVar3] = L'\0';\n  }" if (parenthesized_expression "(pwVar2 + -6 != (wchar_t *)PTR__S_empty_rep_storage_0043dcd8)" ( (binary_expression "pwVar2 + -6 != (wchar_t *)PTR__S_empty_rep_storage_0043dcd8" (binary_expression "pwVar2 + -6" identifier + number_literal) != (cast_expression "(wchar_t *)PTR__S_empty_rep_storage_0043dcd8" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    pwVar2[-2] = L'\0';\n    *(ulong *)(pwVar2 + -6) = uVar3;\n    pwVar2[uVar3] = L'\0';\n  }" { (expression_statement "pwVar2[-2] = L'\0';" (assignment_expression "pwVar2[-2] = L'\0'" (subscript_expression "pwVar2[-2]" identifier [ number_literal ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (expression_statement "*(ulong *)(pwVar2 + -6) = uVar3;" (assignment_expression "*(ulong *)(pwVar2 + -6) = uVar3" (pointer_expression "*(ulong *)(pwVar2 + -6)" * (cast_expression "(ulong *)(pwVar2 + -6)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -6)" ( (binary_expression "pwVar2 + -6" identifier + number_literal) )))) = identifier) ;) (expression_statement "pwVar2[uVar3] = L'\0';" (assignment_expression "pwVar2[uVar3] = L'\0'" (subscript_expression "pwVar2[uVar3]" identifier [ identifier ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) })) (return_statement "return this;" return identifier ;) }))
(translation_unit "long * thunk_FUN_00356c60(long *param_1,wchar_t *param_2,ulong param_3)\n\n{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  ulong uVar3;\n  long lVar4;\n  \n  if (param_3 == 0) {\n    return param_1;\n  }\n  pwVar2 = (wchar_t *)*param_1;\n  if (0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3) {\n                    \n    FUN_003195a0("basic_string::append");\n  }\n  uVar3 = *(long *)(pwVar2 + -6) + param_3;\n  if ((*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }\n    FUN_003569f0(param_1,uVar3);\n    pwVar2 = (wchar_t *)*param_1;\n  }\n  pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\njoined_r0x00356d20:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = (wchar_t *)*param_1;\n  }\n  if (pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8) {\n    pwVar2[-2] = L'\0';\n    *(ulong *)(pwVar2 + -6) = uVar3;\n    pwVar2[uVar3] = L'\0';\n  }\n  return param_1;\n}\n\n" (function_definition "long * thunk_FUN_00356c60(long *param_1,wchar_t *param_2,ulong param_3)\n\n{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  ulong uVar3;\n  long lVar4;\n  \n  if (param_3 == 0) {\n    return param_1;\n  }\n  pwVar2 = (wchar_t *)*param_1;\n  if (0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3) {\n                    \n    FUN_003195a0("basic_string::append");\n  }\n  uVar3 = *(long *)(pwVar2 + -6) + param_3;\n  if ((*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }\n    FUN_003569f0(param_1,uVar3);\n    pwVar2 = (wchar_t *)*param_1;\n  }\n  pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\njoined_r0x00356d20:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = (wchar_t *)*param_1;\n  }\n  if (pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8) {\n    pwVar2[-2] = L'\0';\n    *(ulong *)(pwVar2 + -6) = uVar3;\n    pwVar2[uVar3] = L'\0';\n  }\n  return param_1;\n}" (sized_type_specifier "long" long) (pointer_declarator "* thunk_FUN_00356c60(long *param_1,wchar_t *param_2,ulong param_3)" * (function_declarator "thunk_FUN_00356c60(long *param_1,wchar_t *param_2,ulong param_3)" identifier (parameter_list "(long *param_1,wchar_t *param_2,ulong param_3)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "ulong param_3" type_identifier identifier) )))) (compound_statement "{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  ulong uVar3;\n  long lVar4;\n  \n  if (param_3 == 0) {\n    return param_1;\n  }\n  pwVar2 = (wchar_t *)*param_1;\n  if (0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3) {\n                    \n    FUN_003195a0("basic_string::append");\n  }\n  uVar3 = *(long *)(pwVar2 + -6) + param_3;\n  if ((*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }\n    FUN_003569f0(param_1,uVar3);\n    pwVar2 = (wchar_t *)*param_1;\n  }\n  pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\njoined_r0x00356d20:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = (wchar_t *)*param_1;\n  }\n  if (pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8) {\n    pwVar2[-2] = L'\0';\n    *(ulong *)(pwVar2 + -6) = uVar3;\n    pwVar2[uVar3] = L'\0';\n  }\n  return param_1;\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "wchar_t *pwVar2;" type_identifier (pointer_declarator "*pwVar2" * identifier) ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) 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 "pwVar2 = (wchar_t *)*param_1;" (assignment_expression "pwVar2 = (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 (0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3) {\n                    \n    FUN_003195a0("basic_string::append");\n  }" if (parenthesized_expression "(0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3)" ( (binary_expression "0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3" (binary_expression "0xffffffffffffffeU - *(long *)(pwVar2 + -6)" number_literal - (pointer_expression "*(long *)(pwVar2 + -6)" * (cast_expression "(long *)(pwVar2 + -6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -6)" ( (binary_expression "pwVar2 + -6" identifier + number_literal) ))))) < identifier) )) (compound_statement "{\n                    \n    FUN_003195a0("basic_string::append");\n  }" { (expression_statement "FUN_003195a0("basic_string::append");" (call_expression "FUN_003195a0("basic_string::append")" identifier (argument_list "("basic_string::append")" ( (string_literal ""basic_string::append"" " string_content ") ))) ;) })) (expression_statement "uVar3 = *(long *)(pwVar2 + -6) + param_3;" (assignment_expression "uVar3 = *(long *)(pwVar2 + -6) + param_3" identifier = (binary_expression "*(long *)(pwVar2 + -6) + param_3" (pointer_expression "*(long *)(pwVar2 + -6)" * (cast_expression "(long *)(pwVar2 + -6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -6)" ( (binary_expression "pwVar2 + -6" identifier + number_literal) )))) + identifier)) ;) (if_statement "if ((*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }\n    FUN_003569f0(param_1,uVar3);\n    pwVar2 = (wchar_t *)*param_1;\n  }" if (parenthesized_expression "((*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1))" ( (binary_expression "(*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)" (parenthesized_expression "(*(ulong *)(pwVar2 + -4) < uVar3)" ( (binary_expression "*(ulong *)(pwVar2 + -4) < uVar3" (pointer_expression "*(ulong *)(pwVar2 + -4)" * (cast_expression "(ulong *)(pwVar2 + -4)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -4)" ( (binary_expression "pwVar2 + -4" identifier + number_literal) )))) < identifier) )) || (parenthesized_expression "(pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)" ( (comma_expression "pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1" (assignment_expression "pwVar1 = pwVar2 + -2" identifier = (binary_expression "pwVar2 + -2" identifier + number_literal)) , (comma_expression "pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1" (assignment_expression "pwVar2 = (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 ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }\n    FUN_003569f0(param_1,uVar3);\n    pwVar2 = (wchar_t *)*param_1;\n  }" { (if_statement "if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }" if (parenthesized_expression "((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6)))" ( (binary_expression "(pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))" (parenthesized_expression "(pwVar2 <= param_2)" ( (binary_expression "pwVar2 <= param_2" identifier <= identifier) )) && (parenthesized_expression "(param_2 <= pwVar2 + *(long *)(pwVar2 + -6))" ( (binary_expression "param_2 <= pwVar2 + *(long *)(pwVar2 + -6)" identifier <= (binary_expression "pwVar2 + *(long *)(pwVar2 + -6)" identifier + (pointer_expression "*(long *)(pwVar2 + -6)" * (cast_expression "(long *)(pwVar2 + -6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -6)" ( (binary_expression "pwVar2 + -6" identifier + number_literal) )))))) ))) )) (compound_statement "{\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }" { (expression_statement "lVar4 = (long)param_2 - (long)pwVar2;" (assignment_expression "lVar4 = (long)param_2 - (long)pwVar2" identifier = (binary_expression "(long)param_2 - (long)pwVar2" (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)pwVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (expression_statement "FUN_003569f0(param_1,uVar3);" (call_expression "FUN_003569f0(param_1,uVar3)" identifier (argument_list "(param_1,uVar3)" ( identifier , identifier ))) ;) (expression_statement "pwVar2 = (wchar_t *)*param_1;" (assignment_expression "pwVar2 = (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 *)(lVar4 + (long)pwVar2);" (assignment_expression "param_2 = (wchar_t *)(lVar4 + (long)pwVar2)" identifier = (cast_expression "(wchar_t *)(lVar4 + (long)pwVar2)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar4 + (long)pwVar2)" ( (binary_expression "lVar4 + (long)pwVar2" identifier + (cast_expression "(long)pwVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) )))) ;) (expression_statement "pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);" (assignment_expression "pwVar1 = pwVar2 + *(long *)(pwVar2 + -6)" identifier = (binary_expression "pwVar2 + *(long *)(pwVar2 + -6)" identifier + (pointer_expression "*(long *)(pwVar2 + -6)" * (cast_expression "(long *)(pwVar2 + -6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -6)" ( (binary_expression "pwVar2 + -6" identifier + number_literal) )))))) ;) (goto_statement "goto joined_r0x00356d20;" goto statement_identifier ;) })) (expression_statement "FUN_003569f0(param_1,uVar3);" (call_expression "FUN_003569f0(param_1,uVar3)" identifier (argument_list "(param_1,uVar3)" ( identifier , identifier ))) ;) (expression_statement "pwVar2 = (wchar_t *)*param_1;" (assignment_expression "pwVar2 = (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 = pwVar2 + *(long *)(pwVar2 + -6);" (assignment_expression "pwVar1 = pwVar2 + *(long *)(pwVar2 + -6)" identifier = (binary_expression "pwVar2 + *(long *)(pwVar2 + -6)" identifier + (pointer_expression "*(long *)(pwVar2 + -6)" * (cast_expression "(long *)(pwVar2 + -6)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -6)" ( (binary_expression "pwVar2 + -6" identifier + number_literal) )))))) ;) (labeled_statement "joined_r0x00356d20:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = (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    pwVar2 = (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    pwVar2 = (wchar_t *)*param_1;\n  }" else (compound_statement "{\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = (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 "pwVar2 = (wchar_t *)*param_1;" (assignment_expression "pwVar2 = (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 (pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8) {\n    pwVar2[-2] = L'\0';\n    *(ulong *)(pwVar2 + -6) = uVar3;\n    pwVar2[uVar3] = L'\0';\n  }" if (parenthesized_expression "(pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8)" ( (binary_expression "pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8" (binary_expression "pwVar2 + -6" identifier + number_literal) != (cast_expression "(wchar_t *)PTR_DAT_0043dcd8" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    pwVar2[-2] = L'\0';\n    *(ulong *)(pwVar2 + -6) = uVar3;\n    pwVar2[uVar3] = L'\0';\n  }" { (expression_statement "pwVar2[-2] = L'\0';" (assignment_expression "pwVar2[-2] = L'\0'" (subscript_expression "pwVar2[-2]" identifier [ number_literal ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (expression_statement "*(ulong *)(pwVar2 + -6) = uVar3;" (assignment_expression "*(ulong *)(pwVar2 + -6) = uVar3" (pointer_expression "*(ulong *)(pwVar2 + -6)" * (cast_expression "(ulong *)(pwVar2 + -6)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + -6)" ( (binary_expression "pwVar2 + -6" identifier + number_literal) )))) = identifier) ;) (expression_statement "pwVar2[uVar3] = L'\0';" (assignment_expression "pwVar2[uVar3] = L'\0'" (subscript_expression "pwVar2[uVar3]" identifier [ identifier ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) })) (return_statement "return param_1;" return identifier ;) })))
(translation_unit (function_definition (sized_type_specifier long) (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) 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 (binary_expression LIT - (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < 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 + (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) - (cast_expression ( (type_descriptor (sized_type_specifier long)) ) 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 (sized_type_specifier long)) ) IDENT)) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_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 + (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (char_literal L' escape_sequence ')) ;) })) (return_statement return IDENT ;) })))
(function_definition "long * thunk_FUN_00356c60(long *param_1,wchar_t *param_2,ulong param_3)\n\n{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  ulong uVar3;\n  long lVar4;\n  \n  if (param_3 == 0) {\n    return param_1;\n  }\n  pwVar2 = (wchar_t *)*param_1;\n  if (0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3) {\n                    \n    FUN_003195a0("basic_string::append");\n  }\n  uVar3 = *(long *)(pwVar2 + -6) + param_3;\n  if ((*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }\n    FUN_003569f0(param_1,uVar3);\n    pwVar2 = (wchar_t *)*param_1;\n  }\n  pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\njoined_r0x00356d20:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = (wchar_t *)*param_1;\n  }\n  if (pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8) {\n    pwVar2[-2] = L'\0';\n    *(ulong *)(pwVar2 + -6) = uVar3;\n    pwVar2[uVar3] = L'\0';\n  }\n  return param_1;\n}" (sized_type_specifier "long" (long "long")) (pointer_declarator "* thunk_FUN_00356c60(long *param_1,wchar_t *param_2,ulong param_3)" (* "*") (function_declarator "thunk_FUN_00356c60(long *param_1,wchar_t *param_2,ulong param_3)" (identifier "thunk_FUN_00356c60") (parameter_list "(long *param_1,wchar_t *param_2,ulong param_3)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (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 "ulong param_3" (type_identifier "ulong") (identifier "param_3")) () ")")))) (compound_statement "{\n  wchar_t *pwVar1;\n  wchar_t *pwVar2;\n  ulong uVar3;\n  long lVar4;\n  \n  if (param_3 == 0) {\n    return param_1;\n  }\n  pwVar2 = (wchar_t *)*param_1;\n  if (0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3) {\n                    \n    FUN_003195a0("basic_string::append");\n  }\n  uVar3 = *(long *)(pwVar2 + -6) + param_3;\n  if ((*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }\n    FUN_003569f0(param_1,uVar3);\n    pwVar2 = (wchar_t *)*param_1;\n  }\n  pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\njoined_r0x00356d20:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = (wchar_t *)*param_1;\n  }\n  if (pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8) {\n    pwVar2[-2] = L'\0';\n    *(ulong *)(pwVar2 + -6) = uVar3;\n    pwVar2[uVar3] = L'\0';\n  }\n  return param_1;\n}" ({ "{") (declaration "wchar_t *pwVar1;" (type_identifier "wchar_t") (pointer_declarator "*pwVar1" (* "*") (identifier "pwVar1")) (; ";")) (declaration "wchar_t *pwVar2;" (type_identifier "wchar_t") (pointer_declarator "*pwVar2" (* "*") (identifier "pwVar2")) (; ";")) (declaration "ulong uVar3;" (type_identifier "ulong") (identifier "uVar3") (; ";")) (declaration "long lVar4;" (sized_type_specifier "long" (long "long")) (identifier "lVar4") (; ";")) (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 "pwVar2 = (wchar_t *)*param_1;" (assignment_expression "pwVar2 = (wchar_t *)*param_1" (identifier "pwVar2") (= "=") (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 (0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3) {\n                    \n    FUN_003195a0("basic_string::append");\n  }" (if "if") (parenthesized_expression "(0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3)" (( "(") (binary_expression "0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3" (binary_expression "0xffffffffffffffeU - *(long *)(pwVar2 + -6)" (number_literal "0xffffffffffffffeU") (- "-") (pointer_expression "*(long *)(pwVar2 + -6)" (* "*") (cast_expression "(long *)(pwVar2 + -6)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pwVar2 + -6)" (( "(") (binary_expression "pwVar2 + -6" (identifier "pwVar2") (+ "+") (number_literal "-6")) () ")"))))) (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n                    \n    FUN_003195a0("basic_string::append");\n  }" ({ "{") (expression_statement "FUN_003195a0("basic_string::append");" (call_expression "FUN_003195a0("basic_string::append")" (identifier "FUN_003195a0") (argument_list "("basic_string::append")" (( "(") (string_literal ""basic_string::append"" (" """) (string_content "basic_string::append") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "uVar3 = *(long *)(pwVar2 + -6) + param_3;" (assignment_expression "uVar3 = *(long *)(pwVar2 + -6) + param_3" (identifier "uVar3") (= "=") (binary_expression "*(long *)(pwVar2 + -6) + param_3" (pointer_expression "*(long *)(pwVar2 + -6)" (* "*") (cast_expression "(long *)(pwVar2 + -6)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pwVar2 + -6)" (( "(") (binary_expression "pwVar2 + -6" (identifier "pwVar2") (+ "+") (number_literal "-6")) () ")")))) (+ "+") (identifier "param_3"))) (; ";")) (if_statement "if ((*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {\n    if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }\n    FUN_003569f0(param_1,uVar3);\n    pwVar2 = (wchar_t *)*param_1;\n  }" (if "if") (parenthesized_expression "((*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1))" (( "(") (binary_expression "(*(ulong *)(pwVar2 + -4) < uVar3) ||\n     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)" (parenthesized_expression "(*(ulong *)(pwVar2 + -4) < uVar3)" (( "(") (binary_expression "*(ulong *)(pwVar2 + -4) < uVar3" (pointer_expression "*(ulong *)(pwVar2 + -4)" (* "*") (cast_expression "(ulong *)(pwVar2 + -4)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pwVar2 + -4)" (( "(") (binary_expression "pwVar2 + -4" (identifier "pwVar2") (+ "+") (number_literal "-4")) () ")")))) (< "<") (identifier "uVar3")) () ")")) (|| "||") (parenthesized_expression "(pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)" (( "(") (comma_expression "pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1" (assignment_expression "pwVar1 = pwVar2 + -2" (identifier "pwVar1") (= "=") (binary_expression "pwVar2 + -2" (identifier "pwVar2") (+ "+") (number_literal "-2"))) (, ",") (comma_expression "pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1" (assignment_expression "pwVar2 = (wchar_t *)*param_1" (identifier "pwVar2") (= "=") (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 ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }\n    FUN_003569f0(param_1,uVar3);\n    pwVar2 = (wchar_t *)*param_1;\n  }" ({ "{") (if_statement "if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }" (if "if") (parenthesized_expression "((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6)))" (( "(") (binary_expression "(pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))" (parenthesized_expression "(pwVar2 <= param_2)" (( "(") (binary_expression "pwVar2 <= param_2" (identifier "pwVar2") (<= "<=") (identifier "param_2")) () ")")) (&& "&&") (parenthesized_expression "(param_2 <= pwVar2 + *(long *)(pwVar2 + -6))" (( "(") (binary_expression "param_2 <= pwVar2 + *(long *)(pwVar2 + -6)" (identifier "param_2") (<= "<=") (binary_expression "pwVar2 + *(long *)(pwVar2 + -6)" (identifier "pwVar2") (+ "+") (pointer_expression "*(long *)(pwVar2 + -6)" (* "*") (cast_expression "(long *)(pwVar2 + -6)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pwVar2 + -6)" (( "(") (binary_expression "pwVar2 + -6" (identifier "pwVar2") (+ "+") (number_literal "-6")) () ")")))))) () ")"))) () ")")) (compound_statement "{\n      lVar4 = (long)param_2 - (long)pwVar2;\n      FUN_003569f0(param_1,uVar3);\n      pwVar2 = (wchar_t *)*param_1;\n      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);\n      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);\n      goto joined_r0x00356d20;\n    }" ({ "{") (expression_statement "lVar4 = (long)param_2 - (long)pwVar2;" (assignment_expression "lVar4 = (long)param_2 - (long)pwVar2" (identifier "lVar4") (= "=") (binary_expression "(long)param_2 - (long)pwVar2" (cast_expression "(long)param_2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_2")) (- "-") (cast_expression "(long)pwVar2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "pwVar2")))) (; ";")) (expression_statement "FUN_003569f0(param_1,uVar3);" (call_expression "FUN_003569f0(param_1,uVar3)" (identifier "FUN_003569f0") (argument_list "(param_1,uVar3)" (( "(") (identifier "param_1") (, ",") (identifier "uVar3") () ")"))) (; ";")) (expression_statement "pwVar2 = (wchar_t *)*param_1;" (assignment_expression "pwVar2 = (wchar_t *)*param_1" (identifier "pwVar2") (= "=") (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 *)(lVar4 + (long)pwVar2);" (assignment_expression "param_2 = (wchar_t *)(lVar4 + (long)pwVar2)" (identifier "param_2") (= "=") (cast_expression "(wchar_t *)(lVar4 + (long)pwVar2)" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar4 + (long)pwVar2)" (( "(") (binary_expression "lVar4 + (long)pwVar2" (identifier "lVar4") (+ "+") (cast_expression "(long)pwVar2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "pwVar2"))) () ")")))) (; ";")) (expression_statement "pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);" (assignment_expression "pwVar1 = pwVar2 + *(long *)(pwVar2 + -6)" (identifier "pwVar1") (= "=") (binary_expression "pwVar2 + *(long *)(pwVar2 + -6)" (identifier "pwVar2") (+ "+") (pointer_expression "*(long *)(pwVar2 + -6)" (* "*") (cast_expression "(long *)(pwVar2 + -6)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pwVar2 + -6)" (( "(") (binary_expression "pwVar2 + -6" (identifier "pwVar2") (+ "+") (number_literal "-6")) () ")")))))) (; ";")) (goto_statement "goto joined_r0x00356d20;" (goto "goto") (statement_identifier "joined_r0x00356d20") (; ";")) (} "}"))) (expression_statement "FUN_003569f0(param_1,uVar3);" (call_expression "FUN_003569f0(param_1,uVar3)" (identifier "FUN_003569f0") (argument_list "(param_1,uVar3)" (( "(") (identifier "param_1") (, ",") (identifier "uVar3") () ")"))) (; ";")) (expression_statement "pwVar2 = (wchar_t *)*param_1;" (assignment_expression "pwVar2 = (wchar_t *)*param_1" (identifier "pwVar2") (= "=") (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 = pwVar2 + *(long *)(pwVar2 + -6);" (assignment_expression "pwVar1 = pwVar2 + *(long *)(pwVar2 + -6)" (identifier "pwVar1") (= "=") (binary_expression "pwVar2 + *(long *)(pwVar2 + -6)" (identifier "pwVar2") (+ "+") (pointer_expression "*(long *)(pwVar2 + -6)" (* "*") (cast_expression "(long *)(pwVar2 + -6)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pwVar2 + -6)" (( "(") (binary_expression "pwVar2 + -6" (identifier "pwVar2") (+ "+") (number_literal "-6")) () ")")))))) (; ";")) (labeled_statement "joined_r0x00356d20:\n  if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = (wchar_t *)*param_1;\n  }" (statement_identifier "joined_r0x00356d20") (: ":") (if_statement "if (param_3 == 1) {\n    *pwVar1 = *param_2;\n  }\n  else {\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = (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    pwVar2 = (wchar_t *)*param_1;\n  }" (else "else") (compound_statement "{\n    wmemcpy(pwVar1,param_2,param_3);\n    pwVar2 = (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 "pwVar2 = (wchar_t *)*param_1;" (assignment_expression "pwVar2 = (wchar_t *)*param_1" (identifier "pwVar2") (= "=") (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 (pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8) {\n    pwVar2[-2] = L'\0';\n    *(ulong *)(pwVar2 + -6) = uVar3;\n    pwVar2[uVar3] = L'\0';\n  }" (if "if") (parenthesized_expression "(pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8)" (( "(") (binary_expression "pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8" (binary_expression "pwVar2 + -6" (identifier "pwVar2") (+ "+") (number_literal "-6")) (!= "!=") (cast_expression "(wchar_t *)PTR_DAT_0043dcd8" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_DAT_0043dcd8"))) () ")")) (compound_statement "{\n    pwVar2[-2] = L'\0';\n    *(ulong *)(pwVar2 + -6) = uVar3;\n    pwVar2[uVar3] = L'\0';\n  }" ({ "{") (expression_statement "pwVar2[-2] = L'\0';" (assignment_expression "pwVar2[-2] = L'\0'" (subscript_expression "pwVar2[-2]" (identifier "pwVar2") ([ "[") (number_literal "-2") (] "]")) (= "=") (char_literal "L'\0'" (L' "L'") (escape_sequence "\0") (' "'"))) (; ";")) (expression_statement "*(ulong *)(pwVar2 + -6) = uVar3;" (assignment_expression "*(ulong *)(pwVar2 + -6) = uVar3" (pointer_expression "*(ulong *)(pwVar2 + -6)" (* "*") (cast_expression "(ulong *)(pwVar2 + -6)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pwVar2 + -6)" (( "(") (binary_expression "pwVar2 + -6" (identifier "pwVar2") (+ "+") (number_literal "-6")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "pwVar2[uVar3] = L'\0';" (assignment_expression "pwVar2[uVar3] = L'\0'" (subscript_expression "pwVar2[uVar3]" (identifier "pwVar2") ([ "[") (identifier "uVar3") (] "]")) (= "=") (char_literal "L'\0'" (L' "L'") (escape_sequence "\0") (' "'"))) (; ";")) (} "}"))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

/* std::wstring::TEMPNAMEPLACEHOLDERVALUE(std::initializer_list<wchar_t>) */

wstring * __thiscall std::wstring::operator+=(wstring *this,type_1 *var_5,type_2 var_1)

{
  type_1 *pwVar1;
  type_1 *var_2;
  type_2 var_4;
  long var_7;
  
  if (var_1 == 0) {
    return this;
  }
  var_2 = *(type_1 **)this;
  if (0xffffffffffffffeU - *(long *)(var_2 + -6) < var_1) {
                    /* WARNING: Subroutine does not return */
    var_3("basic_string::append");
  }
  var_4 = *(long *)(var_2 + -6) + var_1;
  if ((*(type_2 *)(var_2 + -4) < var_4) ||
     (pwVar1 = var_2 + -2, var_2 = *(type_1 **)this, L'\0' < *pwVar1)) {
    if ((var_2 <= var_5) && (var_5 <= var_2 + *(long *)(var_2 + -6))) {
      var_7 = (long)var_5 - (long)var_2;
      var_6(this,var_4);
      var_2 = *(type_1 **)this;
      var_5 = (type_1 *)(var_7 + (long)var_2);
      pwVar1 = var_2 + *(long *)(var_2 + -6);
      goto joined_r0x00356d20;
    }
    var_6(this,var_4);
    var_2 = *(type_1 **)this;
  }
  pwVar1 = var_2 + *(long *)(var_2 + -6);
joined_r0x00356d20:
  if (var_1 == 1) {
    *pwVar1 = *var_5;
  }
  else {
    var_8(pwVar1,var_5,var_1);
    var_2 = *(type_1 **)this;
  }
  if (var_2 + -6 != (type_1 *)PTR__S_empty_rep_storage_0043dcd8) {
    var_2[-2] = L'\0';
    *(type_2 *)(var_2 + -6) = var_4;
    var_2[var_4] = L'\0';
  }
  return this;
}


(translation_unit (function_definition type: (sized_type_specifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) 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: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) 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: (binary_expression left: (number_literal) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (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: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (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: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) 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: (sized_type_specifier)) value: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (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: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (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: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (identifier)) right: (char_literal (escape_sequence)))))) (return_statement (identifier)))))

long * MASKED(long *param_1,wchar_t *param_2,ulong param_3)

{
  wchar_t *pwVar1;
  wchar_t *pwVar2;
  ulong uVar3;
  long lVar4;
  
  if (param_3 == 0) {
    return param_1;
  }
  pwVar2 = (wchar_t *)*param_1;
  if (0xffffffffffffffeU - *(long *)(pwVar2 + -6) < param_3) {
                    /* WARNING: Subroutine does not return */
    FUN_003195a0("basic_string::append");
  }
  uVar3 = *(long *)(pwVar2 + -6) + param_3;
  if ((*(ulong *)(pwVar2 + -4) < uVar3) ||
     (pwVar1 = pwVar2 + -2, pwVar2 = (wchar_t *)*param_1, L'\0' < *pwVar1)) {
    if ((pwVar2 <= param_2) && (param_2 <= pwVar2 + *(long *)(pwVar2 + -6))) {
      lVar4 = (long)param_2 - (long)pwVar2;
      FUN_003569f0(param_1,uVar3);
      pwVar2 = (wchar_t *)*param_1;
      param_2 = (wchar_t *)(lVar4 + (long)pwVar2);
      pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);
      goto joined_r0x00356d20;
    }
    FUN_003569f0(param_1,uVar3);
    pwVar2 = (wchar_t *)*param_1;
  }
  pwVar1 = pwVar2 + *(long *)(pwVar2 + -6);
joined_r0x00356d20:
  if (param_3 == 1) {
    *pwVar1 = *param_2;
  }
  else {
    wmemcpy(pwVar1,param_2,param_3);
    pwVar2 = (wchar_t *)*param_1;
  }
  if (pwVar2 + -6 != (wchar_t *)PTR_DAT_0043dcd8) {
    pwVar2[-2] = L'\0';
    *(ulong *)(pwVar2 + -6) = uVar3;
    pwVar2[uVar3] = L'\0';
  }
  return param_1;
}

