
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::string::find(char, unsigned int) const */

int __thiscall std::string::find(string *this,char param_1,uint param_2)

{
  int iVar1;
  void *pvVar2;
  int iVar3;
  
  iVar3 = -1;
  if (param_2 < *(uint *)(this + 4)) {
    iVar1 = *(int *)this;
    pvVar2 = memchr((void *)(param_2 + iVar1),(int)param_1,*(uint *)(this + 4) - param_2);
    if (pvVar2 != (void *)0x0) {
      iVar3 = (int)pvVar2 - iVar1;
    }
  }
  return iVar3;
}



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

int FUN_001f0c20(int *param_1,char param_2,uint param_3)

{
  int iVar1;
  void *pvVar2;
  int iVar3;
  
  iVar3 = -1;
  if (param_3 < (uint)param_1[1]) {
    iVar1 = *param_1;
    pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);
    if (pvVar2 != (void *)0x0) {
      iVar3 = (int)pvVar2 - iVar1;
    }
  }
  return iVar3;
}


PUSH EDI
PUSH ESI
MOV ESI,0xffffffff
PUSH EBX
MOV EDI,dword ptr [ESP + 0x10]
CALL 0x00035840
ADD EBX,0x19e3cf
MOV EAX,dword ptr [ESP + 0x18]
MOV ECX,dword ptr [ESP + 0x14]
MOV EDX,dword ptr [EDI + 0x4]
CMP EAX,EDX
JNC 0x001f0c66
MOV EDI,dword ptr [EDI]
SUB ESP,0x4
SUB EDX,EAX
MOVSX ECX,CL
PUSH EDX
ADD EAX,EDI
PUSH ECX
PUSH EAX
CALL 0x00029970
ADD ESP,0x10
MOV EDX,EAX
SUB EDX,EDI
TEST EAX,EAX
CMOVNZ ESI,EDX
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_001f0c20(int *param_1,char param_2,uint param_3)\n\n{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  \n  iVar3 = -1;\n  if (param_3 < (uint)param_1[1]) {\n    iVar1 = *param_1;\n    pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }\n  return iVar3;\n}\n\n" comment (function_definition "int FUN_001f0c20(int *param_1,char param_2,uint param_3)\n\n{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  \n  iVar3 = -1;\n  if (param_3 < (uint)param_1[1]) {\n    iVar1 = *param_1;\n    pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }\n  return iVar3;\n}" primitive_type (function_declarator "FUN_001f0c20(int *param_1,char param_2,uint param_3)" identifier (parameter_list "(int *param_1,char param_2,uint param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  \n  iVar3 = -1;\n  if (param_3 < (uint)param_1[1]) {\n    iVar1 = *param_1;\n    pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }\n  return iVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar3 = -1;" (assignment_expression "iVar3 = -1" identifier = number_literal) ;) (if_statement "if (param_3 < (uint)param_1[1]) {\n    iVar1 = *param_1;\n    pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }" if (parenthesized_expression "(param_3 < (uint)param_1[1])" ( (binary_expression "param_3 < (uint)param_1[1]" identifier < (cast_expression "(uint)param_1[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) )) (compound_statement "{\n    iVar1 = *param_1;\n    pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }" { (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);" (assignment_expression "pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3)" identifier = (call_expression "memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3)" identifier (argument_list "((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3)" ( (cast_expression "(void *)(param_3 + iVar1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + iVar1)" ( (binary_expression "param_3 + iVar1" identifier + identifier) ))) , (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) , (binary_expression "param_1[1] - param_3" (subscript_expression "param_1[1]" identifier [ number_literal ]) - identifier) )))) ;) (if_statement "if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }" if (parenthesized_expression "(pvVar2 != (void *)0x0)" ( (binary_expression "pvVar2 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar3 = (int)pvVar2 - iVar1;\n    }" { (expression_statement "iVar3 = (int)pvVar2 - iVar1;" (assignment_expression "iVar3 = (int)pvVar2 - iVar1" identifier = (binary_expression "(int)pvVar2 - iVar1" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) - identifier)) ;) })) })) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::string::find(char, unsigned int) const */\n\nint __thiscall std::string::find(string *this,char param_1,uint param_2)\n\n{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  \n  iVar3 = -1;\n  if (param_2 < *(uint *)(this + 4)) {\n    iVar1 = *(int *)this;\n    pvVar2 = memchr((void *)(param_2 + iVar1),(int)param_1,*(uint *)(this + 4) - param_2);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }\n  return iVar3;\n}\n\n" comment comment (function_definition "int __thiscall std::string::find(string *this,char param_1,uint param_2)\n\n{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  \n  iVar3 = -1;\n  if (param_2 < *(uint *)(this + 4)) {\n    iVar1 = *(int *)this;\n    pvVar2 = memchr((void *)(param_2 + iVar1),(int)param_1,*(uint *)(this + 4) - param_2);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }\n  return iVar3;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::string::" identifier : : identifier : :) (function_declarator "find(string *this,char param_1,uint param_2)" identifier (parameter_list "(string *this,char param_1,uint param_2)" ( (parameter_declaration "string *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "char param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  \n  iVar3 = -1;\n  if (param_2 < *(uint *)(this + 4)) {\n    iVar1 = *(int *)this;\n    pvVar2 = memchr((void *)(param_2 + iVar1),(int)param_1,*(uint *)(this + 4) - param_2);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }\n  return iVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar3 = -1;" (assignment_expression "iVar3 = -1" identifier = number_literal) ;) (if_statement "if (param_2 < *(uint *)(this + 4)) {\n    iVar1 = *(int *)this;\n    pvVar2 = memchr((void *)(param_2 + iVar1),(int)param_1,*(uint *)(this + 4) - param_2);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }" if (parenthesized_expression "(param_2 < *(uint *)(this + 4))" ( (binary_expression "param_2 < *(uint *)(this + 4)" identifier < (pointer_expression "*(uint *)(this + 4)" * (cast_expression "(uint *)(this + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) ))))) )) (compound_statement "{\n    iVar1 = *(int *)this;\n    pvVar2 = memchr((void *)(param_2 + iVar1),(int)param_1,*(uint *)(this + 4) - param_2);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }" { (expression_statement "iVar1 = *(int *)this;" (assignment_expression "iVar1 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "pvVar2 = memchr((void *)(param_2 + iVar1),(int)param_1,*(uint *)(this + 4) - param_2);" (assignment_expression "pvVar2 = memchr((void *)(param_2 + iVar1),(int)param_1,*(uint *)(this + 4) - param_2)" identifier = (call_expression "memchr((void *)(param_2 + iVar1),(int)param_1,*(uint *)(this + 4) - param_2)" identifier (argument_list "((void *)(param_2 + iVar1),(int)param_1,*(uint *)(this + 4) - param_2)" ( (cast_expression "(void *)(param_2 + iVar1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + iVar1)" ( (binary_expression "param_2 + iVar1" identifier + identifier) ))) , (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) , (binary_expression "*(uint *)(this + 4) - param_2" (pointer_expression "*(uint *)(this + 4)" * (cast_expression "(uint *)(this + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) - identifier) )))) ;) (if_statement "if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }" if (parenthesized_expression "(pvVar2 != (void *)0x0)" ( (binary_expression "pvVar2 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar3 = (int)pvVar2 - iVar1;\n    }" { (expression_statement "iVar3 = (int)pvVar2 - iVar1;" (assignment_expression "iVar3 = (int)pvVar2 - iVar1" identifier = (binary_expression "(int)pvVar2 - iVar1" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) - identifier)) ;) })) })) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "int FUN_001f0c20(int *param_1,char param_2,uint param_3)\n\n{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  \n  iVar3 = -1;\n  if (param_3 < (uint)param_1[1]) {\n    iVar1 = *param_1;\n    pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }\n  return iVar3;\n}\n\n" (function_definition "int FUN_001f0c20(int *param_1,char param_2,uint param_3)\n\n{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  \n  iVar3 = -1;\n  if (param_3 < (uint)param_1[1]) {\n    iVar1 = *param_1;\n    pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }\n  return iVar3;\n}" primitive_type (function_declarator "FUN_001f0c20(int *param_1,char param_2,uint param_3)" identifier (parameter_list "(int *param_1,char param_2,uint param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char param_2" primitive_type identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  \n  iVar3 = -1;\n  if (param_3 < (uint)param_1[1]) {\n    iVar1 = *param_1;\n    pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }\n  return iVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *pvVar2;" primitive_type (pointer_declarator "*pvVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar3 = -1;" (assignment_expression "iVar3 = -1" identifier = number_literal) ;) (if_statement "if (param_3 < (uint)param_1[1]) {\n    iVar1 = *param_1;\n    pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }" if (parenthesized_expression "(param_3 < (uint)param_1[1])" ( (binary_expression "param_3 < (uint)param_1[1]" identifier < (cast_expression "(uint)param_1[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) )) (compound_statement "{\n    iVar1 = *param_1;\n    pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }" { (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);" (assignment_expression "pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3)" identifier = (call_expression "memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3)" identifier (argument_list "((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3)" ( (cast_expression "(void *)(param_3 + iVar1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + iVar1)" ( (binary_expression "param_3 + iVar1" identifier + identifier) ))) , (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) , (binary_expression "param_1[1] - param_3" (subscript_expression "param_1[1]" identifier [ number_literal ]) - identifier) )))) ;) (if_statement "if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }" if (parenthesized_expression "(pvVar2 != (void *)0x0)" ( (binary_expression "pvVar2 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar3 = (int)pvVar2 - iVar1;\n    }" { (expression_statement "iVar3 = (int)pvVar2 - iVar1;" (assignment_expression "iVar3 = (int)pvVar2 - iVar1" identifier = (binary_expression "(int)pvVar2 - iVar1" (cast_expression "(int)pvVar2" ( (type_descriptor "int" primitive_type) ) identifier) - identifier)) ;) })) })) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))) , (cast_expression ( (type_descriptor TYPE) ) IDENT) , (binary_expression (subscript_expression IDENT [ LIT ]) - IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - IDENT)) ;) })) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_001f0c20(int *param_1,char param_2,uint param_3)\n\n{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  \n  iVar3 = -1;\n  if (param_3 < (uint)param_1[1]) {\n    iVar1 = *param_1;\n    pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }\n  return iVar3;\n}" (primitive_type "int") (function_declarator "FUN_001f0c20(int *param_1,char param_2,uint param_3)" (identifier "FUN_001f0c20") (parameter_list "(int *param_1,char param_2,uint param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "char param_2" (primitive_type "char") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  void *pvVar2;\n  int iVar3;\n  \n  iVar3 = -1;\n  if (param_3 < (uint)param_1[1]) {\n    iVar1 = *param_1;\n    pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }\n  return iVar3;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "void *pvVar2;" (primitive_type "void") (pointer_declarator "*pvVar2" (* "*") (identifier "pvVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "iVar3 = -1;" (assignment_expression "iVar3 = -1" (identifier "iVar3") (= "=") (number_literal "-1")) (; ";")) (if_statement "if (param_3 < (uint)param_1[1]) {\n    iVar1 = *param_1;\n    pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }" (if "if") (parenthesized_expression "(param_3 < (uint)param_1[1])" (( "(") (binary_expression "param_3 < (uint)param_1[1]" (identifier "param_3") (< "<") (cast_expression "(uint)param_1[1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")))) () ")")) (compound_statement "{\n    iVar1 = *param_1;\n    pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);\n    if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }\n  }" ({ "{") (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" (identifier "iVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);" (assignment_expression "pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3)" (identifier "pvVar2") (= "=") (call_expression "memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3)" (identifier "memchr") (argument_list "((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3)" (( "(") (cast_expression "(void *)(param_3 + iVar1)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + iVar1)" (( "(") (binary_expression "param_3 + iVar1" (identifier "param_3") (+ "+") (identifier "iVar1")) () ")"))) (, ",") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (, ",") (binary_expression "param_1[1] - param_3" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (- "-") (identifier "param_3")) () ")")))) (; ";")) (if_statement "if (pvVar2 != (void *)0x0) {\n      iVar3 = (int)pvVar2 - iVar1;\n    }" (if "if") (parenthesized_expression "(pvVar2 != (void *)0x0)" (( "(") (binary_expression "pvVar2 != (void *)0x0" (identifier "pvVar2") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      iVar3 = (int)pvVar2 - iVar1;\n    }" ({ "{") (expression_statement "iVar3 = (int)pvVar2 - iVar1;" (assignment_expression "iVar3 = (int)pvVar2 - iVar1" (identifier "iVar3") (= "=") (binary_expression "(int)pvVar2 - iVar1" (cast_expression "(int)pvVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar2")) (- "-") (identifier "iVar1"))) (; ";")) (} "}"))) (} "}"))) (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::string::find(char, unsigned int) const */

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

{
  int var_4;
  void *var_5;
  int iVar3;
  
  iVar3 = -1;
  if (var_1 < *(type_2 *)(var_2 + 4)) {
    var_4 = *(int *)var_2;
    var_5 = var_3((void *)(var_1 + var_4),(int)param_1,*(type_2 *)(var_2 + 4) - var_1);
    if (var_5 != (void *)0x0) {
      iVar3 = (int)var_5 - var_4;
    }
  }
  return iVar3;
}


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

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

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

{
  int iVar1;
  void *pvVar2;
  int iVar3;
  
  iVar3 = -1;
  if (param_3 < (uint)param_1[1]) {
    iVar1 = *param_1;
    pvVar2 = memchr((void *)(param_3 + iVar1),(int)param_2,param_1[1] - param_3);
    if (pvVar2 != (void *)0x0) {
      iVar3 = (int)pvVar2 - iVar1;
    }
  }
  return iVar3;
}

