
/* std::wstring::find_last_of(wchar_t const*, unsigned int, unsigned int) const */

uint __thiscall std::wstring::find_last_of(wstring *this,wchar_t *param_1,uint param_2,uint param_3)

{
  uint uVar1;
  int iVar2;
  undefined4 uVar3;
  undefined4 *puVar4;
  
  if ((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)) {
    param_2 = 0xffffffff;
  }
  else {
    if (uVar1 <= param_2) {
      param_2 = uVar1;
    }
    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);
    do {
      uVar3 = *puVar4;
      puVar4 = puVar4 + -1;
      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);
      if (iVar2 != 0) {
        return param_2;
      }
      param_2 = param_2 - 1;
    } while (param_2 != 0xffffffff);
  }
  return param_2;
}



/* std::wstring::find_last_of(wchar_t const*, unsigned int, unsigned int) const */

uint __thiscall std::wstring::find_last_of(wstring *this,wchar_t *param_1,uint param_2,uint param_3)

{
  uint uVar1;
  int iVar2;
  undefined4 uVar3;
  undefined4 *puVar4;
  
  if ((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)) {
    param_2 = 0xffffffff;
  }
  else {
    if (uVar1 <= param_2) {
      param_2 = uVar1;
    }
    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);
    do {
      uVar3 = *puVar4;
      puVar4 = puVar4 + -1;
      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);
      if (iVar2 != 0) {
        return param_2;
      }
      param_2 = param_2 - 1;
    } while (param_2 != 0xffffffff);
  }
  return param_2;
}


lui gp,0x19
addiu gp,gp,0xb0
addu gp,gp,t9
addiu sp,sp,-0x30
lw v0,0x4(a0)
sw gp,0x10(sp)
sw ra,0x2c(sp)
sw s4,0x28(sp)
sw s3,0x24(sp)
sw s2,0x20(sp)
sw s1,0x1c(sp)
beq v0,zero,0x00339244
_sw s0,0x18(sp)
beq a3,zero,0x00339244
_addiu v0,v0,-0x1
lw s1,0x0(a0)
or s2,a3,zero
sltu s0,a2,v0
movz a2,v0,s0
or s3,a1,zero
li s4,-0x1
sll v0,a2,0x2
or s0,a2,zero
b 0x00339200
_addu s1,s1,v0
addiu s0,s0,-0x1
beq s0,s4,0x0033924c
_lw ra,0x2c(sp)
lw t9,-0x3530(gp)
or a2,s2,zero
lw a1,0x0(s1)
or a0,s3,zero
jalr t9
_addiu s1,s1,-0x4
beq v0,zero,0x003391f4
_lw gp,0x10(sp)
lw ra,0x2c(sp)
or v0,s0,zero
lw s4,0x28(sp)
lw s3,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x30
li s0,-0x1
lw ra,0x2c(sp)
or v0,s0,zero
lw s4,0x28(sp)
lw s3,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x30
(translation_unit "/* std::wstring::find_last_of(wchar_t const*, unsigned int, unsigned int) const */\n\nuint __thiscall std::wstring::find_last_of(wstring *this,wchar_t *param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  if ((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)) {\n    param_2 = 0xffffffff;\n  }\n  else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }\n  return param_2;\n}\n\n" comment (function_definition "uint __thiscall std::wstring::find_last_of(wstring *this,wchar_t *param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  if ((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)) {\n    param_2 = 0xffffffff;\n  }\n  else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }\n  return param_2;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wstring::" identifier : : identifier : :) (function_declarator "find_last_of(wstring *this,wchar_t *param_1,uint param_2,uint param_3)" identifier (parameter_list "(wstring *this,wchar_t *param_1,uint param_2,uint param_3)" ( (parameter_declaration "wstring *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "wchar_t *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  if ((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)) {\n    param_2 = 0xffffffff;\n  }\n  else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }\n  return param_2;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (if_statement "if ((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)) {\n    param_2 = 0xffffffff;\n  }\n  else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }" if (parenthesized_expression "((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0))" ( (binary_expression "(*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)" (parenthesized_expression "(*(int *)(this + 4) == 0)" ( (binary_expression "*(int *)(this + 4) == 0" (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) == number_literal) )) || (parenthesized_expression "(uVar1 = *(int *)(this + 4) - 1, param_3 == 0)" ( (comma_expression "uVar1 = *(int *)(this + 4) - 1, param_3 == 0" (assignment_expression "uVar1 = *(int *)(this + 4) - 1" identifier = (binary_expression "*(int *)(this + 4) - 1" (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) - number_literal)) , (binary_expression "param_3 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    param_2 = 0xffffffff;\n  }" { (expression_statement "param_2 = 0xffffffff;" (assignment_expression "param_2 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }" else (compound_statement "{\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }" { (if_statement "if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }" if (parenthesized_expression "(uVar1 <= param_2)" ( (binary_expression "uVar1 <= param_2" identifier <= identifier) )) (compound_statement "{\n      param_2 = uVar1;\n    }" { (expression_statement "param_2 = uVar1;" (assignment_expression "param_2 = uVar1" identifier = identifier) ;) })) (expression_statement "puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);" (assignment_expression "puVar4 = (undefined4 *)(*(int *)this + param_2 * 4)" identifier = (cast_expression "(undefined4 *)(*(int *)this + param_2 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + param_2 * 4)" ( (binary_expression "*(int *)this + param_2 * 4" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + (binary_expression "param_2 * 4" identifier * number_literal)) )))) ;) (do_statement "do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);" do (compound_statement "{\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    }" { (expression_statement "uVar3 = *puVar4;" (assignment_expression "uVar3 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) (expression_statement "puVar4 = puVar4 + -1;" (assignment_expression "puVar4 = puVar4 + -1" identifier = (binary_expression "puVar4 + -1" identifier + number_literal)) ;) (expression_statement "iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);" (assignment_expression "iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3)" identifier = (call_expression "(*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3)" (parenthesized_expression "(*(code *)PTR_wmemchr_004c5d10)" ( (pointer_expression "*(code *)PTR_wmemchr_004c5d10" * (cast_expression "(code *)PTR_wmemchr_004c5d10" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,uVar3,param_3)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n        return param_2;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        return param_2;\n      }" { (return_statement "return param_2;" return identifier ;) })) (expression_statement "param_2 = param_2 - 1;" (assignment_expression "param_2 = param_2 - 1" identifier = (binary_expression "param_2 - 1" identifier - number_literal)) ;) }) while (parenthesized_expression "(param_2 != 0xffffffff)" ( (binary_expression "param_2 != 0xffffffff" identifier != number_literal) )) ;) }))) (return_statement "return param_2;" return identifier ;) })))
(translation_unit "/* std::wstring::find_last_of(wchar_t const*, unsigned int, unsigned int) const */\n\nuint __thiscall std::wstring::find_last_of(wstring *this,wchar_t *param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  if ((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)) {\n    param_2 = 0xffffffff;\n  }\n  else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }\n  return param_2;\n}\n\n" comment (function_definition "uint __thiscall std::wstring::find_last_of(wstring *this,wchar_t *param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  if ((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)) {\n    param_2 = 0xffffffff;\n  }\n  else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }\n  return param_2;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wstring::" identifier : : identifier : :) (function_declarator "find_last_of(wstring *this,wchar_t *param_1,uint param_2,uint param_3)" identifier (parameter_list "(wstring *this,wchar_t *param_1,uint param_2,uint param_3)" ( (parameter_declaration "wstring *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "wchar_t *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  if ((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)) {\n    param_2 = 0xffffffff;\n  }\n  else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }\n  return param_2;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (if_statement "if ((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)) {\n    param_2 = 0xffffffff;\n  }\n  else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }" if (parenthesized_expression "((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0))" ( (binary_expression "(*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)" (parenthesized_expression "(*(int *)(this + 4) == 0)" ( (binary_expression "*(int *)(this + 4) == 0" (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) == number_literal) )) || (parenthesized_expression "(uVar1 = *(int *)(this + 4) - 1, param_3 == 0)" ( (comma_expression "uVar1 = *(int *)(this + 4) - 1, param_3 == 0" (assignment_expression "uVar1 = *(int *)(this + 4) - 1" identifier = (binary_expression "*(int *)(this + 4) - 1" (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) - number_literal)) , (binary_expression "param_3 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    param_2 = 0xffffffff;\n  }" { (expression_statement "param_2 = 0xffffffff;" (assignment_expression "param_2 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }" else (compound_statement "{\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }" { (if_statement "if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }" if (parenthesized_expression "(uVar1 <= param_2)" ( (binary_expression "uVar1 <= param_2" identifier <= identifier) )) (compound_statement "{\n      param_2 = uVar1;\n    }" { (expression_statement "param_2 = uVar1;" (assignment_expression "param_2 = uVar1" identifier = identifier) ;) })) (expression_statement "puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);" (assignment_expression "puVar4 = (undefined4 *)(*(int *)this + param_2 * 4)" identifier = (cast_expression "(undefined4 *)(*(int *)this + param_2 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + param_2 * 4)" ( (binary_expression "*(int *)this + param_2 * 4" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + (binary_expression "param_2 * 4" identifier * number_literal)) )))) ;) (do_statement "do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);" do (compound_statement "{\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    }" { (expression_statement "uVar3 = *puVar4;" (assignment_expression "uVar3 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) (expression_statement "puVar4 = puVar4 + -1;" (assignment_expression "puVar4 = puVar4 + -1" identifier = (binary_expression "puVar4 + -1" identifier + number_literal)) ;) (expression_statement "iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);" (assignment_expression "iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3)" identifier = (call_expression "(*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3)" (parenthesized_expression "(*(code *)PTR_wmemchr_004c5d10)" ( (pointer_expression "*(code *)PTR_wmemchr_004c5d10" * (cast_expression "(code *)PTR_wmemchr_004c5d10" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,uVar3,param_3)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n        return param_2;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        return param_2;\n      }" { (return_statement "return param_2;" return identifier ;) })) (expression_statement "param_2 = param_2 - 1;" (assignment_expression "param_2 = param_2 - 1" identifier = (binary_expression "param_2 - 1" identifier - number_literal)) ;) }) while (parenthesized_expression "(param_2 != 0xffffffff)" ( (binary_expression "param_2 != 0xffffffff" identifier != number_literal) )) ;) }))) (return_statement "return param_2;" return identifier ;) })))
(translation_unit "uint __thiscall std::wstring::find_last_of(wstring *this,wchar_t *param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  if ((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)) {\n    param_2 = 0xffffffff;\n  }\n  else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }\n  return param_2;\n}\n\n" (function_definition "uint __thiscall std::wstring::find_last_of(wstring *this,wchar_t *param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  if ((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)) {\n    param_2 = 0xffffffff;\n  }\n  else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }\n  return param_2;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wstring::" identifier : : identifier : :) (function_declarator "find_last_of(wstring *this,wchar_t *param_1,uint param_2,uint param_3)" identifier (parameter_list "(wstring *this,wchar_t *param_1,uint param_2,uint param_3)" ( (parameter_declaration "wstring *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "wchar_t *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  if ((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)) {\n    param_2 = 0xffffffff;\n  }\n  else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }\n  return param_2;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (if_statement "if ((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)) {\n    param_2 = 0xffffffff;\n  }\n  else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }" if (parenthesized_expression "((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0))" ( (binary_expression "(*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)" (parenthesized_expression "(*(int *)(this + 4) == 0)" ( (binary_expression "*(int *)(this + 4) == 0" (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) == number_literal) )) || (parenthesized_expression "(uVar1 = *(int *)(this + 4) - 1, param_3 == 0)" ( (comma_expression "uVar1 = *(int *)(this + 4) - 1, param_3 == 0" (assignment_expression "uVar1 = *(int *)(this + 4) - 1" identifier = (binary_expression "*(int *)(this + 4) - 1" (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) - number_literal)) , (binary_expression "param_3 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n    param_2 = 0xffffffff;\n  }" { (expression_statement "param_2 = 0xffffffff;" (assignment_expression "param_2 = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }" else (compound_statement "{\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }" { (if_statement "if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }" if (parenthesized_expression "(uVar1 <= param_2)" ( (binary_expression "uVar1 <= param_2" identifier <= identifier) )) (compound_statement "{\n      param_2 = uVar1;\n    }" { (expression_statement "param_2 = uVar1;" (assignment_expression "param_2 = uVar1" identifier = identifier) ;) })) (expression_statement "puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);" (assignment_expression "puVar4 = (undefined4 *)(*(int *)this + param_2 * 4)" identifier = (cast_expression "(undefined4 *)(*(int *)this + param_2 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + param_2 * 4)" ( (binary_expression "*(int *)this + param_2 * 4" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + (binary_expression "param_2 * 4" identifier * number_literal)) )))) ;) (do_statement "do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);" do (compound_statement "{\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    }" { (expression_statement "uVar3 = *puVar4;" (assignment_expression "uVar3 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) (expression_statement "puVar4 = puVar4 + -1;" (assignment_expression "puVar4 = puVar4 + -1" identifier = (binary_expression "puVar4 + -1" identifier + number_literal)) ;) (expression_statement "iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);" (assignment_expression "iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3)" identifier = (call_expression "(*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3)" (parenthesized_expression "(*(code *)PTR_wmemchr_004c5d10)" ( (pointer_expression "*(code *)PTR_wmemchr_004c5d10" * (cast_expression "(code *)PTR_wmemchr_004c5d10" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,uVar3,param_3)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n        return param_2;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        return param_2;\n      }" { (return_statement "return param_2;" return identifier ;) })) (expression_statement "param_2 = param_2 - 1;" (assignment_expression "param_2 = param_2 - 1" identifier = (binary_expression "param_2 - 1" identifier - number_literal)) ;) }) while (parenthesized_expression "(param_2 != 0xffffffff)" ( (binary_expression "param_2 != 0xffffffff" identifier != number_literal) )) ;) }))) (return_statement "return param_2;" return identifier ;) })))
(translation_unit (function_definition TYPE (ms_call_modifier __thiscall) (ERROR IDENT : : IDENT : :) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (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 = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) - LIT)) , (binary_expression IDENT == LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) + (binary_expression IDENT * LIT)) )))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) }))) (return_statement return IDENT ;) })))
(function_definition "uint __thiscall std::wstring::find_last_of(wstring *this,wchar_t *param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  if ((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)) {\n    param_2 = 0xffffffff;\n  }\n  else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }\n  return param_2;\n}" (type_identifier "uint") (ms_call_modifier "__thiscall" (__thiscall "__thiscall")) (ERROR "std::wstring::" (identifier "std") (: ":") (: ":") (identifier "wstring") (: ":") (: ":")) (function_declarator "find_last_of(wstring *this,wchar_t *param_1,uint param_2,uint param_3)" (identifier "find_last_of") (parameter_list "(wstring *this,wchar_t *param_1,uint param_2,uint param_3)" (( "(") (parameter_declaration "wstring *this" (type_identifier "wstring") (pointer_declarator "*this" (* "*") (identifier "this"))) (, ",") (parameter_declaration "wchar_t *param_1" (type_identifier "wchar_t") (pointer_declarator "*param_1" (* "*") (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  uint uVar1;\n  int iVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  if ((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)) {\n    param_2 = 0xffffffff;\n  }\n  else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }\n  return param_2;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (if_statement "if ((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)) {\n    param_2 = 0xffffffff;\n  }\n  else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }" (if "if") (parenthesized_expression "((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0))" (( "(") (binary_expression "(*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)" (parenthesized_expression "(*(int *)(this + 4) == 0)" (( "(") (binary_expression "*(int *)(this + 4) == 0" (pointer_expression "*(int *)(this + 4)" (* "*") (cast_expression "(int *)(this + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 4)" (( "(") (binary_expression "this + 4" (identifier "this") (+ "+") (number_literal "4")) () ")")))) (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(uVar1 = *(int *)(this + 4) - 1, param_3 == 0)" (( "(") (comma_expression "uVar1 = *(int *)(this + 4) - 1, param_3 == 0" (assignment_expression "uVar1 = *(int *)(this + 4) - 1" (identifier "uVar1") (= "=") (binary_expression "*(int *)(this + 4) - 1" (pointer_expression "*(int *)(this + 4)" (* "*") (cast_expression "(int *)(this + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 4)" (( "(") (binary_expression "this + 4" (identifier "this") (+ "+") (number_literal "4")) () ")")))) (- "-") (number_literal "1"))) (, ",") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    param_2 = 0xffffffff;\n  }" ({ "{") (expression_statement "param_2 = 0xffffffff;" (assignment_expression "param_2 = 0xffffffff" (identifier "param_2") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")) (else_clause "else {\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }" (else "else") (compound_statement "{\n    if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }\n    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);\n    do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);\n  }" ({ "{") (if_statement "if (uVar1 <= param_2) {\n      param_2 = uVar1;\n    }" (if "if") (parenthesized_expression "(uVar1 <= param_2)" (( "(") (binary_expression "uVar1 <= param_2" (identifier "uVar1") (<= "<=") (identifier "param_2")) () ")")) (compound_statement "{\n      param_2 = uVar1;\n    }" ({ "{") (expression_statement "param_2 = uVar1;" (assignment_expression "param_2 = uVar1" (identifier "param_2") (= "=") (identifier "uVar1")) (; ";")) (} "}"))) (expression_statement "puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);" (assignment_expression "puVar4 = (undefined4 *)(*(int *)this + param_2 * 4)" (identifier "puVar4") (= "=") (cast_expression "(undefined4 *)(*(int *)this + param_2 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)this + param_2 * 4)" (( "(") (binary_expression "*(int *)this + param_2 * 4" (pointer_expression "*(int *)this" (* "*") (cast_expression "(int *)this" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "this"))) (+ "+") (binary_expression "param_2 * 4" (identifier "param_2") (* "*") (number_literal "4"))) () ")")))) (; ";")) (do_statement "do {\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    } while (param_2 != 0xffffffff);" (do "do") (compound_statement "{\n      uVar3 = *puVar4;\n      puVar4 = puVar4 + -1;\n      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);\n      if (iVar2 != 0) {\n        return param_2;\n      }\n      param_2 = param_2 - 1;\n    }" ({ "{") (expression_statement "uVar3 = *puVar4;" (assignment_expression "uVar3 = *puVar4" (identifier "uVar3") (= "=") (pointer_expression "*puVar4" (* "*") (identifier "puVar4"))) (; ";")) (expression_statement "puVar4 = puVar4 + -1;" (assignment_expression "puVar4 = puVar4 + -1" (identifier "puVar4") (= "=") (binary_expression "puVar4 + -1" (identifier "puVar4") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);" (assignment_expression "iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3)" (parenthesized_expression "(*(code *)PTR_wmemchr_004c5d10)" (( "(") (pointer_expression "*(code *)PTR_wmemchr_004c5d10" (* "*") (cast_expression "(code *)PTR_wmemchr_004c5d10" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_wmemchr_004c5d10"))) () ")")) (argument_list "(param_1,uVar3,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "uVar3") (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n        return param_2;\n      }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        return param_2;\n      }" ({ "{") (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}"))) (expression_statement "param_2 = param_2 - 1;" (assignment_expression "param_2 = param_2 - 1" (identifier "param_2") (= "=") (binary_expression "param_2 - 1" (identifier "param_2") (- "-") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_2 != 0xffffffff)" (( "(") (binary_expression "param_2 != 0xffffffff" (identifier "param_2") (!= "!=") (number_literal "0xffffffff")) () ")")) (; ";")) (} "}")))) (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) (ms_call_modifier) (ERROR (identifier) (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator 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: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (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: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_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: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) 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: (identifier))) right: (binary_expression left: (identifier) right: (number_literal))))))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (return_statement (identifier)))))

/* std::wstring::MASKED(wchar_t const*, unsigned int, unsigned int) const */

uint __thiscall std::wstring::MASKED(wstring *this,wchar_t *param_1,uint param_2,uint param_3)

{
  uint uVar1;
  int iVar2;
  undefined4 uVar3;
  undefined4 *puVar4;
  
  if ((*(int *)(this + 4) == 0) || (uVar1 = *(int *)(this + 4) - 1, param_3 == 0)) {
    param_2 = 0xffffffff;
  }
  else {
    if (uVar1 <= param_2) {
      param_2 = uVar1;
    }
    puVar4 = (undefined4 *)(*(int *)this + param_2 * 4);
    do {
      uVar3 = *puVar4;
      puVar4 = puVar4 + -1;
      iVar2 = (*(code *)PTR_wmemchr_004c5d10)(param_1,uVar3,param_3);
      if (iVar2 != 0) {
        return param_2;
      }
      param_2 = param_2 - 1;
    } while (param_2 != 0xffffffff);
  }
  return param_2;
}

