
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void __regparm3 ssh_send_verstring(Ssh_conflict ssh,char *protoname,char *svers)

{
  char *pcVar1;
  size_t sVar2;
  char *pcVar3;
  Ssh_conflict ssh_1;
  int iVar4;
  char cVar5;
  char *pcVar6;
  byte *pbVar7;
  byte *pbVar8;
  bool bVar9;
  bool bVar10;
  
  bVar9 = (uint)ssh->version < 2;
  bVar10 = ssh->version == 2;
  if (bVar10) {
    pcVar1 = dupprintf("%s2.0-%s\r\n",protoname,PTR_sshver_000a9ff0);
  }
  else {
    iVar4 = 5;
    pbVar7 = (byte *)protoname;
    pbVar8 = &DAT_00075c81;
    do {
      if (iVar4 == 0) break;
      iVar4 = iVar4 + -1;
      bVar9 = *pbVar7 < *pbVar8;
      bVar10 = *pbVar7 == *pbVar8;
      pbVar7 = pbVar7 + 1;
      pbVar8 = pbVar8 + 1;
    } while (bVar10);
    if ((!bVar9 && !bVar10) != bVar9) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");
    }
    iVar4 = ssh_versioncmp(svers,"1.5");
    pcVar1 = "1.5";
    if (iVar4 < 1) {
      pcVar1 = svers;
    }
    pcVar1 = dupprintf("SSH-%s-%s\n",pcVar1,PTR_sshver_000a9ff0);
  }
  sVar2 = strlen(protoname);
  pcVar3 = pcVar1 + sVar2;
  cVar5 = *pcVar3;
  if ((cVar5 != '-') && (cVar5 != '\0')) {
    do {
      pcVar3 = pcVar3 + 1;
      cVar5 = *pcVar3;
      if (cVar5 == '\0') break;
    } while (cVar5 != '-');
  }
  if (cVar5 != '-') {
                    /* WARNING: Subroutine does not return */
    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");
  }
  pcVar6 = pcVar3 + 1;
  cVar5 = pcVar3[1];
  while (cVar5 != '\0') {
    while ((cVar5 != '-' && (cVar5 != ' '))) {
      pcVar6 = pcVar6 + 1;
      cVar5 = *pcVar6;
      if (cVar5 == '\0') goto LAB_0002f777;
    }
    *pcVar6 = '_';
    pcVar6 = pcVar6 + 1;
    cVar5 = *pcVar6;
  }
LAB_0002f777:
  sVar2 = strcspn(pcVar1,"\r\n");
  if (ssh->version == 2) {
    pcVar3 = (char *)safemalloc(sVar2 + 1,1);
    ssh->v_c = pcVar3;
    memcpy(pcVar3,pcVar1,sVar2);
    ssh->v_c[sVar2] = '\0';
    sVar2 = strcspn(pcVar1,"\r\n");
  }
  logeventf(ssh,"We claim version: %.*s",sVar2,pcVar1);
  ssh_1 = (Ssh_conflict)strlen(pcVar1);
  s_write((Ssh_conflict)&ssh->s,ssh->logctx,(int)pcVar1,ssh_1);
  safefree(pcVar1);
  return;
}



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

void __regparm3 FUN_0002f690(int param_1,byte *param_2,undefined *param_3)

{
  undefined *puVar1;
  char *__s;
  size_t sVar2;
  char *pcVar3;
  void *__dest;
  int iVar4;
  char cVar5;
  char *pcVar6;
  byte *pbVar7;
  byte *pbVar8;
  bool bVar9;
  bool bVar10;
  
  bVar9 = *(uint *)(param_1 + 0x198) < 2;
  bVar10 = *(uint *)(param_1 + 0x198) == 2;
  if (bVar10) {
    __s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);
  }
  else {
    iVar4 = 5;
    pbVar7 = param_2;
    pbVar8 = &DAT_00075c81;
    do {
      if (iVar4 == 0) break;
      iVar4 = iVar4 + -1;
      bVar9 = *pbVar7 < *pbVar8;
      bVar10 = *pbVar7 == *pbVar8;
      pbVar7 = pbVar7 + 1;
      pbVar8 = pbVar8 + 1;
    } while (bVar10);
    if ((!bVar9 && !bVar10) != bVar9) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");
    }
    iVar4 = FUN_0002d650();
    puVar1 = &DAT_0007017d;
    if (iVar4 < 1) {
      puVar1 = param_3;
    }
    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);
  }
  sVar2 = strlen((char *)param_2);
  pcVar3 = __s + sVar2;
  cVar5 = *pcVar3;
  if ((cVar5 != '-') && (cVar5 != '\0')) {
    do {
      pcVar3 = pcVar3 + 1;
      cVar5 = *pcVar3;
      if (cVar5 == '\0') break;
    } while (cVar5 != '-');
  }
  if (cVar5 != '-') {
                    /* WARNING: Subroutine does not return */
    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");
  }
  pcVar6 = pcVar3 + 1;
  cVar5 = pcVar3[1];
  while (cVar5 != '\0') {
    while ((cVar5 != '-' && (cVar5 != ' '))) {
      pcVar6 = pcVar6 + 1;
      cVar5 = *pcVar6;
      if (cVar5 == '\0') goto LAB_0002f777;
    }
    *pcVar6 = '_';
    pcVar6 = pcVar6 + 1;
    cVar5 = *pcVar6;
  }
LAB_0002f777:
  sVar2 = strcspn(__s,"\r\n");
  if (*(int *)(param_1 + 0x198) == 2) {
    __dest = (void *)FUN_0001a9b0(sVar2 + 1,1);
    *(void **)(param_1 + 4) = __dest;
    memcpy(__dest,__s,sVar2);
    *(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;
    sVar2 = strcspn(__s,"\r\n");
  }
  FUN_0002b2e0(param_1,"We claim version: %.*s",sVar2,__s);
  sVar2 = strlen(__s);
  FUN_0002f620(sVar2);
  FUN_0001b240(__s);
  return;
}


PUSH EBP
MOV EBP,EAX
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014970
ADD EBX,0x7a6f5
SUB ESP,0x1c
CMP dword ptr [EAX + 0x198],0x2
MOV dword ptr [ESP + 0x8],EDX
MOV dword ptr [ESP + 0xc],ECX
JZ 0x0002f7d0
MOV ESI,dword ptr [ESP + 0x8]
MOV ECX,0x5
LEA EDI,[EBX + 0xfffcbef1]
CMPSB.REPE ES:EDI,ESI
SETA AL
SBB AL,0x0
TEST AL,AL
JNZ 0x0002f85d
MOV EDI,dword ptr [ESP + 0xc]
LEA EDX,[EBX + 0xfffc63ed]
MOV EAX,EDI
CALL 0x0002d650
TEST EAX,EAX
LEA EAX,[EBX + 0xfffc63ed]
CMOVLE EAX,EDI
SUB ESP,0x4
PUSH dword ptr [EBX + 0x260]
PUSH EAX
LEA EAX,[EBX + 0xfffcbf11]
PUSH EAX
CALL 0x0001b020
ADD ESP,0x10
MOV ESI,EAX
SUB ESP,0xc
PUSH dword ptr [ESP + 0x14]
CALL 0x00014470
ADD ESP,0x10
ADD EAX,ESI
MOVZX EDX,byte ptr [EAX]
CMP DL,0x2d
JZ 0x0002f73f
TEST DL,DL
JZ 0x0002f73f
LEA ESI,[ESI]
NOP
ADD EAX,0x1
MOVZX EDX,byte ptr [EAX]
TEST DL,DL
JZ 0x0002f73f
CMP DL,0x2d
JNZ 0x0002f730
CMP DL,0x2d
JNZ 0x0002f83e
LEA EDX,[EAX + 0x1]
MOVZX EAX,byte ptr [EAX + 0x1]
TEST AL,AL
JNZ 0x0002f762
JMP 0x0002f777
ADD EDX,0x1
MOVZX EAX,byte ptr [EDX]
TEST AL,AL
JZ 0x0002f777
CMP AL,0x2d
JZ 0x0002f76a
CMP AL,0x20
JNZ 0x0002f758
MOV byte ptr [EDX],0x5f
ADD EDX,0x1
MOVZX EAX,byte ptr [EDX]
TEST AL,AL
JNZ 0x0002f762
SUB ESP,0x8
LEA EDI,[EBX + 0xfffcc213]
PUSH EDI
PUSH ESI
CALL 0x000140e0
ADD ESP,0x10
CMP dword ptr [EBP + 0x198],0x2
MOV EDX,EAX
JZ 0x0002f7f8
LEA EAX,[EBX + 0xfffcbf28]
PUSH ESI
PUSH EDX
PUSH EAX
PUSH EBP
ADD EBP,0x10
CALL 0x0002b2e0
MOV dword ptr [ESP],ESI
CALL 0x00014470
MOV EDX,dword ptr [EBP + 0x8]
MOV ECX,ESI
MOV dword ptr [ESP],EAX
MOV EAX,EBP
CALL 0x0002f620
MOV dword ptr [ESP],ESI
CALL 0x0001b240
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
LEA EAX,[EBX + 0xfffcbee6]
PUSH dword ptr [EBX + 0x260]
PUSH dword ptr [ESP + 0x10]
PUSH EAX
CALL 0x0001b020
ADD ESP,0x10
MOV ESI,EAX
JMP 0x0002f70e
SUB ESP,0x8
LEA EAX,[EAX + 0x1]
PUSH 0x1
MOV dword ptr [ESP + 0x14],EDX
PUSH EAX
CALL 0x0001a9b0
ADD ESP,0xc
MOV EDX,dword ptr [ESP + 0xc]
MOV dword ptr [EBP + 0x4],EAX
PUSH EDX
MOV dword ptr [ESP + 0x10],EDX
PUSH ESI
PUSH EAX
CALL 0x00014130
MOV EDX,dword ptr [ESP + 0x18]
MOV EAX,dword ptr [EBP + 0x4]
MOV byte ptr [EAX + EDX*0x1],0x0
POP EAX
POP EDX
PUSH EDI
PUSH ESI
CALL 0x000140e0
ADD ESP,0x10
MOV EDX,EAX
JMP 0x0002f795
LEA EAX,[EBX + 0xfffcf9e4]
PUSH EAX
LEA EAX,[EBX + 0xfffcb937]
PUSH 0xbe4
PUSH EAX
LEA EAX,[EBX + 0xfffcbf1c]
PUSH EAX
CALL 0x00014870
LEA EAX,[EBX + 0xfffcf9f8]
PUSH EAX
LEA EAX,[EBX + 0xfffcb937]
PUSH 0xbff
PUSH EAX
LEA EAX,[EBX + 0xfffcbef6]
PUSH EAX
CALL 0x00014870
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_0002f690(int param_1,byte *param_2,undefined *param_3)\n\n{\n  undefined *puVar1;\n  char *__s;\n  size_t sVar2;\n  char *pcVar3;\n  void *__dest;\n  int iVar4;\n  char cVar5;\n  char *pcVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  bool bVar9;\n  bool bVar10;\n  \n  bVar9 = *(uint *)(param_1 + 0x198) < 2;\n  bVar10 = *(uint *)(param_1 + 0x198) == 2;\n  if (bVar10) {\n    __s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  else {\n    iVar4 = 5;\n    pbVar7 = param_2;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = FUN_0002d650();\n    puVar1 = &DAT_0007017d;\n    if (iVar4 < 1) {\n      puVar1 = param_3;\n    }\n    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  sVar2 = strlen((char *)param_2);\n  pcVar3 = __s + sVar2;\n  cVar5 = *pcVar3;\n  if ((cVar5 != '-') && (cVar5 != '\0')) {\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }\n  if (cVar5 != '-') {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }\n  pcVar6 = pcVar3 + 1;\n  cVar5 = pcVar3[1];\n  while (cVar5 != '\0') {\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }\nLAB_0002f777:\n  sVar2 = strcspn(__s,"\r\n");\n  if (*(int *)(param_1 + 0x198) == 2) {\n    __dest = (void *)FUN_0001a9b0(sVar2 + 1,1);\n    *(void **)(param_1 + 4) = __dest;\n    memcpy(__dest,__s,sVar2);\n    *(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;\n    sVar2 = strcspn(__s,"\r\n");\n  }\n  FUN_0002b2e0(param_1,"We claim version: %.*s",sVar2,__s);\n  sVar2 = strlen(__s);\n  FUN_0002f620(sVar2);\n  FUN_0001b240(__s);\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_0002f690(int param_1,byte *param_2,undefined *param_3)\n\n{\n  undefined *puVar1;\n  char *__s;\n  size_t sVar2;\n  char *pcVar3;\n  void *__dest;\n  int iVar4;\n  char cVar5;\n  char *pcVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  bool bVar9;\n  bool bVar10;\n  \n  bVar9 = *(uint *)(param_1 + 0x198) < 2;\n  bVar10 = *(uint *)(param_1 + 0x198) == 2;\n  if (bVar10) {\n    __s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  else {\n    iVar4 = 5;\n    pbVar7 = param_2;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = FUN_0002d650();\n    puVar1 = &DAT_0007017d;\n    if (iVar4 < 1) {\n      puVar1 = param_3;\n    }\n    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  sVar2 = strlen((char *)param_2);\n  pcVar3 = __s + sVar2;\n  cVar5 = *pcVar3;\n  if ((cVar5 != '-') && (cVar5 != '\0')) {\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }\n  if (cVar5 != '-') {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }\n  pcVar6 = pcVar3 + 1;\n  cVar5 = pcVar3[1];\n  while (cVar5 != '\0') {\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }\nLAB_0002f777:\n  sVar2 = strcspn(__s,"\r\n");\n  if (*(int *)(param_1 + 0x198) == 2) {\n    __dest = (void *)FUN_0001a9b0(sVar2 + 1,1);\n    *(void **)(param_1 + 4) = __dest;\n    memcpy(__dest,__s,sVar2);\n    *(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;\n    sVar2 = strcspn(__s,"\r\n");\n  }\n  FUN_0002b2e0(param_1,"We claim version: %.*s",sVar2,__s);\n  sVar2 = strlen(__s);\n  FUN_0002f620(sVar2);\n  FUN_0001b240(__s);\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0002f690(int param_1,byte *param_2,undefined *param_3)" identifier (parameter_list "(int param_1,byte *param_2,undefined *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  char *__s;\n  size_t sVar2;\n  char *pcVar3;\n  void *__dest;\n  int iVar4;\n  char cVar5;\n  char *pcVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  bool bVar9;\n  bool bVar10;\n  \n  bVar9 = *(uint *)(param_1 + 0x198) < 2;\n  bVar10 = *(uint *)(param_1 + 0x198) == 2;\n  if (bVar10) {\n    __s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  else {\n    iVar4 = 5;\n    pbVar7 = param_2;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = FUN_0002d650();\n    puVar1 = &DAT_0007017d;\n    if (iVar4 < 1) {\n      puVar1 = param_3;\n    }\n    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  sVar2 = strlen((char *)param_2);\n  pcVar3 = __s + sVar2;\n  cVar5 = *pcVar3;\n  if ((cVar5 != '-') && (cVar5 != '\0')) {\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }\n  if (cVar5 != '-') {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }\n  pcVar6 = pcVar3 + 1;\n  cVar5 = pcVar3[1];\n  while (cVar5 != '\0') {\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }\nLAB_0002f777:\n  sVar2 = strcspn(__s,"\r\n");\n  if (*(int *)(param_1 + 0x198) == 2) {\n    __dest = (void *)FUN_0001a9b0(sVar2 + 1,1);\n    *(void **)(param_1 + 4) = __dest;\n    memcpy(__dest,__s,sVar2);\n    *(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;\n    sVar2 = strcspn(__s,"\r\n");\n  }\n  FUN_0002b2e0(param_1,"We claim version: %.*s",sVar2,__s);\n  sVar2 = strlen(__s);\n  FUN_0002f620(sVar2);\n  FUN_0001b240(__s);\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * 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 "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "char cVar5;" primitive_type identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (declaration "byte *pbVar8;" type_identifier (pointer_declarator "*pbVar8" * identifier) ;) (declaration "bool bVar9;" primitive_type identifier ;) (declaration "bool bVar10;" primitive_type identifier ;) (expression_statement "bVar9 = *(uint *)(param_1 + 0x198) < 2;" (assignment_expression "bVar9 = *(uint *)(param_1 + 0x198) < 2" identifier = (binary_expression "*(uint *)(param_1 + 0x198) < 2" (pointer_expression "*(uint *)(param_1 + 0x198)" * (cast_expression "(uint *)(param_1 + 0x198)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x198)" ( (binary_expression "param_1 + 0x198" identifier + number_literal) )))) < number_literal)) ;) (expression_statement "bVar10 = *(uint *)(param_1 + 0x198) == 2;" (assignment_expression "bVar10 = *(uint *)(param_1 + 0x198) == 2" identifier = (binary_expression "*(uint *)(param_1 + 0x198) == 2" (pointer_expression "*(uint *)(param_1 + 0x198)" * (cast_expression "(uint *)(param_1 + 0x198)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x198)" ( (binary_expression "param_1 + 0x198" identifier + number_literal) )))) == number_literal)) ;) (if_statement "if (bVar10) {\n    __s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  else {\n    iVar4 = 5;\n    pbVar7 = param_2;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = FUN_0002d650();\n    puVar1 = &DAT_0007017d;\n    if (iVar4 < 1) {\n      puVar1 = param_3;\n    }\n    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }" if (parenthesized_expression "(bVar10)" ( identifier )) (compound_statement "{\n    __s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }" { (expression_statement "__s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);" (assignment_expression "__s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0)" identifier = (cast_expression "(char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0)" identifier (argument_list "("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0)" ( (string_literal ""%s2.0-%s\r\n"" " string_content escape_sequence escape_sequence ") , identifier , identifier ))))) ;) }) (else_clause "else {\n    iVar4 = 5;\n    pbVar7 = param_2;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = FUN_0002d650();\n    puVar1 = &DAT_0007017d;\n    if (iVar4 < 1) {\n      puVar1 = param_3;\n    }\n    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }" else (compound_statement "{\n    iVar4 = 5;\n    pbVar7 = param_2;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = FUN_0002d650();\n    puVar1 = &DAT_0007017d;\n    if (iVar4 < 1) {\n      puVar1 = param_3;\n    }\n    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }" { (expression_statement "iVar4 = 5;" (assignment_expression "iVar4 = 5" identifier = number_literal) ;) (expression_statement "pbVar7 = param_2;" (assignment_expression "pbVar7 = param_2" identifier = identifier) ;) (expression_statement "pbVar8 = &DAT_00075c81;" (assignment_expression "pbVar8 = &DAT_00075c81" identifier = (pointer_expression "&DAT_00075c81" & identifier)) ;) (do_statement "do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);" do (compound_statement "{\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    }" { (if_statement "if (iVar4 == 0) break;" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) (expression_statement "bVar9 = *pbVar7 < *pbVar8;" (assignment_expression "bVar9 = *pbVar7 < *pbVar8" identifier = (binary_expression "*pbVar7 < *pbVar8" (pointer_expression "*pbVar7" * identifier) < (pointer_expression "*pbVar8" * identifier))) ;) (expression_statement "bVar10 = *pbVar7 == *pbVar8;" (assignment_expression "bVar10 = *pbVar7 == *pbVar8" identifier = (binary_expression "*pbVar7 == *pbVar8" (pointer_expression "*pbVar7" * identifier) == (pointer_expression "*pbVar8" * identifier))) ;) (expression_statement "pbVar7 = pbVar7 + 1;" (assignment_expression "pbVar7 = pbVar7 + 1" identifier = (binary_expression "pbVar7 + 1" identifier + number_literal)) ;) (expression_statement "pbVar8 = pbVar8 + 1;" (assignment_expression "pbVar8 = pbVar8 + 1" identifier = (binary_expression "pbVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar10)" ( identifier )) ;) (if_statement "if ((!bVar9 && !bVar10) != bVar9) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }" if (parenthesized_expression "((!bVar9 && !bVar10) != bVar9)" ( (binary_expression "(!bVar9 && !bVar10) != bVar9" (parenthesized_expression "(!bVar9 && !bVar10)" ( (binary_expression "!bVar9 && !bVar10" (unary_expression "!bVar9" ! identifier) && (unary_expression "!bVar10" ! identifier)) )) != identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }" { comment (expression_statement "__assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");" (call_expression "__assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring")" identifier (argument_list "("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring")" ( (string_literal ""!strcmp(protoname, \"SSH-\")"" " string_content escape_sequence string_content escape_sequence string_content ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh_send_verstring"" " string_content ") ))) ;) })) (expression_statement "iVar4 = FUN_0002d650();" (assignment_expression "iVar4 = FUN_0002d650()" identifier = (call_expression "FUN_0002d650()" identifier (argument_list "()" ( )))) ;) (expression_statement "puVar1 = &DAT_0007017d;" (assignment_expression "puVar1 = &DAT_0007017d" identifier = (pointer_expression "&DAT_0007017d" & identifier)) ;) (if_statement "if (iVar4 < 1) {\n      puVar1 = param_3;\n    }" if (parenthesized_expression "(iVar4 < 1)" ( (binary_expression "iVar4 < 1" identifier < number_literal) )) (compound_statement "{\n      puVar1 = param_3;\n    }" { (expression_statement "puVar1 = param_3;" (assignment_expression "puVar1 = param_3" identifier = identifier) ;) })) (expression_statement "__s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);" (assignment_expression "__s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0)" identifier = (cast_expression "(char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0)" identifier (argument_list "("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0)" ( (string_literal ""SSH-%s-%s\n"" " string_content escape_sequence ") , identifier , identifier ))))) ;) }))) (expression_statement "sVar2 = strlen((char *)param_2);" (assignment_expression "sVar2 = strlen((char *)param_2)" identifier = (call_expression "strlen((char *)param_2)" identifier (argument_list "((char *)param_2)" ( (cast_expression "(char *)param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "pcVar3 = __s + sVar2;" (assignment_expression "pcVar3 = __s + sVar2" identifier = (binary_expression "__s + sVar2" identifier + identifier)) ;) (expression_statement "cVar5 = *pcVar3;" (assignment_expression "cVar5 = *pcVar3" identifier = (pointer_expression "*pcVar3" * identifier)) ;) (if_statement "if ((cVar5 != '-') && (cVar5 != '\0')) {\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }" if (parenthesized_expression "((cVar5 != '-') && (cVar5 != '\0'))" ( (binary_expression "(cVar5 != '-') && (cVar5 != '\0')" (parenthesized_expression "(cVar5 != '-')" ( (binary_expression "cVar5 != '-'" identifier != (char_literal "'-'" ' character ')) )) && (parenthesized_expression "(cVar5 != '\0')" ( (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }" { (do_statement "do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');" do (compound_statement "{\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    }" { (expression_statement "pcVar3 = pcVar3 + 1;" (assignment_expression "pcVar3 = pcVar3 + 1" identifier = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;) (expression_statement "cVar5 = *pcVar3;" (assignment_expression "cVar5 = *pcVar3" identifier = (pointer_expression "*pcVar3" * identifier)) ;) (if_statement "if (cVar5 == '\0') break;" if (parenthesized_expression "(cVar5 == '\0')" ( (binary_expression "cVar5 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(cVar5 != '-')" ( (binary_expression "cVar5 != '-'" identifier != (char_literal "'-'" ' character ')) )) ;) })) (if_statement "if (cVar5 != '-') {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }" if (parenthesized_expression "(cVar5 != '-')" ( (binary_expression "cVar5 != '-'" identifier != (char_literal "'-'" ' character ')) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }" { comment (expression_statement "__assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");" (call_expression "__assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring")" identifier (argument_list "("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring")" ( (string_literal ""*str == \'-\'"" " string_content escape_sequence string_content escape_sequence ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh_fix_verstring"" " string_content ") ))) ;) })) (expression_statement "pcVar6 = pcVar3 + 1;" (assignment_expression "pcVar6 = pcVar3 + 1" identifier = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;) (expression_statement "cVar5 = pcVar3[1];" (assignment_expression "cVar5 = pcVar3[1]" identifier = (subscript_expression "pcVar3[1]" identifier [ number_literal ])) ;) (while_statement "while (cVar5 != '\0') {\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }" while (parenthesized_expression "(cVar5 != '\0')" ( (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }" { (while_statement "while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }" while (parenthesized_expression "((cVar5 != '-' && (cVar5 != ' ')))" ( (parenthesized_expression "(cVar5 != '-' && (cVar5 != ' '))" ( (binary_expression "cVar5 != '-' && (cVar5 != ' ')" (binary_expression "cVar5 != '-'" identifier != (char_literal "'-'" ' character ')) && (parenthesized_expression "(cVar5 != ' ')" ( (binary_expression "cVar5 != ' '" identifier != (char_literal "' '" ' character ')) ))) )) )) (compound_statement "{\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }" { (expression_statement "pcVar6 = pcVar6 + 1;" (assignment_expression "pcVar6 = pcVar6 + 1" identifier = (binary_expression "pcVar6 + 1" identifier + number_literal)) ;) (expression_statement "cVar5 = *pcVar6;" (assignment_expression "cVar5 = *pcVar6" identifier = (pointer_expression "*pcVar6" * identifier)) ;) (if_statement "if (cVar5 == '\0') goto LAB_0002f777;" if (parenthesized_expression "(cVar5 == '\0')" ( (binary_expression "cVar5 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_0002f777;" goto statement_identifier ;)) })) (expression_statement "*pcVar6 = '_';" (assignment_expression "*pcVar6 = '_'" (pointer_expression "*pcVar6" * identifier) = (char_literal "'_'" ' character ')) ;) (expression_statement "pcVar6 = pcVar6 + 1;" (assignment_expression "pcVar6 = pcVar6 + 1" identifier = (binary_expression "pcVar6 + 1" identifier + number_literal)) ;) (expression_statement "cVar5 = *pcVar6;" (assignment_expression "cVar5 = *pcVar6" identifier = (pointer_expression "*pcVar6" * identifier)) ;) })) (labeled_statement "LAB_0002f777:\n  sVar2 = strcspn(__s,"\r\n");" statement_identifier : (expression_statement "sVar2 = strcspn(__s,"\r\n");" (assignment_expression "sVar2 = strcspn(__s,"\r\n")" identifier = (call_expression "strcspn(__s,"\r\n")" identifier (argument_list "(__s,"\r\n")" ( identifier , (string_literal ""\r\n"" " escape_sequence escape_sequence ") )))) ;)) (if_statement "if (*(int *)(param_1 + 0x198) == 2) {\n    __dest = (void *)FUN_0001a9b0(sVar2 + 1,1);\n    *(void **)(param_1 + 4) = __dest;\n    memcpy(__dest,__s,sVar2);\n    *(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;\n    sVar2 = strcspn(__s,"\r\n");\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x198) == 2)" ( (binary_expression "*(int *)(param_1 + 0x198) == 2" (pointer_expression "*(int *)(param_1 + 0x198)" * (cast_expression "(int *)(param_1 + 0x198)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x198)" ( (binary_expression "param_1 + 0x198" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    __dest = (void *)FUN_0001a9b0(sVar2 + 1,1);\n    *(void **)(param_1 + 4) = __dest;\n    memcpy(__dest,__s,sVar2);\n    *(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;\n    sVar2 = strcspn(__s,"\r\n");\n  }" { (expression_statement "__dest = (void *)FUN_0001a9b0(sVar2 + 1,1);" (assignment_expression "__dest = (void *)FUN_0001a9b0(sVar2 + 1,1)" identifier = (cast_expression "(void *)FUN_0001a9b0(sVar2 + 1,1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001a9b0(sVar2 + 1,1)" identifier (argument_list "(sVar2 + 1,1)" ( (binary_expression "sVar2 + 1" identifier + number_literal) , number_literal ))))) ;) (expression_statement "*(void **)(param_1 + 4) = __dest;" (assignment_expression "*(void **)(param_1 + 4) = __dest" (pointer_expression "*(void **)(param_1 + 4)" * (cast_expression "(void **)(param_1 + 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "memcpy(__dest,__s,sVar2);" (call_expression "memcpy(__dest,__s,sVar2)" identifier (argument_list "(__dest,__s,sVar2)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;" (assignment_expression "*(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0" (pointer_expression "*(undefined1 *)(*(int *)(param_1 + 4) + sVar2)" * (cast_expression "(undefined1 *)(*(int *)(param_1 + 4) + sVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 4) + sVar2)" ( (binary_expression "*(int *)(param_1 + 4) + sVar2" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) + identifier) )))) = number_literal) ;) (expression_statement "sVar2 = strcspn(__s,"\r\n");" (assignment_expression "sVar2 = strcspn(__s,"\r\n")" identifier = (call_expression "strcspn(__s,"\r\n")" identifier (argument_list "(__s,"\r\n")" ( identifier , (string_literal ""\r\n"" " escape_sequence escape_sequence ") )))) ;) })) (expression_statement "FUN_0002b2e0(param_1,"We claim version: %.*s",sVar2,__s);" (call_expression "FUN_0002b2e0(param_1,"We claim version: %.*s",sVar2,__s)" identifier (argument_list "(param_1,"We claim version: %.*s",sVar2,__s)" ( identifier , (string_literal ""We claim version: %.*s"" " string_content ") , identifier , identifier ))) ;) (expression_statement "sVar2 = strlen(__s);" (assignment_expression "sVar2 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "FUN_0002f620(sVar2);" (call_expression "FUN_0002f620(sVar2)" identifier (argument_list "(sVar2)" ( identifier ))) ;) (expression_statement "FUN_0001b240(__s);" (call_expression "FUN_0001b240(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid __regparm3 ssh_send_verstring(Ssh_conflict ssh,char *protoname,char *svers)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  char *pcVar3;\n  Ssh_conflict ssh_1;\n  int iVar4;\n  char cVar5;\n  char *pcVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  bool bVar9;\n  bool bVar10;\n  \n  bVar9 = (uint)ssh->version < 2;\n  bVar10 = ssh->version == 2;\n  if (bVar10) {\n    pcVar1 = dupprintf("%s2.0-%s\r\n",protoname,PTR_sshver_000a9ff0);\n  }\n  else {\n    iVar4 = 5;\n    pbVar7 = (byte *)protoname;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = ssh_versioncmp(svers,"1.5");\n    pcVar1 = "1.5";\n    if (iVar4 < 1) {\n      pcVar1 = svers;\n    }\n    pcVar1 = dupprintf("SSH-%s-%s\n",pcVar1,PTR_sshver_000a9ff0);\n  }\n  sVar2 = strlen(protoname);\n  pcVar3 = pcVar1 + sVar2;\n  cVar5 = *pcVar3;\n  if ((cVar5 != '-') && (cVar5 != '\0')) {\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }\n  if (cVar5 != '-') {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }\n  pcVar6 = pcVar3 + 1;\n  cVar5 = pcVar3[1];\n  while (cVar5 != '\0') {\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }\nLAB_0002f777:\n  sVar2 = strcspn(pcVar1,"\r\n");\n  if (ssh->version == 2) {\n    pcVar3 = (char *)safemalloc(sVar2 + 1,1);\n    ssh->v_c = pcVar3;\n    memcpy(pcVar3,pcVar1,sVar2);\n    ssh->v_c[sVar2] = '\0';\n    sVar2 = strcspn(pcVar1,"\r\n");\n  }\n  logeventf(ssh,"We claim version: %.*s",sVar2,pcVar1);\n  ssh_1 = (Ssh_conflict)strlen(pcVar1);\n  s_write((Ssh_conflict)&ssh->s,ssh->logctx,(int)pcVar1,ssh_1);\n  safefree(pcVar1);\n  return;\n}\n\n" comment comment (function_definition "void __regparm3 ssh_send_verstring(Ssh_conflict ssh,char *protoname,char *svers)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  char *pcVar3;\n  Ssh_conflict ssh_1;\n  int iVar4;\n  char cVar5;\n  char *pcVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  bool bVar9;\n  bool bVar10;\n  \n  bVar9 = (uint)ssh->version < 2;\n  bVar10 = ssh->version == 2;\n  if (bVar10) {\n    pcVar1 = dupprintf("%s2.0-%s\r\n",protoname,PTR_sshver_000a9ff0);\n  }\n  else {\n    iVar4 = 5;\n    pbVar7 = (byte *)protoname;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = ssh_versioncmp(svers,"1.5");\n    pcVar1 = "1.5";\n    if (iVar4 < 1) {\n      pcVar1 = svers;\n    }\n    pcVar1 = dupprintf("SSH-%s-%s\n",pcVar1,PTR_sshver_000a9ff0);\n  }\n  sVar2 = strlen(protoname);\n  pcVar3 = pcVar1 + sVar2;\n  cVar5 = *pcVar3;\n  if ((cVar5 != '-') && (cVar5 != '\0')) {\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }\n  if (cVar5 != '-') {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }\n  pcVar6 = pcVar3 + 1;\n  cVar5 = pcVar3[1];\n  while (cVar5 != '\0') {\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }\nLAB_0002f777:\n  sVar2 = strcspn(pcVar1,"\r\n");\n  if (ssh->version == 2) {\n    pcVar3 = (char *)safemalloc(sVar2 + 1,1);\n    ssh->v_c = pcVar3;\n    memcpy(pcVar3,pcVar1,sVar2);\n    ssh->v_c[sVar2] = '\0';\n    sVar2 = strcspn(pcVar1,"\r\n");\n  }\n  logeventf(ssh,"We claim version: %.*s",sVar2,pcVar1);\n  ssh_1 = (Ssh_conflict)strlen(pcVar1);\n  s_write((Ssh_conflict)&ssh->s,ssh->logctx,(int)pcVar1,ssh_1);\n  safefree(pcVar1);\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "ssh_send_verstring(Ssh_conflict ssh,char *protoname,char *svers)" identifier (parameter_list "(Ssh_conflict ssh,char *protoname,char *svers)" ( (parameter_declaration "Ssh_conflict ssh" type_identifier identifier) , (parameter_declaration "char *protoname" primitive_type (pointer_declarator "*protoname" * identifier)) , (parameter_declaration "char *svers" primitive_type (pointer_declarator "*svers" * identifier)) ))) (compound_statement "{\n  char *pcVar1;\n  size_t sVar2;\n  char *pcVar3;\n  Ssh_conflict ssh_1;\n  int iVar4;\n  char cVar5;\n  char *pcVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  bool bVar9;\n  bool bVar10;\n  \n  bVar9 = (uint)ssh->version < 2;\n  bVar10 = ssh->version == 2;\n  if (bVar10) {\n    pcVar1 = dupprintf("%s2.0-%s\r\n",protoname,PTR_sshver_000a9ff0);\n  }\n  else {\n    iVar4 = 5;\n    pbVar7 = (byte *)protoname;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = ssh_versioncmp(svers,"1.5");\n    pcVar1 = "1.5";\n    if (iVar4 < 1) {\n      pcVar1 = svers;\n    }\n    pcVar1 = dupprintf("SSH-%s-%s\n",pcVar1,PTR_sshver_000a9ff0);\n  }\n  sVar2 = strlen(protoname);\n  pcVar3 = pcVar1 + sVar2;\n  cVar5 = *pcVar3;\n  if ((cVar5 != '-') && (cVar5 != '\0')) {\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }\n  if (cVar5 != '-') {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }\n  pcVar6 = pcVar3 + 1;\n  cVar5 = pcVar3[1];\n  while (cVar5 != '\0') {\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }\nLAB_0002f777:\n  sVar2 = strcspn(pcVar1,"\r\n");\n  if (ssh->version == 2) {\n    pcVar3 = (char *)safemalloc(sVar2 + 1,1);\n    ssh->v_c = pcVar3;\n    memcpy(pcVar3,pcVar1,sVar2);\n    ssh->v_c[sVar2] = '\0';\n    sVar2 = strcspn(pcVar1,"\r\n");\n  }\n  logeventf(ssh,"We claim version: %.*s",sVar2,pcVar1);\n  ssh_1 = (Ssh_conflict)strlen(pcVar1);\n  s_write((Ssh_conflict)&ssh->s,ssh->logctx,(int)pcVar1,ssh_1);\n  safefree(pcVar1);\n  return;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "Ssh_conflict ssh_1;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "char cVar5;" primitive_type identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (declaration "byte *pbVar8;" type_identifier (pointer_declarator "*pbVar8" * identifier) ;) (declaration "bool bVar9;" primitive_type identifier ;) (declaration "bool bVar10;" primitive_type identifier ;) (expression_statement "bVar9 = (uint)ssh->version < 2;" (assignment_expression "bVar9 = (uint)ssh->version < 2" identifier = (binary_expression "(uint)ssh->version < 2" (cast_expression "(uint)ssh->version" ( (type_descriptor "uint" type_identifier) ) (field_expression "ssh->version" identifier -> field_identifier)) < number_literal)) ;) (expression_statement "bVar10 = ssh->version == 2;" (assignment_expression "bVar10 = ssh->version == 2" identifier = (binary_expression "ssh->version == 2" (field_expression "ssh->version" identifier -> field_identifier) == number_literal)) ;) (if_statement "if (bVar10) {\n    pcVar1 = dupprintf("%s2.0-%s\r\n",protoname,PTR_sshver_000a9ff0);\n  }\n  else {\n    iVar4 = 5;\n    pbVar7 = (byte *)protoname;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = ssh_versioncmp(svers,"1.5");\n    pcVar1 = "1.5";\n    if (iVar4 < 1) {\n      pcVar1 = svers;\n    }\n    pcVar1 = dupprintf("SSH-%s-%s\n",pcVar1,PTR_sshver_000a9ff0);\n  }" if (parenthesized_expression "(bVar10)" ( identifier )) (compound_statement "{\n    pcVar1 = dupprintf("%s2.0-%s\r\n",protoname,PTR_sshver_000a9ff0);\n  }" { (expression_statement "pcVar1 = dupprintf("%s2.0-%s\r\n",protoname,PTR_sshver_000a9ff0);" (assignment_expression "pcVar1 = dupprintf("%s2.0-%s\r\n",protoname,PTR_sshver_000a9ff0)" identifier = (call_expression "dupprintf("%s2.0-%s\r\n",protoname,PTR_sshver_000a9ff0)" identifier (argument_list "("%s2.0-%s\r\n",protoname,PTR_sshver_000a9ff0)" ( (string_literal ""%s2.0-%s\r\n"" " string_content escape_sequence escape_sequence ") , identifier , identifier )))) ;) }) (else_clause "else {\n    iVar4 = 5;\n    pbVar7 = (byte *)protoname;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = ssh_versioncmp(svers,"1.5");\n    pcVar1 = "1.5";\n    if (iVar4 < 1) {\n      pcVar1 = svers;\n    }\n    pcVar1 = dupprintf("SSH-%s-%s\n",pcVar1,PTR_sshver_000a9ff0);\n  }" else (compound_statement "{\n    iVar4 = 5;\n    pbVar7 = (byte *)protoname;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = ssh_versioncmp(svers,"1.5");\n    pcVar1 = "1.5";\n    if (iVar4 < 1) {\n      pcVar1 = svers;\n    }\n    pcVar1 = dupprintf("SSH-%s-%s\n",pcVar1,PTR_sshver_000a9ff0);\n  }" { (expression_statement "iVar4 = 5;" (assignment_expression "iVar4 = 5" identifier = number_literal) ;) (expression_statement "pbVar7 = (byte *)protoname;" (assignment_expression "pbVar7 = (byte *)protoname" identifier = (cast_expression "(byte *)protoname" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "pbVar8 = &DAT_00075c81;" (assignment_expression "pbVar8 = &DAT_00075c81" identifier = (pointer_expression "&DAT_00075c81" & identifier)) ;) (do_statement "do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);" do (compound_statement "{\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    }" { (if_statement "if (iVar4 == 0) break;" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) (expression_statement "bVar9 = *pbVar7 < *pbVar8;" (assignment_expression "bVar9 = *pbVar7 < *pbVar8" identifier = (binary_expression "*pbVar7 < *pbVar8" (pointer_expression "*pbVar7" * identifier) < (pointer_expression "*pbVar8" * identifier))) ;) (expression_statement "bVar10 = *pbVar7 == *pbVar8;" (assignment_expression "bVar10 = *pbVar7 == *pbVar8" identifier = (binary_expression "*pbVar7 == *pbVar8" (pointer_expression "*pbVar7" * identifier) == (pointer_expression "*pbVar8" * identifier))) ;) (expression_statement "pbVar7 = pbVar7 + 1;" (assignment_expression "pbVar7 = pbVar7 + 1" identifier = (binary_expression "pbVar7 + 1" identifier + number_literal)) ;) (expression_statement "pbVar8 = pbVar8 + 1;" (assignment_expression "pbVar8 = pbVar8 + 1" identifier = (binary_expression "pbVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar10)" ( identifier )) ;) (if_statement "if ((!bVar9 && !bVar10) != bVar9) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }" if (parenthesized_expression "((!bVar9 && !bVar10) != bVar9)" ( (binary_expression "(!bVar9 && !bVar10) != bVar9" (parenthesized_expression "(!bVar9 && !bVar10)" ( (binary_expression "!bVar9 && !bVar10" (unary_expression "!bVar9" ! identifier) && (unary_expression "!bVar10" ! identifier)) )) != identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }" { comment (expression_statement "__assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");" (call_expression "__assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring")" identifier (argument_list "("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring")" ( (string_literal ""!strcmp(protoname, \"SSH-\")"" " string_content escape_sequence string_content escape_sequence string_content ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh_send_verstring"" " string_content ") ))) ;) })) (expression_statement "iVar4 = ssh_versioncmp(svers,"1.5");" (assignment_expression "iVar4 = ssh_versioncmp(svers,"1.5")" identifier = (call_expression "ssh_versioncmp(svers,"1.5")" identifier (argument_list "(svers,"1.5")" ( identifier , (string_literal ""1.5"" " string_content ") )))) ;) (expression_statement "pcVar1 = "1.5";" (assignment_expression "pcVar1 = "1.5"" identifier = (string_literal ""1.5"" " string_content ")) ;) (if_statement "if (iVar4 < 1) {\n      pcVar1 = svers;\n    }" if (parenthesized_expression "(iVar4 < 1)" ( (binary_expression "iVar4 < 1" identifier < number_literal) )) (compound_statement "{\n      pcVar1 = svers;\n    }" { (expression_statement "pcVar1 = svers;" (assignment_expression "pcVar1 = svers" identifier = identifier) ;) })) (expression_statement "pcVar1 = dupprintf("SSH-%s-%s\n",pcVar1,PTR_sshver_000a9ff0);" (assignment_expression "pcVar1 = dupprintf("SSH-%s-%s\n",pcVar1,PTR_sshver_000a9ff0)" identifier = (call_expression "dupprintf("SSH-%s-%s\n",pcVar1,PTR_sshver_000a9ff0)" identifier (argument_list "("SSH-%s-%s\n",pcVar1,PTR_sshver_000a9ff0)" ( (string_literal ""SSH-%s-%s\n"" " string_content escape_sequence ") , identifier , identifier )))) ;) }))) (expression_statement "sVar2 = strlen(protoname);" (assignment_expression "sVar2 = strlen(protoname)" identifier = (call_expression "strlen(protoname)" identifier (argument_list "(protoname)" ( identifier )))) ;) (expression_statement "pcVar3 = pcVar1 + sVar2;" (assignment_expression "pcVar3 = pcVar1 + sVar2" identifier = (binary_expression "pcVar1 + sVar2" identifier + identifier)) ;) (expression_statement "cVar5 = *pcVar3;" (assignment_expression "cVar5 = *pcVar3" identifier = (pointer_expression "*pcVar3" * identifier)) ;) (if_statement "if ((cVar5 != '-') && (cVar5 != '\0')) {\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }" if (parenthesized_expression "((cVar5 != '-') && (cVar5 != '\0'))" ( (binary_expression "(cVar5 != '-') && (cVar5 != '\0')" (parenthesized_expression "(cVar5 != '-')" ( (binary_expression "cVar5 != '-'" identifier != (char_literal "'-'" ' character ')) )) && (parenthesized_expression "(cVar5 != '\0')" ( (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }" { (do_statement "do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');" do (compound_statement "{\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    }" { (expression_statement "pcVar3 = pcVar3 + 1;" (assignment_expression "pcVar3 = pcVar3 + 1" identifier = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;) (expression_statement "cVar5 = *pcVar3;" (assignment_expression "cVar5 = *pcVar3" identifier = (pointer_expression "*pcVar3" * identifier)) ;) (if_statement "if (cVar5 == '\0') break;" if (parenthesized_expression "(cVar5 == '\0')" ( (binary_expression "cVar5 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(cVar5 != '-')" ( (binary_expression "cVar5 != '-'" identifier != (char_literal "'-'" ' character ')) )) ;) })) (if_statement "if (cVar5 != '-') {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }" if (parenthesized_expression "(cVar5 != '-')" ( (binary_expression "cVar5 != '-'" identifier != (char_literal "'-'" ' character ')) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }" { comment (expression_statement "__assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");" (call_expression "__assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring")" identifier (argument_list "("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring")" ( (string_literal ""*str == \'-\'"" " string_content escape_sequence string_content escape_sequence ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh_fix_verstring"" " string_content ") ))) ;) })) (expression_statement "pcVar6 = pcVar3 + 1;" (assignment_expression "pcVar6 = pcVar3 + 1" identifier = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;) (expression_statement "cVar5 = pcVar3[1];" (assignment_expression "cVar5 = pcVar3[1]" identifier = (subscript_expression "pcVar3[1]" identifier [ number_literal ])) ;) (while_statement "while (cVar5 != '\0') {\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }" while (parenthesized_expression "(cVar5 != '\0')" ( (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }" { (while_statement "while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }" while (parenthesized_expression "((cVar5 != '-' && (cVar5 != ' ')))" ( (parenthesized_expression "(cVar5 != '-' && (cVar5 != ' '))" ( (binary_expression "cVar5 != '-' && (cVar5 != ' ')" (binary_expression "cVar5 != '-'" identifier != (char_literal "'-'" ' character ')) && (parenthesized_expression "(cVar5 != ' ')" ( (binary_expression "cVar5 != ' '" identifier != (char_literal "' '" ' character ')) ))) )) )) (compound_statement "{\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }" { (expression_statement "pcVar6 = pcVar6 + 1;" (assignment_expression "pcVar6 = pcVar6 + 1" identifier = (binary_expression "pcVar6 + 1" identifier + number_literal)) ;) (expression_statement "cVar5 = *pcVar6;" (assignment_expression "cVar5 = *pcVar6" identifier = (pointer_expression "*pcVar6" * identifier)) ;) (if_statement "if (cVar5 == '\0') goto LAB_0002f777;" if (parenthesized_expression "(cVar5 == '\0')" ( (binary_expression "cVar5 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_0002f777;" goto statement_identifier ;)) })) (expression_statement "*pcVar6 = '_';" (assignment_expression "*pcVar6 = '_'" (pointer_expression "*pcVar6" * identifier) = (char_literal "'_'" ' character ')) ;) (expression_statement "pcVar6 = pcVar6 + 1;" (assignment_expression "pcVar6 = pcVar6 + 1" identifier = (binary_expression "pcVar6 + 1" identifier + number_literal)) ;) (expression_statement "cVar5 = *pcVar6;" (assignment_expression "cVar5 = *pcVar6" identifier = (pointer_expression "*pcVar6" * identifier)) ;) })) (labeled_statement "LAB_0002f777:\n  sVar2 = strcspn(pcVar1,"\r\n");" statement_identifier : (expression_statement "sVar2 = strcspn(pcVar1,"\r\n");" (assignment_expression "sVar2 = strcspn(pcVar1,"\r\n")" identifier = (call_expression "strcspn(pcVar1,"\r\n")" identifier (argument_list "(pcVar1,"\r\n")" ( identifier , (string_literal ""\r\n"" " escape_sequence escape_sequence ") )))) ;)) (if_statement "if (ssh->version == 2) {\n    pcVar3 = (char *)safemalloc(sVar2 + 1,1);\n    ssh->v_c = pcVar3;\n    memcpy(pcVar3,pcVar1,sVar2);\n    ssh->v_c[sVar2] = '\0';\n    sVar2 = strcspn(pcVar1,"\r\n");\n  }" if (parenthesized_expression "(ssh->version == 2)" ( (binary_expression "ssh->version == 2" (field_expression "ssh->version" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    pcVar3 = (char *)safemalloc(sVar2 + 1,1);\n    ssh->v_c = pcVar3;\n    memcpy(pcVar3,pcVar1,sVar2);\n    ssh->v_c[sVar2] = '\0';\n    sVar2 = strcspn(pcVar1,"\r\n");\n  }" { (expression_statement "pcVar3 = (char *)safemalloc(sVar2 + 1,1);" (assignment_expression "pcVar3 = (char *)safemalloc(sVar2 + 1,1)" identifier = (cast_expression "(char *)safemalloc(sVar2 + 1,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(sVar2 + 1,1)" identifier (argument_list "(sVar2 + 1,1)" ( (binary_expression "sVar2 + 1" identifier + number_literal) , number_literal ))))) ;) (expression_statement "ssh->v_c = pcVar3;" (assignment_expression "ssh->v_c = pcVar3" (field_expression "ssh->v_c" identifier -> field_identifier) = identifier) ;) (expression_statement "memcpy(pcVar3,pcVar1,sVar2);" (call_expression "memcpy(pcVar3,pcVar1,sVar2)" identifier (argument_list "(pcVar3,pcVar1,sVar2)" ( identifier , identifier , identifier ))) ;) (expression_statement "ssh->v_c[sVar2] = '\0';" (assignment_expression "ssh->v_c[sVar2] = '\0'" (subscript_expression "ssh->v_c[sVar2]" (field_expression "ssh->v_c" identifier -> field_identifier) [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "sVar2 = strcspn(pcVar1,"\r\n");" (assignment_expression "sVar2 = strcspn(pcVar1,"\r\n")" identifier = (call_expression "strcspn(pcVar1,"\r\n")" identifier (argument_list "(pcVar1,"\r\n")" ( identifier , (string_literal ""\r\n"" " escape_sequence escape_sequence ") )))) ;) })) (expression_statement "logeventf(ssh,"We claim version: %.*s",sVar2,pcVar1);" (call_expression "logeventf(ssh,"We claim version: %.*s",sVar2,pcVar1)" identifier (argument_list "(ssh,"We claim version: %.*s",sVar2,pcVar1)" ( identifier , (string_literal ""We claim version: %.*s"" " string_content ") , identifier , identifier ))) ;) (expression_statement "ssh_1 = (Ssh_conflict)strlen(pcVar1);" (assignment_expression "ssh_1 = (Ssh_conflict)strlen(pcVar1)" identifier = (cast_expression "(Ssh_conflict)strlen(pcVar1)" ( (type_descriptor "Ssh_conflict" type_identifier) ) (call_expression "strlen(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))))) ;) (expression_statement "s_write((Ssh_conflict)&ssh->s,ssh->logctx,(int)pcVar1,ssh_1);" (call_expression "s_write((Ssh_conflict)&ssh->s,ssh->logctx,(int)pcVar1,ssh_1)" identifier (argument_list "((Ssh_conflict)&ssh->s,ssh->logctx,(int)pcVar1,ssh_1)" ( (binary_expression "(Ssh_conflict)&ssh->s" (parenthesized_expression "(Ssh_conflict)" ( identifier )) & (field_expression "ssh->s" identifier -> field_identifier)) , (field_expression "ssh->logctx" identifier -> field_identifier) , (cast_expression "(int)pcVar1" ( (type_descriptor "int" primitive_type) ) identifier) , identifier ))) ;) (expression_statement "safefree(pcVar1);" (call_expression "safefree(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_0002f690(int param_1,byte *param_2,undefined *param_3)\n\n{\n  undefined *puVar1;\n  char *__s;\n  size_t sVar2;\n  char *pcVar3;\n  void *__dest;\n  int iVar4;\n  char cVar5;\n  char *pcVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  bool bVar9;\n  bool bVar10;\n  \n  bVar9 = *(uint *)(param_1 + 0x198) < 2;\n  bVar10 = *(uint *)(param_1 + 0x198) == 2;\n  if (bVar10) {\n    __s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  else {\n    iVar4 = 5;\n    pbVar7 = param_2;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    \n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = FUN_0002d650();\n    puVar1 = &DAT_0007017d;\n    if (iVar4 < 1) {\n      puVar1 = param_3;\n    }\n    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  sVar2 = strlen((char *)param_2);\n  pcVar3 = __s + sVar2;\n  cVar5 = *pcVar3;\n  if ((cVar5 != '-') && (cVar5 != '\0')) {\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }\n  if (cVar5 != '-') {\n                    \n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }\n  pcVar6 = pcVar3 + 1;\n  cVar5 = pcVar3[1];\n  while (cVar5 != '\0') {\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }\nLAB_0002f777:\n  sVar2 = strcspn(__s,"\r\n");\n  if (*(int *)(param_1 + 0x198) == 2) {\n    __dest = (void *)FUN_0001a9b0(sVar2 + 1,1);\n    *(void **)(param_1 + 4) = __dest;\n    memcpy(__dest,__s,sVar2);\n    *(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;\n    sVar2 = strcspn(__s,"\r\n");\n  }\n  FUN_0002b2e0(param_1,"We claim version: %.*s",sVar2,__s);\n  sVar2 = strlen(__s);\n  FUN_0002f620(sVar2);\n  FUN_0001b240(__s);\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0002f690(int param_1,byte *param_2,undefined *param_3)\n\n{\n  undefined *puVar1;\n  char *__s;\n  size_t sVar2;\n  char *pcVar3;\n  void *__dest;\n  int iVar4;\n  char cVar5;\n  char *pcVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  bool bVar9;\n  bool bVar10;\n  \n  bVar9 = *(uint *)(param_1 + 0x198) < 2;\n  bVar10 = *(uint *)(param_1 + 0x198) == 2;\n  if (bVar10) {\n    __s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  else {\n    iVar4 = 5;\n    pbVar7 = param_2;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    \n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = FUN_0002d650();\n    puVar1 = &DAT_0007017d;\n    if (iVar4 < 1) {\n      puVar1 = param_3;\n    }\n    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  sVar2 = strlen((char *)param_2);\n  pcVar3 = __s + sVar2;\n  cVar5 = *pcVar3;\n  if ((cVar5 != '-') && (cVar5 != '\0')) {\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }\n  if (cVar5 != '-') {\n                    \n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }\n  pcVar6 = pcVar3 + 1;\n  cVar5 = pcVar3[1];\n  while (cVar5 != '\0') {\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }\nLAB_0002f777:\n  sVar2 = strcspn(__s,"\r\n");\n  if (*(int *)(param_1 + 0x198) == 2) {\n    __dest = (void *)FUN_0001a9b0(sVar2 + 1,1);\n    *(void **)(param_1 + 4) = __dest;\n    memcpy(__dest,__s,sVar2);\n    *(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;\n    sVar2 = strcspn(__s,"\r\n");\n  }\n  FUN_0002b2e0(param_1,"We claim version: %.*s",sVar2,__s);\n  sVar2 = strlen(__s);\n  FUN_0002f620(sVar2);\n  FUN_0001b240(__s);\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0002f690(int param_1,byte *param_2,undefined *param_3)" identifier (parameter_list "(int param_1,byte *param_2,undefined *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  char *__s;\n  size_t sVar2;\n  char *pcVar3;\n  void *__dest;\n  int iVar4;\n  char cVar5;\n  char *pcVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  bool bVar9;\n  bool bVar10;\n  \n  bVar9 = *(uint *)(param_1 + 0x198) < 2;\n  bVar10 = *(uint *)(param_1 + 0x198) == 2;\n  if (bVar10) {\n    __s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  else {\n    iVar4 = 5;\n    pbVar7 = param_2;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    \n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = FUN_0002d650();\n    puVar1 = &DAT_0007017d;\n    if (iVar4 < 1) {\n      puVar1 = param_3;\n    }\n    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  sVar2 = strlen((char *)param_2);\n  pcVar3 = __s + sVar2;\n  cVar5 = *pcVar3;\n  if ((cVar5 != '-') && (cVar5 != '\0')) {\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }\n  if (cVar5 != '-') {\n                    \n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }\n  pcVar6 = pcVar3 + 1;\n  cVar5 = pcVar3[1];\n  while (cVar5 != '\0') {\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }\nLAB_0002f777:\n  sVar2 = strcspn(__s,"\r\n");\n  if (*(int *)(param_1 + 0x198) == 2) {\n    __dest = (void *)FUN_0001a9b0(sVar2 + 1,1);\n    *(void **)(param_1 + 4) = __dest;\n    memcpy(__dest,__s,sVar2);\n    *(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;\n    sVar2 = strcspn(__s,"\r\n");\n  }\n  FUN_0002b2e0(param_1,"We claim version: %.*s",sVar2,__s);\n  sVar2 = strlen(__s);\n  FUN_0002f620(sVar2);\n  FUN_0001b240(__s);\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * 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 "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "char cVar5;" primitive_type identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (declaration "byte *pbVar8;" type_identifier (pointer_declarator "*pbVar8" * identifier) ;) (declaration "bool bVar9;" primitive_type identifier ;) (declaration "bool bVar10;" primitive_type identifier ;) (expression_statement "bVar9 = *(uint *)(param_1 + 0x198) < 2;" (assignment_expression "bVar9 = *(uint *)(param_1 + 0x198) < 2" identifier = (binary_expression "*(uint *)(param_1 + 0x198) < 2" (pointer_expression "*(uint *)(param_1 + 0x198)" * (cast_expression "(uint *)(param_1 + 0x198)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x198)" ( (binary_expression "param_1 + 0x198" identifier + number_literal) )))) < number_literal)) ;) (expression_statement "bVar10 = *(uint *)(param_1 + 0x198) == 2;" (assignment_expression "bVar10 = *(uint *)(param_1 + 0x198) == 2" identifier = (binary_expression "*(uint *)(param_1 + 0x198) == 2" (pointer_expression "*(uint *)(param_1 + 0x198)" * (cast_expression "(uint *)(param_1 + 0x198)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x198)" ( (binary_expression "param_1 + 0x198" identifier + number_literal) )))) == number_literal)) ;) (if_statement "if (bVar10) {\n    __s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  else {\n    iVar4 = 5;\n    pbVar7 = param_2;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    \n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = FUN_0002d650();\n    puVar1 = &DAT_0007017d;\n    if (iVar4 < 1) {\n      puVar1 = param_3;\n    }\n    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }" if (parenthesized_expression "(bVar10)" ( identifier )) (compound_statement "{\n    __s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }" { (expression_statement "__s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);" (assignment_expression "__s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0)" identifier = (cast_expression "(char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0)" identifier (argument_list "("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0)" ( (string_literal ""%s2.0-%s\r\n"" " string_content escape_sequence escape_sequence ") , identifier , identifier ))))) ;) }) (else_clause "else {\n    iVar4 = 5;\n    pbVar7 = param_2;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    \n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = FUN_0002d650();\n    puVar1 = &DAT_0007017d;\n    if (iVar4 < 1) {\n      puVar1 = param_3;\n    }\n    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }" else (compound_statement "{\n    iVar4 = 5;\n    pbVar7 = param_2;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    \n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = FUN_0002d650();\n    puVar1 = &DAT_0007017d;\n    if (iVar4 < 1) {\n      puVar1 = param_3;\n    }\n    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }" { (expression_statement "iVar4 = 5;" (assignment_expression "iVar4 = 5" identifier = number_literal) ;) (expression_statement "pbVar7 = param_2;" (assignment_expression "pbVar7 = param_2" identifier = identifier) ;) (expression_statement "pbVar8 = &DAT_00075c81;" (assignment_expression "pbVar8 = &DAT_00075c81" identifier = (pointer_expression "&DAT_00075c81" & identifier)) ;) (do_statement "do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);" do (compound_statement "{\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    }" { (if_statement "if (iVar4 == 0) break;" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) (expression_statement "bVar9 = *pbVar7 < *pbVar8;" (assignment_expression "bVar9 = *pbVar7 < *pbVar8" identifier = (binary_expression "*pbVar7 < *pbVar8" (pointer_expression "*pbVar7" * identifier) < (pointer_expression "*pbVar8" * identifier))) ;) (expression_statement "bVar10 = *pbVar7 == *pbVar8;" (assignment_expression "bVar10 = *pbVar7 == *pbVar8" identifier = (binary_expression "*pbVar7 == *pbVar8" (pointer_expression "*pbVar7" * identifier) == (pointer_expression "*pbVar8" * identifier))) ;) (expression_statement "pbVar7 = pbVar7 + 1;" (assignment_expression "pbVar7 = pbVar7 + 1" identifier = (binary_expression "pbVar7 + 1" identifier + number_literal)) ;) (expression_statement "pbVar8 = pbVar8 + 1;" (assignment_expression "pbVar8 = pbVar8 + 1" identifier = (binary_expression "pbVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(bVar10)" ( identifier )) ;) (if_statement "if ((!bVar9 && !bVar10) != bVar9) {\n                    \n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }" if (parenthesized_expression "((!bVar9 && !bVar10) != bVar9)" ( (binary_expression "(!bVar9 && !bVar10) != bVar9" (parenthesized_expression "(!bVar9 && !bVar10)" ( (binary_expression "!bVar9 && !bVar10" (unary_expression "!bVar9" ! identifier) && (unary_expression "!bVar10" ! identifier)) )) != identifier) )) (compound_statement "{\n                    \n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }" { (expression_statement "__assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");" (call_expression "__assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring")" identifier (argument_list "("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring")" ( (string_literal ""!strcmp(protoname, \"SSH-\")"" " string_content escape_sequence string_content escape_sequence string_content ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh_send_verstring"" " string_content ") ))) ;) })) (expression_statement "iVar4 = FUN_0002d650();" (assignment_expression "iVar4 = FUN_0002d650()" identifier = (call_expression "FUN_0002d650()" identifier (argument_list "()" ( )))) ;) (expression_statement "puVar1 = &DAT_0007017d;" (assignment_expression "puVar1 = &DAT_0007017d" identifier = (pointer_expression "&DAT_0007017d" & identifier)) ;) (if_statement "if (iVar4 < 1) {\n      puVar1 = param_3;\n    }" if (parenthesized_expression "(iVar4 < 1)" ( (binary_expression "iVar4 < 1" identifier < number_literal) )) (compound_statement "{\n      puVar1 = param_3;\n    }" { (expression_statement "puVar1 = param_3;" (assignment_expression "puVar1 = param_3" identifier = identifier) ;) })) (expression_statement "__s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);" (assignment_expression "__s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0)" identifier = (cast_expression "(char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0)" identifier (argument_list "("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0)" ( (string_literal ""SSH-%s-%s\n"" " string_content escape_sequence ") , identifier , identifier ))))) ;) }))) (expression_statement "sVar2 = strlen((char *)param_2);" (assignment_expression "sVar2 = strlen((char *)param_2)" identifier = (call_expression "strlen((char *)param_2)" identifier (argument_list "((char *)param_2)" ( (cast_expression "(char *)param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "pcVar3 = __s + sVar2;" (assignment_expression "pcVar3 = __s + sVar2" identifier = (binary_expression "__s + sVar2" identifier + identifier)) ;) (expression_statement "cVar5 = *pcVar3;" (assignment_expression "cVar5 = *pcVar3" identifier = (pointer_expression "*pcVar3" * identifier)) ;) (if_statement "if ((cVar5 != '-') && (cVar5 != '\0')) {\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }" if (parenthesized_expression "((cVar5 != '-') && (cVar5 != '\0'))" ( (binary_expression "(cVar5 != '-') && (cVar5 != '\0')" (parenthesized_expression "(cVar5 != '-')" ( (binary_expression "cVar5 != '-'" identifier != (char_literal "'-'" ' character ')) )) && (parenthesized_expression "(cVar5 != '\0')" ( (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }" { (do_statement "do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');" do (compound_statement "{\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    }" { (expression_statement "pcVar3 = pcVar3 + 1;" (assignment_expression "pcVar3 = pcVar3 + 1" identifier = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;) (expression_statement "cVar5 = *pcVar3;" (assignment_expression "cVar5 = *pcVar3" identifier = (pointer_expression "*pcVar3" * identifier)) ;) (if_statement "if (cVar5 == '\0') break;" if (parenthesized_expression "(cVar5 == '\0')" ( (binary_expression "cVar5 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (break_statement "break;" break ;)) }) while (parenthesized_expression "(cVar5 != '-')" ( (binary_expression "cVar5 != '-'" identifier != (char_literal "'-'" ' character ')) )) ;) })) (if_statement "if (cVar5 != '-') {\n                    \n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }" if (parenthesized_expression "(cVar5 != '-')" ( (binary_expression "cVar5 != '-'" identifier != (char_literal "'-'" ' character ')) )) (compound_statement "{\n                    \n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }" { (expression_statement "__assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");" (call_expression "__assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring")" identifier (argument_list "("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring")" ( (string_literal ""*str == \'-\'"" " string_content escape_sequence string_content escape_sequence ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh_fix_verstring"" " string_content ") ))) ;) })) (expression_statement "pcVar6 = pcVar3 + 1;" (assignment_expression "pcVar6 = pcVar3 + 1" identifier = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;) (expression_statement "cVar5 = pcVar3[1];" (assignment_expression "cVar5 = pcVar3[1]" identifier = (subscript_expression "pcVar3[1]" identifier [ number_literal ])) ;) (while_statement "while (cVar5 != '\0') {\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }" while (parenthesized_expression "(cVar5 != '\0')" ( (binary_expression "cVar5 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }" { (while_statement "while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }" while (parenthesized_expression "((cVar5 != '-' && (cVar5 != ' ')))" ( (parenthesized_expression "(cVar5 != '-' && (cVar5 != ' '))" ( (binary_expression "cVar5 != '-' && (cVar5 != ' ')" (binary_expression "cVar5 != '-'" identifier != (char_literal "'-'" ' character ')) && (parenthesized_expression "(cVar5 != ' ')" ( (binary_expression "cVar5 != ' '" identifier != (char_literal "' '" ' character ')) ))) )) )) (compound_statement "{\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }" { (expression_statement "pcVar6 = pcVar6 + 1;" (assignment_expression "pcVar6 = pcVar6 + 1" identifier = (binary_expression "pcVar6 + 1" identifier + number_literal)) ;) (expression_statement "cVar5 = *pcVar6;" (assignment_expression "cVar5 = *pcVar6" identifier = (pointer_expression "*pcVar6" * identifier)) ;) (if_statement "if (cVar5 == '\0') goto LAB_0002f777;" if (parenthesized_expression "(cVar5 == '\0')" ( (binary_expression "cVar5 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_0002f777;" goto statement_identifier ;)) })) (expression_statement "*pcVar6 = '_';" (assignment_expression "*pcVar6 = '_'" (pointer_expression "*pcVar6" * identifier) = (char_literal "'_'" ' character ')) ;) (expression_statement "pcVar6 = pcVar6 + 1;" (assignment_expression "pcVar6 = pcVar6 + 1" identifier = (binary_expression "pcVar6 + 1" identifier + number_literal)) ;) (expression_statement "cVar5 = *pcVar6;" (assignment_expression "cVar5 = *pcVar6" identifier = (pointer_expression "*pcVar6" * identifier)) ;) })) (labeled_statement "LAB_0002f777:\n  sVar2 = strcspn(__s,"\r\n");" statement_identifier : (expression_statement "sVar2 = strcspn(__s,"\r\n");" (assignment_expression "sVar2 = strcspn(__s,"\r\n")" identifier = (call_expression "strcspn(__s,"\r\n")" identifier (argument_list "(__s,"\r\n")" ( identifier , (string_literal ""\r\n"" " escape_sequence escape_sequence ") )))) ;)) (if_statement "if (*(int *)(param_1 + 0x198) == 2) {\n    __dest = (void *)FUN_0001a9b0(sVar2 + 1,1);\n    *(void **)(param_1 + 4) = __dest;\n    memcpy(__dest,__s,sVar2);\n    *(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;\n    sVar2 = strcspn(__s,"\r\n");\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x198) == 2)" ( (binary_expression "*(int *)(param_1 + 0x198) == 2" (pointer_expression "*(int *)(param_1 + 0x198)" * (cast_expression "(int *)(param_1 + 0x198)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x198)" ( (binary_expression "param_1 + 0x198" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    __dest = (void *)FUN_0001a9b0(sVar2 + 1,1);\n    *(void **)(param_1 + 4) = __dest;\n    memcpy(__dest,__s,sVar2);\n    *(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;\n    sVar2 = strcspn(__s,"\r\n");\n  }" { (expression_statement "__dest = (void *)FUN_0001a9b0(sVar2 + 1,1);" (assignment_expression "__dest = (void *)FUN_0001a9b0(sVar2 + 1,1)" identifier = (cast_expression "(void *)FUN_0001a9b0(sVar2 + 1,1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001a9b0(sVar2 + 1,1)" identifier (argument_list "(sVar2 + 1,1)" ( (binary_expression "sVar2 + 1" identifier + number_literal) , number_literal ))))) ;) (expression_statement "*(void **)(param_1 + 4) = __dest;" (assignment_expression "*(void **)(param_1 + 4) = __dest" (pointer_expression "*(void **)(param_1 + 4)" * (cast_expression "(void **)(param_1 + 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "memcpy(__dest,__s,sVar2);" (call_expression "memcpy(__dest,__s,sVar2)" identifier (argument_list "(__dest,__s,sVar2)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;" (assignment_expression "*(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0" (pointer_expression "*(undefined1 *)(*(int *)(param_1 + 4) + sVar2)" * (cast_expression "(undefined1 *)(*(int *)(param_1 + 4) + sVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 4) + sVar2)" ( (binary_expression "*(int *)(param_1 + 4) + sVar2" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) + identifier) )))) = number_literal) ;) (expression_statement "sVar2 = strcspn(__s,"\r\n");" (assignment_expression "sVar2 = strcspn(__s,"\r\n")" identifier = (call_expression "strcspn(__s,"\r\n")" identifier (argument_list "(__s,"\r\n")" ( identifier , (string_literal ""\r\n"" " escape_sequence escape_sequence ") )))) ;) })) (expression_statement "FUN_0002b2e0(param_1,"We claim version: %.*s",sVar2,__s);" (call_expression "FUN_0002b2e0(param_1,"We claim version: %.*s",sVar2,__s)" identifier (argument_list "(param_1,"We claim version: %.*s",sVar2,__s)" ( identifier , (string_literal ""We claim version: %.*s"" " string_content ") , identifier , identifier ))) ;) (expression_statement "sVar2 = strlen(__s);" (assignment_expression "sVar2 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "FUN_0002f620(sVar2);" (call_expression "FUN_0002f620(sVar2)" identifier (argument_list "(sVar2)" ( identifier ))) ;) (expression_statement "FUN_0001b240(__s);" (call_expression "FUN_0001b240(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence escape_sequence ") , IDENT , IDENT ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) < (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * IDENT) == (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( IDENT )) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (unary_expression ! IDENT) && (unary_expression ! IDENT)) )) != IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (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 = IDENT) ;) })) (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 ))))) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (char_literal ' character ')) )) && (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) ))) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (break_statement break ;)) }) while (parenthesized_expression ( (binary_expression IDENT != (char_literal ' character ')) )) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' character ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) (compound_statement { (while_statement while (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression IDENT != (char_literal ' character ')) && (parenthesized_expression ( (binary_expression IDENT != (char_literal ' character ')) ))) )) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (char_literal ' character ')) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " escape_sequence escape_sequence ") )))) ;)) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " escape_sequence escape_sequence ") )))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (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 ;) })))
(function_definition "void __regparm3 FUN_0002f690(int param_1,byte *param_2,undefined *param_3)\n\n{\n  undefined *puVar1;\n  char *__s;\n  size_t sVar2;\n  char *pcVar3;\n  void *__dest;\n  int iVar4;\n  char cVar5;\n  char *pcVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  bool bVar9;\n  bool bVar10;\n  \n  bVar9 = *(uint *)(param_1 + 0x198) < 2;\n  bVar10 = *(uint *)(param_1 + 0x198) == 2;\n  if (bVar10) {\n    __s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  else {\n    iVar4 = 5;\n    pbVar7 = param_2;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    \n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = FUN_0002d650();\n    puVar1 = &DAT_0007017d;\n    if (iVar4 < 1) {\n      puVar1 = param_3;\n    }\n    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  sVar2 = strlen((char *)param_2);\n  pcVar3 = __s + sVar2;\n  cVar5 = *pcVar3;\n  if ((cVar5 != '-') && (cVar5 != '\0')) {\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }\n  if (cVar5 != '-') {\n                    \n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }\n  pcVar6 = pcVar3 + 1;\n  cVar5 = pcVar3[1];\n  while (cVar5 != '\0') {\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }\nLAB_0002f777:\n  sVar2 = strcspn(__s,"\r\n");\n  if (*(int *)(param_1 + 0x198) == 2) {\n    __dest = (void *)FUN_0001a9b0(sVar2 + 1,1);\n    *(void **)(param_1 + 4) = __dest;\n    memcpy(__dest,__s,sVar2);\n    *(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;\n    sVar2 = strcspn(__s,"\r\n");\n  }\n  FUN_0002b2e0(param_1,"We claim version: %.*s",sVar2,__s);\n  sVar2 = strlen(__s);\n  FUN_0002f620(sVar2);\n  FUN_0001b240(__s);\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0002f690(int param_1,byte *param_2,undefined *param_3)" (identifier "FUN_0002f690") (parameter_list "(int param_1,byte *param_2,undefined *param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "byte *param_2" (type_identifier "byte") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined *param_3" (type_identifier "undefined") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  char *__s;\n  size_t sVar2;\n  char *pcVar3;\n  void *__dest;\n  int iVar4;\n  char cVar5;\n  char *pcVar6;\n  byte *pbVar7;\n  byte *pbVar8;\n  bool bVar9;\n  bool bVar10;\n  \n  bVar9 = *(uint *)(param_1 + 0x198) < 2;\n  bVar10 = *(uint *)(param_1 + 0x198) == 2;\n  if (bVar10) {\n    __s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  else {\n    iVar4 = 5;\n    pbVar7 = param_2;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    \n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = FUN_0002d650();\n    puVar1 = &DAT_0007017d;\n    if (iVar4 < 1) {\n      puVar1 = param_3;\n    }\n    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  sVar2 = strlen((char *)param_2);\n  pcVar3 = __s + sVar2;\n  cVar5 = *pcVar3;\n  if ((cVar5 != '-') && (cVar5 != '\0')) {\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }\n  if (cVar5 != '-') {\n                    \n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }\n  pcVar6 = pcVar3 + 1;\n  cVar5 = pcVar3[1];\n  while (cVar5 != '\0') {\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }\nLAB_0002f777:\n  sVar2 = strcspn(__s,"\r\n");\n  if (*(int *)(param_1 + 0x198) == 2) {\n    __dest = (void *)FUN_0001a9b0(sVar2 + 1,1);\n    *(void **)(param_1 + 4) = __dest;\n    memcpy(__dest,__s,sVar2);\n    *(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;\n    sVar2 = strcspn(__s,"\r\n");\n  }\n  FUN_0002b2e0(param_1,"We claim version: %.*s",sVar2,__s);\n  sVar2 = strlen(__s);\n  FUN_0002f620(sVar2);\n  FUN_0001b240(__s);\n  return;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (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 "void *__dest;" (primitive_type "void") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "char cVar5;" (primitive_type "char") (identifier "cVar5") (; ";")) (declaration "char *pcVar6;" (primitive_type "char") (pointer_declarator "*pcVar6" (* "*") (identifier "pcVar6")) (; ";")) (declaration "byte *pbVar7;" (type_identifier "byte") (pointer_declarator "*pbVar7" (* "*") (identifier "pbVar7")) (; ";")) (declaration "byte *pbVar8;" (type_identifier "byte") (pointer_declarator "*pbVar8" (* "*") (identifier "pbVar8")) (; ";")) (declaration "bool bVar9;" (primitive_type "bool") (identifier "bVar9") (; ";")) (declaration "bool bVar10;" (primitive_type "bool") (identifier "bVar10") (; ";")) (expression_statement "bVar9 = *(uint *)(param_1 + 0x198) < 2;" (assignment_expression "bVar9 = *(uint *)(param_1 + 0x198) < 2" (identifier "bVar9") (= "=") (binary_expression "*(uint *)(param_1 + 0x198) < 2" (pointer_expression "*(uint *)(param_1 + 0x198)" (* "*") (cast_expression "(uint *)(param_1 + 0x198)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x198)" (( "(") (binary_expression "param_1 + 0x198" (identifier "param_1") (+ "+") (number_literal "0x198")) () ")")))) (< "<") (number_literal "2"))) (; ";")) (expression_statement "bVar10 = *(uint *)(param_1 + 0x198) == 2;" (assignment_expression "bVar10 = *(uint *)(param_1 + 0x198) == 2" (identifier "bVar10") (= "=") (binary_expression "*(uint *)(param_1 + 0x198) == 2" (pointer_expression "*(uint *)(param_1 + 0x198)" (* "*") (cast_expression "(uint *)(param_1 + 0x198)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x198)" (( "(") (binary_expression "param_1 + 0x198" (identifier "param_1") (+ "+") (number_literal "0x198")) () ")")))) (== "==") (number_literal "2"))) (; ";")) (if_statement "if (bVar10) {\n    __s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }\n  else {\n    iVar4 = 5;\n    pbVar7 = param_2;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    \n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = FUN_0002d650();\n    puVar1 = &DAT_0007017d;\n    if (iVar4 < 1) {\n      puVar1 = param_3;\n    }\n    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }" (if "if") (parenthesized_expression "(bVar10)" (( "(") (identifier "bVar10") () ")")) (compound_statement "{\n    __s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }" ({ "{") (expression_statement "__s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);" (assignment_expression "__s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0)" (identifier "__s") (= "=") (cast_expression "(char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0)" (identifier "FUN_0001b020") (argument_list "("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0)" (( "(") (string_literal ""%s2.0-%s\r\n"" (" """) (string_content "%s2.0-%s") (escape_sequence "\r") (escape_sequence "\n") (" """)) (, ",") (identifier "param_2") (, ",") (identifier "PTR_s_PuTTY_Release_0_70_000a9ff0") () ")"))))) (; ";")) (} "}")) (else_clause "else {\n    iVar4 = 5;\n    pbVar7 = param_2;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    \n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = FUN_0002d650();\n    puVar1 = &DAT_0007017d;\n    if (iVar4 < 1) {\n      puVar1 = param_3;\n    }\n    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }" (else "else") (compound_statement "{\n    iVar4 = 5;\n    pbVar7 = param_2;\n    pbVar8 = &DAT_00075c81;\n    do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);\n    if ((!bVar9 && !bVar10) != bVar9) {\n                    \n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }\n    iVar4 = FUN_0002d650();\n    puVar1 = &DAT_0007017d;\n    if (iVar4 < 1) {\n      puVar1 = param_3;\n    }\n    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);\n  }" ({ "{") (expression_statement "iVar4 = 5;" (assignment_expression "iVar4 = 5" (identifier "iVar4") (= "=") (number_literal "5")) (; ";")) (expression_statement "pbVar7 = param_2;" (assignment_expression "pbVar7 = param_2" (identifier "pbVar7") (= "=") (identifier "param_2")) (; ";")) (expression_statement "pbVar8 = &DAT_00075c81;" (assignment_expression "pbVar8 = &DAT_00075c81" (identifier "pbVar8") (= "=") (pointer_expression "&DAT_00075c81" (& "&") (identifier "DAT_00075c81"))) (; ";")) (do_statement "do {\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    } while (bVar10);" (do "do") (compound_statement "{\n      if (iVar4 == 0) break;\n      iVar4 = iVar4 + -1;\n      bVar9 = *pbVar7 < *pbVar8;\n      bVar10 = *pbVar7 == *pbVar8;\n      pbVar7 = pbVar7 + 1;\n      pbVar8 = pbVar8 + 1;\n    }" ({ "{") (if_statement "if (iVar4 == 0) break;" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + -1" (identifier "iVar4") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "bVar9 = *pbVar7 < *pbVar8;" (assignment_expression "bVar9 = *pbVar7 < *pbVar8" (identifier "bVar9") (= "=") (binary_expression "*pbVar7 < *pbVar8" (pointer_expression "*pbVar7" (* "*") (identifier "pbVar7")) (< "<") (pointer_expression "*pbVar8" (* "*") (identifier "pbVar8")))) (; ";")) (expression_statement "bVar10 = *pbVar7 == *pbVar8;" (assignment_expression "bVar10 = *pbVar7 == *pbVar8" (identifier "bVar10") (= "=") (binary_expression "*pbVar7 == *pbVar8" (pointer_expression "*pbVar7" (* "*") (identifier "pbVar7")) (== "==") (pointer_expression "*pbVar8" (* "*") (identifier "pbVar8")))) (; ";")) (expression_statement "pbVar7 = pbVar7 + 1;" (assignment_expression "pbVar7 = pbVar7 + 1" (identifier "pbVar7") (= "=") (binary_expression "pbVar7 + 1" (identifier "pbVar7") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "pbVar8 = pbVar8 + 1;" (assignment_expression "pbVar8 = pbVar8 + 1" (identifier "pbVar8") (= "=") (binary_expression "pbVar8 + 1" (identifier "pbVar8") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(bVar10)" (( "(") (identifier "bVar10") () ")")) (; ";")) (if_statement "if ((!bVar9 && !bVar10) != bVar9) {\n                    \n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }" (if "if") (parenthesized_expression "((!bVar9 && !bVar10) != bVar9)" (( "(") (binary_expression "(!bVar9 && !bVar10) != bVar9" (parenthesized_expression "(!bVar9 && !bVar10)" (( "(") (binary_expression "!bVar9 && !bVar10" (unary_expression "!bVar9" (! "!") (identifier "bVar9")) (&& "&&") (unary_expression "!bVar10" (! "!") (identifier "bVar10"))) () ")")) (!= "!=") (identifier "bVar9")) () ")")) (compound_statement "{\n                    \n      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");\n    }" ({ "{") (expression_statement "__assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");" (call_expression "__assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring")" (identifier "__assert_fail") (argument_list "("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring")" (( "(") (string_literal ""!strcmp(protoname, \"SSH-\")"" (" """) (string_content "!strcmp(protoname, ") (escape_sequence "\"") (string_content "SSH-") (escape_sequence "\"") (string_content ")") (" """)) (, ",") (string_literal ""ssh.c"" (" """) (string_content "ssh.c") (" """)) (, ",") (number_literal "0xbff") (, ",") (string_literal ""ssh_send_verstring"" (" """) (string_content "ssh_send_verstring") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "iVar4 = FUN_0002d650();" (assignment_expression "iVar4 = FUN_0002d650()" (identifier "iVar4") (= "=") (call_expression "FUN_0002d650()" (identifier "FUN_0002d650") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "puVar1 = &DAT_0007017d;" (assignment_expression "puVar1 = &DAT_0007017d" (identifier "puVar1") (= "=") (pointer_expression "&DAT_0007017d" (& "&") (identifier "DAT_0007017d"))) (; ";")) (if_statement "if (iVar4 < 1) {\n      puVar1 = param_3;\n    }" (if "if") (parenthesized_expression "(iVar4 < 1)" (( "(") (binary_expression "iVar4 < 1" (identifier "iVar4") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n      puVar1 = param_3;\n    }" ({ "{") (expression_statement "puVar1 = param_3;" (assignment_expression "puVar1 = param_3" (identifier "puVar1") (= "=") (identifier "param_3")) (; ";")) (} "}"))) (expression_statement "__s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);" (assignment_expression "__s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0)" (identifier "__s") (= "=") (cast_expression "(char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0)" (identifier "FUN_0001b020") (argument_list "("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0)" (( "(") (string_literal ""SSH-%s-%s\n"" (" """) (string_content "SSH-%s-%s") (escape_sequence "\n") (" """)) (, ",") (identifier "puVar1") (, ",") (identifier "PTR_s_PuTTY_Release_0_70_000a9ff0") () ")"))))) (; ";")) (} "}")))) (expression_statement "sVar2 = strlen((char *)param_2);" (assignment_expression "sVar2 = strlen((char *)param_2)" (identifier "sVar2") (= "=") (call_expression "strlen((char *)param_2)" (identifier "strlen") (argument_list "((char *)param_2)" (( "(") (cast_expression "(char *)param_2" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_2")) () ")")))) (; ";")) (expression_statement "pcVar3 = __s + sVar2;" (assignment_expression "pcVar3 = __s + sVar2" (identifier "pcVar3") (= "=") (binary_expression "__s + sVar2" (identifier "__s") (+ "+") (identifier "sVar2"))) (; ";")) (expression_statement "cVar5 = *pcVar3;" (assignment_expression "cVar5 = *pcVar3" (identifier "cVar5") (= "=") (pointer_expression "*pcVar3" (* "*") (identifier "pcVar3"))) (; ";")) (if_statement "if ((cVar5 != '-') && (cVar5 != '\0')) {\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }" (if "if") (parenthesized_expression "((cVar5 != '-') && (cVar5 != '\0'))" (( "(") (binary_expression "(cVar5 != '-') && (cVar5 != '\0')" (parenthesized_expression "(cVar5 != '-')" (( "(") (binary_expression "cVar5 != '-'" (identifier "cVar5") (!= "!=") (char_literal "'-'" (' "'") (character "-") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(cVar5 != '\0')" (( "(") (binary_expression "cVar5 != '\0'" (identifier "cVar5") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (compound_statement "{\n    do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');\n  }" ({ "{") (do_statement "do {\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    } while (cVar5 != '-');" (do "do") (compound_statement "{\n      pcVar3 = pcVar3 + 1;\n      cVar5 = *pcVar3;\n      if (cVar5 == '\0') break;\n    }" ({ "{") (expression_statement "pcVar3 = pcVar3 + 1;" (assignment_expression "pcVar3 = pcVar3 + 1" (identifier "pcVar3") (= "=") (binary_expression "pcVar3 + 1" (identifier "pcVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "cVar5 = *pcVar3;" (assignment_expression "cVar5 = *pcVar3" (identifier "cVar5") (= "=") (pointer_expression "*pcVar3" (* "*") (identifier "pcVar3"))) (; ";")) (if_statement "if (cVar5 == '\0') break;" (if "if") (parenthesized_expression "(cVar5 == '\0')" (( "(") (binary_expression "cVar5 == '\0'" (identifier "cVar5") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (} "}")) (while "while") (parenthesized_expression "(cVar5 != '-')" (( "(") (binary_expression "cVar5 != '-'" (identifier "cVar5") (!= "!=") (char_literal "'-'" (' "'") (character "-") (' "'"))) () ")")) (; ";")) (} "}"))) (if_statement "if (cVar5 != '-') {\n                    \n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }" (if "if") (parenthesized_expression "(cVar5 != '-')" (( "(") (binary_expression "cVar5 != '-'" (identifier "cVar5") (!= "!=") (char_literal "'-'" (' "'") (character "-") (' "'"))) () ")")) (compound_statement "{\n                    \n    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");\n  }" ({ "{") (expression_statement "__assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");" (call_expression "__assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring")" (identifier "__assert_fail") (argument_list "("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring")" (( "(") (string_literal ""*str == \'-\'"" (" """) (string_content "*str == ") (escape_sequence "\'") (string_content "-") (escape_sequence "\'") (" """)) (, ",") (string_literal ""ssh.c"" (" """) (string_content "ssh.c") (" """)) (, ",") (number_literal "0xbe4") (, ",") (string_literal ""ssh_fix_verstring"" (" """) (string_content "ssh_fix_verstring") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "pcVar6 = pcVar3 + 1;" (assignment_expression "pcVar6 = pcVar3 + 1" (identifier "pcVar6") (= "=") (binary_expression "pcVar3 + 1" (identifier "pcVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "cVar5 = pcVar3[1];" (assignment_expression "cVar5 = pcVar3[1]" (identifier "cVar5") (= "=") (subscript_expression "pcVar3[1]" (identifier "pcVar3") ([ "[") (number_literal "1") (] "]"))) (; ";")) (while_statement "while (cVar5 != '\0') {\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }" (while "while") (parenthesized_expression "(cVar5 != '\0')" (( "(") (binary_expression "cVar5 != '\0'" (identifier "cVar5") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }\n    *pcVar6 = '_';\n    pcVar6 = pcVar6 + 1;\n    cVar5 = *pcVar6;\n  }" ({ "{") (while_statement "while ((cVar5 != '-' && (cVar5 != ' '))) {\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }" (while "while") (parenthesized_expression "((cVar5 != '-' && (cVar5 != ' ')))" (( "(") (parenthesized_expression "(cVar5 != '-' && (cVar5 != ' '))" (( "(") (binary_expression "cVar5 != '-' && (cVar5 != ' ')" (binary_expression "cVar5 != '-'" (identifier "cVar5") (!= "!=") (char_literal "'-'" (' "'") (character "-") (' "'"))) (&& "&&") (parenthesized_expression "(cVar5 != ' ')" (( "(") (binary_expression "cVar5 != ' '" (identifier "cVar5") (!= "!=") (char_literal "' '" (' "'") (character " ") (' "'"))) () ")"))) () ")")) () ")")) (compound_statement "{\n      pcVar6 = pcVar6 + 1;\n      cVar5 = *pcVar6;\n      if (cVar5 == '\0') goto LAB_0002f777;\n    }" ({ "{") (expression_statement "pcVar6 = pcVar6 + 1;" (assignment_expression "pcVar6 = pcVar6 + 1" (identifier "pcVar6") (= "=") (binary_expression "pcVar6 + 1" (identifier "pcVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "cVar5 = *pcVar6;" (assignment_expression "cVar5 = *pcVar6" (identifier "cVar5") (= "=") (pointer_expression "*pcVar6" (* "*") (identifier "pcVar6"))) (; ";")) (if_statement "if (cVar5 == '\0') goto LAB_0002f777;" (if "if") (parenthesized_expression "(cVar5 == '\0')" (( "(") (binary_expression "cVar5 == '\0'" (identifier "cVar5") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (goto_statement "goto LAB_0002f777;" (goto "goto") (statement_identifier "LAB_0002f777") (; ";"))) (} "}"))) (expression_statement "*pcVar6 = '_';" (assignment_expression "*pcVar6 = '_'" (pointer_expression "*pcVar6" (* "*") (identifier "pcVar6")) (= "=") (char_literal "'_'" (' "'") (character "_") (' "'"))) (; ";")) (expression_statement "pcVar6 = pcVar6 + 1;" (assignment_expression "pcVar6 = pcVar6 + 1" (identifier "pcVar6") (= "=") (binary_expression "pcVar6 + 1" (identifier "pcVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "cVar5 = *pcVar6;" (assignment_expression "cVar5 = *pcVar6" (identifier "cVar5") (= "=") (pointer_expression "*pcVar6" (* "*") (identifier "pcVar6"))) (; ";")) (} "}"))) (labeled_statement "LAB_0002f777:\n  sVar2 = strcspn(__s,"\r\n");" (statement_identifier "LAB_0002f777") (: ":") (expression_statement "sVar2 = strcspn(__s,"\r\n");" (assignment_expression "sVar2 = strcspn(__s,"\r\n")" (identifier "sVar2") (= "=") (call_expression "strcspn(__s,"\r\n")" (identifier "strcspn") (argument_list "(__s,"\r\n")" (( "(") (identifier "__s") (, ",") (string_literal ""\r\n"" (" """) (escape_sequence "\r") (escape_sequence "\n") (" """)) () ")")))) (; ";"))) (if_statement "if (*(int *)(param_1 + 0x198) == 2) {\n    __dest = (void *)FUN_0001a9b0(sVar2 + 1,1);\n    *(void **)(param_1 + 4) = __dest;\n    memcpy(__dest,__s,sVar2);\n    *(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;\n    sVar2 = strcspn(__s,"\r\n");\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x198) == 2)" (( "(") (binary_expression "*(int *)(param_1 + 0x198) == 2" (pointer_expression "*(int *)(param_1 + 0x198)" (* "*") (cast_expression "(int *)(param_1 + 0x198)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x198)" (( "(") (binary_expression "param_1 + 0x198" (identifier "param_1") (+ "+") (number_literal "0x198")) () ")")))) (== "==") (number_literal "2")) () ")")) (compound_statement "{\n    __dest = (void *)FUN_0001a9b0(sVar2 + 1,1);\n    *(void **)(param_1 + 4) = __dest;\n    memcpy(__dest,__s,sVar2);\n    *(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;\n    sVar2 = strcspn(__s,"\r\n");\n  }" ({ "{") (expression_statement "__dest = (void *)FUN_0001a9b0(sVar2 + 1,1);" (assignment_expression "__dest = (void *)FUN_0001a9b0(sVar2 + 1,1)" (identifier "__dest") (= "=") (cast_expression "(void *)FUN_0001a9b0(sVar2 + 1,1)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001a9b0(sVar2 + 1,1)" (identifier "FUN_0001a9b0") (argument_list "(sVar2 + 1,1)" (( "(") (binary_expression "sVar2 + 1" (identifier "sVar2") (+ "+") (number_literal "1")) (, ",") (number_literal "1") () ")"))))) (; ";")) (expression_statement "*(void **)(param_1 + 4) = __dest;" (assignment_expression "*(void **)(param_1 + 4) = __dest" (pointer_expression "*(void **)(param_1 + 4)" (* "*") (cast_expression "(void **)(param_1 + 4)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "__dest")) (; ";")) (expression_statement "memcpy(__dest,__s,sVar2);" (call_expression "memcpy(__dest,__s,sVar2)" (identifier "memcpy") (argument_list "(__dest,__s,sVar2)" (( "(") (identifier "__dest") (, ",") (identifier "__s") (, ",") (identifier "sVar2") () ")"))) (; ";")) (expression_statement "*(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;" (assignment_expression "*(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0" (pointer_expression "*(undefined1 *)(*(int *)(param_1 + 4) + sVar2)" (* "*") (cast_expression "(undefined1 *)(*(int *)(param_1 + 4) + sVar2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 4) + sVar2)" (( "(") (binary_expression "*(int *)(param_1 + 4) + sVar2" (pointer_expression "*(int *)(param_1 + 4)" (* "*") (cast_expression "(int *)(param_1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (+ "+") (identifier "sVar2")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "sVar2 = strcspn(__s,"\r\n");" (assignment_expression "sVar2 = strcspn(__s,"\r\n")" (identifier "sVar2") (= "=") (call_expression "strcspn(__s,"\r\n")" (identifier "strcspn") (argument_list "(__s,"\r\n")" (( "(") (identifier "__s") (, ",") (string_literal ""\r\n"" (" """) (escape_sequence "\r") (escape_sequence "\n") (" """)) () ")")))) (; ";")) (} "}"))) (expression_statement "FUN_0002b2e0(param_1,"We claim version: %.*s",sVar2,__s);" (call_expression "FUN_0002b2e0(param_1,"We claim version: %.*s",sVar2,__s)" (identifier "FUN_0002b2e0") (argument_list "(param_1,"We claim version: %.*s",sVar2,__s)" (( "(") (identifier "param_1") (, ",") (string_literal ""We claim version: %.*s"" (" """) (string_content "We claim version: %.*s") (" """)) (, ",") (identifier "sVar2") (, ",") (identifier "__s") () ")"))) (; ";")) (expression_statement "sVar2 = strlen(__s);" (assignment_expression "sVar2 = strlen(__s)" (identifier "sVar2") (= "=") (call_expression "strlen(__s)" (identifier "strlen") (argument_list "(__s)" (( "(") (identifier "__s") () ")")))) (; ";")) (expression_statement "FUN_0002f620(sVar2);" (call_expression "FUN_0002f620(sVar2)" (identifier "FUN_0002f620") (argument_list "(sVar2)" (( "(") (identifier "sVar2") () ")"))) (; ";")) (expression_statement "FUN_0001b240(__s);" (call_expression "FUN_0001b240(__s)" (identifier "FUN_0001b240") (argument_list "(__s)" (( "(") (identifier "__s") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void __regparm3 function_1(type_1 ssh,char *protoname,char *svers)

{
  char *var_9;
  size_t var_10;
  char *var_12;
  type_1 ssh_1;
  int var_2;
  char var_11;
  char *var_13;
  type_2 *var_3;
  type_2 *var_4;
  bool var_5;
  bool bVar10;
  
  var_5 = (type_3)ssh->version < 2;
  bVar10 = ssh->version == 2;
  if (bVar10) {
    var_9 = var_1("%s2.0-%s\r\n",protoname,PTR_sshver_000a9ff0);
  }
  else {
    var_2 = 5;
    var_3 = (type_2 *)protoname;
    var_4 = &DAT_00075c81;
    do {
      if (var_2 == 0) break;
      var_2 = var_2 + -1;
      var_5 = *var_3 < *var_4;
      bVar10 = *var_3 == *var_4;
      var_3 = var_3 + 1;
      var_4 = var_4 + 1;
    } while (bVar10);
    if ((!var_5 && !bVar10) != var_5) {
                    /* WARNING: Subroutine does not return */
      var_6("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");
    }
    var_2 = var_7(svers,"1.5");
    var_9 = "1.5";
    if (var_2 < 1) {
      var_9 = svers;
    }
    var_9 = var_1("SSH-%s-%s\n",var_9,PTR_sshver_000a9ff0);
  }
  var_10 = var_8(protoname);
  var_12 = var_9 + var_10;
  var_11 = *var_12;
  if ((var_11 != '-') && (var_11 != '\0')) {
    do {
      var_12 = var_12 + 1;
      var_11 = *var_12;
      if (var_11 == '\0') break;
    } while (var_11 != '-');
  }
  if (var_11 != '-') {
                    /* WARNING: Subroutine does not return */
    var_6("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");
  }
  var_13 = var_12 + 1;
  var_11 = var_12[1];
  while (var_11 != '\0') {
    while ((var_11 != '-' && (var_11 != ' '))) {
      var_13 = var_13 + 1;
      var_11 = *var_13;
      if (var_11 == '\0') goto LAB_0002f777;
    }
    *var_13 = '_';
    var_13 = var_13 + 1;
    var_11 = *var_13;
  }
LAB_0002f777:
  var_10 = var_14(var_9,"\r\n");
  if (ssh->version == 2) {
    var_12 = (char *)var_15(var_10 + 1,1);
    ssh->v_c = var_12;
    var_16(var_12,var_9,var_10);
    ssh->v_c[var_10] = '\0';
    var_10 = var_14(var_9,"\r\n");
  }
  var_17(ssh,"We claim version: %.*s",var_10,var_9);
  ssh_1 = (type_1)var_8(var_9);
  var_18((type_1)&ssh->s,ssh->logctx,(int)var_9,ssh_1);
  var_19(var_9);
  return;
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) 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: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (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) (escape_sequence)) (identifier) (identifier))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (do_statement body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (unary_expression argument: (identifier)) right: (unary_expression argument: (identifier)))) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (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: (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 (string_literal (string_content) (escape_sequence)) (identifier) (identifier))))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (character)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (break_statement))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (character))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (character)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) body: (compound_statement (while_statement condition: (parenthesized_expression (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (char_literal (character))) right: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (character))))))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (goto_statement label: (statement_identifier))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (char_literal (character)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (escape_sequence) (escape_sequence))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (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 (binary_expression left: (identifier) right: (number_literal)) (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))))) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (escape_sequence) (escape_sequence)))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)) (identifier) (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 (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 __regparm3 MASKED(int param_1,byte *param_2,undefined *param_3)

{
  undefined *puVar1;
  char *__s;
  size_t sVar2;
  char *pcVar3;
  void *__dest;
  int iVar4;
  char cVar5;
  char *pcVar6;
  byte *pbVar7;
  byte *pbVar8;
  bool bVar9;
  bool bVar10;
  
  bVar9 = *(uint *)(param_1 + 0x198) < 2;
  bVar10 = *(uint *)(param_1 + 0x198) == 2;
  if (bVar10) {
    __s = (char *)FUN_0001b020("%s2.0-%s\r\n",param_2,PTR_s_PuTTY_Release_0_70_000a9ff0);
  }
  else {
    iVar4 = 5;
    pbVar7 = param_2;
    pbVar8 = &DAT_00075c81;
    do {
      if (iVar4 == 0) break;
      iVar4 = iVar4 + -1;
      bVar9 = *pbVar7 < *pbVar8;
      bVar10 = *pbVar7 == *pbVar8;
      pbVar7 = pbVar7 + 1;
      pbVar8 = pbVar8 + 1;
    } while (bVar10);
    if ((!bVar9 && !bVar10) != bVar9) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("!strcmp(protoname, \"SSH-\")","ssh.c",0xbff,"ssh_send_verstring");
    }
    iVar4 = FUN_0002d650();
    puVar1 = &DAT_0007017d;
    if (iVar4 < 1) {
      puVar1 = param_3;
    }
    __s = (char *)FUN_0001b020("SSH-%s-%s\n",puVar1,PTR_s_PuTTY_Release_0_70_000a9ff0);
  }
  sVar2 = strlen((char *)param_2);
  pcVar3 = __s + sVar2;
  cVar5 = *pcVar3;
  if ((cVar5 != '-') && (cVar5 != '\0')) {
    do {
      pcVar3 = pcVar3 + 1;
      cVar5 = *pcVar3;
      if (cVar5 == '\0') break;
    } while (cVar5 != '-');
  }
  if (cVar5 != '-') {
                    /* WARNING: Subroutine does not return */
    __assert_fail("*str == \'-\'","ssh.c",0xbe4,"ssh_fix_verstring");
  }
  pcVar6 = pcVar3 + 1;
  cVar5 = pcVar3[1];
  while (cVar5 != '\0') {
    while ((cVar5 != '-' && (cVar5 != ' '))) {
      pcVar6 = pcVar6 + 1;
      cVar5 = *pcVar6;
      if (cVar5 == '\0') goto LAB_0002f777;
    }
    *pcVar6 = '_';
    pcVar6 = pcVar6 + 1;
    cVar5 = *pcVar6;
  }
LAB_0002f777:
  sVar2 = strcspn(__s,"\r\n");
  if (*(int *)(param_1 + 0x198) == 2) {
    __dest = (void *)FUN_0001a9b0(sVar2 + 1,1);
    *(void **)(param_1 + 4) = __dest;
    memcpy(__dest,__s,sVar2);
    *(undefined1 *)(*(int *)(param_1 + 4) + sVar2) = 0;
    sVar2 = strcspn(__s,"\r\n");
  }
  FUN_0002b2e0(param_1,"We claim version: %.*s",sVar2,__s);
  sVar2 = strlen(__s);
  FUN_0002f620(sVar2);
  FUN_0001b240(__s);
  return;
}

