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

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

{
}



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

uint FUN_00430270(int *param_1,wchar_t *param_2,uint param_3,uint param_4)

{
  int iVar1;
  uint uVar2;
  wchar_t __c;
  wchar_t *pwVar3;
  int iVar4;
  size_t __n;
  uint uVar5;
  
  iVar1 = *param_1;
  uVar2 = *(uint *)(iVar1 + -0xc);
  if (param_4 == 0) {
    uVar5 = 0xffffffff;
    if (param_3 <= uVar2) {
      uVar5 = param_3;
    }
    return uVar5;
  }
  if ((param_3 < uVar2) && (param_4 <= uVar2 - param_3)) {
    __n = (uVar2 - param_3) + (1 - param_4);
    if (__n != 0) {
      __c = *param_2;
      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);
      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {
        iVar4 = wmemcmp(pwVar3,param_2,param_4);
        if (iVar4 == 0) {
          return (int)pwVar3 - iVar1 >> 2;
        }
        pwVar3 = pwVar3 + 1;
        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;
        if (uVar5 < param_4) {
          return 0xffffffff;
        }
        __n = uVar5 + (1 - param_4);
        if (__n == 0) {
          return 0xffffffff;
        }
      }
    }
  }
  return 0xffffffff;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00050b50
ADD EBX,0x1b9d87
SUB ESP,0x1c
MOV EAX,dword ptr [ESP + 0x30]
MOV ECX,dword ptr [ESP + 0x38]
MOV ESI,dword ptr [EAX]
MOV EAX,dword ptr [ESP + 0x3c]
MOV EDI,dword ptr [ESI + -0xc]
TEST EAX,EAX
JZ 0x00430328
MOV EAX,0xffffffff
CMP EDI,ECX
JBE 0x0043031c
MOV EDX,EDI
SUB EDX,ECX
CMP dword ptr [ESP + 0x3c],EDX
JA 0x0043031c
MOV EBP,0x1
SUB EBP,dword ptr [ESP + 0x3c]
ADD EDX,EBP
JZ 0x0043031c
MOV EAX,dword ptr [ESP + 0x34]
MOV dword ptr [ESP + 0xc],ESI
MOV EAX,dword ptr [EAX]
MOV dword ptr [ESP + 0x4],EAX
LEA EAX,[ESI + ECX*0x4]
LEA ECX,[ESI + EDI*0x4]
MOV EDI,dword ptr [ESP + 0x3c]
MOV dword ptr [ESP + 0x8],ECX
SUB ESP,0x4
PUSH EDX
PUSH dword ptr [ESP + 0xc]
PUSH EAX
CALL 0x00039a30
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JZ 0x00430317
SUB ESP,0x4
PUSH EDI
PUSH dword ptr [ESP + 0x3c]
PUSH EAX
CALL 0x000399a0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00430340
MOV EDX,dword ptr [ESP + 0x8]
LEA EAX,[ESI + 0x4]
SUB EDX,EAX
SAR EDX,0x2
CMP EDI,EDX
JA 0x00430317
ADD EDX,EBP
JNZ 0x004302d7
MOV EAX,0xffffffff
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP EDI,ECX
MOV EAX,0xffffffff
CMOVNC EAX,ECX
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDI,ESI
MOV ESI,dword ptr [ESP + 0xc]
MOV EAX,EDI
SUB EAX,ESI
SAR EAX,0x2
JMP 0x0043031c
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint FUN_00430270(int *param_1,wchar_t *param_2,uint param_3,uint param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  wchar_t __c;\n  wchar_t *pwVar3;\n  int iVar4;\n  size_t __n;\n  uint uVar5;\n  \n  iVar1 = *param_1;\n  uVar2 = *(uint *)(iVar1 + -0xc);\n  if (param_4 == 0) {\n    uVar5 = 0xffffffff;\n    if (param_3 <= uVar2) {\n      uVar5 = param_3;\n    }\n    return uVar5;\n  }\n  if ((param_3 < uVar2) && (param_4 <= uVar2 - param_3)) {\n    __n = (uVar2 - param_3) + (1 - param_4);\n    if (__n != 0) {\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }\n  }\n  return 0xffffffff;\n}\n\n" comment (function_definition "uint FUN_00430270(int *param_1,wchar_t *param_2,uint param_3,uint param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  wchar_t __c;\n  wchar_t *pwVar3;\n  int iVar4;\n  size_t __n;\n  uint uVar5;\n  \n  iVar1 = *param_1;\n  uVar2 = *(uint *)(iVar1 + -0xc);\n  if (param_4 == 0) {\n    uVar5 = 0xffffffff;\n    if (param_3 <= uVar2) {\n      uVar5 = param_3;\n    }\n    return uVar5;\n  }\n  if ((param_3 < uVar2) && (param_4 <= uVar2 - param_3)) {\n    __n = (uVar2 - param_3) + (1 - param_4);\n    if (__n != 0) {\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }\n  }\n  return 0xffffffff;\n}" type_identifier (function_declarator "FUN_00430270(int *param_1,wchar_t *param_2,uint param_3,uint param_4)" identifier (parameter_list "(int *param_1,wchar_t *param_2,uint param_3,uint param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  wchar_t __c;\n  wchar_t *pwVar3;\n  int iVar4;\n  size_t __n;\n  uint uVar5;\n  \n  iVar1 = *param_1;\n  uVar2 = *(uint *)(iVar1 + -0xc);\n  if (param_4 == 0) {\n    uVar5 = 0xffffffff;\n    if (param_3 <= uVar2) {\n      uVar5 = param_3;\n    }\n    return uVar5;\n  }\n  if ((param_3 < uVar2) && (param_4 <= uVar2 - param_3)) {\n    __n = (uVar2 - param_3) + (1 - param_4);\n    if (__n != 0) {\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }\n  }\n  return 0xffffffff;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "wchar_t __c;" type_identifier identifier ;) (declaration "wchar_t *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar2 = *(uint *)(iVar1 + -0xc);" (assignment_expression "uVar2 = *(uint *)(iVar1 + -0xc)" identifier = (pointer_expression "*(uint *)(iVar1 + -0xc)" * (cast_expression "(uint *)(iVar1 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + -0xc)" ( (binary_expression "iVar1 + -0xc" identifier + number_literal) ))))) ;) (if_statement "if (param_4 == 0) {\n    uVar5 = 0xffffffff;\n    if (param_3 <= uVar2) {\n      uVar5 = param_3;\n    }\n    return uVar5;\n  }" if (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar5 = 0xffffffff;\n    if (param_3 <= uVar2) {\n      uVar5 = param_3;\n    }\n    return uVar5;\n  }" { (expression_statement "uVar5 = 0xffffffff;" (assignment_expression "uVar5 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (param_3 <= uVar2) {\n      uVar5 = param_3;\n    }" if (parenthesized_expression "(param_3 <= uVar2)" ( (binary_expression "param_3 <= uVar2" identifier <= identifier) )) (compound_statement "{\n      uVar5 = param_3;\n    }" { (expression_statement "uVar5 = param_3;" (assignment_expression "uVar5 = param_3" identifier = identifier) ;) })) (return_statement "return uVar5;" return identifier ;) })) (if_statement "if ((param_3 < uVar2) && (param_4 <= uVar2 - param_3)) {\n    __n = (uVar2 - param_3) + (1 - param_4);\n    if (__n != 0) {\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }\n  }" if (parenthesized_expression "((param_3 < uVar2) && (param_4 <= uVar2 - param_3))" ( (binary_expression "(param_3 < uVar2) && (param_4 <= uVar2 - param_3)" (parenthesized_expression "(param_3 < uVar2)" ( (binary_expression "param_3 < uVar2" identifier < identifier) )) && (parenthesized_expression "(param_4 <= uVar2 - param_3)" ( (binary_expression "param_4 <= uVar2 - param_3" identifier <= (binary_expression "uVar2 - param_3" identifier - identifier)) ))) )) (compound_statement "{\n    __n = (uVar2 - param_3) + (1 - param_4);\n    if (__n != 0) {\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }\n  }" { (expression_statement "__n = (uVar2 - param_3) + (1 - param_4);" (assignment_expression "__n = (uVar2 - param_3) + (1 - param_4)" identifier = (binary_expression "(uVar2 - param_3) + (1 - param_4)" (parenthesized_expression "(uVar2 - param_3)" ( (binary_expression "uVar2 - param_3" identifier - identifier) )) + (parenthesized_expression "(1 - param_4)" ( (binary_expression "1 - param_4" number_literal - identifier) )))) ;) (if_statement "if (__n != 0) {\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }" { (expression_statement "__c = *param_2;" (assignment_expression "__c = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);" (assignment_expression "pwVar3 = (wchar_t *)(iVar1 + param_3 * 4)" identifier = (cast_expression "(wchar_t *)(iVar1 + param_3 * 4)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + param_3 * 4)" ( (binary_expression "iVar1 + param_3 * 4" identifier + (binary_expression "param_3 * 4" identifier * number_literal)) )))) ;) (while_statement "while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }" while (parenthesized_expression "(pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0)" ( (comma_expression "pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0" (assignment_expression "pwVar3 = wmemchr(pwVar3,__c,__n)" identifier = (call_expression "wmemchr(pwVar3,__c,__n)" identifier (argument_list "(pwVar3,__c,__n)" ( identifier , identifier , identifier )))) , (binary_expression "pwVar3 != (wchar_t *)0x0" identifier != (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) )) (compound_statement "{\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }" { (expression_statement "iVar4 = wmemcmp(pwVar3,param_2,param_4);" (assignment_expression "iVar4 = wmemcmp(pwVar3,param_2,param_4)" identifier = (call_expression "wmemcmp(pwVar3,param_2,param_4)" identifier (argument_list "(pwVar3,param_2,param_4)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n          return (int)pwVar3 - iVar1 >> 2;\n        }" { (return_statement "return (int)pwVar3 - iVar1 >> 2;" return (binary_expression "(int)pwVar3 - iVar1 >> 2" (binary_expression "(int)pwVar3 - iVar1" (cast_expression "(int)pwVar3" ( (type_descriptor "int" primitive_type) ) identifier) - identifier) >> number_literal) ;) })) (expression_statement "pwVar3 = pwVar3 + 1;" (assignment_expression "pwVar3 = pwVar3 + 1" identifier = (binary_expression "pwVar3 + 1" identifier + number_literal)) ;) (expression_statement "uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;" (assignment_expression "uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2" identifier = (binary_expression "(int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2" (cast_expression "(int)((iVar1 + uVar2 * 4) - (int)pwVar3)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((iVar1 + uVar2 * 4) - (int)pwVar3)" ( (binary_expression "(iVar1 + uVar2 * 4) - (int)pwVar3" (parenthesized_expression "(iVar1 + uVar2 * 4)" ( (binary_expression "iVar1 + uVar2 * 4" identifier + (binary_expression "uVar2 * 4" identifier * number_literal)) )) - (cast_expression "(int)pwVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) >> number_literal)) ;) (if_statement "if (uVar5 < param_4) {\n          return 0xffffffff;\n        }" if (parenthesized_expression "(uVar5 < param_4)" ( (binary_expression "uVar5 < param_4" identifier < identifier) )) (compound_statement "{\n          return 0xffffffff;\n        }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "__n = uVar5 + (1 - param_4);" (assignment_expression "__n = uVar5 + (1 - param_4)" identifier = (binary_expression "uVar5 + (1 - param_4)" identifier + (parenthesized_expression "(1 - param_4)" ( (binary_expression "1 - param_4" number_literal - identifier) )))) ;) (if_statement "if (__n == 0) {\n          return 0xffffffff;\n        }" if (parenthesized_expression "(__n == 0)" ( (binary_expression "__n == 0" identifier == number_literal) )) (compound_statement "{\n          return 0xffffffff;\n        }" { (return_statement "return 0xffffffff;" return number_literal ;) })) })) })) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::wstring::find(wchar_t const*, unsigned int, unsigned int) const */\n\nvoid std::wstring::find(wchar_t *param_1,uint param_2,uint param_3)\n\n{\n}\n\n" comment comment (function_definition "void std::wstring::find(wchar_t *param_1,uint param_2,uint param_3)\n\n{\n}" primitive_type (ERROR "std::wstring::" identifier : : identifier : :) (function_declarator "find(wchar_t *param_1,uint param_2,uint param_3)" identifier (parameter_list "(wchar_t *param_1,uint param_2,uint param_3)" ( (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}" { })))
(translation_unit "uint FUN_00430270(int *param_1,wchar_t *param_2,uint param_3,uint param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  wchar_t __c;\n  wchar_t *pwVar3;\n  int iVar4;\n  size_t __n;\n  uint uVar5;\n  \n  iVar1 = *param_1;\n  uVar2 = *(uint *)(iVar1 + -0xc);\n  if (param_4 == 0) {\n    uVar5 = 0xffffffff;\n    if (param_3 <= uVar2) {\n      uVar5 = param_3;\n    }\n    return uVar5;\n  }\n  if ((param_3 < uVar2) && (param_4 <= uVar2 - param_3)) {\n    __n = (uVar2 - param_3) + (1 - param_4);\n    if (__n != 0) {\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }\n  }\n  return 0xffffffff;\n}\n\n" (function_definition "uint FUN_00430270(int *param_1,wchar_t *param_2,uint param_3,uint param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  wchar_t __c;\n  wchar_t *pwVar3;\n  int iVar4;\n  size_t __n;\n  uint uVar5;\n  \n  iVar1 = *param_1;\n  uVar2 = *(uint *)(iVar1 + -0xc);\n  if (param_4 == 0) {\n    uVar5 = 0xffffffff;\n    if (param_3 <= uVar2) {\n      uVar5 = param_3;\n    }\n    return uVar5;\n  }\n  if ((param_3 < uVar2) && (param_4 <= uVar2 - param_3)) {\n    __n = (uVar2 - param_3) + (1 - param_4);\n    if (__n != 0) {\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }\n  }\n  return 0xffffffff;\n}" type_identifier (function_declarator "FUN_00430270(int *param_1,wchar_t *param_2,uint param_3,uint param_4)" identifier (parameter_list "(int *param_1,wchar_t *param_2,uint param_3,uint param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  wchar_t __c;\n  wchar_t *pwVar3;\n  int iVar4;\n  size_t __n;\n  uint uVar5;\n  \n  iVar1 = *param_1;\n  uVar2 = *(uint *)(iVar1 + -0xc);\n  if (param_4 == 0) {\n    uVar5 = 0xffffffff;\n    if (param_3 <= uVar2) {\n      uVar5 = param_3;\n    }\n    return uVar5;\n  }\n  if ((param_3 < uVar2) && (param_4 <= uVar2 - param_3)) {\n    __n = (uVar2 - param_3) + (1 - param_4);\n    if (__n != 0) {\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }\n  }\n  return 0xffffffff;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "wchar_t __c;" type_identifier identifier ;) (declaration "wchar_t *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar2 = *(uint *)(iVar1 + -0xc);" (assignment_expression "uVar2 = *(uint *)(iVar1 + -0xc)" identifier = (pointer_expression "*(uint *)(iVar1 + -0xc)" * (cast_expression "(uint *)(iVar1 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + -0xc)" ( (binary_expression "iVar1 + -0xc" identifier + number_literal) ))))) ;) (if_statement "if (param_4 == 0) {\n    uVar5 = 0xffffffff;\n    if (param_3 <= uVar2) {\n      uVar5 = param_3;\n    }\n    return uVar5;\n  }" if (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar5 = 0xffffffff;\n    if (param_3 <= uVar2) {\n      uVar5 = param_3;\n    }\n    return uVar5;\n  }" { (expression_statement "uVar5 = 0xffffffff;" (assignment_expression "uVar5 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (param_3 <= uVar2) {\n      uVar5 = param_3;\n    }" if (parenthesized_expression "(param_3 <= uVar2)" ( (binary_expression "param_3 <= uVar2" identifier <= identifier) )) (compound_statement "{\n      uVar5 = param_3;\n    }" { (expression_statement "uVar5 = param_3;" (assignment_expression "uVar5 = param_3" identifier = identifier) ;) })) (return_statement "return uVar5;" return identifier ;) })) (if_statement "if ((param_3 < uVar2) && (param_4 <= uVar2 - param_3)) {\n    __n = (uVar2 - param_3) + (1 - param_4);\n    if (__n != 0) {\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }\n  }" if (parenthesized_expression "((param_3 < uVar2) && (param_4 <= uVar2 - param_3))" ( (binary_expression "(param_3 < uVar2) && (param_4 <= uVar2 - param_3)" (parenthesized_expression "(param_3 < uVar2)" ( (binary_expression "param_3 < uVar2" identifier < identifier) )) && (parenthesized_expression "(param_4 <= uVar2 - param_3)" ( (binary_expression "param_4 <= uVar2 - param_3" identifier <= (binary_expression "uVar2 - param_3" identifier - identifier)) ))) )) (compound_statement "{\n    __n = (uVar2 - param_3) + (1 - param_4);\n    if (__n != 0) {\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }\n  }" { (expression_statement "__n = (uVar2 - param_3) + (1 - param_4);" (assignment_expression "__n = (uVar2 - param_3) + (1 - param_4)" identifier = (binary_expression "(uVar2 - param_3) + (1 - param_4)" (parenthesized_expression "(uVar2 - param_3)" ( (binary_expression "uVar2 - param_3" identifier - identifier) )) + (parenthesized_expression "(1 - param_4)" ( (binary_expression "1 - param_4" number_literal - identifier) )))) ;) (if_statement "if (__n != 0) {\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }" { (expression_statement "__c = *param_2;" (assignment_expression "__c = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);" (assignment_expression "pwVar3 = (wchar_t *)(iVar1 + param_3 * 4)" identifier = (cast_expression "(wchar_t *)(iVar1 + param_3 * 4)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + param_3 * 4)" ( (binary_expression "iVar1 + param_3 * 4" identifier + (binary_expression "param_3 * 4" identifier * number_literal)) )))) ;) (while_statement "while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }" while (parenthesized_expression "(pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0)" ( (comma_expression "pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0" (assignment_expression "pwVar3 = wmemchr(pwVar3,__c,__n)" identifier = (call_expression "wmemchr(pwVar3,__c,__n)" identifier (argument_list "(pwVar3,__c,__n)" ( identifier , identifier , identifier )))) , (binary_expression "pwVar3 != (wchar_t *)0x0" identifier != (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) )) (compound_statement "{\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }" { (expression_statement "iVar4 = wmemcmp(pwVar3,param_2,param_4);" (assignment_expression "iVar4 = wmemcmp(pwVar3,param_2,param_4)" identifier = (call_expression "wmemcmp(pwVar3,param_2,param_4)" identifier (argument_list "(pwVar3,param_2,param_4)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n          return (int)pwVar3 - iVar1 >> 2;\n        }" { (return_statement "return (int)pwVar3 - iVar1 >> 2;" return (binary_expression "(int)pwVar3 - iVar1 >> 2" (binary_expression "(int)pwVar3 - iVar1" (cast_expression "(int)pwVar3" ( (type_descriptor "int" primitive_type) ) identifier) - identifier) >> number_literal) ;) })) (expression_statement "pwVar3 = pwVar3 + 1;" (assignment_expression "pwVar3 = pwVar3 + 1" identifier = (binary_expression "pwVar3 + 1" identifier + number_literal)) ;) (expression_statement "uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;" (assignment_expression "uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2" identifier = (binary_expression "(int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2" (cast_expression "(int)((iVar1 + uVar2 * 4) - (int)pwVar3)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((iVar1 + uVar2 * 4) - (int)pwVar3)" ( (binary_expression "(iVar1 + uVar2 * 4) - (int)pwVar3" (parenthesized_expression "(iVar1 + uVar2 * 4)" ( (binary_expression "iVar1 + uVar2 * 4" identifier + (binary_expression "uVar2 * 4" identifier * number_literal)) )) - (cast_expression "(int)pwVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) >> number_literal)) ;) (if_statement "if (uVar5 < param_4) {\n          return 0xffffffff;\n        }" if (parenthesized_expression "(uVar5 < param_4)" ( (binary_expression "uVar5 < param_4" identifier < identifier) )) (compound_statement "{\n          return 0xffffffff;\n        }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "__n = uVar5 + (1 - param_4);" (assignment_expression "__n = uVar5 + (1 - param_4)" identifier = (binary_expression "uVar5 + (1 - param_4)" identifier + (parenthesized_expression "(1 - param_4)" ( (binary_expression "1 - param_4" number_literal - identifier) )))) ;) (if_statement "if (__n == 0) {\n          return 0xffffffff;\n        }" if (parenthesized_expression "(__n == 0)" ( (binary_expression "__n == 0" identifier == number_literal) )) (compound_statement "{\n          return 0xffffffff;\n        }" { (return_statement "return 0xffffffff;" return number_literal ;) })) })) })) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * 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 { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (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 { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT - IDENT) )) + (parenthesized_expression ( (binary_expression LIT - IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) ;) (while_statement while (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) , (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - IDENT) >> LIT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression 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)) )) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) >> LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (parenthesized_expression ( (binary_expression LIT - IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) })) })) })) (return_statement return LIT ;) })))
(function_definition "uint FUN_00430270(int *param_1,wchar_t *param_2,uint param_3,uint param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  wchar_t __c;\n  wchar_t *pwVar3;\n  int iVar4;\n  size_t __n;\n  uint uVar5;\n  \n  iVar1 = *param_1;\n  uVar2 = *(uint *)(iVar1 + -0xc);\n  if (param_4 == 0) {\n    uVar5 = 0xffffffff;\n    if (param_3 <= uVar2) {\n      uVar5 = param_3;\n    }\n    return uVar5;\n  }\n  if ((param_3 < uVar2) && (param_4 <= uVar2 - param_3)) {\n    __n = (uVar2 - param_3) + (1 - param_4);\n    if (__n != 0) {\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }\n  }\n  return 0xffffffff;\n}" (type_identifier "uint") (function_declarator "FUN_00430270(int *param_1,wchar_t *param_2,uint param_3,uint param_4)" (identifier "FUN_00430270") (parameter_list "(int *param_1,wchar_t *param_2,uint param_3,uint param_4)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "wchar_t *param_2" (type_identifier "wchar_t") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "uint param_4" (type_identifier "uint") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  wchar_t __c;\n  wchar_t *pwVar3;\n  int iVar4;\n  size_t __n;\n  uint uVar5;\n  \n  iVar1 = *param_1;\n  uVar2 = *(uint *)(iVar1 + -0xc);\n  if (param_4 == 0) {\n    uVar5 = 0xffffffff;\n    if (param_3 <= uVar2) {\n      uVar5 = param_3;\n    }\n    return uVar5;\n  }\n  if ((param_3 < uVar2) && (param_4 <= uVar2 - param_3)) {\n    __n = (uVar2 - param_3) + (1 - param_4);\n    if (__n != 0) {\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }\n  }\n  return 0xffffffff;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "wchar_t __c;" (type_identifier "wchar_t") (identifier "__c") (; ";")) (declaration "wchar_t *pwVar3;" (type_identifier "wchar_t") (pointer_declarator "*pwVar3" (* "*") (identifier "pwVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" (identifier "iVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "uVar2 = *(uint *)(iVar1 + -0xc);" (assignment_expression "uVar2 = *(uint *)(iVar1 + -0xc)" (identifier "uVar2") (= "=") (pointer_expression "*(uint *)(iVar1 + -0xc)" (* "*") (cast_expression "(uint *)(iVar1 + -0xc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + -0xc)" (( "(") (binary_expression "iVar1 + -0xc" (identifier "iVar1") (+ "+") (number_literal "-0xc")) () ")"))))) (; ";")) (if_statement "if (param_4 == 0) {\n    uVar5 = 0xffffffff;\n    if (param_3 <= uVar2) {\n      uVar5 = param_3;\n    }\n    return uVar5;\n  }" (if "if") (parenthesized_expression "(param_4 == 0)" (( "(") (binary_expression "param_4 == 0" (identifier "param_4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar5 = 0xffffffff;\n    if (param_3 <= uVar2) {\n      uVar5 = param_3;\n    }\n    return uVar5;\n  }" ({ "{") (expression_statement "uVar5 = 0xffffffff;" (assignment_expression "uVar5 = 0xffffffff" (identifier "uVar5") (= "=") (number_literal "0xffffffff")) (; ";")) (if_statement "if (param_3 <= uVar2) {\n      uVar5 = param_3;\n    }" (if "if") (parenthesized_expression "(param_3 <= uVar2)" (( "(") (binary_expression "param_3 <= uVar2" (identifier "param_3") (<= "<=") (identifier "uVar2")) () ")")) (compound_statement "{\n      uVar5 = param_3;\n    }" ({ "{") (expression_statement "uVar5 = param_3;" (assignment_expression "uVar5 = param_3" (identifier "uVar5") (= "=") (identifier "param_3")) (; ";")) (} "}"))) (return_statement "return uVar5;" (return "return") (identifier "uVar5") (; ";")) (} "}"))) (if_statement "if ((param_3 < uVar2) && (param_4 <= uVar2 - param_3)) {\n    __n = (uVar2 - param_3) + (1 - param_4);\n    if (__n != 0) {\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }\n  }" (if "if") (parenthesized_expression "((param_3 < uVar2) && (param_4 <= uVar2 - param_3))" (( "(") (binary_expression "(param_3 < uVar2) && (param_4 <= uVar2 - param_3)" (parenthesized_expression "(param_3 < uVar2)" (( "(") (binary_expression "param_3 < uVar2" (identifier "param_3") (< "<") (identifier "uVar2")) () ")")) (&& "&&") (parenthesized_expression "(param_4 <= uVar2 - param_3)" (( "(") (binary_expression "param_4 <= uVar2 - param_3" (identifier "param_4") (<= "<=") (binary_expression "uVar2 - param_3" (identifier "uVar2") (- "-") (identifier "param_3"))) () ")"))) () ")")) (compound_statement "{\n    __n = (uVar2 - param_3) + (1 - param_4);\n    if (__n != 0) {\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }\n  }" ({ "{") (expression_statement "__n = (uVar2 - param_3) + (1 - param_4);" (assignment_expression "__n = (uVar2 - param_3) + (1 - param_4)" (identifier "__n") (= "=") (binary_expression "(uVar2 - param_3) + (1 - param_4)" (parenthesized_expression "(uVar2 - param_3)" (( "(") (binary_expression "uVar2 - param_3" (identifier "uVar2") (- "-") (identifier "param_3")) () ")")) (+ "+") (parenthesized_expression "(1 - param_4)" (( "(") (binary_expression "1 - param_4" (number_literal "1") (- "-") (identifier "param_4")) () ")")))) (; ";")) (if_statement "if (__n != 0) {\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }" (if "if") (parenthesized_expression "(__n != 0)" (( "(") (binary_expression "__n != 0" (identifier "__n") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      __c = *param_2;\n      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);\n      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }\n    }" ({ "{") (expression_statement "__c = *param_2;" (assignment_expression "__c = *param_2" (identifier "__c") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (expression_statement "pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);" (assignment_expression "pwVar3 = (wchar_t *)(iVar1 + param_3 * 4)" (identifier "pwVar3") (= "=") (cast_expression "(wchar_t *)(iVar1 + param_3 * 4)" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + param_3 * 4)" (( "(") (binary_expression "iVar1 + param_3 * 4" (identifier "iVar1") (+ "+") (binary_expression "param_3 * 4" (identifier "param_3") (* "*") (number_literal "4"))) () ")")))) (; ";")) (while_statement "while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }" (while "while") (parenthesized_expression "(pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0)" (( "(") (comma_expression "pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0" (assignment_expression "pwVar3 = wmemchr(pwVar3,__c,__n)" (identifier "pwVar3") (= "=") (call_expression "wmemchr(pwVar3,__c,__n)" (identifier "wmemchr") (argument_list "(pwVar3,__c,__n)" (( "(") (identifier "pwVar3") (, ",") (identifier "__c") (, ",") (identifier "__n") () ")")))) (, ",") (binary_expression "pwVar3 != (wchar_t *)0x0" (identifier "pwVar3") (!= "!=") (cast_expression "(wchar_t *)0x0" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")))) () ")")) (compound_statement "{\n        iVar4 = wmemcmp(pwVar3,param_2,param_4);\n        if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }\n        pwVar3 = pwVar3 + 1;\n        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;\n        if (uVar5 < param_4) {\n          return 0xffffffff;\n        }\n        __n = uVar5 + (1 - param_4);\n        if (__n == 0) {\n          return 0xffffffff;\n        }\n      }" ({ "{") (expression_statement "iVar4 = wmemcmp(pwVar3,param_2,param_4);" (assignment_expression "iVar4 = wmemcmp(pwVar3,param_2,param_4)" (identifier "iVar4") (= "=") (call_expression "wmemcmp(pwVar3,param_2,param_4)" (identifier "wmemcmp") (argument_list "(pwVar3,param_2,param_4)" (( "(") (identifier "pwVar3") (, ",") (identifier "param_2") (, ",") (identifier "param_4") () ")")))) (; ";")) (if_statement "if (iVar4 == 0) {\n          return (int)pwVar3 - iVar1 >> 2;\n        }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          return (int)pwVar3 - iVar1 >> 2;\n        }" ({ "{") (return_statement "return (int)pwVar3 - iVar1 >> 2;" (return "return") (binary_expression "(int)pwVar3 - iVar1 >> 2" (binary_expression "(int)pwVar3 - iVar1" (cast_expression "(int)pwVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pwVar3")) (- "-") (identifier "iVar1")) (>> ">>") (number_literal "2")) (; ";")) (} "}"))) (expression_statement "pwVar3 = pwVar3 + 1;" (assignment_expression "pwVar3 = pwVar3 + 1" (identifier "pwVar3") (= "=") (binary_expression "pwVar3 + 1" (identifier "pwVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;" (assignment_expression "uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2" (identifier "uVar5") (= "=") (binary_expression "(int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2" (cast_expression "(int)((iVar1 + uVar2 * 4) - (int)pwVar3)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((iVar1 + uVar2 * 4) - (int)pwVar3)" (( "(") (binary_expression "(iVar1 + uVar2 * 4) - (int)pwVar3" (parenthesized_expression "(iVar1 + uVar2 * 4)" (( "(") (binary_expression "iVar1 + uVar2 * 4" (identifier "iVar1") (+ "+") (binary_expression "uVar2 * 4" (identifier "uVar2") (* "*") (number_literal "4"))) () ")")) (- "-") (cast_expression "(int)pwVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pwVar3"))) () ")"))) (>> ">>") (number_literal "2"))) (; ";")) (if_statement "if (uVar5 < param_4) {\n          return 0xffffffff;\n        }" (if "if") (parenthesized_expression "(uVar5 < param_4)" (( "(") (binary_expression "uVar5 < param_4" (identifier "uVar5") (< "<") (identifier "param_4")) () ")")) (compound_statement "{\n          return 0xffffffff;\n        }" ({ "{") (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (expression_statement "__n = uVar5 + (1 - param_4);" (assignment_expression "__n = uVar5 + (1 - param_4)" (identifier "__n") (= "=") (binary_expression "uVar5 + (1 - param_4)" (identifier "uVar5") (+ "+") (parenthesized_expression "(1 - param_4)" (( "(") (binary_expression "1 - param_4" (number_literal "1") (- "-") (identifier "param_4")) () ")")))) (; ";")) (if_statement "if (__n == 0) {\n          return 0xffffffff;\n        }" (if "if") (parenthesized_expression "(__n == 0)" (( "(") (binary_expression "__n == 0" (identifier "__n") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          return 0xffffffff;\n        }" ({ "{") (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (} "}"))) (} "}"))) (} "}"))) (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}")))

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

void std::wstring::function_1(type_1 *param_1,type_2 param_2,type_2 param_3)

{
}


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

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

uint MASKED(int *param_1,wchar_t *param_2,uint param_3,uint param_4)

{
  int iVar1;
  uint uVar2;
  wchar_t __c;
  wchar_t *pwVar3;
  int iVar4;
  size_t __n;
  uint uVar5;
  
  iVar1 = *param_1;
  uVar2 = *(uint *)(iVar1 + -0xc);
  if (param_4 == 0) {
    uVar5 = 0xffffffff;
    if (param_3 <= uVar2) {
      uVar5 = param_3;
    }
    return uVar5;
  }
  if ((param_3 < uVar2) && (param_4 <= uVar2 - param_3)) {
    __n = (uVar2 - param_3) + (1 - param_4);
    if (__n != 0) {
      __c = *param_2;
      pwVar3 = (wchar_t *)(iVar1 + param_3 * 4);
      while (pwVar3 = wmemchr(pwVar3,__c,__n), pwVar3 != (wchar_t *)0x0) {
        iVar4 = wmemcmp(pwVar3,param_2,param_4);
        if (iVar4 == 0) {
          return (int)pwVar3 - iVar1 >> 2;
        }
        pwVar3 = pwVar3 + 1;
        uVar5 = (int)((iVar1 + uVar2 * 4) - (int)pwVar3) >> 2;
        if (uVar5 < param_4) {
          return 0xffffffff;
        }
        __n = uVar5 + (1 - param_4);
        if (__n == 0) {
          return 0xffffffff;
        }
      }
    }
  }
  return 0xffffffff;
}

