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

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

{
  int iVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  int iVar5;
  int iVar6;
  undefined4 uVar7;
  
  iVar6 = *(int *)this;
  uVar4 = *(uint *)(iVar6 + -0xc);
  if (param_3 == 0) {
    if (uVar4 < param_2) {
      param_2 = 0xffffffff;
    }
    return param_2;
  }
  if ((param_2 < uVar4) && (param_3 <= uVar4 - param_2)) {
    if ((1 - param_3) + (uVar4 - param_2) != 0) {
      uVar7 = *(undefined4 *)param_1;
      iVar5 = iVar6 + param_2 * 4;
      do {
        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);
        if (iVar1 == 0) {
          return 0xffffffff;
        }
        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);
        iVar5 = iVar1 + 4;
        if (iVar2 == 0) {
          return iVar1 - iVar6 >> 2;
        }
        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;
        if (uVar3 < param_3) {
          return 0xffffffff;
        }
      } while ((1 - param_3) + uVar3 != 0);
    }
  }
  return 0xffffffff;
}



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

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

{
  int iVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  int iVar5;
  int iVar6;
  undefined4 uVar7;
  
  iVar6 = *(int *)this;
  uVar4 = *(uint *)(iVar6 + -0xc);
  if (param_3 == 0) {
    if (uVar4 < param_2) {
      param_2 = 0xffffffff;
    }
    return param_2;
  }
  if ((param_2 < uVar4) && (param_3 <= uVar4 - param_2)) {
    if ((1 - param_3) + (uVar4 - param_2) != 0) {
      uVar7 = *(undefined4 *)param_1;
      iVar5 = iVar6 + param_2 * 4;
      do {
        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);
        if (iVar1 == 0) {
          return 0xffffffff;
        }
        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);
        iVar5 = iVar1 + 4;
        if (iVar2 == 0) {
          return iVar1 - iVar6 >> 2;
        }
        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;
        if (uVar3 < param_3) {
          return 0xffffffff;
        }
      } while ((1 - param_3) + uVar3 != 0);
    }
  }
  return 0xffffffff;
}


lui gp,0xf
addiu gp,gp,0x7ee8
addu gp,gp,t9
addiu sp,sp,-0x38
or v0,a2,zero
sw s3,0x24(sp)
sw gp,0x10(sp)
sw ra,0x34(sp)
sw s6,0x30(sp)
sw s5,0x2c(sp)
sw s4,0x28(sp)
sw s2,0x20(sp)
sw s1,0x1c(sp)
sw s0,0x18(sp)
lw s3,0x0(a0)
beq a3,zero,0x003d1468
_lw v1,-0xc(s3)
sltu a0,a2,v1
beq a0,zero,0x003d143c
_nop
subu a2,v1,a2
sltu a0,a2,a3
bne a0,zero,0x003d143c
_li s2,0x1
subu s2,s2,a3
addu a2,s2,a2
beq a2,zero,0x003d143c
_sll v0,v0,0x2
lw s5,0x0(a1)
sll v1,v1,0x2
addu a0,s3,v0
addu s6,s3,v1
or s4,a1,zero
or s1,a3,zero
lw t9,-0x3530(gp)
jalr t9
_or a1,s5,zero
or a2,s1,zero
lw gp,0x10(sp)
or a1,s4,zero
or s0,v0,zero
or a0,v0,zero
beq v0,zero,0x003d143c
_lw t9,-0x35cc(gp)
jalr t9
_nop
addiu a0,s0,0x4
beq v0,zero,0x003d149c
_lw gp,0x10(sp)
subu v0,s6,a0
sra v0,v0,0x2
addu a2,s2,v0
sltu v0,v0,s1
bne v0,zero,0x003d1440
_li v0,-0x1
bne a2,zero,0x003d13e4
_lw t9,-0x3530(gp)
li v0,-0x1
lw ra,0x34(sp)
lw s6,0x30(sp)
lw s5,0x2c(sp)
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,0x38
lw ra,0x34(sp)
sltu v1,v1,a2
li a2,-0x1
lw s6,0x30(sp)
lw s5,0x2c(sp)
lw s4,0x28(sp)
lw s3,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
addiu sp,sp,0x38
jr ra
_movn v0,a2,v1
subu v0,s0,s3
b 0x003d1440
_sra v0,v0,0x2
(translation_unit "/* std::wstring::find(wchar_t const*, unsigned int, unsigned int) const */\n\nuint __thiscall std::wstring::find(wstring *this,wchar_t *param_1,uint param_2,uint param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  \n  iVar6 = *(int *)this;\n  uVar4 = *(uint *)(iVar6 + -0xc);\n  if (param_3 == 0) {\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }\n  if ((param_2 < uVar4) && (param_3 <= uVar4 - param_2)) {\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }\n  return 0xffffffff;\n}\n\n" comment (function_definition "uint __thiscall std::wstring::find(wstring *this,wchar_t *param_1,uint param_2,uint param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  \n  iVar6 = *(int *)this;\n  uVar4 = *(uint *)(iVar6 + -0xc);\n  if (param_3 == 0) {\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }\n  if ((param_2 < uVar4) && (param_3 <= uVar4 - param_2)) {\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }\n  return 0xffffffff;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wstring::" identifier : : identifier : :) (function_declarator "find(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  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  \n  iVar6 = *(int *)this;\n  uVar4 = *(uint *)(iVar6 + -0xc);\n  if (param_3 == 0) {\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }\n  if ((param_2 < uVar4) && (param_3 <= uVar4 - param_2)) {\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }\n  return 0xffffffff;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined4 uVar7;" type_identifier identifier ;) (expression_statement "iVar6 = *(int *)this;" (assignment_expression "iVar6 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "uVar4 = *(uint *)(iVar6 + -0xc);" (assignment_expression "uVar4 = *(uint *)(iVar6 + -0xc)" identifier = (pointer_expression "*(uint *)(iVar6 + -0xc)" * (cast_expression "(uint *)(iVar6 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + -0xc)" ( (binary_expression "iVar6 + -0xc" identifier + number_literal) ))))) ;) (if_statement "if (param_3 == 0) {\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }" { (if_statement "if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }" if (parenthesized_expression "(uVar4 < param_2)" ( (binary_expression "uVar4 < param_2" identifier < identifier) )) (compound_statement "{\n      param_2 = 0xffffffff;\n    }" { (expression_statement "param_2 = 0xffffffff;" (assignment_expression "param_2 = 0xffffffff" identifier = number_literal) ;) })) (return_statement "return param_2;" return identifier ;) })) (if_statement "if ((param_2 < uVar4) && (param_3 <= uVar4 - param_2)) {\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }" if (parenthesized_expression "((param_2 < uVar4) && (param_3 <= uVar4 - param_2))" ( (binary_expression "(param_2 < uVar4) && (param_3 <= uVar4 - param_2)" (parenthesized_expression "(param_2 < uVar4)" ( (binary_expression "param_2 < uVar4" identifier < identifier) )) && (parenthesized_expression "(param_3 <= uVar4 - param_2)" ( (binary_expression "param_3 <= uVar4 - param_2" identifier <= (binary_expression "uVar4 - param_2" identifier - identifier)) ))) )) (compound_statement "{\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }" { (if_statement "if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }" if (parenthesized_expression "((1 - param_3) + (uVar4 - param_2) != 0)" ( (binary_expression "(1 - param_3) + (uVar4 - param_2) != 0" (binary_expression "(1 - param_3) + (uVar4 - param_2)" (parenthesized_expression "(1 - param_3)" ( (binary_expression "1 - param_3" number_literal - identifier) )) + (parenthesized_expression "(uVar4 - param_2)" ( (binary_expression "uVar4 - param_2" identifier - identifier) ))) != number_literal) )) (compound_statement "{\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }" { (expression_statement "uVar7 = *(undefined4 *)param_1;" (assignment_expression "uVar7 = *(undefined4 *)param_1" identifier = (pointer_expression "*(undefined4 *)param_1" * (cast_expression "(undefined4 *)param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "iVar5 = iVar6 + param_2 * 4;" (assignment_expression "iVar5 = iVar6 + param_2 * 4" identifier = (binary_expression "iVar6 + param_2 * 4" identifier + (binary_expression "param_2 * 4" identifier * number_literal))) ;) (do_statement "do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);" do (compound_statement "{\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      }" { (expression_statement "iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);" (assignment_expression "iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7)" identifier = (call_expression "(*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7)" (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 "(iVar5,uVar7)" ( identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n          return 0xffffffff;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          return 0xffffffff;\n        }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);" (assignment_expression "iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3)" identifier = (call_expression "(*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3)" (parenthesized_expression "(*(code *)PTR_wmemcmp_004c5c74)" ( (pointer_expression "*(code *)PTR_wmemcmp_004c5c74" * (cast_expression "(code *)PTR_wmemcmp_004c5c74" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1,param_1,param_3)" ( identifier , identifier , identifier )))) ;) (expression_statement "iVar5 = iVar1 + 4;" (assignment_expression "iVar5 = iVar1 + 4" identifier = (binary_expression "iVar1 + 4" identifier + number_literal)) ;) (if_statement "if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n          return iVar1 - iVar6 >> 2;\n        }" { (return_statement "return iVar1 - iVar6 >> 2;" return (binary_expression "iVar1 - iVar6 >> 2" (binary_expression "iVar1 - iVar6" identifier - identifier) >> number_literal) ;) })) (expression_statement "uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;" (assignment_expression "uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2" identifier = (binary_expression "(int)((iVar6 + uVar4 * 4) - iVar5) >> 2" (cast_expression "(int)((iVar6 + uVar4 * 4) - iVar5)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((iVar6 + uVar4 * 4) - iVar5)" ( (binary_expression "(iVar6 + uVar4 * 4) - iVar5" (parenthesized_expression "(iVar6 + uVar4 * 4)" ( (binary_expression "iVar6 + uVar4 * 4" identifier + (binary_expression "uVar4 * 4" identifier * number_literal)) )) - identifier) ))) >> number_literal)) ;) (if_statement "if (uVar3 < param_3) {\n          return 0xffffffff;\n        }" if (parenthesized_expression "(uVar3 < param_3)" ( (binary_expression "uVar3 < param_3" identifier < identifier) )) (compound_statement "{\n          return 0xffffffff;\n        }" { (return_statement "return 0xffffffff;" return number_literal ;) })) }) while (parenthesized_expression "((1 - param_3) + uVar3 != 0)" ( (binary_expression "(1 - param_3) + uVar3 != 0" (binary_expression "(1 - param_3) + uVar3" (parenthesized_expression "(1 - param_3)" ( (binary_expression "1 - param_3" number_literal - identifier) )) + identifier) != number_literal) )) ;) })) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit "/* std::wstring::find(wchar_t const*, unsigned int, unsigned int) const */\n\nuint __thiscall std::wstring::find(wstring *this,wchar_t *param_1,uint param_2,uint param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  \n  iVar6 = *(int *)this;\n  uVar4 = *(uint *)(iVar6 + -0xc);\n  if (param_3 == 0) {\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }\n  if ((param_2 < uVar4) && (param_3 <= uVar4 - param_2)) {\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }\n  return 0xffffffff;\n}\n\n" comment (function_definition "uint __thiscall std::wstring::find(wstring *this,wchar_t *param_1,uint param_2,uint param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  \n  iVar6 = *(int *)this;\n  uVar4 = *(uint *)(iVar6 + -0xc);\n  if (param_3 == 0) {\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }\n  if ((param_2 < uVar4) && (param_3 <= uVar4 - param_2)) {\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }\n  return 0xffffffff;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wstring::" identifier : : identifier : :) (function_declarator "find(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  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  \n  iVar6 = *(int *)this;\n  uVar4 = *(uint *)(iVar6 + -0xc);\n  if (param_3 == 0) {\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }\n  if ((param_2 < uVar4) && (param_3 <= uVar4 - param_2)) {\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }\n  return 0xffffffff;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined4 uVar7;" type_identifier identifier ;) (expression_statement "iVar6 = *(int *)this;" (assignment_expression "iVar6 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "uVar4 = *(uint *)(iVar6 + -0xc);" (assignment_expression "uVar4 = *(uint *)(iVar6 + -0xc)" identifier = (pointer_expression "*(uint *)(iVar6 + -0xc)" * (cast_expression "(uint *)(iVar6 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + -0xc)" ( (binary_expression "iVar6 + -0xc" identifier + number_literal) ))))) ;) (if_statement "if (param_3 == 0) {\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }" { (if_statement "if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }" if (parenthesized_expression "(uVar4 < param_2)" ( (binary_expression "uVar4 < param_2" identifier < identifier) )) (compound_statement "{\n      param_2 = 0xffffffff;\n    }" { (expression_statement "param_2 = 0xffffffff;" (assignment_expression "param_2 = 0xffffffff" identifier = number_literal) ;) })) (return_statement "return param_2;" return identifier ;) })) (if_statement "if ((param_2 < uVar4) && (param_3 <= uVar4 - param_2)) {\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }" if (parenthesized_expression "((param_2 < uVar4) && (param_3 <= uVar4 - param_2))" ( (binary_expression "(param_2 < uVar4) && (param_3 <= uVar4 - param_2)" (parenthesized_expression "(param_2 < uVar4)" ( (binary_expression "param_2 < uVar4" identifier < identifier) )) && (parenthesized_expression "(param_3 <= uVar4 - param_2)" ( (binary_expression "param_3 <= uVar4 - param_2" identifier <= (binary_expression "uVar4 - param_2" identifier - identifier)) ))) )) (compound_statement "{\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }" { (if_statement "if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }" if (parenthesized_expression "((1 - param_3) + (uVar4 - param_2) != 0)" ( (binary_expression "(1 - param_3) + (uVar4 - param_2) != 0" (binary_expression "(1 - param_3) + (uVar4 - param_2)" (parenthesized_expression "(1 - param_3)" ( (binary_expression "1 - param_3" number_literal - identifier) )) + (parenthesized_expression "(uVar4 - param_2)" ( (binary_expression "uVar4 - param_2" identifier - identifier) ))) != number_literal) )) (compound_statement "{\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }" { (expression_statement "uVar7 = *(undefined4 *)param_1;" (assignment_expression "uVar7 = *(undefined4 *)param_1" identifier = (pointer_expression "*(undefined4 *)param_1" * (cast_expression "(undefined4 *)param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "iVar5 = iVar6 + param_2 * 4;" (assignment_expression "iVar5 = iVar6 + param_2 * 4" identifier = (binary_expression "iVar6 + param_2 * 4" identifier + (binary_expression "param_2 * 4" identifier * number_literal))) ;) (do_statement "do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);" do (compound_statement "{\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      }" { (expression_statement "iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);" (assignment_expression "iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7)" identifier = (call_expression "(*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7)" (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 "(iVar5,uVar7)" ( identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n          return 0xffffffff;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          return 0xffffffff;\n        }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);" (assignment_expression "iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3)" identifier = (call_expression "(*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3)" (parenthesized_expression "(*(code *)PTR_wmemcmp_004c5c74)" ( (pointer_expression "*(code *)PTR_wmemcmp_004c5c74" * (cast_expression "(code *)PTR_wmemcmp_004c5c74" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1,param_1,param_3)" ( identifier , identifier , identifier )))) ;) (expression_statement "iVar5 = iVar1 + 4;" (assignment_expression "iVar5 = iVar1 + 4" identifier = (binary_expression "iVar1 + 4" identifier + number_literal)) ;) (if_statement "if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n          return iVar1 - iVar6 >> 2;\n        }" { (return_statement "return iVar1 - iVar6 >> 2;" return (binary_expression "iVar1 - iVar6 >> 2" (binary_expression "iVar1 - iVar6" identifier - identifier) >> number_literal) ;) })) (expression_statement "uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;" (assignment_expression "uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2" identifier = (binary_expression "(int)((iVar6 + uVar4 * 4) - iVar5) >> 2" (cast_expression "(int)((iVar6 + uVar4 * 4) - iVar5)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((iVar6 + uVar4 * 4) - iVar5)" ( (binary_expression "(iVar6 + uVar4 * 4) - iVar5" (parenthesized_expression "(iVar6 + uVar4 * 4)" ( (binary_expression "iVar6 + uVar4 * 4" identifier + (binary_expression "uVar4 * 4" identifier * number_literal)) )) - identifier) ))) >> number_literal)) ;) (if_statement "if (uVar3 < param_3) {\n          return 0xffffffff;\n        }" if (parenthesized_expression "(uVar3 < param_3)" ( (binary_expression "uVar3 < param_3" identifier < identifier) )) (compound_statement "{\n          return 0xffffffff;\n        }" { (return_statement "return 0xffffffff;" return number_literal ;) })) }) while (parenthesized_expression "((1 - param_3) + uVar3 != 0)" ( (binary_expression "(1 - param_3) + uVar3 != 0" (binary_expression "(1 - param_3) + uVar3" (parenthesized_expression "(1 - param_3)" ( (binary_expression "1 - param_3" number_literal - identifier) )) + identifier) != number_literal) )) ;) })) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit "uint __thiscall std::wstring::find(wstring *this,wchar_t *param_1,uint param_2,uint param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  \n  iVar6 = *(int *)this;\n  uVar4 = *(uint *)(iVar6 + -0xc);\n  if (param_3 == 0) {\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }\n  if ((param_2 < uVar4) && (param_3 <= uVar4 - param_2)) {\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }\n  return 0xffffffff;\n}\n\n" (function_definition "uint __thiscall std::wstring::find(wstring *this,wchar_t *param_1,uint param_2,uint param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  \n  iVar6 = *(int *)this;\n  uVar4 = *(uint *)(iVar6 + -0xc);\n  if (param_3 == 0) {\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }\n  if ((param_2 < uVar4) && (param_3 <= uVar4 - param_2)) {\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }\n  return 0xffffffff;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wstring::" identifier : : identifier : :) (function_declarator "find(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  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  \n  iVar6 = *(int *)this;\n  uVar4 = *(uint *)(iVar6 + -0xc);\n  if (param_3 == 0) {\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }\n  if ((param_2 < uVar4) && (param_3 <= uVar4 - param_2)) {\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }\n  return 0xffffffff;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined4 uVar7;" type_identifier identifier ;) (expression_statement "iVar6 = *(int *)this;" (assignment_expression "iVar6 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "uVar4 = *(uint *)(iVar6 + -0xc);" (assignment_expression "uVar4 = *(uint *)(iVar6 + -0xc)" identifier = (pointer_expression "*(uint *)(iVar6 + -0xc)" * (cast_expression "(uint *)(iVar6 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + -0xc)" ( (binary_expression "iVar6 + -0xc" identifier + number_literal) ))))) ;) (if_statement "if (param_3 == 0) {\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }" { (if_statement "if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }" if (parenthesized_expression "(uVar4 < param_2)" ( (binary_expression "uVar4 < param_2" identifier < identifier) )) (compound_statement "{\n      param_2 = 0xffffffff;\n    }" { (expression_statement "param_2 = 0xffffffff;" (assignment_expression "param_2 = 0xffffffff" identifier = number_literal) ;) })) (return_statement "return param_2;" return identifier ;) })) (if_statement "if ((param_2 < uVar4) && (param_3 <= uVar4 - param_2)) {\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }" if (parenthesized_expression "((param_2 < uVar4) && (param_3 <= uVar4 - param_2))" ( (binary_expression "(param_2 < uVar4) && (param_3 <= uVar4 - param_2)" (parenthesized_expression "(param_2 < uVar4)" ( (binary_expression "param_2 < uVar4" identifier < identifier) )) && (parenthesized_expression "(param_3 <= uVar4 - param_2)" ( (binary_expression "param_3 <= uVar4 - param_2" identifier <= (binary_expression "uVar4 - param_2" identifier - identifier)) ))) )) (compound_statement "{\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }" { (if_statement "if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }" if (parenthesized_expression "((1 - param_3) + (uVar4 - param_2) != 0)" ( (binary_expression "(1 - param_3) + (uVar4 - param_2) != 0" (binary_expression "(1 - param_3) + (uVar4 - param_2)" (parenthesized_expression "(1 - param_3)" ( (binary_expression "1 - param_3" number_literal - identifier) )) + (parenthesized_expression "(uVar4 - param_2)" ( (binary_expression "uVar4 - param_2" identifier - identifier) ))) != number_literal) )) (compound_statement "{\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }" { (expression_statement "uVar7 = *(undefined4 *)param_1;" (assignment_expression "uVar7 = *(undefined4 *)param_1" identifier = (pointer_expression "*(undefined4 *)param_1" * (cast_expression "(undefined4 *)param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "iVar5 = iVar6 + param_2 * 4;" (assignment_expression "iVar5 = iVar6 + param_2 * 4" identifier = (binary_expression "iVar6 + param_2 * 4" identifier + (binary_expression "param_2 * 4" identifier * number_literal))) ;) (do_statement "do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);" do (compound_statement "{\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      }" { (expression_statement "iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);" (assignment_expression "iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7)" identifier = (call_expression "(*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7)" (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 "(iVar5,uVar7)" ( identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n          return 0xffffffff;\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          return 0xffffffff;\n        }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);" (assignment_expression "iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3)" identifier = (call_expression "(*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3)" (parenthesized_expression "(*(code *)PTR_wmemcmp_004c5c74)" ( (pointer_expression "*(code *)PTR_wmemcmp_004c5c74" * (cast_expression "(code *)PTR_wmemcmp_004c5c74" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1,param_1,param_3)" ( identifier , identifier , identifier )))) ;) (expression_statement "iVar5 = iVar1 + 4;" (assignment_expression "iVar5 = iVar1 + 4" identifier = (binary_expression "iVar1 + 4" identifier + number_literal)) ;) (if_statement "if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n          return iVar1 - iVar6 >> 2;\n        }" { (return_statement "return iVar1 - iVar6 >> 2;" return (binary_expression "iVar1 - iVar6 >> 2" (binary_expression "iVar1 - iVar6" identifier - identifier) >> number_literal) ;) })) (expression_statement "uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;" (assignment_expression "uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2" identifier = (binary_expression "(int)((iVar6 + uVar4 * 4) - iVar5) >> 2" (cast_expression "(int)((iVar6 + uVar4 * 4) - iVar5)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((iVar6 + uVar4 * 4) - iVar5)" ( (binary_expression "(iVar6 + uVar4 * 4) - iVar5" (parenthesized_expression "(iVar6 + uVar4 * 4)" ( (binary_expression "iVar6 + uVar4 * 4" identifier + (binary_expression "uVar4 * 4" identifier * number_literal)) )) - identifier) ))) >> number_literal)) ;) (if_statement "if (uVar3 < param_3) {\n          return 0xffffffff;\n        }" if (parenthesized_expression "(uVar3 < param_3)" ( (binary_expression "uVar3 < param_3" identifier < identifier) )) (compound_statement "{\n          return 0xffffffff;\n        }" { (return_statement "return 0xffffffff;" return number_literal ;) })) }) while (parenthesized_expression "((1 - param_3) + uVar3 != 0)" ( (binary_expression "(1 - param_3) + uVar3 != 0" (binary_expression "(1 - param_3) + uVar3" (parenthesized_expression "(1 - param_3)" ( (binary_expression "1 - param_3" number_literal - identifier) )) + identifier) != number_literal) )) ;) })) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(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 IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < IDENT) )) && (parenthesized_expression ( (binary_expression IDENT <= (binary_expression IDENT - IDENT)) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (parenthesized_expression ( (binary_expression LIT - IDENT) )) + (parenthesized_expression ( (binary_expression IDENT - IDENT) ))) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (binary_expression IDENT * LIT))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return 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 )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return (binary_expression (binary_expression IDENT - IDENT) >> LIT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )) - IDENT) ))) >> LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (return_statement return LIT ;) })) }) while (parenthesized_expression ( (binary_expression (binary_expression (parenthesized_expression ( (binary_expression LIT - IDENT) )) + IDENT) != LIT) )) ;) })) })) (return_statement return LIT ;) })))
(function_definition "uint __thiscall std::wstring::find(wstring *this,wchar_t *param_1,uint param_2,uint param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  \n  iVar6 = *(int *)this;\n  uVar4 = *(uint *)(iVar6 + -0xc);\n  if (param_3 == 0) {\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }\n  if ((param_2 < uVar4) && (param_3 <= uVar4 - param_2)) {\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }\n  return 0xffffffff;\n}" (type_identifier "uint") (ms_call_modifier "__thiscall" (__thiscall "__thiscall")) (ERROR "std::wstring::" (identifier "std") (: ":") (: ":") (identifier "wstring") (: ":") (: ":")) (function_declarator "find(wstring *this,wchar_t *param_1,uint param_2,uint param_3)" (identifier "find") (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  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 uVar7;\n  \n  iVar6 = *(int *)this;\n  uVar4 = *(uint *)(iVar6 + -0xc);\n  if (param_3 == 0) {\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }\n  if ((param_2 < uVar4) && (param_3 <= uVar4 - param_2)) {\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }\n  return 0xffffffff;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "undefined4 uVar7;" (type_identifier "undefined4") (identifier "uVar7") (; ";")) (expression_statement "iVar6 = *(int *)this;" (assignment_expression "iVar6 = *(int *)this" (identifier "iVar6") (= "=") (pointer_expression "*(int *)this" (* "*") (cast_expression "(int *)this" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "this")))) (; ";")) (expression_statement "uVar4 = *(uint *)(iVar6 + -0xc);" (assignment_expression "uVar4 = *(uint *)(iVar6 + -0xc)" (identifier "uVar4") (= "=") (pointer_expression "*(uint *)(iVar6 + -0xc)" (* "*") (cast_expression "(uint *)(iVar6 + -0xc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + -0xc)" (( "(") (binary_expression "iVar6 + -0xc" (identifier "iVar6") (+ "+") (number_literal "-0xc")) () ")"))))) (; ";")) (if_statement "if (param_3 == 0) {\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }\n    return param_2;\n  }" ({ "{") (if_statement "if (uVar4 < param_2) {\n      param_2 = 0xffffffff;\n    }" (if "if") (parenthesized_expression "(uVar4 < param_2)" (( "(") (binary_expression "uVar4 < param_2" (identifier "uVar4") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n      param_2 = 0xffffffff;\n    }" ({ "{") (expression_statement "param_2 = 0xffffffff;" (assignment_expression "param_2 = 0xffffffff" (identifier "param_2") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}"))) (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}"))) (if_statement "if ((param_2 < uVar4) && (param_3 <= uVar4 - param_2)) {\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }" (if "if") (parenthesized_expression "((param_2 < uVar4) && (param_3 <= uVar4 - param_2))" (( "(") (binary_expression "(param_2 < uVar4) && (param_3 <= uVar4 - param_2)" (parenthesized_expression "(param_2 < uVar4)" (( "(") (binary_expression "param_2 < uVar4" (identifier "param_2") (< "<") (identifier "uVar4")) () ")")) (&& "&&") (parenthesized_expression "(param_3 <= uVar4 - param_2)" (( "(") (binary_expression "param_3 <= uVar4 - param_2" (identifier "param_3") (<= "<=") (binary_expression "uVar4 - param_2" (identifier "uVar4") (- "-") (identifier "param_2"))) () ")"))) () ")")) (compound_statement "{\n    if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }\n  }" ({ "{") (if_statement "if ((1 - param_3) + (uVar4 - param_2) != 0) {\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }" (if "if") (parenthesized_expression "((1 - param_3) + (uVar4 - param_2) != 0)" (( "(") (binary_expression "(1 - param_3) + (uVar4 - param_2) != 0" (binary_expression "(1 - param_3) + (uVar4 - param_2)" (parenthesized_expression "(1 - param_3)" (( "(") (binary_expression "1 - param_3" (number_literal "1") (- "-") (identifier "param_3")) () ")")) (+ "+") (parenthesized_expression "(uVar4 - param_2)" (( "(") (binary_expression "uVar4 - param_2" (identifier "uVar4") (- "-") (identifier "param_2")) () ")"))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar7 = *(undefined4 *)param_1;\n      iVar5 = iVar6 + param_2 * 4;\n      do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);\n    }" ({ "{") (expression_statement "uVar7 = *(undefined4 *)param_1;" (assignment_expression "uVar7 = *(undefined4 *)param_1" (identifier "uVar7") (= "=") (pointer_expression "*(undefined4 *)param_1" (* "*") (cast_expression "(undefined4 *)param_1" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1")))) (; ";")) (expression_statement "iVar5 = iVar6 + param_2 * 4;" (assignment_expression "iVar5 = iVar6 + param_2 * 4" (identifier "iVar5") (= "=") (binary_expression "iVar6 + param_2 * 4" (identifier "iVar6") (+ "+") (binary_expression "param_2 * 4" (identifier "param_2") (* "*") (number_literal "4")))) (; ";")) (do_statement "do {\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      } while ((1 - param_3) + uVar3 != 0);" (do "do") (compound_statement "{\n        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);\n        if (iVar1 == 0) {\n          return 0xffffffff;\n        }\n        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);\n        iVar5 = iVar1 + 4;\n        if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }\n        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;\n        if (uVar3 < param_3) {\n          return 0xffffffff;\n        }\n      }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);" (assignment_expression "iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7)" (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 "(iVar5,uVar7)" (( "(") (identifier "iVar5") (, ",") (identifier "uVar7") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n          return 0xffffffff;\n        }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          return 0xffffffff;\n        }" ({ "{") (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (expression_statement "iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);" (assignment_expression "iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3)" (parenthesized_expression "(*(code *)PTR_wmemcmp_004c5c74)" (( "(") (pointer_expression "*(code *)PTR_wmemcmp_004c5c74" (* "*") (cast_expression "(code *)PTR_wmemcmp_004c5c74" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_wmemcmp_004c5c74"))) () ")")) (argument_list "(iVar1,param_1,param_3)" (( "(") (identifier "iVar1") (, ",") (identifier "param_1") (, ",") (identifier "param_3") () ")")))) (; ";")) (expression_statement "iVar5 = iVar1 + 4;" (assignment_expression "iVar5 = iVar1 + 4" (identifier "iVar5") (= "=") (binary_expression "iVar1 + 4" (identifier "iVar1") (+ "+") (number_literal "4"))) (; ";")) (if_statement "if (iVar2 == 0) {\n          return iVar1 - iVar6 >> 2;\n        }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          return iVar1 - iVar6 >> 2;\n        }" ({ "{") (return_statement "return iVar1 - iVar6 >> 2;" (return "return") (binary_expression "iVar1 - iVar6 >> 2" (binary_expression "iVar1 - iVar6" (identifier "iVar1") (- "-") (identifier "iVar6")) (>> ">>") (number_literal "2")) (; ";")) (} "}"))) (expression_statement "uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;" (assignment_expression "uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2" (identifier "uVar3") (= "=") (binary_expression "(int)((iVar6 + uVar4 * 4) - iVar5) >> 2" (cast_expression "(int)((iVar6 + uVar4 * 4) - iVar5)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((iVar6 + uVar4 * 4) - iVar5)" (( "(") (binary_expression "(iVar6 + uVar4 * 4) - iVar5" (parenthesized_expression "(iVar6 + uVar4 * 4)" (( "(") (binary_expression "iVar6 + uVar4 * 4" (identifier "iVar6") (+ "+") (binary_expression "uVar4 * 4" (identifier "uVar4") (* "*") (number_literal "4"))) () ")")) (- "-") (identifier "iVar5")) () ")"))) (>> ">>") (number_literal "2"))) (; ";")) (if_statement "if (uVar3 < param_3) {\n          return 0xffffffff;\n        }" (if "if") (parenthesized_expression "(uVar3 < param_3)" (( "(") (binary_expression "uVar3 < param_3" (identifier "uVar3") (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n          return 0xffffffff;\n        }" ({ "{") (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "((1 - param_3) + uVar3 != 0)" (( "(") (binary_expression "(1 - param_3) + uVar3 != 0" (binary_expression "(1 - param_3) + uVar3" (parenthesized_expression "(1 - param_3)" (( "(") (binary_expression "1 - param_3" (number_literal "1") (- "-") (identifier "param_3")) () ")")) (+ "+") (identifier "uVar3")) (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}"))) (} "}"))) (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}")))
(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: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))))) (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: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (return_statement (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) (do_statement body: (compound_statement (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))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (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))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) right: (identifier)))) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (number_literal))))) condition: (parenthesized_expression (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) right: (identifier)) right: (number_literal)))))))) (return_statement (number_literal)))))

/* 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)

{
  int iVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  int iVar5;
  int iVar6;
  undefined4 uVar7;
  
  iVar6 = *(int *)this;
  uVar4 = *(uint *)(iVar6 + -0xc);
  if (param_3 == 0) {
    if (uVar4 < param_2) {
      param_2 = 0xffffffff;
    }
    return param_2;
  }
  if ((param_2 < uVar4) && (param_3 <= uVar4 - param_2)) {
    if ((1 - param_3) + (uVar4 - param_2) != 0) {
      uVar7 = *(undefined4 *)param_1;
      iVar5 = iVar6 + param_2 * 4;
      do {
        iVar1 = (*(code *)PTR_wmemchr_004c5d10)(iVar5,uVar7);
        if (iVar1 == 0) {
          return 0xffffffff;
        }
        iVar2 = (*(code *)PTR_wmemcmp_004c5c74)(iVar1,param_1,param_3);
        iVar5 = iVar1 + 4;
        if (iVar2 == 0) {
          return iVar1 - iVar6 >> 2;
        }
        uVar3 = (int)((iVar6 + uVar4 * 4) - iVar5) >> 2;
        if (uVar3 < param_3) {
          return 0xffffffff;
        }
      } while ((1 - param_3) + uVar3 != 0);
    }
  }
  return 0xffffffff;
}

