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

void store_host_key(char *hostname,int port,char *keytype,char *key)

{
  char *__filename;
  char *pcVar1;
  FILE *__stream;
  char *pcVar2;
  size_t sVar3;
  char *pcVar4;
  int iVar5;
  int *piVar6;
  FILE *local_28;
  
  __filename = make_filename(2,(char *)0x0);
  local_28 = fopen64(__filename,"w");
  if (local_28 != (FILE *)0x0) {
LAB_0006cd91:
    pcVar1 = make_filename(1,(char *)0x0);
    __stream = fopen64(pcVar1,"r");
    pcVar2 = dupprintf("%s@%d:%s %s\n",keytype,port,hostname,key);
    if (__stream != (FILE *)0x0) {
      sVar3 = strcspn(pcVar2," ");
      while (pcVar4 = fgetline((FILE *)__stream), pcVar4 != (char *)0x0) {
        iVar5 = strncmp(pcVar4,pcVar2,sVar3 + 1);
        if (iVar5 != 0) {
          fputs(pcVar4,local_28);
        }
        safefree(pcVar4);
      }
      fclose(__stream);
    }
    fputs(pcVar2,local_28);
    fclose(local_28);
    iVar5 = rename(__filename,pcVar1);
    if (iVar5 < 0) {
      piVar6 = __errno_location();
      pcVar4 = strerror(*piVar6);
      nonfatal("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,pcVar1,
               pcVar4);
    }
    safefree(__filename);
    safefree(pcVar1);
    safefree(pcVar2);
    return;
  }
  piVar6 = __errno_location();
  iVar5 = *piVar6;
  if (iVar5 == 2) {
    pcVar1 = make_filename(0,(char *)0x0);
    pcVar2 = make_dir_path(pcVar1,0x1c0);
    if (pcVar2 != (char *)0x0) {
      nonfatal("Unable to store host key: %s",pcVar2);
      safefree(pcVar2);
      safefree(pcVar1);
      safefree(__filename);
      return;
    }
    safefree(pcVar1);
    local_28 = fopen64(__filename,"w");
    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;
    iVar5 = *piVar6;
  }
  pcVar1 = strerror(iVar5);
  nonfatal("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);
  safefree(__filename);
  return;
}



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

void FUN_0006cd50(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)

{
  char *__filename;
  char *pcVar1;
  FILE *__stream;
  char *__s;
  size_t sVar2;
  char *pcVar3;
  int iVar4;
  int *piVar5;
  undefined4 uVar6;
  FILE *local_28;
  
  __filename = (char *)FUN_0006b890();
  local_28 = fopen64(__filename,"w");
  if (local_28 != (FILE *)0x0) {
LAB_0006cd91:
    pcVar1 = (char *)FUN_0006b890();
    __stream = fopen64(pcVar1,"r");
    __s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);
    if (__stream != (FILE *)0x0) {
      sVar2 = strcspn(__s," ");
      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {
        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);
        if (iVar4 != 0) {
          fputs(pcVar3,local_28);
        }
        FUN_0001b240(pcVar3);
      }
      fclose(__stream);
    }
    fputs(__s,local_28);
    fclose(local_28);
    iVar4 = rename(__filename,pcVar1);
    if (iVar4 < 0) {
      piVar5 = __errno_location();
      pcVar3 = strerror(*piVar5);
      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,
                   pcVar1,pcVar3);
    }
    FUN_0001b240(__filename);
    FUN_0001b240(pcVar1);
    FUN_0001b240(__s);
    return;
  }
  piVar5 = __errno_location();
  iVar4 = *piVar5;
  if (iVar4 == 2) {
    uVar6 = FUN_0006b890();
    iVar4 = FUN_000661c0(uVar6,0x1c0);
    if (iVar4 != 0) {
      FUN_00020bd0("Unable to store host key: %s",iVar4);
      FUN_0001b240(iVar4);
      FUN_0001b240(uVar6);
      FUN_0001b240(__filename);
      return;
    }
    FUN_0001b240(uVar6);
    local_28 = fopen64(__filename,"w");
    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;
    iVar4 = *piVar5;
  }
  pcVar1 = strerror(iVar4);
  FUN_00020bd0("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);
  FUN_0001b240(__filename);
  return;
}


PUSH EBP
XOR EDX,EDX
MOV EAX,0x2
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014970
ADD EBX,0x3d030
SUB ESP,0x1c
CALL 0x0006b890
SUB ESP,0x8
MOV dword ptr [ESP + 0x10],EAX
LEA ESI,[EBX + 0xfffc633e]
PUSH ESI
PUSH EAX
CALL 0x00014280
MOV dword ptr [ESP + 0x14],EAX
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0006ceb0
XOR EDX,EDX
MOV EAX,0x1
CALL 0x0006b890
SUB ESP,0x8
MOV dword ptr [ESP + 0x14],EAX
MOV ECX,EAX
LEA EAX,[EBX + 0xfffc7eb2]
PUSH EAX
PUSH ECX
CALL 0x00014280
POP ESI
PUSH dword ptr [ESP + 0x48]
MOV EDI,EAX
LEA EAX,[EBX + 0xfffd80e9]
PUSH dword ptr [ESP + 0x40]
PUSH dword ptr [ESP + 0x48]
PUSH dword ptr [ESP + 0x50]
PUSH EAX
CALL 0x0001b020
ADD ESP,0x20
MOV ESI,EAX
TEST EDI,EDI
JZ 0x0006ce54
SUB ESP,0x8
LEA EAX,[EBX + 0xfffc7155]
PUSH EAX
PUSH ESI
CALL 0x000140e0
ADD ESP,0x10
ADD EAX,0x1
MOV dword ptr [ESP],EAX
JMP 0x0006ce0c
SUB ESP,0xc
PUSH EBP
CALL 0x0001b240
ADD ESP,0x10
SUB ESP,0xc
PUSH EDI
CALL 0x0001b190
ADD ESP,0x10
MOV EBP,EAX
TEST EAX,EAX
JZ 0x0006ce48
SUB ESP,0x4
PUSH dword ptr [ESP + 0x4]
PUSH ESI
PUSH EBP
CALL 0x00014760
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0006ce00
SUB ESP,0x8
PUSH dword ptr [ESP + 0xc]
PUSH EBP
CALL 0x000147e0
ADD ESP,0x10
JMP 0x0006ce00
SUB ESP,0xc
PUSH EDI
CALL 0x00014160
ADD ESP,0x10
SUB ESP,0x8
MOV EDI,dword ptr [ESP + 0xc]
PUSH EDI
PUSH ESI
CALL 0x000147e0
MOV dword ptr [ESP],EDI
CALL 0x00014160
POP EDX
POP ECX
PUSH dword ptr [ESP + 0x14]
PUSH dword ptr [ESP + 0x14]
CALL 0x00014430
ADD ESP,0x10
TEST EAX,EAX
JS 0x0006cef0
SUB ESP,0xc
PUSH dword ptr [ESP + 0x14]
CALL 0x0001b240
POP EAX
PUSH dword ptr [ESP + 0x18]
CALL 0x0001b240
MOV dword ptr [ESP],ESI
CALL 0x0001b240
ADD ESP,0x10
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x00014550
MOV EDI,EAX
MOV EAX,dword ptr [EAX]
CMP EAX,0x2
JZ 0x0006cf20
SUB ESP,0xc
PUSH EAX
CALL 0x00014390
ADD ESP,0xc
PUSH EAX
MOV ESI,dword ptr [ESP + 0x10]
LEA EAX,[EBX + 0xfffd8160]
PUSH ESI
PUSH EAX
CALL 0x00020bd0
MOV dword ptr [ESP],ESI
CALL 0x0001b240
ADD ESP,0x10
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x00014550
SUB ESP,0xc
PUSH dword ptr [EAX]
CALL 0x00014390
PUSH EAX
LEA EAX,[EBX + 0xfffd8194]
PUSH dword ptr [ESP + 0x20]
PUSH dword ptr [ESP + 0x20]
PUSH EAX
CALL 0x00020bd0
ADD ESP,0x20
JMP 0x0006ce80
XOR EDX,EDX
XOR EAX,EAX
CALL 0x0006b890
SUB ESP,0x8
PUSH 0x1c0
MOV EBP,EAX
PUSH EAX
CALL 0x000661c0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0006cf7a
SUB ESP,0x8
LEA EDX,[EBX + 0xfffd80cc]
PUSH EAX
MOV dword ptr [ESP + 0xc],EAX
PUSH EDX
CALL 0x00020bd0
MOV EAX,dword ptr [ESP + 0x10]
MOV dword ptr [ESP],EAX
CALL 0x0001b240
MOV dword ptr [ESP],EBP
CALL 0x0001b240
POP EAX
PUSH dword ptr [ESP + 0x14]
CALL 0x0001b240
ADD ESP,0x10
JMP 0x0006cea1
SUB ESP,0xc
PUSH EBP
CALL 0x0001b240
POP EBP
POP EAX
PUSH ESI
PUSH dword ptr [ESP + 0x14]
CALL 0x00014280
MOV dword ptr [ESP + 0x14],EAX
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0006cd91
MOV EAX,dword ptr [EDI]
JMP 0x0006cebe
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0006cd50(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  char *__filename;\n  char *pcVar1;\n  FILE *__stream;\n  char *__s;\n  size_t sVar2;\n  char *pcVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  FILE *local_28;\n  \n  __filename = (char *)FUN_0006b890();\n  local_28 = fopen64(__filename,"w");\n  if (local_28 != (FILE *)0x0) {\nLAB_0006cd91:\n    pcVar1 = (char *)FUN_0006b890();\n    __stream = fopen64(pcVar1,"r");\n    __s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);\n    if (__stream != (FILE *)0x0) {\n      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\n    }\n    fputs(__s,local_28);\n    fclose(local_28);\n    iVar4 = rename(__filename,pcVar1);\n    if (iVar4 < 0) {\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }\n    FUN_0001b240(__filename);\n    FUN_0001b240(pcVar1);\n    FUN_0001b240(__s);\n    return;\n  }\n  piVar5 = __errno_location();\n  iVar4 = *piVar5;\n  if (iVar4 == 2) {\n    uVar6 = FUN_0006b890();\n    iVar4 = FUN_000661c0(uVar6,0x1c0);\n    if (iVar4 != 0) {\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }\n    FUN_0001b240(uVar6);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar4 = *piVar5;\n  }\n  pcVar1 = strerror(iVar4);\n  FUN_00020bd0("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);\n  FUN_0001b240(__filename);\n  return;\n}\n\n" comment (function_definition "void FUN_0006cd50(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  char *__filename;\n  char *pcVar1;\n  FILE *__stream;\n  char *__s;\n  size_t sVar2;\n  char *pcVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  FILE *local_28;\n  \n  __filename = (char *)FUN_0006b890();\n  local_28 = fopen64(__filename,"w");\n  if (local_28 != (FILE *)0x0) {\nLAB_0006cd91:\n    pcVar1 = (char *)FUN_0006b890();\n    __stream = fopen64(pcVar1,"r");\n    __s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);\n    if (__stream != (FILE *)0x0) {\n      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\n    }\n    fputs(__s,local_28);\n    fclose(local_28);\n    iVar4 = rename(__filename,pcVar1);\n    if (iVar4 < 0) {\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }\n    FUN_0001b240(__filename);\n    FUN_0001b240(pcVar1);\n    FUN_0001b240(__s);\n    return;\n  }\n  piVar5 = __errno_location();\n  iVar4 = *piVar5;\n  if (iVar4 == 2) {\n    uVar6 = FUN_0006b890();\n    iVar4 = FUN_000661c0(uVar6,0x1c0);\n    if (iVar4 != 0) {\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }\n    FUN_0001b240(uVar6);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar4 = *piVar5;\n  }\n  pcVar1 = strerror(iVar4);\n  FUN_00020bd0("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);\n  FUN_0001b240(__filename);\n  return;\n}" primitive_type (function_declarator "FUN_0006cd50(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 identifier) ))) (compound_statement "{\n  char *__filename;\n  char *pcVar1;\n  FILE *__stream;\n  char *__s;\n  size_t sVar2;\n  char *pcVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  FILE *local_28;\n  \n  __filename = (char *)FUN_0006b890();\n  local_28 = fopen64(__filename,"w");\n  if (local_28 != (FILE *)0x0) {\nLAB_0006cd91:\n    pcVar1 = (char *)FUN_0006b890();\n    __stream = fopen64(pcVar1,"r");\n    __s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);\n    if (__stream != (FILE *)0x0) {\n      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\n    }\n    fputs(__s,local_28);\n    fclose(local_28);\n    iVar4 = rename(__filename,pcVar1);\n    if (iVar4 < 0) {\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }\n    FUN_0001b240(__filename);\n    FUN_0001b240(pcVar1);\n    FUN_0001b240(__s);\n    return;\n  }\n  piVar5 = __errno_location();\n  iVar4 = *piVar5;\n  if (iVar4 == 2) {\n    uVar6 = FUN_0006b890();\n    iVar4 = FUN_000661c0(uVar6,0x1c0);\n    if (iVar4 != 0) {\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }\n    FUN_0001b240(uVar6);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar4 = *piVar5;\n  }\n  pcVar1 = strerror(iVar4);\n  FUN_00020bd0("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);\n  FUN_0001b240(__filename);\n  return;\n}" { (declaration "char *__filename;" primitive_type (pointer_declarator "*__filename" * identifier) ;) (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "FILE *local_28;" type_identifier (pointer_declarator "*local_28" * identifier) ;) (expression_statement "__filename = (char *)FUN_0006b890();" (assignment_expression "__filename = (char *)FUN_0006b890()" identifier = (cast_expression "(char *)FUN_0006b890()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0006b890()" identifier (argument_list "()" ( ))))) ;) (expression_statement "local_28 = fopen64(__filename,"w");" (assignment_expression "local_28 = fopen64(__filename,"w")" identifier = (call_expression "fopen64(__filename,"w")" identifier (argument_list "(__filename,"w")" ( identifier , (string_literal ""w"" " string_content ") )))) ;) (if_statement "if (local_28 != (FILE *)0x0) {\nLAB_0006cd91:\n    pcVar1 = (char *)FUN_0006b890();\n    __stream = fopen64(pcVar1,"r");\n    __s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);\n    if (__stream != (FILE *)0x0) {\n      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\n    }\n    fputs(__s,local_28);\n    fclose(local_28);\n    iVar4 = rename(__filename,pcVar1);\n    if (iVar4 < 0) {\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }\n    FUN_0001b240(__filename);\n    FUN_0001b240(pcVar1);\n    FUN_0001b240(__s);\n    return;\n  }" if (parenthesized_expression "(local_28 != (FILE *)0x0)" ( (binary_expression "local_28 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_0006cd91:\n    pcVar1 = (char *)FUN_0006b890();\n    __stream = fopen64(pcVar1,"r");\n    __s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);\n    if (__stream != (FILE *)0x0) {\n      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\n    }\n    fputs(__s,local_28);\n    fclose(local_28);\n    iVar4 = rename(__filename,pcVar1);\n    if (iVar4 < 0) {\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }\n    FUN_0001b240(__filename);\n    FUN_0001b240(pcVar1);\n    FUN_0001b240(__s);\n    return;\n  }" { (labeled_statement "LAB_0006cd91:\n    pcVar1 = (char *)FUN_0006b890();" statement_identifier : (expression_statement "pcVar1 = (char *)FUN_0006b890();" (assignment_expression "pcVar1 = (char *)FUN_0006b890()" identifier = (cast_expression "(char *)FUN_0006b890()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0006b890()" identifier (argument_list "()" ( ))))) ;)) (expression_statement "__stream = fopen64(pcVar1,"r");" (assignment_expression "__stream = fopen64(pcVar1,"r")" identifier = (call_expression "fopen64(pcVar1,"r")" identifier (argument_list "(pcVar1,"r")" ( identifier , (string_literal ""r"" " string_content ") )))) ;) (expression_statement "__s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);" (assignment_expression "__s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4)" identifier = (cast_expression "(char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4)" identifier (argument_list "("%s@%d:%s %s\n",param_3,param_2,param_1,param_4)" ( (string_literal ""%s@%d:%s %s\n"" " string_content escape_sequence ") , identifier , identifier , identifier , identifier ))))) ;) (if_statement "if (__stream != (FILE *)0x0) {\n      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\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      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\n    }" { (expression_statement "sVar2 = strcspn(__s," ");" (assignment_expression "sVar2 = strcspn(__s," ")" identifier = (call_expression "strcspn(__s," ")" identifier (argument_list "(__s," ")" ( identifier , (string_literal "" "" " string_content ") )))) ;) (while_statement "while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }" while (parenthesized_expression "(pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0)" ( (comma_expression "pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0" (assignment_expression "pcVar3 = (char *)FUN_0001b190(__stream)" identifier = (cast_expression "(char *)FUN_0001b190(__stream)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001b190(__stream)" identifier (argument_list "(__stream)" ( identifier ))))) , (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) )) (compound_statement "{\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }" { (expression_statement "iVar4 = strncmp(pcVar3,__s,sVar2 + 1);" (assignment_expression "iVar4 = strncmp(pcVar3,__s,sVar2 + 1)" identifier = (call_expression "strncmp(pcVar3,__s,sVar2 + 1)" identifier (argument_list "(pcVar3,__s,sVar2 + 1)" ( identifier , identifier , (binary_expression "sVar2 + 1" identifier + number_literal) )))) ;) (if_statement "if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n          fputs(pcVar3,local_28);\n        }" { (expression_statement "fputs(pcVar3,local_28);" (call_expression "fputs(pcVar3,local_28)" identifier (argument_list "(pcVar3,local_28)" ( identifier , identifier ))) ;) })) (expression_statement "FUN_0001b240(pcVar3);" (call_expression "FUN_0001b240(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier ))) ;) })) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier ))) ;) })) (expression_statement "fputs(__s,local_28);" (call_expression "fputs(__s,local_28)" identifier (argument_list "(__s,local_28)" ( identifier , identifier ))) ;) (expression_statement "fclose(local_28);" (call_expression "fclose(local_28)" identifier (argument_list "(local_28)" ( identifier ))) ;) (expression_statement "iVar4 = rename(__filename,pcVar1);" (assignment_expression "iVar4 = rename(__filename,pcVar1)" identifier = (call_expression "rename(__filename,pcVar1)" identifier (argument_list "(__filename,pcVar1)" ( identifier , identifier )))) ;) (if_statement "if (iVar4 < 0) {\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }" { (expression_statement "piVar5 = __errno_location();" (assignment_expression "piVar5 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar3 = strerror(*piVar5);" (assignment_expression "pcVar3 = strerror(*piVar5)" identifier = (call_expression "strerror(*piVar5)" identifier (argument_list "(*piVar5)" ( (pointer_expression "*piVar5" * identifier) )))) ;) (expression_statement "FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);" (call_expression "FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3)" identifier (argument_list "("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3)" ( (string_literal ""Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , identifier , identifier , identifier ))) ;) })) (expression_statement "FUN_0001b240(__filename);" (call_expression "FUN_0001b240(__filename)" identifier (argument_list "(__filename)" ( identifier ))) ;) (expression_statement "FUN_0001b240(pcVar1);" (call_expression "FUN_0001b240(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) (expression_statement "FUN_0001b240(__s);" (call_expression "FUN_0001b240(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "piVar5 = __errno_location();" (assignment_expression "piVar5 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar4 = *piVar5;" (assignment_expression "iVar4 = *piVar5" identifier = (pointer_expression "*piVar5" * identifier)) ;) (if_statement "if (iVar4 == 2) {\n    uVar6 = FUN_0006b890();\n    iVar4 = FUN_000661c0(uVar6,0x1c0);\n    if (iVar4 != 0) {\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }\n    FUN_0001b240(uVar6);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar4 = *piVar5;\n  }" if (parenthesized_expression "(iVar4 == 2)" ( (binary_expression "iVar4 == 2" identifier == number_literal) )) (compound_statement "{\n    uVar6 = FUN_0006b890();\n    iVar4 = FUN_000661c0(uVar6,0x1c0);\n    if (iVar4 != 0) {\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }\n    FUN_0001b240(uVar6);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar4 = *piVar5;\n  }" { (expression_statement "uVar6 = FUN_0006b890();" (assignment_expression "uVar6 = FUN_0006b890()" identifier = (call_expression "FUN_0006b890()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar4 = FUN_000661c0(uVar6,0x1c0);" (assignment_expression "iVar4 = FUN_000661c0(uVar6,0x1c0)" identifier = (call_expression "FUN_000661c0(uVar6,0x1c0)" identifier (argument_list "(uVar6,0x1c0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar4 != 0) {\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }" { (expression_statement "FUN_00020bd0("Unable to store host key: %s",iVar4);" (call_expression "FUN_00020bd0("Unable to store host key: %s",iVar4)" identifier (argument_list "("Unable to store host key: %s",iVar4)" ( (string_literal ""Unable to store host key: %s"" " string_content ") , identifier ))) ;) (expression_statement "FUN_0001b240(iVar4);" (call_expression "FUN_0001b240(iVar4)" identifier (argument_list "(iVar4)" ( identifier ))) ;) (expression_statement "FUN_0001b240(uVar6);" (call_expression "FUN_0001b240(uVar6)" identifier (argument_list "(uVar6)" ( identifier ))) ;) (expression_statement "FUN_0001b240(__filename);" (call_expression "FUN_0001b240(__filename)" identifier (argument_list "(__filename)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_0001b240(uVar6);" (call_expression "FUN_0001b240(uVar6)" identifier (argument_list "(uVar6)" ( identifier ))) ;) (expression_statement "local_28 = fopen64(__filename,"w");" (assignment_expression "local_28 = fopen64(__filename,"w")" identifier = (call_expression "fopen64(__filename,"w")" identifier (argument_list "(__filename,"w")" ( identifier , (string_literal ""w"" " string_content ") )))) ;) (if_statement "if (local_28 != (FILE *)0x0) goto LAB_0006cd91;" if (parenthesized_expression "(local_28 != (FILE *)0x0)" ( (binary_expression "local_28 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0006cd91;" goto statement_identifier ;)) (expression_statement "iVar4 = *piVar5;" (assignment_expression "iVar4 = *piVar5" identifier = (pointer_expression "*piVar5" * identifier)) ;) })) (expression_statement "pcVar1 = strerror(iVar4);" (assignment_expression "pcVar1 = strerror(iVar4)" identifier = (call_expression "strerror(iVar4)" identifier (argument_list "(iVar4)" ( identifier )))) ;) (expression_statement "FUN_00020bd0("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);" (call_expression "FUN_00020bd0("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1)" identifier (argument_list "("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1)" ( (string_literal ""Unable to store host key: open(\"%s\") returned \'%s\'"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "FUN_0001b240(__filename);" (call_expression "FUN_0001b240(__filename)" identifier (argument_list "(__filename)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid store_host_key(char *hostname,int port,char *keytype,char *key)\n\n{\n  char *__filename;\n  char *pcVar1;\n  FILE *__stream;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  int iVar5;\n  int *piVar6;\n  FILE *local_28;\n  \n  __filename = make_filename(2,(char *)0x0);\n  local_28 = fopen64(__filename,"w");\n  if (local_28 != (FILE *)0x0) {\nLAB_0006cd91:\n    pcVar1 = make_filename(1,(char *)0x0);\n    __stream = fopen64(pcVar1,"r");\n    pcVar2 = dupprintf("%s@%d:%s %s\n",keytype,port,hostname,key);\n    if (__stream != (FILE *)0x0) {\n      sVar3 = strcspn(pcVar2," ");\n      while (pcVar4 = fgetline((FILE *)__stream), pcVar4 != (char *)0x0) {\n        iVar5 = strncmp(pcVar4,pcVar2,sVar3 + 1);\n        if (iVar5 != 0) {\n          fputs(pcVar4,local_28);\n        }\n        safefree(pcVar4);\n      }\n      fclose(__stream);\n    }\n    fputs(pcVar2,local_28);\n    fclose(local_28);\n    iVar5 = rename(__filename,pcVar1);\n    if (iVar5 < 0) {\n      piVar6 = __errno_location();\n      pcVar4 = strerror(*piVar6);\n      nonfatal("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,pcVar1,\n               pcVar4);\n    }\n    safefree(__filename);\n    safefree(pcVar1);\n    safefree(pcVar2);\n    return;\n  }\n  piVar6 = __errno_location();\n  iVar5 = *piVar6;\n  if (iVar5 == 2) {\n    pcVar1 = make_filename(0,(char *)0x0);\n    pcVar2 = make_dir_path(pcVar1,0x1c0);\n    if (pcVar2 != (char *)0x0) {\n      nonfatal("Unable to store host key: %s",pcVar2);\n      safefree(pcVar2);\n      safefree(pcVar1);\n      safefree(__filename);\n      return;\n    }\n    safefree(pcVar1);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar5 = *piVar6;\n  }\n  pcVar1 = strerror(iVar5);\n  nonfatal("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);\n  safefree(__filename);\n  return;\n}\n\n" comment comment (function_definition "void store_host_key(char *hostname,int port,char *keytype,char *key)\n\n{\n  char *__filename;\n  char *pcVar1;\n  FILE *__stream;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  int iVar5;\n  int *piVar6;\n  FILE *local_28;\n  \n  __filename = make_filename(2,(char *)0x0);\n  local_28 = fopen64(__filename,"w");\n  if (local_28 != (FILE *)0x0) {\nLAB_0006cd91:\n    pcVar1 = make_filename(1,(char *)0x0);\n    __stream = fopen64(pcVar1,"r");\n    pcVar2 = dupprintf("%s@%d:%s %s\n",keytype,port,hostname,key);\n    if (__stream != (FILE *)0x0) {\n      sVar3 = strcspn(pcVar2," ");\n      while (pcVar4 = fgetline((FILE *)__stream), pcVar4 != (char *)0x0) {\n        iVar5 = strncmp(pcVar4,pcVar2,sVar3 + 1);\n        if (iVar5 != 0) {\n          fputs(pcVar4,local_28);\n        }\n        safefree(pcVar4);\n      }\n      fclose(__stream);\n    }\n    fputs(pcVar2,local_28);\n    fclose(local_28);\n    iVar5 = rename(__filename,pcVar1);\n    if (iVar5 < 0) {\n      piVar6 = __errno_location();\n      pcVar4 = strerror(*piVar6);\n      nonfatal("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,pcVar1,\n               pcVar4);\n    }\n    safefree(__filename);\n    safefree(pcVar1);\n    safefree(pcVar2);\n    return;\n  }\n  piVar6 = __errno_location();\n  iVar5 = *piVar6;\n  if (iVar5 == 2) {\n    pcVar1 = make_filename(0,(char *)0x0);\n    pcVar2 = make_dir_path(pcVar1,0x1c0);\n    if (pcVar2 != (char *)0x0) {\n      nonfatal("Unable to store host key: %s",pcVar2);\n      safefree(pcVar2);\n      safefree(pcVar1);\n      safefree(__filename);\n      return;\n    }\n    safefree(pcVar1);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar5 = *piVar6;\n  }\n  pcVar1 = strerror(iVar5);\n  nonfatal("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);\n  safefree(__filename);\n  return;\n}" primitive_type (function_declarator "store_host_key(char *hostname,int port,char *keytype,char *key)" identifier (parameter_list "(char *hostname,int port,char *keytype,char *key)" ( (parameter_declaration "char *hostname" primitive_type (pointer_declarator "*hostname" * identifier)) , (parameter_declaration "int port" primitive_type identifier) , (parameter_declaration "char *keytype" primitive_type (pointer_declarator "*keytype" * identifier)) , (parameter_declaration "char *key" primitive_type (pointer_declarator "*key" * identifier)) ))) (compound_statement "{\n  char *__filename;\n  char *pcVar1;\n  FILE *__stream;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  int iVar5;\n  int *piVar6;\n  FILE *local_28;\n  \n  __filename = make_filename(2,(char *)0x0);\n  local_28 = fopen64(__filename,"w");\n  if (local_28 != (FILE *)0x0) {\nLAB_0006cd91:\n    pcVar1 = make_filename(1,(char *)0x0);\n    __stream = fopen64(pcVar1,"r");\n    pcVar2 = dupprintf("%s@%d:%s %s\n",keytype,port,hostname,key);\n    if (__stream != (FILE *)0x0) {\n      sVar3 = strcspn(pcVar2," ");\n      while (pcVar4 = fgetline((FILE *)__stream), pcVar4 != (char *)0x0) {\n        iVar5 = strncmp(pcVar4,pcVar2,sVar3 + 1);\n        if (iVar5 != 0) {\n          fputs(pcVar4,local_28);\n        }\n        safefree(pcVar4);\n      }\n      fclose(__stream);\n    }\n    fputs(pcVar2,local_28);\n    fclose(local_28);\n    iVar5 = rename(__filename,pcVar1);\n    if (iVar5 < 0) {\n      piVar6 = __errno_location();\n      pcVar4 = strerror(*piVar6);\n      nonfatal("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,pcVar1,\n               pcVar4);\n    }\n    safefree(__filename);\n    safefree(pcVar1);\n    safefree(pcVar2);\n    return;\n  }\n  piVar6 = __errno_location();\n  iVar5 = *piVar6;\n  if (iVar5 == 2) {\n    pcVar1 = make_filename(0,(char *)0x0);\n    pcVar2 = make_dir_path(pcVar1,0x1c0);\n    if (pcVar2 != (char *)0x0) {\n      nonfatal("Unable to store host key: %s",pcVar2);\n      safefree(pcVar2);\n      safefree(pcVar1);\n      safefree(__filename);\n      return;\n    }\n    safefree(pcVar1);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar5 = *piVar6;\n  }\n  pcVar1 = strerror(iVar5);\n  nonfatal("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);\n  safefree(__filename);\n  return;\n}" { (declaration "char *__filename;" primitive_type (pointer_declarator "*__filename" * identifier) ;) (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (declaration "FILE *local_28;" type_identifier (pointer_declarator "*local_28" * identifier) ;) (expression_statement "__filename = make_filename(2,(char *)0x0);" (assignment_expression "__filename = make_filename(2,(char *)0x0)" identifier = (call_expression "make_filename(2,(char *)0x0)" identifier (argument_list "(2,(char *)0x0)" ( number_literal , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "local_28 = fopen64(__filename,"w");" (assignment_expression "local_28 = fopen64(__filename,"w")" identifier = (call_expression "fopen64(__filename,"w")" identifier (argument_list "(__filename,"w")" ( identifier , (string_literal ""w"" " string_content ") )))) ;) (if_statement "if (local_28 != (FILE *)0x0) {\nLAB_0006cd91:\n    pcVar1 = make_filename(1,(char *)0x0);\n    __stream = fopen64(pcVar1,"r");\n    pcVar2 = dupprintf("%s@%d:%s %s\n",keytype,port,hostname,key);\n    if (__stream != (FILE *)0x0) {\n      sVar3 = strcspn(pcVar2," ");\n      while (pcVar4 = fgetline((FILE *)__stream), pcVar4 != (char *)0x0) {\n        iVar5 = strncmp(pcVar4,pcVar2,sVar3 + 1);\n        if (iVar5 != 0) {\n          fputs(pcVar4,local_28);\n        }\n        safefree(pcVar4);\n      }\n      fclose(__stream);\n    }\n    fputs(pcVar2,local_28);\n    fclose(local_28);\n    iVar5 = rename(__filename,pcVar1);\n    if (iVar5 < 0) {\n      piVar6 = __errno_location();\n      pcVar4 = strerror(*piVar6);\n      nonfatal("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,pcVar1,\n               pcVar4);\n    }\n    safefree(__filename);\n    safefree(pcVar1);\n    safefree(pcVar2);\n    return;\n  }" if (parenthesized_expression "(local_28 != (FILE *)0x0)" ( (binary_expression "local_28 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_0006cd91:\n    pcVar1 = make_filename(1,(char *)0x0);\n    __stream = fopen64(pcVar1,"r");\n    pcVar2 = dupprintf("%s@%d:%s %s\n",keytype,port,hostname,key);\n    if (__stream != (FILE *)0x0) {\n      sVar3 = strcspn(pcVar2," ");\n      while (pcVar4 = fgetline((FILE *)__stream), pcVar4 != (char *)0x0) {\n        iVar5 = strncmp(pcVar4,pcVar2,sVar3 + 1);\n        if (iVar5 != 0) {\n          fputs(pcVar4,local_28);\n        }\n        safefree(pcVar4);\n      }\n      fclose(__stream);\n    }\n    fputs(pcVar2,local_28);\n    fclose(local_28);\n    iVar5 = rename(__filename,pcVar1);\n    if (iVar5 < 0) {\n      piVar6 = __errno_location();\n      pcVar4 = strerror(*piVar6);\n      nonfatal("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,pcVar1,\n               pcVar4);\n    }\n    safefree(__filename);\n    safefree(pcVar1);\n    safefree(pcVar2);\n    return;\n  }" { (labeled_statement "LAB_0006cd91:\n    pcVar1 = make_filename(1,(char *)0x0);" statement_identifier : (expression_statement "pcVar1 = make_filename(1,(char *)0x0);" (assignment_expression "pcVar1 = make_filename(1,(char *)0x0)" identifier = (call_expression "make_filename(1,(char *)0x0)" identifier (argument_list "(1,(char *)0x0)" ( number_literal , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;)) (expression_statement "__stream = fopen64(pcVar1,"r");" (assignment_expression "__stream = fopen64(pcVar1,"r")" identifier = (call_expression "fopen64(pcVar1,"r")" identifier (argument_list "(pcVar1,"r")" ( identifier , (string_literal ""r"" " string_content ") )))) ;) (expression_statement "pcVar2 = dupprintf("%s@%d:%s %s\n",keytype,port,hostname,key);" (assignment_expression "pcVar2 = dupprintf("%s@%d:%s %s\n",keytype,port,hostname,key)" identifier = (call_expression "dupprintf("%s@%d:%s %s\n",keytype,port,hostname,key)" identifier (argument_list "("%s@%d:%s %s\n",keytype,port,hostname,key)" ( (string_literal ""%s@%d:%s %s\n"" " string_content escape_sequence ") , identifier , identifier , identifier , identifier )))) ;) (if_statement "if (__stream != (FILE *)0x0) {\n      sVar3 = strcspn(pcVar2," ");\n      while (pcVar4 = fgetline((FILE *)__stream), pcVar4 != (char *)0x0) {\n        iVar5 = strncmp(pcVar4,pcVar2,sVar3 + 1);\n        if (iVar5 != 0) {\n          fputs(pcVar4,local_28);\n        }\n        safefree(pcVar4);\n      }\n      fclose(__stream);\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      sVar3 = strcspn(pcVar2," ");\n      while (pcVar4 = fgetline((FILE *)__stream), pcVar4 != (char *)0x0) {\n        iVar5 = strncmp(pcVar4,pcVar2,sVar3 + 1);\n        if (iVar5 != 0) {\n          fputs(pcVar4,local_28);\n        }\n        safefree(pcVar4);\n      }\n      fclose(__stream);\n    }" { (expression_statement "sVar3 = strcspn(pcVar2," ");" (assignment_expression "sVar3 = strcspn(pcVar2," ")" identifier = (call_expression "strcspn(pcVar2," ")" identifier (argument_list "(pcVar2," ")" ( identifier , (string_literal "" "" " string_content ") )))) ;) (while_statement "while (pcVar4 = fgetline((FILE *)__stream), pcVar4 != (char *)0x0) {\n        iVar5 = strncmp(pcVar4,pcVar2,sVar3 + 1);\n        if (iVar5 != 0) {\n          fputs(pcVar4,local_28);\n        }\n        safefree(pcVar4);\n      }" while (parenthesized_expression "(pcVar4 = fgetline((FILE *)__stream), pcVar4 != (char *)0x0)" ( (comma_expression "pcVar4 = fgetline((FILE *)__stream), pcVar4 != (char *)0x0" (assignment_expression "pcVar4 = fgetline((FILE *)__stream)" identifier = (call_expression "fgetline((FILE *)__stream)" identifier (argument_list "((FILE *)__stream)" ( (cast_expression "(FILE *)__stream" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) , (binary_expression "pcVar4 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) )) (compound_statement "{\n        iVar5 = strncmp(pcVar4,pcVar2,sVar3 + 1);\n        if (iVar5 != 0) {\n          fputs(pcVar4,local_28);\n        }\n        safefree(pcVar4);\n      }" { (expression_statement "iVar5 = strncmp(pcVar4,pcVar2,sVar3 + 1);" (assignment_expression "iVar5 = strncmp(pcVar4,pcVar2,sVar3 + 1)" identifier = (call_expression "strncmp(pcVar4,pcVar2,sVar3 + 1)" identifier (argument_list "(pcVar4,pcVar2,sVar3 + 1)" ( identifier , identifier , (binary_expression "sVar3 + 1" identifier + number_literal) )))) ;) (if_statement "if (iVar5 != 0) {\n          fputs(pcVar4,local_28);\n        }" if (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) (compound_statement "{\n          fputs(pcVar4,local_28);\n        }" { (expression_statement "fputs(pcVar4,local_28);" (call_expression "fputs(pcVar4,local_28)" identifier (argument_list "(pcVar4,local_28)" ( identifier , identifier ))) ;) })) (expression_statement "safefree(pcVar4);" (call_expression "safefree(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) })) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier ))) ;) })) (expression_statement "fputs(pcVar2,local_28);" (call_expression "fputs(pcVar2,local_28)" identifier (argument_list "(pcVar2,local_28)" ( identifier , identifier ))) ;) (expression_statement "fclose(local_28);" (call_expression "fclose(local_28)" identifier (argument_list "(local_28)" ( identifier ))) ;) (expression_statement "iVar5 = rename(__filename,pcVar1);" (assignment_expression "iVar5 = rename(__filename,pcVar1)" identifier = (call_expression "rename(__filename,pcVar1)" identifier (argument_list "(__filename,pcVar1)" ( identifier , identifier )))) ;) (if_statement "if (iVar5 < 0) {\n      piVar6 = __errno_location();\n      pcVar4 = strerror(*piVar6);\n      nonfatal("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,pcVar1,\n               pcVar4);\n    }" if (parenthesized_expression "(iVar5 < 0)" ( (binary_expression "iVar5 < 0" identifier < number_literal) )) (compound_statement "{\n      piVar6 = __errno_location();\n      pcVar4 = strerror(*piVar6);\n      nonfatal("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,pcVar1,\n               pcVar4);\n    }" { (expression_statement "piVar6 = __errno_location();" (assignment_expression "piVar6 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar4 = strerror(*piVar6);" (assignment_expression "pcVar4 = strerror(*piVar6)" identifier = (call_expression "strerror(*piVar6)" identifier (argument_list "(*piVar6)" ( (pointer_expression "*piVar6" * identifier) )))) ;) (expression_statement "nonfatal("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,pcVar1,\n               pcVar4);" (call_expression "nonfatal("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,pcVar1,\n               pcVar4)" identifier (argument_list "("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,pcVar1,\n               pcVar4)" ( (string_literal ""Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , identifier , identifier , identifier ))) ;) })) (expression_statement "safefree(__filename);" (call_expression "safefree(__filename)" identifier (argument_list "(__filename)" ( identifier ))) ;) (expression_statement "safefree(pcVar1);" (call_expression "safefree(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) (expression_statement "safefree(pcVar2);" (call_expression "safefree(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "piVar6 = __errno_location();" (assignment_expression "piVar6 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar5 = *piVar6;" (assignment_expression "iVar5 = *piVar6" identifier = (pointer_expression "*piVar6" * identifier)) ;) (if_statement "if (iVar5 == 2) {\n    pcVar1 = make_filename(0,(char *)0x0);\n    pcVar2 = make_dir_path(pcVar1,0x1c0);\n    if (pcVar2 != (char *)0x0) {\n      nonfatal("Unable to store host key: %s",pcVar2);\n      safefree(pcVar2);\n      safefree(pcVar1);\n      safefree(__filename);\n      return;\n    }\n    safefree(pcVar1);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar5 = *piVar6;\n  }" if (parenthesized_expression "(iVar5 == 2)" ( (binary_expression "iVar5 == 2" identifier == number_literal) )) (compound_statement "{\n    pcVar1 = make_filename(0,(char *)0x0);\n    pcVar2 = make_dir_path(pcVar1,0x1c0);\n    if (pcVar2 != (char *)0x0) {\n      nonfatal("Unable to store host key: %s",pcVar2);\n      safefree(pcVar2);\n      safefree(pcVar1);\n      safefree(__filename);\n      return;\n    }\n    safefree(pcVar1);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar5 = *piVar6;\n  }" { (expression_statement "pcVar1 = make_filename(0,(char *)0x0);" (assignment_expression "pcVar1 = make_filename(0,(char *)0x0)" identifier = (call_expression "make_filename(0,(char *)0x0)" identifier (argument_list "(0,(char *)0x0)" ( number_literal , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "pcVar2 = make_dir_path(pcVar1,0x1c0);" (assignment_expression "pcVar2 = make_dir_path(pcVar1,0x1c0)" identifier = (call_expression "make_dir_path(pcVar1,0x1c0)" identifier (argument_list "(pcVar1,0x1c0)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar2 != (char *)0x0) {\n      nonfatal("Unable to store host key: %s",pcVar2);\n      safefree(pcVar2);\n      safefree(pcVar1);\n      safefree(__filename);\n      return;\n    }" if (parenthesized_expression "(pcVar2 != (char *)0x0)" ( (binary_expression "pcVar2 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      nonfatal("Unable to store host key: %s",pcVar2);\n      safefree(pcVar2);\n      safefree(pcVar1);\n      safefree(__filename);\n      return;\n    }" { (expression_statement "nonfatal("Unable to store host key: %s",pcVar2);" (call_expression "nonfatal("Unable to store host key: %s",pcVar2)" identifier (argument_list "("Unable to store host key: %s",pcVar2)" ( (string_literal ""Unable to store host key: %s"" " string_content ") , identifier ))) ;) (expression_statement "safefree(pcVar2);" (call_expression "safefree(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier ))) ;) (expression_statement "safefree(pcVar1);" (call_expression "safefree(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) (expression_statement "safefree(__filename);" (call_expression "safefree(__filename)" identifier (argument_list "(__filename)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "safefree(pcVar1);" (call_expression "safefree(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) (expression_statement "local_28 = fopen64(__filename,"w");" (assignment_expression "local_28 = fopen64(__filename,"w")" identifier = (call_expression "fopen64(__filename,"w")" identifier (argument_list "(__filename,"w")" ( identifier , (string_literal ""w"" " string_content ") )))) ;) (if_statement "if (local_28 != (FILE *)0x0) goto LAB_0006cd91;" if (parenthesized_expression "(local_28 != (FILE *)0x0)" ( (binary_expression "local_28 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0006cd91;" goto statement_identifier ;)) (expression_statement "iVar5 = *piVar6;" (assignment_expression "iVar5 = *piVar6" identifier = (pointer_expression "*piVar6" * identifier)) ;) })) (expression_statement "pcVar1 = strerror(iVar5);" (assignment_expression "pcVar1 = strerror(iVar5)" identifier = (call_expression "strerror(iVar5)" identifier (argument_list "(iVar5)" ( identifier )))) ;) (expression_statement "nonfatal("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);" (call_expression "nonfatal("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1)" identifier (argument_list "("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1)" ( (string_literal ""Unable to store host key: open(\"%s\") returned \'%s\'"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "safefree(__filename);" (call_expression "safefree(__filename)" identifier (argument_list "(__filename)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0006cd50(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  char *__filename;\n  char *pcVar1;\n  FILE *__stream;\n  char *__s;\n  size_t sVar2;\n  char *pcVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  FILE *local_28;\n  \n  __filename = (char *)FUN_0006b890();\n  local_28 = fopen64(__filename,"w");\n  if (local_28 != (FILE *)0x0) {\nLAB_0006cd91:\n    pcVar1 = (char *)FUN_0006b890();\n    __stream = fopen64(pcVar1,"r");\n    __s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);\n    if (__stream != (FILE *)0x0) {\n      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\n    }\n    fputs(__s,local_28);\n    fclose(local_28);\n    iVar4 = rename(__filename,pcVar1);\n    if (iVar4 < 0) {\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }\n    FUN_0001b240(__filename);\n    FUN_0001b240(pcVar1);\n    FUN_0001b240(__s);\n    return;\n  }\n  piVar5 = __errno_location();\n  iVar4 = *piVar5;\n  if (iVar4 == 2) {\n    uVar6 = FUN_0006b890();\n    iVar4 = FUN_000661c0(uVar6,0x1c0);\n    if (iVar4 != 0) {\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }\n    FUN_0001b240(uVar6);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar4 = *piVar5;\n  }\n  pcVar1 = strerror(iVar4);\n  FUN_00020bd0("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);\n  FUN_0001b240(__filename);\n  return;\n}\n\n" (function_definition "void FUN_0006cd50(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  char *__filename;\n  char *pcVar1;\n  FILE *__stream;\n  char *__s;\n  size_t sVar2;\n  char *pcVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  FILE *local_28;\n  \n  __filename = (char *)FUN_0006b890();\n  local_28 = fopen64(__filename,"w");\n  if (local_28 != (FILE *)0x0) {\nLAB_0006cd91:\n    pcVar1 = (char *)FUN_0006b890();\n    __stream = fopen64(pcVar1,"r");\n    __s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);\n    if (__stream != (FILE *)0x0) {\n      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\n    }\n    fputs(__s,local_28);\n    fclose(local_28);\n    iVar4 = rename(__filename,pcVar1);\n    if (iVar4 < 0) {\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }\n    FUN_0001b240(__filename);\n    FUN_0001b240(pcVar1);\n    FUN_0001b240(__s);\n    return;\n  }\n  piVar5 = __errno_location();\n  iVar4 = *piVar5;\n  if (iVar4 == 2) {\n    uVar6 = FUN_0006b890();\n    iVar4 = FUN_000661c0(uVar6,0x1c0);\n    if (iVar4 != 0) {\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }\n    FUN_0001b240(uVar6);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar4 = *piVar5;\n  }\n  pcVar1 = strerror(iVar4);\n  FUN_00020bd0("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);\n  FUN_0001b240(__filename);\n  return;\n}" primitive_type (function_declarator "FUN_0006cd50(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 identifier) ))) (compound_statement "{\n  char *__filename;\n  char *pcVar1;\n  FILE *__stream;\n  char *__s;\n  size_t sVar2;\n  char *pcVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  FILE *local_28;\n  \n  __filename = (char *)FUN_0006b890();\n  local_28 = fopen64(__filename,"w");\n  if (local_28 != (FILE *)0x0) {\nLAB_0006cd91:\n    pcVar1 = (char *)FUN_0006b890();\n    __stream = fopen64(pcVar1,"r");\n    __s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);\n    if (__stream != (FILE *)0x0) {\n      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\n    }\n    fputs(__s,local_28);\n    fclose(local_28);\n    iVar4 = rename(__filename,pcVar1);\n    if (iVar4 < 0) {\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }\n    FUN_0001b240(__filename);\n    FUN_0001b240(pcVar1);\n    FUN_0001b240(__s);\n    return;\n  }\n  piVar5 = __errno_location();\n  iVar4 = *piVar5;\n  if (iVar4 == 2) {\n    uVar6 = FUN_0006b890();\n    iVar4 = FUN_000661c0(uVar6,0x1c0);\n    if (iVar4 != 0) {\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }\n    FUN_0001b240(uVar6);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar4 = *piVar5;\n  }\n  pcVar1 = strerror(iVar4);\n  FUN_00020bd0("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);\n  FUN_0001b240(__filename);\n  return;\n}" { (declaration "char *__filename;" primitive_type (pointer_declarator "*__filename" * identifier) ;) (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "FILE *local_28;" type_identifier (pointer_declarator "*local_28" * identifier) ;) (expression_statement "__filename = (char *)FUN_0006b890();" (assignment_expression "__filename = (char *)FUN_0006b890()" identifier = (cast_expression "(char *)FUN_0006b890()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0006b890()" identifier (argument_list "()" ( ))))) ;) (expression_statement "local_28 = fopen64(__filename,"w");" (assignment_expression "local_28 = fopen64(__filename,"w")" identifier = (call_expression "fopen64(__filename,"w")" identifier (argument_list "(__filename,"w")" ( identifier , (string_literal ""w"" " string_content ") )))) ;) (if_statement "if (local_28 != (FILE *)0x0) {\nLAB_0006cd91:\n    pcVar1 = (char *)FUN_0006b890();\n    __stream = fopen64(pcVar1,"r");\n    __s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);\n    if (__stream != (FILE *)0x0) {\n      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\n    }\n    fputs(__s,local_28);\n    fclose(local_28);\n    iVar4 = rename(__filename,pcVar1);\n    if (iVar4 < 0) {\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }\n    FUN_0001b240(__filename);\n    FUN_0001b240(pcVar1);\n    FUN_0001b240(__s);\n    return;\n  }" if (parenthesized_expression "(local_28 != (FILE *)0x0)" ( (binary_expression "local_28 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_0006cd91:\n    pcVar1 = (char *)FUN_0006b890();\n    __stream = fopen64(pcVar1,"r");\n    __s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);\n    if (__stream != (FILE *)0x0) {\n      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\n    }\n    fputs(__s,local_28);\n    fclose(local_28);\n    iVar4 = rename(__filename,pcVar1);\n    if (iVar4 < 0) {\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }\n    FUN_0001b240(__filename);\n    FUN_0001b240(pcVar1);\n    FUN_0001b240(__s);\n    return;\n  }" { (labeled_statement "LAB_0006cd91:\n    pcVar1 = (char *)FUN_0006b890();" statement_identifier : (expression_statement "pcVar1 = (char *)FUN_0006b890();" (assignment_expression "pcVar1 = (char *)FUN_0006b890()" identifier = (cast_expression "(char *)FUN_0006b890()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0006b890()" identifier (argument_list "()" ( ))))) ;)) (expression_statement "__stream = fopen64(pcVar1,"r");" (assignment_expression "__stream = fopen64(pcVar1,"r")" identifier = (call_expression "fopen64(pcVar1,"r")" identifier (argument_list "(pcVar1,"r")" ( identifier , (string_literal ""r"" " string_content ") )))) ;) (expression_statement "__s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);" (assignment_expression "__s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4)" identifier = (cast_expression "(char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4)" identifier (argument_list "("%s@%d:%s %s\n",param_3,param_2,param_1,param_4)" ( (string_literal ""%s@%d:%s %s\n"" " string_content escape_sequence ") , identifier , identifier , identifier , identifier ))))) ;) (if_statement "if (__stream != (FILE *)0x0) {\n      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\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      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\n    }" { (expression_statement "sVar2 = strcspn(__s," ");" (assignment_expression "sVar2 = strcspn(__s," ")" identifier = (call_expression "strcspn(__s," ")" identifier (argument_list "(__s," ")" ( identifier , (string_literal "" "" " string_content ") )))) ;) (while_statement "while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }" while (parenthesized_expression "(pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0)" ( (comma_expression "pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0" (assignment_expression "pcVar3 = (char *)FUN_0001b190(__stream)" identifier = (cast_expression "(char *)FUN_0001b190(__stream)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001b190(__stream)" identifier (argument_list "(__stream)" ( identifier ))))) , (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) )) (compound_statement "{\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }" { (expression_statement "iVar4 = strncmp(pcVar3,__s,sVar2 + 1);" (assignment_expression "iVar4 = strncmp(pcVar3,__s,sVar2 + 1)" identifier = (call_expression "strncmp(pcVar3,__s,sVar2 + 1)" identifier (argument_list "(pcVar3,__s,sVar2 + 1)" ( identifier , identifier , (binary_expression "sVar2 + 1" identifier + number_literal) )))) ;) (if_statement "if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n          fputs(pcVar3,local_28);\n        }" { (expression_statement "fputs(pcVar3,local_28);" (call_expression "fputs(pcVar3,local_28)" identifier (argument_list "(pcVar3,local_28)" ( identifier , identifier ))) ;) })) (expression_statement "FUN_0001b240(pcVar3);" (call_expression "FUN_0001b240(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier ))) ;) })) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier ))) ;) })) (expression_statement "fputs(__s,local_28);" (call_expression "fputs(__s,local_28)" identifier (argument_list "(__s,local_28)" ( identifier , identifier ))) ;) (expression_statement "fclose(local_28);" (call_expression "fclose(local_28)" identifier (argument_list "(local_28)" ( identifier ))) ;) (expression_statement "iVar4 = rename(__filename,pcVar1);" (assignment_expression "iVar4 = rename(__filename,pcVar1)" identifier = (call_expression "rename(__filename,pcVar1)" identifier (argument_list "(__filename,pcVar1)" ( identifier , identifier )))) ;) (if_statement "if (iVar4 < 0) {\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }" if (parenthesized_expression "(iVar4 < 0)" ( (binary_expression "iVar4 < 0" identifier < number_literal) )) (compound_statement "{\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }" { (expression_statement "piVar5 = __errno_location();" (assignment_expression "piVar5 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar3 = strerror(*piVar5);" (assignment_expression "pcVar3 = strerror(*piVar5)" identifier = (call_expression "strerror(*piVar5)" identifier (argument_list "(*piVar5)" ( (pointer_expression "*piVar5" * identifier) )))) ;) (expression_statement "FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);" (call_expression "FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3)" identifier (argument_list "("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3)" ( (string_literal ""Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , identifier , identifier , identifier ))) ;) })) (expression_statement "FUN_0001b240(__filename);" (call_expression "FUN_0001b240(__filename)" identifier (argument_list "(__filename)" ( identifier ))) ;) (expression_statement "FUN_0001b240(pcVar1);" (call_expression "FUN_0001b240(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) (expression_statement "FUN_0001b240(__s);" (call_expression "FUN_0001b240(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "piVar5 = __errno_location();" (assignment_expression "piVar5 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar4 = *piVar5;" (assignment_expression "iVar4 = *piVar5" identifier = (pointer_expression "*piVar5" * identifier)) ;) (if_statement "if (iVar4 == 2) {\n    uVar6 = FUN_0006b890();\n    iVar4 = FUN_000661c0(uVar6,0x1c0);\n    if (iVar4 != 0) {\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }\n    FUN_0001b240(uVar6);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar4 = *piVar5;\n  }" if (parenthesized_expression "(iVar4 == 2)" ( (binary_expression "iVar4 == 2" identifier == number_literal) )) (compound_statement "{\n    uVar6 = FUN_0006b890();\n    iVar4 = FUN_000661c0(uVar6,0x1c0);\n    if (iVar4 != 0) {\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }\n    FUN_0001b240(uVar6);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar4 = *piVar5;\n  }" { (expression_statement "uVar6 = FUN_0006b890();" (assignment_expression "uVar6 = FUN_0006b890()" identifier = (call_expression "FUN_0006b890()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar4 = FUN_000661c0(uVar6,0x1c0);" (assignment_expression "iVar4 = FUN_000661c0(uVar6,0x1c0)" identifier = (call_expression "FUN_000661c0(uVar6,0x1c0)" identifier (argument_list "(uVar6,0x1c0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar4 != 0) {\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }" { (expression_statement "FUN_00020bd0("Unable to store host key: %s",iVar4);" (call_expression "FUN_00020bd0("Unable to store host key: %s",iVar4)" identifier (argument_list "("Unable to store host key: %s",iVar4)" ( (string_literal ""Unable to store host key: %s"" " string_content ") , identifier ))) ;) (expression_statement "FUN_0001b240(iVar4);" (call_expression "FUN_0001b240(iVar4)" identifier (argument_list "(iVar4)" ( identifier ))) ;) (expression_statement "FUN_0001b240(uVar6);" (call_expression "FUN_0001b240(uVar6)" identifier (argument_list "(uVar6)" ( identifier ))) ;) (expression_statement "FUN_0001b240(__filename);" (call_expression "FUN_0001b240(__filename)" identifier (argument_list "(__filename)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_0001b240(uVar6);" (call_expression "FUN_0001b240(uVar6)" identifier (argument_list "(uVar6)" ( identifier ))) ;) (expression_statement "local_28 = fopen64(__filename,"w");" (assignment_expression "local_28 = fopen64(__filename,"w")" identifier = (call_expression "fopen64(__filename,"w")" identifier (argument_list "(__filename,"w")" ( identifier , (string_literal ""w"" " string_content ") )))) ;) (if_statement "if (local_28 != (FILE *)0x0) goto LAB_0006cd91;" if (parenthesized_expression "(local_28 != (FILE *)0x0)" ( (binary_expression "local_28 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0006cd91;" goto statement_identifier ;)) (expression_statement "iVar4 = *piVar5;" (assignment_expression "iVar4 = *piVar5" identifier = (pointer_expression "*piVar5" * identifier)) ;) })) (expression_statement "pcVar1 = strerror(iVar4);" (assignment_expression "pcVar1 = strerror(iVar4)" identifier = (call_expression "strerror(iVar4)" identifier (argument_list "(iVar4)" ( identifier )))) ;) (expression_statement "FUN_00020bd0("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);" (call_expression "FUN_00020bd0("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1)" identifier (argument_list "("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1)" ( (string_literal ""Unable to store host key: open(\"%s\") returned \'%s\'"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "FUN_0001b240(__filename);" (call_expression "FUN_0001b240(__filename)" identifier (argument_list "(__filename)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(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 IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , IDENT , IDENT , IDENT , IDENT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (while_statement while (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT ))))) , (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , IDENT , IDENT , IDENT ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0006cd50(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  char *__filename;\n  char *pcVar1;\n  FILE *__stream;\n  char *__s;\n  size_t sVar2;\n  char *pcVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  FILE *local_28;\n  \n  __filename = (char *)FUN_0006b890();\n  local_28 = fopen64(__filename,"w");\n  if (local_28 != (FILE *)0x0) {\nLAB_0006cd91:\n    pcVar1 = (char *)FUN_0006b890();\n    __stream = fopen64(pcVar1,"r");\n    __s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);\n    if (__stream != (FILE *)0x0) {\n      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\n    }\n    fputs(__s,local_28);\n    fclose(local_28);\n    iVar4 = rename(__filename,pcVar1);\n    if (iVar4 < 0) {\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }\n    FUN_0001b240(__filename);\n    FUN_0001b240(pcVar1);\n    FUN_0001b240(__s);\n    return;\n  }\n  piVar5 = __errno_location();\n  iVar4 = *piVar5;\n  if (iVar4 == 2) {\n    uVar6 = FUN_0006b890();\n    iVar4 = FUN_000661c0(uVar6,0x1c0);\n    if (iVar4 != 0) {\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }\n    FUN_0001b240(uVar6);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar4 = *piVar5;\n  }\n  pcVar1 = strerror(iVar4);\n  FUN_00020bd0("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);\n  FUN_0001b240(__filename);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0006cd50(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" (identifier "FUN_0006cd50") (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") (identifier "param_4")) () ")"))) (compound_statement "{\n  char *__filename;\n  char *pcVar1;\n  FILE *__stream;\n  char *__s;\n  size_t sVar2;\n  char *pcVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  FILE *local_28;\n  \n  __filename = (char *)FUN_0006b890();\n  local_28 = fopen64(__filename,"w");\n  if (local_28 != (FILE *)0x0) {\nLAB_0006cd91:\n    pcVar1 = (char *)FUN_0006b890();\n    __stream = fopen64(pcVar1,"r");\n    __s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);\n    if (__stream != (FILE *)0x0) {\n      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\n    }\n    fputs(__s,local_28);\n    fclose(local_28);\n    iVar4 = rename(__filename,pcVar1);\n    if (iVar4 < 0) {\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }\n    FUN_0001b240(__filename);\n    FUN_0001b240(pcVar1);\n    FUN_0001b240(__s);\n    return;\n  }\n  piVar5 = __errno_location();\n  iVar4 = *piVar5;\n  if (iVar4 == 2) {\n    uVar6 = FUN_0006b890();\n    iVar4 = FUN_000661c0(uVar6,0x1c0);\n    if (iVar4 != 0) {\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }\n    FUN_0001b240(uVar6);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar4 = *piVar5;\n  }\n  pcVar1 = strerror(iVar4);\n  FUN_00020bd0("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);\n  FUN_0001b240(__filename);\n  return;\n}" ({ "{") (declaration "char *__filename;" (primitive_type "char") (pointer_declarator "*__filename" (* "*") (identifier "__filename")) (; ";")) (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "FILE *__stream;" (type_identifier "FILE") (pointer_declarator "*__stream" (* "*") (identifier "__stream")) (; ";")) (declaration "char *__s;" (primitive_type "char") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "char *pcVar3;" (primitive_type "char") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int *piVar5;" (primitive_type "int") (pointer_declarator "*piVar5" (* "*") (identifier "piVar5")) (; ";")) (declaration "undefined4 uVar6;" (type_identifier "undefined4") (identifier "uVar6") (; ";")) (declaration "FILE *local_28;" (type_identifier "FILE") (pointer_declarator "*local_28" (* "*") (identifier "local_28")) (; ";")) (expression_statement "__filename = (char *)FUN_0006b890();" (assignment_expression "__filename = (char *)FUN_0006b890()" (identifier "__filename") (= "=") (cast_expression "(char *)FUN_0006b890()" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0006b890()" (identifier "FUN_0006b890") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "local_28 = fopen64(__filename,"w");" (assignment_expression "local_28 = fopen64(__filename,"w")" (identifier "local_28") (= "=") (call_expression "fopen64(__filename,"w")" (identifier "fopen64") (argument_list "(__filename,"w")" (( "(") (identifier "__filename") (, ",") (string_literal ""w"" (" """) (string_content "w") (" """)) () ")")))) (; ";")) (if_statement "if (local_28 != (FILE *)0x0) {\nLAB_0006cd91:\n    pcVar1 = (char *)FUN_0006b890();\n    __stream = fopen64(pcVar1,"r");\n    __s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);\n    if (__stream != (FILE *)0x0) {\n      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\n    }\n    fputs(__s,local_28);\n    fclose(local_28);\n    iVar4 = rename(__filename,pcVar1);\n    if (iVar4 < 0) {\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }\n    FUN_0001b240(__filename);\n    FUN_0001b240(pcVar1);\n    FUN_0001b240(__s);\n    return;\n  }" (if "if") (parenthesized_expression "(local_28 != (FILE *)0x0)" (( "(") (binary_expression "local_28 != (FILE *)0x0" (identifier "local_28") (!= "!=") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\nLAB_0006cd91:\n    pcVar1 = (char *)FUN_0006b890();\n    __stream = fopen64(pcVar1,"r");\n    __s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);\n    if (__stream != (FILE *)0x0) {\n      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\n    }\n    fputs(__s,local_28);\n    fclose(local_28);\n    iVar4 = rename(__filename,pcVar1);\n    if (iVar4 < 0) {\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }\n    FUN_0001b240(__filename);\n    FUN_0001b240(pcVar1);\n    FUN_0001b240(__s);\n    return;\n  }" ({ "{") (labeled_statement "LAB_0006cd91:\n    pcVar1 = (char *)FUN_0006b890();" (statement_identifier "LAB_0006cd91") (: ":") (expression_statement "pcVar1 = (char *)FUN_0006b890();" (assignment_expression "pcVar1 = (char *)FUN_0006b890()" (identifier "pcVar1") (= "=") (cast_expression "(char *)FUN_0006b890()" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0006b890()" (identifier "FUN_0006b890") (argument_list "()" (( "(") () ")"))))) (; ";"))) (expression_statement "__stream = fopen64(pcVar1,"r");" (assignment_expression "__stream = fopen64(pcVar1,"r")" (identifier "__stream") (= "=") (call_expression "fopen64(pcVar1,"r")" (identifier "fopen64") (argument_list "(pcVar1,"r")" (( "(") (identifier "pcVar1") (, ",") (string_literal ""r"" (" """) (string_content "r") (" """)) () ")")))) (; ";")) (expression_statement "__s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);" (assignment_expression "__s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4)" (identifier "__s") (= "=") (cast_expression "(char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4)" (identifier "FUN_0001b020") (argument_list "("%s@%d:%s %s\n",param_3,param_2,param_1,param_4)" (( "(") (string_literal ""%s@%d:%s %s\n"" (" """) (string_content "%s@%d:%s %s") (escape_sequence "\n") (" """)) (, ",") (identifier "param_3") (, ",") (identifier "param_2") (, ",") (identifier "param_1") (, ",") (identifier "param_4") () ")"))))) (; ";")) (if_statement "if (__stream != (FILE *)0x0) {\n      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\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      sVar2 = strcspn(__s," ");\n      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }\n      fclose(__stream);\n    }" ({ "{") (expression_statement "sVar2 = strcspn(__s," ");" (assignment_expression "sVar2 = strcspn(__s," ")" (identifier "sVar2") (= "=") (call_expression "strcspn(__s," ")" (identifier "strcspn") (argument_list "(__s," ")" (( "(") (identifier "__s") (, ",") (string_literal "" "" (" """) (string_content " ") (" """)) () ")")))) (; ";")) (while_statement "while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }" (while "while") (parenthesized_expression "(pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0)" (( "(") (comma_expression "pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0" (assignment_expression "pcVar3 = (char *)FUN_0001b190(__stream)" (identifier "pcVar3") (= "=") (cast_expression "(char *)FUN_0001b190(__stream)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001b190(__stream)" (identifier "FUN_0001b190") (argument_list "(__stream)" (( "(") (identifier "__stream") () ")"))))) (, ",") (binary_expression "pcVar3 != (char *)0x0" (identifier "pcVar3") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")))) () ")")) (compound_statement "{\n        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);\n        if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }\n        FUN_0001b240(pcVar3);\n      }" ({ "{") (expression_statement "iVar4 = strncmp(pcVar3,__s,sVar2 + 1);" (assignment_expression "iVar4 = strncmp(pcVar3,__s,sVar2 + 1)" (identifier "iVar4") (= "=") (call_expression "strncmp(pcVar3,__s,sVar2 + 1)" (identifier "strncmp") (argument_list "(pcVar3,__s,sVar2 + 1)" (( "(") (identifier "pcVar3") (, ",") (identifier "__s") (, ",") (binary_expression "sVar2 + 1" (identifier "sVar2") (+ "+") (number_literal "1")) () ")")))) (; ";")) (if_statement "if (iVar4 != 0) {\n          fputs(pcVar3,local_28);\n        }" (if "if") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          fputs(pcVar3,local_28);\n        }" ({ "{") (expression_statement "fputs(pcVar3,local_28);" (call_expression "fputs(pcVar3,local_28)" (identifier "fputs") (argument_list "(pcVar3,local_28)" (( "(") (identifier "pcVar3") (, ",") (identifier "local_28") () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_0001b240(pcVar3);" (call_expression "FUN_0001b240(pcVar3)" (identifier "FUN_0001b240") (argument_list "(pcVar3)" (( "(") (identifier "pcVar3") () ")"))) (; ";")) (} "}"))) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" (identifier "fclose") (argument_list "(__stream)" (( "(") (identifier "__stream") () ")"))) (; ";")) (} "}"))) (expression_statement "fputs(__s,local_28);" (call_expression "fputs(__s,local_28)" (identifier "fputs") (argument_list "(__s,local_28)" (( "(") (identifier "__s") (, ",") (identifier "local_28") () ")"))) (; ";")) (expression_statement "fclose(local_28);" (call_expression "fclose(local_28)" (identifier "fclose") (argument_list "(local_28)" (( "(") (identifier "local_28") () ")"))) (; ";")) (expression_statement "iVar4 = rename(__filename,pcVar1);" (assignment_expression "iVar4 = rename(__filename,pcVar1)" (identifier "iVar4") (= "=") (call_expression "rename(__filename,pcVar1)" (identifier "rename") (argument_list "(__filename,pcVar1)" (( "(") (identifier "__filename") (, ",") (identifier "pcVar1") () ")")))) (; ";")) (if_statement "if (iVar4 < 0) {\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }" (if "if") (parenthesized_expression "(iVar4 < 0)" (( "(") (binary_expression "iVar4 < 0" (identifier "iVar4") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      piVar5 = __errno_location();\n      pcVar3 = strerror(*piVar5);\n      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);\n    }" ({ "{") (expression_statement "piVar5 = __errno_location();" (assignment_expression "piVar5 = __errno_location()" (identifier "piVar5") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pcVar3 = strerror(*piVar5);" (assignment_expression "pcVar3 = strerror(*piVar5)" (identifier "pcVar3") (= "=") (call_expression "strerror(*piVar5)" (identifier "strerror") (argument_list "(*piVar5)" (( "(") (pointer_expression "*piVar5" (* "*") (identifier "piVar5")) () ")")))) (; ";")) (expression_statement "FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3);" (call_expression "FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3)" (identifier "FUN_00020bd0") (argument_list "("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,\n                   pcVar1,pcVar3)" (( "(") (string_literal ""Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'"" (" """) (string_content "Unable to store host key: rename(") (escape_sequence "\"") (string_content "%s") (escape_sequence "\"") (string_content ",") (escape_sequence "\"") (string_content "%s") (escape_sequence "\"") (string_content ") returned ") (escape_sequence "\'") (string_content "%s") (escape_sequence "\'") (" """)) (, ",") (identifier "__filename") (, ",") (identifier "pcVar1") (, ",") (identifier "pcVar3") () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_0001b240(__filename);" (call_expression "FUN_0001b240(__filename)" (identifier "FUN_0001b240") (argument_list "(__filename)" (( "(") (identifier "__filename") () ")"))) (; ";")) (expression_statement "FUN_0001b240(pcVar1);" (call_expression "FUN_0001b240(pcVar1)" (identifier "FUN_0001b240") (argument_list "(pcVar1)" (( "(") (identifier "pcVar1") () ")"))) (; ";")) (expression_statement "FUN_0001b240(__s);" (call_expression "FUN_0001b240(__s)" (identifier "FUN_0001b240") (argument_list "(__s)" (( "(") (identifier "__s") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "piVar5 = __errno_location();" (assignment_expression "piVar5 = __errno_location()" (identifier "piVar5") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar4 = *piVar5;" (assignment_expression "iVar4 = *piVar5" (identifier "iVar4") (= "=") (pointer_expression "*piVar5" (* "*") (identifier "piVar5"))) (; ";")) (if_statement "if (iVar4 == 2) {\n    uVar6 = FUN_0006b890();\n    iVar4 = FUN_000661c0(uVar6,0x1c0);\n    if (iVar4 != 0) {\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }\n    FUN_0001b240(uVar6);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar4 = *piVar5;\n  }" (if "if") (parenthesized_expression "(iVar4 == 2)" (( "(") (binary_expression "iVar4 == 2" (identifier "iVar4") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n    uVar6 = FUN_0006b890();\n    iVar4 = FUN_000661c0(uVar6,0x1c0);\n    if (iVar4 != 0) {\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }\n    FUN_0001b240(uVar6);\n    local_28 = fopen64(__filename,"w");\n    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;\n    iVar4 = *piVar5;\n  }" ({ "{") (expression_statement "uVar6 = FUN_0006b890();" (assignment_expression "uVar6 = FUN_0006b890()" (identifier "uVar6") (= "=") (call_expression "FUN_0006b890()" (identifier "FUN_0006b890") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar4 = FUN_000661c0(uVar6,0x1c0);" (assignment_expression "iVar4 = FUN_000661c0(uVar6,0x1c0)" (identifier "iVar4") (= "=") (call_expression "FUN_000661c0(uVar6,0x1c0)" (identifier "FUN_000661c0") (argument_list "(uVar6,0x1c0)" (( "(") (identifier "uVar6") (, ",") (number_literal "0x1c0") () ")")))) (; ";")) (if_statement "if (iVar4 != 0) {\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }" (if "if") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_00020bd0("Unable to store host key: %s",iVar4);\n      FUN_0001b240(iVar4);\n      FUN_0001b240(uVar6);\n      FUN_0001b240(__filename);\n      return;\n    }" ({ "{") (expression_statement "FUN_00020bd0("Unable to store host key: %s",iVar4);" (call_expression "FUN_00020bd0("Unable to store host key: %s",iVar4)" (identifier "FUN_00020bd0") (argument_list "("Unable to store host key: %s",iVar4)" (( "(") (string_literal ""Unable to store host key: %s"" (" """) (string_content "Unable to store host key: %s") (" """)) (, ",") (identifier "iVar4") () ")"))) (; ";")) (expression_statement "FUN_0001b240(iVar4);" (call_expression "FUN_0001b240(iVar4)" (identifier "FUN_0001b240") (argument_list "(iVar4)" (( "(") (identifier "iVar4") () ")"))) (; ";")) (expression_statement "FUN_0001b240(uVar6);" (call_expression "FUN_0001b240(uVar6)" (identifier "FUN_0001b240") (argument_list "(uVar6)" (( "(") (identifier "uVar6") () ")"))) (; ";")) (expression_statement "FUN_0001b240(__filename);" (call_expression "FUN_0001b240(__filename)" (identifier "FUN_0001b240") (argument_list "(__filename)" (( "(") (identifier "__filename") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0001b240(uVar6);" (call_expression "FUN_0001b240(uVar6)" (identifier "FUN_0001b240") (argument_list "(uVar6)" (( "(") (identifier "uVar6") () ")"))) (; ";")) (expression_statement "local_28 = fopen64(__filename,"w");" (assignment_expression "local_28 = fopen64(__filename,"w")" (identifier "local_28") (= "=") (call_expression "fopen64(__filename,"w")" (identifier "fopen64") (argument_list "(__filename,"w")" (( "(") (identifier "__filename") (, ",") (string_literal ""w"" (" """) (string_content "w") (" """)) () ")")))) (; ";")) (if_statement "if (local_28 != (FILE *)0x0) goto LAB_0006cd91;" (if "if") (parenthesized_expression "(local_28 != (FILE *)0x0)" (( "(") (binary_expression "local_28 != (FILE *)0x0" (identifier "local_28") (!= "!=") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_0006cd91;" (goto "goto") (statement_identifier "LAB_0006cd91") (; ";"))) (expression_statement "iVar4 = *piVar5;" (assignment_expression "iVar4 = *piVar5" (identifier "iVar4") (= "=") (pointer_expression "*piVar5" (* "*") (identifier "piVar5"))) (; ";")) (} "}"))) (expression_statement "pcVar1 = strerror(iVar4);" (assignment_expression "pcVar1 = strerror(iVar4)" (identifier "pcVar1") (= "=") (call_expression "strerror(iVar4)" (identifier "strerror") (argument_list "(iVar4)" (( "(") (identifier "iVar4") () ")")))) (; ";")) (expression_statement "FUN_00020bd0("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);" (call_expression "FUN_00020bd0("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1)" (identifier "FUN_00020bd0") (argument_list "("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1)" (( "(") (string_literal ""Unable to store host key: open(\"%s\") returned \'%s\'"" (" """) (string_content "Unable to store host key: open(") (escape_sequence "\"") (string_content "%s") (escape_sequence "\"") (string_content ") returned ") (escape_sequence "\'") (string_content "%s") (escape_sequence "\'") (" """)) (, ",") (identifier "__filename") (, ",") (identifier "pcVar1") () ")"))) (; ";")) (expression_statement "FUN_0001b240(__filename);" (call_expression "FUN_0001b240(__filename)" (identifier "FUN_0001b240") (argument_list "(__filename)" (( "(") (identifier "__filename") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(char *hostname,int port,char *keytype,char *key)

{
  char *__filename;
  char *pcVar1;
  type_1 *var_5;
  char *var_20;
  size_t var_10;
  char *var_8;
  int var_11;
  int *piVar6;
  type_1 *var_3;
  
  __filename = var_1(2,(char *)0x0);
  var_3 = var_2(__filename,"w");
  if (var_3 != (type_1 *)0x0) {
LAB_0006cd91:
    pcVar1 = var_1(1,(char *)0x0);
    var_5 = var_2(pcVar1,"r");
    var_20 = var_4("%s@%d:%s %s\n",keytype,port,hostname,key);
    if (var_5 != (type_1 *)0x0) {
      var_10 = var_6(var_20," ");
      while (var_8 = var_7((type_1 *)var_5), var_8 != (char *)0x0) {
        var_11 = var_9(var_8,var_20,var_10 + 1);
        if (var_11 != 0) {
          var_12(var_8,var_3);
        }
        var_13(var_8);
      }
      var_14(var_5);
    }
    var_12(var_20,var_3);
    var_14(var_3);
    var_11 = var_15(__filename,pcVar1);
    if (var_11 < 0) {
      piVar6 = var_16();
      var_8 = var_17(*piVar6);
      var_18("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,pcVar1,
               var_8);
    }
    var_13(__filename);
    var_13(pcVar1);
    var_13(var_20);
    return;
  }
  piVar6 = var_16();
  var_11 = *piVar6;
  if (var_11 == 2) {
    pcVar1 = var_1(0,(char *)0x0);
    var_20 = var_19(pcVar1,0x1c0);
    if (var_20 != (char *)0x0) {
      var_18("Unable to store host key: %s",var_20);
      var_13(var_20);
      var_13(pcVar1);
      var_13(__filename);
      return;
    }
    var_13(pcVar1);
    var_3 = var_2(__filename,"w");
    if (var_3 != (type_1 *)0x0) goto LAB_0006cd91;
    var_11 = *piVar6;
  }
  pcVar1 = var_17(var_11);
  var_18("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);
  var_13(__filename);
  return;
}


(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: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (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: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))) (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 (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence)) (identifier) (identifier) (identifier) (identifier)))))) (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: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))) (while_statement condition: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier))))) right: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence)) (identifier) (identifier) (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))) (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: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence)) (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))))

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

void MASKED(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)

{
  char *__filename;
  char *pcVar1;
  FILE *__stream;
  char *__s;
  size_t sVar2;
  char *pcVar3;
  int iVar4;
  int *piVar5;
  undefined4 uVar6;
  FILE *local_28;
  
  __filename = (char *)FUN_0006b890();
  local_28 = fopen64(__filename,"w");
  if (local_28 != (FILE *)0x0) {
LAB_0006cd91:
    pcVar1 = (char *)FUN_0006b890();
    __stream = fopen64(pcVar1,"r");
    __s = (char *)FUN_0001b020("%s@%d:%s %s\n",param_3,param_2,param_1,param_4);
    if (__stream != (FILE *)0x0) {
      sVar2 = strcspn(__s," ");
      while (pcVar3 = (char *)FUN_0001b190(__stream), pcVar3 != (char *)0x0) {
        iVar4 = strncmp(pcVar3,__s,sVar2 + 1);
        if (iVar4 != 0) {
          fputs(pcVar3,local_28);
        }
        FUN_0001b240(pcVar3);
      }
      fclose(__stream);
    }
    fputs(__s,local_28);
    fclose(local_28);
    iVar4 = rename(__filename,pcVar1);
    if (iVar4 < 0) {
      piVar5 = __errno_location();
      pcVar3 = strerror(*piVar5);
      FUN_00020bd0("Unable to store host key: rename(\"%s\",\"%s\") returned \'%s\'",__filename,
                   pcVar1,pcVar3);
    }
    FUN_0001b240(__filename);
    FUN_0001b240(pcVar1);
    FUN_0001b240(__s);
    return;
  }
  piVar5 = __errno_location();
  iVar4 = *piVar5;
  if (iVar4 == 2) {
    uVar6 = FUN_0006b890();
    iVar4 = FUN_000661c0(uVar6,0x1c0);
    if (iVar4 != 0) {
      FUN_00020bd0("Unable to store host key: %s",iVar4);
      FUN_0001b240(iVar4);
      FUN_0001b240(uVar6);
      FUN_0001b240(__filename);
      return;
    }
    FUN_0001b240(uVar6);
    local_28 = fopen64(__filename,"w");
    if (local_28 != (FILE *)0x0) goto LAB_0006cd91;
    iVar4 = *piVar5;
  }
  pcVar1 = strerror(iVar4);
  FUN_00020bd0("Unable to store host key: open(\"%s\") returned \'%s\'",__filename,pcVar1);
  FUN_0001b240(__filename);
  return;
}

