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

char * __regparm3 make_filename(int index,char *subname)

{
  byte bVar1;
  char *pcVar2;
  char *pcVar3;
  __uid_t __uid;
  passwd *ppVar4;
  int iVar5;
  size_t sVar6;
  byte *pbVar7;
  byte bVar8;
  byte *pbVar9;
  byte *local_28;
  char *local_24;
  char *local_20;
  
  if (index != 0) {
    if (index == 4) {
      pcVar3 = getenv("PUTTYSESSIONS");
      if (pcVar3 != (char *)0x0) {
LAB_0003c562:
        pcVar3 = dupstr(pcVar3);
        return pcVar3;
      }
      pcVar2 = make_filename(0,(char *)0x0);
      pcVar3 = "%s/sessions";
    }
    else {
      if (index == 5) {
        if ((subname != (char *)0x0) && (*subname != '\0')) {
          sVar6 = strlen(subname);
          local_28 = (byte *)safemalloc(sVar6 * 3 + 1,1);
          bVar1 = *subname;
          pbVar7 = local_28;
          while (bVar1 != 0) {
LAB_0003c4e3:
            bVar8 = 1;
            if ((byte)(bVar1 - 0x2b) < 0x16) {
              bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;
            }
            if ((((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||
               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {
              *pbVar7 = bVar1;
              pbVar9 = pbVar7 + 1;
            }
            else {
              *pbVar7 = 0x25;
              pbVar9 = pbVar7 + 3;
              pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];
              pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];
            }
            subname = (char *)((byte *)subname + 1);
            pbVar7 = pbVar9;
            bVar1 = *subname;
          }
          *pbVar7 = 0;
          pcVar3 = make_filename(4,(char *)0x0);
          pcVar2 = dupprintf("%s/%s",pcVar3,local_28);
          safefree(pcVar3);
          safefree(local_28);
          return pcVar2;
        }
        pbVar7 = (byte *)safemalloc(0x31,1);
        subname = "Default Settings";
        bVar1 = 0x44;
        local_28 = pbVar7;
        goto LAB_0003c4e3;
      }
      if (index == 1) {
        pcVar3 = getenv("PUTTYSSHHOSTKEYS");
        if (pcVar3 != (char *)0x0) goto LAB_0003c562;
        pcVar2 = make_filename(0,(char *)0x0);
        pcVar3 = "%s/sshhostkeys";
      }
      else if (index == 2) {
        pcVar2 = make_filename(1,(char *)0x0);
        pcVar3 = "%s.tmp";
      }
      else if (index == 3) {
        pcVar3 = getenv("PUTTYRANDOMSEED");
        if (pcVar3 != (char *)0x0) goto LAB_0003c562;
        pcVar2 = make_filename(0,(char *)0x0);
        pcVar3 = "%s/randomseed";
      }
      else {
        pcVar2 = make_filename(0,(char *)0x0);
        pcVar3 = "%s/ERROR";
      }
    }
    pcVar3 = dupprintf(pcVar3,pcVar2);
    safefree(pcVar2);
    return pcVar3;
  }
  pcVar3 = getenv("PUTTYDIR");
  if (pcVar3 != (char *)0x0) {
    pcVar3 = dupstr(pcVar3);
    return pcVar3;
  }
  pcVar3 = getenv("HOME");
  __uid = getuid();
  ppVar4 = getpwuid(__uid);
  if (ppVar4 != (passwd *)0x0) {
    ppVar4 = (passwd *)ppVar4->pw_dir;
  }
  pcVar2 = getenv("XDG_CONFIG_HOME");
  pbVar7 = (byte *)0x0;
  if (((pcVar2 == (char *)0x0) || (*pcVar2 == '\0')) ||
     (local_24 = dupprintf("%s/putty",pcVar2), local_24 == (char *)0x0)) {
    if (pcVar3 != (char *)0x0) {
      local_24 = dupprintf("%s/.config/putty",pcVar3);
      if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {
        return local_24;
      }
      goto LAB_0003c379;
    }
    if (ppVar4 != (passwd *)0x0) {
      local_24 = dupprintf("%s/.config/putty",ppVar4);
      if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {
        return local_24;
      }
      goto LAB_0003c73d;
    }
    local_24 = dupprintf("%s/.config/putty",&DAT_000406dd);
    if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {
      return local_24;
    }
LAB_0003c7b9:
    pcVar3 = dupstr("/.putty");
    access(pcVar3,0);
    pcVar2 = (char *)0x0;
    pbVar9 = (byte *)pcVar3;
LAB_0003c7dd:
    local_28 = pbVar9;
    safefree(pbVar7);
    local_20 = pcVar2;
    goto LAB_0003c430;
  }
  iVar5 = access(local_24,0);
  if (iVar5 == 0) {
    return local_24;
  }
  if (pcVar3 == (char *)0x0) {
    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;
LAB_0003c73d:
    local_20 = dupprintf("%s/.putty",ppVar4);
    pcVar3 = dupstr("/.putty");
    goto LAB_0003c3e2;
  }
LAB_0003c379:
  pbVar7 = (byte *)dupprintf("%s/.putty",pcVar3);
  local_28 = pbVar7;
  if (ppVar4 == (passwd *)0x0) {
    pcVar3 = dupstr("/.putty");
    if (pbVar7 == (byte *)0x0) {
      access(pcVar3,0);
      pcVar2 = (char *)0x0;
      pbVar7 = (byte *)(char *)0x0;
      pbVar9 = (byte *)pcVar3;
      goto LAB_0003c7dd;
    }
    iVar5 = access((char *)pbVar7,0);
    if (iVar5 == 0) {
      local_20 = (char *)0x0;
    }
    else {
      iVar5 = access(pcVar3,0);
      local_20 = (char *)0x0;
      if (iVar5 != 0) goto LAB_0003c430;
LAB_0003c635:
      pcVar2 = local_20;
      pbVar7 = local_28;
      pbVar9 = (byte *)pcVar3;
      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;
      if (local_20 == pcVar3) goto LAB_0003c456;
    }
LAB_0003c436:
    safefree(local_20);
    local_20 = (char *)local_28;
  }
  else {
    local_20 = dupprintf("%s/.putty",ppVar4);
    pcVar3 = dupstr("/.putty");
    if (pbVar7 == (byte *)0x0) {
      pbVar7 = (byte *)0x0;
LAB_0003c3e2:
      if ((local_20 == (char *)0x0) || (iVar5 = access(local_20,0), iVar5 != 0)) {
        iVar5 = access(pcVar3,0);
        local_28 = pbVar7;
        if (iVar5 == 0) goto LAB_0003c635;
        if (pbVar7 == (byte *)0x0) {
          pcVar2 = (char *)pbVar7;
          pbVar9 = (byte *)pcVar3;
          if (local_20 == (char *)0x0) goto LAB_0003c7dd;
          goto LAB_0003c7fe;
        }
        goto LAB_0003c430;
      }
      if ((byte *)local_20 != pbVar7) {
LAB_0003c7fe:
        pcVar2 = local_20;
        pbVar9 = (byte *)local_20;
        goto LAB_0003c7dd;
      }
    }
    else {
      iVar5 = access((char *)pbVar7,0);
      if (iVar5 != 0) goto LAB_0003c3e2;
LAB_0003c430:
      if (local_28 != (byte *)local_20) goto LAB_0003c436;
    }
  }
  if (local_20 != pcVar3) {
    safefree(pcVar3);
  }
LAB_0003c456:
  if (local_20 != local_24) {
    safefree(local_24);
  }
  return local_20;
}



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

char * __regparm3 FUN_0003c240(int param_1,char *param_2)

{
  byte bVar1;
  undefined4 uVar2;
  char *pcVar3;
  __uid_t __uid;
  passwd *ppVar4;
  char *pcVar5;
  int iVar6;
  size_t sVar7;
  byte *pbVar8;
  byte bVar9;
  byte *pbVar10;
  byte *local_28;
  char *local_24;
  char *local_20;
  
  if (param_1 != 0) {
    if (param_1 == 4) {
      pcVar3 = getenv("PUTTYSESSIONS");
      if (pcVar3 != (char *)0x0) {
LAB_0003c562:
        pcVar3 = (char *)FUN_0001be70(pcVar3);
        return pcVar3;
      }
      uVar2 = FUN_0003c240();
      pcVar3 = "%s/sessions";
    }
    else {
      if (param_1 == 5) {
        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {
          sVar7 = strlen(param_2);
          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);
          bVar1 = *param_2;
          pbVar8 = local_28;
          while (bVar1 != 0) {
LAB_0003c4e3:
            bVar9 = 1;
            if ((byte)(bVar1 - 0x2b) < 0x16) {
              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;
            }
            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||
               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {
              *pbVar8 = bVar1;
              pbVar10 = pbVar8 + 1;
            }
            else {
              *pbVar8 = 0x25;
              pbVar10 = pbVar8 + 3;
              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];
              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];
            }
            param_2 = (char *)((byte *)param_2 + 1);
            pbVar8 = pbVar10;
            bVar1 = *param_2;
          }
          *pbVar8 = 0;
          uVar2 = FUN_0003c240();
          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);
          FUN_0001c5f0(uVar2);
          FUN_0001c5f0(local_28);
          return pcVar3;
        }
        pbVar8 = (byte *)FUN_0001bd60(0x31,1);
        param_2 = "Default Settings";
        bVar1 = 0x44;
        local_28 = pbVar8;
        goto LAB_0003c4e3;
      }
      if (param_1 == 1) {
        pcVar3 = getenv("PUTTYSSHHOSTKEYS");
        if (pcVar3 != (char *)0x0) goto LAB_0003c562;
        uVar2 = FUN_0003c240();
        pcVar3 = "%s/sshhostkeys";
      }
      else if (param_1 == 2) {
        uVar2 = FUN_0003c240();
        pcVar3 = "%s.tmp";
      }
      else if (param_1 == 3) {
        pcVar3 = getenv("PUTTYRANDOMSEED");
        if (pcVar3 != (char *)0x0) goto LAB_0003c562;
        uVar2 = FUN_0003c240();
        pcVar3 = "%s/randomseed";
      }
      else {
        uVar2 = FUN_0003c240();
        pcVar3 = "%s/ERROR";
      }
    }
    pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);
    FUN_0001c5f0(uVar2);
    return pcVar3;
  }
  pcVar3 = getenv("PUTTYDIR");
  if (pcVar3 != (char *)0x0) {
    pcVar3 = (char *)FUN_0001be70(pcVar3);
    return pcVar3;
  }
  pcVar3 = getenv("HOME");
  __uid = getuid();
  ppVar4 = getpwuid(__uid);
  if (ppVar4 != (passwd *)0x0) {
    ppVar4 = (passwd *)ppVar4->pw_dir;
  }
  pcVar5 = getenv("XDG_CONFIG_HOME");
  pbVar8 = (byte *)0x0;
  if (((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||
     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)) {
    if (pcVar3 != (char *)0x0) {
      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);
      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {
        return local_24;
      }
      goto LAB_0003c379;
    }
    if (ppVar4 != (passwd *)0x0) {
      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);
      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {
        return local_24;
      }
      goto LAB_0003c73d;
    }
    local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);
    if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {
      return local_24;
    }
LAB_0003c7b9:
    pcVar3 = (char *)FUN_0001be70("/.putty");
    access(pcVar3,0);
    pcVar5 = (char *)0x0;
    pbVar10 = (byte *)pcVar3;
LAB_0003c7dd:
    local_28 = pbVar10;
    FUN_0001c5f0(pbVar8);
    local_20 = pcVar5;
    goto LAB_0003c430;
  }
  iVar6 = access(local_24,0);
  if (iVar6 == 0) {
    return local_24;
  }
  if (pcVar3 == (char *)0x0) {
    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;
LAB_0003c73d:
    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);
    pcVar3 = (char *)FUN_0001be70("/.putty");
    goto LAB_0003c3e2;
  }
LAB_0003c379:
  pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3);
  local_28 = pbVar8;
  if (ppVar4 == (passwd *)0x0) {
    pcVar3 = (char *)FUN_0001be70("/.putty");
    if (pbVar8 == (byte *)0x0) {
      access(pcVar3,0);
      pcVar5 = (char *)0x0;
      pbVar8 = (byte *)(char *)0x0;
      pbVar10 = (byte *)pcVar3;
      goto LAB_0003c7dd;
    }
    iVar6 = access((char *)pbVar8,0);
    if (iVar6 == 0) {
      local_20 = (char *)0x0;
    }
    else {
      iVar6 = access(pcVar3,0);
      local_20 = (char *)0x0;
      if (iVar6 != 0) goto LAB_0003c430;
LAB_0003c635:
      pcVar5 = local_20;
      pbVar8 = local_28;
      pbVar10 = (byte *)pcVar3;
      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;
      if (local_20 == pcVar3) goto LAB_0003c456;
    }
LAB_0003c436:
    FUN_0001c5f0(local_20);
    local_20 = (char *)local_28;
  }
  else {
    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);
    pcVar3 = (char *)FUN_0001be70("/.putty");
    if (pbVar8 == (byte *)0x0) {
      pbVar8 = (byte *)0x0;
LAB_0003c3e2:
      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {
        iVar6 = access(pcVar3,0);
        local_28 = pbVar8;
        if (iVar6 == 0) goto LAB_0003c635;
        if (pbVar8 == (byte *)0x0) {
          pcVar5 = (char *)pbVar8;
          pbVar10 = (byte *)pcVar3;
          if (local_20 == (char *)0x0) goto LAB_0003c7dd;
          goto LAB_0003c7fe;
        }
        goto LAB_0003c430;
      }
      if ((byte *)local_20 != pbVar8) {
LAB_0003c7fe:
        pcVar5 = local_20;
        pbVar10 = (byte *)local_20;
        goto LAB_0003c7dd;
      }
    }
    else {
      iVar6 = access((char *)pbVar8,0);
      if (iVar6 != 0) goto LAB_0003c3e2;
LAB_0003c430:
      if (local_28 != (byte *)local_20) goto LAB_0003c436;
    }
  }
  if (local_20 != pcVar3) {
    FUN_0001c5f0(pcVar3);
  }
LAB_0003c456:
  if (local_20 != local_24) {
    FUN_0001c5f0(local_24);
  }
  return local_20;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014540
ADD EBX,0x20c1b
SUB ESP,0x1c
TEST EAX,EAX
JZ 0x0003c2b8
CMP EAX,0x4
JZ 0x0003c548
CMP EAX,0x5
JZ 0x0003c478
CMP EAX,0x1
JZ 0x0003c5b0
CMP EAX,0x2
JZ 0x0003c6c0
CMP EAX,0x3
JZ 0x0003c580
XOR EDX,EDX
XOR EAX,EAX
CALL 0x0003c240
SUB ESP,0x8
MOV ESI,EAX
PUSH EAX
LEA EAX,[EBX + 0xfffed775]
PUSH EAX
CALL 0x0001c3d0
MOV dword ptr [ESP],ESI
MOV EBP,EAX
CALL 0x0001c5f0
ADD ESP,0x10
ADD ESP,0x1c
MOV EAX,EBP
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
LEA EAX,[EBX + 0xfffed6e4]
PUSH EAX
CALL 0x00012240
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JZ 0x0003c2f0
SUB ESP,0xc
PUSH EAX
CALL 0x0001be70
ADD ESP,0x10
ADD ESP,0x1c
MOV EBP,EAX
POP EBX
MOV EAX,EBP
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
LEA EAX,[EBX + 0xfffed6f8]
PUSH EAX
CALL 0x00012240
MOV dword ptr [ESP + 0x14],EAX
CALL 0x000121b0
MOV dword ptr [ESP],EAX
CALL 0x000120a0
ADD ESP,0x10
MOV EDI,EAX
TEST EAX,EAX
JZ 0x0003c31c
MOV EDI,dword ptr [EAX + 0x14]
SUB ESP,0xc
LEA EAX,[EBX + 0xfffed6ed]
PUSH EAX
CALL 0x00012240
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003c33b
CMP byte ptr [EAX],0x0
JNZ 0x0003c770
MOV EAX,dword ptr [ESP + 0x4]
TEST EAX,EAX
JZ 0x0003c700
SUB ESP,0x8
LEA EAX,[EBX + 0xfffed77e]
PUSH dword ptr [ESP + 0xc]
PUSH EAX
CALL 0x0001c3d0
ADD ESP,0x10
MOV EBP,EAX
TEST EAX,EAX
JZ 0x0003c379
SUB ESP,0x8
PUSH 0x0
PUSH EAX
CALL 0x000123f0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003c2ab
SUB ESP,0x8
LEA ESI,[EBX + 0xfffed706]
PUSH dword ptr [ESP + 0xc]
PUSH ESI
CALL 0x0001c3d0
MOV dword ptr [ESP + 0x14],EAX
ADD ESP,0x10
TEST EDI,EDI
JZ 0x0003c5e0
SUB ESP,0x8
PUSH EDI
PUSH ESI
CALL 0x0001c3d0
MOV dword ptr [ESP + 0x1c],EAX
LEA EAX,[EBX + 0xfffed708]
MOV dword ptr [ESP],EAX
CALL 0x0001be70
ADD ESP,0x10
MOV ESI,dword ptr [ESP + 0x4]
MOV EDI,EAX
TEST ESI,ESI
JZ 0x0003c89a
SUB ESP,0x8
PUSH 0x0
PUSH ESI
CALL 0x000123f0
ADD ESP,0x10
MOV dword ptr [ESP + 0x8],EBP
TEST EAX,EAX
JZ 0x0003c808
MOV EAX,dword ptr [ESP + 0xc]
TEST EAX,EAX
JZ 0x0003c400
SUB ESP,0x8
PUSH 0x0
PUSH EAX
CALL 0x000123f0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003c7f0
SUB ESP,0x8
PUSH 0x0
PUSH EDI
CALL 0x000123f0
ADD ESP,0x10
MOV EBP,dword ptr [ESP + 0xc]
MOV dword ptr [ESP + 0x4],ESI
TEST EAX,EAX
JZ 0x0003c635
TEST ESI,ESI
JZ 0x0003c85c
LEA ESI,[ESI]
LEA ESI,[ESI]
CMP dword ptr [ESP + 0x4],EBP
JZ 0x0003c446
SUB ESP,0xc
PUSH EBP
CALL 0x0001c5f0
ADD ESP,0x10
MOV EBP,dword ptr [ESP + 0x4]
CMP EBP,EDI
JZ 0x0003c456
SUB ESP,0xc
PUSH EDI
CALL 0x0001c5f0
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x8]
CMP EBP,EAX
JZ 0x0003c2ab
SUB ESP,0xc
PUSH EAX
CALL 0x0001c5f0
ADD ESP,0x10
JMP 0x0003c2ab
TEST EDX,EDX
JZ 0x0003c650
CMP byte ptr [EDX],0x0
JZ 0x0003c650
SUB ESP,0xc
PUSH EDX
MOV dword ptr [ESP + 0x18],EDX
CALL 0x00012310
POP ESI
POP EDI
PUSH 0x1
LEA EAX,[EAX + EAX*0x2 + 0x1]
PUSH EAX
CALL 0x0001bd60
MOV EDX,dword ptr [ESP + 0x18]
MOV dword ptr [ESP + 0x14],EAX
MOV EDI,EAX
ADD ESP,0x10
MOVZX EAX,byte ptr [EDX]
TEST AL,AL
JZ 0x0003c678
MOV EDI,dword ptr [ESP + 0x4]
MOV EBP,0x20000d
MOV ESI,EDX
JMP 0x0003c4e3
MOV byte ptr [EDI],AL
ADD EDI,0x1
ADD ESI,0x1
MOVZX EAX,byte ptr [ESI]
TEST AL,AL
JZ 0x0003c678
LEA ECX,[EAX + -0x2b]
MOV EDX,0x1
CMP CL,0x15
JA 0x0003c4f9
MOV EDX,EBP
SHR EDX,CL
NOT EDX
AND EDX,0x1
CMP AL,0x5f
JZ 0x0003c4d0
TEST DL,DL
JZ 0x0003c4d0
LEA EDX,[EAX + -0x30]
CMP DL,0x9
JBE 0x0003c4d0
MOV EDX,EAX
AND EDX,0xffffffdf
SUB EDX,0x41
CMP DL,0x19
JBE 0x0003c4d0
MOV byte ptr [EDI],0x25
MOVZX EAX,byte ptr [ESI]
ADD EDI,0x3
SHR AL,0x4
MOVZX EAX,AL
MOVZX EAX,byte ptr [EBX + EAX*0x1 + 0xfffed990]
MOV byte ptr [EDI + -0x2],AL
MOVZX EAX,byte ptr [ESI]
AND EAX,0xf
MOVZX EAX,byte ptr [EBX + EAX*0x1 + 0xfffed990]
MOV byte ptr [EDI + -0x1],AL
JMP 0x0003c4d5
SUB ESP,0xc
LEA EAX,[EBX + 0xfffed710]
PUSH EAX
CALL 0x00012240
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003c6e0
SUB ESP,0xc
PUSH EAX
CALL 0x0001be70
ADD ESP,0x10
ADD ESP,0x1c
MOV EBP,EAX
POP EBX
MOV EAX,EBP
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
LEA EAX,[EBX + 0xfffed757]
PUSH EAX
CALL 0x00012240
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0003c562
XOR EDX,EDX
XOR EAX,EAX
CALL 0x0003c240
SUB ESP,0x8
MOV ESI,EAX
PUSH EAX
LEA EAX,[EBX + 0xfffed767]
JMP 0x0003c298
SUB ESP,0xc
LEA EAX,[EBX + 0xfffed730]
PUSH EAX
CALL 0x00012240
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0003c562
XOR EDX,EDX
XOR EAX,EAX
CALL 0x0003c240
SUB ESP,0x8
MOV ESI,EAX
PUSH EAX
LEA EAX,[EBX + 0xfffed741]
JMP 0x0003c298
SUB ESP,0xc
LEA EAX,[EBX + 0xfffed708]
PUSH EAX
CALL 0x0001be70
ADD ESP,0x10
MOV EDI,EAX
MOV EAX,dword ptr [ESP + 0x4]
TEST EAX,EAX
JZ 0x0003c87b
SUB ESP,0x8
PUSH 0x0
PUSH dword ptr [ESP + 0x10]
CALL 0x000123f0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003c870
SUB ESP,0x8
PUSH 0x0
PUSH EDI
CALL 0x000123f0
ADD ESP,0x10
MOV dword ptr [ESP + 0x8],EBP
XOR EBP,EBP
TEST EAX,EAX
JNZ 0x0003c430
MOV EAX,dword ptr [ESP + 0x4]
CMP EDI,EAX
JZ 0x0003c8a5
MOV ESI,EAX
MOV dword ptr [ESP + 0x4],EDI
JMP 0x0003c7dd
SUB ESP,0x8
PUSH 0x1
PUSH 0x31
CALL 0x0001bd60
LEA EDX,[EBX + 0xfffed6d3]
MOV dword ptr [ESP + 0x14],EAX
ADD ESP,0x10
MOV EAX,0x44
JMP 0x0003c4bc
MOV byte ptr [EDI],0x0
XOR EDX,EDX
MOV EAX,0x4
CALL 0x0003c240
SUB ESP,0x4
MOV EDI,dword ptr [ESP + 0x8]
MOV ESI,EAX
PUSH EDI
PUSH EAX
LEA EAX,[EBX + 0xfffed72a]
PUSH EAX
CALL 0x0001c3d0
MOV dword ptr [ESP],ESI
MOV EBP,EAX
CALL 0x0001c5f0
MOV dword ptr [ESP],EDI
CALL 0x0001c5f0
ADD ESP,0x10
JMP 0x0003c2ab
XOR EDX,EDX
MOV EAX,0x1
CALL 0x0003c240
SUB ESP,0x8
MOV ESI,EAX
PUSH EAX
LEA EAX,[EBX + 0xfffed750]
JMP 0x0003c298
XOR EDX,EDX
XOR EAX,EAX
CALL 0x0003c240
SUB ESP,0x8
MOV ESI,EAX
PUSH EAX
LEA EAX,[EBX + 0xfffed71e]
JMP 0x0003c298
TEST EDI,EDI
JZ 0x0003c818
SUB ESP,0x8
LEA EAX,[EBX + 0xfffed77e]
PUSH EDI
PUSH EAX
CALL 0x0001c3d0
MOV dword ptr [ESP + 0x18],EAX
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003c73d
SUB ESP,0x8
PUSH 0x0
MOV EBP,dword ptr [ESP + 0x14]
PUSH EBP
CALL 0x000123f0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003c2ab
SUB ESP,0x8
LEA EAX,[EBX + 0xfffed706]
PUSH EDI
PUSH EAX
CALL 0x0001c3d0
MOV dword ptr [ESP + 0x1c],EAX
LEA EAX,[EBX + 0xfffed708]
MOV dword ptr [ESP],EAX
CALL 0x0001be70
ADD ESP,0x10
MOV EDI,EAX
JMP 0x0003c3e2
SUB ESP,0x8
PUSH EAX
LEA EAX,[EBX + 0xfffed6fd]
PUSH EAX
CALL 0x0001c3d0
MOV dword ptr [ESP + 0x18],EAX
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003c33b
SUB ESP,0x8
PUSH 0x0
MOV EBP,dword ptr [ESP + 0x14]
PUSH EBP
CALL 0x000123f0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003c2ab
MOV EAX,dword ptr [ESP + 0x4]
TEST EAX,EAX
JNZ 0x0003c379
TEST EDI,EDI
JNZ 0x0003c73d
SUB ESP,0xc
LEA EAX,[EBX + 0xfffed708]
XOR EBP,EBP
PUSH EAX
CALL 0x0001be70
MOV dword ptr [ESP + 0x14],EAX
POP EDX
MOV EDI,EAX
POP ECX
PUSH 0x0
PUSH EAX
CALL 0x000123f0
ADD ESP,0x10
SUB ESP,0xc
PUSH ESI
CALL 0x0001c5f0
ADD ESP,0x10
JMP 0x0003c430
MOV EBP,dword ptr [ESP + 0xc]
CMP dword ptr [ESP + 0xc],ESI
JZ 0x0003c446
MOV dword ptr [ESP + 0x4],EBP
JMP 0x0003c7dd
MOV EBP,dword ptr [ESP + 0xc]
JMP 0x0003c430
SUB ESP,0x8
LEA EAX,[EBX + 0xfffe3879]
PUSH EAX
LEA EAX,[EBX + 0xfffed77e]
PUSH EAX
CALL 0x0001c3d0
MOV dword ptr [ESP + 0x18],EAX
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003c7b9
SUB ESP,0x8
PUSH 0x0
MOV EBP,dword ptr [ESP + 0x14]
PUSH EBP
CALL 0x000123f0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0003c7b9
JMP 0x0003c2ab
TEST EBP,EBP
JNZ 0x0003c7fe
MOV EBP,ESI
MOV dword ptr [ESP + 0x4],EDI
JMP 0x0003c7dd
MOV dword ptr [ESP + 0x8],EBP
XOR EBP,EBP
JMP 0x0003c436
SUB ESP,0x8
XOR ESI,ESI
PUSH 0x0
PUSH EDI
CALL 0x000123f0
ADD ESP,0x10
MOV dword ptr [ESP + 0x8],EBP
XOR EBP,EBP
MOV dword ptr [ESP + 0x4],EDI
JMP 0x0003c7dd
MOV dword ptr [ESP + 0x8],EBP
XOR ESI,ESI
JMP 0x0003c3e2
CMP EBP,EDI
JNZ 0x0003c436
JMP 0x0003c456
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * __regparm3 FUN_0003c240(int param_1,char *param_2)\n\n{\n  byte bVar1;\n  undefined4 uVar2;\n  char *pcVar3;\n  __uid_t __uid;\n  passwd *ppVar4;\n  char *pcVar5;\n  int iVar6;\n  size_t sVar7;\n  byte *pbVar8;\n  byte bVar9;\n  byte *pbVar10;\n  byte *local_28;\n  char *local_24;\n  char *local_20;\n  \n  if (param_1 != 0) {\n    if (param_1 == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);\n    FUN_0001c5f0(uVar2);\n    return pcVar3;\n  }\n  pcVar3 = getenv("PUTTYDIR");\n  if (pcVar3 != (char *)0x0) {\n    pcVar3 = (char *)FUN_0001be70(pcVar3);\n    return pcVar3;\n  }\n  pcVar3 = getenv("HOME");\n  __uid = getuid();\n  ppVar4 = getpwuid(__uid);\n  if (ppVar4 != (passwd *)0x0) {\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }\n  pcVar5 = getenv("XDG_CONFIG_HOME");\n  pbVar8 = (byte *)0x0;\n  if (((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||\n     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)) {\n    if (pcVar3 != (char *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    access(pcVar3,0);\n    pcVar5 = (char *)0x0;\n    pbVar10 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar10;\n    FUN_0001c5f0(pbVar8);\n    local_20 = pcVar5;\n    goto LAB_0003c430;\n  }\n  iVar6 = access(local_24,0);\n  if (iVar6 == 0) {\n    return local_24;\n  }\n  if (pcVar3 == (char *)0x0) {\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    goto LAB_0003c3e2;\n  }\nLAB_0003c379:\n  pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3);\n  local_28 = pbVar8;\n  if (ppVar4 == (passwd *)0x0) {\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar6 = access((char *)pbVar8,0);\n    if (iVar6 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    FUN_0001c5f0(local_20);\n    local_20 = (char *)local_28;\n  }\n  else {\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }\n  if (local_20 != pcVar3) {\n    FUN_0001c5f0(pcVar3);\n  }\nLAB_0003c456:\n  if (local_20 != local_24) {\n    FUN_0001c5f0(local_24);\n  }\n  return local_20;\n}\n\n" comment (function_definition "char * __regparm3 FUN_0003c240(int param_1,char *param_2)\n\n{\n  byte bVar1;\n  undefined4 uVar2;\n  char *pcVar3;\n  __uid_t __uid;\n  passwd *ppVar4;\n  char *pcVar5;\n  int iVar6;\n  size_t sVar7;\n  byte *pbVar8;\n  byte bVar9;\n  byte *pbVar10;\n  byte *local_28;\n  char *local_24;\n  char *local_20;\n  \n  if (param_1 != 0) {\n    if (param_1 == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);\n    FUN_0001c5f0(uVar2);\n    return pcVar3;\n  }\n  pcVar3 = getenv("PUTTYDIR");\n  if (pcVar3 != (char *)0x0) {\n    pcVar3 = (char *)FUN_0001be70(pcVar3);\n    return pcVar3;\n  }\n  pcVar3 = getenv("HOME");\n  __uid = getuid();\n  ppVar4 = getpwuid(__uid);\n  if (ppVar4 != (passwd *)0x0) {\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }\n  pcVar5 = getenv("XDG_CONFIG_HOME");\n  pbVar8 = (byte *)0x0;\n  if (((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||\n     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)) {\n    if (pcVar3 != (char *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    access(pcVar3,0);\n    pcVar5 = (char *)0x0;\n    pbVar10 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar10;\n    FUN_0001c5f0(pbVar8);\n    local_20 = pcVar5;\n    goto LAB_0003c430;\n  }\n  iVar6 = access(local_24,0);\n  if (iVar6 == 0) {\n    return local_24;\n  }\n  if (pcVar3 == (char *)0x0) {\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    goto LAB_0003c3e2;\n  }\nLAB_0003c379:\n  pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3);\n  local_28 = pbVar8;\n  if (ppVar4 == (passwd *)0x0) {\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar6 = access((char *)pbVar8,0);\n    if (iVar6 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    FUN_0001c5f0(local_20);\n    local_20 = (char *)local_28;\n  }\n  else {\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }\n  if (local_20 != pcVar3) {\n    FUN_0001c5f0(pcVar3);\n  }\nLAB_0003c456:\n  if (local_20 != local_24) {\n    FUN_0001c5f0(local_24);\n  }\n  return local_20;\n}" primitive_type (pointer_declarator "* __regparm3 FUN_0003c240(int param_1,char *param_2)" * (ERROR "__regparm3" identifier) (function_declarator "FUN_0003c240(int param_1,char *param_2)" identifier (parameter_list "(int param_1,char *param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  byte bVar1;\n  undefined4 uVar2;\n  char *pcVar3;\n  __uid_t __uid;\n  passwd *ppVar4;\n  char *pcVar5;\n  int iVar6;\n  size_t sVar7;\n  byte *pbVar8;\n  byte bVar9;\n  byte *pbVar10;\n  byte *local_28;\n  char *local_24;\n  char *local_20;\n  \n  if (param_1 != 0) {\n    if (param_1 == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);\n    FUN_0001c5f0(uVar2);\n    return pcVar3;\n  }\n  pcVar3 = getenv("PUTTYDIR");\n  if (pcVar3 != (char *)0x0) {\n    pcVar3 = (char *)FUN_0001be70(pcVar3);\n    return pcVar3;\n  }\n  pcVar3 = getenv("HOME");\n  __uid = getuid();\n  ppVar4 = getpwuid(__uid);\n  if (ppVar4 != (passwd *)0x0) {\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }\n  pcVar5 = getenv("XDG_CONFIG_HOME");\n  pbVar8 = (byte *)0x0;\n  if (((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||\n     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)) {\n    if (pcVar3 != (char *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    access(pcVar3,0);\n    pcVar5 = (char *)0x0;\n    pbVar10 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar10;\n    FUN_0001c5f0(pbVar8);\n    local_20 = pcVar5;\n    goto LAB_0003c430;\n  }\n  iVar6 = access(local_24,0);\n  if (iVar6 == 0) {\n    return local_24;\n  }\n  if (pcVar3 == (char *)0x0) {\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    goto LAB_0003c3e2;\n  }\nLAB_0003c379:\n  pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3);\n  local_28 = pbVar8;\n  if (ppVar4 == (passwd *)0x0) {\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar6 = access((char *)pbVar8,0);\n    if (iVar6 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    FUN_0001c5f0(local_20);\n    local_20 = (char *)local_28;\n  }\n  else {\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }\n  if (local_20 != pcVar3) {\n    FUN_0001c5f0(pcVar3);\n  }\nLAB_0003c456:\n  if (local_20 != local_24) {\n    FUN_0001c5f0(local_24);\n  }\n  return local_20;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "__uid_t __uid;" type_identifier identifier ;) (declaration "passwd *ppVar4;" type_identifier (pointer_declarator "*ppVar4" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "size_t sVar7;" primitive_type identifier ;) (declaration "byte *pbVar8;" type_identifier (pointer_declarator "*pbVar8" * identifier) ;) (declaration "byte bVar9;" type_identifier identifier ;) (declaration "byte *pbVar10;" type_identifier (pointer_declarator "*pbVar10" * identifier) ;) (declaration "byte *local_28;" type_identifier (pointer_declarator "*local_28" * identifier) ;) (declaration "char *local_24;" primitive_type (pointer_declarator "*local_24" * identifier) ;) (declaration "char *local_20;" primitive_type (pointer_declarator "*local_20" * identifier) ;) (if_statement "if (param_1 != 0) {\n    if (param_1 == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);\n    FUN_0001c5f0(uVar2);\n    return pcVar3;\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_1 == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);\n    FUN_0001c5f0(uVar2);\n    return pcVar3;\n  }" { (if_statement "if (param_1 == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }" if (parenthesized_expression "(param_1 == 4)" ( (binary_expression "param_1 == 4" identifier == number_literal) )) (compound_statement "{\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }" { (expression_statement "pcVar3 = getenv("PUTTYSESSIONS");" (assignment_expression "pcVar3 = getenv("PUTTYSESSIONS")" identifier = (call_expression "getenv("PUTTYSESSIONS")" identifier (argument_list "("PUTTYSESSIONS")" ( (string_literal ""PUTTYSESSIONS"" " string_content ") )))) ;) (if_statement "if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }" if (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }" { (labeled_statement "LAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);" statement_identifier : (expression_statement "pcVar3 = (char *)FUN_0001be70(pcVar3);" (assignment_expression "pcVar3 = (char *)FUN_0001be70(pcVar3)" identifier = (cast_expression "(char *)FUN_0001be70(pcVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001be70(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier ))))) ;)) (return_statement "return pcVar3;" return identifier ;) })) (expression_statement "uVar2 = FUN_0003c240();" (assignment_expression "uVar2 = FUN_0003c240()" identifier = (call_expression "FUN_0003c240()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar3 = "%s/sessions";" (assignment_expression "pcVar3 = "%s/sessions"" identifier = (string_literal ""%s/sessions"" " string_content ")) ;) }) (else_clause "else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }" else (compound_statement "{\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }" { (if_statement "if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }" if (parenthesized_expression "(param_1 == 5)" ( (binary_expression "param_1 == 5" identifier == number_literal) )) (compound_statement "{\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }" { (if_statement "if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }" if (parenthesized_expression "(((byte *)param_2 != (byte *)0x0) && (*param_2 != 0))" ( (binary_expression "((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)" (parenthesized_expression "((byte *)param_2 != (byte *)0x0)" ( (binary_expression "(byte *)param_2 != (byte *)0x0" (cast_expression "(byte *)param_2" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) != (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(*param_2 != 0)" ( (binary_expression "*param_2 != 0" (pointer_expression "*param_2" * identifier) != number_literal) ))) )) (compound_statement "{\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }" { (expression_statement "sVar7 = strlen(param_2);" (assignment_expression "sVar7 = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);" (assignment_expression "local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1)" identifier = (cast_expression "(byte *)FUN_0001bd60(sVar7 * 3 + 1,1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001bd60(sVar7 * 3 + 1,1)" identifier (argument_list "(sVar7 * 3 + 1,1)" ( (binary_expression "sVar7 * 3 + 1" (binary_expression "sVar7 * 3" identifier * number_literal) + number_literal) , number_literal ))))) ;) (expression_statement "bVar1 = *param_2;" (assignment_expression "bVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "pbVar8 = local_28;" (assignment_expression "pbVar8 = local_28" identifier = identifier) ;) (while_statement "while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }" while (parenthesized_expression "(bVar1 != 0)" ( (binary_expression "bVar1 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }" { (labeled_statement "LAB_0003c4e3:\n            bVar9 = 1;" statement_identifier : (expression_statement "bVar9 = 1;" (assignment_expression "bVar9 = 1" identifier = number_literal) ;)) (if_statement "if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }" if (parenthesized_expression "((byte)(bVar1 - 0x2b) < 0x16)" ( (binary_expression "(byte)(bVar1 - 0x2b) < 0x16" (call_expression "(byte)(bVar1 - 0x2b)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar1 - 0x2b)" ( (binary_expression "bVar1 - 0x2b" identifier - number_literal) ))) < number_literal) )) (compound_statement "{\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }" { (expression_statement "bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;" (assignment_expression "bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1" identifier = (binary_expression "~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1" (unary_expression "~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f))" ~ (call_expression "(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f))" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(0x20000d >> (bVar1 - 0x2b & 0x1f))" ( (binary_expression "0x20000d >> (bVar1 - 0x2b & 0x1f)" number_literal >> (parenthesized_expression "(bVar1 - 0x2b & 0x1f)" ( (binary_expression "bVar1 - 0x2b & 0x1f" (binary_expression "bVar1 - 0x2b" identifier - number_literal) & number_literal) ))) )))) & number_literal)) ;) })) (if_statement "if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }" if (parenthesized_expression "((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a))" ( (binary_expression "(((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)" (parenthesized_expression "(((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10))" ( (binary_expression "((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)" (parenthesized_expression "((bVar1 == 0x5f) || (bVar9 == 0))" ( (binary_expression "(bVar1 == 0x5f) || (bVar9 == 0)" (parenthesized_expression "(bVar1 == 0x5f)" ( (binary_expression "bVar1 == 0x5f" identifier == number_literal) )) || (parenthesized_expression "(bVar9 == 0)" ( (binary_expression "bVar9 == 0" identifier == number_literal) ))) )) || (parenthesized_expression "((byte)(bVar1 - 0x30) < 10)" ( (binary_expression "(byte)(bVar1 - 0x30) < 10" (call_expression "(byte)(bVar1 - 0x30)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar1 - 0x30)" ( (binary_expression "bVar1 - 0x30" identifier - number_literal) ))) < number_literal) ))) )) || (parenthesized_expression "((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)" ( (binary_expression "(byte)((bVar1 & 0xdf) + 0xbf) < 0x1a" (call_expression "(byte)((bVar1 & 0xdf) + 0xbf)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "((bVar1 & 0xdf) + 0xbf)" ( (binary_expression "(bVar1 & 0xdf) + 0xbf" (parenthesized_expression "(bVar1 & 0xdf)" ( (binary_expression "bVar1 & 0xdf" identifier & number_literal) )) + number_literal) ))) < number_literal) ))) )) (compound_statement "{\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }" { (expression_statement "*pbVar8 = bVar1;" (assignment_expression "*pbVar8 = bVar1" (pointer_expression "*pbVar8" * identifier) = identifier) ;) (expression_statement "pbVar10 = pbVar8 + 1;" (assignment_expression "pbVar10 = pbVar8 + 1" identifier = (binary_expression "pbVar8 + 1" identifier + number_literal)) ;) }) (else_clause "else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }" else (compound_statement "{\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }" { (expression_statement "*pbVar8 = 0x25;" (assignment_expression "*pbVar8 = 0x25" (pointer_expression "*pbVar8" * identifier) = number_literal) ;) (expression_statement "pbVar10 = pbVar8 + 3;" (assignment_expression "pbVar10 = pbVar8 + 3" identifier = (binary_expression "pbVar8 + 3" identifier + number_literal)) ;) (expression_statement "pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];" (assignment_expression "pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4]" (subscript_expression "pbVar8[1]" identifier [ number_literal ]) = (subscript_expression ""0123456789ABCDEF"[(byte)*param_2 >> 4]" (string_literal ""0123456789ABCDEF"" " string_content ") [ (binary_expression "(byte)*param_2 >> 4" (binary_expression "(byte)*param_2" (parenthesized_expression "(byte)" ( identifier )) * identifier) >> number_literal) ])) ;) (expression_statement "pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];" (assignment_expression "pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf]" (subscript_expression "pbVar8[2]" identifier [ number_literal ]) = (subscript_expression ""0123456789ABCDEF"[(byte)*param_2 & 0xf]" (string_literal ""0123456789ABCDEF"" " string_content ") [ (binary_expression "(byte)*param_2 & 0xf" (binary_expression "(byte)*param_2" (parenthesized_expression "(byte)" ( identifier )) * identifier) & number_literal) ])) ;) }))) (expression_statement "param_2 = (char *)((byte *)param_2 + 1);" (assignment_expression "param_2 = (char *)((byte *)param_2 + 1)" identifier = (cast_expression "(char *)((byte *)param_2 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)param_2 + 1)" ( (binary_expression "(byte *)param_2 + 1" (cast_expression "(byte *)param_2" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) ;) (expression_statement "pbVar8 = pbVar10;" (assignment_expression "pbVar8 = pbVar10" identifier = identifier) ;) (expression_statement "bVar1 = *param_2;" (assignment_expression "bVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) })) (expression_statement "*pbVar8 = 0;" (assignment_expression "*pbVar8 = 0" (pointer_expression "*pbVar8" * identifier) = number_literal) ;) (expression_statement "uVar2 = FUN_0003c240();" (assignment_expression "uVar2 = FUN_0003c240()" identifier = (call_expression "FUN_0003c240()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);" (assignment_expression "pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28)" identifier = (cast_expression "(char *)FUN_0001c3d0("%s/%s",uVar2,local_28)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c3d0("%s/%s",uVar2,local_28)" identifier (argument_list "("%s/%s",uVar2,local_28)" ( (string_literal ""%s/%s"" " string_content ") , identifier , identifier ))))) ;) (expression_statement "FUN_0001c5f0(uVar2);" (call_expression "FUN_0001c5f0(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (expression_statement "FUN_0001c5f0(local_28);" (call_expression "FUN_0001c5f0(local_28)" identifier (argument_list "(local_28)" ( identifier ))) ;) (return_statement "return pcVar3;" return identifier ;) })) (expression_statement "pbVar8 = (byte *)FUN_0001bd60(0x31,1);" (assignment_expression "pbVar8 = (byte *)FUN_0001bd60(0x31,1)" identifier = (cast_expression "(byte *)FUN_0001bd60(0x31,1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001bd60(0x31,1)" identifier (argument_list "(0x31,1)" ( number_literal , number_literal ))))) ;) (expression_statement "param_2 = "Default Settings";" (assignment_expression "param_2 = "Default Settings"" identifier = (string_literal ""Default Settings"" " string_content ")) ;) (expression_statement "bVar1 = 0x44;" (assignment_expression "bVar1 = 0x44" identifier = number_literal) ;) (expression_statement "local_28 = pbVar8;" (assignment_expression "local_28 = pbVar8" identifier = identifier) ;) (goto_statement "goto LAB_0003c4e3;" goto statement_identifier ;) })) (if_statement "if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" if (parenthesized_expression "(param_1 == 1)" ( (binary_expression "param_1 == 1" identifier == number_literal) )) (compound_statement "{\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }" { (expression_statement "pcVar3 = getenv("PUTTYSSHHOSTKEYS");" (assignment_expression "pcVar3 = getenv("PUTTYSSHHOSTKEYS")" identifier = (call_expression "getenv("PUTTYSSHHOSTKEYS")" identifier (argument_list "("PUTTYSSHHOSTKEYS")" ( (string_literal ""PUTTYSSHHOSTKEYS"" " string_content ") )))) ;) (if_statement "if (pcVar3 != (char *)0x0) goto LAB_0003c562;" if (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0003c562;" goto statement_identifier ;)) (expression_statement "uVar2 = FUN_0003c240();" (assignment_expression "uVar2 = FUN_0003c240()" identifier = (call_expression "FUN_0003c240()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar3 = "%s/sshhostkeys";" (assignment_expression "pcVar3 = "%s/sshhostkeys"" identifier = (string_literal ""%s/sshhostkeys"" " string_content ")) ;) }) (else_clause "else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" else (if_statement "if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" if (parenthesized_expression "(param_1 == 2)" ( (binary_expression "param_1 == 2" identifier == number_literal) )) (compound_statement "{\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }" { (expression_statement "uVar2 = FUN_0003c240();" (assignment_expression "uVar2 = FUN_0003c240()" identifier = (call_expression "FUN_0003c240()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar3 = "%s.tmp";" (assignment_expression "pcVar3 = "%s.tmp"" identifier = (string_literal ""%s.tmp"" " string_content ")) ;) }) (else_clause "else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" else (if_statement "if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" if (parenthesized_expression "(param_1 == 3)" ( (binary_expression "param_1 == 3" identifier == number_literal) )) (compound_statement "{\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }" { (expression_statement "pcVar3 = getenv("PUTTYRANDOMSEED");" (assignment_expression "pcVar3 = getenv("PUTTYRANDOMSEED")" identifier = (call_expression "getenv("PUTTYRANDOMSEED")" identifier (argument_list "("PUTTYRANDOMSEED")" ( (string_literal ""PUTTYRANDOMSEED"" " string_content ") )))) ;) (if_statement "if (pcVar3 != (char *)0x0) goto LAB_0003c562;" if (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0003c562;" goto statement_identifier ;)) (expression_statement "uVar2 = FUN_0003c240();" (assignment_expression "uVar2 = FUN_0003c240()" identifier = (call_expression "FUN_0003c240()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar3 = "%s/randomseed";" (assignment_expression "pcVar3 = "%s/randomseed"" identifier = (string_literal ""%s/randomseed"" " string_content ")) ;) }) (else_clause "else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" else (compound_statement "{\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" { (expression_statement "uVar2 = FUN_0003c240();" (assignment_expression "uVar2 = FUN_0003c240()" identifier = (call_expression "FUN_0003c240()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar3 = "%s/ERROR";" (assignment_expression "pcVar3 = "%s/ERROR"" identifier = (string_literal ""%s/ERROR"" " string_content ")) ;) }))))))) }))) (expression_statement "pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);" (assignment_expression "pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2)" identifier = (cast_expression "(char *)FUN_0001c3d0(pcVar3,uVar2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c3d0(pcVar3,uVar2)" identifier (argument_list "(pcVar3,uVar2)" ( identifier , identifier ))))) ;) (expression_statement "FUN_0001c5f0(uVar2);" (call_expression "FUN_0001c5f0(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return pcVar3;" return identifier ;) })) (expression_statement "pcVar3 = getenv("PUTTYDIR");" (assignment_expression "pcVar3 = getenv("PUTTYDIR")" identifier = (call_expression "getenv("PUTTYDIR")" identifier (argument_list "("PUTTYDIR")" ( (string_literal ""PUTTYDIR"" " string_content ") )))) ;) (if_statement "if (pcVar3 != (char *)0x0) {\n    pcVar3 = (char *)FUN_0001be70(pcVar3);\n    return pcVar3;\n  }" if (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar3 = (char *)FUN_0001be70(pcVar3);\n    return pcVar3;\n  }" { (expression_statement "pcVar3 = (char *)FUN_0001be70(pcVar3);" (assignment_expression "pcVar3 = (char *)FUN_0001be70(pcVar3)" identifier = (cast_expression "(char *)FUN_0001be70(pcVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001be70(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier ))))) ;) (return_statement "return pcVar3;" return identifier ;) })) (expression_statement "pcVar3 = getenv("HOME");" (assignment_expression "pcVar3 = getenv("HOME")" identifier = (call_expression "getenv("HOME")" identifier (argument_list "("HOME")" ( (string_literal ""HOME"" " string_content ") )))) ;) (expression_statement "__uid = getuid();" (assignment_expression "__uid = getuid()" identifier = (call_expression "getuid()" identifier (argument_list "()" ( )))) ;) (expression_statement "ppVar4 = getpwuid(__uid);" (assignment_expression "ppVar4 = getpwuid(__uid)" identifier = (call_expression "getpwuid(__uid)" identifier (argument_list "(__uid)" ( identifier )))) ;) (if_statement "if (ppVar4 != (passwd *)0x0) {\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }" if (parenthesized_expression "(ppVar4 != (passwd *)0x0)" ( (binary_expression "ppVar4 != (passwd *)0x0" identifier != (cast_expression "(passwd *)0x0" ( (type_descriptor "passwd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }" { (expression_statement "ppVar4 = (passwd *)ppVar4->pw_dir;" (assignment_expression "ppVar4 = (passwd *)ppVar4->pw_dir" identifier = (cast_expression "(passwd *)ppVar4->pw_dir" ( (type_descriptor "passwd *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "ppVar4->pw_dir" identifier -> field_identifier))) ;) })) (expression_statement "pcVar5 = getenv("XDG_CONFIG_HOME");" (assignment_expression "pcVar5 = getenv("XDG_CONFIG_HOME")" identifier = (call_expression "getenv("XDG_CONFIG_HOME")" identifier (argument_list "("XDG_CONFIG_HOME")" ( (string_literal ""XDG_CONFIG_HOME"" " string_content ") )))) ;) (expression_statement "pbVar8 = (byte *)0x0;" (assignment_expression "pbVar8 = (byte *)0x0" identifier = (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||\n     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)) {\n    if (pcVar3 != (char *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    access(pcVar3,0);\n    pcVar5 = (char *)0x0;\n    pbVar10 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar10;\n    FUN_0001c5f0(pbVar8);\n    local_20 = pcVar5;\n    goto LAB_0003c430;\n  }" if (parenthesized_expression "(((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||\n     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0))" ( (binary_expression "((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||\n     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)" (parenthesized_expression "((pcVar5 == (char *)0x0) || (*pcVar5 == '\0'))" ( (binary_expression "(pcVar5 == (char *)0x0) || (*pcVar5 == '\0')" (parenthesized_expression "(pcVar5 == (char *)0x0)" ( (binary_expression "pcVar5 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(*pcVar5 == '\0')" ( (binary_expression "*pcVar5 == '\0'" (pointer_expression "*pcVar5" * identifier) == (char_literal "'\0'" ' escape_sequence ')) ))) )) || (parenthesized_expression "(local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)" ( (comma_expression "local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0" (assignment_expression "local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5)" identifier = (cast_expression "(char *)FUN_0001c3d0("%s/putty",pcVar5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c3d0("%s/putty",pcVar5)" identifier (argument_list "("%s/putty",pcVar5)" ( (string_literal ""%s/putty"" " string_content ") , identifier ))))) , (binary_expression "local_24 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (compound_statement "{\n    if (pcVar3 != (char *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    access(pcVar3,0);\n    pcVar5 = (char *)0x0;\n    pbVar10 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar10;\n    FUN_0001c5f0(pbVar8);\n    local_20 = pcVar5;\n    goto LAB_0003c430;\n  }" { (if_statement "if (pcVar3 != (char *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }" if (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }" { (expression_statement "local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);" (assignment_expression "local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3)" identifier = (cast_expression "(char *)FUN_0001c3d0("%s/.config/putty",pcVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c3d0("%s/.config/putty",pcVar3)" identifier (argument_list "("%s/.config/putty",pcVar3)" ( (string_literal ""%s/.config/putty"" " string_content ") , identifier ))))) ;) (if_statement "if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }" if (parenthesized_expression "((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0))" ( (binary_expression "(local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)" (parenthesized_expression "(local_24 != (char *)0x0)" ( (binary_expression "local_24 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar6 = access(local_24,0), iVar6 == 0)" ( (comma_expression "iVar6 = access(local_24,0), iVar6 == 0" (assignment_expression "iVar6 = access(local_24,0)" identifier = (call_expression "access(local_24,0)" identifier (argument_list "(local_24,0)" ( identifier , number_literal )))) , (binary_expression "iVar6 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n        return local_24;\n      }" { (return_statement "return local_24;" return identifier ;) })) (goto_statement "goto LAB_0003c379;" goto statement_identifier ;) })) (if_statement "if (ppVar4 != (passwd *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }" if (parenthesized_expression "(ppVar4 != (passwd *)0x0)" ( (binary_expression "ppVar4 != (passwd *)0x0" identifier != (cast_expression "(passwd *)0x0" ( (type_descriptor "passwd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }" { (expression_statement "local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);" (assignment_expression "local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4)" identifier = (cast_expression "(char *)FUN_0001c3d0("%s/.config/putty",ppVar4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c3d0("%s/.config/putty",ppVar4)" identifier (argument_list "("%s/.config/putty",ppVar4)" ( (string_literal ""%s/.config/putty"" " string_content ") , identifier ))))) ;) (if_statement "if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }" if (parenthesized_expression "((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0))" ( (binary_expression "(local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)" (parenthesized_expression "(local_24 != (char *)0x0)" ( (binary_expression "local_24 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar6 = access(local_24,0), iVar6 == 0)" ( (comma_expression "iVar6 = access(local_24,0), iVar6 == 0" (assignment_expression "iVar6 = access(local_24,0)" identifier = (call_expression "access(local_24,0)" identifier (argument_list "(local_24,0)" ( identifier , number_literal )))) , (binary_expression "iVar6 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n        return local_24;\n      }" { (return_statement "return local_24;" return identifier ;) })) (goto_statement "goto LAB_0003c73d;" goto statement_identifier ;) })) (expression_statement "local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);" (assignment_expression "local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd)" identifier = (cast_expression "(char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c3d0("%s/.config/putty",&DAT_000406dd)" identifier (argument_list "("%s/.config/putty",&DAT_000406dd)" ( (string_literal ""%s/.config/putty"" " string_content ") , (pointer_expression "&DAT_000406dd" & identifier) ))))) ;) (if_statement "if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n      return local_24;\n    }" if (parenthesized_expression "((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0))" ( (binary_expression "(local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)" (parenthesized_expression "(local_24 != (char *)0x0)" ( (binary_expression "local_24 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar6 = access(local_24,0), iVar6 == 0)" ( (comma_expression "iVar6 = access(local_24,0), iVar6 == 0" (assignment_expression "iVar6 = access(local_24,0)" identifier = (call_expression "access(local_24,0)" identifier (argument_list "(local_24,0)" ( identifier , number_literal )))) , (binary_expression "iVar6 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n      return local_24;\n    }" { (return_statement "return local_24;" return identifier ;) })) (labeled_statement "LAB_0003c7b9:\n    pcVar3 = (char *)FUN_0001be70("/.putty");" statement_identifier : (expression_statement "pcVar3 = (char *)FUN_0001be70("/.putty");" (assignment_expression "pcVar3 = (char *)FUN_0001be70("/.putty")" identifier = (cast_expression "(char *)FUN_0001be70("/.putty")" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001be70("/.putty")" identifier (argument_list "("/.putty")" ( (string_literal ""/.putty"" " string_content ") ))))) ;)) (expression_statement "access(pcVar3,0);" (call_expression "access(pcVar3,0)" identifier (argument_list "(pcVar3,0)" ( identifier , number_literal ))) ;) (expression_statement "pcVar5 = (char *)0x0;" (assignment_expression "pcVar5 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pbVar10 = (byte *)pcVar3;" (assignment_expression "pbVar10 = (byte *)pcVar3" identifier = (cast_expression "(byte *)pcVar3" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (labeled_statement "LAB_0003c7dd:\n    local_28 = pbVar10;" statement_identifier : (expression_statement "local_28 = pbVar10;" (assignment_expression "local_28 = pbVar10" identifier = identifier) ;)) (expression_statement "FUN_0001c5f0(pbVar8);" (call_expression "FUN_0001c5f0(pbVar8)" identifier (argument_list "(pbVar8)" ( identifier ))) ;) (expression_statement "local_20 = pcVar5;" (assignment_expression "local_20 = pcVar5" identifier = identifier) ;) (goto_statement "goto LAB_0003c430;" goto statement_identifier ;) })) (expression_statement "iVar6 = access(local_24,0);" (assignment_expression "iVar6 = access(local_24,0)" identifier = (call_expression "access(local_24,0)" identifier (argument_list "(local_24,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar6 == 0) {\n    return local_24;\n  }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n    return local_24;\n  }" { (return_statement "return local_24;" return identifier ;) })) (if_statement "if (pcVar3 == (char *)0x0) {\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    goto LAB_0003c3e2;\n  }" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    goto LAB_0003c3e2;\n  }" { (if_statement "if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;" if (parenthesized_expression "(ppVar4 == (passwd *)0x0)" ( (binary_expression "ppVar4 == (passwd *)0x0" identifier == (cast_expression "(passwd *)0x0" ( (type_descriptor "passwd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0003c7b9;" goto statement_identifier ;)) (labeled_statement "LAB_0003c73d:\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);" statement_identifier : (expression_statement "local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);" (assignment_expression "local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4)" identifier = (cast_expression "(char *)FUN_0001c3d0("%s/.putty",ppVar4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c3d0("%s/.putty",ppVar4)" identifier (argument_list "("%s/.putty",ppVar4)" ( (string_literal ""%s/.putty"" " string_content ") , identifier ))))) ;)) (expression_statement "pcVar3 = (char *)FUN_0001be70("/.putty");" (assignment_expression "pcVar3 = (char *)FUN_0001be70("/.putty")" identifier = (cast_expression "(char *)FUN_0001be70("/.putty")" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001be70("/.putty")" identifier (argument_list "("/.putty")" ( (string_literal ""/.putty"" " string_content ") ))))) ;) (goto_statement "goto LAB_0003c3e2;" goto statement_identifier ;) })) (labeled_statement "LAB_0003c379:\n  pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3);" statement_identifier : (expression_statement "pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3);" (assignment_expression "pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3)" identifier = (cast_expression "(byte *)FUN_0001c3d0("%s/.putty",pcVar3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c3d0("%s/.putty",pcVar3)" identifier (argument_list "("%s/.putty",pcVar3)" ( (string_literal ""%s/.putty"" " string_content ") , identifier ))))) ;)) (expression_statement "local_28 = pbVar8;" (assignment_expression "local_28 = pbVar8" identifier = identifier) ;) (if_statement "if (ppVar4 == (passwd *)0x0) {\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar6 = access((char *)pbVar8,0);\n    if (iVar6 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    FUN_0001c5f0(local_20);\n    local_20 = (char *)local_28;\n  }\n  else {\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }" if (parenthesized_expression "(ppVar4 == (passwd *)0x0)" ( (binary_expression "ppVar4 == (passwd *)0x0" identifier == (cast_expression "(passwd *)0x0" ( (type_descriptor "passwd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar6 = access((char *)pbVar8,0);\n    if (iVar6 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    FUN_0001c5f0(local_20);\n    local_20 = (char *)local_28;\n  }" { (expression_statement "pcVar3 = (char *)FUN_0001be70("/.putty");" (assignment_expression "pcVar3 = (char *)FUN_0001be70("/.putty")" identifier = (cast_expression "(char *)FUN_0001be70("/.putty")" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001be70("/.putty")" identifier (argument_list "("/.putty")" ( (string_literal ""/.putty"" " string_content ") ))))) ;) (if_statement "if (pbVar8 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }" if (parenthesized_expression "(pbVar8 == (byte *)0x0)" ( (binary_expression "pbVar8 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }" { (expression_statement "access(pcVar3,0);" (call_expression "access(pcVar3,0)" identifier (argument_list "(pcVar3,0)" ( identifier , number_literal ))) ;) (expression_statement "pcVar5 = (char *)0x0;" (assignment_expression "pcVar5 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pbVar8 = (byte *)(char *)0x0;" (assignment_expression "pbVar8 = (byte *)(char *)0x0" identifier = (cast_expression "(byte *)(char *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ;) (expression_statement "pbVar10 = (byte *)pcVar3;" (assignment_expression "pbVar10 = (byte *)pcVar3" identifier = (cast_expression "(byte *)pcVar3" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (goto_statement "goto LAB_0003c7dd;" goto statement_identifier ;) })) (expression_statement "iVar6 = access((char *)pbVar8,0);" (assignment_expression "iVar6 = access((char *)pbVar8,0)" identifier = (call_expression "access((char *)pbVar8,0)" identifier (argument_list "((char *)pbVar8,0)" ( (cast_expression "(char *)pbVar8" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , number_literal )))) ;) (if_statement "if (iVar6 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n      local_20 = (char *)0x0;\n    }" { (expression_statement "local_20 = (char *)0x0;" (assignment_expression "local_20 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }" else (compound_statement "{\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }" { (expression_statement "iVar6 = access(pcVar3,0);" (assignment_expression "iVar6 = access(pcVar3,0)" identifier = (call_expression "access(pcVar3,0)" identifier (argument_list "(pcVar3,0)" ( identifier , number_literal )))) ;) (expression_statement "local_20 = (char *)0x0;" (assignment_expression "local_20 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (iVar6 != 0) goto LAB_0003c430;" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0003c430;" goto statement_identifier ;)) (labeled_statement "LAB_0003c635:\n      pcVar5 = local_20;" statement_identifier : (expression_statement "pcVar5 = local_20;" (assignment_expression "pcVar5 = local_20" identifier = identifier) ;)) (expression_statement "pbVar8 = local_28;" (assignment_expression "pbVar8 = local_28" identifier = identifier) ;) (expression_statement "pbVar10 = (byte *)pcVar3;" (assignment_expression "pbVar10 = (byte *)pcVar3" identifier = (cast_expression "(byte *)pcVar3" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;" if (parenthesized_expression "((byte *)pcVar3 != local_28)" ( (binary_expression "(byte *)pcVar3 != local_28" (cast_expression "(byte *)pcVar3" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) != identifier) )) (goto_statement "goto LAB_0003c7dd;" goto statement_identifier ;)) (if_statement "if (local_20 == pcVar3) goto LAB_0003c456;" if (parenthesized_expression "(local_20 == pcVar3)" ( (binary_expression "local_20 == pcVar3" identifier == identifier) )) (goto_statement "goto LAB_0003c456;" goto statement_identifier ;)) }))) (labeled_statement "LAB_0003c436:\n    FUN_0001c5f0(local_20);" statement_identifier : (expression_statement "FUN_0001c5f0(local_20);" (call_expression "FUN_0001c5f0(local_20)" identifier (argument_list "(local_20)" ( identifier ))) ;)) (expression_statement "local_20 = (char *)local_28;" (assignment_expression "local_20 = (char *)local_28" identifier = (cast_expression "(char *)local_28" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) }) (else_clause "else {\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }" else (compound_statement "{\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }" { (expression_statement "local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);" (assignment_expression "local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4)" identifier = (cast_expression "(char *)FUN_0001c3d0("%s/.putty",ppVar4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c3d0("%s/.putty",ppVar4)" identifier (argument_list "("%s/.putty",ppVar4)" ( (string_literal ""%s/.putty"" " string_content ") , identifier ))))) ;) (expression_statement "pcVar3 = (char *)FUN_0001be70("/.putty");" (assignment_expression "pcVar3 = (char *)FUN_0001be70("/.putty")" identifier = (cast_expression "(char *)FUN_0001be70("/.putty")" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001be70("/.putty")" identifier (argument_list "("/.putty")" ( (string_literal ""/.putty"" " string_content ") ))))) ;) (if_statement "if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }" if (parenthesized_expression "(pbVar8 == (byte *)0x0)" ( (binary_expression "pbVar8 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }" { (expression_statement "pbVar8 = (byte *)0x0;" (assignment_expression "pbVar8 = (byte *)0x0" identifier = (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }" statement_identifier : (if_statement "if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }" if (parenthesized_expression "((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0))" ( (binary_expression "(local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)" (parenthesized_expression "(local_20 == (char *)0x0)" ( (binary_expression "local_20 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(iVar6 = access(local_20,0), iVar6 != 0)" ( (comma_expression "iVar6 = access(local_20,0), iVar6 != 0" (assignment_expression "iVar6 = access(local_20,0)" identifier = (call_expression "access(local_20,0)" identifier (argument_list "(local_20,0)" ( identifier , number_literal )))) , (binary_expression "iVar6 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }" { (expression_statement "iVar6 = access(pcVar3,0);" (assignment_expression "iVar6 = access(pcVar3,0)" identifier = (call_expression "access(pcVar3,0)" identifier (argument_list "(pcVar3,0)" ( identifier , number_literal )))) ;) (expression_statement "local_28 = pbVar8;" (assignment_expression "local_28 = pbVar8" identifier = identifier) ;) (if_statement "if (iVar6 == 0) goto LAB_0003c635;" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0003c635;" goto statement_identifier ;)) (if_statement "if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }" if (parenthesized_expression "(pbVar8 == (byte *)0x0)" ( (binary_expression "pbVar8 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }" { (expression_statement "pcVar5 = (char *)pbVar8;" (assignment_expression "pcVar5 = (char *)pbVar8" identifier = (cast_expression "(char *)pbVar8" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "pbVar10 = (byte *)pcVar3;" (assignment_expression "pbVar10 = (byte *)pcVar3" identifier = (cast_expression "(byte *)pcVar3" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if (local_20 == (char *)0x0) goto LAB_0003c7dd;" if (parenthesized_expression "(local_20 == (char *)0x0)" ( (binary_expression "local_20 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0003c7dd;" goto statement_identifier ;)) (goto_statement "goto LAB_0003c7fe;" goto statement_identifier ;) })) (goto_statement "goto LAB_0003c430;" goto statement_identifier ;) }))) (if_statement "if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }" if (parenthesized_expression "((byte *)local_20 != pbVar8)" ( (binary_expression "(byte *)local_20 != pbVar8" (cast_expression "(byte *)local_20" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) != identifier) )) (compound_statement "{\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }" { (labeled_statement "LAB_0003c7fe:\n        pcVar5 = local_20;" statement_identifier : (expression_statement "pcVar5 = local_20;" (assignment_expression "pcVar5 = local_20" identifier = identifier) ;)) (expression_statement "pbVar10 = (byte *)local_20;" (assignment_expression "pbVar10 = (byte *)local_20" identifier = (cast_expression "(byte *)local_20" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (goto_statement "goto LAB_0003c7dd;" goto statement_identifier ;) })) }) (else_clause "else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }" else (compound_statement "{\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }" { (expression_statement "iVar6 = access((char *)pbVar8,0);" (assignment_expression "iVar6 = access((char *)pbVar8,0)" identifier = (call_expression "access((char *)pbVar8,0)" identifier (argument_list "((char *)pbVar8,0)" ( (cast_expression "(char *)pbVar8" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , number_literal )))) ;) (if_statement "if (iVar6 != 0) goto LAB_0003c3e2;" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0003c3e2;" goto statement_identifier ;)) (labeled_statement "LAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;" statement_identifier : (if_statement "if (local_28 != (byte *)local_20) goto LAB_0003c436;" if (parenthesized_expression "(local_28 != (byte *)local_20)" ( (binary_expression "local_28 != (byte *)local_20" identifier != (cast_expression "(byte *)local_20" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (goto_statement "goto LAB_0003c436;" goto statement_identifier ;))) }))) }))) (if_statement "if (local_20 != pcVar3) {\n    FUN_0001c5f0(pcVar3);\n  }" if (parenthesized_expression "(local_20 != pcVar3)" ( (binary_expression "local_20 != pcVar3" identifier != identifier) )) (compound_statement "{\n    FUN_0001c5f0(pcVar3);\n  }" { (expression_statement "FUN_0001c5f0(pcVar3);" (call_expression "FUN_0001c5f0(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier ))) ;) })) (labeled_statement "LAB_0003c456:\n  if (local_20 != local_24) {\n    FUN_0001c5f0(local_24);\n  }" statement_identifier : (if_statement "if (local_20 != local_24) {\n    FUN_0001c5f0(local_24);\n  }" if (parenthesized_expression "(local_20 != local_24)" ( (binary_expression "local_20 != local_24" identifier != identifier) )) (compound_statement "{\n    FUN_0001c5f0(local_24);\n  }" { (expression_statement "FUN_0001c5f0(local_24);" (call_expression "FUN_0001c5f0(local_24)" identifier (argument_list "(local_24)" ( identifier ))) ;) }))) (return_statement "return local_20;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * __regparm3 make_filename(int index,char *subname)\n\n{\n  byte bVar1;\n  char *pcVar2;\n  char *pcVar3;\n  __uid_t __uid;\n  passwd *ppVar4;\n  int iVar5;\n  size_t sVar6;\n  byte *pbVar7;\n  byte bVar8;\n  byte *pbVar9;\n  byte *local_28;\n  char *local_24;\n  char *local_20;\n  \n  if (index != 0) {\n    if (index == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = dupstr(pcVar3);\n        return pcVar3;\n      }\n      pcVar2 = make_filename(0,(char *)0x0);\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (index == 5) {\n        if ((subname != (char *)0x0) && (*subname != '\0')) {\n          sVar6 = strlen(subname);\n          local_28 = (byte *)safemalloc(sVar6 * 3 + 1,1);\n          bVar1 = *subname;\n          pbVar7 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar8 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar7 = bVar1;\n              pbVar9 = pbVar7 + 1;\n            }\n            else {\n              *pbVar7 = 0x25;\n              pbVar9 = pbVar7 + 3;\n              pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];\n              pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];\n            }\n            subname = (char *)((byte *)subname + 1);\n            pbVar7 = pbVar9;\n            bVar1 = *subname;\n          }\n          *pbVar7 = 0;\n          pcVar3 = make_filename(4,(char *)0x0);\n          pcVar2 = dupprintf("%s/%s",pcVar3,local_28);\n          safefree(pcVar3);\n          safefree(local_28);\n          return pcVar2;\n        }\n        pbVar7 = (byte *)safemalloc(0x31,1);\n        subname = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar7;\n        goto LAB_0003c4e3;\n      }\n      if (index == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (index == 2) {\n        pcVar2 = make_filename(1,(char *)0x0);\n        pcVar3 = "%s.tmp";\n      }\n      else if (index == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = dupprintf(pcVar3,pcVar2);\n    safefree(pcVar2);\n    return pcVar3;\n  }\n  pcVar3 = getenv("PUTTYDIR");\n  if (pcVar3 != (char *)0x0) {\n    pcVar3 = dupstr(pcVar3);\n    return pcVar3;\n  }\n  pcVar3 = getenv("HOME");\n  __uid = getuid();\n  ppVar4 = getpwuid(__uid);\n  if (ppVar4 != (passwd *)0x0) {\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }\n  pcVar2 = getenv("XDG_CONFIG_HOME");\n  pbVar7 = (byte *)0x0;\n  if (((pcVar2 == (char *)0x0) || (*pcVar2 == '\0')) ||\n     (local_24 = dupprintf("%s/putty",pcVar2), local_24 == (char *)0x0)) {\n    if (pcVar3 != (char *)0x0) {\n      local_24 = dupprintf("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = dupprintf("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = dupprintf("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = dupstr("/.putty");\n    access(pcVar3,0);\n    pcVar2 = (char *)0x0;\n    pbVar9 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar9;\n    safefree(pbVar7);\n    local_20 = pcVar2;\n    goto LAB_0003c430;\n  }\n  iVar5 = access(local_24,0);\n  if (iVar5 == 0) {\n    return local_24;\n  }\n  if (pcVar3 == (char *)0x0) {\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = dupprintf("%s/.putty",ppVar4);\n    pcVar3 = dupstr("/.putty");\n    goto LAB_0003c3e2;\n  }\nLAB_0003c379:\n  pbVar7 = (byte *)dupprintf("%s/.putty",pcVar3);\n  local_28 = pbVar7;\n  if (ppVar4 == (passwd *)0x0) {\n    pcVar3 = dupstr("/.putty");\n    if (pbVar7 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar2 = (char *)0x0;\n      pbVar7 = (byte *)(char *)0x0;\n      pbVar9 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar5 = access((char *)pbVar7,0);\n    if (iVar5 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar5 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar5 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar2 = local_20;\n      pbVar7 = local_28;\n      pbVar9 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    safefree(local_20);\n    local_20 = (char *)local_28;\n  }\n  else {\n    local_20 = dupprintf("%s/.putty",ppVar4);\n    pcVar3 = dupstr("/.putty");\n    if (pbVar7 == (byte *)0x0) {\n      pbVar7 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar5 = access(local_20,0), iVar5 != 0)) {\n        iVar5 = access(pcVar3,0);\n        local_28 = pbVar7;\n        if (iVar5 == 0) goto LAB_0003c635;\n        if (pbVar7 == (byte *)0x0) {\n          pcVar2 = (char *)pbVar7;\n          pbVar9 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar7) {\nLAB_0003c7fe:\n        pcVar2 = local_20;\n        pbVar9 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar5 = access((char *)pbVar7,0);\n      if (iVar5 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }\n  if (local_20 != pcVar3) {\n    safefree(pcVar3);\n  }\nLAB_0003c456:\n  if (local_20 != local_24) {\n    safefree(local_24);\n  }\n  return local_20;\n}\n\n" comment (function_definition "char * __regparm3 make_filename(int index,char *subname)\n\n{\n  byte bVar1;\n  char *pcVar2;\n  char *pcVar3;\n  __uid_t __uid;\n  passwd *ppVar4;\n  int iVar5;\n  size_t sVar6;\n  byte *pbVar7;\n  byte bVar8;\n  byte *pbVar9;\n  byte *local_28;\n  char *local_24;\n  char *local_20;\n  \n  if (index != 0) {\n    if (index == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = dupstr(pcVar3);\n        return pcVar3;\n      }\n      pcVar2 = make_filename(0,(char *)0x0);\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (index == 5) {\n        if ((subname != (char *)0x0) && (*subname != '\0')) {\n          sVar6 = strlen(subname);\n          local_28 = (byte *)safemalloc(sVar6 * 3 + 1,1);\n          bVar1 = *subname;\n          pbVar7 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar8 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar7 = bVar1;\n              pbVar9 = pbVar7 + 1;\n            }\n            else {\n              *pbVar7 = 0x25;\n              pbVar9 = pbVar7 + 3;\n              pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];\n              pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];\n            }\n            subname = (char *)((byte *)subname + 1);\n            pbVar7 = pbVar9;\n            bVar1 = *subname;\n          }\n          *pbVar7 = 0;\n          pcVar3 = make_filename(4,(char *)0x0);\n          pcVar2 = dupprintf("%s/%s",pcVar3,local_28);\n          safefree(pcVar3);\n          safefree(local_28);\n          return pcVar2;\n        }\n        pbVar7 = (byte *)safemalloc(0x31,1);\n        subname = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar7;\n        goto LAB_0003c4e3;\n      }\n      if (index == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (index == 2) {\n        pcVar2 = make_filename(1,(char *)0x0);\n        pcVar3 = "%s.tmp";\n      }\n      else if (index == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = dupprintf(pcVar3,pcVar2);\n    safefree(pcVar2);\n    return pcVar3;\n  }\n  pcVar3 = getenv("PUTTYDIR");\n  if (pcVar3 != (char *)0x0) {\n    pcVar3 = dupstr(pcVar3);\n    return pcVar3;\n  }\n  pcVar3 = getenv("HOME");\n  __uid = getuid();\n  ppVar4 = getpwuid(__uid);\n  if (ppVar4 != (passwd *)0x0) {\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }\n  pcVar2 = getenv("XDG_CONFIG_HOME");\n  pbVar7 = (byte *)0x0;\n  if (((pcVar2 == (char *)0x0) || (*pcVar2 == '\0')) ||\n     (local_24 = dupprintf("%s/putty",pcVar2), local_24 == (char *)0x0)) {\n    if (pcVar3 != (char *)0x0) {\n      local_24 = dupprintf("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = dupprintf("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = dupprintf("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = dupstr("/.putty");\n    access(pcVar3,0);\n    pcVar2 = (char *)0x0;\n    pbVar9 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar9;\n    safefree(pbVar7);\n    local_20 = pcVar2;\n    goto LAB_0003c430;\n  }\n  iVar5 = access(local_24,0);\n  if (iVar5 == 0) {\n    return local_24;\n  }\n  if (pcVar3 == (char *)0x0) {\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = dupprintf("%s/.putty",ppVar4);\n    pcVar3 = dupstr("/.putty");\n    goto LAB_0003c3e2;\n  }\nLAB_0003c379:\n  pbVar7 = (byte *)dupprintf("%s/.putty",pcVar3);\n  local_28 = pbVar7;\n  if (ppVar4 == (passwd *)0x0) {\n    pcVar3 = dupstr("/.putty");\n    if (pbVar7 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar2 = (char *)0x0;\n      pbVar7 = (byte *)(char *)0x0;\n      pbVar9 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar5 = access((char *)pbVar7,0);\n    if (iVar5 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar5 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar5 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar2 = local_20;\n      pbVar7 = local_28;\n      pbVar9 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    safefree(local_20);\n    local_20 = (char *)local_28;\n  }\n  else {\n    local_20 = dupprintf("%s/.putty",ppVar4);\n    pcVar3 = dupstr("/.putty");\n    if (pbVar7 == (byte *)0x0) {\n      pbVar7 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar5 = access(local_20,0), iVar5 != 0)) {\n        iVar5 = access(pcVar3,0);\n        local_28 = pbVar7;\n        if (iVar5 == 0) goto LAB_0003c635;\n        if (pbVar7 == (byte *)0x0) {\n          pcVar2 = (char *)pbVar7;\n          pbVar9 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar7) {\nLAB_0003c7fe:\n        pcVar2 = local_20;\n        pbVar9 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar5 = access((char *)pbVar7,0);\n      if (iVar5 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }\n  if (local_20 != pcVar3) {\n    safefree(pcVar3);\n  }\nLAB_0003c456:\n  if (local_20 != local_24) {\n    safefree(local_24);\n  }\n  return local_20;\n}" primitive_type (pointer_declarator "* __regparm3 make_filename(int index,char *subname)" * (ERROR "__regparm3" identifier) (function_declarator "make_filename(int index,char *subname)" identifier (parameter_list "(int index,char *subname)" ( (parameter_declaration "int index" primitive_type identifier) , (parameter_declaration "char *subname" primitive_type (pointer_declarator "*subname" * identifier)) )))) (compound_statement "{\n  byte bVar1;\n  char *pcVar2;\n  char *pcVar3;\n  __uid_t __uid;\n  passwd *ppVar4;\n  int iVar5;\n  size_t sVar6;\n  byte *pbVar7;\n  byte bVar8;\n  byte *pbVar9;\n  byte *local_28;\n  char *local_24;\n  char *local_20;\n  \n  if (index != 0) {\n    if (index == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = dupstr(pcVar3);\n        return pcVar3;\n      }\n      pcVar2 = make_filename(0,(char *)0x0);\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (index == 5) {\n        if ((subname != (char *)0x0) && (*subname != '\0')) {\n          sVar6 = strlen(subname);\n          local_28 = (byte *)safemalloc(sVar6 * 3 + 1,1);\n          bVar1 = *subname;\n          pbVar7 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar8 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar7 = bVar1;\n              pbVar9 = pbVar7 + 1;\n            }\n            else {\n              *pbVar7 = 0x25;\n              pbVar9 = pbVar7 + 3;\n              pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];\n              pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];\n            }\n            subname = (char *)((byte *)subname + 1);\n            pbVar7 = pbVar9;\n            bVar1 = *subname;\n          }\n          *pbVar7 = 0;\n          pcVar3 = make_filename(4,(char *)0x0);\n          pcVar2 = dupprintf("%s/%s",pcVar3,local_28);\n          safefree(pcVar3);\n          safefree(local_28);\n          return pcVar2;\n        }\n        pbVar7 = (byte *)safemalloc(0x31,1);\n        subname = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar7;\n        goto LAB_0003c4e3;\n      }\n      if (index == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (index == 2) {\n        pcVar2 = make_filename(1,(char *)0x0);\n        pcVar3 = "%s.tmp";\n      }\n      else if (index == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = dupprintf(pcVar3,pcVar2);\n    safefree(pcVar2);\n    return pcVar3;\n  }\n  pcVar3 = getenv("PUTTYDIR");\n  if (pcVar3 != (char *)0x0) {\n    pcVar3 = dupstr(pcVar3);\n    return pcVar3;\n  }\n  pcVar3 = getenv("HOME");\n  __uid = getuid();\n  ppVar4 = getpwuid(__uid);\n  if (ppVar4 != (passwd *)0x0) {\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }\n  pcVar2 = getenv("XDG_CONFIG_HOME");\n  pbVar7 = (byte *)0x0;\n  if (((pcVar2 == (char *)0x0) || (*pcVar2 == '\0')) ||\n     (local_24 = dupprintf("%s/putty",pcVar2), local_24 == (char *)0x0)) {\n    if (pcVar3 != (char *)0x0) {\n      local_24 = dupprintf("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = dupprintf("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = dupprintf("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = dupstr("/.putty");\n    access(pcVar3,0);\n    pcVar2 = (char *)0x0;\n    pbVar9 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar9;\n    safefree(pbVar7);\n    local_20 = pcVar2;\n    goto LAB_0003c430;\n  }\n  iVar5 = access(local_24,0);\n  if (iVar5 == 0) {\n    return local_24;\n  }\n  if (pcVar3 == (char *)0x0) {\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = dupprintf("%s/.putty",ppVar4);\n    pcVar3 = dupstr("/.putty");\n    goto LAB_0003c3e2;\n  }\nLAB_0003c379:\n  pbVar7 = (byte *)dupprintf("%s/.putty",pcVar3);\n  local_28 = pbVar7;\n  if (ppVar4 == (passwd *)0x0) {\n    pcVar3 = dupstr("/.putty");\n    if (pbVar7 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar2 = (char *)0x0;\n      pbVar7 = (byte *)(char *)0x0;\n      pbVar9 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar5 = access((char *)pbVar7,0);\n    if (iVar5 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar5 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar5 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar2 = local_20;\n      pbVar7 = local_28;\n      pbVar9 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    safefree(local_20);\n    local_20 = (char *)local_28;\n  }\n  else {\n    local_20 = dupprintf("%s/.putty",ppVar4);\n    pcVar3 = dupstr("/.putty");\n    if (pbVar7 == (byte *)0x0) {\n      pbVar7 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar5 = access(local_20,0), iVar5 != 0)) {\n        iVar5 = access(pcVar3,0);\n        local_28 = pbVar7;\n        if (iVar5 == 0) goto LAB_0003c635;\n        if (pbVar7 == (byte *)0x0) {\n          pcVar2 = (char *)pbVar7;\n          pbVar9 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar7) {\nLAB_0003c7fe:\n        pcVar2 = local_20;\n        pbVar9 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar5 = access((char *)pbVar7,0);\n      if (iVar5 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }\n  if (local_20 != pcVar3) {\n    safefree(pcVar3);\n  }\nLAB_0003c456:\n  if (local_20 != local_24) {\n    safefree(local_24);\n  }\n  return local_20;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "__uid_t __uid;" type_identifier identifier ;) (declaration "passwd *ppVar4;" type_identifier (pointer_declarator "*ppVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "byte *pbVar7;" type_identifier (pointer_declarator "*pbVar7" * identifier) ;) (declaration "byte bVar8;" type_identifier identifier ;) (declaration "byte *pbVar9;" type_identifier (pointer_declarator "*pbVar9" * identifier) ;) (declaration "byte *local_28;" type_identifier (pointer_declarator "*local_28" * identifier) ;) (declaration "char *local_24;" primitive_type (pointer_declarator "*local_24" * identifier) ;) (declaration "char *local_20;" primitive_type (pointer_declarator "*local_20" * identifier) ;) (if_statement "if (index != 0) {\n    if (index == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = dupstr(pcVar3);\n        return pcVar3;\n      }\n      pcVar2 = make_filename(0,(char *)0x0);\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (index == 5) {\n        if ((subname != (char *)0x0) && (*subname != '\0')) {\n          sVar6 = strlen(subname);\n          local_28 = (byte *)safemalloc(sVar6 * 3 + 1,1);\n          bVar1 = *subname;\n          pbVar7 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar8 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar7 = bVar1;\n              pbVar9 = pbVar7 + 1;\n            }\n            else {\n              *pbVar7 = 0x25;\n              pbVar9 = pbVar7 + 3;\n              pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];\n              pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];\n            }\n            subname = (char *)((byte *)subname + 1);\n            pbVar7 = pbVar9;\n            bVar1 = *subname;\n          }\n          *pbVar7 = 0;\n          pcVar3 = make_filename(4,(char *)0x0);\n          pcVar2 = dupprintf("%s/%s",pcVar3,local_28);\n          safefree(pcVar3);\n          safefree(local_28);\n          return pcVar2;\n        }\n        pbVar7 = (byte *)safemalloc(0x31,1);\n        subname = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar7;\n        goto LAB_0003c4e3;\n      }\n      if (index == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (index == 2) {\n        pcVar2 = make_filename(1,(char *)0x0);\n        pcVar3 = "%s.tmp";\n      }\n      else if (index == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = dupprintf(pcVar3,pcVar2);\n    safefree(pcVar2);\n    return pcVar3;\n  }" if (parenthesized_expression "(index != 0)" ( (binary_expression "index != 0" identifier != number_literal) )) (compound_statement "{\n    if (index == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = dupstr(pcVar3);\n        return pcVar3;\n      }\n      pcVar2 = make_filename(0,(char *)0x0);\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (index == 5) {\n        if ((subname != (char *)0x0) && (*subname != '\0')) {\n          sVar6 = strlen(subname);\n          local_28 = (byte *)safemalloc(sVar6 * 3 + 1,1);\n          bVar1 = *subname;\n          pbVar7 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar8 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar7 = bVar1;\n              pbVar9 = pbVar7 + 1;\n            }\n            else {\n              *pbVar7 = 0x25;\n              pbVar9 = pbVar7 + 3;\n              pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];\n              pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];\n            }\n            subname = (char *)((byte *)subname + 1);\n            pbVar7 = pbVar9;\n            bVar1 = *subname;\n          }\n          *pbVar7 = 0;\n          pcVar3 = make_filename(4,(char *)0x0);\n          pcVar2 = dupprintf("%s/%s",pcVar3,local_28);\n          safefree(pcVar3);\n          safefree(local_28);\n          return pcVar2;\n        }\n        pbVar7 = (byte *)safemalloc(0x31,1);\n        subname = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar7;\n        goto LAB_0003c4e3;\n      }\n      if (index == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (index == 2) {\n        pcVar2 = make_filename(1,(char *)0x0);\n        pcVar3 = "%s.tmp";\n      }\n      else if (index == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = dupprintf(pcVar3,pcVar2);\n    safefree(pcVar2);\n    return pcVar3;\n  }" { (if_statement "if (index == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = dupstr(pcVar3);\n        return pcVar3;\n      }\n      pcVar2 = make_filename(0,(char *)0x0);\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (index == 5) {\n        if ((subname != (char *)0x0) && (*subname != '\0')) {\n          sVar6 = strlen(subname);\n          local_28 = (byte *)safemalloc(sVar6 * 3 + 1,1);\n          bVar1 = *subname;\n          pbVar7 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar8 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar7 = bVar1;\n              pbVar9 = pbVar7 + 1;\n            }\n            else {\n              *pbVar7 = 0x25;\n              pbVar9 = pbVar7 + 3;\n              pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];\n              pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];\n            }\n            subname = (char *)((byte *)subname + 1);\n            pbVar7 = pbVar9;\n            bVar1 = *subname;\n          }\n          *pbVar7 = 0;\n          pcVar3 = make_filename(4,(char *)0x0);\n          pcVar2 = dupprintf("%s/%s",pcVar3,local_28);\n          safefree(pcVar3);\n          safefree(local_28);\n          return pcVar2;\n        }\n        pbVar7 = (byte *)safemalloc(0x31,1);\n        subname = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar7;\n        goto LAB_0003c4e3;\n      }\n      if (index == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (index == 2) {\n        pcVar2 = make_filename(1,(char *)0x0);\n        pcVar3 = "%s.tmp";\n      }\n      else if (index == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/ERROR";\n      }\n    }" if (parenthesized_expression "(index == 4)" ( (binary_expression "index == 4" identifier == number_literal) )) (compound_statement "{\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = dupstr(pcVar3);\n        return pcVar3;\n      }\n      pcVar2 = make_filename(0,(char *)0x0);\n      pcVar3 = "%s/sessions";\n    }" { (expression_statement "pcVar3 = getenv("PUTTYSESSIONS");" (assignment_expression "pcVar3 = getenv("PUTTYSESSIONS")" identifier = (call_expression "getenv("PUTTYSESSIONS")" identifier (argument_list "("PUTTYSESSIONS")" ( (string_literal ""PUTTYSESSIONS"" " string_content ") )))) ;) (if_statement "if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = dupstr(pcVar3);\n        return pcVar3;\n      }" if (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_0003c562:\n        pcVar3 = dupstr(pcVar3);\n        return pcVar3;\n      }" { (labeled_statement "LAB_0003c562:\n        pcVar3 = dupstr(pcVar3);" statement_identifier : (expression_statement "pcVar3 = dupstr(pcVar3);" (assignment_expression "pcVar3 = dupstr(pcVar3)" identifier = (call_expression "dupstr(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier )))) ;)) (return_statement "return pcVar3;" return identifier ;) })) (expression_statement "pcVar2 = make_filename(0,(char *)0x0);" (assignment_expression "pcVar2 = make_filename(0,(char *)0x0)" identifier = (call_expression "make_filename(0,(char *)0x0)" identifier (argument_list "(0,(char *)0x0)" ( number_literal , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "pcVar3 = "%s/sessions";" (assignment_expression "pcVar3 = "%s/sessions"" identifier = (string_literal ""%s/sessions"" " string_content ")) ;) }) (else_clause "else {\n      if (index == 5) {\n        if ((subname != (char *)0x0) && (*subname != '\0')) {\n          sVar6 = strlen(subname);\n          local_28 = (byte *)safemalloc(sVar6 * 3 + 1,1);\n          bVar1 = *subname;\n          pbVar7 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar8 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar7 = bVar1;\n              pbVar9 = pbVar7 + 1;\n            }\n            else {\n              *pbVar7 = 0x25;\n              pbVar9 = pbVar7 + 3;\n              pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];\n              pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];\n            }\n            subname = (char *)((byte *)subname + 1);\n            pbVar7 = pbVar9;\n            bVar1 = *subname;\n          }\n          *pbVar7 = 0;\n          pcVar3 = make_filename(4,(char *)0x0);\n          pcVar2 = dupprintf("%s/%s",pcVar3,local_28);\n          safefree(pcVar3);\n          safefree(local_28);\n          return pcVar2;\n        }\n        pbVar7 = (byte *)safemalloc(0x31,1);\n        subname = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar7;\n        goto LAB_0003c4e3;\n      }\n      if (index == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (index == 2) {\n        pcVar2 = make_filename(1,(char *)0x0);\n        pcVar3 = "%s.tmp";\n      }\n      else if (index == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/ERROR";\n      }\n    }" else (compound_statement "{\n      if (index == 5) {\n        if ((subname != (char *)0x0) && (*subname != '\0')) {\n          sVar6 = strlen(subname);\n          local_28 = (byte *)safemalloc(sVar6 * 3 + 1,1);\n          bVar1 = *subname;\n          pbVar7 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar8 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar7 = bVar1;\n              pbVar9 = pbVar7 + 1;\n            }\n            else {\n              *pbVar7 = 0x25;\n              pbVar9 = pbVar7 + 3;\n              pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];\n              pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];\n            }\n            subname = (char *)((byte *)subname + 1);\n            pbVar7 = pbVar9;\n            bVar1 = *subname;\n          }\n          *pbVar7 = 0;\n          pcVar3 = make_filename(4,(char *)0x0);\n          pcVar2 = dupprintf("%s/%s",pcVar3,local_28);\n          safefree(pcVar3);\n          safefree(local_28);\n          return pcVar2;\n        }\n        pbVar7 = (byte *)safemalloc(0x31,1);\n        subname = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar7;\n        goto LAB_0003c4e3;\n      }\n      if (index == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (index == 2) {\n        pcVar2 = make_filename(1,(char *)0x0);\n        pcVar3 = "%s.tmp";\n      }\n      else if (index == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/ERROR";\n      }\n    }" { (if_statement "if (index == 5) {\n        if ((subname != (char *)0x0) && (*subname != '\0')) {\n          sVar6 = strlen(subname);\n          local_28 = (byte *)safemalloc(sVar6 * 3 + 1,1);\n          bVar1 = *subname;\n          pbVar7 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar8 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar7 = bVar1;\n              pbVar9 = pbVar7 + 1;\n            }\n            else {\n              *pbVar7 = 0x25;\n              pbVar9 = pbVar7 + 3;\n              pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];\n              pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];\n            }\n            subname = (char *)((byte *)subname + 1);\n            pbVar7 = pbVar9;\n            bVar1 = *subname;\n          }\n          *pbVar7 = 0;\n          pcVar3 = make_filename(4,(char *)0x0);\n          pcVar2 = dupprintf("%s/%s",pcVar3,local_28);\n          safefree(pcVar3);\n          safefree(local_28);\n          return pcVar2;\n        }\n        pbVar7 = (byte *)safemalloc(0x31,1);\n        subname = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar7;\n        goto LAB_0003c4e3;\n      }" if (parenthesized_expression "(index == 5)" ( (binary_expression "index == 5" identifier == number_literal) )) (compound_statement "{\n        if ((subname != (char *)0x0) && (*subname != '\0')) {\n          sVar6 = strlen(subname);\n          local_28 = (byte *)safemalloc(sVar6 * 3 + 1,1);\n          bVar1 = *subname;\n          pbVar7 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar8 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar7 = bVar1;\n              pbVar9 = pbVar7 + 1;\n            }\n            else {\n              *pbVar7 = 0x25;\n              pbVar9 = pbVar7 + 3;\n              pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];\n              pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];\n            }\n            subname = (char *)((byte *)subname + 1);\n            pbVar7 = pbVar9;\n            bVar1 = *subname;\n          }\n          *pbVar7 = 0;\n          pcVar3 = make_filename(4,(char *)0x0);\n          pcVar2 = dupprintf("%s/%s",pcVar3,local_28);\n          safefree(pcVar3);\n          safefree(local_28);\n          return pcVar2;\n        }\n        pbVar7 = (byte *)safemalloc(0x31,1);\n        subname = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar7;\n        goto LAB_0003c4e3;\n      }" { (if_statement "if ((subname != (char *)0x0) && (*subname != '\0')) {\n          sVar6 = strlen(subname);\n          local_28 = (byte *)safemalloc(sVar6 * 3 + 1,1);\n          bVar1 = *subname;\n          pbVar7 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar8 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar7 = bVar1;\n              pbVar9 = pbVar7 + 1;\n            }\n            else {\n              *pbVar7 = 0x25;\n              pbVar9 = pbVar7 + 3;\n              pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];\n              pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];\n            }\n            subname = (char *)((byte *)subname + 1);\n            pbVar7 = pbVar9;\n            bVar1 = *subname;\n          }\n          *pbVar7 = 0;\n          pcVar3 = make_filename(4,(char *)0x0);\n          pcVar2 = dupprintf("%s/%s",pcVar3,local_28);\n          safefree(pcVar3);\n          safefree(local_28);\n          return pcVar2;\n        }" if (parenthesized_expression "((subname != (char *)0x0) && (*subname != '\0'))" ( (binary_expression "(subname != (char *)0x0) && (*subname != '\0')" (parenthesized_expression "(subname != (char *)0x0)" ( (binary_expression "subname != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(*subname != '\0')" ( (binary_expression "*subname != '\0'" (pointer_expression "*subname" * identifier) != (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n          sVar6 = strlen(subname);\n          local_28 = (byte *)safemalloc(sVar6 * 3 + 1,1);\n          bVar1 = *subname;\n          pbVar7 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar8 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar7 = bVar1;\n              pbVar9 = pbVar7 + 1;\n            }\n            else {\n              *pbVar7 = 0x25;\n              pbVar9 = pbVar7 + 3;\n              pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];\n              pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];\n            }\n            subname = (char *)((byte *)subname + 1);\n            pbVar7 = pbVar9;\n            bVar1 = *subname;\n          }\n          *pbVar7 = 0;\n          pcVar3 = make_filename(4,(char *)0x0);\n          pcVar2 = dupprintf("%s/%s",pcVar3,local_28);\n          safefree(pcVar3);\n          safefree(local_28);\n          return pcVar2;\n        }" { (expression_statement "sVar6 = strlen(subname);" (assignment_expression "sVar6 = strlen(subname)" identifier = (call_expression "strlen(subname)" identifier (argument_list "(subname)" ( identifier )))) ;) (expression_statement "local_28 = (byte *)safemalloc(sVar6 * 3 + 1,1);" (assignment_expression "local_28 = (byte *)safemalloc(sVar6 * 3 + 1,1)" identifier = (cast_expression "(byte *)safemalloc(sVar6 * 3 + 1,1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(sVar6 * 3 + 1,1)" identifier (argument_list "(sVar6 * 3 + 1,1)" ( (binary_expression "sVar6 * 3 + 1" (binary_expression "sVar6 * 3" identifier * number_literal) + number_literal) , number_literal ))))) ;) (expression_statement "bVar1 = *subname;" (assignment_expression "bVar1 = *subname" identifier = (pointer_expression "*subname" * identifier)) ;) (expression_statement "pbVar7 = local_28;" (assignment_expression "pbVar7 = local_28" identifier = identifier) ;) (while_statement "while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar8 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar7 = bVar1;\n              pbVar9 = pbVar7 + 1;\n            }\n            else {\n              *pbVar7 = 0x25;\n              pbVar9 = pbVar7 + 3;\n              pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];\n              pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];\n            }\n            subname = (char *)((byte *)subname + 1);\n            pbVar7 = pbVar9;\n            bVar1 = *subname;\n          }" while (parenthesized_expression "(bVar1 != 0)" ( (binary_expression "bVar1 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_0003c4e3:\n            bVar8 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar7 = bVar1;\n              pbVar9 = pbVar7 + 1;\n            }\n            else {\n              *pbVar7 = 0x25;\n              pbVar9 = pbVar7 + 3;\n              pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];\n              pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];\n            }\n            subname = (char *)((byte *)subname + 1);\n            pbVar7 = pbVar9;\n            bVar1 = *subname;\n          }" { (labeled_statement "LAB_0003c4e3:\n            bVar8 = 1;" statement_identifier : (expression_statement "bVar8 = 1;" (assignment_expression "bVar8 = 1" identifier = number_literal) ;)) (if_statement "if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }" if (parenthesized_expression "((byte)(bVar1 - 0x2b) < 0x16)" ( (binary_expression "(byte)(bVar1 - 0x2b) < 0x16" (call_expression "(byte)(bVar1 - 0x2b)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar1 - 0x2b)" ( (binary_expression "bVar1 - 0x2b" identifier - number_literal) ))) < number_literal) )) (compound_statement "{\n              bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }" { (expression_statement "bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;" (assignment_expression "bVar8 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1" identifier = (binary_expression "~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1" (unary_expression "~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f))" ~ (call_expression "(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f))" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(0x20000d >> (bVar1 - 0x2b & 0x1f))" ( (binary_expression "0x20000d >> (bVar1 - 0x2b & 0x1f)" number_literal >> (parenthesized_expression "(bVar1 - 0x2b & 0x1f)" ( (binary_expression "bVar1 - 0x2b & 0x1f" (binary_expression "bVar1 - 0x2b" identifier - number_literal) & number_literal) ))) )))) & number_literal)) ;) })) (if_statement "if ((((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar7 = bVar1;\n              pbVar9 = pbVar7 + 1;\n            }\n            else {\n              *pbVar7 = 0x25;\n              pbVar9 = pbVar7 + 3;\n              pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];\n              pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];\n            }" if (parenthesized_expression "((((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a))" ( (binary_expression "(((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)" (parenthesized_expression "(((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10))" ( (binary_expression "((bVar1 == 0x5f) || (bVar8 == 0)) || ((byte)(bVar1 - 0x30) < 10)" (parenthesized_expression "((bVar1 == 0x5f) || (bVar8 == 0))" ( (binary_expression "(bVar1 == 0x5f) || (bVar8 == 0)" (parenthesized_expression "(bVar1 == 0x5f)" ( (binary_expression "bVar1 == 0x5f" identifier == number_literal) )) || (parenthesized_expression "(bVar8 == 0)" ( (binary_expression "bVar8 == 0" identifier == number_literal) ))) )) || (parenthesized_expression "((byte)(bVar1 - 0x30) < 10)" ( (binary_expression "(byte)(bVar1 - 0x30) < 10" (call_expression "(byte)(bVar1 - 0x30)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar1 - 0x30)" ( (binary_expression "bVar1 - 0x30" identifier - number_literal) ))) < number_literal) ))) )) || (parenthesized_expression "((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)" ( (binary_expression "(byte)((bVar1 & 0xdf) + 0xbf) < 0x1a" (call_expression "(byte)((bVar1 & 0xdf) + 0xbf)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "((bVar1 & 0xdf) + 0xbf)" ( (binary_expression "(bVar1 & 0xdf) + 0xbf" (parenthesized_expression "(bVar1 & 0xdf)" ( (binary_expression "bVar1 & 0xdf" identifier & number_literal) )) + number_literal) ))) < number_literal) ))) )) (compound_statement "{\n              *pbVar7 = bVar1;\n              pbVar9 = pbVar7 + 1;\n            }" { (expression_statement "*pbVar7 = bVar1;" (assignment_expression "*pbVar7 = bVar1" (pointer_expression "*pbVar7" * identifier) = identifier) ;) (expression_statement "pbVar9 = pbVar7 + 1;" (assignment_expression "pbVar9 = pbVar7 + 1" identifier = (binary_expression "pbVar7 + 1" identifier + number_literal)) ;) }) (else_clause "else {\n              *pbVar7 = 0x25;\n              pbVar9 = pbVar7 + 3;\n              pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];\n              pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];\n            }" else (compound_statement "{\n              *pbVar7 = 0x25;\n              pbVar9 = pbVar7 + 3;\n              pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];\n              pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];\n            }" { (expression_statement "*pbVar7 = 0x25;" (assignment_expression "*pbVar7 = 0x25" (pointer_expression "*pbVar7" * identifier) = number_literal) ;) (expression_statement "pbVar9 = pbVar7 + 3;" (assignment_expression "pbVar9 = pbVar7 + 3" identifier = (binary_expression "pbVar7 + 3" identifier + number_literal)) ;) (expression_statement "pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4];" (assignment_expression "pbVar7[1] = "0123456789ABCDEF"[(byte)*subname >> 4]" (subscript_expression "pbVar7[1]" identifier [ number_literal ]) = (subscript_expression ""0123456789ABCDEF"[(byte)*subname >> 4]" (string_literal ""0123456789ABCDEF"" " string_content ") [ (binary_expression "(byte)*subname >> 4" (binary_expression "(byte)*subname" (parenthesized_expression "(byte)" ( identifier )) * identifier) >> number_literal) ])) ;) (expression_statement "pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf];" (assignment_expression "pbVar7[2] = "0123456789ABCDEF"[(byte)*subname & 0xf]" (subscript_expression "pbVar7[2]" identifier [ number_literal ]) = (subscript_expression ""0123456789ABCDEF"[(byte)*subname & 0xf]" (string_literal ""0123456789ABCDEF"" " string_content ") [ (binary_expression "(byte)*subname & 0xf" (binary_expression "(byte)*subname" (parenthesized_expression "(byte)" ( identifier )) * identifier) & number_literal) ])) ;) }))) (expression_statement "subname = (char *)((byte *)subname + 1);" (assignment_expression "subname = (char *)((byte *)subname + 1)" identifier = (cast_expression "(char *)((byte *)subname + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)subname + 1)" ( (binary_expression "(byte *)subname + 1" (cast_expression "(byte *)subname" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) ;) (expression_statement "pbVar7 = pbVar9;" (assignment_expression "pbVar7 = pbVar9" identifier = identifier) ;) (expression_statement "bVar1 = *subname;" (assignment_expression "bVar1 = *subname" identifier = (pointer_expression "*subname" * identifier)) ;) })) (expression_statement "*pbVar7 = 0;" (assignment_expression "*pbVar7 = 0" (pointer_expression "*pbVar7" * identifier) = number_literal) ;) (expression_statement "pcVar3 = make_filename(4,(char *)0x0);" (assignment_expression "pcVar3 = make_filename(4,(char *)0x0)" identifier = (call_expression "make_filename(4,(char *)0x0)" identifier (argument_list "(4,(char *)0x0)" ( number_literal , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "pcVar2 = dupprintf("%s/%s",pcVar3,local_28);" (assignment_expression "pcVar2 = dupprintf("%s/%s",pcVar3,local_28)" identifier = (call_expression "dupprintf("%s/%s",pcVar3,local_28)" identifier (argument_list "("%s/%s",pcVar3,local_28)" ( (string_literal ""%s/%s"" " string_content ") , identifier , identifier )))) ;) (expression_statement "safefree(pcVar3);" (call_expression "safefree(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier ))) ;) (expression_statement "safefree(local_28);" (call_expression "safefree(local_28)" identifier (argument_list "(local_28)" ( identifier ))) ;) (return_statement "return pcVar2;" return identifier ;) })) (expression_statement "pbVar7 = (byte *)safemalloc(0x31,1);" (assignment_expression "pbVar7 = (byte *)safemalloc(0x31,1)" identifier = (cast_expression "(byte *)safemalloc(0x31,1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(0x31,1)" identifier (argument_list "(0x31,1)" ( number_literal , number_literal ))))) ;) (expression_statement "subname = "Default Settings";" (assignment_expression "subname = "Default Settings"" identifier = (string_literal ""Default Settings"" " string_content ")) ;) (expression_statement "bVar1 = 0x44;" (assignment_expression "bVar1 = 0x44" identifier = number_literal) ;) (expression_statement "local_28 = pbVar7;" (assignment_expression "local_28 = pbVar7" identifier = identifier) ;) (goto_statement "goto LAB_0003c4e3;" goto statement_identifier ;) })) (if_statement "if (index == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (index == 2) {\n        pcVar2 = make_filename(1,(char *)0x0);\n        pcVar3 = "%s.tmp";\n      }\n      else if (index == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/ERROR";\n      }" if (parenthesized_expression "(index == 1)" ( (binary_expression "index == 1" identifier == number_literal) )) (compound_statement "{\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/sshhostkeys";\n      }" { (expression_statement "pcVar3 = getenv("PUTTYSSHHOSTKEYS");" (assignment_expression "pcVar3 = getenv("PUTTYSSHHOSTKEYS")" identifier = (call_expression "getenv("PUTTYSSHHOSTKEYS")" identifier (argument_list "("PUTTYSSHHOSTKEYS")" ( (string_literal ""PUTTYSSHHOSTKEYS"" " string_content ") )))) ;) (if_statement "if (pcVar3 != (char *)0x0) goto LAB_0003c562;" if (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0003c562;" goto statement_identifier ;)) (expression_statement "pcVar2 = make_filename(0,(char *)0x0);" (assignment_expression "pcVar2 = make_filename(0,(char *)0x0)" identifier = (call_expression "make_filename(0,(char *)0x0)" identifier (argument_list "(0,(char *)0x0)" ( number_literal , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "pcVar3 = "%s/sshhostkeys";" (assignment_expression "pcVar3 = "%s/sshhostkeys"" identifier = (string_literal ""%s/sshhostkeys"" " string_content ")) ;) }) (else_clause "else if (index == 2) {\n        pcVar2 = make_filename(1,(char *)0x0);\n        pcVar3 = "%s.tmp";\n      }\n      else if (index == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/ERROR";\n      }" else (if_statement "if (index == 2) {\n        pcVar2 = make_filename(1,(char *)0x0);\n        pcVar3 = "%s.tmp";\n      }\n      else if (index == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/ERROR";\n      }" if (parenthesized_expression "(index == 2)" ( (binary_expression "index == 2" identifier == number_literal) )) (compound_statement "{\n        pcVar2 = make_filename(1,(char *)0x0);\n        pcVar3 = "%s.tmp";\n      }" { (expression_statement "pcVar2 = make_filename(1,(char *)0x0);" (assignment_expression "pcVar2 = make_filename(1,(char *)0x0)" identifier = (call_expression "make_filename(1,(char *)0x0)" identifier (argument_list "(1,(char *)0x0)" ( number_literal , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "pcVar3 = "%s.tmp";" (assignment_expression "pcVar3 = "%s.tmp"" identifier = (string_literal ""%s.tmp"" " string_content ")) ;) }) (else_clause "else if (index == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/ERROR";\n      }" else (if_statement "if (index == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/ERROR";\n      }" if (parenthesized_expression "(index == 3)" ( (binary_expression "index == 3" identifier == number_literal) )) (compound_statement "{\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/randomseed";\n      }" { (expression_statement "pcVar3 = getenv("PUTTYRANDOMSEED");" (assignment_expression "pcVar3 = getenv("PUTTYRANDOMSEED")" identifier = (call_expression "getenv("PUTTYRANDOMSEED")" identifier (argument_list "("PUTTYRANDOMSEED")" ( (string_literal ""PUTTYRANDOMSEED"" " string_content ") )))) ;) (if_statement "if (pcVar3 != (char *)0x0) goto LAB_0003c562;" if (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0003c562;" goto statement_identifier ;)) (expression_statement "pcVar2 = make_filename(0,(char *)0x0);" (assignment_expression "pcVar2 = make_filename(0,(char *)0x0)" identifier = (call_expression "make_filename(0,(char *)0x0)" identifier (argument_list "(0,(char *)0x0)" ( number_literal , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "pcVar3 = "%s/randomseed";" (assignment_expression "pcVar3 = "%s/randomseed"" identifier = (string_literal ""%s/randomseed"" " string_content ")) ;) }) (else_clause "else {\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/ERROR";\n      }" else (compound_statement "{\n        pcVar2 = make_filename(0,(char *)0x0);\n        pcVar3 = "%s/ERROR";\n      }" { (expression_statement "pcVar2 = make_filename(0,(char *)0x0);" (assignment_expression "pcVar2 = make_filename(0,(char *)0x0)" identifier = (call_expression "make_filename(0,(char *)0x0)" identifier (argument_list "(0,(char *)0x0)" ( number_literal , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "pcVar3 = "%s/ERROR";" (assignment_expression "pcVar3 = "%s/ERROR"" identifier = (string_literal ""%s/ERROR"" " string_content ")) ;) }))))))) }))) (expression_statement "pcVar3 = dupprintf(pcVar3,pcVar2);" (assignment_expression "pcVar3 = dupprintf(pcVar3,pcVar2)" identifier = (call_expression "dupprintf(pcVar3,pcVar2)" identifier (argument_list "(pcVar3,pcVar2)" ( identifier , identifier )))) ;) (expression_statement "safefree(pcVar2);" (call_expression "safefree(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier ))) ;) (return_statement "return pcVar3;" return identifier ;) })) (expression_statement "pcVar3 = getenv("PUTTYDIR");" (assignment_expression "pcVar3 = getenv("PUTTYDIR")" identifier = (call_expression "getenv("PUTTYDIR")" identifier (argument_list "("PUTTYDIR")" ( (string_literal ""PUTTYDIR"" " string_content ") )))) ;) (if_statement "if (pcVar3 != (char *)0x0) {\n    pcVar3 = dupstr(pcVar3);\n    return pcVar3;\n  }" if (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar3 = dupstr(pcVar3);\n    return pcVar3;\n  }" { (expression_statement "pcVar3 = dupstr(pcVar3);" (assignment_expression "pcVar3 = dupstr(pcVar3)" identifier = (call_expression "dupstr(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier )))) ;) (return_statement "return pcVar3;" return identifier ;) })) (expression_statement "pcVar3 = getenv("HOME");" (assignment_expression "pcVar3 = getenv("HOME")" identifier = (call_expression "getenv("HOME")" identifier (argument_list "("HOME")" ( (string_literal ""HOME"" " string_content ") )))) ;) (expression_statement "__uid = getuid();" (assignment_expression "__uid = getuid()" identifier = (call_expression "getuid()" identifier (argument_list "()" ( )))) ;) (expression_statement "ppVar4 = getpwuid(__uid);" (assignment_expression "ppVar4 = getpwuid(__uid)" identifier = (call_expression "getpwuid(__uid)" identifier (argument_list "(__uid)" ( identifier )))) ;) (if_statement "if (ppVar4 != (passwd *)0x0) {\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }" if (parenthesized_expression "(ppVar4 != (passwd *)0x0)" ( (binary_expression "ppVar4 != (passwd *)0x0" identifier != (cast_expression "(passwd *)0x0" ( (type_descriptor "passwd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }" { (expression_statement "ppVar4 = (passwd *)ppVar4->pw_dir;" (assignment_expression "ppVar4 = (passwd *)ppVar4->pw_dir" identifier = (cast_expression "(passwd *)ppVar4->pw_dir" ( (type_descriptor "passwd *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "ppVar4->pw_dir" identifier -> field_identifier))) ;) })) (expression_statement "pcVar2 = getenv("XDG_CONFIG_HOME");" (assignment_expression "pcVar2 = getenv("XDG_CONFIG_HOME")" identifier = (call_expression "getenv("XDG_CONFIG_HOME")" identifier (argument_list "("XDG_CONFIG_HOME")" ( (string_literal ""XDG_CONFIG_HOME"" " string_content ") )))) ;) (expression_statement "pbVar7 = (byte *)0x0;" (assignment_expression "pbVar7 = (byte *)0x0" identifier = (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (((pcVar2 == (char *)0x0) || (*pcVar2 == '\0')) ||\n     (local_24 = dupprintf("%s/putty",pcVar2), local_24 == (char *)0x0)) {\n    if (pcVar3 != (char *)0x0) {\n      local_24 = dupprintf("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = dupprintf("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = dupprintf("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = dupstr("/.putty");\n    access(pcVar3,0);\n    pcVar2 = (char *)0x0;\n    pbVar9 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar9;\n    safefree(pbVar7);\n    local_20 = pcVar2;\n    goto LAB_0003c430;\n  }" if (parenthesized_expression "(((pcVar2 == (char *)0x0) || (*pcVar2 == '\0')) ||\n     (local_24 = dupprintf("%s/putty",pcVar2), local_24 == (char *)0x0))" ( (binary_expression "((pcVar2 == (char *)0x0) || (*pcVar2 == '\0')) ||\n     (local_24 = dupprintf("%s/putty",pcVar2), local_24 == (char *)0x0)" (parenthesized_expression "((pcVar2 == (char *)0x0) || (*pcVar2 == '\0'))" ( (binary_expression "(pcVar2 == (char *)0x0) || (*pcVar2 == '\0')" (parenthesized_expression "(pcVar2 == (char *)0x0)" ( (binary_expression "pcVar2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(*pcVar2 == '\0')" ( (binary_expression "*pcVar2 == '\0'" (pointer_expression "*pcVar2" * identifier) == (char_literal "'\0'" ' escape_sequence ')) ))) )) || (parenthesized_expression "(local_24 = dupprintf("%s/putty",pcVar2), local_24 == (char *)0x0)" ( (comma_expression "local_24 = dupprintf("%s/putty",pcVar2), local_24 == (char *)0x0" (assignment_expression "local_24 = dupprintf("%s/putty",pcVar2)" identifier = (call_expression "dupprintf("%s/putty",pcVar2)" identifier (argument_list "("%s/putty",pcVar2)" ( (string_literal ""%s/putty"" " string_content ") , identifier )))) , (binary_expression "local_24 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (compound_statement "{\n    if (pcVar3 != (char *)0x0) {\n      local_24 = dupprintf("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = dupprintf("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = dupprintf("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = dupstr("/.putty");\n    access(pcVar3,0);\n    pcVar2 = (char *)0x0;\n    pbVar9 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar9;\n    safefree(pbVar7);\n    local_20 = pcVar2;\n    goto LAB_0003c430;\n  }" { (if_statement "if (pcVar3 != (char *)0x0) {\n      local_24 = dupprintf("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }" if (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      local_24 = dupprintf("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }" { (expression_statement "local_24 = dupprintf("%s/.config/putty",pcVar3);" (assignment_expression "local_24 = dupprintf("%s/.config/putty",pcVar3)" identifier = (call_expression "dupprintf("%s/.config/putty",pcVar3)" identifier (argument_list "("%s/.config/putty",pcVar3)" ( (string_literal ""%s/.config/putty"" " string_content ") , identifier )))) ;) (if_statement "if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n        return local_24;\n      }" if (parenthesized_expression "((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0))" ( (binary_expression "(local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)" (parenthesized_expression "(local_24 != (char *)0x0)" ( (binary_expression "local_24 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar5 = access(local_24,0), iVar5 == 0)" ( (comma_expression "iVar5 = access(local_24,0), iVar5 == 0" (assignment_expression "iVar5 = access(local_24,0)" identifier = (call_expression "access(local_24,0)" identifier (argument_list "(local_24,0)" ( identifier , number_literal )))) , (binary_expression "iVar5 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n        return local_24;\n      }" { (return_statement "return local_24;" return identifier ;) })) (goto_statement "goto LAB_0003c379;" goto statement_identifier ;) })) (if_statement "if (ppVar4 != (passwd *)0x0) {\n      local_24 = dupprintf("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }" if (parenthesized_expression "(ppVar4 != (passwd *)0x0)" ( (binary_expression "ppVar4 != (passwd *)0x0" identifier != (cast_expression "(passwd *)0x0" ( (type_descriptor "passwd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      local_24 = dupprintf("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }" { (expression_statement "local_24 = dupprintf("%s/.config/putty",ppVar4);" (assignment_expression "local_24 = dupprintf("%s/.config/putty",ppVar4)" identifier = (call_expression "dupprintf("%s/.config/putty",ppVar4)" identifier (argument_list "("%s/.config/putty",ppVar4)" ( (string_literal ""%s/.config/putty"" " string_content ") , identifier )))) ;) (if_statement "if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n        return local_24;\n      }" if (parenthesized_expression "((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0))" ( (binary_expression "(local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)" (parenthesized_expression "(local_24 != (char *)0x0)" ( (binary_expression "local_24 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar5 = access(local_24,0), iVar5 == 0)" ( (comma_expression "iVar5 = access(local_24,0), iVar5 == 0" (assignment_expression "iVar5 = access(local_24,0)" identifier = (call_expression "access(local_24,0)" identifier (argument_list "(local_24,0)" ( identifier , number_literal )))) , (binary_expression "iVar5 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n        return local_24;\n      }" { (return_statement "return local_24;" return identifier ;) })) (goto_statement "goto LAB_0003c73d;" goto statement_identifier ;) })) (expression_statement "local_24 = dupprintf("%s/.config/putty",&DAT_000406dd);" (assignment_expression "local_24 = dupprintf("%s/.config/putty",&DAT_000406dd)" identifier = (call_expression "dupprintf("%s/.config/putty",&DAT_000406dd)" identifier (argument_list "("%s/.config/putty",&DAT_000406dd)" ( (string_literal ""%s/.config/putty"" " string_content ") , (pointer_expression "&DAT_000406dd" & identifier) )))) ;) (if_statement "if ((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)) {\n      return local_24;\n    }" if (parenthesized_expression "((local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0))" ( (binary_expression "(local_24 != (char *)0x0) && (iVar5 = access(local_24,0), iVar5 == 0)" (parenthesized_expression "(local_24 != (char *)0x0)" ( (binary_expression "local_24 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar5 = access(local_24,0), iVar5 == 0)" ( (comma_expression "iVar5 = access(local_24,0), iVar5 == 0" (assignment_expression "iVar5 = access(local_24,0)" identifier = (call_expression "access(local_24,0)" identifier (argument_list "(local_24,0)" ( identifier , number_literal )))) , (binary_expression "iVar5 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n      return local_24;\n    }" { (return_statement "return local_24;" return identifier ;) })) (labeled_statement "LAB_0003c7b9:\n    pcVar3 = dupstr("/.putty");" statement_identifier : (expression_statement "pcVar3 = dupstr("/.putty");" (assignment_expression "pcVar3 = dupstr("/.putty")" identifier = (call_expression "dupstr("/.putty")" identifier (argument_list "("/.putty")" ( (string_literal ""/.putty"" " string_content ") )))) ;)) (expression_statement "access(pcVar3,0);" (call_expression "access(pcVar3,0)" identifier (argument_list "(pcVar3,0)" ( identifier , number_literal ))) ;) (expression_statement "pcVar2 = (char *)0x0;" (assignment_expression "pcVar2 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pbVar9 = (byte *)pcVar3;" (assignment_expression "pbVar9 = (byte *)pcVar3" identifier = (cast_expression "(byte *)pcVar3" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (labeled_statement "LAB_0003c7dd:\n    local_28 = pbVar9;" statement_identifier : (expression_statement "local_28 = pbVar9;" (assignment_expression "local_28 = pbVar9" identifier = identifier) ;)) (expression_statement "safefree(pbVar7);" (call_expression "safefree(pbVar7)" identifier (argument_list "(pbVar7)" ( identifier ))) ;) (expression_statement "local_20 = pcVar2;" (assignment_expression "local_20 = pcVar2" identifier = identifier) ;) (goto_statement "goto LAB_0003c430;" goto statement_identifier ;) })) (expression_statement "iVar5 = access(local_24,0);" (assignment_expression "iVar5 = access(local_24,0)" identifier = (call_expression "access(local_24,0)" identifier (argument_list "(local_24,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar5 == 0) {\n    return local_24;\n  }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    return local_24;\n  }" { (return_statement "return local_24;" return identifier ;) })) (if_statement "if (pcVar3 == (char *)0x0) {\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = dupprintf("%s/.putty",ppVar4);\n    pcVar3 = dupstr("/.putty");\n    goto LAB_0003c3e2;\n  }" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = dupprintf("%s/.putty",ppVar4);\n    pcVar3 = dupstr("/.putty");\n    goto LAB_0003c3e2;\n  }" { (if_statement "if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;" if (parenthesized_expression "(ppVar4 == (passwd *)0x0)" ( (binary_expression "ppVar4 == (passwd *)0x0" identifier == (cast_expression "(passwd *)0x0" ( (type_descriptor "passwd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0003c7b9;" goto statement_identifier ;)) (labeled_statement "LAB_0003c73d:\n    local_20 = dupprintf("%s/.putty",ppVar4);" statement_identifier : (expression_statement "local_20 = dupprintf("%s/.putty",ppVar4);" (assignment_expression "local_20 = dupprintf("%s/.putty",ppVar4)" identifier = (call_expression "dupprintf("%s/.putty",ppVar4)" identifier (argument_list "("%s/.putty",ppVar4)" ( (string_literal ""%s/.putty"" " string_content ") , identifier )))) ;)) (expression_statement "pcVar3 = dupstr("/.putty");" (assignment_expression "pcVar3 = dupstr("/.putty")" identifier = (call_expression "dupstr("/.putty")" identifier (argument_list "("/.putty")" ( (string_literal ""/.putty"" " string_content ") )))) ;) (goto_statement "goto LAB_0003c3e2;" goto statement_identifier ;) })) (labeled_statement "LAB_0003c379:\n  pbVar7 = (byte *)dupprintf("%s/.putty",pcVar3);" statement_identifier : (expression_statement "pbVar7 = (byte *)dupprintf("%s/.putty",pcVar3);" (assignment_expression "pbVar7 = (byte *)dupprintf("%s/.putty",pcVar3)" identifier = (cast_expression "(byte *)dupprintf("%s/.putty",pcVar3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "dupprintf("%s/.putty",pcVar3)" identifier (argument_list "("%s/.putty",pcVar3)" ( (string_literal ""%s/.putty"" " string_content ") , identifier ))))) ;)) (expression_statement "local_28 = pbVar7;" (assignment_expression "local_28 = pbVar7" identifier = identifier) ;) (if_statement "if (ppVar4 == (passwd *)0x0) {\n    pcVar3 = dupstr("/.putty");\n    if (pbVar7 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar2 = (char *)0x0;\n      pbVar7 = (byte *)(char *)0x0;\n      pbVar9 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar5 = access((char *)pbVar7,0);\n    if (iVar5 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar5 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar5 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar2 = local_20;\n      pbVar7 = local_28;\n      pbVar9 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    safefree(local_20);\n    local_20 = (char *)local_28;\n  }\n  else {\n    local_20 = dupprintf("%s/.putty",ppVar4);\n    pcVar3 = dupstr("/.putty");\n    if (pbVar7 == (byte *)0x0) {\n      pbVar7 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar5 = access(local_20,0), iVar5 != 0)) {\n        iVar5 = access(pcVar3,0);\n        local_28 = pbVar7;\n        if (iVar5 == 0) goto LAB_0003c635;\n        if (pbVar7 == (byte *)0x0) {\n          pcVar2 = (char *)pbVar7;\n          pbVar9 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar7) {\nLAB_0003c7fe:\n        pcVar2 = local_20;\n        pbVar9 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar5 = access((char *)pbVar7,0);\n      if (iVar5 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }" if (parenthesized_expression "(ppVar4 == (passwd *)0x0)" ( (binary_expression "ppVar4 == (passwd *)0x0" identifier == (cast_expression "(passwd *)0x0" ( (type_descriptor "passwd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar3 = dupstr("/.putty");\n    if (pbVar7 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar2 = (char *)0x0;\n      pbVar7 = (byte *)(char *)0x0;\n      pbVar9 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar5 = access((char *)pbVar7,0);\n    if (iVar5 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar5 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar5 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar2 = local_20;\n      pbVar7 = local_28;\n      pbVar9 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    safefree(local_20);\n    local_20 = (char *)local_28;\n  }" { (expression_statement "pcVar3 = dupstr("/.putty");" (assignment_expression "pcVar3 = dupstr("/.putty")" identifier = (call_expression "dupstr("/.putty")" identifier (argument_list "("/.putty")" ( (string_literal ""/.putty"" " string_content ") )))) ;) (if_statement "if (pbVar7 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar2 = (char *)0x0;\n      pbVar7 = (byte *)(char *)0x0;\n      pbVar9 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }" if (parenthesized_expression "(pbVar7 == (byte *)0x0)" ( (binary_expression "pbVar7 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      access(pcVar3,0);\n      pcVar2 = (char *)0x0;\n      pbVar7 = (byte *)(char *)0x0;\n      pbVar9 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }" { (expression_statement "access(pcVar3,0);" (call_expression "access(pcVar3,0)" identifier (argument_list "(pcVar3,0)" ( identifier , number_literal ))) ;) (expression_statement "pcVar2 = (char *)0x0;" (assignment_expression "pcVar2 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pbVar7 = (byte *)(char *)0x0;" (assignment_expression "pbVar7 = (byte *)(char *)0x0" identifier = (cast_expression "(byte *)(char *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ;) (expression_statement "pbVar9 = (byte *)pcVar3;" (assignment_expression "pbVar9 = (byte *)pcVar3" identifier = (cast_expression "(byte *)pcVar3" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (goto_statement "goto LAB_0003c7dd;" goto statement_identifier ;) })) (expression_statement "iVar5 = access((char *)pbVar7,0);" (assignment_expression "iVar5 = access((char *)pbVar7,0)" identifier = (call_expression "access((char *)pbVar7,0)" identifier (argument_list "((char *)pbVar7,0)" ( (cast_expression "(char *)pbVar7" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , number_literal )))) ;) (if_statement "if (iVar5 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar5 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar5 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar2 = local_20;\n      pbVar7 = local_28;\n      pbVar9 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      local_20 = (char *)0x0;\n    }" { (expression_statement "local_20 = (char *)0x0;" (assignment_expression "local_20 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n      iVar5 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar5 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar2 = local_20;\n      pbVar7 = local_28;\n      pbVar9 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }" else (compound_statement "{\n      iVar5 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar5 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar2 = local_20;\n      pbVar7 = local_28;\n      pbVar9 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }" { (expression_statement "iVar5 = access(pcVar3,0);" (assignment_expression "iVar5 = access(pcVar3,0)" identifier = (call_expression "access(pcVar3,0)" identifier (argument_list "(pcVar3,0)" ( identifier , number_literal )))) ;) (expression_statement "local_20 = (char *)0x0;" (assignment_expression "local_20 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (iVar5 != 0) goto LAB_0003c430;" if (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0003c430;" goto statement_identifier ;)) (labeled_statement "LAB_0003c635:\n      pcVar2 = local_20;" statement_identifier : (expression_statement "pcVar2 = local_20;" (assignment_expression "pcVar2 = local_20" identifier = identifier) ;)) (expression_statement "pbVar7 = local_28;" (assignment_expression "pbVar7 = local_28" identifier = identifier) ;) (expression_statement "pbVar9 = (byte *)pcVar3;" (assignment_expression "pbVar9 = (byte *)pcVar3" identifier = (cast_expression "(byte *)pcVar3" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;" if (parenthesized_expression "((byte *)pcVar3 != local_28)" ( (binary_expression "(byte *)pcVar3 != local_28" (cast_expression "(byte *)pcVar3" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) != identifier) )) (goto_statement "goto LAB_0003c7dd;" goto statement_identifier ;)) (if_statement "if (local_20 == pcVar3) goto LAB_0003c456;" if (parenthesized_expression "(local_20 == pcVar3)" ( (binary_expression "local_20 == pcVar3" identifier == identifier) )) (goto_statement "goto LAB_0003c456;" goto statement_identifier ;)) }))) (labeled_statement "LAB_0003c436:\n    safefree(local_20);" statement_identifier : (expression_statement "safefree(local_20);" (call_expression "safefree(local_20)" identifier (argument_list "(local_20)" ( identifier ))) ;)) (expression_statement "local_20 = (char *)local_28;" (assignment_expression "local_20 = (char *)local_28" identifier = (cast_expression "(char *)local_28" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) }) (else_clause "else {\n    local_20 = dupprintf("%s/.putty",ppVar4);\n    pcVar3 = dupstr("/.putty");\n    if (pbVar7 == (byte *)0x0) {\n      pbVar7 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar5 = access(local_20,0), iVar5 != 0)) {\n        iVar5 = access(pcVar3,0);\n        local_28 = pbVar7;\n        if (iVar5 == 0) goto LAB_0003c635;\n        if (pbVar7 == (byte *)0x0) {\n          pcVar2 = (char *)pbVar7;\n          pbVar9 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar7) {\nLAB_0003c7fe:\n        pcVar2 = local_20;\n        pbVar9 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar5 = access((char *)pbVar7,0);\n      if (iVar5 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }" else (compound_statement "{\n    local_20 = dupprintf("%s/.putty",ppVar4);\n    pcVar3 = dupstr("/.putty");\n    if (pbVar7 == (byte *)0x0) {\n      pbVar7 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar5 = access(local_20,0), iVar5 != 0)) {\n        iVar5 = access(pcVar3,0);\n        local_28 = pbVar7;\n        if (iVar5 == 0) goto LAB_0003c635;\n        if (pbVar7 == (byte *)0x0) {\n          pcVar2 = (char *)pbVar7;\n          pbVar9 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar7) {\nLAB_0003c7fe:\n        pcVar2 = local_20;\n        pbVar9 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar5 = access((char *)pbVar7,0);\n      if (iVar5 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }" { (expression_statement "local_20 = dupprintf("%s/.putty",ppVar4);" (assignment_expression "local_20 = dupprintf("%s/.putty",ppVar4)" identifier = (call_expression "dupprintf("%s/.putty",ppVar4)" identifier (argument_list "("%s/.putty",ppVar4)" ( (string_literal ""%s/.putty"" " string_content ") , identifier )))) ;) (expression_statement "pcVar3 = dupstr("/.putty");" (assignment_expression "pcVar3 = dupstr("/.putty")" identifier = (call_expression "dupstr("/.putty")" identifier (argument_list "("/.putty")" ( (string_literal ""/.putty"" " string_content ") )))) ;) (if_statement "if (pbVar7 == (byte *)0x0) {\n      pbVar7 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar5 = access(local_20,0), iVar5 != 0)) {\n        iVar5 = access(pcVar3,0);\n        local_28 = pbVar7;\n        if (iVar5 == 0) goto LAB_0003c635;\n        if (pbVar7 == (byte *)0x0) {\n          pcVar2 = (char *)pbVar7;\n          pbVar9 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar7) {\nLAB_0003c7fe:\n        pcVar2 = local_20;\n        pbVar9 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar5 = access((char *)pbVar7,0);\n      if (iVar5 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }" if (parenthesized_expression "(pbVar7 == (byte *)0x0)" ( (binary_expression "pbVar7 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pbVar7 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar5 = access(local_20,0), iVar5 != 0)) {\n        iVar5 = access(pcVar3,0);\n        local_28 = pbVar7;\n        if (iVar5 == 0) goto LAB_0003c635;\n        if (pbVar7 == (byte *)0x0) {\n          pcVar2 = (char *)pbVar7;\n          pbVar9 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar7) {\nLAB_0003c7fe:\n        pcVar2 = local_20;\n        pbVar9 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }" { (expression_statement "pbVar7 = (byte *)0x0;" (assignment_expression "pbVar7 = (byte *)0x0" identifier = (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar5 = access(local_20,0), iVar5 != 0)) {\n        iVar5 = access(pcVar3,0);\n        local_28 = pbVar7;\n        if (iVar5 == 0) goto LAB_0003c635;\n        if (pbVar7 == (byte *)0x0) {\n          pcVar2 = (char *)pbVar7;\n          pbVar9 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }" statement_identifier : (if_statement "if ((local_20 == (char *)0x0) || (iVar5 = access(local_20,0), iVar5 != 0)) {\n        iVar5 = access(pcVar3,0);\n        local_28 = pbVar7;\n        if (iVar5 == 0) goto LAB_0003c635;\n        if (pbVar7 == (byte *)0x0) {\n          pcVar2 = (char *)pbVar7;\n          pbVar9 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }" if (parenthesized_expression "((local_20 == (char *)0x0) || (iVar5 = access(local_20,0), iVar5 != 0))" ( (binary_expression "(local_20 == (char *)0x0) || (iVar5 = access(local_20,0), iVar5 != 0)" (parenthesized_expression "(local_20 == (char *)0x0)" ( (binary_expression "local_20 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(iVar5 = access(local_20,0), iVar5 != 0)" ( (comma_expression "iVar5 = access(local_20,0), iVar5 != 0" (assignment_expression "iVar5 = access(local_20,0)" identifier = (call_expression "access(local_20,0)" identifier (argument_list "(local_20,0)" ( identifier , number_literal )))) , (binary_expression "iVar5 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n        iVar5 = access(pcVar3,0);\n        local_28 = pbVar7;\n        if (iVar5 == 0) goto LAB_0003c635;\n        if (pbVar7 == (byte *)0x0) {\n          pcVar2 = (char *)pbVar7;\n          pbVar9 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }" { (expression_statement "iVar5 = access(pcVar3,0);" (assignment_expression "iVar5 = access(pcVar3,0)" identifier = (call_expression "access(pcVar3,0)" identifier (argument_list "(pcVar3,0)" ( identifier , number_literal )))) ;) (expression_statement "local_28 = pbVar7;" (assignment_expression "local_28 = pbVar7" identifier = identifier) ;) (if_statement "if (iVar5 == 0) goto LAB_0003c635;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0003c635;" goto statement_identifier ;)) (if_statement "if (pbVar7 == (byte *)0x0) {\n          pcVar2 = (char *)pbVar7;\n          pbVar9 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }" if (parenthesized_expression "(pbVar7 == (byte *)0x0)" ( (binary_expression "pbVar7 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          pcVar2 = (char *)pbVar7;\n          pbVar9 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }" { (expression_statement "pcVar2 = (char *)pbVar7;" (assignment_expression "pcVar2 = (char *)pbVar7" identifier = (cast_expression "(char *)pbVar7" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "pbVar9 = (byte *)pcVar3;" (assignment_expression "pbVar9 = (byte *)pcVar3" identifier = (cast_expression "(byte *)pcVar3" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if (local_20 == (char *)0x0) goto LAB_0003c7dd;" if (parenthesized_expression "(local_20 == (char *)0x0)" ( (binary_expression "local_20 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0003c7dd;" goto statement_identifier ;)) (goto_statement "goto LAB_0003c7fe;" goto statement_identifier ;) })) (goto_statement "goto LAB_0003c430;" goto statement_identifier ;) }))) (if_statement "if ((byte *)local_20 != pbVar7) {\nLAB_0003c7fe:\n        pcVar2 = local_20;\n        pbVar9 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }" if (parenthesized_expression "((byte *)local_20 != pbVar7)" ( (binary_expression "(byte *)local_20 != pbVar7" (cast_expression "(byte *)local_20" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) != identifier) )) (compound_statement "{\nLAB_0003c7fe:\n        pcVar2 = local_20;\n        pbVar9 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }" { (labeled_statement "LAB_0003c7fe:\n        pcVar2 = local_20;" statement_identifier : (expression_statement "pcVar2 = local_20;" (assignment_expression "pcVar2 = local_20" identifier = identifier) ;)) (expression_statement "pbVar9 = (byte *)local_20;" (assignment_expression "pbVar9 = (byte *)local_20" identifier = (cast_expression "(byte *)local_20" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (goto_statement "goto LAB_0003c7dd;" goto statement_identifier ;) })) }) (else_clause "else {\n      iVar5 = access((char *)pbVar7,0);\n      if (iVar5 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }" else (compound_statement "{\n      iVar5 = access((char *)pbVar7,0);\n      if (iVar5 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }" { (expression_statement "iVar5 = access((char *)pbVar7,0);" (assignment_expression "iVar5 = access((char *)pbVar7,0)" identifier = (call_expression "access((char *)pbVar7,0)" identifier (argument_list "((char *)pbVar7,0)" ( (cast_expression "(char *)pbVar7" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , number_literal )))) ;) (if_statement "if (iVar5 != 0) goto LAB_0003c3e2;" if (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0003c3e2;" goto statement_identifier ;)) (labeled_statement "LAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;" statement_identifier : (if_statement "if (local_28 != (byte *)local_20) goto LAB_0003c436;" if (parenthesized_expression "(local_28 != (byte *)local_20)" ( (binary_expression "local_28 != (byte *)local_20" identifier != (cast_expression "(byte *)local_20" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (goto_statement "goto LAB_0003c436;" goto statement_identifier ;))) }))) }))) (if_statement "if (local_20 != pcVar3) {\n    safefree(pcVar3);\n  }" if (parenthesized_expression "(local_20 != pcVar3)" ( (binary_expression "local_20 != pcVar3" identifier != identifier) )) (compound_statement "{\n    safefree(pcVar3);\n  }" { (expression_statement "safefree(pcVar3);" (call_expression "safefree(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier ))) ;) })) (labeled_statement "LAB_0003c456:\n  if (local_20 != local_24) {\n    safefree(local_24);\n  }" statement_identifier : (if_statement "if (local_20 != local_24) {\n    safefree(local_24);\n  }" if (parenthesized_expression "(local_20 != local_24)" ( (binary_expression "local_20 != local_24" identifier != identifier) )) (compound_statement "{\n    safefree(local_24);\n  }" { (expression_statement "safefree(local_24);" (call_expression "safefree(local_24)" identifier (argument_list "(local_24)" ( identifier ))) ;) }))) (return_statement "return local_20;" return identifier ;) })))
(translation_unit "char * __regparm3 FUN_0003c240(int param_1,char *param_2)\n\n{\n  byte bVar1;\n  undefined4 uVar2;\n  char *pcVar3;\n  __uid_t __uid;\n  passwd *ppVar4;\n  char *pcVar5;\n  int iVar6;\n  size_t sVar7;\n  byte *pbVar8;\n  byte bVar9;\n  byte *pbVar10;\n  byte *local_28;\n  char *local_24;\n  char *local_20;\n  \n  if (param_1 != 0) {\n    if (param_1 == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);\n    FUN_0001c5f0(uVar2);\n    return pcVar3;\n  }\n  pcVar3 = getenv("PUTTYDIR");\n  if (pcVar3 != (char *)0x0) {\n    pcVar3 = (char *)FUN_0001be70(pcVar3);\n    return pcVar3;\n  }\n  pcVar3 = getenv("HOME");\n  __uid = getuid();\n  ppVar4 = getpwuid(__uid);\n  if (ppVar4 != (passwd *)0x0) {\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }\n  pcVar5 = getenv("XDG_CONFIG_HOME");\n  pbVar8 = (byte *)0x0;\n  if (((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||\n     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)) {\n    if (pcVar3 != (char *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    access(pcVar3,0);\n    pcVar5 = (char *)0x0;\n    pbVar10 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar10;\n    FUN_0001c5f0(pbVar8);\n    local_20 = pcVar5;\n    goto LAB_0003c430;\n  }\n  iVar6 = access(local_24,0);\n  if (iVar6 == 0) {\n    return local_24;\n  }\n  if (pcVar3 == (char *)0x0) {\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    goto LAB_0003c3e2;\n  }\nLAB_0003c379:\n  pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3);\n  local_28 = pbVar8;\n  if (ppVar4 == (passwd *)0x0) {\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar6 = access((char *)pbVar8,0);\n    if (iVar6 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    FUN_0001c5f0(local_20);\n    local_20 = (char *)local_28;\n  }\n  else {\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }\n  if (local_20 != pcVar3) {\n    FUN_0001c5f0(pcVar3);\n  }\nLAB_0003c456:\n  if (local_20 != local_24) {\n    FUN_0001c5f0(local_24);\n  }\n  return local_20;\n}\n\n" (function_definition "char * __regparm3 FUN_0003c240(int param_1,char *param_2)\n\n{\n  byte bVar1;\n  undefined4 uVar2;\n  char *pcVar3;\n  __uid_t __uid;\n  passwd *ppVar4;\n  char *pcVar5;\n  int iVar6;\n  size_t sVar7;\n  byte *pbVar8;\n  byte bVar9;\n  byte *pbVar10;\n  byte *local_28;\n  char *local_24;\n  char *local_20;\n  \n  if (param_1 != 0) {\n    if (param_1 == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);\n    FUN_0001c5f0(uVar2);\n    return pcVar3;\n  }\n  pcVar3 = getenv("PUTTYDIR");\n  if (pcVar3 != (char *)0x0) {\n    pcVar3 = (char *)FUN_0001be70(pcVar3);\n    return pcVar3;\n  }\n  pcVar3 = getenv("HOME");\n  __uid = getuid();\n  ppVar4 = getpwuid(__uid);\n  if (ppVar4 != (passwd *)0x0) {\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }\n  pcVar5 = getenv("XDG_CONFIG_HOME");\n  pbVar8 = (byte *)0x0;\n  if (((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||\n     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)) {\n    if (pcVar3 != (char *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    access(pcVar3,0);\n    pcVar5 = (char *)0x0;\n    pbVar10 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar10;\n    FUN_0001c5f0(pbVar8);\n    local_20 = pcVar5;\n    goto LAB_0003c430;\n  }\n  iVar6 = access(local_24,0);\n  if (iVar6 == 0) {\n    return local_24;\n  }\n  if (pcVar3 == (char *)0x0) {\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    goto LAB_0003c3e2;\n  }\nLAB_0003c379:\n  pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3);\n  local_28 = pbVar8;\n  if (ppVar4 == (passwd *)0x0) {\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar6 = access((char *)pbVar8,0);\n    if (iVar6 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    FUN_0001c5f0(local_20);\n    local_20 = (char *)local_28;\n  }\n  else {\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }\n  if (local_20 != pcVar3) {\n    FUN_0001c5f0(pcVar3);\n  }\nLAB_0003c456:\n  if (local_20 != local_24) {\n    FUN_0001c5f0(local_24);\n  }\n  return local_20;\n}" primitive_type (pointer_declarator "* __regparm3 FUN_0003c240(int param_1,char *param_2)" * (ERROR "__regparm3" identifier) (function_declarator "FUN_0003c240(int param_1,char *param_2)" identifier (parameter_list "(int param_1,char *param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  byte bVar1;\n  undefined4 uVar2;\n  char *pcVar3;\n  __uid_t __uid;\n  passwd *ppVar4;\n  char *pcVar5;\n  int iVar6;\n  size_t sVar7;\n  byte *pbVar8;\n  byte bVar9;\n  byte *pbVar10;\n  byte *local_28;\n  char *local_24;\n  char *local_20;\n  \n  if (param_1 != 0) {\n    if (param_1 == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);\n    FUN_0001c5f0(uVar2);\n    return pcVar3;\n  }\n  pcVar3 = getenv("PUTTYDIR");\n  if (pcVar3 != (char *)0x0) {\n    pcVar3 = (char *)FUN_0001be70(pcVar3);\n    return pcVar3;\n  }\n  pcVar3 = getenv("HOME");\n  __uid = getuid();\n  ppVar4 = getpwuid(__uid);\n  if (ppVar4 != (passwd *)0x0) {\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }\n  pcVar5 = getenv("XDG_CONFIG_HOME");\n  pbVar8 = (byte *)0x0;\n  if (((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||\n     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)) {\n    if (pcVar3 != (char *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    access(pcVar3,0);\n    pcVar5 = (char *)0x0;\n    pbVar10 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar10;\n    FUN_0001c5f0(pbVar8);\n    local_20 = pcVar5;\n    goto LAB_0003c430;\n  }\n  iVar6 = access(local_24,0);\n  if (iVar6 == 0) {\n    return local_24;\n  }\n  if (pcVar3 == (char *)0x0) {\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    goto LAB_0003c3e2;\n  }\nLAB_0003c379:\n  pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3);\n  local_28 = pbVar8;\n  if (ppVar4 == (passwd *)0x0) {\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar6 = access((char *)pbVar8,0);\n    if (iVar6 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    FUN_0001c5f0(local_20);\n    local_20 = (char *)local_28;\n  }\n  else {\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }\n  if (local_20 != pcVar3) {\n    FUN_0001c5f0(pcVar3);\n  }\nLAB_0003c456:\n  if (local_20 != local_24) {\n    FUN_0001c5f0(local_24);\n  }\n  return local_20;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "__uid_t __uid;" type_identifier identifier ;) (declaration "passwd *ppVar4;" type_identifier (pointer_declarator "*ppVar4" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "size_t sVar7;" primitive_type identifier ;) (declaration "byte *pbVar8;" type_identifier (pointer_declarator "*pbVar8" * identifier) ;) (declaration "byte bVar9;" type_identifier identifier ;) (declaration "byte *pbVar10;" type_identifier (pointer_declarator "*pbVar10" * identifier) ;) (declaration "byte *local_28;" type_identifier (pointer_declarator "*local_28" * identifier) ;) (declaration "char *local_24;" primitive_type (pointer_declarator "*local_24" * identifier) ;) (declaration "char *local_20;" primitive_type (pointer_declarator "*local_20" * identifier) ;) (if_statement "if (param_1 != 0) {\n    if (param_1 == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);\n    FUN_0001c5f0(uVar2);\n    return pcVar3;\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_1 == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);\n    FUN_0001c5f0(uVar2);\n    return pcVar3;\n  }" { (if_statement "if (param_1 == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }" if (parenthesized_expression "(param_1 == 4)" ( (binary_expression "param_1 == 4" identifier == number_literal) )) (compound_statement "{\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }" { (expression_statement "pcVar3 = getenv("PUTTYSESSIONS");" (assignment_expression "pcVar3 = getenv("PUTTYSESSIONS")" identifier = (call_expression "getenv("PUTTYSESSIONS")" identifier (argument_list "("PUTTYSESSIONS")" ( (string_literal ""PUTTYSESSIONS"" " string_content ") )))) ;) (if_statement "if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }" if (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }" { (labeled_statement "LAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);" statement_identifier : (expression_statement "pcVar3 = (char *)FUN_0001be70(pcVar3);" (assignment_expression "pcVar3 = (char *)FUN_0001be70(pcVar3)" identifier = (cast_expression "(char *)FUN_0001be70(pcVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001be70(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier ))))) ;)) (return_statement "return pcVar3;" return identifier ;) })) (expression_statement "uVar2 = FUN_0003c240();" (assignment_expression "uVar2 = FUN_0003c240()" identifier = (call_expression "FUN_0003c240()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar3 = "%s/sessions";" (assignment_expression "pcVar3 = "%s/sessions"" identifier = (string_literal ""%s/sessions"" " string_content ")) ;) }) (else_clause "else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }" else (compound_statement "{\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }" { (if_statement "if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }" if (parenthesized_expression "(param_1 == 5)" ( (binary_expression "param_1 == 5" identifier == number_literal) )) (compound_statement "{\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }" { (if_statement "if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }" if (parenthesized_expression "(((byte *)param_2 != (byte *)0x0) && (*param_2 != 0))" ( (binary_expression "((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)" (parenthesized_expression "((byte *)param_2 != (byte *)0x0)" ( (binary_expression "(byte *)param_2 != (byte *)0x0" (cast_expression "(byte *)param_2" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) != (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(*param_2 != 0)" ( (binary_expression "*param_2 != 0" (pointer_expression "*param_2" * identifier) != number_literal) ))) )) (compound_statement "{\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }" { (expression_statement "sVar7 = strlen(param_2);" (assignment_expression "sVar7 = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);" (assignment_expression "local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1)" identifier = (cast_expression "(byte *)FUN_0001bd60(sVar7 * 3 + 1,1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001bd60(sVar7 * 3 + 1,1)" identifier (argument_list "(sVar7 * 3 + 1,1)" ( (binary_expression "sVar7 * 3 + 1" (binary_expression "sVar7 * 3" identifier * number_literal) + number_literal) , number_literal ))))) ;) (expression_statement "bVar1 = *param_2;" (assignment_expression "bVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "pbVar8 = local_28;" (assignment_expression "pbVar8 = local_28" identifier = identifier) ;) (while_statement "while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }" while (parenthesized_expression "(bVar1 != 0)" ( (binary_expression "bVar1 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }" { (labeled_statement "LAB_0003c4e3:\n            bVar9 = 1;" statement_identifier : (expression_statement "bVar9 = 1;" (assignment_expression "bVar9 = 1" identifier = number_literal) ;)) (if_statement "if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }" if (parenthesized_expression "((byte)(bVar1 - 0x2b) < 0x16)" ( (binary_expression "(byte)(bVar1 - 0x2b) < 0x16" (call_expression "(byte)(bVar1 - 0x2b)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar1 - 0x2b)" ( (binary_expression "bVar1 - 0x2b" identifier - number_literal) ))) < number_literal) )) (compound_statement "{\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }" { (expression_statement "bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;" (assignment_expression "bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1" identifier = (binary_expression "~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1" (unary_expression "~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f))" ~ (call_expression "(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f))" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(0x20000d >> (bVar1 - 0x2b & 0x1f))" ( (binary_expression "0x20000d >> (bVar1 - 0x2b & 0x1f)" number_literal >> (parenthesized_expression "(bVar1 - 0x2b & 0x1f)" ( (binary_expression "bVar1 - 0x2b & 0x1f" (binary_expression "bVar1 - 0x2b" identifier - number_literal) & number_literal) ))) )))) & number_literal)) ;) })) (if_statement "if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }" if (parenthesized_expression "((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a))" ( (binary_expression "(((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)" (parenthesized_expression "(((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10))" ( (binary_expression "((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)" (parenthesized_expression "((bVar1 == 0x5f) || (bVar9 == 0))" ( (binary_expression "(bVar1 == 0x5f) || (bVar9 == 0)" (parenthesized_expression "(bVar1 == 0x5f)" ( (binary_expression "bVar1 == 0x5f" identifier == number_literal) )) || (parenthesized_expression "(bVar9 == 0)" ( (binary_expression "bVar9 == 0" identifier == number_literal) ))) )) || (parenthesized_expression "((byte)(bVar1 - 0x30) < 10)" ( (binary_expression "(byte)(bVar1 - 0x30) < 10" (call_expression "(byte)(bVar1 - 0x30)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar1 - 0x30)" ( (binary_expression "bVar1 - 0x30" identifier - number_literal) ))) < number_literal) ))) )) || (parenthesized_expression "((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)" ( (binary_expression "(byte)((bVar1 & 0xdf) + 0xbf) < 0x1a" (call_expression "(byte)((bVar1 & 0xdf) + 0xbf)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "((bVar1 & 0xdf) + 0xbf)" ( (binary_expression "(bVar1 & 0xdf) + 0xbf" (parenthesized_expression "(bVar1 & 0xdf)" ( (binary_expression "bVar1 & 0xdf" identifier & number_literal) )) + number_literal) ))) < number_literal) ))) )) (compound_statement "{\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }" { (expression_statement "*pbVar8 = bVar1;" (assignment_expression "*pbVar8 = bVar1" (pointer_expression "*pbVar8" * identifier) = identifier) ;) (expression_statement "pbVar10 = pbVar8 + 1;" (assignment_expression "pbVar10 = pbVar8 + 1" identifier = (binary_expression "pbVar8 + 1" identifier + number_literal)) ;) }) (else_clause "else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }" else (compound_statement "{\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }" { (expression_statement "*pbVar8 = 0x25;" (assignment_expression "*pbVar8 = 0x25" (pointer_expression "*pbVar8" * identifier) = number_literal) ;) (expression_statement "pbVar10 = pbVar8 + 3;" (assignment_expression "pbVar10 = pbVar8 + 3" identifier = (binary_expression "pbVar8 + 3" identifier + number_literal)) ;) (expression_statement "pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];" (assignment_expression "pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4]" (subscript_expression "pbVar8[1]" identifier [ number_literal ]) = (subscript_expression ""0123456789ABCDEF"[(byte)*param_2 >> 4]" (string_literal ""0123456789ABCDEF"" " string_content ") [ (binary_expression "(byte)*param_2 >> 4" (binary_expression "(byte)*param_2" (parenthesized_expression "(byte)" ( identifier )) * identifier) >> number_literal) ])) ;) (expression_statement "pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];" (assignment_expression "pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf]" (subscript_expression "pbVar8[2]" identifier [ number_literal ]) = (subscript_expression ""0123456789ABCDEF"[(byte)*param_2 & 0xf]" (string_literal ""0123456789ABCDEF"" " string_content ") [ (binary_expression "(byte)*param_2 & 0xf" (binary_expression "(byte)*param_2" (parenthesized_expression "(byte)" ( identifier )) * identifier) & number_literal) ])) ;) }))) (expression_statement "param_2 = (char *)((byte *)param_2 + 1);" (assignment_expression "param_2 = (char *)((byte *)param_2 + 1)" identifier = (cast_expression "(char *)((byte *)param_2 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)param_2 + 1)" ( (binary_expression "(byte *)param_2 + 1" (cast_expression "(byte *)param_2" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) ;) (expression_statement "pbVar8 = pbVar10;" (assignment_expression "pbVar8 = pbVar10" identifier = identifier) ;) (expression_statement "bVar1 = *param_2;" (assignment_expression "bVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) })) (expression_statement "*pbVar8 = 0;" (assignment_expression "*pbVar8 = 0" (pointer_expression "*pbVar8" * identifier) = number_literal) ;) (expression_statement "uVar2 = FUN_0003c240();" (assignment_expression "uVar2 = FUN_0003c240()" identifier = (call_expression "FUN_0003c240()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);" (assignment_expression "pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28)" identifier = (cast_expression "(char *)FUN_0001c3d0("%s/%s",uVar2,local_28)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c3d0("%s/%s",uVar2,local_28)" identifier (argument_list "("%s/%s",uVar2,local_28)" ( (string_literal ""%s/%s"" " string_content ") , identifier , identifier ))))) ;) (expression_statement "FUN_0001c5f0(uVar2);" (call_expression "FUN_0001c5f0(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (expression_statement "FUN_0001c5f0(local_28);" (call_expression "FUN_0001c5f0(local_28)" identifier (argument_list "(local_28)" ( identifier ))) ;) (return_statement "return pcVar3;" return identifier ;) })) (expression_statement "pbVar8 = (byte *)FUN_0001bd60(0x31,1);" (assignment_expression "pbVar8 = (byte *)FUN_0001bd60(0x31,1)" identifier = (cast_expression "(byte *)FUN_0001bd60(0x31,1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001bd60(0x31,1)" identifier (argument_list "(0x31,1)" ( number_literal , number_literal ))))) ;) (expression_statement "param_2 = "Default Settings";" (assignment_expression "param_2 = "Default Settings"" identifier = (string_literal ""Default Settings"" " string_content ")) ;) (expression_statement "bVar1 = 0x44;" (assignment_expression "bVar1 = 0x44" identifier = number_literal) ;) (expression_statement "local_28 = pbVar8;" (assignment_expression "local_28 = pbVar8" identifier = identifier) ;) (goto_statement "goto LAB_0003c4e3;" goto statement_identifier ;) })) (if_statement "if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" if (parenthesized_expression "(param_1 == 1)" ( (binary_expression "param_1 == 1" identifier == number_literal) )) (compound_statement "{\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }" { (expression_statement "pcVar3 = getenv("PUTTYSSHHOSTKEYS");" (assignment_expression "pcVar3 = getenv("PUTTYSSHHOSTKEYS")" identifier = (call_expression "getenv("PUTTYSSHHOSTKEYS")" identifier (argument_list "("PUTTYSSHHOSTKEYS")" ( (string_literal ""PUTTYSSHHOSTKEYS"" " string_content ") )))) ;) (if_statement "if (pcVar3 != (char *)0x0) goto LAB_0003c562;" if (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0003c562;" goto statement_identifier ;)) (expression_statement "uVar2 = FUN_0003c240();" (assignment_expression "uVar2 = FUN_0003c240()" identifier = (call_expression "FUN_0003c240()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar3 = "%s/sshhostkeys";" (assignment_expression "pcVar3 = "%s/sshhostkeys"" identifier = (string_literal ""%s/sshhostkeys"" " string_content ")) ;) }) (else_clause "else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" else (if_statement "if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" if (parenthesized_expression "(param_1 == 2)" ( (binary_expression "param_1 == 2" identifier == number_literal) )) (compound_statement "{\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }" { (expression_statement "uVar2 = FUN_0003c240();" (assignment_expression "uVar2 = FUN_0003c240()" identifier = (call_expression "FUN_0003c240()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar3 = "%s.tmp";" (assignment_expression "pcVar3 = "%s.tmp"" identifier = (string_literal ""%s.tmp"" " string_content ")) ;) }) (else_clause "else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" else (if_statement "if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" if (parenthesized_expression "(param_1 == 3)" ( (binary_expression "param_1 == 3" identifier == number_literal) )) (compound_statement "{\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }" { (expression_statement "pcVar3 = getenv("PUTTYRANDOMSEED");" (assignment_expression "pcVar3 = getenv("PUTTYRANDOMSEED")" identifier = (call_expression "getenv("PUTTYRANDOMSEED")" identifier (argument_list "("PUTTYRANDOMSEED")" ( (string_literal ""PUTTYRANDOMSEED"" " string_content ") )))) ;) (if_statement "if (pcVar3 != (char *)0x0) goto LAB_0003c562;" if (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0003c562;" goto statement_identifier ;)) (expression_statement "uVar2 = FUN_0003c240();" (assignment_expression "uVar2 = FUN_0003c240()" identifier = (call_expression "FUN_0003c240()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar3 = "%s/randomseed";" (assignment_expression "pcVar3 = "%s/randomseed"" identifier = (string_literal ""%s/randomseed"" " string_content ")) ;) }) (else_clause "else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" else (compound_statement "{\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" { (expression_statement "uVar2 = FUN_0003c240();" (assignment_expression "uVar2 = FUN_0003c240()" identifier = (call_expression "FUN_0003c240()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar3 = "%s/ERROR";" (assignment_expression "pcVar3 = "%s/ERROR"" identifier = (string_literal ""%s/ERROR"" " string_content ")) ;) }))))))) }))) (expression_statement "pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);" (assignment_expression "pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2)" identifier = (cast_expression "(char *)FUN_0001c3d0(pcVar3,uVar2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c3d0(pcVar3,uVar2)" identifier (argument_list "(pcVar3,uVar2)" ( identifier , identifier ))))) ;) (expression_statement "FUN_0001c5f0(uVar2);" (call_expression "FUN_0001c5f0(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (return_statement "return pcVar3;" return identifier ;) })) (expression_statement "pcVar3 = getenv("PUTTYDIR");" (assignment_expression "pcVar3 = getenv("PUTTYDIR")" identifier = (call_expression "getenv("PUTTYDIR")" identifier (argument_list "("PUTTYDIR")" ( (string_literal ""PUTTYDIR"" " string_content ") )))) ;) (if_statement "if (pcVar3 != (char *)0x0) {\n    pcVar3 = (char *)FUN_0001be70(pcVar3);\n    return pcVar3;\n  }" if (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar3 = (char *)FUN_0001be70(pcVar3);\n    return pcVar3;\n  }" { (expression_statement "pcVar3 = (char *)FUN_0001be70(pcVar3);" (assignment_expression "pcVar3 = (char *)FUN_0001be70(pcVar3)" identifier = (cast_expression "(char *)FUN_0001be70(pcVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001be70(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier ))))) ;) (return_statement "return pcVar3;" return identifier ;) })) (expression_statement "pcVar3 = getenv("HOME");" (assignment_expression "pcVar3 = getenv("HOME")" identifier = (call_expression "getenv("HOME")" identifier (argument_list "("HOME")" ( (string_literal ""HOME"" " string_content ") )))) ;) (expression_statement "__uid = getuid();" (assignment_expression "__uid = getuid()" identifier = (call_expression "getuid()" identifier (argument_list "()" ( )))) ;) (expression_statement "ppVar4 = getpwuid(__uid);" (assignment_expression "ppVar4 = getpwuid(__uid)" identifier = (call_expression "getpwuid(__uid)" identifier (argument_list "(__uid)" ( identifier )))) ;) (if_statement "if (ppVar4 != (passwd *)0x0) {\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }" if (parenthesized_expression "(ppVar4 != (passwd *)0x0)" ( (binary_expression "ppVar4 != (passwd *)0x0" identifier != (cast_expression "(passwd *)0x0" ( (type_descriptor "passwd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }" { (expression_statement "ppVar4 = (passwd *)ppVar4->pw_dir;" (assignment_expression "ppVar4 = (passwd *)ppVar4->pw_dir" identifier = (cast_expression "(passwd *)ppVar4->pw_dir" ( (type_descriptor "passwd *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "ppVar4->pw_dir" identifier -> field_identifier))) ;) })) (expression_statement "pcVar5 = getenv("XDG_CONFIG_HOME");" (assignment_expression "pcVar5 = getenv("XDG_CONFIG_HOME")" identifier = (call_expression "getenv("XDG_CONFIG_HOME")" identifier (argument_list "("XDG_CONFIG_HOME")" ( (string_literal ""XDG_CONFIG_HOME"" " string_content ") )))) ;) (expression_statement "pbVar8 = (byte *)0x0;" (assignment_expression "pbVar8 = (byte *)0x0" identifier = (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||\n     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)) {\n    if (pcVar3 != (char *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    access(pcVar3,0);\n    pcVar5 = (char *)0x0;\n    pbVar10 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar10;\n    FUN_0001c5f0(pbVar8);\n    local_20 = pcVar5;\n    goto LAB_0003c430;\n  }" if (parenthesized_expression "(((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||\n     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0))" ( (binary_expression "((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||\n     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)" (parenthesized_expression "((pcVar5 == (char *)0x0) || (*pcVar5 == '\0'))" ( (binary_expression "(pcVar5 == (char *)0x0) || (*pcVar5 == '\0')" (parenthesized_expression "(pcVar5 == (char *)0x0)" ( (binary_expression "pcVar5 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(*pcVar5 == '\0')" ( (binary_expression "*pcVar5 == '\0'" (pointer_expression "*pcVar5" * identifier) == (char_literal "'\0'" ' escape_sequence ')) ))) )) || (parenthesized_expression "(local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)" ( (comma_expression "local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0" (assignment_expression "local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5)" identifier = (cast_expression "(char *)FUN_0001c3d0("%s/putty",pcVar5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c3d0("%s/putty",pcVar5)" identifier (argument_list "("%s/putty",pcVar5)" ( (string_literal ""%s/putty"" " string_content ") , identifier ))))) , (binary_expression "local_24 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (compound_statement "{\n    if (pcVar3 != (char *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    access(pcVar3,0);\n    pcVar5 = (char *)0x0;\n    pbVar10 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar10;\n    FUN_0001c5f0(pbVar8);\n    local_20 = pcVar5;\n    goto LAB_0003c430;\n  }" { (if_statement "if (pcVar3 != (char *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }" if (parenthesized_expression "(pcVar3 != (char *)0x0)" ( (binary_expression "pcVar3 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }" { (expression_statement "local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);" (assignment_expression "local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3)" identifier = (cast_expression "(char *)FUN_0001c3d0("%s/.config/putty",pcVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c3d0("%s/.config/putty",pcVar3)" identifier (argument_list "("%s/.config/putty",pcVar3)" ( (string_literal ""%s/.config/putty"" " string_content ") , identifier ))))) ;) (if_statement "if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }" if (parenthesized_expression "((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0))" ( (binary_expression "(local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)" (parenthesized_expression "(local_24 != (char *)0x0)" ( (binary_expression "local_24 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar6 = access(local_24,0), iVar6 == 0)" ( (comma_expression "iVar6 = access(local_24,0), iVar6 == 0" (assignment_expression "iVar6 = access(local_24,0)" identifier = (call_expression "access(local_24,0)" identifier (argument_list "(local_24,0)" ( identifier , number_literal )))) , (binary_expression "iVar6 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n        return local_24;\n      }" { (return_statement "return local_24;" return identifier ;) })) (goto_statement "goto LAB_0003c379;" goto statement_identifier ;) })) (if_statement "if (ppVar4 != (passwd *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }" if (parenthesized_expression "(ppVar4 != (passwd *)0x0)" ( (binary_expression "ppVar4 != (passwd *)0x0" identifier != (cast_expression "(passwd *)0x0" ( (type_descriptor "passwd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }" { (expression_statement "local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);" (assignment_expression "local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4)" identifier = (cast_expression "(char *)FUN_0001c3d0("%s/.config/putty",ppVar4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c3d0("%s/.config/putty",ppVar4)" identifier (argument_list "("%s/.config/putty",ppVar4)" ( (string_literal ""%s/.config/putty"" " string_content ") , identifier ))))) ;) (if_statement "if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }" if (parenthesized_expression "((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0))" ( (binary_expression "(local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)" (parenthesized_expression "(local_24 != (char *)0x0)" ( (binary_expression "local_24 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar6 = access(local_24,0), iVar6 == 0)" ( (comma_expression "iVar6 = access(local_24,0), iVar6 == 0" (assignment_expression "iVar6 = access(local_24,0)" identifier = (call_expression "access(local_24,0)" identifier (argument_list "(local_24,0)" ( identifier , number_literal )))) , (binary_expression "iVar6 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n        return local_24;\n      }" { (return_statement "return local_24;" return identifier ;) })) (goto_statement "goto LAB_0003c73d;" goto statement_identifier ;) })) (expression_statement "local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);" (assignment_expression "local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd)" identifier = (cast_expression "(char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c3d0("%s/.config/putty",&DAT_000406dd)" identifier (argument_list "("%s/.config/putty",&DAT_000406dd)" ( (string_literal ""%s/.config/putty"" " string_content ") , (pointer_expression "&DAT_000406dd" & identifier) ))))) ;) (if_statement "if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n      return local_24;\n    }" if (parenthesized_expression "((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0))" ( (binary_expression "(local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)" (parenthesized_expression "(local_24 != (char *)0x0)" ( (binary_expression "local_24 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(iVar6 = access(local_24,0), iVar6 == 0)" ( (comma_expression "iVar6 = access(local_24,0), iVar6 == 0" (assignment_expression "iVar6 = access(local_24,0)" identifier = (call_expression "access(local_24,0)" identifier (argument_list "(local_24,0)" ( identifier , number_literal )))) , (binary_expression "iVar6 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n      return local_24;\n    }" { (return_statement "return local_24;" return identifier ;) })) (labeled_statement "LAB_0003c7b9:\n    pcVar3 = (char *)FUN_0001be70("/.putty");" statement_identifier : (expression_statement "pcVar3 = (char *)FUN_0001be70("/.putty");" (assignment_expression "pcVar3 = (char *)FUN_0001be70("/.putty")" identifier = (cast_expression "(char *)FUN_0001be70("/.putty")" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001be70("/.putty")" identifier (argument_list "("/.putty")" ( (string_literal ""/.putty"" " string_content ") ))))) ;)) (expression_statement "access(pcVar3,0);" (call_expression "access(pcVar3,0)" identifier (argument_list "(pcVar3,0)" ( identifier , number_literal ))) ;) (expression_statement "pcVar5 = (char *)0x0;" (assignment_expression "pcVar5 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pbVar10 = (byte *)pcVar3;" (assignment_expression "pbVar10 = (byte *)pcVar3" identifier = (cast_expression "(byte *)pcVar3" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (labeled_statement "LAB_0003c7dd:\n    local_28 = pbVar10;" statement_identifier : (expression_statement "local_28 = pbVar10;" (assignment_expression "local_28 = pbVar10" identifier = identifier) ;)) (expression_statement "FUN_0001c5f0(pbVar8);" (call_expression "FUN_0001c5f0(pbVar8)" identifier (argument_list "(pbVar8)" ( identifier ))) ;) (expression_statement "local_20 = pcVar5;" (assignment_expression "local_20 = pcVar5" identifier = identifier) ;) (goto_statement "goto LAB_0003c430;" goto statement_identifier ;) })) (expression_statement "iVar6 = access(local_24,0);" (assignment_expression "iVar6 = access(local_24,0)" identifier = (call_expression "access(local_24,0)" identifier (argument_list "(local_24,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar6 == 0) {\n    return local_24;\n  }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n    return local_24;\n  }" { (return_statement "return local_24;" return identifier ;) })) (if_statement "if (pcVar3 == (char *)0x0) {\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    goto LAB_0003c3e2;\n  }" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    goto LAB_0003c3e2;\n  }" { (if_statement "if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;" if (parenthesized_expression "(ppVar4 == (passwd *)0x0)" ( (binary_expression "ppVar4 == (passwd *)0x0" identifier == (cast_expression "(passwd *)0x0" ( (type_descriptor "passwd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0003c7b9;" goto statement_identifier ;)) (labeled_statement "LAB_0003c73d:\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);" statement_identifier : (expression_statement "local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);" (assignment_expression "local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4)" identifier = (cast_expression "(char *)FUN_0001c3d0("%s/.putty",ppVar4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c3d0("%s/.putty",ppVar4)" identifier (argument_list "("%s/.putty",ppVar4)" ( (string_literal ""%s/.putty"" " string_content ") , identifier ))))) ;)) (expression_statement "pcVar3 = (char *)FUN_0001be70("/.putty");" (assignment_expression "pcVar3 = (char *)FUN_0001be70("/.putty")" identifier = (cast_expression "(char *)FUN_0001be70("/.putty")" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001be70("/.putty")" identifier (argument_list "("/.putty")" ( (string_literal ""/.putty"" " string_content ") ))))) ;) (goto_statement "goto LAB_0003c3e2;" goto statement_identifier ;) })) (labeled_statement "LAB_0003c379:\n  pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3);" statement_identifier : (expression_statement "pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3);" (assignment_expression "pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3)" identifier = (cast_expression "(byte *)FUN_0001c3d0("%s/.putty",pcVar3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c3d0("%s/.putty",pcVar3)" identifier (argument_list "("%s/.putty",pcVar3)" ( (string_literal ""%s/.putty"" " string_content ") , identifier ))))) ;)) (expression_statement "local_28 = pbVar8;" (assignment_expression "local_28 = pbVar8" identifier = identifier) ;) (if_statement "if (ppVar4 == (passwd *)0x0) {\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar6 = access((char *)pbVar8,0);\n    if (iVar6 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    FUN_0001c5f0(local_20);\n    local_20 = (char *)local_28;\n  }\n  else {\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }" if (parenthesized_expression "(ppVar4 == (passwd *)0x0)" ( (binary_expression "ppVar4 == (passwd *)0x0" identifier == (cast_expression "(passwd *)0x0" ( (type_descriptor "passwd *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar6 = access((char *)pbVar8,0);\n    if (iVar6 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    FUN_0001c5f0(local_20);\n    local_20 = (char *)local_28;\n  }" { (expression_statement "pcVar3 = (char *)FUN_0001be70("/.putty");" (assignment_expression "pcVar3 = (char *)FUN_0001be70("/.putty")" identifier = (cast_expression "(char *)FUN_0001be70("/.putty")" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001be70("/.putty")" identifier (argument_list "("/.putty")" ( (string_literal ""/.putty"" " string_content ") ))))) ;) (if_statement "if (pbVar8 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }" if (parenthesized_expression "(pbVar8 == (byte *)0x0)" ( (binary_expression "pbVar8 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }" { (expression_statement "access(pcVar3,0);" (call_expression "access(pcVar3,0)" identifier (argument_list "(pcVar3,0)" ( identifier , number_literal ))) ;) (expression_statement "pcVar5 = (char *)0x0;" (assignment_expression "pcVar5 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pbVar8 = (byte *)(char *)0x0;" (assignment_expression "pbVar8 = (byte *)(char *)0x0" identifier = (cast_expression "(byte *)(char *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ;) (expression_statement "pbVar10 = (byte *)pcVar3;" (assignment_expression "pbVar10 = (byte *)pcVar3" identifier = (cast_expression "(byte *)pcVar3" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (goto_statement "goto LAB_0003c7dd;" goto statement_identifier ;) })) (expression_statement "iVar6 = access((char *)pbVar8,0);" (assignment_expression "iVar6 = access((char *)pbVar8,0)" identifier = (call_expression "access((char *)pbVar8,0)" identifier (argument_list "((char *)pbVar8,0)" ( (cast_expression "(char *)pbVar8" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , number_literal )))) ;) (if_statement "if (iVar6 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n      local_20 = (char *)0x0;\n    }" { (expression_statement "local_20 = (char *)0x0;" (assignment_expression "local_20 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }" else (compound_statement "{\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }" { (expression_statement "iVar6 = access(pcVar3,0);" (assignment_expression "iVar6 = access(pcVar3,0)" identifier = (call_expression "access(pcVar3,0)" identifier (argument_list "(pcVar3,0)" ( identifier , number_literal )))) ;) (expression_statement "local_20 = (char *)0x0;" (assignment_expression "local_20 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (iVar6 != 0) goto LAB_0003c430;" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0003c430;" goto statement_identifier ;)) (labeled_statement "LAB_0003c635:\n      pcVar5 = local_20;" statement_identifier : (expression_statement "pcVar5 = local_20;" (assignment_expression "pcVar5 = local_20" identifier = identifier) ;)) (expression_statement "pbVar8 = local_28;" (assignment_expression "pbVar8 = local_28" identifier = identifier) ;) (expression_statement "pbVar10 = (byte *)pcVar3;" (assignment_expression "pbVar10 = (byte *)pcVar3" identifier = (cast_expression "(byte *)pcVar3" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;" if (parenthesized_expression "((byte *)pcVar3 != local_28)" ( (binary_expression "(byte *)pcVar3 != local_28" (cast_expression "(byte *)pcVar3" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) != identifier) )) (goto_statement "goto LAB_0003c7dd;" goto statement_identifier ;)) (if_statement "if (local_20 == pcVar3) goto LAB_0003c456;" if (parenthesized_expression "(local_20 == pcVar3)" ( (binary_expression "local_20 == pcVar3" identifier == identifier) )) (goto_statement "goto LAB_0003c456;" goto statement_identifier ;)) }))) (labeled_statement "LAB_0003c436:\n    FUN_0001c5f0(local_20);" statement_identifier : (expression_statement "FUN_0001c5f0(local_20);" (call_expression "FUN_0001c5f0(local_20)" identifier (argument_list "(local_20)" ( identifier ))) ;)) (expression_statement "local_20 = (char *)local_28;" (assignment_expression "local_20 = (char *)local_28" identifier = (cast_expression "(char *)local_28" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) }) (else_clause "else {\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }" else (compound_statement "{\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }" { (expression_statement "local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);" (assignment_expression "local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4)" identifier = (cast_expression "(char *)FUN_0001c3d0("%s/.putty",ppVar4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c3d0("%s/.putty",ppVar4)" identifier (argument_list "("%s/.putty",ppVar4)" ( (string_literal ""%s/.putty"" " string_content ") , identifier ))))) ;) (expression_statement "pcVar3 = (char *)FUN_0001be70("/.putty");" (assignment_expression "pcVar3 = (char *)FUN_0001be70("/.putty")" identifier = (cast_expression "(char *)FUN_0001be70("/.putty")" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001be70("/.putty")" identifier (argument_list "("/.putty")" ( (string_literal ""/.putty"" " string_content ") ))))) ;) (if_statement "if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }" if (parenthesized_expression "(pbVar8 == (byte *)0x0)" ( (binary_expression "pbVar8 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }" { (expression_statement "pbVar8 = (byte *)0x0;" (assignment_expression "pbVar8 = (byte *)0x0" identifier = (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }" statement_identifier : (if_statement "if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }" if (parenthesized_expression "((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0))" ( (binary_expression "(local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)" (parenthesized_expression "(local_20 == (char *)0x0)" ( (binary_expression "local_20 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(iVar6 = access(local_20,0), iVar6 != 0)" ( (comma_expression "iVar6 = access(local_20,0), iVar6 != 0" (assignment_expression "iVar6 = access(local_20,0)" identifier = (call_expression "access(local_20,0)" identifier (argument_list "(local_20,0)" ( identifier , number_literal )))) , (binary_expression "iVar6 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }" { (expression_statement "iVar6 = access(pcVar3,0);" (assignment_expression "iVar6 = access(pcVar3,0)" identifier = (call_expression "access(pcVar3,0)" identifier (argument_list "(pcVar3,0)" ( identifier , number_literal )))) ;) (expression_statement "local_28 = pbVar8;" (assignment_expression "local_28 = pbVar8" identifier = identifier) ;) (if_statement "if (iVar6 == 0) goto LAB_0003c635;" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0003c635;" goto statement_identifier ;)) (if_statement "if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }" if (parenthesized_expression "(pbVar8 == (byte *)0x0)" ( (binary_expression "pbVar8 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }" { (expression_statement "pcVar5 = (char *)pbVar8;" (assignment_expression "pcVar5 = (char *)pbVar8" identifier = (cast_expression "(char *)pbVar8" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "pbVar10 = (byte *)pcVar3;" (assignment_expression "pbVar10 = (byte *)pcVar3" identifier = (cast_expression "(byte *)pcVar3" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if (local_20 == (char *)0x0) goto LAB_0003c7dd;" if (parenthesized_expression "(local_20 == (char *)0x0)" ( (binary_expression "local_20 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0003c7dd;" goto statement_identifier ;)) (goto_statement "goto LAB_0003c7fe;" goto statement_identifier ;) })) (goto_statement "goto LAB_0003c430;" goto statement_identifier ;) }))) (if_statement "if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }" if (parenthesized_expression "((byte *)local_20 != pbVar8)" ( (binary_expression "(byte *)local_20 != pbVar8" (cast_expression "(byte *)local_20" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) != identifier) )) (compound_statement "{\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }" { (labeled_statement "LAB_0003c7fe:\n        pcVar5 = local_20;" statement_identifier : (expression_statement "pcVar5 = local_20;" (assignment_expression "pcVar5 = local_20" identifier = identifier) ;)) (expression_statement "pbVar10 = (byte *)local_20;" (assignment_expression "pbVar10 = (byte *)local_20" identifier = (cast_expression "(byte *)local_20" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (goto_statement "goto LAB_0003c7dd;" goto statement_identifier ;) })) }) (else_clause "else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }" else (compound_statement "{\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }" { (expression_statement "iVar6 = access((char *)pbVar8,0);" (assignment_expression "iVar6 = access((char *)pbVar8,0)" identifier = (call_expression "access((char *)pbVar8,0)" identifier (argument_list "((char *)pbVar8,0)" ( (cast_expression "(char *)pbVar8" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , number_literal )))) ;) (if_statement "if (iVar6 != 0) goto LAB_0003c3e2;" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0003c3e2;" goto statement_identifier ;)) (labeled_statement "LAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;" statement_identifier : (if_statement "if (local_28 != (byte *)local_20) goto LAB_0003c436;" if (parenthesized_expression "(local_28 != (byte *)local_20)" ( (binary_expression "local_28 != (byte *)local_20" identifier != (cast_expression "(byte *)local_20" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (goto_statement "goto LAB_0003c436;" goto statement_identifier ;))) }))) }))) (if_statement "if (local_20 != pcVar3) {\n    FUN_0001c5f0(pcVar3);\n  }" if (parenthesized_expression "(local_20 != pcVar3)" ( (binary_expression "local_20 != pcVar3" identifier != identifier) )) (compound_statement "{\n    FUN_0001c5f0(pcVar3);\n  }" { (expression_statement "FUN_0001c5f0(pcVar3);" (call_expression "FUN_0001c5f0(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier ))) ;) })) (labeled_statement "LAB_0003c456:\n  if (local_20 != local_24) {\n    FUN_0001c5f0(local_24);\n  }" statement_identifier : (if_statement "if (local_20 != local_24) {\n    FUN_0001c5f0(local_24);\n  }" if (parenthesized_expression "(local_20 != local_24)" ( (binary_expression "local_20 != local_24" identifier != identifier) )) (compound_statement "{\n    FUN_0001c5f0(local_24);\n  }" { (expression_statement "FUN_0001c5f0(local_24);" (call_expression "FUN_0001c5f0(local_24)" identifier (argument_list "(local_24)" ( identifier ))) ;) }))) (return_statement "return local_20;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE 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 IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT ))))) ;)) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression (binary_expression IDENT * LIT) + LIT) , LIT ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - LIT) ))) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (unary_expression ~ (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression LIT >> (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) & LIT) ))) )))) & LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) || (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - LIT) ))) < LIT) ))) )) || (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) + LIT) ))) < LIT) ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression (string_literal " string_content ") [ (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * IDENT) >> LIT) ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression (string_literal " string_content ") [ (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * IDENT) & LIT) ])) ;) }))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) + LIT) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT , IDENT ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) }))))))) }))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT ))))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (field_expression IDENT -> field_identifier))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) || (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) ))) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT ))))) , (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT))) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) , (binary_expression IDENT == LIT)) ))) )) (compound_statement { (return_statement return IDENT ;) })) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) , (binary_expression IDENT == LIT)) ))) )) (compound_statement { (return_statement return IDENT ;) })) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (string_literal " string_content ") , (pointer_expression & IDENT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) , (binary_expression IDENT == LIT)) ))) )) (compound_statement { (return_statement return IDENT ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (string_literal " string_content ") ))))) ;)) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = IDENT) ;)) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT ))))) ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (string_literal " string_content ") ))))) ;) (goto_statement goto statement_identifier ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT ))))) ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (string_literal " string_content ") ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = IDENT) ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) != IDENT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (goto_statement goto statement_identifier ;)) }))) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (string_literal " string_content ") ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) , (binary_expression IDENT != LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) (goto_statement goto statement_identifier ;) })) (goto_statement goto statement_identifier ;) }))) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) != IDENT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = IDENT) ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (goto_statement goto statement_identifier ;))) }))) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "char * __regparm3 FUN_0003c240(int param_1,char *param_2)\n\n{\n  byte bVar1;\n  undefined4 uVar2;\n  char *pcVar3;\n  __uid_t __uid;\n  passwd *ppVar4;\n  char *pcVar5;\n  int iVar6;\n  size_t sVar7;\n  byte *pbVar8;\n  byte bVar9;\n  byte *pbVar10;\n  byte *local_28;\n  char *local_24;\n  char *local_20;\n  \n  if (param_1 != 0) {\n    if (param_1 == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);\n    FUN_0001c5f0(uVar2);\n    return pcVar3;\n  }\n  pcVar3 = getenv("PUTTYDIR");\n  if (pcVar3 != (char *)0x0) {\n    pcVar3 = (char *)FUN_0001be70(pcVar3);\n    return pcVar3;\n  }\n  pcVar3 = getenv("HOME");\n  __uid = getuid();\n  ppVar4 = getpwuid(__uid);\n  if (ppVar4 != (passwd *)0x0) {\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }\n  pcVar5 = getenv("XDG_CONFIG_HOME");\n  pbVar8 = (byte *)0x0;\n  if (((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||\n     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)) {\n    if (pcVar3 != (char *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    access(pcVar3,0);\n    pcVar5 = (char *)0x0;\n    pbVar10 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar10;\n    FUN_0001c5f0(pbVar8);\n    local_20 = pcVar5;\n    goto LAB_0003c430;\n  }\n  iVar6 = access(local_24,0);\n  if (iVar6 == 0) {\n    return local_24;\n  }\n  if (pcVar3 == (char *)0x0) {\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    goto LAB_0003c3e2;\n  }\nLAB_0003c379:\n  pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3);\n  local_28 = pbVar8;\n  if (ppVar4 == (passwd *)0x0) {\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar6 = access((char *)pbVar8,0);\n    if (iVar6 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    FUN_0001c5f0(local_20);\n    local_20 = (char *)local_28;\n  }\n  else {\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }\n  if (local_20 != pcVar3) {\n    FUN_0001c5f0(pcVar3);\n  }\nLAB_0003c456:\n  if (local_20 != local_24) {\n    FUN_0001c5f0(local_24);\n  }\n  return local_20;\n}" (primitive_type "char") (pointer_declarator "* __regparm3 FUN_0003c240(int param_1,char *param_2)" (* "*") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0003c240(int param_1,char *param_2)" (identifier "FUN_0003c240") (parameter_list "(int param_1,char *param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")")))) (compound_statement "{\n  byte bVar1;\n  undefined4 uVar2;\n  char *pcVar3;\n  __uid_t __uid;\n  passwd *ppVar4;\n  char *pcVar5;\n  int iVar6;\n  size_t sVar7;\n  byte *pbVar8;\n  byte bVar9;\n  byte *pbVar10;\n  byte *local_28;\n  char *local_24;\n  char *local_20;\n  \n  if (param_1 != 0) {\n    if (param_1 == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);\n    FUN_0001c5f0(uVar2);\n    return pcVar3;\n  }\n  pcVar3 = getenv("PUTTYDIR");\n  if (pcVar3 != (char *)0x0) {\n    pcVar3 = (char *)FUN_0001be70(pcVar3);\n    return pcVar3;\n  }\n  pcVar3 = getenv("HOME");\n  __uid = getuid();\n  ppVar4 = getpwuid(__uid);\n  if (ppVar4 != (passwd *)0x0) {\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }\n  pcVar5 = getenv("XDG_CONFIG_HOME");\n  pbVar8 = (byte *)0x0;\n  if (((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||\n     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)) {\n    if (pcVar3 != (char *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    access(pcVar3,0);\n    pcVar5 = (char *)0x0;\n    pbVar10 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar10;\n    FUN_0001c5f0(pbVar8);\n    local_20 = pcVar5;\n    goto LAB_0003c430;\n  }\n  iVar6 = access(local_24,0);\n  if (iVar6 == 0) {\n    return local_24;\n  }\n  if (pcVar3 == (char *)0x0) {\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    goto LAB_0003c3e2;\n  }\nLAB_0003c379:\n  pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3);\n  local_28 = pbVar8;\n  if (ppVar4 == (passwd *)0x0) {\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar6 = access((char *)pbVar8,0);\n    if (iVar6 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    FUN_0001c5f0(local_20);\n    local_20 = (char *)local_28;\n  }\n  else {\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }\n  if (local_20 != pcVar3) {\n    FUN_0001c5f0(pcVar3);\n  }\nLAB_0003c456:\n  if (local_20 != local_24) {\n    FUN_0001c5f0(local_24);\n  }\n  return local_20;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "char *pcVar3;" (primitive_type "char") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "__uid_t __uid;" (type_identifier "__uid_t") (identifier "__uid") (; ";")) (declaration "passwd *ppVar4;" (type_identifier "passwd") (pointer_declarator "*ppVar4" (* "*") (identifier "ppVar4")) (; ";")) (declaration "char *pcVar5;" (primitive_type "char") (pointer_declarator "*pcVar5" (* "*") (identifier "pcVar5")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "size_t sVar7;" (primitive_type "size_t") (identifier "sVar7") (; ";")) (declaration "byte *pbVar8;" (type_identifier "byte") (pointer_declarator "*pbVar8" (* "*") (identifier "pbVar8")) (; ";")) (declaration "byte bVar9;" (type_identifier "byte") (identifier "bVar9") (; ";")) (declaration "byte *pbVar10;" (type_identifier "byte") (pointer_declarator "*pbVar10" (* "*") (identifier "pbVar10")) (; ";")) (declaration "byte *local_28;" (type_identifier "byte") (pointer_declarator "*local_28" (* "*") (identifier "local_28")) (; ";")) (declaration "char *local_24;" (primitive_type "char") (pointer_declarator "*local_24" (* "*") (identifier "local_24")) (; ";")) (declaration "char *local_20;" (primitive_type "char") (pointer_declarator "*local_20" (* "*") (identifier "local_20")) (; ";")) (if_statement "if (param_1 != 0) {\n    if (param_1 == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);\n    FUN_0001c5f0(uVar2);\n    return pcVar3;\n  }" (if "if") (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_1 == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }\n    pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);\n    FUN_0001c5f0(uVar2);\n    return pcVar3;\n  }" ({ "{") (if_statement "if (param_1 == 4) {\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }\n    else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }" (if "if") (parenthesized_expression "(param_1 == 4)" (( "(") (binary_expression "param_1 == 4" (identifier "param_1") (== "==") (number_literal "4")) () ")")) (compound_statement "{\n      pcVar3 = getenv("PUTTYSESSIONS");\n      if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }\n      uVar2 = FUN_0003c240();\n      pcVar3 = "%s/sessions";\n    }" ({ "{") (expression_statement "pcVar3 = getenv("PUTTYSESSIONS");" (assignment_expression "pcVar3 = getenv("PUTTYSESSIONS")" (identifier "pcVar3") (= "=") (call_expression "getenv("PUTTYSESSIONS")" (identifier "getenv") (argument_list "("PUTTYSESSIONS")" (( "(") (string_literal ""PUTTYSESSIONS"" (" """) (string_content "PUTTYSESSIONS") (" """)) () ")")))) (; ";")) (if_statement "if (pcVar3 != (char *)0x0) {\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }" (if "if") (parenthesized_expression "(pcVar3 != (char *)0x0)" (( "(") (binary_expression "pcVar3 != (char *)0x0" (identifier "pcVar3") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\nLAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);\n        return pcVar3;\n      }" ({ "{") (labeled_statement "LAB_0003c562:\n        pcVar3 = (char *)FUN_0001be70(pcVar3);" (statement_identifier "LAB_0003c562") (: ":") (expression_statement "pcVar3 = (char *)FUN_0001be70(pcVar3);" (assignment_expression "pcVar3 = (char *)FUN_0001be70(pcVar3)" (identifier "pcVar3") (= "=") (cast_expression "(char *)FUN_0001be70(pcVar3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001be70(pcVar3)" (identifier "FUN_0001be70") (argument_list "(pcVar3)" (( "(") (identifier "pcVar3") () ")"))))) (; ";"))) (return_statement "return pcVar3;" (return "return") (identifier "pcVar3") (; ";")) (} "}"))) (expression_statement "uVar2 = FUN_0003c240();" (assignment_expression "uVar2 = FUN_0003c240()" (identifier "uVar2") (= "=") (call_expression "FUN_0003c240()" (identifier "FUN_0003c240") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pcVar3 = "%s/sessions";" (assignment_expression "pcVar3 = "%s/sessions"" (identifier "pcVar3") (= "=") (string_literal ""%s/sessions"" (" """) (string_content "%s/sessions") (" """))) (; ";")) (} "}")) (else_clause "else {\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }" (else "else") (compound_statement "{\n      if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }\n      if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }\n    }" ({ "{") (if_statement "if (param_1 == 5) {\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }" (if "if") (parenthesized_expression "(param_1 == 5)" (( "(") (binary_expression "param_1 == 5" (identifier "param_1") (== "==") (number_literal "5")) () ")")) (compound_statement "{\n        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }\n        pbVar8 = (byte *)FUN_0001bd60(0x31,1);\n        param_2 = "Default Settings";\n        bVar1 = 0x44;\n        local_28 = pbVar8;\n        goto LAB_0003c4e3;\n      }" ({ "{") (if_statement "if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }" (if "if") (parenthesized_expression "(((byte *)param_2 != (byte *)0x0) && (*param_2 != 0))" (( "(") (binary_expression "((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)" (parenthesized_expression "((byte *)param_2 != (byte *)0x0)" (( "(") (binary_expression "(byte *)param_2 != (byte *)0x0" (cast_expression "(byte *)param_2" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_2")) (!= "!=") (cast_expression "(byte *)0x0" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(*param_2 != 0)" (( "(") (binary_expression "*param_2 != 0" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n          sVar7 = strlen(param_2);\n          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);\n          bVar1 = *param_2;\n          pbVar8 = local_28;\n          while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }\n          *pbVar8 = 0;\n          uVar2 = FUN_0003c240();\n          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);\n          FUN_0001c5f0(uVar2);\n          FUN_0001c5f0(local_28);\n          return pcVar3;\n        }" ({ "{") (expression_statement "sVar7 = strlen(param_2);" (assignment_expression "sVar7 = strlen(param_2)" (identifier "sVar7") (= "=") (call_expression "strlen(param_2)" (identifier "strlen") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (expression_statement "local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);" (assignment_expression "local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1)" (identifier "local_28") (= "=") (cast_expression "(byte *)FUN_0001bd60(sVar7 * 3 + 1,1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001bd60(sVar7 * 3 + 1,1)" (identifier "FUN_0001bd60") (argument_list "(sVar7 * 3 + 1,1)" (( "(") (binary_expression "sVar7 * 3 + 1" (binary_expression "sVar7 * 3" (identifier "sVar7") (* "*") (number_literal "3")) (+ "+") (number_literal "1")) (, ",") (number_literal "1") () ")"))))) (; ";")) (expression_statement "bVar1 = *param_2;" (assignment_expression "bVar1 = *param_2" (identifier "bVar1") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (expression_statement "pbVar8 = local_28;" (assignment_expression "pbVar8 = local_28" (identifier "pbVar8") (= "=") (identifier "local_28")) (; ";")) (while_statement "while (bVar1 != 0) {\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }" (while "while") (parenthesized_expression "(bVar1 != 0)" (( "(") (binary_expression "bVar1 != 0" (identifier "bVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\nLAB_0003c4e3:\n            bVar9 = 1;\n            if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }\n            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }\n            param_2 = (char *)((byte *)param_2 + 1);\n            pbVar8 = pbVar10;\n            bVar1 = *param_2;\n          }" ({ "{") (labeled_statement "LAB_0003c4e3:\n            bVar9 = 1;" (statement_identifier "LAB_0003c4e3") (: ":") (expression_statement "bVar9 = 1;" (assignment_expression "bVar9 = 1" (identifier "bVar9") (= "=") (number_literal "1")) (; ";"))) (if_statement "if ((byte)(bVar1 - 0x2b) < 0x16) {\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }" (if "if") (parenthesized_expression "((byte)(bVar1 - 0x2b) < 0x16)" (( "(") (binary_expression "(byte)(bVar1 - 0x2b) < 0x16" (call_expression "(byte)(bVar1 - 0x2b)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(bVar1 - 0x2b)" (( "(") (binary_expression "bVar1 - 0x2b" (identifier "bVar1") (- "-") (number_literal "0x2b")) () ")"))) (< "<") (number_literal "0x16")) () ")")) (compound_statement "{\n              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;\n            }" ({ "{") (expression_statement "bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;" (assignment_expression "bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1" (identifier "bVar9") (= "=") (binary_expression "~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1" (unary_expression "~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f))" (~ "~") (call_expression "(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f))" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(0x20000d >> (bVar1 - 0x2b & 0x1f))" (( "(") (binary_expression "0x20000d >> (bVar1 - 0x2b & 0x1f)" (number_literal "0x20000d") (>> ">>") (parenthesized_expression "(bVar1 - 0x2b & 0x1f)" (( "(") (binary_expression "bVar1 - 0x2b & 0x1f" (binary_expression "bVar1 - 0x2b" (identifier "bVar1") (- "-") (number_literal "0x2b")) (& "&") (number_literal "0x1f")) () ")"))) () ")")))) (& "&") (number_literal "1"))) (; ";")) (} "}"))) (if_statement "if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }\n            else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }" (if "if") (parenthesized_expression "((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a))" (( "(") (binary_expression "(((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||\n               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)" (parenthesized_expression "(((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10))" (( "(") (binary_expression "((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)" (parenthesized_expression "((bVar1 == 0x5f) || (bVar9 == 0))" (( "(") (binary_expression "(bVar1 == 0x5f) || (bVar9 == 0)" (parenthesized_expression "(bVar1 == 0x5f)" (( "(") (binary_expression "bVar1 == 0x5f" (identifier "bVar1") (== "==") (number_literal "0x5f")) () ")")) (|| "||") (parenthesized_expression "(bVar9 == 0)" (( "(") (binary_expression "bVar9 == 0" (identifier "bVar9") (== "==") (number_literal "0")) () ")"))) () ")")) (|| "||") (parenthesized_expression "((byte)(bVar1 - 0x30) < 10)" (( "(") (binary_expression "(byte)(bVar1 - 0x30) < 10" (call_expression "(byte)(bVar1 - 0x30)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(bVar1 - 0x30)" (( "(") (binary_expression "bVar1 - 0x30" (identifier "bVar1") (- "-") (number_literal "0x30")) () ")"))) (< "<") (number_literal "10")) () ")"))) () ")")) (|| "||") (parenthesized_expression "((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)" (( "(") (binary_expression "(byte)((bVar1 & 0xdf) + 0xbf) < 0x1a" (call_expression "(byte)((bVar1 & 0xdf) + 0xbf)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "((bVar1 & 0xdf) + 0xbf)" (( "(") (binary_expression "(bVar1 & 0xdf) + 0xbf" (parenthesized_expression "(bVar1 & 0xdf)" (( "(") (binary_expression "bVar1 & 0xdf" (identifier "bVar1") (& "&") (number_literal "0xdf")) () ")")) (+ "+") (number_literal "0xbf")) () ")"))) (< "<") (number_literal "0x1a")) () ")"))) () ")")) (compound_statement "{\n              *pbVar8 = bVar1;\n              pbVar10 = pbVar8 + 1;\n            }" ({ "{") (expression_statement "*pbVar8 = bVar1;" (assignment_expression "*pbVar8 = bVar1" (pointer_expression "*pbVar8" (* "*") (identifier "pbVar8")) (= "=") (identifier "bVar1")) (; ";")) (expression_statement "pbVar10 = pbVar8 + 1;" (assignment_expression "pbVar10 = pbVar8 + 1" (identifier "pbVar10") (= "=") (binary_expression "pbVar8 + 1" (identifier "pbVar8") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (else_clause "else {\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }" (else "else") (compound_statement "{\n              *pbVar8 = 0x25;\n              pbVar10 = pbVar8 + 3;\n              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];\n              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];\n            }" ({ "{") (expression_statement "*pbVar8 = 0x25;" (assignment_expression "*pbVar8 = 0x25" (pointer_expression "*pbVar8" (* "*") (identifier "pbVar8")) (= "=") (number_literal "0x25")) (; ";")) (expression_statement "pbVar10 = pbVar8 + 3;" (assignment_expression "pbVar10 = pbVar8 + 3" (identifier "pbVar10") (= "=") (binary_expression "pbVar8 + 3" (identifier "pbVar8") (+ "+") (number_literal "3"))) (; ";")) (expression_statement "pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];" (assignment_expression "pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4]" (subscript_expression "pbVar8[1]" (identifier "pbVar8") ([ "[") (number_literal "1") (] "]")) (= "=") (subscript_expression ""0123456789ABCDEF"[(byte)*param_2 >> 4]" (string_literal ""0123456789ABCDEF"" (" """) (string_content "0123456789ABCDEF") (" """)) ([ "[") (binary_expression "(byte)*param_2 >> 4" (binary_expression "(byte)*param_2" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (* "*") (identifier "param_2")) (>> ">>") (number_literal "4")) (] "]"))) (; ";")) (expression_statement "pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];" (assignment_expression "pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf]" (subscript_expression "pbVar8[2]" (identifier "pbVar8") ([ "[") (number_literal "2") (] "]")) (= "=") (subscript_expression ""0123456789ABCDEF"[(byte)*param_2 & 0xf]" (string_literal ""0123456789ABCDEF"" (" """) (string_content "0123456789ABCDEF") (" """)) ([ "[") (binary_expression "(byte)*param_2 & 0xf" (binary_expression "(byte)*param_2" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (* "*") (identifier "param_2")) (& "&") (number_literal "0xf")) (] "]"))) (; ";")) (} "}")))) (expression_statement "param_2 = (char *)((byte *)param_2 + 1);" (assignment_expression "param_2 = (char *)((byte *)param_2 + 1)" (identifier "param_2") (= "=") (cast_expression "(char *)((byte *)param_2 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((byte *)param_2 + 1)" (( "(") (binary_expression "(byte *)param_2 + 1" (cast_expression "(byte *)param_2" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_2")) (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "pbVar8 = pbVar10;" (assignment_expression "pbVar8 = pbVar10" (identifier "pbVar8") (= "=") (identifier "pbVar10")) (; ";")) (expression_statement "bVar1 = *param_2;" (assignment_expression "bVar1 = *param_2" (identifier "bVar1") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (} "}"))) (expression_statement "*pbVar8 = 0;" (assignment_expression "*pbVar8 = 0" (pointer_expression "*pbVar8" (* "*") (identifier "pbVar8")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar2 = FUN_0003c240();" (assignment_expression "uVar2 = FUN_0003c240()" (identifier "uVar2") (= "=") (call_expression "FUN_0003c240()" (identifier "FUN_0003c240") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);" (assignment_expression "pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28)" (identifier "pcVar3") (= "=") (cast_expression "(char *)FUN_0001c3d0("%s/%s",uVar2,local_28)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001c3d0("%s/%s",uVar2,local_28)" (identifier "FUN_0001c3d0") (argument_list "("%s/%s",uVar2,local_28)" (( "(") (string_literal ""%s/%s"" (" """) (string_content "%s/%s") (" """)) (, ",") (identifier "uVar2") (, ",") (identifier "local_28") () ")"))))) (; ";")) (expression_statement "FUN_0001c5f0(uVar2);" (call_expression "FUN_0001c5f0(uVar2)" (identifier "FUN_0001c5f0") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "FUN_0001c5f0(local_28);" (call_expression "FUN_0001c5f0(local_28)" (identifier "FUN_0001c5f0") (argument_list "(local_28)" (( "(") (identifier "local_28") () ")"))) (; ";")) (return_statement "return pcVar3;" (return "return") (identifier "pcVar3") (; ";")) (} "}"))) (expression_statement "pbVar8 = (byte *)FUN_0001bd60(0x31,1);" (assignment_expression "pbVar8 = (byte *)FUN_0001bd60(0x31,1)" (identifier "pbVar8") (= "=") (cast_expression "(byte *)FUN_0001bd60(0x31,1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001bd60(0x31,1)" (identifier "FUN_0001bd60") (argument_list "(0x31,1)" (( "(") (number_literal "0x31") (, ",") (number_literal "1") () ")"))))) (; ";")) (expression_statement "param_2 = "Default Settings";" (assignment_expression "param_2 = "Default Settings"" (identifier "param_2") (= "=") (string_literal ""Default Settings"" (" """) (string_content "Default Settings") (" """))) (; ";")) (expression_statement "bVar1 = 0x44;" (assignment_expression "bVar1 = 0x44" (identifier "bVar1") (= "=") (number_literal "0x44")) (; ";")) (expression_statement "local_28 = pbVar8;" (assignment_expression "local_28 = pbVar8" (identifier "local_28") (= "=") (identifier "pbVar8")) (; ";")) (goto_statement "goto LAB_0003c4e3;" (goto "goto") (statement_identifier "LAB_0003c4e3") (; ";")) (} "}"))) (if_statement "if (param_1 == 1) {\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }\n      else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" (if "if") (parenthesized_expression "(param_1 == 1)" (( "(") (binary_expression "param_1 == 1" (identifier "param_1") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n        pcVar3 = getenv("PUTTYSSHHOSTKEYS");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/sshhostkeys";\n      }" ({ "{") (expression_statement "pcVar3 = getenv("PUTTYSSHHOSTKEYS");" (assignment_expression "pcVar3 = getenv("PUTTYSSHHOSTKEYS")" (identifier "pcVar3") (= "=") (call_expression "getenv("PUTTYSSHHOSTKEYS")" (identifier "getenv") (argument_list "("PUTTYSSHHOSTKEYS")" (( "(") (string_literal ""PUTTYSSHHOSTKEYS"" (" """) (string_content "PUTTYSSHHOSTKEYS") (" """)) () ")")))) (; ";")) (if_statement "if (pcVar3 != (char *)0x0) goto LAB_0003c562;" (if "if") (parenthesized_expression "(pcVar3 != (char *)0x0)" (( "(") (binary_expression "pcVar3 != (char *)0x0" (identifier "pcVar3") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_0003c562;" (goto "goto") (statement_identifier "LAB_0003c562") (; ";"))) (expression_statement "uVar2 = FUN_0003c240();" (assignment_expression "uVar2 = FUN_0003c240()" (identifier "uVar2") (= "=") (call_expression "FUN_0003c240()" (identifier "FUN_0003c240") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pcVar3 = "%s/sshhostkeys";" (assignment_expression "pcVar3 = "%s/sshhostkeys"" (identifier "pcVar3") (= "=") (string_literal ""%s/sshhostkeys"" (" """) (string_content "%s/sshhostkeys") (" """))) (; ";")) (} "}")) (else_clause "else if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" (else "else") (if_statement "if (param_1 == 2) {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }\n      else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" (if "if") (parenthesized_expression "(param_1 == 2)" (( "(") (binary_expression "param_1 == 2" (identifier "param_1") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s.tmp";\n      }" ({ "{") (expression_statement "uVar2 = FUN_0003c240();" (assignment_expression "uVar2 = FUN_0003c240()" (identifier "uVar2") (= "=") (call_expression "FUN_0003c240()" (identifier "FUN_0003c240") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pcVar3 = "%s.tmp";" (assignment_expression "pcVar3 = "%s.tmp"" (identifier "pcVar3") (= "=") (string_literal ""%s.tmp"" (" """) (string_content "%s.tmp") (" """))) (; ";")) (} "}")) (else_clause "else if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" (else "else") (if_statement "if (param_1 == 3) {\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }\n      else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" (if "if") (parenthesized_expression "(param_1 == 3)" (( "(") (binary_expression "param_1 == 3" (identifier "param_1") (== "==") (number_literal "3")) () ")")) (compound_statement "{\n        pcVar3 = getenv("PUTTYRANDOMSEED");\n        if (pcVar3 != (char *)0x0) goto LAB_0003c562;\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/randomseed";\n      }" ({ "{") (expression_statement "pcVar3 = getenv("PUTTYRANDOMSEED");" (assignment_expression "pcVar3 = getenv("PUTTYRANDOMSEED")" (identifier "pcVar3") (= "=") (call_expression "getenv("PUTTYRANDOMSEED")" (identifier "getenv") (argument_list "("PUTTYRANDOMSEED")" (( "(") (string_literal ""PUTTYRANDOMSEED"" (" """) (string_content "PUTTYRANDOMSEED") (" """)) () ")")))) (; ";")) (if_statement "if (pcVar3 != (char *)0x0) goto LAB_0003c562;" (if "if") (parenthesized_expression "(pcVar3 != (char *)0x0)" (( "(") (binary_expression "pcVar3 != (char *)0x0" (identifier "pcVar3") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_0003c562;" (goto "goto") (statement_identifier "LAB_0003c562") (; ";"))) (expression_statement "uVar2 = FUN_0003c240();" (assignment_expression "uVar2 = FUN_0003c240()" (identifier "uVar2") (= "=") (call_expression "FUN_0003c240()" (identifier "FUN_0003c240") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pcVar3 = "%s/randomseed";" (assignment_expression "pcVar3 = "%s/randomseed"" (identifier "pcVar3") (= "=") (string_literal ""%s/randomseed"" (" """) (string_content "%s/randomseed") (" """))) (; ";")) (} "}")) (else_clause "else {\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" (else "else") (compound_statement "{\n        uVar2 = FUN_0003c240();\n        pcVar3 = "%s/ERROR";\n      }" ({ "{") (expression_statement "uVar2 = FUN_0003c240();" (assignment_expression "uVar2 = FUN_0003c240()" (identifier "uVar2") (= "=") (call_expression "FUN_0003c240()" (identifier "FUN_0003c240") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pcVar3 = "%s/ERROR";" (assignment_expression "pcVar3 = "%s/ERROR"" (identifier "pcVar3") (= "=") (string_literal ""%s/ERROR"" (" """) (string_content "%s/ERROR") (" """))) (; ";")) (} "}")))))))) (} "}")))) (expression_statement "pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);" (assignment_expression "pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2)" (identifier "pcVar3") (= "=") (cast_expression "(char *)FUN_0001c3d0(pcVar3,uVar2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001c3d0(pcVar3,uVar2)" (identifier "FUN_0001c3d0") (argument_list "(pcVar3,uVar2)" (( "(") (identifier "pcVar3") (, ",") (identifier "uVar2") () ")"))))) (; ";")) (expression_statement "FUN_0001c5f0(uVar2);" (call_expression "FUN_0001c5f0(uVar2)" (identifier "FUN_0001c5f0") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (return_statement "return pcVar3;" (return "return") (identifier "pcVar3") (; ";")) (} "}"))) (expression_statement "pcVar3 = getenv("PUTTYDIR");" (assignment_expression "pcVar3 = getenv("PUTTYDIR")" (identifier "pcVar3") (= "=") (call_expression "getenv("PUTTYDIR")" (identifier "getenv") (argument_list "("PUTTYDIR")" (( "(") (string_literal ""PUTTYDIR"" (" """) (string_content "PUTTYDIR") (" """)) () ")")))) (; ";")) (if_statement "if (pcVar3 != (char *)0x0) {\n    pcVar3 = (char *)FUN_0001be70(pcVar3);\n    return pcVar3;\n  }" (if "if") (parenthesized_expression "(pcVar3 != (char *)0x0)" (( "(") (binary_expression "pcVar3 != (char *)0x0" (identifier "pcVar3") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    pcVar3 = (char *)FUN_0001be70(pcVar3);\n    return pcVar3;\n  }" ({ "{") (expression_statement "pcVar3 = (char *)FUN_0001be70(pcVar3);" (assignment_expression "pcVar3 = (char *)FUN_0001be70(pcVar3)" (identifier "pcVar3") (= "=") (cast_expression "(char *)FUN_0001be70(pcVar3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001be70(pcVar3)" (identifier "FUN_0001be70") (argument_list "(pcVar3)" (( "(") (identifier "pcVar3") () ")"))))) (; ";")) (return_statement "return pcVar3;" (return "return") (identifier "pcVar3") (; ";")) (} "}"))) (expression_statement "pcVar3 = getenv("HOME");" (assignment_expression "pcVar3 = getenv("HOME")" (identifier "pcVar3") (= "=") (call_expression "getenv("HOME")" (identifier "getenv") (argument_list "("HOME")" (( "(") (string_literal ""HOME"" (" """) (string_content "HOME") (" """)) () ")")))) (; ";")) (expression_statement "__uid = getuid();" (assignment_expression "__uid = getuid()" (identifier "__uid") (= "=") (call_expression "getuid()" (identifier "getuid") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "ppVar4 = getpwuid(__uid);" (assignment_expression "ppVar4 = getpwuid(__uid)" (identifier "ppVar4") (= "=") (call_expression "getpwuid(__uid)" (identifier "getpwuid") (argument_list "(__uid)" (( "(") (identifier "__uid") () ")")))) (; ";")) (if_statement "if (ppVar4 != (passwd *)0x0) {\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }" (if "if") (parenthesized_expression "(ppVar4 != (passwd *)0x0)" (( "(") (binary_expression "ppVar4 != (passwd *)0x0" (identifier "ppVar4") (!= "!=") (cast_expression "(passwd *)0x0" (( "(") (type_descriptor "passwd *" (type_identifier "passwd") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    ppVar4 = (passwd *)ppVar4->pw_dir;\n  }" ({ "{") (expression_statement "ppVar4 = (passwd *)ppVar4->pw_dir;" (assignment_expression "ppVar4 = (passwd *)ppVar4->pw_dir" (identifier "ppVar4") (= "=") (cast_expression "(passwd *)ppVar4->pw_dir" (( "(") (type_descriptor "passwd *" (type_identifier "passwd") (abstract_pointer_declarator "*" (* "*"))) () ")") (field_expression "ppVar4->pw_dir" (identifier "ppVar4") (-> "->") (field_identifier "pw_dir")))) (; ";")) (} "}"))) (expression_statement "pcVar5 = getenv("XDG_CONFIG_HOME");" (assignment_expression "pcVar5 = getenv("XDG_CONFIG_HOME")" (identifier "pcVar5") (= "=") (call_expression "getenv("XDG_CONFIG_HOME")" (identifier "getenv") (argument_list "("XDG_CONFIG_HOME")" (( "(") (string_literal ""XDG_CONFIG_HOME"" (" """) (string_content "XDG_CONFIG_HOME") (" """)) () ")")))) (; ";")) (expression_statement "pbVar8 = (byte *)0x0;" (assignment_expression "pbVar8 = (byte *)0x0" (identifier "pbVar8") (= "=") (cast_expression "(byte *)0x0" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (if_statement "if (((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||\n     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)) {\n    if (pcVar3 != (char *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    access(pcVar3,0);\n    pcVar5 = (char *)0x0;\n    pbVar10 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar10;\n    FUN_0001c5f0(pbVar8);\n    local_20 = pcVar5;\n    goto LAB_0003c430;\n  }" (if "if") (parenthesized_expression "(((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||\n     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0))" (( "(") (binary_expression "((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||\n     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)" (parenthesized_expression "((pcVar5 == (char *)0x0) || (*pcVar5 == '\0'))" (( "(") (binary_expression "(pcVar5 == (char *)0x0) || (*pcVar5 == '\0')" (parenthesized_expression "(pcVar5 == (char *)0x0)" (( "(") (binary_expression "pcVar5 == (char *)0x0" (identifier "pcVar5") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (|| "||") (parenthesized_expression "(*pcVar5 == '\0')" (( "(") (binary_expression "*pcVar5 == '\0'" (pointer_expression "*pcVar5" (* "*") (identifier "pcVar5")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (|| "||") (parenthesized_expression "(local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)" (( "(") (comma_expression "local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0" (assignment_expression "local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5)" (identifier "local_24") (= "=") (cast_expression "(char *)FUN_0001c3d0("%s/putty",pcVar5)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001c3d0("%s/putty",pcVar5)" (identifier "FUN_0001c3d0") (argument_list "("%s/putty",pcVar5)" (( "(") (string_literal ""%s/putty"" (" """) (string_content "%s/putty") (" """)) (, ",") (identifier "pcVar5") () ")"))))) (, ",") (binary_expression "local_24 == (char *)0x0" (identifier "local_24") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")))) () ")"))) () ")")) (compound_statement "{\n    if (pcVar3 != (char *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }\n    if (ppVar4 != (passwd *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }\n    local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);\n    if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n      return local_24;\n    }\nLAB_0003c7b9:\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    access(pcVar3,0);\n    pcVar5 = (char *)0x0;\n    pbVar10 = (byte *)pcVar3;\nLAB_0003c7dd:\n    local_28 = pbVar10;\n    FUN_0001c5f0(pbVar8);\n    local_20 = pcVar5;\n    goto LAB_0003c430;\n  }" ({ "{") (if_statement "if (pcVar3 != (char *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }" (if "if") (parenthesized_expression "(pcVar3 != (char *)0x0)" (( "(") (binary_expression "pcVar3 != (char *)0x0" (identifier "pcVar3") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c379;\n    }" ({ "{") (expression_statement "local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);" (assignment_expression "local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3)" (identifier "local_24") (= "=") (cast_expression "(char *)FUN_0001c3d0("%s/.config/putty",pcVar3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001c3d0("%s/.config/putty",pcVar3)" (identifier "FUN_0001c3d0") (argument_list "("%s/.config/putty",pcVar3)" (( "(") (string_literal ""%s/.config/putty"" (" """) (string_content "%s/.config/putty") (" """)) (, ",") (identifier "pcVar3") () ")"))))) (; ";")) (if_statement "if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }" (if "if") (parenthesized_expression "((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0))" (( "(") (binary_expression "(local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)" (parenthesized_expression "(local_24 != (char *)0x0)" (( "(") (binary_expression "local_24 != (char *)0x0" (identifier "local_24") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(iVar6 = access(local_24,0), iVar6 == 0)" (( "(") (comma_expression "iVar6 = access(local_24,0), iVar6 == 0" (assignment_expression "iVar6 = access(local_24,0)" (identifier "iVar6") (= "=") (call_expression "access(local_24,0)" (identifier "access") (argument_list "(local_24,0)" (( "(") (identifier "local_24") (, ",") (number_literal "0") () ")")))) (, ",") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n        return local_24;\n      }" ({ "{") (return_statement "return local_24;" (return "return") (identifier "local_24") (; ";")) (} "}"))) (goto_statement "goto LAB_0003c379;" (goto "goto") (statement_identifier "LAB_0003c379") (; ";")) (} "}"))) (if_statement "if (ppVar4 != (passwd *)0x0) {\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }" (if "if") (parenthesized_expression "(ppVar4 != (passwd *)0x0)" (( "(") (binary_expression "ppVar4 != (passwd *)0x0" (identifier "ppVar4") (!= "!=") (cast_expression "(passwd *)0x0" (( "(") (type_descriptor "passwd *" (type_identifier "passwd") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);\n      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }\n      goto LAB_0003c73d;\n    }" ({ "{") (expression_statement "local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);" (assignment_expression "local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4)" (identifier "local_24") (= "=") (cast_expression "(char *)FUN_0001c3d0("%s/.config/putty",ppVar4)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001c3d0("%s/.config/putty",ppVar4)" (identifier "FUN_0001c3d0") (argument_list "("%s/.config/putty",ppVar4)" (( "(") (string_literal ""%s/.config/putty"" (" """) (string_content "%s/.config/putty") (" """)) (, ",") (identifier "ppVar4") () ")"))))) (; ";")) (if_statement "if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n        return local_24;\n      }" (if "if") (parenthesized_expression "((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0))" (( "(") (binary_expression "(local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)" (parenthesized_expression "(local_24 != (char *)0x0)" (( "(") (binary_expression "local_24 != (char *)0x0" (identifier "local_24") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(iVar6 = access(local_24,0), iVar6 == 0)" (( "(") (comma_expression "iVar6 = access(local_24,0), iVar6 == 0" (assignment_expression "iVar6 = access(local_24,0)" (identifier "iVar6") (= "=") (call_expression "access(local_24,0)" (identifier "access") (argument_list "(local_24,0)" (( "(") (identifier "local_24") (, ",") (number_literal "0") () ")")))) (, ",") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n        return local_24;\n      }" ({ "{") (return_statement "return local_24;" (return "return") (identifier "local_24") (; ";")) (} "}"))) (goto_statement "goto LAB_0003c73d;" (goto "goto") (statement_identifier "LAB_0003c73d") (; ";")) (} "}"))) (expression_statement "local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);" (assignment_expression "local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd)" (identifier "local_24") (= "=") (cast_expression "(char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001c3d0("%s/.config/putty",&DAT_000406dd)" (identifier "FUN_0001c3d0") (argument_list "("%s/.config/putty",&DAT_000406dd)" (( "(") (string_literal ""%s/.config/putty"" (" """) (string_content "%s/.config/putty") (" """)) (, ",") (pointer_expression "&DAT_000406dd" (& "&") (identifier "DAT_000406dd")) () ")"))))) (; ";")) (if_statement "if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {\n      return local_24;\n    }" (if "if") (parenthesized_expression "((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0))" (( "(") (binary_expression "(local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)" (parenthesized_expression "(local_24 != (char *)0x0)" (( "(") (binary_expression "local_24 != (char *)0x0" (identifier "local_24") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(iVar6 = access(local_24,0), iVar6 == 0)" (( "(") (comma_expression "iVar6 = access(local_24,0), iVar6 == 0" (assignment_expression "iVar6 = access(local_24,0)" (identifier "iVar6") (= "=") (call_expression "access(local_24,0)" (identifier "access") (argument_list "(local_24,0)" (( "(") (identifier "local_24") (, ",") (number_literal "0") () ")")))) (, ",") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n      return local_24;\n    }" ({ "{") (return_statement "return local_24;" (return "return") (identifier "local_24") (; ";")) (} "}"))) (labeled_statement "LAB_0003c7b9:\n    pcVar3 = (char *)FUN_0001be70("/.putty");" (statement_identifier "LAB_0003c7b9") (: ":") (expression_statement "pcVar3 = (char *)FUN_0001be70("/.putty");" (assignment_expression "pcVar3 = (char *)FUN_0001be70("/.putty")" (identifier "pcVar3") (= "=") (cast_expression "(char *)FUN_0001be70("/.putty")" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001be70("/.putty")" (identifier "FUN_0001be70") (argument_list "("/.putty")" (( "(") (string_literal ""/.putty"" (" """) (string_content "/.putty") (" """)) () ")"))))) (; ";"))) (expression_statement "access(pcVar3,0);" (call_expression "access(pcVar3,0)" (identifier "access") (argument_list "(pcVar3,0)" (( "(") (identifier "pcVar3") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "pcVar5 = (char *)0x0;" (assignment_expression "pcVar5 = (char *)0x0" (identifier "pcVar5") (= "=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "pbVar10 = (byte *)pcVar3;" (assignment_expression "pbVar10 = (byte *)pcVar3" (identifier "pbVar10") (= "=") (cast_expression "(byte *)pcVar3" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "pcVar3"))) (; ";")) (labeled_statement "LAB_0003c7dd:\n    local_28 = pbVar10;" (statement_identifier "LAB_0003c7dd") (: ":") (expression_statement "local_28 = pbVar10;" (assignment_expression "local_28 = pbVar10" (identifier "local_28") (= "=") (identifier "pbVar10")) (; ";"))) (expression_statement "FUN_0001c5f0(pbVar8);" (call_expression "FUN_0001c5f0(pbVar8)" (identifier "FUN_0001c5f0") (argument_list "(pbVar8)" (( "(") (identifier "pbVar8") () ")"))) (; ";")) (expression_statement "local_20 = pcVar5;" (assignment_expression "local_20 = pcVar5" (identifier "local_20") (= "=") (identifier "pcVar5")) (; ";")) (goto_statement "goto LAB_0003c430;" (goto "goto") (statement_identifier "LAB_0003c430") (; ";")) (} "}"))) (expression_statement "iVar6 = access(local_24,0);" (assignment_expression "iVar6 = access(local_24,0)" (identifier "iVar6") (= "=") (call_expression "access(local_24,0)" (identifier "access") (argument_list "(local_24,0)" (( "(") (identifier "local_24") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar6 == 0) {\n    return local_24;\n  }" (if "if") (parenthesized_expression "(iVar6 == 0)" (( "(") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return local_24;\n  }" ({ "{") (return_statement "return local_24;" (return "return") (identifier "local_24") (; ";")) (} "}"))) (if_statement "if (pcVar3 == (char *)0x0) {\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    goto LAB_0003c3e2;\n  }" (if "if") (parenthesized_expression "(pcVar3 == (char *)0x0)" (( "(") (binary_expression "pcVar3 == (char *)0x0" (identifier "pcVar3") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;\nLAB_0003c73d:\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    goto LAB_0003c3e2;\n  }" ({ "{") (if_statement "if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;" (if "if") (parenthesized_expression "(ppVar4 == (passwd *)0x0)" (( "(") (binary_expression "ppVar4 == (passwd *)0x0" (identifier "ppVar4") (== "==") (cast_expression "(passwd *)0x0" (( "(") (type_descriptor "passwd *" (type_identifier "passwd") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_0003c7b9;" (goto "goto") (statement_identifier "LAB_0003c7b9") (; ";"))) (labeled_statement "LAB_0003c73d:\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);" (statement_identifier "LAB_0003c73d") (: ":") (expression_statement "local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);" (assignment_expression "local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4)" (identifier "local_20") (= "=") (cast_expression "(char *)FUN_0001c3d0("%s/.putty",ppVar4)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001c3d0("%s/.putty",ppVar4)" (identifier "FUN_0001c3d0") (argument_list "("%s/.putty",ppVar4)" (( "(") (string_literal ""%s/.putty"" (" """) (string_content "%s/.putty") (" """)) (, ",") (identifier "ppVar4") () ")"))))) (; ";"))) (expression_statement "pcVar3 = (char *)FUN_0001be70("/.putty");" (assignment_expression "pcVar3 = (char *)FUN_0001be70("/.putty")" (identifier "pcVar3") (= "=") (cast_expression "(char *)FUN_0001be70("/.putty")" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001be70("/.putty")" (identifier "FUN_0001be70") (argument_list "("/.putty")" (( "(") (string_literal ""/.putty"" (" """) (string_content "/.putty") (" """)) () ")"))))) (; ";")) (goto_statement "goto LAB_0003c3e2;" (goto "goto") (statement_identifier "LAB_0003c3e2") (; ";")) (} "}"))) (labeled_statement "LAB_0003c379:\n  pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3);" (statement_identifier "LAB_0003c379") (: ":") (expression_statement "pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3);" (assignment_expression "pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3)" (identifier "pbVar8") (= "=") (cast_expression "(byte *)FUN_0001c3d0("%s/.putty",pcVar3)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001c3d0("%s/.putty",pcVar3)" (identifier "FUN_0001c3d0") (argument_list "("%s/.putty",pcVar3)" (( "(") (string_literal ""%s/.putty"" (" """) (string_content "%s/.putty") (" """)) (, ",") (identifier "pcVar3") () ")"))))) (; ";"))) (expression_statement "local_28 = pbVar8;" (assignment_expression "local_28 = pbVar8" (identifier "local_28") (= "=") (identifier "pbVar8")) (; ";")) (if_statement "if (ppVar4 == (passwd *)0x0) {\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar6 = access((char *)pbVar8,0);\n    if (iVar6 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    FUN_0001c5f0(local_20);\n    local_20 = (char *)local_28;\n  }\n  else {\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }" (if "if") (parenthesized_expression "(ppVar4 == (passwd *)0x0)" (( "(") (binary_expression "ppVar4 == (passwd *)0x0" (identifier "ppVar4") (== "==") (cast_expression "(passwd *)0x0" (( "(") (type_descriptor "passwd *" (type_identifier "passwd") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }\n    iVar6 = access((char *)pbVar8,0);\n    if (iVar6 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }\nLAB_0003c436:\n    FUN_0001c5f0(local_20);\n    local_20 = (char *)local_28;\n  }" ({ "{") (expression_statement "pcVar3 = (char *)FUN_0001be70("/.putty");" (assignment_expression "pcVar3 = (char *)FUN_0001be70("/.putty")" (identifier "pcVar3") (= "=") (cast_expression "(char *)FUN_0001be70("/.putty")" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001be70("/.putty")" (identifier "FUN_0001be70") (argument_list "("/.putty")" (( "(") (string_literal ""/.putty"" (" """) (string_content "/.putty") (" """)) () ")"))))) (; ";")) (if_statement "if (pbVar8 == (byte *)0x0) {\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }" (if "if") (parenthesized_expression "(pbVar8 == (byte *)0x0)" (( "(") (binary_expression "pbVar8 == (byte *)0x0" (identifier "pbVar8") (== "==") (cast_expression "(byte *)0x0" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      access(pcVar3,0);\n      pcVar5 = (char *)0x0;\n      pbVar8 = (byte *)(char *)0x0;\n      pbVar10 = (byte *)pcVar3;\n      goto LAB_0003c7dd;\n    }" ({ "{") (expression_statement "access(pcVar3,0);" (call_expression "access(pcVar3,0)" (identifier "access") (argument_list "(pcVar3,0)" (( "(") (identifier "pcVar3") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "pcVar5 = (char *)0x0;" (assignment_expression "pcVar5 = (char *)0x0" (identifier "pcVar5") (= "=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "pbVar8 = (byte *)(char *)0x0;" (assignment_expression "pbVar8 = (byte *)(char *)0x0" (identifier "pbVar8") (= "=") (cast_expression "(byte *)(char *)0x0" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")))) (; ";")) (expression_statement "pbVar10 = (byte *)pcVar3;" (assignment_expression "pbVar10 = (byte *)pcVar3" (identifier "pbVar10") (= "=") (cast_expression "(byte *)pcVar3" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "pcVar3"))) (; ";")) (goto_statement "goto LAB_0003c7dd;" (goto "goto") (statement_identifier "LAB_0003c7dd") (; ";")) (} "}"))) (expression_statement "iVar6 = access((char *)pbVar8,0);" (assignment_expression "iVar6 = access((char *)pbVar8,0)" (identifier "iVar6") (= "=") (call_expression "access((char *)pbVar8,0)" (identifier "access") (argument_list "((char *)pbVar8,0)" (( "(") (cast_expression "(char *)pbVar8" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "pbVar8")) (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar6 == 0) {\n      local_20 = (char *)0x0;\n    }\n    else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }" (if "if") (parenthesized_expression "(iVar6 == 0)" (( "(") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      local_20 = (char *)0x0;\n    }" ({ "{") (expression_statement "local_20 = (char *)0x0;" (assignment_expression "local_20 = (char *)0x0" (identifier "local_20") (= "=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (} "}")) (else_clause "else {\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }" (else "else") (compound_statement "{\n      iVar6 = access(pcVar3,0);\n      local_20 = (char *)0x0;\n      if (iVar6 != 0) goto LAB_0003c430;\nLAB_0003c635:\n      pcVar5 = local_20;\n      pbVar8 = local_28;\n      pbVar10 = (byte *)pcVar3;\n      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;\n      if (local_20 == pcVar3) goto LAB_0003c456;\n    }" ({ "{") (expression_statement "iVar6 = access(pcVar3,0);" (assignment_expression "iVar6 = access(pcVar3,0)" (identifier "iVar6") (= "=") (call_expression "access(pcVar3,0)" (identifier "access") (argument_list "(pcVar3,0)" (( "(") (identifier "pcVar3") (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "local_20 = (char *)0x0;" (assignment_expression "local_20 = (char *)0x0" (identifier "local_20") (= "=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (if_statement "if (iVar6 != 0) goto LAB_0003c430;" (if "if") (parenthesized_expression "(iVar6 != 0)" (( "(") (binary_expression "iVar6 != 0" (identifier "iVar6") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_0003c430;" (goto "goto") (statement_identifier "LAB_0003c430") (; ";"))) (labeled_statement "LAB_0003c635:\n      pcVar5 = local_20;" (statement_identifier "LAB_0003c635") (: ":") (expression_statement "pcVar5 = local_20;" (assignment_expression "pcVar5 = local_20" (identifier "pcVar5") (= "=") (identifier "local_20")) (; ";"))) (expression_statement "pbVar8 = local_28;" (assignment_expression "pbVar8 = local_28" (identifier "pbVar8") (= "=") (identifier "local_28")) (; ";")) (expression_statement "pbVar10 = (byte *)pcVar3;" (assignment_expression "pbVar10 = (byte *)pcVar3" (identifier "pbVar10") (= "=") (cast_expression "(byte *)pcVar3" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "pcVar3"))) (; ";")) (if_statement "if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;" (if "if") (parenthesized_expression "((byte *)pcVar3 != local_28)" (( "(") (binary_expression "(byte *)pcVar3 != local_28" (cast_expression "(byte *)pcVar3" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "pcVar3")) (!= "!=") (identifier "local_28")) () ")")) (goto_statement "goto LAB_0003c7dd;" (goto "goto") (statement_identifier "LAB_0003c7dd") (; ";"))) (if_statement "if (local_20 == pcVar3) goto LAB_0003c456;" (if "if") (parenthesized_expression "(local_20 == pcVar3)" (( "(") (binary_expression "local_20 == pcVar3" (identifier "local_20") (== "==") (identifier "pcVar3")) () ")")) (goto_statement "goto LAB_0003c456;" (goto "goto") (statement_identifier "LAB_0003c456") (; ";"))) (} "}")))) (labeled_statement "LAB_0003c436:\n    FUN_0001c5f0(local_20);" (statement_identifier "LAB_0003c436") (: ":") (expression_statement "FUN_0001c5f0(local_20);" (call_expression "FUN_0001c5f0(local_20)" (identifier "FUN_0001c5f0") (argument_list "(local_20)" (( "(") (identifier "local_20") () ")"))) (; ";"))) (expression_statement "local_20 = (char *)local_28;" (assignment_expression "local_20 = (char *)local_28" (identifier "local_20") (= "=") (cast_expression "(char *)local_28" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "local_28"))) (; ";")) (} "}")) (else_clause "else {\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }" (else "else") (compound_statement "{\n    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);\n    pcVar3 = (char *)FUN_0001be70("/.putty");\n    if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }\n  }" ({ "{") (expression_statement "local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);" (assignment_expression "local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4)" (identifier "local_20") (= "=") (cast_expression "(char *)FUN_0001c3d0("%s/.putty",ppVar4)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001c3d0("%s/.putty",ppVar4)" (identifier "FUN_0001c3d0") (argument_list "("%s/.putty",ppVar4)" (( "(") (string_literal ""%s/.putty"" (" """) (string_content "%s/.putty") (" """)) (, ",") (identifier "ppVar4") () ")"))))) (; ";")) (expression_statement "pcVar3 = (char *)FUN_0001be70("/.putty");" (assignment_expression "pcVar3 = (char *)FUN_0001be70("/.putty")" (identifier "pcVar3") (= "=") (cast_expression "(char *)FUN_0001be70("/.putty")" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001be70("/.putty")" (identifier "FUN_0001be70") (argument_list "("/.putty")" (( "(") (string_literal ""/.putty"" (" """) (string_content "/.putty") (" """)) () ")"))))) (; ";")) (if_statement "if (pbVar8 == (byte *)0x0) {\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }\n    else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }" (if "if") (parenthesized_expression "(pbVar8 == (byte *)0x0)" (( "(") (binary_expression "pbVar8 == (byte *)0x0" (identifier "pbVar8") (== "==") (cast_expression "(byte *)0x0" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      pbVar8 = (byte *)0x0;\nLAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }\n      if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }\n    }" ({ "{") (expression_statement "pbVar8 = (byte *)0x0;" (assignment_expression "pbVar8 = (byte *)0x0" (identifier "pbVar8") (= "=") (cast_expression "(byte *)0x0" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (labeled_statement "LAB_0003c3e2:\n      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }" (statement_identifier "LAB_0003c3e2") (: ":") (if_statement "if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }" (if "if") (parenthesized_expression "((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0))" (( "(") (binary_expression "(local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)" (parenthesized_expression "(local_20 == (char *)0x0)" (( "(") (binary_expression "local_20 == (char *)0x0" (identifier "local_20") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (|| "||") (parenthesized_expression "(iVar6 = access(local_20,0), iVar6 != 0)" (( "(") (comma_expression "iVar6 = access(local_20,0), iVar6 != 0" (assignment_expression "iVar6 = access(local_20,0)" (identifier "iVar6") (= "=") (call_expression "access(local_20,0)" (identifier "access") (argument_list "(local_20,0)" (( "(") (identifier "local_20") (, ",") (number_literal "0") () ")")))) (, ",") (binary_expression "iVar6 != 0" (identifier "iVar6") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n        iVar6 = access(pcVar3,0);\n        local_28 = pbVar8;\n        if (iVar6 == 0) goto LAB_0003c635;\n        if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }\n        goto LAB_0003c430;\n      }" ({ "{") (expression_statement "iVar6 = access(pcVar3,0);" (assignment_expression "iVar6 = access(pcVar3,0)" (identifier "iVar6") (= "=") (call_expression "access(pcVar3,0)" (identifier "access") (argument_list "(pcVar3,0)" (( "(") (identifier "pcVar3") (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "local_28 = pbVar8;" (assignment_expression "local_28 = pbVar8" (identifier "local_28") (= "=") (identifier "pbVar8")) (; ";")) (if_statement "if (iVar6 == 0) goto LAB_0003c635;" (if "if") (parenthesized_expression "(iVar6 == 0)" (( "(") (binary_expression "iVar6 == 0" (identifier "iVar6") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0003c635;" (goto "goto") (statement_identifier "LAB_0003c635") (; ";"))) (if_statement "if (pbVar8 == (byte *)0x0) {\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }" (if "if") (parenthesized_expression "(pbVar8 == (byte *)0x0)" (( "(") (binary_expression "pbVar8 == (byte *)0x0" (identifier "pbVar8") (== "==") (cast_expression "(byte *)0x0" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n          pcVar5 = (char *)pbVar8;\n          pbVar10 = (byte *)pcVar3;\n          if (local_20 == (char *)0x0) goto LAB_0003c7dd;\n          goto LAB_0003c7fe;\n        }" ({ "{") (expression_statement "pcVar5 = (char *)pbVar8;" (assignment_expression "pcVar5 = (char *)pbVar8" (identifier "pcVar5") (= "=") (cast_expression "(char *)pbVar8" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "pbVar8"))) (; ";")) (expression_statement "pbVar10 = (byte *)pcVar3;" (assignment_expression "pbVar10 = (byte *)pcVar3" (identifier "pbVar10") (= "=") (cast_expression "(byte *)pcVar3" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "pcVar3"))) (; ";")) (if_statement "if (local_20 == (char *)0x0) goto LAB_0003c7dd;" (if "if") (parenthesized_expression "(local_20 == (char *)0x0)" (( "(") (binary_expression "local_20 == (char *)0x0" (identifier "local_20") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_0003c7dd;" (goto "goto") (statement_identifier "LAB_0003c7dd") (; ";"))) (goto_statement "goto LAB_0003c7fe;" (goto "goto") (statement_identifier "LAB_0003c7fe") (; ";")) (} "}"))) (goto_statement "goto LAB_0003c430;" (goto "goto") (statement_identifier "LAB_0003c430") (; ";")) (} "}")))) (if_statement "if ((byte *)local_20 != pbVar8) {\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }" (if "if") (parenthesized_expression "((byte *)local_20 != pbVar8)" (( "(") (binary_expression "(byte *)local_20 != pbVar8" (cast_expression "(byte *)local_20" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "local_20")) (!= "!=") (identifier "pbVar8")) () ")")) (compound_statement "{\nLAB_0003c7fe:\n        pcVar5 = local_20;\n        pbVar10 = (byte *)local_20;\n        goto LAB_0003c7dd;\n      }" ({ "{") (labeled_statement "LAB_0003c7fe:\n        pcVar5 = local_20;" (statement_identifier "LAB_0003c7fe") (: ":") (expression_statement "pcVar5 = local_20;" (assignment_expression "pcVar5 = local_20" (identifier "pcVar5") (= "=") (identifier "local_20")) (; ";"))) (expression_statement "pbVar10 = (byte *)local_20;" (assignment_expression "pbVar10 = (byte *)local_20" (identifier "pbVar10") (= "=") (cast_expression "(byte *)local_20" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "local_20"))) (; ";")) (goto_statement "goto LAB_0003c7dd;" (goto "goto") (statement_identifier "LAB_0003c7dd") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }" (else "else") (compound_statement "{\n      iVar6 = access((char *)pbVar8,0);\n      if (iVar6 != 0) goto LAB_0003c3e2;\nLAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;\n    }" ({ "{") (expression_statement "iVar6 = access((char *)pbVar8,0);" (assignment_expression "iVar6 = access((char *)pbVar8,0)" (identifier "iVar6") (= "=") (call_expression "access((char *)pbVar8,0)" (identifier "access") (argument_list "((char *)pbVar8,0)" (( "(") (cast_expression "(char *)pbVar8" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "pbVar8")) (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar6 != 0) goto LAB_0003c3e2;" (if "if") (parenthesized_expression "(iVar6 != 0)" (( "(") (binary_expression "iVar6 != 0" (identifier "iVar6") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_0003c3e2;" (goto "goto") (statement_identifier "LAB_0003c3e2") (; ";"))) (labeled_statement "LAB_0003c430:\n      if (local_28 != (byte *)local_20) goto LAB_0003c436;" (statement_identifier "LAB_0003c430") (: ":") (if_statement "if (local_28 != (byte *)local_20) goto LAB_0003c436;" (if "if") (parenthesized_expression "(local_28 != (byte *)local_20)" (( "(") (binary_expression "local_28 != (byte *)local_20" (identifier "local_28") (!= "!=") (cast_expression "(byte *)local_20" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "local_20"))) () ")")) (goto_statement "goto LAB_0003c436;" (goto "goto") (statement_identifier "LAB_0003c436") (; ";")))) (} "}")))) (} "}")))) (if_statement "if (local_20 != pcVar3) {\n    FUN_0001c5f0(pcVar3);\n  }" (if "if") (parenthesized_expression "(local_20 != pcVar3)" (( "(") (binary_expression "local_20 != pcVar3" (identifier "local_20") (!= "!=") (identifier "pcVar3")) () ")")) (compound_statement "{\n    FUN_0001c5f0(pcVar3);\n  }" ({ "{") (expression_statement "FUN_0001c5f0(pcVar3);" (call_expression "FUN_0001c5f0(pcVar3)" (identifier "FUN_0001c5f0") (argument_list "(pcVar3)" (( "(") (identifier "pcVar3") () ")"))) (; ";")) (} "}"))) (labeled_statement "LAB_0003c456:\n  if (local_20 != local_24) {\n    FUN_0001c5f0(local_24);\n  }" (statement_identifier "LAB_0003c456") (: ":") (if_statement "if (local_20 != local_24) {\n    FUN_0001c5f0(local_24);\n  }" (if "if") (parenthesized_expression "(local_20 != local_24)" (( "(") (binary_expression "local_20 != local_24" (identifier "local_20") (!= "!=") (identifier "local_24")) () ")")) (compound_statement "{\n    FUN_0001c5f0(local_24);\n  }" ({ "{") (expression_statement "FUN_0001c5f0(local_24);" (call_expression "FUN_0001c5f0(local_24)" (identifier "FUN_0001c5f0") (argument_list "(local_24)" (( "(") (identifier "local_24") () ")"))) (; ";")) (} "}")))) (return_statement "return local_20;" (return "return") (identifier "local_20") (; ";")) (} "}")))

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

char * __regparm3 function_1(int var_1,char *var_5)

{
  type_1 var_9;
  char *var_17;
  char *var_3;
  type_2 __uid;
  type_3 *var_16;
  int var_20;
  size_t var_8;
  type_1 *var_11;
  type_1 var_10;
  type_1 *pbVar9;
  type_1 *var_21;
  char *var_18;
  char *var_22;
  
  if (var_1 != 0) {
    if (var_1 == 4) {
      var_3 = var_2("PUTTYSESSIONS");
      if (var_3 != (char *)0x0) {
LAB_0003c562:
        var_3 = var_4(var_3);
        return var_3;
      }
      var_17 = function_1(0,(char *)0x0);
      var_3 = "%s/sessions";
    }
    else {
      if (var_1 == 5) {
        if ((var_5 != (char *)0x0) && (*var_5 != '\0')) {
          var_8 = var_6(var_5);
          var_21 = (type_1 *)var_7(var_8 * 3 + 1,1);
          var_9 = *var_5;
          var_11 = var_21;
          while (var_9 != 0) {
LAB_0003c4e3:
            var_10 = 1;
            if ((type_1)(var_9 - 0x2b) < 0x16) {
              var_10 = ~(type_1)(0x20000d >> (var_9 - 0x2b & 0x1f)) & 1;
            }
            if ((((var_9 == 0x5f) || (var_10 == 0)) || ((type_1)(var_9 - 0x30) < 10)) ||
               ((type_1)((var_9 & 0xdf) + 0xbf) < 0x1a)) {
              *var_11 = var_9;
              pbVar9 = var_11 + 1;
            }
            else {
              *var_11 = 0x25;
              pbVar9 = var_11 + 3;
              var_11[1] = "0123456789ABCDEF"[(type_1)*var_5 >> 4];
              var_11[2] = "0123456789ABCDEF"[(type_1)*var_5 & 0xf];
            }
            var_5 = (char *)((type_1 *)var_5 + 1);
            var_11 = pbVar9;
            var_9 = *var_5;
          }
          *var_11 = 0;
          var_3 = function_1(4,(char *)0x0);
          var_17 = var_12("%s/%s",var_3,var_21);
          var_13(var_3);
          var_13(var_21);
          return var_17;
        }
        var_11 = (type_1 *)var_7(0x31,1);
        var_5 = "Default Settings";
        var_9 = 0x44;
        var_21 = var_11;
        goto LAB_0003c4e3;
      }
      if (var_1 == 1) {
        var_3 = var_2("PUTTYSSHHOSTKEYS");
        if (var_3 != (char *)0x0) goto LAB_0003c562;
        var_17 = function_1(0,(char *)0x0);
        var_3 = "%s/sshhostkeys";
      }
      else if (var_1 == 2) {
        var_17 = function_1(1,(char *)0x0);
        var_3 = "%s.tmp";
      }
      else if (var_1 == 3) {
        var_3 = var_2("PUTTYRANDOMSEED");
        if (var_3 != (char *)0x0) goto LAB_0003c562;
        var_17 = function_1(0,(char *)0x0);
        var_3 = "%s/randomseed";
      }
      else {
        var_17 = function_1(0,(char *)0x0);
        var_3 = "%s/ERROR";
      }
    }
    var_3 = var_12(var_3,var_17);
    var_13(var_17);
    return var_3;
  }
  var_3 = var_2("PUTTYDIR");
  if (var_3 != (char *)0x0) {
    var_3 = var_4(var_3);
    return var_3;
  }
  var_3 = var_2("HOME");
  __uid = var_14();
  var_16 = var_15(__uid);
  if (var_16 != (type_3 *)0x0) {
    var_16 = (type_3 *)var_16->pw_dir;
  }
  var_17 = var_2("XDG_CONFIG_HOME");
  var_11 = (type_1 *)0x0;
  if (((var_17 == (char *)0x0) || (*var_17 == '\0')) ||
     (var_18 = var_12("%s/putty",var_17), var_18 == (char *)0x0)) {
    if (var_3 != (char *)0x0) {
      var_18 = var_12("%s/.config/putty",var_3);
      if ((var_18 != (char *)0x0) && (var_20 = var_19(var_18,0), var_20 == 0)) {
        return var_18;
      }
      goto LAB_0003c379;
    }
    if (var_16 != (type_3 *)0x0) {
      var_18 = var_12("%s/.config/putty",var_16);
      if ((var_18 != (char *)0x0) && (var_20 = var_19(var_18,0), var_20 == 0)) {
        return var_18;
      }
      goto LAB_0003c73d;
    }
    var_18 = var_12("%s/.config/putty",&DAT_000406dd);
    if ((var_18 != (char *)0x0) && (var_20 = var_19(var_18,0), var_20 == 0)) {
      return var_18;
    }
LAB_0003c7b9:
    var_3 = var_4("/.putty");
    var_19(var_3,0);
    var_17 = (char *)0x0;
    pbVar9 = (type_1 *)var_3;
LAB_0003c7dd:
    var_21 = pbVar9;
    var_13(var_11);
    var_22 = var_17;
    goto LAB_0003c430;
  }
  var_20 = var_19(var_18,0);
  if (var_20 == 0) {
    return var_18;
  }
  if (var_3 == (char *)0x0) {
    if (var_16 == (type_3 *)0x0) goto LAB_0003c7b9;
LAB_0003c73d:
    var_22 = var_12("%s/.putty",var_16);
    var_3 = var_4("/.putty");
    goto LAB_0003c3e2;
  }
LAB_0003c379:
  var_11 = (type_1 *)var_12("%s/.putty",var_3);
  var_21 = var_11;
  if (var_16 == (type_3 *)0x0) {
    var_3 = var_4("/.putty");
    if (var_11 == (type_1 *)0x0) {
      var_19(var_3,0);
      var_17 = (char *)0x0;
      var_11 = (type_1 *)(char *)0x0;
      pbVar9 = (type_1 *)var_3;
      goto LAB_0003c7dd;
    }
    var_20 = var_19((char *)var_11,0);
    if (var_20 == 0) {
      var_22 = (char *)0x0;
    }
    else {
      var_20 = var_19(var_3,0);
      var_22 = (char *)0x0;
      if (var_20 != 0) goto LAB_0003c430;
LAB_0003c635:
      var_17 = var_22;
      var_11 = var_21;
      pbVar9 = (type_1 *)var_3;
      if ((type_1 *)var_3 != var_21) goto LAB_0003c7dd;
      if (var_22 == var_3) goto LAB_0003c456;
    }
LAB_0003c436:
    var_13(var_22);
    var_22 = (char *)var_21;
  }
  else {
    var_22 = var_12("%s/.putty",var_16);
    var_3 = var_4("/.putty");
    if (var_11 == (type_1 *)0x0) {
      var_11 = (type_1 *)0x0;
LAB_0003c3e2:
      if ((var_22 == (char *)0x0) || (var_20 = var_19(var_22,0), var_20 != 0)) {
        var_20 = var_19(var_3,0);
        var_21 = var_11;
        if (var_20 == 0) goto LAB_0003c635;
        if (var_11 == (type_1 *)0x0) {
          var_17 = (char *)var_11;
          pbVar9 = (type_1 *)var_3;
          if (var_22 == (char *)0x0) goto LAB_0003c7dd;
          goto LAB_0003c7fe;
        }
        goto LAB_0003c430;
      }
      if ((type_1 *)var_22 != var_11) {
LAB_0003c7fe:
        var_17 = var_22;
        pbVar9 = (type_1 *)var_22;
        goto LAB_0003c7dd;
      }
    }
    else {
      var_20 = var_19((char *)var_11,0);
      if (var_20 != 0) goto LAB_0003c3e2;
LAB_0003c430:
      if (var_21 != (type_1 *)var_22) goto LAB_0003c436;
    }
  }
  if (var_22 != var_3) {
    var_13(var_3);
  }
LAB_0003c456:
  if (var_22 != var_18) {
    var_13(var_18);
  }
  return var_22;
}


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

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

char * __regparm3 MASKED(int param_1,char *param_2)

{
  byte bVar1;
  undefined4 uVar2;
  char *pcVar3;
  __uid_t __uid;
  passwd *ppVar4;
  char *pcVar5;
  int iVar6;
  size_t sVar7;
  byte *pbVar8;
  byte bVar9;
  byte *pbVar10;
  byte *local_28;
  char *local_24;
  char *local_20;
  
  if (param_1 != 0) {
    if (param_1 == 4) {
      pcVar3 = getenv("PUTTYSESSIONS");
      if (pcVar3 != (char *)0x0) {
LAB_0003c562:
        pcVar3 = (char *)FUN_0001be70(pcVar3);
        return pcVar3;
      }
      uVar2 = MASKED();
      pcVar3 = "%s/sessions";
    }
    else {
      if (param_1 == 5) {
        if (((byte *)param_2 != (byte *)0x0) && (*param_2 != 0)) {
          sVar7 = strlen(param_2);
          local_28 = (byte *)FUN_0001bd60(sVar7 * 3 + 1,1);
          bVar1 = *param_2;
          pbVar8 = local_28;
          while (bVar1 != 0) {
LAB_0003c4e3:
            bVar9 = 1;
            if ((byte)(bVar1 - 0x2b) < 0x16) {
              bVar9 = ~(byte)(0x20000d >> (bVar1 - 0x2b & 0x1f)) & 1;
            }
            if ((((bVar1 == 0x5f) || (bVar9 == 0)) || ((byte)(bVar1 - 0x30) < 10)) ||
               ((byte)((bVar1 & 0xdf) + 0xbf) < 0x1a)) {
              *pbVar8 = bVar1;
              pbVar10 = pbVar8 + 1;
            }
            else {
              *pbVar8 = 0x25;
              pbVar10 = pbVar8 + 3;
              pbVar8[1] = "0123456789ABCDEF"[(byte)*param_2 >> 4];
              pbVar8[2] = "0123456789ABCDEF"[(byte)*param_2 & 0xf];
            }
            param_2 = (char *)((byte *)param_2 + 1);
            pbVar8 = pbVar10;
            bVar1 = *param_2;
          }
          *pbVar8 = 0;
          uVar2 = MASKED();
          pcVar3 = (char *)FUN_0001c3d0("%s/%s",uVar2,local_28);
          FUN_0001c5f0(uVar2);
          FUN_0001c5f0(local_28);
          return pcVar3;
        }
        pbVar8 = (byte *)FUN_0001bd60(0x31,1);
        param_2 = "Default Settings";
        bVar1 = 0x44;
        local_28 = pbVar8;
        goto LAB_0003c4e3;
      }
      if (param_1 == 1) {
        pcVar3 = getenv("PUTTYSSHHOSTKEYS");
        if (pcVar3 != (char *)0x0) goto LAB_0003c562;
        uVar2 = MASKED();
        pcVar3 = "%s/sshhostkeys";
      }
      else if (param_1 == 2) {
        uVar2 = MASKED();
        pcVar3 = "%s.tmp";
      }
      else if (param_1 == 3) {
        pcVar3 = getenv("PUTTYRANDOMSEED");
        if (pcVar3 != (char *)0x0) goto LAB_0003c562;
        uVar2 = MASKED();
        pcVar3 = "%s/randomseed";
      }
      else {
        uVar2 = MASKED();
        pcVar3 = "%s/ERROR";
      }
    }
    pcVar3 = (char *)FUN_0001c3d0(pcVar3,uVar2);
    FUN_0001c5f0(uVar2);
    return pcVar3;
  }
  pcVar3 = getenv("PUTTYDIR");
  if (pcVar3 != (char *)0x0) {
    pcVar3 = (char *)FUN_0001be70(pcVar3);
    return pcVar3;
  }
  pcVar3 = getenv("HOME");
  __uid = getuid();
  ppVar4 = getpwuid(__uid);
  if (ppVar4 != (passwd *)0x0) {
    ppVar4 = (passwd *)ppVar4->pw_dir;
  }
  pcVar5 = getenv("XDG_CONFIG_HOME");
  pbVar8 = (byte *)0x0;
  if (((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) ||
     (local_24 = (char *)FUN_0001c3d0("%s/putty",pcVar5), local_24 == (char *)0x0)) {
    if (pcVar3 != (char *)0x0) {
      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",pcVar3);
      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {
        return local_24;
      }
      goto LAB_0003c379;
    }
    if (ppVar4 != (passwd *)0x0) {
      local_24 = (char *)FUN_0001c3d0("%s/.config/putty",ppVar4);
      if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {
        return local_24;
      }
      goto LAB_0003c73d;
    }
    local_24 = (char *)FUN_0001c3d0("%s/.config/putty",&DAT_000406dd);
    if ((local_24 != (char *)0x0) && (iVar6 = access(local_24,0), iVar6 == 0)) {
      return local_24;
    }
LAB_0003c7b9:
    pcVar3 = (char *)FUN_0001be70("/.putty");
    access(pcVar3,0);
    pcVar5 = (char *)0x0;
    pbVar10 = (byte *)pcVar3;
LAB_0003c7dd:
    local_28 = pbVar10;
    FUN_0001c5f0(pbVar8);
    local_20 = pcVar5;
    goto LAB_0003c430;
  }
  iVar6 = access(local_24,0);
  if (iVar6 == 0) {
    return local_24;
  }
  if (pcVar3 == (char *)0x0) {
    if (ppVar4 == (passwd *)0x0) goto LAB_0003c7b9;
LAB_0003c73d:
    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);
    pcVar3 = (char *)FUN_0001be70("/.putty");
    goto LAB_0003c3e2;
  }
LAB_0003c379:
  pbVar8 = (byte *)FUN_0001c3d0("%s/.putty",pcVar3);
  local_28 = pbVar8;
  if (ppVar4 == (passwd *)0x0) {
    pcVar3 = (char *)FUN_0001be70("/.putty");
    if (pbVar8 == (byte *)0x0) {
      access(pcVar3,0);
      pcVar5 = (char *)0x0;
      pbVar8 = (byte *)(char *)0x0;
      pbVar10 = (byte *)pcVar3;
      goto LAB_0003c7dd;
    }
    iVar6 = access((char *)pbVar8,0);
    if (iVar6 == 0) {
      local_20 = (char *)0x0;
    }
    else {
      iVar6 = access(pcVar3,0);
      local_20 = (char *)0x0;
      if (iVar6 != 0) goto LAB_0003c430;
LAB_0003c635:
      pcVar5 = local_20;
      pbVar8 = local_28;
      pbVar10 = (byte *)pcVar3;
      if ((byte *)pcVar3 != local_28) goto LAB_0003c7dd;
      if (local_20 == pcVar3) goto LAB_0003c456;
    }
LAB_0003c436:
    FUN_0001c5f0(local_20);
    local_20 = (char *)local_28;
  }
  else {
    local_20 = (char *)FUN_0001c3d0("%s/.putty",ppVar4);
    pcVar3 = (char *)FUN_0001be70("/.putty");
    if (pbVar8 == (byte *)0x0) {
      pbVar8 = (byte *)0x0;
LAB_0003c3e2:
      if ((local_20 == (char *)0x0) || (iVar6 = access(local_20,0), iVar6 != 0)) {
        iVar6 = access(pcVar3,0);
        local_28 = pbVar8;
        if (iVar6 == 0) goto LAB_0003c635;
        if (pbVar8 == (byte *)0x0) {
          pcVar5 = (char *)pbVar8;
          pbVar10 = (byte *)pcVar3;
          if (local_20 == (char *)0x0) goto LAB_0003c7dd;
          goto LAB_0003c7fe;
        }
        goto LAB_0003c430;
      }
      if ((byte *)local_20 != pbVar8) {
LAB_0003c7fe:
        pcVar5 = local_20;
        pbVar10 = (byte *)local_20;
        goto LAB_0003c7dd;
      }
    }
    else {
      iVar6 = access((char *)pbVar8,0);
      if (iVar6 != 0) goto LAB_0003c3e2;
LAB_0003c430:
      if (local_28 != (byte *)local_20) goto LAB_0003c436;
    }
  }
  if (local_20 != pcVar3) {
    FUN_0001c5f0(pcVar3);
  }
LAB_0003c456:
  if (local_20 != local_24) {
    FUN_0001c5f0(local_24);
  }
  return local_20;
}

