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

int loadrsakey(Filename *filename,RSAKey *key,char *passphrase,char **errorstr)

{
  int iVar1;
  FILE *__stream;
  char *pcVar2;
  int iVar3;
  byte *pbVar4;
  byte *pbVar5;
  int in_GS_OFFSET;
  bool bVar6;
  bool bVar7;
  byte bVar8;
  char *error;
  char buf [64];
  
  bVar8 = 0;
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  error = (char *)0x0;
  __stream = (FILE *)f_open(filename,"rb",0);
  if (__stream == (FILE *)0x0) {
    error = "can\'t open file";
    bVar6 = true;
    iVar3 = 0;
  }
  else {
    pcVar2 = fgets(buf,0x40,__stream);
    bVar6 = false;
    bVar7 = pcVar2 == (char *)0x0;
    if (!bVar7) {
      iVar3 = 0x21;
      pbVar4 = (byte *)buf;
      pbVar5 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";
      do {
        if (iVar3 == 0) break;
        iVar3 = iVar3 + -1;
        bVar6 = *pbVar4 < *pbVar5;
        bVar7 = *pbVar4 == *pbVar5;
        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;
        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;
      } while (bVar7);
      if ((!bVar6 && !bVar7) == bVar6) {
        iVar3 = loadrsakey_main((FILE *)__stream,key,0,(char **)0x0,passphrase,&error);
        bVar6 = iVar3 != 1;
        goto LAB_0006abff;
      }
    }
    error = "not an SSH-1 RSA file";
    fclose(__stream);
    bVar6 = true;
    iVar3 = 0;
  }
LAB_0006abff:
  if ((errorstr != (char **)0x0) && (bVar6)) {
    *errorstr = error;
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar3;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

int FUN_0006ab50(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)

{
  FILE *__stream;
  char *pcVar1;
  int iVar2;
  byte *pbVar3;
  byte *pbVar4;
  int in_GS_OFFSET;
  bool bVar5;
  bool bVar6;
  byte bVar7;
  char *local_64;
  byte local_60 [64];
  int local_20;
  undefined4 uStack_14;
  
  bVar7 = 0;
  uStack_14 = 0x6ab59;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_64 = (char *)0x0;
  __stream = (FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0);
  if (__stream == (FILE *)0x0) {
    local_64 = "can\'t open file";
    bVar5 = true;
    iVar2 = 0;
  }
  else {
    pcVar1 = fgets((char *)local_60,0x40,__stream);
    bVar5 = false;
    bVar6 = pcVar1 == (char *)0x0;
    if (!bVar6) {
      iVar2 = 0x21;
      pbVar3 = local_60;
      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";
      do {
        if (iVar2 == 0) break;
        iVar2 = iVar2 + -1;
        bVar5 = *pbVar3 < *pbVar4;
        bVar6 = *pbVar3 == *pbVar4;
        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;
        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;
      } while (bVar6);
      if ((!bVar5 && !bVar6) == bVar5) {
        iVar2 = FUN_0006a1f0(0,param_3,&local_64);
        bVar5 = iVar2 != 1;
        goto LAB_0006abff;
      }
    }
    local_64 = "not an SSH-1 RSA file";
    fclose(__stream);
    bVar5 = true;
    iVar2 = 0;
  }
LAB_0006abff:
  if ((param_4 != (undefined4 *)0x0) && (bVar5)) {
    *param_4 = local_64;
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0008eb20();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000149a0
ADD EBX,0x65237
SUB ESP,0x70
MOV EAX,dword ptr [ESP + 0x88]
MOV dword ptr [ESP + 0xc],EAX
MOV EAX,dword ptr [ESP + 0x8c]
MOV dword ptr [ESP + 0x10],EAX
MOV EAX,dword ptr [ESP + 0x90]
MOV dword ptr [ESP + 0x8],EAX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x60],EAX
XOR EAX,EAX
LEA EAX,[EBX + 0xfffce007]
MOV dword ptr [ESP + 0x1c],0x0
PUSH 0x0
PUSH EAX
PUSH dword ptr [ESP + 0x8c]
CALL 0x000841b0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0006ac30
SUB ESP,0x4
MOV EBP,EAX
PUSH EAX
PUSH 0x40
LEA ESI,[ESP + 0x28]
PUSH ESI
CALL 0x00014150
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0006abe2
MOV ECX,0x21
LEA EDI,[EBX + 0xfffce294]
CMPSB.REPE ES:EDI,ESI
SETA AL
SBB AL,0x0
TEST AL,AL
JZ 0x0006ac48
LEA EAX,[EBX + 0xfffce01a]
SUB ESP,0xc
MOV dword ptr [ESP + 0x24],EAX
PUSH EBP
CALL 0x00014160
ADD ESP,0x10
MOV EDX,0x1
XOR EAX,EAX
MOV ECX,dword ptr [ESP + 0x4]
TEST ECX,ECX
JZ 0x0006ac11
TEST DL,DL
JZ 0x0006ac11
MOV EDX,dword ptr [ESP + 0x18]
MOV dword ptr [ECX],EDX
MOV EDI,dword ptr [ESP + 0x5c]
XOR EDI,dword ptr GS:[0x14]
JNZ 0x0006ac6e
ADD ESP,0x6c
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EAX,[EBX + 0xfffce00a]
MOV EDX,0x1
MOV dword ptr [ESP + 0x18],EAX
XOR EAX,EAX
JMP 0x0006abff
SUB ESP,0x4
XOR ECX,ECX
LEA EAX,[ESP + 0x1c]
PUSH EAX
MOV EAX,EBP
PUSH dword ptr [ESP + 0x14]
PUSH 0x0
MOV EDX,dword ptr [ESP + 0x18]
CALL 0x0006a1f0
ADD ESP,0x10
CMP EAX,0x1
SETNZ DL
JMP 0x0006abff
CALL 0x0008eb20
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_0006ab50(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)\n\n{\n  FILE *__stream;\n  char *pcVar1;\n  int iVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  int in_GS_OFFSET;\n  bool bVar5;\n  bool bVar6;\n  byte bVar7;\n  char *local_64;\n  byte local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar7 = 0;\n  uStack_14 = 0x6ab59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_64 = (char *)0x0;\n  __stream = (FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0);\n  if (__stream == (FILE *)0x0) {\n    local_64 = "can\'t open file";\n    bVar5 = true;\n    iVar2 = 0;\n  }\n  else {\n    pcVar1 = fgets((char *)local_60,0x40,__stream);\n    bVar5 = false;\n    bVar6 = pcVar1 == (char *)0x0;\n    if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    local_64 = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar5 = true;\n    iVar2 = 0;\n  }\nLAB_0006abff:\n  if ((param_4 != (undefined4 *)0x0) && (bVar5)) {\n    *param_4 = local_64;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0008eb20();\n}\n\n" comment (function_definition "int FUN_0006ab50(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)\n\n{\n  FILE *__stream;\n  char *pcVar1;\n  int iVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  int in_GS_OFFSET;\n  bool bVar5;\n  bool bVar6;\n  byte bVar7;\n  char *local_64;\n  byte local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar7 = 0;\n  uStack_14 = 0x6ab59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_64 = (char *)0x0;\n  __stream = (FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0);\n  if (__stream == (FILE *)0x0) {\n    local_64 = "can\'t open file";\n    bVar5 = true;\n    iVar2 = 0;\n  }\n  else {\n    pcVar1 = fgets((char *)local_60,0x40,__stream);\n    bVar5 = false;\n    bVar6 = pcVar1 == (char *)0x0;\n    if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    local_64 = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar5 = true;\n    iVar2 = 0;\n  }\nLAB_0006abff:\n  if ((param_4 != (undefined4 *)0x0) && (bVar5)) {\n    *param_4 = local_64;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0008eb20();\n}" primitive_type (function_declarator "FUN_0006ab50(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  FILE *__stream;\n  char *pcVar1;\n  int iVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  int in_GS_OFFSET;\n  bool bVar5;\n  bool bVar6;\n  byte bVar7;\n  char *local_64;\n  byte local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar7 = 0;\n  uStack_14 = 0x6ab59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_64 = (char *)0x0;\n  __stream = (FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0);\n  if (__stream == (FILE *)0x0) {\n    local_64 = "can\'t open file";\n    bVar5 = true;\n    iVar2 = 0;\n  }\n  else {\n    pcVar1 = fgets((char *)local_60,0x40,__stream);\n    bVar5 = false;\n    bVar6 = pcVar1 == (char *)0x0;\n    if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    local_64 = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar5 = true;\n    iVar2 = 0;\n  }\nLAB_0006abff:\n  if ((param_4 != (undefined4 *)0x0) && (bVar5)) {\n    *param_4 = local_64;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0008eb20();\n}" { (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar5;" primitive_type identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "byte bVar7;" type_identifier identifier ;) (declaration "char *local_64;" primitive_type (pointer_declarator "*local_64" * identifier) ;) (declaration "byte local_60 [64];" type_identifier (array_declarator "local_60 [64]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "bVar7 = 0;" (assignment_expression "bVar7 = 0" identifier = number_literal) ;) (expression_statement "uStack_14 = 0x6ab59;" (assignment_expression "uStack_14 = 0x6ab59" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "local_64 = (char *)0x0;" (assignment_expression "local_64 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "__stream = (FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0);" (assignment_expression "__stream = (FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0)" identifier = (cast_expression "(FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0)" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000841b0(param_1,&DAT_0009dd97,0)" identifier (argument_list "(param_1,&DAT_0009dd97,0)" ( identifier , (pointer_expression "&DAT_0009dd97" & identifier) , number_literal ))))) ;) (if_statement "if (__stream == (FILE *)0x0) {\n    local_64 = "can\'t open file";\n    bVar5 = true;\n    iVar2 = 0;\n  }\n  else {\n    pcVar1 = fgets((char *)local_60,0x40,__stream);\n    bVar5 = false;\n    bVar6 = pcVar1 == (char *)0x0;\n    if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    local_64 = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar5 = true;\n    iVar2 = 0;\n  }" if (parenthesized_expression "(__stream == (FILE *)0x0)" ( (binary_expression "__stream == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    local_64 = "can\'t open file";\n    bVar5 = true;\n    iVar2 = 0;\n  }" { (expression_statement "local_64 = "can\'t open file";" (assignment_expression "local_64 = "can\'t open file"" identifier = (string_literal ""can\'t open file"" " string_content escape_sequence string_content ")) ;) (expression_statement "bVar5 = true;" (assignment_expression "bVar5 = true" identifier = true) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    pcVar1 = fgets((char *)local_60,0x40,__stream);\n    bVar5 = false;\n    bVar6 = pcVar1 == (char *)0x0;\n    if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    local_64 = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar5 = true;\n    iVar2 = 0;\n  }" else (compound_statement "{\n    pcVar1 = fgets((char *)local_60,0x40,__stream);\n    bVar5 = false;\n    bVar6 = pcVar1 == (char *)0x0;\n    if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    local_64 = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar5 = true;\n    iVar2 = 0;\n  }" { (expression_statement "pcVar1 = fgets((char *)local_60,0x40,__stream);" (assignment_expression "pcVar1 = fgets((char *)local_60,0x40,__stream)" identifier = (call_expression "fgets((char *)local_60,0x40,__stream)" identifier (argument_list "((char *)local_60,0x40,__stream)" ( (cast_expression "(char *)local_60" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , number_literal , identifier )))) ;) (expression_statement "bVar5 = false;" (assignment_expression "bVar5 = false" identifier = false) ;) (expression_statement "bVar6 = pcVar1 == (char *)0x0;" (assignment_expression "bVar6 = pcVar1 == (char *)0x0" identifier = (binary_expression "pcVar1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ;) (if_statement "if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }" if (parenthesized_expression "(!bVar6)" ( (unary_expression "!bVar6" ! identifier) )) (compound_statement "{\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }" { (expression_statement "iVar2 = 0x21;" (assignment_expression "iVar2 = 0x21" identifier = number_literal) ;) (expression_statement "pbVar3 = local_60;" (assignment_expression "pbVar3 = local_60" identifier = identifier) ;) (expression_statement "pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";" (assignment_expression "pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n"" identifier = (cast_expression "(byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""SSH PRIVATE KEY FILE FORMAT 1.1\n"" " string_content escape_sequence "))) ;) (do_statement "do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);" do (compound_statement "{\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 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 "bVar5 = *pbVar3 < *pbVar4;" (assignment_expression "bVar5 = *pbVar3 < *pbVar4" identifier = (binary_expression "*pbVar3 < *pbVar4" (pointer_expression "*pbVar3" * identifier) < (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "bVar6 = *pbVar3 == *pbVar4;" (assignment_expression "bVar6 = *pbVar3 == *pbVar4" identifier = (binary_expression "*pbVar3 == *pbVar4" (pointer_expression "*pbVar3" * identifier) == (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;" (assignment_expression "pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1" identifier = (binary_expression "pbVar3 + (uint)bVar7 * -2 + 1" (binary_expression "pbVar3 + (uint)bVar7 * -2" identifier + (binary_expression "(uint)bVar7 * -2" (cast_expression "(uint)bVar7" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;" (assignment_expression "pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1" identifier = (binary_expression "pbVar4 + (uint)bVar7 * -2 + 1" (binary_expression "pbVar4 + (uint)bVar7 * -2" identifier + (binary_expression "(uint)bVar7 * -2" (cast_expression "(uint)bVar7" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(bVar6)" ( identifier )) ;) (if_statement "if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }" if (parenthesized_expression "((!bVar5 && !bVar6) == bVar5)" ( (binary_expression "(!bVar5 && !bVar6) == bVar5" (parenthesized_expression "(!bVar5 && !bVar6)" ( (binary_expression "!bVar5 && !bVar6" (unary_expression "!bVar5" ! identifier) && (unary_expression "!bVar6" ! identifier)) )) == identifier) )) (compound_statement "{\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }" { (expression_statement "iVar2 = FUN_0006a1f0(0,param_3,&local_64);" (assignment_expression "iVar2 = FUN_0006a1f0(0,param_3,&local_64)" identifier = (call_expression "FUN_0006a1f0(0,param_3,&local_64)" identifier (argument_list "(0,param_3,&local_64)" ( number_literal , identifier , (pointer_expression "&local_64" & identifier) )))) ;) (expression_statement "bVar5 = iVar2 != 1;" (assignment_expression "bVar5 = iVar2 != 1" identifier = (binary_expression "iVar2 != 1" identifier != number_literal)) ;) (goto_statement "goto LAB_0006abff;" goto statement_identifier ;) })) })) (expression_statement "local_64 = "not an SSH-1 RSA file";" (assignment_expression "local_64 = "not an SSH-1 RSA file"" identifier = (string_literal ""not an SSH-1 RSA file"" " string_content ")) ;) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier ))) ;) (expression_statement "bVar5 = true;" (assignment_expression "bVar5 = true" identifier = true) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) }))) (labeled_statement "LAB_0006abff:\n  if ((param_4 != (undefined4 *)0x0) && (bVar5)) {\n    *param_4 = local_64;\n  }" statement_identifier : (if_statement "if ((param_4 != (undefined4 *)0x0) && (bVar5)) {\n    *param_4 = local_64;\n  }" if (parenthesized_expression "((param_4 != (undefined4 *)0x0) && (bVar5))" ( (binary_expression "(param_4 != (undefined4 *)0x0) && (bVar5)" (parenthesized_expression "(param_4 != (undefined4 *)0x0)" ( (binary_expression "param_4 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(bVar5)" ( identifier ))) )) (compound_statement "{\n    *param_4 = local_64;\n  }" { (expression_statement "*param_4 = local_64;" (assignment_expression "*param_4 = local_64" (pointer_expression "*param_4" * identifier) = identifier) ;) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) comment (expression_statement "FUN_0008eb20();" (call_expression "FUN_0008eb20()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint loadrsakey(Filename *filename,RSAKey *key,char *passphrase,char **errorstr)\n\n{\n  int iVar1;\n  FILE *__stream;\n  char *pcVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  int in_GS_OFFSET;\n  bool bVar6;\n  bool bVar7;\n  byte bVar8;\n  char *error;\n  char buf [64];\n  \n  bVar8 = 0;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  error = (char *)0x0;\n  __stream = (FILE *)f_open(filename,"rb",0);\n  if (__stream == (FILE *)0x0) {\n    error = "can\'t open file";\n    bVar6 = true;\n    iVar3 = 0;\n  }\n  else {\n    pcVar2 = fgets(buf,0x40,__stream);\n    bVar6 = false;\n    bVar7 = pcVar2 == (char *)0x0;\n    if (!bVar7) {\n      iVar3 = 0x21;\n      pbVar4 = (byte *)buf;\n      pbVar5 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        iVar3 = loadrsakey_main((FILE *)__stream,key,0,(char **)0x0,passphrase,&error);\n        bVar6 = iVar3 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    error = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar6 = true;\n    iVar3 = 0;\n  }\nLAB_0006abff:\n  if ((errorstr != (char **)0x0) && (bVar6)) {\n    *errorstr = error;\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "int loadrsakey(Filename *filename,RSAKey *key,char *passphrase,char **errorstr)\n\n{\n  int iVar1;\n  FILE *__stream;\n  char *pcVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  int in_GS_OFFSET;\n  bool bVar6;\n  bool bVar7;\n  byte bVar8;\n  char *error;\n  char buf [64];\n  \n  bVar8 = 0;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  error = (char *)0x0;\n  __stream = (FILE *)f_open(filename,"rb",0);\n  if (__stream == (FILE *)0x0) {\n    error = "can\'t open file";\n    bVar6 = true;\n    iVar3 = 0;\n  }\n  else {\n    pcVar2 = fgets(buf,0x40,__stream);\n    bVar6 = false;\n    bVar7 = pcVar2 == (char *)0x0;\n    if (!bVar7) {\n      iVar3 = 0x21;\n      pbVar4 = (byte *)buf;\n      pbVar5 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        iVar3 = loadrsakey_main((FILE *)__stream,key,0,(char **)0x0,passphrase,&error);\n        bVar6 = iVar3 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    error = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar6 = true;\n    iVar3 = 0;\n  }\nLAB_0006abff:\n  if ((errorstr != (char **)0x0) && (bVar6)) {\n    *errorstr = error;\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "loadrsakey(Filename *filename,RSAKey *key,char *passphrase,char **errorstr)" identifier (parameter_list "(Filename *filename,RSAKey *key,char *passphrase,char **errorstr)" ( (parameter_declaration "Filename *filename" type_identifier (pointer_declarator "*filename" * identifier)) , (parameter_declaration "RSAKey *key" type_identifier (pointer_declarator "*key" * identifier)) , (parameter_declaration "char *passphrase" primitive_type (pointer_declarator "*passphrase" * identifier)) , (parameter_declaration "char **errorstr" primitive_type (pointer_declarator "**errorstr" * (pointer_declarator "*errorstr" * identifier))) ))) (compound_statement "{\n  int iVar1;\n  FILE *__stream;\n  char *pcVar2;\n  int iVar3;\n  byte *pbVar4;\n  byte *pbVar5;\n  int in_GS_OFFSET;\n  bool bVar6;\n  bool bVar7;\n  byte bVar8;\n  char *error;\n  char buf [64];\n  \n  bVar8 = 0;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  error = (char *)0x0;\n  __stream = (FILE *)f_open(filename,"rb",0);\n  if (__stream == (FILE *)0x0) {\n    error = "can\'t open file";\n    bVar6 = true;\n    iVar3 = 0;\n  }\n  else {\n    pcVar2 = fgets(buf,0x40,__stream);\n    bVar6 = false;\n    bVar7 = pcVar2 == (char *)0x0;\n    if (!bVar7) {\n      iVar3 = 0x21;\n      pbVar4 = (byte *)buf;\n      pbVar5 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        iVar3 = loadrsakey_main((FILE *)__stream,key,0,(char **)0x0,passphrase,&error);\n        bVar6 = iVar3 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    error = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar6 = true;\n    iVar3 = 0;\n  }\nLAB_0006abff:\n  if ((errorstr != (char **)0x0) && (bVar6)) {\n    *errorstr = error;\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "bool bVar7;" primitive_type identifier ;) (declaration "byte bVar8;" type_identifier identifier ;) (declaration "char *error;" primitive_type (pointer_declarator "*error" * identifier) ;) (declaration "char buf [64];" primitive_type (array_declarator "buf [64]" identifier [ number_literal ]) ;) (expression_statement "bVar8 = 0;" (assignment_expression "bVar8 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "error = (char *)0x0;" (assignment_expression "error = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "__stream = (FILE *)f_open(filename,"rb",0);" (assignment_expression "__stream = (FILE *)f_open(filename,"rb",0)" identifier = (cast_expression "(FILE *)f_open(filename,"rb",0)" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "f_open(filename,"rb",0)" identifier (argument_list "(filename,"rb",0)" ( identifier , (string_literal ""rb"" " string_content ") , number_literal ))))) ;) (if_statement "if (__stream == (FILE *)0x0) {\n    error = "can\'t open file";\n    bVar6 = true;\n    iVar3 = 0;\n  }\n  else {\n    pcVar2 = fgets(buf,0x40,__stream);\n    bVar6 = false;\n    bVar7 = pcVar2 == (char *)0x0;\n    if (!bVar7) {\n      iVar3 = 0x21;\n      pbVar4 = (byte *)buf;\n      pbVar5 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        iVar3 = loadrsakey_main((FILE *)__stream,key,0,(char **)0x0,passphrase,&error);\n        bVar6 = iVar3 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    error = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar6 = true;\n    iVar3 = 0;\n  }" if (parenthesized_expression "(__stream == (FILE *)0x0)" ( (binary_expression "__stream == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    error = "can\'t open file";\n    bVar6 = true;\n    iVar3 = 0;\n  }" { (expression_statement "error = "can\'t open file";" (assignment_expression "error = "can\'t open file"" identifier = (string_literal ""can\'t open file"" " string_content escape_sequence string_content ")) ;) (expression_statement "bVar6 = true;" (assignment_expression "bVar6 = true" identifier = true) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    pcVar2 = fgets(buf,0x40,__stream);\n    bVar6 = false;\n    bVar7 = pcVar2 == (char *)0x0;\n    if (!bVar7) {\n      iVar3 = 0x21;\n      pbVar4 = (byte *)buf;\n      pbVar5 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        iVar3 = loadrsakey_main((FILE *)__stream,key,0,(char **)0x0,passphrase,&error);\n        bVar6 = iVar3 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    error = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar6 = true;\n    iVar3 = 0;\n  }" else (compound_statement "{\n    pcVar2 = fgets(buf,0x40,__stream);\n    bVar6 = false;\n    bVar7 = pcVar2 == (char *)0x0;\n    if (!bVar7) {\n      iVar3 = 0x21;\n      pbVar4 = (byte *)buf;\n      pbVar5 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        iVar3 = loadrsakey_main((FILE *)__stream,key,0,(char **)0x0,passphrase,&error);\n        bVar6 = iVar3 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    error = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar6 = true;\n    iVar3 = 0;\n  }" { (expression_statement "pcVar2 = fgets(buf,0x40,__stream);" (assignment_expression "pcVar2 = fgets(buf,0x40,__stream)" identifier = (call_expression "fgets(buf,0x40,__stream)" identifier (argument_list "(buf,0x40,__stream)" ( identifier , number_literal , identifier )))) ;) (expression_statement "bVar6 = false;" (assignment_expression "bVar6 = false" identifier = false) ;) (expression_statement "bVar7 = pcVar2 == (char *)0x0;" (assignment_expression "bVar7 = pcVar2 == (char *)0x0" identifier = (binary_expression "pcVar2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ;) (if_statement "if (!bVar7) {\n      iVar3 = 0x21;\n      pbVar4 = (byte *)buf;\n      pbVar5 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        iVar3 = loadrsakey_main((FILE *)__stream,key,0,(char **)0x0,passphrase,&error);\n        bVar6 = iVar3 != 1;\n        goto LAB_0006abff;\n      }\n    }" if (parenthesized_expression "(!bVar7)" ( (unary_expression "!bVar7" ! identifier) )) (compound_statement "{\n      iVar3 = 0x21;\n      pbVar4 = (byte *)buf;\n      pbVar5 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);\n      if ((!bVar6 && !bVar7) == bVar6) {\n        iVar3 = loadrsakey_main((FILE *)__stream,key,0,(char **)0x0,passphrase,&error);\n        bVar6 = iVar3 != 1;\n        goto LAB_0006abff;\n      }\n    }" { (expression_statement "iVar3 = 0x21;" (assignment_expression "iVar3 = 0x21" identifier = number_literal) ;) (expression_statement "pbVar4 = (byte *)buf;" (assignment_expression "pbVar4 = (byte *)buf" identifier = (cast_expression "(byte *)buf" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "pbVar5 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";" (assignment_expression "pbVar5 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n"" identifier = (cast_expression "(byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""SSH PRIVATE KEY FILE FORMAT 1.1\n"" " string_content escape_sequence "))) ;) (do_statement "do {\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      } while (bVar7);" do (compound_statement "{\n        if (iVar3 == 0) break;\n        iVar3 = iVar3 + -1;\n        bVar6 = *pbVar4 < *pbVar5;\n        bVar7 = *pbVar4 == *pbVar5;\n        pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;\n        pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;\n      }" { (if_statement "if (iVar3 == 0) break;" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar3 = iVar3 + -1;" (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ;) (expression_statement "bVar6 = *pbVar4 < *pbVar5;" (assignment_expression "bVar6 = *pbVar4 < *pbVar5" identifier = (binary_expression "*pbVar4 < *pbVar5" (pointer_expression "*pbVar4" * identifier) < (pointer_expression "*pbVar5" * identifier))) ;) (expression_statement "bVar7 = *pbVar4 == *pbVar5;" (assignment_expression "bVar7 = *pbVar4 == *pbVar5" identifier = (binary_expression "*pbVar4 == *pbVar5" (pointer_expression "*pbVar4" * identifier) == (pointer_expression "*pbVar5" * identifier))) ;) (expression_statement "pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1;" (assignment_expression "pbVar4 = pbVar4 + (uint)bVar8 * -2 + 1" identifier = (binary_expression "pbVar4 + (uint)bVar8 * -2 + 1" (binary_expression "pbVar4 + (uint)bVar8 * -2" identifier + (binary_expression "(uint)bVar8 * -2" (cast_expression "(uint)bVar8" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1;" (assignment_expression "pbVar5 = pbVar5 + (uint)bVar8 * -2 + 1" identifier = (binary_expression "pbVar5 + (uint)bVar8 * -2 + 1" (binary_expression "pbVar5 + (uint)bVar8 * -2" identifier + (binary_expression "(uint)bVar8 * -2" (cast_expression "(uint)bVar8" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(bVar7)" ( identifier )) ;) (if_statement "if ((!bVar6 && !bVar7) == bVar6) {\n        iVar3 = loadrsakey_main((FILE *)__stream,key,0,(char **)0x0,passphrase,&error);\n        bVar6 = iVar3 != 1;\n        goto LAB_0006abff;\n      }" if (parenthesized_expression "((!bVar6 && !bVar7) == bVar6)" ( (binary_expression "(!bVar6 && !bVar7) == bVar6" (parenthesized_expression "(!bVar6 && !bVar7)" ( (binary_expression "!bVar6 && !bVar7" (unary_expression "!bVar6" ! identifier) && (unary_expression "!bVar7" ! identifier)) )) == identifier) )) (compound_statement "{\n        iVar3 = loadrsakey_main((FILE *)__stream,key,0,(char **)0x0,passphrase,&error);\n        bVar6 = iVar3 != 1;\n        goto LAB_0006abff;\n      }" { (expression_statement "iVar3 = loadrsakey_main((FILE *)__stream,key,0,(char **)0x0,passphrase,&error);" (assignment_expression "iVar3 = loadrsakey_main((FILE *)__stream,key,0,(char **)0x0,passphrase,&error)" identifier = (call_expression "loadrsakey_main((FILE *)__stream,key,0,(char **)0x0,passphrase,&error)" identifier (argument_list "((FILE *)__stream,key,0,(char **)0x0,passphrase,&error)" ( (cast_expression "(FILE *)__stream" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier , number_literal , (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal) , identifier , (pointer_expression "&error" & identifier) )))) ;) (expression_statement "bVar6 = iVar3 != 1;" (assignment_expression "bVar6 = iVar3 != 1" identifier = (binary_expression "iVar3 != 1" identifier != number_literal)) ;) (goto_statement "goto LAB_0006abff;" goto statement_identifier ;) })) })) (expression_statement "error = "not an SSH-1 RSA file";" (assignment_expression "error = "not an SSH-1 RSA file"" identifier = (string_literal ""not an SSH-1 RSA file"" " string_content ")) ;) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier ))) ;) (expression_statement "bVar6 = true;" (assignment_expression "bVar6 = true" identifier = true) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) }))) (labeled_statement "LAB_0006abff:\n  if ((errorstr != (char **)0x0) && (bVar6)) {\n    *errorstr = error;\n  }" statement_identifier : (if_statement "if ((errorstr != (char **)0x0) && (bVar6)) {\n    *errorstr = error;\n  }" if (parenthesized_expression "((errorstr != (char **)0x0) && (bVar6))" ( (binary_expression "(errorstr != (char **)0x0) && (bVar6)" (parenthesized_expression "(errorstr != (char **)0x0)" ( (binary_expression "errorstr != (char **)0x0" identifier != (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) && (parenthesized_expression "(bVar6)" ( identifier ))) )) (compound_statement "{\n    *errorstr = error;\n  }" { (expression_statement "*errorstr = error;" (assignment_expression "*errorstr = error" (pointer_expression "*errorstr" * identifier) = identifier) ;) }))) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int FUN_0006ab50(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)\n\n{\n  FILE *__stream;\n  char *pcVar1;\n  int iVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  int in_GS_OFFSET;\n  bool bVar5;\n  bool bVar6;\n  byte bVar7;\n  char *local_64;\n  byte local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar7 = 0;\n  uStack_14 = 0x6ab59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_64 = (char *)0x0;\n  __stream = (FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0);\n  if (__stream == (FILE *)0x0) {\n    local_64 = "can\'t open file";\n    bVar5 = true;\n    iVar2 = 0;\n  }\n  else {\n    pcVar1 = fgets((char *)local_60,0x40,__stream);\n    bVar5 = false;\n    bVar6 = pcVar1 == (char *)0x0;\n    if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    local_64 = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar5 = true;\n    iVar2 = 0;\n  }\nLAB_0006abff:\n  if ((param_4 != (undefined4 *)0x0) && (bVar5)) {\n    *param_4 = local_64;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0008eb20();\n}\n\n" (function_definition "int FUN_0006ab50(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)\n\n{\n  FILE *__stream;\n  char *pcVar1;\n  int iVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  int in_GS_OFFSET;\n  bool bVar5;\n  bool bVar6;\n  byte bVar7;\n  char *local_64;\n  byte local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar7 = 0;\n  uStack_14 = 0x6ab59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_64 = (char *)0x0;\n  __stream = (FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0);\n  if (__stream == (FILE *)0x0) {\n    local_64 = "can\'t open file";\n    bVar5 = true;\n    iVar2 = 0;\n  }\n  else {\n    pcVar1 = fgets((char *)local_60,0x40,__stream);\n    bVar5 = false;\n    bVar6 = pcVar1 == (char *)0x0;\n    if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    local_64 = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar5 = true;\n    iVar2 = 0;\n  }\nLAB_0006abff:\n  if ((param_4 != (undefined4 *)0x0) && (bVar5)) {\n    *param_4 = local_64;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0008eb20();\n}" primitive_type (function_declarator "FUN_0006ab50(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  FILE *__stream;\n  char *pcVar1;\n  int iVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  int in_GS_OFFSET;\n  bool bVar5;\n  bool bVar6;\n  byte bVar7;\n  char *local_64;\n  byte local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar7 = 0;\n  uStack_14 = 0x6ab59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_64 = (char *)0x0;\n  __stream = (FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0);\n  if (__stream == (FILE *)0x0) {\n    local_64 = "can\'t open file";\n    bVar5 = true;\n    iVar2 = 0;\n  }\n  else {\n    pcVar1 = fgets((char *)local_60,0x40,__stream);\n    bVar5 = false;\n    bVar6 = pcVar1 == (char *)0x0;\n    if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    local_64 = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar5 = true;\n    iVar2 = 0;\n  }\nLAB_0006abff:\n  if ((param_4 != (undefined4 *)0x0) && (bVar5)) {\n    *param_4 = local_64;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0008eb20();\n}" { (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar5;" primitive_type identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "byte bVar7;" type_identifier identifier ;) (declaration "char *local_64;" primitive_type (pointer_declarator "*local_64" * identifier) ;) (declaration "byte local_60 [64];" type_identifier (array_declarator "local_60 [64]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "bVar7 = 0;" (assignment_expression "bVar7 = 0" identifier = number_literal) ;) (expression_statement "uStack_14 = 0x6ab59;" (assignment_expression "uStack_14 = 0x6ab59" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "local_64 = (char *)0x0;" (assignment_expression "local_64 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "__stream = (FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0);" (assignment_expression "__stream = (FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0)" identifier = (cast_expression "(FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0)" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000841b0(param_1,&DAT_0009dd97,0)" identifier (argument_list "(param_1,&DAT_0009dd97,0)" ( identifier , (pointer_expression "&DAT_0009dd97" & identifier) , number_literal ))))) ;) (if_statement "if (__stream == (FILE *)0x0) {\n    local_64 = "can\'t open file";\n    bVar5 = true;\n    iVar2 = 0;\n  }\n  else {\n    pcVar1 = fgets((char *)local_60,0x40,__stream);\n    bVar5 = false;\n    bVar6 = pcVar1 == (char *)0x0;\n    if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    local_64 = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar5 = true;\n    iVar2 = 0;\n  }" if (parenthesized_expression "(__stream == (FILE *)0x0)" ( (binary_expression "__stream == (FILE *)0x0" identifier == (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    local_64 = "can\'t open file";\n    bVar5 = true;\n    iVar2 = 0;\n  }" { (expression_statement "local_64 = "can\'t open file";" (assignment_expression "local_64 = "can\'t open file"" identifier = (string_literal ""can\'t open file"" " string_content escape_sequence string_content ")) ;) (expression_statement "bVar5 = true;" (assignment_expression "bVar5 = true" identifier = true) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    pcVar1 = fgets((char *)local_60,0x40,__stream);\n    bVar5 = false;\n    bVar6 = pcVar1 == (char *)0x0;\n    if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    local_64 = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar5 = true;\n    iVar2 = 0;\n  }" else (compound_statement "{\n    pcVar1 = fgets((char *)local_60,0x40,__stream);\n    bVar5 = false;\n    bVar6 = pcVar1 == (char *)0x0;\n    if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    local_64 = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar5 = true;\n    iVar2 = 0;\n  }" { (expression_statement "pcVar1 = fgets((char *)local_60,0x40,__stream);" (assignment_expression "pcVar1 = fgets((char *)local_60,0x40,__stream)" identifier = (call_expression "fgets((char *)local_60,0x40,__stream)" identifier (argument_list "((char *)local_60,0x40,__stream)" ( (cast_expression "(char *)local_60" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , number_literal , identifier )))) ;) (expression_statement "bVar5 = false;" (assignment_expression "bVar5 = false" identifier = false) ;) (expression_statement "bVar6 = pcVar1 == (char *)0x0;" (assignment_expression "bVar6 = pcVar1 == (char *)0x0" identifier = (binary_expression "pcVar1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ;) (if_statement "if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }" if (parenthesized_expression "(!bVar6)" ( (unary_expression "!bVar6" ! identifier) )) (compound_statement "{\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }" { (expression_statement "iVar2 = 0x21;" (assignment_expression "iVar2 = 0x21" identifier = number_literal) ;) (expression_statement "pbVar3 = local_60;" (assignment_expression "pbVar3 = local_60" identifier = identifier) ;) (expression_statement "pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";" (assignment_expression "pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n"" identifier = (cast_expression "(byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n"" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (string_literal ""SSH PRIVATE KEY FILE FORMAT 1.1\n"" " string_content escape_sequence "))) ;) (do_statement "do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);" do (compound_statement "{\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 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 "bVar5 = *pbVar3 < *pbVar4;" (assignment_expression "bVar5 = *pbVar3 < *pbVar4" identifier = (binary_expression "*pbVar3 < *pbVar4" (pointer_expression "*pbVar3" * identifier) < (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "bVar6 = *pbVar3 == *pbVar4;" (assignment_expression "bVar6 = *pbVar3 == *pbVar4" identifier = (binary_expression "*pbVar3 == *pbVar4" (pointer_expression "*pbVar3" * identifier) == (pointer_expression "*pbVar4" * identifier))) ;) (expression_statement "pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;" (assignment_expression "pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1" identifier = (binary_expression "pbVar3 + (uint)bVar7 * -2 + 1" (binary_expression "pbVar3 + (uint)bVar7 * -2" identifier + (binary_expression "(uint)bVar7 * -2" (cast_expression "(uint)bVar7" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;" (assignment_expression "pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1" identifier = (binary_expression "pbVar4 + (uint)bVar7 * -2 + 1" (binary_expression "pbVar4 + (uint)bVar7 * -2" identifier + (binary_expression "(uint)bVar7 * -2" (cast_expression "(uint)bVar7" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(bVar6)" ( identifier )) ;) (if_statement "if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }" if (parenthesized_expression "((!bVar5 && !bVar6) == bVar5)" ( (binary_expression "(!bVar5 && !bVar6) == bVar5" (parenthesized_expression "(!bVar5 && !bVar6)" ( (binary_expression "!bVar5 && !bVar6" (unary_expression "!bVar5" ! identifier) && (unary_expression "!bVar6" ! identifier)) )) == identifier) )) (compound_statement "{\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }" { (expression_statement "iVar2 = FUN_0006a1f0(0,param_3,&local_64);" (assignment_expression "iVar2 = FUN_0006a1f0(0,param_3,&local_64)" identifier = (call_expression "FUN_0006a1f0(0,param_3,&local_64)" identifier (argument_list "(0,param_3,&local_64)" ( number_literal , identifier , (pointer_expression "&local_64" & identifier) )))) ;) (expression_statement "bVar5 = iVar2 != 1;" (assignment_expression "bVar5 = iVar2 != 1" identifier = (binary_expression "iVar2 != 1" identifier != number_literal)) ;) (goto_statement "goto LAB_0006abff;" goto statement_identifier ;) })) })) (expression_statement "local_64 = "not an SSH-1 RSA file";" (assignment_expression "local_64 = "not an SSH-1 RSA file"" identifier = (string_literal ""not an SSH-1 RSA file"" " string_content ")) ;) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier ))) ;) (expression_statement "bVar5 = true;" (assignment_expression "bVar5 = true" identifier = true) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) }))) (labeled_statement "LAB_0006abff:\n  if ((param_4 != (undefined4 *)0x0) && (bVar5)) {\n    *param_4 = local_64;\n  }" statement_identifier : (if_statement "if ((param_4 != (undefined4 *)0x0) && (bVar5)) {\n    *param_4 = local_64;\n  }" if (parenthesized_expression "((param_4 != (undefined4 *)0x0) && (bVar5))" ( (binary_expression "(param_4 != (undefined4 *)0x0) && (bVar5)" (parenthesized_expression "(param_4 != (undefined4 *)0x0)" ( (binary_expression "param_4 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(bVar5)" ( identifier ))) )) (compound_statement "{\n    *param_4 = local_64;\n  }" { (expression_statement "*param_4 = local_64;" (assignment_expression "*param_4 = local_64" (pointer_expression "*param_4" * identifier) = identifier) ;) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) (expression_statement "FUN_0008eb20();" (call_expression "FUN_0008eb20()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * 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 ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " string_content escape_sequence string_content ")) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) , LIT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT))) ;) (if_statement if (parenthesized_expression ( (unary_expression ! IDENT) )) (compound_statement { (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 escape_sequence "))) ;) (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 (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + 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 (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT , (pointer_expression & IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT != LIT)) ;) (goto_statement goto statement_identifier ;) })) })) (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( IDENT ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int FUN_0006ab50(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)\n\n{\n  FILE *__stream;\n  char *pcVar1;\n  int iVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  int in_GS_OFFSET;\n  bool bVar5;\n  bool bVar6;\n  byte bVar7;\n  char *local_64;\n  byte local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar7 = 0;\n  uStack_14 = 0x6ab59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_64 = (char *)0x0;\n  __stream = (FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0);\n  if (__stream == (FILE *)0x0) {\n    local_64 = "can\'t open file";\n    bVar5 = true;\n    iVar2 = 0;\n  }\n  else {\n    pcVar1 = fgets((char *)local_60,0x40,__stream);\n    bVar5 = false;\n    bVar6 = pcVar1 == (char *)0x0;\n    if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    local_64 = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar5 = true;\n    iVar2 = 0;\n  }\nLAB_0006abff:\n  if ((param_4 != (undefined4 *)0x0) && (bVar5)) {\n    *param_4 = local_64;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0008eb20();\n}" (primitive_type "int") (function_declarator "FUN_0006ab50(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)" (identifier "FUN_0006ab50") (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 *param_4" (type_identifier "undefined4") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  FILE *__stream;\n  char *pcVar1;\n  int iVar2;\n  byte *pbVar3;\n  byte *pbVar4;\n  int in_GS_OFFSET;\n  bool bVar5;\n  bool bVar6;\n  byte bVar7;\n  char *local_64;\n  byte local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar7 = 0;\n  uStack_14 = 0x6ab59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_64 = (char *)0x0;\n  __stream = (FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0);\n  if (__stream == (FILE *)0x0) {\n    local_64 = "can\'t open file";\n    bVar5 = true;\n    iVar2 = 0;\n  }\n  else {\n    pcVar1 = fgets((char *)local_60,0x40,__stream);\n    bVar5 = false;\n    bVar6 = pcVar1 == (char *)0x0;\n    if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    local_64 = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar5 = true;\n    iVar2 = 0;\n  }\nLAB_0006abff:\n  if ((param_4 != (undefined4 *)0x0) && (bVar5)) {\n    *param_4 = local_64;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0008eb20();\n}" ({ "{") (declaration "FILE *__stream;" (type_identifier "FILE") (pointer_declarator "*__stream" (* "*") (identifier "__stream")) (; ";")) (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "byte *pbVar3;" (type_identifier "byte") (pointer_declarator "*pbVar3" (* "*") (identifier "pbVar3")) (; ";")) (declaration "byte *pbVar4;" (type_identifier "byte") (pointer_declarator "*pbVar4" (* "*") (identifier "pbVar4")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "bool bVar5;" (primitive_type "bool") (identifier "bVar5") (; ";")) (declaration "bool bVar6;" (primitive_type "bool") (identifier "bVar6") (; ";")) (declaration "byte bVar7;" (type_identifier "byte") (identifier "bVar7") (; ";")) (declaration "char *local_64;" (primitive_type "char") (pointer_declarator "*local_64" (* "*") (identifier "local_64")) (; ";")) (declaration "byte local_60 [64];" (type_identifier "byte") (array_declarator "local_60 [64]" (identifier "local_60") ([ "[") (number_literal "64") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "bVar7 = 0;" (assignment_expression "bVar7 = 0" (identifier "bVar7") (= "=") (number_literal "0")) (; ";")) (expression_statement "uStack_14 = 0x6ab59;" (assignment_expression "uStack_14 = 0x6ab59" (identifier "uStack_14") (= "=") (number_literal "0x6ab59")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "local_64 = (char *)0x0;" (assignment_expression "local_64 = (char *)0x0" (identifier "local_64") (= "=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "__stream = (FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0);" (assignment_expression "__stream = (FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0)" (identifier "__stream") (= "=") (cast_expression "(FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0)" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_000841b0(param_1,&DAT_0009dd97,0)" (identifier "FUN_000841b0") (argument_list "(param_1,&DAT_0009dd97,0)" (( "(") (identifier "param_1") (, ",") (pointer_expression "&DAT_0009dd97" (& "&") (identifier "DAT_0009dd97")) (, ",") (number_literal "0") () ")"))))) (; ";")) (if_statement "if (__stream == (FILE *)0x0) {\n    local_64 = "can\'t open file";\n    bVar5 = true;\n    iVar2 = 0;\n  }\n  else {\n    pcVar1 = fgets((char *)local_60,0x40,__stream);\n    bVar5 = false;\n    bVar6 = pcVar1 == (char *)0x0;\n    if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    local_64 = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar5 = true;\n    iVar2 = 0;\n  }" (if "if") (parenthesized_expression "(__stream == (FILE *)0x0)" (( "(") (binary_expression "__stream == (FILE *)0x0" (identifier "__stream") (== "==") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    local_64 = "can\'t open file";\n    bVar5 = true;\n    iVar2 = 0;\n  }" ({ "{") (expression_statement "local_64 = "can\'t open file";" (assignment_expression "local_64 = "can\'t open file"" (identifier "local_64") (= "=") (string_literal ""can\'t open file"" (" """) (string_content "can") (escape_sequence "\'") (string_content "t open file") (" """))) (; ";")) (expression_statement "bVar5 = true;" (assignment_expression "bVar5 = true" (identifier "bVar5") (= "=") (true "true")) (; ";")) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    pcVar1 = fgets((char *)local_60,0x40,__stream);\n    bVar5 = false;\n    bVar6 = pcVar1 == (char *)0x0;\n    if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    local_64 = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar5 = true;\n    iVar2 = 0;\n  }" (else "else") (compound_statement "{\n    pcVar1 = fgets((char *)local_60,0x40,__stream);\n    bVar5 = false;\n    bVar6 = pcVar1 == (char *)0x0;\n    if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }\n    local_64 = "not an SSH-1 RSA file";\n    fclose(__stream);\n    bVar5 = true;\n    iVar2 = 0;\n  }" ({ "{") (expression_statement "pcVar1 = fgets((char *)local_60,0x40,__stream);" (assignment_expression "pcVar1 = fgets((char *)local_60,0x40,__stream)" (identifier "pcVar1") (= "=") (call_expression "fgets((char *)local_60,0x40,__stream)" (identifier "fgets") (argument_list "((char *)local_60,0x40,__stream)" (( "(") (cast_expression "(char *)local_60" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "local_60")) (, ",") (number_literal "0x40") (, ",") (identifier "__stream") () ")")))) (; ";")) (expression_statement "bVar5 = false;" (assignment_expression "bVar5 = false" (identifier "bVar5") (= "=") (false "false")) (; ";")) (expression_statement "bVar6 = pcVar1 == (char *)0x0;" (assignment_expression "bVar6 = pcVar1 == (char *)0x0" (identifier "bVar6") (= "=") (binary_expression "pcVar1 == (char *)0x0" (identifier "pcVar1") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")))) (; ";")) (if_statement "if (!bVar6) {\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }" (if "if") (parenthesized_expression "(!bVar6)" (( "(") (unary_expression "!bVar6" (! "!") (identifier "bVar6")) () ")")) (compound_statement "{\n      iVar2 = 0x21;\n      pbVar3 = local_60;\n      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";\n      do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);\n      if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }\n    }" ({ "{") (expression_statement "iVar2 = 0x21;" (assignment_expression "iVar2 = 0x21" (identifier "iVar2") (= "=") (number_literal "0x21")) (; ";")) (expression_statement "pbVar3 = local_60;" (assignment_expression "pbVar3 = local_60" (identifier "pbVar3") (= "=") (identifier "local_60")) (; ";")) (expression_statement "pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";" (assignment_expression "pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n"" (identifier "pbVar4") (= "=") (cast_expression "(byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n"" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (string_literal ""SSH PRIVATE KEY FILE FORMAT 1.1\n"" (" """) (string_content "SSH PRIVATE KEY FILE FORMAT 1.1") (escape_sequence "\n") (" """)))) (; ";")) (do_statement "do {\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      } while (bVar6);" (do "do") (compound_statement "{\n        if (iVar2 == 0) break;\n        iVar2 = iVar2 + -1;\n        bVar5 = *pbVar3 < *pbVar4;\n        bVar6 = *pbVar3 == *pbVar4;\n        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;\n        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;\n      }" ({ "{") (if_statement "if (iVar2 == 0) break;" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar2 = iVar2 + -1;" (assignment_expression "iVar2 = iVar2 + -1" (identifier "iVar2") (= "=") (binary_expression "iVar2 + -1" (identifier "iVar2") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "bVar5 = *pbVar3 < *pbVar4;" (assignment_expression "bVar5 = *pbVar3 < *pbVar4" (identifier "bVar5") (= "=") (binary_expression "*pbVar3 < *pbVar4" (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")) (< "<") (pointer_expression "*pbVar4" (* "*") (identifier "pbVar4")))) (; ";")) (expression_statement "bVar6 = *pbVar3 == *pbVar4;" (assignment_expression "bVar6 = *pbVar3 == *pbVar4" (identifier "bVar6") (= "=") (binary_expression "*pbVar3 == *pbVar4" (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")) (== "==") (pointer_expression "*pbVar4" (* "*") (identifier "pbVar4")))) (; ";")) (expression_statement "pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;" (assignment_expression "pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1" (identifier "pbVar3") (= "=") (binary_expression "pbVar3 + (uint)bVar7 * -2 + 1" (binary_expression "pbVar3 + (uint)bVar7 * -2" (identifier "pbVar3") (+ "+") (binary_expression "(uint)bVar7 * -2" (cast_expression "(uint)bVar7" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar7")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;" (assignment_expression "pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1" (identifier "pbVar4") (= "=") (binary_expression "pbVar4 + (uint)bVar7 * -2 + 1" (binary_expression "pbVar4 + (uint)bVar7 * -2" (identifier "pbVar4") (+ "+") (binary_expression "(uint)bVar7 * -2" (cast_expression "(uint)bVar7" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar7")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar6)" (( "(") (identifier "bVar6") () ")")) (; ";")) (if_statement "if ((!bVar5 && !bVar6) == bVar5) {\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }" (if "if") (parenthesized_expression "((!bVar5 && !bVar6) == bVar5)" (( "(") (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")) () ")")) (compound_statement "{\n        iVar2 = FUN_0006a1f0(0,param_3,&local_64);\n        bVar5 = iVar2 != 1;\n        goto LAB_0006abff;\n      }" ({ "{") (expression_statement "iVar2 = FUN_0006a1f0(0,param_3,&local_64);" (assignment_expression "iVar2 = FUN_0006a1f0(0,param_3,&local_64)" (identifier "iVar2") (= "=") (call_expression "FUN_0006a1f0(0,param_3,&local_64)" (identifier "FUN_0006a1f0") (argument_list "(0,param_3,&local_64)" (( "(") (number_literal "0") (, ",") (identifier "param_3") (, ",") (pointer_expression "&local_64" (& "&") (identifier "local_64")) () ")")))) (; ";")) (expression_statement "bVar5 = iVar2 != 1;" (assignment_expression "bVar5 = iVar2 != 1" (identifier "bVar5") (= "=") (binary_expression "iVar2 != 1" (identifier "iVar2") (!= "!=") (number_literal "1"))) (; ";")) (goto_statement "goto LAB_0006abff;" (goto "goto") (statement_identifier "LAB_0006abff") (; ";")) (} "}"))) (} "}"))) (expression_statement "local_64 = "not an SSH-1 RSA file";" (assignment_expression "local_64 = "not an SSH-1 RSA file"" (identifier "local_64") (= "=") (string_literal ""not an SSH-1 RSA file"" (" """) (string_content "not an SSH-1 RSA file") (" """))) (; ";")) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" (identifier "fclose") (argument_list "(__stream)" (( "(") (identifier "__stream") () ")"))) (; ";")) (expression_statement "bVar5 = true;" (assignment_expression "bVar5 = true" (identifier "bVar5") (= "=") (true "true")) (; ";")) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (} "}")))) (labeled_statement "LAB_0006abff:\n  if ((param_4 != (undefined4 *)0x0) && (bVar5)) {\n    *param_4 = local_64;\n  }" (statement_identifier "LAB_0006abff") (: ":") (if_statement "if ((param_4 != (undefined4 *)0x0) && (bVar5)) {\n    *param_4 = local_64;\n  }" (if "if") (parenthesized_expression "((param_4 != (undefined4 *)0x0) && (bVar5))" (( "(") (binary_expression "(param_4 != (undefined4 *)0x0) && (bVar5)" (parenthesized_expression "(param_4 != (undefined4 *)0x0)" (( "(") (binary_expression "param_4 != (undefined4 *)0x0" (identifier "param_4") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(bVar5)" (( "(") (identifier "bVar5") () ")"))) () ")")) (compound_statement "{\n    *param_4 = local_64;\n  }" ({ "{") (expression_statement "*param_4 = local_64;" (assignment_expression "*param_4 = local_64" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (identifier "local_64")) (; ";")) (} "}")))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return iVar2;\n  }" ({ "{") (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}"))) (expression_statement "FUN_0008eb20();" (call_expression "FUN_0008eb20()" (identifier "FUN_0008eb20") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

int function_1(type_1 *filename,type_2 *key,char *passphrase,char **var_12)

{
  int var_13;
  type_3 *var_3;
  char *var_5;
  int var_6;
  type_4 *var_7;
  type_4 *var_8;
  int var_1;
  bool var_9;
  bool bVar7;
  type_4 bVar8;
  char *error;
  char buf [64];
  
  bVar8 = 0;
  var_13 = *(int *)(var_1 + 0x14);
  error = (char *)0x0;
  var_3 = (type_3 *)var_2(filename,"rb",0);
  if (var_3 == (type_3 *)0x0) {
    error = "can\'t open file";
    var_9 = true;
    var_6 = 0;
  }
  else {
    var_5 = var_4(buf,0x40,var_3);
    var_9 = false;
    bVar7 = var_5 == (char *)0x0;
    if (!bVar7) {
      var_6 = 0x21;
      var_7 = (type_4 *)buf;
      var_8 = (type_4 *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";
      do {
        if (var_6 == 0) break;
        var_6 = var_6 + -1;
        var_9 = *var_7 < *var_8;
        bVar7 = *var_7 == *var_8;
        var_7 = var_7 + (type_5)bVar8 * -2 + 1;
        var_8 = var_8 + (type_5)bVar8 * -2 + 1;
      } while (bVar7);
      if ((!var_9 && !bVar7) == var_9) {
        var_6 = var_10((type_3 *)var_3,key,0,(char **)0x0,passphrase,&error);
        var_9 = var_6 != 1;
        goto LAB_0006abff;
      }
    }
    error = "not an SSH-1 RSA file";
    var_11(var_3);
    var_9 = true;
    var_6 = 0;
  }
LAB_0006abff:
  if ((var_12 != (char **)0x0) && (var_9)) {
    *var_12 = error;
  }
  if (var_13 == *(int *)(var_1 + 0x14)) {
    return var_6;
  }
                    /* WARNING: Subroutine does not return */
  var_14();
}


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

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

int MASKED(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 *param_4)

{
  FILE *__stream;
  char *pcVar1;
  int iVar2;
  byte *pbVar3;
  byte *pbVar4;
  int in_GS_OFFSET;
  bool bVar5;
  bool bVar6;
  byte bVar7;
  char *local_64;
  byte local_60 [64];
  int local_20;
  undefined4 uStack_14;
  
  bVar7 = 0;
  uStack_14 = 0x6ab59;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_64 = (char *)0x0;
  __stream = (FILE *)FUN_000841b0(param_1,&DAT_0009dd97,0);
  if (__stream == (FILE *)0x0) {
    local_64 = "can\'t open file";
    bVar5 = true;
    iVar2 = 0;
  }
  else {
    pcVar1 = fgets((char *)local_60,0x40,__stream);
    bVar5 = false;
    bVar6 = pcVar1 == (char *)0x0;
    if (!bVar6) {
      iVar2 = 0x21;
      pbVar3 = local_60;
      pbVar4 = (byte *)"SSH PRIVATE KEY FILE FORMAT 1.1\n";
      do {
        if (iVar2 == 0) break;
        iVar2 = iVar2 + -1;
        bVar5 = *pbVar3 < *pbVar4;
        bVar6 = *pbVar3 == *pbVar4;
        pbVar3 = pbVar3 + (uint)bVar7 * -2 + 1;
        pbVar4 = pbVar4 + (uint)bVar7 * -2 + 1;
      } while (bVar6);
      if ((!bVar5 && !bVar6) == bVar5) {
        iVar2 = FUN_0006a1f0(0,param_3,&local_64);
        bVar5 = iVar2 != 1;
        goto LAB_0006abff;
      }
    }
    local_64 = "not an SSH-1 RSA file";
    fclose(__stream);
    bVar5 = true;
    iVar2 = 0;
  }
LAB_0006abff:
  if ((param_4 != (undefined4 *)0x0) && (bVar5)) {
    *param_4 = local_64;
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0008eb20();
}

