
wchar_t platform_default_i(char *name,wchar_t def)

{
  long lVar1;
  char cVar2;
  byte *pbVar3;
  byte *pbVar4;
  undefined1 in_CF;
  bool bVar5;
  undefined1 in_ZF;
  bool bVar6;
  
  lVar1 = 0xc;
  pbVar3 = (byte *)name;
  pbVar4 = (byte *)"CloseOnExit";
  do {
    if (lVar1 == 0) break;
    lVar1 = lVar1 + -1;
    in_CF = *pbVar3 < *pbVar4;
    in_ZF = *pbVar3 == *pbVar4;
    pbVar3 = pbVar3 + 1;
    pbVar4 = pbVar4 + 1;
  } while ((bool)in_ZF);
  bVar5 = false;
  bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;
  if (bVar6) {
    return L'\x02';
  }
  lVar1 = 0xe;
  pbVar3 = (byte *)"WinNameAlways";
  do {
    if (lVar1 == 0) break;
    lVar1 = lVar1 + -1;
    bVar5 = (byte)*name < *pbVar3;
    bVar6 = *name == *pbVar3;
    name = (char *)((byte *)name + 1);
    pbVar3 = pbVar3 + 1;
  } while (bVar6);
  cVar2 = (!bVar5 && !bVar6) - bVar5;
  if (cVar2 == '\0') {
    def = (int)cVar2;
  }
  return def;
}



int FUN_001845b0(byte *param_1,int param_2)

{
  long lVar1;
  char cVar2;
  byte *pbVar3;
  byte *pbVar4;
  undefined1 in_CF;
  bool bVar5;
  undefined1 in_ZF;
  bool bVar6;
  
  lVar1 = 0xc;
  pbVar3 = param_1;
  pbVar4 = (byte *)"CloseOnExit";
  do {
    if (lVar1 == 0) break;
    lVar1 = lVar1 + -1;
    in_CF = *pbVar3 < *pbVar4;
    in_ZF = *pbVar3 == *pbVar4;
    pbVar3 = pbVar3 + 1;
    pbVar4 = pbVar4 + 1;
  } while ((bool)in_ZF);
  bVar5 = false;
  bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;
  if (bVar6) {
    return 2;
  }
  lVar1 = 0xe;
  pbVar3 = (byte *)"WinNameAlways";
  do {
    if (lVar1 == 0) break;
    lVar1 = lVar1 + -1;
    bVar5 = *param_1 < *pbVar3;
    bVar6 = *param_1 == *pbVar3;
    param_1 = param_1 + 1;
    pbVar3 = pbVar3 + 1;
  } while (bVar6);
  cVar2 = (!bVar5 && !bVar6) - bVar5;
  if (cVar2 == '\0') {
    param_2 = (int)cVar2;
  }
  return param_2;
}


MOV R8,RDI
MOV EAX,ESI
MOV ECX,0xc
LEA RDI,[0x1babce]
MOV RSI,R8
CMPSB.REPE RDI,RSI
SETA DL
SBB DL,0x0
TEST DL,DL
JZ 0x001845f0
MOV ECX,0xe
LEA RDI,[0x1bb072]
MOV RSI,R8
CMPSB.REPE RDI,RSI
SETA DL
SBB DL,0x0
MOVSX EDX,DL
TEST EDX,EDX
CMOVZ EAX,EDX
RET
MOV EAX,0x2
RET
(translation_unit "int FUN_001845b0(byte *param_1,int param_2)\n\n{\n  long lVar1;\n  char cVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  undefined1 in_CF;\n  bool bVar5;\n  undefined1 in_ZF;\n  bool bVar6;\n  \n  lVar1 = 0xc;\n  pbVar3 = param_1;\n  pbVar4 = (byte *)"CloseOnExit";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  } while ((bool)in_ZF);\n  bVar5 = false;\n  bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;\n  if (bVar6) {\n    return 2;\n  }\n  lVar1 = 0xe;\n  pbVar3 = (byte *)"WinNameAlways";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = *param_1 < *pbVar3;\n    bVar6 = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while (bVar6);\n  cVar2 = (!bVar5 && !bVar6) - bVar5;\n  if (cVar2 == '\0') {\n    param_2 = (int)cVar2;\n  }\n  return param_2;\n}\n\n" (function_definition "int FUN_001845b0(byte *param_1,int param_2)\n\n{\n  long lVar1;\n  char cVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  undefined1 in_CF;\n  bool bVar5;\n  undefined1 in_ZF;\n  bool bVar6;\n  \n  lVar1 = 0xc;\n  pbVar3 = param_1;\n  pbVar4 = (byte *)"CloseOnExit";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  } while ((bool)in_ZF);\n  bVar5 = false;\n  bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;\n  if (bVar6) {\n    return 2;\n  }\n  lVar1 = 0xe;\n  pbVar3 = (byte *)"WinNameAlways";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = *param_1 < *pbVar3;\n    bVar6 = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while (bVar6);\n  cVar2 = (!bVar5 && !bVar6) - bVar5;\n  if (cVar2 == '\0') {\n    param_2 = (int)cVar2;\n  }\n  return param_2;\n}" primitive_type (function_declarator "FUN_001845b0(byte *param_1,int param_2)" identifier (parameter_list "(byte *param_1,int param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  long lVar1;\n  char cVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  undefined1 in_CF;\n  bool bVar5;\n  undefined1 in_ZF;\n  bool bVar6;\n  \n  lVar1 = 0xc;\n  pbVar3 = param_1;\n  pbVar4 = (byte *)"CloseOnExit";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  } while ((bool)in_ZF);\n  bVar5 = false;\n  bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;\n  if (bVar6) {\n    return 2;\n  }\n  lVar1 = 0xe;\n  pbVar3 = (byte *)"WinNameAlways";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = *param_1 < *pbVar3;\n    bVar6 = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while (bVar6);\n  cVar2 = (!bVar5 && !bVar6) - bVar5;\n  if (cVar2 == '\0') {\n    param_2 = (int)cVar2;\n  }\n  return param_2;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "undefined1 in_CF;" type_identifier identifier ;) (declaration "bool bVar5;" primitive_type identifier ;) (declaration "undefined1 in_ZF;" type_identifier identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (expression_statement "lVar1 = 0xc;" (assignment_expression "lVar1 = 0xc" identifier = number_literal) ;) (expression_statement "pbVar3 = param_1;" (assignment_expression "pbVar3 = param_1" identifier = identifier) ;) (expression_statement "pbVar4 = (byte *)"CloseOnExit";" (assignment_expression "pbVar4 = (byte *)"CloseOnExit"" identifier = (cast_expression "(byte *)"CloseOnExit"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""CloseOnExit"" " string_content "))) ;) (do_statement "do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  } while ((bool)in_ZF);" do (compound_statement "{\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  }" { (if_statement "if (lVar1 == 0) break;" if (parenthesized_expression "(lVar1 == 0)" ( (binary_expression "lVar1 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar1 = lVar1 + -1;" (assignment_expression "lVar1 = lVar1 + -1" identifier = (binary_expression "lVar1 + -1" identifier + number_literal)) ;) (expression_statement "in_CF = *pbVar3 < *pbVar4;" (assignment_expression "in_CF = *pbVar3 < *pbVar4" identifier = (binary_expression "*pbVar3 < *pbVar4" (pointer_expression "*pbVar3" * identifier) < (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "in_ZF = *pbVar3 == *pbVar4;" (assignment_expression "in_ZF = *pbVar3 == *pbVar4" identifier = (binary_expression "*pbVar3 == *pbVar4" (pointer_expression "*pbVar3" * identifier) == (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "((bool)in_ZF)" ( (cast_expression "(bool)in_ZF" ( (type_descriptor "bool" primitive_type) ) identifier) )) ;) (expression_statement "bVar5 = false;" (assignment_expression "bVar5 = false" identifier = false) ;) (expression_statement "bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;" (assignment_expression "bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF" identifier = (binary_expression "(!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF" (parenthesized_expression "(!(bool)in_CF && !(bool)in_ZF)" ( (binary_expression "!(bool)in_CF && !(bool)in_ZF" (unary_expression "!(bool)in_CF" ! (cast_expression "(bool)in_CF" ( (type_descriptor "bool" primitive_type) ) identifier)) && (unary_expression "!(bool)in_ZF" ! (cast_expression "(bool)in_ZF" ( (type_descriptor "bool" primitive_type) ) identifier))) )) == (cast_expression "(bool)in_CF" ( (type_descriptor "bool" primitive_type) ) identifier))) ;) (if_statement "if (bVar6) {\n    return 2;\n  }" if (parenthesized_expression "(bVar6)" ( identifier )) (compound_statement "{\n    return 2;\n  }" { (return_statement "return 2;" return number_literal ;) })) (expression_statement "lVar1 = 0xe;" (assignment_expression "lVar1 = 0xe" identifier = number_literal) ;) (expression_statement "pbVar3 = (byte *)"WinNameAlways";" (assignment_expression "pbVar3 = (byte *)"WinNameAlways"" identifier = (cast_expression "(byte *)"WinNameAlways"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""WinNameAlways"" " string_content "))) ;) (do_statement "do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = *param_1 < *pbVar3;\n    bVar6 = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while (bVar6);" do (compound_statement "{\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = *param_1 < *pbVar3;\n    bVar6 = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  }" { (if_statement "if (lVar1 == 0) break;" if (parenthesized_expression "(lVar1 == 0)" ( (binary_expression "lVar1 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar1 = lVar1 + -1;" (assignment_expression "lVar1 = lVar1 + -1" identifier = (binary_expression "lVar1 + -1" identifier + number_literal)) ;) (expression_statement "bVar5 = *param_1 < *pbVar3;" (assignment_expression "bVar5 = *param_1 < *pbVar3" identifier = (binary_expression "*param_1 < *pbVar3" (pointer_expression "*param_1" * identifier) < (pointer_expression "*pbVar3" * identifier))) ;) (expression_statement "bVar6 = *param_1 == *pbVar3;" (assignment_expression "bVar6 = *param_1 == *pbVar3" identifier = (binary_expression "*param_1 == *pbVar3" (pointer_expression "*param_1" * identifier) == (pointer_expression "*pbVar3" * 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 "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar6)" ( identifier )) ;) (expression_statement "cVar2 = (!bVar5 && !bVar6) - bVar5;" (assignment_expression "cVar2 = (!bVar5 && !bVar6) - bVar5" identifier = (binary_expression "(!bVar5 && !bVar6) - bVar5" (parenthesized_expression "(!bVar5 && !bVar6)" ( (binary_expression "!bVar5 && !bVar6" (unary_expression "!bVar5" ! identifier) && (unary_expression "!bVar6" ! identifier)) )) - identifier)) ;) (if_statement "if (cVar2 == '\0') {\n    param_2 = (int)cVar2;\n  }" if (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    param_2 = (int)cVar2;\n  }" { (expression_statement "param_2 = (int)cVar2;" (assignment_expression "param_2 = (int)cVar2" identifier = (cast_expression "(int)cVar2" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) (return_statement "return param_2;" return identifier ;) })))
(translation_unit "wchar_t platform_default_i(char *name,wchar_t def)\n\n{\n  long lVar1;\n  char cVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  undefined1 in_CF;\n  bool bVar5;\n  undefined1 in_ZF;\n  bool bVar6;\n  \n  lVar1 = 0xc;\n  pbVar3 = (byte *)name;\n  pbVar4 = (byte *)"CloseOnExit";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  } while ((bool)in_ZF);\n  bVar5 = false;\n  bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;\n  if (bVar6) {\n    return L'\x02';\n  }\n  lVar1 = 0xe;\n  pbVar3 = (byte *)"WinNameAlways";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = (byte)*name < *pbVar3;\n    bVar6 = *name == *pbVar3;\n    name = (char *)((byte *)name + 1);\n    pbVar3 = pbVar3 + 1;\n  } while (bVar6);\n  cVar2 = (!bVar5 && !bVar6) - bVar5;\n  if (cVar2 == '\0') {\n    def = (int)cVar2;\n  }\n  return def;\n}\n\n" (function_definition "wchar_t platform_default_i(char *name,wchar_t def)\n\n{\n  long lVar1;\n  char cVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  undefined1 in_CF;\n  bool bVar5;\n  undefined1 in_ZF;\n  bool bVar6;\n  \n  lVar1 = 0xc;\n  pbVar3 = (byte *)name;\n  pbVar4 = (byte *)"CloseOnExit";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  } while ((bool)in_ZF);\n  bVar5 = false;\n  bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;\n  if (bVar6) {\n    return L'\x02';\n  }\n  lVar1 = 0xe;\n  pbVar3 = (byte *)"WinNameAlways";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = (byte)*name < *pbVar3;\n    bVar6 = *name == *pbVar3;\n    name = (char *)((byte *)name + 1);\n    pbVar3 = pbVar3 + 1;\n  } while (bVar6);\n  cVar2 = (!bVar5 && !bVar6) - bVar5;\n  if (cVar2 == '\0') {\n    def = (int)cVar2;\n  }\n  return def;\n}" type_identifier (function_declarator "platform_default_i(char *name,wchar_t def)" identifier (parameter_list "(char *name,wchar_t def)" ( (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) , (parameter_declaration "wchar_t def" type_identifier identifier) ))) (compound_statement "{\n  long lVar1;\n  char cVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  undefined1 in_CF;\n  bool bVar5;\n  undefined1 in_ZF;\n  bool bVar6;\n  \n  lVar1 = 0xc;\n  pbVar3 = (byte *)name;\n  pbVar4 = (byte *)"CloseOnExit";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  } while ((bool)in_ZF);\n  bVar5 = false;\n  bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;\n  if (bVar6) {\n    return L'\x02';\n  }\n  lVar1 = 0xe;\n  pbVar3 = (byte *)"WinNameAlways";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = (byte)*name < *pbVar3;\n    bVar6 = *name == *pbVar3;\n    name = (char *)((byte *)name + 1);\n    pbVar3 = pbVar3 + 1;\n  } while (bVar6);\n  cVar2 = (!bVar5 && !bVar6) - bVar5;\n  if (cVar2 == '\0') {\n    def = (int)cVar2;\n  }\n  return def;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "undefined1 in_CF;" type_identifier identifier ;) (declaration "bool bVar5;" primitive_type identifier ;) (declaration "undefined1 in_ZF;" type_identifier identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (expression_statement "lVar1 = 0xc;" (assignment_expression "lVar1 = 0xc" identifier = number_literal) ;) (expression_statement "pbVar3 = (byte *)name;" (assignment_expression "pbVar3 = (byte *)name" identifier = (cast_expression "(byte *)name" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "pbVar4 = (byte *)"CloseOnExit";" (assignment_expression "pbVar4 = (byte *)"CloseOnExit"" identifier = (cast_expression "(byte *)"CloseOnExit"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""CloseOnExit"" " string_content "))) ;) (do_statement "do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  } while ((bool)in_ZF);" do (compound_statement "{\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  }" { (if_statement "if (lVar1 == 0) break;" if (parenthesized_expression "(lVar1 == 0)" ( (binary_expression "lVar1 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar1 = lVar1 + -1;" (assignment_expression "lVar1 = lVar1 + -1" identifier = (binary_expression "lVar1 + -1" identifier + number_literal)) ;) (expression_statement "in_CF = *pbVar3 < *pbVar4;" (assignment_expression "in_CF = *pbVar3 < *pbVar4" identifier = (binary_expression "*pbVar3 < *pbVar4" (pointer_expression "*pbVar3" * identifier) < (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "in_ZF = *pbVar3 == *pbVar4;" (assignment_expression "in_ZF = *pbVar3 == *pbVar4" identifier = (binary_expression "*pbVar3 == *pbVar4" (pointer_expression "*pbVar3" * identifier) == (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "((bool)in_ZF)" ( (cast_expression "(bool)in_ZF" ( (type_descriptor "bool" primitive_type) ) identifier) )) ;) (expression_statement "bVar5 = false;" (assignment_expression "bVar5 = false" identifier = false) ;) (expression_statement "bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;" (assignment_expression "bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF" identifier = (binary_expression "(!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF" (parenthesized_expression "(!(bool)in_CF && !(bool)in_ZF)" ( (binary_expression "!(bool)in_CF && !(bool)in_ZF" (unary_expression "!(bool)in_CF" ! (cast_expression "(bool)in_CF" ( (type_descriptor "bool" primitive_type) ) identifier)) && (unary_expression "!(bool)in_ZF" ! (cast_expression "(bool)in_ZF" ( (type_descriptor "bool" primitive_type) ) identifier))) )) == (cast_expression "(bool)in_CF" ( (type_descriptor "bool" primitive_type) ) identifier))) ;) (if_statement "if (bVar6) {\n    return L'\x02';\n  }" if (parenthesized_expression "(bVar6)" ( identifier )) (compound_statement "{\n    return L'\x02';\n  }" { (return_statement "return L'\x02';" return (char_literal "L'\x02'" L' escape_sequence ') ;) })) (expression_statement "lVar1 = 0xe;" (assignment_expression "lVar1 = 0xe" identifier = number_literal) ;) (expression_statement "pbVar3 = (byte *)"WinNameAlways";" (assignment_expression "pbVar3 = (byte *)"WinNameAlways"" identifier = (cast_expression "(byte *)"WinNameAlways"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""WinNameAlways"" " string_content "))) ;) (do_statement "do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = (byte)*name < *pbVar3;\n    bVar6 = *name == *pbVar3;\n    name = (char *)((byte *)name + 1);\n    pbVar3 = pbVar3 + 1;\n  } while (bVar6);" do (compound_statement "{\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = (byte)*name < *pbVar3;\n    bVar6 = *name == *pbVar3;\n    name = (char *)((byte *)name + 1);\n    pbVar3 = pbVar3 + 1;\n  }" { (if_statement "if (lVar1 == 0) break;" if (parenthesized_expression "(lVar1 == 0)" ( (binary_expression "lVar1 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar1 = lVar1 + -1;" (assignment_expression "lVar1 = lVar1 + -1" identifier = (binary_expression "lVar1 + -1" identifier + number_literal)) ;) (expression_statement "bVar5 = (byte)*name < *pbVar3;" (assignment_expression "bVar5 = (byte)*name < *pbVar3" identifier = (binary_expression "(byte)*name < *pbVar3" (binary_expression "(byte)*name" (parenthesized_expression "(byte)" ( identifier )) * identifier) < (pointer_expression "*pbVar3" * identifier))) ;) (expression_statement "bVar6 = *name == *pbVar3;" (assignment_expression "bVar6 = *name == *pbVar3" identifier = (binary_expression "*name == *pbVar3" (pointer_expression "*name" * identifier) == (pointer_expression "*pbVar3" * identifier))) ;) (expression_statement "name = (char *)((byte *)name + 1);" (assignment_expression "name = (char *)((byte *)name + 1)" identifier = (cast_expression "(char *)((byte *)name + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)name + 1)" ( (binary_expression "(byte *)name + 1" (cast_expression "(byte *)name" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) ;) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar6)" ( identifier )) ;) (expression_statement "cVar2 = (!bVar5 && !bVar6) - bVar5;" (assignment_expression "cVar2 = (!bVar5 && !bVar6) - bVar5" identifier = (binary_expression "(!bVar5 && !bVar6) - bVar5" (parenthesized_expression "(!bVar5 && !bVar6)" ( (binary_expression "!bVar5 && !bVar6" (unary_expression "!bVar5" ! identifier) && (unary_expression "!bVar6" ! identifier)) )) - identifier)) ;) (if_statement "if (cVar2 == '\0') {\n    def = (int)cVar2;\n  }" if (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    def = (int)cVar2;\n  }" { (expression_statement "def = (int)cVar2;" (assignment_expression "def = (int)cVar2" identifier = (cast_expression "(int)cVar2" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) (return_statement "return def;" return identifier ;) })))
(translation_unit "int FUN_001845b0(byte *param_1,int param_2)\n\n{\n  long lVar1;\n  char cVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  undefined1 in_CF;\n  bool bVar5;\n  undefined1 in_ZF;\n  bool bVar6;\n  \n  lVar1 = 0xc;\n  pbVar3 = param_1;\n  pbVar4 = (byte *)"CloseOnExit";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  } while ((bool)in_ZF);\n  bVar5 = false;\n  bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;\n  if (bVar6) {\n    return 2;\n  }\n  lVar1 = 0xe;\n  pbVar3 = (byte *)"WinNameAlways";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = *param_1 < *pbVar3;\n    bVar6 = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while (bVar6);\n  cVar2 = (!bVar5 && !bVar6) - bVar5;\n  if (cVar2 == '\0') {\n    param_2 = (int)cVar2;\n  }\n  return param_2;\n}\n\n" (function_definition "int FUN_001845b0(byte *param_1,int param_2)\n\n{\n  long lVar1;\n  char cVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  undefined1 in_CF;\n  bool bVar5;\n  undefined1 in_ZF;\n  bool bVar6;\n  \n  lVar1 = 0xc;\n  pbVar3 = param_1;\n  pbVar4 = (byte *)"CloseOnExit";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  } while ((bool)in_ZF);\n  bVar5 = false;\n  bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;\n  if (bVar6) {\n    return 2;\n  }\n  lVar1 = 0xe;\n  pbVar3 = (byte *)"WinNameAlways";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = *param_1 < *pbVar3;\n    bVar6 = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while (bVar6);\n  cVar2 = (!bVar5 && !bVar6) - bVar5;\n  if (cVar2 == '\0') {\n    param_2 = (int)cVar2;\n  }\n  return param_2;\n}" primitive_type (function_declarator "FUN_001845b0(byte *param_1,int param_2)" identifier (parameter_list "(byte *param_1,int param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  long lVar1;\n  char cVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  undefined1 in_CF;\n  bool bVar5;\n  undefined1 in_ZF;\n  bool bVar6;\n  \n  lVar1 = 0xc;\n  pbVar3 = param_1;\n  pbVar4 = (byte *)"CloseOnExit";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  } while ((bool)in_ZF);\n  bVar5 = false;\n  bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;\n  if (bVar6) {\n    return 2;\n  }\n  lVar1 = 0xe;\n  pbVar3 = (byte *)"WinNameAlways";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = *param_1 < *pbVar3;\n    bVar6 = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while (bVar6);\n  cVar2 = (!bVar5 && !bVar6) - bVar5;\n  if (cVar2 == '\0') {\n    param_2 = (int)cVar2;\n  }\n  return param_2;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "undefined1 in_CF;" type_identifier identifier ;) (declaration "bool bVar5;" primitive_type identifier ;) (declaration "undefined1 in_ZF;" type_identifier identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (expression_statement "lVar1 = 0xc;" (assignment_expression "lVar1 = 0xc" identifier = number_literal) ;) (expression_statement "pbVar3 = param_1;" (assignment_expression "pbVar3 = param_1" identifier = identifier) ;) (expression_statement "pbVar4 = (byte *)"CloseOnExit";" (assignment_expression "pbVar4 = (byte *)"CloseOnExit"" identifier = (cast_expression "(byte *)"CloseOnExit"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""CloseOnExit"" " string_content "))) ;) (do_statement "do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  } while ((bool)in_ZF);" do (compound_statement "{\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  }" { (if_statement "if (lVar1 == 0) break;" if (parenthesized_expression "(lVar1 == 0)" ( (binary_expression "lVar1 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar1 = lVar1 + -1;" (assignment_expression "lVar1 = lVar1 + -1" identifier = (binary_expression "lVar1 + -1" identifier + number_literal)) ;) (expression_statement "in_CF = *pbVar3 < *pbVar4;" (assignment_expression "in_CF = *pbVar3 < *pbVar4" identifier = (binary_expression "*pbVar3 < *pbVar4" (pointer_expression "*pbVar3" * identifier) < (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "in_ZF = *pbVar3 == *pbVar4;" (assignment_expression "in_ZF = *pbVar3 == *pbVar4" identifier = (binary_expression "*pbVar3 == *pbVar4" (pointer_expression "*pbVar3" * identifier) == (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "((bool)in_ZF)" ( (cast_expression "(bool)in_ZF" ( (type_descriptor "bool" primitive_type) ) identifier) )) ;) (expression_statement "bVar5 = false;" (assignment_expression "bVar5 = false" identifier = false) ;) (expression_statement "bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;" (assignment_expression "bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF" identifier = (binary_expression "(!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF" (parenthesized_expression "(!(bool)in_CF && !(bool)in_ZF)" ( (binary_expression "!(bool)in_CF && !(bool)in_ZF" (unary_expression "!(bool)in_CF" ! (cast_expression "(bool)in_CF" ( (type_descriptor "bool" primitive_type) ) identifier)) && (unary_expression "!(bool)in_ZF" ! (cast_expression "(bool)in_ZF" ( (type_descriptor "bool" primitive_type) ) identifier))) )) == (cast_expression "(bool)in_CF" ( (type_descriptor "bool" primitive_type) ) identifier))) ;) (if_statement "if (bVar6) {\n    return 2;\n  }" if (parenthesized_expression "(bVar6)" ( identifier )) (compound_statement "{\n    return 2;\n  }" { (return_statement "return 2;" return number_literal ;) })) (expression_statement "lVar1 = 0xe;" (assignment_expression "lVar1 = 0xe" identifier = number_literal) ;) (expression_statement "pbVar3 = (byte *)"WinNameAlways";" (assignment_expression "pbVar3 = (byte *)"WinNameAlways"" identifier = (cast_expression "(byte *)"WinNameAlways"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""WinNameAlways"" " string_content "))) ;) (do_statement "do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = *param_1 < *pbVar3;\n    bVar6 = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while (bVar6);" do (compound_statement "{\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = *param_1 < *pbVar3;\n    bVar6 = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  }" { (if_statement "if (lVar1 == 0) break;" if (parenthesized_expression "(lVar1 == 0)" ( (binary_expression "lVar1 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar1 = lVar1 + -1;" (assignment_expression "lVar1 = lVar1 + -1" identifier = (binary_expression "lVar1 + -1" identifier + number_literal)) ;) (expression_statement "bVar5 = *param_1 < *pbVar3;" (assignment_expression "bVar5 = *param_1 < *pbVar3" identifier = (binary_expression "*param_1 < *pbVar3" (pointer_expression "*param_1" * identifier) < (pointer_expression "*pbVar3" * identifier))) ;) (expression_statement "bVar6 = *param_1 == *pbVar3;" (assignment_expression "bVar6 = *param_1 == *pbVar3" identifier = (binary_expression "*param_1 == *pbVar3" (pointer_expression "*param_1" * identifier) == (pointer_expression "*pbVar3" * 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 "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar6)" ( identifier )) ;) (expression_statement "cVar2 = (!bVar5 && !bVar6) - bVar5;" (assignment_expression "cVar2 = (!bVar5 && !bVar6) - bVar5" identifier = (binary_expression "(!bVar5 && !bVar6) - bVar5" (parenthesized_expression "(!bVar5 && !bVar6)" ( (binary_expression "!bVar5 && !bVar6" (unary_expression "!bVar5" ! identifier) && (unary_expression "!bVar6" ! identifier)) )) - identifier)) ;) (if_statement "if (cVar2 == '\0') {\n    param_2 = (int)cVar2;\n  }" if (parenthesized_expression "(cVar2 == '\0')" ( (binary_expression "cVar2 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    param_2 = (int)cVar2;\n  }" { (expression_statement "param_2 = (int)cVar2;" (assignment_expression "param_2 = (int)cVar2" identifier = (cast_expression "(int)cVar2" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) (return_statement "return param_2;" 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 (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (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 ( (cast_expression ( (type_descriptor TYPE) ) IDENT) )) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (unary_expression ! (cast_expression ( (type_descriptor TYPE) ) IDENT)) && (unary_expression ! (cast_expression ( (type_descriptor TYPE) ) IDENT))) )) == (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (return_statement return LIT ;) })) (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 ! IDENT) && (unary_expression ! IDENT)) )) - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_001845b0(byte *param_1,int param_2)\n\n{\n  long lVar1;\n  char cVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  undefined1 in_CF;\n  bool bVar5;\n  undefined1 in_ZF;\n  bool bVar6;\n  \n  lVar1 = 0xc;\n  pbVar3 = param_1;\n  pbVar4 = (byte *)"CloseOnExit";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  } while ((bool)in_ZF);\n  bVar5 = false;\n  bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;\n  if (bVar6) {\n    return 2;\n  }\n  lVar1 = 0xe;\n  pbVar3 = (byte *)"WinNameAlways";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = *param_1 < *pbVar3;\n    bVar6 = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while (bVar6);\n  cVar2 = (!bVar5 && !bVar6) - bVar5;\n  if (cVar2 == '\0') {\n    param_2 = (int)cVar2;\n  }\n  return param_2;\n}" (primitive_type "int") (function_declarator "FUN_001845b0(byte *param_1,int param_2)" (identifier "FUN_001845b0") (parameter_list "(byte *param_1,int param_2)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  long lVar1;\n  char cVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  undefined1 in_CF;\n  bool bVar5;\n  undefined1 in_ZF;\n  bool bVar6;\n  \n  lVar1 = 0xc;\n  pbVar3 = param_1;\n  pbVar4 = (byte *)"CloseOnExit";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  } while ((bool)in_ZF);\n  bVar5 = false;\n  bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;\n  if (bVar6) {\n    return 2;\n  }\n  lVar1 = 0xe;\n  pbVar3 = (byte *)"WinNameAlways";\n  do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = *param_1 < *pbVar3;\n    bVar6 = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while (bVar6);\n  cVar2 = (!bVar5 && !bVar6) - bVar5;\n  if (cVar2 == '\0') {\n    param_2 = (int)cVar2;\n  }\n  return param_2;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "char cVar2;" (primitive_type "char") (identifier "cVar2") (; ";")) (declaration "byte *pbVar3;" (type_identifier "byte") (pointer_declarator "*pbVar3" (* "*") (identifier "pbVar3")) (; ";")) (declaration "byte *pbVar4;" (type_identifier "byte") (pointer_declarator "*pbVar4" (* "*") (identifier "pbVar4")) (; ";")) (declaration "undefined1 in_CF;" (type_identifier "undefined1") (identifier "in_CF") (; ";")) (declaration "bool bVar5;" (primitive_type "bool") (identifier "bVar5") (; ";")) (declaration "undefined1 in_ZF;" (type_identifier "undefined1") (identifier "in_ZF") (; ";")) (declaration "bool bVar6;" (primitive_type "bool") (identifier "bVar6") (; ";")) (expression_statement "lVar1 = 0xc;" (assignment_expression "lVar1 = 0xc" (identifier "lVar1") (= "=") (number_literal "0xc")) (; ";")) (expression_statement "pbVar3 = param_1;" (assignment_expression "pbVar3 = param_1" (identifier "pbVar3") (= "=") (identifier "param_1")) (; ";")) (expression_statement "pbVar4 = (byte *)"CloseOnExit";" (assignment_expression "pbVar4 = (byte *)"CloseOnExit"" (identifier "pbVar4") (= "=") (cast_expression "(byte *)"CloseOnExit"" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (string_literal ""CloseOnExit"" (" """) (string_content "CloseOnExit") (" """)))) (; ";")) (do_statement "do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  } while ((bool)in_ZF);" (do "do") (compound_statement "{\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    in_CF = *pbVar3 < *pbVar4;\n    in_ZF = *pbVar3 == *pbVar4;\n    pbVar3 = pbVar3 + 1;\n    pbVar4 = pbVar4 + 1;\n  }" ({ "{") (if_statement "if (lVar1 == 0) break;" (if "if") (parenthesized_expression "(lVar1 == 0)" (( "(") (binary_expression "lVar1 == 0" (identifier "lVar1") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "lVar1 = lVar1 + -1;" (assignment_expression "lVar1 = lVar1 + -1" (identifier "lVar1") (= "=") (binary_expression "lVar1 + -1" (identifier "lVar1") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "in_CF = *pbVar3 < *pbVar4;" (assignment_expression "in_CF = *pbVar3 < *pbVar4" (identifier "in_CF") (= "=") (binary_expression "*pbVar3 < *pbVar4" (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")) (< "<") (pointer_expression "*pbVar4" (* "*") (identifier "pbVar4")))) (; ";")) (expression_statement "in_ZF = *pbVar3 == *pbVar4;" (assignment_expression "in_ZF = *pbVar3 == *pbVar4" (identifier "in_ZF") (= "=") (binary_expression "*pbVar3 == *pbVar4" (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")) (== "==") (pointer_expression "*pbVar4" (* "*") (identifier "pbVar4")))) (; ";")) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" (identifier "pbVar3") (= "=") (binary_expression "pbVar3 + 1" (identifier "pbVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" (identifier "pbVar4") (= "=") (binary_expression "pbVar4 + 1" (identifier "pbVar4") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "((bool)in_ZF)" (( "(") (cast_expression "(bool)in_ZF" (( "(") (type_descriptor "bool" (primitive_type "bool")) () ")") (identifier "in_ZF")) () ")")) (; ";")) (expression_statement "bVar5 = false;" (assignment_expression "bVar5 = false" (identifier "bVar5") (= "=") (false "false")) (; ";")) (expression_statement "bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;" (assignment_expression "bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF" (identifier "bVar6") (= "=") (binary_expression "(!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF" (parenthesized_expression "(!(bool)in_CF && !(bool)in_ZF)" (( "(") (binary_expression "!(bool)in_CF && !(bool)in_ZF" (unary_expression "!(bool)in_CF" (! "!") (cast_expression "(bool)in_CF" (( "(") (type_descriptor "bool" (primitive_type "bool")) () ")") (identifier "in_CF"))) (&& "&&") (unary_expression "!(bool)in_ZF" (! "!") (cast_expression "(bool)in_ZF" (( "(") (type_descriptor "bool" (primitive_type "bool")) () ")") (identifier "in_ZF")))) () ")")) (== "==") (cast_expression "(bool)in_CF" (( "(") (type_descriptor "bool" (primitive_type "bool")) () ")") (identifier "in_CF")))) (; ";")) (if_statement "if (bVar6) {\n    return 2;\n  }" (if "if") (parenthesized_expression "(bVar6)" (( "(") (identifier "bVar6") () ")")) (compound_statement "{\n    return 2;\n  }" ({ "{") (return_statement "return 2;" (return "return") (number_literal "2") (; ";")) (} "}"))) (expression_statement "lVar1 = 0xe;" (assignment_expression "lVar1 = 0xe" (identifier "lVar1") (= "=") (number_literal "0xe")) (; ";")) (expression_statement "pbVar3 = (byte *)"WinNameAlways";" (assignment_expression "pbVar3 = (byte *)"WinNameAlways"" (identifier "pbVar3") (= "=") (cast_expression "(byte *)"WinNameAlways"" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (string_literal ""WinNameAlways"" (" """) (string_content "WinNameAlways") (" """)))) (; ";")) (do_statement "do {\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = *param_1 < *pbVar3;\n    bVar6 = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  } while (bVar6);" (do "do") (compound_statement "{\n    if (lVar1 == 0) break;\n    lVar1 = lVar1 + -1;\n    bVar5 = *param_1 < *pbVar3;\n    bVar6 = *param_1 == *pbVar3;\n    param_1 = param_1 + 1;\n    pbVar3 = pbVar3 + 1;\n  }" ({ "{") (if_statement "if (lVar1 == 0) break;" (if "if") (parenthesized_expression "(lVar1 == 0)" (( "(") (binary_expression "lVar1 == 0" (identifier "lVar1") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "lVar1 = lVar1 + -1;" (assignment_expression "lVar1 = lVar1 + -1" (identifier "lVar1") (= "=") (binary_expression "lVar1 + -1" (identifier "lVar1") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "bVar5 = *param_1 < *pbVar3;" (assignment_expression "bVar5 = *param_1 < *pbVar3" (identifier "bVar5") (= "=") (binary_expression "*param_1 < *pbVar3" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (< "<") (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")))) (; ";")) (expression_statement "bVar6 = *param_1 == *pbVar3;" (assignment_expression "bVar6 = *param_1 == *pbVar3" (identifier "bVar6") (= "=") (binary_expression "*param_1 == *pbVar3" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")))) (; ";")) (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 "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" (identifier "pbVar3") (= "=") (binary_expression "pbVar3 + 1" (identifier "pbVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar6)" (( "(") (identifier "bVar6") () ")")) (; ";")) (expression_statement "cVar2 = (!bVar5 && !bVar6) - bVar5;" (assignment_expression "cVar2 = (!bVar5 && !bVar6) - bVar5" (identifier "cVar2") (= "=") (binary_expression "(!bVar5 && !bVar6) - bVar5" (parenthesized_expression "(!bVar5 && !bVar6)" (( "(") (binary_expression "!bVar5 && !bVar6" (unary_expression "!bVar5" (! "!") (identifier "bVar5")) (&& "&&") (unary_expression "!bVar6" (! "!") (identifier "bVar6"))) () ")")) (- "-") (identifier "bVar5"))) (; ";")) (if_statement "if (cVar2 == '\0') {\n    param_2 = (int)cVar2;\n  }" (if "if") (parenthesized_expression "(cVar2 == '\0')" (( "(") (binary_expression "cVar2 == '\0'" (identifier "cVar2") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    param_2 = (int)cVar2;\n  }" ({ "{") (expression_statement "param_2 = (int)cVar2;" (assignment_expression "param_2 = (int)cVar2" (identifier "param_2") (= "=") (cast_expression "(int)cVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "cVar2"))) (; ";")) (} "}"))) (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}")))

type_1 function_1(char *var_4,type_1 def)

{
  long var_1;
  char var_6;
  type_2 *var_2;
  type_2 *var_3;
  type_3 in_CF;
  bool var_5;
  type_3 in_ZF;
  bool bVar6;
  
  var_1 = 0xc;
  var_2 = (type_2 *)var_4;
  var_3 = (type_2 *)"CloseOnExit";
  do {
    if (var_1 == 0) break;
    var_1 = var_1 + -1;
    in_CF = *var_2 < *var_3;
    in_ZF = *var_2 == *var_3;
    var_2 = var_2 + 1;
    var_3 = var_3 + 1;
  } while ((bool)in_ZF);
  var_5 = false;
  bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;
  if (bVar6) {
    return L'\x02';
  }
  var_1 = 0xe;
  var_2 = (type_2 *)"WinNameAlways";
  do {
    if (var_1 == 0) break;
    var_1 = var_1 + -1;
    var_5 = (type_2)*var_4 < *var_2;
    bVar6 = *var_4 == *var_2;
    var_4 = (char *)((type_2 *)var_4 + 1);
    var_2 = var_2 + 1;
  } while (bVar6);
  var_6 = (!var_5 && !bVar6) - var_5;
  if (var_6 == '\0') {
    def = (int)var_6;
  }
  return def;
}


(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: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (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 (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (false))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (unary_expression argument: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) right: (unary_expression argument: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (return_statement (number_literal)))) (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: (identifier)) right: (unary_expression argument: (identifier)))) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))) (return_statement (identifier)))))

int MASKED(byte *param_1,int param_2)

{
  long lVar1;
  char cVar2;
  byte *pbVar3;
  byte *pbVar4;
  undefined1 in_CF;
  bool bVar5;
  undefined1 in_ZF;
  bool bVar6;
  
  lVar1 = 0xc;
  pbVar3 = param_1;
  pbVar4 = (byte *)"CloseOnExit";
  do {
    if (lVar1 == 0) break;
    lVar1 = lVar1 + -1;
    in_CF = *pbVar3 < *pbVar4;
    in_ZF = *pbVar3 == *pbVar4;
    pbVar3 = pbVar3 + 1;
    pbVar4 = pbVar4 + 1;
  } while ((bool)in_ZF);
  bVar5 = false;
  bVar6 = (!(bool)in_CF && !(bool)in_ZF) == (bool)in_CF;
  if (bVar6) {
    return 2;
  }
  lVar1 = 0xe;
  pbVar3 = (byte *)"WinNameAlways";
  do {
    if (lVar1 == 0) break;
    lVar1 = lVar1 + -1;
    bVar5 = *param_1 < *pbVar3;
    bVar6 = *param_1 == *pbVar3;
    param_1 = param_1 + 1;
    pbVar3 = pbVar3 + 1;
  } while (bVar6);
  cVar2 = (!bVar5 && !bVar6) - bVar5;
  if (cVar2 == '\0') {
    param_2 = (int)cVar2;
  }
  return param_2;
}

