
/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */

uchar getType(int ch)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  
  iVar1 = 0x269;
  iVar5 = -1;
  do {
    iVar3 = iVar1;
    if (iVar3 - iVar5 < 2) {
      return '\x12';
    }
    iVar2 = (iVar3 + iVar5) / 2;
    iVar4 = iVar2 * 0xc;
    iVar1 = iVar2;
  } while ((ch < *(int *)(lookup_3372 + iVar4)) ||
          (iVar1 = iVar3, iVar5 = iVar2, *(int *)(lookup_3372 + iVar4 + 4) < ch));
  return lookup_3372[iVar4 + 8];
}



undefined1 FUN_0002aa60(int param_1)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int extraout_ECX;
  int iVar4;
  int iVar5;
  int unaff_EBP;
  
  FUN_0002c7f0();
  iVar2 = extraout_ECX;
  iVar5 = -1;
  do {
    iVar4 = iVar2;
    if (iVar4 - iVar5 < 2) {
      return 0x12;
    }
    iVar3 = (iVar4 + iVar5) / 2;
    iVar2 = iVar3;
  } while ((param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||
          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,
          *(int *)(iVar1 + 4) < param_1));
  return *(undefined1 *)(iVar1 + 8);
}


PUSH EBP
MOV ECX,0x269
CALL 0x0002c7f0
ADD EBP,0x85d39
PUSH EDI
PUSH ESI
PUSH EBX
MOV EBX,0xffffffff
MOV ESI,dword ptr [ESP + 0x14]
LEA EDI,[EBP + 0xfffccadc]
JMP 0x0002aaa1
LEA EDX,[ECX + EBX*0x1]
MOV EAX,EDX
SHR EAX,0x1f
ADD EAX,EDX
SAR EAX,0x1
LEA EDX,[EAX + EAX*0x2]
SHL EDX,0x2
CMP dword ptr [EDI + EDX*0x1],ESI
JLE 0x0002aab8
MOV ECX,EAX
MOV EAX,ECX
SUB EAX,EBX
CMP EAX,0x1
JG 0x0002aa88
MOV EAX,0x12
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EBX,EAX
LEA EAX,[EBP + EDX*0x1 + 0xfffccadc]
CMP dword ptr [EAX + 0x4],ESI
JL 0x0002aaa1
MOVZX EAX,byte ptr [EAX + 0x8]
JMP 0x0002aaaf
(translation_unit "undefined1 FUN_0002aa60(int param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  int iVar5;\n  int unaff_EBP;\n  \n  FUN_0002c7f0();\n  iVar2 = extraout_ECX;\n  iVar5 = -1;\n  do {\n    iVar4 = iVar2;\n    if (iVar4 - iVar5 < 2) {\n      return 0x12;\n    }\n    iVar3 = (iVar4 + iVar5) / 2;\n    iVar2 = iVar3;\n  } while ((param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||\n          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1));\n  return *(undefined1 *)(iVar1 + 8);\n}\n\n" (function_definition "undefined1 FUN_0002aa60(int param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  int iVar5;\n  int unaff_EBP;\n  \n  FUN_0002c7f0();\n  iVar2 = extraout_ECX;\n  iVar5 = -1;\n  do {\n    iVar4 = iVar2;\n    if (iVar4 - iVar5 < 2) {\n      return 0x12;\n    }\n    iVar3 = (iVar4 + iVar5) / 2;\n    iVar2 = iVar3;\n  } while ((param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||\n          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1));\n  return *(undefined1 *)(iVar1 + 8);\n}" type_identifier (function_declarator "FUN_0002aa60(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  int iVar5;\n  int unaff_EBP;\n  \n  FUN_0002c7f0();\n  iVar2 = extraout_ECX;\n  iVar5 = -1;\n  do {\n    iVar4 = iVar2;\n    if (iVar4 - iVar5 < 2) {\n      return 0x12;\n    }\n    iVar3 = (iVar4 + iVar5) / 2;\n    iVar2 = iVar3;\n  } while ((param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||\n          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1));\n  return *(undefined1 *)(iVar1 + 8);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int extraout_ECX;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int unaff_EBP;" primitive_type identifier ;) (expression_statement "FUN_0002c7f0();" (call_expression "FUN_0002c7f0()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar2 = extraout_ECX;" (assignment_expression "iVar2 = extraout_ECX" identifier = identifier) ;) (expression_statement "iVar5 = -1;" (assignment_expression "iVar5 = -1" identifier = number_literal) ;) (do_statement "do {\n    iVar4 = iVar2;\n    if (iVar4 - iVar5 < 2) {\n      return 0x12;\n    }\n    iVar3 = (iVar4 + iVar5) / 2;\n    iVar2 = iVar3;\n  } while ((param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||\n          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1));" do (compound_statement "{\n    iVar4 = iVar2;\n    if (iVar4 - iVar5 < 2) {\n      return 0x12;\n    }\n    iVar3 = (iVar4 + iVar5) / 2;\n    iVar2 = iVar3;\n  }" { (expression_statement "iVar4 = iVar2;" (assignment_expression "iVar4 = iVar2" identifier = identifier) ;) (if_statement "if (iVar4 - iVar5 < 2) {\n      return 0x12;\n    }" if (parenthesized_expression "(iVar4 - iVar5 < 2)" ( (binary_expression "iVar4 - iVar5 < 2" (binary_expression "iVar4 - iVar5" identifier - identifier) < number_literal) )) (compound_statement "{\n      return 0x12;\n    }" { (return_statement "return 0x12;" return number_literal ;) })) (expression_statement "iVar3 = (iVar4 + iVar5) / 2;" (assignment_expression "iVar3 = (iVar4 + iVar5) / 2" identifier = (binary_expression "(iVar4 + iVar5) / 2" (parenthesized_expression "(iVar4 + iVar5)" ( (binary_expression "iVar4 + iVar5" identifier + identifier) )) / number_literal)) ;) (expression_statement "iVar2 = iVar3;" (assignment_expression "iVar2 = iVar3" identifier = identifier) ;) }) while (parenthesized_expression "((param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||\n          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1))" ( (binary_expression "(param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||\n          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1)" (parenthesized_expression "(param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc))" ( (binary_expression "param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)" identifier < (pointer_expression "*(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)" * (cast_expression "(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EBP + 0x52815 + iVar3 * 0xc)" ( (binary_expression "unaff_EBP + 0x52815 + iVar3 * 0xc" (binary_expression "unaff_EBP + 0x52815" identifier + number_literal) + (binary_expression "iVar3 * 0xc" identifier * number_literal)) ))))) )) || (parenthesized_expression "(iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1)" ( (comma_expression "iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1" (assignment_expression "iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc" identifier = (binary_expression "unaff_EBP + 0x52815 + iVar3 * 0xc" (binary_expression "unaff_EBP + 0x52815" identifier + number_literal) + (binary_expression "iVar3 * 0xc" identifier * number_literal))) , (comma_expression "iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1" (assignment_expression "iVar2 = iVar4" identifier = identifier) , (comma_expression "iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1" (assignment_expression "iVar5 = iVar3" identifier = identifier) , (binary_expression "*(int *)(iVar1 + 4) < param_1" (pointer_expression "*(int *)(iVar1 + 4)" * (cast_expression "(int *)(iVar1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) < identifier)))) ))) )) ;) (return_statement "return *(undefined1 *)(iVar1 + 8);" return (pointer_expression "*(undefined1 *)(iVar1 + 8)" * (cast_expression "(undefined1 *)(iVar1 + 8)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) )))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */\n\nuchar getType(int ch)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  iVar1 = 0x269;\n  iVar5 = -1;\n  do {\n    iVar3 = iVar1;\n    if (iVar3 - iVar5 < 2) {\n      return '\x12';\n    }\n    iVar2 = (iVar3 + iVar5) / 2;\n    iVar4 = iVar2 * 0xc;\n    iVar1 = iVar2;\n  } while ((ch < *(int *)(lookup_3372 + iVar4)) ||\n          (iVar1 = iVar3, iVar5 = iVar2, *(int *)(lookup_3372 + iVar4 + 4) < ch));\n  return lookup_3372[iVar4 + 8];\n}\n\n" comment (function_definition "uchar getType(int ch)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  iVar1 = 0x269;\n  iVar5 = -1;\n  do {\n    iVar3 = iVar1;\n    if (iVar3 - iVar5 < 2) {\n      return '\x12';\n    }\n    iVar2 = (iVar3 + iVar5) / 2;\n    iVar4 = iVar2 * 0xc;\n    iVar1 = iVar2;\n  } while ((ch < *(int *)(lookup_3372 + iVar4)) ||\n          (iVar1 = iVar3, iVar5 = iVar2, *(int *)(lookup_3372 + iVar4 + 4) < ch));\n  return lookup_3372[iVar4 + 8];\n}" type_identifier (function_declarator "getType(int ch)" identifier (parameter_list "(int ch)" ( (parameter_declaration "int ch" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  iVar1 = 0x269;\n  iVar5 = -1;\n  do {\n    iVar3 = iVar1;\n    if (iVar3 - iVar5 < 2) {\n      return '\x12';\n    }\n    iVar2 = (iVar3 + iVar5) / 2;\n    iVar4 = iVar2 * 0xc;\n    iVar1 = iVar2;\n  } while ((ch < *(int *)(lookup_3372 + iVar4)) ||\n          (iVar1 = iVar3, iVar5 = iVar2, *(int *)(lookup_3372 + iVar4 + 4) < ch));\n  return lookup_3372[iVar4 + 8];\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "iVar1 = 0x269;" (assignment_expression "iVar1 = 0x269" identifier = number_literal) ;) (expression_statement "iVar5 = -1;" (assignment_expression "iVar5 = -1" identifier = number_literal) ;) (do_statement "do {\n    iVar3 = iVar1;\n    if (iVar3 - iVar5 < 2) {\n      return '\x12';\n    }\n    iVar2 = (iVar3 + iVar5) / 2;\n    iVar4 = iVar2 * 0xc;\n    iVar1 = iVar2;\n  } while ((ch < *(int *)(lookup_3372 + iVar4)) ||\n          (iVar1 = iVar3, iVar5 = iVar2, *(int *)(lookup_3372 + iVar4 + 4) < ch));" do (compound_statement "{\n    iVar3 = iVar1;\n    if (iVar3 - iVar5 < 2) {\n      return '\x12';\n    }\n    iVar2 = (iVar3 + iVar5) / 2;\n    iVar4 = iVar2 * 0xc;\n    iVar1 = iVar2;\n  }" { (expression_statement "iVar3 = iVar1;" (assignment_expression "iVar3 = iVar1" identifier = identifier) ;) (if_statement "if (iVar3 - iVar5 < 2) {\n      return '\x12';\n    }" if (parenthesized_expression "(iVar3 - iVar5 < 2)" ( (binary_expression "iVar3 - iVar5 < 2" (binary_expression "iVar3 - iVar5" identifier - identifier) < number_literal) )) (compound_statement "{\n      return '\x12';\n    }" { (return_statement "return '\x12';" return (char_literal "'\x12'" ' escape_sequence ') ;) })) (expression_statement "iVar2 = (iVar3 + iVar5) / 2;" (assignment_expression "iVar2 = (iVar3 + iVar5) / 2" identifier = (binary_expression "(iVar3 + iVar5) / 2" (parenthesized_expression "(iVar3 + iVar5)" ( (binary_expression "iVar3 + iVar5" identifier + identifier) )) / number_literal)) ;) (expression_statement "iVar4 = iVar2 * 0xc;" (assignment_expression "iVar4 = iVar2 * 0xc" identifier = (binary_expression "iVar2 * 0xc" identifier * number_literal)) ;) (expression_statement "iVar1 = iVar2;" (assignment_expression "iVar1 = iVar2" identifier = identifier) ;) }) while (parenthesized_expression "((ch < *(int *)(lookup_3372 + iVar4)) ||\n          (iVar1 = iVar3, iVar5 = iVar2, *(int *)(lookup_3372 + iVar4 + 4) < ch))" ( (binary_expression "(ch < *(int *)(lookup_3372 + iVar4)) ||\n          (iVar1 = iVar3, iVar5 = iVar2, *(int *)(lookup_3372 + iVar4 + 4) < ch)" (parenthesized_expression "(ch < *(int *)(lookup_3372 + iVar4))" ( (binary_expression "ch < *(int *)(lookup_3372 + iVar4)" identifier < (pointer_expression "*(int *)(lookup_3372 + iVar4)" * (cast_expression "(int *)(lookup_3372 + iVar4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lookup_3372 + iVar4)" ( (binary_expression "lookup_3372 + iVar4" identifier + identifier) ))))) )) || (parenthesized_expression "(iVar1 = iVar3, iVar5 = iVar2, *(int *)(lookup_3372 + iVar4 + 4) < ch)" ( (comma_expression "iVar1 = iVar3, iVar5 = iVar2, *(int *)(lookup_3372 + iVar4 + 4) < ch" (assignment_expression "iVar1 = iVar3" identifier = identifier) , (comma_expression "iVar5 = iVar2, *(int *)(lookup_3372 + iVar4 + 4) < ch" (assignment_expression "iVar5 = iVar2" identifier = identifier) , (binary_expression "*(int *)(lookup_3372 + iVar4 + 4) < ch" (pointer_expression "*(int *)(lookup_3372 + iVar4 + 4)" * (cast_expression "(int *)(lookup_3372 + iVar4 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lookup_3372 + iVar4 + 4)" ( (binary_expression "lookup_3372 + iVar4 + 4" (binary_expression "lookup_3372 + iVar4" identifier + identifier) + number_literal) )))) < identifier))) ))) )) ;) (return_statement "return lookup_3372[iVar4 + 8];" return (subscript_expression "lookup_3372[iVar4 + 8]" identifier [ (binary_expression "iVar4 + 8" identifier + number_literal) ]) ;) })))
(translation_unit "undefined1 FUN_0002aa60(int param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  int iVar5;\n  int unaff_EBP;\n  \n  FUN_0002c7f0();\n  iVar2 = extraout_ECX;\n  iVar5 = -1;\n  do {\n    iVar4 = iVar2;\n    if (iVar4 - iVar5 < 2) {\n      return 0x12;\n    }\n    iVar3 = (iVar4 + iVar5) / 2;\n    iVar2 = iVar3;\n  } while ((param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||\n          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1));\n  return *(undefined1 *)(iVar1 + 8);\n}\n\n" (function_definition "undefined1 FUN_0002aa60(int param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  int iVar5;\n  int unaff_EBP;\n  \n  FUN_0002c7f0();\n  iVar2 = extraout_ECX;\n  iVar5 = -1;\n  do {\n    iVar4 = iVar2;\n    if (iVar4 - iVar5 < 2) {\n      return 0x12;\n    }\n    iVar3 = (iVar4 + iVar5) / 2;\n    iVar2 = iVar3;\n  } while ((param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||\n          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1));\n  return *(undefined1 *)(iVar1 + 8);\n}" type_identifier (function_declarator "FUN_0002aa60(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  int iVar5;\n  int unaff_EBP;\n  \n  FUN_0002c7f0();\n  iVar2 = extraout_ECX;\n  iVar5 = -1;\n  do {\n    iVar4 = iVar2;\n    if (iVar4 - iVar5 < 2) {\n      return 0x12;\n    }\n    iVar3 = (iVar4 + iVar5) / 2;\n    iVar2 = iVar3;\n  } while ((param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||\n          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1));\n  return *(undefined1 *)(iVar1 + 8);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int extraout_ECX;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int unaff_EBP;" primitive_type identifier ;) (expression_statement "FUN_0002c7f0();" (call_expression "FUN_0002c7f0()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar2 = extraout_ECX;" (assignment_expression "iVar2 = extraout_ECX" identifier = identifier) ;) (expression_statement "iVar5 = -1;" (assignment_expression "iVar5 = -1" identifier = number_literal) ;) (do_statement "do {\n    iVar4 = iVar2;\n    if (iVar4 - iVar5 < 2) {\n      return 0x12;\n    }\n    iVar3 = (iVar4 + iVar5) / 2;\n    iVar2 = iVar3;\n  } while ((param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||\n          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1));" do (compound_statement "{\n    iVar4 = iVar2;\n    if (iVar4 - iVar5 < 2) {\n      return 0x12;\n    }\n    iVar3 = (iVar4 + iVar5) / 2;\n    iVar2 = iVar3;\n  }" { (expression_statement "iVar4 = iVar2;" (assignment_expression "iVar4 = iVar2" identifier = identifier) ;) (if_statement "if (iVar4 - iVar5 < 2) {\n      return 0x12;\n    }" if (parenthesized_expression "(iVar4 - iVar5 < 2)" ( (binary_expression "iVar4 - iVar5 < 2" (binary_expression "iVar4 - iVar5" identifier - identifier) < number_literal) )) (compound_statement "{\n      return 0x12;\n    }" { (return_statement "return 0x12;" return number_literal ;) })) (expression_statement "iVar3 = (iVar4 + iVar5) / 2;" (assignment_expression "iVar3 = (iVar4 + iVar5) / 2" identifier = (binary_expression "(iVar4 + iVar5) / 2" (parenthesized_expression "(iVar4 + iVar5)" ( (binary_expression "iVar4 + iVar5" identifier + identifier) )) / number_literal)) ;) (expression_statement "iVar2 = iVar3;" (assignment_expression "iVar2 = iVar3" identifier = identifier) ;) }) while (parenthesized_expression "((param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||\n          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1))" ( (binary_expression "(param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||\n          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1)" (parenthesized_expression "(param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc))" ( (binary_expression "param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)" identifier < (pointer_expression "*(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)" * (cast_expression "(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EBP + 0x52815 + iVar3 * 0xc)" ( (binary_expression "unaff_EBP + 0x52815 + iVar3 * 0xc" (binary_expression "unaff_EBP + 0x52815" identifier + number_literal) + (binary_expression "iVar3 * 0xc" identifier * number_literal)) ))))) )) || (parenthesized_expression "(iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1)" ( (comma_expression "iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1" (assignment_expression "iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc" identifier = (binary_expression "unaff_EBP + 0x52815 + iVar3 * 0xc" (binary_expression "unaff_EBP + 0x52815" identifier + number_literal) + (binary_expression "iVar3 * 0xc" identifier * number_literal))) , (comma_expression "iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1" (assignment_expression "iVar2 = iVar4" identifier = identifier) , (comma_expression "iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1" (assignment_expression "iVar5 = iVar3" identifier = identifier) , (binary_expression "*(int *)(iVar1 + 4) < param_1" (pointer_expression "*(int *)(iVar1 + 4)" * (cast_expression "(int *)(iVar1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) < identifier)))) ))) )) ;) (return_statement "return *(undefined1 *)(iVar1 + 8);" return (pointer_expression "*(undefined1 *)(iVar1 + 8)" * (cast_expression "(undefined1 *)(iVar1 + 8)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 8)" ( (binary_expression "iVar1 + 8" identifier + number_literal) )))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - IDENT) < LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT + IDENT) )) / LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT)) ))))) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT))) , (comma_expression (assignment_expression IDENT = IDENT) , (comma_expression (assignment_expression IDENT = IDENT) , (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < IDENT)))) ))) )) ;) (return_statement return (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) })))
(function_definition "undefined1 FUN_0002aa60(int param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  int iVar5;\n  int unaff_EBP;\n  \n  FUN_0002c7f0();\n  iVar2 = extraout_ECX;\n  iVar5 = -1;\n  do {\n    iVar4 = iVar2;\n    if (iVar4 - iVar5 < 2) {\n      return 0x12;\n    }\n    iVar3 = (iVar4 + iVar5) / 2;\n    iVar2 = iVar3;\n  } while ((param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||\n          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1));\n  return *(undefined1 *)(iVar1 + 8);\n}" (type_identifier "undefined1") (function_declarator "FUN_0002aa60(int param_1)" (identifier "FUN_0002aa60") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int extraout_ECX;\n  int iVar4;\n  int iVar5;\n  int unaff_EBP;\n  \n  FUN_0002c7f0();\n  iVar2 = extraout_ECX;\n  iVar5 = -1;\n  do {\n    iVar4 = iVar2;\n    if (iVar4 - iVar5 < 2) {\n      return 0x12;\n    }\n    iVar3 = (iVar4 + iVar5) / 2;\n    iVar2 = iVar3;\n  } while ((param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||\n          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1));\n  return *(undefined1 *)(iVar1 + 8);\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int extraout_ECX;" (primitive_type "int") (identifier "extraout_ECX") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int unaff_EBP;" (primitive_type "int") (identifier "unaff_EBP") (; ";")) (expression_statement "FUN_0002c7f0();" (call_expression "FUN_0002c7f0()" (identifier "FUN_0002c7f0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar2 = extraout_ECX;" (assignment_expression "iVar2 = extraout_ECX" (identifier "iVar2") (= "=") (identifier "extraout_ECX")) (; ";")) (expression_statement "iVar5 = -1;" (assignment_expression "iVar5 = -1" (identifier "iVar5") (= "=") (number_literal "-1")) (; ";")) (do_statement "do {\n    iVar4 = iVar2;\n    if (iVar4 - iVar5 < 2) {\n      return 0x12;\n    }\n    iVar3 = (iVar4 + iVar5) / 2;\n    iVar2 = iVar3;\n  } while ((param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||\n          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1));" (do "do") (compound_statement "{\n    iVar4 = iVar2;\n    if (iVar4 - iVar5 < 2) {\n      return 0x12;\n    }\n    iVar3 = (iVar4 + iVar5) / 2;\n    iVar2 = iVar3;\n  }" ({ "{") (expression_statement "iVar4 = iVar2;" (assignment_expression "iVar4 = iVar2" (identifier "iVar4") (= "=") (identifier "iVar2")) (; ";")) (if_statement "if (iVar4 - iVar5 < 2) {\n      return 0x12;\n    }" (if "if") (parenthesized_expression "(iVar4 - iVar5 < 2)" (( "(") (binary_expression "iVar4 - iVar5 < 2" (binary_expression "iVar4 - iVar5" (identifier "iVar4") (- "-") (identifier "iVar5")) (< "<") (number_literal "2")) () ")")) (compound_statement "{\n      return 0x12;\n    }" ({ "{") (return_statement "return 0x12;" (return "return") (number_literal "0x12") (; ";")) (} "}"))) (expression_statement "iVar3 = (iVar4 + iVar5) / 2;" (assignment_expression "iVar3 = (iVar4 + iVar5) / 2" (identifier "iVar3") (= "=") (binary_expression "(iVar4 + iVar5) / 2" (parenthesized_expression "(iVar4 + iVar5)" (( "(") (binary_expression "iVar4 + iVar5" (identifier "iVar4") (+ "+") (identifier "iVar5")) () ")")) (/ "/") (number_literal "2"))) (; ";")) (expression_statement "iVar2 = iVar3;" (assignment_expression "iVar2 = iVar3" (identifier "iVar2") (= "=") (identifier "iVar3")) (; ";")) (} "}")) (while "while") (parenthesized_expression "((param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||\n          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1))" (( "(") (binary_expression "(param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||\n          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1)" (parenthesized_expression "(param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc))" (( "(") (binary_expression "param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)" (identifier "param_1") (< "<") (pointer_expression "*(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)" (* "*") (cast_expression "(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EBP + 0x52815 + iVar3 * 0xc)" (( "(") (binary_expression "unaff_EBP + 0x52815 + iVar3 * 0xc" (binary_expression "unaff_EBP + 0x52815" (identifier "unaff_EBP") (+ "+") (number_literal "0x52815")) (+ "+") (binary_expression "iVar3 * 0xc" (identifier "iVar3") (* "*") (number_literal "0xc"))) () ")"))))) () ")")) (|| "||") (parenthesized_expression "(iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1)" (( "(") (comma_expression "iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1" (assignment_expression "iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc" (identifier "iVar1") (= "=") (binary_expression "unaff_EBP + 0x52815 + iVar3 * 0xc" (binary_expression "unaff_EBP + 0x52815" (identifier "unaff_EBP") (+ "+") (number_literal "0x52815")) (+ "+") (binary_expression "iVar3 * 0xc" (identifier "iVar3") (* "*") (number_literal "0xc")))) (, ",") (comma_expression "iVar2 = iVar4, iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1" (assignment_expression "iVar2 = iVar4" (identifier "iVar2") (= "=") (identifier "iVar4")) (, ",") (comma_expression "iVar5 = iVar3,\n          *(int *)(iVar1 + 4) < param_1" (assignment_expression "iVar5 = iVar3" (identifier "iVar5") (= "=") (identifier "iVar3")) (, ",") (binary_expression "*(int *)(iVar1 + 4) < param_1" (pointer_expression "*(int *)(iVar1 + 4)" (* "*") (cast_expression "(int *)(iVar1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 4)" (( "(") (binary_expression "iVar1 + 4" (identifier "iVar1") (+ "+") (number_literal "4")) () ")")))) (< "<") (identifier "param_1"))))) () ")"))) () ")")) (; ";")) (return_statement "return *(undefined1 *)(iVar1 + 8);" (return "return") (pointer_expression "*(undefined1 *)(iVar1 + 8)" (* "*") (cast_expression "(undefined1 *)(iVar1 + 8)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 8)" (( "(") (binary_expression "iVar1 + 8" (identifier "iVar1") (+ "+") (number_literal "8")) () ")")))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */

type_1 function_1(int var_4)

{
  int iVar1;
  int var_3;
  int var_1;
  int var_6;
  int var_2;
  
  iVar1 = 0x269;
  var_2 = -1;
  do {
    var_1 = iVar1;
    if (var_1 - var_2 < 2) {
      return '\x12';
    }
    var_3 = (var_1 + var_2) / 2;
    var_6 = var_3 * 0xc;
    iVar1 = var_3;
  } while ((var_4 < *(int *)(var_5 + var_6)) ||
          (iVar1 = var_1, var_2 = var_3, *(int *)(var_5 + var_6 + 4) < var_4));
  return var_5[var_6 + 8];
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))))))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))) right: (comma_expression left: (assignment_expression left: (identifier) right: (identifier)) right: (comma_expression left: (assignment_expression left: (identifier) right: (identifier)) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))))))))) (return_statement (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))))

undefined1 MASKED(int param_1)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int extraout_ECX;
  int iVar4;
  int iVar5;
  int unaff_EBP;
  
  FUN_0002c7f0();
  iVar2 = extraout_ECX;
  iVar5 = -1;
  do {
    iVar4 = iVar2;
    if (iVar4 - iVar5 < 2) {
      return 0x12;
    }
    iVar3 = (iVar4 + iVar5) / 2;
    iVar2 = iVar3;
  } while ((param_1 < *(int *)(unaff_EBP + 0x52815 + iVar3 * 0xc)) ||
          (iVar1 = unaff_EBP + 0x52815 + iVar3 * 0xc, iVar2 = iVar4, iVar5 = iVar3,
          *(int *)(iVar1 + 4) < param_1));
  return *(undefined1 *)(iVar1 + 8);
}

