
/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

int i386_elf_section_type(char *str,size_t len)

{
  int iVar1;
  byte *pbVar2;
  bool bVar3;
  bool bVar4;
  
  if (flag_code != CODE_64BIT) {
    return -1;
  }
  bVar3 = len < 6;
  bVar4 = len == 6;
  if (bVar4) {
    iVar1 = 6;
    pbVar2 = (byte *)"unwind";
    do {
      if (iVar1 == 0) break;
      iVar1 = iVar1 + -1;
      bVar3 = (byte)*str < *pbVar2;
      bVar4 = *str == *pbVar2;
      str = (char *)((byte *)str + 1);
      pbVar2 = pbVar2 + 1;
    } while (bVar4);
    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;
  }
  else {
    iVar1 = -1;
  }
  return iVar1;
}



/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

int FUN_00050da0(byte *param_1,uint param_2)

{
  int iVar1;
  byte *pbVar2;
  bool bVar3;
  bool bVar4;
  
  if (DAT_00083ee8 != 2) {
    return -1;
  }
  bVar3 = param_2 < 6;
  bVar4 = param_2 == 6;
  if (bVar4) {
    iVar1 = 6;
    pbVar2 = (byte *)"unwind";
    do {
      if (iVar1 == 0) break;
      iVar1 = iVar1 + -1;
      bVar3 = *param_1 < *pbVar2;
      bVar4 = *param_1 == *pbVar2;
      param_1 = param_1 + 1;
      pbVar2 = pbVar2 + 1;
    } while (bVar4);
    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;
  }
  else {
    iVar1 = -1;
  }
  return iVar1;
}


CALL 0x00017d3a
ADD EAX,0x2a25b
CMP dword ptr [EAX + 0x8ee8],0x2
JNZ 0x00050df0
PUSH EDI
PUSH ESI
CMP dword ptr [ESP + 0x10],0x6
JNZ 0x00050de8
MOV ESI,dword ptr [ESP + 0xc]
LEA EDI,[EAX + 0xfffe51a8]
MOV ECX,0x6
CMPSB.REPE ES:EDI,ESI
SETA AL
SBB AL,0x0
MOVSX EAX,AL
CMP EAX,0x1
SBB EAX,EAX
AND EAX,0x70000002
SUB EAX,0x1
POP ESI
POP EDI
RET
MOV EAX,0xffffffff
JMP 0x00050de2
MOV EAX,0xffffffff
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nint FUN_00050da0(byte *param_1,uint param_2)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  if (DAT_00083ee8 != 2) {\n    return -1;\n  }\n  bVar3 = param_2 < 6;\n  bVar4 = param_2 == 6;\n  if (bVar4) {\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }\n  else {\n    iVar1 = -1;\n  }\n  return iVar1;\n}\n\n" comment (function_definition "int FUN_00050da0(byte *param_1,uint param_2)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  if (DAT_00083ee8 != 2) {\n    return -1;\n  }\n  bVar3 = param_2 < 6;\n  bVar4 = param_2 == 6;\n  if (bVar4) {\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }\n  else {\n    iVar1 = -1;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_00050da0(byte *param_1,uint param_2)" identifier (parameter_list "(byte *param_1,uint param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  if (DAT_00083ee8 != 2) {\n    return -1;\n  }\n  bVar3 = param_2 < 6;\n  bVar4 = param_2 == 6;\n  if (bVar4) {\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }\n  else {\n    iVar1 = -1;\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "bool bVar4;" primitive_type identifier ;) (if_statement "if (DAT_00083ee8 != 2) {\n    return -1;\n  }" if (parenthesized_expression "(DAT_00083ee8 != 2)" ( (binary_expression "DAT_00083ee8 != 2" identifier != number_literal) )) (compound_statement "{\n    return -1;\n  }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "bVar3 = param_2 < 6;" (assignment_expression "bVar3 = param_2 < 6" identifier = (binary_expression "param_2 < 6" identifier < number_literal)) ;) (expression_statement "bVar4 = param_2 == 6;" (assignment_expression "bVar4 = param_2 == 6" identifier = (binary_expression "param_2 == 6" identifier == number_literal)) ;) (if_statement "if (bVar4) {\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }\n  else {\n    iVar1 = -1;\n  }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }" { (expression_statement "iVar1 = 6;" (assignment_expression "iVar1 = 6" identifier = number_literal) ;) (expression_statement "pbVar2 = (byte *)"unwind";" (assignment_expression "pbVar2 = (byte *)"unwind"" identifier = (cast_expression "(byte *)"unwind"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""unwind"" " string_content "))) ;) (do_statement "do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);" do (compound_statement "{\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    }" { (if_statement "if (iVar1 == 0) break;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = iVar1 + -1;" (assignment_expression "iVar1 = iVar1 + -1" identifier = (binary_expression "iVar1 + -1" identifier + number_literal)) ;) (expression_statement "bVar3 = *param_1 < *pbVar2;" (assignment_expression "bVar3 = *param_1 < *pbVar2" identifier = (binary_expression "*param_1 < *pbVar2" (pointer_expression "*param_1" * identifier) < (pointer_expression "*pbVar2" * identifier))) ;) (expression_statement "bVar4 = *param_1 == *pbVar2;" (assignment_expression "bVar4 = *param_1 == *pbVar2" identifier = (binary_expression "*param_1 == *pbVar2" (pointer_expression "*param_1" * identifier) == (pointer_expression "*pbVar2" * identifier))) ;) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar4)" ( identifier )) ;) (expression_statement "iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;" (assignment_expression "iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1" identifier = (binary_expression "(-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1" (parenthesized_expression "(-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002)" ( (binary_expression "-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002" (unary_expression "-(uint)((!bVar3 && !bVar4) == bVar3)" - (call_expression "(uint)((!bVar3 && !bVar4) == bVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((!bVar3 && !bVar4) == bVar3)" ( (binary_expression "(!bVar3 && !bVar4) == bVar3" (parenthesized_expression "(!bVar3 && !bVar4)" ( (binary_expression "!bVar3 && !bVar4" (unary_expression "!bVar3" ! identifier) && (unary_expression "!bVar4" ! identifier)) )) == identifier) )))) & number_literal) )) - number_literal)) ;) }) (else_clause "else {\n    iVar1 = -1;\n  }" else (compound_statement "{\n    iVar1 = -1;\n  }" { (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" identifier = number_literal) ;) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nint i386_elf_section_type(char *str,size_t len)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  if (flag_code != CODE_64BIT) {\n    return -1;\n  }\n  bVar3 = len < 6;\n  bVar4 = len == 6;\n  if (bVar4) {\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = (byte)*str < *pbVar2;\n      bVar4 = *str == *pbVar2;\n      str = (char *)((byte *)str + 1);\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }\n  else {\n    iVar1 = -1;\n  }\n  return iVar1;\n}\n\n" comment (function_definition "int i386_elf_section_type(char *str,size_t len)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  if (flag_code != CODE_64BIT) {\n    return -1;\n  }\n  bVar3 = len < 6;\n  bVar4 = len == 6;\n  if (bVar4) {\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = (byte)*str < *pbVar2;\n      bVar4 = *str == *pbVar2;\n      str = (char *)((byte *)str + 1);\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }\n  else {\n    iVar1 = -1;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "i386_elf_section_type(char *str,size_t len)" identifier (parameter_list "(char *str,size_t len)" ( (parameter_declaration "char *str" primitive_type (pointer_declarator "*str" * identifier)) , (parameter_declaration "size_t len" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  if (flag_code != CODE_64BIT) {\n    return -1;\n  }\n  bVar3 = len < 6;\n  bVar4 = len == 6;\n  if (bVar4) {\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = (byte)*str < *pbVar2;\n      bVar4 = *str == *pbVar2;\n      str = (char *)((byte *)str + 1);\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }\n  else {\n    iVar1 = -1;\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "bool bVar4;" primitive_type identifier ;) (if_statement "if (flag_code != CODE_64BIT) {\n    return -1;\n  }" if (parenthesized_expression "(flag_code != CODE_64BIT)" ( (binary_expression "flag_code != CODE_64BIT" identifier != identifier) )) (compound_statement "{\n    return -1;\n  }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "bVar3 = len < 6;" (assignment_expression "bVar3 = len < 6" identifier = (binary_expression "len < 6" identifier < number_literal)) ;) (expression_statement "bVar4 = len == 6;" (assignment_expression "bVar4 = len == 6" identifier = (binary_expression "len == 6" identifier == number_literal)) ;) (if_statement "if (bVar4) {\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = (byte)*str < *pbVar2;\n      bVar4 = *str == *pbVar2;\n      str = (char *)((byte *)str + 1);\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }\n  else {\n    iVar1 = -1;\n  }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = (byte)*str < *pbVar2;\n      bVar4 = *str == *pbVar2;\n      str = (char *)((byte *)str + 1);\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }" { (expression_statement "iVar1 = 6;" (assignment_expression "iVar1 = 6" identifier = number_literal) ;) (expression_statement "pbVar2 = (byte *)"unwind";" (assignment_expression "pbVar2 = (byte *)"unwind"" identifier = (cast_expression "(byte *)"unwind"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""unwind"" " string_content "))) ;) (do_statement "do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = (byte)*str < *pbVar2;\n      bVar4 = *str == *pbVar2;\n      str = (char *)((byte *)str + 1);\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);" do (compound_statement "{\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = (byte)*str < *pbVar2;\n      bVar4 = *str == *pbVar2;\n      str = (char *)((byte *)str + 1);\n      pbVar2 = pbVar2 + 1;\n    }" { (if_statement "if (iVar1 == 0) break;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = iVar1 + -1;" (assignment_expression "iVar1 = iVar1 + -1" identifier = (binary_expression "iVar1 + -1" identifier + number_literal)) ;) (expression_statement "bVar3 = (byte)*str < *pbVar2;" (assignment_expression "bVar3 = (byte)*str < *pbVar2" identifier = (binary_expression "(byte)*str < *pbVar2" (binary_expression "(byte)*str" (parenthesized_expression "(byte)" ( identifier )) * identifier) < (pointer_expression "*pbVar2" * identifier))) ;) (expression_statement "bVar4 = *str == *pbVar2;" (assignment_expression "bVar4 = *str == *pbVar2" identifier = (binary_expression "*str == *pbVar2" (pointer_expression "*str" * identifier) == (pointer_expression "*pbVar2" * identifier))) ;) (expression_statement "str = (char *)((byte *)str + 1);" (assignment_expression "str = (char *)((byte *)str + 1)" identifier = (cast_expression "(char *)((byte *)str + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)str + 1)" ( (binary_expression "(byte *)str + 1" (cast_expression "(byte *)str" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) ;) (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar4)" ( identifier )) ;) (expression_statement "iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;" (assignment_expression "iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1" identifier = (binary_expression "(-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1" (parenthesized_expression "(-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002)" ( (binary_expression "-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002" (unary_expression "-(uint)((!bVar3 && !bVar4) == bVar3)" - (call_expression "(uint)((!bVar3 && !bVar4) == bVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((!bVar3 && !bVar4) == bVar3)" ( (binary_expression "(!bVar3 && !bVar4) == bVar3" (parenthesized_expression "(!bVar3 && !bVar4)" ( (binary_expression "!bVar3 && !bVar4" (unary_expression "!bVar3" ! identifier) && (unary_expression "!bVar4" ! identifier)) )) == identifier) )))) & number_literal) )) - number_literal)) ;) }) (else_clause "else {\n    iVar1 = -1;\n  }" else (compound_statement "{\n    iVar1 = -1;\n  }" { (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" identifier = number_literal) ;) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int FUN_00050da0(byte *param_1,uint param_2)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  if (DAT_00083ee8 != 2) {\n    return -1;\n  }\n  bVar3 = param_2 < 6;\n  bVar4 = param_2 == 6;\n  if (bVar4) {\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }\n  else {\n    iVar1 = -1;\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_00050da0(byte *param_1,uint param_2)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  if (DAT_00083ee8 != 2) {\n    return -1;\n  }\n  bVar3 = param_2 < 6;\n  bVar4 = param_2 == 6;\n  if (bVar4) {\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }\n  else {\n    iVar1 = -1;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_00050da0(byte *param_1,uint param_2)" identifier (parameter_list "(byte *param_1,uint param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  if (DAT_00083ee8 != 2) {\n    return -1;\n  }\n  bVar3 = param_2 < 6;\n  bVar4 = param_2 == 6;\n  if (bVar4) {\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }\n  else {\n    iVar1 = -1;\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "bool bVar4;" primitive_type identifier ;) (if_statement "if (DAT_00083ee8 != 2) {\n    return -1;\n  }" if (parenthesized_expression "(DAT_00083ee8 != 2)" ( (binary_expression "DAT_00083ee8 != 2" identifier != number_literal) )) (compound_statement "{\n    return -1;\n  }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "bVar3 = param_2 < 6;" (assignment_expression "bVar3 = param_2 < 6" identifier = (binary_expression "param_2 < 6" identifier < number_literal)) ;) (expression_statement "bVar4 = param_2 == 6;" (assignment_expression "bVar4 = param_2 == 6" identifier = (binary_expression "param_2 == 6" identifier == number_literal)) ;) (if_statement "if (bVar4) {\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }\n  else {\n    iVar1 = -1;\n  }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }" { (expression_statement "iVar1 = 6;" (assignment_expression "iVar1 = 6" identifier = number_literal) ;) (expression_statement "pbVar2 = (byte *)"unwind";" (assignment_expression "pbVar2 = (byte *)"unwind"" identifier = (cast_expression "(byte *)"unwind"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""unwind"" " string_content "))) ;) (do_statement "do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);" do (compound_statement "{\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    }" { (if_statement "if (iVar1 == 0) break;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = iVar1 + -1;" (assignment_expression "iVar1 = iVar1 + -1" identifier = (binary_expression "iVar1 + -1" identifier + number_literal)) ;) (expression_statement "bVar3 = *param_1 < *pbVar2;" (assignment_expression "bVar3 = *param_1 < *pbVar2" identifier = (binary_expression "*param_1 < *pbVar2" (pointer_expression "*param_1" * identifier) < (pointer_expression "*pbVar2" * identifier))) ;) (expression_statement "bVar4 = *param_1 == *pbVar2;" (assignment_expression "bVar4 = *param_1 == *pbVar2" identifier = (binary_expression "*param_1 == *pbVar2" (pointer_expression "*param_1" * identifier) == (pointer_expression "*pbVar2" * identifier))) ;) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar4)" ( identifier )) ;) (expression_statement "iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;" (assignment_expression "iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1" identifier = (binary_expression "(-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1" (parenthesized_expression "(-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002)" ( (binary_expression "-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002" (unary_expression "-(uint)((!bVar3 && !bVar4) == bVar3)" - (call_expression "(uint)((!bVar3 && !bVar4) == bVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((!bVar3 && !bVar4) == bVar3)" ( (binary_expression "(!bVar3 && !bVar4) == bVar3" (parenthesized_expression "(!bVar3 && !bVar4)" ( (binary_expression "!bVar3 && !bVar4" (unary_expression "!bVar3" ! identifier) && (unary_expression "!bVar4" ! identifier)) )) == identifier) )))) & number_literal) )) - number_literal)) ;) }) (else_clause "else {\n    iVar1 = -1;\n  }" else (compound_statement "{\n    iVar1 = -1;\n  }" { (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" identifier = number_literal) ;) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT < LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT == LIT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (string_literal " string_content "))) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) < (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) == (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( IDENT )) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (unary_expression - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression (unary_expression ! IDENT) && (unary_expression ! IDENT)) )) == IDENT) )))) & LIT) )) - LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))) (return_statement return IDENT ;) })))
(function_definition "int FUN_00050da0(byte *param_1,uint param_2)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  if (DAT_00083ee8 != 2) {\n    return -1;\n  }\n  bVar3 = param_2 < 6;\n  bVar4 = param_2 == 6;\n  if (bVar4) {\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }\n  else {\n    iVar1 = -1;\n  }\n  return iVar1;\n}" (primitive_type "int") (function_declarator "FUN_00050da0(byte *param_1,uint param_2)" (identifier "FUN_00050da0") (parameter_list "(byte *param_1,uint param_2)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  if (DAT_00083ee8 != 2) {\n    return -1;\n  }\n  bVar3 = param_2 < 6;\n  bVar4 = param_2 == 6;\n  if (bVar4) {\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }\n  else {\n    iVar1 = -1;\n  }\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "byte *pbVar2;" (type_identifier "byte") (pointer_declarator "*pbVar2" (* "*") (identifier "pbVar2")) (; ";")) (declaration "bool bVar3;" (primitive_type "bool") (identifier "bVar3") (; ";")) (declaration "bool bVar4;" (primitive_type "bool") (identifier "bVar4") (; ";")) (if_statement "if (DAT_00083ee8 != 2) {\n    return -1;\n  }" (if "if") (parenthesized_expression "(DAT_00083ee8 != 2)" (( "(") (binary_expression "DAT_00083ee8 != 2" (identifier "DAT_00083ee8") (!= "!=") (number_literal "2")) () ")")) (compound_statement "{\n    return -1;\n  }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (expression_statement "bVar3 = param_2 < 6;" (assignment_expression "bVar3 = param_2 < 6" (identifier "bVar3") (= "=") (binary_expression "param_2 < 6" (identifier "param_2") (< "<") (number_literal "6"))) (; ";")) (expression_statement "bVar4 = param_2 == 6;" (assignment_expression "bVar4 = param_2 == 6" (identifier "bVar4") (= "=") (binary_expression "param_2 == 6" (identifier "param_2") (== "==") (number_literal "6"))) (; ";")) (if_statement "if (bVar4) {\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }\n  else {\n    iVar1 = -1;\n  }" (if "if") (parenthesized_expression "(bVar4)" (( "(") (identifier "bVar4") () ")")) (compound_statement "{\n    iVar1 = 6;\n    pbVar2 = (byte *)"unwind";\n    do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);\n    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;\n  }" ({ "{") (expression_statement "iVar1 = 6;" (assignment_expression "iVar1 = 6" (identifier "iVar1") (= "=") (number_literal "6")) (; ";")) (expression_statement "pbVar2 = (byte *)"unwind";" (assignment_expression "pbVar2 = (byte *)"unwind"" (identifier "pbVar2") (= "=") (cast_expression "(byte *)"unwind"" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (string_literal ""unwind"" (" """) (string_content "unwind") (" """)))) (; ";")) (do_statement "do {\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    } while (bVar4);" (do "do") (compound_statement "{\n      if (iVar1 == 0) break;\n      iVar1 = iVar1 + -1;\n      bVar3 = *param_1 < *pbVar2;\n      bVar4 = *param_1 == *pbVar2;\n      param_1 = param_1 + 1;\n      pbVar2 = pbVar2 + 1;\n    }" ({ "{") (if_statement "if (iVar1 == 0) break;" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar1 = iVar1 + -1;" (assignment_expression "iVar1 = iVar1 + -1" (identifier "iVar1") (= "=") (binary_expression "iVar1 + -1" (identifier "iVar1") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "bVar3 = *param_1 < *pbVar2;" (assignment_expression "bVar3 = *param_1 < *pbVar2" (identifier "bVar3") (= "=") (binary_expression "*param_1 < *pbVar2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (< "<") (pointer_expression "*pbVar2" (* "*") (identifier "pbVar2")))) (; ";")) (expression_statement "bVar4 = *param_1 == *pbVar2;" (assignment_expression "bVar4 = *param_1 == *pbVar2" (identifier "bVar4") (= "=") (binary_expression "*param_1 == *pbVar2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (pointer_expression "*pbVar2" (* "*") (identifier "pbVar2")))) (; ";")) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" (identifier "param_1") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" (identifier "pbVar2") (= "=") (binary_expression "pbVar2 + 1" (identifier "pbVar2") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar4)" (( "(") (identifier "bVar4") () ")")) (; ";")) (expression_statement "iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;" (assignment_expression "iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1" (identifier "iVar1") (= "=") (binary_expression "(-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1" (parenthesized_expression "(-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002)" (( "(") (binary_expression "-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002" (unary_expression "-(uint)((!bVar3 && !bVar4) == bVar3)" (- "-") (call_expression "(uint)((!bVar3 && !bVar4) == bVar3)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((!bVar3 && !bVar4) == bVar3)" (( "(") (binary_expression "(!bVar3 && !bVar4) == bVar3" (parenthesized_expression "(!bVar3 && !bVar4)" (( "(") (binary_expression "!bVar3 && !bVar4" (unary_expression "!bVar3" (! "!") (identifier "bVar3")) (&& "&&") (unary_expression "!bVar4" (! "!") (identifier "bVar4"))) () ")")) (== "==") (identifier "bVar3")) () ")")))) (& "&") (number_literal "0x70000002")) () ")")) (- "-") (number_literal "1"))) (; ";")) (} "}")) (else_clause "else {\n    iVar1 = -1;\n  }" (else "else") (compound_statement "{\n    iVar1 = -1;\n  }" ({ "{") (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" (identifier "iVar1") (= "=") (number_literal "-1")) (; ";")) (} "}")))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

int function_1(char *var_5,size_t var_3)

{
  int var_4;
  type_1 *var_6;
  bool var_7;
  bool bVar4;
  
  if (var_1 != var_2) {
    return -1;
  }
  var_7 = var_3 < 6;
  bVar4 = var_3 == 6;
  if (bVar4) {
    var_4 = 6;
    var_6 = (type_1 *)"unwind";
    do {
      if (var_4 == 0) break;
      var_4 = var_4 + -1;
      var_7 = (type_1)*var_5 < *var_6;
      bVar4 = *var_5 == *var_6;
      var_5 = (char *)((type_1 *)var_5 + 1);
      var_6 = var_6 + 1;
    } while (bVar4);
    var_4 = (-(uint)((!var_7 && !bVar4) == var_7) & 0x70000002) - 1;
  }
  else {
    var_4 = -1;
  }
  return var_4;
}


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

/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

int MASKED(byte *param_1,uint param_2)

{
  int iVar1;
  byte *pbVar2;
  bool bVar3;
  bool bVar4;
  
  if (DAT_00083ee8 != 2) {
    return -1;
  }
  bVar3 = param_2 < 6;
  bVar4 = param_2 == 6;
  if (bVar4) {
    iVar1 = 6;
    pbVar2 = (byte *)"unwind";
    do {
      if (iVar1 == 0) break;
      iVar1 = iVar1 + -1;
      bVar3 = *param_1 < *pbVar2;
      bVar4 = *param_1 == *pbVar2;
      param_1 = param_1 + 1;
      pbVar2 = pbVar2 + 1;
    } while (bVar4);
    iVar1 = (-(uint)((!bVar3 && !bVar4) == bVar3) & 0x70000002) - 1;
  }
  else {
    iVar1 = -1;
  }
  return iVar1;
}

