
/* std::string::find_first_of(char const*, unsigned long, unsigned long) const */

ulong __thiscall std::string::find_first_of(string *this,char *param_1,ulong param_2,ulong param_3)

{
  ulong uVar1;
  long lVar2;
  void *pvVar3;
  
  if (param_3 == 0) {
    return 0xffffffffffffffff;
  }
  uVar1 = *(ulong *)(this + 8);
  if (param_2 < uVar1) {
    lVar2 = *(long *)this;
    do {
      pvVar3 = memchr(param_1,(int)*(char *)(lVar2 + param_2),param_3);
      if (pvVar3 != (void *)0x0) {
        return param_2;
      }
      param_2 = param_2 + 1;
    } while (param_2 != uVar1);
  }
  return 0xffffffffffffffff;
}



ulong FUN_002e3530(long *param_1,void *param_2,ulong param_3,size_t param_4)

{
  ulong uVar1;
  long lVar2;
  void *pvVar3;
  
  if (param_4 == 0) {
    return 0xffffffffffffffff;
  }
  uVar1 = param_1[1];
  if (param_3 < uVar1) {
    lVar2 = *param_1;
    do {
      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);
      if (pvVar3 != (void *)0x0) {
        return param_3;
      }
      param_3 = param_3 + 1;
    } while (param_3 != uVar1);
  }
  return 0xffffffffffffffff;
}


TEST RCX,RCX
JZ 0x002e3598
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV R12,qword ptr [RDI + 0x8]
MOV RBX,RDX
CMP RDX,R12
JNC 0x002e3588
MOV R13,RSI
MOV RBP,RCX
MOV R14,qword ptr [RDI]
JMP 0x002e3561
ADD RBX,0x1
CMP RBX,R12
JZ 0x002e3588
MOVSX ESI,byte ptr [R14 + RBX*0x1]
MOV RDX,RBP
MOV RDI,R13
CALL 0x001471b0
TEST RAX,RAX
JZ 0x002e3558
MOV RAX,RBX
POP RBX
POP RBP
POP R12
POP R13
POP R14
RET
POP RBX
MOV RAX,-0x1
POP RBP
POP R12
POP R13
POP R14
RET
MOV RAX,-0x1
RET
(translation_unit "ulong FUN_002e3530(long *param_1,void *param_2,ulong param_3,size_t param_4)\n\n{\n  ulong uVar1;\n  long lVar2;\n  void *pvVar3;\n  \n  if (param_4 == 0) {\n    return 0xffffffffffffffff;\n  }\n  uVar1 = param_1[1];\n  if (param_3 < uVar1) {\n    lVar2 = *param_1;\n    do {\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    } while (param_3 != uVar1);\n  }\n  return 0xffffffffffffffff;\n}\n\n" (function_definition "ulong FUN_002e3530(long *param_1,void *param_2,ulong param_3,size_t param_4)\n\n{\n  ulong uVar1;\n  long lVar2;\n  void *pvVar3;\n  \n  if (param_4 == 0) {\n    return 0xffffffffffffffff;\n  }\n  uVar1 = param_1[1];\n  if (param_3 < uVar1) {\n    lVar2 = *param_1;\n    do {\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    } while (param_3 != uVar1);\n  }\n  return 0xffffffffffffffff;\n}" type_identifier (function_declarator "FUN_002e3530(long *param_1,void *param_2,ulong param_3,size_t param_4)" identifier (parameter_list "(long *param_1,void *param_2,ulong param_3,size_t param_4)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "ulong param_3" type_identifier identifier) , (parameter_declaration "size_t param_4" primitive_type identifier) ))) (compound_statement "{\n  ulong uVar1;\n  long lVar2;\n  void *pvVar3;\n  \n  if (param_4 == 0) {\n    return 0xffffffffffffffff;\n  }\n  uVar1 = param_1[1];\n  if (param_3 < uVar1) {\n    lVar2 = *param_1;\n    do {\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    } while (param_3 != uVar1);\n  }\n  return 0xffffffffffffffff;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "void *pvVar3;" primitive_type (pointer_declarator "*pvVar3" * identifier) ;) (if_statement "if (param_4 == 0) {\n    return 0xffffffffffffffff;\n  }" if (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0xffffffffffffffff;\n  }" { (return_statement "return 0xffffffffffffffff;" return number_literal ;) })) (expression_statement "uVar1 = param_1[1];" (assignment_expression "uVar1 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if (param_3 < uVar1) {\n    lVar2 = *param_1;\n    do {\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    } while (param_3 != uVar1);\n  }" if (parenthesized_expression "(param_3 < uVar1)" ( (binary_expression "param_3 < uVar1" identifier < identifier) )) (compound_statement "{\n    lVar2 = *param_1;\n    do {\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    } while (param_3 != uVar1);\n  }" { (expression_statement "lVar2 = *param_1;" (assignment_expression "lVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (do_statement "do {\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    } while (param_3 != uVar1);" do (compound_statement "{\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    }" { (expression_statement "pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);" (assignment_expression "pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4)" identifier = (call_expression "memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4)" identifier (argument_list "(param_2,(int)*(char *)(lVar2 + param_3),param_4)" ( identifier , (cast_expression "(int)*(char *)(lVar2 + param_3)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(char *)(lVar2 + param_3)" * (cast_expression "(char *)(lVar2 + param_3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + param_3)" ( (binary_expression "lVar2 + param_3" identifier + identifier) ))))) , identifier )))) ;) (if_statement "if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }" if (parenthesized_expression "(pvVar3 != (void *)0x0)" ( (binary_expression "pvVar3 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return param_3;\n      }" { (return_statement "return param_3;" return identifier ;) })) (expression_statement "param_3 = param_3 + 1;" (assignment_expression "param_3 = param_3 + 1" identifier = (binary_expression "param_3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_3 != uVar1)" ( (binary_expression "param_3 != uVar1" identifier != identifier) )) ;) })) (return_statement "return 0xffffffffffffffff;" return number_literal ;) })))
(translation_unit "/* std::string::find_first_of(char const*, unsigned long, unsigned long) const */\n\nulong __thiscall std::string::find_first_of(string *this,char *param_1,ulong param_2,ulong param_3)\n\n{\n  ulong uVar1;\n  long lVar2;\n  void *pvVar3;\n  \n  if (param_3 == 0) {\n    return 0xffffffffffffffff;\n  }\n  uVar1 = *(ulong *)(this + 8);\n  if (param_2 < uVar1) {\n    lVar2 = *(long *)this;\n    do {\n      pvVar3 = memchr(param_1,(int)*(char *)(lVar2 + param_2),param_3);\n      if (pvVar3 != (void *)0x0) {\n        return param_2;\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != uVar1);\n  }\n  return 0xffffffffffffffff;\n}\n\n" comment (function_definition "ulong __thiscall std::string::find_first_of(string *this,char *param_1,ulong param_2,ulong param_3)\n\n{\n  ulong uVar1;\n  long lVar2;\n  void *pvVar3;\n  \n  if (param_3 == 0) {\n    return 0xffffffffffffffff;\n  }\n  uVar1 = *(ulong *)(this + 8);\n  if (param_2 < uVar1) {\n    lVar2 = *(long *)this;\n    do {\n      pvVar3 = memchr(param_1,(int)*(char *)(lVar2 + param_2),param_3);\n      if (pvVar3 != (void *)0x0) {\n        return param_2;\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != uVar1);\n  }\n  return 0xffffffffffffffff;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::string::" identifier : : identifier : :) (function_declarator "find_first_of(string *this,char *param_1,ulong param_2,ulong param_3)" identifier (parameter_list "(string *this,char *param_1,ulong param_2,ulong param_3)" ( (parameter_declaration "string *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "ulong param_2" type_identifier identifier) , (parameter_declaration "ulong param_3" type_identifier identifier) ))) (compound_statement "{\n  ulong uVar1;\n  long lVar2;\n  void *pvVar3;\n  \n  if (param_3 == 0) {\n    return 0xffffffffffffffff;\n  }\n  uVar1 = *(ulong *)(this + 8);\n  if (param_2 < uVar1) {\n    lVar2 = *(long *)this;\n    do {\n      pvVar3 = memchr(param_1,(int)*(char *)(lVar2 + param_2),param_3);\n      if (pvVar3 != (void *)0x0) {\n        return param_2;\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != uVar1);\n  }\n  return 0xffffffffffffffff;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "void *pvVar3;" primitive_type (pointer_declarator "*pvVar3" * identifier) ;) (if_statement "if (param_3 == 0) {\n    return 0xffffffffffffffff;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0xffffffffffffffff;\n  }" { (return_statement "return 0xffffffffffffffff;" return number_literal ;) })) (expression_statement "uVar1 = *(ulong *)(this + 8);" (assignment_expression "uVar1 = *(ulong *)(this + 8)" identifier = (pointer_expression "*(ulong *)(this + 8)" * (cast_expression "(ulong *)(this + 8)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) ))))) ;) (if_statement "if (param_2 < uVar1) {\n    lVar2 = *(long *)this;\n    do {\n      pvVar3 = memchr(param_1,(int)*(char *)(lVar2 + param_2),param_3);\n      if (pvVar3 != (void *)0x0) {\n        return param_2;\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != uVar1);\n  }" if (parenthesized_expression "(param_2 < uVar1)" ( (binary_expression "param_2 < uVar1" identifier < identifier) )) (compound_statement "{\n    lVar2 = *(long *)this;\n    do {\n      pvVar3 = memchr(param_1,(int)*(char *)(lVar2 + param_2),param_3);\n      if (pvVar3 != (void *)0x0) {\n        return param_2;\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != uVar1);\n  }" { (expression_statement "lVar2 = *(long *)this;" (assignment_expression "lVar2 = *(long *)this" identifier = (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier))) ;) (do_statement "do {\n      pvVar3 = memchr(param_1,(int)*(char *)(lVar2 + param_2),param_3);\n      if (pvVar3 != (void *)0x0) {\n        return param_2;\n      }\n      param_2 = param_2 + 1;\n    } while (param_2 != uVar1);" do (compound_statement "{\n      pvVar3 = memchr(param_1,(int)*(char *)(lVar2 + param_2),param_3);\n      if (pvVar3 != (void *)0x0) {\n        return param_2;\n      }\n      param_2 = param_2 + 1;\n    }" { (expression_statement "pvVar3 = memchr(param_1,(int)*(char *)(lVar2 + param_2),param_3);" (assignment_expression "pvVar3 = memchr(param_1,(int)*(char *)(lVar2 + param_2),param_3)" identifier = (call_expression "memchr(param_1,(int)*(char *)(lVar2 + param_2),param_3)" identifier (argument_list "(param_1,(int)*(char *)(lVar2 + param_2),param_3)" ( identifier , (cast_expression "(int)*(char *)(lVar2 + param_2)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(char *)(lVar2 + param_2)" * (cast_expression "(char *)(lVar2 + param_2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + param_2)" ( (binary_expression "lVar2 + param_2" identifier + identifier) ))))) , identifier )))) ;) (if_statement "if (pvVar3 != (void *)0x0) {\n        return param_2;\n      }" if (parenthesized_expression "(pvVar3 != (void *)0x0)" ( (binary_expression "pvVar3 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) 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 != uVar1)" ( (binary_expression "param_2 != uVar1" identifier != identifier) )) ;) })) (return_statement "return 0xffffffffffffffff;" return number_literal ;) })))
(translation_unit "ulong FUN_002e3530(long *param_1,void *param_2,ulong param_3,size_t param_4)\n\n{\n  ulong uVar1;\n  long lVar2;\n  void *pvVar3;\n  \n  if (param_4 == 0) {\n    return 0xffffffffffffffff;\n  }\n  uVar1 = param_1[1];\n  if (param_3 < uVar1) {\n    lVar2 = *param_1;\n    do {\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    } while (param_3 != uVar1);\n  }\n  return 0xffffffffffffffff;\n}\n\n" (function_definition "ulong FUN_002e3530(long *param_1,void *param_2,ulong param_3,size_t param_4)\n\n{\n  ulong uVar1;\n  long lVar2;\n  void *pvVar3;\n  \n  if (param_4 == 0) {\n    return 0xffffffffffffffff;\n  }\n  uVar1 = param_1[1];\n  if (param_3 < uVar1) {\n    lVar2 = *param_1;\n    do {\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    } while (param_3 != uVar1);\n  }\n  return 0xffffffffffffffff;\n}" type_identifier (function_declarator "FUN_002e3530(long *param_1,void *param_2,ulong param_3,size_t param_4)" identifier (parameter_list "(long *param_1,void *param_2,ulong param_3,size_t param_4)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "ulong param_3" type_identifier identifier) , (parameter_declaration "size_t param_4" primitive_type identifier) ))) (compound_statement "{\n  ulong uVar1;\n  long lVar2;\n  void *pvVar3;\n  \n  if (param_4 == 0) {\n    return 0xffffffffffffffff;\n  }\n  uVar1 = param_1[1];\n  if (param_3 < uVar1) {\n    lVar2 = *param_1;\n    do {\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    } while (param_3 != uVar1);\n  }\n  return 0xffffffffffffffff;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "void *pvVar3;" primitive_type (pointer_declarator "*pvVar3" * identifier) ;) (if_statement "if (param_4 == 0) {\n    return 0xffffffffffffffff;\n  }" if (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0xffffffffffffffff;\n  }" { (return_statement "return 0xffffffffffffffff;" return number_literal ;) })) (expression_statement "uVar1 = param_1[1];" (assignment_expression "uVar1 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if (param_3 < uVar1) {\n    lVar2 = *param_1;\n    do {\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    } while (param_3 != uVar1);\n  }" if (parenthesized_expression "(param_3 < uVar1)" ( (binary_expression "param_3 < uVar1" identifier < identifier) )) (compound_statement "{\n    lVar2 = *param_1;\n    do {\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    } while (param_3 != uVar1);\n  }" { (expression_statement "lVar2 = *param_1;" (assignment_expression "lVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (do_statement "do {\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    } while (param_3 != uVar1);" do (compound_statement "{\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    }" { (expression_statement "pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);" (assignment_expression "pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4)" identifier = (call_expression "memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4)" identifier (argument_list "(param_2,(int)*(char *)(lVar2 + param_3),param_4)" ( identifier , (cast_expression "(int)*(char *)(lVar2 + param_3)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(char *)(lVar2 + param_3)" * (cast_expression "(char *)(lVar2 + param_3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + param_3)" ( (binary_expression "lVar2 + param_3" identifier + identifier) ))))) , identifier )))) ;) (if_statement "if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }" if (parenthesized_expression "(pvVar3 != (void *)0x0)" ( (binary_expression "pvVar3 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return param_3;\n      }" { (return_statement "return param_3;" return identifier ;) })) (expression_statement "param_3 = param_3 + 1;" (assignment_expression "param_3 = param_3 + 1" identifier = (binary_expression "param_3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_3 != uVar1)" ( (binary_expression "param_3 != uVar1" identifier != identifier) )) ;) })) (return_statement "return 0xffffffffffffffff;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))))) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) (return_statement return LIT ;) })))
(function_definition "ulong FUN_002e3530(long *param_1,void *param_2,ulong param_3,size_t param_4)\n\n{\n  ulong uVar1;\n  long lVar2;\n  void *pvVar3;\n  \n  if (param_4 == 0) {\n    return 0xffffffffffffffff;\n  }\n  uVar1 = param_1[1];\n  if (param_3 < uVar1) {\n    lVar2 = *param_1;\n    do {\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    } while (param_3 != uVar1);\n  }\n  return 0xffffffffffffffff;\n}" (type_identifier "ulong") (function_declarator "FUN_002e3530(long *param_1,void *param_2,ulong param_3,size_t param_4)" (identifier "FUN_002e3530") (parameter_list "(long *param_1,void *param_2,ulong param_3,size_t param_4)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "void *param_2" (primitive_type "void") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "ulong param_3" (type_identifier "ulong") (identifier "param_3")) (, ",") (parameter_declaration "size_t param_4" (primitive_type "size_t") (identifier "param_4")) () ")"))) (compound_statement "{\n  ulong uVar1;\n  long lVar2;\n  void *pvVar3;\n  \n  if (param_4 == 0) {\n    return 0xffffffffffffffff;\n  }\n  uVar1 = param_1[1];\n  if (param_3 < uVar1) {\n    lVar2 = *param_1;\n    do {\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    } while (param_3 != uVar1);\n  }\n  return 0xffffffffffffffff;\n}" ({ "{") (declaration "ulong uVar1;" (type_identifier "ulong") (identifier "uVar1") (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (declaration "void *pvVar3;" (primitive_type "void") (pointer_declarator "*pvVar3" (* "*") (identifier "pvVar3")) (; ";")) (if_statement "if (param_4 == 0) {\n    return 0xffffffffffffffff;\n  }" (if "if") (parenthesized_expression "(param_4 == 0)" (( "(") (binary_expression "param_4 == 0" (identifier "param_4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return 0xffffffffffffffff;\n  }" ({ "{") (return_statement "return 0xffffffffffffffff;" (return "return") (number_literal "0xffffffffffffffff") (; ";")) (} "}"))) (expression_statement "uVar1 = param_1[1];" (assignment_expression "uVar1 = param_1[1]" (identifier "uVar1") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if (param_3 < uVar1) {\n    lVar2 = *param_1;\n    do {\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    } while (param_3 != uVar1);\n  }" (if "if") (parenthesized_expression "(param_3 < uVar1)" (( "(") (binary_expression "param_3 < uVar1" (identifier "param_3") (< "<") (identifier "uVar1")) () ")")) (compound_statement "{\n    lVar2 = *param_1;\n    do {\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    } while (param_3 != uVar1);\n  }" ({ "{") (expression_statement "lVar2 = *param_1;" (assignment_expression "lVar2 = *param_1" (identifier "lVar2") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (do_statement "do {\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    } while (param_3 != uVar1);" (do "do") (compound_statement "{\n      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);\n      if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }\n      param_3 = param_3 + 1;\n    }" ({ "{") (expression_statement "pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);" (assignment_expression "pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4)" (identifier "pvVar3") (= "=") (call_expression "memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4)" (identifier "memchr") (argument_list "(param_2,(int)*(char *)(lVar2 + param_3),param_4)" (( "(") (identifier "param_2") (, ",") (cast_expression "(int)*(char *)(lVar2 + param_3)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*(char *)(lVar2 + param_3)" (* "*") (cast_expression "(char *)(lVar2 + param_3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar2 + param_3)" (( "(") (binary_expression "lVar2 + param_3" (identifier "lVar2") (+ "+") (identifier "param_3")) () ")"))))) (, ",") (identifier "param_4") () ")")))) (; ";")) (if_statement "if (pvVar3 != (void *)0x0) {\n        return param_3;\n      }" (if "if") (parenthesized_expression "(pvVar3 != (void *)0x0)" (( "(") (binary_expression "pvVar3 != (void *)0x0" (identifier "pvVar3") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        return param_3;\n      }" ({ "{") (return_statement "return param_3;" (return "return") (identifier "param_3") (; ";")) (} "}"))) (expression_statement "param_3 = param_3 + 1;" (assignment_expression "param_3 = param_3 + 1" (identifier "param_3") (= "=") (binary_expression "param_3 + 1" (identifier "param_3") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_3 != uVar1)" (( "(") (binary_expression "param_3 != uVar1" (identifier "param_3") (!= "!=") (identifier "uVar1")) () ")")) (; ";")) (} "}"))) (return_statement "return 0xffffffffffffffff;" (return "return") (number_literal "0xffffffffffffffff") (; ";")) (} "}")))

/* std::string::find_first_of(char const*, unsigned long, unsigned long) const */

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

{
  type_1 var_4;
  long var_6;
  void *var_7;
  
  if (var_1 == 0) {
    return 0xffffffffffffffff;
  }
  var_4 = *(type_1 *)(var_2 + 8);
  if (var_3 < var_4) {
    var_6 = *(long *)var_2;
    do {
      var_7 = var_5(param_1,(int)*(char *)(var_6 + var_3),var_1);
      if (var_7 != (void *)0x0) {
        return var_3;
      }
      var_3 = var_3 + 1;
    } while (var_3 != var_4);
  }
  return 0xffffffffffffffff;
}


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

ulong MASKED(long *param_1,void *param_2,ulong param_3,size_t param_4)

{
  ulong uVar1;
  long lVar2;
  void *pvVar3;
  
  if (param_4 == 0) {
    return 0xffffffffffffffff;
  }
  uVar1 = param_1[1];
  if (param_3 < uVar1) {
    lVar2 = *param_1;
    do {
      pvVar3 = memchr(param_2,(int)*(char *)(lVar2 + param_3),param_4);
      if (pvVar3 != (void *)0x0) {
        return param_3;
      }
      param_3 = param_3 + 1;
    } while (param_3 != uVar1);
  }
  return 0xffffffffffffffff;
}

