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

void __thiscall std::wstring::_M_assign(wstring *this,wstring *param_1)

{
  ulong __n;
  wstring *__s1;
  ulong uVar1;
  ulong local_30;
  
  if (this == param_1) {
    return;
  }
  __s1 = *(wstring **)this;
  __n = *(ulong *)(param_1 + 8);
  if (this + 0x10 == __s1) {
    uVar1 = 3;
  }
  else {
    uVar1 = *(ulong *)(this + 0x10);
  }
  if (uVar1 < __n) {
    local_30 = __n;
    __s1 = (wstring *)_M_create(this,&local_30,uVar1);
    if (this + 0x10 != *(wstring **)this) {
      operator_delete(*(wstring **)this);
    }
    *(wstring **)this = __s1;
    *(ulong *)(this + 0x10) = local_30;
  }
  if (__n != 0) {
    if (__n == 1) {
      *(wchar_t *)__s1 = **(wchar_t **)param_1;
    }
    else {
      wmemcpy((wchar_t *)__s1,*(wchar_t **)param_1,__n);
      __s1 = *(wstring **)this;
    }
  }
  *(ulong *)(this + 8) = __n;
  *(undefined4 *)(__s1 + __n * 4) = 0;
  return;
}



void FUN_0033c760(long *param_1,long *param_2)

{
  ulong __n;
  wchar_t *__s1;
  ulong uVar1;
  ulong local_30;
  
  if (param_1 == param_2) {
    return;
  }
  __s1 = (wchar_t *)*param_1;
  __n = param_2[1];
  if ((wchar_t *)(param_1 + 2) == __s1) {
    uVar1 = 3;
  }
  else {
    uVar1 = param_1[2];
  }
  if (uVar1 < __n) {
    local_30 = __n;
    __s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);
    if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {
      FUN_00338a40();
    }
    *param_1 = (long)__s1;
    param_1[2] = local_30;
  }
  if (__n != 0) {
    if (__n == 1) {
      *__s1 = *(wchar_t *)*param_2;
    }
    else {
      wmemcpy(__s1,(wchar_t *)*param_2,__n);
      __s1 = (wchar_t *)*param_1;
    }
  }
  param_1[1] = __n;
  __s1[__n] = L'\0';
  return;
}


CMP RDI,RSI
JZ 0x0033c808
PUSH R14
LEA R14,[RDI + 0x10]
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x10
MOV R13,qword ptr [RDI]
MOV R12,qword ptr [RSI + 0x8]
CMP R14,R13
JZ 0x0033c810
MOV RDX,qword ptr [RDI + 0x10]
MOV RBP,RSI
MOV RBX,RDI
CMP RDX,R12
JC 0x0033c7d0
TEST R12,R12
JZ 0x0033c7b5
MOV RSI,qword ptr [RBP]
CMP R12,0x1
JZ 0x0033c820
MOV RDI,R13
MOV RDX,R12
CALL 0x001500f0
MOV R13,qword ptr [RBX]
MOV qword ptr [RBX + 0x8],R12
MOV dword ptr [R13 + R12*0x4],0x0
ADD RSP,0x10
POP RBX
POP RBP
POP R12
POP R13
POP R14
RET
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSP + 0x8],R12
CALL 0x0033c450
MOV RDI,qword ptr [RBX]
MOV R13,RAX
CMP R14,RDI
JZ 0x0033c7ef
CALL 0x00338a40
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX],R13
MOV qword ptr [RBX + 0x10],RAX
TEST R12,R12
JZ 0x0033c7b5
JMP 0x0033c79d
RET
MOV EDX,0x3
JMP 0x0033c78d
MOV EAX,dword ptr [RSI]
MOV dword ptr [R13],EAX
JMP 0x0033c7b5
(translation_unit "void FUN_0033c760(long *param_1,long *param_2)\n\n{\n  ulong __n;\n  wchar_t *__s1;\n  ulong uVar1;\n  ulong local_30;\n  \n  if (param_1 == param_2) {\n    return;\n  }\n  __s1 = (wchar_t *)*param_1;\n  __n = param_2[1];\n  if ((wchar_t *)(param_1 + 2) == __s1) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = param_1[2];\n  }\n  if (uVar1 < __n) {\n    local_30 = __n;\n    __s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);\n    if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {\n      FUN_00338a40();\n    }\n    *param_1 = (long)__s1;\n    param_1[2] = local_30;\n  }\n  if (__n != 0) {\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*param_1;\n    }\n  }\n  param_1[1] = __n;\n  __s1[__n] = L'\0';\n  return;\n}\n\n" (function_definition "void FUN_0033c760(long *param_1,long *param_2)\n\n{\n  ulong __n;\n  wchar_t *__s1;\n  ulong uVar1;\n  ulong local_30;\n  \n  if (param_1 == param_2) {\n    return;\n  }\n  __s1 = (wchar_t *)*param_1;\n  __n = param_2[1];\n  if ((wchar_t *)(param_1 + 2) == __s1) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = param_1[2];\n  }\n  if (uVar1 < __n) {\n    local_30 = __n;\n    __s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);\n    if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {\n      FUN_00338a40();\n    }\n    *param_1 = (long)__s1;\n    param_1[2] = local_30;\n  }\n  if (__n != 0) {\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*param_1;\n    }\n  }\n  param_1[1] = __n;\n  __s1[__n] = L'\0';\n  return;\n}" primitive_type (function_declarator "FUN_0033c760(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  ulong __n;\n  wchar_t *__s1;\n  ulong uVar1;\n  ulong local_30;\n  \n  if (param_1 == param_2) {\n    return;\n  }\n  __s1 = (wchar_t *)*param_1;\n  __n = param_2[1];\n  if ((wchar_t *)(param_1 + 2) == __s1) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = param_1[2];\n  }\n  if (uVar1 < __n) {\n    local_30 = __n;\n    __s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);\n    if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {\n      FUN_00338a40();\n    }\n    *param_1 = (long)__s1;\n    param_1[2] = local_30;\n  }\n  if (__n != 0) {\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*param_1;\n    }\n  }\n  param_1[1] = __n;\n  __s1[__n] = L'\0';\n  return;\n}" { (declaration "ulong __n;" type_identifier identifier ;) (declaration "wchar_t *__s1;" type_identifier (pointer_declarator "*__s1" * identifier) ;) (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "ulong local_30;" type_identifier identifier ;) (if_statement "if (param_1 == param_2) {\n    return;\n  }" if (parenthesized_expression "(param_1 == param_2)" ( (binary_expression "param_1 == param_2" identifier == identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "__s1 = (wchar_t *)*param_1;" (assignment_expression "__s1 = (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 "__n = param_2[1];" (assignment_expression "__n = param_2[1]" identifier = (subscript_expression "param_2[1]" identifier [ number_literal ])) ;) (if_statement "if ((wchar_t *)(param_1 + 2) == __s1) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = param_1[2];\n  }" if (parenthesized_expression "((wchar_t *)(param_1 + 2) == __s1)" ( (binary_expression "(wchar_t *)(param_1 + 2) == __s1" (cast_expression "(wchar_t *)(param_1 + 2)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) ))) == identifier) )) (compound_statement "{\n    uVar1 = 3;\n  }" { (expression_statement "uVar1 = 3;" (assignment_expression "uVar1 = 3" identifier = number_literal) ;) }) (else_clause "else {\n    uVar1 = param_1[2];\n  }" else (compound_statement "{\n    uVar1 = param_1[2];\n  }" { (expression_statement "uVar1 = param_1[2];" (assignment_expression "uVar1 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) }))) (if_statement "if (uVar1 < __n) {\n    local_30 = __n;\n    __s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);\n    if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {\n      FUN_00338a40();\n    }\n    *param_1 = (long)__s1;\n    param_1[2] = local_30;\n  }" if (parenthesized_expression "(uVar1 < __n)" ( (binary_expression "uVar1 < __n" identifier < identifier) )) (compound_statement "{\n    local_30 = __n;\n    __s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);\n    if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {\n      FUN_00338a40();\n    }\n    *param_1 = (long)__s1;\n    param_1[2] = local_30;\n  }" { (expression_statement "local_30 = __n;" (assignment_expression "local_30 = __n" identifier = identifier) ;) (expression_statement "__s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);" (assignment_expression "__s1 = (wchar_t *)FUN_0033c450(param_1,&local_30)" identifier = (cast_expression "(wchar_t *)FUN_0033c450(param_1,&local_30)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0033c450(param_1,&local_30)" identifier (argument_list "(param_1,&local_30)" ( identifier , (pointer_expression "&local_30" & identifier) ))))) ;) (if_statement "if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {\n      FUN_00338a40();\n    }" if (parenthesized_expression "((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1)" ( (binary_expression "(wchar_t *)(param_1 + 2) != (wchar_t *)*param_1" (cast_expression "(wchar_t *)(param_1 + 2)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) ))) != (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) )) (compound_statement "{\n      FUN_00338a40();\n    }" { (expression_statement "FUN_00338a40();" (call_expression "FUN_00338a40()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "*param_1 = (long)__s1;" (assignment_expression "*param_1 = (long)__s1" (pointer_expression "*param_1" * identifier) = (cast_expression "(long)__s1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (expression_statement "param_1[2] = local_30;" (assignment_expression "param_1[2] = local_30" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) })) (if_statement "if (__n != 0) {\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*param_1;\n    }\n  }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*param_1;\n    }\n  }" { (if_statement "if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*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      __s1 = (wchar_t *)*param_1;\n    }" else (compound_statement "{\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*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 "__s1 = (wchar_t *)*param_1;" (assignment_expression "__s1 = (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_1[1] = __n;" (assignment_expression "param_1[1] = __n" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "__s1[__n] = L'\0';" (assignment_expression "__s1[__n] = L'\0'" (subscript_expression "__s1[__n]" identifier [ identifier ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (return_statement "return;" return ;) })))
(translation_unit "/* std::wstring::_M_assign(std::wstring const&) */\n\nvoid __thiscall std::wstring::_M_assign(wstring *this,wstring *param_1)\n\n{\n  ulong __n;\n  wstring *__s1;\n  ulong uVar1;\n  ulong local_30;\n  \n  if (this == param_1) {\n    return;\n  }\n  __s1 = *(wstring **)this;\n  __n = *(ulong *)(param_1 + 8);\n  if (this + 0x10 == __s1) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = *(ulong *)(this + 0x10);\n  }\n  if (uVar1 < __n) {\n    local_30 = __n;\n    __s1 = (wstring *)_M_create(this,&local_30,uVar1);\n    if (this + 0x10 != *(wstring **)this) {\n      operator_delete(*(wstring **)this);\n    }\n    *(wstring **)this = __s1;\n    *(ulong *)(this + 0x10) = local_30;\n  }\n  if (__n != 0) {\n    if (__n == 1) {\n      *(wchar_t *)__s1 = **(wchar_t **)param_1;\n    }\n    else {\n      wmemcpy((wchar_t *)__s1,*(wchar_t **)param_1,__n);\n      __s1 = *(wstring **)this;\n    }\n  }\n  *(ulong *)(this + 8) = __n;\n  *(undefined4 *)(__s1 + __n * 4) = 0;\n  return;\n}\n\n" comment (function_definition "void __thiscall std::wstring::_M_assign(wstring *this,wstring *param_1)\n\n{\n  ulong __n;\n  wstring *__s1;\n  ulong uVar1;\n  ulong local_30;\n  \n  if (this == param_1) {\n    return;\n  }\n  __s1 = *(wstring **)this;\n  __n = *(ulong *)(param_1 + 8);\n  if (this + 0x10 == __s1) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = *(ulong *)(this + 0x10);\n  }\n  if (uVar1 < __n) {\n    local_30 = __n;\n    __s1 = (wstring *)_M_create(this,&local_30,uVar1);\n    if (this + 0x10 != *(wstring **)this) {\n      operator_delete(*(wstring **)this);\n    }\n    *(wstring **)this = __s1;\n    *(ulong *)(this + 0x10) = local_30;\n  }\n  if (__n != 0) {\n    if (__n == 1) {\n      *(wchar_t *)__s1 = **(wchar_t **)param_1;\n    }\n    else {\n      wmemcpy((wchar_t *)__s1,*(wchar_t **)param_1,__n);\n      __s1 = *(wstring **)this;\n    }\n  }\n  *(ulong *)(this + 8) = __n;\n  *(undefined4 *)(__s1 + __n * 4) = 0;\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wstring::" identifier : : identifier : :) (function_declarator "_M_assign(wstring *this,wstring *param_1)" identifier (parameter_list "(wstring *this,wstring *param_1)" ( (parameter_declaration "wstring *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "wstring *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  ulong __n;\n  wstring *__s1;\n  ulong uVar1;\n  ulong local_30;\n  \n  if (this == param_1) {\n    return;\n  }\n  __s1 = *(wstring **)this;\n  __n = *(ulong *)(param_1 + 8);\n  if (this + 0x10 == __s1) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = *(ulong *)(this + 0x10);\n  }\n  if (uVar1 < __n) {\n    local_30 = __n;\n    __s1 = (wstring *)_M_create(this,&local_30,uVar1);\n    if (this + 0x10 != *(wstring **)this) {\n      operator_delete(*(wstring **)this);\n    }\n    *(wstring **)this = __s1;\n    *(ulong *)(this + 0x10) = local_30;\n  }\n  if (__n != 0) {\n    if (__n == 1) {\n      *(wchar_t *)__s1 = **(wchar_t **)param_1;\n    }\n    else {\n      wmemcpy((wchar_t *)__s1,*(wchar_t **)param_1,__n);\n      __s1 = *(wstring **)this;\n    }\n  }\n  *(ulong *)(this + 8) = __n;\n  *(undefined4 *)(__s1 + __n * 4) = 0;\n  return;\n}" { (declaration "ulong __n;" type_identifier identifier ;) (declaration "wstring *__s1;" type_identifier (pointer_declarator "*__s1" * identifier) ;) (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "ulong local_30;" type_identifier identifier ;) (if_statement "if (this == param_1) {\n    return;\n  }" if (parenthesized_expression "(this == param_1)" ( (binary_expression "this == param_1" identifier == identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "__s1 = *(wstring **)this;" (assignment_expression "__s1 = *(wstring **)this" identifier = (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "__n = *(ulong *)(param_1 + 8);" (assignment_expression "__n = *(ulong *)(param_1 + 8)" identifier = (pointer_expression "*(ulong *)(param_1 + 8)" * (cast_expression "(ulong *)(param_1 + 8)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (if_statement "if (this + 0x10 == __s1) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = *(ulong *)(this + 0x10);\n  }" if (parenthesized_expression "(this + 0x10 == __s1)" ( (binary_expression "this + 0x10 == __s1" (binary_expression "this + 0x10" identifier + number_literal) == identifier) )) (compound_statement "{\n    uVar1 = 3;\n  }" { (expression_statement "uVar1 = 3;" (assignment_expression "uVar1 = 3" identifier = number_literal) ;) }) (else_clause "else {\n    uVar1 = *(ulong *)(this + 0x10);\n  }" else (compound_statement "{\n    uVar1 = *(ulong *)(this + 0x10);\n  }" { (expression_statement "uVar1 = *(ulong *)(this + 0x10);" (assignment_expression "uVar1 = *(ulong *)(this + 0x10)" identifier = (pointer_expression "*(ulong *)(this + 0x10)" * (cast_expression "(ulong *)(this + 0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) ))))) ;) }))) (if_statement "if (uVar1 < __n) {\n    local_30 = __n;\n    __s1 = (wstring *)_M_create(this,&local_30,uVar1);\n    if (this + 0x10 != *(wstring **)this) {\n      operator_delete(*(wstring **)this);\n    }\n    *(wstring **)this = __s1;\n    *(ulong *)(this + 0x10) = local_30;\n  }" if (parenthesized_expression "(uVar1 < __n)" ( (binary_expression "uVar1 < __n" identifier < identifier) )) (compound_statement "{\n    local_30 = __n;\n    __s1 = (wstring *)_M_create(this,&local_30,uVar1);\n    if (this + 0x10 != *(wstring **)this) {\n      operator_delete(*(wstring **)this);\n    }\n    *(wstring **)this = __s1;\n    *(ulong *)(this + 0x10) = local_30;\n  }" { (expression_statement "local_30 = __n;" (assignment_expression "local_30 = __n" identifier = identifier) ;) (expression_statement "__s1 = (wstring *)_M_create(this,&local_30,uVar1);" (assignment_expression "__s1 = (wstring *)_M_create(this,&local_30,uVar1)" identifier = (cast_expression "(wstring *)_M_create(this,&local_30,uVar1)" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "_M_create(this,&local_30,uVar1)" identifier (argument_list "(this,&local_30,uVar1)" ( identifier , (pointer_expression "&local_30" & identifier) , identifier ))))) ;) (if_statement "if (this + 0x10 != *(wstring **)this) {\n      operator_delete(*(wstring **)this);\n    }" if (parenthesized_expression "(this + 0x10 != *(wstring **)this)" ( (binary_expression "this + 0x10 != *(wstring **)this" (binary_expression "this + 0x10" identifier + number_literal) != (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) )) (compound_statement "{\n      operator_delete(*(wstring **)this);\n    }" { (expression_statement "operator_delete(*(wstring **)this);" (call_expression "operator_delete(*(wstring **)this)" identifier (argument_list "(*(wstring **)this)" ( (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) ))) ;) })) (expression_statement "*(wstring **)this = __s1;" (assignment_expression "*(wstring **)this = __s1" (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (expression_statement "*(ulong *)(this + 0x10) = local_30;" (assignment_expression "*(ulong *)(this + 0x10) = local_30" (pointer_expression "*(ulong *)(this + 0x10)" * (cast_expression "(ulong *)(this + 0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) = identifier) ;) })) (if_statement "if (__n != 0) {\n    if (__n == 1) {\n      *(wchar_t *)__s1 = **(wchar_t **)param_1;\n    }\n    else {\n      wmemcpy((wchar_t *)__s1,*(wchar_t **)param_1,__n);\n      __s1 = *(wstring **)this;\n    }\n  }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n    if (__n == 1) {\n      *(wchar_t *)__s1 = **(wchar_t **)param_1;\n    }\n    else {\n      wmemcpy((wchar_t *)__s1,*(wchar_t **)param_1,__n);\n      __s1 = *(wstring **)this;\n    }\n  }" { (if_statement "if (__n == 1) {\n      *(wchar_t *)__s1 = **(wchar_t **)param_1;\n    }\n    else {\n      wmemcpy((wchar_t *)__s1,*(wchar_t **)param_1,__n);\n      __s1 = *(wstring **)this;\n    }" if (parenthesized_expression "(__n == 1)" ( (binary_expression "__n == 1" identifier == number_literal) )) (compound_statement "{\n      *(wchar_t *)__s1 = **(wchar_t **)param_1;\n    }" { (expression_statement "*(wchar_t *)__s1 = **(wchar_t **)param_1;" (assignment_expression "*(wchar_t *)__s1 = **(wchar_t **)param_1" (pointer_expression "*(wchar_t *)__s1" * (cast_expression "(wchar_t *)__s1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) 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((wchar_t *)__s1,*(wchar_t **)param_1,__n);\n      __s1 = *(wstring **)this;\n    }" else (compound_statement "{\n      wmemcpy((wchar_t *)__s1,*(wchar_t **)param_1,__n);\n      __s1 = *(wstring **)this;\n    }" { (expression_statement "wmemcpy((wchar_t *)__s1,*(wchar_t **)param_1,__n);" (call_expression "wmemcpy((wchar_t *)__s1,*(wchar_t **)param_1,__n)" identifier (argument_list "((wchar_t *)__s1,*(wchar_t **)param_1,__n)" ( (cast_expression "(wchar_t *)__s1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) 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 "__s1 = *(wstring **)this;" (assignment_expression "__s1 = *(wstring **)this" identifier = (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) }))) })) (expression_statement "*(ulong *)(this + 8) = __n;" (assignment_expression "*(ulong *)(this + 8) = __n" (pointer_expression "*(ulong *)(this + 8)" * (cast_expression "(ulong *)(this + 8)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(__s1 + __n * 4) = 0;" (assignment_expression "*(undefined4 *)(__s1 + __n * 4) = 0" (pointer_expression "*(undefined4 *)(__s1 + __n * 4)" * (cast_expression "(undefined4 *)(__s1 + __n * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s1 + __n * 4)" ( (binary_expression "__s1 + __n * 4" identifier + (binary_expression "__n * 4" identifier * number_literal)) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0033c760(long *param_1,long *param_2)\n\n{\n  ulong __n;\n  wchar_t *__s1;\n  ulong uVar1;\n  ulong local_30;\n  \n  if (param_1 == param_2) {\n    return;\n  }\n  __s1 = (wchar_t *)*param_1;\n  __n = param_2[1];\n  if ((wchar_t *)(param_1 + 2) == __s1) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = param_1[2];\n  }\n  if (uVar1 < __n) {\n    local_30 = __n;\n    __s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);\n    if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {\n      FUN_00338a40();\n    }\n    *param_1 = (long)__s1;\n    param_1[2] = local_30;\n  }\n  if (__n != 0) {\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*param_1;\n    }\n  }\n  param_1[1] = __n;\n  __s1[__n] = L'\0';\n  return;\n}\n\n" (function_definition "void FUN_0033c760(long *param_1,long *param_2)\n\n{\n  ulong __n;\n  wchar_t *__s1;\n  ulong uVar1;\n  ulong local_30;\n  \n  if (param_1 == param_2) {\n    return;\n  }\n  __s1 = (wchar_t *)*param_1;\n  __n = param_2[1];\n  if ((wchar_t *)(param_1 + 2) == __s1) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = param_1[2];\n  }\n  if (uVar1 < __n) {\n    local_30 = __n;\n    __s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);\n    if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {\n      FUN_00338a40();\n    }\n    *param_1 = (long)__s1;\n    param_1[2] = local_30;\n  }\n  if (__n != 0) {\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*param_1;\n    }\n  }\n  param_1[1] = __n;\n  __s1[__n] = L'\0';\n  return;\n}" primitive_type (function_declarator "FUN_0033c760(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  ulong __n;\n  wchar_t *__s1;\n  ulong uVar1;\n  ulong local_30;\n  \n  if (param_1 == param_2) {\n    return;\n  }\n  __s1 = (wchar_t *)*param_1;\n  __n = param_2[1];\n  if ((wchar_t *)(param_1 + 2) == __s1) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = param_1[2];\n  }\n  if (uVar1 < __n) {\n    local_30 = __n;\n    __s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);\n    if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {\n      FUN_00338a40();\n    }\n    *param_1 = (long)__s1;\n    param_1[2] = local_30;\n  }\n  if (__n != 0) {\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*param_1;\n    }\n  }\n  param_1[1] = __n;\n  __s1[__n] = L'\0';\n  return;\n}" { (declaration "ulong __n;" type_identifier identifier ;) (declaration "wchar_t *__s1;" type_identifier (pointer_declarator "*__s1" * identifier) ;) (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "ulong local_30;" type_identifier identifier ;) (if_statement "if (param_1 == param_2) {\n    return;\n  }" if (parenthesized_expression "(param_1 == param_2)" ( (binary_expression "param_1 == param_2" identifier == identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "__s1 = (wchar_t *)*param_1;" (assignment_expression "__s1 = (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 "__n = param_2[1];" (assignment_expression "__n = param_2[1]" identifier = (subscript_expression "param_2[1]" identifier [ number_literal ])) ;) (if_statement "if ((wchar_t *)(param_1 + 2) == __s1) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = param_1[2];\n  }" if (parenthesized_expression "((wchar_t *)(param_1 + 2) == __s1)" ( (binary_expression "(wchar_t *)(param_1 + 2) == __s1" (cast_expression "(wchar_t *)(param_1 + 2)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) ))) == identifier) )) (compound_statement "{\n    uVar1 = 3;\n  }" { (expression_statement "uVar1 = 3;" (assignment_expression "uVar1 = 3" identifier = number_literal) ;) }) (else_clause "else {\n    uVar1 = param_1[2];\n  }" else (compound_statement "{\n    uVar1 = param_1[2];\n  }" { (expression_statement "uVar1 = param_1[2];" (assignment_expression "uVar1 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) }))) (if_statement "if (uVar1 < __n) {\n    local_30 = __n;\n    __s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);\n    if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {\n      FUN_00338a40();\n    }\n    *param_1 = (long)__s1;\n    param_1[2] = local_30;\n  }" if (parenthesized_expression "(uVar1 < __n)" ( (binary_expression "uVar1 < __n" identifier < identifier) )) (compound_statement "{\n    local_30 = __n;\n    __s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);\n    if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {\n      FUN_00338a40();\n    }\n    *param_1 = (long)__s1;\n    param_1[2] = local_30;\n  }" { (expression_statement "local_30 = __n;" (assignment_expression "local_30 = __n" identifier = identifier) ;) (expression_statement "__s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);" (assignment_expression "__s1 = (wchar_t *)FUN_0033c450(param_1,&local_30)" identifier = (cast_expression "(wchar_t *)FUN_0033c450(param_1,&local_30)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0033c450(param_1,&local_30)" identifier (argument_list "(param_1,&local_30)" ( identifier , (pointer_expression "&local_30" & identifier) ))))) ;) (if_statement "if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {\n      FUN_00338a40();\n    }" if (parenthesized_expression "((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1)" ( (binary_expression "(wchar_t *)(param_1 + 2) != (wchar_t *)*param_1" (cast_expression "(wchar_t *)(param_1 + 2)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) ))) != (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) )) (compound_statement "{\n      FUN_00338a40();\n    }" { (expression_statement "FUN_00338a40();" (call_expression "FUN_00338a40()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "*param_1 = (long)__s1;" (assignment_expression "*param_1 = (long)__s1" (pointer_expression "*param_1" * identifier) = (cast_expression "(long)__s1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (expression_statement "param_1[2] = local_30;" (assignment_expression "param_1[2] = local_30" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) })) (if_statement "if (__n != 0) {\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*param_1;\n    }\n  }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*param_1;\n    }\n  }" { (if_statement "if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*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      __s1 = (wchar_t *)*param_1;\n    }" else (compound_statement "{\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*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 "__s1 = (wchar_t *)*param_1;" (assignment_expression "__s1 = (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_1[1] = __n;" (assignment_expression "param_1[1] = __n" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "__s1[__n] = L'\0';" (assignment_expression "__s1[__n] = L'\0'" (subscript_expression "__s1[__n]" identifier [ identifier ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (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 IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (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 IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( 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) ))) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * 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 = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) }))) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (char_literal L' escape_sequence ')) ;) (return_statement return ;) })))
(function_definition "void FUN_0033c760(long *param_1,long *param_2)\n\n{\n  ulong __n;\n  wchar_t *__s1;\n  ulong uVar1;\n  ulong local_30;\n  \n  if (param_1 == param_2) {\n    return;\n  }\n  __s1 = (wchar_t *)*param_1;\n  __n = param_2[1];\n  if ((wchar_t *)(param_1 + 2) == __s1) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = param_1[2];\n  }\n  if (uVar1 < __n) {\n    local_30 = __n;\n    __s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);\n    if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {\n      FUN_00338a40();\n    }\n    *param_1 = (long)__s1;\n    param_1[2] = local_30;\n  }\n  if (__n != 0) {\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*param_1;\n    }\n  }\n  param_1[1] = __n;\n  __s1[__n] = L'\0';\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0033c760(long *param_1,long *param_2)" (identifier "FUN_0033c760") (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  ulong __n;\n  wchar_t *__s1;\n  ulong uVar1;\n  ulong local_30;\n  \n  if (param_1 == param_2) {\n    return;\n  }\n  __s1 = (wchar_t *)*param_1;\n  __n = param_2[1];\n  if ((wchar_t *)(param_1 + 2) == __s1) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = param_1[2];\n  }\n  if (uVar1 < __n) {\n    local_30 = __n;\n    __s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);\n    if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {\n      FUN_00338a40();\n    }\n    *param_1 = (long)__s1;\n    param_1[2] = local_30;\n  }\n  if (__n != 0) {\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*param_1;\n    }\n  }\n  param_1[1] = __n;\n  __s1[__n] = L'\0';\n  return;\n}" ({ "{") (declaration "ulong __n;" (type_identifier "ulong") (identifier "__n") (; ";")) (declaration "wchar_t *__s1;" (type_identifier "wchar_t") (pointer_declarator "*__s1" (* "*") (identifier "__s1")) (; ";")) (declaration "ulong uVar1;" (type_identifier "ulong") (identifier "uVar1") (; ";")) (declaration "ulong local_30;" (type_identifier "ulong") (identifier "local_30") (; ";")) (if_statement "if (param_1 == param_2) {\n    return;\n  }" (if "if") (parenthesized_expression "(param_1 == param_2)" (( "(") (binary_expression "param_1 == param_2" (identifier "param_1") (== "==") (identifier "param_2")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "__s1 = (wchar_t *)*param_1;" (assignment_expression "__s1 = (wchar_t *)*param_1" (identifier "__s1") (= "=") (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 "__n = param_2[1];" (assignment_expression "__n = param_2[1]" (identifier "__n") (= "=") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if ((wchar_t *)(param_1 + 2) == __s1) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = param_1[2];\n  }" (if "if") (parenthesized_expression "((wchar_t *)(param_1 + 2) == __s1)" (( "(") (binary_expression "(wchar_t *)(param_1 + 2) == __s1" (cast_expression "(wchar_t *)(param_1 + 2)" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 2)" (( "(") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2")) () ")"))) (== "==") (identifier "__s1")) () ")")) (compound_statement "{\n    uVar1 = 3;\n  }" ({ "{") (expression_statement "uVar1 = 3;" (assignment_expression "uVar1 = 3" (identifier "uVar1") (= "=") (number_literal "3")) (; ";")) (} "}")) (else_clause "else {\n    uVar1 = param_1[2];\n  }" (else "else") (compound_statement "{\n    uVar1 = param_1[2];\n  }" ({ "{") (expression_statement "uVar1 = param_1[2];" (assignment_expression "uVar1 = param_1[2]" (identifier "uVar1") (= "=") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (} "}")))) (if_statement "if (uVar1 < __n) {\n    local_30 = __n;\n    __s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);\n    if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {\n      FUN_00338a40();\n    }\n    *param_1 = (long)__s1;\n    param_1[2] = local_30;\n  }" (if "if") (parenthesized_expression "(uVar1 < __n)" (( "(") (binary_expression "uVar1 < __n" (identifier "uVar1") (< "<") (identifier "__n")) () ")")) (compound_statement "{\n    local_30 = __n;\n    __s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);\n    if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {\n      FUN_00338a40();\n    }\n    *param_1 = (long)__s1;\n    param_1[2] = local_30;\n  }" ({ "{") (expression_statement "local_30 = __n;" (assignment_expression "local_30 = __n" (identifier "local_30") (= "=") (identifier "__n")) (; ";")) (expression_statement "__s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);" (assignment_expression "__s1 = (wchar_t *)FUN_0033c450(param_1,&local_30)" (identifier "__s1") (= "=") (cast_expression "(wchar_t *)FUN_0033c450(param_1,&local_30)" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0033c450(param_1,&local_30)" (identifier "FUN_0033c450") (argument_list "(param_1,&local_30)" (( "(") (identifier "param_1") (, ",") (pointer_expression "&local_30" (& "&") (identifier "local_30")) () ")"))))) (; ";")) (if_statement "if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {\n      FUN_00338a40();\n    }" (if "if") (parenthesized_expression "((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1)" (( "(") (binary_expression "(wchar_t *)(param_1 + 2) != (wchar_t *)*param_1" (cast_expression "(wchar_t *)(param_1 + 2)" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 2)" (( "(") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2")) () ")"))) (!= "!=") (cast_expression "(wchar_t *)*param_1" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) () ")")) (compound_statement "{\n      FUN_00338a40();\n    }" ({ "{") (expression_statement "FUN_00338a40();" (call_expression "FUN_00338a40()" (identifier "FUN_00338a40") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "*param_1 = (long)__s1;" (assignment_expression "*param_1 = (long)__s1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (cast_expression "(long)__s1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "__s1"))) (; ";")) (expression_statement "param_1[2] = local_30;" (assignment_expression "param_1[2] = local_30" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "local_30")) (; ";")) (} "}"))) (if_statement "if (__n != 0) {\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*param_1;\n    }\n  }" (if "if") (parenthesized_expression "(__n != 0)" (( "(") (binary_expression "__n != 0" (identifier "__n") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*param_1;\n    }\n  }" ({ "{") (if_statement "if (__n == 1) {\n      *__s1 = *(wchar_t *)*param_2;\n    }\n    else {\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*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      __s1 = (wchar_t *)*param_1;\n    }" (else "else") (compound_statement "{\n      wmemcpy(__s1,(wchar_t *)*param_2,__n);\n      __s1 = (wchar_t *)*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 "__s1 = (wchar_t *)*param_1;" (assignment_expression "__s1 = (wchar_t *)*param_1" (identifier "__s1") (= "=") (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_1[1] = __n;" (assignment_expression "param_1[1] = __n" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "__n")) (; ";")) (expression_statement "__s1[__n] = L'\0';" (assignment_expression "__s1[__n] = L'\0'" (subscript_expression "__s1[__n]" (identifier "__s1") ([ "[") (identifier "__n") (] "]")) (= "=") (char_literal "L'\0'" (L' "L'") (escape_sequence "\0") (' "'"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void __thiscall std::type_1::function_1(type_1 *var_1,type_1 *var_2)

{
  type_2 var_5;
  type_1 *var_3;
  type_2 var_4;
  type_2 local_30;
  
  if (var_1 == var_2) {
    return;
  }
  var_3 = *(type_1 **)var_1;
  var_5 = *(type_2 *)(var_2 + 8);
  if (var_1 + 0x10 == var_3) {
    var_4 = 3;
  }
  else {
    var_4 = *(type_2 *)(var_1 + 0x10);
  }
  if (var_4 < var_5) {
    local_30 = var_5;
    var_3 = (type_1 *)var_6(var_1,&local_30,var_4);
    if (var_1 + 0x10 != *(type_1 **)var_1) {
      var_7(*(type_1 **)var_1);
    }
    *(type_1 **)var_1 = var_3;
    *(type_2 *)(var_1 + 0x10) = local_30;
  }
  if (var_5 != 0) {
    if (var_5 == 1) {
      *(type_3 *)var_3 = **(type_3 **)var_2;
    }
    else {
      var_8((type_3 *)var_3,*(type_3 **)var_2,var_5);
      var_3 = *(type_1 **)var_1;
    }
  }
  *(type_2 *)(var_1 + 8) = var_5;
  *(type_4 *)(var_3 + var_5 * 4) = 0;
  return;
}


(translation_unit (function_definition type: (primitive_type) 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: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement))) (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: (subscript_expression argument: (identifier) index: (number_literal)))) (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: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (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: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (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: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))))))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (identifier)) right: (char_literal (escape_sequence)))) (return_statement))))

void MASKED(long *param_1,long *param_2)

{
  ulong __n;
  wchar_t *__s1;
  ulong uVar1;
  ulong local_30;
  
  if (param_1 == param_2) {
    return;
  }
  __s1 = (wchar_t *)*param_1;
  __n = param_2[1];
  if ((wchar_t *)(param_1 + 2) == __s1) {
    uVar1 = 3;
  }
  else {
    uVar1 = param_1[2];
  }
  if (uVar1 < __n) {
    local_30 = __n;
    __s1 = (wchar_t *)FUN_0033c450(param_1,&local_30);
    if ((wchar_t *)(param_1 + 2) != (wchar_t *)*param_1) {
      FUN_00338a40();
    }
    *param_1 = (long)__s1;
    param_1[2] = local_30;
  }
  if (__n != 0) {
    if (__n == 1) {
      *__s1 = *(wchar_t *)*param_2;
    }
    else {
      wmemcpy(__s1,(wchar_t *)*param_2,__n);
      __s1 = (wchar_t *)*param_1;
    }
  }
  param_1[1] = __n;
  __s1[__n] = L'\0';
  return;
}

