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

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

{
  wstring *pwVar1;
  uint uVar2;
  wchar_t wVar3;
  wchar_t *pwVar4;
  
  pwVar4 = *(wchar_t **)this;
  wVar3 = pwVar4[-3];
  if (0xffffffe < param_2) {
                    /* WARNING: Subroutine does not return */
    __throw_length_error("basic_string::assign");
  }
  if ((param_1 < pwVar4) || (pwVar4 + wVar3 < param_1)) {
LAB_0022feb3:
    pwVar1 = (wstring *)_M_replace_safe(this,0,wVar3,param_1,param_2);
    return pwVar1;
  }
  if (L'\0' < pwVar4[-1]) {
    wVar3 = *(wchar_t *)(*(int *)this + -0xc);
    goto LAB_0022feb3;
  }
  pwVar4 = *(wchar_t **)this;
  uVar2 = (int)param_1 - (int)pwVar4 >> 2;
  if (uVar2 < param_2) {
    if (uVar2 == 0) goto LAB_0022ff18;
    if (param_2 != 1) {
      if (param_2 != 0) {
        wmemmove(pwVar4,param_1,param_2);
        pwVar4 = *(wchar_t **)this;
      }
      goto LAB_0022ff18;
    }
  }
  else if (param_2 != 1) {
    if (param_2 != 0) {
      wmemcpy(pwVar4,param_1,param_2);
      pwVar4 = *(wchar_t **)this;
    }
    goto LAB_0022ff18;
  }
  *pwVar4 = *param_1;
LAB_0022ff18:
  if (pwVar4 + -3 == (wchar_t *)PTR__S_empty_rep_storage_0033ed74) {
    return this;
  }
  pwVar4[-1] = L'\0';
  pwVar4[-3] = param_2;
  pwVar4[param_2] = L'\0';
  return this;
}



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

uint * FUN_0022fe80(uint *param_1,wchar_t *param_2,wchar_t param_3)

{
  uint *puVar1;
  wchar_t wVar2;
  wchar_t *pwVar3;
  
  pwVar3 = (wchar_t *)*param_1;
  wVar2 = pwVar3[-3];
  if (0xffffffe < (uint)param_3) {
                    /* WARNING: Subroutine does not return */
    FUN_001f1e60("basic_string::assign");
  }
  if ((param_2 < pwVar3) || (pwVar3 + wVar2 < param_2)) {
LAB_0022feb3:
    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);
    return puVar1;
  }
  if (L'\0' < pwVar3[-1]) {
    wVar2 = *(wchar_t *)(*param_1 - 0xc);
    goto LAB_0022feb3;
  }
  pwVar3 = (wchar_t *)*param_1;
  wVar2 = (int)param_2 - (int)pwVar3 >> 2;
  if ((uint)wVar2 < (uint)param_3) {
    if (wVar2 == L'\0') goto LAB_0022ff18;
    if (param_3 != L'\x01') {
      if (param_3 != L'\0') {
        wmemmove(pwVar3,param_2,param_3);
        pwVar3 = (wchar_t *)*param_1;
      }
      goto LAB_0022ff18;
    }
  }
  else if (param_3 != L'\x01') {
    if (param_3 != L'\0') {
      wmemcpy(pwVar3,param_2,param_3);
      pwVar3 = (wchar_t *)*param_1;
    }
    goto LAB_0022ff18;
  }
  *pwVar3 = *param_2;
LAB_0022ff18:
  if (pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74) {
    return param_1;
  }
  pwVar3[-1] = L'\0';
  pwVar3[-3] = param_3;
  pwVar3[param_3] = L'\0';
  return param_1;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00035680
ADD EBX,0x10f177
SUB ESP,0xc
MOV ESI,dword ptr [ESP + 0x20]
MOV EDI,dword ptr [ESP + 0x28]
MOV EDX,dword ptr [ESP + 0x24]
MOV EAX,dword ptr [ESI]
MOV ECX,dword ptr [EAX + -0xc]
CMP EDI,0xffffffe
JA 0x0022ff66
CMP EAX,EDX
JBE 0x0022fed0
SUB ESP,0xc
PUSH EDI
PUSH EDX
PUSH ECX
PUSH 0x0
PUSH ESI
CALL 0x0022fe00
ADD ESP,0x20
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EBP,[EAX + ECX*0x4]
CMP EDX,EBP
JA 0x0022feb3
MOV EAX,dword ptr [EAX + -0x4]
TEST EAX,EAX
JLE 0x0022fee8
MOV EAX,dword ptr [ESI]
MOV ECX,dword ptr [EAX + -0xc]
JMP 0x0022feb3
MOV ECX,dword ptr [ESI]
MOV EAX,EDX
SUB EAX,ECX
SAR EAX,0x2
CMP EDI,EAX
JBE 0x0022ff40
TEST EAX,EAX
JZ 0x0022ff18
CMP EDI,0x1
JZ 0x0022ff60
TEST EDI,EDI
JZ 0x0022ff18
SUB ESP,0x4
PUSH EDI
PUSH EDX
PUSH ECX
CALL 0x00028270
MOV ECX,dword ptr [ESI]
ADD ESP,0x10
LEA ESI,[ESI]
LEA EDX,[ECX + -0xc]
MOV EAX,ESI
CMP EDX,dword ptr [EBX + 0xfffffd74]
JZ 0x0022fec4
MOV dword ptr [ECX + -0x4],0x0
MOV dword ptr [ECX + -0xc],EDI
MOV dword ptr [ECX + EDI*0x4],0x0
JMP 0x0022fec4
CMP EDI,0x1
JZ 0x0022ff60
TEST EDI,EDI
JZ 0x0022ff18
SUB ESP,0x4
PUSH EDI
PUSH EDX
PUSH ECX
CALL 0x00028380
MOV ECX,dword ptr [ESI]
ADD ESP,0x10
JMP 0x0022ff18
MOV EAX,dword ptr [EDX]
MOV dword ptr [ECX],EAX
JMP 0x0022ff18
SUB ESP,0xc
LEA EAX,[EBX + 0xfff2d6c1]
PUSH EAX
CALL 0x001f1e60
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint * FUN_0022fe80(uint *param_1,wchar_t *param_2,wchar_t param_3)\n\n{\n  uint *puVar1;\n  wchar_t wVar2;\n  wchar_t *pwVar3;\n  \n  pwVar3 = (wchar_t *)*param_1;\n  wVar2 = pwVar3[-3];\n  if (0xffffffe < (uint)param_3) {\n                    /* WARNING: Subroutine does not return */\n    FUN_001f1e60("basic_string::assign");\n  }\n  if ((param_2 < pwVar3) || (pwVar3 + wVar2 < param_2)) {\nLAB_0022feb3:\n    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);\n    return puVar1;\n  }\n  if (L'\0' < pwVar3[-1]) {\n    wVar2 = *(wchar_t *)(*param_1 - 0xc);\n    goto LAB_0022feb3;\n  }\n  pwVar3 = (wchar_t *)*param_1;\n  wVar2 = (int)param_2 - (int)pwVar3 >> 2;\n  if ((uint)wVar2 < (uint)param_3) {\n    if (wVar2 == L'\0') goto LAB_0022ff18;\n    if (param_3 != L'\x01') {\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }\n  }\n  else if (param_3 != L'\x01') {\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }\n  *pwVar3 = *param_2;\nLAB_0022ff18:\n  if (pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74) {\n    return param_1;\n  }\n  pwVar3[-1] = L'\0';\n  pwVar3[-3] = param_3;\n  pwVar3[param_3] = L'\0';\n  return param_1;\n}\n\n" comment (function_definition "uint * FUN_0022fe80(uint *param_1,wchar_t *param_2,wchar_t param_3)\n\n{\n  uint *puVar1;\n  wchar_t wVar2;\n  wchar_t *pwVar3;\n  \n  pwVar3 = (wchar_t *)*param_1;\n  wVar2 = pwVar3[-3];\n  if (0xffffffe < (uint)param_3) {\n                    /* WARNING: Subroutine does not return */\n    FUN_001f1e60("basic_string::assign");\n  }\n  if ((param_2 < pwVar3) || (pwVar3 + wVar2 < param_2)) {\nLAB_0022feb3:\n    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);\n    return puVar1;\n  }\n  if (L'\0' < pwVar3[-1]) {\n    wVar2 = *(wchar_t *)(*param_1 - 0xc);\n    goto LAB_0022feb3;\n  }\n  pwVar3 = (wchar_t *)*param_1;\n  wVar2 = (int)param_2 - (int)pwVar3 >> 2;\n  if ((uint)wVar2 < (uint)param_3) {\n    if (wVar2 == L'\0') goto LAB_0022ff18;\n    if (param_3 != L'\x01') {\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }\n  }\n  else if (param_3 != L'\x01') {\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }\n  *pwVar3 = *param_2;\nLAB_0022ff18:\n  if (pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74) {\n    return param_1;\n  }\n  pwVar3[-1] = L'\0';\n  pwVar3[-3] = param_3;\n  pwVar3[param_3] = L'\0';\n  return param_1;\n}" type_identifier (pointer_declarator "* FUN_0022fe80(uint *param_1,wchar_t *param_2,wchar_t param_3)" * (function_declarator "FUN_0022fe80(uint *param_1,wchar_t *param_2,wchar_t param_3)" identifier (parameter_list "(uint *param_1,wchar_t *param_2,wchar_t param_3)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "wchar_t param_3" type_identifier identifier) )))) (compound_statement "{\n  uint *puVar1;\n  wchar_t wVar2;\n  wchar_t *pwVar3;\n  \n  pwVar3 = (wchar_t *)*param_1;\n  wVar2 = pwVar3[-3];\n  if (0xffffffe < (uint)param_3) {\n                    /* WARNING: Subroutine does not return */\n    FUN_001f1e60("basic_string::assign");\n  }\n  if ((param_2 < pwVar3) || (pwVar3 + wVar2 < param_2)) {\nLAB_0022feb3:\n    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);\n    return puVar1;\n  }\n  if (L'\0' < pwVar3[-1]) {\n    wVar2 = *(wchar_t *)(*param_1 - 0xc);\n    goto LAB_0022feb3;\n  }\n  pwVar3 = (wchar_t *)*param_1;\n  wVar2 = (int)param_2 - (int)pwVar3 >> 2;\n  if ((uint)wVar2 < (uint)param_3) {\n    if (wVar2 == L'\0') goto LAB_0022ff18;\n    if (param_3 != L'\x01') {\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }\n  }\n  else if (param_3 != L'\x01') {\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }\n  *pwVar3 = *param_2;\nLAB_0022ff18:\n  if (pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74) {\n    return param_1;\n  }\n  pwVar3[-1] = L'\0';\n  pwVar3[-3] = param_3;\n  pwVar3[param_3] = L'\0';\n  return param_1;\n}" { (declaration "uint *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "wchar_t wVar2;" type_identifier identifier ;) (declaration "wchar_t *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "wVar2 = pwVar3[-3];" (assignment_expression "wVar2 = pwVar3[-3]" identifier = (subscript_expression "pwVar3[-3]" identifier [ number_literal ])) ;) (if_statement "if (0xffffffe < (uint)param_3) {\n                    /* WARNING: Subroutine does not return */\n    FUN_001f1e60("basic_string::assign");\n  }" if (parenthesized_expression "(0xffffffe < (uint)param_3)" ( (binary_expression "0xffffffe < (uint)param_3" number_literal < (cast_expression "(uint)param_3" ( (type_descriptor "uint" type_identifier) ) identifier)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_001f1e60("basic_string::assign");\n  }" { comment (expression_statement "FUN_001f1e60("basic_string::assign");" (call_expression "FUN_001f1e60("basic_string::assign")" identifier (argument_list "("basic_string::assign")" ( (string_literal ""basic_string::assign"" " string_content ") ))) ;) })) (if_statement "if ((param_2 < pwVar3) || (pwVar3 + wVar2 < param_2)) {\nLAB_0022feb3:\n    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);\n    return puVar1;\n  }" if (parenthesized_expression "((param_2 < pwVar3) || (pwVar3 + wVar2 < param_2))" ( (binary_expression "(param_2 < pwVar3) || (pwVar3 + wVar2 < param_2)" (parenthesized_expression "(param_2 < pwVar3)" ( (binary_expression "param_2 < pwVar3" identifier < identifier) )) || (parenthesized_expression "(pwVar3 + wVar2 < param_2)" ( (binary_expression "pwVar3 + wVar2 < param_2" (binary_expression "pwVar3 + wVar2" identifier + identifier) < identifier) ))) )) (compound_statement "{\nLAB_0022feb3:\n    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);\n    return puVar1;\n  }" { (labeled_statement "LAB_0022feb3:\n    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);" statement_identifier : (expression_statement "puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);" (assignment_expression "puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3)" identifier = (cast_expression "(uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0022fe00(param_1,0,wVar2,param_2,param_3)" identifier (argument_list "(param_1,0,wVar2,param_2,param_3)" ( identifier , number_literal , identifier , identifier , identifier ))))) ;)) (return_statement "return puVar1;" return identifier ;) })) (if_statement "if (L'\0' < pwVar3[-1]) {\n    wVar2 = *(wchar_t *)(*param_1 - 0xc);\n    goto LAB_0022feb3;\n  }" if (parenthesized_expression "(L'\0' < pwVar3[-1])" ( (binary_expression "L'\0' < pwVar3[-1]" (char_literal "L'\0'" L' escape_sequence ') < (subscript_expression "pwVar3[-1]" identifier [ number_literal ])) )) (compound_statement "{\n    wVar2 = *(wchar_t *)(*param_1 - 0xc);\n    goto LAB_0022feb3;\n  }" { (expression_statement "wVar2 = *(wchar_t *)(*param_1 - 0xc);" (assignment_expression "wVar2 = *(wchar_t *)(*param_1 - 0xc)" identifier = (pointer_expression "*(wchar_t *)(*param_1 - 0xc)" * (cast_expression "(wchar_t *)(*param_1 - 0xc)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 - 0xc)" ( (binary_expression "*param_1 - 0xc" (pointer_expression "*param_1" * identifier) - number_literal) ))))) ;) (goto_statement "goto LAB_0022feb3;" goto statement_identifier ;) })) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "wVar2 = (int)param_2 - (int)pwVar3 >> 2;" (assignment_expression "wVar2 = (int)param_2 - (int)pwVar3 >> 2" identifier = (binary_expression "(int)param_2 - (int)pwVar3 >> 2" (binary_expression "(int)param_2 - (int)pwVar3" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pwVar3" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ;) (if_statement "if ((uint)wVar2 < (uint)param_3) {\n    if (wVar2 == L'\0') goto LAB_0022ff18;\n    if (param_3 != L'\x01') {\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }\n  }\n  else if (param_3 != L'\x01') {\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }" if (parenthesized_expression "((uint)wVar2 < (uint)param_3)" ( (binary_expression "(uint)wVar2 < (uint)param_3" (cast_expression "(uint)wVar2" ( (type_descriptor "uint" type_identifier) ) identifier) < (cast_expression "(uint)param_3" ( (type_descriptor "uint" type_identifier) ) identifier)) )) (compound_statement "{\n    if (wVar2 == L'\0') goto LAB_0022ff18;\n    if (param_3 != L'\x01') {\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }\n  }" { (if_statement "if (wVar2 == L'\0') goto LAB_0022ff18;" if (parenthesized_expression "(wVar2 == L'\0')" ( (binary_expression "wVar2 == L'\0'" identifier == (char_literal "L'\0'" L' escape_sequence ')) )) (goto_statement "goto LAB_0022ff18;" goto statement_identifier ;)) (if_statement "if (param_3 != L'\x01') {\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }" if (parenthesized_expression "(param_3 != L'\x01')" ( (binary_expression "param_3 != L'\x01'" identifier != (char_literal "L'\x01'" L' escape_sequence ')) )) (compound_statement "{\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }" { (if_statement "if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }" if (parenthesized_expression "(param_3 != L'\0')" ( (binary_expression "param_3 != L'\0'" identifier != (char_literal "L'\0'" L' escape_sequence ')) )) (compound_statement "{\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }" { (expression_statement "wmemmove(pwVar3,param_2,param_3);" (call_expression "wmemmove(pwVar3,param_2,param_3)" identifier (argument_list "(pwVar3,param_2,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (goto_statement "goto LAB_0022ff18;" goto statement_identifier ;) })) }) (else_clause "else if (param_3 != L'\x01') {\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }" else (if_statement "if (param_3 != L'\x01') {\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }" if (parenthesized_expression "(param_3 != L'\x01')" ( (binary_expression "param_3 != L'\x01'" identifier != (char_literal "L'\x01'" L' escape_sequence ')) )) (compound_statement "{\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }" { (if_statement "if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }" if (parenthesized_expression "(param_3 != L'\0')" ( (binary_expression "param_3 != L'\0'" identifier != (char_literal "L'\0'" L' escape_sequence ')) )) (compound_statement "{\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }" { (expression_statement "wmemcpy(pwVar3,param_2,param_3);" (call_expression "wmemcpy(pwVar3,param_2,param_3)" identifier (argument_list "(pwVar3,param_2,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (goto_statement "goto LAB_0022ff18;" goto statement_identifier ;) })))) (expression_statement "*pwVar3 = *param_2;" (assignment_expression "*pwVar3 = *param_2" (pointer_expression "*pwVar3" * identifier) = (pointer_expression "*param_2" * identifier)) ;) (labeled_statement "LAB_0022ff18:\n  if (pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74) {\n    return param_1;\n  }" statement_identifier : (if_statement "if (pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74) {\n    return param_1;\n  }" if (parenthesized_expression "(pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74)" ( (binary_expression "pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74" (binary_expression "pwVar3 + -3" identifier + number_literal) == (cast_expression "(wchar_t *)PTR_DAT_0033ed74" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    return param_1;\n  }" { (return_statement "return param_1;" return identifier ;) }))) (expression_statement "pwVar3[-1] = L'\0';" (assignment_expression "pwVar3[-1] = L'\0'" (subscript_expression "pwVar3[-1]" identifier [ number_literal ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (expression_statement "pwVar3[-3] = param_3;" (assignment_expression "pwVar3[-3] = param_3" (subscript_expression "pwVar3[-3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "pwVar3[param_3] = L'\0';" (assignment_expression "pwVar3[param_3] = L'\0'" (subscript_expression "pwVar3[param_3]" identifier [ identifier ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::wstring::assign(wchar_t const*, unsigned int) */\n\nwstring * __thiscall std::wstring::assign(wstring *this,wchar_t *param_1,uint param_2)\n\n{\n  wstring *pwVar1;\n  uint uVar2;\n  wchar_t wVar3;\n  wchar_t *pwVar4;\n  \n  pwVar4 = *(wchar_t **)this;\n  wVar3 = pwVar4[-3];\n  if (0xffffffe < param_2) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::assign");\n  }\n  if ((param_1 < pwVar4) || (pwVar4 + wVar3 < param_1)) {\nLAB_0022feb3:\n    pwVar1 = (wstring *)_M_replace_safe(this,0,wVar3,param_1,param_2);\n    return pwVar1;\n  }\n  if (L'\0' < pwVar4[-1]) {\n    wVar3 = *(wchar_t *)(*(int *)this + -0xc);\n    goto LAB_0022feb3;\n  }\n  pwVar4 = *(wchar_t **)this;\n  uVar2 = (int)param_1 - (int)pwVar4 >> 2;\n  if (uVar2 < param_2) {\n    if (uVar2 == 0) goto LAB_0022ff18;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        wmemmove(pwVar4,param_1,param_2);\n        pwVar4 = *(wchar_t **)this;\n      }\n      goto LAB_0022ff18;\n    }\n  }\n  else if (param_2 != 1) {\n    if (param_2 != 0) {\n      wmemcpy(pwVar4,param_1,param_2);\n      pwVar4 = *(wchar_t **)this;\n    }\n    goto LAB_0022ff18;\n  }\n  *pwVar4 = *param_1;\nLAB_0022ff18:\n  if (pwVar4 + -3 == (wchar_t *)PTR__S_empty_rep_storage_0033ed74) {\n    return this;\n  }\n  pwVar4[-1] = L'\0';\n  pwVar4[-3] = param_2;\n  pwVar4[param_2] = L'\0';\n  return this;\n}\n\n" comment comment (ERROR "wstring * __thiscall std::wstring::assign(wstring *this,wchar_t *param_1,uint param_2)" (binary_expression "wstring * __thiscall std::wstring::assign(wstring *this" (binary_expression "wstring * __thiscall" identifier * identifier) (ERROR "std::wstring::assign(wstring" identifier : : identifier : : identifier ( identifier) * identifier) , type_identifier (pointer_declarator "*param_1" * identifier) , identifier identifier )) (compound_statement "{\n  wstring *pwVar1;\n  uint uVar2;\n  wchar_t wVar3;\n  wchar_t *pwVar4;\n  \n  pwVar4 = *(wchar_t **)this;\n  wVar3 = pwVar4[-3];\n  if (0xffffffe < param_2) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::assign");\n  }\n  if ((param_1 < pwVar4) || (pwVar4 + wVar3 < param_1)) {\nLAB_0022feb3:\n    pwVar1 = (wstring *)_M_replace_safe(this,0,wVar3,param_1,param_2);\n    return pwVar1;\n  }\n  if (L'\0' < pwVar4[-1]) {\n    wVar3 = *(wchar_t *)(*(int *)this + -0xc);\n    goto LAB_0022feb3;\n  }\n  pwVar4 = *(wchar_t **)this;\n  uVar2 = (int)param_1 - (int)pwVar4 >> 2;\n  if (uVar2 < param_2) {\n    if (uVar2 == 0) goto LAB_0022ff18;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        wmemmove(pwVar4,param_1,param_2);\n        pwVar4 = *(wchar_t **)this;\n      }\n      goto LAB_0022ff18;\n    }\n  }\n  else if (param_2 != 1) {\n    if (param_2 != 0) {\n      wmemcpy(pwVar4,param_1,param_2);\n      pwVar4 = *(wchar_t **)this;\n    }\n    goto LAB_0022ff18;\n  }\n  *pwVar4 = *param_1;\nLAB_0022ff18:\n  if (pwVar4 + -3 == (wchar_t *)PTR__S_empty_rep_storage_0033ed74) {\n    return this;\n  }\n  pwVar4[-1] = L'\0';\n  pwVar4[-3] = param_2;\n  pwVar4[param_2] = L'\0';\n  return this;\n}" { (declaration "wstring *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "wchar_t wVar3;" type_identifier identifier ;) (declaration "wchar_t *pwVar4;" type_identifier (pointer_declarator "*pwVar4" * identifier) ;) (expression_statement "pwVar4 = *(wchar_t **)this;" (assignment_expression "pwVar4 = *(wchar_t **)this" identifier = (pointer_expression "*(wchar_t **)this" * (cast_expression "(wchar_t **)this" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "wVar3 = pwVar4[-3];" (assignment_expression "wVar3 = pwVar4[-3]" identifier = (subscript_expression "pwVar4[-3]" identifier [ number_literal ])) ;) (if_statement "if (0xffffffe < param_2) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::assign");\n  }" if (parenthesized_expression "(0xffffffe < param_2)" ( (binary_expression "0xffffffe < param_2" number_literal < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::assign");\n  }" { comment (expression_statement "__throw_length_error("basic_string::assign");" (call_expression "__throw_length_error("basic_string::assign")" identifier (argument_list "("basic_string::assign")" ( (string_literal ""basic_string::assign"" " string_content ") ))) ;) })) (if_statement "if ((param_1 < pwVar4) || (pwVar4 + wVar3 < param_1)) {\nLAB_0022feb3:\n    pwVar1 = (wstring *)_M_replace_safe(this,0,wVar3,param_1,param_2);\n    return pwVar1;\n  }" if (parenthesized_expression "((param_1 < pwVar4) || (pwVar4 + wVar3 < param_1))" ( (binary_expression "(param_1 < pwVar4) || (pwVar4 + wVar3 < param_1)" (parenthesized_expression "(param_1 < pwVar4)" ( (binary_expression "param_1 < pwVar4" identifier < identifier) )) || (parenthesized_expression "(pwVar4 + wVar3 < param_1)" ( (binary_expression "pwVar4 + wVar3 < param_1" (binary_expression "pwVar4 + wVar3" identifier + identifier) < identifier) ))) )) (compound_statement "{\nLAB_0022feb3:\n    pwVar1 = (wstring *)_M_replace_safe(this,0,wVar3,param_1,param_2);\n    return pwVar1;\n  }" { (labeled_statement "LAB_0022feb3:\n    pwVar1 = (wstring *)_M_replace_safe(this,0,wVar3,param_1,param_2);" statement_identifier : (expression_statement "pwVar1 = (wstring *)_M_replace_safe(this,0,wVar3,param_1,param_2);" (assignment_expression "pwVar1 = (wstring *)_M_replace_safe(this,0,wVar3,param_1,param_2)" identifier = (cast_expression "(wstring *)_M_replace_safe(this,0,wVar3,param_1,param_2)" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "_M_replace_safe(this,0,wVar3,param_1,param_2)" identifier (argument_list "(this,0,wVar3,param_1,param_2)" ( identifier , number_literal , identifier , identifier , identifier ))))) ;)) (return_statement "return pwVar1;" return identifier ;) })) (if_statement "if (L'\0' < pwVar4[-1]) {\n    wVar3 = *(wchar_t *)(*(int *)this + -0xc);\n    goto LAB_0022feb3;\n  }" if (parenthesized_expression "(L'\0' < pwVar4[-1])" ( (binary_expression "L'\0' < pwVar4[-1]" (char_literal "L'\0'" L' escape_sequence ') < (subscript_expression "pwVar4[-1]" identifier [ number_literal ])) )) (compound_statement "{\n    wVar3 = *(wchar_t *)(*(int *)this + -0xc);\n    goto LAB_0022feb3;\n  }" { (expression_statement "wVar3 = *(wchar_t *)(*(int *)this + -0xc);" (assignment_expression "wVar3 = *(wchar_t *)(*(int *)this + -0xc)" identifier = (pointer_expression "*(wchar_t *)(*(int *)this + -0xc)" * (cast_expression "(wchar_t *)(*(int *)this + -0xc)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + -0xc)" ( (binary_expression "*(int *)this + -0xc" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) ;) (goto_statement "goto LAB_0022feb3;" goto statement_identifier ;) })) (expression_statement "pwVar4 = *(wchar_t **)this;" (assignment_expression "pwVar4 = *(wchar_t **)this" identifier = (pointer_expression "*(wchar_t **)this" * (cast_expression "(wchar_t **)this" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "uVar2 = (int)param_1 - (int)pwVar4 >> 2;" (assignment_expression "uVar2 = (int)param_1 - (int)pwVar4 >> 2" identifier = (binary_expression "(int)param_1 - (int)pwVar4 >> 2" (binary_expression "(int)param_1 - (int)pwVar4" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pwVar4" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ;) (if_statement "if (uVar2 < param_2) {\n    if (uVar2 == 0) goto LAB_0022ff18;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        wmemmove(pwVar4,param_1,param_2);\n        pwVar4 = *(wchar_t **)this;\n      }\n      goto LAB_0022ff18;\n    }\n  }\n  else if (param_2 != 1) {\n    if (param_2 != 0) {\n      wmemcpy(pwVar4,param_1,param_2);\n      pwVar4 = *(wchar_t **)this;\n    }\n    goto LAB_0022ff18;\n  }" if (parenthesized_expression "(uVar2 < param_2)" ( (binary_expression "uVar2 < param_2" identifier < identifier) )) (compound_statement "{\n    if (uVar2 == 0) goto LAB_0022ff18;\n    if (param_2 != 1) {\n      if (param_2 != 0) {\n        wmemmove(pwVar4,param_1,param_2);\n        pwVar4 = *(wchar_t **)this;\n      }\n      goto LAB_0022ff18;\n    }\n  }" { (if_statement "if (uVar2 == 0) goto LAB_0022ff18;" if (parenthesized_expression "(uVar2 == 0)" ( (binary_expression "uVar2 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0022ff18;" goto statement_identifier ;)) (if_statement "if (param_2 != 1) {\n      if (param_2 != 0) {\n        wmemmove(pwVar4,param_1,param_2);\n        pwVar4 = *(wchar_t **)this;\n      }\n      goto LAB_0022ff18;\n    }" if (parenthesized_expression "(param_2 != 1)" ( (binary_expression "param_2 != 1" identifier != number_literal) )) (compound_statement "{\n      if (param_2 != 0) {\n        wmemmove(pwVar4,param_1,param_2);\n        pwVar4 = *(wchar_t **)this;\n      }\n      goto LAB_0022ff18;\n    }" { (if_statement "if (param_2 != 0) {\n        wmemmove(pwVar4,param_1,param_2);\n        pwVar4 = *(wchar_t **)this;\n      }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n        wmemmove(pwVar4,param_1,param_2);\n        pwVar4 = *(wchar_t **)this;\n      }" { (expression_statement "wmemmove(pwVar4,param_1,param_2);" (call_expression "wmemmove(pwVar4,param_1,param_2)" identifier (argument_list "(pwVar4,param_1,param_2)" ( identifier , identifier , identifier ))) ;) (expression_statement "pwVar4 = *(wchar_t **)this;" (assignment_expression "pwVar4 = *(wchar_t **)this" identifier = (pointer_expression "*(wchar_t **)this" * (cast_expression "(wchar_t **)this" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })) (goto_statement "goto LAB_0022ff18;" goto statement_identifier ;) })) }) (else_clause "else if (param_2 != 1) {\n    if (param_2 != 0) {\n      wmemcpy(pwVar4,param_1,param_2);\n      pwVar4 = *(wchar_t **)this;\n    }\n    goto LAB_0022ff18;\n  }" else (if_statement "if (param_2 != 1) {\n    if (param_2 != 0) {\n      wmemcpy(pwVar4,param_1,param_2);\n      pwVar4 = *(wchar_t **)this;\n    }\n    goto LAB_0022ff18;\n  }" if (parenthesized_expression "(param_2 != 1)" ( (binary_expression "param_2 != 1" identifier != number_literal) )) (compound_statement "{\n    if (param_2 != 0) {\n      wmemcpy(pwVar4,param_1,param_2);\n      pwVar4 = *(wchar_t **)this;\n    }\n    goto LAB_0022ff18;\n  }" { (if_statement "if (param_2 != 0) {\n      wmemcpy(pwVar4,param_1,param_2);\n      pwVar4 = *(wchar_t **)this;\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n      wmemcpy(pwVar4,param_1,param_2);\n      pwVar4 = *(wchar_t **)this;\n    }" { (expression_statement "wmemcpy(pwVar4,param_1,param_2);" (call_expression "wmemcpy(pwVar4,param_1,param_2)" identifier (argument_list "(pwVar4,param_1,param_2)" ( identifier , identifier , identifier ))) ;) (expression_statement "pwVar4 = *(wchar_t **)this;" (assignment_expression "pwVar4 = *(wchar_t **)this" identifier = (pointer_expression "*(wchar_t **)this" * (cast_expression "(wchar_t **)this" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })) (goto_statement "goto LAB_0022ff18;" goto statement_identifier ;) })))) (expression_statement "*pwVar4 = *param_1;" (assignment_expression "*pwVar4 = *param_1" (pointer_expression "*pwVar4" * identifier) = (pointer_expression "*param_1" * identifier)) ;) (labeled_statement "LAB_0022ff18:\n  if (pwVar4 + -3 == (wchar_t *)PTR__S_empty_rep_storage_0033ed74) {\n    return this;\n  }" statement_identifier : (if_statement "if (pwVar4 + -3 == (wchar_t *)PTR__S_empty_rep_storage_0033ed74) {\n    return this;\n  }" if (parenthesized_expression "(pwVar4 + -3 == (wchar_t *)PTR__S_empty_rep_storage_0033ed74)" ( (binary_expression "pwVar4 + -3 == (wchar_t *)PTR__S_empty_rep_storage_0033ed74" (binary_expression "pwVar4 + -3" identifier + number_literal) == (cast_expression "(wchar_t *)PTR__S_empty_rep_storage_0033ed74" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    return this;\n  }" { (return_statement "return this;" return identifier ;) }))) (expression_statement "pwVar4[-1] = L'\0';" (assignment_expression "pwVar4[-1] = L'\0'" (subscript_expression "pwVar4[-1]" identifier [ number_literal ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (expression_statement "pwVar4[-3] = param_2;" (assignment_expression "pwVar4[-3] = param_2" (subscript_expression "pwVar4[-3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "pwVar4[param_2] = L'\0';" (assignment_expression "pwVar4[param_2] = L'\0'" (subscript_expression "pwVar4[param_2]" identifier [ identifier ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (return_statement "return this;" return identifier ;) }))
(translation_unit "uint * FUN_0022fe80(uint *param_1,wchar_t *param_2,wchar_t param_3)\n\n{\n  uint *puVar1;\n  wchar_t wVar2;\n  wchar_t *pwVar3;\n  \n  pwVar3 = (wchar_t *)*param_1;\n  wVar2 = pwVar3[-3];\n  if (0xffffffe < (uint)param_3) {\n                    \n    FUN_001f1e60("basic_string::assign");\n  }\n  if ((param_2 < pwVar3) || (pwVar3 + wVar2 < param_2)) {\nLAB_0022feb3:\n    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);\n    return puVar1;\n  }\n  if (L'\0' < pwVar3[-1]) {\n    wVar2 = *(wchar_t *)(*param_1 - 0xc);\n    goto LAB_0022feb3;\n  }\n  pwVar3 = (wchar_t *)*param_1;\n  wVar2 = (int)param_2 - (int)pwVar3 >> 2;\n  if ((uint)wVar2 < (uint)param_3) {\n    if (wVar2 == L'\0') goto LAB_0022ff18;\n    if (param_3 != L'\x01') {\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }\n  }\n  else if (param_3 != L'\x01') {\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }\n  *pwVar3 = *param_2;\nLAB_0022ff18:\n  if (pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74) {\n    return param_1;\n  }\n  pwVar3[-1] = L'\0';\n  pwVar3[-3] = param_3;\n  pwVar3[param_3] = L'\0';\n  return param_1;\n}\n\n" (function_definition "uint * FUN_0022fe80(uint *param_1,wchar_t *param_2,wchar_t param_3)\n\n{\n  uint *puVar1;\n  wchar_t wVar2;\n  wchar_t *pwVar3;\n  \n  pwVar3 = (wchar_t *)*param_1;\n  wVar2 = pwVar3[-3];\n  if (0xffffffe < (uint)param_3) {\n                    \n    FUN_001f1e60("basic_string::assign");\n  }\n  if ((param_2 < pwVar3) || (pwVar3 + wVar2 < param_2)) {\nLAB_0022feb3:\n    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);\n    return puVar1;\n  }\n  if (L'\0' < pwVar3[-1]) {\n    wVar2 = *(wchar_t *)(*param_1 - 0xc);\n    goto LAB_0022feb3;\n  }\n  pwVar3 = (wchar_t *)*param_1;\n  wVar2 = (int)param_2 - (int)pwVar3 >> 2;\n  if ((uint)wVar2 < (uint)param_3) {\n    if (wVar2 == L'\0') goto LAB_0022ff18;\n    if (param_3 != L'\x01') {\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }\n  }\n  else if (param_3 != L'\x01') {\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }\n  *pwVar3 = *param_2;\nLAB_0022ff18:\n  if (pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74) {\n    return param_1;\n  }\n  pwVar3[-1] = L'\0';\n  pwVar3[-3] = param_3;\n  pwVar3[param_3] = L'\0';\n  return param_1;\n}" type_identifier (pointer_declarator "* FUN_0022fe80(uint *param_1,wchar_t *param_2,wchar_t param_3)" * (function_declarator "FUN_0022fe80(uint *param_1,wchar_t *param_2,wchar_t param_3)" identifier (parameter_list "(uint *param_1,wchar_t *param_2,wchar_t param_3)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "wchar_t param_3" type_identifier identifier) )))) (compound_statement "{\n  uint *puVar1;\n  wchar_t wVar2;\n  wchar_t *pwVar3;\n  \n  pwVar3 = (wchar_t *)*param_1;\n  wVar2 = pwVar3[-3];\n  if (0xffffffe < (uint)param_3) {\n                    \n    FUN_001f1e60("basic_string::assign");\n  }\n  if ((param_2 < pwVar3) || (pwVar3 + wVar2 < param_2)) {\nLAB_0022feb3:\n    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);\n    return puVar1;\n  }\n  if (L'\0' < pwVar3[-1]) {\n    wVar2 = *(wchar_t *)(*param_1 - 0xc);\n    goto LAB_0022feb3;\n  }\n  pwVar3 = (wchar_t *)*param_1;\n  wVar2 = (int)param_2 - (int)pwVar3 >> 2;\n  if ((uint)wVar2 < (uint)param_3) {\n    if (wVar2 == L'\0') goto LAB_0022ff18;\n    if (param_3 != L'\x01') {\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }\n  }\n  else if (param_3 != L'\x01') {\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }\n  *pwVar3 = *param_2;\nLAB_0022ff18:\n  if (pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74) {\n    return param_1;\n  }\n  pwVar3[-1] = L'\0';\n  pwVar3[-3] = param_3;\n  pwVar3[param_3] = L'\0';\n  return param_1;\n}" { (declaration "uint *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "wchar_t wVar2;" type_identifier identifier ;) (declaration "wchar_t *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "wVar2 = pwVar3[-3];" (assignment_expression "wVar2 = pwVar3[-3]" identifier = (subscript_expression "pwVar3[-3]" identifier [ number_literal ])) ;) (if_statement "if (0xffffffe < (uint)param_3) {\n                    \n    FUN_001f1e60("basic_string::assign");\n  }" if (parenthesized_expression "(0xffffffe < (uint)param_3)" ( (binary_expression "0xffffffe < (uint)param_3" number_literal < (cast_expression "(uint)param_3" ( (type_descriptor "uint" type_identifier) ) identifier)) )) (compound_statement "{\n                    \n    FUN_001f1e60("basic_string::assign");\n  }" { (expression_statement "FUN_001f1e60("basic_string::assign");" (call_expression "FUN_001f1e60("basic_string::assign")" identifier (argument_list "("basic_string::assign")" ( (string_literal ""basic_string::assign"" " string_content ") ))) ;) })) (if_statement "if ((param_2 < pwVar3) || (pwVar3 + wVar2 < param_2)) {\nLAB_0022feb3:\n    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);\n    return puVar1;\n  }" if (parenthesized_expression "((param_2 < pwVar3) || (pwVar3 + wVar2 < param_2))" ( (binary_expression "(param_2 < pwVar3) || (pwVar3 + wVar2 < param_2)" (parenthesized_expression "(param_2 < pwVar3)" ( (binary_expression "param_2 < pwVar3" identifier < identifier) )) || (parenthesized_expression "(pwVar3 + wVar2 < param_2)" ( (binary_expression "pwVar3 + wVar2 < param_2" (binary_expression "pwVar3 + wVar2" identifier + identifier) < identifier) ))) )) (compound_statement "{\nLAB_0022feb3:\n    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);\n    return puVar1;\n  }" { (labeled_statement "LAB_0022feb3:\n    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);" statement_identifier : (expression_statement "puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);" (assignment_expression "puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3)" identifier = (cast_expression "(uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0022fe00(param_1,0,wVar2,param_2,param_3)" identifier (argument_list "(param_1,0,wVar2,param_2,param_3)" ( identifier , number_literal , identifier , identifier , identifier ))))) ;)) (return_statement "return puVar1;" return identifier ;) })) (if_statement "if (L'\0' < pwVar3[-1]) {\n    wVar2 = *(wchar_t *)(*param_1 - 0xc);\n    goto LAB_0022feb3;\n  }" if (parenthesized_expression "(L'\0' < pwVar3[-1])" ( (binary_expression "L'\0' < pwVar3[-1]" (char_literal "L'\0'" L' escape_sequence ') < (subscript_expression "pwVar3[-1]" identifier [ number_literal ])) )) (compound_statement "{\n    wVar2 = *(wchar_t *)(*param_1 - 0xc);\n    goto LAB_0022feb3;\n  }" { (expression_statement "wVar2 = *(wchar_t *)(*param_1 - 0xc);" (assignment_expression "wVar2 = *(wchar_t *)(*param_1 - 0xc)" identifier = (pointer_expression "*(wchar_t *)(*param_1 - 0xc)" * (cast_expression "(wchar_t *)(*param_1 - 0xc)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 - 0xc)" ( (binary_expression "*param_1 - 0xc" (pointer_expression "*param_1" * identifier) - number_literal) ))))) ;) (goto_statement "goto LAB_0022feb3;" goto statement_identifier ;) })) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "wVar2 = (int)param_2 - (int)pwVar3 >> 2;" (assignment_expression "wVar2 = (int)param_2 - (int)pwVar3 >> 2" identifier = (binary_expression "(int)param_2 - (int)pwVar3 >> 2" (binary_expression "(int)param_2 - (int)pwVar3" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pwVar3" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ;) (if_statement "if ((uint)wVar2 < (uint)param_3) {\n    if (wVar2 == L'\0') goto LAB_0022ff18;\n    if (param_3 != L'\x01') {\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }\n  }\n  else if (param_3 != L'\x01') {\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }" if (parenthesized_expression "((uint)wVar2 < (uint)param_3)" ( (binary_expression "(uint)wVar2 < (uint)param_3" (cast_expression "(uint)wVar2" ( (type_descriptor "uint" type_identifier) ) identifier) < (cast_expression "(uint)param_3" ( (type_descriptor "uint" type_identifier) ) identifier)) )) (compound_statement "{\n    if (wVar2 == L'\0') goto LAB_0022ff18;\n    if (param_3 != L'\x01') {\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }\n  }" { (if_statement "if (wVar2 == L'\0') goto LAB_0022ff18;" if (parenthesized_expression "(wVar2 == L'\0')" ( (binary_expression "wVar2 == L'\0'" identifier == (char_literal "L'\0'" L' escape_sequence ')) )) (goto_statement "goto LAB_0022ff18;" goto statement_identifier ;)) (if_statement "if (param_3 != L'\x01') {\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }" if (parenthesized_expression "(param_3 != L'\x01')" ( (binary_expression "param_3 != L'\x01'" identifier != (char_literal "L'\x01'" L' escape_sequence ')) )) (compound_statement "{\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }" { (if_statement "if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }" if (parenthesized_expression "(param_3 != L'\0')" ( (binary_expression "param_3 != L'\0'" identifier != (char_literal "L'\0'" L' escape_sequence ')) )) (compound_statement "{\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }" { (expression_statement "wmemmove(pwVar3,param_2,param_3);" (call_expression "wmemmove(pwVar3,param_2,param_3)" identifier (argument_list "(pwVar3,param_2,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (goto_statement "goto LAB_0022ff18;" goto statement_identifier ;) })) }) (else_clause "else if (param_3 != L'\x01') {\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }" else (if_statement "if (param_3 != L'\x01') {\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }" if (parenthesized_expression "(param_3 != L'\x01')" ( (binary_expression "param_3 != L'\x01'" identifier != (char_literal "L'\x01'" L' escape_sequence ')) )) (compound_statement "{\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }" { (if_statement "if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }" if (parenthesized_expression "(param_3 != L'\0')" ( (binary_expression "param_3 != L'\0'" identifier != (char_literal "L'\0'" L' escape_sequence ')) )) (compound_statement "{\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }" { (expression_statement "wmemcpy(pwVar3,param_2,param_3);" (call_expression "wmemcpy(pwVar3,param_2,param_3)" identifier (argument_list "(pwVar3,param_2,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (goto_statement "goto LAB_0022ff18;" goto statement_identifier ;) })))) (expression_statement "*pwVar3 = *param_2;" (assignment_expression "*pwVar3 = *param_2" (pointer_expression "*pwVar3" * identifier) = (pointer_expression "*param_2" * identifier)) ;) (labeled_statement "LAB_0022ff18:\n  if (pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74) {\n    return param_1;\n  }" statement_identifier : (if_statement "if (pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74) {\n    return param_1;\n  }" if (parenthesized_expression "(pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74)" ( (binary_expression "pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74" (binary_expression "pwVar3 + -3" identifier + number_literal) == (cast_expression "(wchar_t *)PTR_DAT_0033ed74" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    return param_1;\n  }" { (return_statement "return param_1;" return identifier ;) }))) (expression_statement "pwVar3[-1] = L'\0';" (assignment_expression "pwVar3[-1] = L'\0'" (subscript_expression "pwVar3[-1]" identifier [ number_literal ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (expression_statement "pwVar3[-3] = param_3;" (assignment_expression "pwVar3[-3] = param_3" (subscript_expression "pwVar3[-3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "pwVar3[param_3] = L'\0';" (assignment_expression "pwVar3[param_3] = L'\0'" (subscript_expression "pwVar3[param_3]" identifier [ identifier ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (return_statement "return param_1;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (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 LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < IDENT) )) || (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) < IDENT) ))) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT , IDENT , IDENT , IDENT ))))) ;)) (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (char_literal L' escape_sequence ') < (subscript_expression IDENT [ LIT ])) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) - LIT) ))))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) >> LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal L' escape_sequence ')) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal L' escape_sequence ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal L' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) })) (goto_statement goto statement_identifier ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal L' escape_sequence ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal L' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) })) (goto_statement goto statement_identifier ;) })))) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (char_literal L' escape_sequence ')) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (char_literal L' escape_sequence ')) ;) (return_statement return IDENT ;) })))
(function_definition "uint * FUN_0022fe80(uint *param_1,wchar_t *param_2,wchar_t param_3)\n\n{\n  uint *puVar1;\n  wchar_t wVar2;\n  wchar_t *pwVar3;\n  \n  pwVar3 = (wchar_t *)*param_1;\n  wVar2 = pwVar3[-3];\n  if (0xffffffe < (uint)param_3) {\n                    \n    FUN_001f1e60("basic_string::assign");\n  }\n  if ((param_2 < pwVar3) || (pwVar3 + wVar2 < param_2)) {\nLAB_0022feb3:\n    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);\n    return puVar1;\n  }\n  if (L'\0' < pwVar3[-1]) {\n    wVar2 = *(wchar_t *)(*param_1 - 0xc);\n    goto LAB_0022feb3;\n  }\n  pwVar3 = (wchar_t *)*param_1;\n  wVar2 = (int)param_2 - (int)pwVar3 >> 2;\n  if ((uint)wVar2 < (uint)param_3) {\n    if (wVar2 == L'\0') goto LAB_0022ff18;\n    if (param_3 != L'\x01') {\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }\n  }\n  else if (param_3 != L'\x01') {\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }\n  *pwVar3 = *param_2;\nLAB_0022ff18:\n  if (pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74) {\n    return param_1;\n  }\n  pwVar3[-1] = L'\0';\n  pwVar3[-3] = param_3;\n  pwVar3[param_3] = L'\0';\n  return param_1;\n}" (type_identifier "uint") (pointer_declarator "* FUN_0022fe80(uint *param_1,wchar_t *param_2,wchar_t param_3)" (* "*") (function_declarator "FUN_0022fe80(uint *param_1,wchar_t *param_2,wchar_t param_3)" (identifier "FUN_0022fe80") (parameter_list "(uint *param_1,wchar_t *param_2,wchar_t param_3)" (( "(") (parameter_declaration "uint *param_1" (type_identifier "uint") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "wchar_t *param_2" (type_identifier "wchar_t") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "wchar_t param_3" (type_identifier "wchar_t") (identifier "param_3")) () ")")))) (compound_statement "{\n  uint *puVar1;\n  wchar_t wVar2;\n  wchar_t *pwVar3;\n  \n  pwVar3 = (wchar_t *)*param_1;\n  wVar2 = pwVar3[-3];\n  if (0xffffffe < (uint)param_3) {\n                    \n    FUN_001f1e60("basic_string::assign");\n  }\n  if ((param_2 < pwVar3) || (pwVar3 + wVar2 < param_2)) {\nLAB_0022feb3:\n    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);\n    return puVar1;\n  }\n  if (L'\0' < pwVar3[-1]) {\n    wVar2 = *(wchar_t *)(*param_1 - 0xc);\n    goto LAB_0022feb3;\n  }\n  pwVar3 = (wchar_t *)*param_1;\n  wVar2 = (int)param_2 - (int)pwVar3 >> 2;\n  if ((uint)wVar2 < (uint)param_3) {\n    if (wVar2 == L'\0') goto LAB_0022ff18;\n    if (param_3 != L'\x01') {\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }\n  }\n  else if (param_3 != L'\x01') {\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }\n  *pwVar3 = *param_2;\nLAB_0022ff18:\n  if (pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74) {\n    return param_1;\n  }\n  pwVar3[-1] = L'\0';\n  pwVar3[-3] = param_3;\n  pwVar3[param_3] = L'\0';\n  return param_1;\n}" ({ "{") (declaration "uint *puVar1;" (type_identifier "uint") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "wchar_t wVar2;" (type_identifier "wchar_t") (identifier "wVar2") (; ";")) (declaration "wchar_t *pwVar3;" (type_identifier "wchar_t") (pointer_declarator "*pwVar3" (* "*") (identifier "pwVar3")) (; ";")) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" (identifier "pwVar3") (= "=") (cast_expression "(wchar_t *)*param_1" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "wVar2 = pwVar3[-3];" (assignment_expression "wVar2 = pwVar3[-3]" (identifier "wVar2") (= "=") (subscript_expression "pwVar3[-3]" (identifier "pwVar3") ([ "[") (number_literal "-3") (] "]"))) (; ";")) (if_statement "if (0xffffffe < (uint)param_3) {\n                    \n    FUN_001f1e60("basic_string::assign");\n  }" (if "if") (parenthesized_expression "(0xffffffe < (uint)param_3)" (( "(") (binary_expression "0xffffffe < (uint)param_3" (number_literal "0xffffffe") (< "<") (cast_expression "(uint)param_3" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "param_3"))) () ")")) (compound_statement "{\n                    \n    FUN_001f1e60("basic_string::assign");\n  }" ({ "{") (expression_statement "FUN_001f1e60("basic_string::assign");" (call_expression "FUN_001f1e60("basic_string::assign")" (identifier "FUN_001f1e60") (argument_list "("basic_string::assign")" (( "(") (string_literal ""basic_string::assign"" (" """) (string_content "basic_string::assign") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if ((param_2 < pwVar3) || (pwVar3 + wVar2 < param_2)) {\nLAB_0022feb3:\n    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);\n    return puVar1;\n  }" (if "if") (parenthesized_expression "((param_2 < pwVar3) || (pwVar3 + wVar2 < param_2))" (( "(") (binary_expression "(param_2 < pwVar3) || (pwVar3 + wVar2 < param_2)" (parenthesized_expression "(param_2 < pwVar3)" (( "(") (binary_expression "param_2 < pwVar3" (identifier "param_2") (< "<") (identifier "pwVar3")) () ")")) (|| "||") (parenthesized_expression "(pwVar3 + wVar2 < param_2)" (( "(") (binary_expression "pwVar3 + wVar2 < param_2" (binary_expression "pwVar3 + wVar2" (identifier "pwVar3") (+ "+") (identifier "wVar2")) (< "<") (identifier "param_2")) () ")"))) () ")")) (compound_statement "{\nLAB_0022feb3:\n    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);\n    return puVar1;\n  }" ({ "{") (labeled_statement "LAB_0022feb3:\n    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);" (statement_identifier "LAB_0022feb3") (: ":") (expression_statement "puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);" (assignment_expression "puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3)" (identifier "puVar1") (= "=") (cast_expression "(uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0022fe00(param_1,0,wVar2,param_2,param_3)" (identifier "FUN_0022fe00") (argument_list "(param_1,0,wVar2,param_2,param_3)" (( "(") (identifier "param_1") (, ",") (number_literal "0") (, ",") (identifier "wVar2") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))))) (; ";"))) (return_statement "return puVar1;" (return "return") (identifier "puVar1") (; ";")) (} "}"))) (if_statement "if (L'\0' < pwVar3[-1]) {\n    wVar2 = *(wchar_t *)(*param_1 - 0xc);\n    goto LAB_0022feb3;\n  }" (if "if") (parenthesized_expression "(L'\0' < pwVar3[-1])" (( "(") (binary_expression "L'\0' < pwVar3[-1]" (char_literal "L'\0'" (L' "L'") (escape_sequence "\0") (' "'")) (< "<") (subscript_expression "pwVar3[-1]" (identifier "pwVar3") ([ "[") (number_literal "-1") (] "]"))) () ")")) (compound_statement "{\n    wVar2 = *(wchar_t *)(*param_1 - 0xc);\n    goto LAB_0022feb3;\n  }" ({ "{") (expression_statement "wVar2 = *(wchar_t *)(*param_1 - 0xc);" (assignment_expression "wVar2 = *(wchar_t *)(*param_1 - 0xc)" (identifier "wVar2") (= "=") (pointer_expression "*(wchar_t *)(*param_1 - 0xc)" (* "*") (cast_expression "(wchar_t *)(*param_1 - 0xc)" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 - 0xc)" (( "(") (binary_expression "*param_1 - 0xc" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (- "-") (number_literal "0xc")) () ")"))))) (; ";")) (goto_statement "goto LAB_0022feb3;" (goto "goto") (statement_identifier "LAB_0022feb3") (; ";")) (} "}"))) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" (identifier "pwVar3") (= "=") (cast_expression "(wchar_t *)*param_1" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "wVar2 = (int)param_2 - (int)pwVar3 >> 2;" (assignment_expression "wVar2 = (int)param_2 - (int)pwVar3 >> 2" (identifier "wVar2") (= "=") (binary_expression "(int)param_2 - (int)pwVar3 >> 2" (binary_expression "(int)param_2 - (int)pwVar3" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (- "-") (cast_expression "(int)pwVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pwVar3"))) (>> ">>") (number_literal "2"))) (; ";")) (if_statement "if ((uint)wVar2 < (uint)param_3) {\n    if (wVar2 == L'\0') goto LAB_0022ff18;\n    if (param_3 != L'\x01') {\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }\n  }\n  else if (param_3 != L'\x01') {\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }" (if "if") (parenthesized_expression "((uint)wVar2 < (uint)param_3)" (( "(") (binary_expression "(uint)wVar2 < (uint)param_3" (cast_expression "(uint)wVar2" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "wVar2")) (< "<") (cast_expression "(uint)param_3" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "param_3"))) () ")")) (compound_statement "{\n    if (wVar2 == L'\0') goto LAB_0022ff18;\n    if (param_3 != L'\x01') {\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }\n  }" ({ "{") (if_statement "if (wVar2 == L'\0') goto LAB_0022ff18;" (if "if") (parenthesized_expression "(wVar2 == L'\0')" (( "(") (binary_expression "wVar2 == L'\0'" (identifier "wVar2") (== "==") (char_literal "L'\0'" (L' "L'") (escape_sequence "\0") (' "'"))) () ")")) (goto_statement "goto LAB_0022ff18;" (goto "goto") (statement_identifier "LAB_0022ff18") (; ";"))) (if_statement "if (param_3 != L'\x01') {\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }" (if "if") (parenthesized_expression "(param_3 != L'\x01')" (( "(") (binary_expression "param_3 != L'\x01'" (identifier "param_3") (!= "!=") (char_literal "L'\x01'" (L' "L'") (escape_sequence "\x01") (' "'"))) () ")")) (compound_statement "{\n      if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }\n      goto LAB_0022ff18;\n    }" ({ "{") (if_statement "if (param_3 != L'\0') {\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }" (if "if") (parenthesized_expression "(param_3 != L'\0')" (( "(") (binary_expression "param_3 != L'\0'" (identifier "param_3") (!= "!=") (char_literal "L'\0'" (L' "L'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        wmemmove(pwVar3,param_2,param_3);\n        pwVar3 = (wchar_t *)*param_1;\n      }" ({ "{") (expression_statement "wmemmove(pwVar3,param_2,param_3);" (call_expression "wmemmove(pwVar3,param_2,param_3)" (identifier "wmemmove") (argument_list "(pwVar3,param_2,param_3)" (( "(") (identifier "pwVar3") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" (identifier "pwVar3") (= "=") (cast_expression "(wchar_t *)*param_1" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (} "}"))) (goto_statement "goto LAB_0022ff18;" (goto "goto") (statement_identifier "LAB_0022ff18") (; ";")) (} "}"))) (} "}")) (else_clause "else if (param_3 != L'\x01') {\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }" (else "else") (if_statement "if (param_3 != L'\x01') {\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }" (if "if") (parenthesized_expression "(param_3 != L'\x01')" (( "(") (binary_expression "param_3 != L'\x01'" (identifier "param_3") (!= "!=") (char_literal "L'\x01'" (L' "L'") (escape_sequence "\x01") (' "'"))) () ")")) (compound_statement "{\n    if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }\n    goto LAB_0022ff18;\n  }" ({ "{") (if_statement "if (param_3 != L'\0') {\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }" (if "if") (parenthesized_expression "(param_3 != L'\0')" (( "(") (binary_expression "param_3 != L'\0'" (identifier "param_3") (!= "!=") (char_literal "L'\0'" (L' "L'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      wmemcpy(pwVar3,param_2,param_3);\n      pwVar3 = (wchar_t *)*param_1;\n    }" ({ "{") (expression_statement "wmemcpy(pwVar3,param_2,param_3);" (call_expression "wmemcpy(pwVar3,param_2,param_3)" (identifier "wmemcpy") (argument_list "(pwVar3,param_2,param_3)" (( "(") (identifier "pwVar3") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "pwVar3 = (wchar_t *)*param_1;" (assignment_expression "pwVar3 = (wchar_t *)*param_1" (identifier "pwVar3") (= "=") (cast_expression "(wchar_t *)*param_1" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (} "}"))) (goto_statement "goto LAB_0022ff18;" (goto "goto") (statement_identifier "LAB_0022ff18") (; ";")) (} "}"))))) (expression_statement "*pwVar3 = *param_2;" (assignment_expression "*pwVar3 = *param_2" (pointer_expression "*pwVar3" (* "*") (identifier "pwVar3")) (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (labeled_statement "LAB_0022ff18:\n  if (pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74) {\n    return param_1;\n  }" (statement_identifier "LAB_0022ff18") (: ":") (if_statement "if (pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74) {\n    return param_1;\n  }" (if "if") (parenthesized_expression "(pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74)" (( "(") (binary_expression "pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74" (binary_expression "pwVar3 + -3" (identifier "pwVar3") (+ "+") (number_literal "-3")) (== "==") (cast_expression "(wchar_t *)PTR_DAT_0033ed74" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_DAT_0033ed74"))) () ")")) (compound_statement "{\n    return param_1;\n  }" ({ "{") (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))) (expression_statement "pwVar3[-1] = L'\0';" (assignment_expression "pwVar3[-1] = L'\0'" (subscript_expression "pwVar3[-1]" (identifier "pwVar3") ([ "[") (number_literal "-1") (] "]")) (= "=") (char_literal "L'\0'" (L' "L'") (escape_sequence "\0") (' "'"))) (; ";")) (expression_statement "pwVar3[-3] = param_3;" (assignment_expression "pwVar3[-3] = param_3" (subscript_expression "pwVar3[-3]" (identifier "pwVar3") ([ "[") (number_literal "-3") (] "]")) (= "=") (identifier "param_3")) (; ";")) (expression_statement "pwVar3[param_3] = L'\0';" (assignment_expression "pwVar3[param_3] = L'\0'" (subscript_expression "pwVar3[param_3]" (identifier "pwVar3") ([ "[") (identifier "param_3") (] "]")) (= "=") (char_literal "L'\0'" (L' "L'") (escape_sequence "\0") (' "'"))) (; ";")) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

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

type_1 * __thiscall std::type_1::assign(type_1 *this,type_3 *var_3,type_2 var_1)

{
  type_1 *pwVar1;
  type_2 var_7;
  type_3 var_5;
  type_3 *var_4;
  
  var_4 = *(type_3 **)this;
  var_5 = var_4[-3];
  if (0xffffffe < var_1) {
                    /* WARNING: Subroutine does not return */
    var_2("basic_string::assign");
  }
  if ((var_3 < var_4) || (var_4 + var_5 < var_3)) {
LAB_0022feb3:
    pwVar1 = (type_1 *)var_6(this,0,var_5,var_3,var_1);
    return pwVar1;
  }
  if (L'\0' < var_4[-1]) {
    var_5 = *(type_3 *)(*(int *)this + -0xc);
    goto LAB_0022feb3;
  }
  var_4 = *(type_3 **)this;
  var_7 = (int)var_3 - (int)var_4 >> 2;
  if (var_7 < var_1) {
    if (var_7 == 0) goto LAB_0022ff18;
    if (var_1 != 1) {
      if (var_1 != 0) {
        var_8(var_4,var_3,var_1);
        var_4 = *(type_3 **)this;
      }
      goto LAB_0022ff18;
    }
  }
  else if (var_1 != 1) {
    if (var_1 != 0) {
      var_9(var_4,var_3,var_1);
      var_4 = *(type_3 **)this;
    }
    goto LAB_0022ff18;
  }
  *var_4 = *var_3;
LAB_0022ff18:
  if (var_4 + -3 == (type_3 *)PTR__S_empty_rep_storage_0033ed74) {
    return this;
  }
  var_4[-1] = L'\0';
  var_4[-3] = var_1;
  var_4[var_1] = L'\0';
  return this;
}


(translation_unit (function_definition type: (type_identifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier))))) consequence: (compound_statement (labeled_statement label: (statement_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) (number_literal) (identifier) (identifier) (identifier))))))) (return_statement (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (char_literal (escape_sequence)) right: (subscript_expression argument: (identifier) index: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))))) (goto_statement label: (statement_identifier))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))))) (goto_statement label: (statement_identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier)))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) consequence: (compound_statement (return_statement (identifier))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (escape_sequence)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (identifier)) right: (char_literal (escape_sequence)))) (return_statement (identifier)))))

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

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

{
  uint *puVar1;
  wchar_t wVar2;
  wchar_t *pwVar3;
  
  pwVar3 = (wchar_t *)*param_1;
  wVar2 = pwVar3[-3];
  if (0xffffffe < (uint)param_3) {
                    /* WARNING: Subroutine does not return */
    FUN_001f1e60("basic_string::assign");
  }
  if ((param_2 < pwVar3) || (pwVar3 + wVar2 < param_2)) {
LAB_0022feb3:
    puVar1 = (uint *)FUN_0022fe00(param_1,0,wVar2,param_2,param_3);
    return puVar1;
  }
  if (L'\0' < pwVar3[-1]) {
    wVar2 = *(wchar_t *)(*param_1 - 0xc);
    goto LAB_0022feb3;
  }
  pwVar3 = (wchar_t *)*param_1;
  wVar2 = (int)param_2 - (int)pwVar3 >> 2;
  if ((uint)wVar2 < (uint)param_3) {
    if (wVar2 == L'\0') goto LAB_0022ff18;
    if (param_3 != L'\x01') {
      if (param_3 != L'\0') {
        wmemmove(pwVar3,param_2,param_3);
        pwVar3 = (wchar_t *)*param_1;
      }
      goto LAB_0022ff18;
    }
  }
  else if (param_3 != L'\x01') {
    if (param_3 != L'\0') {
      wmemcpy(pwVar3,param_2,param_3);
      pwVar3 = (wchar_t *)*param_1;
    }
    goto LAB_0022ff18;
  }
  *pwVar3 = *param_2;
LAB_0022ff18:
  if (pwVar3 + -3 == (wchar_t *)PTR_DAT_0033ed74) {
    return param_1;
  }
  pwVar3[-1] = L'\0';
  pwVar3[-3] = param_3;
  pwVar3[param_3] = L'\0';
  return param_1;
}

