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

int proxy_http_negotiate(Proxy_Socket p,int change)

{
  bufchain *ch;
  uchar *data;
  int iVar1;
  Socket ppsVar2;
  int iVar3;
  size_t n;
  char *pcVar4;
  size_t sVar5;
  char *pcVar6;
  int iVar7;
  int iVar8;
  char *pcVar9;
  int iVar10;
  int in_GS_OFFSET;
  uint __line;
  bufchain *local_238;
  int min_ver;
  int maj_ver;
  int status;
  char dest [512];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  iVar10 = p->state;
  if (iVar10 == -1) {
    sk_getaddr(p->remote_addr,dest,0x200);
    pcVar9 = dupprintf("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",dest,p->remote_port,dest,
                       p->remote_port);
    ppsVar2 = p->sub_socket;
    sVar5 = strlen(pcVar9);
    (*(*ppsVar2)->write)(ppsVar2,pcVar9,sVar5);
    safefree(pcVar9);
    pcVar9 = conf_get_str(p->conf,0x10);
    pcVar4 = conf_get_str(p->conf,0x11);
    if ((*pcVar9 != '\0') || (*pcVar4 != '\0')) {
      pcVar9 = dupprintf("%s:%s",pcVar9,pcVar4);
      sVar5 = strlen(pcVar9);
      pcVar4 = (char *)safemalloc((sVar5 * 4) / 3 + 100,1);
      builtin_strncpy(pcVar4,"Proxy-Authorization: Basic ",0x1c);
      iVar10 = 0x1b;
      if (sVar5 != 0) {
        iVar7 = 0;
        iVar10 = 0x1b;
        do {
          pcVar6 = pcVar4 + iVar10;
          iVar8 = sVar5 - iVar7;
          if (3 < iVar8) {
            iVar8 = 3;
          }
          iVar10 = iVar10 + 4;
          data = (uchar *)(pcVar9 + iVar7);
          iVar7 = iVar7 + 3;
          base64_encode_atom(data,iVar8,pcVar6);
        } while (iVar7 < (int)sVar5);
      }
      pcVar6 = pcVar4 + iVar10;
      pcVar6[0] = '\r';
      pcVar6[1] = '\n';
      pcVar6[2] = '\0';
      ppsVar2 = p->sub_socket;
      sVar5 = strlen(pcVar4);
      (*(*ppsVar2)->write)(ppsVar2,pcVar4,sVar5);
      safefree(pcVar9);
      safefree(pcVar4);
    }
    iVar10 = 0;
    (*(*p->sub_socket)->write)(p->sub_socket,"\r\n",2);
    p->state = 1;
    goto LAB_0001edd5;
  }
  if (change == 0) {
    iVar10 = 0;
    (*(*p->plug)->closing)
              (p->plug,p->closing_error_msg,p->closing_error_code,p->closing_calling_back);
    goto LAB_0001edd5;
  }
  if (change == 1) {
    iVar10 = 0;
    goto LAB_0001edd5;
  }
  if (change == 3) {
    iVar10 = (*(*p->plug)->accepting)
                       (p->plug,p->accepting_constructor,(accept_ctx_t)(p->accepting_ctx).p);
    goto LAB_0001edd5;
  }
  if (change == 2) {
    if (iVar10 == 1) {
      ch = &p->pending_input_data;
      iVar10 = bufchain_size(ch);
      if (iVar10 < 1) {
        __line = 0x2af;
        goto LAB_0001f293;
      }
      pcVar9 = (char *)safemalloc(iVar10 + 1,1);
      bufchain_fetch(ch,pcVar9,iVar10);
      pcVar9[iVar10] = '\0';
      iVar7 = get_line_end(pcVar9,iVar10);
      iVar10 = 1;
      if (iVar7 < 0) {
        safefree(pcVar9);
        goto LAB_0001edd5;
      }
      status = -1;
      iVar8 = __isoc99_sscanf(pcVar9,"HTTP/%i.%i %n",&maj_ver,&min_ver,&status);
      if ((iVar8 < 2) || (status == -1)) {
        (*(*p->plug)->closing)(p->plug,"Proxy error: HTTP response was absent",8000,0);
        safefree(pcVar9);
        goto LAB_0001edd5;
      }
      bufchain_consume(ch,iVar7);
      if (pcVar9[status] != '2') {
        pcVar9[iVar7] = '\0';
        if ((status < iVar7) && ((pcVar9[iVar7 + -1] == '\n' || (pcVar9[iVar7 + -1] == '\r')))) {
          do {
            iVar8 = iVar7 + -1;
            pcVar9[iVar8] = '\0';
            if (iVar8 <= status) break;
            iVar3 = iVar7 + -2;
            iVar7 = iVar8;
          } while ((pcVar9[iVar3] == '\r') || (pcVar9[iVar3] == '\n'));
        }
        pcVar4 = dupprintf("Proxy error: %s",pcVar9 + status);
        (*(*p->plug)->closing)(p->plug,pcVar4,8000,0);
        safefree(pcVar4);
        safefree(pcVar9);
        goto LAB_0001edd5;
      }
      safefree(pcVar9);
      p->state = 2;
    }
    else if (iVar10 != 2) goto LAB_0001edb6;
    local_238 = &p->pending_input_data;
    n = bufchain_size(local_238);
    if ((int)n < 1) {
      __line = 0x2e5;
LAB_0001f293:
                    /* WARNING: Subroutine does not return */
      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");
    }
    pcVar4 = (char *)safemalloc(n,1);
    bufchain_fetch(local_238,pcVar4,n);
    iVar10 = get_line_end(pcVar4,n);
    pcVar9 = pcVar4;
    if (-1 < iVar10) {
      while (2 < iVar10) {
        pcVar9 = pcVar9 + iVar10;
        n = n - iVar10;
        bufchain_consume(local_238,iVar10);
        iVar10 = get_line_end(pcVar9,n);
      }
      if (iVar10 == 2) {
        iVar10 = 1;
        bufchain_consume(local_238,2);
        proxy_activate(p);
        safefree(pcVar4);
        goto LAB_0001edd5;
      }
    }
    iVar10 = 1;
    safefree(pcVar4);
  }
  else {
LAB_0001edb6:
    iVar10 = 1;
    (*(*p->plug)->closing)(p->plug,"Proxy error: unexpected proxy error",0x1f41,0);
  }
LAB_0001edd5:
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return iVar10;
}



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

undefined4 FUN_0001ed60(int param_1,int param_2)

{
  char *pcVar1;
  char cVar2;
  int *piVar3;
  int iVar4;
  undefined4 uVar5;
  char *pcVar6;
  size_t sVar7;
  char *pcVar8;
  char *pcVar9;
  int iVar10;
  int iVar11;
  int iVar12;
  undefined4 uVar13;
  int in_GS_OFFSET;
  uint __line;
  int local_238;
  undefined1 local_22c [4];
  undefined1 local_228 [4];
  int local_224;
  undefined1 local_220 [512];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1ed69;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar4 = *(int *)(param_1 + 0x44);
  if (iVar4 == -1) {
    FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);
    pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,
                                  *(undefined4 *)(param_1 + 0x14),local_220,
                                  *(undefined4 *)(param_1 + 0x14));
    piVar3 = *(int **)(param_1 + 8);
    sVar7 = strlen(pcVar6);
    (**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);
    FUN_0001d220(pcVar6);
    pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);
    pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);
    if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {
      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);
      sVar7 = strlen(pcVar6);
      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);
      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);
      iVar4 = 0x1b;
      if (sVar7 != 0) {
        iVar10 = 0;
        iVar4 = 0x1b;
        do {
          pcVar9 = pcVar8 + iVar4;
          iVar11 = sVar7 - iVar10;
          if (3 < iVar11) {
            iVar11 = 3;
          }
          iVar4 = iVar4 + 4;
          pcVar1 = pcVar6 + iVar10;
          iVar10 = iVar10 + 3;
          FUN_0001c500(pcVar1,iVar11,pcVar9);
        } while (iVar10 < (int)sVar7);
      }
      pcVar9 = pcVar8 + iVar4;
      pcVar9[0] = '\r';
      pcVar9[1] = '\n';
      pcVar9[2] = '\0';
      piVar3 = *(int **)(param_1 + 8);
      sVar7 = strlen(pcVar8);
      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);
      FUN_0001d220(pcVar6);
      FUN_0001d220(pcVar8);
    }
    uVar13 = 0;
    (**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);
    *(undefined4 *)(param_1 + 0x44) = 1;
    goto LAB_0001edd5;
  }
  if (param_2 == 0) {
    uVar13 = 0;
    (**(code **)(**(int **)(param_1 + 0xc) + 4))
              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),
               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));
    goto LAB_0001edd5;
  }
  if (param_2 == 1) {
    uVar13 = 0;
    goto LAB_0001edd5;
  }
  if (param_2 == 3) {
    uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))
                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),
                        *(undefined4 *)(param_1 + 0x70));
    goto LAB_0001edd5;
  }
  if (param_2 == 2) {
    if (iVar4 == 1) {
      iVar4 = param_1 + 0x34;
      iVar10 = FUN_0001c7f0(iVar4);
      if (iVar10 < 1) {
        __line = 0x2af;
        goto LAB_0001f293;
      }
      iVar11 = FUN_0001c990(iVar10 + 1,1);
      FUN_0001c8e0(iVar4,iVar11,iVar10);
      *(undefined1 *)(iVar11 + iVar10) = 0;
      iVar10 = FUN_0001e850();
      uVar13 = 1;
      if (iVar10 < 0) {
        FUN_0001d220(iVar11);
        goto LAB_0001edd5;
      }
      local_224 = -1;
      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);
      if ((iVar12 < 2) || (local_224 == -1)) {
        (**(code **)(**(int **)(param_1 + 0xc) + 4))
                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);
        FUN_0001d220(iVar11);
        goto LAB_0001edd5;
      }
      FUN_0001c800(iVar4,iVar10);
      if (*(char *)(iVar11 + local_224) != '2') {
        *(undefined1 *)(iVar11 + iVar10) = 0;
        if ((local_224 < iVar10) &&
           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {
          do {
            iVar10 = iVar10 + -1;
            *(undefined1 *)(iVar11 + iVar10) = 0;
            if (iVar10 <= local_224) break;
            cVar2 = *(char *)(iVar11 + -1 + iVar10);
          } while ((cVar2 == '\r') || (cVar2 == '\n'));
        }
        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);
        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);
        FUN_0001d220(uVar5);
        FUN_0001d220(iVar11);
        goto LAB_0001edd5;
      }
      FUN_0001d220(iVar11);
      *(undefined4 *)(param_1 + 0x44) = 2;
    }
    else if (iVar4 != 2) goto LAB_0001edb6;
    local_238 = param_1 + 0x34;
    iVar4 = FUN_0001c7f0(local_238);
    if (iVar4 < 1) {
      __line = 0x2e5;
LAB_0001f293:
                    /* WARNING: Subroutine does not return */
      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");
    }
    uVar5 = FUN_0001c990(iVar4,1);
    FUN_0001c8e0(local_238,uVar5,iVar4);
    iVar4 = FUN_0001e850();
    if (-1 < iVar4) {
      while (2 < iVar4) {
        FUN_0001c800(local_238,iVar4);
        iVar4 = FUN_0001e850();
      }
      if (iVar4 == 2) {
        uVar13 = 1;
        FUN_0001c800(local_238,2);
        FUN_0001ebd0(param_1);
        FUN_0001d220(uVar5);
        goto LAB_0001edd5;
      }
    }
    uVar13 = 1;
    FUN_0001d220(uVar5);
  }
  else {
LAB_0001edb6:
    uVar13 = 1;
    (**(code **)(**(int **)(param_1 + 0xc) + 4))
              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);
  }
LAB_0001edd5:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0006dad0();
  }
  return uVar13;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00015fa0
ADD EBX,0x86007
SUB ESP,0x22c
MOV EDX,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x21c],EDX
XOR EDX,EDX
MOV EDI,dword ptr [ESP + 0x240]
MOV EAX,dword ptr [ESP + 0x244]
MOV ESI,dword ptr [EDI + 0x44]
CMP ESI,-0x1
JZ 0x0001eee0
TEST EAX,EAX
JZ 0x0001ee00
CMP EAX,0x1
JZ 0x0001ee20
CMP EAX,0x3
JZ 0x0001f090
CMP EAX,0x2
JZ 0x0001ee28
MOV EAX,dword ptr [EDI + 0xc]
LEA ECX,[EBX + 0xfffca624]
MOV ESI,0x1
MOV EDX,dword ptr [EAX]
PUSH 0x0
PUSH 0x1f41
PUSH ECX
PUSH EAX
CALL dword ptr [EDX + 0x4]
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x21c]
XOR EDX,dword ptr GS:[0x14]
MOV EAX,ESI
JNZ 0x0001f282
ADD ESP,0x22c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [EDI + 0xc]
XOR ESI,ESI
MOV EDX,dword ptr [EAX]
PUSH dword ptr [EDI + 0x58]
PUSH dword ptr [EDI + 0x54]
PUSH dword ptr [EDI + 0x50]
PUSH EAX
CALL dword ptr [EDX + 0x4]
ADD ESP,0x10
JMP 0x0001edd5
XOR ESI,ESI
JMP 0x0001edd5
CMP ESI,0x1
JZ 0x0001f0b0
CMP ESI,0x2
JNZ 0x0001edb6
LEA EAX,[EDI + 0x34]
MOV dword ptr [ESP + 0x4],EAX
SUB ESP,0xc
PUSH dword ptr [ESP + 0x10]
CALL 0x0001c7f0
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JLE 0x0001f287
SUB ESP,0x8
PUSH 0x1
PUSH EAX
CALL 0x0001c990
MOV dword ptr [ESP + 0x18],EAX
ADD ESP,0xc
MOV EBP,EAX
PUSH ESI
PUSH EAX
PUSH dword ptr [ESP + 0x10]
CALL 0x0001c8e0
MOV EDX,ESI
MOV EAX,EBP
CALL 0x0001e850
ADD ESP,0x10
TEST EAX,EAX
JS 0x0001eec1
CMP EAX,0x2
JLE 0x0001eeb8
MOV dword ptr [ESP + 0xc],EDI
MOV EDI,EAX
SUB ESP,0x8
ADD EBP,EDI
SUB ESI,EDI
PUSH EDI
PUSH dword ptr [ESP + 0x10]
CALL 0x0001c800
MOV EDX,ESI
MOV EAX,EBP
CALL 0x0001e850
ADD ESP,0x10
MOV EDI,EAX
CMP EAX,0x2
JG 0x0001ee90
MOV EDI,dword ptr [ESP + 0xc]
CMP EAX,0x2
JZ 0x0001f23d
SUB ESP,0xc
MOV ESI,0x1
PUSH dword ptr [ESP + 0x14]
CALL 0x0001d220
ADD ESP,0x10
JMP 0x0001edd5
SUB ESP,0x4
PUSH 0x200
LEA ESI,[ESP + 0x24]
PUSH ESI
PUSH dword ptr [EDI + 0x10]
CALL 0x00064790
MOV EAX,dword ptr [EDI + 0x14]
MOV dword ptr [ESP],EAX
PUSH ESI
PUSH EAX
LEA EAX,[EBX + 0xfffca5d4]
PUSH ESI
PUSH EAX
CALL 0x0001d000
ADD ESP,0x14
MOV EBP,dword ptr [EDI + 0x8]
PUSH EAX
MOV ESI,EAX
CALL 0x00014440
ADD ESP,0xc
MOV EDX,dword ptr [EBP]
PUSH EAX
PUSH ESI
PUSH EBP
CALL dword ptr [EDX + 0x8]
MOV dword ptr [ESP],ESI
CALL 0x0001d220
POP EAX
POP EDX
PUSH 0x10
PUSH dword ptr [EDI + 0x74]
CALL 0x00018b50
POP ECX
POP EBP
PUSH 0x11
PUSH dword ptr [EDI + 0x74]
MOV ESI,EAX
CALL 0x00018b50
ADD ESP,0x10
CMP byte ptr [ESI],0x0
JNZ 0x0001ef57
CMP byte ptr [EAX],0x0
JZ 0x0001f06a
SUB ESP,0x4
PUSH EAX
LEA EAX,[EBX + 0xfffcaac9]
PUSH ESI
PUSH EAX
CALL 0x0001d000
MOV dword ptr [ESP + 0x14],EAX
MOV dword ptr [ESP],EAX
CALL 0x00014440
POP ESI
POP EBP
PUSH 0x1
LEA EDX,[EAX*0x4 + 0x0]
MOV ESI,0xaaaaaaab
MOV dword ptr [ESP + 0x14],EAX
MOV EAX,EDX
MUL ESI
SHR EDX,0x1
ADD EDX,0x64
PUSH EDX
CALL 0x0001c990
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0x8]
MOV ESI,EAX
MOV dword ptr [EAX],0x786f7250
MOV dword ptr [EAX + 0x4],0x75412d79
MOV dword ptr [EAX + 0x8],0x726f6874
MOV dword ptr [EAX + 0xc],0x74617a69
MOV dword ptr [EAX + 0x10],0x3a6e6f69
MOV dword ptr [EAX + 0x14],0x73614220
MOV dword ptr [EAX + 0x18],0x206369
MOV EAX,0x1b
TEST ECX,ECX
JZ 0x0001f02f
MOV dword ptr [ESP + 0x8],ESI
XOR EBP,EBP
MOV ESI,EAX
MOV dword ptr [ESP + 0xc],EDI
MOV EDI,ECX
LEA ESI,[ESI]
NOP
SUB ESP,0x4
MOV EAX,dword ptr [ESP + 0xc]
LEA ECX,[EAX + ESI*0x1]
MOV EAX,0x3
PUSH ECX
MOV ECX,EDI
SUB ECX,EBP
CMP ECX,0x3
CMOVG ECX,EAX
ADD ESI,0x4
PUSH ECX
MOV EAX,dword ptr [ESP + 0x10]
LEA ECX,[EAX + EBP*0x1]
ADD EBP,0x3
PUSH ECX
CALL 0x0001c500
ADD ESP,0x10
CMP EDI,EBP
JG 0x0001eff0
MOV EAX,ESI
MOV EDI,dword ptr [ESP + 0xc]
MOV ESI,dword ptr [ESP + 0x8]
SUB ESP,0xc
ADD EAX,ESI
MOV EDX,0xa0d
MOV word ptr [EAX],DX
MOV byte ptr [EAX + 0x2],0x0
MOV EBP,dword ptr [EDI + 0x8]
PUSH ESI
CALL 0x00014440
MOV EDX,dword ptr [EBP]
ADD ESP,0xc
PUSH EAX
PUSH ESI
PUSH EBP
CALL dword ptr [EDX + 0x8]
POP ECX
PUSH dword ptr [ESP + 0x10]
CALL 0x0001d220
MOV dword ptr [ESP],ESI
CALL 0x0001d220
ADD ESP,0x10
MOV EAX,dword ptr [EDI + 0x8]
SUB ESP,0x4
LEA EBX,[EBX + 0xfffcc71d]
XOR ESI,ESI
MOV EDX,dword ptr [EAX]
PUSH 0x2
PUSH EBX
PUSH EAX
CALL dword ptr [EDX + 0x8]
MOV dword ptr [EDI + 0x44],0x1
ADD ESP,0x10
JMP 0x0001edd5
MOV EAX,dword ptr [EDI + 0xc]
SUB ESP,0x4
MOV EDX,dword ptr [EAX]
PUSH dword ptr [EDI + 0x70]
PUSH dword ptr [EDI + 0x6c]
PUSH EAX
CALL dword ptr [EDX + 0x10]
MOV ESI,EAX
ADD ESP,0x10
JMP 0x0001edd5
LEA EAX,[EDI + 0x34]
SUB ESP,0xc
MOV dword ptr [ESP + 0x10],EAX
PUSH EAX
CALL 0x0001c7f0
ADD ESP,0x10
MOV EDX,EAX
TEST EAX,EAX
JLE 0x0001f2a6
SUB ESP,0x8
LEA EAX,[EAX + 0x1]
PUSH 0x1
MOV dword ptr [ESP + 0x14],EDX
PUSH EAX
CALL 0x0001c990
ADD ESP,0xc
MOV EDX,dword ptr [ESP + 0xc]
MOV EBP,EAX
PUSH EDX
MOV dword ptr [ESP + 0x10],EDX
PUSH EAX
PUSH dword ptr [ESP + 0x10]
CALL 0x0001c8e0
MOV EDX,dword ptr [ESP + 0x18]
MOV EAX,EBP
MOV byte ptr [EBP + EDX*0x1],0x0
CALL 0x0001e850
ADD ESP,0x10
TEST EAX,EAX
JS 0x0001f22c
MOV dword ptr [ESP + 0x8],EAX
SUB ESP,0xc
MOV dword ptr [ESP + 0x24],0xffffffff
LEA EAX,[ESP + 0x24]
PUSH EAX
LEA EAX,[ESP + 0x20]
PUSH EAX
LEA EAX,[ESP + 0x28]
PUSH EAX
LEA EAX,[EBX + 0xfffcaad7]
PUSH EAX
PUSH EBP
CALL 0x000144e0
ADD ESP,0x20
CMP EAX,0x1
JLE 0x0001f205
CMP dword ptr [ESP + 0x18],-0x1
MOV EDX,dword ptr [ESP + 0x8]
JZ 0x0001f205
SUB ESP,0x8
PUSH EDX
MOV dword ptr [ESP + 0x14],EDX
PUSH dword ptr [ESP + 0x10]
CALL 0x0001c800
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x18]
CMP byte ptr [EBP + EAX*0x1],0x32
JZ 0x0001f26a
MOV EDX,dword ptr [ESP + 0x8]
MOV byte ptr [EBP + EDX*0x1],0x0
MOV EAX,dword ptr [ESP + 0x18]
CMP EDX,EAX
JLE 0x0001f1bf
MOVZX ECX,byte ptr [EBP + EDX*0x1 + -0x1]
CMP CL,0xa
JZ 0x0001f1a0
CMP CL,0xd
JNZ 0x0001f1bf
LEA ESI,[ESI]
NOP
SUB EDX,0x1
MOV byte ptr [EBP + EDX*0x1],0x0
MOV EAX,dword ptr [ESP + 0x18]
CMP EAX,EDX
JGE 0x0001f1bf
MOVZX ECX,byte ptr [EBP + EDX*0x1 + -0x1]
CMP CL,0xd
JZ 0x0001f1a0
CMP CL,0xa
JZ 0x0001f1a0
SUB ESP,0x8
ADD EAX,EBP
PUSH EAX
LEA EAX,[EBX + 0xfffcaae5]
PUSH EAX
CALL 0x0001d000
MOV ECX,EAX
MOV EAX,dword ptr [EDI + 0xc]
MOV EDX,dword ptr [EAX]
PUSH 0x0
PUSH 0x1f40
PUSH ECX
MOV dword ptr [ESP + 0x20],ECX
PUSH EAX
CALL dword ptr [EDX + 0x4]
MOV ECX,dword ptr [ESP + 0x24]
ADD ESP,0x14
PUSH ECX
CALL 0x0001d220
MOV dword ptr [ESP],EBP
CALL 0x0001d220
ADD ESP,0x10
JMP 0x0001edd5
MOV EAX,dword ptr [EDI + 0xc]
LEA ECX,[EBX + 0xfffca5fc]
MOV EDX,dword ptr [EAX]
PUSH 0x0
PUSH 0x1f40
PUSH ECX
PUSH EAX
CALL dword ptr [EDX + 0x4]
MOV dword ptr [ESP],EBP
CALL 0x0001d220
ADD ESP,0x10
JMP 0x0001edd5
SUB ESP,0xc
PUSH EBP
CALL 0x0001d220
ADD ESP,0x10
JMP 0x0001edd5
SUB ESP,0x8
MOV ESI,0x1
PUSH 0x2
PUSH dword ptr [ESP + 0x10]
CALL 0x0001c800
MOV dword ptr [ESP],EDI
CALL 0x0001ebd0
POP EAX
PUSH dword ptr [ESP + 0x14]
CALL 0x0001d220
ADD ESP,0x10
JMP 0x0001edd5
SUB ESP,0xc
PUSH EBP
CALL 0x0001d220
MOV dword ptr [EDI + 0x44],0x2
ADD ESP,0x10
JMP 0x0001ee3d
CALL 0x0006dad0
LEA EAX,[EBX + 0xfffcac68]
PUSH EAX
PUSH 0x2e5
LEA EAX,[EBX + 0xfffd951e]
PUSH EAX
LEA EAX,[EBX + 0xfffcaacf]
PUSH EAX
CALL 0x00014870
LEA EAX,[EBX + 0xfffcac68]
PUSH EAX
PUSH 0x2af
JMP 0x0001f293
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_0001ed60(int param_1,int param_2)\n\n{\n  char *pcVar1;\n  char cVar2;\n  int *piVar3;\n  int iVar4;\n  undefined4 uVar5;\n  char *pcVar6;\n  size_t sVar7;\n  char *pcVar8;\n  char *pcVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  undefined4 uVar13;\n  int in_GS_OFFSET;\n  uint __line;\n  int local_238;\n  undefined1 local_22c [4];\n  undefined1 local_228 [4];\n  int local_224;\n  undefined1 local_220 [512];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1ed69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar4 = *(int *)(param_1 + 0x44);\n  if (iVar4 == -1) {\n    FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);\n    pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14));\n    piVar3 = *(int **)(param_1 + 8);\n    sVar7 = strlen(pcVar6);\n    (**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);\n    FUN_0001d220(pcVar6);\n    pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);\n    pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);\n    if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);\n    *(undefined4 *)(param_1 + 0x44) = 1;\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 0) {\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 1) {\n    uVar13 = 0;\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 3) {\n    uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70));\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 2) {\n    if (iVar4 == 1) {\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }\n    else if (iVar4 != 2) goto LAB_0001edb6;\n    local_238 = param_1 + 0x34;\n    iVar4 = FUN_0001c7f0(local_238);\n    if (iVar4 < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    uVar5 = FUN_0001c990(iVar4,1);\n    FUN_0001c8e0(local_238,uVar5,iVar4);\n    iVar4 = FUN_0001e850();\n    if (-1 < iVar4) {\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }\n    uVar13 = 1;\n    FUN_0001d220(uVar5);\n  }\n  else {\nLAB_0001edb6:\n    uVar13 = 1;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);\n  }\nLAB_0001edd5:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0006dad0();\n  }\n  return uVar13;\n}\n\n" comment (function_definition "undefined4 FUN_0001ed60(int param_1,int param_2)\n\n{\n  char *pcVar1;\n  char cVar2;\n  int *piVar3;\n  int iVar4;\n  undefined4 uVar5;\n  char *pcVar6;\n  size_t sVar7;\n  char *pcVar8;\n  char *pcVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  undefined4 uVar13;\n  int in_GS_OFFSET;\n  uint __line;\n  int local_238;\n  undefined1 local_22c [4];\n  undefined1 local_228 [4];\n  int local_224;\n  undefined1 local_220 [512];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1ed69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar4 = *(int *)(param_1 + 0x44);\n  if (iVar4 == -1) {\n    FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);\n    pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14));\n    piVar3 = *(int **)(param_1 + 8);\n    sVar7 = strlen(pcVar6);\n    (**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);\n    FUN_0001d220(pcVar6);\n    pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);\n    pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);\n    if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);\n    *(undefined4 *)(param_1 + 0x44) = 1;\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 0) {\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 1) {\n    uVar13 = 0;\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 3) {\n    uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70));\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 2) {\n    if (iVar4 == 1) {\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }\n    else if (iVar4 != 2) goto LAB_0001edb6;\n    local_238 = param_1 + 0x34;\n    iVar4 = FUN_0001c7f0(local_238);\n    if (iVar4 < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    uVar5 = FUN_0001c990(iVar4,1);\n    FUN_0001c8e0(local_238,uVar5,iVar4);\n    iVar4 = FUN_0001e850();\n    if (-1 < iVar4) {\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }\n    uVar13 = 1;\n    FUN_0001d220(uVar5);\n  }\n  else {\nLAB_0001edb6:\n    uVar13 = 1;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);\n  }\nLAB_0001edd5:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0006dad0();\n  }\n  return uVar13;\n}" type_identifier (function_declarator "FUN_0001ed60(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  char *pcVar1;\n  char cVar2;\n  int *piVar3;\n  int iVar4;\n  undefined4 uVar5;\n  char *pcVar6;\n  size_t sVar7;\n  char *pcVar8;\n  char *pcVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  undefined4 uVar13;\n  int in_GS_OFFSET;\n  uint __line;\n  int local_238;\n  undefined1 local_22c [4];\n  undefined1 local_228 [4];\n  int local_224;\n  undefined1 local_220 [512];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1ed69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar4 = *(int *)(param_1 + 0x44);\n  if (iVar4 == -1) {\n    FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);\n    pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14));\n    piVar3 = *(int **)(param_1 + 8);\n    sVar7 = strlen(pcVar6);\n    (**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);\n    FUN_0001d220(pcVar6);\n    pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);\n    pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);\n    if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);\n    *(undefined4 *)(param_1 + 0x44) = 1;\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 0) {\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 1) {\n    uVar13 = 0;\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 3) {\n    uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70));\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 2) {\n    if (iVar4 == 1) {\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }\n    else if (iVar4 != 2) goto LAB_0001edb6;\n    local_238 = param_1 + 0x34;\n    iVar4 = FUN_0001c7f0(local_238);\n    if (iVar4 < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    uVar5 = FUN_0001c990(iVar4,1);\n    FUN_0001c8e0(local_238,uVar5,iVar4);\n    iVar4 = FUN_0001e850();\n    if (-1 < iVar4) {\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }\n    uVar13 = 1;\n    FUN_0001d220(uVar5);\n  }\n  else {\nLAB_0001edb6:\n    uVar13 = 1;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);\n  }\nLAB_0001edd5:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0006dad0();\n  }\n  return uVar13;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "size_t sVar7;" primitive_type identifier ;) (declaration "char *pcVar8;" primitive_type (pointer_declarator "*pcVar8" * identifier) ;) (declaration "char *pcVar9;" primitive_type (pointer_declarator "*pcVar9" * identifier) ;) (declaration "int iVar10;" primitive_type identifier ;) (declaration "int iVar11;" primitive_type identifier ;) (declaration "int iVar12;" primitive_type identifier ;) (declaration "undefined4 uVar13;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint __line;" type_identifier identifier ;) (declaration "int local_238;" primitive_type identifier ;) (declaration "undefined1 local_22c [4];" type_identifier (array_declarator "local_22c [4]" identifier [ number_literal ]) ;) (declaration "undefined1 local_228 [4];" type_identifier (array_declarator "local_228 [4]" identifier [ number_literal ]) ;) (declaration "int local_224;" primitive_type identifier ;) (declaration "undefined1 local_220 [512];" type_identifier (array_declarator "local_220 [512]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1ed69;" (assignment_expression "uStack_14 = 0x1ed69" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = *(int *)(param_1 + 0x44);" (assignment_expression "iVar4 = *(int *)(param_1 + 0x44)" identifier = (pointer_expression "*(int *)(param_1 + 0x44)" * (cast_expression "(int *)(param_1 + 0x44)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) ))))) ;) (if_statement "if (iVar4 == -1) {\n    FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);\n    pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14));\n    piVar3 = *(int **)(param_1 + 8);\n    sVar7 = strlen(pcVar6);\n    (**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);\n    FUN_0001d220(pcVar6);\n    pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);\n    pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);\n    if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);\n    *(undefined4 *)(param_1 + 0x44) = 1;\n    goto LAB_0001edd5;\n  }" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (compound_statement "{\n    FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);\n    pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14));\n    piVar3 = *(int **)(param_1 + 8);\n    sVar7 = strlen(pcVar6);\n    (**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);\n    FUN_0001d220(pcVar6);\n    pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);\n    pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);\n    if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);\n    *(undefined4 *)(param_1 + 0x44) = 1;\n    goto LAB_0001edd5;\n  }" { (expression_statement "FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);" (call_expression "FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x10),local_220,0x200)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) , identifier , number_literal ))) ;) (expression_statement "pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14));" (assignment_expression "pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14))" identifier = (cast_expression "(char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14))" identifier (argument_list "("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14))" ( (string_literal ""CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n"" " string_content escape_sequence escape_sequence string_content escape_sequence escape_sequence ") , identifier , (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) , identifier , (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) ))))) ;) (expression_statement "piVar3 = *(int **)(param_1 + 8);" (assignment_expression "piVar3 = *(int **)(param_1 + 8)" identifier = (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "sVar7 = strlen(pcVar6);" (assignment_expression "sVar7 = strlen(pcVar6)" identifier = (call_expression "strlen(pcVar6)" identifier (argument_list "(pcVar6)" ( identifier )))) ;) (expression_statement "(**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);" (call_expression "(**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7)" (parenthesized_expression "(**(code **)(*piVar3 + 8))" ( (pointer_expression "**(code **)(*piVar3 + 8)" * (pointer_expression "*(code **)(*piVar3 + 8)" * (cast_expression "(code **)(*piVar3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 8)" ( (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "(piVar3,pcVar6,sVar7)" ( identifier , identifier , identifier ))) ;) (expression_statement "FUN_0001d220(pcVar6);" (call_expression "FUN_0001d220(pcVar6)" identifier (argument_list "(pcVar6)" ( identifier ))) ;) (expression_statement "pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);" (assignment_expression "pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10)" identifier = (cast_expression "(char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x74),0x10)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x74)" * (cast_expression "(undefined4 *)(param_1 + 0x74)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x74)" ( (binary_expression "param_1 + 0x74" identifier + number_literal) )))) , number_literal ))))) ;) (expression_statement "pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);" (assignment_expression "pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11)" identifier = (cast_expression "(char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x74),0x11)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x74)" * (cast_expression "(undefined4 *)(param_1 + 0x74)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x74)" ( (binary_expression "param_1 + 0x74" identifier + number_literal) )))) , number_literal ))))) ;) (if_statement "if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }" if (parenthesized_expression "((*pcVar6 != '\0') || (*pcVar8 != '\0'))" ( (binary_expression "(*pcVar6 != '\0') || (*pcVar8 != '\0')" (parenthesized_expression "(*pcVar6 != '\0')" ( (binary_expression "*pcVar6 != '\0'" (pointer_expression "*pcVar6" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(*pcVar8 != '\0')" ( (binary_expression "*pcVar8 != '\0'" (pointer_expression "*pcVar8" * identifier) != (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }" { (expression_statement "pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);" (assignment_expression "pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8)" identifier = (cast_expression "(char *)FUN_0001d000("%s:%s",pcVar6,pcVar8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001d000("%s:%s",pcVar6,pcVar8)" identifier (argument_list "("%s:%s",pcVar6,pcVar8)" ( (string_literal ""%s:%s"" " string_content ") , identifier , identifier ))))) ;) (expression_statement "sVar7 = strlen(pcVar6);" (assignment_expression "sVar7 = strlen(pcVar6)" identifier = (call_expression "strlen(pcVar6)" identifier (argument_list "(pcVar6)" ( identifier )))) ;) (expression_statement "pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);" (assignment_expression "pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1)" identifier = (cast_expression "(char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c990((sVar7 * 4) / 3 + 100,1)" identifier (argument_list "((sVar7 * 4) / 3 + 100,1)" ( (binary_expression "(sVar7 * 4) / 3 + 100" (binary_expression "(sVar7 * 4) / 3" (parenthesized_expression "(sVar7 * 4)" ( (binary_expression "sVar7 * 4" identifier * number_literal) )) / number_literal) + number_literal) , number_literal ))))) ;) (expression_statement "builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);" (call_expression "builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c)" identifier (argument_list "(pcVar8,"Proxy-Authorization: Basic ",0x1c)" ( identifier , (string_literal ""Proxy-Authorization: Basic "" " string_content ") , number_literal ))) ;) (expression_statement "iVar4 = 0x1b;" (assignment_expression "iVar4 = 0x1b" identifier = number_literal) ;) (if_statement "if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }" if (parenthesized_expression "(sVar7 != 0)" ( (binary_expression "sVar7 != 0" identifier != number_literal) )) (compound_statement "{\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }" { (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (expression_statement "iVar4 = 0x1b;" (assignment_expression "iVar4 = 0x1b" identifier = number_literal) ;) (do_statement "do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);" do (compound_statement "{\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        }" { (expression_statement "pcVar9 = pcVar8 + iVar4;" (assignment_expression "pcVar9 = pcVar8 + iVar4" identifier = (binary_expression "pcVar8 + iVar4" identifier + identifier)) ;) (expression_statement "iVar11 = sVar7 - iVar10;" (assignment_expression "iVar11 = sVar7 - iVar10" identifier = (binary_expression "sVar7 - iVar10" identifier - identifier)) ;) (if_statement "if (3 < iVar11) {\n            iVar11 = 3;\n          }" if (parenthesized_expression "(3 < iVar11)" ( (binary_expression "3 < iVar11" number_literal < identifier) )) (compound_statement "{\n            iVar11 = 3;\n          }" { (expression_statement "iVar11 = 3;" (assignment_expression "iVar11 = 3" identifier = number_literal) ;) })) (expression_statement "iVar4 = iVar4 + 4;" (assignment_expression "iVar4 = iVar4 + 4" identifier = (binary_expression "iVar4 + 4" identifier + number_literal)) ;) (expression_statement "pcVar1 = pcVar6 + iVar10;" (assignment_expression "pcVar1 = pcVar6 + iVar10" identifier = (binary_expression "pcVar6 + iVar10" identifier + identifier)) ;) (expression_statement "iVar10 = iVar10 + 3;" (assignment_expression "iVar10 = iVar10 + 3" identifier = (binary_expression "iVar10 + 3" identifier + number_literal)) ;) (expression_statement "FUN_0001c500(pcVar1,iVar11,pcVar9);" (call_expression "FUN_0001c500(pcVar1,iVar11,pcVar9)" identifier (argument_list "(pcVar1,iVar11,pcVar9)" ( identifier , identifier , identifier ))) ;) }) while (parenthesized_expression "(iVar10 < (int)sVar7)" ( (binary_expression "iVar10 < (int)sVar7" identifier < (cast_expression "(int)sVar7" ( (type_descriptor "int" primitive_type) ) identifier)) )) ;) })) (expression_statement "pcVar9 = pcVar8 + iVar4;" (assignment_expression "pcVar9 = pcVar8 + iVar4" identifier = (binary_expression "pcVar8 + iVar4" identifier + identifier)) ;) (expression_statement "pcVar9[0] = '\r';" (assignment_expression "pcVar9[0] = '\r'" (subscript_expression "pcVar9[0]" identifier [ number_literal ]) = (char_literal "'\r'" ' escape_sequence ')) ;) (expression_statement "pcVar9[1] = '\n';" (assignment_expression "pcVar9[1] = '\n'" (subscript_expression "pcVar9[1]" identifier [ number_literal ]) = (char_literal "'\n'" ' escape_sequence ')) ;) (expression_statement "pcVar9[2] = '\0';" (assignment_expression "pcVar9[2] = '\0'" (subscript_expression "pcVar9[2]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "piVar3 = *(int **)(param_1 + 8);" (assignment_expression "piVar3 = *(int **)(param_1 + 8)" identifier = (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "sVar7 = strlen(pcVar8);" (assignment_expression "sVar7 = strlen(pcVar8)" identifier = (call_expression "strlen(pcVar8)" identifier (argument_list "(pcVar8)" ( identifier )))) ;) (expression_statement "(**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);" (call_expression "(**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7)" (parenthesized_expression "(**(code **)(*piVar3 + 8))" ( (pointer_expression "**(code **)(*piVar3 + 8)" * (pointer_expression "*(code **)(*piVar3 + 8)" * (cast_expression "(code **)(*piVar3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 8)" ( (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "(piVar3,pcVar8,sVar7)" ( identifier , identifier , identifier ))) ;) (expression_statement "FUN_0001d220(pcVar6);" (call_expression "FUN_0001d220(pcVar6)" identifier (argument_list "(pcVar6)" ( identifier ))) ;) (expression_statement "FUN_0001d220(pcVar8);" (call_expression "FUN_0001d220(pcVar8)" identifier (argument_list "(pcVar8)" ( identifier ))) ;) })) (expression_statement "uVar13 = 0;" (assignment_expression "uVar13 = 0" identifier = number_literal) ;) (expression_statement "(**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);" (call_expression "(**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2)" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 8) + 8))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 8) + 8)" * (pointer_expression "*(code **)(**(int **)(param_1 + 8) + 8)" * (cast_expression "(code **)(**(int **)(param_1 + 8) + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 8) + 8)" ( (binary_expression "**(int **)(param_1 + 8) + 8" (pointer_expression "**(int **)(param_1 + 8)" * (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 8),&DAT_0007148d,2)" ( (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) , (pointer_expression "&DAT_0007148d" & identifier) , number_literal ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x44) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x44) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x44)" * (cast_expression "(undefined4 *)(param_1 + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) = number_literal) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (if_statement "if (param_2 == 0) {\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));\n    goto LAB_0001edd5;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));\n    goto LAB_0001edd5;\n  }" { (expression_statement "uVar13 = 0;" (assignment_expression "uVar13 = 0" identifier = number_literal) ;) (expression_statement "(**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));" (call_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58))" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 0xc) + 4)" * (pointer_expression "*(code **)(**(int **)(param_1 + 0xc) + 4)" * (cast_expression "(code **)(**(int **)(param_1 + 0xc) + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 0xc) + 4)" ( (binary_expression "**(int **)(param_1 + 0xc) + 4" (pointer_expression "**(int **)(param_1 + 0xc)" * (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58))" ( (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 0x50)" * (cast_expression "(undefined4 *)(param_1 + 0x50)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 0x54)" * (cast_expression "(undefined4 *)(param_1 + 0x54)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x54)" ( (binary_expression "param_1 + 0x54" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 0x58)" * (cast_expression "(undefined4 *)(param_1 + 0x58)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x58)" ( (binary_expression "param_1 + 0x58" identifier + number_literal) )))) ))) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (if_statement "if (param_2 == 1) {\n    uVar13 = 0;\n    goto LAB_0001edd5;\n  }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n    uVar13 = 0;\n    goto LAB_0001edd5;\n  }" { (expression_statement "uVar13 = 0;" (assignment_expression "uVar13 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (if_statement "if (param_2 == 3) {\n    uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70));\n    goto LAB_0001edd5;\n  }" if (parenthesized_expression "(param_2 == 3)" ( (binary_expression "param_2 == 3" identifier == number_literal) )) (compound_statement "{\n    uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70));\n    goto LAB_0001edd5;\n  }" { (expression_statement "uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70));" (assignment_expression "uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70))" identifier = (call_expression "(**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70))" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0xc) + 0x10))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 0xc) + 0x10)" * (pointer_expression "*(code **)(**(int **)(param_1 + 0xc) + 0x10)" * (cast_expression "(code **)(**(int **)(param_1 + 0xc) + 0x10)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 0xc) + 0x10)" ( (binary_expression "**(int **)(param_1 + 0xc) + 0x10" (pointer_expression "**(int **)(param_1 + 0xc)" * (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70))" ( (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 0x6c)" * (cast_expression "(undefined4 *)(param_1 + 0x6c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x6c)" ( (binary_expression "param_1 + 0x6c" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 0x70)" * (cast_expression "(undefined4 *)(param_1 + 0x70)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x70)" ( (binary_expression "param_1 + 0x70" identifier + number_literal) )))) )))) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (if_statement "if (param_2 == 2) {\n    if (iVar4 == 1) {\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }\n    else if (iVar4 != 2) goto LAB_0001edb6;\n    local_238 = param_1 + 0x34;\n    iVar4 = FUN_0001c7f0(local_238);\n    if (iVar4 < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    uVar5 = FUN_0001c990(iVar4,1);\n    FUN_0001c8e0(local_238,uVar5,iVar4);\n    iVar4 = FUN_0001e850();\n    if (-1 < iVar4) {\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }\n    uVar13 = 1;\n    FUN_0001d220(uVar5);\n  }\n  else {\nLAB_0001edb6:\n    uVar13 = 1;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);\n  }" if (parenthesized_expression "(param_2 == 2)" ( (binary_expression "param_2 == 2" identifier == number_literal) )) (compound_statement "{\n    if (iVar4 == 1) {\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }\n    else if (iVar4 != 2) goto LAB_0001edb6;\n    local_238 = param_1 + 0x34;\n    iVar4 = FUN_0001c7f0(local_238);\n    if (iVar4 < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    uVar5 = FUN_0001c990(iVar4,1);\n    FUN_0001c8e0(local_238,uVar5,iVar4);\n    iVar4 = FUN_0001e850();\n    if (-1 < iVar4) {\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }\n    uVar13 = 1;\n    FUN_0001d220(uVar5);\n  }" { (if_statement "if (iVar4 == 1) {\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }\n    else if (iVar4 != 2) goto LAB_0001edb6;" if (parenthesized_expression "(iVar4 == 1)" ( (binary_expression "iVar4 == 1" identifier == number_literal) )) (compound_statement "{\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }" { (expression_statement "iVar4 = param_1 + 0x34;" (assignment_expression "iVar4 = param_1 + 0x34" identifier = (binary_expression "param_1 + 0x34" identifier + number_literal)) ;) (expression_statement "iVar10 = FUN_0001c7f0(iVar4);" (assignment_expression "iVar10 = FUN_0001c7f0(iVar4)" identifier = (call_expression "FUN_0001c7f0(iVar4)" identifier (argument_list "(iVar4)" ( identifier )))) ;) (if_statement "if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }" if (parenthesized_expression "(iVar10 < 1)" ( (binary_expression "iVar10 < 1" identifier < number_literal) )) (compound_statement "{\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }" { (expression_statement "__line = 0x2af;" (assignment_expression "__line = 0x2af" identifier = number_literal) ;) (goto_statement "goto LAB_0001f293;" goto statement_identifier ;) })) (expression_statement "iVar11 = FUN_0001c990(iVar10 + 1,1);" (assignment_expression "iVar11 = FUN_0001c990(iVar10 + 1,1)" identifier = (call_expression "FUN_0001c990(iVar10 + 1,1)" identifier (argument_list "(iVar10 + 1,1)" ( (binary_expression "iVar10 + 1" identifier + number_literal) , number_literal )))) ;) (expression_statement "FUN_0001c8e0(iVar4,iVar11,iVar10);" (call_expression "FUN_0001c8e0(iVar4,iVar11,iVar10)" identifier (argument_list "(iVar4,iVar11,iVar10)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(undefined1 *)(iVar11 + iVar10) = 0;" (assignment_expression "*(undefined1 *)(iVar11 + iVar10) = 0" (pointer_expression "*(undefined1 *)(iVar11 + iVar10)" * (cast_expression "(undefined1 *)(iVar11 + iVar10)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar11 + iVar10)" ( (binary_expression "iVar11 + iVar10" identifier + identifier) )))) = number_literal) ;) (expression_statement "iVar10 = FUN_0001e850();" (assignment_expression "iVar10 = FUN_0001e850()" identifier = (call_expression "FUN_0001e850()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar13 = 1;" (assignment_expression "uVar13 = 1" identifier = number_literal) ;) (if_statement "if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }" if (parenthesized_expression "(iVar10 < 0)" ( (binary_expression "iVar10 < 0" identifier < number_literal) )) (compound_statement "{\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }" { (expression_statement "FUN_0001d220(iVar11);" (call_expression "FUN_0001d220(iVar11)" identifier (argument_list "(iVar11)" ( identifier ))) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (expression_statement "local_224 = -1;" (assignment_expression "local_224 = -1" identifier = number_literal) ;) (expression_statement "iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);" (assignment_expression "iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224)" identifier = (call_expression "__isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224)" identifier (argument_list "(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224)" ( identifier , (string_literal ""HTTP/%i.%i %n"" " string_content ") , identifier , identifier , (pointer_expression "&local_224" & identifier) )))) ;) (if_statement "if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }" if (parenthesized_expression "((iVar12 < 2) || (local_224 == -1))" ( (binary_expression "(iVar12 < 2) || (local_224 == -1)" (parenthesized_expression "(iVar12 < 2)" ( (binary_expression "iVar12 < 2" identifier < number_literal) )) || (parenthesized_expression "(local_224 == -1)" ( (binary_expression "local_224 == -1" identifier == number_literal) ))) )) (compound_statement "{\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }" { (expression_statement "(**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);" (call_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0)" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 0xc) + 4)" * (pointer_expression "*(code **)(**(int **)(param_1 + 0xc) + 4)" * (cast_expression "(code **)(**(int **)(param_1 + 0xc) + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 0xc) + 4)" ( (binary_expression "**(int **)(param_1 + 0xc) + 4" (pointer_expression "**(int **)(param_1 + 0xc)" * (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0)" ( (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , (string_literal ""Proxy error: HTTP response was absent"" " string_content ") , number_literal , number_literal ))) ;) (expression_statement "FUN_0001d220(iVar11);" (call_expression "FUN_0001d220(iVar11)" identifier (argument_list "(iVar11)" ( identifier ))) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (expression_statement "FUN_0001c800(iVar4,iVar10);" (call_expression "FUN_0001c800(iVar4,iVar10)" identifier (argument_list "(iVar4,iVar10)" ( identifier , identifier ))) ;) (if_statement "if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }" if (parenthesized_expression "(*(char *)(iVar11 + local_224) != '2')" ( (binary_expression "*(char *)(iVar11 + local_224) != '2'" (pointer_expression "*(char *)(iVar11 + local_224)" * (cast_expression "(char *)(iVar11 + local_224)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar11 + local_224)" ( (binary_expression "iVar11 + local_224" identifier + identifier) )))) != (char_literal "'2'" ' character ')) )) (compound_statement "{\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }" { (expression_statement "*(undefined1 *)(iVar11 + iVar10) = 0;" (assignment_expression "*(undefined1 *)(iVar11 + iVar10) = 0" (pointer_expression "*(undefined1 *)(iVar11 + iVar10)" * (cast_expression "(undefined1 *)(iVar11 + iVar10)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar11 + iVar10)" ( (binary_expression "iVar11 + iVar10" identifier + identifier) )))) = number_literal) ;) (if_statement "if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }" if (parenthesized_expression "((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r'))))" ( (binary_expression "(local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))" (parenthesized_expression "(local_224 < iVar10)" ( (binary_expression "local_224 < iVar10" identifier < identifier) )) && (parenthesized_expression "((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))" ( (parenthesized_expression "(cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r'))" ( (comma_expression "cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')" (assignment_expression "cVar2 = *(char *)(iVar11 + -1 + iVar10)" identifier = (pointer_expression "*(char *)(iVar11 + -1 + iVar10)" * (cast_expression "(char *)(iVar11 + -1 + iVar10)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar11 + -1 + iVar10)" ( (binary_expression "iVar11 + -1 + iVar10" (binary_expression "iVar11 + -1" identifier + number_literal) + identifier) ))))) , (binary_expression "cVar2 == '\n' || (cVar2 == '\r')" (binary_expression "cVar2 == '\n'" identifier == (char_literal "'\n'" ' escape_sequence ')) || (parenthesized_expression "(cVar2 == '\r')" ( (binary_expression "cVar2 == '\r'" identifier == (char_literal "'\r'" ' escape_sequence ')) )))) )) ))) )) (compound_statement "{\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }" { (do_statement "do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));" do (compound_statement "{\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          }" { (expression_statement "iVar10 = iVar10 + -1;" (assignment_expression "iVar10 = iVar10 + -1" identifier = (binary_expression "iVar10 + -1" identifier + number_literal)) ;) (expression_statement "*(undefined1 *)(iVar11 + iVar10) = 0;" (assignment_expression "*(undefined1 *)(iVar11 + iVar10) = 0" (pointer_expression "*(undefined1 *)(iVar11 + iVar10)" * (cast_expression "(undefined1 *)(iVar11 + iVar10)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar11 + iVar10)" ( (binary_expression "iVar11 + iVar10" identifier + identifier) )))) = number_literal) ;) (if_statement "if (iVar10 <= local_224) break;" if (parenthesized_expression "(iVar10 <= local_224)" ( (binary_expression "iVar10 <= local_224" identifier <= identifier) )) (break_statement "break;" break ;)) (expression_statement "cVar2 = *(char *)(iVar11 + -1 + iVar10);" (assignment_expression "cVar2 = *(char *)(iVar11 + -1 + iVar10)" identifier = (pointer_expression "*(char *)(iVar11 + -1 + iVar10)" * (cast_expression "(char *)(iVar11 + -1 + iVar10)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar11 + -1 + iVar10)" ( (binary_expression "iVar11 + -1 + iVar10" (binary_expression "iVar11 + -1" identifier + number_literal) + identifier) ))))) ;) }) while (parenthesized_expression "((cVar2 == '\r') || (cVar2 == '\n'))" ( (binary_expression "(cVar2 == '\r') || (cVar2 == '\n')" (parenthesized_expression "(cVar2 == '\r')" ( (binary_expression "cVar2 == '\r'" identifier == (char_literal "'\r'" ' escape_sequence ')) )) || (parenthesized_expression "(cVar2 == '\n')" ( (binary_expression "cVar2 == '\n'" identifier == (char_literal "'\n'" ' escape_sequence ')) ))) )) ;) })) (expression_statement "uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);" (assignment_expression "uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11)" identifier = (call_expression "FUN_0001d000("Proxy error: %s",local_224 + iVar11)" identifier (argument_list "("Proxy error: %s",local_224 + iVar11)" ( (string_literal ""Proxy error: %s"" " string_content ") , (binary_expression "local_224 + iVar11" identifier + identifier) )))) ;) (expression_statement "(**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);" (call_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0)" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 0xc) + 4)" * (pointer_expression "*(code **)(**(int **)(param_1 + 0xc) + 4)" * (cast_expression "(code **)(**(int **)(param_1 + 0xc) + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 0xc) + 4)" ( (binary_expression "**(int **)(param_1 + 0xc) + 4" (pointer_expression "**(int **)(param_1 + 0xc)" * (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 0xc),uVar5,8000,0)" ( (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , identifier , number_literal , number_literal ))) ;) (expression_statement "FUN_0001d220(uVar5);" (call_expression "FUN_0001d220(uVar5)" identifier (argument_list "(uVar5)" ( identifier ))) ;) (expression_statement "FUN_0001d220(iVar11);" (call_expression "FUN_0001d220(iVar11)" identifier (argument_list "(iVar11)" ( identifier ))) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (expression_statement "FUN_0001d220(iVar11);" (call_expression "FUN_0001d220(iVar11)" identifier (argument_list "(iVar11)" ( identifier ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x44) = 2;" (assignment_expression "*(undefined4 *)(param_1 + 0x44) = 2" (pointer_expression "*(undefined4 *)(param_1 + 0x44)" * (cast_expression "(undefined4 *)(param_1 + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else if (iVar4 != 2) goto LAB_0001edb6;" else (if_statement "if (iVar4 != 2) goto LAB_0001edb6;" if (parenthesized_expression "(iVar4 != 2)" ( (binary_expression "iVar4 != 2" identifier != number_literal) )) (goto_statement "goto LAB_0001edb6;" goto statement_identifier ;)))) (expression_statement "local_238 = param_1 + 0x34;" (assignment_expression "local_238 = param_1 + 0x34" identifier = (binary_expression "param_1 + 0x34" identifier + number_literal)) ;) (expression_statement "iVar4 = FUN_0001c7f0(local_238);" (assignment_expression "iVar4 = FUN_0001c7f0(local_238)" identifier = (call_expression "FUN_0001c7f0(local_238)" identifier (argument_list "(local_238)" ( identifier )))) ;) (if_statement "if (iVar4 < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }" if (parenthesized_expression "(iVar4 < 1)" ( (binary_expression "iVar4 < 1" identifier < number_literal) )) (compound_statement "{\n      __line = 0x2e5;\nLAB_0001f293:\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }" { (expression_statement "__line = 0x2e5;" (assignment_expression "__line = 0x2e5" identifier = number_literal) ;) (labeled_statement "LAB_0001f293:\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");" statement_identifier : comment (expression_statement "__assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");" (call_expression "__assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate")" identifier (argument_list "("len > 0","proxy.c",__line,"proxy_http_negotiate")" ( (string_literal ""len > 0"" " string_content ") , (string_literal ""proxy.c"" " string_content ") , identifier , (string_literal ""proxy_http_negotiate"" " string_content ") ))) ;)) })) (expression_statement "uVar5 = FUN_0001c990(iVar4,1);" (assignment_expression "uVar5 = FUN_0001c990(iVar4,1)" identifier = (call_expression "FUN_0001c990(iVar4,1)" identifier (argument_list "(iVar4,1)" ( identifier , number_literal )))) ;) (expression_statement "FUN_0001c8e0(local_238,uVar5,iVar4);" (call_expression "FUN_0001c8e0(local_238,uVar5,iVar4)" identifier (argument_list "(local_238,uVar5,iVar4)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar4 = FUN_0001e850();" (assignment_expression "iVar4 = FUN_0001e850()" identifier = (call_expression "FUN_0001e850()" identifier (argument_list "()" ( )))) ;) (if_statement "if (-1 < iVar4) {\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }" if (parenthesized_expression "(-1 < iVar4)" ( (binary_expression "-1 < iVar4" number_literal < identifier) )) (compound_statement "{\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }" { (while_statement "while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }" while (parenthesized_expression "(2 < iVar4)" ( (binary_expression "2 < iVar4" number_literal < identifier) )) (compound_statement "{\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }" { (expression_statement "FUN_0001c800(local_238,iVar4);" (call_expression "FUN_0001c800(local_238,iVar4)" identifier (argument_list "(local_238,iVar4)" ( identifier , identifier ))) ;) (expression_statement "iVar4 = FUN_0001e850();" (assignment_expression "iVar4 = FUN_0001e850()" identifier = (call_expression "FUN_0001e850()" identifier (argument_list "()" ( )))) ;) })) (if_statement "if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }" if (parenthesized_expression "(iVar4 == 2)" ( (binary_expression "iVar4 == 2" identifier == number_literal) )) (compound_statement "{\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }" { (expression_statement "uVar13 = 1;" (assignment_expression "uVar13 = 1" identifier = number_literal) ;) (expression_statement "FUN_0001c800(local_238,2);" (call_expression "FUN_0001c800(local_238,2)" identifier (argument_list "(local_238,2)" ( identifier , number_literal ))) ;) (expression_statement "FUN_0001ebd0(param_1);" (call_expression "FUN_0001ebd0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "FUN_0001d220(uVar5);" (call_expression "FUN_0001d220(uVar5)" identifier (argument_list "(uVar5)" ( identifier ))) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) })) (expression_statement "uVar13 = 1;" (assignment_expression "uVar13 = 1" identifier = number_literal) ;) (expression_statement "FUN_0001d220(uVar5);" (call_expression "FUN_0001d220(uVar5)" identifier (argument_list "(uVar5)" ( identifier ))) ;) }) (else_clause "else {\nLAB_0001edb6:\n    uVar13 = 1;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);\n  }" else (compound_statement "{\nLAB_0001edb6:\n    uVar13 = 1;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);\n  }" { (labeled_statement "LAB_0001edb6:\n    uVar13 = 1;" statement_identifier : (expression_statement "uVar13 = 1;" (assignment_expression "uVar13 = 1" identifier = number_literal) ;)) (expression_statement "(**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);" (call_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0)" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 0xc) + 4)" * (pointer_expression "*(code **)(**(int **)(param_1 + 0xc) + 4)" * (cast_expression "(code **)(**(int **)(param_1 + 0xc) + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 0xc) + 4)" ( (binary_expression "**(int **)(param_1 + 0xc) + 4" (pointer_expression "**(int **)(param_1 + 0xc)" * (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0)" ( (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , (string_literal ""Proxy error: unexpected proxy error"" " string_content ") , number_literal , number_literal ))) ;) }))) (labeled_statement "LAB_0001edd5:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0006dad0();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0006dad0();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_0006dad0();\n  }" { comment (expression_statement "FUN_0006dad0();" (call_expression "FUN_0006dad0()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return uVar13;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nint proxy_http_negotiate(Proxy_Socket p,int change)\n\n{\n  bufchain *ch;\n  uchar *data;\n  int iVar1;\n  Socket ppsVar2;\n  int iVar3;\n  size_t n;\n  char *pcVar4;\n  size_t sVar5;\n  char *pcVar6;\n  int iVar7;\n  int iVar8;\n  char *pcVar9;\n  int iVar10;\n  int in_GS_OFFSET;\n  uint __line;\n  bufchain *local_238;\n  int min_ver;\n  int maj_ver;\n  int status;\n  char dest [512];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar10 = p->state;\n  if (iVar10 == -1) {\n    sk_getaddr(p->remote_addr,dest,0x200);\n    pcVar9 = dupprintf("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",dest,p->remote_port,dest,\n                       p->remote_port);\n    ppsVar2 = p->sub_socket;\n    sVar5 = strlen(pcVar9);\n    (*(*ppsVar2)->write)(ppsVar2,pcVar9,sVar5);\n    safefree(pcVar9);\n    pcVar9 = conf_get_str(p->conf,0x10);\n    pcVar4 = conf_get_str(p->conf,0x11);\n    if ((*pcVar9 != '\0') || (*pcVar4 != '\0')) {\n      pcVar9 = dupprintf("%s:%s",pcVar9,pcVar4);\n      sVar5 = strlen(pcVar9);\n      pcVar4 = (char *)safemalloc((sVar5 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar4,"Proxy-Authorization: Basic ",0x1c);\n      iVar10 = 0x1b;\n      if (sVar5 != 0) {\n        iVar7 = 0;\n        iVar10 = 0x1b;\n        do {\n          pcVar6 = pcVar4 + iVar10;\n          iVar8 = sVar5 - iVar7;\n          if (3 < iVar8) {\n            iVar8 = 3;\n          }\n          iVar10 = iVar10 + 4;\n          data = (uchar *)(pcVar9 + iVar7);\n          iVar7 = iVar7 + 3;\n          base64_encode_atom(data,iVar8,pcVar6);\n        } while (iVar7 < (int)sVar5);\n      }\n      pcVar6 = pcVar4 + iVar10;\n      pcVar6[0] = '\r';\n      pcVar6[1] = '\n';\n      pcVar6[2] = '\0';\n      ppsVar2 = p->sub_socket;\n      sVar5 = strlen(pcVar4);\n      (*(*ppsVar2)->write)(ppsVar2,pcVar4,sVar5);\n      safefree(pcVar9);\n      safefree(pcVar4);\n    }\n    iVar10 = 0;\n    (*(*p->sub_socket)->write)(p->sub_socket,"\r\n",2);\n    p->state = 1;\n    goto LAB_0001edd5;\n  }\n  if (change == 0) {\n    iVar10 = 0;\n    (*(*p->plug)->closing)\n              (p->plug,p->closing_error_msg,p->closing_error_code,p->closing_calling_back);\n    goto LAB_0001edd5;\n  }\n  if (change == 1) {\n    iVar10 = 0;\n    goto LAB_0001edd5;\n  }\n  if (change == 3) {\n    iVar10 = (*(*p->plug)->accepting)\n                       (p->plug,p->accepting_constructor,(accept_ctx_t)(p->accepting_ctx).p);\n    goto LAB_0001edd5;\n  }\n  if (change == 2) {\n    if (iVar10 == 1) {\n      ch = &p->pending_input_data;\n      iVar10 = bufchain_size(ch);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      pcVar9 = (char *)safemalloc(iVar10 + 1,1);\n      bufchain_fetch(ch,pcVar9,iVar10);\n      pcVar9[iVar10] = '\0';\n      iVar7 = get_line_end(pcVar9,iVar10);\n      iVar10 = 1;\n      if (iVar7 < 0) {\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      status = -1;\n      iVar8 = __isoc99_sscanf(pcVar9,"HTTP/%i.%i %n",&maj_ver,&min_ver,&status);\n      if ((iVar8 < 2) || (status == -1)) {\n        (*(*p->plug)->closing)(p->plug,"Proxy error: HTTP response was absent",8000,0);\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      bufchain_consume(ch,iVar7);\n      if (pcVar9[status] != '2') {\n        pcVar9[iVar7] = '\0';\n        if ((status < iVar7) && ((pcVar9[iVar7 + -1] == '\n' || (pcVar9[iVar7 + -1] == '\r')))) {\n          do {\n            iVar8 = iVar7 + -1;\n            pcVar9[iVar8] = '\0';\n            if (iVar8 <= status) break;\n            iVar3 = iVar7 + -2;\n            iVar7 = iVar8;\n          } while ((pcVar9[iVar3] == '\r') || (pcVar9[iVar3] == '\n'));\n        }\n        pcVar4 = dupprintf("Proxy error: %s",pcVar9 + status);\n        (*(*p->plug)->closing)(p->plug,pcVar4,8000,0);\n        safefree(pcVar4);\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      safefree(pcVar9);\n      p->state = 2;\n    }\n    else if (iVar10 != 2) goto LAB_0001edb6;\n    local_238 = &p->pending_input_data;\n    n = bufchain_size(local_238);\n    if ((int)n < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    pcVar4 = (char *)safemalloc(n,1);\n    bufchain_fetch(local_238,pcVar4,n);\n    iVar10 = get_line_end(pcVar4,n);\n    pcVar9 = pcVar4;\n    if (-1 < iVar10) {\n      while (2 < iVar10) {\n        pcVar9 = pcVar9 + iVar10;\n        n = n - iVar10;\n        bufchain_consume(local_238,iVar10);\n        iVar10 = get_line_end(pcVar9,n);\n      }\n      if (iVar10 == 2) {\n        iVar10 = 1;\n        bufchain_consume(local_238,2);\n        proxy_activate(p);\n        safefree(pcVar4);\n        goto LAB_0001edd5;\n      }\n    }\n    iVar10 = 1;\n    safefree(pcVar4);\n  }\n  else {\nLAB_0001edb6:\n    iVar10 = 1;\n    (*(*p->plug)->closing)(p->plug,"Proxy error: unexpected proxy error",0x1f41,0);\n  }\nLAB_0001edd5:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar10;\n}\n\n" comment comment comment (function_definition "int proxy_http_negotiate(Proxy_Socket p,int change)\n\n{\n  bufchain *ch;\n  uchar *data;\n  int iVar1;\n  Socket ppsVar2;\n  int iVar3;\n  size_t n;\n  char *pcVar4;\n  size_t sVar5;\n  char *pcVar6;\n  int iVar7;\n  int iVar8;\n  char *pcVar9;\n  int iVar10;\n  int in_GS_OFFSET;\n  uint __line;\n  bufchain *local_238;\n  int min_ver;\n  int maj_ver;\n  int status;\n  char dest [512];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar10 = p->state;\n  if (iVar10 == -1) {\n    sk_getaddr(p->remote_addr,dest,0x200);\n    pcVar9 = dupprintf("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",dest,p->remote_port,dest,\n                       p->remote_port);\n    ppsVar2 = p->sub_socket;\n    sVar5 = strlen(pcVar9);\n    (*(*ppsVar2)->write)(ppsVar2,pcVar9,sVar5);\n    safefree(pcVar9);\n    pcVar9 = conf_get_str(p->conf,0x10);\n    pcVar4 = conf_get_str(p->conf,0x11);\n    if ((*pcVar9 != '\0') || (*pcVar4 != '\0')) {\n      pcVar9 = dupprintf("%s:%s",pcVar9,pcVar4);\n      sVar5 = strlen(pcVar9);\n      pcVar4 = (char *)safemalloc((sVar5 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar4,"Proxy-Authorization: Basic ",0x1c);\n      iVar10 = 0x1b;\n      if (sVar5 != 0) {\n        iVar7 = 0;\n        iVar10 = 0x1b;\n        do {\n          pcVar6 = pcVar4 + iVar10;\n          iVar8 = sVar5 - iVar7;\n          if (3 < iVar8) {\n            iVar8 = 3;\n          }\n          iVar10 = iVar10 + 4;\n          data = (uchar *)(pcVar9 + iVar7);\n          iVar7 = iVar7 + 3;\n          base64_encode_atom(data,iVar8,pcVar6);\n        } while (iVar7 < (int)sVar5);\n      }\n      pcVar6 = pcVar4 + iVar10;\n      pcVar6[0] = '\r';\n      pcVar6[1] = '\n';\n      pcVar6[2] = '\0';\n      ppsVar2 = p->sub_socket;\n      sVar5 = strlen(pcVar4);\n      (*(*ppsVar2)->write)(ppsVar2,pcVar4,sVar5);\n      safefree(pcVar9);\n      safefree(pcVar4);\n    }\n    iVar10 = 0;\n    (*(*p->sub_socket)->write)(p->sub_socket,"\r\n",2);\n    p->state = 1;\n    goto LAB_0001edd5;\n  }\n  if (change == 0) {\n    iVar10 = 0;\n    (*(*p->plug)->closing)\n              (p->plug,p->closing_error_msg,p->closing_error_code,p->closing_calling_back);\n    goto LAB_0001edd5;\n  }\n  if (change == 1) {\n    iVar10 = 0;\n    goto LAB_0001edd5;\n  }\n  if (change == 3) {\n    iVar10 = (*(*p->plug)->accepting)\n                       (p->plug,p->accepting_constructor,(accept_ctx_t)(p->accepting_ctx).p);\n    goto LAB_0001edd5;\n  }\n  if (change == 2) {\n    if (iVar10 == 1) {\n      ch = &p->pending_input_data;\n      iVar10 = bufchain_size(ch);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      pcVar9 = (char *)safemalloc(iVar10 + 1,1);\n      bufchain_fetch(ch,pcVar9,iVar10);\n      pcVar9[iVar10] = '\0';\n      iVar7 = get_line_end(pcVar9,iVar10);\n      iVar10 = 1;\n      if (iVar7 < 0) {\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      status = -1;\n      iVar8 = __isoc99_sscanf(pcVar9,"HTTP/%i.%i %n",&maj_ver,&min_ver,&status);\n      if ((iVar8 < 2) || (status == -1)) {\n        (*(*p->plug)->closing)(p->plug,"Proxy error: HTTP response was absent",8000,0);\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      bufchain_consume(ch,iVar7);\n      if (pcVar9[status] != '2') {\n        pcVar9[iVar7] = '\0';\n        if ((status < iVar7) && ((pcVar9[iVar7 + -1] == '\n' || (pcVar9[iVar7 + -1] == '\r')))) {\n          do {\n            iVar8 = iVar7 + -1;\n            pcVar9[iVar8] = '\0';\n            if (iVar8 <= status) break;\n            iVar3 = iVar7 + -2;\n            iVar7 = iVar8;\n          } while ((pcVar9[iVar3] == '\r') || (pcVar9[iVar3] == '\n'));\n        }\n        pcVar4 = dupprintf("Proxy error: %s",pcVar9 + status);\n        (*(*p->plug)->closing)(p->plug,pcVar4,8000,0);\n        safefree(pcVar4);\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      safefree(pcVar9);\n      p->state = 2;\n    }\n    else if (iVar10 != 2) goto LAB_0001edb6;\n    local_238 = &p->pending_input_data;\n    n = bufchain_size(local_238);\n    if ((int)n < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    pcVar4 = (char *)safemalloc(n,1);\n    bufchain_fetch(local_238,pcVar4,n);\n    iVar10 = get_line_end(pcVar4,n);\n    pcVar9 = pcVar4;\n    if (-1 < iVar10) {\n      while (2 < iVar10) {\n        pcVar9 = pcVar9 + iVar10;\n        n = n - iVar10;\n        bufchain_consume(local_238,iVar10);\n        iVar10 = get_line_end(pcVar9,n);\n      }\n      if (iVar10 == 2) {\n        iVar10 = 1;\n        bufchain_consume(local_238,2);\n        proxy_activate(p);\n        safefree(pcVar4);\n        goto LAB_0001edd5;\n      }\n    }\n    iVar10 = 1;\n    safefree(pcVar4);\n  }\n  else {\nLAB_0001edb6:\n    iVar10 = 1;\n    (*(*p->plug)->closing)(p->plug,"Proxy error: unexpected proxy error",0x1f41,0);\n  }\nLAB_0001edd5:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar10;\n}" primitive_type (function_declarator "proxy_http_negotiate(Proxy_Socket p,int change)" identifier (parameter_list "(Proxy_Socket p,int change)" ( (parameter_declaration "Proxy_Socket p" type_identifier identifier) , (parameter_declaration "int change" primitive_type identifier) ))) (compound_statement "{\n  bufchain *ch;\n  uchar *data;\n  int iVar1;\n  Socket ppsVar2;\n  int iVar3;\n  size_t n;\n  char *pcVar4;\n  size_t sVar5;\n  char *pcVar6;\n  int iVar7;\n  int iVar8;\n  char *pcVar9;\n  int iVar10;\n  int in_GS_OFFSET;\n  uint __line;\n  bufchain *local_238;\n  int min_ver;\n  int maj_ver;\n  int status;\n  char dest [512];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar10 = p->state;\n  if (iVar10 == -1) {\n    sk_getaddr(p->remote_addr,dest,0x200);\n    pcVar9 = dupprintf("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",dest,p->remote_port,dest,\n                       p->remote_port);\n    ppsVar2 = p->sub_socket;\n    sVar5 = strlen(pcVar9);\n    (*(*ppsVar2)->write)(ppsVar2,pcVar9,sVar5);\n    safefree(pcVar9);\n    pcVar9 = conf_get_str(p->conf,0x10);\n    pcVar4 = conf_get_str(p->conf,0x11);\n    if ((*pcVar9 != '\0') || (*pcVar4 != '\0')) {\n      pcVar9 = dupprintf("%s:%s",pcVar9,pcVar4);\n      sVar5 = strlen(pcVar9);\n      pcVar4 = (char *)safemalloc((sVar5 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar4,"Proxy-Authorization: Basic ",0x1c);\n      iVar10 = 0x1b;\n      if (sVar5 != 0) {\n        iVar7 = 0;\n        iVar10 = 0x1b;\n        do {\n          pcVar6 = pcVar4 + iVar10;\n          iVar8 = sVar5 - iVar7;\n          if (3 < iVar8) {\n            iVar8 = 3;\n          }\n          iVar10 = iVar10 + 4;\n          data = (uchar *)(pcVar9 + iVar7);\n          iVar7 = iVar7 + 3;\n          base64_encode_atom(data,iVar8,pcVar6);\n        } while (iVar7 < (int)sVar5);\n      }\n      pcVar6 = pcVar4 + iVar10;\n      pcVar6[0] = '\r';\n      pcVar6[1] = '\n';\n      pcVar6[2] = '\0';\n      ppsVar2 = p->sub_socket;\n      sVar5 = strlen(pcVar4);\n      (*(*ppsVar2)->write)(ppsVar2,pcVar4,sVar5);\n      safefree(pcVar9);\n      safefree(pcVar4);\n    }\n    iVar10 = 0;\n    (*(*p->sub_socket)->write)(p->sub_socket,"\r\n",2);\n    p->state = 1;\n    goto LAB_0001edd5;\n  }\n  if (change == 0) {\n    iVar10 = 0;\n    (*(*p->plug)->closing)\n              (p->plug,p->closing_error_msg,p->closing_error_code,p->closing_calling_back);\n    goto LAB_0001edd5;\n  }\n  if (change == 1) {\n    iVar10 = 0;\n    goto LAB_0001edd5;\n  }\n  if (change == 3) {\n    iVar10 = (*(*p->plug)->accepting)\n                       (p->plug,p->accepting_constructor,(accept_ctx_t)(p->accepting_ctx).p);\n    goto LAB_0001edd5;\n  }\n  if (change == 2) {\n    if (iVar10 == 1) {\n      ch = &p->pending_input_data;\n      iVar10 = bufchain_size(ch);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      pcVar9 = (char *)safemalloc(iVar10 + 1,1);\n      bufchain_fetch(ch,pcVar9,iVar10);\n      pcVar9[iVar10] = '\0';\n      iVar7 = get_line_end(pcVar9,iVar10);\n      iVar10 = 1;\n      if (iVar7 < 0) {\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      status = -1;\n      iVar8 = __isoc99_sscanf(pcVar9,"HTTP/%i.%i %n",&maj_ver,&min_ver,&status);\n      if ((iVar8 < 2) || (status == -1)) {\n        (*(*p->plug)->closing)(p->plug,"Proxy error: HTTP response was absent",8000,0);\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      bufchain_consume(ch,iVar7);\n      if (pcVar9[status] != '2') {\n        pcVar9[iVar7] = '\0';\n        if ((status < iVar7) && ((pcVar9[iVar7 + -1] == '\n' || (pcVar9[iVar7 + -1] == '\r')))) {\n          do {\n            iVar8 = iVar7 + -1;\n            pcVar9[iVar8] = '\0';\n            if (iVar8 <= status) break;\n            iVar3 = iVar7 + -2;\n            iVar7 = iVar8;\n          } while ((pcVar9[iVar3] == '\r') || (pcVar9[iVar3] == '\n'));\n        }\n        pcVar4 = dupprintf("Proxy error: %s",pcVar9 + status);\n        (*(*p->plug)->closing)(p->plug,pcVar4,8000,0);\n        safefree(pcVar4);\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      safefree(pcVar9);\n      p->state = 2;\n    }\n    else if (iVar10 != 2) goto LAB_0001edb6;\n    local_238 = &p->pending_input_data;\n    n = bufchain_size(local_238);\n    if ((int)n < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    pcVar4 = (char *)safemalloc(n,1);\n    bufchain_fetch(local_238,pcVar4,n);\n    iVar10 = get_line_end(pcVar4,n);\n    pcVar9 = pcVar4;\n    if (-1 < iVar10) {\n      while (2 < iVar10) {\n        pcVar9 = pcVar9 + iVar10;\n        n = n - iVar10;\n        bufchain_consume(local_238,iVar10);\n        iVar10 = get_line_end(pcVar9,n);\n      }\n      if (iVar10 == 2) {\n        iVar10 = 1;\n        bufchain_consume(local_238,2);\n        proxy_activate(p);\n        safefree(pcVar4);\n        goto LAB_0001edd5;\n      }\n    }\n    iVar10 = 1;\n    safefree(pcVar4);\n  }\n  else {\nLAB_0001edb6:\n    iVar10 = 1;\n    (*(*p->plug)->closing)(p->plug,"Proxy error: unexpected proxy error",0x1f41,0);\n  }\nLAB_0001edd5:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar10;\n}" { (declaration "bufchain *ch;" type_identifier (pointer_declarator "*ch" * identifier) ;) (declaration "uchar *data;" type_identifier (pointer_declarator "*data" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "Socket ppsVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "size_t n;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "char *pcVar9;" primitive_type (pointer_declarator "*pcVar9" * identifier) ;) (declaration "int iVar10;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint __line;" type_identifier identifier ;) (declaration "bufchain *local_238;" type_identifier (pointer_declarator "*local_238" * identifier) ;) (declaration "int min_ver;" primitive_type identifier ;) (declaration "int maj_ver;" primitive_type identifier ;) (declaration "int status;" primitive_type identifier ;) (declaration "char dest [512];" primitive_type (array_declarator "dest [512]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar10 = p->state;" (assignment_expression "iVar10 = p->state" identifier = (field_expression "p->state" identifier -> field_identifier)) ;) (if_statement "if (iVar10 == -1) {\n    sk_getaddr(p->remote_addr,dest,0x200);\n    pcVar9 = dupprintf("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",dest,p->remote_port,dest,\n                       p->remote_port);\n    ppsVar2 = p->sub_socket;\n    sVar5 = strlen(pcVar9);\n    (*(*ppsVar2)->write)(ppsVar2,pcVar9,sVar5);\n    safefree(pcVar9);\n    pcVar9 = conf_get_str(p->conf,0x10);\n    pcVar4 = conf_get_str(p->conf,0x11);\n    if ((*pcVar9 != '\0') || (*pcVar4 != '\0')) {\n      pcVar9 = dupprintf("%s:%s",pcVar9,pcVar4);\n      sVar5 = strlen(pcVar9);\n      pcVar4 = (char *)safemalloc((sVar5 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar4,"Proxy-Authorization: Basic ",0x1c);\n      iVar10 = 0x1b;\n      if (sVar5 != 0) {\n        iVar7 = 0;\n        iVar10 = 0x1b;\n        do {\n          pcVar6 = pcVar4 + iVar10;\n          iVar8 = sVar5 - iVar7;\n          if (3 < iVar8) {\n            iVar8 = 3;\n          }\n          iVar10 = iVar10 + 4;\n          data = (uchar *)(pcVar9 + iVar7);\n          iVar7 = iVar7 + 3;\n          base64_encode_atom(data,iVar8,pcVar6);\n        } while (iVar7 < (int)sVar5);\n      }\n      pcVar6 = pcVar4 + iVar10;\n      pcVar6[0] = '\r';\n      pcVar6[1] = '\n';\n      pcVar6[2] = '\0';\n      ppsVar2 = p->sub_socket;\n      sVar5 = strlen(pcVar4);\n      (*(*ppsVar2)->write)(ppsVar2,pcVar4,sVar5);\n      safefree(pcVar9);\n      safefree(pcVar4);\n    }\n    iVar10 = 0;\n    (*(*p->sub_socket)->write)(p->sub_socket,"\r\n",2);\n    p->state = 1;\n    goto LAB_0001edd5;\n  }" if (parenthesized_expression "(iVar10 == -1)" ( (binary_expression "iVar10 == -1" identifier == number_literal) )) (compound_statement "{\n    sk_getaddr(p->remote_addr,dest,0x200);\n    pcVar9 = dupprintf("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",dest,p->remote_port,dest,\n                       p->remote_port);\n    ppsVar2 = p->sub_socket;\n    sVar5 = strlen(pcVar9);\n    (*(*ppsVar2)->write)(ppsVar2,pcVar9,sVar5);\n    safefree(pcVar9);\n    pcVar9 = conf_get_str(p->conf,0x10);\n    pcVar4 = conf_get_str(p->conf,0x11);\n    if ((*pcVar9 != '\0') || (*pcVar4 != '\0')) {\n      pcVar9 = dupprintf("%s:%s",pcVar9,pcVar4);\n      sVar5 = strlen(pcVar9);\n      pcVar4 = (char *)safemalloc((sVar5 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar4,"Proxy-Authorization: Basic ",0x1c);\n      iVar10 = 0x1b;\n      if (sVar5 != 0) {\n        iVar7 = 0;\n        iVar10 = 0x1b;\n        do {\n          pcVar6 = pcVar4 + iVar10;\n          iVar8 = sVar5 - iVar7;\n          if (3 < iVar8) {\n            iVar8 = 3;\n          }\n          iVar10 = iVar10 + 4;\n          data = (uchar *)(pcVar9 + iVar7);\n          iVar7 = iVar7 + 3;\n          base64_encode_atom(data,iVar8,pcVar6);\n        } while (iVar7 < (int)sVar5);\n      }\n      pcVar6 = pcVar4 + iVar10;\n      pcVar6[0] = '\r';\n      pcVar6[1] = '\n';\n      pcVar6[2] = '\0';\n      ppsVar2 = p->sub_socket;\n      sVar5 = strlen(pcVar4);\n      (*(*ppsVar2)->write)(ppsVar2,pcVar4,sVar5);\n      safefree(pcVar9);\n      safefree(pcVar4);\n    }\n    iVar10 = 0;\n    (*(*p->sub_socket)->write)(p->sub_socket,"\r\n",2);\n    p->state = 1;\n    goto LAB_0001edd5;\n  }" { (expression_statement "sk_getaddr(p->remote_addr,dest,0x200);" (call_expression "sk_getaddr(p->remote_addr,dest,0x200)" identifier (argument_list "(p->remote_addr,dest,0x200)" ( (field_expression "p->remote_addr" identifier -> field_identifier) , identifier , number_literal ))) ;) (expression_statement "pcVar9 = dupprintf("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",dest,p->remote_port,dest,\n                       p->remote_port);" (assignment_expression "pcVar9 = dupprintf("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",dest,p->remote_port,dest,\n                       p->remote_port)" identifier = (call_expression "dupprintf("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",dest,p->remote_port,dest,\n                       p->remote_port)" identifier (argument_list "("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",dest,p->remote_port,dest,\n                       p->remote_port)" ( (string_literal ""CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n"" " string_content escape_sequence escape_sequence string_content escape_sequence escape_sequence ") , identifier , (field_expression "p->remote_port" identifier -> field_identifier) , identifier , (field_expression "p->remote_port" identifier -> field_identifier) )))) ;) (expression_statement "ppsVar2 = p->sub_socket;" (assignment_expression "ppsVar2 = p->sub_socket" identifier = (field_expression "p->sub_socket" identifier -> field_identifier)) ;) (expression_statement "sVar5 = strlen(pcVar9);" (assignment_expression "sVar5 = strlen(pcVar9)" identifier = (call_expression "strlen(pcVar9)" identifier (argument_list "(pcVar9)" ( identifier )))) ;) (expression_statement "(*(*ppsVar2)->write)(ppsVar2,pcVar9,sVar5);" (call_expression "(*(*ppsVar2)->write)(ppsVar2,pcVar9,sVar5)" (parenthesized_expression "(*(*ppsVar2)->write)" ( (pointer_expression "*(*ppsVar2)->write" * (field_expression "(*ppsVar2)->write" (parenthesized_expression "(*ppsVar2)" ( (pointer_expression "*ppsVar2" * identifier) )) -> field_identifier)) )) (argument_list "(ppsVar2,pcVar9,sVar5)" ( identifier , identifier , identifier ))) ;) (expression_statement "safefree(pcVar9);" (call_expression "safefree(pcVar9)" identifier (argument_list "(pcVar9)" ( identifier ))) ;) (expression_statement "pcVar9 = conf_get_str(p->conf,0x10);" (assignment_expression "pcVar9 = conf_get_str(p->conf,0x10)" identifier = (call_expression "conf_get_str(p->conf,0x10)" identifier (argument_list "(p->conf,0x10)" ( (field_expression "p->conf" identifier -> field_identifier) , number_literal )))) ;) (expression_statement "pcVar4 = conf_get_str(p->conf,0x11);" (assignment_expression "pcVar4 = conf_get_str(p->conf,0x11)" identifier = (call_expression "conf_get_str(p->conf,0x11)" identifier (argument_list "(p->conf,0x11)" ( (field_expression "p->conf" identifier -> field_identifier) , number_literal )))) ;) (if_statement "if ((*pcVar9 != '\0') || (*pcVar4 != '\0')) {\n      pcVar9 = dupprintf("%s:%s",pcVar9,pcVar4);\n      sVar5 = strlen(pcVar9);\n      pcVar4 = (char *)safemalloc((sVar5 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar4,"Proxy-Authorization: Basic ",0x1c);\n      iVar10 = 0x1b;\n      if (sVar5 != 0) {\n        iVar7 = 0;\n        iVar10 = 0x1b;\n        do {\n          pcVar6 = pcVar4 + iVar10;\n          iVar8 = sVar5 - iVar7;\n          if (3 < iVar8) {\n            iVar8 = 3;\n          }\n          iVar10 = iVar10 + 4;\n          data = (uchar *)(pcVar9 + iVar7);\n          iVar7 = iVar7 + 3;\n          base64_encode_atom(data,iVar8,pcVar6);\n        } while (iVar7 < (int)sVar5);\n      }\n      pcVar6 = pcVar4 + iVar10;\n      pcVar6[0] = '\r';\n      pcVar6[1] = '\n';\n      pcVar6[2] = '\0';\n      ppsVar2 = p->sub_socket;\n      sVar5 = strlen(pcVar4);\n      (*(*ppsVar2)->write)(ppsVar2,pcVar4,sVar5);\n      safefree(pcVar9);\n      safefree(pcVar4);\n    }" if (parenthesized_expression "((*pcVar9 != '\0') || (*pcVar4 != '\0'))" ( (binary_expression "(*pcVar9 != '\0') || (*pcVar4 != '\0')" (parenthesized_expression "(*pcVar9 != '\0')" ( (binary_expression "*pcVar9 != '\0'" (pointer_expression "*pcVar9" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(*pcVar4 != '\0')" ( (binary_expression "*pcVar4 != '\0'" (pointer_expression "*pcVar4" * identifier) != (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n      pcVar9 = dupprintf("%s:%s",pcVar9,pcVar4);\n      sVar5 = strlen(pcVar9);\n      pcVar4 = (char *)safemalloc((sVar5 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar4,"Proxy-Authorization: Basic ",0x1c);\n      iVar10 = 0x1b;\n      if (sVar5 != 0) {\n        iVar7 = 0;\n        iVar10 = 0x1b;\n        do {\n          pcVar6 = pcVar4 + iVar10;\n          iVar8 = sVar5 - iVar7;\n          if (3 < iVar8) {\n            iVar8 = 3;\n          }\n          iVar10 = iVar10 + 4;\n          data = (uchar *)(pcVar9 + iVar7);\n          iVar7 = iVar7 + 3;\n          base64_encode_atom(data,iVar8,pcVar6);\n        } while (iVar7 < (int)sVar5);\n      }\n      pcVar6 = pcVar4 + iVar10;\n      pcVar6[0] = '\r';\n      pcVar6[1] = '\n';\n      pcVar6[2] = '\0';\n      ppsVar2 = p->sub_socket;\n      sVar5 = strlen(pcVar4);\n      (*(*ppsVar2)->write)(ppsVar2,pcVar4,sVar5);\n      safefree(pcVar9);\n      safefree(pcVar4);\n    }" { (expression_statement "pcVar9 = dupprintf("%s:%s",pcVar9,pcVar4);" (assignment_expression "pcVar9 = dupprintf("%s:%s",pcVar9,pcVar4)" identifier = (call_expression "dupprintf("%s:%s",pcVar9,pcVar4)" identifier (argument_list "("%s:%s",pcVar9,pcVar4)" ( (string_literal ""%s:%s"" " string_content ") , identifier , identifier )))) ;) (expression_statement "sVar5 = strlen(pcVar9);" (assignment_expression "sVar5 = strlen(pcVar9)" identifier = (call_expression "strlen(pcVar9)" identifier (argument_list "(pcVar9)" ( identifier )))) ;) (expression_statement "pcVar4 = (char *)safemalloc((sVar5 * 4) / 3 + 100,1);" (assignment_expression "pcVar4 = (char *)safemalloc((sVar5 * 4) / 3 + 100,1)" identifier = (cast_expression "(char *)safemalloc((sVar5 * 4) / 3 + 100,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc((sVar5 * 4) / 3 + 100,1)" identifier (argument_list "((sVar5 * 4) / 3 + 100,1)" ( (binary_expression "(sVar5 * 4) / 3 + 100" (binary_expression "(sVar5 * 4) / 3" (parenthesized_expression "(sVar5 * 4)" ( (binary_expression "sVar5 * 4" identifier * number_literal) )) / number_literal) + number_literal) , number_literal ))))) ;) (expression_statement "builtin_strncpy(pcVar4,"Proxy-Authorization: Basic ",0x1c);" (call_expression "builtin_strncpy(pcVar4,"Proxy-Authorization: Basic ",0x1c)" identifier (argument_list "(pcVar4,"Proxy-Authorization: Basic ",0x1c)" ( identifier , (string_literal ""Proxy-Authorization: Basic "" " string_content ") , number_literal ))) ;) (expression_statement "iVar10 = 0x1b;" (assignment_expression "iVar10 = 0x1b" identifier = number_literal) ;) (if_statement "if (sVar5 != 0) {\n        iVar7 = 0;\n        iVar10 = 0x1b;\n        do {\n          pcVar6 = pcVar4 + iVar10;\n          iVar8 = sVar5 - iVar7;\n          if (3 < iVar8) {\n            iVar8 = 3;\n          }\n          iVar10 = iVar10 + 4;\n          data = (uchar *)(pcVar9 + iVar7);\n          iVar7 = iVar7 + 3;\n          base64_encode_atom(data,iVar8,pcVar6);\n        } while (iVar7 < (int)sVar5);\n      }" if (parenthesized_expression "(sVar5 != 0)" ( (binary_expression "sVar5 != 0" identifier != number_literal) )) (compound_statement "{\n        iVar7 = 0;\n        iVar10 = 0x1b;\n        do {\n          pcVar6 = pcVar4 + iVar10;\n          iVar8 = sVar5 - iVar7;\n          if (3 < iVar8) {\n            iVar8 = 3;\n          }\n          iVar10 = iVar10 + 4;\n          data = (uchar *)(pcVar9 + iVar7);\n          iVar7 = iVar7 + 3;\n          base64_encode_atom(data,iVar8,pcVar6);\n        } while (iVar7 < (int)sVar5);\n      }" { (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) (expression_statement "iVar10 = 0x1b;" (assignment_expression "iVar10 = 0x1b" identifier = number_literal) ;) (do_statement "do {\n          pcVar6 = pcVar4 + iVar10;\n          iVar8 = sVar5 - iVar7;\n          if (3 < iVar8) {\n            iVar8 = 3;\n          }\n          iVar10 = iVar10 + 4;\n          data = (uchar *)(pcVar9 + iVar7);\n          iVar7 = iVar7 + 3;\n          base64_encode_atom(data,iVar8,pcVar6);\n        } while (iVar7 < (int)sVar5);" do (compound_statement "{\n          pcVar6 = pcVar4 + iVar10;\n          iVar8 = sVar5 - iVar7;\n          if (3 < iVar8) {\n            iVar8 = 3;\n          }\n          iVar10 = iVar10 + 4;\n          data = (uchar *)(pcVar9 + iVar7);\n          iVar7 = iVar7 + 3;\n          base64_encode_atom(data,iVar8,pcVar6);\n        }" { (expression_statement "pcVar6 = pcVar4 + iVar10;" (assignment_expression "pcVar6 = pcVar4 + iVar10" identifier = (binary_expression "pcVar4 + iVar10" identifier + identifier)) ;) (expression_statement "iVar8 = sVar5 - iVar7;" (assignment_expression "iVar8 = sVar5 - iVar7" identifier = (binary_expression "sVar5 - iVar7" identifier - identifier)) ;) (if_statement "if (3 < iVar8) {\n            iVar8 = 3;\n          }" if (parenthesized_expression "(3 < iVar8)" ( (binary_expression "3 < iVar8" number_literal < identifier) )) (compound_statement "{\n            iVar8 = 3;\n          }" { (expression_statement "iVar8 = 3;" (assignment_expression "iVar8 = 3" identifier = number_literal) ;) })) (expression_statement "iVar10 = iVar10 + 4;" (assignment_expression "iVar10 = iVar10 + 4" identifier = (binary_expression "iVar10 + 4" identifier + number_literal)) ;) (expression_statement "data = (uchar *)(pcVar9 + iVar7);" (assignment_expression "data = (uchar *)(pcVar9 + iVar7)" identifier = (cast_expression "(uchar *)(pcVar9 + iVar7)" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar9 + iVar7)" ( (binary_expression "pcVar9 + iVar7" identifier + identifier) )))) ;) (expression_statement "iVar7 = iVar7 + 3;" (assignment_expression "iVar7 = iVar7 + 3" identifier = (binary_expression "iVar7 + 3" identifier + number_literal)) ;) (expression_statement "base64_encode_atom(data,iVar8,pcVar6);" (call_expression "base64_encode_atom(data,iVar8,pcVar6)" identifier (argument_list "(data,iVar8,pcVar6)" ( identifier , identifier , identifier ))) ;) }) while (parenthesized_expression "(iVar7 < (int)sVar5)" ( (binary_expression "iVar7 < (int)sVar5" identifier < (cast_expression "(int)sVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )) ;) })) (expression_statement "pcVar6 = pcVar4 + iVar10;" (assignment_expression "pcVar6 = pcVar4 + iVar10" identifier = (binary_expression "pcVar4 + iVar10" identifier + identifier)) ;) (expression_statement "pcVar6[0] = '\r';" (assignment_expression "pcVar6[0] = '\r'" (subscript_expression "pcVar6[0]" identifier [ number_literal ]) = (char_literal "'\r'" ' escape_sequence ')) ;) (expression_statement "pcVar6[1] = '\n';" (assignment_expression "pcVar6[1] = '\n'" (subscript_expression "pcVar6[1]" identifier [ number_literal ]) = (char_literal "'\n'" ' escape_sequence ')) ;) (expression_statement "pcVar6[2] = '\0';" (assignment_expression "pcVar6[2] = '\0'" (subscript_expression "pcVar6[2]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "ppsVar2 = p->sub_socket;" (assignment_expression "ppsVar2 = p->sub_socket" identifier = (field_expression "p->sub_socket" identifier -> field_identifier)) ;) (expression_statement "sVar5 = strlen(pcVar4);" (assignment_expression "sVar5 = strlen(pcVar4)" identifier = (call_expression "strlen(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier )))) ;) (expression_statement "(*(*ppsVar2)->write)(ppsVar2,pcVar4,sVar5);" (call_expression "(*(*ppsVar2)->write)(ppsVar2,pcVar4,sVar5)" (parenthesized_expression "(*(*ppsVar2)->write)" ( (pointer_expression "*(*ppsVar2)->write" * (field_expression "(*ppsVar2)->write" (parenthesized_expression "(*ppsVar2)" ( (pointer_expression "*ppsVar2" * identifier) )) -> field_identifier)) )) (argument_list "(ppsVar2,pcVar4,sVar5)" ( identifier , identifier , identifier ))) ;) (expression_statement "safefree(pcVar9);" (call_expression "safefree(pcVar9)" identifier (argument_list "(pcVar9)" ( identifier ))) ;) (expression_statement "safefree(pcVar4);" (call_expression "safefree(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) })) (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (expression_statement "(*(*p->sub_socket)->write)(p->sub_socket,"\r\n",2);" (call_expression "(*(*p->sub_socket)->write)(p->sub_socket,"\r\n",2)" (parenthesized_expression "(*(*p->sub_socket)->write)" ( (pointer_expression "*(*p->sub_socket)->write" * (field_expression "(*p->sub_socket)->write" (parenthesized_expression "(*p->sub_socket)" ( (pointer_expression "*p->sub_socket" * (field_expression "p->sub_socket" identifier -> field_identifier)) )) -> field_identifier)) )) (argument_list "(p->sub_socket,"\r\n",2)" ( (field_expression "p->sub_socket" identifier -> field_identifier) , (string_literal ""\r\n"" " escape_sequence escape_sequence ") , number_literal ))) ;) (expression_statement "p->state = 1;" (assignment_expression "p->state = 1" (field_expression "p->state" identifier -> field_identifier) = number_literal) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (if_statement "if (change == 0) {\n    iVar10 = 0;\n    (*(*p->plug)->closing)\n              (p->plug,p->closing_error_msg,p->closing_error_code,p->closing_calling_back);\n    goto LAB_0001edd5;\n  }" if (parenthesized_expression "(change == 0)" ( (binary_expression "change == 0" identifier == number_literal) )) (compound_statement "{\n    iVar10 = 0;\n    (*(*p->plug)->closing)\n              (p->plug,p->closing_error_msg,p->closing_error_code,p->closing_calling_back);\n    goto LAB_0001edd5;\n  }" { (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (expression_statement "(*(*p->plug)->closing)\n              (p->plug,p->closing_error_msg,p->closing_error_code,p->closing_calling_back);" (call_expression "(*(*p->plug)->closing)\n              (p->plug,p->closing_error_msg,p->closing_error_code,p->closing_calling_back)" (parenthesized_expression "(*(*p->plug)->closing)" ( (pointer_expression "*(*p->plug)->closing" * (field_expression "(*p->plug)->closing" (parenthesized_expression "(*p->plug)" ( (pointer_expression "*p->plug" * (field_expression "p->plug" identifier -> field_identifier)) )) -> field_identifier)) )) (argument_list "(p->plug,p->closing_error_msg,p->closing_error_code,p->closing_calling_back)" ( (field_expression "p->plug" identifier -> field_identifier) , (field_expression "p->closing_error_msg" identifier -> field_identifier) , (field_expression "p->closing_error_code" identifier -> field_identifier) , (field_expression "p->closing_calling_back" identifier -> field_identifier) ))) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (if_statement "if (change == 1) {\n    iVar10 = 0;\n    goto LAB_0001edd5;\n  }" if (parenthesized_expression "(change == 1)" ( (binary_expression "change == 1" identifier == number_literal) )) (compound_statement "{\n    iVar10 = 0;\n    goto LAB_0001edd5;\n  }" { (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (if_statement "if (change == 3) {\n    iVar10 = (*(*p->plug)->accepting)\n                       (p->plug,p->accepting_constructor,(accept_ctx_t)(p->accepting_ctx).p);\n    goto LAB_0001edd5;\n  }" if (parenthesized_expression "(change == 3)" ( (binary_expression "change == 3" identifier == number_literal) )) (compound_statement "{\n    iVar10 = (*(*p->plug)->accepting)\n                       (p->plug,p->accepting_constructor,(accept_ctx_t)(p->accepting_ctx).p);\n    goto LAB_0001edd5;\n  }" { (expression_statement "iVar10 = (*(*p->plug)->accepting)\n                       (p->plug,p->accepting_constructor,(accept_ctx_t)(p->accepting_ctx).p);" (assignment_expression "iVar10 = (*(*p->plug)->accepting)\n                       (p->plug,p->accepting_constructor,(accept_ctx_t)(p->accepting_ctx).p)" identifier = (call_expression "(*(*p->plug)->accepting)\n                       (p->plug,p->accepting_constructor,(accept_ctx_t)(p->accepting_ctx).p)" (parenthesized_expression "(*(*p->plug)->accepting)" ( (pointer_expression "*(*p->plug)->accepting" * (field_expression "(*p->plug)->accepting" (parenthesized_expression "(*p->plug)" ( (pointer_expression "*p->plug" * (field_expression "p->plug" identifier -> field_identifier)) )) -> field_identifier)) )) (argument_list "(p->plug,p->accepting_constructor,(accept_ctx_t)(p->accepting_ctx).p)" ( (field_expression "p->plug" identifier -> field_identifier) , (field_expression "p->accepting_constructor" identifier -> field_identifier) , (field_expression "(accept_ctx_t)(p->accepting_ctx).p" (call_expression "(accept_ctx_t)(p->accepting_ctx)" (parenthesized_expression "(accept_ctx_t)" ( identifier )) (argument_list "(p->accepting_ctx)" ( (field_expression "p->accepting_ctx" identifier -> field_identifier) ))) . field_identifier) )))) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (if_statement "if (change == 2) {\n    if (iVar10 == 1) {\n      ch = &p->pending_input_data;\n      iVar10 = bufchain_size(ch);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      pcVar9 = (char *)safemalloc(iVar10 + 1,1);\n      bufchain_fetch(ch,pcVar9,iVar10);\n      pcVar9[iVar10] = '\0';\n      iVar7 = get_line_end(pcVar9,iVar10);\n      iVar10 = 1;\n      if (iVar7 < 0) {\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      status = -1;\n      iVar8 = __isoc99_sscanf(pcVar9,"HTTP/%i.%i %n",&maj_ver,&min_ver,&status);\n      if ((iVar8 < 2) || (status == -1)) {\n        (*(*p->plug)->closing)(p->plug,"Proxy error: HTTP response was absent",8000,0);\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      bufchain_consume(ch,iVar7);\n      if (pcVar9[status] != '2') {\n        pcVar9[iVar7] = '\0';\n        if ((status < iVar7) && ((pcVar9[iVar7 + -1] == '\n' || (pcVar9[iVar7 + -1] == '\r')))) {\n          do {\n            iVar8 = iVar7 + -1;\n            pcVar9[iVar8] = '\0';\n            if (iVar8 <= status) break;\n            iVar3 = iVar7 + -2;\n            iVar7 = iVar8;\n          } while ((pcVar9[iVar3] == '\r') || (pcVar9[iVar3] == '\n'));\n        }\n        pcVar4 = dupprintf("Proxy error: %s",pcVar9 + status);\n        (*(*p->plug)->closing)(p->plug,pcVar4,8000,0);\n        safefree(pcVar4);\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      safefree(pcVar9);\n      p->state = 2;\n    }\n    else if (iVar10 != 2) goto LAB_0001edb6;\n    local_238 = &p->pending_input_data;\n    n = bufchain_size(local_238);\n    if ((int)n < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    pcVar4 = (char *)safemalloc(n,1);\n    bufchain_fetch(local_238,pcVar4,n);\n    iVar10 = get_line_end(pcVar4,n);\n    pcVar9 = pcVar4;\n    if (-1 < iVar10) {\n      while (2 < iVar10) {\n        pcVar9 = pcVar9 + iVar10;\n        n = n - iVar10;\n        bufchain_consume(local_238,iVar10);\n        iVar10 = get_line_end(pcVar9,n);\n      }\n      if (iVar10 == 2) {\n        iVar10 = 1;\n        bufchain_consume(local_238,2);\n        proxy_activate(p);\n        safefree(pcVar4);\n        goto LAB_0001edd5;\n      }\n    }\n    iVar10 = 1;\n    safefree(pcVar4);\n  }\n  else {\nLAB_0001edb6:\n    iVar10 = 1;\n    (*(*p->plug)->closing)(p->plug,"Proxy error: unexpected proxy error",0x1f41,0);\n  }" if (parenthesized_expression "(change == 2)" ( (binary_expression "change == 2" identifier == number_literal) )) (compound_statement "{\n    if (iVar10 == 1) {\n      ch = &p->pending_input_data;\n      iVar10 = bufchain_size(ch);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      pcVar9 = (char *)safemalloc(iVar10 + 1,1);\n      bufchain_fetch(ch,pcVar9,iVar10);\n      pcVar9[iVar10] = '\0';\n      iVar7 = get_line_end(pcVar9,iVar10);\n      iVar10 = 1;\n      if (iVar7 < 0) {\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      status = -1;\n      iVar8 = __isoc99_sscanf(pcVar9,"HTTP/%i.%i %n",&maj_ver,&min_ver,&status);\n      if ((iVar8 < 2) || (status == -1)) {\n        (*(*p->plug)->closing)(p->plug,"Proxy error: HTTP response was absent",8000,0);\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      bufchain_consume(ch,iVar7);\n      if (pcVar9[status] != '2') {\n        pcVar9[iVar7] = '\0';\n        if ((status < iVar7) && ((pcVar9[iVar7 + -1] == '\n' || (pcVar9[iVar7 + -1] == '\r')))) {\n          do {\n            iVar8 = iVar7 + -1;\n            pcVar9[iVar8] = '\0';\n            if (iVar8 <= status) break;\n            iVar3 = iVar7 + -2;\n            iVar7 = iVar8;\n          } while ((pcVar9[iVar3] == '\r') || (pcVar9[iVar3] == '\n'));\n        }\n        pcVar4 = dupprintf("Proxy error: %s",pcVar9 + status);\n        (*(*p->plug)->closing)(p->plug,pcVar4,8000,0);\n        safefree(pcVar4);\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      safefree(pcVar9);\n      p->state = 2;\n    }\n    else if (iVar10 != 2) goto LAB_0001edb6;\n    local_238 = &p->pending_input_data;\n    n = bufchain_size(local_238);\n    if ((int)n < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    pcVar4 = (char *)safemalloc(n,1);\n    bufchain_fetch(local_238,pcVar4,n);\n    iVar10 = get_line_end(pcVar4,n);\n    pcVar9 = pcVar4;\n    if (-1 < iVar10) {\n      while (2 < iVar10) {\n        pcVar9 = pcVar9 + iVar10;\n        n = n - iVar10;\n        bufchain_consume(local_238,iVar10);\n        iVar10 = get_line_end(pcVar9,n);\n      }\n      if (iVar10 == 2) {\n        iVar10 = 1;\n        bufchain_consume(local_238,2);\n        proxy_activate(p);\n        safefree(pcVar4);\n        goto LAB_0001edd5;\n      }\n    }\n    iVar10 = 1;\n    safefree(pcVar4);\n  }" { (if_statement "if (iVar10 == 1) {\n      ch = &p->pending_input_data;\n      iVar10 = bufchain_size(ch);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      pcVar9 = (char *)safemalloc(iVar10 + 1,1);\n      bufchain_fetch(ch,pcVar9,iVar10);\n      pcVar9[iVar10] = '\0';\n      iVar7 = get_line_end(pcVar9,iVar10);\n      iVar10 = 1;\n      if (iVar7 < 0) {\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      status = -1;\n      iVar8 = __isoc99_sscanf(pcVar9,"HTTP/%i.%i %n",&maj_ver,&min_ver,&status);\n      if ((iVar8 < 2) || (status == -1)) {\n        (*(*p->plug)->closing)(p->plug,"Proxy error: HTTP response was absent",8000,0);\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      bufchain_consume(ch,iVar7);\n      if (pcVar9[status] != '2') {\n        pcVar9[iVar7] = '\0';\n        if ((status < iVar7) && ((pcVar9[iVar7 + -1] == '\n' || (pcVar9[iVar7 + -1] == '\r')))) {\n          do {\n            iVar8 = iVar7 + -1;\n            pcVar9[iVar8] = '\0';\n            if (iVar8 <= status) break;\n            iVar3 = iVar7 + -2;\n            iVar7 = iVar8;\n          } while ((pcVar9[iVar3] == '\r') || (pcVar9[iVar3] == '\n'));\n        }\n        pcVar4 = dupprintf("Proxy error: %s",pcVar9 + status);\n        (*(*p->plug)->closing)(p->plug,pcVar4,8000,0);\n        safefree(pcVar4);\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      safefree(pcVar9);\n      p->state = 2;\n    }\n    else if (iVar10 != 2) goto LAB_0001edb6;" if (parenthesized_expression "(iVar10 == 1)" ( (binary_expression "iVar10 == 1" identifier == number_literal) )) (compound_statement "{\n      ch = &p->pending_input_data;\n      iVar10 = bufchain_size(ch);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      pcVar9 = (char *)safemalloc(iVar10 + 1,1);\n      bufchain_fetch(ch,pcVar9,iVar10);\n      pcVar9[iVar10] = '\0';\n      iVar7 = get_line_end(pcVar9,iVar10);\n      iVar10 = 1;\n      if (iVar7 < 0) {\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      status = -1;\n      iVar8 = __isoc99_sscanf(pcVar9,"HTTP/%i.%i %n",&maj_ver,&min_ver,&status);\n      if ((iVar8 < 2) || (status == -1)) {\n        (*(*p->plug)->closing)(p->plug,"Proxy error: HTTP response was absent",8000,0);\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      bufchain_consume(ch,iVar7);\n      if (pcVar9[status] != '2') {\n        pcVar9[iVar7] = '\0';\n        if ((status < iVar7) && ((pcVar9[iVar7 + -1] == '\n' || (pcVar9[iVar7 + -1] == '\r')))) {\n          do {\n            iVar8 = iVar7 + -1;\n            pcVar9[iVar8] = '\0';\n            if (iVar8 <= status) break;\n            iVar3 = iVar7 + -2;\n            iVar7 = iVar8;\n          } while ((pcVar9[iVar3] == '\r') || (pcVar9[iVar3] == '\n'));\n        }\n        pcVar4 = dupprintf("Proxy error: %s",pcVar9 + status);\n        (*(*p->plug)->closing)(p->plug,pcVar4,8000,0);\n        safefree(pcVar4);\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }\n      safefree(pcVar9);\n      p->state = 2;\n    }" { (expression_statement "ch = &p->pending_input_data;" (assignment_expression "ch = &p->pending_input_data" identifier = (pointer_expression "&p->pending_input_data" & (field_expression "p->pending_input_data" identifier -> field_identifier))) ;) (expression_statement "iVar10 = bufchain_size(ch);" (assignment_expression "iVar10 = bufchain_size(ch)" identifier = (call_expression "bufchain_size(ch)" identifier (argument_list "(ch)" ( identifier )))) ;) (if_statement "if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }" if (parenthesized_expression "(iVar10 < 1)" ( (binary_expression "iVar10 < 1" identifier < number_literal) )) (compound_statement "{\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }" { (expression_statement "__line = 0x2af;" (assignment_expression "__line = 0x2af" identifier = number_literal) ;) (goto_statement "goto LAB_0001f293;" goto statement_identifier ;) })) (expression_statement "pcVar9 = (char *)safemalloc(iVar10 + 1,1);" (assignment_expression "pcVar9 = (char *)safemalloc(iVar10 + 1,1)" identifier = (cast_expression "(char *)safemalloc(iVar10 + 1,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(iVar10 + 1,1)" identifier (argument_list "(iVar10 + 1,1)" ( (binary_expression "iVar10 + 1" identifier + number_literal) , number_literal ))))) ;) (expression_statement "bufchain_fetch(ch,pcVar9,iVar10);" (call_expression "bufchain_fetch(ch,pcVar9,iVar10)" identifier (argument_list "(ch,pcVar9,iVar10)" ( identifier , identifier , identifier ))) ;) (expression_statement "pcVar9[iVar10] = '\0';" (assignment_expression "pcVar9[iVar10] = '\0'" (subscript_expression "pcVar9[iVar10]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "iVar7 = get_line_end(pcVar9,iVar10);" (assignment_expression "iVar7 = get_line_end(pcVar9,iVar10)" identifier = (call_expression "get_line_end(pcVar9,iVar10)" identifier (argument_list "(pcVar9,iVar10)" ( identifier , identifier )))) ;) (expression_statement "iVar10 = 1;" (assignment_expression "iVar10 = 1" identifier = number_literal) ;) (if_statement "if (iVar7 < 0) {\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }" if (parenthesized_expression "(iVar7 < 0)" ( (binary_expression "iVar7 < 0" identifier < number_literal) )) (compound_statement "{\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }" { (expression_statement "safefree(pcVar9);" (call_expression "safefree(pcVar9)" identifier (argument_list "(pcVar9)" ( identifier ))) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (expression_statement "status = -1;" (assignment_expression "status = -1" identifier = number_literal) ;) (expression_statement "iVar8 = __isoc99_sscanf(pcVar9,"HTTP/%i.%i %n",&maj_ver,&min_ver,&status);" (assignment_expression "iVar8 = __isoc99_sscanf(pcVar9,"HTTP/%i.%i %n",&maj_ver,&min_ver,&status)" identifier = (call_expression "__isoc99_sscanf(pcVar9,"HTTP/%i.%i %n",&maj_ver,&min_ver,&status)" identifier (argument_list "(pcVar9,"HTTP/%i.%i %n",&maj_ver,&min_ver,&status)" ( identifier , (string_literal ""HTTP/%i.%i %n"" " string_content ") , (pointer_expression "&maj_ver" & identifier) , (pointer_expression "&min_ver" & identifier) , (pointer_expression "&status" & identifier) )))) ;) (if_statement "if ((iVar8 < 2) || (status == -1)) {\n        (*(*p->plug)->closing)(p->plug,"Proxy error: HTTP response was absent",8000,0);\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }" if (parenthesized_expression "((iVar8 < 2) || (status == -1))" ( (binary_expression "(iVar8 < 2) || (status == -1)" (parenthesized_expression "(iVar8 < 2)" ( (binary_expression "iVar8 < 2" identifier < number_literal) )) || (parenthesized_expression "(status == -1)" ( (binary_expression "status == -1" identifier == number_literal) ))) )) (compound_statement "{\n        (*(*p->plug)->closing)(p->plug,"Proxy error: HTTP response was absent",8000,0);\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }" { (expression_statement "(*(*p->plug)->closing)(p->plug,"Proxy error: HTTP response was absent",8000,0);" (call_expression "(*(*p->plug)->closing)(p->plug,"Proxy error: HTTP response was absent",8000,0)" (parenthesized_expression "(*(*p->plug)->closing)" ( (pointer_expression "*(*p->plug)->closing" * (field_expression "(*p->plug)->closing" (parenthesized_expression "(*p->plug)" ( (pointer_expression "*p->plug" * (field_expression "p->plug" identifier -> field_identifier)) )) -> field_identifier)) )) (argument_list "(p->plug,"Proxy error: HTTP response was absent",8000,0)" ( (field_expression "p->plug" identifier -> field_identifier) , (string_literal ""Proxy error: HTTP response was absent"" " string_content ") , number_literal , number_literal ))) ;) (expression_statement "safefree(pcVar9);" (call_expression "safefree(pcVar9)" identifier (argument_list "(pcVar9)" ( identifier ))) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (expression_statement "bufchain_consume(ch,iVar7);" (call_expression "bufchain_consume(ch,iVar7)" identifier (argument_list "(ch,iVar7)" ( identifier , identifier ))) ;) (if_statement "if (pcVar9[status] != '2') {\n        pcVar9[iVar7] = '\0';\n        if ((status < iVar7) && ((pcVar9[iVar7 + -1] == '\n' || (pcVar9[iVar7 + -1] == '\r')))) {\n          do {\n            iVar8 = iVar7 + -1;\n            pcVar9[iVar8] = '\0';\n            if (iVar8 <= status) break;\n            iVar3 = iVar7 + -2;\n            iVar7 = iVar8;\n          } while ((pcVar9[iVar3] == '\r') || (pcVar9[iVar3] == '\n'));\n        }\n        pcVar4 = dupprintf("Proxy error: %s",pcVar9 + status);\n        (*(*p->plug)->closing)(p->plug,pcVar4,8000,0);\n        safefree(pcVar4);\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }" if (parenthesized_expression "(pcVar9[status] != '2')" ( (binary_expression "pcVar9[status] != '2'" (subscript_expression "pcVar9[status]" identifier [ identifier ]) != (char_literal "'2'" ' character ')) )) (compound_statement "{\n        pcVar9[iVar7] = '\0';\n        if ((status < iVar7) && ((pcVar9[iVar7 + -1] == '\n' || (pcVar9[iVar7 + -1] == '\r')))) {\n          do {\n            iVar8 = iVar7 + -1;\n            pcVar9[iVar8] = '\0';\n            if (iVar8 <= status) break;\n            iVar3 = iVar7 + -2;\n            iVar7 = iVar8;\n          } while ((pcVar9[iVar3] == '\r') || (pcVar9[iVar3] == '\n'));\n        }\n        pcVar4 = dupprintf("Proxy error: %s",pcVar9 + status);\n        (*(*p->plug)->closing)(p->plug,pcVar4,8000,0);\n        safefree(pcVar4);\n        safefree(pcVar9);\n        goto LAB_0001edd5;\n      }" { (expression_statement "pcVar9[iVar7] = '\0';" (assignment_expression "pcVar9[iVar7] = '\0'" (subscript_expression "pcVar9[iVar7]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if ((status < iVar7) && ((pcVar9[iVar7 + -1] == '\n' || (pcVar9[iVar7 + -1] == '\r')))) {\n          do {\n            iVar8 = iVar7 + -1;\n            pcVar9[iVar8] = '\0';\n            if (iVar8 <= status) break;\n            iVar3 = iVar7 + -2;\n            iVar7 = iVar8;\n          } while ((pcVar9[iVar3] == '\r') || (pcVar9[iVar3] == '\n'));\n        }" if (parenthesized_expression "((status < iVar7) && ((pcVar9[iVar7 + -1] == '\n' || (pcVar9[iVar7 + -1] == '\r'))))" ( (binary_expression "(status < iVar7) && ((pcVar9[iVar7 + -1] == '\n' || (pcVar9[iVar7 + -1] == '\r')))" (parenthesized_expression "(status < iVar7)" ( (binary_expression "status < iVar7" identifier < identifier) )) && (parenthesized_expression "((pcVar9[iVar7 + -1] == '\n' || (pcVar9[iVar7 + -1] == '\r')))" ( (parenthesized_expression "(pcVar9[iVar7 + -1] == '\n' || (pcVar9[iVar7 + -1] == '\r'))" ( (binary_expression "pcVar9[iVar7 + -1] == '\n' || (pcVar9[iVar7 + -1] == '\r')" (binary_expression "pcVar9[iVar7 + -1] == '\n'" (subscript_expression "pcVar9[iVar7 + -1]" identifier [ (binary_expression "iVar7 + -1" identifier + number_literal) ]) == (char_literal "'\n'" ' escape_sequence ')) || (parenthesized_expression "(pcVar9[iVar7 + -1] == '\r')" ( (binary_expression "pcVar9[iVar7 + -1] == '\r'" (subscript_expression "pcVar9[iVar7 + -1]" identifier [ (binary_expression "iVar7 + -1" identifier + number_literal) ]) == (char_literal "'\r'" ' escape_sequence ')) ))) )) ))) )) (compound_statement "{\n          do {\n            iVar8 = iVar7 + -1;\n            pcVar9[iVar8] = '\0';\n            if (iVar8 <= status) break;\n            iVar3 = iVar7 + -2;\n            iVar7 = iVar8;\n          } while ((pcVar9[iVar3] == '\r') || (pcVar9[iVar3] == '\n'));\n        }" { (do_statement "do {\n            iVar8 = iVar7 + -1;\n            pcVar9[iVar8] = '\0';\n            if (iVar8 <= status) break;\n            iVar3 = iVar7 + -2;\n            iVar7 = iVar8;\n          } while ((pcVar9[iVar3] == '\r') || (pcVar9[iVar3] == '\n'));" do (compound_statement "{\n            iVar8 = iVar7 + -1;\n            pcVar9[iVar8] = '\0';\n            if (iVar8 <= status) break;\n            iVar3 = iVar7 + -2;\n            iVar7 = iVar8;\n          }" { (expression_statement "iVar8 = iVar7 + -1;" (assignment_expression "iVar8 = iVar7 + -1" identifier = (binary_expression "iVar7 + -1" identifier + number_literal)) ;) (expression_statement "pcVar9[iVar8] = '\0';" (assignment_expression "pcVar9[iVar8] = '\0'" (subscript_expression "pcVar9[iVar8]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if (iVar8 <= status) break;" if (parenthesized_expression "(iVar8 <= status)" ( (binary_expression "iVar8 <= status" identifier <= identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar3 = iVar7 + -2;" (assignment_expression "iVar3 = iVar7 + -2" identifier = (binary_expression "iVar7 + -2" identifier + number_literal)) ;) (expression_statement "iVar7 = iVar8;" (assignment_expression "iVar7 = iVar8" identifier = identifier) ;) }) while (parenthesized_expression "((pcVar9[iVar3] == '\r') || (pcVar9[iVar3] == '\n'))" ( (binary_expression "(pcVar9[iVar3] == '\r') || (pcVar9[iVar3] == '\n')" (parenthesized_expression "(pcVar9[iVar3] == '\r')" ( (binary_expression "pcVar9[iVar3] == '\r'" (subscript_expression "pcVar9[iVar3]" identifier [ identifier ]) == (char_literal "'\r'" ' escape_sequence ')) )) || (parenthesized_expression "(pcVar9[iVar3] == '\n')" ( (binary_expression "pcVar9[iVar3] == '\n'" (subscript_expression "pcVar9[iVar3]" identifier [ identifier ]) == (char_literal "'\n'" ' escape_sequence ')) ))) )) ;) })) (expression_statement "pcVar4 = dupprintf("Proxy error: %s",pcVar9 + status);" (assignment_expression "pcVar4 = dupprintf("Proxy error: %s",pcVar9 + status)" identifier = (call_expression "dupprintf("Proxy error: %s",pcVar9 + status)" identifier (argument_list "("Proxy error: %s",pcVar9 + status)" ( (string_literal ""Proxy error: %s"" " string_content ") , (binary_expression "pcVar9 + status" identifier + identifier) )))) ;) (expression_statement "(*(*p->plug)->closing)(p->plug,pcVar4,8000,0);" (call_expression "(*(*p->plug)->closing)(p->plug,pcVar4,8000,0)" (parenthesized_expression "(*(*p->plug)->closing)" ( (pointer_expression "*(*p->plug)->closing" * (field_expression "(*p->plug)->closing" (parenthesized_expression "(*p->plug)" ( (pointer_expression "*p->plug" * (field_expression "p->plug" identifier -> field_identifier)) )) -> field_identifier)) )) (argument_list "(p->plug,pcVar4,8000,0)" ( (field_expression "p->plug" identifier -> field_identifier) , identifier , number_literal , number_literal ))) ;) (expression_statement "safefree(pcVar4);" (call_expression "safefree(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) (expression_statement "safefree(pcVar9);" (call_expression "safefree(pcVar9)" identifier (argument_list "(pcVar9)" ( identifier ))) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (expression_statement "safefree(pcVar9);" (call_expression "safefree(pcVar9)" identifier (argument_list "(pcVar9)" ( identifier ))) ;) (expression_statement "p->state = 2;" (assignment_expression "p->state = 2" (field_expression "p->state" identifier -> field_identifier) = number_literal) ;) }) (else_clause "else if (iVar10 != 2) goto LAB_0001edb6;" else (if_statement "if (iVar10 != 2) goto LAB_0001edb6;" if (parenthesized_expression "(iVar10 != 2)" ( (binary_expression "iVar10 != 2" identifier != number_literal) )) (goto_statement "goto LAB_0001edb6;" goto statement_identifier ;)))) (expression_statement "local_238 = &p->pending_input_data;" (assignment_expression "local_238 = &p->pending_input_data" identifier = (pointer_expression "&p->pending_input_data" & (field_expression "p->pending_input_data" identifier -> field_identifier))) ;) (expression_statement "n = bufchain_size(local_238);" (assignment_expression "n = bufchain_size(local_238)" identifier = (call_expression "bufchain_size(local_238)" identifier (argument_list "(local_238)" ( identifier )))) ;) (if_statement "if ((int)n < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }" if (parenthesized_expression "((int)n < 1)" ( (binary_expression "(int)n < 1" (cast_expression "(int)n" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n      __line = 0x2e5;\nLAB_0001f293:\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }" { (expression_statement "__line = 0x2e5;" (assignment_expression "__line = 0x2e5" identifier = number_literal) ;) (labeled_statement "LAB_0001f293:\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");" statement_identifier : comment (expression_statement "__assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");" (call_expression "__assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate")" identifier (argument_list "("len > 0","proxy.c",__line,"proxy_http_negotiate")" ( (string_literal ""len > 0"" " string_content ") , (string_literal ""proxy.c"" " string_content ") , identifier , (string_literal ""proxy_http_negotiate"" " string_content ") ))) ;)) })) (expression_statement "pcVar4 = (char *)safemalloc(n,1);" (assignment_expression "pcVar4 = (char *)safemalloc(n,1)" identifier = (cast_expression "(char *)safemalloc(n,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(n,1)" identifier (argument_list "(n,1)" ( identifier , number_literal ))))) ;) (expression_statement "bufchain_fetch(local_238,pcVar4,n);" (call_expression "bufchain_fetch(local_238,pcVar4,n)" identifier (argument_list "(local_238,pcVar4,n)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar10 = get_line_end(pcVar4,n);" (assignment_expression "iVar10 = get_line_end(pcVar4,n)" identifier = (call_expression "get_line_end(pcVar4,n)" identifier (argument_list "(pcVar4,n)" ( identifier , identifier )))) ;) (expression_statement "pcVar9 = pcVar4;" (assignment_expression "pcVar9 = pcVar4" identifier = identifier) ;) (if_statement "if (-1 < iVar10) {\n      while (2 < iVar10) {\n        pcVar9 = pcVar9 + iVar10;\n        n = n - iVar10;\n        bufchain_consume(local_238,iVar10);\n        iVar10 = get_line_end(pcVar9,n);\n      }\n      if (iVar10 == 2) {\n        iVar10 = 1;\n        bufchain_consume(local_238,2);\n        proxy_activate(p);\n        safefree(pcVar4);\n        goto LAB_0001edd5;\n      }\n    }" if (parenthesized_expression "(-1 < iVar10)" ( (binary_expression "-1 < iVar10" number_literal < identifier) )) (compound_statement "{\n      while (2 < iVar10) {\n        pcVar9 = pcVar9 + iVar10;\n        n = n - iVar10;\n        bufchain_consume(local_238,iVar10);\n        iVar10 = get_line_end(pcVar9,n);\n      }\n      if (iVar10 == 2) {\n        iVar10 = 1;\n        bufchain_consume(local_238,2);\n        proxy_activate(p);\n        safefree(pcVar4);\n        goto LAB_0001edd5;\n      }\n    }" { (while_statement "while (2 < iVar10) {\n        pcVar9 = pcVar9 + iVar10;\n        n = n - iVar10;\n        bufchain_consume(local_238,iVar10);\n        iVar10 = get_line_end(pcVar9,n);\n      }" while (parenthesized_expression "(2 < iVar10)" ( (binary_expression "2 < iVar10" number_literal < identifier) )) (compound_statement "{\n        pcVar9 = pcVar9 + iVar10;\n        n = n - iVar10;\n        bufchain_consume(local_238,iVar10);\n        iVar10 = get_line_end(pcVar9,n);\n      }" { (expression_statement "pcVar9 = pcVar9 + iVar10;" (assignment_expression "pcVar9 = pcVar9 + iVar10" identifier = (binary_expression "pcVar9 + iVar10" identifier + identifier)) ;) (expression_statement "n = n - iVar10;" (assignment_expression "n = n - iVar10" identifier = (binary_expression "n - iVar10" identifier - identifier)) ;) (expression_statement "bufchain_consume(local_238,iVar10);" (call_expression "bufchain_consume(local_238,iVar10)" identifier (argument_list "(local_238,iVar10)" ( identifier , identifier ))) ;) (expression_statement "iVar10 = get_line_end(pcVar9,n);" (assignment_expression "iVar10 = get_line_end(pcVar9,n)" identifier = (call_expression "get_line_end(pcVar9,n)" identifier (argument_list "(pcVar9,n)" ( identifier , identifier )))) ;) })) (if_statement "if (iVar10 == 2) {\n        iVar10 = 1;\n        bufchain_consume(local_238,2);\n        proxy_activate(p);\n        safefree(pcVar4);\n        goto LAB_0001edd5;\n      }" if (parenthesized_expression "(iVar10 == 2)" ( (binary_expression "iVar10 == 2" identifier == number_literal) )) (compound_statement "{\n        iVar10 = 1;\n        bufchain_consume(local_238,2);\n        proxy_activate(p);\n        safefree(pcVar4);\n        goto LAB_0001edd5;\n      }" { (expression_statement "iVar10 = 1;" (assignment_expression "iVar10 = 1" identifier = number_literal) ;) (expression_statement "bufchain_consume(local_238,2);" (call_expression "bufchain_consume(local_238,2)" identifier (argument_list "(local_238,2)" ( identifier , number_literal ))) ;) (expression_statement "proxy_activate(p);" (call_expression "proxy_activate(p)" identifier (argument_list "(p)" ( identifier ))) ;) (expression_statement "safefree(pcVar4);" (call_expression "safefree(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) })) (expression_statement "iVar10 = 1;" (assignment_expression "iVar10 = 1" identifier = number_literal) ;) (expression_statement "safefree(pcVar4);" (call_expression "safefree(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) }) (else_clause "else {\nLAB_0001edb6:\n    iVar10 = 1;\n    (*(*p->plug)->closing)(p->plug,"Proxy error: unexpected proxy error",0x1f41,0);\n  }" else (compound_statement "{\nLAB_0001edb6:\n    iVar10 = 1;\n    (*(*p->plug)->closing)(p->plug,"Proxy error: unexpected proxy error",0x1f41,0);\n  }" { (labeled_statement "LAB_0001edb6:\n    iVar10 = 1;" statement_identifier : (expression_statement "iVar10 = 1;" (assignment_expression "iVar10 = 1" identifier = number_literal) ;)) (expression_statement "(*(*p->plug)->closing)(p->plug,"Proxy error: unexpected proxy error",0x1f41,0);" (call_expression "(*(*p->plug)->closing)(p->plug,"Proxy error: unexpected proxy error",0x1f41,0)" (parenthesized_expression "(*(*p->plug)->closing)" ( (pointer_expression "*(*p->plug)->closing" * (field_expression "(*p->plug)->closing" (parenthesized_expression "(*p->plug)" ( (pointer_expression "*p->plug" * (field_expression "p->plug" identifier -> field_identifier)) )) -> field_identifier)) )) (argument_list "(p->plug,"Proxy error: unexpected proxy error",0x1f41,0)" ( (field_expression "p->plug" identifier -> field_identifier) , (string_literal ""Proxy error: unexpected proxy error"" " string_content ") , number_literal , number_literal ))) ;) }))) (labeled_statement "LAB_0001edd5:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" statement_identifier : (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return iVar10;" return identifier ;) })))
(translation_unit "undefined4 FUN_0001ed60(int param_1,int param_2)\n\n{\n  char *pcVar1;\n  char cVar2;\n  int *piVar3;\n  int iVar4;\n  undefined4 uVar5;\n  char *pcVar6;\n  size_t sVar7;\n  char *pcVar8;\n  char *pcVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  undefined4 uVar13;\n  int in_GS_OFFSET;\n  uint __line;\n  int local_238;\n  undefined1 local_22c [4];\n  undefined1 local_228 [4];\n  int local_224;\n  undefined1 local_220 [512];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1ed69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar4 = *(int *)(param_1 + 0x44);\n  if (iVar4 == -1) {\n    FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);\n    pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14));\n    piVar3 = *(int **)(param_1 + 8);\n    sVar7 = strlen(pcVar6);\n    (**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);\n    FUN_0001d220(pcVar6);\n    pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);\n    pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);\n    if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);\n    *(undefined4 *)(param_1 + 0x44) = 1;\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 0) {\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 1) {\n    uVar13 = 0;\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 3) {\n    uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70));\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 2) {\n    if (iVar4 == 1) {\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }\n    else if (iVar4 != 2) goto LAB_0001edb6;\n    local_238 = param_1 + 0x34;\n    iVar4 = FUN_0001c7f0(local_238);\n    if (iVar4 < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    \n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    uVar5 = FUN_0001c990(iVar4,1);\n    FUN_0001c8e0(local_238,uVar5,iVar4);\n    iVar4 = FUN_0001e850();\n    if (-1 < iVar4) {\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }\n    uVar13 = 1;\n    FUN_0001d220(uVar5);\n  }\n  else {\nLAB_0001edb6:\n    uVar13 = 1;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);\n  }\nLAB_0001edd5:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006dad0();\n  }\n  return uVar13;\n}\n\n" (function_definition "undefined4 FUN_0001ed60(int param_1,int param_2)\n\n{\n  char *pcVar1;\n  char cVar2;\n  int *piVar3;\n  int iVar4;\n  undefined4 uVar5;\n  char *pcVar6;\n  size_t sVar7;\n  char *pcVar8;\n  char *pcVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  undefined4 uVar13;\n  int in_GS_OFFSET;\n  uint __line;\n  int local_238;\n  undefined1 local_22c [4];\n  undefined1 local_228 [4];\n  int local_224;\n  undefined1 local_220 [512];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1ed69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar4 = *(int *)(param_1 + 0x44);\n  if (iVar4 == -1) {\n    FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);\n    pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14));\n    piVar3 = *(int **)(param_1 + 8);\n    sVar7 = strlen(pcVar6);\n    (**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);\n    FUN_0001d220(pcVar6);\n    pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);\n    pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);\n    if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);\n    *(undefined4 *)(param_1 + 0x44) = 1;\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 0) {\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 1) {\n    uVar13 = 0;\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 3) {\n    uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70));\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 2) {\n    if (iVar4 == 1) {\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }\n    else if (iVar4 != 2) goto LAB_0001edb6;\n    local_238 = param_1 + 0x34;\n    iVar4 = FUN_0001c7f0(local_238);\n    if (iVar4 < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    \n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    uVar5 = FUN_0001c990(iVar4,1);\n    FUN_0001c8e0(local_238,uVar5,iVar4);\n    iVar4 = FUN_0001e850();\n    if (-1 < iVar4) {\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }\n    uVar13 = 1;\n    FUN_0001d220(uVar5);\n  }\n  else {\nLAB_0001edb6:\n    uVar13 = 1;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);\n  }\nLAB_0001edd5:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006dad0();\n  }\n  return uVar13;\n}" type_identifier (function_declarator "FUN_0001ed60(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  char *pcVar1;\n  char cVar2;\n  int *piVar3;\n  int iVar4;\n  undefined4 uVar5;\n  char *pcVar6;\n  size_t sVar7;\n  char *pcVar8;\n  char *pcVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  undefined4 uVar13;\n  int in_GS_OFFSET;\n  uint __line;\n  int local_238;\n  undefined1 local_22c [4];\n  undefined1 local_228 [4];\n  int local_224;\n  undefined1 local_220 [512];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1ed69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar4 = *(int *)(param_1 + 0x44);\n  if (iVar4 == -1) {\n    FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);\n    pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14));\n    piVar3 = *(int **)(param_1 + 8);\n    sVar7 = strlen(pcVar6);\n    (**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);\n    FUN_0001d220(pcVar6);\n    pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);\n    pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);\n    if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);\n    *(undefined4 *)(param_1 + 0x44) = 1;\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 0) {\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 1) {\n    uVar13 = 0;\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 3) {\n    uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70));\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 2) {\n    if (iVar4 == 1) {\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }\n    else if (iVar4 != 2) goto LAB_0001edb6;\n    local_238 = param_1 + 0x34;\n    iVar4 = FUN_0001c7f0(local_238);\n    if (iVar4 < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    \n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    uVar5 = FUN_0001c990(iVar4,1);\n    FUN_0001c8e0(local_238,uVar5,iVar4);\n    iVar4 = FUN_0001e850();\n    if (-1 < iVar4) {\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }\n    uVar13 = 1;\n    FUN_0001d220(uVar5);\n  }\n  else {\nLAB_0001edb6:\n    uVar13 = 1;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);\n  }\nLAB_0001edd5:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006dad0();\n  }\n  return uVar13;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "size_t sVar7;" primitive_type identifier ;) (declaration "char *pcVar8;" primitive_type (pointer_declarator "*pcVar8" * identifier) ;) (declaration "char *pcVar9;" primitive_type (pointer_declarator "*pcVar9" * identifier) ;) (declaration "int iVar10;" primitive_type identifier ;) (declaration "int iVar11;" primitive_type identifier ;) (declaration "int iVar12;" primitive_type identifier ;) (declaration "undefined4 uVar13;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint __line;" type_identifier identifier ;) (declaration "int local_238;" primitive_type identifier ;) (declaration "undefined1 local_22c [4];" type_identifier (array_declarator "local_22c [4]" identifier [ number_literal ]) ;) (declaration "undefined1 local_228 [4];" type_identifier (array_declarator "local_228 [4]" identifier [ number_literal ]) ;) (declaration "int local_224;" primitive_type identifier ;) (declaration "undefined1 local_220 [512];" type_identifier (array_declarator "local_220 [512]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1ed69;" (assignment_expression "uStack_14 = 0x1ed69" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = *(int *)(param_1 + 0x44);" (assignment_expression "iVar4 = *(int *)(param_1 + 0x44)" identifier = (pointer_expression "*(int *)(param_1 + 0x44)" * (cast_expression "(int *)(param_1 + 0x44)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) ))))) ;) (if_statement "if (iVar4 == -1) {\n    FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);\n    pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14));\n    piVar3 = *(int **)(param_1 + 8);\n    sVar7 = strlen(pcVar6);\n    (**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);\n    FUN_0001d220(pcVar6);\n    pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);\n    pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);\n    if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);\n    *(undefined4 *)(param_1 + 0x44) = 1;\n    goto LAB_0001edd5;\n  }" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (compound_statement "{\n    FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);\n    pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14));\n    piVar3 = *(int **)(param_1 + 8);\n    sVar7 = strlen(pcVar6);\n    (**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);\n    FUN_0001d220(pcVar6);\n    pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);\n    pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);\n    if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);\n    *(undefined4 *)(param_1 + 0x44) = 1;\n    goto LAB_0001edd5;\n  }" { (expression_statement "FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);" (call_expression "FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x10),local_220,0x200)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) , identifier , number_literal ))) ;) (expression_statement "pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14));" (assignment_expression "pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14))" identifier = (cast_expression "(char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14))" identifier (argument_list "("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14))" ( (string_literal ""CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n"" " string_content escape_sequence escape_sequence string_content escape_sequence escape_sequence ") , identifier , (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) , identifier , (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) ))))) ;) (expression_statement "piVar3 = *(int **)(param_1 + 8);" (assignment_expression "piVar3 = *(int **)(param_1 + 8)" identifier = (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "sVar7 = strlen(pcVar6);" (assignment_expression "sVar7 = strlen(pcVar6)" identifier = (call_expression "strlen(pcVar6)" identifier (argument_list "(pcVar6)" ( identifier )))) ;) (expression_statement "(**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);" (call_expression "(**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7)" (parenthesized_expression "(**(code **)(*piVar3 + 8))" ( (pointer_expression "**(code **)(*piVar3 + 8)" * (pointer_expression "*(code **)(*piVar3 + 8)" * (cast_expression "(code **)(*piVar3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 8)" ( (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "(piVar3,pcVar6,sVar7)" ( identifier , identifier , identifier ))) ;) (expression_statement "FUN_0001d220(pcVar6);" (call_expression "FUN_0001d220(pcVar6)" identifier (argument_list "(pcVar6)" ( identifier ))) ;) (expression_statement "pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);" (assignment_expression "pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10)" identifier = (cast_expression "(char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x74),0x10)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x74)" * (cast_expression "(undefined4 *)(param_1 + 0x74)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x74)" ( (binary_expression "param_1 + 0x74" identifier + number_literal) )))) , number_literal ))))) ;) (expression_statement "pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);" (assignment_expression "pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11)" identifier = (cast_expression "(char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x74),0x11)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x74)" * (cast_expression "(undefined4 *)(param_1 + 0x74)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x74)" ( (binary_expression "param_1 + 0x74" identifier + number_literal) )))) , number_literal ))))) ;) (if_statement "if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }" if (parenthesized_expression "((*pcVar6 != '\0') || (*pcVar8 != '\0'))" ( (binary_expression "(*pcVar6 != '\0') || (*pcVar8 != '\0')" (parenthesized_expression "(*pcVar6 != '\0')" ( (binary_expression "*pcVar6 != '\0'" (pointer_expression "*pcVar6" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(*pcVar8 != '\0')" ( (binary_expression "*pcVar8 != '\0'" (pointer_expression "*pcVar8" * identifier) != (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }" { (expression_statement "pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);" (assignment_expression "pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8)" identifier = (cast_expression "(char *)FUN_0001d000("%s:%s",pcVar6,pcVar8)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001d000("%s:%s",pcVar6,pcVar8)" identifier (argument_list "("%s:%s",pcVar6,pcVar8)" ( (string_literal ""%s:%s"" " string_content ") , identifier , identifier ))))) ;) (expression_statement "sVar7 = strlen(pcVar6);" (assignment_expression "sVar7 = strlen(pcVar6)" identifier = (call_expression "strlen(pcVar6)" identifier (argument_list "(pcVar6)" ( identifier )))) ;) (expression_statement "pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);" (assignment_expression "pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1)" identifier = (cast_expression "(char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c990((sVar7 * 4) / 3 + 100,1)" identifier (argument_list "((sVar7 * 4) / 3 + 100,1)" ( (binary_expression "(sVar7 * 4) / 3 + 100" (binary_expression "(sVar7 * 4) / 3" (parenthesized_expression "(sVar7 * 4)" ( (binary_expression "sVar7 * 4" identifier * number_literal) )) / number_literal) + number_literal) , number_literal ))))) ;) (expression_statement "builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);" (call_expression "builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c)" identifier (argument_list "(pcVar8,"Proxy-Authorization: Basic ",0x1c)" ( identifier , (string_literal ""Proxy-Authorization: Basic "" " string_content ") , number_literal ))) ;) (expression_statement "iVar4 = 0x1b;" (assignment_expression "iVar4 = 0x1b" identifier = number_literal) ;) (if_statement "if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }" if (parenthesized_expression "(sVar7 != 0)" ( (binary_expression "sVar7 != 0" identifier != number_literal) )) (compound_statement "{\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }" { (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (expression_statement "iVar4 = 0x1b;" (assignment_expression "iVar4 = 0x1b" identifier = number_literal) ;) (do_statement "do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);" do (compound_statement "{\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        }" { (expression_statement "pcVar9 = pcVar8 + iVar4;" (assignment_expression "pcVar9 = pcVar8 + iVar4" identifier = (binary_expression "pcVar8 + iVar4" identifier + identifier)) ;) (expression_statement "iVar11 = sVar7 - iVar10;" (assignment_expression "iVar11 = sVar7 - iVar10" identifier = (binary_expression "sVar7 - iVar10" identifier - identifier)) ;) (if_statement "if (3 < iVar11) {\n            iVar11 = 3;\n          }" if (parenthesized_expression "(3 < iVar11)" ( (binary_expression "3 < iVar11" number_literal < identifier) )) (compound_statement "{\n            iVar11 = 3;\n          }" { (expression_statement "iVar11 = 3;" (assignment_expression "iVar11 = 3" identifier = number_literal) ;) })) (expression_statement "iVar4 = iVar4 + 4;" (assignment_expression "iVar4 = iVar4 + 4" identifier = (binary_expression "iVar4 + 4" identifier + number_literal)) ;) (expression_statement "pcVar1 = pcVar6 + iVar10;" (assignment_expression "pcVar1 = pcVar6 + iVar10" identifier = (binary_expression "pcVar6 + iVar10" identifier + identifier)) ;) (expression_statement "iVar10 = iVar10 + 3;" (assignment_expression "iVar10 = iVar10 + 3" identifier = (binary_expression "iVar10 + 3" identifier + number_literal)) ;) (expression_statement "FUN_0001c500(pcVar1,iVar11,pcVar9);" (call_expression "FUN_0001c500(pcVar1,iVar11,pcVar9)" identifier (argument_list "(pcVar1,iVar11,pcVar9)" ( identifier , identifier , identifier ))) ;) }) while (parenthesized_expression "(iVar10 < (int)sVar7)" ( (binary_expression "iVar10 < (int)sVar7" identifier < (cast_expression "(int)sVar7" ( (type_descriptor "int" primitive_type) ) identifier)) )) ;) })) (expression_statement "pcVar9 = pcVar8 + iVar4;" (assignment_expression "pcVar9 = pcVar8 + iVar4" identifier = (binary_expression "pcVar8 + iVar4" identifier + identifier)) ;) (expression_statement "pcVar9[0] = '\r';" (assignment_expression "pcVar9[0] = '\r'" (subscript_expression "pcVar9[0]" identifier [ number_literal ]) = (char_literal "'\r'" ' escape_sequence ')) ;) (expression_statement "pcVar9[1] = '\n';" (assignment_expression "pcVar9[1] = '\n'" (subscript_expression "pcVar9[1]" identifier [ number_literal ]) = (char_literal "'\n'" ' escape_sequence ')) ;) (expression_statement "pcVar9[2] = '\0';" (assignment_expression "pcVar9[2] = '\0'" (subscript_expression "pcVar9[2]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "piVar3 = *(int **)(param_1 + 8);" (assignment_expression "piVar3 = *(int **)(param_1 + 8)" identifier = (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "sVar7 = strlen(pcVar8);" (assignment_expression "sVar7 = strlen(pcVar8)" identifier = (call_expression "strlen(pcVar8)" identifier (argument_list "(pcVar8)" ( identifier )))) ;) (expression_statement "(**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);" (call_expression "(**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7)" (parenthesized_expression "(**(code **)(*piVar3 + 8))" ( (pointer_expression "**(code **)(*piVar3 + 8)" * (pointer_expression "*(code **)(*piVar3 + 8)" * (cast_expression "(code **)(*piVar3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 8)" ( (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "(piVar3,pcVar8,sVar7)" ( identifier , identifier , identifier ))) ;) (expression_statement "FUN_0001d220(pcVar6);" (call_expression "FUN_0001d220(pcVar6)" identifier (argument_list "(pcVar6)" ( identifier ))) ;) (expression_statement "FUN_0001d220(pcVar8);" (call_expression "FUN_0001d220(pcVar8)" identifier (argument_list "(pcVar8)" ( identifier ))) ;) })) (expression_statement "uVar13 = 0;" (assignment_expression "uVar13 = 0" identifier = number_literal) ;) (expression_statement "(**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);" (call_expression "(**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2)" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 8) + 8))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 8) + 8)" * (pointer_expression "*(code **)(**(int **)(param_1 + 8) + 8)" * (cast_expression "(code **)(**(int **)(param_1 + 8) + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 8) + 8)" ( (binary_expression "**(int **)(param_1 + 8) + 8" (pointer_expression "**(int **)(param_1 + 8)" * (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 8),&DAT_0007148d,2)" ( (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) , (pointer_expression "&DAT_0007148d" & identifier) , number_literal ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x44) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x44) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x44)" * (cast_expression "(undefined4 *)(param_1 + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) = number_literal) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (if_statement "if (param_2 == 0) {\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));\n    goto LAB_0001edd5;\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));\n    goto LAB_0001edd5;\n  }" { (expression_statement "uVar13 = 0;" (assignment_expression "uVar13 = 0" identifier = number_literal) ;) (expression_statement "(**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));" (call_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58))" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 0xc) + 4)" * (pointer_expression "*(code **)(**(int **)(param_1 + 0xc) + 4)" * (cast_expression "(code **)(**(int **)(param_1 + 0xc) + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 0xc) + 4)" ( (binary_expression "**(int **)(param_1 + 0xc) + 4" (pointer_expression "**(int **)(param_1 + 0xc)" * (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58))" ( (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 0x50)" * (cast_expression "(undefined4 *)(param_1 + 0x50)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 0x54)" * (cast_expression "(undefined4 *)(param_1 + 0x54)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x54)" ( (binary_expression "param_1 + 0x54" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 0x58)" * (cast_expression "(undefined4 *)(param_1 + 0x58)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x58)" ( (binary_expression "param_1 + 0x58" identifier + number_literal) )))) ))) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (if_statement "if (param_2 == 1) {\n    uVar13 = 0;\n    goto LAB_0001edd5;\n  }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n    uVar13 = 0;\n    goto LAB_0001edd5;\n  }" { (expression_statement "uVar13 = 0;" (assignment_expression "uVar13 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (if_statement "if (param_2 == 3) {\n    uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70));\n    goto LAB_0001edd5;\n  }" if (parenthesized_expression "(param_2 == 3)" ( (binary_expression "param_2 == 3" identifier == number_literal) )) (compound_statement "{\n    uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70));\n    goto LAB_0001edd5;\n  }" { (expression_statement "uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70));" (assignment_expression "uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70))" identifier = (call_expression "(**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70))" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0xc) + 0x10))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 0xc) + 0x10)" * (pointer_expression "*(code **)(**(int **)(param_1 + 0xc) + 0x10)" * (cast_expression "(code **)(**(int **)(param_1 + 0xc) + 0x10)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 0xc) + 0x10)" ( (binary_expression "**(int **)(param_1 + 0xc) + 0x10" (pointer_expression "**(int **)(param_1 + 0xc)" * (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70))" ( (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 0x6c)" * (cast_expression "(undefined4 *)(param_1 + 0x6c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x6c)" ( (binary_expression "param_1 + 0x6c" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 0x70)" * (cast_expression "(undefined4 *)(param_1 + 0x70)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x70)" ( (binary_expression "param_1 + 0x70" identifier + number_literal) )))) )))) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (if_statement "if (param_2 == 2) {\n    if (iVar4 == 1) {\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }\n    else if (iVar4 != 2) goto LAB_0001edb6;\n    local_238 = param_1 + 0x34;\n    iVar4 = FUN_0001c7f0(local_238);\n    if (iVar4 < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    \n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    uVar5 = FUN_0001c990(iVar4,1);\n    FUN_0001c8e0(local_238,uVar5,iVar4);\n    iVar4 = FUN_0001e850();\n    if (-1 < iVar4) {\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }\n    uVar13 = 1;\n    FUN_0001d220(uVar5);\n  }\n  else {\nLAB_0001edb6:\n    uVar13 = 1;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);\n  }" if (parenthesized_expression "(param_2 == 2)" ( (binary_expression "param_2 == 2" identifier == number_literal) )) (compound_statement "{\n    if (iVar4 == 1) {\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }\n    else if (iVar4 != 2) goto LAB_0001edb6;\n    local_238 = param_1 + 0x34;\n    iVar4 = FUN_0001c7f0(local_238);\n    if (iVar4 < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    \n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    uVar5 = FUN_0001c990(iVar4,1);\n    FUN_0001c8e0(local_238,uVar5,iVar4);\n    iVar4 = FUN_0001e850();\n    if (-1 < iVar4) {\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }\n    uVar13 = 1;\n    FUN_0001d220(uVar5);\n  }" { (if_statement "if (iVar4 == 1) {\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }\n    else if (iVar4 != 2) goto LAB_0001edb6;" if (parenthesized_expression "(iVar4 == 1)" ( (binary_expression "iVar4 == 1" identifier == number_literal) )) (compound_statement "{\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }" { (expression_statement "iVar4 = param_1 + 0x34;" (assignment_expression "iVar4 = param_1 + 0x34" identifier = (binary_expression "param_1 + 0x34" identifier + number_literal)) ;) (expression_statement "iVar10 = FUN_0001c7f0(iVar4);" (assignment_expression "iVar10 = FUN_0001c7f0(iVar4)" identifier = (call_expression "FUN_0001c7f0(iVar4)" identifier (argument_list "(iVar4)" ( identifier )))) ;) (if_statement "if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }" if (parenthesized_expression "(iVar10 < 1)" ( (binary_expression "iVar10 < 1" identifier < number_literal) )) (compound_statement "{\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }" { (expression_statement "__line = 0x2af;" (assignment_expression "__line = 0x2af" identifier = number_literal) ;) (goto_statement "goto LAB_0001f293;" goto statement_identifier ;) })) (expression_statement "iVar11 = FUN_0001c990(iVar10 + 1,1);" (assignment_expression "iVar11 = FUN_0001c990(iVar10 + 1,1)" identifier = (call_expression "FUN_0001c990(iVar10 + 1,1)" identifier (argument_list "(iVar10 + 1,1)" ( (binary_expression "iVar10 + 1" identifier + number_literal) , number_literal )))) ;) (expression_statement "FUN_0001c8e0(iVar4,iVar11,iVar10);" (call_expression "FUN_0001c8e0(iVar4,iVar11,iVar10)" identifier (argument_list "(iVar4,iVar11,iVar10)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(undefined1 *)(iVar11 + iVar10) = 0;" (assignment_expression "*(undefined1 *)(iVar11 + iVar10) = 0" (pointer_expression "*(undefined1 *)(iVar11 + iVar10)" * (cast_expression "(undefined1 *)(iVar11 + iVar10)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar11 + iVar10)" ( (binary_expression "iVar11 + iVar10" identifier + identifier) )))) = number_literal) ;) (expression_statement "iVar10 = FUN_0001e850();" (assignment_expression "iVar10 = FUN_0001e850()" identifier = (call_expression "FUN_0001e850()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar13 = 1;" (assignment_expression "uVar13 = 1" identifier = number_literal) ;) (if_statement "if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }" if (parenthesized_expression "(iVar10 < 0)" ( (binary_expression "iVar10 < 0" identifier < number_literal) )) (compound_statement "{\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }" { (expression_statement "FUN_0001d220(iVar11);" (call_expression "FUN_0001d220(iVar11)" identifier (argument_list "(iVar11)" ( identifier ))) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (expression_statement "local_224 = -1;" (assignment_expression "local_224 = -1" identifier = number_literal) ;) (expression_statement "iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);" (assignment_expression "iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224)" identifier = (call_expression "__isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224)" identifier (argument_list "(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224)" ( identifier , (string_literal ""HTTP/%i.%i %n"" " string_content ") , identifier , identifier , (pointer_expression "&local_224" & identifier) )))) ;) (if_statement "if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }" if (parenthesized_expression "((iVar12 < 2) || (local_224 == -1))" ( (binary_expression "(iVar12 < 2) || (local_224 == -1)" (parenthesized_expression "(iVar12 < 2)" ( (binary_expression "iVar12 < 2" identifier < number_literal) )) || (parenthesized_expression "(local_224 == -1)" ( (binary_expression "local_224 == -1" identifier == number_literal) ))) )) (compound_statement "{\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }" { (expression_statement "(**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);" (call_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0)" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 0xc) + 4)" * (pointer_expression "*(code **)(**(int **)(param_1 + 0xc) + 4)" * (cast_expression "(code **)(**(int **)(param_1 + 0xc) + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 0xc) + 4)" ( (binary_expression "**(int **)(param_1 + 0xc) + 4" (pointer_expression "**(int **)(param_1 + 0xc)" * (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0)" ( (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , (string_literal ""Proxy error: HTTP response was absent"" " string_content ") , number_literal , number_literal ))) ;) (expression_statement "FUN_0001d220(iVar11);" (call_expression "FUN_0001d220(iVar11)" identifier (argument_list "(iVar11)" ( identifier ))) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (expression_statement "FUN_0001c800(iVar4,iVar10);" (call_expression "FUN_0001c800(iVar4,iVar10)" identifier (argument_list "(iVar4,iVar10)" ( identifier , identifier ))) ;) (if_statement "if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }" if (parenthesized_expression "(*(char *)(iVar11 + local_224) != '2')" ( (binary_expression "*(char *)(iVar11 + local_224) != '2'" (pointer_expression "*(char *)(iVar11 + local_224)" * (cast_expression "(char *)(iVar11 + local_224)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar11 + local_224)" ( (binary_expression "iVar11 + local_224" identifier + identifier) )))) != (char_literal "'2'" ' character ')) )) (compound_statement "{\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }" { (expression_statement "*(undefined1 *)(iVar11 + iVar10) = 0;" (assignment_expression "*(undefined1 *)(iVar11 + iVar10) = 0" (pointer_expression "*(undefined1 *)(iVar11 + iVar10)" * (cast_expression "(undefined1 *)(iVar11 + iVar10)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar11 + iVar10)" ( (binary_expression "iVar11 + iVar10" identifier + identifier) )))) = number_literal) ;) (if_statement "if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }" if (parenthesized_expression "((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r'))))" ( (binary_expression "(local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))" (parenthesized_expression "(local_224 < iVar10)" ( (binary_expression "local_224 < iVar10" identifier < identifier) )) && (parenthesized_expression "((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))" ( (parenthesized_expression "(cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r'))" ( (comma_expression "cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')" (assignment_expression "cVar2 = *(char *)(iVar11 + -1 + iVar10)" identifier = (pointer_expression "*(char *)(iVar11 + -1 + iVar10)" * (cast_expression "(char *)(iVar11 + -1 + iVar10)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar11 + -1 + iVar10)" ( (binary_expression "iVar11 + -1 + iVar10" (binary_expression "iVar11 + -1" identifier + number_literal) + identifier) ))))) , (binary_expression "cVar2 == '\n' || (cVar2 == '\r')" (binary_expression "cVar2 == '\n'" identifier == (char_literal "'\n'" ' escape_sequence ')) || (parenthesized_expression "(cVar2 == '\r')" ( (binary_expression "cVar2 == '\r'" identifier == (char_literal "'\r'" ' escape_sequence ')) )))) )) ))) )) (compound_statement "{\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }" { (do_statement "do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));" do (compound_statement "{\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          }" { (expression_statement "iVar10 = iVar10 + -1;" (assignment_expression "iVar10 = iVar10 + -1" identifier = (binary_expression "iVar10 + -1" identifier + number_literal)) ;) (expression_statement "*(undefined1 *)(iVar11 + iVar10) = 0;" (assignment_expression "*(undefined1 *)(iVar11 + iVar10) = 0" (pointer_expression "*(undefined1 *)(iVar11 + iVar10)" * (cast_expression "(undefined1 *)(iVar11 + iVar10)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar11 + iVar10)" ( (binary_expression "iVar11 + iVar10" identifier + identifier) )))) = number_literal) ;) (if_statement "if (iVar10 <= local_224) break;" if (parenthesized_expression "(iVar10 <= local_224)" ( (binary_expression "iVar10 <= local_224" identifier <= identifier) )) (break_statement "break;" break ;)) (expression_statement "cVar2 = *(char *)(iVar11 + -1 + iVar10);" (assignment_expression "cVar2 = *(char *)(iVar11 + -1 + iVar10)" identifier = (pointer_expression "*(char *)(iVar11 + -1 + iVar10)" * (cast_expression "(char *)(iVar11 + -1 + iVar10)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar11 + -1 + iVar10)" ( (binary_expression "iVar11 + -1 + iVar10" (binary_expression "iVar11 + -1" identifier + number_literal) + identifier) ))))) ;) }) while (parenthesized_expression "((cVar2 == '\r') || (cVar2 == '\n'))" ( (binary_expression "(cVar2 == '\r') || (cVar2 == '\n')" (parenthesized_expression "(cVar2 == '\r')" ( (binary_expression "cVar2 == '\r'" identifier == (char_literal "'\r'" ' escape_sequence ')) )) || (parenthesized_expression "(cVar2 == '\n')" ( (binary_expression "cVar2 == '\n'" identifier == (char_literal "'\n'" ' escape_sequence ')) ))) )) ;) })) (expression_statement "uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);" (assignment_expression "uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11)" identifier = (call_expression "FUN_0001d000("Proxy error: %s",local_224 + iVar11)" identifier (argument_list "("Proxy error: %s",local_224 + iVar11)" ( (string_literal ""Proxy error: %s"" " string_content ") , (binary_expression "local_224 + iVar11" identifier + identifier) )))) ;) (expression_statement "(**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);" (call_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0)" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 0xc) + 4)" * (pointer_expression "*(code **)(**(int **)(param_1 + 0xc) + 4)" * (cast_expression "(code **)(**(int **)(param_1 + 0xc) + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 0xc) + 4)" ( (binary_expression "**(int **)(param_1 + 0xc) + 4" (pointer_expression "**(int **)(param_1 + 0xc)" * (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 0xc),uVar5,8000,0)" ( (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , identifier , number_literal , number_literal ))) ;) (expression_statement "FUN_0001d220(uVar5);" (call_expression "FUN_0001d220(uVar5)" identifier (argument_list "(uVar5)" ( identifier ))) ;) (expression_statement "FUN_0001d220(iVar11);" (call_expression "FUN_0001d220(iVar11)" identifier (argument_list "(iVar11)" ( identifier ))) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) (expression_statement "FUN_0001d220(iVar11);" (call_expression "FUN_0001d220(iVar11)" identifier (argument_list "(iVar11)" ( identifier ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x44) = 2;" (assignment_expression "*(undefined4 *)(param_1 + 0x44) = 2" (pointer_expression "*(undefined4 *)(param_1 + 0x44)" * (cast_expression "(undefined4 *)(param_1 + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else if (iVar4 != 2) goto LAB_0001edb6;" else (if_statement "if (iVar4 != 2) goto LAB_0001edb6;" if (parenthesized_expression "(iVar4 != 2)" ( (binary_expression "iVar4 != 2" identifier != number_literal) )) (goto_statement "goto LAB_0001edb6;" goto statement_identifier ;)))) (expression_statement "local_238 = param_1 + 0x34;" (assignment_expression "local_238 = param_1 + 0x34" identifier = (binary_expression "param_1 + 0x34" identifier + number_literal)) ;) (expression_statement "iVar4 = FUN_0001c7f0(local_238);" (assignment_expression "iVar4 = FUN_0001c7f0(local_238)" identifier = (call_expression "FUN_0001c7f0(local_238)" identifier (argument_list "(local_238)" ( identifier )))) ;) (if_statement "if (iVar4 < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    \n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }" if (parenthesized_expression "(iVar4 < 1)" ( (binary_expression "iVar4 < 1" identifier < number_literal) )) (compound_statement "{\n      __line = 0x2e5;\nLAB_0001f293:\n                    \n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }" { (expression_statement "__line = 0x2e5;" (assignment_expression "__line = 0x2e5" identifier = number_literal) ;) (labeled_statement "LAB_0001f293:\n                    \n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");" statement_identifier : (expression_statement "__assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");" (call_expression "__assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate")" identifier (argument_list "("len > 0","proxy.c",__line,"proxy_http_negotiate")" ( (string_literal ""len > 0"" " string_content ") , (string_literal ""proxy.c"" " string_content ") , identifier , (string_literal ""proxy_http_negotiate"" " string_content ") ))) ;)) })) (expression_statement "uVar5 = FUN_0001c990(iVar4,1);" (assignment_expression "uVar5 = FUN_0001c990(iVar4,1)" identifier = (call_expression "FUN_0001c990(iVar4,1)" identifier (argument_list "(iVar4,1)" ( identifier , number_literal )))) ;) (expression_statement "FUN_0001c8e0(local_238,uVar5,iVar4);" (call_expression "FUN_0001c8e0(local_238,uVar5,iVar4)" identifier (argument_list "(local_238,uVar5,iVar4)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar4 = FUN_0001e850();" (assignment_expression "iVar4 = FUN_0001e850()" identifier = (call_expression "FUN_0001e850()" identifier (argument_list "()" ( )))) ;) (if_statement "if (-1 < iVar4) {\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }" if (parenthesized_expression "(-1 < iVar4)" ( (binary_expression "-1 < iVar4" number_literal < identifier) )) (compound_statement "{\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }" { (while_statement "while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }" while (parenthesized_expression "(2 < iVar4)" ( (binary_expression "2 < iVar4" number_literal < identifier) )) (compound_statement "{\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }" { (expression_statement "FUN_0001c800(local_238,iVar4);" (call_expression "FUN_0001c800(local_238,iVar4)" identifier (argument_list "(local_238,iVar4)" ( identifier , identifier ))) ;) (expression_statement "iVar4 = FUN_0001e850();" (assignment_expression "iVar4 = FUN_0001e850()" identifier = (call_expression "FUN_0001e850()" identifier (argument_list "()" ( )))) ;) })) (if_statement "if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }" if (parenthesized_expression "(iVar4 == 2)" ( (binary_expression "iVar4 == 2" identifier == number_literal) )) (compound_statement "{\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }" { (expression_statement "uVar13 = 1;" (assignment_expression "uVar13 = 1" identifier = number_literal) ;) (expression_statement "FUN_0001c800(local_238,2);" (call_expression "FUN_0001c800(local_238,2)" identifier (argument_list "(local_238,2)" ( identifier , number_literal ))) ;) (expression_statement "FUN_0001ebd0(param_1);" (call_expression "FUN_0001ebd0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "FUN_0001d220(uVar5);" (call_expression "FUN_0001d220(uVar5)" identifier (argument_list "(uVar5)" ( identifier ))) ;) (goto_statement "goto LAB_0001edd5;" goto statement_identifier ;) })) })) (expression_statement "uVar13 = 1;" (assignment_expression "uVar13 = 1" identifier = number_literal) ;) (expression_statement "FUN_0001d220(uVar5);" (call_expression "FUN_0001d220(uVar5)" identifier (argument_list "(uVar5)" ( identifier ))) ;) }) (else_clause "else {\nLAB_0001edb6:\n    uVar13 = 1;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);\n  }" else (compound_statement "{\nLAB_0001edb6:\n    uVar13 = 1;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);\n  }" { (labeled_statement "LAB_0001edb6:\n    uVar13 = 1;" statement_identifier : (expression_statement "uVar13 = 1;" (assignment_expression "uVar13 = 1" identifier = number_literal) ;)) (expression_statement "(**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);" (call_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0)" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 0xc) + 4)" * (pointer_expression "*(code **)(**(int **)(param_1 + 0xc) + 4)" * (cast_expression "(code **)(**(int **)(param_1 + 0xc) + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 0xc) + 4)" ( (binary_expression "**(int **)(param_1 + 0xc) + 4" (pointer_expression "**(int **)(param_1 + 0xc)" * (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0)" ( (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , (string_literal ""Proxy error: unexpected proxy error"" " string_content ") , number_literal , number_literal ))) ;) }))) (labeled_statement "LAB_0001edd5:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006dad0();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006dad0();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_0006dad0();\n  }" { (expression_statement "FUN_0006dad0();" (call_expression "FUN_0006dad0()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return uVar13;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE 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 IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence escape_sequence string_content escape_sequence escape_sequence ") , IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != (char_literal ' escape_sequence ')) )) || (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != (char_literal ' escape_sequence ')) ))) )) (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 , IDENT ))))) ;) (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 (parenthesized_expression ( (binary_expression IDENT * LIT) )) / LIT) + LIT) , LIT ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , LIT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) }) while (parenthesized_expression ( (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (char_literal ' escape_sequence ')) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (char_literal ' escape_sequence ')) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (char_literal ' escape_sequence ')) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression & IDENT) , LIT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (goto_statement goto statement_identifier ;) })) (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 = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , IDENT , IDENT , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < LIT) )) || (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (string_literal " string_content ") , LIT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) != (char_literal ' character ')) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < IDENT) )) && (parenthesized_expression ( (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) ))))) , (binary_expression (binary_expression IDENT == (char_literal ' escape_sequence ')) || (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )))) )) ))) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) ))))) ;) }) while (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) || (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) ))) )) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , (binary_expression IDENT + IDENT) )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , LIT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , IDENT , (string_literal " string_content ") ))) ;)) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (while_statement while (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (goto_statement goto statement_identifier ;) })) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }) (else_clause else (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (string_literal " string_content ") , LIT , LIT ))) ;) }))) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_0001ed60(int param_1,int param_2)\n\n{\n  char *pcVar1;\n  char cVar2;\n  int *piVar3;\n  int iVar4;\n  undefined4 uVar5;\n  char *pcVar6;\n  size_t sVar7;\n  char *pcVar8;\n  char *pcVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  undefined4 uVar13;\n  int in_GS_OFFSET;\n  uint __line;\n  int local_238;\n  undefined1 local_22c [4];\n  undefined1 local_228 [4];\n  int local_224;\n  undefined1 local_220 [512];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1ed69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar4 = *(int *)(param_1 + 0x44);\n  if (iVar4 == -1) {\n    FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);\n    pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14));\n    piVar3 = *(int **)(param_1 + 8);\n    sVar7 = strlen(pcVar6);\n    (**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);\n    FUN_0001d220(pcVar6);\n    pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);\n    pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);\n    if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);\n    *(undefined4 *)(param_1 + 0x44) = 1;\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 0) {\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 1) {\n    uVar13 = 0;\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 3) {\n    uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70));\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 2) {\n    if (iVar4 == 1) {\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }\n    else if (iVar4 != 2) goto LAB_0001edb6;\n    local_238 = param_1 + 0x34;\n    iVar4 = FUN_0001c7f0(local_238);\n    if (iVar4 < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    \n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    uVar5 = FUN_0001c990(iVar4,1);\n    FUN_0001c8e0(local_238,uVar5,iVar4);\n    iVar4 = FUN_0001e850();\n    if (-1 < iVar4) {\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }\n    uVar13 = 1;\n    FUN_0001d220(uVar5);\n  }\n  else {\nLAB_0001edb6:\n    uVar13 = 1;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);\n  }\nLAB_0001edd5:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006dad0();\n  }\n  return uVar13;\n}" (type_identifier "undefined4") (function_declarator "FUN_0001ed60(int param_1,int param_2)" (identifier "FUN_0001ed60") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  char *pcVar1;\n  char cVar2;\n  int *piVar3;\n  int iVar4;\n  undefined4 uVar5;\n  char *pcVar6;\n  size_t sVar7;\n  char *pcVar8;\n  char *pcVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  undefined4 uVar13;\n  int in_GS_OFFSET;\n  uint __line;\n  int local_238;\n  undefined1 local_22c [4];\n  undefined1 local_228 [4];\n  int local_224;\n  undefined1 local_220 [512];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1ed69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar4 = *(int *)(param_1 + 0x44);\n  if (iVar4 == -1) {\n    FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);\n    pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14));\n    piVar3 = *(int **)(param_1 + 8);\n    sVar7 = strlen(pcVar6);\n    (**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);\n    FUN_0001d220(pcVar6);\n    pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);\n    pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);\n    if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);\n    *(undefined4 *)(param_1 + 0x44) = 1;\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 0) {\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 1) {\n    uVar13 = 0;\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 3) {\n    uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70));\n    goto LAB_0001edd5;\n  }\n  if (param_2 == 2) {\n    if (iVar4 == 1) {\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }\n    else if (iVar4 != 2) goto LAB_0001edb6;\n    local_238 = param_1 + 0x34;\n    iVar4 = FUN_0001c7f0(local_238);\n    if (iVar4 < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    \n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    uVar5 = FUN_0001c990(iVar4,1);\n    FUN_0001c8e0(local_238,uVar5,iVar4);\n    iVar4 = FUN_0001e850();\n    if (-1 < iVar4) {\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }\n    uVar13 = 1;\n    FUN_0001d220(uVar5);\n  }\n  else {\nLAB_0001edb6:\n    uVar13 = 1;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);\n  }\nLAB_0001edd5:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006dad0();\n  }\n  return uVar13;\n}" ({ "{") (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "char cVar2;" (primitive_type "char") (identifier "cVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (declaration "char *pcVar6;" (primitive_type "char") (pointer_declarator "*pcVar6" (* "*") (identifier "pcVar6")) (; ";")) (declaration "size_t sVar7;" (primitive_type "size_t") (identifier "sVar7") (; ";")) (declaration "char *pcVar8;" (primitive_type "char") (pointer_declarator "*pcVar8" (* "*") (identifier "pcVar8")) (; ";")) (declaration "char *pcVar9;" (primitive_type "char") (pointer_declarator "*pcVar9" (* "*") (identifier "pcVar9")) (; ";")) (declaration "int iVar10;" (primitive_type "int") (identifier "iVar10") (; ";")) (declaration "int iVar11;" (primitive_type "int") (identifier "iVar11") (; ";")) (declaration "int iVar12;" (primitive_type "int") (identifier "iVar12") (; ";")) (declaration "undefined4 uVar13;" (type_identifier "undefined4") (identifier "uVar13") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "uint __line;" (type_identifier "uint") (identifier "__line") (; ";")) (declaration "int local_238;" (primitive_type "int") (identifier "local_238") (; ";")) (declaration "undefined1 local_22c [4];" (type_identifier "undefined1") (array_declarator "local_22c [4]" (identifier "local_22c") ([ "[") (number_literal "4") (] "]")) (; ";")) (declaration "undefined1 local_228 [4];" (type_identifier "undefined1") (array_declarator "local_228 [4]" (identifier "local_228") ([ "[") (number_literal "4") (] "]")) (; ";")) (declaration "int local_224;" (primitive_type "int") (identifier "local_224") (; ";")) (declaration "undefined1 local_220 [512];" (type_identifier "undefined1") (array_declarator "local_220 [512]" (identifier "local_220") ([ "[") (number_literal "512") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x1ed69;" (assignment_expression "uStack_14 = 0x1ed69" (identifier "uStack_14") (= "=") (number_literal "0x1ed69")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "iVar4 = *(int *)(param_1 + 0x44);" (assignment_expression "iVar4 = *(int *)(param_1 + 0x44)" (identifier "iVar4") (= "=") (pointer_expression "*(int *)(param_1 + 0x44)" (* "*") (cast_expression "(int *)(param_1 + 0x44)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x44)" (( "(") (binary_expression "param_1 + 0x44" (identifier "param_1") (+ "+") (number_literal "0x44")) () ")"))))) (; ";")) (if_statement "if (iVar4 == -1) {\n    FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);\n    pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14));\n    piVar3 = *(int **)(param_1 + 8);\n    sVar7 = strlen(pcVar6);\n    (**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);\n    FUN_0001d220(pcVar6);\n    pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);\n    pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);\n    if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);\n    *(undefined4 *)(param_1 + 0x44) = 1;\n    goto LAB_0001edd5;\n  }" (if "if") (parenthesized_expression "(iVar4 == -1)" (( "(") (binary_expression "iVar4 == -1" (identifier "iVar4") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n    FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);\n    pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14));\n    piVar3 = *(int **)(param_1 + 8);\n    sVar7 = strlen(pcVar6);\n    (**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);\n    FUN_0001d220(pcVar6);\n    pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);\n    pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);\n    if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);\n    *(undefined4 *)(param_1 + 0x44) = 1;\n    goto LAB_0001edd5;\n  }" ({ "{") (expression_statement "FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);" (call_expression "FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200)" (identifier "FUN_00064790") (argument_list "(*(undefined4 *)(param_1 + 0x10),local_220,0x200)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (, ",") (identifier "local_220") (, ",") (number_literal "0x200") () ")"))) (; ";")) (expression_statement "pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14));" (assignment_expression "pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14))" (identifier "pcVar6") (= "=") (cast_expression "(char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14))" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14))" (identifier "FUN_0001d000") (argument_list "("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,\n                                  *(undefined4 *)(param_1 + 0x14),local_220,\n                                  *(undefined4 *)(param_1 + 0x14))" (( "(") (string_literal ""CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n"" (" """) (string_content "CONNECT %s:%i HTTP/1.1") (escape_sequence "\r") (escape_sequence "\n") (string_content "Host: %s:%i") (escape_sequence "\r") (escape_sequence "\n") (" """)) (, ",") (identifier "local_220") (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x14)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (, ",") (identifier "local_220") (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x14)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) () ")"))))) (; ";")) (expression_statement "piVar3 = *(int **)(param_1 + 8);" (assignment_expression "piVar3 = *(int **)(param_1 + 8)" (identifier "piVar3") (= "=") (pointer_expression "*(int **)(param_1 + 8)" (* "*") (cast_expression "(int **)(param_1 + 8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "sVar7 = strlen(pcVar6);" (assignment_expression "sVar7 = strlen(pcVar6)" (identifier "sVar7") (= "=") (call_expression "strlen(pcVar6)" (identifier "strlen") (argument_list "(pcVar6)" (( "(") (identifier "pcVar6") () ")")))) (; ";")) (expression_statement "(**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);" (call_expression "(**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7)" (parenthesized_expression "(**(code **)(*piVar3 + 8))" (( "(") (pointer_expression "**(code **)(*piVar3 + 8)" (* "*") (pointer_expression "*(code **)(*piVar3 + 8)" (* "*") (cast_expression "(code **)(*piVar3 + 8)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar3 + 8)" (( "(") (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (+ "+") (number_literal "8")) () ")"))))) () ")")) (argument_list "(piVar3,pcVar6,sVar7)" (( "(") (identifier "piVar3") (, ",") (identifier "pcVar6") (, ",") (identifier "sVar7") () ")"))) (; ";")) (expression_statement "FUN_0001d220(pcVar6);" (call_expression "FUN_0001d220(pcVar6)" (identifier "FUN_0001d220") (argument_list "(pcVar6)" (( "(") (identifier "pcVar6") () ")"))) (; ";")) (expression_statement "pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);" (assignment_expression "pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10)" (identifier "pcVar6") (= "=") (cast_expression "(char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10)" (identifier "FUN_00018b50") (argument_list "(*(undefined4 *)(param_1 + 0x74),0x10)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x74)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x74)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x74)" (( "(") (binary_expression "param_1 + 0x74" (identifier "param_1") (+ "+") (number_literal "0x74")) () ")")))) (, ",") (number_literal "0x10") () ")"))))) (; ";")) (expression_statement "pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);" (assignment_expression "pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11)" (identifier "pcVar8") (= "=") (cast_expression "(char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11)" (identifier "FUN_00018b50") (argument_list "(*(undefined4 *)(param_1 + 0x74),0x11)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x74)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x74)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x74)" (( "(") (binary_expression "param_1 + 0x74" (identifier "param_1") (+ "+") (number_literal "0x74")) () ")")))) (, ",") (number_literal "0x11") () ")"))))) (; ";")) (if_statement "if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }" (if "if") (parenthesized_expression "((*pcVar6 != '\0') || (*pcVar8 != '\0'))" (( "(") (binary_expression "(*pcVar6 != '\0') || (*pcVar8 != '\0')" (parenthesized_expression "(*pcVar6 != '\0')" (( "(") (binary_expression "*pcVar6 != '\0'" (pointer_expression "*pcVar6" (* "*") (identifier "pcVar6")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (|| "||") (parenthesized_expression "(*pcVar8 != '\0')" (( "(") (binary_expression "*pcVar8 != '\0'" (pointer_expression "*pcVar8" (* "*") (identifier "pcVar8")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (compound_statement "{\n      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);\n      sVar7 = strlen(pcVar6);\n      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);\n      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);\n      iVar4 = 0x1b;\n      if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }\n      pcVar9 = pcVar8 + iVar4;\n      pcVar9[0] = '\r';\n      pcVar9[1] = '\n';\n      pcVar9[2] = '\0';\n      piVar3 = *(int **)(param_1 + 8);\n      sVar7 = strlen(pcVar8);\n      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);\n      FUN_0001d220(pcVar6);\n      FUN_0001d220(pcVar8);\n    }" ({ "{") (expression_statement "pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);" (assignment_expression "pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8)" (identifier "pcVar6") (= "=") (cast_expression "(char *)FUN_0001d000("%s:%s",pcVar6,pcVar8)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001d000("%s:%s",pcVar6,pcVar8)" (identifier "FUN_0001d000") (argument_list "("%s:%s",pcVar6,pcVar8)" (( "(") (string_literal ""%s:%s"" (" """) (string_content "%s:%s") (" """)) (, ",") (identifier "pcVar6") (, ",") (identifier "pcVar8") () ")"))))) (; ";")) (expression_statement "sVar7 = strlen(pcVar6);" (assignment_expression "sVar7 = strlen(pcVar6)" (identifier "sVar7") (= "=") (call_expression "strlen(pcVar6)" (identifier "strlen") (argument_list "(pcVar6)" (( "(") (identifier "pcVar6") () ")")))) (; ";")) (expression_statement "pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);" (assignment_expression "pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1)" (identifier "pcVar8") (= "=") (cast_expression "(char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001c990((sVar7 * 4) / 3 + 100,1)" (identifier "FUN_0001c990") (argument_list "((sVar7 * 4) / 3 + 100,1)" (( "(") (binary_expression "(sVar7 * 4) / 3 + 100" (binary_expression "(sVar7 * 4) / 3" (parenthesized_expression "(sVar7 * 4)" (( "(") (binary_expression "sVar7 * 4" (identifier "sVar7") (* "*") (number_literal "4")) () ")")) (/ "/") (number_literal "3")) (+ "+") (number_literal "100")) (, ",") (number_literal "1") () ")"))))) (; ";")) (expression_statement "builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);" (call_expression "builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c)" (identifier "builtin_strncpy") (argument_list "(pcVar8,"Proxy-Authorization: Basic ",0x1c)" (( "(") (identifier "pcVar8") (, ",") (string_literal ""Proxy-Authorization: Basic "" (" """) (string_content "Proxy-Authorization: Basic ") (" """)) (, ",") (number_literal "0x1c") () ")"))) (; ";")) (expression_statement "iVar4 = 0x1b;" (assignment_expression "iVar4 = 0x1b" (identifier "iVar4") (= "=") (number_literal "0x1b")) (; ";")) (if_statement "if (sVar7 != 0) {\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }" (if "if") (parenthesized_expression "(sVar7 != 0)" (( "(") (binary_expression "sVar7 != 0" (identifier "sVar7") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        iVar10 = 0;\n        iVar4 = 0x1b;\n        do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);\n      }" ({ "{") (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" (identifier "iVar10") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar4 = 0x1b;" (assignment_expression "iVar4 = 0x1b" (identifier "iVar4") (= "=") (number_literal "0x1b")) (; ";")) (do_statement "do {\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        } while (iVar10 < (int)sVar7);" (do "do") (compound_statement "{\n          pcVar9 = pcVar8 + iVar4;\n          iVar11 = sVar7 - iVar10;\n          if (3 < iVar11) {\n            iVar11 = 3;\n          }\n          iVar4 = iVar4 + 4;\n          pcVar1 = pcVar6 + iVar10;\n          iVar10 = iVar10 + 3;\n          FUN_0001c500(pcVar1,iVar11,pcVar9);\n        }" ({ "{") (expression_statement "pcVar9 = pcVar8 + iVar4;" (assignment_expression "pcVar9 = pcVar8 + iVar4" (identifier "pcVar9") (= "=") (binary_expression "pcVar8 + iVar4" (identifier "pcVar8") (+ "+") (identifier "iVar4"))) (; ";")) (expression_statement "iVar11 = sVar7 - iVar10;" (assignment_expression "iVar11 = sVar7 - iVar10" (identifier "iVar11") (= "=") (binary_expression "sVar7 - iVar10" (identifier "sVar7") (- "-") (identifier "iVar10"))) (; ";")) (if_statement "if (3 < iVar11) {\n            iVar11 = 3;\n          }" (if "if") (parenthesized_expression "(3 < iVar11)" (( "(") (binary_expression "3 < iVar11" (number_literal "3") (< "<") (identifier "iVar11")) () ")")) (compound_statement "{\n            iVar11 = 3;\n          }" ({ "{") (expression_statement "iVar11 = 3;" (assignment_expression "iVar11 = 3" (identifier "iVar11") (= "=") (number_literal "3")) (; ";")) (} "}"))) (expression_statement "iVar4 = iVar4 + 4;" (assignment_expression "iVar4 = iVar4 + 4" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 4" (identifier "iVar4") (+ "+") (number_literal "4"))) (; ";")) (expression_statement "pcVar1 = pcVar6 + iVar10;" (assignment_expression "pcVar1 = pcVar6 + iVar10" (identifier "pcVar1") (= "=") (binary_expression "pcVar6 + iVar10" (identifier "pcVar6") (+ "+") (identifier "iVar10"))) (; ";")) (expression_statement "iVar10 = iVar10 + 3;" (assignment_expression "iVar10 = iVar10 + 3" (identifier "iVar10") (= "=") (binary_expression "iVar10 + 3" (identifier "iVar10") (+ "+") (number_literal "3"))) (; ";")) (expression_statement "FUN_0001c500(pcVar1,iVar11,pcVar9);" (call_expression "FUN_0001c500(pcVar1,iVar11,pcVar9)" (identifier "FUN_0001c500") (argument_list "(pcVar1,iVar11,pcVar9)" (( "(") (identifier "pcVar1") (, ",") (identifier "iVar11") (, ",") (identifier "pcVar9") () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar10 < (int)sVar7)" (( "(") (binary_expression "iVar10 < (int)sVar7" (identifier "iVar10") (< "<") (cast_expression "(int)sVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "sVar7"))) () ")")) (; ";")) (} "}"))) (expression_statement "pcVar9 = pcVar8 + iVar4;" (assignment_expression "pcVar9 = pcVar8 + iVar4" (identifier "pcVar9") (= "=") (binary_expression "pcVar8 + iVar4" (identifier "pcVar8") (+ "+") (identifier "iVar4"))) (; ";")) (expression_statement "pcVar9[0] = '\r';" (assignment_expression "pcVar9[0] = '\r'" (subscript_expression "pcVar9[0]" (identifier "pcVar9") ([ "[") (number_literal "0") (] "]")) (= "=") (char_literal "'\r'" (' "'") (escape_sequence "\r") (' "'"))) (; ";")) (expression_statement "pcVar9[1] = '\n';" (assignment_expression "pcVar9[1] = '\n'" (subscript_expression "pcVar9[1]" (identifier "pcVar9") ([ "[") (number_literal "1") (] "]")) (= "=") (char_literal "'\n'" (' "'") (escape_sequence "\n") (' "'"))) (; ";")) (expression_statement "pcVar9[2] = '\0';" (assignment_expression "pcVar9[2] = '\0'" (subscript_expression "pcVar9[2]" (identifier "pcVar9") ([ "[") (number_literal "2") (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (expression_statement "piVar3 = *(int **)(param_1 + 8);" (assignment_expression "piVar3 = *(int **)(param_1 + 8)" (identifier "piVar3") (= "=") (pointer_expression "*(int **)(param_1 + 8)" (* "*") (cast_expression "(int **)(param_1 + 8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "sVar7 = strlen(pcVar8);" (assignment_expression "sVar7 = strlen(pcVar8)" (identifier "sVar7") (= "=") (call_expression "strlen(pcVar8)" (identifier "strlen") (argument_list "(pcVar8)" (( "(") (identifier "pcVar8") () ")")))) (; ";")) (expression_statement "(**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);" (call_expression "(**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7)" (parenthesized_expression "(**(code **)(*piVar3 + 8))" (( "(") (pointer_expression "**(code **)(*piVar3 + 8)" (* "*") (pointer_expression "*(code **)(*piVar3 + 8)" (* "*") (cast_expression "(code **)(*piVar3 + 8)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar3 + 8)" (( "(") (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (+ "+") (number_literal "8")) () ")"))))) () ")")) (argument_list "(piVar3,pcVar8,sVar7)" (( "(") (identifier "piVar3") (, ",") (identifier "pcVar8") (, ",") (identifier "sVar7") () ")"))) (; ";")) (expression_statement "FUN_0001d220(pcVar6);" (call_expression "FUN_0001d220(pcVar6)" (identifier "FUN_0001d220") (argument_list "(pcVar6)" (( "(") (identifier "pcVar6") () ")"))) (; ";")) (expression_statement "FUN_0001d220(pcVar8);" (call_expression "FUN_0001d220(pcVar8)" (identifier "FUN_0001d220") (argument_list "(pcVar8)" (( "(") (identifier "pcVar8") () ")"))) (; ";")) (} "}"))) (expression_statement "uVar13 = 0;" (assignment_expression "uVar13 = 0" (identifier "uVar13") (= "=") (number_literal "0")) (; ";")) (expression_statement "(**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);" (call_expression "(**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2)" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 8) + 8))" (( "(") (pointer_expression "**(code **)(**(int **)(param_1 + 8) + 8)" (* "*") (pointer_expression "*(code **)(**(int **)(param_1 + 8) + 8)" (* "*") (cast_expression "(code **)(**(int **)(param_1 + 8) + 8)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(**(int **)(param_1 + 8) + 8)" (( "(") (binary_expression "**(int **)(param_1 + 8) + 8" (pointer_expression "**(int **)(param_1 + 8)" (* "*") (pointer_expression "*(int **)(param_1 + 8)" (* "*") (cast_expression "(int **)(param_1 + 8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (+ "+") (number_literal "8")) () ")"))))) () ")")) (argument_list "(*(int **)(param_1 + 8),&DAT_0007148d,2)" (( "(") (pointer_expression "*(int **)(param_1 + 8)" (* "*") (cast_expression "(int **)(param_1 + 8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (, ",") (pointer_expression "&DAT_0007148d" (& "&") (identifier "DAT_0007148d")) (, ",") (number_literal "2") () ")"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x44) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x44) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x44)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x44)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x44)" (( "(") (binary_expression "param_1 + 0x44" (identifier "param_1") (+ "+") (number_literal "0x44")) () ")")))) (= "=") (number_literal "1")) (; ";")) (goto_statement "goto LAB_0001edd5;" (goto "goto") (statement_identifier "LAB_0001edd5") (; ";")) (} "}"))) (if_statement "if (param_2 == 0) {\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));\n    goto LAB_0001edd5;\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar13 = 0;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));\n    goto LAB_0001edd5;\n  }" ({ "{") (expression_statement "uVar13 = 0;" (assignment_expression "uVar13 = 0" (identifier "uVar13") (= "=") (number_literal "0")) (; ";")) (expression_statement "(**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));" (call_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58))" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))" (( "(") (pointer_expression "**(code **)(**(int **)(param_1 + 0xc) + 4)" (* "*") (pointer_expression "*(code **)(**(int **)(param_1 + 0xc) + 4)" (* "*") (cast_expression "(code **)(**(int **)(param_1 + 0xc) + 4)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(**(int **)(param_1 + 0xc) + 4)" (( "(") (binary_expression "**(int **)(param_1 + 0xc) + 4" (pointer_expression "**(int **)(param_1 + 0xc)" (* "*") (pointer_expression "*(int **)(param_1 + 0xc)" (* "*") (cast_expression "(int **)(param_1 + 0xc)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (+ "+") (number_literal "4")) () ")"))))) () ")")) (argument_list "(*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),\n               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58))" (( "(") (pointer_expression "*(int **)(param_1 + 0xc)" (* "*") (cast_expression "(int **)(param_1 + 0xc)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x50)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x50)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x50)" (( "(") (binary_expression "param_1 + 0x50" (identifier "param_1") (+ "+") (number_literal "0x50")) () ")")))) (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x54)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x54)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x54)" (( "(") (binary_expression "param_1 + 0x54" (identifier "param_1") (+ "+") (number_literal "0x54")) () ")")))) (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x58)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x58)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x58)" (( "(") (binary_expression "param_1 + 0x58" (identifier "param_1") (+ "+") (number_literal "0x58")) () ")")))) () ")"))) (; ";")) (goto_statement "goto LAB_0001edd5;" (goto "goto") (statement_identifier "LAB_0001edd5") (; ";")) (} "}"))) (if_statement "if (param_2 == 1) {\n    uVar13 = 0;\n    goto LAB_0001edd5;\n  }" (if "if") (parenthesized_expression "(param_2 == 1)" (( "(") (binary_expression "param_2 == 1" (identifier "param_2") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    uVar13 = 0;\n    goto LAB_0001edd5;\n  }" ({ "{") (expression_statement "uVar13 = 0;" (assignment_expression "uVar13 = 0" (identifier "uVar13") (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_0001edd5;" (goto "goto") (statement_identifier "LAB_0001edd5") (; ";")) (} "}"))) (if_statement "if (param_2 == 3) {\n    uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70));\n    goto LAB_0001edd5;\n  }" (if "if") (parenthesized_expression "(param_2 == 3)" (( "(") (binary_expression "param_2 == 3" (identifier "param_2") (== "==") (number_literal "3")) () ")")) (compound_statement "{\n    uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70));\n    goto LAB_0001edd5;\n  }" ({ "{") (expression_statement "uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70));" (assignment_expression "uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70))" (identifier "uVar13") (= "=") (call_expression "(**(code **)(**(int **)(param_1 + 0xc) + 0x10))\n                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70))" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0xc) + 0x10))" (( "(") (pointer_expression "**(code **)(**(int **)(param_1 + 0xc) + 0x10)" (* "*") (pointer_expression "*(code **)(**(int **)(param_1 + 0xc) + 0x10)" (* "*") (cast_expression "(code **)(**(int **)(param_1 + 0xc) + 0x10)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(**(int **)(param_1 + 0xc) + 0x10)" (( "(") (binary_expression "**(int **)(param_1 + 0xc) + 0x10" (pointer_expression "**(int **)(param_1 + 0xc)" (* "*") (pointer_expression "*(int **)(param_1 + 0xc)" (* "*") (cast_expression "(int **)(param_1 + 0xc)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (+ "+") (number_literal "0x10")) () ")"))))) () ")")) (argument_list "(*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),\n                        *(undefined4 *)(param_1 + 0x70))" (( "(") (pointer_expression "*(int **)(param_1 + 0xc)" (* "*") (cast_expression "(int **)(param_1 + 0xc)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x6c)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x6c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x6c)" (( "(") (binary_expression "param_1 + 0x6c" (identifier "param_1") (+ "+") (number_literal "0x6c")) () ")")))) (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x70)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x70)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x70)" (( "(") (binary_expression "param_1 + 0x70" (identifier "param_1") (+ "+") (number_literal "0x70")) () ")")))) () ")")))) (; ";")) (goto_statement "goto LAB_0001edd5;" (goto "goto") (statement_identifier "LAB_0001edd5") (; ";")) (} "}"))) (if_statement "if (param_2 == 2) {\n    if (iVar4 == 1) {\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }\n    else if (iVar4 != 2) goto LAB_0001edb6;\n    local_238 = param_1 + 0x34;\n    iVar4 = FUN_0001c7f0(local_238);\n    if (iVar4 < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    \n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    uVar5 = FUN_0001c990(iVar4,1);\n    FUN_0001c8e0(local_238,uVar5,iVar4);\n    iVar4 = FUN_0001e850();\n    if (-1 < iVar4) {\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }\n    uVar13 = 1;\n    FUN_0001d220(uVar5);\n  }\n  else {\nLAB_0001edb6:\n    uVar13 = 1;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);\n  }" (if "if") (parenthesized_expression "(param_2 == 2)" (( "(") (binary_expression "param_2 == 2" (identifier "param_2") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n    if (iVar4 == 1) {\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }\n    else if (iVar4 != 2) goto LAB_0001edb6;\n    local_238 = param_1 + 0x34;\n    iVar4 = FUN_0001c7f0(local_238);\n    if (iVar4 < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    \n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }\n    uVar5 = FUN_0001c990(iVar4,1);\n    FUN_0001c8e0(local_238,uVar5,iVar4);\n    iVar4 = FUN_0001e850();\n    if (-1 < iVar4) {\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }\n    uVar13 = 1;\n    FUN_0001d220(uVar5);\n  }" ({ "{") (if_statement "if (iVar4 == 1) {\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }\n    else if (iVar4 != 2) goto LAB_0001edb6;" (if "if") (parenthesized_expression "(iVar4 == 1)" (( "(") (binary_expression "iVar4 == 1" (identifier "iVar4") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      iVar4 = param_1 + 0x34;\n      iVar10 = FUN_0001c7f0(iVar4);\n      if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }\n      iVar11 = FUN_0001c990(iVar10 + 1,1);\n      FUN_0001c8e0(iVar4,iVar11,iVar10);\n      *(undefined1 *)(iVar11 + iVar10) = 0;\n      iVar10 = FUN_0001e850();\n      uVar13 = 1;\n      if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      local_224 = -1;\n      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);\n      if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001c800(iVar4,iVar10);\n      if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }\n      FUN_0001d220(iVar11);\n      *(undefined4 *)(param_1 + 0x44) = 2;\n    }" ({ "{") (expression_statement "iVar4 = param_1 + 0x34;" (assignment_expression "iVar4 = param_1 + 0x34" (identifier "iVar4") (= "=") (binary_expression "param_1 + 0x34" (identifier "param_1") (+ "+") (number_literal "0x34"))) (; ";")) (expression_statement "iVar10 = FUN_0001c7f0(iVar4);" (assignment_expression "iVar10 = FUN_0001c7f0(iVar4)" (identifier "iVar10") (= "=") (call_expression "FUN_0001c7f0(iVar4)" (identifier "FUN_0001c7f0") (argument_list "(iVar4)" (( "(") (identifier "iVar4") () ")")))) (; ";")) (if_statement "if (iVar10 < 1) {\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }" (if "if") (parenthesized_expression "(iVar10 < 1)" (( "(") (binary_expression "iVar10 < 1" (identifier "iVar10") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n        __line = 0x2af;\n        goto LAB_0001f293;\n      }" ({ "{") (expression_statement "__line = 0x2af;" (assignment_expression "__line = 0x2af" (identifier "__line") (= "=") (number_literal "0x2af")) (; ";")) (goto_statement "goto LAB_0001f293;" (goto "goto") (statement_identifier "LAB_0001f293") (; ";")) (} "}"))) (expression_statement "iVar11 = FUN_0001c990(iVar10 + 1,1);" (assignment_expression "iVar11 = FUN_0001c990(iVar10 + 1,1)" (identifier "iVar11") (= "=") (call_expression "FUN_0001c990(iVar10 + 1,1)" (identifier "FUN_0001c990") (argument_list "(iVar10 + 1,1)" (( "(") (binary_expression "iVar10 + 1" (identifier "iVar10") (+ "+") (number_literal "1")) (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "FUN_0001c8e0(iVar4,iVar11,iVar10);" (call_expression "FUN_0001c8e0(iVar4,iVar11,iVar10)" (identifier "FUN_0001c8e0") (argument_list "(iVar4,iVar11,iVar10)" (( "(") (identifier "iVar4") (, ",") (identifier "iVar11") (, ",") (identifier "iVar10") () ")"))) (; ";")) (expression_statement "*(undefined1 *)(iVar11 + iVar10) = 0;" (assignment_expression "*(undefined1 *)(iVar11 + iVar10) = 0" (pointer_expression "*(undefined1 *)(iVar11 + iVar10)" (* "*") (cast_expression "(undefined1 *)(iVar11 + iVar10)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar11 + iVar10)" (( "(") (binary_expression "iVar11 + iVar10" (identifier "iVar11") (+ "+") (identifier "iVar10")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar10 = FUN_0001e850();" (assignment_expression "iVar10 = FUN_0001e850()" (identifier "iVar10") (= "=") (call_expression "FUN_0001e850()" (identifier "FUN_0001e850") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar13 = 1;" (assignment_expression "uVar13 = 1" (identifier "uVar13") (= "=") (number_literal "1")) (; ";")) (if_statement "if (iVar10 < 0) {\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }" (if "if") (parenthesized_expression "(iVar10 < 0)" (( "(") (binary_expression "iVar10 < 0" (identifier "iVar10") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }" ({ "{") (expression_statement "FUN_0001d220(iVar11);" (call_expression "FUN_0001d220(iVar11)" (identifier "FUN_0001d220") (argument_list "(iVar11)" (( "(") (identifier "iVar11") () ")"))) (; ";")) (goto_statement "goto LAB_0001edd5;" (goto "goto") (statement_identifier "LAB_0001edd5") (; ";")) (} "}"))) (expression_statement "local_224 = -1;" (assignment_expression "local_224 = -1" (identifier "local_224") (= "=") (number_literal "-1")) (; ";")) (expression_statement "iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);" (assignment_expression "iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224)" (identifier "iVar12") (= "=") (call_expression "__isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224)" (identifier "__isoc99_sscanf") (argument_list "(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224)" (( "(") (identifier "iVar11") (, ",") (string_literal ""HTTP/%i.%i %n"" (" """) (string_content "HTTP/%i.%i %n") (" """)) (, ",") (identifier "local_228") (, ",") (identifier "local_22c") (, ",") (pointer_expression "&local_224" (& "&") (identifier "local_224")) () ")")))) (; ";")) (if_statement "if ((iVar12 < 2) || (local_224 == -1)) {\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }" (if "if") (parenthesized_expression "((iVar12 < 2) || (local_224 == -1))" (( "(") (binary_expression "(iVar12 < 2) || (local_224 == -1)" (parenthesized_expression "(iVar12 < 2)" (( "(") (binary_expression "iVar12 < 2" (identifier "iVar12") (< "<") (number_literal "2")) () ")")) (|| "||") (parenthesized_expression "(local_224 == -1)" (( "(") (binary_expression "local_224 == -1" (identifier "local_224") (== "==") (number_literal "-1")) () ")"))) () ")")) (compound_statement "{\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }" ({ "{") (expression_statement "(**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);" (call_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))\n                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0)" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))" (( "(") (pointer_expression "**(code **)(**(int **)(param_1 + 0xc) + 4)" (* "*") (pointer_expression "*(code **)(**(int **)(param_1 + 0xc) + 4)" (* "*") (cast_expression "(code **)(**(int **)(param_1 + 0xc) + 4)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(**(int **)(param_1 + 0xc) + 4)" (( "(") (binary_expression "**(int **)(param_1 + 0xc) + 4" (pointer_expression "**(int **)(param_1 + 0xc)" (* "*") (pointer_expression "*(int **)(param_1 + 0xc)" (* "*") (cast_expression "(int **)(param_1 + 0xc)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (+ "+") (number_literal "4")) () ")"))))) () ")")) (argument_list "(*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0)" (( "(") (pointer_expression "*(int **)(param_1 + 0xc)" (* "*") (cast_expression "(int **)(param_1 + 0xc)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (string_literal ""Proxy error: HTTP response was absent"" (" """) (string_content "Proxy error: HTTP response was absent") (" """)) (, ",") (number_literal "8000") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "FUN_0001d220(iVar11);" (call_expression "FUN_0001d220(iVar11)" (identifier "FUN_0001d220") (argument_list "(iVar11)" (( "(") (identifier "iVar11") () ")"))) (; ";")) (goto_statement "goto LAB_0001edd5;" (goto "goto") (statement_identifier "LAB_0001edd5") (; ";")) (} "}"))) (expression_statement "FUN_0001c800(iVar4,iVar10);" (call_expression "FUN_0001c800(iVar4,iVar10)" (identifier "FUN_0001c800") (argument_list "(iVar4,iVar10)" (( "(") (identifier "iVar4") (, ",") (identifier "iVar10") () ")"))) (; ";")) (if_statement "if (*(char *)(iVar11 + local_224) != '2') {\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }" (if "if") (parenthesized_expression "(*(char *)(iVar11 + local_224) != '2')" (( "(") (binary_expression "*(char *)(iVar11 + local_224) != '2'" (pointer_expression "*(char *)(iVar11 + local_224)" (* "*") (cast_expression "(char *)(iVar11 + local_224)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar11 + local_224)" (( "(") (binary_expression "iVar11 + local_224" (identifier "iVar11") (+ "+") (identifier "local_224")) () ")")))) (!= "!=") (char_literal "'2'" (' "'") (character "2") (' "'"))) () ")")) (compound_statement "{\n        *(undefined1 *)(iVar11 + iVar10) = 0;\n        if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }\n        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);\n        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);\n        FUN_0001d220(uVar5);\n        FUN_0001d220(iVar11);\n        goto LAB_0001edd5;\n      }" ({ "{") (expression_statement "*(undefined1 *)(iVar11 + iVar10) = 0;" (assignment_expression "*(undefined1 *)(iVar11 + iVar10) = 0" (pointer_expression "*(undefined1 *)(iVar11 + iVar10)" (* "*") (cast_expression "(undefined1 *)(iVar11 + iVar10)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar11 + iVar10)" (( "(") (binary_expression "iVar11 + iVar10" (identifier "iVar11") (+ "+") (identifier "iVar10")) () ")")))) (= "=") (number_literal "0")) (; ";")) (if_statement "if ((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }" (if "if") (parenthesized_expression "((local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r'))))" (( "(") (binary_expression "(local_224 < iVar10) &&\n           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))" (parenthesized_expression "(local_224 < iVar10)" (( "(") (binary_expression "local_224 < iVar10" (identifier "local_224") (< "<") (identifier "iVar10")) () ")")) (&& "&&") (parenthesized_expression "((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))" (( "(") (parenthesized_expression "(cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r'))" (( "(") (comma_expression "cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')" (assignment_expression "cVar2 = *(char *)(iVar11 + -1 + iVar10)" (identifier "cVar2") (= "=") (pointer_expression "*(char *)(iVar11 + -1 + iVar10)" (* "*") (cast_expression "(char *)(iVar11 + -1 + iVar10)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar11 + -1 + iVar10)" (( "(") (binary_expression "iVar11 + -1 + iVar10" (binary_expression "iVar11 + -1" (identifier "iVar11") (+ "+") (number_literal "-1")) (+ "+") (identifier "iVar10")) () ")"))))) (, ",") (binary_expression "cVar2 == '\n' || (cVar2 == '\r')" (binary_expression "cVar2 == '\n'" (identifier "cVar2") (== "==") (char_literal "'\n'" (' "'") (escape_sequence "\n") (' "'"))) (|| "||") (parenthesized_expression "(cVar2 == '\r')" (( "(") (binary_expression "cVar2 == '\r'" (identifier "cVar2") (== "==") (char_literal "'\r'" (' "'") (escape_sequence "\r") (' "'"))) () ")")))) () ")")) () ")"))) () ")")) (compound_statement "{\n          do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));\n        }" ({ "{") (do_statement "do {\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          } while ((cVar2 == '\r') || (cVar2 == '\n'));" (do "do") (compound_statement "{\n            iVar10 = iVar10 + -1;\n            *(undefined1 *)(iVar11 + iVar10) = 0;\n            if (iVar10 <= local_224) break;\n            cVar2 = *(char *)(iVar11 + -1 + iVar10);\n          }" ({ "{") (expression_statement "iVar10 = iVar10 + -1;" (assignment_expression "iVar10 = iVar10 + -1" (identifier "iVar10") (= "=") (binary_expression "iVar10 + -1" (identifier "iVar10") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "*(undefined1 *)(iVar11 + iVar10) = 0;" (assignment_expression "*(undefined1 *)(iVar11 + iVar10) = 0" (pointer_expression "*(undefined1 *)(iVar11 + iVar10)" (* "*") (cast_expression "(undefined1 *)(iVar11 + iVar10)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar11 + iVar10)" (( "(") (binary_expression "iVar11 + iVar10" (identifier "iVar11") (+ "+") (identifier "iVar10")) () ")")))) (= "=") (number_literal "0")) (; ";")) (if_statement "if (iVar10 <= local_224) break;" (if "if") (parenthesized_expression "(iVar10 <= local_224)" (( "(") (binary_expression "iVar10 <= local_224" (identifier "iVar10") (<= "<=") (identifier "local_224")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "cVar2 = *(char *)(iVar11 + -1 + iVar10);" (assignment_expression "cVar2 = *(char *)(iVar11 + -1 + iVar10)" (identifier "cVar2") (= "=") (pointer_expression "*(char *)(iVar11 + -1 + iVar10)" (* "*") (cast_expression "(char *)(iVar11 + -1 + iVar10)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar11 + -1 + iVar10)" (( "(") (binary_expression "iVar11 + -1 + iVar10" (binary_expression "iVar11 + -1" (identifier "iVar11") (+ "+") (number_literal "-1")) (+ "+") (identifier "iVar10")) () ")"))))) (; ";")) (} "}")) (while "while") (parenthesized_expression "((cVar2 == '\r') || (cVar2 == '\n'))" (( "(") (binary_expression "(cVar2 == '\r') || (cVar2 == '\n')" (parenthesized_expression "(cVar2 == '\r')" (( "(") (binary_expression "cVar2 == '\r'" (identifier "cVar2") (== "==") (char_literal "'\r'" (' "'") (escape_sequence "\r") (' "'"))) () ")")) (|| "||") (parenthesized_expression "(cVar2 == '\n')" (( "(") (binary_expression "cVar2 == '\n'" (identifier "cVar2") (== "==") (char_literal "'\n'" (' "'") (escape_sequence "\n") (' "'"))) () ")"))) () ")")) (; ";")) (} "}"))) (expression_statement "uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);" (assignment_expression "uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11)" (identifier "uVar5") (= "=") (call_expression "FUN_0001d000("Proxy error: %s",local_224 + iVar11)" (identifier "FUN_0001d000") (argument_list "("Proxy error: %s",local_224 + iVar11)" (( "(") (string_literal ""Proxy error: %s"" (" """) (string_content "Proxy error: %s") (" """)) (, ",") (binary_expression "local_224 + iVar11" (identifier "local_224") (+ "+") (identifier "iVar11")) () ")")))) (; ";")) (expression_statement "(**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);" (call_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0)" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))" (( "(") (pointer_expression "**(code **)(**(int **)(param_1 + 0xc) + 4)" (* "*") (pointer_expression "*(code **)(**(int **)(param_1 + 0xc) + 4)" (* "*") (cast_expression "(code **)(**(int **)(param_1 + 0xc) + 4)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(**(int **)(param_1 + 0xc) + 4)" (( "(") (binary_expression "**(int **)(param_1 + 0xc) + 4" (pointer_expression "**(int **)(param_1 + 0xc)" (* "*") (pointer_expression "*(int **)(param_1 + 0xc)" (* "*") (cast_expression "(int **)(param_1 + 0xc)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (+ "+") (number_literal "4")) () ")"))))) () ")")) (argument_list "(*(int **)(param_1 + 0xc),uVar5,8000,0)" (( "(") (pointer_expression "*(int **)(param_1 + 0xc)" (* "*") (cast_expression "(int **)(param_1 + 0xc)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (identifier "uVar5") (, ",") (number_literal "8000") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "FUN_0001d220(uVar5);" (call_expression "FUN_0001d220(uVar5)" (identifier "FUN_0001d220") (argument_list "(uVar5)" (( "(") (identifier "uVar5") () ")"))) (; ";")) (expression_statement "FUN_0001d220(iVar11);" (call_expression "FUN_0001d220(iVar11)" (identifier "FUN_0001d220") (argument_list "(iVar11)" (( "(") (identifier "iVar11") () ")"))) (; ";")) (goto_statement "goto LAB_0001edd5;" (goto "goto") (statement_identifier "LAB_0001edd5") (; ";")) (} "}"))) (expression_statement "FUN_0001d220(iVar11);" (call_expression "FUN_0001d220(iVar11)" (identifier "FUN_0001d220") (argument_list "(iVar11)" (( "(") (identifier "iVar11") () ")"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x44) = 2;" (assignment_expression "*(undefined4 *)(param_1 + 0x44) = 2" (pointer_expression "*(undefined4 *)(param_1 + 0x44)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x44)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x44)" (( "(") (binary_expression "param_1 + 0x44" (identifier "param_1") (+ "+") (number_literal "0x44")) () ")")))) (= "=") (number_literal "2")) (; ";")) (} "}")) (else_clause "else if (iVar4 != 2) goto LAB_0001edb6;" (else "else") (if_statement "if (iVar4 != 2) goto LAB_0001edb6;" (if "if") (parenthesized_expression "(iVar4 != 2)" (( "(") (binary_expression "iVar4 != 2" (identifier "iVar4") (!= "!=") (number_literal "2")) () ")")) (goto_statement "goto LAB_0001edb6;" (goto "goto") (statement_identifier "LAB_0001edb6") (; ";"))))) (expression_statement "local_238 = param_1 + 0x34;" (assignment_expression "local_238 = param_1 + 0x34" (identifier "local_238") (= "=") (binary_expression "param_1 + 0x34" (identifier "param_1") (+ "+") (number_literal "0x34"))) (; ";")) (expression_statement "iVar4 = FUN_0001c7f0(local_238);" (assignment_expression "iVar4 = FUN_0001c7f0(local_238)" (identifier "iVar4") (= "=") (call_expression "FUN_0001c7f0(local_238)" (identifier "FUN_0001c7f0") (argument_list "(local_238)" (( "(") (identifier "local_238") () ")")))) (; ";")) (if_statement "if (iVar4 < 1) {\n      __line = 0x2e5;\nLAB_0001f293:\n                    \n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }" (if "if") (parenthesized_expression "(iVar4 < 1)" (( "(") (binary_expression "iVar4 < 1" (identifier "iVar4") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n      __line = 0x2e5;\nLAB_0001f293:\n                    \n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");\n    }" ({ "{") (expression_statement "__line = 0x2e5;" (assignment_expression "__line = 0x2e5" (identifier "__line") (= "=") (number_literal "0x2e5")) (; ";")) (labeled_statement "LAB_0001f293:\n                    \n      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");" (statement_identifier "LAB_0001f293") (: ":") (expression_statement "__assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");" (call_expression "__assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate")" (identifier "__assert_fail") (argument_list "("len > 0","proxy.c",__line,"proxy_http_negotiate")" (( "(") (string_literal ""len > 0"" (" """) (string_content "len > 0") (" """)) (, ",") (string_literal ""proxy.c"" (" """) (string_content "proxy.c") (" """)) (, ",") (identifier "__line") (, ",") (string_literal ""proxy_http_negotiate"" (" """) (string_content "proxy_http_negotiate") (" """)) () ")"))) (; ";"))) (} "}"))) (expression_statement "uVar5 = FUN_0001c990(iVar4,1);" (assignment_expression "uVar5 = FUN_0001c990(iVar4,1)" (identifier "uVar5") (= "=") (call_expression "FUN_0001c990(iVar4,1)" (identifier "FUN_0001c990") (argument_list "(iVar4,1)" (( "(") (identifier "iVar4") (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "FUN_0001c8e0(local_238,uVar5,iVar4);" (call_expression "FUN_0001c8e0(local_238,uVar5,iVar4)" (identifier "FUN_0001c8e0") (argument_list "(local_238,uVar5,iVar4)" (( "(") (identifier "local_238") (, ",") (identifier "uVar5") (, ",") (identifier "iVar4") () ")"))) (; ";")) (expression_statement "iVar4 = FUN_0001e850();" (assignment_expression "iVar4 = FUN_0001e850()" (identifier "iVar4") (= "=") (call_expression "FUN_0001e850()" (identifier "FUN_0001e850") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (-1 < iVar4) {\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }" (if "if") (parenthesized_expression "(-1 < iVar4)" (( "(") (binary_expression "-1 < iVar4" (number_literal "-1") (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n      while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }\n      if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }\n    }" ({ "{") (while_statement "while (2 < iVar4) {\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }" (while "while") (parenthesized_expression "(2 < iVar4)" (( "(") (binary_expression "2 < iVar4" (number_literal "2") (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n        FUN_0001c800(local_238,iVar4);\n        iVar4 = FUN_0001e850();\n      }" ({ "{") (expression_statement "FUN_0001c800(local_238,iVar4);" (call_expression "FUN_0001c800(local_238,iVar4)" (identifier "FUN_0001c800") (argument_list "(local_238,iVar4)" (( "(") (identifier "local_238") (, ",") (identifier "iVar4") () ")"))) (; ";")) (expression_statement "iVar4 = FUN_0001e850();" (assignment_expression "iVar4 = FUN_0001e850()" (identifier "iVar4") (= "=") (call_expression "FUN_0001e850()" (identifier "FUN_0001e850") (argument_list "()" (( "(") () ")")))) (; ";")) (} "}"))) (if_statement "if (iVar4 == 2) {\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }" (if "if") (parenthesized_expression "(iVar4 == 2)" (( "(") (binary_expression "iVar4 == 2" (identifier "iVar4") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n        uVar13 = 1;\n        FUN_0001c800(local_238,2);\n        FUN_0001ebd0(param_1);\n        FUN_0001d220(uVar5);\n        goto LAB_0001edd5;\n      }" ({ "{") (expression_statement "uVar13 = 1;" (assignment_expression "uVar13 = 1" (identifier "uVar13") (= "=") (number_literal "1")) (; ";")) (expression_statement "FUN_0001c800(local_238,2);" (call_expression "FUN_0001c800(local_238,2)" (identifier "FUN_0001c800") (argument_list "(local_238,2)" (( "(") (identifier "local_238") (, ",") (number_literal "2") () ")"))) (; ";")) (expression_statement "FUN_0001ebd0(param_1);" (call_expression "FUN_0001ebd0(param_1)" (identifier "FUN_0001ebd0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (expression_statement "FUN_0001d220(uVar5);" (call_expression "FUN_0001d220(uVar5)" (identifier "FUN_0001d220") (argument_list "(uVar5)" (( "(") (identifier "uVar5") () ")"))) (; ";")) (goto_statement "goto LAB_0001edd5;" (goto "goto") (statement_identifier "LAB_0001edd5") (; ";")) (} "}"))) (} "}"))) (expression_statement "uVar13 = 1;" (assignment_expression "uVar13 = 1" (identifier "uVar13") (= "=") (number_literal "1")) (; ";")) (expression_statement "FUN_0001d220(uVar5);" (call_expression "FUN_0001d220(uVar5)" (identifier "FUN_0001d220") (argument_list "(uVar5)" (( "(") (identifier "uVar5") () ")"))) (; ";")) (} "}")) (else_clause "else {\nLAB_0001edb6:\n    uVar13 = 1;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);\n  }" (else "else") (compound_statement "{\nLAB_0001edb6:\n    uVar13 = 1;\n    (**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);\n  }" ({ "{") (labeled_statement "LAB_0001edb6:\n    uVar13 = 1;" (statement_identifier "LAB_0001edb6") (: ":") (expression_statement "uVar13 = 1;" (assignment_expression "uVar13 = 1" (identifier "uVar13") (= "=") (number_literal "1")) (; ";"))) (expression_statement "(**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);" (call_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))\n              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0)" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0xc) + 4))" (( "(") (pointer_expression "**(code **)(**(int **)(param_1 + 0xc) + 4)" (* "*") (pointer_expression "*(code **)(**(int **)(param_1 + 0xc) + 4)" (* "*") (cast_expression "(code **)(**(int **)(param_1 + 0xc) + 4)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(**(int **)(param_1 + 0xc) + 4)" (( "(") (binary_expression "**(int **)(param_1 + 0xc) + 4" (pointer_expression "**(int **)(param_1 + 0xc)" (* "*") (pointer_expression "*(int **)(param_1 + 0xc)" (* "*") (cast_expression "(int **)(param_1 + 0xc)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (+ "+") (number_literal "4")) () ")"))))) () ")")) (argument_list "(*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0)" (( "(") (pointer_expression "*(int **)(param_1 + 0xc)" (* "*") (cast_expression "(int **)(param_1 + 0xc)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (string_literal ""Proxy error: unexpected proxy error"" (" """) (string_content "Proxy error: unexpected proxy error") (" """)) (, ",") (number_literal "0x1f41") (, ",") (number_literal "0") () ")"))) (; ";")) (} "}")))) (labeled_statement "LAB_0001edd5:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006dad0();\n  }" (statement_identifier "LAB_0001edd5") (: ":") (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006dad0();\n  }" (if "if") (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_0006dad0();\n  }" ({ "{") (expression_statement "FUN_0006dad0();" (call_expression "FUN_0006dad0()" (identifier "FUN_0006dad0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return uVar13;" (return "return") (identifier "uVar13") (; ";")) (} "}")))

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

int function_1(type_1 p,int var_16)

{
  type_2 *ch;
  type_3 *data;
  int var_26;
  type_4 ppsVar2;
  int iVar3;
  size_t var_24;
  char *var_11;
  size_t var_9;
  char *pcVar6;
  int var_12;
  int var_13;
  char *var_14;
  int var_2;
  int var_1;
  type_5 __line;
  type_2 *local_238;
  int min_ver;
  int maj_ver;
  int var_21;
  char dest [512];
  
  var_26 = *(int *)(var_1 + 0x14);
  var_2 = p->state;
  if (var_2 == -1) {
    var_3(p->remote_addr,dest,0x200);
    var_14 = var_4("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",dest,p->remote_port,dest,
                       p->remote_port);
    ppsVar2 = p->sub_socket;
    var_9 = var_5(var_14);
    (*(*ppsVar2)->write)(ppsVar2,var_14,var_9);
    var_6(var_14);
    var_14 = var_7(p->conf,0x10);
    var_11 = var_7(p->conf,0x11);
    if ((*var_14 != '\0') || (*var_11 != '\0')) {
      var_14 = var_4("%s:%s",var_14,var_11);
      var_9 = var_5(var_14);
      var_11 = (char *)var_8((var_9 * 4) / 3 + 100,1);
      var_10(var_11,"Proxy-Authorization: Basic ",0x1c);
      var_2 = 0x1b;
      if (var_9 != 0) {
        var_12 = 0;
        var_2 = 0x1b;
        do {
          pcVar6 = var_11 + var_2;
          var_13 = var_9 - var_12;
          if (3 < var_13) {
            var_13 = 3;
          }
          var_2 = var_2 + 4;
          data = (type_3 *)(var_14 + var_12);
          var_12 = var_12 + 3;
          var_15(data,var_13,pcVar6);
        } while (var_12 < (int)var_9);
      }
      pcVar6 = var_11 + var_2;
      pcVar6[0] = '\r';
      pcVar6[1] = '\n';
      pcVar6[2] = '\0';
      ppsVar2 = p->sub_socket;
      var_9 = var_5(var_11);
      (*(*ppsVar2)->write)(ppsVar2,var_11,var_9);
      var_6(var_14);
      var_6(var_11);
    }
    var_2 = 0;
    (*(*p->sub_socket)->write)(p->sub_socket,"\r\n",2);
    p->state = 1;
    goto LAB_0001edd5;
  }
  if (var_16 == 0) {
    var_2 = 0;
    (*(*p->plug)->closing)
              (p->plug,p->closing_error_msg,p->closing_error_code,p->closing_calling_back);
    goto LAB_0001edd5;
  }
  if (var_16 == 1) {
    var_2 = 0;
    goto LAB_0001edd5;
  }
  if (var_16 == 3) {
    var_2 = (*(*p->plug)->accepting)
                       (p->plug,p->accepting_constructor,(accept_ctx_t)(p->accepting_ctx).p);
    goto LAB_0001edd5;
  }
  if (var_16 == 2) {
    if (var_2 == 1) {
      ch = &p->pending_input_data;
      var_2 = var_17(ch);
      if (var_2 < 1) {
        __line = 0x2af;
        goto LAB_0001f293;
      }
      var_14 = (char *)var_8(var_2 + 1,1);
      var_18(ch,var_14,var_2);
      var_14[var_2] = '\0';
      var_12 = var_19(var_14,var_2);
      var_2 = 1;
      if (var_12 < 0) {
        var_6(var_14);
        goto LAB_0001edd5;
      }
      var_21 = -1;
      var_13 = var_20(var_14,"HTTP/%i.%i %n",&maj_ver,&min_ver,&var_21);
      if ((var_13 < 2) || (var_21 == -1)) {
        (*(*p->plug)->closing)(p->plug,"Proxy error: HTTP response was absent",8000,0);
        var_6(var_14);
        goto LAB_0001edd5;
      }
      var_22(ch,var_12);
      if (var_14[var_21] != '2') {
        var_14[var_12] = '\0';
        if ((var_21 < var_12) && ((var_14[var_12 + -1] == '\n' || (var_14[var_12 + -1] == '\r')))) {
          do {
            var_13 = var_12 + -1;
            var_14[var_13] = '\0';
            if (var_13 <= var_21) break;
            iVar3 = var_12 + -2;
            var_12 = var_13;
          } while ((var_14[iVar3] == '\r') || (var_14[iVar3] == '\n'));
        }
        var_11 = var_4("Proxy error: %s",var_14 + var_21);
        (*(*p->plug)->closing)(p->plug,var_11,8000,0);
        var_6(var_11);
        var_6(var_14);
        goto LAB_0001edd5;
      }
      var_6(var_14);
      p->state = 2;
    }
    else if (var_2 != 2) goto LAB_0001edb6;
    local_238 = &p->pending_input_data;
    var_24 = var_17(local_238);
    if ((int)var_24 < 1) {
      __line = 0x2e5;
LAB_0001f293:
                    /* WARNING: Subroutine does not return */
      var_23("len > 0","proxy.c",__line,"proxy_http_negotiate");
    }
    var_11 = (char *)var_8(var_24,1);
    var_18(local_238,var_11,var_24);
    var_2 = var_19(var_11,var_24);
    var_14 = var_11;
    if (-1 < var_2) {
      while (2 < var_2) {
        var_14 = var_14 + var_2;
        var_24 = var_24 - var_2;
        var_22(local_238,var_2);
        var_2 = var_19(var_14,var_24);
      }
      if (var_2 == 2) {
        var_2 = 1;
        var_22(local_238,2);
        var_25(p);
        var_6(var_11);
        goto LAB_0001edd5;
      }
    }
    var_2 = 1;
    var_6(var_11);
  }
  else {
LAB_0001edb6:
    var_2 = 1;
    (*(*p->plug)->closing)(p->plug,"Proxy error: unexpected proxy error",0x1f41,0);
  }
LAB_0001edd5:
  if (var_26 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_27();
  }
  return var_2;
}


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

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

undefined4 MASKED(int param_1,int param_2)

{
  char *pcVar1;
  char cVar2;
  int *piVar3;
  int iVar4;
  undefined4 uVar5;
  char *pcVar6;
  size_t sVar7;
  char *pcVar8;
  char *pcVar9;
  int iVar10;
  int iVar11;
  int iVar12;
  undefined4 uVar13;
  int in_GS_OFFSET;
  uint __line;
  int local_238;
  undefined1 local_22c [4];
  undefined1 local_228 [4];
  int local_224;
  undefined1 local_220 [512];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1ed69;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar4 = *(int *)(param_1 + 0x44);
  if (iVar4 == -1) {
    FUN_00064790(*(undefined4 *)(param_1 + 0x10),local_220,0x200);
    pcVar6 = (char *)FUN_0001d000("CONNECT %s:%i HTTP/1.1\r\nHost: %s:%i\r\n",local_220,
                                  *(undefined4 *)(param_1 + 0x14),local_220,
                                  *(undefined4 *)(param_1 + 0x14));
    piVar3 = *(int **)(param_1 + 8);
    sVar7 = strlen(pcVar6);
    (**(code **)(*piVar3 + 8))(piVar3,pcVar6,sVar7);
    FUN_0001d220(pcVar6);
    pcVar6 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x10);
    pcVar8 = (char *)FUN_00018b50(*(undefined4 *)(param_1 + 0x74),0x11);
    if ((*pcVar6 != '\0') || (*pcVar8 != '\0')) {
      pcVar6 = (char *)FUN_0001d000("%s:%s",pcVar6,pcVar8);
      sVar7 = strlen(pcVar6);
      pcVar8 = (char *)FUN_0001c990((sVar7 * 4) / 3 + 100,1);
      builtin_strncpy(pcVar8,"Proxy-Authorization: Basic ",0x1c);
      iVar4 = 0x1b;
      if (sVar7 != 0) {
        iVar10 = 0;
        iVar4 = 0x1b;
        do {
          pcVar9 = pcVar8 + iVar4;
          iVar11 = sVar7 - iVar10;
          if (3 < iVar11) {
            iVar11 = 3;
          }
          iVar4 = iVar4 + 4;
          pcVar1 = pcVar6 + iVar10;
          iVar10 = iVar10 + 3;
          FUN_0001c500(pcVar1,iVar11,pcVar9);
        } while (iVar10 < (int)sVar7);
      }
      pcVar9 = pcVar8 + iVar4;
      pcVar9[0] = '\r';
      pcVar9[1] = '\n';
      pcVar9[2] = '\0';
      piVar3 = *(int **)(param_1 + 8);
      sVar7 = strlen(pcVar8);
      (**(code **)(*piVar3 + 8))(piVar3,pcVar8,sVar7);
      FUN_0001d220(pcVar6);
      FUN_0001d220(pcVar8);
    }
    uVar13 = 0;
    (**(code **)(**(int **)(param_1 + 8) + 8))(*(int **)(param_1 + 8),&DAT_0007148d,2);
    *(undefined4 *)(param_1 + 0x44) = 1;
    goto LAB_0001edd5;
  }
  if (param_2 == 0) {
    uVar13 = 0;
    (**(code **)(**(int **)(param_1 + 0xc) + 4))
              (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x50),
               *(undefined4 *)(param_1 + 0x54),*(undefined4 *)(param_1 + 0x58));
    goto LAB_0001edd5;
  }
  if (param_2 == 1) {
    uVar13 = 0;
    goto LAB_0001edd5;
  }
  if (param_2 == 3) {
    uVar13 = (**(code **)(**(int **)(param_1 + 0xc) + 0x10))
                       (*(int **)(param_1 + 0xc),*(undefined4 *)(param_1 + 0x6c),
                        *(undefined4 *)(param_1 + 0x70));
    goto LAB_0001edd5;
  }
  if (param_2 == 2) {
    if (iVar4 == 1) {
      iVar4 = param_1 + 0x34;
      iVar10 = FUN_0001c7f0(iVar4);
      if (iVar10 < 1) {
        __line = 0x2af;
        goto LAB_0001f293;
      }
      iVar11 = FUN_0001c990(iVar10 + 1,1);
      FUN_0001c8e0(iVar4,iVar11,iVar10);
      *(undefined1 *)(iVar11 + iVar10) = 0;
      iVar10 = FUN_0001e850();
      uVar13 = 1;
      if (iVar10 < 0) {
        FUN_0001d220(iVar11);
        goto LAB_0001edd5;
      }
      local_224 = -1;
      iVar12 = __isoc99_sscanf(iVar11,"HTTP/%i.%i %n",local_228,local_22c,&local_224);
      if ((iVar12 < 2) || (local_224 == -1)) {
        (**(code **)(**(int **)(param_1 + 0xc) + 4))
                  (*(int **)(param_1 + 0xc),"Proxy error: HTTP response was absent",8000,0);
        FUN_0001d220(iVar11);
        goto LAB_0001edd5;
      }
      FUN_0001c800(iVar4,iVar10);
      if (*(char *)(iVar11 + local_224) != '2') {
        *(undefined1 *)(iVar11 + iVar10) = 0;
        if ((local_224 < iVar10) &&
           ((cVar2 = *(char *)(iVar11 + -1 + iVar10), cVar2 == '\n' || (cVar2 == '\r')))) {
          do {
            iVar10 = iVar10 + -1;
            *(undefined1 *)(iVar11 + iVar10) = 0;
            if (iVar10 <= local_224) break;
            cVar2 = *(char *)(iVar11 + -1 + iVar10);
          } while ((cVar2 == '\r') || (cVar2 == '\n'));
        }
        uVar5 = FUN_0001d000("Proxy error: %s",local_224 + iVar11);
        (**(code **)(**(int **)(param_1 + 0xc) + 4))(*(int **)(param_1 + 0xc),uVar5,8000,0);
        FUN_0001d220(uVar5);
        FUN_0001d220(iVar11);
        goto LAB_0001edd5;
      }
      FUN_0001d220(iVar11);
      *(undefined4 *)(param_1 + 0x44) = 2;
    }
    else if (iVar4 != 2) goto LAB_0001edb6;
    local_238 = param_1 + 0x34;
    iVar4 = FUN_0001c7f0(local_238);
    if (iVar4 < 1) {
      __line = 0x2e5;
LAB_0001f293:
                    /* WARNING: Subroutine does not return */
      __assert_fail("len > 0","proxy.c",__line,"proxy_http_negotiate");
    }
    uVar5 = FUN_0001c990(iVar4,1);
    FUN_0001c8e0(local_238,uVar5,iVar4);
    iVar4 = FUN_0001e850();
    if (-1 < iVar4) {
      while (2 < iVar4) {
        FUN_0001c800(local_238,iVar4);
        iVar4 = FUN_0001e850();
      }
      if (iVar4 == 2) {
        uVar13 = 1;
        FUN_0001c800(local_238,2);
        FUN_0001ebd0(param_1);
        FUN_0001d220(uVar5);
        goto LAB_0001edd5;
      }
    }
    uVar13 = 1;
    FUN_0001d220(uVar5);
  }
  else {
LAB_0001edb6:
    uVar13 = 1;
    (**(code **)(**(int **)(param_1 + 0xc) + 4))
              (*(int **)(param_1 + 0xc),"Proxy error: unexpected proxy error",0x1f41,0);
  }
LAB_0001edd5:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0006dad0();
  }
  return uVar13;
}

