
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::string::_M_construct(unsigned int, char) */

void __thiscall std::string::_M_construct(string *this,uint param_1,char param_2)

{
  char cVar1;
  char *__s;
  undefined3 in_stack_0000000d;
  
  cVar1 = param_2;
  if (param_1 < 0x10) {
    __s = *(char **)this;
  }
  else {
    __s = (char *)_M_create(this,&param_1,0);
    *(char **)this = __s;
    *(uint *)(this + 8) = param_1;
  }
  if (param_1 != 0) {
    if (param_1 == 1) {
      *__s = cVar1;
      *(undefined4 *)(this + 4) = 1;
      *(undefined1 *)(*(int *)this + 1) = 0;
      return;
    }
    memset(__s,(int)cVar1,param_1);
    __s = *(char **)this;
  }
  *(uint *)(this + 4) = param_1;
  __s[param_1] = '\0';
  return;
}



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

void FUN_00206810(int *param_1,size_t param_2,undefined4 param_3)

{
  undefined4 uVar1;
  char *__s;
  
  uVar1 = param_3;
  if (param_2 < 0x10) {
    __s = (char *)*param_1;
  }
  else {
    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);
    *param_1 = (int)__s;
    param_1[2] = param_2;
  }
  if (param_2 != 0) {
    if (param_2 == 1) {
      *__s = (char)uVar1;
      param_1[1] = 1;
      *(undefined1 *)(*param_1 + 1) = 0;
      return;
    }
    memset(__s,(int)(char)uVar1,param_2);
    __s = (char *)*param_1;
  }
  param_1[1] = param_2;
  __s[param_2] = '\0';
  return;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV EDX,dword ptr [ESP + 0x14]
CALL 0x00036f20
ADD EBX,0x1a87e4
MOV ESI,dword ptr [ESP + 0x10]
MOV EDI,dword ptr [ESP + 0x18]
CMP EDX,0xf
JA 0x00206860
MOV EAX,dword ptr [ESI]
TEST EDX,EDX
JZ 0x00206853
CMP EDX,0x1
JZ 0x00206880
MOV ECX,EDI
SUB ESP,0x4
MOVSX EDI,CL
PUSH EDX
PUSH EDI
PUSH EAX
CALL 0x0002a300
MOV EAX,dword ptr [ESI]
MOV EDX,dword ptr [ESP + 0x24]
ADD ESP,0x10
MOV dword ptr [ESI + 0x4],EDX
MOV byte ptr [EAX + EDX*0x1],0x0
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0x4
PUSH 0x0
LEA EAX,[ESP + 0x1c]
PUSH EAX
PUSH ESI
CALL 0x00206740
MOV EDX,dword ptr [ESP + 0x24]
ADD ESP,0x10
MOV dword ptr [ESI],EAX
MOV dword ptr [ESI + 0x8],EDX
JMP 0x00206831
MOV ECX,EDI
MOV byte ptr [EAX],CL
MOV EDX,dword ptr [ESP + 0x14]
MOV EAX,dword ptr [ESI]
MOV dword ptr [ESI + 0x4],EDX
MOV byte ptr [EAX + EDX*0x1],0x0
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00206810(int *param_1,size_t param_2,undefined4 param_3)\n\n{\n  undefined4 uVar1;\n  char *__s;\n  \n  uVar1 = param_3;\n  if (param_2 < 0x10) {\n    __s = (char *)*param_1;\n  }\n  else {\n    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);\n    *param_1 = (int)__s;\n    param_1[2] = param_2;\n  }\n  if (param_2 != 0) {\n    if (param_2 == 1) {\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }\n    memset(__s,(int)(char)uVar1,param_2);\n    __s = (char *)*param_1;\n  }\n  param_1[1] = param_2;\n  __s[param_2] = '\0';\n  return;\n}\n\n" comment (function_definition "void FUN_00206810(int *param_1,size_t param_2,undefined4 param_3)\n\n{\n  undefined4 uVar1;\n  char *__s;\n  \n  uVar1 = param_3;\n  if (param_2 < 0x10) {\n    __s = (char *)*param_1;\n  }\n  else {\n    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);\n    *param_1 = (int)__s;\n    param_1[2] = param_2;\n  }\n  if (param_2 != 0) {\n    if (param_2 == 1) {\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }\n    memset(__s,(int)(char)uVar1,param_2);\n    __s = (char *)*param_1;\n  }\n  param_1[1] = param_2;\n  __s[param_2] = '\0';\n  return;\n}" primitive_type (function_declarator "FUN_00206810(int *param_1,size_t param_2,undefined4 param_3)" identifier (parameter_list "(int *param_1,size_t param_2,undefined4 param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "size_t param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  char *__s;\n  \n  uVar1 = param_3;\n  if (param_2 < 0x10) {\n    __s = (char *)*param_1;\n  }\n  else {\n    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);\n    *param_1 = (int)__s;\n    param_1[2] = param_2;\n  }\n  if (param_2 != 0) {\n    if (param_2 == 1) {\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }\n    memset(__s,(int)(char)uVar1,param_2);\n    __s = (char *)*param_1;\n  }\n  param_1[1] = param_2;\n  __s[param_2] = '\0';\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (expression_statement "uVar1 = param_3;" (assignment_expression "uVar1 = param_3" identifier = identifier) ;) (if_statement "if (param_2 < 0x10) {\n    __s = (char *)*param_1;\n  }\n  else {\n    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);\n    *param_1 = (int)__s;\n    param_1[2] = param_2;\n  }" if (parenthesized_expression "(param_2 < 0x10)" ( (binary_expression "param_2 < 0x10" identifier < number_literal) )) (compound_statement "{\n    __s = (char *)*param_1;\n  }" { (expression_statement "__s = (char *)*param_1;" (assignment_expression "__s = (char *)*param_1" identifier = (cast_expression "(char *)*param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) }) (else_clause "else {\n    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);\n    *param_1 = (int)__s;\n    param_1[2] = param_2;\n  }" else (compound_statement "{\n    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);\n    *param_1 = (int)__s;\n    param_1[2] = param_2;\n  }" { (expression_statement "__s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);" (assignment_expression "__s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c)" identifier = (cast_expression "(char *)FUN_00206740(param_1,&param_2,0,0x20681c)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00206740(param_1,&param_2,0,0x20681c)" identifier (argument_list "(param_1,&param_2,0,0x20681c)" ( identifier , (pointer_expression "&param_2" & identifier) , number_literal , number_literal ))))) ;) (expression_statement "*param_1 = (int)__s;" (assignment_expression "*param_1 = (int)__s" (pointer_expression "*param_1" * identifier) = (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "param_1[2] = param_2;" (assignment_expression "param_1[2] = param_2" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) }))) (if_statement "if (param_2 != 0) {\n    if (param_2 == 1) {\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }\n    memset(__s,(int)(char)uVar1,param_2);\n    __s = (char *)*param_1;\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_2 == 1) {\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }\n    memset(__s,(int)(char)uVar1,param_2);\n    __s = (char *)*param_1;\n  }" { (if_statement "if (param_2 == 1) {\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }" { (expression_statement "*__s = (char)uVar1;" (assignment_expression "*__s = (char)uVar1" (pointer_expression "*__s" * identifier) = (cast_expression "(char)uVar1" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "param_1[1] = 1;" (assignment_expression "param_1[1] = 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(undefined1 *)(*param_1 + 1) = 0;" (assignment_expression "*(undefined1 *)(*param_1 + 1) = 0" (pointer_expression "*(undefined1 *)(*param_1 + 1)" * (cast_expression "(undefined1 *)(*param_1 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 1)" ( (binary_expression "*param_1 + 1" (pointer_expression "*param_1" * identifier) + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "memset(__s,(int)(char)uVar1,param_2);" (call_expression "memset(__s,(int)(char)uVar1,param_2)" identifier (argument_list "(__s,(int)(char)uVar1,param_2)" ( identifier , (cast_expression "(int)(char)uVar1" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)uVar1" ( (type_descriptor "char" primitive_type) ) identifier)) , identifier ))) ;) (expression_statement "__s = (char *)*param_1;" (assignment_expression "__s = (char *)*param_1" identifier = (cast_expression "(char *)*param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (expression_statement "param_1[1] = param_2;" (assignment_expression "param_1[1] = param_2" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "__s[param_2] = '\0';" (assignment_expression "__s[param_2] = '\0'" (subscript_expression "__s[param_2]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::string::_M_construct(unsigned int, char) */\n\nvoid __thiscall std::string::_M_construct(string *this,uint param_1,char param_2)\n\n{\n  char cVar1;\n  char *__s;\n  undefined3 in_stack_0000000d;\n  \n  cVar1 = param_2;\n  if (param_1 < 0x10) {\n    __s = *(char **)this;\n  }\n  else {\n    __s = (char *)_M_create(this,&param_1,0);\n    *(char **)this = __s;\n    *(uint *)(this + 8) = param_1;\n  }\n  if (param_1 != 0) {\n    if (param_1 == 1) {\n      *__s = cVar1;\n      *(undefined4 *)(this + 4) = 1;\n      *(undefined1 *)(*(int *)this + 1) = 0;\n      return;\n    }\n    memset(__s,(int)cVar1,param_1);\n    __s = *(char **)this;\n  }\n  *(uint *)(this + 4) = param_1;\n  __s[param_1] = '\0';\n  return;\n}\n\n" comment comment (function_definition "void __thiscall std::string::_M_construct(string *this,uint param_1,char param_2)\n\n{\n  char cVar1;\n  char *__s;\n  undefined3 in_stack_0000000d;\n  \n  cVar1 = param_2;\n  if (param_1 < 0x10) {\n    __s = *(char **)this;\n  }\n  else {\n    __s = (char *)_M_create(this,&param_1,0);\n    *(char **)this = __s;\n    *(uint *)(this + 8) = param_1;\n  }\n  if (param_1 != 0) {\n    if (param_1 == 1) {\n      *__s = cVar1;\n      *(undefined4 *)(this + 4) = 1;\n      *(undefined1 *)(*(int *)this + 1) = 0;\n      return;\n    }\n    memset(__s,(int)cVar1,param_1);\n    __s = *(char **)this;\n  }\n  *(uint *)(this + 4) = param_1;\n  __s[param_1] = '\0';\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::string::" identifier : : identifier : :) (function_declarator "_M_construct(string *this,uint param_1,char param_2)" identifier (parameter_list "(string *this,uint param_1,char param_2)" ( (parameter_declaration "string *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "char param_2" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  char *__s;\n  undefined3 in_stack_0000000d;\n  \n  cVar1 = param_2;\n  if (param_1 < 0x10) {\n    __s = *(char **)this;\n  }\n  else {\n    __s = (char *)_M_create(this,&param_1,0);\n    *(char **)this = __s;\n    *(uint *)(this + 8) = param_1;\n  }\n  if (param_1 != 0) {\n    if (param_1 == 1) {\n      *__s = cVar1;\n      *(undefined4 *)(this + 4) = 1;\n      *(undefined1 *)(*(int *)this + 1) = 0;\n      return;\n    }\n    memset(__s,(int)cVar1,param_1);\n    __s = *(char **)this;\n  }\n  *(uint *)(this + 4) = param_1;\n  __s[param_1] = '\0';\n  return;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "undefined3 in_stack_0000000d;" type_identifier identifier ;) (expression_statement "cVar1 = param_2;" (assignment_expression "cVar1 = param_2" identifier = identifier) ;) (if_statement "if (param_1 < 0x10) {\n    __s = *(char **)this;\n  }\n  else {\n    __s = (char *)_M_create(this,&param_1,0);\n    *(char **)this = __s;\n    *(uint *)(this + 8) = param_1;\n  }" if (parenthesized_expression "(param_1 < 0x10)" ( (binary_expression "param_1 < 0x10" identifier < number_literal) )) (compound_statement "{\n    __s = *(char **)this;\n  }" { (expression_statement "__s = *(char **)this;" (assignment_expression "__s = *(char **)this" identifier = (pointer_expression "*(char **)this" * (cast_expression "(char **)this" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) }) (else_clause "else {\n    __s = (char *)_M_create(this,&param_1,0);\n    *(char **)this = __s;\n    *(uint *)(this + 8) = param_1;\n  }" else (compound_statement "{\n    __s = (char *)_M_create(this,&param_1,0);\n    *(char **)this = __s;\n    *(uint *)(this + 8) = param_1;\n  }" { (expression_statement "__s = (char *)_M_create(this,&param_1,0);" (assignment_expression "__s = (char *)_M_create(this,&param_1,0)" identifier = (cast_expression "(char *)_M_create(this,&param_1,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "_M_create(this,&param_1,0)" identifier (argument_list "(this,&param_1,0)" ( identifier , (pointer_expression "&param_1" & identifier) , number_literal ))))) ;) (expression_statement "*(char **)this = __s;" (assignment_expression "*(char **)this = __s" (pointer_expression "*(char **)this" * (cast_expression "(char **)this" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (expression_statement "*(uint *)(this + 8) = param_1;" (assignment_expression "*(uint *)(this + 8) = param_1" (pointer_expression "*(uint *)(this + 8)" * (cast_expression "(uint *)(this + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = identifier) ;) }))) (if_statement "if (param_1 != 0) {\n    if (param_1 == 1) {\n      *__s = cVar1;\n      *(undefined4 *)(this + 4) = 1;\n      *(undefined1 *)(*(int *)this + 1) = 0;\n      return;\n    }\n    memset(__s,(int)cVar1,param_1);\n    __s = *(char **)this;\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_1 == 1) {\n      *__s = cVar1;\n      *(undefined4 *)(this + 4) = 1;\n      *(undefined1 *)(*(int *)this + 1) = 0;\n      return;\n    }\n    memset(__s,(int)cVar1,param_1);\n    __s = *(char **)this;\n  }" { (if_statement "if (param_1 == 1) {\n      *__s = cVar1;\n      *(undefined4 *)(this + 4) = 1;\n      *(undefined1 *)(*(int *)this + 1) = 0;\n      return;\n    }" if (parenthesized_expression "(param_1 == 1)" ( (binary_expression "param_1 == 1" identifier == number_literal) )) (compound_statement "{\n      *__s = cVar1;\n      *(undefined4 *)(this + 4) = 1;\n      *(undefined1 *)(*(int *)this + 1) = 0;\n      return;\n    }" { (expression_statement "*__s = cVar1;" (assignment_expression "*__s = cVar1" (pointer_expression "*__s" * identifier) = identifier) ;) (expression_statement "*(undefined4 *)(this + 4) = 1;" (assignment_expression "*(undefined4 *)(this + 4) = 1" (pointer_expression "*(undefined4 *)(this + 4)" * (cast_expression "(undefined4 *)(this + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(*(int *)this + 1) = 0;" (assignment_expression "*(undefined1 *)(*(int *)this + 1) = 0" (pointer_expression "*(undefined1 *)(*(int *)this + 1)" * (cast_expression "(undefined1 *)(*(int *)this + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + 1)" ( (binary_expression "*(int *)this + 1" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "memset(__s,(int)cVar1,param_1);" (call_expression "memset(__s,(int)cVar1,param_1)" identifier (argument_list "(__s,(int)cVar1,param_1)" ( identifier , (cast_expression "(int)cVar1" ( (type_descriptor "int" primitive_type) ) identifier) , identifier ))) ;) (expression_statement "__s = *(char **)this;" (assignment_expression "__s = *(char **)this" identifier = (pointer_expression "*(char **)this" * (cast_expression "(char **)this" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })) (expression_statement "*(uint *)(this + 4) = param_1;" (assignment_expression "*(uint *)(this + 4) = param_1" (pointer_expression "*(uint *)(this + 4)" * (cast_expression "(uint *)(this + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "__s[param_1] = '\0';" (assignment_expression "__s[param_1] = '\0'" (subscript_expression "__s[param_1]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00206810(int *param_1,size_t param_2,undefined4 param_3)\n\n{\n  undefined4 uVar1;\n  char *__s;\n  \n  uVar1 = param_3;\n  if (param_2 < 0x10) {\n    __s = (char *)*param_1;\n  }\n  else {\n    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);\n    *param_1 = (int)__s;\n    param_1[2] = param_2;\n  }\n  if (param_2 != 0) {\n    if (param_2 == 1) {\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }\n    memset(__s,(int)(char)uVar1,param_2);\n    __s = (char *)*param_1;\n  }\n  param_1[1] = param_2;\n  __s[param_2] = '\0';\n  return;\n}\n\n" (function_definition "void FUN_00206810(int *param_1,size_t param_2,undefined4 param_3)\n\n{\n  undefined4 uVar1;\n  char *__s;\n  \n  uVar1 = param_3;\n  if (param_2 < 0x10) {\n    __s = (char *)*param_1;\n  }\n  else {\n    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);\n    *param_1 = (int)__s;\n    param_1[2] = param_2;\n  }\n  if (param_2 != 0) {\n    if (param_2 == 1) {\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }\n    memset(__s,(int)(char)uVar1,param_2);\n    __s = (char *)*param_1;\n  }\n  param_1[1] = param_2;\n  __s[param_2] = '\0';\n  return;\n}" primitive_type (function_declarator "FUN_00206810(int *param_1,size_t param_2,undefined4 param_3)" identifier (parameter_list "(int *param_1,size_t param_2,undefined4 param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "size_t param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  char *__s;\n  \n  uVar1 = param_3;\n  if (param_2 < 0x10) {\n    __s = (char *)*param_1;\n  }\n  else {\n    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);\n    *param_1 = (int)__s;\n    param_1[2] = param_2;\n  }\n  if (param_2 != 0) {\n    if (param_2 == 1) {\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }\n    memset(__s,(int)(char)uVar1,param_2);\n    __s = (char *)*param_1;\n  }\n  param_1[1] = param_2;\n  __s[param_2] = '\0';\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (expression_statement "uVar1 = param_3;" (assignment_expression "uVar1 = param_3" identifier = identifier) ;) (if_statement "if (param_2 < 0x10) {\n    __s = (char *)*param_1;\n  }\n  else {\n    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);\n    *param_1 = (int)__s;\n    param_1[2] = param_2;\n  }" if (parenthesized_expression "(param_2 < 0x10)" ( (binary_expression "param_2 < 0x10" identifier < number_literal) )) (compound_statement "{\n    __s = (char *)*param_1;\n  }" { (expression_statement "__s = (char *)*param_1;" (assignment_expression "__s = (char *)*param_1" identifier = (cast_expression "(char *)*param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) }) (else_clause "else {\n    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);\n    *param_1 = (int)__s;\n    param_1[2] = param_2;\n  }" else (compound_statement "{\n    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);\n    *param_1 = (int)__s;\n    param_1[2] = param_2;\n  }" { (expression_statement "__s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);" (assignment_expression "__s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c)" identifier = (cast_expression "(char *)FUN_00206740(param_1,&param_2,0,0x20681c)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00206740(param_1,&param_2,0,0x20681c)" identifier (argument_list "(param_1,&param_2,0,0x20681c)" ( identifier , (pointer_expression "&param_2" & identifier) , number_literal , number_literal ))))) ;) (expression_statement "*param_1 = (int)__s;" (assignment_expression "*param_1 = (int)__s" (pointer_expression "*param_1" * identifier) = (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "param_1[2] = param_2;" (assignment_expression "param_1[2] = param_2" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) }))) (if_statement "if (param_2 != 0) {\n    if (param_2 == 1) {\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }\n    memset(__s,(int)(char)uVar1,param_2);\n    __s = (char *)*param_1;\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_2 == 1) {\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }\n    memset(__s,(int)(char)uVar1,param_2);\n    __s = (char *)*param_1;\n  }" { (if_statement "if (param_2 == 1) {\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }" { (expression_statement "*__s = (char)uVar1;" (assignment_expression "*__s = (char)uVar1" (pointer_expression "*__s" * identifier) = (cast_expression "(char)uVar1" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "param_1[1] = 1;" (assignment_expression "param_1[1] = 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(undefined1 *)(*param_1 + 1) = 0;" (assignment_expression "*(undefined1 *)(*param_1 + 1) = 0" (pointer_expression "*(undefined1 *)(*param_1 + 1)" * (cast_expression "(undefined1 *)(*param_1 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 1)" ( (binary_expression "*param_1 + 1" (pointer_expression "*param_1" * identifier) + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "memset(__s,(int)(char)uVar1,param_2);" (call_expression "memset(__s,(int)(char)uVar1,param_2)" identifier (argument_list "(__s,(int)(char)uVar1,param_2)" ( identifier , (cast_expression "(int)(char)uVar1" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)uVar1" ( (type_descriptor "char" primitive_type) ) identifier)) , identifier ))) ;) (expression_statement "__s = (char *)*param_1;" (assignment_expression "__s = (char *)*param_1" identifier = (cast_expression "(char *)*param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (expression_statement "param_1[1] = param_2;" (assignment_expression "param_1[1] = param_2" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "__s[param_2] = '\0';" (assignment_expression "__s[param_2] = '\0'" (subscript_expression "__s[param_2]" identifier [ identifier ]) = (char_literal "'\0'" ' 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 IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = 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 , (pointer_expression & IDENT) , LIT , LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) = LIT) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (char_literal ' escape_sequence ')) ;) (return_statement return ;) })))
(function_definition "void FUN_00206810(int *param_1,size_t param_2,undefined4 param_3)\n\n{\n  undefined4 uVar1;\n  char *__s;\n  \n  uVar1 = param_3;\n  if (param_2 < 0x10) {\n    __s = (char *)*param_1;\n  }\n  else {\n    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);\n    *param_1 = (int)__s;\n    param_1[2] = param_2;\n  }\n  if (param_2 != 0) {\n    if (param_2 == 1) {\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }\n    memset(__s,(int)(char)uVar1,param_2);\n    __s = (char *)*param_1;\n  }\n  param_1[1] = param_2;\n  __s[param_2] = '\0';\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00206810(int *param_1,size_t param_2,undefined4 param_3)" (identifier "FUN_00206810") (parameter_list "(int *param_1,size_t param_2,undefined4 param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "size_t param_2" (primitive_type "size_t") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  char *__s;\n  \n  uVar1 = param_3;\n  if (param_2 < 0x10) {\n    __s = (char *)*param_1;\n  }\n  else {\n    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);\n    *param_1 = (int)__s;\n    param_1[2] = param_2;\n  }\n  if (param_2 != 0) {\n    if (param_2 == 1) {\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }\n    memset(__s,(int)(char)uVar1,param_2);\n    __s = (char *)*param_1;\n  }\n  param_1[1] = param_2;\n  __s[param_2] = '\0';\n  return;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "char *__s;" (primitive_type "char") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (expression_statement "uVar1 = param_3;" (assignment_expression "uVar1 = param_3" (identifier "uVar1") (= "=") (identifier "param_3")) (; ";")) (if_statement "if (param_2 < 0x10) {\n    __s = (char *)*param_1;\n  }\n  else {\n    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);\n    *param_1 = (int)__s;\n    param_1[2] = param_2;\n  }" (if "if") (parenthesized_expression "(param_2 < 0x10)" (( "(") (binary_expression "param_2 < 0x10" (identifier "param_2") (< "<") (number_literal "0x10")) () ")")) (compound_statement "{\n    __s = (char *)*param_1;\n  }" ({ "{") (expression_statement "__s = (char *)*param_1;" (assignment_expression "__s = (char *)*param_1" (identifier "__s") (= "=") (cast_expression "(char *)*param_1" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (} "}")) (else_clause "else {\n    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);\n    *param_1 = (int)__s;\n    param_1[2] = param_2;\n  }" (else "else") (compound_statement "{\n    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);\n    *param_1 = (int)__s;\n    param_1[2] = param_2;\n  }" ({ "{") (expression_statement "__s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);" (assignment_expression "__s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c)" (identifier "__s") (= "=") (cast_expression "(char *)FUN_00206740(param_1,&param_2,0,0x20681c)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00206740(param_1,&param_2,0,0x20681c)" (identifier "FUN_00206740") (argument_list "(param_1,&param_2,0,0x20681c)" (( "(") (identifier "param_1") (, ",") (pointer_expression "&param_2" (& "&") (identifier "param_2")) (, ",") (number_literal "0") (, ",") (number_literal "0x20681c") () ")"))))) (; ";")) (expression_statement "*param_1 = (int)__s;" (assignment_expression "*param_1 = (int)__s" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (cast_expression "(int)__s" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__s"))) (; ";")) (expression_statement "param_1[2] = param_2;" (assignment_expression "param_1[2] = param_2" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "param_2")) (; ";")) (} "}")))) (if_statement "if (param_2 != 0) {\n    if (param_2 == 1) {\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }\n    memset(__s,(int)(char)uVar1,param_2);\n    __s = (char *)*param_1;\n  }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_2 == 1) {\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }\n    memset(__s,(int)(char)uVar1,param_2);\n    __s = (char *)*param_1;\n  }" ({ "{") (if_statement "if (param_2 == 1) {\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }" (if "if") (parenthesized_expression "(param_2 == 1)" (( "(") (binary_expression "param_2 == 1" (identifier "param_2") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      *__s = (char)uVar1;\n      param_1[1] = 1;\n      *(undefined1 *)(*param_1 + 1) = 0;\n      return;\n    }" ({ "{") (expression_statement "*__s = (char)uVar1;" (assignment_expression "*__s = (char)uVar1" (pointer_expression "*__s" (* "*") (identifier "__s")) (= "=") (cast_expression "(char)uVar1" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "uVar1"))) (; ";")) (expression_statement "param_1[1] = 1;" (assignment_expression "param_1[1] = 1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "1")) (; ";")) (expression_statement "*(undefined1 *)(*param_1 + 1) = 0;" (assignment_expression "*(undefined1 *)(*param_1 + 1) = 0" (pointer_expression "*(undefined1 *)(*param_1 + 1)" (* "*") (cast_expression "(undefined1 *)(*param_1 + 1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 1)" (( "(") (binary_expression "*param_1 + 1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "1")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "memset(__s,(int)(char)uVar1,param_2);" (call_expression "memset(__s,(int)(char)uVar1,param_2)" (identifier "memset") (argument_list "(__s,(int)(char)uVar1,param_2)" (( "(") (identifier "__s") (, ",") (cast_expression "(int)(char)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(char)uVar1" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "uVar1"))) (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "__s = (char *)*param_1;" (assignment_expression "__s = (char *)*param_1" (identifier "__s") (= "=") (cast_expression "(char *)*param_1" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (} "}"))) (expression_statement "param_1[1] = param_2;" (assignment_expression "param_1[1] = param_2" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "__s[param_2] = '\0';" (assignment_expression "__s[param_2] = '\0'" (subscript_expression "__s[param_2]" (identifier "__s") ([ "[") (identifier "param_2") (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::string::_M_construct(unsigned int, char) */

void __thiscall std::type_1::function_1(type_1 *var_3,type_2 var_1,char param_2)

{
  char cVar1;
  char *__s;
  type_3 in_stack_0000000d;
  
  cVar1 = param_2;
  if (var_1 < 0x10) {
    __s = *(char **)var_3;
  }
  else {
    __s = (char *)var_2(var_3,&var_1,0);
    *(char **)var_3 = __s;
    *(type_2 *)(var_3 + 8) = var_1;
  }
  if (var_1 != 0) {
    if (var_1 == 1) {
      *__s = cVar1;
      *(type_4 *)(var_3 + 4) = 1;
      *(type_5 *)(*(int *)var_3 + 1) = 0;
      return;
    }
    var_4(__s,(int)cVar1,var_1);
    __s = *(char **)var_3;
  }
  *(type_2 *)(var_3 + 4) = var_1;
  __s[var_1] = '\0';
  return;
}


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

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

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

{
  undefined4 uVar1;
  char *__s;
  
  uVar1 = param_3;
  if (param_2 < 0x10) {
    __s = (char *)*param_1;
  }
  else {
    __s = (char *)FUN_00206740(param_1,&param_2,0,0x20681c);
    *param_1 = (int)__s;
    param_1[2] = param_2;
  }
  if (param_2 != 0) {
    if (param_2 == 1) {
      *__s = (char)uVar1;
      param_1[1] = 1;
      *(undefined1 *)(*param_1 + 1) = 0;
      return;
    }
    memset(__s,(int)(char)uVar1,param_2);
    __s = (char *)*param_1;
  }
  param_1[1] = param_2;
  __s[param_2] = '\0';
  return;
}

