
/* std::wstring::TEMPNAMEPLACEHOLDERVALUE(std::wstring const&) */

wstring * __thiscall std::wstring::operator+=(wstring *this,wstring *param_1)

{
  wchar_t *__s1;
  size_t __n;
  long lVar1;
  ulong uVar2;
  
  __n = *(size_t *)(*(long *)param_1 + -0x18);
  if (__n != 0) {
    lVar1 = *(long *)this;
    uVar2 = *(long *)(lVar1 + -0x18) + __n;
    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {
      reserve(this,uVar2);
    }
    lVar1 = *(long *)this;
    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);
    if (__n == 1) {
      *__s1 = **(wchar_t **)param_1;
    }
    else {
      wmemcpy(__s1,*(wchar_t **)param_1,__n);
      lVar1 = *(long *)this;
    }
    if ((undefined *)(lVar1 + -0x18) != PTR__S_empty_rep_storage_003bdcd8) {
      *(undefined4 *)(lVar1 + -8) = 0;
      *(ulong *)(lVar1 + -0x18) = uVar2;
      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;
    }
  }
  return this;
}



long * thunk_FUN_002f2b80(long *param_1,long *param_2)

{
  wchar_t *__s1;
  size_t __n;
  long lVar1;
  ulong uVar2;
  
  __n = *(size_t *)(*param_2 + -0x18);
  if (__n != 0) {
    lVar1 = *param_1;
    uVar2 = *(long *)(lVar1 + -0x18) + __n;
    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {
      FUN_002f2aa0(param_1,uVar2);
    }
    lVar1 = *param_1;
    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);
    if (__n == 1) {
      *__s1 = *(wchar_t *)*param_2;
    }
    else {
      wmemcpy(__s1,(wchar_t *)*param_2,__n);
      lVar1 = *param_1;
    }
    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {
      *(undefined4 *)(lVar1 + -8) = 0;
      *(ulong *)(lVar1 + -0x18) = uVar2;
      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;
    }
  }
  return param_1;
}


JMP 0x002f2b80
(translation_unit "long * thunk_FUN_002f2b80(long *param_1,long *param_2)\n\n{\n  wchar_t *__s1;\n  size_t __n;\n  long lVar1;\n  ulong uVar2;\n  \n  __n = *(size_t *)(*param_2 + -0x18);\n  if (__n != 0) {\n    lVar1 = *param_1;\n    uVar2 = *(long *)(lVar1 + -0x18) + __n;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_002f2aa0(param_1,uVar2);\n    }\n    lVar1 = *param_1;\n    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }\n  }\n  return param_1;\n}\n\n" (function_definition "long * thunk_FUN_002f2b80(long *param_1,long *param_2)\n\n{\n  wchar_t *__s1;\n  size_t __n;\n  long lVar1;\n  ulong uVar2;\n  \n  __n = *(size_t *)(*param_2 + -0x18);\n  if (__n != 0) {\n    lVar1 = *param_1;\n    uVar2 = *(long *)(lVar1 + -0x18) + __n;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_002f2aa0(param_1,uVar2);\n    }\n    lVar1 = *param_1;\n    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }\n  }\n  return param_1;\n}" (sized_type_specifier "long" long) (pointer_declarator "* thunk_FUN_002f2b80(long *param_1,long *param_2)" * (function_declarator "thunk_FUN_002f2b80(long *param_1,long *param_2)" identifier (parameter_list "(long *param_1,long *param_2)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long *param_2" (sized_type_specifier "long" long) (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  wchar_t *__s1;\n  size_t __n;\n  long lVar1;\n  ulong uVar2;\n  \n  __n = *(size_t *)(*param_2 + -0x18);\n  if (__n != 0) {\n    lVar1 = *param_1;\n    uVar2 = *(long *)(lVar1 + -0x18) + __n;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_002f2aa0(param_1,uVar2);\n    }\n    lVar1 = *param_1;\n    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }\n  }\n  return param_1;\n}" { (declaration "wchar_t *__s1;" type_identifier (pointer_declarator "*__s1" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (expression_statement "__n = *(size_t *)(*param_2 + -0x18);" (assignment_expression "__n = *(size_t *)(*param_2 + -0x18)" identifier = (pointer_expression "*(size_t *)(*param_2 + -0x18)" * (cast_expression "(size_t *)(*param_2 + -0x18)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_2 + -0x18)" ( (binary_expression "*param_2 + -0x18" (pointer_expression "*param_2" * identifier) + number_literal) ))))) ;) (if_statement "if (__n != 0) {\n    lVar1 = *param_1;\n    uVar2 = *(long *)(lVar1 + -0x18) + __n;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_002f2aa0(param_1,uVar2);\n    }\n    lVar1 = *param_1;\n    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }\n  }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n    lVar1 = *param_1;\n    uVar2 = *(long *)(lVar1 + -0x18) + __n;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_002f2aa0(param_1,uVar2);\n    }\n    lVar1 = *param_1;\n    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }\n  }" { (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar2 = *(long *)(lVar1 + -0x18) + __n;" (assignment_expression "uVar2 = *(long *)(lVar1 + -0x18) + __n" identifier = (binary_expression "*(long *)(lVar1 + -0x18) + __n" (pointer_expression "*(long *)(lVar1 + -0x18)" * (cast_expression "(long *)(lVar1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) )))) + identifier)) ;) (if_statement "if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_002f2aa0(param_1,uVar2);\n    }" if (parenthesized_expression "((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8)))" ( (binary_expression "(*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))" (parenthesized_expression "(*(ulong *)(lVar1 + -0x10) < uVar2)" ( (binary_expression "*(ulong *)(lVar1 + -0x10) < uVar2" (pointer_expression "*(ulong *)(lVar1 + -0x10)" * (cast_expression "(ulong *)(lVar1 + -0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x10)" ( (binary_expression "lVar1 + -0x10" identifier + number_literal) )))) < identifier) )) || (parenthesized_expression "(0 < *(int *)(lVar1 + -8))" ( (binary_expression "0 < *(int *)(lVar1 + -8)" number_literal < (pointer_expression "*(int *)(lVar1 + -8)" * (cast_expression "(int *)(lVar1 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -8)" ( (binary_expression "lVar1 + -8" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      FUN_002f2aa0(param_1,uVar2);\n    }" { (expression_statement "FUN_002f2aa0(param_1,uVar2);" (call_expression "FUN_002f2aa0(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier ))) ;) })) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "__s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);" (assignment_expression "__s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4)" identifier = (cast_expression "(wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + *(long *)(lVar1 + -0x18) * 4)" ( (binary_expression "lVar1 + *(long *)(lVar1 + -0x18) * 4" identifier + (binary_expression "*(long *)(lVar1 + -0x18) * 4" (pointer_expression "*(long *)(lVar1 + -0x18)" * (cast_expression "(long *)(lVar1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) )))) * number_literal)) )))) ;) (if_statement "if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }" if (parenthesized_expression "(__n == 1)" ( (binary_expression "__n == 1" identifier == number_literal) )) (compound_statement "{\n      *__s1 = *(wchar_t *)*param_2;\n    }" { (expression_statement "*__s1 = *(wchar_t *)*param_2;" (assignment_expression "*__s1 = *(wchar_t *)*param_2" (pointer_expression "*__s1" * identifier) = (pointer_expression "*(wchar_t *)*param_2" * (cast_expression "(wchar_t *)*param_2" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier)))) ;) }) (else_clause "else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }" else (compound_statement "{\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }" { (expression_statement "wmemcpy(__s1,(wchar_t *)*param_2,__n);" (call_expression "wmemcpy(__s1,(wchar_t *)*param_2,__n)" identifier (argument_list "(__s1,(wchar_t *)*param_2,__n)" ( identifier , (cast_expression "(wchar_t *)*param_2" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier)) , identifier ))) ;) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) }))) (if_statement "if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }" if (parenthesized_expression "((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8)" ( (binary_expression "(undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8" (cast_expression "(undefined *)(lVar1 + -0x18)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) ))) != identifier) )) (compound_statement "{\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }" { (expression_statement "*(undefined4 *)(lVar1 + -8) = 0;" (assignment_expression "*(undefined4 *)(lVar1 + -8) = 0" (pointer_expression "*(undefined4 *)(lVar1 + -8)" * (cast_expression "(undefined4 *)(lVar1 + -8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -8)" ( (binary_expression "lVar1 + -8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(ulong *)(lVar1 + -0x18) = uVar2;" (assignment_expression "*(ulong *)(lVar1 + -0x18) = uVar2" (pointer_expression "*(ulong *)(lVar1 + -0x18)" * (cast_expression "(ulong *)(lVar1 + -0x18)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(lVar1 + uVar2 * 4) = 0;" (assignment_expression "*(undefined4 *)(lVar1 + uVar2 * 4) = 0" (pointer_expression "*(undefined4 *)(lVar1 + uVar2 * 4)" * (cast_expression "(undefined4 *)(lVar1 + uVar2 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + uVar2 * 4)" ( (binary_expression "lVar1 + uVar2 * 4" identifier + (binary_expression "uVar2 * 4" identifier * number_literal)) )))) = number_literal) ;) })) })) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* std::wstring::TEMPNAMEPLACEHOLDERVALUE(std::wstring const&) */\n\nwstring * __thiscall std::wstring::operator+=(wstring *this,wstring *param_1)\n\n{\n  wchar_t *__s1;\n  size_t __n;\n  long lVar1;\n  ulong uVar2;\n  \n  __n = *(size_t *)(*(long *)param_1 + -0x18);\n  if (__n != 0) {\n    lVar1 = *(long *)this;\n    uVar2 = *(long *)(lVar1 + -0x18) + __n;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      reserve(this,uVar2);\n    }\n    lVar1 = *(long *)this;\n    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);\n    if (__n == 1) {\n      *__s1 = **(wchar_t **)param_1;\n    }\n    else {\n      wmemcpy(__s1,*(wchar_t **)param_1,__n);\n      lVar1 = *(long *)this;\n    }\n    if ((undefined *)(lVar1 + -0x18) != PTR__S_empty_rep_storage_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }\n  }\n  return this;\n}\n\n" comment (ERROR "wstring * __thiscall std::wstring::operator+=(wstring *this,wstring *param_1)" (binary_expression "wstring * __thiscall std::wstring::operator+=(wstring *this,wstring *param_1)" identifier * (assignment_expression "__thiscall std::wstring::operator+=(wstring *this,wstring *param_1)" identifier (ERROR "std::wstring::operator" identifier : : identifier : : identifier) += (parenthesized_expression "(wstring *this,wstring *param_1)" ( (comma_expression "wstring *this,wstring *param_1" (binary_expression "wstring *this" identifier * identifier) , (binary_expression "wstring *param_1" identifier * identifier)) ))))) (compound_statement "{\n  wchar_t *__s1;\n  size_t __n;\n  long lVar1;\n  ulong uVar2;\n  \n  __n = *(size_t *)(*(long *)param_1 + -0x18);\n  if (__n != 0) {\n    lVar1 = *(long *)this;\n    uVar2 = *(long *)(lVar1 + -0x18) + __n;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      reserve(this,uVar2);\n    }\n    lVar1 = *(long *)this;\n    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);\n    if (__n == 1) {\n      *__s1 = **(wchar_t **)param_1;\n    }\n    else {\n      wmemcpy(__s1,*(wchar_t **)param_1,__n);\n      lVar1 = *(long *)this;\n    }\n    if ((undefined *)(lVar1 + -0x18) != PTR__S_empty_rep_storage_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }\n  }\n  return this;\n}" { (declaration "wchar_t *__s1;" type_identifier (pointer_declarator "*__s1" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (expression_statement "__n = *(size_t *)(*(long *)param_1 + -0x18);" (assignment_expression "__n = *(size_t *)(*(long *)param_1 + -0x18)" identifier = (pointer_expression "*(size_t *)(*(long *)param_1 + -0x18)" * (cast_expression "(size_t *)(*(long *)param_1 + -0x18)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)param_1 + -0x18)" ( (binary_expression "*(long *)param_1 + -0x18" (pointer_expression "*(long *)param_1" * (cast_expression "(long *)param_1" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) ;) (if_statement "if (__n != 0) {\n    lVar1 = *(long *)this;\n    uVar2 = *(long *)(lVar1 + -0x18) + __n;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      reserve(this,uVar2);\n    }\n    lVar1 = *(long *)this;\n    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);\n    if (__n == 1) {\n      *__s1 = **(wchar_t **)param_1;\n    }\n    else {\n      wmemcpy(__s1,*(wchar_t **)param_1,__n);\n      lVar1 = *(long *)this;\n    }\n    if ((undefined *)(lVar1 + -0x18) != PTR__S_empty_rep_storage_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }\n  }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n    lVar1 = *(long *)this;\n    uVar2 = *(long *)(lVar1 + -0x18) + __n;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      reserve(this,uVar2);\n    }\n    lVar1 = *(long *)this;\n    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);\n    if (__n == 1) {\n      *__s1 = **(wchar_t **)param_1;\n    }\n    else {\n      wmemcpy(__s1,*(wchar_t **)param_1,__n);\n      lVar1 = *(long *)this;\n    }\n    if ((undefined *)(lVar1 + -0x18) != PTR__S_empty_rep_storage_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }\n  }" { (expression_statement "lVar1 = *(long *)this;" (assignment_expression "lVar1 = *(long *)this" identifier = (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "uVar2 = *(long *)(lVar1 + -0x18) + __n;" (assignment_expression "uVar2 = *(long *)(lVar1 + -0x18) + __n" identifier = (binary_expression "*(long *)(lVar1 + -0x18) + __n" (pointer_expression "*(long *)(lVar1 + -0x18)" * (cast_expression "(long *)(lVar1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) )))) + identifier)) ;) (if_statement "if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      reserve(this,uVar2);\n    }" if (parenthesized_expression "((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8)))" ( (binary_expression "(*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))" (parenthesized_expression "(*(ulong *)(lVar1 + -0x10) < uVar2)" ( (binary_expression "*(ulong *)(lVar1 + -0x10) < uVar2" (pointer_expression "*(ulong *)(lVar1 + -0x10)" * (cast_expression "(ulong *)(lVar1 + -0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x10)" ( (binary_expression "lVar1 + -0x10" identifier + number_literal) )))) < identifier) )) || (parenthesized_expression "(0 < *(int *)(lVar1 + -8))" ( (binary_expression "0 < *(int *)(lVar1 + -8)" number_literal < (pointer_expression "*(int *)(lVar1 + -8)" * (cast_expression "(int *)(lVar1 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -8)" ( (binary_expression "lVar1 + -8" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      reserve(this,uVar2);\n    }" { (expression_statement "reserve(this,uVar2);" (call_expression "reserve(this,uVar2)" identifier (argument_list "(this,uVar2)" ( identifier , identifier ))) ;) })) (expression_statement "lVar1 = *(long *)this;" (assignment_expression "lVar1 = *(long *)this" identifier = (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "__s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);" (assignment_expression "__s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4)" identifier = (cast_expression "(wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + *(long *)(lVar1 + -0x18) * 4)" ( (binary_expression "lVar1 + *(long *)(lVar1 + -0x18) * 4" identifier + (binary_expression "*(long *)(lVar1 + -0x18) * 4" (pointer_expression "*(long *)(lVar1 + -0x18)" * (cast_expression "(long *)(lVar1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) )))) * number_literal)) )))) ;) (if_statement "if (__n == 1) {\n      *__s1 = **(wchar_t **)param_1;\n    }\n    else {\n      wmemcpy(__s1,*(wchar_t **)param_1,__n);\n      lVar1 = *(long *)this;\n    }" if (parenthesized_expression "(__n == 1)" ( (binary_expression "__n == 1" identifier == number_literal) )) (compound_statement "{\n      *__s1 = **(wchar_t **)param_1;\n    }" { (expression_statement "*__s1 = **(wchar_t **)param_1;" (assignment_expression "*__s1 = **(wchar_t **)param_1" (pointer_expression "*__s1" * identifier) = (pointer_expression "**(wchar_t **)param_1" * (pointer_expression "*(wchar_t **)param_1" * (cast_expression "(wchar_t **)param_1" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)))) ;) }) (else_clause "else {\n      wmemcpy(__s1,*(wchar_t **)param_1,__n);\n      lVar1 = *(long *)this;\n    }" else (compound_statement "{\n      wmemcpy(__s1,*(wchar_t **)param_1,__n);\n      lVar1 = *(long *)this;\n    }" { (expression_statement "wmemcpy(__s1,*(wchar_t **)param_1,__n);" (call_expression "wmemcpy(__s1,*(wchar_t **)param_1,__n)" identifier (argument_list "(__s1,*(wchar_t **)param_1,__n)" ( identifier , (pointer_expression "*(wchar_t **)param_1" * (cast_expression "(wchar_t **)param_1" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) , identifier ))) ;) (expression_statement "lVar1 = *(long *)this;" (assignment_expression "lVar1 = *(long *)this" identifier = (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier))) ;) }))) (if_statement "if ((undefined *)(lVar1 + -0x18) != PTR__S_empty_rep_storage_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }" if (parenthesized_expression "((undefined *)(lVar1 + -0x18) != PTR__S_empty_rep_storage_003bdcd8)" ( (binary_expression "(undefined *)(lVar1 + -0x18) != PTR__S_empty_rep_storage_003bdcd8" (cast_expression "(undefined *)(lVar1 + -0x18)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) ))) != identifier) )) (compound_statement "{\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }" { (expression_statement "*(undefined4 *)(lVar1 + -8) = 0;" (assignment_expression "*(undefined4 *)(lVar1 + -8) = 0" (pointer_expression "*(undefined4 *)(lVar1 + -8)" * (cast_expression "(undefined4 *)(lVar1 + -8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -8)" ( (binary_expression "lVar1 + -8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(ulong *)(lVar1 + -0x18) = uVar2;" (assignment_expression "*(ulong *)(lVar1 + -0x18) = uVar2" (pointer_expression "*(ulong *)(lVar1 + -0x18)" * (cast_expression "(ulong *)(lVar1 + -0x18)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(lVar1 + uVar2 * 4) = 0;" (assignment_expression "*(undefined4 *)(lVar1 + uVar2 * 4) = 0" (pointer_expression "*(undefined4 *)(lVar1 + uVar2 * 4)" * (cast_expression "(undefined4 *)(lVar1 + uVar2 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + uVar2 * 4)" ( (binary_expression "lVar1 + uVar2 * 4" identifier + (binary_expression "uVar2 * 4" identifier * number_literal)) )))) = number_literal) ;) })) })) (return_statement "return this;" return identifier ;) }))
(translation_unit "long * thunk_FUN_002f2b80(long *param_1,long *param_2)\n\n{\n  wchar_t *__s1;\n  size_t __n;\n  long lVar1;\n  ulong uVar2;\n  \n  __n = *(size_t *)(*param_2 + -0x18);\n  if (__n != 0) {\n    lVar1 = *param_1;\n    uVar2 = *(long *)(lVar1 + -0x18) + __n;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_002f2aa0(param_1,uVar2);\n    }\n    lVar1 = *param_1;\n    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }\n  }\n  return param_1;\n}\n\n" (function_definition "long * thunk_FUN_002f2b80(long *param_1,long *param_2)\n\n{\n  wchar_t *__s1;\n  size_t __n;\n  long lVar1;\n  ulong uVar2;\n  \n  __n = *(size_t *)(*param_2 + -0x18);\n  if (__n != 0) {\n    lVar1 = *param_1;\n    uVar2 = *(long *)(lVar1 + -0x18) + __n;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_002f2aa0(param_1,uVar2);\n    }\n    lVar1 = *param_1;\n    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }\n  }\n  return param_1;\n}" (sized_type_specifier "long" long) (pointer_declarator "* thunk_FUN_002f2b80(long *param_1,long *param_2)" * (function_declarator "thunk_FUN_002f2b80(long *param_1,long *param_2)" identifier (parameter_list "(long *param_1,long *param_2)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long *param_2" (sized_type_specifier "long" long) (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  wchar_t *__s1;\n  size_t __n;\n  long lVar1;\n  ulong uVar2;\n  \n  __n = *(size_t *)(*param_2 + -0x18);\n  if (__n != 0) {\n    lVar1 = *param_1;\n    uVar2 = *(long *)(lVar1 + -0x18) + __n;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_002f2aa0(param_1,uVar2);\n    }\n    lVar1 = *param_1;\n    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }\n  }\n  return param_1;\n}" { (declaration "wchar_t *__s1;" type_identifier (pointer_declarator "*__s1" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (expression_statement "__n = *(size_t *)(*param_2 + -0x18);" (assignment_expression "__n = *(size_t *)(*param_2 + -0x18)" identifier = (pointer_expression "*(size_t *)(*param_2 + -0x18)" * (cast_expression "(size_t *)(*param_2 + -0x18)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_2 + -0x18)" ( (binary_expression "*param_2 + -0x18" (pointer_expression "*param_2" * identifier) + number_literal) ))))) ;) (if_statement "if (__n != 0) {\n    lVar1 = *param_1;\n    uVar2 = *(long *)(lVar1 + -0x18) + __n;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_002f2aa0(param_1,uVar2);\n    }\n    lVar1 = *param_1;\n    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }\n  }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n    lVar1 = *param_1;\n    uVar2 = *(long *)(lVar1 + -0x18) + __n;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_002f2aa0(param_1,uVar2);\n    }\n    lVar1 = *param_1;\n    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }\n  }" { (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar2 = *(long *)(lVar1 + -0x18) + __n;" (assignment_expression "uVar2 = *(long *)(lVar1 + -0x18) + __n" identifier = (binary_expression "*(long *)(lVar1 + -0x18) + __n" (pointer_expression "*(long *)(lVar1 + -0x18)" * (cast_expression "(long *)(lVar1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) )))) + identifier)) ;) (if_statement "if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_002f2aa0(param_1,uVar2);\n    }" if (parenthesized_expression "((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8)))" ( (binary_expression "(*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))" (parenthesized_expression "(*(ulong *)(lVar1 + -0x10) < uVar2)" ( (binary_expression "*(ulong *)(lVar1 + -0x10) < uVar2" (pointer_expression "*(ulong *)(lVar1 + -0x10)" * (cast_expression "(ulong *)(lVar1 + -0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x10)" ( (binary_expression "lVar1 + -0x10" identifier + number_literal) )))) < identifier) )) || (parenthesized_expression "(0 < *(int *)(lVar1 + -8))" ( (binary_expression "0 < *(int *)(lVar1 + -8)" number_literal < (pointer_expression "*(int *)(lVar1 + -8)" * (cast_expression "(int *)(lVar1 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -8)" ( (binary_expression "lVar1 + -8" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      FUN_002f2aa0(param_1,uVar2);\n    }" { (expression_statement "FUN_002f2aa0(param_1,uVar2);" (call_expression "FUN_002f2aa0(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier ))) ;) })) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "__s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);" (assignment_expression "__s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4)" identifier = (cast_expression "(wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + *(long *)(lVar1 + -0x18) * 4)" ( (binary_expression "lVar1 + *(long *)(lVar1 + -0x18) * 4" identifier + (binary_expression "*(long *)(lVar1 + -0x18) * 4" (pointer_expression "*(long *)(lVar1 + -0x18)" * (cast_expression "(long *)(lVar1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) )))) * number_literal)) )))) ;) (if_statement "if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }" if (parenthesized_expression "(__n == 1)" ( (binary_expression "__n == 1" identifier == number_literal) )) (compound_statement "{\n      *__s1 = *(wchar_t *)*param_2;\n    }" { (expression_statement "*__s1 = *(wchar_t *)*param_2;" (assignment_expression "*__s1 = *(wchar_t *)*param_2" (pointer_expression "*__s1" * identifier) = (pointer_expression "*(wchar_t *)*param_2" * (cast_expression "(wchar_t *)*param_2" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier)))) ;) }) (else_clause "else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }" else (compound_statement "{\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }" { (expression_statement "wmemcpy(__s1,(wchar_t *)*param_2,__n);" (call_expression "wmemcpy(__s1,(wchar_t *)*param_2,__n)" identifier (argument_list "(__s1,(wchar_t *)*param_2,__n)" ( identifier , (cast_expression "(wchar_t *)*param_2" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier)) , identifier ))) ;) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) }))) (if_statement "if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }" if (parenthesized_expression "((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8)" ( (binary_expression "(undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8" (cast_expression "(undefined *)(lVar1 + -0x18)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) ))) != identifier) )) (compound_statement "{\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }" { (expression_statement "*(undefined4 *)(lVar1 + -8) = 0;" (assignment_expression "*(undefined4 *)(lVar1 + -8) = 0" (pointer_expression "*(undefined4 *)(lVar1 + -8)" * (cast_expression "(undefined4 *)(lVar1 + -8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -8)" ( (binary_expression "lVar1 + -8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(ulong *)(lVar1 + -0x18) = uVar2;" (assignment_expression "*(ulong *)(lVar1 + -0x18) = uVar2" (pointer_expression "*(ulong *)(lVar1 + -0x18)" * (cast_expression "(ulong *)(lVar1 + -0x18)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(lVar1 + uVar2 * 4) = 0;" (assignment_expression "*(undefined4 *)(lVar1 + uVar2 * 4) = 0" (pointer_expression "*(undefined4 *)(lVar1 + uVar2 * 4)" * (cast_expression "(undefined4 *)(lVar1 + uVar2 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + uVar2 * 4)" ( (binary_expression "lVar1 + uVar2 * 4" identifier + (binary_expression "uVar2 * 4" identifier * number_literal)) )))) = number_literal) ;) })) })) (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 (sized_type_specifier long) (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (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 ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) * LIT)) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) != IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) = LIT) ;) })) })) (return_statement return IDENT ;) })))
(function_definition "long * thunk_FUN_002f2b80(long *param_1,long *param_2)\n\n{\n  wchar_t *__s1;\n  size_t __n;\n  long lVar1;\n  ulong uVar2;\n  \n  __n = *(size_t *)(*param_2 + -0x18);\n  if (__n != 0) {\n    lVar1 = *param_1;\n    uVar2 = *(long *)(lVar1 + -0x18) + __n;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_002f2aa0(param_1,uVar2);\n    }\n    lVar1 = *param_1;\n    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }\n  }\n  return param_1;\n}" (sized_type_specifier "long" (long "long")) (pointer_declarator "* thunk_FUN_002f2b80(long *param_1,long *param_2)" (* "*") (function_declarator "thunk_FUN_002f2b80(long *param_1,long *param_2)" (identifier "thunk_FUN_002f2b80") (parameter_list "(long *param_1,long *param_2)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "long *param_2" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")")))) (compound_statement "{\n  wchar_t *__s1;\n  size_t __n;\n  long lVar1;\n  ulong uVar2;\n  \n  __n = *(size_t *)(*param_2 + -0x18);\n  if (__n != 0) {\n    lVar1 = *param_1;\n    uVar2 = *(long *)(lVar1 + -0x18) + __n;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_002f2aa0(param_1,uVar2);\n    }\n    lVar1 = *param_1;\n    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }\n  }\n  return param_1;\n}" ({ "{") (declaration "wchar_t *__s1;" (type_identifier "wchar_t") (pointer_declarator "*__s1" (* "*") (identifier "__s1")) (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "ulong uVar2;" (type_identifier "ulong") (identifier "uVar2") (; ";")) (expression_statement "__n = *(size_t *)(*param_2 + -0x18);" (assignment_expression "__n = *(size_t *)(*param_2 + -0x18)" (identifier "__n") (= "=") (pointer_expression "*(size_t *)(*param_2 + -0x18)" (* "*") (cast_expression "(size_t *)(*param_2 + -0x18)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_2 + -0x18)" (( "(") (binary_expression "*param_2 + -0x18" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (+ "+") (number_literal "-0x18")) () ")"))))) (; ";")) (if_statement "if (__n != 0) {\n    lVar1 = *param_1;\n    uVar2 = *(long *)(lVar1 + -0x18) + __n;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_002f2aa0(param_1,uVar2);\n    }\n    lVar1 = *param_1;\n    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }\n  }" (if "if") (parenthesized_expression "(__n != 0)" (( "(") (binary_expression "__n != 0" (identifier "__n") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    lVar1 = *param_1;\n    uVar2 = *(long *)(lVar1 + -0x18) + __n;\n    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_002f2aa0(param_1,uVar2);\n    }\n    lVar1 = *param_1;\n    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }\n    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }\n  }" ({ "{") (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" (identifier "lVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "uVar2 = *(long *)(lVar1 + -0x18) + __n;" (assignment_expression "uVar2 = *(long *)(lVar1 + -0x18) + __n" (identifier "uVar2") (= "=") (binary_expression "*(long *)(lVar1 + -0x18) + __n" (pointer_expression "*(long *)(lVar1 + -0x18)" (* "*") (cast_expression "(long *)(lVar1 + -0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + -0x18)" (( "(") (binary_expression "lVar1 + -0x18" (identifier "lVar1") (+ "+") (number_literal "-0x18")) () ")")))) (+ "+") (identifier "__n"))) (; ";")) (if_statement "if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {\n      FUN_002f2aa0(param_1,uVar2);\n    }" (if "if") (parenthesized_expression "((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8)))" (( "(") (binary_expression "(*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))" (parenthesized_expression "(*(ulong *)(lVar1 + -0x10) < uVar2)" (( "(") (binary_expression "*(ulong *)(lVar1 + -0x10) < uVar2" (pointer_expression "*(ulong *)(lVar1 + -0x10)" (* "*") (cast_expression "(ulong *)(lVar1 + -0x10)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + -0x10)" (( "(") (binary_expression "lVar1 + -0x10" (identifier "lVar1") (+ "+") (number_literal "-0x10")) () ")")))) (< "<") (identifier "uVar2")) () ")")) (|| "||") (parenthesized_expression "(0 < *(int *)(lVar1 + -8))" (( "(") (binary_expression "0 < *(int *)(lVar1 + -8)" (number_literal "0") (< "<") (pointer_expression "*(int *)(lVar1 + -8)" (* "*") (cast_expression "(int *)(lVar1 + -8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + -8)" (( "(") (binary_expression "lVar1 + -8" (identifier "lVar1") (+ "+") (number_literal "-8")) () ")"))))) () ")"))) () ")")) (compound_statement "{\n      FUN_002f2aa0(param_1,uVar2);\n    }" ({ "{") (expression_statement "FUN_002f2aa0(param_1,uVar2);" (call_expression "FUN_002f2aa0(param_1,uVar2)" (identifier "FUN_002f2aa0") (argument_list "(param_1,uVar2)" (( "(") (identifier "param_1") (, ",") (identifier "uVar2") () ")"))) (; ";")) (} "}"))) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" (identifier "lVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "__s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);" (assignment_expression "__s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4)" (identifier "__s1") (= "=") (cast_expression "(wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4)" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + *(long *)(lVar1 + -0x18) * 4)" (( "(") (binary_expression "lVar1 + *(long *)(lVar1 + -0x18) * 4" (identifier "lVar1") (+ "+") (binary_expression "*(long *)(lVar1 + -0x18) * 4" (pointer_expression "*(long *)(lVar1 + -0x18)" (* "*") (cast_expression "(long *)(lVar1 + -0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + -0x18)" (( "(") (binary_expression "lVar1 + -0x18" (identifier "lVar1") (+ "+") (number_literal "-0x18")) () ")")))) (* "*") (number_literal "4"))) () ")")))) (; ";")) (if_statement "if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }" (if "if") (parenthesized_expression "(__n == 1)" (( "(") (binary_expression "__n == 1" (identifier "__n") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      *__s1 = *(wchar_t *)*param_2;\n    }" ({ "{") (expression_statement "*__s1 = *(wchar_t *)*param_2;" (assignment_expression "*__s1 = *(wchar_t *)*param_2" (pointer_expression "*__s1" (* "*") (identifier "__s1")) (= "=") (pointer_expression "*(wchar_t *)*param_2" (* "*") (cast_expression "(wchar_t *)*param_2" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2"))))) (; ";")) (} "}")) (else_clause "else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }" (else "else") (compound_statement "{\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      lVar1 = *param_1;\n    }" ({ "{") (expression_statement "wmemcpy(__s1,(wchar_t *)*param_2,__n);" (call_expression "wmemcpy(__s1,(wchar_t *)*param_2,__n)" (identifier "wmemcpy") (argument_list "(__s1,(wchar_t *)*param_2,__n)" (( "(") (identifier "__s1") (, ",") (cast_expression "(wchar_t *)*param_2" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" (identifier "lVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (} "}")))) (if_statement "if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }" (if "if") (parenthesized_expression "((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8)" (( "(") (binary_expression "(undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8" (cast_expression "(undefined *)(lVar1 + -0x18)" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + -0x18)" (( "(") (binary_expression "lVar1 + -0x18" (identifier "lVar1") (+ "+") (number_literal "-0x18")) () ")"))) (!= "!=") (identifier "PTR_DAT_003bdcd8")) () ")")) (compound_statement "{\n      *(undefined4 *)(lVar1 + -8) = 0;\n      *(ulong *)(lVar1 + -0x18) = uVar2;\n      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;\n    }" ({ "{") (expression_statement "*(undefined4 *)(lVar1 + -8) = 0;" (assignment_expression "*(undefined4 *)(lVar1 + -8) = 0" (pointer_expression "*(undefined4 *)(lVar1 + -8)" (* "*") (cast_expression "(undefined4 *)(lVar1 + -8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + -8)" (( "(") (binary_expression "lVar1 + -8" (identifier "lVar1") (+ "+") (number_literal "-8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(ulong *)(lVar1 + -0x18) = uVar2;" (assignment_expression "*(ulong *)(lVar1 + -0x18) = uVar2" (pointer_expression "*(ulong *)(lVar1 + -0x18)" (* "*") (cast_expression "(ulong *)(lVar1 + -0x18)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + -0x18)" (( "(") (binary_expression "lVar1 + -0x18" (identifier "lVar1") (+ "+") (number_literal "-0x18")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "*(undefined4 *)(lVar1 + uVar2 * 4) = 0;" (assignment_expression "*(undefined4 *)(lVar1 + uVar2 * 4) = 0" (pointer_expression "*(undefined4 *)(lVar1 + uVar2 * 4)" (* "*") (cast_expression "(undefined4 *)(lVar1 + uVar2 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + uVar2 * 4)" (( "(") (binary_expression "lVar1 + uVar2 * 4" (identifier "lVar1") (+ "+") (binary_expression "uVar2 * 4" (identifier "uVar2") (* "*") (number_literal "4"))) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}"))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

/* std::wstring::TEMPNAMEPLACEHOLDERVALUE(std::wstring const&) */

wstring * __thiscall std::wstring::operator+=(wstring *this,wstring *param_1)

{
  type_1 *__s1;
  size_t var_1;
  long var_2;
  type_2 var_3;
  
  var_1 = *(size_t *)(*(long *)param_1 + -0x18);
  if (var_1 != 0) {
    var_2 = *(long *)this;
    var_3 = *(long *)(var_2 + -0x18) + var_1;
    if ((*(type_2 *)(var_2 + -0x10) < var_3) || (0 < *(int *)(var_2 + -8))) {
      var_4(this,var_3);
    }
    var_2 = *(long *)this;
    __s1 = (type_1 *)(var_2 + *(long *)(var_2 + -0x18) * 4);
    if (var_1 == 1) {
      *__s1 = **(type_1 **)param_1;
    }
    else {
      var_5(__s1,*(type_1 **)param_1,var_1);
      var_2 = *(long *)this;
    }
    if ((type_3 *)(var_2 + -0x18) != var_6) {
      *(type_4 *)(var_2 + -8) = 0;
      *(type_2 *)(var_2 + -0x18) = var_3;
      *(type_4 *)(var_2 + var_3 * 4) = 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: (sized_type_specifier) declarator: (pointer_declarator declarator: (identifier)))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (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 (binary_expression left: (number_literal) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (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: (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: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (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: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) right: (number_literal))))))) (return_statement (identifier)))))

long * MASKED(long *param_1,long *param_2)

{
  wchar_t *__s1;
  size_t __n;
  long lVar1;
  ulong uVar2;
  
  __n = *(size_t *)(*param_2 + -0x18);
  if (__n != 0) {
    lVar1 = *param_1;
    uVar2 = *(long *)(lVar1 + -0x18) + __n;
    if ((*(ulong *)(lVar1 + -0x10) < uVar2) || (0 < *(int *)(lVar1 + -8))) {
      FUN_002f2aa0(param_1,uVar2);
    }
    lVar1 = *param_1;
    __s1 = (wchar_t *)(lVar1 + *(long *)(lVar1 + -0x18) * 4);
    if (__n == 1) {
      *__s1 = *(wchar_t *)*param_2;
    }
    else {
      wmemcpy(__s1,(wchar_t *)*param_2,__n);
      lVar1 = *param_1;
    }
    if ((undefined *)(lVar1 + -0x18) != PTR_DAT_003bdcd8) {
      *(undefined4 *)(lVar1 + -8) = 0;
      *(ulong *)(lVar1 + -0x18) = uVar2;
      *(undefined4 *)(lVar1 + uVar2 * 4) = 0;
    }
  }
  return param_1;
}

