
/* std::streambuf::uflow() */

ulong __thiscall std::streambuf::uflow(streambuf *this)

{
  byte bVar1;
  int iVar2;
  
  if (*(code **)(*(long *)this + 0x48) == (code *)PTR_underflow_00457d90) {
    return 0xffffffff;
  }
  iVar2 = (**(code **)(*(long *)this + 0x48))();
  if (iVar2 != -1) {
    bVar1 = **(byte **)(this + 0x10);
    *(byte **)(this + 0x10) = *(byte **)(this + 0x10) + 1;
    return (ulong)bVar1;
  }
  return 0xffffffff;
}



ulong FUN_002f9650(long *param_1)

{
  byte bVar1;
  int iVar2;
  
  if (*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90) {
    return 0xffffffff;
  }
  iVar2 = (**(code **)(*param_1 + 0x48))();
  if (iVar2 != -1) {
    bVar1 = *(byte *)param_1[2];
    param_1[2] = (long)((byte *)param_1[2] + 1);
    return (ulong)bVar1;
  }
  return 0xffffffff;
}


MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x48]
CMP RAX,qword ptr [0x00457d90]
JNZ 0x002f9670
MOV EAX,0xffffffff
RET
PUSH RBX
MOV RBX,RDI
CALL RAX
CMP EAX,-0x1
JZ 0x002f968c
MOV RDX,qword ptr [RBX + 0x10]
MOVZX EAX,byte ptr [RDX]
ADD RDX,0x1
MOV qword ptr [RBX + 0x10],RDX
POP RBX
RET
MOV EAX,0xffffffff
POP RBX
RET
(translation_unit "ulong FUN_002f9650(long *param_1)\n\n{\n  byte bVar1;\n  int iVar2;\n  \n  if (*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90) {\n    return 0xffffffff;\n  }\n  iVar2 = (**(code **)(*param_1 + 0x48))();\n  if (iVar2 != -1) {\n    bVar1 = *(byte *)param_1[2];\n    param_1[2] = (long)((byte *)param_1[2] + 1);\n    return (ulong)bVar1;\n  }\n  return 0xffffffff;\n}\n\n" (function_definition "ulong FUN_002f9650(long *param_1)\n\n{\n  byte bVar1;\n  int iVar2;\n  \n  if (*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90) {\n    return 0xffffffff;\n  }\n  iVar2 = (**(code **)(*param_1 + 0x48))();\n  if (iVar2 != -1) {\n    bVar1 = *(byte *)param_1[2];\n    param_1[2] = (long)((byte *)param_1[2] + 1);\n    return (ulong)bVar1;\n  }\n  return 0xffffffff;\n}" type_identifier (function_declarator "FUN_002f9650(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  byte bVar1;\n  int iVar2;\n  \n  if (*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90) {\n    return 0xffffffff;\n  }\n  iVar2 = (**(code **)(*param_1 + 0x48))();\n  if (iVar2 != -1) {\n    bVar1 = *(byte *)param_1[2];\n    param_1[2] = (long)((byte *)param_1[2] + 1);\n    return (ulong)bVar1;\n  }\n  return 0xffffffff;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90) {\n    return 0xffffffff;\n  }" if (parenthesized_expression "(*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90)" ( (binary_expression "*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90" (pointer_expression "*(code **)(*param_1 + 0x48)" * (cast_expression "(code **)(*param_1 + 0x48)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x48)" ( (binary_expression "*param_1 + 0x48" (pointer_expression "*param_1" * identifier) + number_literal) )))) == (cast_expression "(code *)PTR_FUN_00457d90" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    return 0xffffffff;\n  }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "iVar2 = (**(code **)(*param_1 + 0x48))();" (assignment_expression "iVar2 = (**(code **)(*param_1 + 0x48))()" identifier = (call_expression "(**(code **)(*param_1 + 0x48))()" (parenthesized_expression "(**(code **)(*param_1 + 0x48))" ( (pointer_expression "**(code **)(*param_1 + 0x48)" * (pointer_expression "*(code **)(*param_1 + 0x48)" * (cast_expression "(code **)(*param_1 + 0x48)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x48)" ( (binary_expression "*param_1 + 0x48" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "()" ( )))) ;) (if_statement "if (iVar2 != -1) {\n    bVar1 = *(byte *)param_1[2];\n    param_1[2] = (long)((byte *)param_1[2] + 1);\n    return (ulong)bVar1;\n  }" if (parenthesized_expression "(iVar2 != -1)" ( (binary_expression "iVar2 != -1" identifier != number_literal) )) (compound_statement "{\n    bVar1 = *(byte *)param_1[2];\n    param_1[2] = (long)((byte *)param_1[2] + 1);\n    return (ulong)bVar1;\n  }" { (expression_statement "bVar1 = *(byte *)param_1[2];" (assignment_expression "bVar1 = *(byte *)param_1[2]" identifier = (pointer_expression "*(byte *)param_1[2]" * (cast_expression "(byte *)param_1[2]" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ])))) ;) (expression_statement "param_1[2] = (long)((byte *)param_1[2] + 1);" (assignment_expression "param_1[2] = (long)((byte *)param_1[2] + 1)" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (cast_expression "(long)((byte *)param_1[2] + 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "((byte *)param_1[2] + 1)" ( (binary_expression "(byte *)param_1[2] + 1" (cast_expression "(byte *)param_1[2]" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ])) + number_literal) )))) ;) (return_statement "return (ulong)bVar1;" return (cast_expression "(ulong)bVar1" ( (type_descriptor "ulong" type_identifier) ) identifier) ;) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit "/* std::streambuf::uflow() */\n\nulong __thiscall std::streambuf::uflow(streambuf *this)\n\n{\n  byte bVar1;\n  int iVar2;\n  \n  if (*(code **)(*(long *)this + 0x48) == (code *)PTR_underflow_00457d90) {\n    return 0xffffffff;\n  }\n  iVar2 = (**(code **)(*(long *)this + 0x48))();\n  if (iVar2 != -1) {\n    bVar1 = **(byte **)(this + 0x10);\n    *(byte **)(this + 0x10) = *(byte **)(this + 0x10) + 1;\n    return (ulong)bVar1;\n  }\n  return 0xffffffff;\n}\n\n" comment (function_definition "ulong __thiscall std::streambuf::uflow(streambuf *this)\n\n{\n  byte bVar1;\n  int iVar2;\n  \n  if (*(code **)(*(long *)this + 0x48) == (code *)PTR_underflow_00457d90) {\n    return 0xffffffff;\n  }\n  iVar2 = (**(code **)(*(long *)this + 0x48))();\n  if (iVar2 != -1) {\n    bVar1 = **(byte **)(this + 0x10);\n    *(byte **)(this + 0x10) = *(byte **)(this + 0x10) + 1;\n    return (ulong)bVar1;\n  }\n  return 0xffffffff;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::streambuf::" identifier : : identifier : :) (function_declarator "uflow(streambuf *this)" identifier (parameter_list "(streambuf *this)" ( (parameter_declaration "streambuf *this" type_identifier (pointer_declarator "*this" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  int iVar2;\n  \n  if (*(code **)(*(long *)this + 0x48) == (code *)PTR_underflow_00457d90) {\n    return 0xffffffff;\n  }\n  iVar2 = (**(code **)(*(long *)this + 0x48))();\n  if (iVar2 != -1) {\n    bVar1 = **(byte **)(this + 0x10);\n    *(byte **)(this + 0x10) = *(byte **)(this + 0x10) + 1;\n    return (ulong)bVar1;\n  }\n  return 0xffffffff;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (*(code **)(*(long *)this + 0x48) == (code *)PTR_underflow_00457d90) {\n    return 0xffffffff;\n  }" if (parenthesized_expression "(*(code **)(*(long *)this + 0x48) == (code *)PTR_underflow_00457d90)" ( (binary_expression "*(code **)(*(long *)this + 0x48) == (code *)PTR_underflow_00457d90" (pointer_expression "*(code **)(*(long *)this + 0x48)" * (cast_expression "(code **)(*(long *)this + 0x48)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(long *)this + 0x48)" ( (binary_expression "*(long *)this + 0x48" (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) )))) == (cast_expression "(code *)PTR_underflow_00457d90" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    return 0xffffffff;\n  }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "iVar2 = (**(code **)(*(long *)this + 0x48))();" (assignment_expression "iVar2 = (**(code **)(*(long *)this + 0x48))()" identifier = (call_expression "(**(code **)(*(long *)this + 0x48))()" (parenthesized_expression "(**(code **)(*(long *)this + 0x48))" ( (pointer_expression "**(code **)(*(long *)this + 0x48)" * (pointer_expression "*(code **)(*(long *)this + 0x48)" * (cast_expression "(code **)(*(long *)this + 0x48)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(long *)this + 0x48)" ( (binary_expression "*(long *)this + 0x48" (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )) (argument_list "()" ( )))) ;) (if_statement "if (iVar2 != -1) {\n    bVar1 = **(byte **)(this + 0x10);\n    *(byte **)(this + 0x10) = *(byte **)(this + 0x10) + 1;\n    return (ulong)bVar1;\n  }" if (parenthesized_expression "(iVar2 != -1)" ( (binary_expression "iVar2 != -1" identifier != number_literal) )) (compound_statement "{\n    bVar1 = **(byte **)(this + 0x10);\n    *(byte **)(this + 0x10) = *(byte **)(this + 0x10) + 1;\n    return (ulong)bVar1;\n  }" { (expression_statement "bVar1 = **(byte **)(this + 0x10);" (assignment_expression "bVar1 = **(byte **)(this + 0x10)" identifier = (pointer_expression "**(byte **)(this + 0x10)" * (pointer_expression "*(byte **)(this + 0x10)" * (cast_expression "(byte **)(this + 0x10)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))))) ;) (expression_statement "*(byte **)(this + 0x10) = *(byte **)(this + 0x10) + 1;" (assignment_expression "*(byte **)(this + 0x10) = *(byte **)(this + 0x10) + 1" (pointer_expression "*(byte **)(this + 0x10)" * (cast_expression "(byte **)(this + 0x10)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) = (binary_expression "*(byte **)(this + 0x10) + 1" (pointer_expression "*(byte **)(this + 0x10)" * (cast_expression "(byte **)(this + 0x10)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) + number_literal)) ;) (return_statement "return (ulong)bVar1;" return (cast_expression "(ulong)bVar1" ( (type_descriptor "ulong" type_identifier) ) identifier) ;) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit "ulong FUN_002f9650(long *param_1)\n\n{\n  byte bVar1;\n  int iVar2;\n  \n  if (*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90) {\n    return 0xffffffff;\n  }\n  iVar2 = (**(code **)(*param_1 + 0x48))();\n  if (iVar2 != -1) {\n    bVar1 = *(byte *)param_1[2];\n    param_1[2] = (long)((byte *)param_1[2] + 1);\n    return (ulong)bVar1;\n  }\n  return 0xffffffff;\n}\n\n" (function_definition "ulong FUN_002f9650(long *param_1)\n\n{\n  byte bVar1;\n  int iVar2;\n  \n  if (*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90) {\n    return 0xffffffff;\n  }\n  iVar2 = (**(code **)(*param_1 + 0x48))();\n  if (iVar2 != -1) {\n    bVar1 = *(byte *)param_1[2];\n    param_1[2] = (long)((byte *)param_1[2] + 1);\n    return (ulong)bVar1;\n  }\n  return 0xffffffff;\n}" type_identifier (function_declarator "FUN_002f9650(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  byte bVar1;\n  int iVar2;\n  \n  if (*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90) {\n    return 0xffffffff;\n  }\n  iVar2 = (**(code **)(*param_1 + 0x48))();\n  if (iVar2 != -1) {\n    bVar1 = *(byte *)param_1[2];\n    param_1[2] = (long)((byte *)param_1[2] + 1);\n    return (ulong)bVar1;\n  }\n  return 0xffffffff;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90) {\n    return 0xffffffff;\n  }" if (parenthesized_expression "(*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90)" ( (binary_expression "*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90" (pointer_expression "*(code **)(*param_1 + 0x48)" * (cast_expression "(code **)(*param_1 + 0x48)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x48)" ( (binary_expression "*param_1 + 0x48" (pointer_expression "*param_1" * identifier) + number_literal) )))) == (cast_expression "(code *)PTR_FUN_00457d90" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    return 0xffffffff;\n  }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "iVar2 = (**(code **)(*param_1 + 0x48))();" (assignment_expression "iVar2 = (**(code **)(*param_1 + 0x48))()" identifier = (call_expression "(**(code **)(*param_1 + 0x48))()" (parenthesized_expression "(**(code **)(*param_1 + 0x48))" ( (pointer_expression "**(code **)(*param_1 + 0x48)" * (pointer_expression "*(code **)(*param_1 + 0x48)" * (cast_expression "(code **)(*param_1 + 0x48)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x48)" ( (binary_expression "*param_1 + 0x48" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "()" ( )))) ;) (if_statement "if (iVar2 != -1) {\n    bVar1 = *(byte *)param_1[2];\n    param_1[2] = (long)((byte *)param_1[2] + 1);\n    return (ulong)bVar1;\n  }" if (parenthesized_expression "(iVar2 != -1)" ( (binary_expression "iVar2 != -1" identifier != number_literal) )) (compound_statement "{\n    bVar1 = *(byte *)param_1[2];\n    param_1[2] = (long)((byte *)param_1[2] + 1);\n    return (ulong)bVar1;\n  }" { (expression_statement "bVar1 = *(byte *)param_1[2];" (assignment_expression "bVar1 = *(byte *)param_1[2]" identifier = (pointer_expression "*(byte *)param_1[2]" * (cast_expression "(byte *)param_1[2]" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ])))) ;) (expression_statement "param_1[2] = (long)((byte *)param_1[2] + 1);" (assignment_expression "param_1[2] = (long)((byte *)param_1[2] + 1)" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (cast_expression "(long)((byte *)param_1[2] + 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "((byte *)param_1[2] + 1)" ( (binary_expression "(byte *)param_1[2] + 1" (cast_expression "(byte *)param_1[2]" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ])) + number_literal) )))) ;) (return_statement "return (ulong)bVar1;" return (cast_expression "(ulong)bVar1" ( (type_descriptor "ulong" type_identifier) ) identifier) ;) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) + LIT) )))) ;) (return_statement return (cast_expression ( (type_descriptor TYPE) ) IDENT) ;) })) (return_statement return LIT ;) })))
(function_definition "ulong FUN_002f9650(long *param_1)\n\n{\n  byte bVar1;\n  int iVar2;\n  \n  if (*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90) {\n    return 0xffffffff;\n  }\n  iVar2 = (**(code **)(*param_1 + 0x48))();\n  if (iVar2 != -1) {\n    bVar1 = *(byte *)param_1[2];\n    param_1[2] = (long)((byte *)param_1[2] + 1);\n    return (ulong)bVar1;\n  }\n  return 0xffffffff;\n}" (type_identifier "ulong") (function_declarator "FUN_002f9650(long *param_1)" (identifier "FUN_002f9650") (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  byte bVar1;\n  int iVar2;\n  \n  if (*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90) {\n    return 0xffffffff;\n  }\n  iVar2 = (**(code **)(*param_1 + 0x48))();\n  if (iVar2 != -1) {\n    bVar1 = *(byte *)param_1[2];\n    param_1[2] = (long)((byte *)param_1[2] + 1);\n    return (ulong)bVar1;\n  }\n  return 0xffffffff;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (if_statement "if (*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90) {\n    return 0xffffffff;\n  }" (if "if") (parenthesized_expression "(*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90)" (( "(") (binary_expression "*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90" (pointer_expression "*(code **)(*param_1 + 0x48)" (* "*") (cast_expression "(code **)(*param_1 + 0x48)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_1 + 0x48)" (( "(") (binary_expression "*param_1 + 0x48" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x48")) () ")")))) (== "==") (cast_expression "(code *)PTR_FUN_00457d90" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_00457d90"))) () ")")) (compound_statement "{\n    return 0xffffffff;\n  }" ({ "{") (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (expression_statement "iVar2 = (**(code **)(*param_1 + 0x48))();" (assignment_expression "iVar2 = (**(code **)(*param_1 + 0x48))()" (identifier "iVar2") (= "=") (call_expression "(**(code **)(*param_1 + 0x48))()" (parenthesized_expression "(**(code **)(*param_1 + 0x48))" (( "(") (pointer_expression "**(code **)(*param_1 + 0x48)" (* "*") (pointer_expression "*(code **)(*param_1 + 0x48)" (* "*") (cast_expression "(code **)(*param_1 + 0x48)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_1 + 0x48)" (( "(") (binary_expression "*param_1 + 0x48" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x48")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar2 != -1) {\n    bVar1 = *(byte *)param_1[2];\n    param_1[2] = (long)((byte *)param_1[2] + 1);\n    return (ulong)bVar1;\n  }" (if "if") (parenthesized_expression "(iVar2 != -1)" (( "(") (binary_expression "iVar2 != -1" (identifier "iVar2") (!= "!=") (number_literal "-1")) () ")")) (compound_statement "{\n    bVar1 = *(byte *)param_1[2];\n    param_1[2] = (long)((byte *)param_1[2] + 1);\n    return (ulong)bVar1;\n  }" ({ "{") (expression_statement "bVar1 = *(byte *)param_1[2];" (assignment_expression "bVar1 = *(byte *)param_1[2]" (identifier "bVar1") (= "=") (pointer_expression "*(byte *)param_1[2]" (* "*") (cast_expression "(byte *)param_1[2]" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))))) (; ";")) (expression_statement "param_1[2] = (long)((byte *)param_1[2] + 1);" (assignment_expression "param_1[2] = (long)((byte *)param_1[2] + 1)" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (cast_expression "(long)((byte *)param_1[2] + 1)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "((byte *)param_1[2] + 1)" (( "(") (binary_expression "(byte *)param_1[2] + 1" (cast_expression "(byte *)param_1[2]" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (+ "+") (number_literal "1")) () ")")))) (; ";")) (return_statement "return (ulong)bVar1;" (return "return") (cast_expression "(ulong)bVar1" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "bVar1")) (; ";")) (} "}"))) (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}")))

/* std::streambuf::uflow() */

type_1 __thiscall std::type_2::function_1(type_2 *var_2)

{
  type_3 bVar1;
  int var_1;
  
  if (*(type_4 **)(*(long *)var_2 + 0x48) == (type_4 *)PTR_underflow_00457d90) {
    return 0xffffffff;
  }
  var_1 = (**(type_4 **)(*(long *)var_2 + 0x48))();
  if (var_1 != -1) {
    bVar1 = **(type_3 **)(var_2 + 0x10);
    *(type_3 **)(var_2 + 0x10) = *(type_3 **)(var_2 + 0x10) + 1;
    return (type_1)bVar1;
  }
  return 0xffffffff;
}


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

ulong MASKED(long *param_1)

{
  byte bVar1;
  int iVar2;
  
  if (*(code **)(*param_1 + 0x48) == (code *)PTR_FUN_00457d90) {
    return 0xffffffff;
  }
  iVar2 = (**(code **)(*param_1 + 0x48))();
  if (iVar2 != -1) {
    bVar1 = *(byte *)param_1[2];
    param_1[2] = (long)((byte *)param_1[2] + 1);
    return (ulong)bVar1;
  }
  return 0xffffffff;
}

