
/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */
/* std::ios::narrow(char, char) const */

uint __thiscall std::ios::narrow(ios *this,char param_1,char param_2)

{
  byte bVar1;
  int *piVar2;
  uint uVar3;
  uint uVar4;
  undefined3 in_stack_00000009;
  undefined3 in_stack_0000000d;
  
  piVar2 = *(int **)(this + 0x7c);
  if (piVar2 != (int *)0x0) {
    uVar3 = (uint)(byte)param_1;
    bVar1 = *(byte *)((int)piVar2 + uVar3 + 0x11d);
    uVar4 = (uint)bVar1;
    if (bVar1 == 0) {
      if (*(code **)(*piVar2 + 0x20) != (code *)PTR_do_narrow_0033edb4) {
        _param_1 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)param_1,(int)param_2);
      }
      uVar4 = _param_2;
      if (param_2 != (char)_param_1) {
        *(char *)((int)piVar2 + uVar3 + 0x11d) = (char)_param_1;
        uVar4 = _param_1;
      }
    }
    return uVar4;
  }
                    /* WARNING: Subroutine does not return */
  __throw_bad_cast();
}



uint FUN_001d6560(int param_1,uint param_2,uint param_3)

{
  byte bVar1;
  int *piVar2;
  uint uVar3;
  int unaff_EBP;
  uint uVar4;
  
  FUN_00058c4e();
  piVar2 = *(int **)(param_1 + 0x7c);
  if (piVar2 != (int *)0x0) {
    uVar4 = param_2 & 0xff;
    bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);
    uVar3 = (uint)bVar1;
    if (bVar1 == 0) {
      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {
        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);
      }
      uVar3 = param_3;
      if ((char)param_3 != (char)param_2) {
        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;
        uVar3 = param_2;
      }
    }
    return uVar3;
  }
                    /* WARNING: Subroutine does not return */
  FUN_001f1cf0();
}


PUSH EBP
CALL 0x00058c4e
ADD EBP,0x168a9a
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0xc
MOV EAX,dword ptr [ESP + 0x20]
MOV EDX,dword ptr [ESP + 0x24]
MOV EBX,dword ptr [ESP + 0x28]
MOV ESI,dword ptr [EAX + 0x7c]
TEST ESI,ESI
JZ 0x001d65d5
MOVZX EDI,DL
MOVZX EAX,byte ptr [ESI + EDI*0x1 + 0x11d]
TEST AL,AL
JNZ 0x001d65b2
MOV EAX,dword ptr [ESI]
MOV ECX,EDX
MOV EAX,dword ptr [EAX + 0x20]
CMP EAX,dword ptr [EBP + 0xfffffdb4]
JNZ 0x001d65c0
MOV EAX,EBX
CMP BL,CL
JZ 0x001d65b2
MOV byte ptr [ESI + EDI*0x1 + 0x11d],CL
MOV EAX,ECX
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
MOVSX ECX,BL
MOVSX EDX,DL
PUSH ECX
PUSH EDX
PUSH ESI
CALL EAX
MOV ECX,EAX
ADD ESP,0x10
JMP 0x001d65a3
MOV EBX,EBP
CALL 0x001f1cf0
(translation_unit "uint FUN_001d6560(int param_1,uint param_2,uint param_3)\n\n{\n  byte bVar1;\n  int *piVar2;\n  uint uVar3;\n  int unaff_EBP;\n  uint uVar4;\n  \n  FUN_00058c4e();\n  piVar2 = *(int **)(param_1 + 0x7c);\n  if (piVar2 != (int *)0x0) {\n    uVar4 = param_2 & 0xff;\n    bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);\n    uVar3 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }\n    return uVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_001f1cf0();\n}\n\n" (function_definition "uint FUN_001d6560(int param_1,uint param_2,uint param_3)\n\n{\n  byte bVar1;\n  int *piVar2;\n  uint uVar3;\n  int unaff_EBP;\n  uint uVar4;\n  \n  FUN_00058c4e();\n  piVar2 = *(int **)(param_1 + 0x7c);\n  if (piVar2 != (int *)0x0) {\n    uVar4 = param_2 & 0xff;\n    bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);\n    uVar3 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }\n    return uVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_001f1cf0();\n}" type_identifier (function_declarator "FUN_001d6560(int param_1,uint param_2,uint param_3)" identifier (parameter_list "(int param_1,uint param_2,uint param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  byte bVar1;\n  int *piVar2;\n  uint uVar3;\n  int unaff_EBP;\n  uint uVar4;\n  \n  FUN_00058c4e();\n  piVar2 = *(int **)(param_1 + 0x7c);\n  if (piVar2 != (int *)0x0) {\n    uVar4 = param_2 & 0xff;\n    bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);\n    uVar3 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }\n    return uVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_001f1cf0();\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int unaff_EBP;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "FUN_00058c4e();" (call_expression "FUN_00058c4e()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar2 = *(int **)(param_1 + 0x7c);" (assignment_expression "piVar2 = *(int **)(param_1 + 0x7c)" identifier = (pointer_expression "*(int **)(param_1 + 0x7c)" * (cast_expression "(int **)(param_1 + 0x7c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x7c)" ( (binary_expression "param_1 + 0x7c" identifier + number_literal) ))))) ;) (if_statement "if (piVar2 != (int *)0x0) {\n    uVar4 = param_2 & 0xff;\n    bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);\n    uVar3 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }\n    return uVar3;\n  }" if (parenthesized_expression "(piVar2 != (int *)0x0)" ( (binary_expression "piVar2 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar4 = param_2 & 0xff;\n    bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);\n    uVar3 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }\n    return uVar3;\n  }" { (expression_statement "uVar4 = param_2 & 0xff;" (assignment_expression "uVar4 = param_2 & 0xff" identifier = (binary_expression "param_2 & 0xff" identifier & number_literal)) ;) (expression_statement "bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);" (assignment_expression "bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d)" identifier = (pointer_expression "*(byte *)((int)piVar2 + uVar4 + 0x11d)" * (cast_expression "(byte *)((int)piVar2 + uVar4 + 0x11d)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar2 + uVar4 + 0x11d)" ( (binary_expression "(int)piVar2 + uVar4 + 0x11d" (binary_expression "(int)piVar2 + uVar4" (cast_expression "(int)piVar2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) ))))) ;) (expression_statement "uVar3 = (uint)bVar1;" (assignment_expression "uVar3 = (uint)bVar1" identifier = (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }" if (parenthesized_expression "(bVar1 == 0)" ( (binary_expression "bVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }" { (if_statement "if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }" if (parenthesized_expression "(*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e))" ( (binary_expression "*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)" (pointer_expression "*(code **)(*piVar2 + 0x20)" * (cast_expression "(code **)(*piVar2 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar2 + 0x20)" ( (binary_expression "*piVar2 + 0x20" (pointer_expression "*piVar2" * identifier) + number_literal) )))) != (pointer_expression "*(code **)(unaff_EBP + 0x16884e)" * (cast_expression "(code **)(unaff_EBP + 0x16884e)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBP + 0x16884e)" ( (binary_expression "unaff_EBP + 0x16884e" identifier + number_literal) ))))) )) (compound_statement "{\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }" { (expression_statement "param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);" (assignment_expression "param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3)" identifier = (call_expression "(**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3)" (parenthesized_expression "(**(code **)(*piVar2 + 0x20))" ( (pointer_expression "**(code **)(*piVar2 + 0x20)" * (pointer_expression "*(code **)(*piVar2 + 0x20)" * (cast_expression "(code **)(*piVar2 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar2 + 0x20)" ( (binary_expression "*piVar2 + 0x20" (pointer_expression "*piVar2" * identifier) + number_literal) ))))) )) (argument_list "(piVar2,(int)(char)param_2,(int)(char)param_3)" ( identifier , (cast_expression "(int)(char)param_2" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)param_2" ( (type_descriptor "char" primitive_type) ) identifier)) , (cast_expression "(int)(char)param_3" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)param_3" ( (type_descriptor "char" primitive_type) ) identifier)) )))) ;) })) (expression_statement "uVar3 = param_3;" (assignment_expression "uVar3 = param_3" identifier = identifier) ;) (if_statement "if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }" if (parenthesized_expression "((char)param_3 != (char)param_2)" ( (binary_expression "(char)param_3 != (char)param_2" (cast_expression "(char)param_3" ( (type_descriptor "char" primitive_type) ) identifier) != (cast_expression "(char)param_2" ( (type_descriptor "char" primitive_type) ) identifier)) )) (compound_statement "{\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }" { (expression_statement "*(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;" (assignment_expression "*(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2" (pointer_expression "*(char *)((int)piVar2 + uVar4 + 0x11d)" * (cast_expression "(char *)((int)piVar2 + uVar4 + 0x11d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar2 + uVar4 + 0x11d)" ( (binary_expression "(int)piVar2 + uVar4 + 0x11d" (binary_expression "(int)piVar2 + uVar4" (cast_expression "(int)piVar2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) = (cast_expression "(char)param_2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "uVar3 = param_2;" (assignment_expression "uVar3 = param_2" identifier = identifier) ;) })) })) (return_statement "return uVar3;" return identifier ;) })) comment (expression_statement "FUN_001f1cf0();" (call_expression "FUN_001f1cf0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */\n/* std::ios::narrow(char, char) const */\n\nuint __thiscall std::ios::narrow(ios *this,char param_1,char param_2)\n\n{\n  byte bVar1;\n  int *piVar2;\n  uint uVar3;\n  uint uVar4;\n  undefined3 in_stack_00000009;\n  undefined3 in_stack_0000000d;\n  \n  piVar2 = *(int **)(this + 0x7c);\n  if (piVar2 != (int *)0x0) {\n    uVar3 = (uint)(byte)param_1;\n    bVar1 = *(byte *)((int)piVar2 + uVar3 + 0x11d);\n    uVar4 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != (code *)PTR_do_narrow_0033edb4) {\n        _param_1 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)param_1,(int)param_2);\n      }\n      uVar4 = _param_2;\n      if (param_2 != (char)_param_1) {\n        *(char *)((int)piVar2 + uVar3 + 0x11d) = (char)_param_1;\n        uVar4 = _param_1;\n      }\n    }\n    return uVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_bad_cast();\n}\n\n" comment comment (function_definition "uint __thiscall std::ios::narrow(ios *this,char param_1,char param_2)\n\n{\n  byte bVar1;\n  int *piVar2;\n  uint uVar3;\n  uint uVar4;\n  undefined3 in_stack_00000009;\n  undefined3 in_stack_0000000d;\n  \n  piVar2 = *(int **)(this + 0x7c);\n  if (piVar2 != (int *)0x0) {\n    uVar3 = (uint)(byte)param_1;\n    bVar1 = *(byte *)((int)piVar2 + uVar3 + 0x11d);\n    uVar4 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != (code *)PTR_do_narrow_0033edb4) {\n        _param_1 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)param_1,(int)param_2);\n      }\n      uVar4 = _param_2;\n      if (param_2 != (char)_param_1) {\n        *(char *)((int)piVar2 + uVar3 + 0x11d) = (char)_param_1;\n        uVar4 = _param_1;\n      }\n    }\n    return uVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_bad_cast();\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::ios::" identifier : : identifier : :) (function_declarator "narrow(ios *this,char param_1,char param_2)" identifier (parameter_list "(ios *this,char param_1,char param_2)" ( (parameter_declaration "ios *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "char param_1" primitive_type identifier) , (parameter_declaration "char param_2" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  int *piVar2;\n  uint uVar3;\n  uint uVar4;\n  undefined3 in_stack_00000009;\n  undefined3 in_stack_0000000d;\n  \n  piVar2 = *(int **)(this + 0x7c);\n  if (piVar2 != (int *)0x0) {\n    uVar3 = (uint)(byte)param_1;\n    bVar1 = *(byte *)((int)piVar2 + uVar3 + 0x11d);\n    uVar4 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != (code *)PTR_do_narrow_0033edb4) {\n        _param_1 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)param_1,(int)param_2);\n      }\n      uVar4 = _param_2;\n      if (param_2 != (char)_param_1) {\n        *(char *)((int)piVar2 + uVar3 + 0x11d) = (char)_param_1;\n        uVar4 = _param_1;\n      }\n    }\n    return uVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_bad_cast();\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "undefined3 in_stack_00000009;" type_identifier identifier ;) (declaration "undefined3 in_stack_0000000d;" type_identifier identifier ;) (expression_statement "piVar2 = *(int **)(this + 0x7c);" (assignment_expression "piVar2 = *(int **)(this + 0x7c)" identifier = (pointer_expression "*(int **)(this + 0x7c)" * (cast_expression "(int **)(this + 0x7c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x7c)" ( (binary_expression "this + 0x7c" identifier + number_literal) ))))) ;) (if_statement "if (piVar2 != (int *)0x0) {\n    uVar3 = (uint)(byte)param_1;\n    bVar1 = *(byte *)((int)piVar2 + uVar3 + 0x11d);\n    uVar4 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != (code *)PTR_do_narrow_0033edb4) {\n        _param_1 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)param_1,(int)param_2);\n      }\n      uVar4 = _param_2;\n      if (param_2 != (char)_param_1) {\n        *(char *)((int)piVar2 + uVar3 + 0x11d) = (char)_param_1;\n        uVar4 = _param_1;\n      }\n    }\n    return uVar4;\n  }" if (parenthesized_expression "(piVar2 != (int *)0x0)" ( (binary_expression "piVar2 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar3 = (uint)(byte)param_1;\n    bVar1 = *(byte *)((int)piVar2 + uVar3 + 0x11d);\n    uVar4 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != (code *)PTR_do_narrow_0033edb4) {\n        _param_1 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)param_1,(int)param_2);\n      }\n      uVar4 = _param_2;\n      if (param_2 != (char)_param_1) {\n        *(char *)((int)piVar2 + uVar3 + 0x11d) = (char)_param_1;\n        uVar4 = _param_1;\n      }\n    }\n    return uVar4;\n  }" { (expression_statement "uVar3 = (uint)(byte)param_1;" (assignment_expression "uVar3 = (uint)(byte)param_1" identifier = (cast_expression "(uint)(byte)param_1" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(byte)param_1" ( (type_descriptor "byte" type_identifier) ) identifier))) ;) (expression_statement "bVar1 = *(byte *)((int)piVar2 + uVar3 + 0x11d);" (assignment_expression "bVar1 = *(byte *)((int)piVar2 + uVar3 + 0x11d)" identifier = (pointer_expression "*(byte *)((int)piVar2 + uVar3 + 0x11d)" * (cast_expression "(byte *)((int)piVar2 + uVar3 + 0x11d)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar2 + uVar3 + 0x11d)" ( (binary_expression "(int)piVar2 + uVar3 + 0x11d" (binary_expression "(int)piVar2 + uVar3" (cast_expression "(int)piVar2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) ))))) ;) (expression_statement "uVar4 = (uint)bVar1;" (assignment_expression "uVar4 = (uint)bVar1" identifier = (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != (code *)PTR_do_narrow_0033edb4) {\n        _param_1 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)param_1,(int)param_2);\n      }\n      uVar4 = _param_2;\n      if (param_2 != (char)_param_1) {\n        *(char *)((int)piVar2 + uVar3 + 0x11d) = (char)_param_1;\n        uVar4 = _param_1;\n      }\n    }" if (parenthesized_expression "(bVar1 == 0)" ( (binary_expression "bVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      if (*(code **)(*piVar2 + 0x20) != (code *)PTR_do_narrow_0033edb4) {\n        _param_1 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)param_1,(int)param_2);\n      }\n      uVar4 = _param_2;\n      if (param_2 != (char)_param_1) {\n        *(char *)((int)piVar2 + uVar3 + 0x11d) = (char)_param_1;\n        uVar4 = _param_1;\n      }\n    }" { (if_statement "if (*(code **)(*piVar2 + 0x20) != (code *)PTR_do_narrow_0033edb4) {\n        _param_1 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)param_1,(int)param_2);\n      }" if (parenthesized_expression "(*(code **)(*piVar2 + 0x20) != (code *)PTR_do_narrow_0033edb4)" ( (binary_expression "*(code **)(*piVar2 + 0x20) != (code *)PTR_do_narrow_0033edb4" (pointer_expression "*(code **)(*piVar2 + 0x20)" * (cast_expression "(code **)(*piVar2 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar2 + 0x20)" ( (binary_expression "*piVar2 + 0x20" (pointer_expression "*piVar2" * identifier) + number_literal) )))) != (cast_expression "(code *)PTR_do_narrow_0033edb4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n        _param_1 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)param_1,(int)param_2);\n      }" { (expression_statement "_param_1 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)param_1,(int)param_2);" (assignment_expression "_param_1 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)param_1,(int)param_2)" identifier = (call_expression "(**(code **)(*piVar2 + 0x20))(piVar2,(int)param_1,(int)param_2)" (parenthesized_expression "(**(code **)(*piVar2 + 0x20))" ( (pointer_expression "**(code **)(*piVar2 + 0x20)" * (pointer_expression "*(code **)(*piVar2 + 0x20)" * (cast_expression "(code **)(*piVar2 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar2 + 0x20)" ( (binary_expression "*piVar2 + 0x20" (pointer_expression "*piVar2" * identifier) + number_literal) ))))) )) (argument_list "(piVar2,(int)param_1,(int)param_2)" ( identifier , (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) , (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) )))) ;) })) (expression_statement "uVar4 = _param_2;" (assignment_expression "uVar4 = _param_2" identifier = identifier) ;) (if_statement "if (param_2 != (char)_param_1) {\n        *(char *)((int)piVar2 + uVar3 + 0x11d) = (char)_param_1;\n        uVar4 = _param_1;\n      }" if (parenthesized_expression "(param_2 != (char)_param_1)" ( (binary_expression "param_2 != (char)_param_1" identifier != (cast_expression "(char)_param_1" ( (type_descriptor "char" primitive_type) ) identifier)) )) (compound_statement "{\n        *(char *)((int)piVar2 + uVar3 + 0x11d) = (char)_param_1;\n        uVar4 = _param_1;\n      }" { (expression_statement "*(char *)((int)piVar2 + uVar3 + 0x11d) = (char)_param_1;" (assignment_expression "*(char *)((int)piVar2 + uVar3 + 0x11d) = (char)_param_1" (pointer_expression "*(char *)((int)piVar2 + uVar3 + 0x11d)" * (cast_expression "(char *)((int)piVar2 + uVar3 + 0x11d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar2 + uVar3 + 0x11d)" ( (binary_expression "(int)piVar2 + uVar3 + 0x11d" (binary_expression "(int)piVar2 + uVar3" (cast_expression "(int)piVar2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) = (cast_expression "(char)_param_1" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "uVar4 = _param_1;" (assignment_expression "uVar4 = _param_1" identifier = identifier) ;) })) })) (return_statement "return uVar4;" return identifier ;) })) comment (expression_statement "__throw_bad_cast();" (call_expression "__throw_bad_cast()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "uint FUN_001d6560(int param_1,uint param_2,uint param_3)\n\n{\n  byte bVar1;\n  int *piVar2;\n  uint uVar3;\n  int unaff_EBP;\n  uint uVar4;\n  \n  FUN_00058c4e();\n  piVar2 = *(int **)(param_1 + 0x7c);\n  if (piVar2 != (int *)0x0) {\n    uVar4 = param_2 & 0xff;\n    bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);\n    uVar3 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }\n    return uVar3;\n  }\n                    \n  FUN_001f1cf0();\n}\n\n" (function_definition "uint FUN_001d6560(int param_1,uint param_2,uint param_3)\n\n{\n  byte bVar1;\n  int *piVar2;\n  uint uVar3;\n  int unaff_EBP;\n  uint uVar4;\n  \n  FUN_00058c4e();\n  piVar2 = *(int **)(param_1 + 0x7c);\n  if (piVar2 != (int *)0x0) {\n    uVar4 = param_2 & 0xff;\n    bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);\n    uVar3 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }\n    return uVar3;\n  }\n                    \n  FUN_001f1cf0();\n}" type_identifier (function_declarator "FUN_001d6560(int param_1,uint param_2,uint param_3)" identifier (parameter_list "(int param_1,uint param_2,uint param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  byte bVar1;\n  int *piVar2;\n  uint uVar3;\n  int unaff_EBP;\n  uint uVar4;\n  \n  FUN_00058c4e();\n  piVar2 = *(int **)(param_1 + 0x7c);\n  if (piVar2 != (int *)0x0) {\n    uVar4 = param_2 & 0xff;\n    bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);\n    uVar3 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }\n    return uVar3;\n  }\n                    \n  FUN_001f1cf0();\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int unaff_EBP;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "FUN_00058c4e();" (call_expression "FUN_00058c4e()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar2 = *(int **)(param_1 + 0x7c);" (assignment_expression "piVar2 = *(int **)(param_1 + 0x7c)" identifier = (pointer_expression "*(int **)(param_1 + 0x7c)" * (cast_expression "(int **)(param_1 + 0x7c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x7c)" ( (binary_expression "param_1 + 0x7c" identifier + number_literal) ))))) ;) (if_statement "if (piVar2 != (int *)0x0) {\n    uVar4 = param_2 & 0xff;\n    bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);\n    uVar3 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }\n    return uVar3;\n  }" if (parenthesized_expression "(piVar2 != (int *)0x0)" ( (binary_expression "piVar2 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar4 = param_2 & 0xff;\n    bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);\n    uVar3 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }\n    return uVar3;\n  }" { (expression_statement "uVar4 = param_2 & 0xff;" (assignment_expression "uVar4 = param_2 & 0xff" identifier = (binary_expression "param_2 & 0xff" identifier & number_literal)) ;) (expression_statement "bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);" (assignment_expression "bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d)" identifier = (pointer_expression "*(byte *)((int)piVar2 + uVar4 + 0x11d)" * (cast_expression "(byte *)((int)piVar2 + uVar4 + 0x11d)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar2 + uVar4 + 0x11d)" ( (binary_expression "(int)piVar2 + uVar4 + 0x11d" (binary_expression "(int)piVar2 + uVar4" (cast_expression "(int)piVar2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) ))))) ;) (expression_statement "uVar3 = (uint)bVar1;" (assignment_expression "uVar3 = (uint)bVar1" identifier = (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier)) ;) (if_statement "if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }" if (parenthesized_expression "(bVar1 == 0)" ( (binary_expression "bVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }" { (if_statement "if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }" if (parenthesized_expression "(*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e))" ( (binary_expression "*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)" (pointer_expression "*(code **)(*piVar2 + 0x20)" * (cast_expression "(code **)(*piVar2 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar2 + 0x20)" ( (binary_expression "*piVar2 + 0x20" (pointer_expression "*piVar2" * identifier) + number_literal) )))) != (pointer_expression "*(code **)(unaff_EBP + 0x16884e)" * (cast_expression "(code **)(unaff_EBP + 0x16884e)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBP + 0x16884e)" ( (binary_expression "unaff_EBP + 0x16884e" identifier + number_literal) ))))) )) (compound_statement "{\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }" { (expression_statement "param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);" (assignment_expression "param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3)" identifier = (call_expression "(**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3)" (parenthesized_expression "(**(code **)(*piVar2 + 0x20))" ( (pointer_expression "**(code **)(*piVar2 + 0x20)" * (pointer_expression "*(code **)(*piVar2 + 0x20)" * (cast_expression "(code **)(*piVar2 + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar2 + 0x20)" ( (binary_expression "*piVar2 + 0x20" (pointer_expression "*piVar2" * identifier) + number_literal) ))))) )) (argument_list "(piVar2,(int)(char)param_2,(int)(char)param_3)" ( identifier , (cast_expression "(int)(char)param_2" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)param_2" ( (type_descriptor "char" primitive_type) ) identifier)) , (cast_expression "(int)(char)param_3" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)param_3" ( (type_descriptor "char" primitive_type) ) identifier)) )))) ;) })) (expression_statement "uVar3 = param_3;" (assignment_expression "uVar3 = param_3" identifier = identifier) ;) (if_statement "if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }" if (parenthesized_expression "((char)param_3 != (char)param_2)" ( (binary_expression "(char)param_3 != (char)param_2" (cast_expression "(char)param_3" ( (type_descriptor "char" primitive_type) ) identifier) != (cast_expression "(char)param_2" ( (type_descriptor "char" primitive_type) ) identifier)) )) (compound_statement "{\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }" { (expression_statement "*(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;" (assignment_expression "*(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2" (pointer_expression "*(char *)((int)piVar2 + uVar4 + 0x11d)" * (cast_expression "(char *)((int)piVar2 + uVar4 + 0x11d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar2 + uVar4 + 0x11d)" ( (binary_expression "(int)piVar2 + uVar4 + 0x11d" (binary_expression "(int)piVar2 + uVar4" (cast_expression "(int)piVar2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + number_literal) )))) = (cast_expression "(char)param_2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "uVar3 = param_2;" (assignment_expression "uVar3 = param_2" identifier = identifier) ;) })) })) (return_statement "return uVar3;" return identifier ;) })) (expression_statement "FUN_001f1cf0();" (call_expression "FUN_001f1cf0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (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) )))) != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (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 , (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) , (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) != (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) })) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "uint FUN_001d6560(int param_1,uint param_2,uint param_3)\n\n{\n  byte bVar1;\n  int *piVar2;\n  uint uVar3;\n  int unaff_EBP;\n  uint uVar4;\n  \n  FUN_00058c4e();\n  piVar2 = *(int **)(param_1 + 0x7c);\n  if (piVar2 != (int *)0x0) {\n    uVar4 = param_2 & 0xff;\n    bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);\n    uVar3 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }\n    return uVar3;\n  }\n                    \n  FUN_001f1cf0();\n}" (type_identifier "uint") (function_declarator "FUN_001d6560(int param_1,uint param_2,uint param_3)" (identifier "FUN_001d6560") (parameter_list "(int param_1,uint param_2,uint param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) () ")"))) (compound_statement "{\n  byte bVar1;\n  int *piVar2;\n  uint uVar3;\n  int unaff_EBP;\n  uint uVar4;\n  \n  FUN_00058c4e();\n  piVar2 = *(int **)(param_1 + 0x7c);\n  if (piVar2 != (int *)0x0) {\n    uVar4 = param_2 & 0xff;\n    bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);\n    uVar3 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }\n    return uVar3;\n  }\n                    \n  FUN_001f1cf0();\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "int unaff_EBP;" (primitive_type "int") (identifier "unaff_EBP") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (expression_statement "FUN_00058c4e();" (call_expression "FUN_00058c4e()" (identifier "FUN_00058c4e") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar2 = *(int **)(param_1 + 0x7c);" (assignment_expression "piVar2 = *(int **)(param_1 + 0x7c)" (identifier "piVar2") (= "=") (pointer_expression "*(int **)(param_1 + 0x7c)" (* "*") (cast_expression "(int **)(param_1 + 0x7c)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x7c)" (( "(") (binary_expression "param_1 + 0x7c" (identifier "param_1") (+ "+") (number_literal "0x7c")) () ")"))))) (; ";")) (if_statement "if (piVar2 != (int *)0x0) {\n    uVar4 = param_2 & 0xff;\n    bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);\n    uVar3 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }\n    return uVar3;\n  }" (if "if") (parenthesized_expression "(piVar2 != (int *)0x0)" (( "(") (binary_expression "piVar2 != (int *)0x0" (identifier "piVar2") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    uVar4 = param_2 & 0xff;\n    bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);\n    uVar3 = (uint)bVar1;\n    if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }\n    return uVar3;\n  }" ({ "{") (expression_statement "uVar4 = param_2 & 0xff;" (assignment_expression "uVar4 = param_2 & 0xff" (identifier "uVar4") (= "=") (binary_expression "param_2 & 0xff" (identifier "param_2") (& "&") (number_literal "0xff"))) (; ";")) (expression_statement "bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);" (assignment_expression "bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d)" (identifier "bVar1") (= "=") (pointer_expression "*(byte *)((int)piVar2 + uVar4 + 0x11d)" (* "*") (cast_expression "(byte *)((int)piVar2 + uVar4 + 0x11d)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)piVar2 + uVar4 + 0x11d)" (( "(") (binary_expression "(int)piVar2 + uVar4 + 0x11d" (binary_expression "(int)piVar2 + uVar4" (cast_expression "(int)piVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar2")) (+ "+") (identifier "uVar4")) (+ "+") (number_literal "0x11d")) () ")"))))) (; ";")) (expression_statement "uVar3 = (uint)bVar1;" (assignment_expression "uVar3 = (uint)bVar1" (identifier "uVar3") (= "=") (cast_expression "(uint)bVar1" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar1"))) (; ";")) (if_statement "if (bVar1 == 0) {\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }" (if "if") (parenthesized_expression "(bVar1 == 0)" (( "(") (binary_expression "bVar1 == 0" (identifier "bVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }\n      uVar3 = param_3;\n      if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }\n    }" ({ "{") (if_statement "if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }" (if "if") (parenthesized_expression "(*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e))" (( "(") (binary_expression "*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)" (pointer_expression "*(code **)(*piVar2 + 0x20)" (* "*") (cast_expression "(code **)(*piVar2 + 0x20)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar2 + 0x20)" (( "(") (binary_expression "*piVar2 + 0x20" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (+ "+") (number_literal "0x20")) () ")")))) (!= "!=") (pointer_expression "*(code **)(unaff_EBP + 0x16884e)" (* "*") (cast_expression "(code **)(unaff_EBP + 0x16884e)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(unaff_EBP + 0x16884e)" (( "(") (binary_expression "unaff_EBP + 0x16884e" (identifier "unaff_EBP") (+ "+") (number_literal "0x16884e")) () ")"))))) () ")")) (compound_statement "{\n        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);\n      }" ({ "{") (expression_statement "param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);" (assignment_expression "param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3)" (identifier "param_2") (= "=") (call_expression "(**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3)" (parenthesized_expression "(**(code **)(*piVar2 + 0x20))" (( "(") (pointer_expression "**(code **)(*piVar2 + 0x20)" (* "*") (pointer_expression "*(code **)(*piVar2 + 0x20)" (* "*") (cast_expression "(code **)(*piVar2 + 0x20)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar2 + 0x20)" (( "(") (binary_expression "*piVar2 + 0x20" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (+ "+") (number_literal "0x20")) () ")"))))) () ")")) (argument_list "(piVar2,(int)(char)param_2,(int)(char)param_3)" (( "(") (identifier "piVar2") (, ",") (cast_expression "(int)(char)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(char)param_2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "param_2"))) (, ",") (cast_expression "(int)(char)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(char)param_3" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "param_3"))) () ")")))) (; ";")) (} "}"))) (expression_statement "uVar3 = param_3;" (assignment_expression "uVar3 = param_3" (identifier "uVar3") (= "=") (identifier "param_3")) (; ";")) (if_statement "if ((char)param_3 != (char)param_2) {\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }" (if "if") (parenthesized_expression "((char)param_3 != (char)param_2)" (( "(") (binary_expression "(char)param_3 != (char)param_2" (cast_expression "(char)param_3" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "param_3")) (!= "!=") (cast_expression "(char)param_2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "param_2"))) () ")")) (compound_statement "{\n        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;\n        uVar3 = param_2;\n      }" ({ "{") (expression_statement "*(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;" (assignment_expression "*(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2" (pointer_expression "*(char *)((int)piVar2 + uVar4 + 0x11d)" (* "*") (cast_expression "(char *)((int)piVar2 + uVar4 + 0x11d)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)piVar2 + uVar4 + 0x11d)" (( "(") (binary_expression "(int)piVar2 + uVar4 + 0x11d" (binary_expression "(int)piVar2 + uVar4" (cast_expression "(int)piVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar2")) (+ "+") (identifier "uVar4")) (+ "+") (number_literal "0x11d")) () ")")))) (= "=") (cast_expression "(char)param_2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "param_2"))) (; ";")) (expression_statement "uVar3 = param_2;" (assignment_expression "uVar3 = param_2" (identifier "uVar3") (= "=") (identifier "param_2")) (; ";")) (} "}"))) (} "}"))) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (expression_statement "FUN_001f1cf0();" (call_expression "FUN_001f1cf0()" (identifier "FUN_001f1cf0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */
/* std::ios::narrow(char, char) const */

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

{
  type_3 var_4;
  int *var_2;
  type_1 var_3;
  type_1 uVar4;
  type_4 in_stack_00000009;
  type_4 in_stack_0000000d;
  
  var_2 = *(int **)(var_1 + 0x7c);
  if (var_2 != (int *)0x0) {
    var_3 = (type_1)(type_3)param_1;
    var_4 = *(type_3 *)((int)var_2 + var_3 + 0x11d);
    uVar4 = (type_1)var_4;
    if (var_4 == 0) {
      if (*(type_5 **)(*var_2 + 0x20) != (type_5 *)PTR_do_narrow_0033edb4) {
        _param_1 = (**(type_5 **)(*var_2 + 0x20))(var_2,(int)param_1,(int)var_5);
      }
      uVar4 = _param_2;
      if (var_5 != (char)_param_1) {
        *(char *)((int)var_2 + var_3 + 0x11d) = (char)_param_1;
        uVar4 = _param_1;
      }
    }
    return uVar4;
  }
                    /* WARNING: Subroutine does not return */
  var_6();
}


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

uint MASKED(int param_1,uint param_2,uint param_3)

{
  byte bVar1;
  int *piVar2;
  uint uVar3;
  int unaff_EBP;
  uint uVar4;
  
  FUN_00058c4e();
  piVar2 = *(int **)(param_1 + 0x7c);
  if (piVar2 != (int *)0x0) {
    uVar4 = param_2 & 0xff;
    bVar1 = *(byte *)((int)piVar2 + uVar4 + 0x11d);
    uVar3 = (uint)bVar1;
    if (bVar1 == 0) {
      if (*(code **)(*piVar2 + 0x20) != *(code **)(unaff_EBP + 0x16884e)) {
        param_2 = (**(code **)(*piVar2 + 0x20))(piVar2,(int)(char)param_2,(int)(char)param_3);
      }
      uVar3 = param_3;
      if ((char)param_3 != (char)param_2) {
        *(char *)((int)piVar2 + uVar4 + 0x11d) = (char)param_2;
        uVar3 = param_2;
      }
    }
    return uVar3;
  }
                    /* WARNING: Subroutine does not return */
  FUN_001f1cf0();
}

