
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::string::_Rep::_M_clone(std::allocator<char> const&, unsigned int) */

size_t * __thiscall std::string::_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)

{
  size_t __n;
  size_t *psVar1;
  
  psVar1 = (size_t *)_S_create(*(int *)this + param_2,*(uint *)(this + 4),param_1);
  __n = *(size_t *)this;
  if (__n != 0) {
    if (__n == 1) {
      *(_Rep *)(psVar1 + 3) = this[0xc];
      __n = *(size_t *)this;
    }
    else {
      memcpy(psVar1 + 3,this + 0xc,__n);
      __n = *(size_t *)this;
    }
  }
  if (psVar1 != (size_t *)PTR__S_empty_rep_storage_0038ecdc) {
    psVar1[2] = 0;
    *psVar1 = __n;
    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;
  }
  return psVar1 + 3;
}



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

size_t * FUN_0021f9d0(size_t *param_1,undefined4 param_2,int param_3)

{
  size_t __n;
  size_t *psVar1;
  
  psVar1 = (size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2);
  __n = *param_1;
  if (__n != 0) {
    if (__n == 1) {
      *(char *)(psVar1 + 3) = (char)param_1[3];
      __n = *param_1;
    }
    else {
      memcpy(psVar1 + 3,param_1 + 3,__n);
      __n = *param_1;
    }
  }
  if (psVar1 != (size_t *)PTR_DAT_0038ecdc) {
    psVar1[2] = 0;
    *psVar1 = __n;
    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;
  }
  return psVar1 + 3;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00035840
ADD EBX,0x16f627
SUB ESP,0x10
MOV ESI,dword ptr [ESP + 0x24]
PUSH dword ptr [ESP + 0x28]
PUSH dword ptr [ESI + 0x4]
MOV EAX,dword ptr [ESI]
ADD EAX,dword ptr [ESP + 0x34]
PUSH EAX
CALL 0x0021e770
ADD ESP,0x10
MOV EDI,EAX
MOV EAX,dword ptr [ESI]
LEA EBP,[EDI + 0xc]
TEST EAX,EAX
JZ 0x0021fa1f
CMP EAX,0x1
JZ 0x0021fa38
SUB ESP,0x4
LEA EDX,[ESI + 0xc]
PUSH EAX
PUSH EDX
PUSH EBP
CALL 0x000295c0
MOV EAX,dword ptr [ESI]
ADD ESP,0x10
CMP EDI,dword ptr [EBX + 0xfffffcdc]
JNZ 0x0021fa50
ADD ESP,0xc
MOV EAX,EBP
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOVZX EAX,byte ptr [ESI + 0xc]
MOV byte ptr [EDI + 0xc],AL
MOV EAX,dword ptr [ESI]
CMP EDI,dword ptr [EBX + 0xfffffcdc]
JZ 0x0021fa27
LEA ESI,[ESI]
MOV dword ptr [EDI + 0x8],0x0
MOV dword ptr [EDI],EAX
MOV byte ptr [EDI + EAX*0x1 + 0xc],0x0
JMP 0x0021fa27
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nsize_t * FUN_0021f9d0(size_t *param_1,undefined4 param_2,int param_3)\n\n{\n  size_t __n;\n  size_t *psVar1;\n  \n  psVar1 = (size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2);\n  __n = *param_1;\n  if (__n != 0) {\n    if (__n == 1) {\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }\n    else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }\n  }\n  if (psVar1 != (size_t *)PTR_DAT_0038ecdc) {\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }\n  return psVar1 + 3;\n}\n\n" comment (function_definition "size_t * FUN_0021f9d0(size_t *param_1,undefined4 param_2,int param_3)\n\n{\n  size_t __n;\n  size_t *psVar1;\n  \n  psVar1 = (size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2);\n  __n = *param_1;\n  if (__n != 0) {\n    if (__n == 1) {\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }\n    else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }\n  }\n  if (psVar1 != (size_t *)PTR_DAT_0038ecdc) {\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }\n  return psVar1 + 3;\n}" primitive_type (pointer_declarator "* FUN_0021f9d0(size_t *param_1,undefined4 param_2,int param_3)" * (function_declarator "FUN_0021f9d0(size_t *param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(size_t *param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "size_t *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) )))) (compound_statement "{\n  size_t __n;\n  size_t *psVar1;\n  \n  psVar1 = (size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2);\n  __n = *param_1;\n  if (__n != 0) {\n    if (__n == 1) {\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }\n    else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }\n  }\n  if (psVar1 != (size_t *)PTR_DAT_0038ecdc) {\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }\n  return psVar1 + 3;\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t *psVar1;" primitive_type (pointer_declarator "*psVar1" * identifier) ;) (expression_statement "psVar1 = (size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2);" (assignment_expression "psVar1 = (size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2)" identifier = (cast_expression "(size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0021e770(*param_1 + param_3,param_1[1],param_2)" identifier (argument_list "(*param_1 + param_3,param_1[1],param_2)" ( (binary_expression "*param_1 + param_3" (pointer_expression "*param_1" * identifier) + identifier) , (subscript_expression "param_1[1]" identifier [ number_literal ]) , identifier ))))) ;) (expression_statement "__n = *param_1;" (assignment_expression "__n = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (__n != 0) {\n    if (__n == 1) {\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }\n    else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }\n  }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n    if (__n == 1) {\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }\n    else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }\n  }" { (if_statement "if (__n == 1) {\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }\n    else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }" if (parenthesized_expression "(__n == 1)" ( (binary_expression "__n == 1" identifier == number_literal) )) (compound_statement "{\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }" { (expression_statement "*(char *)(psVar1 + 3) = (char)param_1[3];" (assignment_expression "*(char *)(psVar1 + 3) = (char)param_1[3]" (pointer_expression "*(char *)(psVar1 + 3)" * (cast_expression "(char *)(psVar1 + 3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(psVar1 + 3)" ( (binary_expression "psVar1 + 3" identifier + number_literal) )))) = (cast_expression "(char)param_1[3]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_1[3]" identifier [ number_literal ]))) ;) (expression_statement "__n = *param_1;" (assignment_expression "__n = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) }) (else_clause "else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }" else (compound_statement "{\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }" { (expression_statement "memcpy(psVar1 + 3,param_1 + 3,__n);" (call_expression "memcpy(psVar1 + 3,param_1 + 3,__n)" identifier (argument_list "(psVar1 + 3,param_1 + 3,__n)" ( (binary_expression "psVar1 + 3" identifier + number_literal) , (binary_expression "param_1 + 3" identifier + number_literal) , identifier ))) ;) (expression_statement "__n = *param_1;" (assignment_expression "__n = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) }))) })) (if_statement "if (psVar1 != (size_t *)PTR_DAT_0038ecdc) {\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }" if (parenthesized_expression "(psVar1 != (size_t *)PTR_DAT_0038ecdc)" ( (binary_expression "psVar1 != (size_t *)PTR_DAT_0038ecdc" identifier != (cast_expression "(size_t *)PTR_DAT_0038ecdc" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }" { (expression_statement "psVar1[2] = 0;" (assignment_expression "psVar1[2] = 0" (subscript_expression "psVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*psVar1 = __n;" (assignment_expression "*psVar1 = __n" (pointer_expression "*psVar1" * identifier) = identifier) ;) (expression_statement "*(undefined1 *)((int)psVar1 + __n + 0xc) = 0;" (assignment_expression "*(undefined1 *)((int)psVar1 + __n + 0xc) = 0" (pointer_expression "*(undefined1 *)((int)psVar1 + __n + 0xc)" * (cast_expression "(undefined1 *)((int)psVar1 + __n + 0xc)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)psVar1 + __n + 0xc)" ( (binary_expression "(int)psVar1 + __n + 0xc" (binary_expression "(int)psVar1 + __n" (cast_expression "(int)psVar1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) = number_literal) ;) })) (return_statement "return psVar1 + 3;" return (binary_expression "psVar1 + 3" identifier + number_literal) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::string::_Rep::_M_clone(std::allocator<char> const&, unsigned int) */\n\nsize_t * __thiscall std::string::_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  size_t __n;\n  size_t *psVar1;\n  \n  psVar1 = (size_t *)_S_create(*(int *)this + param_2,*(uint *)(this + 4),param_1);\n  __n = *(size_t *)this;\n  if (__n != 0) {\n    if (__n == 1) {\n      *(_Rep *)(psVar1 + 3) = this[0xc];\n      __n = *(size_t *)this;\n    }\n    else {\n      memcpy(psVar1 + 3,this + 0xc,__n);\n      __n = *(size_t *)this;\n    }\n  }\n  if (psVar1 != (size_t *)PTR__S_empty_rep_storage_0038ecdc) {\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }\n  return psVar1 + 3;\n}\n\n" comment comment (declaration "size_t * __thiscall" primitive_type (pointer_declarator "* __thiscall" * identifier) ;) (labeled_statement "std::string::_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  size_t __n;\n  size_t *psVar1;\n  \n  psVar1 = (size_t *)_S_create(*(int *)this + param_2,*(uint *)(this + 4),param_1);\n  __n = *(size_t *)this;\n  if (__n != 0) {\n    if (__n == 1) {\n      *(_Rep *)(psVar1 + 3) = this[0xc];\n      __n = *(size_t *)this;\n    }\n    else {\n      memcpy(psVar1 + 3,this + 0xc,__n);\n      __n = *(size_t *)this;\n    }\n  }\n  if (psVar1 != (size_t *)PTR__S_empty_rep_storage_0038ecdc) {\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }\n  return psVar1 + 3;\n}" statement_identifier : (ERROR ":" :) (labeled_statement "string::_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  size_t __n;\n  size_t *psVar1;\n  \n  psVar1 = (size_t *)_S_create(*(int *)this + param_2,*(uint *)(this + 4),param_1);\n  __n = *(size_t *)this;\n  if (__n != 0) {\n    if (__n == 1) {\n      *(_Rep *)(psVar1 + 3) = this[0xc];\n      __n = *(size_t *)this;\n    }\n    else {\n      memcpy(psVar1 + 3,this + 0xc,__n);\n      __n = *(size_t *)this;\n    }\n  }\n  if (psVar1 != (size_t *)PTR__S_empty_rep_storage_0038ecdc) {\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }\n  return psVar1 + 3;\n}" statement_identifier : (ERROR ":" :) (labeled_statement "_Rep::_M_clone(_Rep *this,allocator *param_1,uint param_2)\n\n{\n  size_t __n;\n  size_t *psVar1;\n  \n  psVar1 = (size_t *)_S_create(*(int *)this + param_2,*(uint *)(this + 4),param_1);\n  __n = *(size_t *)this;\n  if (__n != 0) {\n    if (__n == 1) {\n      *(_Rep *)(psVar1 + 3) = this[0xc];\n      __n = *(size_t *)this;\n    }\n    else {\n      memcpy(psVar1 + 3,this + 0xc,__n);\n      __n = *(size_t *)this;\n    }\n  }\n  if (psVar1 != (size_t *)PTR__S_empty_rep_storage_0038ecdc) {\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }\n  return psVar1 + 3;\n}" statement_identifier : (ERROR ":_M_clone(_Rep *this,allocator *param_1,uint param_2)" : (call_expression "_M_clone(_Rep *this,allocator *param_1,uint param_2)" identifier (argument_list "(_Rep *this,allocator *param_1,uint param_2)" ( (binary_expression "_Rep *this" identifier * identifier) , (binary_expression "allocator *param_1" identifier * identifier) , (ERROR "uint" identifier) identifier )))) (compound_statement "{\n  size_t __n;\n  size_t *psVar1;\n  \n  psVar1 = (size_t *)_S_create(*(int *)this + param_2,*(uint *)(this + 4),param_1);\n  __n = *(size_t *)this;\n  if (__n != 0) {\n    if (__n == 1) {\n      *(_Rep *)(psVar1 + 3) = this[0xc];\n      __n = *(size_t *)this;\n    }\n    else {\n      memcpy(psVar1 + 3,this + 0xc,__n);\n      __n = *(size_t *)this;\n    }\n  }\n  if (psVar1 != (size_t *)PTR__S_empty_rep_storage_0038ecdc) {\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }\n  return psVar1 + 3;\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t *psVar1;" primitive_type (pointer_declarator "*psVar1" * identifier) ;) (expression_statement "psVar1 = (size_t *)_S_create(*(int *)this + param_2,*(uint *)(this + 4),param_1);" (assignment_expression "psVar1 = (size_t *)_S_create(*(int *)this + param_2,*(uint *)(this + 4),param_1)" identifier = (cast_expression "(size_t *)_S_create(*(int *)this + param_2,*(uint *)(this + 4),param_1)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "_S_create(*(int *)this + param_2,*(uint *)(this + 4),param_1)" identifier (argument_list "(*(int *)this + param_2,*(uint *)(this + 4),param_1)" ( (binary_expression "*(int *)this + param_2" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + identifier) , (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 "__n = *(size_t *)this;" (assignment_expression "__n = *(size_t *)this" identifier = (pointer_expression "*(size_t *)this" * (cast_expression "(size_t *)this" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (__n != 0) {\n    if (__n == 1) {\n      *(_Rep *)(psVar1 + 3) = this[0xc];\n      __n = *(size_t *)this;\n    }\n    else {\n      memcpy(psVar1 + 3,this + 0xc,__n);\n      __n = *(size_t *)this;\n    }\n  }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n    if (__n == 1) {\n      *(_Rep *)(psVar1 + 3) = this[0xc];\n      __n = *(size_t *)this;\n    }\n    else {\n      memcpy(psVar1 + 3,this + 0xc,__n);\n      __n = *(size_t *)this;\n    }\n  }" { (if_statement "if (__n == 1) {\n      *(_Rep *)(psVar1 + 3) = this[0xc];\n      __n = *(size_t *)this;\n    }\n    else {\n      memcpy(psVar1 + 3,this + 0xc,__n);\n      __n = *(size_t *)this;\n    }" if (parenthesized_expression "(__n == 1)" ( (binary_expression "__n == 1" identifier == number_literal) )) (compound_statement "{\n      *(_Rep *)(psVar1 + 3) = this[0xc];\n      __n = *(size_t *)this;\n    }" { (expression_statement "*(_Rep *)(psVar1 + 3) = this[0xc];" (assignment_expression "*(_Rep *)(psVar1 + 3) = this[0xc]" (pointer_expression "*(_Rep *)(psVar1 + 3)" * (cast_expression "(_Rep *)(psVar1 + 3)" ( (type_descriptor "_Rep *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(psVar1 + 3)" ( (binary_expression "psVar1 + 3" identifier + number_literal) )))) = (subscript_expression "this[0xc]" identifier [ number_literal ])) ;) (expression_statement "__n = *(size_t *)this;" (assignment_expression "__n = *(size_t *)this" identifier = (pointer_expression "*(size_t *)this" * (cast_expression "(size_t *)this" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) }) (else_clause "else {\n      memcpy(psVar1 + 3,this + 0xc,__n);\n      __n = *(size_t *)this;\n    }" else (compound_statement "{\n      memcpy(psVar1 + 3,this + 0xc,__n);\n      __n = *(size_t *)this;\n    }" { (expression_statement "memcpy(psVar1 + 3,this + 0xc,__n);" (call_expression "memcpy(psVar1 + 3,this + 0xc,__n)" identifier (argument_list "(psVar1 + 3,this + 0xc,__n)" ( (binary_expression "psVar1 + 3" identifier + number_literal) , (binary_expression "this + 0xc" identifier + number_literal) , identifier ))) ;) (expression_statement "__n = *(size_t *)this;" (assignment_expression "__n = *(size_t *)this" identifier = (pointer_expression "*(size_t *)this" * (cast_expression "(size_t *)this" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) }))) })) (if_statement "if (psVar1 != (size_t *)PTR__S_empty_rep_storage_0038ecdc) {\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }" if (parenthesized_expression "(psVar1 != (size_t *)PTR__S_empty_rep_storage_0038ecdc)" ( (binary_expression "psVar1 != (size_t *)PTR__S_empty_rep_storage_0038ecdc" identifier != (cast_expression "(size_t *)PTR__S_empty_rep_storage_0038ecdc" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }" { (expression_statement "psVar1[2] = 0;" (assignment_expression "psVar1[2] = 0" (subscript_expression "psVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*psVar1 = __n;" (assignment_expression "*psVar1 = __n" (pointer_expression "*psVar1" * identifier) = identifier) ;) (expression_statement "*(undefined1 *)((int)psVar1 + __n + 0xc) = 0;" (assignment_expression "*(undefined1 *)((int)psVar1 + __n + 0xc) = 0" (pointer_expression "*(undefined1 *)((int)psVar1 + __n + 0xc)" * (cast_expression "(undefined1 *)((int)psVar1 + __n + 0xc)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)psVar1 + __n + 0xc)" ( (binary_expression "(int)psVar1 + __n + 0xc" (binary_expression "(int)psVar1 + __n" (cast_expression "(int)psVar1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) = number_literal) ;) })) (return_statement "return psVar1 + 3;" return (binary_expression "psVar1 + 3" identifier + number_literal) ;) })))))
(translation_unit "size_t * FUN_0021f9d0(size_t *param_1,undefined4 param_2,int param_3)\n\n{\n  size_t __n;\n  size_t *psVar1;\n  \n  psVar1 = (size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2);\n  __n = *param_1;\n  if (__n != 0) {\n    if (__n == 1) {\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }\n    else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }\n  }\n  if (psVar1 != (size_t *)PTR_DAT_0038ecdc) {\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }\n  return psVar1 + 3;\n}\n\n" (function_definition "size_t * FUN_0021f9d0(size_t *param_1,undefined4 param_2,int param_3)\n\n{\n  size_t __n;\n  size_t *psVar1;\n  \n  psVar1 = (size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2);\n  __n = *param_1;\n  if (__n != 0) {\n    if (__n == 1) {\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }\n    else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }\n  }\n  if (psVar1 != (size_t *)PTR_DAT_0038ecdc) {\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }\n  return psVar1 + 3;\n}" primitive_type (pointer_declarator "* FUN_0021f9d0(size_t *param_1,undefined4 param_2,int param_3)" * (function_declarator "FUN_0021f9d0(size_t *param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(size_t *param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "size_t *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) )))) (compound_statement "{\n  size_t __n;\n  size_t *psVar1;\n  \n  psVar1 = (size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2);\n  __n = *param_1;\n  if (__n != 0) {\n    if (__n == 1) {\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }\n    else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }\n  }\n  if (psVar1 != (size_t *)PTR_DAT_0038ecdc) {\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }\n  return psVar1 + 3;\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t *psVar1;" primitive_type (pointer_declarator "*psVar1" * identifier) ;) (expression_statement "psVar1 = (size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2);" (assignment_expression "psVar1 = (size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2)" identifier = (cast_expression "(size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0021e770(*param_1 + param_3,param_1[1],param_2)" identifier (argument_list "(*param_1 + param_3,param_1[1],param_2)" ( (binary_expression "*param_1 + param_3" (pointer_expression "*param_1" * identifier) + identifier) , (subscript_expression "param_1[1]" identifier [ number_literal ]) , identifier ))))) ;) (expression_statement "__n = *param_1;" (assignment_expression "__n = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (__n != 0) {\n    if (__n == 1) {\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }\n    else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }\n  }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n    if (__n == 1) {\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }\n    else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }\n  }" { (if_statement "if (__n == 1) {\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }\n    else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }" if (parenthesized_expression "(__n == 1)" ( (binary_expression "__n == 1" identifier == number_literal) )) (compound_statement "{\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }" { (expression_statement "*(char *)(psVar1 + 3) = (char)param_1[3];" (assignment_expression "*(char *)(psVar1 + 3) = (char)param_1[3]" (pointer_expression "*(char *)(psVar1 + 3)" * (cast_expression "(char *)(psVar1 + 3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(psVar1 + 3)" ( (binary_expression "psVar1 + 3" identifier + number_literal) )))) = (cast_expression "(char)param_1[3]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_1[3]" identifier [ number_literal ]))) ;) (expression_statement "__n = *param_1;" (assignment_expression "__n = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) }) (else_clause "else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }" else (compound_statement "{\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }" { (expression_statement "memcpy(psVar1 + 3,param_1 + 3,__n);" (call_expression "memcpy(psVar1 + 3,param_1 + 3,__n)" identifier (argument_list "(psVar1 + 3,param_1 + 3,__n)" ( (binary_expression "psVar1 + 3" identifier + number_literal) , (binary_expression "param_1 + 3" identifier + number_literal) , identifier ))) ;) (expression_statement "__n = *param_1;" (assignment_expression "__n = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) }))) })) (if_statement "if (psVar1 != (size_t *)PTR_DAT_0038ecdc) {\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }" if (parenthesized_expression "(psVar1 != (size_t *)PTR_DAT_0038ecdc)" ( (binary_expression "psVar1 != (size_t *)PTR_DAT_0038ecdc" identifier != (cast_expression "(size_t *)PTR_DAT_0038ecdc" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }" { (expression_statement "psVar1[2] = 0;" (assignment_expression "psVar1[2] = 0" (subscript_expression "psVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*psVar1 = __n;" (assignment_expression "*psVar1 = __n" (pointer_expression "*psVar1" * identifier) = identifier) ;) (expression_statement "*(undefined1 *)((int)psVar1 + __n + 0xc) = 0;" (assignment_expression "*(undefined1 *)((int)psVar1 + __n + 0xc) = 0" (pointer_expression "*(undefined1 *)((int)psVar1 + __n + 0xc)" * (cast_expression "(undefined1 *)((int)psVar1 + __n + 0xc)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)psVar1 + __n + 0xc)" ( (binary_expression "(int)psVar1 + __n + 0xc" (binary_expression "(int)psVar1 + __n" (cast_expression "(int)psVar1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) = number_literal) ;) })) (return_statement "return psVar1 + 3;" return (binary_expression "psVar1 + 3" identifier + number_literal) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (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 = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression (pointer_expression * IDENT) + IDENT) , (subscript_expression IDENT [ LIT ]) , IDENT ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * 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 * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * 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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) + LIT) )))) = LIT) ;) })) (return_statement return (binary_expression IDENT + LIT) ;) })))
(function_definition "size_t * FUN_0021f9d0(size_t *param_1,undefined4 param_2,int param_3)\n\n{\n  size_t __n;\n  size_t *psVar1;\n  \n  psVar1 = (size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2);\n  __n = *param_1;\n  if (__n != 0) {\n    if (__n == 1) {\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }\n    else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }\n  }\n  if (psVar1 != (size_t *)PTR_DAT_0038ecdc) {\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }\n  return psVar1 + 3;\n}" (primitive_type "size_t") (pointer_declarator "* FUN_0021f9d0(size_t *param_1,undefined4 param_2,int param_3)" (* "*") (function_declarator "FUN_0021f9d0(size_t *param_1,undefined4 param_2,int param_3)" (identifier "FUN_0021f9d0") (parameter_list "(size_t *param_1,undefined4 param_2,int param_3)" (( "(") (parameter_declaration "size_t *param_1" (primitive_type "size_t") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")")))) (compound_statement "{\n  size_t __n;\n  size_t *psVar1;\n  \n  psVar1 = (size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2);\n  __n = *param_1;\n  if (__n != 0) {\n    if (__n == 1) {\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }\n    else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }\n  }\n  if (psVar1 != (size_t *)PTR_DAT_0038ecdc) {\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }\n  return psVar1 + 3;\n}" ({ "{") (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "size_t *psVar1;" (primitive_type "size_t") (pointer_declarator "*psVar1" (* "*") (identifier "psVar1")) (; ";")) (expression_statement "psVar1 = (size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2);" (assignment_expression "psVar1 = (size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2)" (identifier "psVar1") (= "=") (cast_expression "(size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0021e770(*param_1 + param_3,param_1[1],param_2)" (identifier "FUN_0021e770") (argument_list "(*param_1 + param_3,param_1[1],param_2)" (( "(") (binary_expression "*param_1 + param_3" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (identifier "param_3")) (, ",") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (, ",") (identifier "param_2") () ")"))))) (; ";")) (expression_statement "__n = *param_1;" (assignment_expression "__n = *param_1" (identifier "__n") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if (__n != 0) {\n    if (__n == 1) {\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }\n    else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }\n  }" (if "if") (parenthesized_expression "(__n != 0)" (( "(") (binary_expression "__n != 0" (identifier "__n") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (__n == 1) {\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }\n    else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }\n  }" ({ "{") (if_statement "if (__n == 1) {\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }\n    else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }" (if "if") (parenthesized_expression "(__n == 1)" (( "(") (binary_expression "__n == 1" (identifier "__n") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      *(char *)(psVar1 + 3) = (char)param_1[3];\n      __n = *param_1;\n    }" ({ "{") (expression_statement "*(char *)(psVar1 + 3) = (char)param_1[3];" (assignment_expression "*(char *)(psVar1 + 3) = (char)param_1[3]" (pointer_expression "*(char *)(psVar1 + 3)" (* "*") (cast_expression "(char *)(psVar1 + 3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(psVar1 + 3)" (( "(") (binary_expression "psVar1 + 3" (identifier "psVar1") (+ "+") (number_literal "3")) () ")")))) (= "=") (cast_expression "(char)param_1[3]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")))) (; ";")) (expression_statement "__n = *param_1;" (assignment_expression "__n = *param_1" (identifier "__n") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (} "}")) (else_clause "else {\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }" (else "else") (compound_statement "{\n      memcpy(psVar1 + 3,param_1 + 3,__n);\n      __n = *param_1;\n    }" ({ "{") (expression_statement "memcpy(psVar1 + 3,param_1 + 3,__n);" (call_expression "memcpy(psVar1 + 3,param_1 + 3,__n)" (identifier "memcpy") (argument_list "(psVar1 + 3,param_1 + 3,__n)" (( "(") (binary_expression "psVar1 + 3" (identifier "psVar1") (+ "+") (number_literal "3")) (, ",") (binary_expression "param_1 + 3" (identifier "param_1") (+ "+") (number_literal "3")) (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "__n = *param_1;" (assignment_expression "__n = *param_1" (identifier "__n") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (} "}")))) (} "}"))) (if_statement "if (psVar1 != (size_t *)PTR_DAT_0038ecdc) {\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;\n  }" (if "if") (parenthesized_expression "(psVar1 != (size_t *)PTR_DAT_0038ecdc)" (( "(") (binary_expression "psVar1 != (size_t *)PTR_DAT_0038ecdc" (identifier "psVar1") (!= "!=") (cast_expression "(size_t *)PTR_DAT_0038ecdc" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_DAT_0038ecdc"))) () ")")) (compound_statement "{\n    psVar1[2] = 0;\n    *psVar1 = __n;\n    *(undefined1 *)((int)psVar1 + __n + 0xc) = 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 = __n;" (assignment_expression "*psVar1 = __n" (pointer_expression "*psVar1" (* "*") (identifier "psVar1")) (= "=") (identifier "__n")) (; ";")) (expression_statement "*(undefined1 *)((int)psVar1 + __n + 0xc) = 0;" (assignment_expression "*(undefined1 *)((int)psVar1 + __n + 0xc) = 0" (pointer_expression "*(undefined1 *)((int)psVar1 + __n + 0xc)" (* "*") (cast_expression "(undefined1 *)((int)psVar1 + __n + 0xc)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)psVar1 + __n + 0xc)" (( "(") (binary_expression "(int)psVar1 + __n + 0xc" (binary_expression "(int)psVar1 + __n" (cast_expression "(int)psVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "psVar1")) (+ "+") (identifier "__n")) (+ "+") (number_literal "0xc")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (return_statement "return psVar1 + 3;" (return "return") (binary_expression "psVar1 + 3" (identifier "psVar1") (+ "+") (number_literal "3")) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::string::_Rep::_M_clone(std::allocator<char> const&, unsigned int) */

size_t * __thiscall std::string::_Rep::_M_clone(type_2 *var_3,allocator *param_1,type_1 var_2)

{
  size_t var_4;
  size_t *var_5;
  
  var_5 = (size_t *)var_1(*(int *)var_3 + var_2,*(type_1 *)(var_3 + 4),param_1);
  var_4 = *(size_t *)var_3;
  if (var_4 != 0) {
    if (var_4 == 1) {
      *(type_2 *)(var_5 + 3) = var_3[0xc];
      var_4 = *(size_t *)var_3;
    }
    else {
      var_6(var_5 + 3,var_3 + 0xc,var_4);
      var_4 = *(size_t *)var_3;
    }
  }
  if (var_5 != (size_t *)PTR__S_empty_rep_storage_0038ecdc) {
    var_5[2] = 0;
    *var_5 = var_4;
    *(type_3 *)((int)var_5 + var_4 + 0xc) = 0;
  }
  return var_5 + 3;
}


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

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

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

{
  size_t __n;
  size_t *psVar1;
  
  psVar1 = (size_t *)FUN_0021e770(*param_1 + param_3,param_1[1],param_2);
  __n = *param_1;
  if (__n != 0) {
    if (__n == 1) {
      *(char *)(psVar1 + 3) = (char)param_1[3];
      __n = *param_1;
    }
    else {
      memcpy(psVar1 + 3,param_1 + 3,__n);
      __n = *param_1;
    }
  }
  if (psVar1 != (size_t *)PTR_DAT_0038ecdc) {
    psVar1[2] = 0;
    *psVar1 = __n;
    *(undefined1 *)((int)psVar1 + __n + 0xc) = 0;
  }
  return psVar1 + 3;
}

