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

int memcasecmp(void *vs1,void *vs2,size_t n)

{
  __int32_t **pp_Var1;
  int iVar2;
  size_t sVar3;
  
  if (n != 0) {
    pp_Var1 = __ctype_toupper_loc();
    sVar3 = 0;
    do {
      iVar2 = (*pp_Var1)[*(byte *)((int)vs1 + sVar3)] - (*pp_Var1)[*(byte *)((int)vs2 + sVar3)];
      if (iVar2 != 0) {
        return iVar2;
      }
      sVar3 = sVar3 + 1;
    } while (sVar3 != n);
  }
  return 0;
}



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

int FUN_000139d0(int param_1,int param_2,int param_3)

{
  __int32_t **pp_Var1;
  int iVar2;
  int iVar3;
  
  if (param_3 != 0) {
    pp_Var1 = __ctype_toupper_loc();
    iVar3 = 0;
    do {
      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];
      if (iVar2 != 0) {
        return iVar2;
      }
      iVar3 = iVar3 + 1;
    } while (iVar3 != param_3);
  }
  return 0;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00012290
ADD EBX,0xb627
SUB ESP,0xc
MOV ESI,dword ptr [ESP + 0x28]
MOV EDI,dword ptr [ESP + 0x20]
MOV EBP,dword ptr [ESP + 0x24]
TEST ESI,ESI
JZ 0x00013a20
CALL 0x00011040
XOR EDX,EDX
MOV ECX,dword ptr [EAX]
JMP 0x00013a07
ADD EDX,0x1
CMP EDX,ESI
JZ 0x00013a18
MOVZX EAX,byte ptr [EDI + EDX*0x1]
MOVZX EBX,byte ptr [EBP + EDX*0x1]
MOV EAX,dword ptr [ECX + EAX*0x4]
SUB EAX,dword ptr [ECX + EBX*0x4]
JZ 0x00013a00
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
XOR EAX,EAX
JMP 0x00013a18
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_000139d0(int param_1,int param_2,int param_3)\n\n{\n  __int32_t **pp_Var1;\n  int iVar2;\n  int iVar3;\n  \n  if (param_3 != 0) {\n    pp_Var1 = __ctype_toupper_loc();\n    iVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    } while (iVar3 != param_3);\n  }\n  return 0;\n}\n\n" comment (function_definition "int FUN_000139d0(int param_1,int param_2,int param_3)\n\n{\n  __int32_t **pp_Var1;\n  int iVar2;\n  int iVar3;\n  \n  if (param_3 != 0) {\n    pp_Var1 = __ctype_toupper_loc();\n    iVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    } while (iVar3 != param_3);\n  }\n  return 0;\n}" primitive_type (function_declarator "FUN_000139d0(int param_1,int param_2,int param_3)" identifier (parameter_list "(int param_1,int param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  __int32_t **pp_Var1;\n  int iVar2;\n  int iVar3;\n  \n  if (param_3 != 0) {\n    pp_Var1 = __ctype_toupper_loc();\n    iVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    } while (iVar3 != param_3);\n  }\n  return 0;\n}" { (declaration "__int32_t **pp_Var1;" type_identifier (pointer_declarator "**pp_Var1" * (pointer_declarator "*pp_Var1" * identifier)) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (if_statement "if (param_3 != 0) {\n    pp_Var1 = __ctype_toupper_loc();\n    iVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    } while (iVar3 != param_3);\n  }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n    pp_Var1 = __ctype_toupper_loc();\n    iVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    } while (iVar3 != param_3);\n  }" { (expression_statement "pp_Var1 = __ctype_toupper_loc();" (assignment_expression "pp_Var1 = __ctype_toupper_loc()" identifier = (call_expression "__ctype_toupper_loc()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    } while (iVar3 != param_3);" do (compound_statement "{\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    }" { (expression_statement "iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];" (assignment_expression "iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)]" identifier = (binary_expression "(*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)]" (subscript_expression "(*pp_Var1)[*(byte *)(param_1 + iVar3)]" (parenthesized_expression "(*pp_Var1)" ( (pointer_expression "*pp_Var1" * identifier) )) [ (pointer_expression "*(byte *)(param_1 + iVar3)" * (cast_expression "(byte *)(param_1 + iVar3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + iVar3)" ( (binary_expression "param_1 + iVar3" identifier + identifier) )))) ]) - (subscript_expression "(*pp_Var1)[*(byte *)(param_2 + iVar3)]" (parenthesized_expression "(*pp_Var1)" ( (pointer_expression "*pp_Var1" * identifier) )) [ (pointer_expression "*(byte *)(param_2 + iVar3)" * (cast_expression "(byte *)(param_2 + iVar3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + iVar3)" ( (binary_expression "param_2 + iVar3" identifier + identifier) )))) ]))) ;) (if_statement "if (iVar2 != 0) {\n        return iVar2;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        return iVar2;\n      }" { (return_statement "return iVar2;" return identifier ;) })) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar3 != param_3)" ( (binary_expression "iVar3 != param_3" identifier != identifier) )) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint memcasecmp(void *vs1,void *vs2,size_t n)\n\n{\n  __int32_t **pp_Var1;\n  int iVar2;\n  size_t sVar3;\n  \n  if (n != 0) {\n    pp_Var1 = __ctype_toupper_loc();\n    sVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)((int)vs1 + sVar3)] - (*pp_Var1)[*(byte *)((int)vs2 + sVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      sVar3 = sVar3 + 1;\n    } while (sVar3 != n);\n  }\n  return 0;\n}\n\n" comment comment (function_definition "int memcasecmp(void *vs1,void *vs2,size_t n)\n\n{\n  __int32_t **pp_Var1;\n  int iVar2;\n  size_t sVar3;\n  \n  if (n != 0) {\n    pp_Var1 = __ctype_toupper_loc();\n    sVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)((int)vs1 + sVar3)] - (*pp_Var1)[*(byte *)((int)vs2 + sVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      sVar3 = sVar3 + 1;\n    } while (sVar3 != n);\n  }\n  return 0;\n}" primitive_type (function_declarator "memcasecmp(void *vs1,void *vs2,size_t n)" identifier (parameter_list "(void *vs1,void *vs2,size_t n)" ( (parameter_declaration "void *vs1" primitive_type (pointer_declarator "*vs1" * identifier)) , (parameter_declaration "void *vs2" primitive_type (pointer_declarator "*vs2" * identifier)) , (parameter_declaration "size_t n" primitive_type identifier) ))) (compound_statement "{\n  __int32_t **pp_Var1;\n  int iVar2;\n  size_t sVar3;\n  \n  if (n != 0) {\n    pp_Var1 = __ctype_toupper_loc();\n    sVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)((int)vs1 + sVar3)] - (*pp_Var1)[*(byte *)((int)vs2 + sVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      sVar3 = sVar3 + 1;\n    } while (sVar3 != n);\n  }\n  return 0;\n}" { (declaration "__int32_t **pp_Var1;" type_identifier (pointer_declarator "**pp_Var1" * (pointer_declarator "*pp_Var1" * identifier)) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (if_statement "if (n != 0) {\n    pp_Var1 = __ctype_toupper_loc();\n    sVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)((int)vs1 + sVar3)] - (*pp_Var1)[*(byte *)((int)vs2 + sVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      sVar3 = sVar3 + 1;\n    } while (sVar3 != n);\n  }" if (parenthesized_expression "(n != 0)" ( (binary_expression "n != 0" identifier != number_literal) )) (compound_statement "{\n    pp_Var1 = __ctype_toupper_loc();\n    sVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)((int)vs1 + sVar3)] - (*pp_Var1)[*(byte *)((int)vs2 + sVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      sVar3 = sVar3 + 1;\n    } while (sVar3 != n);\n  }" { (expression_statement "pp_Var1 = __ctype_toupper_loc();" (assignment_expression "pp_Var1 = __ctype_toupper_loc()" identifier = (call_expression "__ctype_toupper_loc()" identifier (argument_list "()" ( )))) ;) (expression_statement "sVar3 = 0;" (assignment_expression "sVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar2 = (*pp_Var1)[*(byte *)((int)vs1 + sVar3)] - (*pp_Var1)[*(byte *)((int)vs2 + sVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      sVar3 = sVar3 + 1;\n    } while (sVar3 != n);" do (compound_statement "{\n      iVar2 = (*pp_Var1)[*(byte *)((int)vs1 + sVar3)] - (*pp_Var1)[*(byte *)((int)vs2 + sVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      sVar3 = sVar3 + 1;\n    }" { (expression_statement "iVar2 = (*pp_Var1)[*(byte *)((int)vs1 + sVar3)] - (*pp_Var1)[*(byte *)((int)vs2 + sVar3)];" (assignment_expression "iVar2 = (*pp_Var1)[*(byte *)((int)vs1 + sVar3)] - (*pp_Var1)[*(byte *)((int)vs2 + sVar3)]" identifier = (binary_expression "(*pp_Var1)[*(byte *)((int)vs1 + sVar3)] - (*pp_Var1)[*(byte *)((int)vs2 + sVar3)]" (subscript_expression "(*pp_Var1)[*(byte *)((int)vs1 + sVar3)]" (parenthesized_expression "(*pp_Var1)" ( (pointer_expression "*pp_Var1" * identifier) )) [ (pointer_expression "*(byte *)((int)vs1 + sVar3)" * (cast_expression "(byte *)((int)vs1 + sVar3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)vs1 + sVar3)" ( (binary_expression "(int)vs1 + sVar3" (cast_expression "(int)vs1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ]) - (subscript_expression "(*pp_Var1)[*(byte *)((int)vs2 + sVar3)]" (parenthesized_expression "(*pp_Var1)" ( (pointer_expression "*pp_Var1" * identifier) )) [ (pointer_expression "*(byte *)((int)vs2 + sVar3)" * (cast_expression "(byte *)((int)vs2 + sVar3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)vs2 + sVar3)" ( (binary_expression "(int)vs2 + sVar3" (cast_expression "(int)vs2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ]))) ;) (if_statement "if (iVar2 != 0) {\n        return iVar2;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        return iVar2;\n      }" { (return_statement "return iVar2;" return identifier ;) })) (expression_statement "sVar3 = sVar3 + 1;" (assignment_expression "sVar3 = sVar3 + 1" identifier = (binary_expression "sVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(sVar3 != n)" ( (binary_expression "sVar3 != n" identifier != identifier) )) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "int FUN_000139d0(int param_1,int param_2,int param_3)\n\n{\n  __int32_t **pp_Var1;\n  int iVar2;\n  int iVar3;\n  \n  if (param_3 != 0) {\n    pp_Var1 = __ctype_toupper_loc();\n    iVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    } while (iVar3 != param_3);\n  }\n  return 0;\n}\n\n" (function_definition "int FUN_000139d0(int param_1,int param_2,int param_3)\n\n{\n  __int32_t **pp_Var1;\n  int iVar2;\n  int iVar3;\n  \n  if (param_3 != 0) {\n    pp_Var1 = __ctype_toupper_loc();\n    iVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    } while (iVar3 != param_3);\n  }\n  return 0;\n}" primitive_type (function_declarator "FUN_000139d0(int param_1,int param_2,int param_3)" identifier (parameter_list "(int param_1,int param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  __int32_t **pp_Var1;\n  int iVar2;\n  int iVar3;\n  \n  if (param_3 != 0) {\n    pp_Var1 = __ctype_toupper_loc();\n    iVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    } while (iVar3 != param_3);\n  }\n  return 0;\n}" { (declaration "__int32_t **pp_Var1;" type_identifier (pointer_declarator "**pp_Var1" * (pointer_declarator "*pp_Var1" * identifier)) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (if_statement "if (param_3 != 0) {\n    pp_Var1 = __ctype_toupper_loc();\n    iVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    } while (iVar3 != param_3);\n  }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n    pp_Var1 = __ctype_toupper_loc();\n    iVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    } while (iVar3 != param_3);\n  }" { (expression_statement "pp_Var1 = __ctype_toupper_loc();" (assignment_expression "pp_Var1 = __ctype_toupper_loc()" identifier = (call_expression "__ctype_toupper_loc()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    } while (iVar3 != param_3);" do (compound_statement "{\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    }" { (expression_statement "iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];" (assignment_expression "iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)]" identifier = (binary_expression "(*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)]" (subscript_expression "(*pp_Var1)[*(byte *)(param_1 + iVar3)]" (parenthesized_expression "(*pp_Var1)" ( (pointer_expression "*pp_Var1" * identifier) )) [ (pointer_expression "*(byte *)(param_1 + iVar3)" * (cast_expression "(byte *)(param_1 + iVar3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + iVar3)" ( (binary_expression "param_1 + iVar3" identifier + identifier) )))) ]) - (subscript_expression "(*pp_Var1)[*(byte *)(param_2 + iVar3)]" (parenthesized_expression "(*pp_Var1)" ( (pointer_expression "*pp_Var1" * identifier) )) [ (pointer_expression "*(byte *)(param_2 + iVar3)" * (cast_expression "(byte *)(param_2 + iVar3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + iVar3)" ( (binary_expression "param_2 + iVar3" identifier + identifier) )))) ]))) ;) (if_statement "if (iVar2 != 0) {\n        return iVar2;\n      }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        return iVar2;\n      }" { (return_statement "return iVar2;" return identifier ;) })) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar3 != param_3)" ( (binary_expression "iVar3 != param_3" identifier != identifier) )) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression (parenthesized_expression ( (pointer_expression * IDENT) )) [ (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) ]) - (subscript_expression (parenthesized_expression ( (pointer_expression * IDENT) )) [ (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) (return_statement return LIT ;) })))
(function_definition "int FUN_000139d0(int param_1,int param_2,int param_3)\n\n{\n  __int32_t **pp_Var1;\n  int iVar2;\n  int iVar3;\n  \n  if (param_3 != 0) {\n    pp_Var1 = __ctype_toupper_loc();\n    iVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    } while (iVar3 != param_3);\n  }\n  return 0;\n}" (primitive_type "int") (function_declarator "FUN_000139d0(int param_1,int param_2,int param_3)" (identifier "FUN_000139d0") (parameter_list "(int param_1,int param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  __int32_t **pp_Var1;\n  int iVar2;\n  int iVar3;\n  \n  if (param_3 != 0) {\n    pp_Var1 = __ctype_toupper_loc();\n    iVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    } while (iVar3 != param_3);\n  }\n  return 0;\n}" ({ "{") (declaration "__int32_t **pp_Var1;" (type_identifier "__int32_t") (pointer_declarator "**pp_Var1" (* "*") (pointer_declarator "*pp_Var1" (* "*") (identifier "pp_Var1"))) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (if_statement "if (param_3 != 0) {\n    pp_Var1 = __ctype_toupper_loc();\n    iVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    } while (iVar3 != param_3);\n  }" (if "if") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    pp_Var1 = __ctype_toupper_loc();\n    iVar3 = 0;\n    do {\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    } while (iVar3 != param_3);\n  }" ({ "{") (expression_statement "pp_Var1 = __ctype_toupper_loc();" (assignment_expression "pp_Var1 = __ctype_toupper_loc()" (identifier "pp_Var1") (= "=") (call_expression "__ctype_toupper_loc()" (identifier "__ctype_toupper_loc") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    } while (iVar3 != param_3);" (do "do") (compound_statement "{\n      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];\n      if (iVar2 != 0) {\n        return iVar2;\n      }\n      iVar3 = iVar3 + 1;\n    }" ({ "{") (expression_statement "iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];" (assignment_expression "iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)]" (identifier "iVar2") (= "=") (binary_expression "(*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)]" (subscript_expression "(*pp_Var1)[*(byte *)(param_1 + iVar3)]" (parenthesized_expression "(*pp_Var1)" (( "(") (pointer_expression "*pp_Var1" (* "*") (identifier "pp_Var1")) () ")")) ([ "[") (pointer_expression "*(byte *)(param_1 + iVar3)" (* "*") (cast_expression "(byte *)(param_1 + iVar3)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + iVar3)" (( "(") (binary_expression "param_1 + iVar3" (identifier "param_1") (+ "+") (identifier "iVar3")) () ")")))) (] "]")) (- "-") (subscript_expression "(*pp_Var1)[*(byte *)(param_2 + iVar3)]" (parenthesized_expression "(*pp_Var1)" (( "(") (pointer_expression "*pp_Var1" (* "*") (identifier "pp_Var1")) () ")")) ([ "[") (pointer_expression "*(byte *)(param_2 + iVar3)" (* "*") (cast_expression "(byte *)(param_2 + iVar3)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + iVar3)" (( "(") (binary_expression "param_2 + iVar3" (identifier "param_2") (+ "+") (identifier "iVar3")) () ")")))) (] "]")))) (; ";")) (if_statement "if (iVar2 != 0) {\n        return iVar2;\n      }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        return iVar2;\n      }" ({ "{") (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}"))) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar3 != param_3)" (( "(") (binary_expression "iVar3 != param_3" (identifier "iVar3") (!= "!=") (identifier "param_3")) () ")")) (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

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

int function_1(void *vs1,void *vs2,size_t var_1)

{
  type_1 **pp_Var1;
  int var_4;
  size_t var_3;
  
  if (var_1 != 0) {
    pp_Var1 = var_2();
    var_3 = 0;
    do {
      var_4 = (*pp_Var1)[*(type_2 *)((int)vs1 + var_3)] - (*pp_Var1)[*(type_2 *)((int)vs2 + var_3)];
      if (var_4 != 0) {
        return var_4;
      }
      var_3 = var_3 + 1;
    } while (var_3 != var_1);
  }
  return 0;
}


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

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

int MASKED(int param_1,int param_2,int param_3)

{
  __int32_t **pp_Var1;
  int iVar2;
  int iVar3;
  
  if (param_3 != 0) {
    pp_Var1 = __ctype_toupper_loc();
    iVar3 = 0;
    do {
      iVar2 = (*pp_Var1)[*(byte *)(param_1 + iVar3)] - (*pp_Var1)[*(byte *)(param_2 + iVar3)];
      if (iVar2 != 0) {
        return iVar2;
      }
      iVar3 = iVar3 + 1;
    } while (iVar3 != param_3);
  }
  return 0;
}

