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

Filename * platform_default_filename(char *name)

{
  Filename *pFVar1;
  int iVar2;
  byte *pbVar3;
  bool bVar4;
  bool bVar5;
  
  iVar2 = 0xc;
  bVar4 = false;
  bVar5 = false;
  pbVar3 = (byte *)"LogFileName";
  do {
    if (iVar2 == 0) break;
    iVar2 = iVar2 + -1;
    bVar4 = (byte)*name < *pbVar3;
    bVar5 = *name == *pbVar3;
    name = (char *)((byte *)name + 1);
    pbVar3 = pbVar3 + 1;
  } while (bVar5);
  if ((!bVar4 && !bVar5) == bVar4) {
    pFVar1 = filename_from_str("putty.log");
    return pFVar1;
  }
  pFVar1 = filename_from_str("");
  return pFVar1;
}



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

void FUN_00066c60(byte *param_1)

{
  int iVar1;
  byte *pbVar2;
  bool bVar3;
  bool bVar4;
  
  iVar1 = 0xc;
  bVar3 = false;
  bVar4 = false;
  pbVar2 = (byte *)"LogFileName";
  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);
  if ((!bVar3 && !bVar4) == bVar3) {
    FUN_00063130("putty.log");
    return;
  }
  FUN_00063130(&DAT_0006f2ee);
  return;
}


PUSH EDI
MOV ECX,0xc
PUSH ESI
PUSH EBX
MOV ESI,dword ptr [ESP + 0x10]
CALL 0x00015fa0
ADD EBX,0x3e0ff
LEA EDI,[EBX + 0xfffcad25]
CMPSB.REPE ES:EDI,ESI
SETA AL
SBB AL,0x0
TEST AL,AL
JNZ 0x00066ca0
SUB ESP,0xc
LEA EAX,[EBX + 0xfffd8b46]
PUSH EAX
CALL 0x00063130
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0xc
LEA EAX,[EBX + 0xfffca57e]
PUSH EAX
CALL 0x00063130
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00066c60(byte *param_1)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  iVar1 = 0xc;\n  bVar3 = false;\n  bVar4 = false;\n  pbVar2 = (byte *)"LogFileName";\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  if ((!bVar3 && !bVar4) == bVar3) {\n    FUN_00063130("putty.log");\n    return;\n  }\n  FUN_00063130(&DAT_0006f2ee);\n  return;\n}\n\n" comment (function_definition "void FUN_00066c60(byte *param_1)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  iVar1 = 0xc;\n  bVar3 = false;\n  bVar4 = false;\n  pbVar2 = (byte *)"LogFileName";\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  if ((!bVar3 && !bVar4) == bVar3) {\n    FUN_00063130("putty.log");\n    return;\n  }\n  FUN_00063130(&DAT_0006f2ee);\n  return;\n}" primitive_type (function_declarator "FUN_00066c60(byte *param_1)" identifier (parameter_list "(byte *param_1)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  iVar1 = 0xc;\n  bVar3 = false;\n  bVar4 = false;\n  pbVar2 = (byte *)"LogFileName";\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  if ((!bVar3 && !bVar4) == bVar3) {\n    FUN_00063130("putty.log");\n    return;\n  }\n  FUN_00063130(&DAT_0006f2ee);\n  return;\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 ;) (expression_statement "iVar1 = 0xc;" (assignment_expression "iVar1 = 0xc" identifier = number_literal) ;) (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;) (expression_statement "bVar4 = false;" (assignment_expression "bVar4 = false" identifier = false) ;) (expression_statement "pbVar2 = (byte *)"LogFileName";" (assignment_expression "pbVar2 = (byte *)"LogFileName"" identifier = (cast_expression "(byte *)"LogFileName"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""LogFileName"" " 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 )) ;) (if_statement "if ((!bVar3 && !bVar4) == bVar3) {\n    FUN_00063130("putty.log");\n    return;\n  }" if (parenthesized_expression "((!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) )) (compound_statement "{\n    FUN_00063130("putty.log");\n    return;\n  }" { (expression_statement "FUN_00063130("putty.log");" (call_expression "FUN_00063130("putty.log")" identifier (argument_list "("putty.log")" ( (string_literal ""putty.log"" " string_content ") ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_00063130(&DAT_0006f2ee);" (call_expression "FUN_00063130(&DAT_0006f2ee)" identifier (argument_list "(&DAT_0006f2ee)" ( (pointer_expression "&DAT_0006f2ee" & identifier) ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nFilename * platform_default_filename(char *name)\n\n{\n  Filename *pFVar1;\n  int iVar2;\n  byte *pbVar3;\n  bool bVar4;\n  bool bVar5;\n  \n  iVar2 = 0xc;\n  bVar4 = false;\n  bVar5 = false;\n  pbVar3 = (byte *)"LogFileName";\n  do {\n    if (iVar2 == 0) break;\n    iVar2 = iVar2 + -1;\n    bVar4 = (byte)*name < *pbVar3;\n    bVar5 = *name == *pbVar3;\n    name = (char *)((byte *)name + 1);\n    pbVar3 = pbVar3 + 1;\n  } while (bVar5);\n  if ((!bVar4 && !bVar5) == bVar4) {\n    pFVar1 = filename_from_str("putty.log");\n    return pFVar1;\n  }\n  pFVar1 = filename_from_str("");\n  return pFVar1;\n}\n\n" comment (function_definition "Filename * platform_default_filename(char *name)\n\n{\n  Filename *pFVar1;\n  int iVar2;\n  byte *pbVar3;\n  bool bVar4;\n  bool bVar5;\n  \n  iVar2 = 0xc;\n  bVar4 = false;\n  bVar5 = false;\n  pbVar3 = (byte *)"LogFileName";\n  do {\n    if (iVar2 == 0) break;\n    iVar2 = iVar2 + -1;\n    bVar4 = (byte)*name < *pbVar3;\n    bVar5 = *name == *pbVar3;\n    name = (char *)((byte *)name + 1);\n    pbVar3 = pbVar3 + 1;\n  } while (bVar5);\n  if ((!bVar4 && !bVar5) == bVar4) {\n    pFVar1 = filename_from_str("putty.log");\n    return pFVar1;\n  }\n  pFVar1 = filename_from_str("");\n  return pFVar1;\n}" type_identifier (pointer_declarator "* platform_default_filename(char *name)" * (function_declarator "platform_default_filename(char *name)" identifier (parameter_list "(char *name)" ( (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) )))) (compound_statement "{\n  Filename *pFVar1;\n  int iVar2;\n  byte *pbVar3;\n  bool bVar4;\n  bool bVar5;\n  \n  iVar2 = 0xc;\n  bVar4 = false;\n  bVar5 = false;\n  pbVar3 = (byte *)"LogFileName";\n  do {\n    if (iVar2 == 0) break;\n    iVar2 = iVar2 + -1;\n    bVar4 = (byte)*name < *pbVar3;\n    bVar5 = *name == *pbVar3;\n    name = (char *)((byte *)name + 1);\n    pbVar3 = pbVar3 + 1;\n  } while (bVar5);\n  if ((!bVar4 && !bVar5) == bVar4) {\n    pFVar1 = filename_from_str("putty.log");\n    return pFVar1;\n  }\n  pFVar1 = filename_from_str("");\n  return pFVar1;\n}" { (declaration "Filename *pFVar1;" type_identifier (pointer_declarator "*pFVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "bool bVar4;" primitive_type identifier ;) (declaration "bool bVar5;" primitive_type identifier ;) (expression_statement "iVar2 = 0xc;" (assignment_expression "iVar2 = 0xc" identifier = number_literal) ;) (expression_statement "bVar4 = false;" (assignment_expression "bVar4 = false" identifier = false) ;) (expression_statement "bVar5 = false;" (assignment_expression "bVar5 = false" identifier = false) ;) (expression_statement "pbVar3 = (byte *)"LogFileName";" (assignment_expression "pbVar3 = (byte *)"LogFileName"" identifier = (cast_expression "(byte *)"LogFileName"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""LogFileName"" " string_content "))) ;) (do_statement "do {\n    if (iVar2 == 0) break;\n    iVar2 = iVar2 + -1;\n    bVar4 = (byte)*name < *pbVar3;\n    bVar5 = *name == *pbVar3;\n    name = (char *)((byte *)name + 1);\n    pbVar3 = pbVar3 + 1;\n  } while (bVar5);" do (compound_statement "{\n    if (iVar2 == 0) break;\n    iVar2 = iVar2 + -1;\n    bVar4 = (byte)*name < *pbVar3;\n    bVar5 = *name == *pbVar3;\n    name = (char *)((byte *)name + 1);\n    pbVar3 = pbVar3 + 1;\n  }" { (if_statement "if (iVar2 == 0) break;" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar2 = iVar2 + -1;" (assignment_expression "iVar2 = iVar2 + -1" identifier = (binary_expression "iVar2 + -1" identifier + number_literal)) ;) (expression_statement "bVar4 = (byte)*name < *pbVar3;" (assignment_expression "bVar4 = (byte)*name < *pbVar3" identifier = (binary_expression "(byte)*name < *pbVar3" (binary_expression "(byte)*name" (parenthesized_expression "(byte)" ( identifier )) * identifier) < (pointer_expression "*pbVar3" * identifier))) ;) (expression_statement "bVar5 = *name == *pbVar3;" (assignment_expression "bVar5 = *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 "(bVar5)" ( identifier )) ;) (if_statement "if ((!bVar4 && !bVar5) == bVar4) {\n    pFVar1 = filename_from_str("putty.log");\n    return pFVar1;\n  }" if (parenthesized_expression "((!bVar4 && !bVar5) == bVar4)" ( (binary_expression "(!bVar4 && !bVar5) == bVar4" (parenthesized_expression "(!bVar4 && !bVar5)" ( (binary_expression "!bVar4 && !bVar5" (unary_expression "!bVar4" ! identifier) && (unary_expression "!bVar5" ! identifier)) )) == identifier) )) (compound_statement "{\n    pFVar1 = filename_from_str("putty.log");\n    return pFVar1;\n  }" { (expression_statement "pFVar1 = filename_from_str("putty.log");" (assignment_expression "pFVar1 = filename_from_str("putty.log")" identifier = (call_expression "filename_from_str("putty.log")" identifier (argument_list "("putty.log")" ( (string_literal ""putty.log"" " string_content ") )))) ;) (return_statement "return pFVar1;" return identifier ;) })) (expression_statement "pFVar1 = filename_from_str("");" (assignment_expression "pFVar1 = filename_from_str("")" identifier = (call_expression "filename_from_str("")" identifier (argument_list "("")" ( (string_literal """" " ") )))) ;) (return_statement "return pFVar1;" return identifier ;) })))
(translation_unit "void FUN_00066c60(byte *param_1)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  iVar1 = 0xc;\n  bVar3 = false;\n  bVar4 = false;\n  pbVar2 = (byte *)"LogFileName";\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  if ((!bVar3 && !bVar4) == bVar3) {\n    FUN_00063130("putty.log");\n    return;\n  }\n  FUN_00063130(&DAT_0006f2ee);\n  return;\n}\n\n" (function_definition "void FUN_00066c60(byte *param_1)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  iVar1 = 0xc;\n  bVar3 = false;\n  bVar4 = false;\n  pbVar2 = (byte *)"LogFileName";\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  if ((!bVar3 && !bVar4) == bVar3) {\n    FUN_00063130("putty.log");\n    return;\n  }\n  FUN_00063130(&DAT_0006f2ee);\n  return;\n}" primitive_type (function_declarator "FUN_00066c60(byte *param_1)" identifier (parameter_list "(byte *param_1)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  iVar1 = 0xc;\n  bVar3 = false;\n  bVar4 = false;\n  pbVar2 = (byte *)"LogFileName";\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  if ((!bVar3 && !bVar4) == bVar3) {\n    FUN_00063130("putty.log");\n    return;\n  }\n  FUN_00063130(&DAT_0006f2ee);\n  return;\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 ;) (expression_statement "iVar1 = 0xc;" (assignment_expression "iVar1 = 0xc" identifier = number_literal) ;) (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;) (expression_statement "bVar4 = false;" (assignment_expression "bVar4 = false" identifier = false) ;) (expression_statement "pbVar2 = (byte *)"LogFileName";" (assignment_expression "pbVar2 = (byte *)"LogFileName"" identifier = (cast_expression "(byte *)"LogFileName"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""LogFileName"" " 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 )) ;) (if_statement "if ((!bVar3 && !bVar4) == bVar3) {\n    FUN_00063130("putty.log");\n    return;\n  }" if (parenthesized_expression "((!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) )) (compound_statement "{\n    FUN_00063130("putty.log");\n    return;\n  }" { (expression_statement "FUN_00063130("putty.log");" (call_expression "FUN_00063130("putty.log")" identifier (argument_list "("putty.log")" ( (string_literal ""putty.log"" " string_content ") ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_00063130(&DAT_0006f2ee);" (call_expression "FUN_00063130(&DAT_0006f2ee)" identifier (argument_list "(&DAT_0006f2ee)" ( (pointer_expression "&DAT_0006f2ee" & identifier) ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (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 )) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (unary_expression ! IDENT) && (unary_expression ! IDENT)) )) == IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") ))) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))) ;) (return_statement return ;) })))
(function_definition "void FUN_00066c60(byte *param_1)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  iVar1 = 0xc;\n  bVar3 = false;\n  bVar4 = false;\n  pbVar2 = (byte *)"LogFileName";\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  if ((!bVar3 && !bVar4) == bVar3) {\n    FUN_00063130("putty.log");\n    return;\n  }\n  FUN_00063130(&DAT_0006f2ee);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00066c60(byte *param_1)" (identifier "FUN_00066c60") (parameter_list "(byte *param_1)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  bool bVar3;\n  bool bVar4;\n  \n  iVar1 = 0xc;\n  bVar3 = false;\n  bVar4 = false;\n  pbVar2 = (byte *)"LogFileName";\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  if ((!bVar3 && !bVar4) == bVar3) {\n    FUN_00063130("putty.log");\n    return;\n  }\n  FUN_00063130(&DAT_0006f2ee);\n  return;\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") (; ";")) (expression_statement "iVar1 = 0xc;" (assignment_expression "iVar1 = 0xc" (identifier "iVar1") (= "=") (number_literal "0xc")) (; ";")) (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" (identifier "bVar3") (= "=") (false "false")) (; ";")) (expression_statement "bVar4 = false;" (assignment_expression "bVar4 = false" (identifier "bVar4") (= "=") (false "false")) (; ";")) (expression_statement "pbVar2 = (byte *)"LogFileName";" (assignment_expression "pbVar2 = (byte *)"LogFileName"" (identifier "pbVar2") (= "=") (cast_expression "(byte *)"LogFileName"" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (string_literal ""LogFileName"" (" """) (string_content "LogFileName") (" """)))) (; ";")) (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") () ")")) (; ";")) (if_statement "if ((!bVar3 && !bVar4) == bVar3) {\n    FUN_00063130("putty.log");\n    return;\n  }" (if "if") (parenthesized_expression "((!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")) () ")")) (compound_statement "{\n    FUN_00063130("putty.log");\n    return;\n  }" ({ "{") (expression_statement "FUN_00063130("putty.log");" (call_expression "FUN_00063130("putty.log")" (identifier "FUN_00063130") (argument_list "("putty.log")" (( "(") (string_literal ""putty.log"" (" """) (string_content "putty.log") (" """)) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_00063130(&DAT_0006f2ee);" (call_expression "FUN_00063130(&DAT_0006f2ee)" (identifier "FUN_00063130") (argument_list "(&DAT_0006f2ee)" (( "(") (pointer_expression "&DAT_0006f2ee" (& "&") (identifier "DAT_0006f2ee")) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

type_1 * function_1(char *var_2)

{
  type_1 *pFVar1;
  int var_1;
  type_2 *var_3;
  bool var_4;
  bool bVar5;
  
  var_1 = 0xc;
  var_4 = false;
  bVar5 = false;
  var_3 = (type_2 *)"LogFileName";
  do {
    if (var_1 == 0) break;
    var_1 = var_1 + -1;
    var_4 = (type_2)*var_2 < *var_3;
    bVar5 = *var_2 == *var_3;
    var_2 = (char *)((type_2 *)var_2 + 1);
    var_3 = var_3 + 1;
  } while (bVar5);
  if ((!var_4 && !bVar5) == var_4) {
    pFVar1 = var_5("putty.log");
    return pFVar1;
  }
  pFVar1 = var_5("");
  return pFVar1;
}


(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))))) 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)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (false))) (expression_statement (assignment_expression left: (identifier) right: (false))) (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))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (unary_expression argument: (identifier)) right: (unary_expression argument: (identifier)))) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content))))) (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier))))) (return_statement))))

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

void MASKED(byte *param_1)

{
  int iVar1;
  byte *pbVar2;
  bool bVar3;
  bool bVar4;
  
  iVar1 = 0xc;
  bVar3 = false;
  bVar4 = false;
  pbVar2 = (byte *)"LogFileName";
  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);
  if ((!bVar3 && !bVar4) == bVar3) {
    FUN_00063130("putty.log");
    return;
  }
  FUN_00063130(&DAT_0006f2ee);
  return;
}

