
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::locale::_Impl::_M_replace_facet(std::locale::_Impl const*, std::locale::id const*) */

void __thiscall std::locale::_Impl::_M_replace_facet(_Impl *this,_Impl *param_1,id *param_2)

{
  facet *pfVar1;
  uint uVar2;
  
  uVar2 = locale::id::_M_id(param_2);
  if ((uVar2 <= *(int *)(param_1 + 8) - 1U) &&
     (pfVar1 = *(facet **)(*(int *)(param_1 + 4) + uVar2 * 4), pfVar1 != (facet *)0x0)) {
    _M_install_facet(this,param_2,pfVar1);
    return;
  }
                    /* WARNING: Subroutine does not return */
  __throw_runtime_error("locale::_Impl::_M_replace_facet");
}



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

void FUN_001e9ba0(undefined4 param_1,int param_2,undefined4 param_3)

{
  int iVar1;
  uint uVar2;
  
  uVar2 = FUN_001e9740(param_3);
  if ((uVar2 <= *(int *)(param_2 + 8) - 1U) &&
     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)) {
    FUN_001e9790(param_1,param_3,iVar1);
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0022c8d0("locale::_Impl::_M_replace_facet");
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV ESI,dword ptr [ESP + 0x18]
CALL 0x00035840
ADD EBX,0x1a5454
MOV EDI,dword ptr [ESP + 0x14]
SUB ESP,0xc
PUSH ESI
CALL 0x001e9740
MOV ECX,dword ptr [EDI + 0x8]
ADD ESP,0x10
LEA EDX,[ECX + -0x1]
CMP EDX,EAX
JC 0x001e9beb
MOV EDX,dword ptr [EDI + 0x4]
MOV EAX,dword ptr [EDX + EAX*0x4]
TEST EAX,EAX
JZ 0x001e9beb
SUB ESP,0x4
PUSH EAX
PUSH ESI
PUSH dword ptr [ESP + 0x1c]
CALL 0x001e9790
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0xc
LEA EAX,[EBX + 0xfff14c74]
PUSH EAX
CALL 0x0022c8d0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_001e9ba0(undefined4 param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = FUN_001e9740(param_3);\n  if ((uVar2 <= *(int *)(param_2 + 8) - 1U) &&\n     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)) {\n    FUN_001e9790(param_1,param_3,iVar1);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c8d0("locale::_Impl::_M_replace_facet");\n}\n\n" comment (function_definition "void FUN_001e9ba0(undefined4 param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = FUN_001e9740(param_3);\n  if ((uVar2 <= *(int *)(param_2 + 8) - 1U) &&\n     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)) {\n    FUN_001e9790(param_1,param_3,iVar1);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c8d0("locale::_Impl::_M_replace_facet");\n}" primitive_type (function_declarator "FUN_001e9ba0(undefined4 param_1,int param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,int param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = FUN_001e9740(param_3);\n  if ((uVar2 <= *(int *)(param_2 + 8) - 1U) &&\n     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)) {\n    FUN_001e9790(param_1,param_3,iVar1);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c8d0("locale::_Impl::_M_replace_facet");\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = FUN_001e9740(param_3);" (assignment_expression "uVar2 = FUN_001e9740(param_3)" identifier = (call_expression "FUN_001e9740(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (if_statement "if ((uVar2 <= *(int *)(param_2 + 8) - 1U) &&\n     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)) {\n    FUN_001e9790(param_1,param_3,iVar1);\n    return;\n  }" if (parenthesized_expression "((uVar2 <= *(int *)(param_2 + 8) - 1U) &&\n     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0))" ( (binary_expression "(uVar2 <= *(int *)(param_2 + 8) - 1U) &&\n     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)" (parenthesized_expression "(uVar2 <= *(int *)(param_2 + 8) - 1U)" ( (binary_expression "uVar2 <= *(int *)(param_2 + 8) - 1U" identifier <= (binary_expression "*(int *)(param_2 + 8) - 1U" (pointer_expression "*(int *)(param_2 + 8)" * (cast_expression "(int *)(param_2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) - number_literal)) )) && (parenthesized_expression "(iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)" ( (comma_expression "iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0" (assignment_expression "iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4)" identifier = (pointer_expression "*(int *)(*(int *)(param_2 + 4) + uVar2 * 4)" * (cast_expression "(int *)(*(int *)(param_2 + 4) + uVar2 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_2 + 4) + uVar2 * 4)" ( (binary_expression "*(int *)(param_2 + 4) + uVar2 * 4" (pointer_expression "*(int *)(param_2 + 4)" * (cast_expression "(int *)(param_2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) + (binary_expression "uVar2 * 4" identifier * number_literal)) ))))) , (binary_expression "iVar1 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    FUN_001e9790(param_1,param_3,iVar1);\n    return;\n  }" { (expression_statement "FUN_001e9790(param_1,param_3,iVar1);" (call_expression "FUN_001e9790(param_1,param_3,iVar1)" identifier (argument_list "(param_1,param_3,iVar1)" ( identifier , identifier , identifier ))) ;) (return_statement "return;" return ;) })) comment (expression_statement "FUN_0022c8d0("locale::_Impl::_M_replace_facet");" (call_expression "FUN_0022c8d0("locale::_Impl::_M_replace_facet")" identifier (argument_list "("locale::_Impl::_M_replace_facet")" ( (string_literal ""locale::_Impl::_M_replace_facet"" " string_content ") ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::locale::_Impl::_M_replace_facet(std::locale::_Impl const*, std::locale::id const*) */\n\nvoid __thiscall std::locale::_Impl::_M_replace_facet(_Impl *this,_Impl *param_1,id *param_2)\n\n{\n  facet *pfVar1;\n  uint uVar2;\n  \n  uVar2 = locale::id::_M_id(param_2);\n  if ((uVar2 <= *(int *)(param_1 + 8) - 1U) &&\n     (pfVar1 = *(facet **)(*(int *)(param_1 + 4) + uVar2 * 4), pfVar1 != (facet *)0x0)) {\n    _M_install_facet(this,param_2,pfVar1);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_runtime_error("locale::_Impl::_M_replace_facet");\n}\n\n" comment comment (function_definition "void __thiscall std::locale::_Impl::_M_replace_facet(_Impl *this,_Impl *param_1,id *param_2)\n\n{\n  facet *pfVar1;\n  uint uVar2;\n  \n  uVar2 = locale::id::_M_id(param_2);\n  if ((uVar2 <= *(int *)(param_1 + 8) - 1U) &&\n     (pfVar1 = *(facet **)(*(int *)(param_1 + 4) + uVar2 * 4), pfVar1 != (facet *)0x0)) {\n    _M_install_facet(this,param_2,pfVar1);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_runtime_error("locale::_Impl::_M_replace_facet");\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::locale::_Impl::" identifier : : identifier : : identifier : :) (function_declarator "_M_replace_facet(_Impl *this,_Impl *param_1,id *param_2)" identifier (parameter_list "(_Impl *this,_Impl *param_1,id *param_2)" ( (parameter_declaration "_Impl *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "_Impl *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "id *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  facet *pfVar1;\n  uint uVar2;\n  \n  uVar2 = locale::id::_M_id(param_2);\n  if ((uVar2 <= *(int *)(param_1 + 8) - 1U) &&\n     (pfVar1 = *(facet **)(*(int *)(param_1 + 4) + uVar2 * 4), pfVar1 != (facet *)0x0)) {\n    _M_install_facet(this,param_2,pfVar1);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_runtime_error("locale::_Impl::_M_replace_facet");\n}" { (declaration "facet *pfVar1;" type_identifier (pointer_declarator "*pfVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (ERROR "uVar2 = locale::" (assignment_expression "uVar2 = locale" identifier = identifier) : :) (labeled_statement "id::_M_id(param_2);" statement_identifier : (ERROR ":" :) (expression_statement "_M_id(param_2);" (call_expression "_M_id(param_2)" identifier (argument_list "(param_2)" ( identifier ))) ;)) (if_statement "if ((uVar2 <= *(int *)(param_1 + 8) - 1U) &&\n     (pfVar1 = *(facet **)(*(int *)(param_1 + 4) + uVar2 * 4), pfVar1 != (facet *)0x0)) {\n    _M_install_facet(this,param_2,pfVar1);\n    return;\n  }" if (parenthesized_expression "((uVar2 <= *(int *)(param_1 + 8) - 1U) &&\n     (pfVar1 = *(facet **)(*(int *)(param_1 + 4) + uVar2 * 4), pfVar1 != (facet *)0x0))" ( (binary_expression "(uVar2 <= *(int *)(param_1 + 8) - 1U) &&\n     (pfVar1 = *(facet **)(*(int *)(param_1 + 4) + uVar2 * 4), pfVar1 != (facet *)0x0)" (parenthesized_expression "(uVar2 <= *(int *)(param_1 + 8) - 1U)" ( (binary_expression "uVar2 <= *(int *)(param_1 + 8) - 1U" identifier <= (binary_expression "*(int *)(param_1 + 8) - 1U" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) - number_literal)) )) && (parenthesized_expression "(pfVar1 = *(facet **)(*(int *)(param_1 + 4) + uVar2 * 4), pfVar1 != (facet *)0x0)" ( (comma_expression "pfVar1 = *(facet **)(*(int *)(param_1 + 4) + uVar2 * 4), pfVar1 != (facet *)0x0" (assignment_expression "pfVar1 = *(facet **)(*(int *)(param_1 + 4) + uVar2 * 4)" identifier = (pointer_expression "*(facet **)(*(int *)(param_1 + 4) + uVar2 * 4)" * (cast_expression "(facet **)(*(int *)(param_1 + 4) + uVar2 * 4)" ( (type_descriptor "facet **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(param_1 + 4) + uVar2 * 4)" ( (binary_expression "*(int *)(param_1 + 4) + uVar2 * 4" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) + (binary_expression "uVar2 * 4" identifier * number_literal)) ))))) , (binary_expression "pfVar1 != (facet *)0x0" identifier != (cast_expression "(facet *)0x0" ( (type_descriptor "facet *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (compound_statement "{\n    _M_install_facet(this,param_2,pfVar1);\n    return;\n  }" { (expression_statement "_M_install_facet(this,param_2,pfVar1);" (call_expression "_M_install_facet(this,param_2,pfVar1)" identifier (argument_list "(this,param_2,pfVar1)" ( identifier , identifier , identifier ))) ;) (return_statement "return;" return ;) })) comment (expression_statement "__throw_runtime_error("locale::_Impl::_M_replace_facet");" (call_expression "__throw_runtime_error("locale::_Impl::_M_replace_facet")" identifier (argument_list "("locale::_Impl::_M_replace_facet")" ( (string_literal ""locale::_Impl::_M_replace_facet"" " string_content ") ))) ;) })))
(translation_unit "void FUN_001e9ba0(undefined4 param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = FUN_001e9740(param_3);\n  if ((uVar2 <= *(int *)(param_2 + 8) - 1U) &&\n     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)) {\n    FUN_001e9790(param_1,param_3,iVar1);\n    return;\n  }\n                    \n  FUN_0022c8d0("locale::_Impl::_M_replace_facet");\n}\n\n" (function_definition "void FUN_001e9ba0(undefined4 param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = FUN_001e9740(param_3);\n  if ((uVar2 <= *(int *)(param_2 + 8) - 1U) &&\n     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)) {\n    FUN_001e9790(param_1,param_3,iVar1);\n    return;\n  }\n                    \n  FUN_0022c8d0("locale::_Impl::_M_replace_facet");\n}" primitive_type (function_declarator "FUN_001e9ba0(undefined4 param_1,int param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,int param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = FUN_001e9740(param_3);\n  if ((uVar2 <= *(int *)(param_2 + 8) - 1U) &&\n     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)) {\n    FUN_001e9790(param_1,param_3,iVar1);\n    return;\n  }\n                    \n  FUN_0022c8d0("locale::_Impl::_M_replace_facet");\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = FUN_001e9740(param_3);" (assignment_expression "uVar2 = FUN_001e9740(param_3)" identifier = (call_expression "FUN_001e9740(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (if_statement "if ((uVar2 <= *(int *)(param_2 + 8) - 1U) &&\n     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)) {\n    FUN_001e9790(param_1,param_3,iVar1);\n    return;\n  }" if (parenthesized_expression "((uVar2 <= *(int *)(param_2 + 8) - 1U) &&\n     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0))" ( (binary_expression "(uVar2 <= *(int *)(param_2 + 8) - 1U) &&\n     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)" (parenthesized_expression "(uVar2 <= *(int *)(param_2 + 8) - 1U)" ( (binary_expression "uVar2 <= *(int *)(param_2 + 8) - 1U" identifier <= (binary_expression "*(int *)(param_2 + 8) - 1U" (pointer_expression "*(int *)(param_2 + 8)" * (cast_expression "(int *)(param_2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) - number_literal)) )) && (parenthesized_expression "(iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)" ( (comma_expression "iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0" (assignment_expression "iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4)" identifier = (pointer_expression "*(int *)(*(int *)(param_2 + 4) + uVar2 * 4)" * (cast_expression "(int *)(*(int *)(param_2 + 4) + uVar2 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_2 + 4) + uVar2 * 4)" ( (binary_expression "*(int *)(param_2 + 4) + uVar2 * 4" (pointer_expression "*(int *)(param_2 + 4)" * (cast_expression "(int *)(param_2 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) + (binary_expression "uVar2 * 4" identifier * number_literal)) ))))) , (binary_expression "iVar1 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    FUN_001e9790(param_1,param_3,iVar1);\n    return;\n  }" { (expression_statement "FUN_001e9790(param_1,param_3,iVar1);" (call_expression "FUN_001e9790(param_1,param_3,iVar1)" identifier (argument_list "(param_1,param_3,iVar1)" ( identifier , identifier , identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_0022c8d0("locale::_Impl::_M_replace_facet");" (call_expression "FUN_0022c8d0("locale::_Impl::_M_replace_facet")" identifier (argument_list "("locale::_Impl::_M_replace_facet")" ( (string_literal ""locale::_Impl::_M_replace_facet"" " string_content ") ))) ;) })))
(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 IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT <= (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) - LIT)) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (binary_expression IDENT * LIT)) ))))) , (binary_expression IDENT != LIT)) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") ))) ;) })))
(function_definition "void FUN_001e9ba0(undefined4 param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = FUN_001e9740(param_3);\n  if ((uVar2 <= *(int *)(param_2 + 8) - 1U) &&\n     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)) {\n    FUN_001e9790(param_1,param_3,iVar1);\n    return;\n  }\n                    \n  FUN_0022c8d0("locale::_Impl::_M_replace_facet");\n}" (primitive_type "void") (function_declarator "FUN_001e9ba0(undefined4 param_1,int param_2,undefined4 param_3)" (identifier "FUN_001e9ba0") (parameter_list "(undefined4 param_1,int param_2,undefined4 param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  uVar2 = FUN_001e9740(param_3);\n  if ((uVar2 <= *(int *)(param_2 + 8) - 1U) &&\n     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)) {\n    FUN_001e9790(param_1,param_3,iVar1);\n    return;\n  }\n                    \n  FUN_0022c8d0("locale::_Impl::_M_replace_facet");\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (expression_statement "uVar2 = FUN_001e9740(param_3);" (assignment_expression "uVar2 = FUN_001e9740(param_3)" (identifier "uVar2") (= "=") (call_expression "FUN_001e9740(param_3)" (identifier "FUN_001e9740") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")")))) (; ";")) (if_statement "if ((uVar2 <= *(int *)(param_2 + 8) - 1U) &&\n     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)) {\n    FUN_001e9790(param_1,param_3,iVar1);\n    return;\n  }" (if "if") (parenthesized_expression "((uVar2 <= *(int *)(param_2 + 8) - 1U) &&\n     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0))" (( "(") (binary_expression "(uVar2 <= *(int *)(param_2 + 8) - 1U) &&\n     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)" (parenthesized_expression "(uVar2 <= *(int *)(param_2 + 8) - 1U)" (( "(") (binary_expression "uVar2 <= *(int *)(param_2 + 8) - 1U" (identifier "uVar2") (<= "<=") (binary_expression "*(int *)(param_2 + 8) - 1U" (pointer_expression "*(int *)(param_2 + 8)" (* "*") (cast_expression "(int *)(param_2 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (- "-") (number_literal "1U"))) () ")")) (&& "&&") (parenthesized_expression "(iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)" (( "(") (comma_expression "iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0" (assignment_expression "iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(*(int *)(param_2 + 4) + uVar2 * 4)" (* "*") (cast_expression "(int *)(*(int *)(param_2 + 4) + uVar2 * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_2 + 4) + uVar2 * 4)" (( "(") (binary_expression "*(int *)(param_2 + 4) + uVar2 * 4" (pointer_expression "*(int *)(param_2 + 4)" (* "*") (cast_expression "(int *)(param_2 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 4)" (( "(") (binary_expression "param_2 + 4" (identifier "param_2") (+ "+") (number_literal "4")) () ")")))) (+ "+") (binary_expression "uVar2 * 4" (identifier "uVar2") (* "*") (number_literal "4"))) () ")"))))) (, ",") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    FUN_001e9790(param_1,param_3,iVar1);\n    return;\n  }" ({ "{") (expression_statement "FUN_001e9790(param_1,param_3,iVar1);" (call_expression "FUN_001e9790(param_1,param_3,iVar1)" (identifier "FUN_001e9790") (argument_list "(param_1,param_3,iVar1)" (( "(") (identifier "param_1") (, ",") (identifier "param_3") (, ",") (identifier "iVar1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0022c8d0("locale::_Impl::_M_replace_facet");" (call_expression "FUN_0022c8d0("locale::_Impl::_M_replace_facet")" (identifier "FUN_0022c8d0") (argument_list "("locale::_Impl::_M_replace_facet")" (( "(") (string_literal ""locale::_Impl::_M_replace_facet"" (" """) (string_content "locale::_Impl::_M_replace_facet") (" """)) () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::locale::_Impl::_M_replace_facet(std::locale::_Impl const*, std::locale::id const*) */

void __thiscall std::locale::type_1::function_1(type_1 *this,type_1 *var_3,type_2 *param_2)

{
  type_3 *var_4;
  type_4 var_2;
  
  var_2 = locale::id::var_1(param_2);
  if ((var_2 <= *(int *)(var_3 + 8) - 1U) &&
     (var_4 = *(type_3 **)(*(int *)(var_3 + 4) + var_2 * 4), var_4 != (type_3 *)0x0)) {
    var_5(this,param_2,var_4);
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_6("locale::_Impl::_M_replace_facet");
}


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

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

void MASKED(undefined4 param_1,int param_2,undefined4 param_3)

{
  int iVar1;
  uint uVar2;
  
  uVar2 = FUN_001e9740(param_3);
  if ((uVar2 <= *(int *)(param_2 + 8) - 1U) &&
     (iVar1 = *(int *)(*(int *)(param_2 + 4) + uVar2 * 4), iVar1 != 0)) {
    FUN_001e9790(param_1,param_3,iVar1);
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0022c8d0("locale::_Impl::_M_replace_facet");
}

