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

int __regparm3 in_commasep_string(char *needle,char *haystack,int haylen)

{
  void *pvVar1;
  char *pcVar2;
  int iVar3;
  
  if ((haystack != (char *)0x0) && (needle != (char *)0x0)) {
    do {
      iVar3 = first_in_commasep_string(needle,haystack,haylen);
      if (iVar3 != 0) {
        return 1;
      }
      pvVar1 = memchr(haystack,0x2c,haylen);
      if (pvVar1 == (void *)0x0) {
        return 0;
      }
      pcVar2 = (char *)((int)pvVar1 + 1);
      haylen = haylen - ((int)pcVar2 - (int)haystack);
      haystack = pcVar2;
    } while (pcVar2 != (char *)0x0);
  }
  return 0;
}



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

undefined4 __regparm3 FUN_0003e440(int param_1,void *param_2,size_t param_3)

{
  void *pvVar1;
  int iVar2;
  
  if ((param_2 != (void *)0x0) && (param_1 != 0)) {
    do {
      iVar2 = FUN_0003e3d0();
      if (iVar2 != 0) {
        return 1;
      }
      pvVar1 = memchr(param_2,0x2c,param_3);
      if (pvVar1 == (void *)0x0) {
        return 0;
      }
      pvVar1 = (void *)((int)pvVar1 + 1);
      param_3 = param_3 - ((int)pvVar1 - (int)param_2);
      param_2 = pvVar1;
    } while (pvVar1 != (void *)0x0);
  }
  return 0;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001c4f0
ADD EBX,0xd2307
SUB ESP,0x1c
MOV dword ptr [ESP + 0xc],EAX
TEST EDX,EDX
JZ 0x0003e4ac
MOV ESI,EDX
MOV EDI,ECX
TEST EAX,EAX
JNZ 0x0003e48a
JMP 0x0003e4ac
SUB ESP,0x4
PUSH EDI
PUSH 0x2c
PUSH ESI
CALL 0x0001abe0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003e4a2
ADD EAX,0x1
MOV ECX,EAX
SUB ECX,ESI
MOV ESI,EAX
SUB EDI,ECX
TEST EAX,EAX
JZ 0x0003e4a2
MOV EAX,dword ptr [ESP + 0xc]
MOV ECX,EDI
MOV EDX,ESI
CALL 0x0003e3d0
MOV EBP,EAX
TEST EAX,EAX
JZ 0x0003e468
MOV EBP,0x1
ADD ESP,0x1c
MOV EAX,EBP
POP EBX
POP ESI
POP EDI
POP EBP
RET
XOR EBP,EBP
JMP 0x0003e4a2
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 __regparm3 FUN_0003e440(int param_1,void *param_2,size_t param_3)\n\n{\n  void *pvVar1;\n  int iVar2;\n  \n  if ((param_2 != (void *)0x0) && (param_1 != 0)) {\n    do {\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }\n  return 0;\n}\n\n" comment (function_definition "undefined4 __regparm3 FUN_0003e440(int param_1,void *param_2,size_t param_3)\n\n{\n  void *pvVar1;\n  int iVar2;\n  \n  if ((param_2 != (void *)0x0) && (param_1 != 0)) {\n    do {\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }\n  return 0;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0003e440(int param_1,void *param_2,size_t param_3)" identifier (parameter_list "(int param_1,void *param_2,size_t param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "size_t param_3" primitive_type identifier) ))) (compound_statement "{\n  void *pvVar1;\n  int iVar2;\n  \n  if ((param_2 != (void *)0x0) && (param_1 != 0)) {\n    do {\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }\n  return 0;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if ((param_2 != (void *)0x0) && (param_1 != 0)) {\n    do {\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }" if (parenthesized_expression "((param_2 != (void *)0x0) && (param_1 != 0))" ( (binary_expression "(param_2 != (void *)0x0) && (param_1 != 0)" (parenthesized_expression "(param_2 != (void *)0x0)" ( (binary_expression "param_2 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) ))) )) (compound_statement "{\n    do {\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }" { (do_statement "do {\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    } while (pvVar1 != (void *)0x0);" do (compound_statement "{\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    }" { (expression_statement "iVar2 = FUN_0003e3d0();" (assignment_expression "iVar2 = FUN_0003e3d0()" identifier = (call_expression "FUN_0003e3d0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar2 != 0) {\n        return 1;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        return 1;\n      }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "pvVar1 = memchr(param_2,0x2c,param_3);" (assignment_expression "pvVar1 = memchr(param_2,0x2c,param_3)" identifier = (call_expression "memchr(param_2,0x2c,param_3)" identifier (argument_list "(param_2,0x2c,param_3)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (pvVar1 == (void *)0x0) {\n        return 0;\n      }" if (parenthesized_expression "(pvVar1 == (void *)0x0)" ( (binary_expression "pvVar1 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "pvVar1 = (void *)((int)pvVar1 + 1);" (assignment_expression "pvVar1 = (void *)((int)pvVar1 + 1)" identifier = (cast_expression "(void *)((int)pvVar1 + 1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + 1)" ( (binary_expression "(int)pvVar1 + 1" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "param_3 = param_3 - ((int)pvVar1 - (int)param_2);" (assignment_expression "param_3 = param_3 - ((int)pvVar1 - (int)param_2)" identifier = (binary_expression "param_3 - ((int)pvVar1 - (int)param_2)" identifier - (parenthesized_expression "((int)pvVar1 - (int)param_2)" ( (binary_expression "(int)pvVar1 - (int)param_2" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "param_2 = pvVar1;" (assignment_expression "param_2 = pvVar1" identifier = identifier) ;) }) while (parenthesized_expression "(pvVar1 != (void *)0x0)" ( (binary_expression "pvVar1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 in_commasep_string(char *needle,char *haystack,int haylen)\n\n{\n  void *pvVar1;\n  char *pcVar2;\n  int iVar3;\n  \n  if ((haystack != (char *)0x0) && (needle != (char *)0x0)) {\n    do {\n      iVar3 = first_in_commasep_string(needle,haystack,haylen);\n      if (iVar3 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(haystack,0x2c,haylen);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pcVar2 = (char *)((int)pvVar1 + 1);\n      haylen = haylen - ((int)pcVar2 - (int)haystack);\n      haystack = pcVar2;\n    } while (pcVar2 != (char *)0x0);\n  }\n  return 0;\n}\n\n" comment (function_definition "int __regparm3 in_commasep_string(char *needle,char *haystack,int haylen)\n\n{\n  void *pvVar1;\n  char *pcVar2;\n  int iVar3;\n  \n  if ((haystack != (char *)0x0) && (needle != (char *)0x0)) {\n    do {\n      iVar3 = first_in_commasep_string(needle,haystack,haylen);\n      if (iVar3 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(haystack,0x2c,haylen);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pcVar2 = (char *)((int)pvVar1 + 1);\n      haylen = haylen - ((int)pcVar2 - (int)haystack);\n      haystack = pcVar2;\n    } while (pcVar2 != (char *)0x0);\n  }\n  return 0;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "in_commasep_string(char *needle,char *haystack,int haylen)" identifier (parameter_list "(char *needle,char *haystack,int haylen)" ( (parameter_declaration "char *needle" primitive_type (pointer_declarator "*needle" * identifier)) , (parameter_declaration "char *haystack" primitive_type (pointer_declarator "*haystack" * identifier)) , (parameter_declaration "int haylen" primitive_type identifier) ))) (compound_statement "{\n  void *pvVar1;\n  char *pcVar2;\n  int iVar3;\n  \n  if ((haystack != (char *)0x0) && (needle != (char *)0x0)) {\n    do {\n      iVar3 = first_in_commasep_string(needle,haystack,haylen);\n      if (iVar3 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(haystack,0x2c,haylen);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pcVar2 = (char *)((int)pvVar1 + 1);\n      haylen = haylen - ((int)pcVar2 - (int)haystack);\n      haystack = pcVar2;\n    } while (pcVar2 != (char *)0x0);\n  }\n  return 0;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (if_statement "if ((haystack != (char *)0x0) && (needle != (char *)0x0)) {\n    do {\n      iVar3 = first_in_commasep_string(needle,haystack,haylen);\n      if (iVar3 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(haystack,0x2c,haylen);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pcVar2 = (char *)((int)pvVar1 + 1);\n      haylen = haylen - ((int)pcVar2 - (int)haystack);\n      haystack = pcVar2;\n    } while (pcVar2 != (char *)0x0);\n  }" if (parenthesized_expression "((haystack != (char *)0x0) && (needle != (char *)0x0))" ( (binary_expression "(haystack != (char *)0x0) && (needle != (char *)0x0)" (parenthesized_expression "(haystack != (char *)0x0)" ( (binary_expression "haystack != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(needle != (char *)0x0)" ( (binary_expression "needle != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n    do {\n      iVar3 = first_in_commasep_string(needle,haystack,haylen);\n      if (iVar3 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(haystack,0x2c,haylen);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pcVar2 = (char *)((int)pvVar1 + 1);\n      haylen = haylen - ((int)pcVar2 - (int)haystack);\n      haystack = pcVar2;\n    } while (pcVar2 != (char *)0x0);\n  }" { (do_statement "do {\n      iVar3 = first_in_commasep_string(needle,haystack,haylen);\n      if (iVar3 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(haystack,0x2c,haylen);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pcVar2 = (char *)((int)pvVar1 + 1);\n      haylen = haylen - ((int)pcVar2 - (int)haystack);\n      haystack = pcVar2;\n    } while (pcVar2 != (char *)0x0);" do (compound_statement "{\n      iVar3 = first_in_commasep_string(needle,haystack,haylen);\n      if (iVar3 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(haystack,0x2c,haylen);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pcVar2 = (char *)((int)pvVar1 + 1);\n      haylen = haylen - ((int)pcVar2 - (int)haystack);\n      haystack = pcVar2;\n    }" { (expression_statement "iVar3 = first_in_commasep_string(needle,haystack,haylen);" (assignment_expression "iVar3 = first_in_commasep_string(needle,haystack,haylen)" identifier = (call_expression "first_in_commasep_string(needle,haystack,haylen)" identifier (argument_list "(needle,haystack,haylen)" ( identifier , identifier , identifier )))) ;) (if_statement "if (iVar3 != 0) {\n        return 1;\n      }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        return 1;\n      }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "pvVar1 = memchr(haystack,0x2c,haylen);" (assignment_expression "pvVar1 = memchr(haystack,0x2c,haylen)" identifier = (call_expression "memchr(haystack,0x2c,haylen)" identifier (argument_list "(haystack,0x2c,haylen)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (pvVar1 == (void *)0x0) {\n        return 0;\n      }" if (parenthesized_expression "(pvVar1 == (void *)0x0)" ( (binary_expression "pvVar1 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "pcVar2 = (char *)((int)pvVar1 + 1);" (assignment_expression "pcVar2 = (char *)((int)pvVar1 + 1)" identifier = (cast_expression "(char *)((int)pvVar1 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + 1)" ( (binary_expression "(int)pvVar1 + 1" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "haylen = haylen - ((int)pcVar2 - (int)haystack);" (assignment_expression "haylen = haylen - ((int)pcVar2 - (int)haystack)" identifier = (binary_expression "haylen - ((int)pcVar2 - (int)haystack)" identifier - (parenthesized_expression "((int)pcVar2 - (int)haystack)" ( (binary_expression "(int)pcVar2 - (int)haystack" (cast_expression "(int)pcVar2" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)haystack" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "haystack = pcVar2;" (assignment_expression "haystack = pcVar2" identifier = identifier) ;) }) while (parenthesized_expression "(pcVar2 != (char *)0x0)" ( (binary_expression "pcVar2 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 __regparm3 FUN_0003e440(int param_1,void *param_2,size_t param_3)\n\n{\n  void *pvVar1;\n  int iVar2;\n  \n  if ((param_2 != (void *)0x0) && (param_1 != 0)) {\n    do {\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 __regparm3 FUN_0003e440(int param_1,void *param_2,size_t param_3)\n\n{\n  void *pvVar1;\n  int iVar2;\n  \n  if ((param_2 != (void *)0x0) && (param_1 != 0)) {\n    do {\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }\n  return 0;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0003e440(int param_1,void *param_2,size_t param_3)" identifier (parameter_list "(int param_1,void *param_2,size_t param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "size_t param_3" primitive_type identifier) ))) (compound_statement "{\n  void *pvVar1;\n  int iVar2;\n  \n  if ((param_2 != (void *)0x0) && (param_1 != 0)) {\n    do {\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }\n  return 0;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if ((param_2 != (void *)0x0) && (param_1 != 0)) {\n    do {\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }" if (parenthesized_expression "((param_2 != (void *)0x0) && (param_1 != 0))" ( (binary_expression "(param_2 != (void *)0x0) && (param_1 != 0)" (parenthesized_expression "(param_2 != (void *)0x0)" ( (binary_expression "param_2 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) ))) )) (compound_statement "{\n    do {\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }" { (do_statement "do {\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    } while (pvVar1 != (void *)0x0);" do (compound_statement "{\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    }" { (expression_statement "iVar2 = FUN_0003e3d0();" (assignment_expression "iVar2 = FUN_0003e3d0()" identifier = (call_expression "FUN_0003e3d0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar2 != 0) {\n        return 1;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        return 1;\n      }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "pvVar1 = memchr(param_2,0x2c,param_3);" (assignment_expression "pvVar1 = memchr(param_2,0x2c,param_3)" identifier = (call_expression "memchr(param_2,0x2c,param_3)" identifier (argument_list "(param_2,0x2c,param_3)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (pvVar1 == (void *)0x0) {\n        return 0;\n      }" if (parenthesized_expression "(pvVar1 == (void *)0x0)" ( (binary_expression "pvVar1 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "pvVar1 = (void *)((int)pvVar1 + 1);" (assignment_expression "pvVar1 = (void *)((int)pvVar1 + 1)" identifier = (cast_expression "(void *)((int)pvVar1 + 1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar1 + 1)" ( (binary_expression "(int)pvVar1 + 1" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "param_3 = param_3 - ((int)pvVar1 - (int)param_2);" (assignment_expression "param_3 = param_3 - ((int)pvVar1 - (int)param_2)" identifier = (binary_expression "param_3 - ((int)pvVar1 - (int)param_2)" identifier - (parenthesized_expression "((int)pvVar1 - (int)param_2)" ( (binary_expression "(int)pvVar1 - (int)param_2" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "param_2 = pvVar1;" (assignment_expression "param_2 = pvVar1" identifier = identifier) ;) }) while (parenthesized_expression "(pvVar1 != (void *)0x0)" ( (binary_expression "pvVar1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 __regparm3 FUN_0003e440(int param_1,void *param_2,size_t param_3)\n\n{\n  void *pvVar1;\n  int iVar2;\n  \n  if ((param_2 != (void *)0x0) && (param_1 != 0)) {\n    do {\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }\n  return 0;\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0003e440(int param_1,void *param_2,size_t param_3)" (identifier "FUN_0003e440") (parameter_list "(int param_1,void *param_2,size_t param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "void *param_2" (primitive_type "void") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "size_t param_3" (primitive_type "size_t") (identifier "param_3")) () ")"))) (compound_statement "{\n  void *pvVar1;\n  int iVar2;\n  \n  if ((param_2 != (void *)0x0) && (param_1 != 0)) {\n    do {\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }\n  return 0;\n}" ({ "{") (declaration "void *pvVar1;" (primitive_type "void") (pointer_declarator "*pvVar1" (* "*") (identifier "pvVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (if_statement "if ((param_2 != (void *)0x0) && (param_1 != 0)) {\n    do {\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }" (if "if") (parenthesized_expression "((param_2 != (void *)0x0) && (param_1 != 0))" (( "(") (binary_expression "(param_2 != (void *)0x0) && (param_1 != 0)" (parenthesized_expression "(param_2 != (void *)0x0)" (( "(") (binary_expression "param_2 != (void *)0x0" (identifier "param_2") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    do {\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    } while (pvVar1 != (void *)0x0);\n  }" ({ "{") (do_statement "do {\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    } while (pvVar1 != (void *)0x0);" (do "do") (compound_statement "{\n      iVar2 = FUN_0003e3d0();\n      if (iVar2 != 0) {\n        return 1;\n      }\n      pvVar1 = memchr(param_2,0x2c,param_3);\n      if (pvVar1 == (void *)0x0) {\n        return 0;\n      }\n      pvVar1 = (void *)((int)pvVar1 + 1);\n      param_3 = param_3 - ((int)pvVar1 - (int)param_2);\n      param_2 = pvVar1;\n    }" ({ "{") (expression_statement "iVar2 = FUN_0003e3d0();" (assignment_expression "iVar2 = FUN_0003e3d0()" (identifier "iVar2") (= "=") (call_expression "FUN_0003e3d0()" (identifier "FUN_0003e3d0") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n        return 1;\n      }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        return 1;\n      }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "pvVar1 = memchr(param_2,0x2c,param_3);" (assignment_expression "pvVar1 = memchr(param_2,0x2c,param_3)" (identifier "pvVar1") (= "=") (call_expression "memchr(param_2,0x2c,param_3)" (identifier "memchr") (argument_list "(param_2,0x2c,param_3)" (( "(") (identifier "param_2") (, ",") (number_literal "0x2c") (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (pvVar1 == (void *)0x0) {\n        return 0;\n      }" (if "if") (parenthesized_expression "(pvVar1 == (void *)0x0)" (( "(") (binary_expression "pvVar1 == (void *)0x0" (identifier "pvVar1") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        return 0;\n      }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "pvVar1 = (void *)((int)pvVar1 + 1);" (assignment_expression "pvVar1 = (void *)((int)pvVar1 + 1)" (identifier "pvVar1") (= "=") (cast_expression "(void *)((int)pvVar1 + 1)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)pvVar1 + 1)" (( "(") (binary_expression "(int)pvVar1 + 1" (cast_expression "(int)pvVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar1")) (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "param_3 = param_3 - ((int)pvVar1 - (int)param_2);" (assignment_expression "param_3 = param_3 - ((int)pvVar1 - (int)param_2)" (identifier "param_3") (= "=") (binary_expression "param_3 - ((int)pvVar1 - (int)param_2)" (identifier "param_3") (- "-") (parenthesized_expression "((int)pvVar1 - (int)param_2)" (( "(") (binary_expression "(int)pvVar1 - (int)param_2" (cast_expression "(int)pvVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar1")) (- "-") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) () ")")))) (; ";")) (expression_statement "param_2 = pvVar1;" (assignment_expression "param_2 = pvVar1" (identifier "param_2") (= "=") (identifier "pvVar1")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pvVar1 != (void *)0x0)" (( "(") (binary_expression "pvVar1 != (void *)0x0" (identifier "pvVar1") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

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

int __regparm3 function_1(char *var_2,char *var_1,int var_7)

{
  void *var_6;
  char *var_8;
  int var_4;
  
  if ((var_1 != (char *)0x0) && (var_2 != (char *)0x0)) {
    do {
      var_4 = var_3(var_2,var_1,var_7);
      if (var_4 != 0) {
        return 1;
      }
      var_6 = var_5(var_1,0x2c,var_7);
      if (var_6 == (void *)0x0) {
        return 0;
      }
      var_8 = (char *)((int)var_6 + 1);
      var_7 = var_7 - ((int)var_8 - (int)var_1);
      var_1 = var_8;
    } while (var_8 != (char *)0x0);
  }
  return 0;
}


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

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

undefined4 __regparm3 MASKED(int param_1,void *param_2,size_t param_3)

{
  void *pvVar1;
  int iVar2;
  
  if ((param_2 != (void *)0x0) && (param_1 != 0)) {
    do {
      iVar2 = FUN_0003e3d0();
      if (iVar2 != 0) {
        return 1;
      }
      pvVar1 = memchr(param_2,0x2c,param_3);
      if (pvVar1 == (void *)0x0) {
        return 0;
      }
      pvVar1 = (void *)((int)pvVar1 + 1);
      param_3 = param_3 - ((int)pvVar1 - (int)param_2);
      param_2 = pvVar1;
    } while (pvVar1 != (void *)0x0);
  }
  return 0;
}

