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

void std::string::_Rep::_S_create(uint param_1,uint param_2,allocator *param_3)

{
  void *pvVar1;
  
  if (0x3ffffffc < param_1) {
                    /* WARNING: Subroutine does not return */
    __throw_length_error("basic_string::_S_create");
  }
  if (param_2 < param_1) {
    if (param_1 < param_2 * 2) {
      param_1 = param_2 * 2;
    }
    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&
       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {
      param_1 = 0x3ffffffc;
    }
  }
  pvVar1 = operator_new(param_1 + 0xd);
  *(uint *)((int)pvVar1 + 4) = param_1;
  *(undefined4 *)((int)pvVar1 + 8) = 0;
  return;
}



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

void FUN_0021e780(uint param_1,uint param_2)

{
  int iVar1;
  
  if (0x3ffffffc < param_1) {
                    /* WARNING: Subroutine does not return */
    FUN_0022c7b0("basic_string::_S_create");
  }
  if (param_2 < param_1) {
    if (param_1 < param_2 * 2) {
      param_1 = param_2 * 2;
    }
    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&
       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {
      param_1 = 0x3ffffffc;
    }
  }
  iVar1 = FUN_001e5210(param_1 + 0xd);
  *(uint *)(iVar1 + 4) = param_1;
  *(undefined4 *)(iVar1 + 8) = 0;
  return;
}


PUSH ESI
PUSH EBX
CALL 0x00035840
ADD EBX,0x170879
SUB ESP,0x4
MOV ESI,dword ptr [ESP + 0x10]
MOV EAX,dword ptr [ESP + 0x14]
CMP ESI,0x3ffffffc
JA 0x0021e7f6
LEA EDX,[ESI + 0xd]
CMP ESI,EAX
JBE 0x0021e7dd
LEA EDX,[EAX + EAX*0x1]
CMP ESI,EDX
CMOVC ESI,EDX
LEA EDX,[ESI + 0x1d]
CMP EDX,0x1000
JBE 0x0021e7da
CMP EAX,ESI
JNC 0x0021e7da
ADD ESI,0x1000
AND EDX,0xfff
MOV EAX,0x3ffffffc
SUB ESI,EDX
CMP ESI,0x3ffffffc
CMOVA ESI,EAX
LEA EDX,[ESI + 0xd]
SUB ESP,0xc
PUSH EDX
CALL 0x001e5210
MOV dword ptr [EAX + 0x4],ESI
MOV dword ptr [EAX + 0x8],0x0
ADD ESP,0x14
POP EBX
POP ESI
RET
SUB ESP,0xc
LEA EAX,[EBX + 0xfff159b1]
PUSH EAX
CALL 0x0022c7b0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0021e780(uint param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  if (0x3ffffffc < param_1) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c7b0("basic_string::_S_create");\n  }\n  if (param_2 < param_1) {\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }\n  iVar1 = FUN_001e5210(param_1 + 0xd);\n  *(uint *)(iVar1 + 4) = param_1;\n  *(undefined4 *)(iVar1 + 8) = 0;\n  return;\n}\n\n" comment (function_definition "void FUN_0021e780(uint param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  if (0x3ffffffc < param_1) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c7b0("basic_string::_S_create");\n  }\n  if (param_2 < param_1) {\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }\n  iVar1 = FUN_001e5210(param_1 + 0xd);\n  *(uint *)(iVar1 + 4) = param_1;\n  *(undefined4 *)(iVar1 + 8) = 0;\n  return;\n}" primitive_type (function_declarator "FUN_0021e780(uint param_1,uint param_2)" identifier (parameter_list "(uint param_1,uint param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if (0x3ffffffc < param_1) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c7b0("basic_string::_S_create");\n  }\n  if (param_2 < param_1) {\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }\n  iVar1 = FUN_001e5210(param_1 + 0xd);\n  *(uint *)(iVar1 + 4) = param_1;\n  *(undefined4 *)(iVar1 + 8) = 0;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (0x3ffffffc < param_1) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c7b0("basic_string::_S_create");\n  }" if (parenthesized_expression "(0x3ffffffc < param_1)" ( (binary_expression "0x3ffffffc < param_1" number_literal < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_0022c7b0("basic_string::_S_create");\n  }" { comment (expression_statement "FUN_0022c7b0("basic_string::_S_create");" (call_expression "FUN_0022c7b0("basic_string::_S_create")" identifier (argument_list "("basic_string::_S_create")" ( (string_literal ""basic_string::_S_create"" " string_content ") ))) ;) })) (if_statement "if (param_2 < param_1) {\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }" if (parenthesized_expression "(param_2 < param_1)" ( (binary_expression "param_2 < param_1" identifier < identifier) )) (compound_statement "{\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }" { (if_statement "if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }" if (parenthesized_expression "(param_1 < param_2 * 2)" ( (binary_expression "param_1 < param_2 * 2" identifier < (binary_expression "param_2 * 2" identifier * number_literal)) )) (compound_statement "{\n      param_1 = param_2 * 2;\n    }" { (expression_statement "param_1 = param_2 * 2;" (assignment_expression "param_1 = param_2 * 2" identifier = (binary_expression "param_2 * 2" identifier * number_literal)) ;) })) (if_statement "if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }" if (parenthesized_expression "(((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1))" ( (binary_expression "((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)" (parenthesized_expression "((0x1000 < param_1 + 0x1d) && (param_2 < param_1))" ( (binary_expression "(0x1000 < param_1 + 0x1d) && (param_2 < param_1)" (parenthesized_expression "(0x1000 < param_1 + 0x1d)" ( (binary_expression "0x1000 < param_1 + 0x1d" number_literal < (binary_expression "param_1 + 0x1d" identifier + number_literal)) )) && (parenthesized_expression "(param_2 < param_1)" ( (binary_expression "param_2 < param_1" identifier < identifier) ))) )) && (parenthesized_expression "(param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)" ( (comma_expression "param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1" (assignment_expression "param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff)" identifier = (binary_expression "(param_1 + 0x1000) - (param_1 + 0x1d & 0xfff)" (parenthesized_expression "(param_1 + 0x1000)" ( (binary_expression "param_1 + 0x1000" identifier + number_literal) )) - (parenthesized_expression "(param_1 + 0x1d & 0xfff)" ( (binary_expression "param_1 + 0x1d & 0xfff" (binary_expression "param_1 + 0x1d" identifier + number_literal) & number_literal) )))) , (binary_expression "0x3ffffffc < param_1" number_literal < identifier)) ))) )) (compound_statement "{\n      param_1 = 0x3ffffffc;\n    }" { (expression_statement "param_1 = 0x3ffffffc;" (assignment_expression "param_1 = 0x3ffffffc" identifier = number_literal) ;) })) })) (expression_statement "iVar1 = FUN_001e5210(param_1 + 0xd);" (assignment_expression "iVar1 = FUN_001e5210(param_1 + 0xd)" identifier = (call_expression "FUN_001e5210(param_1 + 0xd)" identifier (argument_list "(param_1 + 0xd)" ( (binary_expression "param_1 + 0xd" identifier + number_literal) )))) ;) (expression_statement "*(uint *)(iVar1 + 4) = param_1;" (assignment_expression "*(uint *)(iVar1 + 4) = param_1" (pointer_expression "*(uint *)(iVar1 + 4)" * (cast_expression "(uint *)(iVar1 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(iVar1 + 8) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 8) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 8)" * (cast_expression "(undefined4 *)(iVar1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::string::_Rep::_S_create(unsigned int, unsigned int, std::allocator<char> const&) */\n\nvoid std::string::_Rep::_S_create(uint param_1,uint param_2,allocator *param_3)\n\n{\n  void *pvVar1;\n  \n  if (0x3ffffffc < param_1) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::_S_create");\n  }\n  if (param_2 < param_1) {\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }\n  pvVar1 = operator_new(param_1 + 0xd);\n  *(uint *)((int)pvVar1 + 4) = param_1;\n  *(undefined4 *)((int)pvVar1 + 8) = 0;\n  return;\n}\n\n" comment comment (function_definition "void std::string::_Rep::_S_create(uint param_1,uint param_2,allocator *param_3)\n\n{\n  void *pvVar1;\n  \n  if (0x3ffffffc < param_1) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::_S_create");\n  }\n  if (param_2 < param_1) {\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }\n  pvVar1 = operator_new(param_1 + 0xd);\n  *(uint *)((int)pvVar1 + 4) = param_1;\n  *(undefined4 *)((int)pvVar1 + 8) = 0;\n  return;\n}" primitive_type (ERROR "std::string::_Rep::" identifier : : identifier : : identifier : :) (function_declarator "_S_create(uint param_1,uint param_2,allocator *param_3)" identifier (parameter_list "(uint param_1,uint param_2,allocator *param_3)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "allocator *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  void *pvVar1;\n  \n  if (0x3ffffffc < param_1) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::_S_create");\n  }\n  if (param_2 < param_1) {\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }\n  pvVar1 = operator_new(param_1 + 0xd);\n  *(uint *)((int)pvVar1 + 4) = param_1;\n  *(undefined4 *)((int)pvVar1 + 8) = 0;\n  return;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (if_statement "if (0x3ffffffc < param_1) {\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::_S_create");\n  }" if (parenthesized_expression "(0x3ffffffc < param_1)" ( (binary_expression "0x3ffffffc < param_1" number_literal < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __throw_length_error("basic_string::_S_create");\n  }" { comment (expression_statement "__throw_length_error("basic_string::_S_create");" (call_expression "__throw_length_error("basic_string::_S_create")" identifier (argument_list "("basic_string::_S_create")" ( (string_literal ""basic_string::_S_create"" " string_content ") ))) ;) })) (if_statement "if (param_2 < param_1) {\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }" if (parenthesized_expression "(param_2 < param_1)" ( (binary_expression "param_2 < param_1" identifier < identifier) )) (compound_statement "{\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }" { (if_statement "if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }" if (parenthesized_expression "(param_1 < param_2 * 2)" ( (binary_expression "param_1 < param_2 * 2" identifier < (binary_expression "param_2 * 2" identifier * number_literal)) )) (compound_statement "{\n      param_1 = param_2 * 2;\n    }" { (expression_statement "param_1 = param_2 * 2;" (assignment_expression "param_1 = param_2 * 2" identifier = (binary_expression "param_2 * 2" identifier * number_literal)) ;) })) (if_statement "if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }" if (parenthesized_expression "(((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1))" ( (binary_expression "((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)" (parenthesized_expression "((0x1000 < param_1 + 0x1d) && (param_2 < param_1))" ( (binary_expression "(0x1000 < param_1 + 0x1d) && (param_2 < param_1)" (parenthesized_expression "(0x1000 < param_1 + 0x1d)" ( (binary_expression "0x1000 < param_1 + 0x1d" number_literal < (binary_expression "param_1 + 0x1d" identifier + number_literal)) )) && (parenthesized_expression "(param_2 < param_1)" ( (binary_expression "param_2 < param_1" identifier < identifier) ))) )) && (parenthesized_expression "(param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)" ( (comma_expression "param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1" (assignment_expression "param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff)" identifier = (binary_expression "(param_1 + 0x1000) - (param_1 + 0x1d & 0xfff)" (parenthesized_expression "(param_1 + 0x1000)" ( (binary_expression "param_1 + 0x1000" identifier + number_literal) )) - (parenthesized_expression "(param_1 + 0x1d & 0xfff)" ( (binary_expression "param_1 + 0x1d & 0xfff" (binary_expression "param_1 + 0x1d" identifier + number_literal) & number_literal) )))) , (binary_expression "0x3ffffffc < param_1" number_literal < identifier)) ))) )) (compound_statement "{\n      param_1 = 0x3ffffffc;\n    }" { (expression_statement "param_1 = 0x3ffffffc;" (assignment_expression "param_1 = 0x3ffffffc" identifier = number_literal) ;) })) })) (expression_statement "pvVar1 = operator_new(param_1 + 0xd);" (assignment_expression "pvVar1 = operator_new(param_1 + 0xd)" identifier = (call_expression "operator_new(param_1 + 0xd)" identifier (argument_list "(param_1 + 0xd)" ( (binary_expression "param_1 + 0xd" identifier + number_literal) )))) ;) (expression_statement "*(uint *)((int)pvVar1 + 4) = param_1;" (assignment_expression "*(uint *)((int)pvVar1 + 4) = param_1" (pointer_expression "*(uint *)((int)pvVar1 + 4)" * (cast_expression "(uint *)((int)pvVar1 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + 4)" ( (binary_expression "(int)pvVar1 + 4" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)((int)pvVar1 + 8) = 0;" (assignment_expression "*(undefined4 *)((int)pvVar1 + 8) = 0" (pointer_expression "*(undefined4 *)((int)pvVar1 + 8)" * (cast_expression "(undefined4 *)((int)pvVar1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + 8)" ( (binary_expression "(int)pvVar1 + 8" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0021e780(uint param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  if (0x3ffffffc < param_1) {\n                    \n    FUN_0022c7b0("basic_string::_S_create");\n  }\n  if (param_2 < param_1) {\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }\n  iVar1 = FUN_001e5210(param_1 + 0xd);\n  *(uint *)(iVar1 + 4) = param_1;\n  *(undefined4 *)(iVar1 + 8) = 0;\n  return;\n}\n\n" (function_definition "void FUN_0021e780(uint param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  if (0x3ffffffc < param_1) {\n                    \n    FUN_0022c7b0("basic_string::_S_create");\n  }\n  if (param_2 < param_1) {\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }\n  iVar1 = FUN_001e5210(param_1 + 0xd);\n  *(uint *)(iVar1 + 4) = param_1;\n  *(undefined4 *)(iVar1 + 8) = 0;\n  return;\n}" primitive_type (function_declarator "FUN_0021e780(uint param_1,uint param_2)" identifier (parameter_list "(uint param_1,uint param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if (0x3ffffffc < param_1) {\n                    \n    FUN_0022c7b0("basic_string::_S_create");\n  }\n  if (param_2 < param_1) {\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }\n  iVar1 = FUN_001e5210(param_1 + 0xd);\n  *(uint *)(iVar1 + 4) = param_1;\n  *(undefined4 *)(iVar1 + 8) = 0;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (0x3ffffffc < param_1) {\n                    \n    FUN_0022c7b0("basic_string::_S_create");\n  }" if (parenthesized_expression "(0x3ffffffc < param_1)" ( (binary_expression "0x3ffffffc < param_1" number_literal < identifier) )) (compound_statement "{\n                    \n    FUN_0022c7b0("basic_string::_S_create");\n  }" { (expression_statement "FUN_0022c7b0("basic_string::_S_create");" (call_expression "FUN_0022c7b0("basic_string::_S_create")" identifier (argument_list "("basic_string::_S_create")" ( (string_literal ""basic_string::_S_create"" " string_content ") ))) ;) })) (if_statement "if (param_2 < param_1) {\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }" if (parenthesized_expression "(param_2 < param_1)" ( (binary_expression "param_2 < param_1" identifier < identifier) )) (compound_statement "{\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }" { (if_statement "if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }" if (parenthesized_expression "(param_1 < param_2 * 2)" ( (binary_expression "param_1 < param_2 * 2" identifier < (binary_expression "param_2 * 2" identifier * number_literal)) )) (compound_statement "{\n      param_1 = param_2 * 2;\n    }" { (expression_statement "param_1 = param_2 * 2;" (assignment_expression "param_1 = param_2 * 2" identifier = (binary_expression "param_2 * 2" identifier * number_literal)) ;) })) (if_statement "if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }" if (parenthesized_expression "(((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1))" ( (binary_expression "((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)" (parenthesized_expression "((0x1000 < param_1 + 0x1d) && (param_2 < param_1))" ( (binary_expression "(0x1000 < param_1 + 0x1d) && (param_2 < param_1)" (parenthesized_expression "(0x1000 < param_1 + 0x1d)" ( (binary_expression "0x1000 < param_1 + 0x1d" number_literal < (binary_expression "param_1 + 0x1d" identifier + number_literal)) )) && (parenthesized_expression "(param_2 < param_1)" ( (binary_expression "param_2 < param_1" identifier < identifier) ))) )) && (parenthesized_expression "(param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)" ( (comma_expression "param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1" (assignment_expression "param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff)" identifier = (binary_expression "(param_1 + 0x1000) - (param_1 + 0x1d & 0xfff)" (parenthesized_expression "(param_1 + 0x1000)" ( (binary_expression "param_1 + 0x1000" identifier + number_literal) )) - (parenthesized_expression "(param_1 + 0x1d & 0xfff)" ( (binary_expression "param_1 + 0x1d & 0xfff" (binary_expression "param_1 + 0x1d" identifier + number_literal) & number_literal) )))) , (binary_expression "0x3ffffffc < param_1" number_literal < identifier)) ))) )) (compound_statement "{\n      param_1 = 0x3ffffffc;\n    }" { (expression_statement "param_1 = 0x3ffffffc;" (assignment_expression "param_1 = 0x3ffffffc" identifier = number_literal) ;) })) })) (expression_statement "iVar1 = FUN_001e5210(param_1 + 0xd);" (assignment_expression "iVar1 = FUN_001e5210(param_1 + 0xd)" identifier = (call_expression "FUN_001e5210(param_1 + 0xd)" identifier (argument_list "(param_1 + 0xd)" ( (binary_expression "param_1 + 0xd" identifier + number_literal) )))) ;) (expression_statement "*(uint *)(iVar1 + 4) = param_1;" (assignment_expression "*(uint *)(iVar1 + 4) = param_1" (pointer_expression "*(uint *)(iVar1 + 4)" * (cast_expression "(uint *)(iVar1 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(iVar1 + 8) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 8) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 8)" * (cast_expression "(undefined4 *)(iVar1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < (binary_expression IDENT * LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < (binary_expression IDENT + LIT)) )) && (parenthesized_expression ( (binary_expression IDENT < IDENT) ))) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) - (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) & LIT) )))) , (binary_expression LIT < IDENT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })))
(function_definition "void FUN_0021e780(uint param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  if (0x3ffffffc < param_1) {\n                    \n    FUN_0022c7b0("basic_string::_S_create");\n  }\n  if (param_2 < param_1) {\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }\n  iVar1 = FUN_001e5210(param_1 + 0xd);\n  *(uint *)(iVar1 + 4) = param_1;\n  *(undefined4 *)(iVar1 + 8) = 0;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0021e780(uint param_1,uint param_2)" (identifier "FUN_0021e780") (parameter_list "(uint param_1,uint param_2)" (( "(") (parameter_declaration "uint param_1" (type_identifier "uint") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  if (0x3ffffffc < param_1) {\n                    \n    FUN_0022c7b0("basic_string::_S_create");\n  }\n  if (param_2 < param_1) {\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }\n  iVar1 = FUN_001e5210(param_1 + 0xd);\n  *(uint *)(iVar1 + 4) = param_1;\n  *(undefined4 *)(iVar1 + 8) = 0;\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (if_statement "if (0x3ffffffc < param_1) {\n                    \n    FUN_0022c7b0("basic_string::_S_create");\n  }" (if "if") (parenthesized_expression "(0x3ffffffc < param_1)" (( "(") (binary_expression "0x3ffffffc < param_1" (number_literal "0x3ffffffc") (< "<") (identifier "param_1")) () ")")) (compound_statement "{\n                    \n    FUN_0022c7b0("basic_string::_S_create");\n  }" ({ "{") (expression_statement "FUN_0022c7b0("basic_string::_S_create");" (call_expression "FUN_0022c7b0("basic_string::_S_create")" (identifier "FUN_0022c7b0") (argument_list "("basic_string::_S_create")" (( "(") (string_literal ""basic_string::_S_create"" (" """) (string_content "basic_string::_S_create") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if (param_2 < param_1) {\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }" (if "if") (parenthesized_expression "(param_2 < param_1)" (( "(") (binary_expression "param_2 < param_1" (identifier "param_2") (< "<") (identifier "param_1")) () ")")) (compound_statement "{\n    if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }\n    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }\n  }" ({ "{") (if_statement "if (param_1 < param_2 * 2) {\n      param_1 = param_2 * 2;\n    }" (if "if") (parenthesized_expression "(param_1 < param_2 * 2)" (( "(") (binary_expression "param_1 < param_2 * 2" (identifier "param_1") (< "<") (binary_expression "param_2 * 2" (identifier "param_2") (* "*") (number_literal "2"))) () ")")) (compound_statement "{\n      param_1 = param_2 * 2;\n    }" ({ "{") (expression_statement "param_1 = param_2 * 2;" (assignment_expression "param_1 = param_2 * 2" (identifier "param_1") (= "=") (binary_expression "param_2 * 2" (identifier "param_2") (* "*") (number_literal "2"))) (; ";")) (} "}"))) (if_statement "if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {\n      param_1 = 0x3ffffffc;\n    }" (if "if") (parenthesized_expression "(((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1))" (( "(") (binary_expression "((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&\n       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)" (parenthesized_expression "((0x1000 < param_1 + 0x1d) && (param_2 < param_1))" (( "(") (binary_expression "(0x1000 < param_1 + 0x1d) && (param_2 < param_1)" (parenthesized_expression "(0x1000 < param_1 + 0x1d)" (( "(") (binary_expression "0x1000 < param_1 + 0x1d" (number_literal "0x1000") (< "<") (binary_expression "param_1 + 0x1d" (identifier "param_1") (+ "+") (number_literal "0x1d"))) () ")")) (&& "&&") (parenthesized_expression "(param_2 < param_1)" (( "(") (binary_expression "param_2 < param_1" (identifier "param_2") (< "<") (identifier "param_1")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)" (( "(") (comma_expression "param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1" (assignment_expression "param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff)" (identifier "param_1") (= "=") (binary_expression "(param_1 + 0x1000) - (param_1 + 0x1d & 0xfff)" (parenthesized_expression "(param_1 + 0x1000)" (( "(") (binary_expression "param_1 + 0x1000" (identifier "param_1") (+ "+") (number_literal "0x1000")) () ")")) (- "-") (parenthesized_expression "(param_1 + 0x1d & 0xfff)" (( "(") (binary_expression "param_1 + 0x1d & 0xfff" (binary_expression "param_1 + 0x1d" (identifier "param_1") (+ "+") (number_literal "0x1d")) (& "&") (number_literal "0xfff")) () ")")))) (, ",") (binary_expression "0x3ffffffc < param_1" (number_literal "0x3ffffffc") (< "<") (identifier "param_1"))) () ")"))) () ")")) (compound_statement "{\n      param_1 = 0x3ffffffc;\n    }" ({ "{") (expression_statement "param_1 = 0x3ffffffc;" (assignment_expression "param_1 = 0x3ffffffc" (identifier "param_1") (= "=") (number_literal "0x3ffffffc")) (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar1 = FUN_001e5210(param_1 + 0xd);" (assignment_expression "iVar1 = FUN_001e5210(param_1 + 0xd)" (identifier "iVar1") (= "=") (call_expression "FUN_001e5210(param_1 + 0xd)" (identifier "FUN_001e5210") (argument_list "(param_1 + 0xd)" (( "(") (binary_expression "param_1 + 0xd" (identifier "param_1") (+ "+") (number_literal "0xd")) () ")")))) (; ";")) (expression_statement "*(uint *)(iVar1 + 4) = param_1;" (assignment_expression "*(uint *)(iVar1 + 4) = param_1" (pointer_expression "*(uint *)(iVar1 + 4)" (* "*") (cast_expression "(uint *)(iVar1 + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 4)" (( "(") (binary_expression "iVar1 + 4" (identifier "iVar1") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "param_1")) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 8) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 8) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 8)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 8)" (( "(") (binary_expression "iVar1 + 8" (identifier "iVar1") (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void std::string::_Rep::function_1(type_1 var_1,type_1 var_3,type_2 *param_3)

{
  void *pvVar1;
  
  if (0x3ffffffc < var_1) {
                    /* WARNING: Subroutine does not return */
    var_2("basic_string::_S_create");
  }
  if (var_3 < var_1) {
    if (var_1 < var_3 * 2) {
      var_1 = var_3 * 2;
    }
    if (((0x1000 < var_1 + 0x1d) && (var_3 < var_1)) &&
       (var_1 = (var_1 + 0x1000) - (var_1 + 0x1d & 0xfff), 0x3ffffffc < var_1)) {
      var_1 = 0x3ffffffc;
    }
  }
  pvVar1 = var_4(var_1 + 0xd);
  *(type_1 *)((int)pvVar1 + 4) = var_1;
  *(type_3 *)((int)pvVar1 + 8) = 0;
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (binary_expression left: (identifier) right: (number_literal)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))))) right: (binary_expression left: (number_literal) right: (identifier)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) 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: (identifier) right: (number_literal))))) 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: (identifier) right: (number_literal))))) right: (number_literal))) (return_statement))))

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

void MASKED(uint param_1,uint param_2)

{
  int iVar1;
  
  if (0x3ffffffc < param_1) {
                    /* WARNING: Subroutine does not return */
    FUN_0022c7b0("basic_string::_S_create");
  }
  if (param_2 < param_1) {
    if (param_1 < param_2 * 2) {
      param_1 = param_2 * 2;
    }
    if (((0x1000 < param_1 + 0x1d) && (param_2 < param_1)) &&
       (param_1 = (param_1 + 0x1000) - (param_1 + 0x1d & 0xfff), 0x3ffffffc < param_1)) {
      param_1 = 0x3ffffffc;
    }
  }
  iVar1 = FUN_001e5210(param_1 + 0xd);
  *(uint *)(iVar1 + 4) = param_1;
  *(undefined4 *)(iVar1 + 8) = 0;
  return;
}

