
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* void std::wstring::_M_construct<__normal_iterator<wchar_t*, std::wstring >
   >(__normal_iterator<wchar_t*, std::wstring >, __normal_iterator<wchar_t*, std::wstring >,
   std::forward_iterator_tag) */

void std::wstring::_M_construct<__normal_iterator<wchar_t*,std::wstring>>
               (wstring *param_1,wchar_t *param_2,int param_3)

{
  wchar_t *__s1;
  uint __n;
  uint local_20 [3];
  undefined4 uStack_14;
  
  uStack_14 = 0x187779;
  __n = param_3 - (int)param_2 >> 2;
  local_20[0] = __n;
  if (__n < 4) {
    __s1 = *(wchar_t **)param_1;
    if (__n == 1) {
      *__s1 = *param_2;
      goto LAB_001877aa;
    }
    if (__n == 0) goto LAB_001877aa;
  }
  else {
    __s1 = (wchar_t *)_M_create(param_1,local_20,0);
    *(wchar_t **)param_1 = __s1;
    *(uint *)(param_1 + 8) = local_20[0];
  }
  wmemcpy(__s1,param_2,__n);
  __s1 = *(wchar_t **)param_1;
LAB_001877aa:
  *(uint *)(param_1 + 4) = local_20[0];
  __s1[local_20[0]] = L'\0';
  return;
}



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

void FUN_00187770(undefined4 *param_1,wchar_t *param_2,int param_3)

{
  wchar_t *__s1;
  uint __n;
  uint local_20 [3];
  undefined4 uStack_14;
  
  uStack_14 = 0x187779;
  __n = param_3 - (int)param_2 >> 2;
  local_20[0] = __n;
  if (__n < 4) {
    __s1 = (wchar_t *)*param_1;
    if (__n == 1) {
      *__s1 = *param_2;
      goto LAB_001877aa;
    }
    if (__n == 0) goto LAB_001877aa;
  }
  else {
    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);
    *param_1 = __s1;
    param_1[2] = local_20[0];
  }
  wmemcpy(__s1,param_2,__n);
  __s1 = (wchar_t *)*param_1;
LAB_001877aa:
  param_1[1] = local_20[0];
  __s1[local_20[0]] = L'\0';
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00032730
ADD EBX,0x17a887
SUB ESP,0x1c
MOV EBP,dword ptr [ESP + 0x34]
MOV ESI,dword ptr [ESP + 0x38]
MOV EDI,dword ptr [ESP + 0x30]
SUB ESI,EBP
SAR ESI,0x2
MOV dword ptr [ESP + 0xc],ESI
CMP ESI,0x3
JA 0x001877d0
MOV EDX,ESI
MOV EAX,dword ptr [EDI]
CMP ESI,0x1
JNZ 0x001877c0
MOV ECX,dword ptr [EBP]
MOV dword ptr [EAX],ECX
MOV dword ptr [EDI + 0x4],EDX
MOV dword ptr [EAX + EDX*0x4],0x0
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
TEST ESI,ESI
JZ 0x001877aa
JMP 0x001877ec
SUB ESP,0x4
PUSH 0x0
LEA EAX,[ESP + 0x14]
PUSH EAX
PUSH EDI
CALL 0x001844a0
MOV EDX,dword ptr [ESP + 0x1c]
ADD ESP,0x10
MOV dword ptr [EDI],EAX
MOV dword ptr [EDI + 0x8],EDX
SUB ESP,0x4
PUSH ESI
PUSH EBP
PUSH EAX
CALL 0x00026370
MOV EDX,dword ptr [ESP + 0x1c]
MOV EAX,dword ptr [EDI]
ADD ESP,0x10
JMP 0x001877aa
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00187770(undefined4 *param_1,wchar_t *param_2,int param_3)\n\n{\n  wchar_t *__s1;\n  uint __n;\n  uint local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x187779;\n  __n = param_3 - (int)param_2 >> 2;\n  local_20[0] = __n;\n  if (__n < 4) {\n    __s1 = (wchar_t *)*param_1;\n    if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }\n    if (__n == 0) goto LAB_001877aa;\n  }\n  else {\n    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);\n    *param_1 = __s1;\n    param_1[2] = local_20[0];\n  }\n  wmemcpy(__s1,param_2,__n);\n  __s1 = (wchar_t *)*param_1;\nLAB_001877aa:\n  param_1[1] = local_20[0];\n  __s1[local_20[0]] = L'\0';\n  return;\n}\n\n" comment (function_definition "void FUN_00187770(undefined4 *param_1,wchar_t *param_2,int param_3)\n\n{\n  wchar_t *__s1;\n  uint __n;\n  uint local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x187779;\n  __n = param_3 - (int)param_2 >> 2;\n  local_20[0] = __n;\n  if (__n < 4) {\n    __s1 = (wchar_t *)*param_1;\n    if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }\n    if (__n == 0) goto LAB_001877aa;\n  }\n  else {\n    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);\n    *param_1 = __s1;\n    param_1[2] = local_20[0];\n  }\n  wmemcpy(__s1,param_2,__n);\n  __s1 = (wchar_t *)*param_1;\nLAB_001877aa:\n  param_1[1] = local_20[0];\n  __s1[local_20[0]] = L'\0';\n  return;\n}" primitive_type (function_declarator "FUN_00187770(undefined4 *param_1,wchar_t *param_2,int param_3)" identifier (parameter_list "(undefined4 *param_1,wchar_t *param_2,int param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  wchar_t *__s1;\n  uint __n;\n  uint local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x187779;\n  __n = param_3 - (int)param_2 >> 2;\n  local_20[0] = __n;\n  if (__n < 4) {\n    __s1 = (wchar_t *)*param_1;\n    if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }\n    if (__n == 0) goto LAB_001877aa;\n  }\n  else {\n    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);\n    *param_1 = __s1;\n    param_1[2] = local_20[0];\n  }\n  wmemcpy(__s1,param_2,__n);\n  __s1 = (wchar_t *)*param_1;\nLAB_001877aa:\n  param_1[1] = local_20[0];\n  __s1[local_20[0]] = L'\0';\n  return;\n}" { (declaration "wchar_t *__s1;" type_identifier (pointer_declarator "*__s1" * identifier) ;) (declaration "uint __n;" type_identifier identifier ;) (declaration "uint local_20 [3];" type_identifier (array_declarator "local_20 [3]" identifier [ number_literal ]) ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x187779;" (assignment_expression "uStack_14 = 0x187779" identifier = number_literal) ;) (expression_statement "__n = param_3 - (int)param_2 >> 2;" (assignment_expression "__n = param_3 - (int)param_2 >> 2" identifier = (binary_expression "param_3 - (int)param_2 >> 2" (binary_expression "param_3 - (int)param_2" identifier - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ;) (expression_statement "local_20[0] = __n;" (assignment_expression "local_20[0] = __n" (subscript_expression "local_20[0]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (__n < 4) {\n    __s1 = (wchar_t *)*param_1;\n    if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }\n    if (__n == 0) goto LAB_001877aa;\n  }\n  else {\n    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);\n    *param_1 = __s1;\n    param_1[2] = local_20[0];\n  }" if (parenthesized_expression "(__n < 4)" ( (binary_expression "__n < 4" identifier < number_literal) )) (compound_statement "{\n    __s1 = (wchar_t *)*param_1;\n    if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }\n    if (__n == 0) goto LAB_001877aa;\n  }" { (expression_statement "__s1 = (wchar_t *)*param_1;" (assignment_expression "__s1 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }" if (parenthesized_expression "(__n == 1)" ( (binary_expression "__n == 1" identifier == number_literal) )) (compound_statement "{\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }" { (expression_statement "*__s1 = *param_2;" (assignment_expression "*__s1 = *param_2" (pointer_expression "*__s1" * identifier) = (pointer_expression "*param_2" * identifier)) ;) (goto_statement "goto LAB_001877aa;" goto statement_identifier ;) })) (if_statement "if (__n == 0) goto LAB_001877aa;" if (parenthesized_expression "(__n == 0)" ( (binary_expression "__n == 0" identifier == number_literal) )) (goto_statement "goto LAB_001877aa;" goto statement_identifier ;)) }) (else_clause "else {\n    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);\n    *param_1 = __s1;\n    param_1[2] = local_20[0];\n  }" else (compound_statement "{\n    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);\n    *param_1 = __s1;\n    param_1[2] = local_20[0];\n  }" { (expression_statement "__s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);" (assignment_expression "__s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0)" identifier = (cast_expression "(wchar_t *)FUN_001844a0(param_1,local_20,0)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001844a0(param_1,local_20,0)" identifier (argument_list "(param_1,local_20,0)" ( identifier , identifier , number_literal ))))) ;) (expression_statement "*param_1 = __s1;" (assignment_expression "*param_1 = __s1" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "param_1[2] = local_20[0];" (assignment_expression "param_1[2] = local_20[0]" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (subscript_expression "local_20[0]" identifier [ number_literal ])) ;) }))) (expression_statement "wmemcpy(__s1,param_2,__n);" (call_expression "wmemcpy(__s1,param_2,__n)" identifier (argument_list "(__s1,param_2,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "__s1 = (wchar_t *)*param_1;" (assignment_expression "__s1 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (labeled_statement "LAB_001877aa:\n  param_1[1] = local_20[0];" statement_identifier : (expression_statement "param_1[1] = local_20[0];" (assignment_expression "param_1[1] = local_20[0]" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (subscript_expression "local_20[0]" identifier [ number_literal ])) ;)) (expression_statement "__s1[local_20[0]] = L'\0';" (assignment_expression "__s1[local_20[0]] = L'\0'" (subscript_expression "__s1[local_20[0]]" identifier [ (subscript_expression "local_20[0]" identifier [ number_literal ]) ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* void std::wstring::_M_construct<__normal_iterator<wchar_t*, std::wstring >\n   >(__normal_iterator<wchar_t*, std::wstring >, __normal_iterator<wchar_t*, std::wstring >,\n   std::forward_iterator_tag) */\n\nvoid std::wstring::_M_construct<__normal_iterator<wchar_t*,std::wstring>>\n               (wstring *param_1,wchar_t *param_2,int param_3)\n\n{\n  wchar_t *__s1;\n  uint __n;\n  uint local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x187779;\n  __n = param_3 - (int)param_2 >> 2;\n  local_20[0] = __n;\n  if (__n < 4) {\n    __s1 = *(wchar_t **)param_1;\n    if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }\n    if (__n == 0) goto LAB_001877aa;\n  }\n  else {\n    __s1 = (wchar_t *)_M_create(param_1,local_20,0);\n    *(wchar_t **)param_1 = __s1;\n    *(uint *)(param_1 + 8) = local_20[0];\n  }\n  wmemcpy(__s1,param_2,__n);\n  __s1 = *(wchar_t **)param_1;\nLAB_001877aa:\n  *(uint *)(param_1 + 4) = local_20[0];\n  __s1[local_20[0]] = L'\0';\n  return;\n}\n\n" comment comment (declaration "void std::wstring::_M_construct<__normal_iterator<wchar_t*,std::wstring>>\n               (wstring *param_1,wchar_t *param_2,int param_3)\n\n{\n  wchar_t *__s1;" primitive_type (ERROR "std::wstring::_M_construct<__normal_iterator<" identifier : : identifier : : identifier < identifier <) identifier (ERROR "*" *) , (ERROR "std::wstring>>\n               (wstring *param_1,wchar_t *param_2,int param_3)\n\n{\n  wchar_t" identifier : : (function_declarator "wstring>>\n               (wstring *param_1,wchar_t *param_2,int param_3)" identifier (ERROR ">>" >>) (parameter_list "(wstring *param_1,wchar_t *param_2,int param_3)" ( (parameter_declaration "wstring *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) { identifier) (pointer_declarator "*__s1" * identifier) ;) (declaration "uint __n;" type_identifier identifier ;) (declaration "uint local_20 [3];" type_identifier (array_declarator "local_20 [3]" identifier [ number_literal ]) ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x187779;" (assignment_expression "uStack_14 = 0x187779" identifier = number_literal) ;) (expression_statement "__n = param_3 - (int)param_2 >> 2;" (assignment_expression "__n = param_3 - (int)param_2 >> 2" identifier = (binary_expression "param_3 - (int)param_2 >> 2" (binary_expression "param_3 - (int)param_2" identifier - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ;) (expression_statement "local_20[0] = __n;" (assignment_expression "local_20[0] = __n" (subscript_expression "local_20[0]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (__n < 4) {\n    __s1 = *(wchar_t **)param_1;\n    if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }\n    if (__n == 0) goto LAB_001877aa;\n  }\n  else {\n    __s1 = (wchar_t *)_M_create(param_1,local_20,0);\n    *(wchar_t **)param_1 = __s1;\n    *(uint *)(param_1 + 8) = local_20[0];\n  }" if (parenthesized_expression "(__n < 4)" ( (binary_expression "__n < 4" identifier < number_literal) )) (compound_statement "{\n    __s1 = *(wchar_t **)param_1;\n    if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }\n    if (__n == 0) goto LAB_001877aa;\n  }" { (expression_statement "__s1 = *(wchar_t **)param_1;" (assignment_expression "__s1 = *(wchar_t **)param_1" identifier = (pointer_expression "*(wchar_t **)param_1" * (cast_expression "(wchar_t **)param_1" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (if_statement "if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }" if (parenthesized_expression "(__n == 1)" ( (binary_expression "__n == 1" identifier == number_literal) )) (compound_statement "{\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }" { (expression_statement "*__s1 = *param_2;" (assignment_expression "*__s1 = *param_2" (pointer_expression "*__s1" * identifier) = (pointer_expression "*param_2" * identifier)) ;) (goto_statement "goto LAB_001877aa;" goto statement_identifier ;) })) (if_statement "if (__n == 0) goto LAB_001877aa;" if (parenthesized_expression "(__n == 0)" ( (binary_expression "__n == 0" identifier == number_literal) )) (goto_statement "goto LAB_001877aa;" goto statement_identifier ;)) }) (else_clause "else {\n    __s1 = (wchar_t *)_M_create(param_1,local_20,0);\n    *(wchar_t **)param_1 = __s1;\n    *(uint *)(param_1 + 8) = local_20[0];\n  }" else (compound_statement "{\n    __s1 = (wchar_t *)_M_create(param_1,local_20,0);\n    *(wchar_t **)param_1 = __s1;\n    *(uint *)(param_1 + 8) = local_20[0];\n  }" { (expression_statement "__s1 = (wchar_t *)_M_create(param_1,local_20,0);" (assignment_expression "__s1 = (wchar_t *)_M_create(param_1,local_20,0)" identifier = (cast_expression "(wchar_t *)_M_create(param_1,local_20,0)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "_M_create(param_1,local_20,0)" identifier (argument_list "(param_1,local_20,0)" ( identifier , identifier , number_literal ))))) ;) (expression_statement "*(wchar_t **)param_1 = __s1;" (assignment_expression "*(wchar_t **)param_1 = __s1" (pointer_expression "*(wchar_t **)param_1" * (cast_expression "(wchar_t **)param_1" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (expression_statement "*(uint *)(param_1 + 8) = local_20[0];" (assignment_expression "*(uint *)(param_1 + 8) = local_20[0]" (pointer_expression "*(uint *)(param_1 + 8)" * (cast_expression "(uint *)(param_1 + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = (subscript_expression "local_20[0]" identifier [ number_literal ])) ;) }))) (expression_statement "wmemcpy(__s1,param_2,__n);" (call_expression "wmemcpy(__s1,param_2,__n)" identifier (argument_list "(__s1,param_2,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "__s1 = *(wchar_t **)param_1;" (assignment_expression "__s1 = *(wchar_t **)param_1" identifier = (pointer_expression "*(wchar_t **)param_1" * (cast_expression "(wchar_t **)param_1" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (labeled_statement "LAB_001877aa:\n  *(uint *)(param_1 + 4) = local_20[0];" statement_identifier : (expression_statement "*(uint *)(param_1 + 4) = local_20[0];" (assignment_expression "*(uint *)(param_1 + 4) = local_20[0]" (pointer_expression "*(uint *)(param_1 + 4)" * (cast_expression "(uint *)(param_1 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) = (subscript_expression "local_20[0]" identifier [ number_literal ])) ;)) (expression_statement "__s1[local_20[0]] = L'\0';" (assignment_expression "__s1[local_20[0]] = L'\0'" (subscript_expression "__s1[local_20[0]]" identifier [ (subscript_expression "local_20[0]" identifier [ number_literal ]) ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (return_statement "return;" return ;) (ERROR "}" }))
(translation_unit "void FUN_00187770(undefined4 *param_1,wchar_t *param_2,int param_3)\n\n{\n  wchar_t *__s1;\n  uint __n;\n  uint local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x187779;\n  __n = param_3 - (int)param_2 >> 2;\n  local_20[0] = __n;\n  if (__n < 4) {\n    __s1 = (wchar_t *)*param_1;\n    if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }\n    if (__n == 0) goto LAB_001877aa;\n  }\n  else {\n    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);\n    *param_1 = __s1;\n    param_1[2] = local_20[0];\n  }\n  wmemcpy(__s1,param_2,__n);\n  __s1 = (wchar_t *)*param_1;\nLAB_001877aa:\n  param_1[1] = local_20[0];\n  __s1[local_20[0]] = L'\0';\n  return;\n}\n\n" (function_definition "void FUN_00187770(undefined4 *param_1,wchar_t *param_2,int param_3)\n\n{\n  wchar_t *__s1;\n  uint __n;\n  uint local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x187779;\n  __n = param_3 - (int)param_2 >> 2;\n  local_20[0] = __n;\n  if (__n < 4) {\n    __s1 = (wchar_t *)*param_1;\n    if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }\n    if (__n == 0) goto LAB_001877aa;\n  }\n  else {\n    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);\n    *param_1 = __s1;\n    param_1[2] = local_20[0];\n  }\n  wmemcpy(__s1,param_2,__n);\n  __s1 = (wchar_t *)*param_1;\nLAB_001877aa:\n  param_1[1] = local_20[0];\n  __s1[local_20[0]] = L'\0';\n  return;\n}" primitive_type (function_declarator "FUN_00187770(undefined4 *param_1,wchar_t *param_2,int param_3)" identifier (parameter_list "(undefined4 *param_1,wchar_t *param_2,int param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  wchar_t *__s1;\n  uint __n;\n  uint local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x187779;\n  __n = param_3 - (int)param_2 >> 2;\n  local_20[0] = __n;\n  if (__n < 4) {\n    __s1 = (wchar_t *)*param_1;\n    if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }\n    if (__n == 0) goto LAB_001877aa;\n  }\n  else {\n    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);\n    *param_1 = __s1;\n    param_1[2] = local_20[0];\n  }\n  wmemcpy(__s1,param_2,__n);\n  __s1 = (wchar_t *)*param_1;\nLAB_001877aa:\n  param_1[1] = local_20[0];\n  __s1[local_20[0]] = L'\0';\n  return;\n}" { (declaration "wchar_t *__s1;" type_identifier (pointer_declarator "*__s1" * identifier) ;) (declaration "uint __n;" type_identifier identifier ;) (declaration "uint local_20 [3];" type_identifier (array_declarator "local_20 [3]" identifier [ number_literal ]) ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x187779;" (assignment_expression "uStack_14 = 0x187779" identifier = number_literal) ;) (expression_statement "__n = param_3 - (int)param_2 >> 2;" (assignment_expression "__n = param_3 - (int)param_2 >> 2" identifier = (binary_expression "param_3 - (int)param_2 >> 2" (binary_expression "param_3 - (int)param_2" identifier - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal)) ;) (expression_statement "local_20[0] = __n;" (assignment_expression "local_20[0] = __n" (subscript_expression "local_20[0]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (__n < 4) {\n    __s1 = (wchar_t *)*param_1;\n    if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }\n    if (__n == 0) goto LAB_001877aa;\n  }\n  else {\n    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);\n    *param_1 = __s1;\n    param_1[2] = local_20[0];\n  }" if (parenthesized_expression "(__n < 4)" ( (binary_expression "__n < 4" identifier < number_literal) )) (compound_statement "{\n    __s1 = (wchar_t *)*param_1;\n    if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }\n    if (__n == 0) goto LAB_001877aa;\n  }" { (expression_statement "__s1 = (wchar_t *)*param_1;" (assignment_expression "__s1 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }" if (parenthesized_expression "(__n == 1)" ( (binary_expression "__n == 1" identifier == number_literal) )) (compound_statement "{\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }" { (expression_statement "*__s1 = *param_2;" (assignment_expression "*__s1 = *param_2" (pointer_expression "*__s1" * identifier) = (pointer_expression "*param_2" * identifier)) ;) (goto_statement "goto LAB_001877aa;" goto statement_identifier ;) })) (if_statement "if (__n == 0) goto LAB_001877aa;" if (parenthesized_expression "(__n == 0)" ( (binary_expression "__n == 0" identifier == number_literal) )) (goto_statement "goto LAB_001877aa;" goto statement_identifier ;)) }) (else_clause "else {\n    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);\n    *param_1 = __s1;\n    param_1[2] = local_20[0];\n  }" else (compound_statement "{\n    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);\n    *param_1 = __s1;\n    param_1[2] = local_20[0];\n  }" { (expression_statement "__s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);" (assignment_expression "__s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0)" identifier = (cast_expression "(wchar_t *)FUN_001844a0(param_1,local_20,0)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001844a0(param_1,local_20,0)" identifier (argument_list "(param_1,local_20,0)" ( identifier , identifier , number_literal ))))) ;) (expression_statement "*param_1 = __s1;" (assignment_expression "*param_1 = __s1" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "param_1[2] = local_20[0];" (assignment_expression "param_1[2] = local_20[0]" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (subscript_expression "local_20[0]" identifier [ number_literal ])) ;) }))) (expression_statement "wmemcpy(__s1,param_2,__n);" (call_expression "wmemcpy(__s1,param_2,__n)" identifier (argument_list "(__s1,param_2,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "__s1 = (wchar_t *)*param_1;" (assignment_expression "__s1 = (wchar_t *)*param_1" identifier = (cast_expression "(wchar_t *)*param_1" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (labeled_statement "LAB_001877aa:\n  param_1[1] = local_20[0];" statement_identifier : (expression_statement "param_1[1] = local_20[0];" (assignment_expression "param_1[1] = local_20[0]" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (subscript_expression "local_20[0]" identifier [ number_literal ])) ;)) (expression_statement "__s1[local_20[0]] = L'\0';" (assignment_expression "__s1[local_20[0]] = L'\0'" (subscript_expression "__s1[local_20[0]]" identifier [ (subscript_expression "local_20[0]" identifier [ number_literal ]) ]) = (char_literal "L'\0'" L' escape_sequence ')) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (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 (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) >> LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = 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))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;) }))) (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))) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;)) (expression_statement (assignment_expression (subscript_expression IDENT [ (subscript_expression IDENT [ LIT ]) ]) = (char_literal L' escape_sequence ')) ;) (return_statement return ;) })))
(function_definition "void FUN_00187770(undefined4 *param_1,wchar_t *param_2,int param_3)\n\n{\n  wchar_t *__s1;\n  uint __n;\n  uint local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x187779;\n  __n = param_3 - (int)param_2 >> 2;\n  local_20[0] = __n;\n  if (__n < 4) {\n    __s1 = (wchar_t *)*param_1;\n    if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }\n    if (__n == 0) goto LAB_001877aa;\n  }\n  else {\n    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);\n    *param_1 = __s1;\n    param_1[2] = local_20[0];\n  }\n  wmemcpy(__s1,param_2,__n);\n  __s1 = (wchar_t *)*param_1;\nLAB_001877aa:\n  param_1[1] = local_20[0];\n  __s1[local_20[0]] = L'\0';\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00187770(undefined4 *param_1,wchar_t *param_2,int param_3)" (identifier "FUN_00187770") (parameter_list "(undefined4 *param_1,wchar_t *param_2,int param_3)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (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 "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  wchar_t *__s1;\n  uint __n;\n  uint local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x187779;\n  __n = param_3 - (int)param_2 >> 2;\n  local_20[0] = __n;\n  if (__n < 4) {\n    __s1 = (wchar_t *)*param_1;\n    if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }\n    if (__n == 0) goto LAB_001877aa;\n  }\n  else {\n    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);\n    *param_1 = __s1;\n    param_1[2] = local_20[0];\n  }\n  wmemcpy(__s1,param_2,__n);\n  __s1 = (wchar_t *)*param_1;\nLAB_001877aa:\n  param_1[1] = local_20[0];\n  __s1[local_20[0]] = L'\0';\n  return;\n}" ({ "{") (declaration "wchar_t *__s1;" (type_identifier "wchar_t") (pointer_declarator "*__s1" (* "*") (identifier "__s1")) (; ";")) (declaration "uint __n;" (type_identifier "uint") (identifier "__n") (; ";")) (declaration "uint local_20 [3];" (type_identifier "uint") (array_declarator "local_20 [3]" (identifier "local_20") ([ "[") (number_literal "3") (] "]")) (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x187779;" (assignment_expression "uStack_14 = 0x187779" (identifier "uStack_14") (= "=") (number_literal "0x187779")) (; ";")) (expression_statement "__n = param_3 - (int)param_2 >> 2;" (assignment_expression "__n = param_3 - (int)param_2 >> 2" (identifier "__n") (= "=") (binary_expression "param_3 - (int)param_2 >> 2" (binary_expression "param_3 - (int)param_2" (identifier "param_3") (- "-") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) (>> ">>") (number_literal "2"))) (; ";")) (expression_statement "local_20[0] = __n;" (assignment_expression "local_20[0] = __n" (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]")) (= "=") (identifier "__n")) (; ";")) (if_statement "if (__n < 4) {\n    __s1 = (wchar_t *)*param_1;\n    if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }\n    if (__n == 0) goto LAB_001877aa;\n  }\n  else {\n    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);\n    *param_1 = __s1;\n    param_1[2] = local_20[0];\n  }" (if "if") (parenthesized_expression "(__n < 4)" (( "(") (binary_expression "__n < 4" (identifier "__n") (< "<") (number_literal "4")) () ")")) (compound_statement "{\n    __s1 = (wchar_t *)*param_1;\n    if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }\n    if (__n == 0) goto LAB_001877aa;\n  }" ({ "{") (expression_statement "__s1 = (wchar_t *)*param_1;" (assignment_expression "__s1 = (wchar_t *)*param_1" (identifier "__s1") (= "=") (cast_expression "(wchar_t *)*param_1" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (if_statement "if (__n == 1) {\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }" (if "if") (parenthesized_expression "(__n == 1)" (( "(") (binary_expression "__n == 1" (identifier "__n") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      *__s1 = *param_2;\n      goto LAB_001877aa;\n    }" ({ "{") (expression_statement "*__s1 = *param_2;" (assignment_expression "*__s1 = *param_2" (pointer_expression "*__s1" (* "*") (identifier "__s1")) (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (goto_statement "goto LAB_001877aa;" (goto "goto") (statement_identifier "LAB_001877aa") (; ";")) (} "}"))) (if_statement "if (__n == 0) goto LAB_001877aa;" (if "if") (parenthesized_expression "(__n == 0)" (( "(") (binary_expression "__n == 0" (identifier "__n") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_001877aa;" (goto "goto") (statement_identifier "LAB_001877aa") (; ";"))) (} "}")) (else_clause "else {\n    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);\n    *param_1 = __s1;\n    param_1[2] = local_20[0];\n  }" (else "else") (compound_statement "{\n    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);\n    *param_1 = __s1;\n    param_1[2] = local_20[0];\n  }" ({ "{") (expression_statement "__s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);" (assignment_expression "__s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0)" (identifier "__s1") (= "=") (cast_expression "(wchar_t *)FUN_001844a0(param_1,local_20,0)" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_001844a0(param_1,local_20,0)" (identifier "FUN_001844a0") (argument_list "(param_1,local_20,0)" (( "(") (identifier "param_1") (, ",") (identifier "local_20") (, ",") (number_literal "0") () ")"))))) (; ";")) (expression_statement "*param_1 = __s1;" (assignment_expression "*param_1 = __s1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "__s1")) (; ";")) (expression_statement "param_1[2] = local_20[0];" (assignment_expression "param_1[2] = local_20[0]" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]"))) (; ";")) (} "}")))) (expression_statement "wmemcpy(__s1,param_2,__n);" (call_expression "wmemcpy(__s1,param_2,__n)" (identifier "wmemcpy") (argument_list "(__s1,param_2,__n)" (( "(") (identifier "__s1") (, ",") (identifier "param_2") (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "__s1 = (wchar_t *)*param_1;" (assignment_expression "__s1 = (wchar_t *)*param_1" (identifier "__s1") (= "=") (cast_expression "(wchar_t *)*param_1" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (labeled_statement "LAB_001877aa:\n  param_1[1] = local_20[0];" (statement_identifier "LAB_001877aa") (: ":") (expression_statement "param_1[1] = local_20[0];" (assignment_expression "param_1[1] = local_20[0]" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]"))) (; ";"))) (expression_statement "__s1[local_20[0]] = L'\0';" (assignment_expression "__s1[local_20[0]] = L'\0'" (subscript_expression "__s1[local_20[0]]" (identifier "__s1") ([ "[") (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]")) (] "]")) (= "=") (char_literal "L'\0'" (L' "L'") (escape_sequence "\0") (' "'"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* void std::wstring::_M_construct<__normal_iterator<wchar_t*, std::wstring >
   >(__normal_iterator<wchar_t*, std::wstring >, __normal_iterator<wchar_t*, std::wstring >,
   std::forward_iterator_tag) */

void std::wstring::_M_construct<__normal_iterator<type_3*,std::wstring>>
               (wstring *var_4,type_3 *param_2,int var_1)

{
  type_3 *__s1;
  type_1 var_2;
  type_1 local_20 [3];
  type_2 uStack_14;
  
  uStack_14 = 0x187779;
  var_2 = var_1 - (int)param_2 >> 2;
  local_20[0] = var_2;
  if (var_2 < 4) {
    __s1 = *(type_3 **)var_4;
    if (var_2 == 1) {
      *__s1 = *param_2;
      goto LAB_001877aa;
    }
    if (var_2 == 0) goto LAB_001877aa;
  }
  else {
    __s1 = (type_3 *)var_3(var_4,local_20,0);
    *(type_3 **)var_4 = __s1;
    *(type_1 *)(var_4 + 8) = local_20[0];
  }
  var_5(__s1,param_2,var_2);
  __s1 = *(type_3 **)var_4;
LAB_001877aa:
  *(type_1 *)(var_4 + 4) = local_20[0];
  __s1[local_20[0]] = L'\0';
  return;
}


(translation_unit (function_definition type: (primitive_type) 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: (primitive_type) 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: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) right: (number_literal)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier)))) (goto_statement label: (statement_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier)))) alternative: (else_clause (compound_statement (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) (identifier) (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (subscript_expression argument: (identifier) index: (number_literal))))))) (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))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (subscript_expression argument: (identifier) index: (number_literal))) right: (char_literal (escape_sequence)))) (return_statement))))

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

void MASKED(undefined4 *param_1,wchar_t *param_2,int param_3)

{
  wchar_t *__s1;
  uint __n;
  uint local_20 [3];
  undefined4 uStack_14;
  
  uStack_14 = 0x187779;
  __n = param_3 - (int)param_2 >> 2;
  local_20[0] = __n;
  if (__n < 4) {
    __s1 = (wchar_t *)*param_1;
    if (__n == 1) {
      *__s1 = *param_2;
      goto LAB_001877aa;
    }
    if (__n == 0) goto LAB_001877aa;
  }
  else {
    __s1 = (wchar_t *)FUN_001844a0(param_1,local_20,0);
    *param_1 = __s1;
    param_1[2] = local_20[0];
  }
  wmemcpy(__s1,param_2,__n);
  __s1 = (wchar_t *)*param_1;
LAB_001877aa:
  param_1[1] = local_20[0];
  __s1[local_20[0]] = L'\0';
  return;
}

