
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::wstring::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&) */

wchar_t * std::wstring::_S_construct(uint param_1,wchar_t param_2,allocator *param_3)

{
  uint *puVar1;
  wchar_t *__s;
  
  if (param_1 == 0) {
    __s = (wchar_t *)&DAT_00397f6c;
  }
  else {
    puVar1 = (uint *)_Rep::_S_create(param_1,0,param_3);
    __s = (wchar_t *)(puVar1 + 3);
    if (param_1 == 1) {
      puVar1[3] = param_2;
    }
    else {
      wmemset(__s,param_2,param_1);
    }
    if (puVar1 != (uint *)PTR__S_empty_rep_storage_0038ed58) {
      puVar1[2] = 0;
      *puVar1 = param_1;
      puVar1[param_1 + 3] = 0;
    }
  }
  return __s;
}



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

wchar_t * FUN_00269b50(size_t param_1,wchar_t param_2,undefined4 param_3)

{
  size_t *psVar1;
  wchar_t *__s;
  
  if (param_1 == 0) {
    __s = (wchar_t *)&DAT_00397f6c;
  }
  else {
    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);
    __s = (wchar_t *)(psVar1 + 3);
    if (param_1 == 1) {
      psVar1[3] = param_2;
    }
    else {
      wmemset(__s,param_2,param_1);
    }
    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {
      psVar1[2] = 0;
      *psVar1 = param_1;
      psVar1[param_1 + 3] = 0;
    }
  }
  return __s;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00035840
ADD EBX,0x1254a7
SUB ESP,0xc
MOV ESI,dword ptr [ESP + 0x20]
TEST ESI,ESI
JNZ 0x00269b80
LEA EAX,[EBX + 0x8f60]
LEA EDI,[EAX + 0xc]
ADD ESP,0xc
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
PUSH dword ptr [ESP + 0x2c]
PUSH 0x0
PUSH ESI
CALL 0x00269ab0
ADD ESP,0x10
MOV EBP,EAX
LEA EDI,[EAX + 0xc]
CMP ESI,0x1
JZ 0x00269bd0
SUB ESP,0x4
PUSH ESI
PUSH dword ptr [ESP + 0x2c]
PUSH EDI
CALL 0x00029650
ADD ESP,0x10
CMP EBP,dword ptr [EBX + 0xfffffd58]
JZ 0x00269b73
MOV dword ptr [EBP + 0x8],0x0
MOV dword ptr [EBP],ESI
MOV dword ptr [EBP + ESI*0x4 + 0xc],0x0
JMP 0x00269b73
MOV EAX,dword ptr [ESP + 0x24]
MOV dword ptr [EBP + 0xc],EAX
JMP 0x00269bad
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nwchar_t * FUN_00269b50(size_t param_1,wchar_t param_2,undefined4 param_3)\n\n{\n  size_t *psVar1;\n  wchar_t *__s;\n  \n  if (param_1 == 0) {\n    __s = (wchar_t *)&DAT_00397f6c;\n  }\n  else {\n    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);\n    __s = (wchar_t *)(psVar1 + 3);\n    if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }\n  }\n  return __s;\n}\n\n" comment (function_definition "wchar_t * FUN_00269b50(size_t param_1,wchar_t param_2,undefined4 param_3)\n\n{\n  size_t *psVar1;\n  wchar_t *__s;\n  \n  if (param_1 == 0) {\n    __s = (wchar_t *)&DAT_00397f6c;\n  }\n  else {\n    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);\n    __s = (wchar_t *)(psVar1 + 3);\n    if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }\n  }\n  return __s;\n}" type_identifier (pointer_declarator "* FUN_00269b50(size_t param_1,wchar_t param_2,undefined4 param_3)" * (function_declarator "FUN_00269b50(size_t param_1,wchar_t param_2,undefined4 param_3)" identifier (parameter_list "(size_t param_1,wchar_t param_2,undefined4 param_3)" ( (parameter_declaration "size_t param_1" primitive_type identifier) , (parameter_declaration "wchar_t param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) )))) (compound_statement "{\n  size_t *psVar1;\n  wchar_t *__s;\n  \n  if (param_1 == 0) {\n    __s = (wchar_t *)&DAT_00397f6c;\n  }\n  else {\n    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);\n    __s = (wchar_t *)(psVar1 + 3);\n    if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }\n  }\n  return __s;\n}" { (declaration "size_t *psVar1;" primitive_type (pointer_declarator "*psVar1" * identifier) ;) (declaration "wchar_t *__s;" type_identifier (pointer_declarator "*__s" * identifier) ;) (if_statement "if (param_1 == 0) {\n    __s = (wchar_t *)&DAT_00397f6c;\n  }\n  else {\n    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);\n    __s = (wchar_t *)(psVar1 + 3);\n    if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    __s = (wchar_t *)&DAT_00397f6c;\n  }" { (expression_statement "__s = (wchar_t *)&DAT_00397f6c;" (assignment_expression "__s = (wchar_t *)&DAT_00397f6c" identifier = (cast_expression "(wchar_t *)&DAT_00397f6c" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_00397f6c" & identifier))) ;) }) (else_clause "else {\n    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);\n    __s = (wchar_t *)(psVar1 + 3);\n    if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }\n  }" else (compound_statement "{\n    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);\n    __s = (wchar_t *)(psVar1 + 3);\n    if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }\n  }" { (expression_statement "psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);" (assignment_expression "psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3)" identifier = (cast_expression "(size_t *)FUN_00269ab0(param_1,0,param_3)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00269ab0(param_1,0,param_3)" identifier (argument_list "(param_1,0,param_3)" ( identifier , number_literal , identifier ))))) ;) (expression_statement "__s = (wchar_t *)(psVar1 + 3);" (assignment_expression "__s = (wchar_t *)(psVar1 + 3)" identifier = (cast_expression "(wchar_t *)(psVar1 + 3)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(psVar1 + 3)" ( (binary_expression "psVar1 + 3" identifier + number_literal) )))) ;) (if_statement "if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }" if (parenthesized_expression "(param_1 == 1)" ( (binary_expression "param_1 == 1" identifier == number_literal) )) (compound_statement "{\n      psVar1[3] = param_2;\n    }" { (expression_statement "psVar1[3] = param_2;" (assignment_expression "psVar1[3] = param_2" (subscript_expression "psVar1[3]" identifier [ number_literal ]) = identifier) ;) }) (else_clause "else {\n      wmemset(__s,param_2,param_1);\n    }" else (compound_statement "{\n      wmemset(__s,param_2,param_1);\n    }" { (expression_statement "wmemset(__s,param_2,param_1);" (call_expression "wmemset(__s,param_2,param_1)" identifier (argument_list "(__s,param_2,param_1)" ( identifier , identifier , identifier ))) ;) }))) (if_statement "if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }" if (parenthesized_expression "(psVar1 != (size_t *)PTR_DAT_0038ed58)" ( (binary_expression "psVar1 != (size_t *)PTR_DAT_0038ed58" identifier != (cast_expression "(size_t *)PTR_DAT_0038ed58" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }" { (expression_statement "psVar1[2] = 0;" (assignment_expression "psVar1[2] = 0" (subscript_expression "psVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*psVar1 = param_1;" (assignment_expression "*psVar1 = param_1" (pointer_expression "*psVar1" * identifier) = identifier) ;) (expression_statement "psVar1[param_1 + 3] = 0;" (assignment_expression "psVar1[param_1 + 3] = 0" (subscript_expression "psVar1[param_1 + 3]" identifier [ (binary_expression "param_1 + 3" identifier + number_literal) ]) = number_literal) ;) })) }))) (return_statement "return __s;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::wstring::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&) */\n\nwchar_t * std::wstring::_S_construct(uint param_1,wchar_t param_2,allocator *param_3)\n\n{\n  uint *puVar1;\n  wchar_t *__s;\n  \n  if (param_1 == 0) {\n    __s = (wchar_t *)&DAT_00397f6c;\n  }\n  else {\n    puVar1 = (uint *)_Rep::_S_create(param_1,0,param_3);\n    __s = (wchar_t *)(puVar1 + 3);\n    if (param_1 == 1) {\n      puVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (puVar1 != (uint *)PTR__S_empty_rep_storage_0038ed58) {\n      puVar1[2] = 0;\n      *puVar1 = param_1;\n      puVar1[param_1 + 3] = 0;\n    }\n  }\n  return __s;\n}\n\n" comment comment (ERROR "wchar_t * std::" (binary_expression "wchar_t * std" identifier * identifier) : :) (labeled_statement "wstring::_S_construct(uint param_1,wchar_t param_2,allocator *param_3)\n\n{\n  uint *puVar1;\n  wchar_t *__s;\n  \n  if (param_1 == 0) {\n    __s = (wchar_t *)&DAT_00397f6c;\n  }\n  else {\n    puVar1 = (uint *)_Rep::_S_create(param_1,0,param_3);\n    __s = (wchar_t *)(puVar1 + 3);\n    if (param_1 == 1) {\n      puVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (puVar1 != (uint *)PTR__S_empty_rep_storage_0038ed58) {\n      puVar1[2] = 0;\n      *puVar1 = param_1;\n      puVar1[param_1 + 3] = 0;\n    }\n  }\n  return __s;\n}" statement_identifier : (ERROR ":_S_construct(uint param_1,wchar_t param_2,allocator *param_3)" : (macro_type_specifier "_S_construct(uint" identifier ( (type_descriptor "uint" type_identifier) )) identifier , identifier (ERROR "param_2" identifier) , (ERROR "allocator" identifier) (pointer_declarator "*param_3" * identifier) )) (compound_statement "{\n  uint *puVar1;\n  wchar_t *__s;\n  \n  if (param_1 == 0) {\n    __s = (wchar_t *)&DAT_00397f6c;\n  }\n  else {\n    puVar1 = (uint *)_Rep::_S_create(param_1,0,param_3);\n    __s = (wchar_t *)(puVar1 + 3);\n    if (param_1 == 1) {\n      puVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (puVar1 != (uint *)PTR__S_empty_rep_storage_0038ed58) {\n      puVar1[2] = 0;\n      *puVar1 = param_1;\n      puVar1[param_1 + 3] = 0;\n    }\n  }\n  return __s;\n}" { (declaration "uint *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "wchar_t *__s;" type_identifier (pointer_declarator "*__s" * identifier) ;) (if_statement "if (param_1 == 0) {\n    __s = (wchar_t *)&DAT_00397f6c;\n  }\n  else {\n    puVar1 = (uint *)_Rep::_S_create(param_1,0,param_3);\n    __s = (wchar_t *)(puVar1 + 3);\n    if (param_1 == 1) {\n      puVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (puVar1 != (uint *)PTR__S_empty_rep_storage_0038ed58) {\n      puVar1[2] = 0;\n      *puVar1 = param_1;\n      puVar1[param_1 + 3] = 0;\n    }\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    __s = (wchar_t *)&DAT_00397f6c;\n  }" { (expression_statement "__s = (wchar_t *)&DAT_00397f6c;" (assignment_expression "__s = (wchar_t *)&DAT_00397f6c" identifier = (cast_expression "(wchar_t *)&DAT_00397f6c" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_00397f6c" & identifier))) ;) }) (else_clause "else {\n    puVar1 = (uint *)_Rep::_S_create(param_1,0,param_3);\n    __s = (wchar_t *)(puVar1 + 3);\n    if (param_1 == 1) {\n      puVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (puVar1 != (uint *)PTR__S_empty_rep_storage_0038ed58) {\n      puVar1[2] = 0;\n      *puVar1 = param_1;\n      puVar1[param_1 + 3] = 0;\n    }\n  }" else (compound_statement "{\n    puVar1 = (uint *)_Rep::_S_create(param_1,0,param_3);\n    __s = (wchar_t *)(puVar1 + 3);\n    if (param_1 == 1) {\n      puVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (puVar1 != (uint *)PTR__S_empty_rep_storage_0038ed58) {\n      puVar1[2] = 0;\n      *puVar1 = param_1;\n      puVar1[param_1 + 3] = 0;\n    }\n  }" { (ERROR "puVar1 = (uint *)_Rep::" (assignment_expression "puVar1 = (uint *)_Rep" identifier = (cast_expression "(uint *)_Rep" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) : :) (expression_statement "_S_create(param_1,0,param_3);" (call_expression "_S_create(param_1,0,param_3)" identifier (argument_list "(param_1,0,param_3)" ( identifier , number_literal , identifier ))) ;) (expression_statement "__s = (wchar_t *)(puVar1 + 3);" (assignment_expression "__s = (wchar_t *)(puVar1 + 3)" identifier = (cast_expression "(wchar_t *)(puVar1 + 3)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 3)" ( (binary_expression "puVar1 + 3" identifier + number_literal) )))) ;) (if_statement "if (param_1 == 1) {\n      puVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }" if (parenthesized_expression "(param_1 == 1)" ( (binary_expression "param_1 == 1" identifier == number_literal) )) (compound_statement "{\n      puVar1[3] = param_2;\n    }" { (expression_statement "puVar1[3] = param_2;" (assignment_expression "puVar1[3] = param_2" (subscript_expression "puVar1[3]" identifier [ number_literal ]) = identifier) ;) }) (else_clause "else {\n      wmemset(__s,param_2,param_1);\n    }" else (compound_statement "{\n      wmemset(__s,param_2,param_1);\n    }" { (expression_statement "wmemset(__s,param_2,param_1);" (call_expression "wmemset(__s,param_2,param_1)" identifier (argument_list "(__s,param_2,param_1)" ( identifier , identifier , identifier ))) ;) }))) (if_statement "if (puVar1 != (uint *)PTR__S_empty_rep_storage_0038ed58) {\n      puVar1[2] = 0;\n      *puVar1 = param_1;\n      puVar1[param_1 + 3] = 0;\n    }" if (parenthesized_expression "(puVar1 != (uint *)PTR__S_empty_rep_storage_0038ed58)" ( (binary_expression "puVar1 != (uint *)PTR__S_empty_rep_storage_0038ed58" identifier != (cast_expression "(uint *)PTR__S_empty_rep_storage_0038ed58" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n      puVar1[2] = 0;\n      *puVar1 = param_1;\n      puVar1[param_1 + 3] = 0;\n    }" { (expression_statement "puVar1[2] = 0;" (assignment_expression "puVar1[2] = 0" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar1 = param_1;" (assignment_expression "*puVar1 = param_1" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "puVar1[param_1 + 3] = 0;" (assignment_expression "puVar1[param_1 + 3] = 0" (subscript_expression "puVar1[param_1 + 3]" identifier [ (binary_expression "param_1 + 3" identifier + number_literal) ]) = number_literal) ;) })) }))) (return_statement "return __s;" return identifier ;) })))
(translation_unit "wchar_t * FUN_00269b50(size_t param_1,wchar_t param_2,undefined4 param_3)\n\n{\n  size_t *psVar1;\n  wchar_t *__s;\n  \n  if (param_1 == 0) {\n    __s = (wchar_t *)&DAT_00397f6c;\n  }\n  else {\n    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);\n    __s = (wchar_t *)(psVar1 + 3);\n    if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }\n  }\n  return __s;\n}\n\n" (function_definition "wchar_t * FUN_00269b50(size_t param_1,wchar_t param_2,undefined4 param_3)\n\n{\n  size_t *psVar1;\n  wchar_t *__s;\n  \n  if (param_1 == 0) {\n    __s = (wchar_t *)&DAT_00397f6c;\n  }\n  else {\n    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);\n    __s = (wchar_t *)(psVar1 + 3);\n    if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }\n  }\n  return __s;\n}" type_identifier (pointer_declarator "* FUN_00269b50(size_t param_1,wchar_t param_2,undefined4 param_3)" * (function_declarator "FUN_00269b50(size_t param_1,wchar_t param_2,undefined4 param_3)" identifier (parameter_list "(size_t param_1,wchar_t param_2,undefined4 param_3)" ( (parameter_declaration "size_t param_1" primitive_type identifier) , (parameter_declaration "wchar_t param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) )))) (compound_statement "{\n  size_t *psVar1;\n  wchar_t *__s;\n  \n  if (param_1 == 0) {\n    __s = (wchar_t *)&DAT_00397f6c;\n  }\n  else {\n    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);\n    __s = (wchar_t *)(psVar1 + 3);\n    if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }\n  }\n  return __s;\n}" { (declaration "size_t *psVar1;" primitive_type (pointer_declarator "*psVar1" * identifier) ;) (declaration "wchar_t *__s;" type_identifier (pointer_declarator "*__s" * identifier) ;) (if_statement "if (param_1 == 0) {\n    __s = (wchar_t *)&DAT_00397f6c;\n  }\n  else {\n    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);\n    __s = (wchar_t *)(psVar1 + 3);\n    if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    __s = (wchar_t *)&DAT_00397f6c;\n  }" { (expression_statement "__s = (wchar_t *)&DAT_00397f6c;" (assignment_expression "__s = (wchar_t *)&DAT_00397f6c" identifier = (cast_expression "(wchar_t *)&DAT_00397f6c" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_00397f6c" & identifier))) ;) }) (else_clause "else {\n    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);\n    __s = (wchar_t *)(psVar1 + 3);\n    if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }\n  }" else (compound_statement "{\n    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);\n    __s = (wchar_t *)(psVar1 + 3);\n    if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }\n  }" { (expression_statement "psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);" (assignment_expression "psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3)" identifier = (cast_expression "(size_t *)FUN_00269ab0(param_1,0,param_3)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00269ab0(param_1,0,param_3)" identifier (argument_list "(param_1,0,param_3)" ( identifier , number_literal , identifier ))))) ;) (expression_statement "__s = (wchar_t *)(psVar1 + 3);" (assignment_expression "__s = (wchar_t *)(psVar1 + 3)" identifier = (cast_expression "(wchar_t *)(psVar1 + 3)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(psVar1 + 3)" ( (binary_expression "psVar1 + 3" identifier + number_literal) )))) ;) (if_statement "if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }" if (parenthesized_expression "(param_1 == 1)" ( (binary_expression "param_1 == 1" identifier == number_literal) )) (compound_statement "{\n      psVar1[3] = param_2;\n    }" { (expression_statement "psVar1[3] = param_2;" (assignment_expression "psVar1[3] = param_2" (subscript_expression "psVar1[3]" identifier [ number_literal ]) = identifier) ;) }) (else_clause "else {\n      wmemset(__s,param_2,param_1);\n    }" else (compound_statement "{\n      wmemset(__s,param_2,param_1);\n    }" { (expression_statement "wmemset(__s,param_2,param_1);" (call_expression "wmemset(__s,param_2,param_1)" identifier (argument_list "(__s,param_2,param_1)" ( identifier , identifier , identifier ))) ;) }))) (if_statement "if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }" if (parenthesized_expression "(psVar1 != (size_t *)PTR_DAT_0038ed58)" ( (binary_expression "psVar1 != (size_t *)PTR_DAT_0038ed58" identifier != (cast_expression "(size_t *)PTR_DAT_0038ed58" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }" { (expression_statement "psVar1[2] = 0;" (assignment_expression "psVar1[2] = 0" (subscript_expression "psVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*psVar1 = param_1;" (assignment_expression "*psVar1 = param_1" (pointer_expression "*psVar1" * identifier) = identifier) ;) (expression_statement "psVar1[param_1 + 3] = 0;" (assignment_expression "psVar1[param_1 + 3] = 0" (subscript_expression "psVar1[param_1 + 3]" identifier [ (binary_expression "param_1 + 3" identifier + number_literal) ]) = number_literal) ;) })) }))) (return_statement "return __s;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT , IDENT ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression IDENT + LIT) ]) = LIT) ;) })) }))) (return_statement return IDENT ;) })))
(function_definition "wchar_t * FUN_00269b50(size_t param_1,wchar_t param_2,undefined4 param_3)\n\n{\n  size_t *psVar1;\n  wchar_t *__s;\n  \n  if (param_1 == 0) {\n    __s = (wchar_t *)&DAT_00397f6c;\n  }\n  else {\n    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);\n    __s = (wchar_t *)(psVar1 + 3);\n    if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }\n  }\n  return __s;\n}" (type_identifier "wchar_t") (pointer_declarator "* FUN_00269b50(size_t param_1,wchar_t param_2,undefined4 param_3)" (* "*") (function_declarator "FUN_00269b50(size_t param_1,wchar_t param_2,undefined4 param_3)" (identifier "FUN_00269b50") (parameter_list "(size_t param_1,wchar_t param_2,undefined4 param_3)" (( "(") (parameter_declaration "size_t param_1" (primitive_type "size_t") (identifier "param_1")) (, ",") (parameter_declaration "wchar_t param_2" (type_identifier "wchar_t") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")")))) (compound_statement "{\n  size_t *psVar1;\n  wchar_t *__s;\n  \n  if (param_1 == 0) {\n    __s = (wchar_t *)&DAT_00397f6c;\n  }\n  else {\n    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);\n    __s = (wchar_t *)(psVar1 + 3);\n    if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }\n  }\n  return __s;\n}" ({ "{") (declaration "size_t *psVar1;" (primitive_type "size_t") (pointer_declarator "*psVar1" (* "*") (identifier "psVar1")) (; ";")) (declaration "wchar_t *__s;" (type_identifier "wchar_t") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (if_statement "if (param_1 == 0) {\n    __s = (wchar_t *)&DAT_00397f6c;\n  }\n  else {\n    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);\n    __s = (wchar_t *)(psVar1 + 3);\n    if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    __s = (wchar_t *)&DAT_00397f6c;\n  }" ({ "{") (expression_statement "__s = (wchar_t *)&DAT_00397f6c;" (assignment_expression "__s = (wchar_t *)&DAT_00397f6c" (identifier "__s") (= "=") (cast_expression "(wchar_t *)&DAT_00397f6c" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&DAT_00397f6c" (& "&") (identifier "DAT_00397f6c")))) (; ";")) (} "}")) (else_clause "else {\n    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);\n    __s = (wchar_t *)(psVar1 + 3);\n    if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }\n  }" (else "else") (compound_statement "{\n    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);\n    __s = (wchar_t *)(psVar1 + 3);\n    if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }\n    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }\n  }" ({ "{") (expression_statement "psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);" (assignment_expression "psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3)" (identifier "psVar1") (= "=") (cast_expression "(size_t *)FUN_00269ab0(param_1,0,param_3)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00269ab0(param_1,0,param_3)" (identifier "FUN_00269ab0") (argument_list "(param_1,0,param_3)" (( "(") (identifier "param_1") (, ",") (number_literal "0") (, ",") (identifier "param_3") () ")"))))) (; ";")) (expression_statement "__s = (wchar_t *)(psVar1 + 3);" (assignment_expression "__s = (wchar_t *)(psVar1 + 3)" (identifier "__s") (= "=") (cast_expression "(wchar_t *)(psVar1 + 3)" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(psVar1 + 3)" (( "(") (binary_expression "psVar1 + 3" (identifier "psVar1") (+ "+") (number_literal "3")) () ")")))) (; ";")) (if_statement "if (param_1 == 1) {\n      psVar1[3] = param_2;\n    }\n    else {\n      wmemset(__s,param_2,param_1);\n    }" (if "if") (parenthesized_expression "(param_1 == 1)" (( "(") (binary_expression "param_1 == 1" (identifier "param_1") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      psVar1[3] = param_2;\n    }" ({ "{") (expression_statement "psVar1[3] = param_2;" (assignment_expression "psVar1[3] = param_2" (subscript_expression "psVar1[3]" (identifier "psVar1") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "param_2")) (; ";")) (} "}")) (else_clause "else {\n      wmemset(__s,param_2,param_1);\n    }" (else "else") (compound_statement "{\n      wmemset(__s,param_2,param_1);\n    }" ({ "{") (expression_statement "wmemset(__s,param_2,param_1);" (call_expression "wmemset(__s,param_2,param_1)" (identifier "wmemset") (argument_list "(__s,param_2,param_1)" (( "(") (identifier "__s") (, ",") (identifier "param_2") (, ",") (identifier "param_1") () ")"))) (; ";")) (} "}")))) (if_statement "if (psVar1 != (size_t *)PTR_DAT_0038ed58) {\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }" (if "if") (parenthesized_expression "(psVar1 != (size_t *)PTR_DAT_0038ed58)" (( "(") (binary_expression "psVar1 != (size_t *)PTR_DAT_0038ed58" (identifier "psVar1") (!= "!=") (cast_expression "(size_t *)PTR_DAT_0038ed58" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_DAT_0038ed58"))) () ")")) (compound_statement "{\n      psVar1[2] = 0;\n      *psVar1 = param_1;\n      psVar1[param_1 + 3] = 0;\n    }" ({ "{") (expression_statement "psVar1[2] = 0;" (assignment_expression "psVar1[2] = 0" (subscript_expression "psVar1[2]" (identifier "psVar1") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*psVar1 = param_1;" (assignment_expression "*psVar1 = param_1" (pointer_expression "*psVar1" (* "*") (identifier "psVar1")) (= "=") (identifier "param_1")) (; ";")) (expression_statement "psVar1[param_1 + 3] = 0;" (assignment_expression "psVar1[param_1 + 3] = 0" (subscript_expression "psVar1[param_1 + 3]" (identifier "psVar1") ([ "[") (binary_expression "param_1 + 3" (identifier "param_1") (+ "+") (number_literal "3")) (] "]")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}")))) (return_statement "return __s;" (return "return") (identifier "__s") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::wstring::_S_construct(unsigned int, wchar_t, std::allocator<wchar_t> const&) */

type_2 * std::wstring::_S_construct(type_1 var_1,type_2 param_2,allocator *param_3)

{
  type_1 *var_3;
  type_2 *__s;
  
  if (var_1 == 0) {
    __s = (type_2 *)&DAT_00397f6c;
  }
  else {
    var_3 = (type_1 *)_Rep::var_2(var_1,0,param_3);
    __s = (type_2 *)(var_3 + 3);
    if (var_1 == 1) {
      var_3[3] = param_2;
    }
    else {
      var_4(__s,param_2,var_1);
    }
    if (var_3 != (type_1 *)PTR__S_empty_rep_storage_0038ed58) {
      var_3[2] = 0;
      *var_3 = var_1;
      var_3[var_1 + 3] = 0;
    }
  }
  return __s;
}


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

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

wchar_t * MASKED(size_t param_1,wchar_t param_2,undefined4 param_3)

{
  size_t *psVar1;
  wchar_t *__s;
  
  if (param_1 == 0) {
    __s = (wchar_t *)&DAT_00397f6c;
  }
  else {
    psVar1 = (size_t *)FUN_00269ab0(param_1,0,param_3);
    __s = (wchar_t *)(psVar1 + 3);
    if (param_1 == 1) {
      psVar1[3] = param_2;
    }
    else {
      wmemset(__s,param_2,param_1);
    }
    if (psVar1 != (size_t *)PTR_DAT_0038ed58) {
      psVar1[2] = 0;
      *psVar1 = param_1;
      psVar1[param_1 + 3] = 0;
    }
  }
  return __s;
}

