
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

wchar_t * wstrstr(wchar_t *haystack,size_t hs_len,wchar_t *needle,size_t needle_len)

{
  wchar_t wVar1;
  int iVar2;
  uint uVar3;
  
  if (((haystack != (wchar_t *)0x0 && needle != (wchar_t *)0x0) && (needle_len <= hs_len)) &&
     (hs_len != 0)) {
    wVar1 = *needle;
    uVar3 = needle_len - 1;
    do {
      if (((*haystack == wVar1) && (uVar3 < hs_len)) &&
         ((haystack[needle_len - 1] == needle[needle_len - 1] &&
          (iVar2 = memcmp(haystack,needle,needle_len * 4), iVar2 == 0)))) {
        return haystack;
      }
      uVar3 = uVar3 + 1;
      haystack = haystack + 1;
    } while (uVar3 != (hs_len - 1) + needle_len);
  }
  return (wchar_t *)0x0;
}



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

int * FUN_00067860(int *param_1,uint param_2,int *param_3,uint param_4)

{
  int iVar1;
  int iVar2;
  uint uVar3;
  
  if (((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0))
  {
    iVar1 = *param_3;
    uVar3 = param_4 - 1;
    do {
      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&
         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&
          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {
        return param_1;
      }
      uVar3 = uVar3 + 1;
      param_1 = param_1 + 1;
    } while (uVar3 != (param_2 - 1) + param_4);
  }
  return (int *)0x0;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00016f50
ADD EBX,0x5747b
SUB ESP,0x2c
MOV ESI,dword ptr [ESP + 0x40]
MOV EAX,dword ptr [ESP + 0x48]
TEST ESI,ESI
SETZ DL
TEST EAX,EAX
SETZ AL
OR DL,AL
JNZ 0x00067940
MOV EAX,dword ptr [ESP + 0x44]
CMP dword ptr [ESP + 0x4c],EAX
JA 0x00067940
TEST EAX,EAX
JZ 0x00067940
MOV EAX,dword ptr [ESP + 0x48]
MOV EDI,dword ptr [ESP + 0x48]
MOV ECX,dword ptr [ESP + 0x4c]
MOV EDX,dword ptr [EAX]
MOV EAX,dword ptr [ESP + 0x4c]
LEA EAX,[EAX*0x4 + 0xfffffffc]
MOV dword ptr [ESP + 0xc],EDX
ADD EDI,EAX
ADD EAX,0x4
MOV dword ptr [ESP + 0x14],EAX
MOV EAX,dword ptr [ESP + 0x4c]
MOV dword ptr [ESP + 0x10],EDI
LEA EDI,[EAX + -0x1]
MOV EAX,dword ptr [ESP + 0x44]
MOV EBP,EDI
LEA ECX,[EAX + ECX*0x1 + -0x1]
MOV EDX,ECX
JMP 0x000678f2
ADD EBP,0x1
ADD ESI,0x4
CMP EBP,EDX
JZ 0x00067940
MOV EAX,dword ptr [ESP + 0xc]
CMP dword ptr [ESI],EAX
JNZ 0x000678e8
CMP dword ptr [ESP + 0x44],EBP
JBE 0x000678e8
MOV EAX,dword ptr [ESP + 0x4c]
MOV EDI,dword ptr [ESP + 0x10]
MOV EDI,dword ptr [EDI]
CMP dword ptr [ESI + EAX*0x4 + -0x4],EDI
JNZ 0x000678e8
MOV dword ptr [ESP + 0x1c],ESI
MOV dword ptr [ESP + 0x18],EDX
SUB ESP,0x4
PUSH dword ptr [ESP + 0x18]
PUSH dword ptr [ESP + 0x50]
PUSH ESI
CALL 0x00013f00
ADD ESP,0x10
TEST EAX,EAX
MOV EDX,dword ptr [ESP + 0x18]
MOV ECX,dword ptr [ESP + 0x1c]
JNZ 0x000678e8
MOV EBP,ECX
JMP 0x00067942
XOR EBP,EBP
ADD ESP,0x2c
MOV EAX,EBP
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint * FUN_00067860(int *param_1,uint param_2,int *param_3,uint param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0))\n  {\n    iVar1 = *param_3;\n    uVar3 = param_4 - 1;\n    do {\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    } while (uVar3 != (param_2 - 1) + param_4);\n  }\n  return (int *)0x0;\n}\n\n" comment (function_definition "int * FUN_00067860(int *param_1,uint param_2,int *param_3,uint param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0))\n  {\n    iVar1 = *param_3;\n    uVar3 = param_4 - 1;\n    do {\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    } while (uVar3 != (param_2 - 1) + param_4);\n  }\n  return (int *)0x0;\n}" primitive_type (pointer_declarator "* FUN_00067860(int *param_1,uint param_2,int *param_3,uint param_4)" * (function_declarator "FUN_00067860(int *param_1,uint param_2,int *param_3,uint param_4)" identifier (parameter_list "(int *param_1,uint param_2,int *param_3,uint param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "uint param_4" type_identifier identifier) )))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0))\n  {\n    iVar1 = *param_3;\n    uVar3 = param_4 - 1;\n    do {\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    } while (uVar3 != (param_2 - 1) + param_4);\n  }\n  return (int *)0x0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (if_statement "if (((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0))\n  {\n    iVar1 = *param_3;\n    uVar3 = param_4 - 1;\n    do {\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    } while (uVar3 != (param_2 - 1) + param_4);\n  }" if (parenthesized_expression "(((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0))" ( (binary_expression "((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0)" (parenthesized_expression "((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2))" ( (binary_expression "(param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)" (parenthesized_expression "(param_1 != (int *)0x0 && param_3 != (int *)0x0)" ( (binary_expression "param_1 != (int *)0x0 && param_3 != (int *)0x0" (binary_expression "param_1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) && (binary_expression "param_3 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) )) && (parenthesized_expression "(param_4 <= param_2)" ( (binary_expression "param_4 <= param_2" identifier <= identifier) ))) )) && (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) ))) )) (compound_statement "{\n    iVar1 = *param_3;\n    uVar3 = param_4 - 1;\n    do {\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    } while (uVar3 != (param_2 - 1) + param_4);\n  }" { (expression_statement "iVar1 = *param_3;" (assignment_expression "iVar1 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) (expression_statement "uVar3 = param_4 - 1;" (assignment_expression "uVar3 = param_4 - 1" identifier = (binary_expression "param_4 - 1" identifier - number_literal)) ;) (do_statement "do {\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    } while (uVar3 != (param_2 - 1) + param_4);" do (compound_statement "{\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    }" { (if_statement "if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }" if (parenthesized_expression "(((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0))))" ( (binary_expression "((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))" (parenthesized_expression "((*param_1 == iVar1) && (uVar3 < param_2))" ( (binary_expression "(*param_1 == iVar1) && (uVar3 < param_2)" (parenthesized_expression "(*param_1 == iVar1)" ( (binary_expression "*param_1 == iVar1" (pointer_expression "*param_1" * identifier) == identifier) )) && (parenthesized_expression "(uVar3 < param_2)" ( (binary_expression "uVar3 < param_2" identifier < identifier) ))) )) && (parenthesized_expression "((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))" ( (parenthesized_expression "(param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0))" ( (binary_expression "param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)" (binary_expression "param_1[param_4 - 1] == param_3[param_4 - 1]" (subscript_expression "param_1[param_4 - 1]" identifier [ (binary_expression "param_4 - 1" identifier - number_literal) ]) == (subscript_expression "param_3[param_4 - 1]" identifier [ (binary_expression "param_4 - 1" identifier - number_literal) ])) && (parenthesized_expression "(iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)" ( (comma_expression "iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0" (assignment_expression "iVar2 = memcmp(param_1,param_3,param_4 * 4)" identifier = (call_expression "memcmp(param_1,param_3,param_4 * 4)" identifier (argument_list "(param_1,param_3,param_4 * 4)" ( identifier , identifier , (binary_expression "param_4 * 4" identifier * number_literal) )))) , (binary_expression "iVar2 == 0" identifier == number_literal)) ))) )) ))) )) (compound_statement "{\n        return param_1;\n      }" { (return_statement "return param_1;" return identifier ;) })) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" identifier = (binary_expression "uVar3 + 1" identifier + number_literal)) ;) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar3 != (param_2 - 1) + param_4)" ( (binary_expression "uVar3 != (param_2 - 1) + param_4" identifier != (binary_expression "(param_2 - 1) + param_4" (parenthesized_expression "(param_2 - 1)" ( (binary_expression "param_2 - 1" identifier - number_literal) )) + identifier)) )) ;) })) (return_statement "return (int *)0x0;" return (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nwchar_t * wstrstr(wchar_t *haystack,size_t hs_len,wchar_t *needle,size_t needle_len)\n\n{\n  wchar_t wVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (((haystack != (wchar_t *)0x0 && needle != (wchar_t *)0x0) && (needle_len <= hs_len)) &&\n     (hs_len != 0)) {\n    wVar1 = *needle;\n    uVar3 = needle_len - 1;\n    do {\n      if (((*haystack == wVar1) && (uVar3 < hs_len)) &&\n         ((haystack[needle_len - 1] == needle[needle_len - 1] &&\n          (iVar2 = memcmp(haystack,needle,needle_len * 4), iVar2 == 0)))) {\n        return haystack;\n      }\n      uVar3 = uVar3 + 1;\n      haystack = haystack + 1;\n    } while (uVar3 != (hs_len - 1) + needle_len);\n  }\n  return (wchar_t *)0x0;\n}\n\n" comment comment (function_definition "wchar_t * wstrstr(wchar_t *haystack,size_t hs_len,wchar_t *needle,size_t needle_len)\n\n{\n  wchar_t wVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (((haystack != (wchar_t *)0x0 && needle != (wchar_t *)0x0) && (needle_len <= hs_len)) &&\n     (hs_len != 0)) {\n    wVar1 = *needle;\n    uVar3 = needle_len - 1;\n    do {\n      if (((*haystack == wVar1) && (uVar3 < hs_len)) &&\n         ((haystack[needle_len - 1] == needle[needle_len - 1] &&\n          (iVar2 = memcmp(haystack,needle,needle_len * 4), iVar2 == 0)))) {\n        return haystack;\n      }\n      uVar3 = uVar3 + 1;\n      haystack = haystack + 1;\n    } while (uVar3 != (hs_len - 1) + needle_len);\n  }\n  return (wchar_t *)0x0;\n}" type_identifier (pointer_declarator "* wstrstr(wchar_t *haystack,size_t hs_len,wchar_t *needle,size_t needle_len)" * (function_declarator "wstrstr(wchar_t *haystack,size_t hs_len,wchar_t *needle,size_t needle_len)" identifier (parameter_list "(wchar_t *haystack,size_t hs_len,wchar_t *needle,size_t needle_len)" ( (parameter_declaration "wchar_t *haystack" type_identifier (pointer_declarator "*haystack" * identifier)) , (parameter_declaration "size_t hs_len" primitive_type identifier) , (parameter_declaration "wchar_t *needle" type_identifier (pointer_declarator "*needle" * identifier)) , (parameter_declaration "size_t needle_len" primitive_type identifier) )))) (compound_statement "{\n  wchar_t wVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (((haystack != (wchar_t *)0x0 && needle != (wchar_t *)0x0) && (needle_len <= hs_len)) &&\n     (hs_len != 0)) {\n    wVar1 = *needle;\n    uVar3 = needle_len - 1;\n    do {\n      if (((*haystack == wVar1) && (uVar3 < hs_len)) &&\n         ((haystack[needle_len - 1] == needle[needle_len - 1] &&\n          (iVar2 = memcmp(haystack,needle,needle_len * 4), iVar2 == 0)))) {\n        return haystack;\n      }\n      uVar3 = uVar3 + 1;\n      haystack = haystack + 1;\n    } while (uVar3 != (hs_len - 1) + needle_len);\n  }\n  return (wchar_t *)0x0;\n}" { (declaration "wchar_t wVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (if_statement "if (((haystack != (wchar_t *)0x0 && needle != (wchar_t *)0x0) && (needle_len <= hs_len)) &&\n     (hs_len != 0)) {\n    wVar1 = *needle;\n    uVar3 = needle_len - 1;\n    do {\n      if (((*haystack == wVar1) && (uVar3 < hs_len)) &&\n         ((haystack[needle_len - 1] == needle[needle_len - 1] &&\n          (iVar2 = memcmp(haystack,needle,needle_len * 4), iVar2 == 0)))) {\n        return haystack;\n      }\n      uVar3 = uVar3 + 1;\n      haystack = haystack + 1;\n    } while (uVar3 != (hs_len - 1) + needle_len);\n  }" if (parenthesized_expression "(((haystack != (wchar_t *)0x0 && needle != (wchar_t *)0x0) && (needle_len <= hs_len)) &&\n     (hs_len != 0))" ( (binary_expression "((haystack != (wchar_t *)0x0 && needle != (wchar_t *)0x0) && (needle_len <= hs_len)) &&\n     (hs_len != 0)" (parenthesized_expression "((haystack != (wchar_t *)0x0 && needle != (wchar_t *)0x0) && (needle_len <= hs_len))" ( (binary_expression "(haystack != (wchar_t *)0x0 && needle != (wchar_t *)0x0) && (needle_len <= hs_len)" (parenthesized_expression "(haystack != (wchar_t *)0x0 && needle != (wchar_t *)0x0)" ( (binary_expression "haystack != (wchar_t *)0x0 && needle != (wchar_t *)0x0" (binary_expression "haystack != (wchar_t *)0x0" identifier != (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) && (binary_expression "needle != (wchar_t *)0x0" identifier != (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) )) && (parenthesized_expression "(needle_len <= hs_len)" ( (binary_expression "needle_len <= hs_len" identifier <= identifier) ))) )) && (parenthesized_expression "(hs_len != 0)" ( (binary_expression "hs_len != 0" identifier != number_literal) ))) )) (compound_statement "{\n    wVar1 = *needle;\n    uVar3 = needle_len - 1;\n    do {\n      if (((*haystack == wVar1) && (uVar3 < hs_len)) &&\n         ((haystack[needle_len - 1] == needle[needle_len - 1] &&\n          (iVar2 = memcmp(haystack,needle,needle_len * 4), iVar2 == 0)))) {\n        return haystack;\n      }\n      uVar3 = uVar3 + 1;\n      haystack = haystack + 1;\n    } while (uVar3 != (hs_len - 1) + needle_len);\n  }" { (expression_statement "wVar1 = *needle;" (assignment_expression "wVar1 = *needle" identifier = (pointer_expression "*needle" * identifier)) ;) (expression_statement "uVar3 = needle_len - 1;" (assignment_expression "uVar3 = needle_len - 1" identifier = (binary_expression "needle_len - 1" identifier - number_literal)) ;) (do_statement "do {\n      if (((*haystack == wVar1) && (uVar3 < hs_len)) &&\n         ((haystack[needle_len - 1] == needle[needle_len - 1] &&\n          (iVar2 = memcmp(haystack,needle,needle_len * 4), iVar2 == 0)))) {\n        return haystack;\n      }\n      uVar3 = uVar3 + 1;\n      haystack = haystack + 1;\n    } while (uVar3 != (hs_len - 1) + needle_len);" do (compound_statement "{\n      if (((*haystack == wVar1) && (uVar3 < hs_len)) &&\n         ((haystack[needle_len - 1] == needle[needle_len - 1] &&\n          (iVar2 = memcmp(haystack,needle,needle_len * 4), iVar2 == 0)))) {\n        return haystack;\n      }\n      uVar3 = uVar3 + 1;\n      haystack = haystack + 1;\n    }" { (if_statement "if (((*haystack == wVar1) && (uVar3 < hs_len)) &&\n         ((haystack[needle_len - 1] == needle[needle_len - 1] &&\n          (iVar2 = memcmp(haystack,needle,needle_len * 4), iVar2 == 0)))) {\n        return haystack;\n      }" if (parenthesized_expression "(((*haystack == wVar1) && (uVar3 < hs_len)) &&\n         ((haystack[needle_len - 1] == needle[needle_len - 1] &&\n          (iVar2 = memcmp(haystack,needle,needle_len * 4), iVar2 == 0))))" ( (binary_expression "((*haystack == wVar1) && (uVar3 < hs_len)) &&\n         ((haystack[needle_len - 1] == needle[needle_len - 1] &&\n          (iVar2 = memcmp(haystack,needle,needle_len * 4), iVar2 == 0)))" (parenthesized_expression "((*haystack == wVar1) && (uVar3 < hs_len))" ( (binary_expression "(*haystack == wVar1) && (uVar3 < hs_len)" (parenthesized_expression "(*haystack == wVar1)" ( (binary_expression "*haystack == wVar1" (pointer_expression "*haystack" * identifier) == identifier) )) && (parenthesized_expression "(uVar3 < hs_len)" ( (binary_expression "uVar3 < hs_len" identifier < identifier) ))) )) && (parenthesized_expression "((haystack[needle_len - 1] == needle[needle_len - 1] &&\n          (iVar2 = memcmp(haystack,needle,needle_len * 4), iVar2 == 0)))" ( (parenthesized_expression "(haystack[needle_len - 1] == needle[needle_len - 1] &&\n          (iVar2 = memcmp(haystack,needle,needle_len * 4), iVar2 == 0))" ( (binary_expression "haystack[needle_len - 1] == needle[needle_len - 1] &&\n          (iVar2 = memcmp(haystack,needle,needle_len * 4), iVar2 == 0)" (binary_expression "haystack[needle_len - 1] == needle[needle_len - 1]" (subscript_expression "haystack[needle_len - 1]" identifier [ (binary_expression "needle_len - 1" identifier - number_literal) ]) == (subscript_expression "needle[needle_len - 1]" identifier [ (binary_expression "needle_len - 1" identifier - number_literal) ])) && (parenthesized_expression "(iVar2 = memcmp(haystack,needle,needle_len * 4), iVar2 == 0)" ( (comma_expression "iVar2 = memcmp(haystack,needle,needle_len * 4), iVar2 == 0" (assignment_expression "iVar2 = memcmp(haystack,needle,needle_len * 4)" identifier = (call_expression "memcmp(haystack,needle,needle_len * 4)" identifier (argument_list "(haystack,needle,needle_len * 4)" ( identifier , identifier , (binary_expression "needle_len * 4" identifier * number_literal) )))) , (binary_expression "iVar2 == 0" identifier == number_literal)) ))) )) ))) )) (compound_statement "{\n        return haystack;\n      }" { (return_statement "return haystack;" return identifier ;) })) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" identifier = (binary_expression "uVar3 + 1" identifier + number_literal)) ;) (expression_statement "haystack = haystack + 1;" (assignment_expression "haystack = haystack + 1" identifier = (binary_expression "haystack + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar3 != (hs_len - 1) + needle_len)" ( (binary_expression "uVar3 != (hs_len - 1) + needle_len" identifier != (binary_expression "(hs_len - 1) + needle_len" (parenthesized_expression "(hs_len - 1)" ( (binary_expression "hs_len - 1" identifier - number_literal) )) + identifier)) )) ;) })) (return_statement "return (wchar_t *)0x0;" return (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "int * FUN_00067860(int *param_1,uint param_2,int *param_3,uint param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0))\n  {\n    iVar1 = *param_3;\n    uVar3 = param_4 - 1;\n    do {\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    } while (uVar3 != (param_2 - 1) + param_4);\n  }\n  return (int *)0x0;\n}\n\n" (function_definition "int * FUN_00067860(int *param_1,uint param_2,int *param_3,uint param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0))\n  {\n    iVar1 = *param_3;\n    uVar3 = param_4 - 1;\n    do {\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    } while (uVar3 != (param_2 - 1) + param_4);\n  }\n  return (int *)0x0;\n}" primitive_type (pointer_declarator "* FUN_00067860(int *param_1,uint param_2,int *param_3,uint param_4)" * (function_declarator "FUN_00067860(int *param_1,uint param_2,int *param_3,uint param_4)" identifier (parameter_list "(int *param_1,uint param_2,int *param_3,uint param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "uint param_4" type_identifier identifier) )))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0))\n  {\n    iVar1 = *param_3;\n    uVar3 = param_4 - 1;\n    do {\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    } while (uVar3 != (param_2 - 1) + param_4);\n  }\n  return (int *)0x0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (if_statement "if (((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0))\n  {\n    iVar1 = *param_3;\n    uVar3 = param_4 - 1;\n    do {\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    } while (uVar3 != (param_2 - 1) + param_4);\n  }" if (parenthesized_expression "(((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0))" ( (binary_expression "((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0)" (parenthesized_expression "((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2))" ( (binary_expression "(param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)" (parenthesized_expression "(param_1 != (int *)0x0 && param_3 != (int *)0x0)" ( (binary_expression "param_1 != (int *)0x0 && param_3 != (int *)0x0" (binary_expression "param_1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) && (binary_expression "param_3 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) )) && (parenthesized_expression "(param_4 <= param_2)" ( (binary_expression "param_4 <= param_2" identifier <= identifier) ))) )) && (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) ))) )) (compound_statement "{\n    iVar1 = *param_3;\n    uVar3 = param_4 - 1;\n    do {\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    } while (uVar3 != (param_2 - 1) + param_4);\n  }" { (expression_statement "iVar1 = *param_3;" (assignment_expression "iVar1 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) (expression_statement "uVar3 = param_4 - 1;" (assignment_expression "uVar3 = param_4 - 1" identifier = (binary_expression "param_4 - 1" identifier - number_literal)) ;) (do_statement "do {\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    } while (uVar3 != (param_2 - 1) + param_4);" do (compound_statement "{\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    }" { (if_statement "if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }" if (parenthesized_expression "(((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0))))" ( (binary_expression "((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))" (parenthesized_expression "((*param_1 == iVar1) && (uVar3 < param_2))" ( (binary_expression "(*param_1 == iVar1) && (uVar3 < param_2)" (parenthesized_expression "(*param_1 == iVar1)" ( (binary_expression "*param_1 == iVar1" (pointer_expression "*param_1" * identifier) == identifier) )) && (parenthesized_expression "(uVar3 < param_2)" ( (binary_expression "uVar3 < param_2" identifier < identifier) ))) )) && (parenthesized_expression "((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))" ( (parenthesized_expression "(param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0))" ( (binary_expression "param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)" (binary_expression "param_1[param_4 - 1] == param_3[param_4 - 1]" (subscript_expression "param_1[param_4 - 1]" identifier [ (binary_expression "param_4 - 1" identifier - number_literal) ]) == (subscript_expression "param_3[param_4 - 1]" identifier [ (binary_expression "param_4 - 1" identifier - number_literal) ])) && (parenthesized_expression "(iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)" ( (comma_expression "iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0" (assignment_expression "iVar2 = memcmp(param_1,param_3,param_4 * 4)" identifier = (call_expression "memcmp(param_1,param_3,param_4 * 4)" identifier (argument_list "(param_1,param_3,param_4 * 4)" ( identifier , identifier , (binary_expression "param_4 * 4" identifier * number_literal) )))) , (binary_expression "iVar2 == 0" identifier == number_literal)) ))) )) ))) )) (compound_statement "{\n        return param_1;\n      }" { (return_statement "return param_1;" return identifier ;) })) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" identifier = (binary_expression "uVar3 + 1" identifier + number_literal)) ;) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar3 != (param_2 - 1) + param_4)" ( (binary_expression "uVar3 != (param_2 - 1) + param_4" identifier != (binary_expression "(param_2 - 1) + param_4" (parenthesized_expression "(param_2 - 1)" ( (binary_expression "param_2 - 1" identifier - number_literal) )) + identifier)) )) ;) })) (return_statement "return (int *)0x0;" return (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) && (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT))) )) && (parenthesized_expression ( (binary_expression IDENT <= IDENT) ))) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == IDENT) )) && (parenthesized_expression ( (binary_expression IDENT < IDENT) ))) )) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ (binary_expression IDENT - LIT) ]) == (subscript_expression IDENT [ (binary_expression IDENT - LIT) ])) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT * LIT) )))) , (binary_expression IDENT == LIT)) ))) )) ))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (binary_expression (parenthesized_expression ( (binary_expression IDENT - LIT) )) + IDENT)) )) ;) })) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })))
(function_definition "int * FUN_00067860(int *param_1,uint param_2,int *param_3,uint param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0))\n  {\n    iVar1 = *param_3;\n    uVar3 = param_4 - 1;\n    do {\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    } while (uVar3 != (param_2 - 1) + param_4);\n  }\n  return (int *)0x0;\n}" (primitive_type "int") (pointer_declarator "* FUN_00067860(int *param_1,uint param_2,int *param_3,uint param_4)" (* "*") (function_declarator "FUN_00067860(int *param_1,uint param_2,int *param_3,uint param_4)" (identifier "FUN_00067860") (parameter_list "(int *param_1,uint param_2,int *param_3,uint param_4)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "int *param_3" (primitive_type "int") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "uint param_4" (type_identifier "uint") (identifier "param_4")) () ")")))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  \n  if (((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0))\n  {\n    iVar1 = *param_3;\n    uVar3 = param_4 - 1;\n    do {\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    } while (uVar3 != (param_2 - 1) + param_4);\n  }\n  return (int *)0x0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (if_statement "if (((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0))\n  {\n    iVar1 = *param_3;\n    uVar3 = param_4 - 1;\n    do {\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    } while (uVar3 != (param_2 - 1) + param_4);\n  }" (if "if") (parenthesized_expression "(((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0))" (( "(") (binary_expression "((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0)" (parenthesized_expression "((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2))" (( "(") (binary_expression "(param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)" (parenthesized_expression "(param_1 != (int *)0x0 && param_3 != (int *)0x0)" (( "(") (binary_expression "param_1 != (int *)0x0 && param_3 != (int *)0x0" (binary_expression "param_1 != (int *)0x0" (identifier "param_1") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (&& "&&") (binary_expression "param_3 != (int *)0x0" (identifier "param_3") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")))) () ")")) (&& "&&") (parenthesized_expression "(param_4 <= param_2)" (( "(") (binary_expression "param_4 <= param_2" (identifier "param_4") (<= "<=") (identifier "param_2")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    iVar1 = *param_3;\n    uVar3 = param_4 - 1;\n    do {\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    } while (uVar3 != (param_2 - 1) + param_4);\n  }" ({ "{") (expression_statement "iVar1 = *param_3;" (assignment_expression "iVar1 = *param_3" (identifier "iVar1") (= "=") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) (; ";")) (expression_statement "uVar3 = param_4 - 1;" (assignment_expression "uVar3 = param_4 - 1" (identifier "uVar3") (= "=") (binary_expression "param_4 - 1" (identifier "param_4") (- "-") (number_literal "1"))) (; ";")) (do_statement "do {\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    } while (uVar3 != (param_2 - 1) + param_4);" (do "do") (compound_statement "{\n      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }\n      uVar3 = uVar3 + 1;\n      param_1 = param_1 + 1;\n    }" ({ "{") (if_statement "if (((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {\n        return param_1;\n      }" (if "if") (parenthesized_expression "(((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0))))" (( "(") (binary_expression "((*param_1 == iVar1) && (uVar3 < param_2)) &&\n         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))" (parenthesized_expression "((*param_1 == iVar1) && (uVar3 < param_2))" (( "(") (binary_expression "(*param_1 == iVar1) && (uVar3 < param_2)" (parenthesized_expression "(*param_1 == iVar1)" (( "(") (binary_expression "*param_1 == iVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (identifier "iVar1")) () ")")) (&& "&&") (parenthesized_expression "(uVar3 < param_2)" (( "(") (binary_expression "uVar3 < param_2" (identifier "uVar3") (< "<") (identifier "param_2")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "((param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))" (( "(") (parenthesized_expression "(param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0))" (( "(") (binary_expression "param_1[param_4 - 1] == param_3[param_4 - 1] &&\n          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)" (binary_expression "param_1[param_4 - 1] == param_3[param_4 - 1]" (subscript_expression "param_1[param_4 - 1]" (identifier "param_1") ([ "[") (binary_expression "param_4 - 1" (identifier "param_4") (- "-") (number_literal "1")) (] "]")) (== "==") (subscript_expression "param_3[param_4 - 1]" (identifier "param_3") ([ "[") (binary_expression "param_4 - 1" (identifier "param_4") (- "-") (number_literal "1")) (] "]"))) (&& "&&") (parenthesized_expression "(iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)" (( "(") (comma_expression "iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0" (assignment_expression "iVar2 = memcmp(param_1,param_3,param_4 * 4)" (identifier "iVar2") (= "=") (call_expression "memcmp(param_1,param_3,param_4 * 4)" (identifier "memcmp") (argument_list "(param_1,param_3,param_4 * 4)" (( "(") (identifier "param_1") (, ",") (identifier "param_3") (, ",") (binary_expression "param_4 * 4" (identifier "param_4") (* "*") (number_literal "4")) () ")")))) (, ",") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0"))) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n        return param_1;\n      }" ({ "{") (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (expression_statement "uVar3 = uVar3 + 1;" (assignment_expression "uVar3 = uVar3 + 1" (identifier "uVar3") (= "=") (binary_expression "uVar3 + 1" (identifier "uVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" (identifier "param_1") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar3 != (param_2 - 1) + param_4)" (( "(") (binary_expression "uVar3 != (param_2 - 1) + param_4" (identifier "uVar3") (!= "!=") (binary_expression "(param_2 - 1) + param_4" (parenthesized_expression "(param_2 - 1)" (( "(") (binary_expression "param_2 - 1" (identifier "param_2") (- "-") (number_literal "1")) () ")")) (+ "+") (identifier "param_4"))) () ")")) (; ";")) (} "}"))) (return_statement "return (int *)0x0;" (return "return") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

type_1 * function_1(type_1 *var_1,size_t var_4,type_1 *var_2,size_t var_3)

{
  type_1 var_5;
  int var_8;
  type_2 var_6;
  
  if (((var_1 != (type_1 *)0x0 && var_2 != (type_1 *)0x0) && (var_3 <= var_4)) &&
     (var_4 != 0)) {
    var_5 = *var_2;
    var_6 = var_3 - 1;
    do {
      if (((*var_1 == var_5) && (var_6 < var_4)) &&
         ((var_1[var_3 - 1] == var_2[var_3 - 1] &&
          (var_8 = var_7(var_1,var_2,var_3 * 4), var_8 == 0)))) {
        return var_1;
      }
      var_6 = var_6 + 1;
      var_1 = var_1 + 1;
    } while (var_6 != (var_4 - 1) + var_3);
  }
  return (type_1 *)0x0;
}


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

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

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

{
  int iVar1;
  int iVar2;
  uint uVar3;
  
  if (((param_1 != (int *)0x0 && param_3 != (int *)0x0) && (param_4 <= param_2)) && (param_2 != 0))
  {
    iVar1 = *param_3;
    uVar3 = param_4 - 1;
    do {
      if (((*param_1 == iVar1) && (uVar3 < param_2)) &&
         ((param_1[param_4 - 1] == param_3[param_4 - 1] &&
          (iVar2 = memcmp(param_1,param_3,param_4 * 4), iVar2 == 0)))) {
        return param_1;
      }
      uVar3 = uVar3 + 1;
      param_1 = param_1 + 1;
    } while (uVar3 != (param_2 - 1) + param_4);
  }
  return (int *)0x0;
}

