
/* std::string::shrink_to_fit() */

void __thiscall std::string::shrink_to_fit(string *this)

{
  ulong uVar1;
  
  if (*(string **)this == this + 0x10) {
    uVar1 = 0xf;
  }
  else {
    uVar1 = *(ulong *)(this + 0x10);
  }
  if (uVar1 <= *(ulong *)(this + 8)) {
    return;
  }
                    /* try { // try from 0027dfee to 0027dff2 has its CatchHandler @ 0027e007 */
  reserve(this,0);
  return;
}



void FUN_0027dfd0(long *param_1)

{
  ulong uVar1;
  
  if ((long *)*param_1 == param_1 + 2) {
    uVar1 = 0xf;
  }
  else {
    uVar1 = param_1[2];
  }
  if (uVar1 <= (ulong)param_1[1]) {
    return;
  }
                    /* try { // try from 0027dfee to 0027dff2 has its CatchHandler @ 0027e007 */
  FUN_0027dec0(param_1,0);
  return;
}


LEA RAX,[RDI + 0x10]
CMP qword ptr [RDI],RAX
JZ 0x0027e000
MOV RAX,qword ptr [RDI + 0x10]
CMP qword ptr [RDI + 0x8],RAX
JC 0x0027dfe8
RET
SUB RSP,0x8
XOR ESI,ESI
CALL 0x0027dec0
ADD RSP,0x8
RET
MOV EAX,0xf
JMP 0x0027dfdd
(translation_unit "void FUN_0027dfd0(long *param_1)\n\n{\n  ulong uVar1;\n  \n  if ((long *)*param_1 == param_1 + 2) {\n    uVar1 = 0xf;\n  }\n  else {\n    uVar1 = param_1[2];\n  }\n  if (uVar1 <= (ulong)param_1[1]) {\n    return;\n  }\n                    /* try { // try from 0027dfee to 0027dff2 has its CatchHandler @ 0027e007 */\n  FUN_0027dec0(param_1,0);\n  return;\n}\n\n" (function_definition "void FUN_0027dfd0(long *param_1)\n\n{\n  ulong uVar1;\n  \n  if ((long *)*param_1 == param_1 + 2) {\n    uVar1 = 0xf;\n  }\n  else {\n    uVar1 = param_1[2];\n  }\n  if (uVar1 <= (ulong)param_1[1]) {\n    return;\n  }\n                    /* try { // try from 0027dfee to 0027dff2 has its CatchHandler @ 0027e007 */\n  FUN_0027dec0(param_1,0);\n  return;\n}" primitive_type (function_declarator "FUN_0027dfd0(long *param_1)" identifier (parameter_list "(long *param_1)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  ulong uVar1;\n  \n  if ((long *)*param_1 == param_1 + 2) {\n    uVar1 = 0xf;\n  }\n  else {\n    uVar1 = param_1[2];\n  }\n  if (uVar1 <= (ulong)param_1[1]) {\n    return;\n  }\n                    /* try { // try from 0027dfee to 0027dff2 has its CatchHandler @ 0027e007 */\n  FUN_0027dec0(param_1,0);\n  return;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (if_statement "if ((long *)*param_1 == param_1 + 2) {\n    uVar1 = 0xf;\n  }\n  else {\n    uVar1 = param_1[2];\n  }" if (parenthesized_expression "((long *)*param_1 == param_1 + 2)" ( (binary_expression "(long *)*param_1 == param_1 + 2" (cast_expression "(long *)*param_1" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) == (binary_expression "param_1 + 2" identifier + number_literal)) )) (compound_statement "{\n    uVar1 = 0xf;\n  }" { (expression_statement "uVar1 = 0xf;" (assignment_expression "uVar1 = 0xf" identifier = number_literal) ;) }) (else_clause "else {\n    uVar1 = param_1[2];\n  }" else (compound_statement "{\n    uVar1 = param_1[2];\n  }" { (expression_statement "uVar1 = param_1[2];" (assignment_expression "uVar1 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) }))) (if_statement "if (uVar1 <= (ulong)param_1[1]) {\n    return;\n  }" if (parenthesized_expression "(uVar1 <= (ulong)param_1[1])" ( (binary_expression "uVar1 <= (ulong)param_1[1]" identifier <= (cast_expression "(ulong)param_1[1]" ( (type_descriptor "ulong" type_identifier) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_0027dec0(param_1,0);" (call_expression "FUN_0027dec0(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* std::string::shrink_to_fit() */\n\nvoid __thiscall std::string::shrink_to_fit(string *this)\n\n{\n  ulong uVar1;\n  \n  if (*(string **)this == this + 0x10) {\n    uVar1 = 0xf;\n  }\n  else {\n    uVar1 = *(ulong *)(this + 0x10);\n  }\n  if (uVar1 <= *(ulong *)(this + 8)) {\n    return;\n  }\n                    /* try { // try from 0027dfee to 0027dff2 has its CatchHandler @ 0027e007 */\n  reserve(this,0);\n  return;\n}\n\n" comment (function_definition "void __thiscall std::string::shrink_to_fit(string *this)\n\n{\n  ulong uVar1;\n  \n  if (*(string **)this == this + 0x10) {\n    uVar1 = 0xf;\n  }\n  else {\n    uVar1 = *(ulong *)(this + 0x10);\n  }\n  if (uVar1 <= *(ulong *)(this + 8)) {\n    return;\n  }\n                    /* try { // try from 0027dfee to 0027dff2 has its CatchHandler @ 0027e007 */\n  reserve(this,0);\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::string::" identifier : : identifier : :) (function_declarator "shrink_to_fit(string *this)" identifier (parameter_list "(string *this)" ( (parameter_declaration "string *this" type_identifier (pointer_declarator "*this" * identifier)) ))) (compound_statement "{\n  ulong uVar1;\n  \n  if (*(string **)this == this + 0x10) {\n    uVar1 = 0xf;\n  }\n  else {\n    uVar1 = *(ulong *)(this + 0x10);\n  }\n  if (uVar1 <= *(ulong *)(this + 8)) {\n    return;\n  }\n                    /* try { // try from 0027dfee to 0027dff2 has its CatchHandler @ 0027e007 */\n  reserve(this,0);\n  return;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (if_statement "if (*(string **)this == this + 0x10) {\n    uVar1 = 0xf;\n  }\n  else {\n    uVar1 = *(ulong *)(this + 0x10);\n  }" if (parenthesized_expression "(*(string **)this == this + 0x10)" ( (binary_expression "*(string **)this == this + 0x10" (pointer_expression "*(string **)this" * (cast_expression "(string **)this" ( (type_descriptor "string **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) == (binary_expression "this + 0x10" identifier + number_literal)) )) (compound_statement "{\n    uVar1 = 0xf;\n  }" { (expression_statement "uVar1 = 0xf;" (assignment_expression "uVar1 = 0xf" identifier = number_literal) ;) }) (else_clause "else {\n    uVar1 = *(ulong *)(this + 0x10);\n  }" else (compound_statement "{\n    uVar1 = *(ulong *)(this + 0x10);\n  }" { (expression_statement "uVar1 = *(ulong *)(this + 0x10);" (assignment_expression "uVar1 = *(ulong *)(this + 0x10)" identifier = (pointer_expression "*(ulong *)(this + 0x10)" * (cast_expression "(ulong *)(this + 0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) ))))) ;) }))) (if_statement "if (uVar1 <= *(ulong *)(this + 8)) {\n    return;\n  }" if (parenthesized_expression "(uVar1 <= *(ulong *)(this + 8))" ( (binary_expression "uVar1 <= *(ulong *)(this + 8)" identifier <= (pointer_expression "*(ulong *)(this + 8)" * (cast_expression "(ulong *)(this + 8)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "reserve(this,0);" (call_expression "reserve(this,0)" identifier (argument_list "(this,0)" ( identifier , number_literal ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0027dfd0(long *param_1)\n\n{\n  ulong uVar1;\n  \n  if ((long *)*param_1 == param_1 + 2) {\n    uVar1 = 0xf;\n  }\n  else {\n    uVar1 = param_1[2];\n  }\n  if (uVar1 <= (ulong)param_1[1]) {\n    return;\n  }\n                    \n  FUN_0027dec0(param_1,0);\n  return;\n}\n\n" (function_definition "void FUN_0027dfd0(long *param_1)\n\n{\n  ulong uVar1;\n  \n  if ((long *)*param_1 == param_1 + 2) {\n    uVar1 = 0xf;\n  }\n  else {\n    uVar1 = param_1[2];\n  }\n  if (uVar1 <= (ulong)param_1[1]) {\n    return;\n  }\n                    \n  FUN_0027dec0(param_1,0);\n  return;\n}" primitive_type (function_declarator "FUN_0027dfd0(long *param_1)" identifier (parameter_list "(long *param_1)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  ulong uVar1;\n  \n  if ((long *)*param_1 == param_1 + 2) {\n    uVar1 = 0xf;\n  }\n  else {\n    uVar1 = param_1[2];\n  }\n  if (uVar1 <= (ulong)param_1[1]) {\n    return;\n  }\n                    \n  FUN_0027dec0(param_1,0);\n  return;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (if_statement "if ((long *)*param_1 == param_1 + 2) {\n    uVar1 = 0xf;\n  }\n  else {\n    uVar1 = param_1[2];\n  }" if (parenthesized_expression "((long *)*param_1 == param_1 + 2)" ( (binary_expression "(long *)*param_1 == param_1 + 2" (cast_expression "(long *)*param_1" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier)) == (binary_expression "param_1 + 2" identifier + number_literal)) )) (compound_statement "{\n    uVar1 = 0xf;\n  }" { (expression_statement "uVar1 = 0xf;" (assignment_expression "uVar1 = 0xf" identifier = number_literal) ;) }) (else_clause "else {\n    uVar1 = param_1[2];\n  }" else (compound_statement "{\n    uVar1 = param_1[2];\n  }" { (expression_statement "uVar1 = param_1[2];" (assignment_expression "uVar1 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) }))) (if_statement "if (uVar1 <= (ulong)param_1[1]) {\n    return;\n  }" if (parenthesized_expression "(uVar1 <= (ulong)param_1[1])" ( (binary_expression "uVar1 <= (ulong)param_1[1]" identifier <= (cast_expression "(ulong)param_1[1]" ( (type_descriptor "ulong" type_identifier) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_0027dec0(param_1,0);" (call_expression "FUN_0027dec0(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) == (binary_expression IDENT + LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0027dfd0(long *param_1)\n\n{\n  ulong uVar1;\n  \n  if ((long *)*param_1 == param_1 + 2) {\n    uVar1 = 0xf;\n  }\n  else {\n    uVar1 = param_1[2];\n  }\n  if (uVar1 <= (ulong)param_1[1]) {\n    return;\n  }\n                    \n  FUN_0027dec0(param_1,0);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0027dfd0(long *param_1)" (identifier "FUN_0027dfd0") (parameter_list "(long *param_1)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  ulong uVar1;\n  \n  if ((long *)*param_1 == param_1 + 2) {\n    uVar1 = 0xf;\n  }\n  else {\n    uVar1 = param_1[2];\n  }\n  if (uVar1 <= (ulong)param_1[1]) {\n    return;\n  }\n                    \n  FUN_0027dec0(param_1,0);\n  return;\n}" ({ "{") (declaration "ulong uVar1;" (type_identifier "ulong") (identifier "uVar1") (; ";")) (if_statement "if ((long *)*param_1 == param_1 + 2) {\n    uVar1 = 0xf;\n  }\n  else {\n    uVar1 = param_1[2];\n  }" (if "if") (parenthesized_expression "((long *)*param_1 == param_1 + 2)" (( "(") (binary_expression "(long *)*param_1 == param_1 + 2" (cast_expression "(long *)*param_1" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (== "==") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2"))) () ")")) (compound_statement "{\n    uVar1 = 0xf;\n  }" ({ "{") (expression_statement "uVar1 = 0xf;" (assignment_expression "uVar1 = 0xf" (identifier "uVar1") (= "=") (number_literal "0xf")) (; ";")) (} "}")) (else_clause "else {\n    uVar1 = param_1[2];\n  }" (else "else") (compound_statement "{\n    uVar1 = param_1[2];\n  }" ({ "{") (expression_statement "uVar1 = param_1[2];" (assignment_expression "uVar1 = param_1[2]" (identifier "uVar1") (= "=") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (} "}")))) (if_statement "if (uVar1 <= (ulong)param_1[1]) {\n    return;\n  }" (if "if") (parenthesized_expression "(uVar1 <= (ulong)param_1[1])" (( "(") (binary_expression "uVar1 <= (ulong)param_1[1]" (identifier "uVar1") (<= "<=") (cast_expression "(ulong)param_1[1]" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0027dec0(param_1,0);" (call_expression "FUN_0027dec0(param_1,0)" (identifier "FUN_0027dec0") (argument_list "(param_1,0)" (( "(") (identifier "param_1") (, ",") (number_literal "0") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* std::string::shrink_to_fit() */

void __thiscall std::type_1::function_1(type_1 *var_1)

{
  type_2 var_2;
  
  if (*(type_1 **)var_1 == var_1 + 0x10) {
    var_2 = 0xf;
  }
  else {
    var_2 = *(type_2 *)(var_1 + 0x10);
  }
  if (var_2 <= *(type_2 *)(var_1 + 8)) {
    return;
  }
                    /* try { // try from 0027dfee to 0027dff2 has its CatchHandler @ 0027e007 */
  var_3(var_1,0);
  return;
}


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

void MASKED(long *param_1)

{
  ulong uVar1;
  
  if ((long *)*param_1 == param_1 + 2) {
    uVar1 = 0xf;
  }
  else {
    uVar1 = param_1[2];
  }
  if (uVar1 <= (ulong)param_1[1]) {
    return;
  }
                    /* try { // try from 0027dfee to 0027dff2 has its CatchHandler @ 0027e007 */
  FUN_0027dec0(param_1,0);
  return;
}

