
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::wstreambuf::sputc(wchar_t) */

wchar_t __thiscall std::wstreambuf::sputc(wstreambuf *this,wchar_t param_1)

{
  wchar_t *pwVar1;
  wchar_t wVar2;
  
  pwVar1 = *(wchar_t **)(this + 0x14);
  if (pwVar1 < *(wchar_t **)(this + 0x18)) {
    *pwVar1 = param_1;
    *(wchar_t **)(this + 0x14) = pwVar1 + 1;
  }
  else {
    param_1 = L'\xffffffff';
    if (*(code **)(*(int *)this + 0x34) != (code *)PTR_overflow_003a9d54) {
                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      wVar2 = (**(code **)(*(int *)this + 0x34))();
      return wVar2;
    }
  }
  return param_1;
}



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

undefined4 FUN_002090e0(int *param_1,undefined4 param_2)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  
  puVar1 = (undefined4 *)param_1[5];
  if (puVar1 < (undefined4 *)param_1[6]) {
    *puVar1 = param_2;
    param_1[5] = (int)(puVar1 + 1);
  }
  else {
    param_2 = 0xffffffff;
    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {
                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      uVar2 = (**(code **)(*param_1 + 0x34))();
      return uVar2;
    }
  }
  return param_2;
}


PUSH EBX
MOV ECX,dword ptr [ESP + 0x8]
CALL 0x00036db0
ADD EBX,0x1a0f16
MOV EAX,dword ptr [ESP + 0xc]
MOV EDX,dword ptr [ECX + 0x14]
CMP EDX,dword ptr [ECX + 0x18]
JNC 0x00209110
MOV dword ptr [EDX],EAX
ADD EDX,0x4
MOV dword ptr [ECX + 0x14],EDX
POP EBX
RET
MOV EAX,dword ptr [ECX]
MOV EDX,dword ptr [EAX + 0x34]
MOV EAX,0xffffffff
CMP EDX,dword ptr [EBX + 0xfffffd54]
JZ 0x00209104
POP EBX
JMP EDX
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_002090e0(int *param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  \n  puVar1 = (undefined4 *)param_1[5];\n  if (puVar1 < (undefined4 *)param_1[6]) {\n    *puVar1 = param_2;\n    param_1[5] = (int)(puVar1 + 1);\n  }\n  else {\n    param_2 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }\n  }\n  return param_2;\n}\n\n" comment (function_definition "undefined4 FUN_002090e0(int *param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  \n  puVar1 = (undefined4 *)param_1[5];\n  if (puVar1 < (undefined4 *)param_1[6]) {\n    *puVar1 = param_2;\n    param_1[5] = (int)(puVar1 + 1);\n  }\n  else {\n    param_2 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }\n  }\n  return param_2;\n}" type_identifier (function_declarator "FUN_002090e0(int *param_1,undefined4 param_2)" identifier (parameter_list "(int *param_1,undefined4 param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  \n  puVar1 = (undefined4 *)param_1[5];\n  if (puVar1 < (undefined4 *)param_1[6]) {\n    *puVar1 = param_2;\n    param_1[5] = (int)(puVar1 + 1);\n  }\n  else {\n    param_2 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }\n  }\n  return param_2;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "puVar1 = (undefined4 *)param_1[5];" (assignment_expression "puVar1 = (undefined4 *)param_1[5]" identifier = (cast_expression "(undefined4 *)param_1[5]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[5]" identifier [ number_literal ]))) ;) (if_statement "if (puVar1 < (undefined4 *)param_1[6]) {\n    *puVar1 = param_2;\n    param_1[5] = (int)(puVar1 + 1);\n  }\n  else {\n    param_2 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }\n  }" if (parenthesized_expression "(puVar1 < (undefined4 *)param_1[6])" ( (binary_expression "puVar1 < (undefined4 *)param_1[6]" identifier < (cast_expression "(undefined4 *)param_1[6]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[6]" identifier [ number_literal ]))) )) (compound_statement "{\n    *puVar1 = param_2;\n    param_1[5] = (int)(puVar1 + 1);\n  }" { (expression_statement "*puVar1 = param_2;" (assignment_expression "*puVar1 = param_2" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "param_1[5] = (int)(puVar1 + 1);" (assignment_expression "param_1[5] = (int)(puVar1 + 1)" (subscript_expression "param_1[5]" identifier [ number_literal ]) = (cast_expression "(int)(puVar1 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) )))) ;) }) (else_clause "else {\n    param_2 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }\n  }" else (compound_statement "{\n    param_2 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }\n  }" { (expression_statement "param_2 = 0xffffffff;" (assignment_expression "param_2 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }" if (parenthesized_expression "(*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54)" ( (binary_expression "*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54" (pointer_expression "*(code **)(*param_1 + 0x34)" * (cast_expression "(code **)(*param_1 + 0x34)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x34)" ( (binary_expression "*param_1 + 0x34" (pointer_expression "*param_1" * identifier) + number_literal) )))) != (cast_expression "(code *)PTR_FUN_003a9d54" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }" { comment comment (expression_statement "uVar2 = (**(code **)(*param_1 + 0x34))();" (assignment_expression "uVar2 = (**(code **)(*param_1 + 0x34))()" identifier = (call_expression "(**(code **)(*param_1 + 0x34))()" (parenthesized_expression "(**(code **)(*param_1 + 0x34))" ( (pointer_expression "**(code **)(*param_1 + 0x34)" * (pointer_expression "*(code **)(*param_1 + 0x34)" * (cast_expression "(code **)(*param_1 + 0x34)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x34)" ( (binary_expression "*param_1 + 0x34" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "()" ( )))) ;) (return_statement "return uVar2;" return identifier ;) })) }))) (return_statement "return param_2;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::wstreambuf::sputc(wchar_t) */\n\nwchar_t __thiscall std::wstreambuf::sputc(wstreambuf *this,wchar_t param_1)\n\n{\n  wchar_t *pwVar1;\n  wchar_t wVar2;\n  \n  pwVar1 = *(wchar_t **)(this + 0x14);\n  if (pwVar1 < *(wchar_t **)(this + 0x18)) {\n    *pwVar1 = param_1;\n    *(wchar_t **)(this + 0x14) = pwVar1 + 1;\n  }\n  else {\n    param_1 = L'\xffffffff';\n    if (*(code **)(*(int *)this + 0x34) != (code *)PTR_overflow_003a9d54) {\n                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      wVar2 = (**(code **)(*(int *)this + 0x34))();\n      return wVar2;\n    }\n  }\n  return param_1;\n}\n\n" comment comment (function_definition "wchar_t __thiscall std::wstreambuf::sputc(wstreambuf *this,wchar_t param_1)\n\n{\n  wchar_t *pwVar1;\n  wchar_t wVar2;\n  \n  pwVar1 = *(wchar_t **)(this + 0x14);\n  if (pwVar1 < *(wchar_t **)(this + 0x18)) {\n    *pwVar1 = param_1;\n    *(wchar_t **)(this + 0x14) = pwVar1 + 1;\n  }\n  else {\n    param_1 = L'\xffffffff';\n    if (*(code **)(*(int *)this + 0x34) != (code *)PTR_overflow_003a9d54) {\n                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      wVar2 = (**(code **)(*(int *)this + 0x34))();\n      return wVar2;\n    }\n  }\n  return param_1;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wstreambuf::" identifier : : identifier : :) (function_declarator "sputc(wstreambuf *this,wchar_t param_1)" identifier (parameter_list "(wstreambuf *this,wchar_t param_1)" ( (parameter_declaration "wstreambuf *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "wchar_t param_1" type_identifier identifier) ))) (compound_statement "{\n  wchar_t *pwVar1;\n  wchar_t wVar2;\n  \n  pwVar1 = *(wchar_t **)(this + 0x14);\n  if (pwVar1 < *(wchar_t **)(this + 0x18)) {\n    *pwVar1 = param_1;\n    *(wchar_t **)(this + 0x14) = pwVar1 + 1;\n  }\n  else {\n    param_1 = L'\xffffffff';\n    if (*(code **)(*(int *)this + 0x34) != (code *)PTR_overflow_003a9d54) {\n                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      wVar2 = (**(code **)(*(int *)this + 0x34))();\n      return wVar2;\n    }\n  }\n  return param_1;\n}" { (declaration "wchar_t *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "wchar_t wVar2;" type_identifier identifier ;) (expression_statement "pwVar1 = *(wchar_t **)(this + 0x14);" (assignment_expression "pwVar1 = *(wchar_t **)(this + 0x14)" identifier = (pointer_expression "*(wchar_t **)(this + 0x14)" * (cast_expression "(wchar_t **)(this + 0x14)" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x14)" ( (binary_expression "this + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (pwVar1 < *(wchar_t **)(this + 0x18)) {\n    *pwVar1 = param_1;\n    *(wchar_t **)(this + 0x14) = pwVar1 + 1;\n  }\n  else {\n    param_1 = L'\xffffffff';\n    if (*(code **)(*(int *)this + 0x34) != (code *)PTR_overflow_003a9d54) {\n                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      wVar2 = (**(code **)(*(int *)this + 0x34))();\n      return wVar2;\n    }\n  }" if (parenthesized_expression "(pwVar1 < *(wchar_t **)(this + 0x18))" ( (binary_expression "pwVar1 < *(wchar_t **)(this + 0x18)" identifier < (pointer_expression "*(wchar_t **)(this + 0x18)" * (cast_expression "(wchar_t **)(this + 0x18)" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x18)" ( (binary_expression "this + 0x18" identifier + number_literal) ))))) )) (compound_statement "{\n    *pwVar1 = param_1;\n    *(wchar_t **)(this + 0x14) = pwVar1 + 1;\n  }" { (expression_statement "*pwVar1 = param_1;" (assignment_expression "*pwVar1 = param_1" (pointer_expression "*pwVar1" * identifier) = identifier) ;) (expression_statement "*(wchar_t **)(this + 0x14) = pwVar1 + 1;" (assignment_expression "*(wchar_t **)(this + 0x14) = pwVar1 + 1" (pointer_expression "*(wchar_t **)(this + 0x14)" * (cast_expression "(wchar_t **)(this + 0x14)" ( (type_descriptor "wchar_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x14)" ( (binary_expression "this + 0x14" identifier + number_literal) )))) = (binary_expression "pwVar1 + 1" identifier + number_literal)) ;) }) (else_clause "else {\n    param_1 = L'\xffffffff';\n    if (*(code **)(*(int *)this + 0x34) != (code *)PTR_overflow_003a9d54) {\n                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      wVar2 = (**(code **)(*(int *)this + 0x34))();\n      return wVar2;\n    }\n  }" else (compound_statement "{\n    param_1 = L'\xffffffff';\n    if (*(code **)(*(int *)this + 0x34) != (code *)PTR_overflow_003a9d54) {\n                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      wVar2 = (**(code **)(*(int *)this + 0x34))();\n      return wVar2;\n    }\n  }" { (expression_statement "param_1 = L'\xffffffff';" (assignment_expression "param_1 = L'\xffffffff'" identifier = (char_literal "L'\xffffffff'" L' escape_sequence character character character character ')) ;) (if_statement "if (*(code **)(*(int *)this + 0x34) != (code *)PTR_overflow_003a9d54) {\n                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      wVar2 = (**(code **)(*(int *)this + 0x34))();\n      return wVar2;\n    }" if (parenthesized_expression "(*(code **)(*(int *)this + 0x34) != (code *)PTR_overflow_003a9d54)" ( (binary_expression "*(code **)(*(int *)this + 0x34) != (code *)PTR_overflow_003a9d54" (pointer_expression "*(code **)(*(int *)this + 0x34)" * (cast_expression "(code **)(*(int *)this + 0x34)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)this + 0x34)" ( (binary_expression "*(int *)this + 0x34" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) )))) != (cast_expression "(code *)PTR_overflow_003a9d54" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      wVar2 = (**(code **)(*(int *)this + 0x34))();\n      return wVar2;\n    }" { comment comment (expression_statement "wVar2 = (**(code **)(*(int *)this + 0x34))();" (assignment_expression "wVar2 = (**(code **)(*(int *)this + 0x34))()" identifier = (call_expression "(**(code **)(*(int *)this + 0x34))()" (parenthesized_expression "(**(code **)(*(int *)this + 0x34))" ( (pointer_expression "**(code **)(*(int *)this + 0x34)" * (pointer_expression "*(code **)(*(int *)this + 0x34)" * (cast_expression "(code **)(*(int *)this + 0x34)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)this + 0x34)" ( (binary_expression "*(int *)this + 0x34" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )) (argument_list "()" ( )))) ;) (return_statement "return wVar2;" return identifier ;) })) }))) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "undefined4 FUN_002090e0(int *param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  \n  puVar1 = (undefined4 *)param_1[5];\n  if (puVar1 < (undefined4 *)param_1[6]) {\n    *puVar1 = param_2;\n    param_1[5] = (int)(puVar1 + 1);\n  }\n  else {\n    param_2 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }\n  }\n  return param_2;\n}\n\n" (function_definition "undefined4 FUN_002090e0(int *param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  \n  puVar1 = (undefined4 *)param_1[5];\n  if (puVar1 < (undefined4 *)param_1[6]) {\n    *puVar1 = param_2;\n    param_1[5] = (int)(puVar1 + 1);\n  }\n  else {\n    param_2 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }\n  }\n  return param_2;\n}" type_identifier (function_declarator "FUN_002090e0(int *param_1,undefined4 param_2)" identifier (parameter_list "(int *param_1,undefined4 param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  \n  puVar1 = (undefined4 *)param_1[5];\n  if (puVar1 < (undefined4 *)param_1[6]) {\n    *puVar1 = param_2;\n    param_1[5] = (int)(puVar1 + 1);\n  }\n  else {\n    param_2 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }\n  }\n  return param_2;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "puVar1 = (undefined4 *)param_1[5];" (assignment_expression "puVar1 = (undefined4 *)param_1[5]" identifier = (cast_expression "(undefined4 *)param_1[5]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[5]" identifier [ number_literal ]))) ;) (if_statement "if (puVar1 < (undefined4 *)param_1[6]) {\n    *puVar1 = param_2;\n    param_1[5] = (int)(puVar1 + 1);\n  }\n  else {\n    param_2 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }\n  }" if (parenthesized_expression "(puVar1 < (undefined4 *)param_1[6])" ( (binary_expression "puVar1 < (undefined4 *)param_1[6]" identifier < (cast_expression "(undefined4 *)param_1[6]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[6]" identifier [ number_literal ]))) )) (compound_statement "{\n    *puVar1 = param_2;\n    param_1[5] = (int)(puVar1 + 1);\n  }" { (expression_statement "*puVar1 = param_2;" (assignment_expression "*puVar1 = param_2" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "param_1[5] = (int)(puVar1 + 1);" (assignment_expression "param_1[5] = (int)(puVar1 + 1)" (subscript_expression "param_1[5]" identifier [ number_literal ]) = (cast_expression "(int)(puVar1 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) )))) ;) }) (else_clause "else {\n    param_2 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }\n  }" else (compound_statement "{\n    param_2 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }\n  }" { (expression_statement "param_2 = 0xffffffff;" (assignment_expression "param_2 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }" if (parenthesized_expression "(*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54)" ( (binary_expression "*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54" (pointer_expression "*(code **)(*param_1 + 0x34)" * (cast_expression "(code **)(*param_1 + 0x34)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x34)" ( (binary_expression "*param_1 + 0x34" (pointer_expression "*param_1" * identifier) + number_literal) )))) != (cast_expression "(code *)PTR_FUN_003a9d54" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }" { (expression_statement "uVar2 = (**(code **)(*param_1 + 0x34))();" (assignment_expression "uVar2 = (**(code **)(*param_1 + 0x34))()" identifier = (call_expression "(**(code **)(*param_1 + 0x34))()" (parenthesized_expression "(**(code **)(*param_1 + 0x34))" ( (pointer_expression "**(code **)(*param_1 + 0x34)" * (pointer_expression "*(code **)(*param_1 + 0x34)" * (cast_expression "(code **)(*param_1 + 0x34)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x34)" ( (binary_expression "*param_1 + 0x34" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "()" ( )))) ;) (return_statement "return uVar2;" return identifier ;) })) }))) (return_statement "return param_2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (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 ( )))) ;) (return_statement return IDENT ;) })) }))) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_002090e0(int *param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  \n  puVar1 = (undefined4 *)param_1[5];\n  if (puVar1 < (undefined4 *)param_1[6]) {\n    *puVar1 = param_2;\n    param_1[5] = (int)(puVar1 + 1);\n  }\n  else {\n    param_2 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }\n  }\n  return param_2;\n}" (type_identifier "undefined4") (function_declarator "FUN_002090e0(int *param_1,undefined4 param_2)" (identifier "FUN_002090e0") (parameter_list "(int *param_1,undefined4 param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  \n  puVar1 = (undefined4 *)param_1[5];\n  if (puVar1 < (undefined4 *)param_1[6]) {\n    *puVar1 = param_2;\n    param_1[5] = (int)(puVar1 + 1);\n  }\n  else {\n    param_2 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }\n  }\n  return param_2;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (expression_statement "puVar1 = (undefined4 *)param_1[5];" (assignment_expression "puVar1 = (undefined4 *)param_1[5]" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)param_1[5]" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[5]" (identifier "param_1") ([ "[") (number_literal "5") (] "]")))) (; ";")) (if_statement "if (puVar1 < (undefined4 *)param_1[6]) {\n    *puVar1 = param_2;\n    param_1[5] = (int)(puVar1 + 1);\n  }\n  else {\n    param_2 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }\n  }" (if "if") (parenthesized_expression "(puVar1 < (undefined4 *)param_1[6])" (( "(") (binary_expression "puVar1 < (undefined4 *)param_1[6]" (identifier "puVar1") (< "<") (cast_expression "(undefined4 *)param_1[6]" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]")))) () ")")) (compound_statement "{\n    *puVar1 = param_2;\n    param_1[5] = (int)(puVar1 + 1);\n  }" ({ "{") (expression_statement "*puVar1 = param_2;" (assignment_expression "*puVar1 = param_2" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "param_1[5] = (int)(puVar1 + 1);" (assignment_expression "param_1[5] = (int)(puVar1 + 1)" (subscript_expression "param_1[5]" (identifier "param_1") ([ "[") (number_literal "5") (] "]")) (= "=") (cast_expression "(int)(puVar1 + 1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(puVar1 + 1)" (( "(") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1")) () ")")))) (; ";")) (} "}")) (else_clause "else {\n    param_2 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }\n  }" (else "else") (compound_statement "{\n    param_2 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }\n  }" ({ "{") (expression_statement "param_2 = 0xffffffff;" (assignment_expression "param_2 = 0xffffffff" (identifier "param_2") (= "=") (number_literal "0xffffffff")) (; ";")) (if_statement "if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }" (if "if") (parenthesized_expression "(*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54)" (( "(") (binary_expression "*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54" (pointer_expression "*(code **)(*param_1 + 0x34)" (* "*") (cast_expression "(code **)(*param_1 + 0x34)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_1 + 0x34)" (( "(") (binary_expression "*param_1 + 0x34" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x34")) () ")")))) (!= "!=") (cast_expression "(code *)PTR_FUN_003a9d54" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_003a9d54"))) () ")")) (compound_statement "{\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x34))();\n      return uVar2;\n    }" ({ "{") (expression_statement "uVar2 = (**(code **)(*param_1 + 0x34))();" (assignment_expression "uVar2 = (**(code **)(*param_1 + 0x34))()" (identifier "uVar2") (= "=") (call_expression "(**(code **)(*param_1 + 0x34))()" (parenthesized_expression "(**(code **)(*param_1 + 0x34))" (( "(") (pointer_expression "**(code **)(*param_1 + 0x34)" (* "*") (pointer_expression "*(code **)(*param_1 + 0x34)" (* "*") (cast_expression "(code **)(*param_1 + 0x34)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_1 + 0x34)" (( "(") (binary_expression "*param_1 + 0x34" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x34")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (} "}")))) (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::wstreambuf::sputc(wchar_t) */

type_1 __thiscall std::type_2::function_1(type_2 *var_1,type_1 param_1)

{
  type_1 *var_2;
  type_1 wVar2;
  
  var_2 = *(type_1 **)(var_1 + 0x14);
  if (var_2 < *(type_1 **)(var_1 + 0x18)) {
    *var_2 = param_1;
    *(type_1 **)(var_1 + 0x14) = var_2 + 1;
  }
  else {
    param_1 = L'\xffffffff';
    if (*(type_3 **)(*(int *)var_1 + 0x34) != (type_3 *)PTR_overflow_003a9d54) {
                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      wVar2 = (**(type_3 **)(*(int *)var_1 + 0x34))();
      return wVar2;
    }
  }
  return param_1;
}


(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))) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (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) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (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: (identifier) right: (number_literal))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (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)))) (return_statement (identifier))))))) (return_statement (identifier)))))

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

undefined4 MASKED(int *param_1,undefined4 param_2)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  
  puVar1 = (undefined4 *)param_1[5];
  if (puVar1 < (undefined4 *)param_1[6]) {
    *puVar1 = param_2;
    param_1[5] = (int)(puVar1 + 1);
  }
  else {
    param_2 = 0xffffffff;
    if (*(code **)(*param_1 + 0x34) != (code *)PTR_FUN_003a9d54) {
                    /* WARNING: Could not recover jumptable at 0x00209123. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      uVar2 = (**(code **)(*param_1 + 0x34))();
      return uVar2;
    }
  }
  return param_2;
}

