
/* WARNING: Function: __x86.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */
/* std::wstreambuf::uflow() */

undefined4 __thiscall std::wstreambuf::uflow(wstreambuf *this)

{
  undefined4 uVar1;
  int iVar2;
  
  if (*(code **)(*(int *)this + 0x24) != (code *)PTR_underflow_0038ed8c) {
    iVar2 = (**(code **)(*(int *)this + 0x24))(this);
    if (iVar2 != -1) {
      uVar1 = **(undefined4 **)(this + 8);
      *(undefined4 **)(this + 8) = *(undefined4 **)(this + 8) + 1;
      return uVar1;
    }
  }
  return 0xffffffff;
}



/* WARNING: Function: __i686.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */

undefined4 FUN_001f1f20(int *param_1)

{
  undefined4 uVar1;
  int iVar2;
  
  if (*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c) {
    iVar2 = (**(code **)(*param_1 + 0x24))(param_1);
    if (iVar2 != -1) {
      uVar1 = *(undefined4 *)param_1[2];
      param_1[2] = (int)((undefined4 *)param_1[2] + 1);
      return uVar1;
    }
  }
  return 0xffffffff;
}


CALL 0x00035975
ADD EDX,0x19d0db
PUSH EBX
SUB ESP,0x8
MOV EBX,dword ptr [ESP + 0x10]
MOV EAX,dword ptr [EBX]
MOV EAX,dword ptr [EAX + 0x24]
CMP EAX,dword ptr [EDX + 0xfffffd8c]
JNZ 0x001f1f50
ADD ESP,0x8
MOV EAX,0xffffffff
POP EBX
RET
SUB ESP,0xc
PUSH EBX
CALL EAX
ADD ESP,0x10
CMP EAX,-0x1
JZ 0x001f1f40
MOV EDX,dword ptr [EBX + 0x8]
MOV EAX,dword ptr [EDX]
ADD EDX,0x4
MOV dword ptr [EBX + 0x8],EDX
ADD ESP,0x8
POP EBX
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */\n\nundefined4 FUN_001f1f20(int *param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c) {\n    iVar2 = (**(code **)(*param_1 + 0x24))(param_1);\n    if (iVar2 != -1) {\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }\n  }\n  return 0xffffffff;\n}\n\n" comment (function_definition "undefined4 FUN_001f1f20(int *param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c) {\n    iVar2 = (**(code **)(*param_1 + 0x24))(param_1);\n    if (iVar2 != -1) {\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }\n  }\n  return 0xffffffff;\n}" type_identifier (function_declarator "FUN_001f1f20(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c) {\n    iVar2 = (**(code **)(*param_1 + 0x24))(param_1);\n    if (iVar2 != -1) {\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }\n  }\n  return 0xffffffff;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c) {\n    iVar2 = (**(code **)(*param_1 + 0x24))(param_1);\n    if (iVar2 != -1) {\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }\n  }" if (parenthesized_expression "(*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c)" ( (binary_expression "*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c" (pointer_expression "*(code **)(*param_1 + 0x24)" * (cast_expression "(code **)(*param_1 + 0x24)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x24)" ( (binary_expression "*param_1 + 0x24" (pointer_expression "*param_1" * identifier) + number_literal) )))) != (cast_expression "(code *)PTR_FUN_0038ed8c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    iVar2 = (**(code **)(*param_1 + 0x24))(param_1);\n    if (iVar2 != -1) {\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }\n  }" { (expression_statement "iVar2 = (**(code **)(*param_1 + 0x24))(param_1);" (assignment_expression "iVar2 = (**(code **)(*param_1 + 0x24))(param_1)" identifier = (call_expression "(**(code **)(*param_1 + 0x24))(param_1)" (parenthesized_expression "(**(code **)(*param_1 + 0x24))" ( (pointer_expression "**(code **)(*param_1 + 0x24)" * (pointer_expression "*(code **)(*param_1 + 0x24)" * (cast_expression "(code **)(*param_1 + 0x24)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x24)" ( (binary_expression "*param_1 + 0x24" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar2 != -1) {\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }" if (parenthesized_expression "(iVar2 != -1)" ( (binary_expression "iVar2 != -1" identifier != number_literal) )) (compound_statement "{\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }" { (expression_statement "uVar1 = *(undefined4 *)param_1[2];" (assignment_expression "uVar1 = *(undefined4 *)param_1[2]" identifier = (pointer_expression "*(undefined4 *)param_1[2]" * (cast_expression "(undefined4 *)param_1[2]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ])))) ;) (expression_statement "param_1[2] = (int)((undefined4 *)param_1[2] + 1);" (assignment_expression "param_1[2] = (int)((undefined4 *)param_1[2] + 1)" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (cast_expression "(int)((undefined4 *)param_1[2] + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((undefined4 *)param_1[2] + 1)" ( (binary_expression "(undefined4 *)param_1[2] + 1" (cast_expression "(undefined4 *)param_1[2]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ])) + number_literal) )))) ;) (return_statement "return uVar1;" return identifier ;) })) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */\n/* std::wstreambuf::uflow() */\n\nundefined4 __thiscall std::wstreambuf::uflow(wstreambuf *this)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(code **)(*(int *)this + 0x24) != (code *)PTR_underflow_0038ed8c) {\n    iVar2 = (**(code **)(*(int *)this + 0x24))(this);\n    if (iVar2 != -1) {\n      uVar1 = **(undefined4 **)(this + 8);\n      *(undefined4 **)(this + 8) = *(undefined4 **)(this + 8) + 1;\n      return uVar1;\n    }\n  }\n  return 0xffffffff;\n}\n\n" comment comment (function_definition "undefined4 __thiscall std::wstreambuf::uflow(wstreambuf *this)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(code **)(*(int *)this + 0x24) != (code *)PTR_underflow_0038ed8c) {\n    iVar2 = (**(code **)(*(int *)this + 0x24))(this);\n    if (iVar2 != -1) {\n      uVar1 = **(undefined4 **)(this + 8);\n      *(undefined4 **)(this + 8) = *(undefined4 **)(this + 8) + 1;\n      return uVar1;\n    }\n  }\n  return 0xffffffff;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wstreambuf::" identifier : : identifier : :) (function_declarator "uflow(wstreambuf *this)" identifier (parameter_list "(wstreambuf *this)" ( (parameter_declaration "wstreambuf *this" type_identifier (pointer_declarator "*this" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(code **)(*(int *)this + 0x24) != (code *)PTR_underflow_0038ed8c) {\n    iVar2 = (**(code **)(*(int *)this + 0x24))(this);\n    if (iVar2 != -1) {\n      uVar1 = **(undefined4 **)(this + 8);\n      *(undefined4 **)(this + 8) = *(undefined4 **)(this + 8) + 1;\n      return uVar1;\n    }\n  }\n  return 0xffffffff;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (*(code **)(*(int *)this + 0x24) != (code *)PTR_underflow_0038ed8c) {\n    iVar2 = (**(code **)(*(int *)this + 0x24))(this);\n    if (iVar2 != -1) {\n      uVar1 = **(undefined4 **)(this + 8);\n      *(undefined4 **)(this + 8) = *(undefined4 **)(this + 8) + 1;\n      return uVar1;\n    }\n  }" if (parenthesized_expression "(*(code **)(*(int *)this + 0x24) != (code *)PTR_underflow_0038ed8c)" ( (binary_expression "*(code **)(*(int *)this + 0x24) != (code *)PTR_underflow_0038ed8c" (pointer_expression "*(code **)(*(int *)this + 0x24)" * (cast_expression "(code **)(*(int *)this + 0x24)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)this + 0x24)" ( (binary_expression "*(int *)this + 0x24" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) )))) != (cast_expression "(code *)PTR_underflow_0038ed8c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    iVar2 = (**(code **)(*(int *)this + 0x24))(this);\n    if (iVar2 != -1) {\n      uVar1 = **(undefined4 **)(this + 8);\n      *(undefined4 **)(this + 8) = *(undefined4 **)(this + 8) + 1;\n      return uVar1;\n    }\n  }" { (expression_statement "iVar2 = (**(code **)(*(int *)this + 0x24))(this);" (assignment_expression "iVar2 = (**(code **)(*(int *)this + 0x24))(this)" identifier = (call_expression "(**(code **)(*(int *)this + 0x24))(this)" (parenthesized_expression "(**(code **)(*(int *)this + 0x24))" ( (pointer_expression "**(code **)(*(int *)this + 0x24)" * (pointer_expression "*(code **)(*(int *)this + 0x24)" * (cast_expression "(code **)(*(int *)this + 0x24)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)this + 0x24)" ( (binary_expression "*(int *)this + 0x24" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )) (argument_list "(this)" ( identifier )))) ;) (if_statement "if (iVar2 != -1) {\n      uVar1 = **(undefined4 **)(this + 8);\n      *(undefined4 **)(this + 8) = *(undefined4 **)(this + 8) + 1;\n      return uVar1;\n    }" if (parenthesized_expression "(iVar2 != -1)" ( (binary_expression "iVar2 != -1" identifier != number_literal) )) (compound_statement "{\n      uVar1 = **(undefined4 **)(this + 8);\n      *(undefined4 **)(this + 8) = *(undefined4 **)(this + 8) + 1;\n      return uVar1;\n    }" { (expression_statement "uVar1 = **(undefined4 **)(this + 8);" (assignment_expression "uVar1 = **(undefined4 **)(this + 8)" identifier = (pointer_expression "**(undefined4 **)(this + 8)" * (pointer_expression "*(undefined4 **)(this + 8)" * (cast_expression "(undefined4 **)(this + 8)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))))) ;) (expression_statement "*(undefined4 **)(this + 8) = *(undefined4 **)(this + 8) + 1;" (assignment_expression "*(undefined4 **)(this + 8) = *(undefined4 **)(this + 8) + 1" (pointer_expression "*(undefined4 **)(this + 8)" * (cast_expression "(undefined4 **)(this + 8)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = (binary_expression "*(undefined4 **)(this + 8) + 1" (pointer_expression "*(undefined4 **)(this + 8)" * (cast_expression "(undefined4 **)(this + 8)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) + number_literal)) ;) (return_statement "return uVar1;" return identifier ;) })) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit "undefined4 FUN_001f1f20(int *param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c) {\n    iVar2 = (**(code **)(*param_1 + 0x24))(param_1);\n    if (iVar2 != -1) {\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }\n  }\n  return 0xffffffff;\n}\n\n" (function_definition "undefined4 FUN_001f1f20(int *param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c) {\n    iVar2 = (**(code **)(*param_1 + 0x24))(param_1);\n    if (iVar2 != -1) {\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }\n  }\n  return 0xffffffff;\n}" type_identifier (function_declarator "FUN_001f1f20(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c) {\n    iVar2 = (**(code **)(*param_1 + 0x24))(param_1);\n    if (iVar2 != -1) {\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }\n  }\n  return 0xffffffff;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c) {\n    iVar2 = (**(code **)(*param_1 + 0x24))(param_1);\n    if (iVar2 != -1) {\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }\n  }" if (parenthesized_expression "(*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c)" ( (binary_expression "*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c" (pointer_expression "*(code **)(*param_1 + 0x24)" * (cast_expression "(code **)(*param_1 + 0x24)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x24)" ( (binary_expression "*param_1 + 0x24" (pointer_expression "*param_1" * identifier) + number_literal) )))) != (cast_expression "(code *)PTR_FUN_0038ed8c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    iVar2 = (**(code **)(*param_1 + 0x24))(param_1);\n    if (iVar2 != -1) {\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }\n  }" { (expression_statement "iVar2 = (**(code **)(*param_1 + 0x24))(param_1);" (assignment_expression "iVar2 = (**(code **)(*param_1 + 0x24))(param_1)" identifier = (call_expression "(**(code **)(*param_1 + 0x24))(param_1)" (parenthesized_expression "(**(code **)(*param_1 + 0x24))" ( (pointer_expression "**(code **)(*param_1 + 0x24)" * (pointer_expression "*(code **)(*param_1 + 0x24)" * (cast_expression "(code **)(*param_1 + 0x24)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x24)" ( (binary_expression "*param_1 + 0x24" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar2 != -1) {\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }" if (parenthesized_expression "(iVar2 != -1)" ( (binary_expression "iVar2 != -1" identifier != number_literal) )) (compound_statement "{\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }" { (expression_statement "uVar1 = *(undefined4 *)param_1[2];" (assignment_expression "uVar1 = *(undefined4 *)param_1[2]" identifier = (pointer_expression "*(undefined4 *)param_1[2]" * (cast_expression "(undefined4 *)param_1[2]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ])))) ;) (expression_statement "param_1[2] = (int)((undefined4 *)param_1[2] + 1);" (assignment_expression "param_1[2] = (int)((undefined4 *)param_1[2] + 1)" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (cast_expression "(int)((undefined4 *)param_1[2] + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((undefined4 *)param_1[2] + 1)" ( (binary_expression "(undefined4 *)param_1[2] + 1" (cast_expression "(undefined4 *)param_1[2]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ])) + number_literal) )))) ;) (return_statement "return uVar1;" return identifier ;) })) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (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 { (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 ( IDENT )))) ;) (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 TYPE) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) + LIT) )))) ;) (return_statement return IDENT ;) })) })) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_001f1f20(int *param_1)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c) {\n    iVar2 = (**(code **)(*param_1 + 0x24))(param_1);\n    if (iVar2 != -1) {\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }\n  }\n  return 0xffffffff;\n}" (type_identifier "undefined4") (function_declarator "FUN_001f1f20(int *param_1)" (identifier "FUN_001f1f20") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  \n  if (*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c) {\n    iVar2 = (**(code **)(*param_1 + 0x24))(param_1);\n    if (iVar2 != -1) {\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }\n  }\n  return 0xffffffff;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (if_statement "if (*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c) {\n    iVar2 = (**(code **)(*param_1 + 0x24))(param_1);\n    if (iVar2 != -1) {\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }\n  }" (if "if") (parenthesized_expression "(*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c)" (( "(") (binary_expression "*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c" (pointer_expression "*(code **)(*param_1 + 0x24)" (* "*") (cast_expression "(code **)(*param_1 + 0x24)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_1 + 0x24)" (( "(") (binary_expression "*param_1 + 0x24" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x24")) () ")")))) (!= "!=") (cast_expression "(code *)PTR_FUN_0038ed8c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_0038ed8c"))) () ")")) (compound_statement "{\n    iVar2 = (**(code **)(*param_1 + 0x24))(param_1);\n    if (iVar2 != -1) {\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }\n  }" ({ "{") (expression_statement "iVar2 = (**(code **)(*param_1 + 0x24))(param_1);" (assignment_expression "iVar2 = (**(code **)(*param_1 + 0x24))(param_1)" (identifier "iVar2") (= "=") (call_expression "(**(code **)(*param_1 + 0x24))(param_1)" (parenthesized_expression "(**(code **)(*param_1 + 0x24))" (( "(") (pointer_expression "**(code **)(*param_1 + 0x24)" (* "*") (pointer_expression "*(code **)(*param_1 + 0x24)" (* "*") (cast_expression "(code **)(*param_1 + 0x24)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_1 + 0x24)" (( "(") (binary_expression "*param_1 + 0x24" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x24")) () ")"))))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (iVar2 != -1) {\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }" (if "if") (parenthesized_expression "(iVar2 != -1)" (( "(") (binary_expression "iVar2 != -1" (identifier "iVar2") (!= "!=") (number_literal "-1")) () ")")) (compound_statement "{\n      uVar1 = *(undefined4 *)param_1[2];\n      param_1[2] = (int)((undefined4 *)param_1[2] + 1);\n      return uVar1;\n    }" ({ "{") (expression_statement "uVar1 = *(undefined4 *)param_1[2];" (assignment_expression "uVar1 = *(undefined4 *)param_1[2]" (identifier "uVar1") (= "=") (pointer_expression "*(undefined4 *)param_1[2]" (* "*") (cast_expression "(undefined4 *)param_1[2]" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))))) (; ";")) (expression_statement "param_1[2] = (int)((undefined4 *)param_1[2] + 1);" (assignment_expression "param_1[2] = (int)((undefined4 *)param_1[2] + 1)" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (cast_expression "(int)((undefined4 *)param_1[2] + 1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((undefined4 *)param_1[2] + 1)" (( "(") (binary_expression "(undefined4 *)param_1[2] + 1" (cast_expression "(undefined4 *)param_1[2]" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (+ "+") (number_literal "1")) () ")")))) (; ";")) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}"))) (} "}"))) (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */
/* std::wstreambuf::uflow() */

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

{
  type_1 uVar1;
  int var_1;
  
  if (*(type_3 **)(*(int *)var_2 + 0x24) != (type_3 *)PTR_underflow_0038ed8c) {
    var_1 = (**(type_3 **)(*(int *)var_2 + 0x24))(var_2);
    if (var_1 != -1) {
      uVar1 = **(type_1 **)(var_2 + 8);
      *(type_1 **)(var_2 + 8) = *(type_1 **)(var_2 + 8) + 1;
      return uVar1;
    }
  }
  return 0xffffffff;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) 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 (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 (identifier))))) (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: (primitive_type)) 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 (identifier)))))) (return_statement (number_literal)))))

/* WARNING: Function: __i686.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */

undefined4 MASKED(int *param_1)

{
  undefined4 uVar1;
  int iVar2;
  
  if (*(code **)(*param_1 + 0x24) != (code *)PTR_FUN_0038ed8c) {
    iVar2 = (**(code **)(*param_1 + 0x24))(param_1);
    if (iVar2 != -1) {
      uVar1 = *(undefined4 *)param_1[2];
      param_1[2] = (int)((undefined4 *)param_1[2] + 1);
      return uVar1;
    }
  }
  return 0xffffffff;
}

