
/* 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 */

CURLcode ldap_connecting(connectdata *conn,_Bool *done)

{
  tftp_state_data *ptVar1;
  Curl_easy *data;
  Curl_recv *pCVar2;
  int iVar3;
  undefined4 uVar4;
  char *pcVar5;
  int in_GS_OFFSET;
  CURLcode local_44;
  LDAPMessage *msg;
  int err;
  char *info;
  timeval tv;
  Sockbuf *sb;
  char *local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x5a879;
  ptVar1 = (conn->proto).tftpc;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  data = conn->data;
  msg = (LDAPMessage *)0x0;
  tv.tv_sec = 0;
  tv.tv_usec = 1;
  info = (char *)0x0;
  if ((conn->handler->flags & 1) != 0) {
    if ((char)ptVar1->sockfd != '\0') {
LAB_0005a8dd:
      if (*(char *)((int)&ptVar1->sockfd + 1) == '\0') {
        ldap_get_option(ptVar1->state,0x5008,&sb);
        ber_sockbuf_add_io(sb,&ldapsb_tls,0x14,conn);
        pCVar2 = conn->recv[0];
        *(undefined1 *)((int)&ptVar1->sockfd + 1) = 1;
        ptVar1->mode = (tftp_mode_t)pCVar2;
        ptVar1->error = (tftp_error_t)conn->send[0];
      }
      goto LAB_0005a8e7;
    }
    local_44 = Curl_ssl_connect_nonblocking(conn,0,(_Bool *)&ptVar1->sockfd);
    if (local_44 != CURLE_OK) goto LAB_0005aa45;
    if ((char)ptVar1->sockfd != '\0') goto LAB_0005a8dd;
    goto LAB_0005aa43;
  }
LAB_0005a8e7:
  if (*(char *)((int)&ptVar1->sockfd + 2) == '\0') {
LAB_0005a9a7:
    if ((conn->bits).user_passwd == false) {
      local_24 = (char *)0x0;
      pcVar5 = (char *)0x0;
      sb = (Sockbuf *)0x0;
    }
    else {
      pcVar5 = conn->user;
      local_24 = conn->passwd;
      sb = (Sockbuf *)strlen(local_24);
    }
    iVar3 = ldap_sasl_bind(ptVar1->state,pcVar5,0,&sb,0,0,&ptVar1->conn);
    local_44 = CURLE_LDAP_CANNOT_BIND;
    if (iVar3 == 0) {
      *(undefined1 *)((int)&ptVar1->sockfd + 2) = 1;
      local_44 = CURLE_OK;
    }
    goto LAB_0005aa45;
  }
  iVar3 = ldap_result(ptVar1->state,ptVar1->conn,0,&tv,&msg);
  if (iVar3 < 0) {
    uVar4 = ldap_err2string(iVar3);
    pcVar5 = "LDAP local: bind ldap_result %s";
LAB_0005aafb:
    Curl_failf(data,pcVar5,uVar4);
    local_44 = CURLE_LDAP_CANNOT_BIND;
  }
  else {
    if (iVar3 != 0) {
      iVar3 = ldap_parse_result(ptVar1->state,msg,&err,0,&info,0,0,1);
      if (iVar3 != 0) {
        uVar4 = ldap_err2string(iVar3);
        pcVar5 = "LDAP local: bind ldap_parse_result %s";
        goto LAB_0005aafb;
      }
      if (err == 2) {
        ldap_get_option(ptVar1->state,0x11,&sb);
        if (sb == (Sockbuf *)0x3) {
          if (info != (char *)0x0) {
            ldap_memfree(info);
            info = (char *)0x0;
          }
          sb = (Sockbuf *)0x2;
          ldap_set_option(ptVar1->state,0x11,&sb);
          *(undefined1 *)((int)&ptVar1->sockfd + 2) = 0;
          goto LAB_0005a9a7;
        }
      }
      if (err != 0) {
        pcVar5 = info;
        if (info == (char *)0x0) {
          pcVar5 = "";
        }
        uVar4 = ldap_err2string(0);
        Curl_failf(data,"LDAP remote: bind failed %s %s",uVar4,pcVar5);
        local_44 = CURLE_LOGIN_DENIED;
        if (info != (char *)0x0) {
          local_44 = CURLE_LOGIN_DENIED;
          ldap_memfree(info);
        }
        goto LAB_0005aa45;
      }
      if (info != (char *)0x0) {
        ldap_memfree(info);
      }
      conn->recv[0] = ldap_recv;
      *done = true;
    }
LAB_0005aa43:
    local_44 = CURLE_OK;
  }
LAB_0005aa45:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return local_44;
}



/* WARNING: Type propagation algorithm not settling */

int FUN_0005a870(undefined1 *param_1)

{
  undefined4 *puVar1;
  undefined *puVar2;
  int iVar3;
  undefined4 uVar4;
  undefined4 uVar5;
  int unaff_EBX;
  int in_GS_OFFSET;
  undefined4 *unaff_retaddr;
  int local_48;
  undefined4 local_40;
  int local_3c;
  int local_38 [4];
  char *local_28;
  int local_24;
  undefined4 uStack_14;
  
  uStack_14 = 0x5a879;
  entry();
  puVar1 = (undefined4 *)unaff_retaddr[0x129];
  local_24 = *(int *)(in_GS_OFFSET + 0x14);
  uVar5 = *unaff_retaddr;
  local_40 = 0;
  local_38[1] = 0;
  local_38[2] = 1;
  local_38[0] = 0;
  if ((*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0) {
    if (*(char *)(puVar1 + 5) != '\0') {
LAB_0005a8dd:
      if (*(char *)((int)puVar1 + 0x15) == '\0') {
        ldap_get_option(*puVar1,0x5008,local_38 + 3);
        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);
        uVar4 = unaff_retaddr[0x69];
        *(undefined1 *)((int)puVar1 + 0x15) = 1;
        puVar1[1] = uVar4;
        puVar1[2] = unaff_retaddr[0x6b];
      }
      goto LAB_0005a8e7;
    }
    local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);
    if (local_48 != 0) goto LAB_0005aa45;
    if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;
    goto LAB_0005aa43;
  }
LAB_0005a8e7:
  if (*(char *)((int)puVar1 + 0x16) == '\0') {
LAB_0005a9a7:
    if (*(char *)(unaff_retaddr + 0x94) == '\0') {
      local_28 = (char *)0x0;
      uVar5 = 0;
      local_38[3] = 0;
    }
    else {
      uVar5 = unaff_retaddr[0x5a];
      local_28 = (char *)unaff_retaddr[0x5b];
      local_38[3] = strlen(local_28);
    }
    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);
    local_48 = 0x26;
    if (iVar3 == 0) {
      *(undefined1 *)((int)puVar1 + 0x16) = 1;
      local_48 = 0;
    }
    goto LAB_0005aa45;
  }
  iVar3 = ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40);
  if (iVar3 < 0) {
    uVar4 = ldap_err2string(iVar3);
    puVar2 = &UNK_0002b79b;
LAB_0005aafb:
    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);
    local_48 = 0x26;
  }
  else {
    if (iVar3 != 0) {
      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);
      if (iVar3 != 0) {
        uVar4 = ldap_err2string(iVar3);
        puVar2 = &UNK_0002b7bb;
        goto LAB_0005aafb;
      }
      if (local_3c == 2) {
        ldap_get_option(*puVar1,0x11,local_38 + 3);
        if (local_38[3] == 3) {
          if (local_38[0] != 0) {
            ldap_memfree(local_38[0]);
            local_38[0] = 0;
          }
          local_38[3] = 2;
          ldap_set_option(*puVar1,0x11,local_38 + 3);
          *(undefined1 *)((int)puVar1 + 0x16) = 0;
          goto LAB_0005a9a7;
        }
      }
      if (local_3c != 0) {
        iVar3 = local_38[0];
        if (local_38[0] == 0) {
          iVar3 = unaff_EBX + 0x2d4f7;
        }
        uVar4 = ldap_err2string(0);
        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);
        local_48 = 0x43;
        if (local_38[0] != 0) {
          local_48 = 0x43;
          ldap_memfree(local_38[0]);
        }
        goto LAB_0005aa45;
      }
      if (local_38[0] != 0) {
        ldap_memfree(local_38[0]);
      }
      unaff_retaddr[0x69] = unaff_EBX + 0x317;
      *param_1 = 1;
    }
LAB_0005aa43:
    local_48 = 0;
  }
LAB_0005aa45:
  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0007c1a0();
  }
  return local_48;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00019ed0
ADD EBX,0x55f67
SUB ESP,0x3c
MOV EAX,dword ptr [ESP + 0x54]
MOV EBP,dword ptr [ESP + 0x50]
MOV dword ptr [ESP + 0xc],EAX
MOV ESI,dword ptr [EBP + 0x4a4]
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x2c],EAX
XOR EAX,EAX
MOV EAX,dword ptr [EBP]
MOV dword ptr [ESP + 0x10],0x0
MOV dword ptr [ESP + 0x1c],0x0
MOV dword ptr [ESP + 0x8],EAX
MOV EAX,dword ptr [EBP + 0x27c]
MOV dword ptr [ESP + 0x20],0x1
MOV dword ptr [ESP + 0x18],0x0
TEST byte ptr [EAX + 0x44],0x1
JZ 0x0005a8e7
CMP byte ptr [ESI + 0x14],0x0
JZ 0x0005aa60
CMP byte ptr [ESI + 0x15],0x0
JZ 0x0005aa88
CMP byte ptr [ESI + 0x16],0x0
JZ 0x0005ab81
SUB ESP,0xc
LEA EAX,[ESP + 0x1c]
PUSH EAX
LEA EAX,[ESP + 0x2c]
PUSH EAX
PUSH 0x0
PUSH dword ptr [ESI + 0x10]
PUSH dword ptr [ESI]
CALL 0x00019080
ADD ESP,0x20
TEST EAX,EAX
JS 0x0005aae8
JZ 0x0005aa43
PUSH 0x1
PUSH 0x0
PUSH 0x0
LEA EAX,[ESP + 0x24]
PUSH EAX
PUSH 0x0
LEA EAX,[ESP + 0x28]
PUSH EAX
PUSH dword ptr [ESP + 0x28]
PUSH dword ptr [ESI]
CALL 0x00018d20
ADD ESP,0x20
TEST EAX,EAX
JNZ 0x0005ab18
MOV EAX,dword ptr [ESP + 0x14]
CMP EAX,0x2
JNZ 0x0005aa14
SUB ESP,0x4
LEA EDI,[ESP + 0x28]
PUSH EDI
PUSH 0x11
PUSH dword ptr [ESI]
CALL 0x000197c0
ADD ESP,0x10
CMP dword ptr [ESP + 0x24],0x3
JNZ 0x0005aa10
MOV EAX,dword ptr [ESP + 0x18]
TEST EAX,EAX
JZ 0x0005a98b
SUB ESP,0xc
PUSH EAX
CALL 0x00019560
MOV dword ptr [ESP + 0x28],0x0
ADD ESP,0x10
MOV dword ptr [ESP + 0x24],0x2
SUB ESP,0x4
PUSH EDI
PUSH 0x11
PUSH dword ptr [ESI]
CALL 0x000194f0
MOV byte ptr [ESI + 0x16],0x0
ADD ESP,0x10
CMP byte ptr [EBP + 0x250],0x0
JZ 0x0005aacd
MOV EDX,dword ptr [EBP + 0x168]
MOV EAX,dword ptr [EBP + 0x16c]
SUB ESP,0xc
MOV dword ptr [ESP + 0x14],EDX
MOV dword ptr [ESP + 0x34],EAX
PUSH EAX
CALL 0x00018850
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x8]
MOV dword ptr [ESP + 0x24],EAX
SUB ESP,0x4
LEA EAX,[ESI + 0x10]
PUSH EAX
PUSH 0x0
PUSH 0x0
PUSH EDI
PUSH 0x0
PUSH EDX
PUSH dword ptr [ESI]
CALL 0x000184b0
ADD ESP,0x20
MOV EDX,EAX
MOV EAX,0x26
TEST EDX,EDX
JNZ 0x0005aa45
MOV byte ptr [ESI + 0x16],0x1
XOR EAX,EAX
JMP 0x0005aa45
MOV EAX,dword ptr [ESP + 0x14]
MOV ESI,dword ptr [ESP + 0x18]
TEST EAX,EAX
JNZ 0x0005ab2d
TEST ESI,ESI
JZ 0x0005aa30
SUB ESP,0xc
PUSH ESI
CALL 0x00019560
ADD ESP,0x10
LEA EAX,[EBX + 0xfffaa3b0]
MOV dword ptr [EBP + 0x1a4],EAX
MOV EAX,dword ptr [ESP + 0xc]
MOV byte ptr [EAX],0x1
XOR EAX,EAX
MOV ECX,dword ptr [ESP + 0x2c]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x0005ab8a
ADD ESP,0x3c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
LEA EAX,[ESI + 0x14]
PUSH EAX
PUSH 0x0
PUSH EBP
CALL 0x0007aa40
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0005aa45
CMP byte ptr [ESI + 0x14],0x0
JNZ 0x0005a8dd
JMP 0x0005aa43
SUB ESP,0x4
LEA EDI,[ESP + 0x28]
PUSH EDI
PUSH 0x5008
PUSH dword ptr [ESI]
CALL 0x000197c0
LEA EAX,[EBX + 0x8c8]
PUSH EBP
PUSH 0x14
PUSH EAX
PUSH dword ptr [ESP + 0x40]
CALL 0x00019140
MOV EAX,dword ptr [EBP + 0x1a4]
MOV byte ptr [ESI + 0x15],0x1
ADD ESP,0x20
MOV dword ptr [ESI + 0x4],EAX
MOV EAX,dword ptr [EBP + 0x1ac]
MOV dword ptr [ESI + 0x8],EAX
JMP 0x0005a8e7
MOV dword ptr [ESP + 0x28],0x0
XOR EDX,EDX
MOV dword ptr [ESP + 0x24],0x0
JMP 0x0005a9dc
SUB ESP,0xc
PUSH EAX
CALL 0x00019030
ADD ESP,0xc
PUSH EAX
LEA EAX,[EBX + 0xfffd5834]
PUSH EAX
PUSH dword ptr [ESP + 0x14]
CALL 0x00027240
ADD ESP,0x10
MOV EAX,0x26
JMP 0x0005aa45
SUB ESP,0xc
PUSH EAX
CALL 0x00019030
ADD ESP,0xc
PUSH EAX
LEA EAX,[EBX + 0xfffd5854]
JMP 0x0005aafb
TEST ESI,ESI
LEA EAX,[EBX + 0xfffd7590]
CMOVZ ESI,EAX
SUB ESP,0xc
PUSH 0x0
CALL 0x00019030
PUSH ESI
PUSH EAX
LEA EAX,[EBX + 0xfffd587c]
PUSH EAX
PUSH dword ptr [ESP + 0x24]
CALL 0x00027240
MOV EDX,dword ptr [ESP + 0x38]
MOV EAX,0x43
ADD ESP,0x20
TEST EDX,EDX
JZ 0x0005aa45
MOV dword ptr [ESP + 0x8],EAX
SUB ESP,0xc
PUSH EDX
CALL 0x00019560
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x8]
JMP 0x0005aa45
LEA EDI,[ESP + 0x24]
JMP 0x0005a9a7
CALL 0x0007c1a0
(translation_unit "/* WARNING: Type propagation algorithm not settling */\n\nint FUN_0005a870(undefined1 *param_1)\n\n{\n  undefined4 *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  undefined4 uVar5;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  undefined4 *unaff_retaddr;\n  int local_48;\n  undefined4 local_40;\n  int local_3c;\n  int local_38 [4];\n  char *local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a879;\n  entry();\n  puVar1 = (undefined4 *)unaff_retaddr[0x129];\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar5 = *unaff_retaddr;\n  local_40 = 0;\n  local_38[1] = 0;\n  local_38[2] = 1;\n  local_38[0] = 0;\n  if ((*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0) {\n    if (*(char *)(puVar1 + 5) != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);\n    if (local_48 != 0) goto LAB_0005aa45;\n    if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }\nLAB_0005a8e7:\n  if (*(char *)((int)puVar1 + 0x16) == '\0') {\nLAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }\n    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);\n    local_48 = 0x26;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }\n    goto LAB_0005aa45;\n  }\n  iVar3 = ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40);\n  if (iVar3 < 0) {\n    uVar4 = ldap_err2string(iVar3);\n    puVar2 = &UNK_0002b79b;\nLAB_0005aafb:\n    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);\n    local_48 = 0x26;\n  }\n  else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }\nLAB_0005aa43:\n    local_48 = 0;\n  }\nLAB_0005aa45:\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0007c1a0();\n  }\n  return local_48;\n}\n\n" comment (function_definition "int FUN_0005a870(undefined1 *param_1)\n\n{\n  undefined4 *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  undefined4 uVar5;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  undefined4 *unaff_retaddr;\n  int local_48;\n  undefined4 local_40;\n  int local_3c;\n  int local_38 [4];\n  char *local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a879;\n  entry();\n  puVar1 = (undefined4 *)unaff_retaddr[0x129];\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar5 = *unaff_retaddr;\n  local_40 = 0;\n  local_38[1] = 0;\n  local_38[2] = 1;\n  local_38[0] = 0;\n  if ((*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0) {\n    if (*(char *)(puVar1 + 5) != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);\n    if (local_48 != 0) goto LAB_0005aa45;\n    if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }\nLAB_0005a8e7:\n  if (*(char *)((int)puVar1 + 0x16) == '\0') {\nLAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }\n    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);\n    local_48 = 0x26;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }\n    goto LAB_0005aa45;\n  }\n  iVar3 = ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40);\n  if (iVar3 < 0) {\n    uVar4 = ldap_err2string(iVar3);\n    puVar2 = &UNK_0002b79b;\nLAB_0005aafb:\n    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);\n    local_48 = 0x26;\n  }\n  else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }\nLAB_0005aa43:\n    local_48 = 0;\n  }\nLAB_0005aa45:\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0007c1a0();\n  }\n  return local_48;\n}" primitive_type (function_declarator "FUN_0005a870(undefined1 *param_1)" identifier (parameter_list "(undefined1 *param_1)" ( (parameter_declaration "undefined1 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  undefined4 uVar5;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  undefined4 *unaff_retaddr;\n  int local_48;\n  undefined4 local_40;\n  int local_3c;\n  int local_38 [4];\n  char *local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a879;\n  entry();\n  puVar1 = (undefined4 *)unaff_retaddr[0x129];\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar5 = *unaff_retaddr;\n  local_40 = 0;\n  local_38[1] = 0;\n  local_38[2] = 1;\n  local_38[0] = 0;\n  if ((*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0) {\n    if (*(char *)(puVar1 + 5) != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);\n    if (local_48 != 0) goto LAB_0005aa45;\n    if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }\nLAB_0005a8e7:\n  if (*(char *)((int)puVar1 + 0x16) == '\0') {\nLAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }\n    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);\n    local_48 = 0x26;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }\n    goto LAB_0005aa45;\n  }\n  iVar3 = ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40);\n  if (iVar3 < 0) {\n    uVar4 = ldap_err2string(iVar3);\n    puVar2 = &UNK_0002b79b;\nLAB_0005aafb:\n    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);\n    local_48 = 0x26;\n  }\n  else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }\nLAB_0005aa43:\n    local_48 = 0;\n  }\nLAB_0005aa45:\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0007c1a0();\n  }\n  return local_48;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 *unaff_retaddr;" type_identifier (pointer_declarator "*unaff_retaddr" * identifier) ;) (declaration "int local_48;" primitive_type identifier ;) (declaration "undefined4 local_40;" type_identifier identifier ;) (declaration "int local_3c;" primitive_type identifier ;) (declaration "int local_38 [4];" primitive_type (array_declarator "local_38 [4]" identifier [ number_literal ]) ;) (declaration "char *local_28;" primitive_type (pointer_declarator "*local_28" * identifier) ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x5a879;" (assignment_expression "uStack_14 = 0x5a879" identifier = number_literal) ;) (expression_statement "entry();" (call_expression "entry()" identifier (argument_list "()" ( ))) ;) (expression_statement "puVar1 = (undefined4 *)unaff_retaddr[0x129];" (assignment_expression "puVar1 = (undefined4 *)unaff_retaddr[0x129]" identifier = (cast_expression "(undefined4 *)unaff_retaddr[0x129]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "unaff_retaddr[0x129]" identifier [ number_literal ]))) ;) (expression_statement "local_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_24 = *(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 "uVar5 = *unaff_retaddr;" (assignment_expression "uVar5 = *unaff_retaddr" identifier = (pointer_expression "*unaff_retaddr" * identifier)) ;) (expression_statement "local_40 = 0;" (assignment_expression "local_40 = 0" identifier = number_literal) ;) (expression_statement "local_38[1] = 0;" (assignment_expression "local_38[1] = 0" (subscript_expression "local_38[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "local_38[2] = 1;" (assignment_expression "local_38[2] = 1" (subscript_expression "local_38[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "local_38[0] = 0;" (assignment_expression "local_38[0] = 0" (subscript_expression "local_38[0]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if ((*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0) {\n    if (*(char *)(puVar1 + 5) != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);\n    if (local_48 != 0) goto LAB_0005aa45;\n    if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }" if (parenthesized_expression "((*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0)" ( (binary_expression "(*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0" (parenthesized_expression "(*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1)" ( (binary_expression "*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1" (pointer_expression "*(byte *)(unaff_retaddr[0x9f] + 0x44)" * (cast_expression "(byte *)(unaff_retaddr[0x9f] + 0x44)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr[0x9f] + 0x44)" ( (binary_expression "unaff_retaddr[0x9f] + 0x44" (subscript_expression "unaff_retaddr[0x9f]" identifier [ number_literal ]) + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    if (*(char *)(puVar1 + 5) != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);\n    if (local_48 != 0) goto LAB_0005aa45;\n    if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }" { (if_statement "if (*(char *)(puVar1 + 5) != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }" if (parenthesized_expression "(*(char *)(puVar1 + 5) != '\0')" ( (binary_expression "*(char *)(puVar1 + 5) != '\0'" (pointer_expression "*(char *)(puVar1 + 5)" * (cast_expression "(char *)(puVar1 + 5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 5)" ( (binary_expression "puVar1 + 5" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }" { (labeled_statement "LAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }" statement_identifier : (if_statement "if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }" if (parenthesized_expression "(*(char *)((int)puVar1 + 0x15) == '\0')" ( (binary_expression "*(char *)((int)puVar1 + 0x15) == '\0'" (pointer_expression "*(char *)((int)puVar1 + 0x15)" * (cast_expression "(char *)((int)puVar1 + 0x15)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar1 + 0x15)" ( (binary_expression "(int)puVar1 + 0x15" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }" { (expression_statement "ldap_get_option(*puVar1,0x5008,local_38 + 3);" (call_expression "ldap_get_option(*puVar1,0x5008,local_38 + 3)" identifier (argument_list "(*puVar1,0x5008,local_38 + 3)" ( (pointer_expression "*puVar1" * identifier) , number_literal , (binary_expression "local_38 + 3" identifier + number_literal) ))) ;) (expression_statement "ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);" (call_expression "ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr)" identifier (argument_list "(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr)" ( (subscript_expression "local_38[3]" identifier [ number_literal ]) , (binary_expression "unaff_EBX + 0x5682f" identifier + number_literal) , number_literal , identifier ))) ;) (expression_statement "uVar4 = unaff_retaddr[0x69];" (assignment_expression "uVar4 = unaff_retaddr[0x69]" identifier = (subscript_expression "unaff_retaddr[0x69]" identifier [ number_literal ])) ;) (expression_statement "*(undefined1 *)((int)puVar1 + 0x15) = 1;" (assignment_expression "*(undefined1 *)((int)puVar1 + 0x15) = 1" (pointer_expression "*(undefined1 *)((int)puVar1 + 0x15)" * (cast_expression "(undefined1 *)((int)puVar1 + 0x15)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar1 + 0x15)" ( (binary_expression "(int)puVar1 + 0x15" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "puVar1[1] = uVar4;" (assignment_expression "puVar1[1] = uVar4" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[2] = unaff_retaddr[0x6b];" (assignment_expression "puVar1[2] = unaff_retaddr[0x6b]" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = (subscript_expression "unaff_retaddr[0x6b]" identifier [ number_literal ])) ;) }))) (goto_statement "goto LAB_0005a8e7;" goto statement_identifier ;) })) (expression_statement "local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);" (assignment_expression "local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5)" identifier = (call_expression "FUN_0007aa40(unaff_retaddr,0,puVar1 + 5)" identifier (argument_list "(unaff_retaddr,0,puVar1 + 5)" ( identifier , number_literal , (binary_expression "puVar1 + 5" identifier + number_literal) )))) ;) (if_statement "if (local_48 != 0) goto LAB_0005aa45;" if (parenthesized_expression "(local_48 != 0)" ( (binary_expression "local_48 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0005aa45;" goto statement_identifier ;)) (if_statement "if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;" if (parenthesized_expression "(*(char *)(puVar1 + 5) != '\0')" ( (binary_expression "*(char *)(puVar1 + 5) != '\0'" (pointer_expression "*(char *)(puVar1 + 5)" * (cast_expression "(char *)(puVar1 + 5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 5)" ( (binary_expression "puVar1 + 5" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_0005a8dd;" goto statement_identifier ;)) (goto_statement "goto LAB_0005aa43;" goto statement_identifier ;) })) (labeled_statement "LAB_0005a8e7:\n  if (*(char *)((int)puVar1 + 0x16) == '\0') {\nLAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }\n    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);\n    local_48 = 0x26;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }\n    goto LAB_0005aa45;\n  }" statement_identifier : (if_statement "if (*(char *)((int)puVar1 + 0x16) == '\0') {\nLAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }\n    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);\n    local_48 = 0x26;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }\n    goto LAB_0005aa45;\n  }" if (parenthesized_expression "(*(char *)((int)puVar1 + 0x16) == '\0')" ( (binary_expression "*(char *)((int)puVar1 + 0x16) == '\0'" (pointer_expression "*(char *)((int)puVar1 + 0x16)" * (cast_expression "(char *)((int)puVar1 + 0x16)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar1 + 0x16)" ( (binary_expression "(int)puVar1 + 0x16" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\nLAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }\n    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);\n    local_48 = 0x26;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }\n    goto LAB_0005aa45;\n  }" { (labeled_statement "LAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }" statement_identifier : (if_statement "if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }" if (parenthesized_expression "(*(char *)(unaff_retaddr + 0x94) == '\0')" ( (binary_expression "*(char *)(unaff_retaddr + 0x94) == '\0'" (pointer_expression "*(char *)(unaff_retaddr + 0x94)" * (cast_expression "(char *)(unaff_retaddr + 0x94)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x94)" ( (binary_expression "unaff_retaddr + 0x94" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }" { (expression_statement "local_28 = (char *)0x0;" (assignment_expression "local_28 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (expression_statement "local_38[3] = 0;" (assignment_expression "local_38[3] = 0" (subscript_expression "local_38[3]" identifier [ number_literal ]) = number_literal) ;) }) (else_clause "else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }" else (compound_statement "{\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }" { (expression_statement "uVar5 = unaff_retaddr[0x5a];" (assignment_expression "uVar5 = unaff_retaddr[0x5a]" identifier = (subscript_expression "unaff_retaddr[0x5a]" identifier [ number_literal ])) ;) (expression_statement "local_28 = (char *)unaff_retaddr[0x5b];" (assignment_expression "local_28 = (char *)unaff_retaddr[0x5b]" identifier = (cast_expression "(char *)unaff_retaddr[0x5b]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "unaff_retaddr[0x5b]" identifier [ number_literal ]))) ;) (expression_statement "local_38[3] = strlen(local_28);" (assignment_expression "local_38[3] = strlen(local_28)" (subscript_expression "local_38[3]" identifier [ number_literal ]) = (call_expression "strlen(local_28)" identifier (argument_list "(local_28)" ( identifier )))) ;) })))) (expression_statement "iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);" (assignment_expression "iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4)" identifier = (call_expression "ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4)" identifier (argument_list "(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4)" ( (pointer_expression "*puVar1" * identifier) , identifier , number_literal , (binary_expression "local_38 + 3" identifier + number_literal) , number_literal , number_literal , (binary_expression "puVar1 + 4" identifier + number_literal) )))) ;) (expression_statement "local_48 = 0x26;" (assignment_expression "local_48 = 0x26" identifier = number_literal) ;) (if_statement "if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }" { (expression_statement "*(undefined1 *)((int)puVar1 + 0x16) = 1;" (assignment_expression "*(undefined1 *)((int)puVar1 + 0x16) = 1" (pointer_expression "*(undefined1 *)((int)puVar1 + 0x16)" * (cast_expression "(undefined1 *)((int)puVar1 + 0x16)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar1 + 0x16)" ( (binary_expression "(int)puVar1 + 0x16" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "local_48 = 0;" (assignment_expression "local_48 = 0" identifier = number_literal) ;) })) (goto_statement "goto LAB_0005aa45;" goto statement_identifier ;) }))) (expression_statement "iVar3 = ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40);" (assignment_expression "iVar3 = ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40)" identifier = (call_expression "ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40)" identifier (argument_list "(*puVar1,puVar1[4],0,local_38 + 1,&local_40)" ( (pointer_expression "*puVar1" * identifier) , (subscript_expression "puVar1[4]" identifier [ number_literal ]) , number_literal , (binary_expression "local_38 + 1" identifier + number_literal) , (pointer_expression "&local_40" & identifier) )))) ;) (if_statement "if (iVar3 < 0) {\n    uVar4 = ldap_err2string(iVar3);\n    puVar2 = &UNK_0002b79b;\nLAB_0005aafb:\n    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);\n    local_48 = 0x26;\n  }\n  else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }\nLAB_0005aa43:\n    local_48 = 0;\n  }" if (parenthesized_expression "(iVar3 < 0)" ( (binary_expression "iVar3 < 0" identifier < number_literal) )) (compound_statement "{\n    uVar4 = ldap_err2string(iVar3);\n    puVar2 = &UNK_0002b79b;\nLAB_0005aafb:\n    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);\n    local_48 = 0x26;\n  }" { (expression_statement "uVar4 = ldap_err2string(iVar3);" (assignment_expression "uVar4 = ldap_err2string(iVar3)" identifier = (call_expression "ldap_err2string(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (expression_statement "puVar2 = &UNK_0002b79b;" (assignment_expression "puVar2 = &UNK_0002b79b" identifier = (pointer_expression "&UNK_0002b79b" & identifier)) ;) (labeled_statement "LAB_0005aafb:\n    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);" statement_identifier : (expression_statement "FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);" (call_expression "FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4)" identifier (argument_list "(uVar5,puVar2 + unaff_EBX,uVar4)" ( identifier , (binary_expression "puVar2 + unaff_EBX" identifier + identifier) , identifier ))) ;)) (expression_statement "local_48 = 0x26;" (assignment_expression "local_48 = 0x26" identifier = number_literal) ;) }) (else_clause "else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }\nLAB_0005aa43:\n    local_48 = 0;\n  }" else (compound_statement "{\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }\nLAB_0005aa43:\n    local_48 = 0;\n  }" { (if_statement "if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }" { (expression_statement "iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);" (assignment_expression "iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1)" identifier = (call_expression "ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1)" identifier (argument_list "(*puVar1,local_40,&local_3c,0,local_38,0,0,1)" ( (pointer_expression "*puVar1" * identifier) , identifier , (pointer_expression "&local_3c" & identifier) , number_literal , identifier , number_literal , number_literal , number_literal )))) ;) (if_statement "if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }" { (expression_statement "uVar4 = ldap_err2string(iVar3);" (assignment_expression "uVar4 = ldap_err2string(iVar3)" identifier = (call_expression "ldap_err2string(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (expression_statement "puVar2 = &UNK_0002b7bb;" (assignment_expression "puVar2 = &UNK_0002b7bb" identifier = (pointer_expression "&UNK_0002b7bb" & identifier)) ;) (goto_statement "goto LAB_0005aafb;" goto statement_identifier ;) })) (if_statement "if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }" if (parenthesized_expression "(local_3c == 2)" ( (binary_expression "local_3c == 2" identifier == number_literal) )) (compound_statement "{\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }" { (expression_statement "ldap_get_option(*puVar1,0x11,local_38 + 3);" (call_expression "ldap_get_option(*puVar1,0x11,local_38 + 3)" identifier (argument_list "(*puVar1,0x11,local_38 + 3)" ( (pointer_expression "*puVar1" * identifier) , number_literal , (binary_expression "local_38 + 3" identifier + number_literal) ))) ;) (if_statement "if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }" if (parenthesized_expression "(local_38[3] == 3)" ( (binary_expression "local_38[3] == 3" (subscript_expression "local_38[3]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }" { (if_statement "if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }" if (parenthesized_expression "(local_38[0] != 0)" ( (binary_expression "local_38[0] != 0" (subscript_expression "local_38[0]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }" { (expression_statement "ldap_memfree(local_38[0]);" (call_expression "ldap_memfree(local_38[0])" identifier (argument_list "(local_38[0])" ( (subscript_expression "local_38[0]" identifier [ number_literal ]) ))) ;) (expression_statement "local_38[0] = 0;" (assignment_expression "local_38[0] = 0" (subscript_expression "local_38[0]" identifier [ number_literal ]) = number_literal) ;) })) (expression_statement "local_38[3] = 2;" (assignment_expression "local_38[3] = 2" (subscript_expression "local_38[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "ldap_set_option(*puVar1,0x11,local_38 + 3);" (call_expression "ldap_set_option(*puVar1,0x11,local_38 + 3)" identifier (argument_list "(*puVar1,0x11,local_38 + 3)" ( (pointer_expression "*puVar1" * identifier) , number_literal , (binary_expression "local_38 + 3" identifier + number_literal) ))) ;) (expression_statement "*(undefined1 *)((int)puVar1 + 0x16) = 0;" (assignment_expression "*(undefined1 *)((int)puVar1 + 0x16) = 0" (pointer_expression "*(undefined1 *)((int)puVar1 + 0x16)" * (cast_expression "(undefined1 *)((int)puVar1 + 0x16)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar1 + 0x16)" ( (binary_expression "(int)puVar1 + 0x16" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (goto_statement "goto LAB_0005a9a7;" goto statement_identifier ;) })) })) (if_statement "if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }" if (parenthesized_expression "(local_3c != 0)" ( (binary_expression "local_3c != 0" identifier != number_literal) )) (compound_statement "{\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }" { (expression_statement "iVar3 = local_38[0];" (assignment_expression "iVar3 = local_38[0]" identifier = (subscript_expression "local_38[0]" identifier [ number_literal ])) ;) (if_statement "if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }" if (parenthesized_expression "(local_38[0] == 0)" ( (binary_expression "local_38[0] == 0" (subscript_expression "local_38[0]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }" { (expression_statement "iVar3 = unaff_EBX + 0x2d4f7;" (assignment_expression "iVar3 = unaff_EBX + 0x2d4f7" identifier = (binary_expression "unaff_EBX + 0x2d4f7" identifier + number_literal)) ;) })) (expression_statement "uVar4 = ldap_err2string(0);" (assignment_expression "uVar4 = ldap_err2string(0)" identifier = (call_expression "ldap_err2string(0)" identifier (argument_list "(0)" ( number_literal )))) ;) (expression_statement "FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);" (call_expression "FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3)" identifier (argument_list "(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3)" ( identifier , (binary_expression "&UNK_0002b7e3 + unaff_EBX" (pointer_expression "&UNK_0002b7e3" & identifier) + identifier) , identifier , identifier ))) ;) (expression_statement "local_48 = 0x43;" (assignment_expression "local_48 = 0x43" identifier = number_literal) ;) (if_statement "if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }" if (parenthesized_expression "(local_38[0] != 0)" ( (binary_expression "local_38[0] != 0" (subscript_expression "local_38[0]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }" { (expression_statement "local_48 = 0x43;" (assignment_expression "local_48 = 0x43" identifier = number_literal) ;) (expression_statement "ldap_memfree(local_38[0]);" (call_expression "ldap_memfree(local_38[0])" identifier (argument_list "(local_38[0])" ( (subscript_expression "local_38[0]" identifier [ number_literal ]) ))) ;) })) (goto_statement "goto LAB_0005aa45;" goto statement_identifier ;) })) (if_statement "if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }" if (parenthesized_expression "(local_38[0] != 0)" ( (binary_expression "local_38[0] != 0" (subscript_expression "local_38[0]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n        ldap_memfree(local_38[0]);\n      }" { (expression_statement "ldap_memfree(local_38[0]);" (call_expression "ldap_memfree(local_38[0])" identifier (argument_list "(local_38[0])" ( (subscript_expression "local_38[0]" identifier [ number_literal ]) ))) ;) })) (expression_statement "unaff_retaddr[0x69] = unaff_EBX + 0x317;" (assignment_expression "unaff_retaddr[0x69] = unaff_EBX + 0x317" (subscript_expression "unaff_retaddr[0x69]" identifier [ number_literal ]) = (binary_expression "unaff_EBX + 0x317" identifier + number_literal)) ;) (expression_statement "*param_1 = 1;" (assignment_expression "*param_1 = 1" (pointer_expression "*param_1" * identifier) = number_literal) ;) })) (labeled_statement "LAB_0005aa43:\n    local_48 = 0;" statement_identifier : (expression_statement "local_48 = 0;" (assignment_expression "local_48 = 0" identifier = number_literal) ;)) }))) (labeled_statement "LAB_0005aa45:\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0007c1a0();\n  }" statement_identifier : (if_statement "if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0007c1a0();\n  }" if (parenthesized_expression "(local_24 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_24 != *(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_0007c1a0();\n  }" { comment (expression_statement "FUN_0007c1a0();" (call_expression "FUN_0007c1a0()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return local_48;" 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\nCURLcode ldap_connecting(connectdata *conn,_Bool *done)\n\n{\n  tftp_state_data *ptVar1;\n  Curl_easy *data;\n  Curl_recv *pCVar2;\n  int iVar3;\n  undefined4 uVar4;\n  char *pcVar5;\n  int in_GS_OFFSET;\n  CURLcode local_44;\n  LDAPMessage *msg;\n  int err;\n  char *info;\n  timeval tv;\n  Sockbuf *sb;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a879;\n  ptVar1 = (conn->proto).tftpc;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  data = conn->data;\n  msg = (LDAPMessage *)0x0;\n  tv.tv_sec = 0;\n  tv.tv_usec = 1;\n  info = (char *)0x0;\n  if ((conn->handler->flags & 1) != 0) {\n    if ((char)ptVar1->sockfd != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)&ptVar1->sockfd + 1) == '\0') {\n        ldap_get_option(ptVar1->state,0x5008,&sb);\n        ber_sockbuf_add_io(sb,&ldapsb_tls,0x14,conn);\n        pCVar2 = conn->recv[0];\n        *(undefined1 *)((int)&ptVar1->sockfd + 1) = 1;\n        ptVar1->mode = (tftp_mode_t)pCVar2;\n        ptVar1->error = (tftp_error_t)conn->send[0];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_44 = Curl_ssl_connect_nonblocking(conn,0,(_Bool *)&ptVar1->sockfd);\n    if (local_44 != CURLE_OK) goto LAB_0005aa45;\n    if ((char)ptVar1->sockfd != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }\nLAB_0005a8e7:\n  if (*(char *)((int)&ptVar1->sockfd + 2) == '\0') {\nLAB_0005a9a7:\n    if ((conn->bits).user_passwd == false) {\n      local_24 = (char *)0x0;\n      pcVar5 = (char *)0x0;\n      sb = (Sockbuf *)0x0;\n    }\n    else {\n      pcVar5 = conn->user;\n      local_24 = conn->passwd;\n      sb = (Sockbuf *)strlen(local_24);\n    }\n    iVar3 = ldap_sasl_bind(ptVar1->state,pcVar5,0,&sb,0,0,&ptVar1->conn);\n    local_44 = CURLE_LDAP_CANNOT_BIND;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)&ptVar1->sockfd + 2) = 1;\n      local_44 = CURLE_OK;\n    }\n    goto LAB_0005aa45;\n  }\n  iVar3 = ldap_result(ptVar1->state,ptVar1->conn,0,&tv,&msg);\n  if (iVar3 < 0) {\n    uVar4 = ldap_err2string(iVar3);\n    pcVar5 = "LDAP local: bind ldap_result %s";\nLAB_0005aafb:\n    Curl_failf(data,pcVar5,uVar4);\n    local_44 = CURLE_LDAP_CANNOT_BIND;\n  }\n  else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(ptVar1->state,msg,&err,0,&info,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        pcVar5 = "LDAP local: bind ldap_parse_result %s";\n        goto LAB_0005aafb;\n      }\n      if (err == 2) {\n        ldap_get_option(ptVar1->state,0x11,&sb);\n        if (sb == (Sockbuf *)0x3) {\n          if (info != (char *)0x0) {\n            ldap_memfree(info);\n            info = (char *)0x0;\n          }\n          sb = (Sockbuf *)0x2;\n          ldap_set_option(ptVar1->state,0x11,&sb);\n          *(undefined1 *)((int)&ptVar1->sockfd + 2) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (err != 0) {\n        pcVar5 = info;\n        if (info == (char *)0x0) {\n          pcVar5 = "";\n        }\n        uVar4 = ldap_err2string(0);\n        Curl_failf(data,"LDAP remote: bind failed %s %s",uVar4,pcVar5);\n        local_44 = CURLE_LOGIN_DENIED;\n        if (info != (char *)0x0) {\n          local_44 = CURLE_LOGIN_DENIED;\n          ldap_memfree(info);\n        }\n        goto LAB_0005aa45;\n      }\n      if (info != (char *)0x0) {\n        ldap_memfree(info);\n      }\n      conn->recv[0] = ldap_recv;\n      *done = true;\n    }\nLAB_0005aa43:\n    local_44 = CURLE_OK;\n  }\nLAB_0005aa45:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return local_44;\n}\n\n" comment comment comment (function_definition "CURLcode ldap_connecting(connectdata *conn,_Bool *done)\n\n{\n  tftp_state_data *ptVar1;\n  Curl_easy *data;\n  Curl_recv *pCVar2;\n  int iVar3;\n  undefined4 uVar4;\n  char *pcVar5;\n  int in_GS_OFFSET;\n  CURLcode local_44;\n  LDAPMessage *msg;\n  int err;\n  char *info;\n  timeval tv;\n  Sockbuf *sb;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a879;\n  ptVar1 = (conn->proto).tftpc;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  data = conn->data;\n  msg = (LDAPMessage *)0x0;\n  tv.tv_sec = 0;\n  tv.tv_usec = 1;\n  info = (char *)0x0;\n  if ((conn->handler->flags & 1) != 0) {\n    if ((char)ptVar1->sockfd != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)&ptVar1->sockfd + 1) == '\0') {\n        ldap_get_option(ptVar1->state,0x5008,&sb);\n        ber_sockbuf_add_io(sb,&ldapsb_tls,0x14,conn);\n        pCVar2 = conn->recv[0];\n        *(undefined1 *)((int)&ptVar1->sockfd + 1) = 1;\n        ptVar1->mode = (tftp_mode_t)pCVar2;\n        ptVar1->error = (tftp_error_t)conn->send[0];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_44 = Curl_ssl_connect_nonblocking(conn,0,(_Bool *)&ptVar1->sockfd);\n    if (local_44 != CURLE_OK) goto LAB_0005aa45;\n    if ((char)ptVar1->sockfd != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }\nLAB_0005a8e7:\n  if (*(char *)((int)&ptVar1->sockfd + 2) == '\0') {\nLAB_0005a9a7:\n    if ((conn->bits).user_passwd == false) {\n      local_24 = (char *)0x0;\n      pcVar5 = (char *)0x0;\n      sb = (Sockbuf *)0x0;\n    }\n    else {\n      pcVar5 = conn->user;\n      local_24 = conn->passwd;\n      sb = (Sockbuf *)strlen(local_24);\n    }\n    iVar3 = ldap_sasl_bind(ptVar1->state,pcVar5,0,&sb,0,0,&ptVar1->conn);\n    local_44 = CURLE_LDAP_CANNOT_BIND;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)&ptVar1->sockfd + 2) = 1;\n      local_44 = CURLE_OK;\n    }\n    goto LAB_0005aa45;\n  }\n  iVar3 = ldap_result(ptVar1->state,ptVar1->conn,0,&tv,&msg);\n  if (iVar3 < 0) {\n    uVar4 = ldap_err2string(iVar3);\n    pcVar5 = "LDAP local: bind ldap_result %s";\nLAB_0005aafb:\n    Curl_failf(data,pcVar5,uVar4);\n    local_44 = CURLE_LDAP_CANNOT_BIND;\n  }\n  else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(ptVar1->state,msg,&err,0,&info,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        pcVar5 = "LDAP local: bind ldap_parse_result %s";\n        goto LAB_0005aafb;\n      }\n      if (err == 2) {\n        ldap_get_option(ptVar1->state,0x11,&sb);\n        if (sb == (Sockbuf *)0x3) {\n          if (info != (char *)0x0) {\n            ldap_memfree(info);\n            info = (char *)0x0;\n          }\n          sb = (Sockbuf *)0x2;\n          ldap_set_option(ptVar1->state,0x11,&sb);\n          *(undefined1 *)((int)&ptVar1->sockfd + 2) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (err != 0) {\n        pcVar5 = info;\n        if (info == (char *)0x0) {\n          pcVar5 = "";\n        }\n        uVar4 = ldap_err2string(0);\n        Curl_failf(data,"LDAP remote: bind failed %s %s",uVar4,pcVar5);\n        local_44 = CURLE_LOGIN_DENIED;\n        if (info != (char *)0x0) {\n          local_44 = CURLE_LOGIN_DENIED;\n          ldap_memfree(info);\n        }\n        goto LAB_0005aa45;\n      }\n      if (info != (char *)0x0) {\n        ldap_memfree(info);\n      }\n      conn->recv[0] = ldap_recv;\n      *done = true;\n    }\nLAB_0005aa43:\n    local_44 = CURLE_OK;\n  }\nLAB_0005aa45:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return local_44;\n}" type_identifier (function_declarator "ldap_connecting(connectdata *conn,_Bool *done)" identifier (parameter_list "(connectdata *conn,_Bool *done)" ( (parameter_declaration "connectdata *conn" type_identifier (pointer_declarator "*conn" * identifier)) , (parameter_declaration "_Bool *done" type_identifier (pointer_declarator "*done" * identifier)) ))) (compound_statement "{\n  tftp_state_data *ptVar1;\n  Curl_easy *data;\n  Curl_recv *pCVar2;\n  int iVar3;\n  undefined4 uVar4;\n  char *pcVar5;\n  int in_GS_OFFSET;\n  CURLcode local_44;\n  LDAPMessage *msg;\n  int err;\n  char *info;\n  timeval tv;\n  Sockbuf *sb;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a879;\n  ptVar1 = (conn->proto).tftpc;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  data = conn->data;\n  msg = (LDAPMessage *)0x0;\n  tv.tv_sec = 0;\n  tv.tv_usec = 1;\n  info = (char *)0x0;\n  if ((conn->handler->flags & 1) != 0) {\n    if ((char)ptVar1->sockfd != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)&ptVar1->sockfd + 1) == '\0') {\n        ldap_get_option(ptVar1->state,0x5008,&sb);\n        ber_sockbuf_add_io(sb,&ldapsb_tls,0x14,conn);\n        pCVar2 = conn->recv[0];\n        *(undefined1 *)((int)&ptVar1->sockfd + 1) = 1;\n        ptVar1->mode = (tftp_mode_t)pCVar2;\n        ptVar1->error = (tftp_error_t)conn->send[0];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_44 = Curl_ssl_connect_nonblocking(conn,0,(_Bool *)&ptVar1->sockfd);\n    if (local_44 != CURLE_OK) goto LAB_0005aa45;\n    if ((char)ptVar1->sockfd != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }\nLAB_0005a8e7:\n  if (*(char *)((int)&ptVar1->sockfd + 2) == '\0') {\nLAB_0005a9a7:\n    if ((conn->bits).user_passwd == false) {\n      local_24 = (char *)0x0;\n      pcVar5 = (char *)0x0;\n      sb = (Sockbuf *)0x0;\n    }\n    else {\n      pcVar5 = conn->user;\n      local_24 = conn->passwd;\n      sb = (Sockbuf *)strlen(local_24);\n    }\n    iVar3 = ldap_sasl_bind(ptVar1->state,pcVar5,0,&sb,0,0,&ptVar1->conn);\n    local_44 = CURLE_LDAP_CANNOT_BIND;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)&ptVar1->sockfd + 2) = 1;\n      local_44 = CURLE_OK;\n    }\n    goto LAB_0005aa45;\n  }\n  iVar3 = ldap_result(ptVar1->state,ptVar1->conn,0,&tv,&msg);\n  if (iVar3 < 0) {\n    uVar4 = ldap_err2string(iVar3);\n    pcVar5 = "LDAP local: bind ldap_result %s";\nLAB_0005aafb:\n    Curl_failf(data,pcVar5,uVar4);\n    local_44 = CURLE_LDAP_CANNOT_BIND;\n  }\n  else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(ptVar1->state,msg,&err,0,&info,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        pcVar5 = "LDAP local: bind ldap_parse_result %s";\n        goto LAB_0005aafb;\n      }\n      if (err == 2) {\n        ldap_get_option(ptVar1->state,0x11,&sb);\n        if (sb == (Sockbuf *)0x3) {\n          if (info != (char *)0x0) {\n            ldap_memfree(info);\n            info = (char *)0x0;\n          }\n          sb = (Sockbuf *)0x2;\n          ldap_set_option(ptVar1->state,0x11,&sb);\n          *(undefined1 *)((int)&ptVar1->sockfd + 2) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (err != 0) {\n        pcVar5 = info;\n        if (info == (char *)0x0) {\n          pcVar5 = "";\n        }\n        uVar4 = ldap_err2string(0);\n        Curl_failf(data,"LDAP remote: bind failed %s %s",uVar4,pcVar5);\n        local_44 = CURLE_LOGIN_DENIED;\n        if (info != (char *)0x0) {\n          local_44 = CURLE_LOGIN_DENIED;\n          ldap_memfree(info);\n        }\n        goto LAB_0005aa45;\n      }\n      if (info != (char *)0x0) {\n        ldap_memfree(info);\n      }\n      conn->recv[0] = ldap_recv;\n      *done = true;\n    }\nLAB_0005aa43:\n    local_44 = CURLE_OK;\n  }\nLAB_0005aa45:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return local_44;\n}" { (declaration "tftp_state_data *ptVar1;" type_identifier (pointer_declarator "*ptVar1" * identifier) ;) (declaration "Curl_easy *data;" type_identifier (pointer_declarator "*data" * identifier) ;) (declaration "Curl_recv *pCVar2;" type_identifier (pointer_declarator "*pCVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "CURLcode local_44;" type_identifier identifier ;) (declaration "LDAPMessage *msg;" type_identifier (pointer_declarator "*msg" * identifier) ;) (declaration "int err;" primitive_type identifier ;) (declaration "char *info;" primitive_type (pointer_declarator "*info" * identifier) ;) (declaration "timeval tv;" type_identifier identifier ;) (declaration "Sockbuf *sb;" type_identifier (pointer_declarator "*sb" * identifier) ;) (declaration "char *local_24;" primitive_type (pointer_declarator "*local_24" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x5a879;" (assignment_expression "uStack_14 = 0x5a879" identifier = number_literal) ;) (expression_statement "ptVar1 = (conn->proto).tftpc;" (assignment_expression "ptVar1 = (conn->proto).tftpc" identifier = (field_expression "(conn->proto).tftpc" (parenthesized_expression "(conn->proto)" ( (field_expression "conn->proto" identifier -> field_identifier) )) . field_identifier)) ;) (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 "data = conn->data;" (assignment_expression "data = conn->data" identifier = (field_expression "conn->data" identifier -> field_identifier)) ;) (expression_statement "msg = (LDAPMessage *)0x0;" (assignment_expression "msg = (LDAPMessage *)0x0" identifier = (cast_expression "(LDAPMessage *)0x0" ( (type_descriptor "LDAPMessage *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "tv.tv_sec = 0;" (assignment_expression "tv.tv_sec = 0" (field_expression "tv.tv_sec" identifier . field_identifier) = number_literal) ;) (expression_statement "tv.tv_usec = 1;" (assignment_expression "tv.tv_usec = 1" (field_expression "tv.tv_usec" identifier . field_identifier) = number_literal) ;) (expression_statement "info = (char *)0x0;" (assignment_expression "info = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if ((conn->handler->flags & 1) != 0) {\n    if ((char)ptVar1->sockfd != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)&ptVar1->sockfd + 1) == '\0') {\n        ldap_get_option(ptVar1->state,0x5008,&sb);\n        ber_sockbuf_add_io(sb,&ldapsb_tls,0x14,conn);\n        pCVar2 = conn->recv[0];\n        *(undefined1 *)((int)&ptVar1->sockfd + 1) = 1;\n        ptVar1->mode = (tftp_mode_t)pCVar2;\n        ptVar1->error = (tftp_error_t)conn->send[0];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_44 = Curl_ssl_connect_nonblocking(conn,0,(_Bool *)&ptVar1->sockfd);\n    if (local_44 != CURLE_OK) goto LAB_0005aa45;\n    if ((char)ptVar1->sockfd != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }" if (parenthesized_expression "((conn->handler->flags & 1) != 0)" ( (binary_expression "(conn->handler->flags & 1) != 0" (parenthesized_expression "(conn->handler->flags & 1)" ( (binary_expression "conn->handler->flags & 1" (field_expression "conn->handler->flags" (field_expression "conn->handler" identifier -> field_identifier) -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    if ((char)ptVar1->sockfd != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)&ptVar1->sockfd + 1) == '\0') {\n        ldap_get_option(ptVar1->state,0x5008,&sb);\n        ber_sockbuf_add_io(sb,&ldapsb_tls,0x14,conn);\n        pCVar2 = conn->recv[0];\n        *(undefined1 *)((int)&ptVar1->sockfd + 1) = 1;\n        ptVar1->mode = (tftp_mode_t)pCVar2;\n        ptVar1->error = (tftp_error_t)conn->send[0];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_44 = Curl_ssl_connect_nonblocking(conn,0,(_Bool *)&ptVar1->sockfd);\n    if (local_44 != CURLE_OK) goto LAB_0005aa45;\n    if ((char)ptVar1->sockfd != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }" { (if_statement "if ((char)ptVar1->sockfd != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)&ptVar1->sockfd + 1) == '\0') {\n        ldap_get_option(ptVar1->state,0x5008,&sb);\n        ber_sockbuf_add_io(sb,&ldapsb_tls,0x14,conn);\n        pCVar2 = conn->recv[0];\n        *(undefined1 *)((int)&ptVar1->sockfd + 1) = 1;\n        ptVar1->mode = (tftp_mode_t)pCVar2;\n        ptVar1->error = (tftp_error_t)conn->send[0];\n      }\n      goto LAB_0005a8e7;\n    }" if (parenthesized_expression "((char)ptVar1->sockfd != '\0')" ( (binary_expression "(char)ptVar1->sockfd != '\0'" (cast_expression "(char)ptVar1->sockfd" ( (type_descriptor "char" primitive_type) ) (field_expression "ptVar1->sockfd" identifier -> field_identifier)) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\nLAB_0005a8dd:\n      if (*(char *)((int)&ptVar1->sockfd + 1) == '\0') {\n        ldap_get_option(ptVar1->state,0x5008,&sb);\n        ber_sockbuf_add_io(sb,&ldapsb_tls,0x14,conn);\n        pCVar2 = conn->recv[0];\n        *(undefined1 *)((int)&ptVar1->sockfd + 1) = 1;\n        ptVar1->mode = (tftp_mode_t)pCVar2;\n        ptVar1->error = (tftp_error_t)conn->send[0];\n      }\n      goto LAB_0005a8e7;\n    }" { (labeled_statement "LAB_0005a8dd:\n      if (*(char *)((int)&ptVar1->sockfd + 1) == '\0') {\n        ldap_get_option(ptVar1->state,0x5008,&sb);\n        ber_sockbuf_add_io(sb,&ldapsb_tls,0x14,conn);\n        pCVar2 = conn->recv[0];\n        *(undefined1 *)((int)&ptVar1->sockfd + 1) = 1;\n        ptVar1->mode = (tftp_mode_t)pCVar2;\n        ptVar1->error = (tftp_error_t)conn->send[0];\n      }" statement_identifier : (if_statement "if (*(char *)((int)&ptVar1->sockfd + 1) == '\0') {\n        ldap_get_option(ptVar1->state,0x5008,&sb);\n        ber_sockbuf_add_io(sb,&ldapsb_tls,0x14,conn);\n        pCVar2 = conn->recv[0];\n        *(undefined1 *)((int)&ptVar1->sockfd + 1) = 1;\n        ptVar1->mode = (tftp_mode_t)pCVar2;\n        ptVar1->error = (tftp_error_t)conn->send[0];\n      }" if (parenthesized_expression "(*(char *)((int)&ptVar1->sockfd + 1) == '\0')" ( (binary_expression "*(char *)((int)&ptVar1->sockfd + 1) == '\0'" (pointer_expression "*(char *)((int)&ptVar1->sockfd + 1)" * (cast_expression "(char *)((int)&ptVar1->sockfd + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&ptVar1->sockfd + 1)" ( (binary_expression "(int)&ptVar1->sockfd + 1" (cast_expression "(int)&ptVar1->sockfd" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&ptVar1->sockfd" & (field_expression "ptVar1->sockfd" identifier -> field_identifier))) + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        ldap_get_option(ptVar1->state,0x5008,&sb);\n        ber_sockbuf_add_io(sb,&ldapsb_tls,0x14,conn);\n        pCVar2 = conn->recv[0];\n        *(undefined1 *)((int)&ptVar1->sockfd + 1) = 1;\n        ptVar1->mode = (tftp_mode_t)pCVar2;\n        ptVar1->error = (tftp_error_t)conn->send[0];\n      }" { (expression_statement "ldap_get_option(ptVar1->state,0x5008,&sb);" (call_expression "ldap_get_option(ptVar1->state,0x5008,&sb)" identifier (argument_list "(ptVar1->state,0x5008,&sb)" ( (field_expression "ptVar1->state" identifier -> field_identifier) , number_literal , (pointer_expression "&sb" & identifier) ))) ;) (expression_statement "ber_sockbuf_add_io(sb,&ldapsb_tls,0x14,conn);" (call_expression "ber_sockbuf_add_io(sb,&ldapsb_tls,0x14,conn)" identifier (argument_list "(sb,&ldapsb_tls,0x14,conn)" ( identifier , (pointer_expression "&ldapsb_tls" & identifier) , number_literal , identifier ))) ;) (expression_statement "pCVar2 = conn->recv[0];" (assignment_expression "pCVar2 = conn->recv[0]" identifier = (subscript_expression "conn->recv[0]" (field_expression "conn->recv" identifier -> field_identifier) [ number_literal ])) ;) (expression_statement "*(undefined1 *)((int)&ptVar1->sockfd + 1) = 1;" (assignment_expression "*(undefined1 *)((int)&ptVar1->sockfd + 1) = 1" (pointer_expression "*(undefined1 *)((int)&ptVar1->sockfd + 1)" * (cast_expression "(undefined1 *)((int)&ptVar1->sockfd + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&ptVar1->sockfd + 1)" ( (binary_expression "(int)&ptVar1->sockfd + 1" (cast_expression "(int)&ptVar1->sockfd" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&ptVar1->sockfd" & (field_expression "ptVar1->sockfd" identifier -> field_identifier))) + number_literal) )))) = number_literal) ;) (expression_statement "ptVar1->mode = (tftp_mode_t)pCVar2;" (assignment_expression "ptVar1->mode = (tftp_mode_t)pCVar2" (field_expression "ptVar1->mode" identifier -> field_identifier) = (cast_expression "(tftp_mode_t)pCVar2" ( (type_descriptor "tftp_mode_t" type_identifier) ) identifier)) ;) (expression_statement "ptVar1->error = (tftp_error_t)conn->send[0];" (assignment_expression "ptVar1->error = (tftp_error_t)conn->send[0]" (field_expression "ptVar1->error" identifier -> field_identifier) = (cast_expression "(tftp_error_t)conn->send[0]" ( (type_descriptor "tftp_error_t" type_identifier) ) (subscript_expression "conn->send[0]" (field_expression "conn->send" identifier -> field_identifier) [ number_literal ]))) ;) }))) (goto_statement "goto LAB_0005a8e7;" goto statement_identifier ;) })) (expression_statement "local_44 = Curl_ssl_connect_nonblocking(conn,0,(_Bool *)&ptVar1->sockfd);" (assignment_expression "local_44 = Curl_ssl_connect_nonblocking(conn,0,(_Bool *)&ptVar1->sockfd)" identifier = (call_expression "Curl_ssl_connect_nonblocking(conn,0,(_Bool *)&ptVar1->sockfd)" identifier (argument_list "(conn,0,(_Bool *)&ptVar1->sockfd)" ( identifier , number_literal , (cast_expression "(_Bool *)&ptVar1->sockfd" ( (type_descriptor "_Bool *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&ptVar1->sockfd" & (field_expression "ptVar1->sockfd" identifier -> field_identifier))) )))) ;) (if_statement "if (local_44 != CURLE_OK) goto LAB_0005aa45;" if (parenthesized_expression "(local_44 != CURLE_OK)" ( (binary_expression "local_44 != CURLE_OK" identifier != identifier) )) (goto_statement "goto LAB_0005aa45;" goto statement_identifier ;)) (if_statement "if ((char)ptVar1->sockfd != '\0') goto LAB_0005a8dd;" if (parenthesized_expression "((char)ptVar1->sockfd != '\0')" ( (binary_expression "(char)ptVar1->sockfd != '\0'" (cast_expression "(char)ptVar1->sockfd" ( (type_descriptor "char" primitive_type) ) (field_expression "ptVar1->sockfd" identifier -> field_identifier)) != (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_0005a8dd;" goto statement_identifier ;)) (goto_statement "goto LAB_0005aa43;" goto statement_identifier ;) })) (labeled_statement "LAB_0005a8e7:\n  if (*(char *)((int)&ptVar1->sockfd + 2) == '\0') {\nLAB_0005a9a7:\n    if ((conn->bits).user_passwd == false) {\n      local_24 = (char *)0x0;\n      pcVar5 = (char *)0x0;\n      sb = (Sockbuf *)0x0;\n    }\n    else {\n      pcVar5 = conn->user;\n      local_24 = conn->passwd;\n      sb = (Sockbuf *)strlen(local_24);\n    }\n    iVar3 = ldap_sasl_bind(ptVar1->state,pcVar5,0,&sb,0,0,&ptVar1->conn);\n    local_44 = CURLE_LDAP_CANNOT_BIND;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)&ptVar1->sockfd + 2) = 1;\n      local_44 = CURLE_OK;\n    }\n    goto LAB_0005aa45;\n  }" statement_identifier : (if_statement "if (*(char *)((int)&ptVar1->sockfd + 2) == '\0') {\nLAB_0005a9a7:\n    if ((conn->bits).user_passwd == false) {\n      local_24 = (char *)0x0;\n      pcVar5 = (char *)0x0;\n      sb = (Sockbuf *)0x0;\n    }\n    else {\n      pcVar5 = conn->user;\n      local_24 = conn->passwd;\n      sb = (Sockbuf *)strlen(local_24);\n    }\n    iVar3 = ldap_sasl_bind(ptVar1->state,pcVar5,0,&sb,0,0,&ptVar1->conn);\n    local_44 = CURLE_LDAP_CANNOT_BIND;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)&ptVar1->sockfd + 2) = 1;\n      local_44 = CURLE_OK;\n    }\n    goto LAB_0005aa45;\n  }" if (parenthesized_expression "(*(char *)((int)&ptVar1->sockfd + 2) == '\0')" ( (binary_expression "*(char *)((int)&ptVar1->sockfd + 2) == '\0'" (pointer_expression "*(char *)((int)&ptVar1->sockfd + 2)" * (cast_expression "(char *)((int)&ptVar1->sockfd + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&ptVar1->sockfd + 2)" ( (binary_expression "(int)&ptVar1->sockfd + 2" (cast_expression "(int)&ptVar1->sockfd" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&ptVar1->sockfd" & (field_expression "ptVar1->sockfd" identifier -> field_identifier))) + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\nLAB_0005a9a7:\n    if ((conn->bits).user_passwd == false) {\n      local_24 = (char *)0x0;\n      pcVar5 = (char *)0x0;\n      sb = (Sockbuf *)0x0;\n    }\n    else {\n      pcVar5 = conn->user;\n      local_24 = conn->passwd;\n      sb = (Sockbuf *)strlen(local_24);\n    }\n    iVar3 = ldap_sasl_bind(ptVar1->state,pcVar5,0,&sb,0,0,&ptVar1->conn);\n    local_44 = CURLE_LDAP_CANNOT_BIND;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)&ptVar1->sockfd + 2) = 1;\n      local_44 = CURLE_OK;\n    }\n    goto LAB_0005aa45;\n  }" { (labeled_statement "LAB_0005a9a7:\n    if ((conn->bits).user_passwd == false) {\n      local_24 = (char *)0x0;\n      pcVar5 = (char *)0x0;\n      sb = (Sockbuf *)0x0;\n    }\n    else {\n      pcVar5 = conn->user;\n      local_24 = conn->passwd;\n      sb = (Sockbuf *)strlen(local_24);\n    }" statement_identifier : (if_statement "if ((conn->bits).user_passwd == false) {\n      local_24 = (char *)0x0;\n      pcVar5 = (char *)0x0;\n      sb = (Sockbuf *)0x0;\n    }\n    else {\n      pcVar5 = conn->user;\n      local_24 = conn->passwd;\n      sb = (Sockbuf *)strlen(local_24);\n    }" if (parenthesized_expression "((conn->bits).user_passwd == false)" ( (binary_expression "(conn->bits).user_passwd == false" (field_expression "(conn->bits).user_passwd" (parenthesized_expression "(conn->bits)" ( (field_expression "conn->bits" identifier -> field_identifier) )) . field_identifier) == false) )) (compound_statement "{\n      local_24 = (char *)0x0;\n      pcVar5 = (char *)0x0;\n      sb = (Sockbuf *)0x0;\n    }" { (expression_statement "local_24 = (char *)0x0;" (assignment_expression "local_24 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pcVar5 = (char *)0x0;" (assignment_expression "pcVar5 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "sb = (Sockbuf *)0x0;" (assignment_expression "sb = (Sockbuf *)0x0" identifier = (cast_expression "(Sockbuf *)0x0" ( (type_descriptor "Sockbuf *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n      pcVar5 = conn->user;\n      local_24 = conn->passwd;\n      sb = (Sockbuf *)strlen(local_24);\n    }" else (compound_statement "{\n      pcVar5 = conn->user;\n      local_24 = conn->passwd;\n      sb = (Sockbuf *)strlen(local_24);\n    }" { (expression_statement "pcVar5 = conn->user;" (assignment_expression "pcVar5 = conn->user" identifier = (field_expression "conn->user" identifier -> field_identifier)) ;) (expression_statement "local_24 = conn->passwd;" (assignment_expression "local_24 = conn->passwd" identifier = (field_expression "conn->passwd" identifier -> field_identifier)) ;) (expression_statement "sb = (Sockbuf *)strlen(local_24);" (assignment_expression "sb = (Sockbuf *)strlen(local_24)" identifier = (cast_expression "(Sockbuf *)strlen(local_24)" ( (type_descriptor "Sockbuf *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "strlen(local_24)" identifier (argument_list "(local_24)" ( identifier ))))) ;) })))) (expression_statement "iVar3 = ldap_sasl_bind(ptVar1->state,pcVar5,0,&sb,0,0,&ptVar1->conn);" (assignment_expression "iVar3 = ldap_sasl_bind(ptVar1->state,pcVar5,0,&sb,0,0,&ptVar1->conn)" identifier = (call_expression "ldap_sasl_bind(ptVar1->state,pcVar5,0,&sb,0,0,&ptVar1->conn)" identifier (argument_list "(ptVar1->state,pcVar5,0,&sb,0,0,&ptVar1->conn)" ( (field_expression "ptVar1->state" identifier -> field_identifier) , identifier , number_literal , (pointer_expression "&sb" & identifier) , number_literal , number_literal , (pointer_expression "&ptVar1->conn" & (field_expression "ptVar1->conn" identifier -> field_identifier)) )))) ;) (expression_statement "local_44 = CURLE_LDAP_CANNOT_BIND;" (assignment_expression "local_44 = CURLE_LDAP_CANNOT_BIND" identifier = identifier) ;) (if_statement "if (iVar3 == 0) {\n      *(undefined1 *)((int)&ptVar1->sockfd + 2) = 1;\n      local_44 = CURLE_OK;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      *(undefined1 *)((int)&ptVar1->sockfd + 2) = 1;\n      local_44 = CURLE_OK;\n    }" { (expression_statement "*(undefined1 *)((int)&ptVar1->sockfd + 2) = 1;" (assignment_expression "*(undefined1 *)((int)&ptVar1->sockfd + 2) = 1" (pointer_expression "*(undefined1 *)((int)&ptVar1->sockfd + 2)" * (cast_expression "(undefined1 *)((int)&ptVar1->sockfd + 2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&ptVar1->sockfd + 2)" ( (binary_expression "(int)&ptVar1->sockfd + 2" (cast_expression "(int)&ptVar1->sockfd" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&ptVar1->sockfd" & (field_expression "ptVar1->sockfd" identifier -> field_identifier))) + number_literal) )))) = number_literal) ;) (expression_statement "local_44 = CURLE_OK;" (assignment_expression "local_44 = CURLE_OK" identifier = identifier) ;) })) (goto_statement "goto LAB_0005aa45;" goto statement_identifier ;) }))) (expression_statement "iVar3 = ldap_result(ptVar1->state,ptVar1->conn,0,&tv,&msg);" (assignment_expression "iVar3 = ldap_result(ptVar1->state,ptVar1->conn,0,&tv,&msg)" identifier = (call_expression "ldap_result(ptVar1->state,ptVar1->conn,0,&tv,&msg)" identifier (argument_list "(ptVar1->state,ptVar1->conn,0,&tv,&msg)" ( (field_expression "ptVar1->state" identifier -> field_identifier) , (field_expression "ptVar1->conn" identifier -> field_identifier) , number_literal , (pointer_expression "&tv" & identifier) , (pointer_expression "&msg" & identifier) )))) ;) (if_statement "if (iVar3 < 0) {\n    uVar4 = ldap_err2string(iVar3);\n    pcVar5 = "LDAP local: bind ldap_result %s";\nLAB_0005aafb:\n    Curl_failf(data,pcVar5,uVar4);\n    local_44 = CURLE_LDAP_CANNOT_BIND;\n  }\n  else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(ptVar1->state,msg,&err,0,&info,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        pcVar5 = "LDAP local: bind ldap_parse_result %s";\n        goto LAB_0005aafb;\n      }\n      if (err == 2) {\n        ldap_get_option(ptVar1->state,0x11,&sb);\n        if (sb == (Sockbuf *)0x3) {\n          if (info != (char *)0x0) {\n            ldap_memfree(info);\n            info = (char *)0x0;\n          }\n          sb = (Sockbuf *)0x2;\n          ldap_set_option(ptVar1->state,0x11,&sb);\n          *(undefined1 *)((int)&ptVar1->sockfd + 2) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (err != 0) {\n        pcVar5 = info;\n        if (info == (char *)0x0) {\n          pcVar5 = "";\n        }\n        uVar4 = ldap_err2string(0);\n        Curl_failf(data,"LDAP remote: bind failed %s %s",uVar4,pcVar5);\n        local_44 = CURLE_LOGIN_DENIED;\n        if (info != (char *)0x0) {\n          local_44 = CURLE_LOGIN_DENIED;\n          ldap_memfree(info);\n        }\n        goto LAB_0005aa45;\n      }\n      if (info != (char *)0x0) {\n        ldap_memfree(info);\n      }\n      conn->recv[0] = ldap_recv;\n      *done = true;\n    }\nLAB_0005aa43:\n    local_44 = CURLE_OK;\n  }" if (parenthesized_expression "(iVar3 < 0)" ( (binary_expression "iVar3 < 0" identifier < number_literal) )) (compound_statement "{\n    uVar4 = ldap_err2string(iVar3);\n    pcVar5 = "LDAP local: bind ldap_result %s";\nLAB_0005aafb:\n    Curl_failf(data,pcVar5,uVar4);\n    local_44 = CURLE_LDAP_CANNOT_BIND;\n  }" { (expression_statement "uVar4 = ldap_err2string(iVar3);" (assignment_expression "uVar4 = ldap_err2string(iVar3)" identifier = (call_expression "ldap_err2string(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (expression_statement "pcVar5 = "LDAP local: bind ldap_result %s";" (assignment_expression "pcVar5 = "LDAP local: bind ldap_result %s"" identifier = (string_literal ""LDAP local: bind ldap_result %s"" " string_content ")) ;) (labeled_statement "LAB_0005aafb:\n    Curl_failf(data,pcVar5,uVar4);" statement_identifier : (expression_statement "Curl_failf(data,pcVar5,uVar4);" (call_expression "Curl_failf(data,pcVar5,uVar4)" identifier (argument_list "(data,pcVar5,uVar4)" ( identifier , identifier , identifier ))) ;)) (expression_statement "local_44 = CURLE_LDAP_CANNOT_BIND;" (assignment_expression "local_44 = CURLE_LDAP_CANNOT_BIND" identifier = identifier) ;) }) (else_clause "else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(ptVar1->state,msg,&err,0,&info,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        pcVar5 = "LDAP local: bind ldap_parse_result %s";\n        goto LAB_0005aafb;\n      }\n      if (err == 2) {\n        ldap_get_option(ptVar1->state,0x11,&sb);\n        if (sb == (Sockbuf *)0x3) {\n          if (info != (char *)0x0) {\n            ldap_memfree(info);\n            info = (char *)0x0;\n          }\n          sb = (Sockbuf *)0x2;\n          ldap_set_option(ptVar1->state,0x11,&sb);\n          *(undefined1 *)((int)&ptVar1->sockfd + 2) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (err != 0) {\n        pcVar5 = info;\n        if (info == (char *)0x0) {\n          pcVar5 = "";\n        }\n        uVar4 = ldap_err2string(0);\n        Curl_failf(data,"LDAP remote: bind failed %s %s",uVar4,pcVar5);\n        local_44 = CURLE_LOGIN_DENIED;\n        if (info != (char *)0x0) {\n          local_44 = CURLE_LOGIN_DENIED;\n          ldap_memfree(info);\n        }\n        goto LAB_0005aa45;\n      }\n      if (info != (char *)0x0) {\n        ldap_memfree(info);\n      }\n      conn->recv[0] = ldap_recv;\n      *done = true;\n    }\nLAB_0005aa43:\n    local_44 = CURLE_OK;\n  }" else (compound_statement "{\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(ptVar1->state,msg,&err,0,&info,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        pcVar5 = "LDAP local: bind ldap_parse_result %s";\n        goto LAB_0005aafb;\n      }\n      if (err == 2) {\n        ldap_get_option(ptVar1->state,0x11,&sb);\n        if (sb == (Sockbuf *)0x3) {\n          if (info != (char *)0x0) {\n            ldap_memfree(info);\n            info = (char *)0x0;\n          }\n          sb = (Sockbuf *)0x2;\n          ldap_set_option(ptVar1->state,0x11,&sb);\n          *(undefined1 *)((int)&ptVar1->sockfd + 2) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (err != 0) {\n        pcVar5 = info;\n        if (info == (char *)0x0) {\n          pcVar5 = "";\n        }\n        uVar4 = ldap_err2string(0);\n        Curl_failf(data,"LDAP remote: bind failed %s %s",uVar4,pcVar5);\n        local_44 = CURLE_LOGIN_DENIED;\n        if (info != (char *)0x0) {\n          local_44 = CURLE_LOGIN_DENIED;\n          ldap_memfree(info);\n        }\n        goto LAB_0005aa45;\n      }\n      if (info != (char *)0x0) {\n        ldap_memfree(info);\n      }\n      conn->recv[0] = ldap_recv;\n      *done = true;\n    }\nLAB_0005aa43:\n    local_44 = CURLE_OK;\n  }" { (if_statement "if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(ptVar1->state,msg,&err,0,&info,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        pcVar5 = "LDAP local: bind ldap_parse_result %s";\n        goto LAB_0005aafb;\n      }\n      if (err == 2) {\n        ldap_get_option(ptVar1->state,0x11,&sb);\n        if (sb == (Sockbuf *)0x3) {\n          if (info != (char *)0x0) {\n            ldap_memfree(info);\n            info = (char *)0x0;\n          }\n          sb = (Sockbuf *)0x2;\n          ldap_set_option(ptVar1->state,0x11,&sb);\n          *(undefined1 *)((int)&ptVar1->sockfd + 2) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (err != 0) {\n        pcVar5 = info;\n        if (info == (char *)0x0) {\n          pcVar5 = "";\n        }\n        uVar4 = ldap_err2string(0);\n        Curl_failf(data,"LDAP remote: bind failed %s %s",uVar4,pcVar5);\n        local_44 = CURLE_LOGIN_DENIED;\n        if (info != (char *)0x0) {\n          local_44 = CURLE_LOGIN_DENIED;\n          ldap_memfree(info);\n        }\n        goto LAB_0005aa45;\n      }\n      if (info != (char *)0x0) {\n        ldap_memfree(info);\n      }\n      conn->recv[0] = ldap_recv;\n      *done = true;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar3 = ldap_parse_result(ptVar1->state,msg,&err,0,&info,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        pcVar5 = "LDAP local: bind ldap_parse_result %s";\n        goto LAB_0005aafb;\n      }\n      if (err == 2) {\n        ldap_get_option(ptVar1->state,0x11,&sb);\n        if (sb == (Sockbuf *)0x3) {\n          if (info != (char *)0x0) {\n            ldap_memfree(info);\n            info = (char *)0x0;\n          }\n          sb = (Sockbuf *)0x2;\n          ldap_set_option(ptVar1->state,0x11,&sb);\n          *(undefined1 *)((int)&ptVar1->sockfd + 2) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (err != 0) {\n        pcVar5 = info;\n        if (info == (char *)0x0) {\n          pcVar5 = "";\n        }\n        uVar4 = ldap_err2string(0);\n        Curl_failf(data,"LDAP remote: bind failed %s %s",uVar4,pcVar5);\n        local_44 = CURLE_LOGIN_DENIED;\n        if (info != (char *)0x0) {\n          local_44 = CURLE_LOGIN_DENIED;\n          ldap_memfree(info);\n        }\n        goto LAB_0005aa45;\n      }\n      if (info != (char *)0x0) {\n        ldap_memfree(info);\n      }\n      conn->recv[0] = ldap_recv;\n      *done = true;\n    }" { (expression_statement "iVar3 = ldap_parse_result(ptVar1->state,msg,&err,0,&info,0,0,1);" (assignment_expression "iVar3 = ldap_parse_result(ptVar1->state,msg,&err,0,&info,0,0,1)" identifier = (call_expression "ldap_parse_result(ptVar1->state,msg,&err,0,&info,0,0,1)" identifier (argument_list "(ptVar1->state,msg,&err,0,&info,0,0,1)" ( (field_expression "ptVar1->state" identifier -> field_identifier) , identifier , (pointer_expression "&err" & identifier) , number_literal , (pointer_expression "&info" & identifier) , number_literal , number_literal , number_literal )))) ;) (if_statement "if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        pcVar5 = "LDAP local: bind ldap_parse_result %s";\n        goto LAB_0005aafb;\n      }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar4 = ldap_err2string(iVar3);\n        pcVar5 = "LDAP local: bind ldap_parse_result %s";\n        goto LAB_0005aafb;\n      }" { (expression_statement "uVar4 = ldap_err2string(iVar3);" (assignment_expression "uVar4 = ldap_err2string(iVar3)" identifier = (call_expression "ldap_err2string(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (expression_statement "pcVar5 = "LDAP local: bind ldap_parse_result %s";" (assignment_expression "pcVar5 = "LDAP local: bind ldap_parse_result %s"" identifier = (string_literal ""LDAP local: bind ldap_parse_result %s"" " string_content ")) ;) (goto_statement "goto LAB_0005aafb;" goto statement_identifier ;) })) (if_statement "if (err == 2) {\n        ldap_get_option(ptVar1->state,0x11,&sb);\n        if (sb == (Sockbuf *)0x3) {\n          if (info != (char *)0x0) {\n            ldap_memfree(info);\n            info = (char *)0x0;\n          }\n          sb = (Sockbuf *)0x2;\n          ldap_set_option(ptVar1->state,0x11,&sb);\n          *(undefined1 *)((int)&ptVar1->sockfd + 2) = 0;\n          goto LAB_0005a9a7;\n        }\n      }" if (parenthesized_expression "(err == 2)" ( (binary_expression "err == 2" identifier == number_literal) )) (compound_statement "{\n        ldap_get_option(ptVar1->state,0x11,&sb);\n        if (sb == (Sockbuf *)0x3) {\n          if (info != (char *)0x0) {\n            ldap_memfree(info);\n            info = (char *)0x0;\n          }\n          sb = (Sockbuf *)0x2;\n          ldap_set_option(ptVar1->state,0x11,&sb);\n          *(undefined1 *)((int)&ptVar1->sockfd + 2) = 0;\n          goto LAB_0005a9a7;\n        }\n      }" { (expression_statement "ldap_get_option(ptVar1->state,0x11,&sb);" (call_expression "ldap_get_option(ptVar1->state,0x11,&sb)" identifier (argument_list "(ptVar1->state,0x11,&sb)" ( (field_expression "ptVar1->state" identifier -> field_identifier) , number_literal , (pointer_expression "&sb" & identifier) ))) ;) (if_statement "if (sb == (Sockbuf *)0x3) {\n          if (info != (char *)0x0) {\n            ldap_memfree(info);\n            info = (char *)0x0;\n          }\n          sb = (Sockbuf *)0x2;\n          ldap_set_option(ptVar1->state,0x11,&sb);\n          *(undefined1 *)((int)&ptVar1->sockfd + 2) = 0;\n          goto LAB_0005a9a7;\n        }" if (parenthesized_expression "(sb == (Sockbuf *)0x3)" ( (binary_expression "sb == (Sockbuf *)0x3" identifier == (cast_expression "(Sockbuf *)0x3" ( (type_descriptor "Sockbuf *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          if (info != (char *)0x0) {\n            ldap_memfree(info);\n            info = (char *)0x0;\n          }\n          sb = (Sockbuf *)0x2;\n          ldap_set_option(ptVar1->state,0x11,&sb);\n          *(undefined1 *)((int)&ptVar1->sockfd + 2) = 0;\n          goto LAB_0005a9a7;\n        }" { (if_statement "if (info != (char *)0x0) {\n            ldap_memfree(info);\n            info = (char *)0x0;\n          }" if (parenthesized_expression "(info != (char *)0x0)" ( (binary_expression "info != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            ldap_memfree(info);\n            info = (char *)0x0;\n          }" { (expression_statement "ldap_memfree(info);" (call_expression "ldap_memfree(info)" identifier (argument_list "(info)" ( identifier ))) ;) (expression_statement "info = (char *)0x0;" (assignment_expression "info = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) (expression_statement "sb = (Sockbuf *)0x2;" (assignment_expression "sb = (Sockbuf *)0x2" identifier = (cast_expression "(Sockbuf *)0x2" ( (type_descriptor "Sockbuf *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "ldap_set_option(ptVar1->state,0x11,&sb);" (call_expression "ldap_set_option(ptVar1->state,0x11,&sb)" identifier (argument_list "(ptVar1->state,0x11,&sb)" ( (field_expression "ptVar1->state" identifier -> field_identifier) , number_literal , (pointer_expression "&sb" & identifier) ))) ;) (expression_statement "*(undefined1 *)((int)&ptVar1->sockfd + 2) = 0;" (assignment_expression "*(undefined1 *)((int)&ptVar1->sockfd + 2) = 0" (pointer_expression "*(undefined1 *)((int)&ptVar1->sockfd + 2)" * (cast_expression "(undefined1 *)((int)&ptVar1->sockfd + 2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&ptVar1->sockfd + 2)" ( (binary_expression "(int)&ptVar1->sockfd + 2" (cast_expression "(int)&ptVar1->sockfd" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&ptVar1->sockfd" & (field_expression "ptVar1->sockfd" identifier -> field_identifier))) + number_literal) )))) = number_literal) ;) (goto_statement "goto LAB_0005a9a7;" goto statement_identifier ;) })) })) (if_statement "if (err != 0) {\n        pcVar5 = info;\n        if (info == (char *)0x0) {\n          pcVar5 = "";\n        }\n        uVar4 = ldap_err2string(0);\n        Curl_failf(data,"LDAP remote: bind failed %s %s",uVar4,pcVar5);\n        local_44 = CURLE_LOGIN_DENIED;\n        if (info != (char *)0x0) {\n          local_44 = CURLE_LOGIN_DENIED;\n          ldap_memfree(info);\n        }\n        goto LAB_0005aa45;\n      }" if (parenthesized_expression "(err != 0)" ( (binary_expression "err != 0" identifier != number_literal) )) (compound_statement "{\n        pcVar5 = info;\n        if (info == (char *)0x0) {\n          pcVar5 = "";\n        }\n        uVar4 = ldap_err2string(0);\n        Curl_failf(data,"LDAP remote: bind failed %s %s",uVar4,pcVar5);\n        local_44 = CURLE_LOGIN_DENIED;\n        if (info != (char *)0x0) {\n          local_44 = CURLE_LOGIN_DENIED;\n          ldap_memfree(info);\n        }\n        goto LAB_0005aa45;\n      }" { (expression_statement "pcVar5 = info;" (assignment_expression "pcVar5 = info" identifier = identifier) ;) (if_statement "if (info == (char *)0x0) {\n          pcVar5 = "";\n        }" if (parenthesized_expression "(info == (char *)0x0)" ( (binary_expression "info == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          pcVar5 = "";\n        }" { (expression_statement "pcVar5 = "";" (assignment_expression "pcVar5 = """ identifier = (string_literal """" " ")) ;) })) (expression_statement "uVar4 = ldap_err2string(0);" (assignment_expression "uVar4 = ldap_err2string(0)" identifier = (call_expression "ldap_err2string(0)" identifier (argument_list "(0)" ( number_literal )))) ;) (expression_statement "Curl_failf(data,"LDAP remote: bind failed %s %s",uVar4,pcVar5);" (call_expression "Curl_failf(data,"LDAP remote: bind failed %s %s",uVar4,pcVar5)" identifier (argument_list "(data,"LDAP remote: bind failed %s %s",uVar4,pcVar5)" ( identifier , (string_literal ""LDAP remote: bind failed %s %s"" " string_content ") , identifier , identifier ))) ;) (expression_statement "local_44 = CURLE_LOGIN_DENIED;" (assignment_expression "local_44 = CURLE_LOGIN_DENIED" identifier = identifier) ;) (if_statement "if (info != (char *)0x0) {\n          local_44 = CURLE_LOGIN_DENIED;\n          ldap_memfree(info);\n        }" if (parenthesized_expression "(info != (char *)0x0)" ( (binary_expression "info != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          local_44 = CURLE_LOGIN_DENIED;\n          ldap_memfree(info);\n        }" { (expression_statement "local_44 = CURLE_LOGIN_DENIED;" (assignment_expression "local_44 = CURLE_LOGIN_DENIED" identifier = identifier) ;) (expression_statement "ldap_memfree(info);" (call_expression "ldap_memfree(info)" identifier (argument_list "(info)" ( identifier ))) ;) })) (goto_statement "goto LAB_0005aa45;" goto statement_identifier ;) })) (if_statement "if (info != (char *)0x0) {\n        ldap_memfree(info);\n      }" if (parenthesized_expression "(info != (char *)0x0)" ( (binary_expression "info != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        ldap_memfree(info);\n      }" { (expression_statement "ldap_memfree(info);" (call_expression "ldap_memfree(info)" identifier (argument_list "(info)" ( identifier ))) ;) })) (expression_statement "conn->recv[0] = ldap_recv;" (assignment_expression "conn->recv[0] = ldap_recv" (subscript_expression "conn->recv[0]" (field_expression "conn->recv" identifier -> field_identifier) [ number_literal ]) = identifier) ;) (expression_statement "*done = true;" (assignment_expression "*done = true" (pointer_expression "*done" * identifier) = true) ;) })) (labeled_statement "LAB_0005aa43:\n    local_44 = CURLE_OK;" statement_identifier : (expression_statement "local_44 = CURLE_OK;" (assignment_expression "local_44 = CURLE_OK" identifier = identifier) ;)) }))) (labeled_statement "LAB_0005aa45:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\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    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return local_44;" return identifier ;) })))
(translation_unit "int FUN_0005a870(undefined1 *param_1)\n\n{\n  undefined4 *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  undefined4 uVar5;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  undefined4 *unaff_retaddr;\n  int local_48;\n  undefined4 local_40;\n  int local_3c;\n  int local_38 [4];\n  char *local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a879;\n  entry();\n  puVar1 = (undefined4 *)unaff_retaddr[0x129];\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar5 = *unaff_retaddr;\n  local_40 = 0;\n  local_38[1] = 0;\n  local_38[2] = 1;\n  local_38[0] = 0;\n  if ((*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0) {\n    if (*(char *)(puVar1 + 5) != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);\n    if (local_48 != 0) goto LAB_0005aa45;\n    if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }\nLAB_0005a8e7:\n  if (*(char *)((int)puVar1 + 0x16) == '\0') {\nLAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }\n    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);\n    local_48 = 0x26;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }\n    goto LAB_0005aa45;\n  }\n  iVar3 = ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40);\n  if (iVar3 < 0) {\n    uVar4 = ldap_err2string(iVar3);\n    puVar2 = &UNK_0002b79b;\nLAB_0005aafb:\n    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);\n    local_48 = 0x26;\n  }\n  else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }\nLAB_0005aa43:\n    local_48 = 0;\n  }\nLAB_0005aa45:\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }\n  return local_48;\n}\n\n" (function_definition "int FUN_0005a870(undefined1 *param_1)\n\n{\n  undefined4 *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  undefined4 uVar5;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  undefined4 *unaff_retaddr;\n  int local_48;\n  undefined4 local_40;\n  int local_3c;\n  int local_38 [4];\n  char *local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a879;\n  entry();\n  puVar1 = (undefined4 *)unaff_retaddr[0x129];\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar5 = *unaff_retaddr;\n  local_40 = 0;\n  local_38[1] = 0;\n  local_38[2] = 1;\n  local_38[0] = 0;\n  if ((*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0) {\n    if (*(char *)(puVar1 + 5) != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);\n    if (local_48 != 0) goto LAB_0005aa45;\n    if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }\nLAB_0005a8e7:\n  if (*(char *)((int)puVar1 + 0x16) == '\0') {\nLAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }\n    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);\n    local_48 = 0x26;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }\n    goto LAB_0005aa45;\n  }\n  iVar3 = ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40);\n  if (iVar3 < 0) {\n    uVar4 = ldap_err2string(iVar3);\n    puVar2 = &UNK_0002b79b;\nLAB_0005aafb:\n    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);\n    local_48 = 0x26;\n  }\n  else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }\nLAB_0005aa43:\n    local_48 = 0;\n  }\nLAB_0005aa45:\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }\n  return local_48;\n}" primitive_type (function_declarator "FUN_0005a870(undefined1 *param_1)" identifier (parameter_list "(undefined1 *param_1)" ( (parameter_declaration "undefined1 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  undefined4 uVar5;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  undefined4 *unaff_retaddr;\n  int local_48;\n  undefined4 local_40;\n  int local_3c;\n  int local_38 [4];\n  char *local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a879;\n  entry();\n  puVar1 = (undefined4 *)unaff_retaddr[0x129];\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar5 = *unaff_retaddr;\n  local_40 = 0;\n  local_38[1] = 0;\n  local_38[2] = 1;\n  local_38[0] = 0;\n  if ((*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0) {\n    if (*(char *)(puVar1 + 5) != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);\n    if (local_48 != 0) goto LAB_0005aa45;\n    if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }\nLAB_0005a8e7:\n  if (*(char *)((int)puVar1 + 0x16) == '\0') {\nLAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }\n    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);\n    local_48 = 0x26;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }\n    goto LAB_0005aa45;\n  }\n  iVar3 = ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40);\n  if (iVar3 < 0) {\n    uVar4 = ldap_err2string(iVar3);\n    puVar2 = &UNK_0002b79b;\nLAB_0005aafb:\n    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);\n    local_48 = 0x26;\n  }\n  else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }\nLAB_0005aa43:\n    local_48 = 0;\n  }\nLAB_0005aa45:\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }\n  return local_48;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 *unaff_retaddr;" type_identifier (pointer_declarator "*unaff_retaddr" * identifier) ;) (declaration "int local_48;" primitive_type identifier ;) (declaration "undefined4 local_40;" type_identifier identifier ;) (declaration "int local_3c;" primitive_type identifier ;) (declaration "int local_38 [4];" primitive_type (array_declarator "local_38 [4]" identifier [ number_literal ]) ;) (declaration "char *local_28;" primitive_type (pointer_declarator "*local_28" * identifier) ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x5a879;" (assignment_expression "uStack_14 = 0x5a879" identifier = number_literal) ;) (expression_statement "entry();" (call_expression "entry()" identifier (argument_list "()" ( ))) ;) (expression_statement "puVar1 = (undefined4 *)unaff_retaddr[0x129];" (assignment_expression "puVar1 = (undefined4 *)unaff_retaddr[0x129]" identifier = (cast_expression "(undefined4 *)unaff_retaddr[0x129]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "unaff_retaddr[0x129]" identifier [ number_literal ]))) ;) (expression_statement "local_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_24 = *(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 "uVar5 = *unaff_retaddr;" (assignment_expression "uVar5 = *unaff_retaddr" identifier = (pointer_expression "*unaff_retaddr" * identifier)) ;) (expression_statement "local_40 = 0;" (assignment_expression "local_40 = 0" identifier = number_literal) ;) (expression_statement "local_38[1] = 0;" (assignment_expression "local_38[1] = 0" (subscript_expression "local_38[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "local_38[2] = 1;" (assignment_expression "local_38[2] = 1" (subscript_expression "local_38[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "local_38[0] = 0;" (assignment_expression "local_38[0] = 0" (subscript_expression "local_38[0]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if ((*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0) {\n    if (*(char *)(puVar1 + 5) != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);\n    if (local_48 != 0) goto LAB_0005aa45;\n    if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }" if (parenthesized_expression "((*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0)" ( (binary_expression "(*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0" (parenthesized_expression "(*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1)" ( (binary_expression "*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1" (pointer_expression "*(byte *)(unaff_retaddr[0x9f] + 0x44)" * (cast_expression "(byte *)(unaff_retaddr[0x9f] + 0x44)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr[0x9f] + 0x44)" ( (binary_expression "unaff_retaddr[0x9f] + 0x44" (subscript_expression "unaff_retaddr[0x9f]" identifier [ number_literal ]) + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    if (*(char *)(puVar1 + 5) != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);\n    if (local_48 != 0) goto LAB_0005aa45;\n    if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }" { (if_statement "if (*(char *)(puVar1 + 5) != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }" if (parenthesized_expression "(*(char *)(puVar1 + 5) != '\0')" ( (binary_expression "*(char *)(puVar1 + 5) != '\0'" (pointer_expression "*(char *)(puVar1 + 5)" * (cast_expression "(char *)(puVar1 + 5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 5)" ( (binary_expression "puVar1 + 5" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }" { (labeled_statement "LAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }" statement_identifier : (if_statement "if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }" if (parenthesized_expression "(*(char *)((int)puVar1 + 0x15) == '\0')" ( (binary_expression "*(char *)((int)puVar1 + 0x15) == '\0'" (pointer_expression "*(char *)((int)puVar1 + 0x15)" * (cast_expression "(char *)((int)puVar1 + 0x15)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar1 + 0x15)" ( (binary_expression "(int)puVar1 + 0x15" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }" { (expression_statement "ldap_get_option(*puVar1,0x5008,local_38 + 3);" (call_expression "ldap_get_option(*puVar1,0x5008,local_38 + 3)" identifier (argument_list "(*puVar1,0x5008,local_38 + 3)" ( (pointer_expression "*puVar1" * identifier) , number_literal , (binary_expression "local_38 + 3" identifier + number_literal) ))) ;) (expression_statement "ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);" (call_expression "ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr)" identifier (argument_list "(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr)" ( (subscript_expression "local_38[3]" identifier [ number_literal ]) , (binary_expression "unaff_EBX + 0x5682f" identifier + number_literal) , number_literal , identifier ))) ;) (expression_statement "uVar4 = unaff_retaddr[0x69];" (assignment_expression "uVar4 = unaff_retaddr[0x69]" identifier = (subscript_expression "unaff_retaddr[0x69]" identifier [ number_literal ])) ;) (expression_statement "*(undefined1 *)((int)puVar1 + 0x15) = 1;" (assignment_expression "*(undefined1 *)((int)puVar1 + 0x15) = 1" (pointer_expression "*(undefined1 *)((int)puVar1 + 0x15)" * (cast_expression "(undefined1 *)((int)puVar1 + 0x15)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar1 + 0x15)" ( (binary_expression "(int)puVar1 + 0x15" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "puVar1[1] = uVar4;" (assignment_expression "puVar1[1] = uVar4" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[2] = unaff_retaddr[0x6b];" (assignment_expression "puVar1[2] = unaff_retaddr[0x6b]" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = (subscript_expression "unaff_retaddr[0x6b]" identifier [ number_literal ])) ;) }))) (goto_statement "goto LAB_0005a8e7;" goto statement_identifier ;) })) (expression_statement "local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);" (assignment_expression "local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5)" identifier = (call_expression "FUN_0007aa40(unaff_retaddr,0,puVar1 + 5)" identifier (argument_list "(unaff_retaddr,0,puVar1 + 5)" ( identifier , number_literal , (binary_expression "puVar1 + 5" identifier + number_literal) )))) ;) (if_statement "if (local_48 != 0) goto LAB_0005aa45;" if (parenthesized_expression "(local_48 != 0)" ( (binary_expression "local_48 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0005aa45;" goto statement_identifier ;)) (if_statement "if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;" if (parenthesized_expression "(*(char *)(puVar1 + 5) != '\0')" ( (binary_expression "*(char *)(puVar1 + 5) != '\0'" (pointer_expression "*(char *)(puVar1 + 5)" * (cast_expression "(char *)(puVar1 + 5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 5)" ( (binary_expression "puVar1 + 5" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_0005a8dd;" goto statement_identifier ;)) (goto_statement "goto LAB_0005aa43;" goto statement_identifier ;) })) (labeled_statement "LAB_0005a8e7:\n  if (*(char *)((int)puVar1 + 0x16) == '\0') {\nLAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }\n    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);\n    local_48 = 0x26;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }\n    goto LAB_0005aa45;\n  }" statement_identifier : (if_statement "if (*(char *)((int)puVar1 + 0x16) == '\0') {\nLAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }\n    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);\n    local_48 = 0x26;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }\n    goto LAB_0005aa45;\n  }" if (parenthesized_expression "(*(char *)((int)puVar1 + 0x16) == '\0')" ( (binary_expression "*(char *)((int)puVar1 + 0x16) == '\0'" (pointer_expression "*(char *)((int)puVar1 + 0x16)" * (cast_expression "(char *)((int)puVar1 + 0x16)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar1 + 0x16)" ( (binary_expression "(int)puVar1 + 0x16" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\nLAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }\n    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);\n    local_48 = 0x26;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }\n    goto LAB_0005aa45;\n  }" { (labeled_statement "LAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }" statement_identifier : (if_statement "if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }" if (parenthesized_expression "(*(char *)(unaff_retaddr + 0x94) == '\0')" ( (binary_expression "*(char *)(unaff_retaddr + 0x94) == '\0'" (pointer_expression "*(char *)(unaff_retaddr + 0x94)" * (cast_expression "(char *)(unaff_retaddr + 0x94)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x94)" ( (binary_expression "unaff_retaddr + 0x94" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }" { (expression_statement "local_28 = (char *)0x0;" (assignment_expression "local_28 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (expression_statement "local_38[3] = 0;" (assignment_expression "local_38[3] = 0" (subscript_expression "local_38[3]" identifier [ number_literal ]) = number_literal) ;) }) (else_clause "else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }" else (compound_statement "{\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }" { (expression_statement "uVar5 = unaff_retaddr[0x5a];" (assignment_expression "uVar5 = unaff_retaddr[0x5a]" identifier = (subscript_expression "unaff_retaddr[0x5a]" identifier [ number_literal ])) ;) (expression_statement "local_28 = (char *)unaff_retaddr[0x5b];" (assignment_expression "local_28 = (char *)unaff_retaddr[0x5b]" identifier = (cast_expression "(char *)unaff_retaddr[0x5b]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "unaff_retaddr[0x5b]" identifier [ number_literal ]))) ;) (expression_statement "local_38[3] = strlen(local_28);" (assignment_expression "local_38[3] = strlen(local_28)" (subscript_expression "local_38[3]" identifier [ number_literal ]) = (call_expression "strlen(local_28)" identifier (argument_list "(local_28)" ( identifier )))) ;) })))) (expression_statement "iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);" (assignment_expression "iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4)" identifier = (call_expression "ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4)" identifier (argument_list "(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4)" ( (pointer_expression "*puVar1" * identifier) , identifier , number_literal , (binary_expression "local_38 + 3" identifier + number_literal) , number_literal , number_literal , (binary_expression "puVar1 + 4" identifier + number_literal) )))) ;) (expression_statement "local_48 = 0x26;" (assignment_expression "local_48 = 0x26" identifier = number_literal) ;) (if_statement "if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }" { (expression_statement "*(undefined1 *)((int)puVar1 + 0x16) = 1;" (assignment_expression "*(undefined1 *)((int)puVar1 + 0x16) = 1" (pointer_expression "*(undefined1 *)((int)puVar1 + 0x16)" * (cast_expression "(undefined1 *)((int)puVar1 + 0x16)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar1 + 0x16)" ( (binary_expression "(int)puVar1 + 0x16" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "local_48 = 0;" (assignment_expression "local_48 = 0" identifier = number_literal) ;) })) (goto_statement "goto LAB_0005aa45;" goto statement_identifier ;) }))) (expression_statement "iVar3 = ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40);" (assignment_expression "iVar3 = ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40)" identifier = (call_expression "ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40)" identifier (argument_list "(*puVar1,puVar1[4],0,local_38 + 1,&local_40)" ( (pointer_expression "*puVar1" * identifier) , (subscript_expression "puVar1[4]" identifier [ number_literal ]) , number_literal , (binary_expression "local_38 + 1" identifier + number_literal) , (pointer_expression "&local_40" & identifier) )))) ;) (if_statement "if (iVar3 < 0) {\n    uVar4 = ldap_err2string(iVar3);\n    puVar2 = &UNK_0002b79b;\nLAB_0005aafb:\n    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);\n    local_48 = 0x26;\n  }\n  else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }\nLAB_0005aa43:\n    local_48 = 0;\n  }" if (parenthesized_expression "(iVar3 < 0)" ( (binary_expression "iVar3 < 0" identifier < number_literal) )) (compound_statement "{\n    uVar4 = ldap_err2string(iVar3);\n    puVar2 = &UNK_0002b79b;\nLAB_0005aafb:\n    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);\n    local_48 = 0x26;\n  }" { (expression_statement "uVar4 = ldap_err2string(iVar3);" (assignment_expression "uVar4 = ldap_err2string(iVar3)" identifier = (call_expression "ldap_err2string(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (expression_statement "puVar2 = &UNK_0002b79b;" (assignment_expression "puVar2 = &UNK_0002b79b" identifier = (pointer_expression "&UNK_0002b79b" & identifier)) ;) (labeled_statement "LAB_0005aafb:\n    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);" statement_identifier : (expression_statement "FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);" (call_expression "FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4)" identifier (argument_list "(uVar5,puVar2 + unaff_EBX,uVar4)" ( identifier , (binary_expression "puVar2 + unaff_EBX" identifier + identifier) , identifier ))) ;)) (expression_statement "local_48 = 0x26;" (assignment_expression "local_48 = 0x26" identifier = number_literal) ;) }) (else_clause "else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }\nLAB_0005aa43:\n    local_48 = 0;\n  }" else (compound_statement "{\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }\nLAB_0005aa43:\n    local_48 = 0;\n  }" { (if_statement "if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }" { (expression_statement "iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);" (assignment_expression "iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1)" identifier = (call_expression "ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1)" identifier (argument_list "(*puVar1,local_40,&local_3c,0,local_38,0,0,1)" ( (pointer_expression "*puVar1" * identifier) , identifier , (pointer_expression "&local_3c" & identifier) , number_literal , identifier , number_literal , number_literal , number_literal )))) ;) (if_statement "if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }" { (expression_statement "uVar4 = ldap_err2string(iVar3);" (assignment_expression "uVar4 = ldap_err2string(iVar3)" identifier = (call_expression "ldap_err2string(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (expression_statement "puVar2 = &UNK_0002b7bb;" (assignment_expression "puVar2 = &UNK_0002b7bb" identifier = (pointer_expression "&UNK_0002b7bb" & identifier)) ;) (goto_statement "goto LAB_0005aafb;" goto statement_identifier ;) })) (if_statement "if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }" if (parenthesized_expression "(local_3c == 2)" ( (binary_expression "local_3c == 2" identifier == number_literal) )) (compound_statement "{\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }" { (expression_statement "ldap_get_option(*puVar1,0x11,local_38 + 3);" (call_expression "ldap_get_option(*puVar1,0x11,local_38 + 3)" identifier (argument_list "(*puVar1,0x11,local_38 + 3)" ( (pointer_expression "*puVar1" * identifier) , number_literal , (binary_expression "local_38 + 3" identifier + number_literal) ))) ;) (if_statement "if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }" if (parenthesized_expression "(local_38[3] == 3)" ( (binary_expression "local_38[3] == 3" (subscript_expression "local_38[3]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }" { (if_statement "if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }" if (parenthesized_expression "(local_38[0] != 0)" ( (binary_expression "local_38[0] != 0" (subscript_expression "local_38[0]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }" { (expression_statement "ldap_memfree(local_38[0]);" (call_expression "ldap_memfree(local_38[0])" identifier (argument_list "(local_38[0])" ( (subscript_expression "local_38[0]" identifier [ number_literal ]) ))) ;) (expression_statement "local_38[0] = 0;" (assignment_expression "local_38[0] = 0" (subscript_expression "local_38[0]" identifier [ number_literal ]) = number_literal) ;) })) (expression_statement "local_38[3] = 2;" (assignment_expression "local_38[3] = 2" (subscript_expression "local_38[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "ldap_set_option(*puVar1,0x11,local_38 + 3);" (call_expression "ldap_set_option(*puVar1,0x11,local_38 + 3)" identifier (argument_list "(*puVar1,0x11,local_38 + 3)" ( (pointer_expression "*puVar1" * identifier) , number_literal , (binary_expression "local_38 + 3" identifier + number_literal) ))) ;) (expression_statement "*(undefined1 *)((int)puVar1 + 0x16) = 0;" (assignment_expression "*(undefined1 *)((int)puVar1 + 0x16) = 0" (pointer_expression "*(undefined1 *)((int)puVar1 + 0x16)" * (cast_expression "(undefined1 *)((int)puVar1 + 0x16)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar1 + 0x16)" ( (binary_expression "(int)puVar1 + 0x16" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (goto_statement "goto LAB_0005a9a7;" goto statement_identifier ;) })) })) (if_statement "if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }" if (parenthesized_expression "(local_3c != 0)" ( (binary_expression "local_3c != 0" identifier != number_literal) )) (compound_statement "{\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }" { (expression_statement "iVar3 = local_38[0];" (assignment_expression "iVar3 = local_38[0]" identifier = (subscript_expression "local_38[0]" identifier [ number_literal ])) ;) (if_statement "if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }" if (parenthesized_expression "(local_38[0] == 0)" ( (binary_expression "local_38[0] == 0" (subscript_expression "local_38[0]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }" { (expression_statement "iVar3 = unaff_EBX + 0x2d4f7;" (assignment_expression "iVar3 = unaff_EBX + 0x2d4f7" identifier = (binary_expression "unaff_EBX + 0x2d4f7" identifier + number_literal)) ;) })) (expression_statement "uVar4 = ldap_err2string(0);" (assignment_expression "uVar4 = ldap_err2string(0)" identifier = (call_expression "ldap_err2string(0)" identifier (argument_list "(0)" ( number_literal )))) ;) (expression_statement "FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);" (call_expression "FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3)" identifier (argument_list "(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3)" ( identifier , (binary_expression "&UNK_0002b7e3 + unaff_EBX" (pointer_expression "&UNK_0002b7e3" & identifier) + identifier) , identifier , identifier ))) ;) (expression_statement "local_48 = 0x43;" (assignment_expression "local_48 = 0x43" identifier = number_literal) ;) (if_statement "if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }" if (parenthesized_expression "(local_38[0] != 0)" ( (binary_expression "local_38[0] != 0" (subscript_expression "local_38[0]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }" { (expression_statement "local_48 = 0x43;" (assignment_expression "local_48 = 0x43" identifier = number_literal) ;) (expression_statement "ldap_memfree(local_38[0]);" (call_expression "ldap_memfree(local_38[0])" identifier (argument_list "(local_38[0])" ( (subscript_expression "local_38[0]" identifier [ number_literal ]) ))) ;) })) (goto_statement "goto LAB_0005aa45;" goto statement_identifier ;) })) (if_statement "if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }" if (parenthesized_expression "(local_38[0] != 0)" ( (binary_expression "local_38[0] != 0" (subscript_expression "local_38[0]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n        ldap_memfree(local_38[0]);\n      }" { (expression_statement "ldap_memfree(local_38[0]);" (call_expression "ldap_memfree(local_38[0])" identifier (argument_list "(local_38[0])" ( (subscript_expression "local_38[0]" identifier [ number_literal ]) ))) ;) })) (expression_statement "unaff_retaddr[0x69] = unaff_EBX + 0x317;" (assignment_expression "unaff_retaddr[0x69] = unaff_EBX + 0x317" (subscript_expression "unaff_retaddr[0x69]" identifier [ number_literal ]) = (binary_expression "unaff_EBX + 0x317" identifier + number_literal)) ;) (expression_statement "*param_1 = 1;" (assignment_expression "*param_1 = 1" (pointer_expression "*param_1" * identifier) = number_literal) ;) })) (labeled_statement "LAB_0005aa43:\n    local_48 = 0;" statement_identifier : (expression_statement "local_48 = 0;" (assignment_expression "local_48 = 0" identifier = number_literal) ;)) }))) (labeled_statement "LAB_0005aa45:\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }" statement_identifier : (if_statement "if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }" if (parenthesized_expression "(local_24 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_24 != *(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_0007c1a0();\n  }" { (expression_statement "FUN_0007c1a0();" (call_expression "FUN_0007c1a0()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return local_48;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (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 (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_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 * IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) & LIT) )) != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , LIT , (binary_expression IDENT + LIT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) , (binary_expression IDENT + LIT) , LIT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;) }))) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (goto_statement goto statement_identifier ;)) (goto_statement goto statement_identifier ;) })) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) == (char_literal ' escape_sequence ')) )) (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (call_expression IDENT (argument_list ( IDENT )))) ;) })))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , IDENT , LIT , (binary_expression IDENT + LIT) , LIT , LIT , (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) (goto_statement goto statement_identifier ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (subscript_expression IDENT [ LIT ]) , LIT , (binary_expression IDENT + LIT) , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + IDENT) , IDENT ))) ;)) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , IDENT , (pointer_expression & IDENT) , LIT , IDENT , LIT , LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , LIT , (binary_expression IDENT + LIT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , LIT , (binary_expression IDENT + LIT) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = LIT) ;) (goto_statement goto statement_identifier ;) })) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression (pointer_expression & IDENT) + IDENT) , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) ))) ;) })) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) ))) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = 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 "int FUN_0005a870(undefined1 *param_1)\n\n{\n  undefined4 *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  undefined4 uVar5;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  undefined4 *unaff_retaddr;\n  int local_48;\n  undefined4 local_40;\n  int local_3c;\n  int local_38 [4];\n  char *local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a879;\n  entry();\n  puVar1 = (undefined4 *)unaff_retaddr[0x129];\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar5 = *unaff_retaddr;\n  local_40 = 0;\n  local_38[1] = 0;\n  local_38[2] = 1;\n  local_38[0] = 0;\n  if ((*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0) {\n    if (*(char *)(puVar1 + 5) != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);\n    if (local_48 != 0) goto LAB_0005aa45;\n    if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }\nLAB_0005a8e7:\n  if (*(char *)((int)puVar1 + 0x16) == '\0') {\nLAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }\n    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);\n    local_48 = 0x26;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }\n    goto LAB_0005aa45;\n  }\n  iVar3 = ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40);\n  if (iVar3 < 0) {\n    uVar4 = ldap_err2string(iVar3);\n    puVar2 = &UNK_0002b79b;\nLAB_0005aafb:\n    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);\n    local_48 = 0x26;\n  }\n  else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }\nLAB_0005aa43:\n    local_48 = 0;\n  }\nLAB_0005aa45:\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }\n  return local_48;\n}" (primitive_type "int") (function_declarator "FUN_0005a870(undefined1 *param_1)" (identifier "FUN_0005a870") (parameter_list "(undefined1 *param_1)" (( "(") (parameter_declaration "undefined1 *param_1" (type_identifier "undefined1") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  undefined4 uVar5;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  undefined4 *unaff_retaddr;\n  int local_48;\n  undefined4 local_40;\n  int local_3c;\n  int local_38 [4];\n  char *local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a879;\n  entry();\n  puVar1 = (undefined4 *)unaff_retaddr[0x129];\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar5 = *unaff_retaddr;\n  local_40 = 0;\n  local_38[1] = 0;\n  local_38[2] = 1;\n  local_38[0] = 0;\n  if ((*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0) {\n    if (*(char *)(puVar1 + 5) != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);\n    if (local_48 != 0) goto LAB_0005aa45;\n    if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }\nLAB_0005a8e7:\n  if (*(char *)((int)puVar1 + 0x16) == '\0') {\nLAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }\n    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);\n    local_48 = 0x26;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }\n    goto LAB_0005aa45;\n  }\n  iVar3 = ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40);\n  if (iVar3 < 0) {\n    uVar4 = ldap_err2string(iVar3);\n    puVar2 = &UNK_0002b79b;\nLAB_0005aafb:\n    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);\n    local_48 = 0x26;\n  }\n  else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }\nLAB_0005aa43:\n    local_48 = 0;\n  }\nLAB_0005aa45:\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }\n  return local_48;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined *puVar2;" (type_identifier "undefined") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (declaration "int unaff_EBX;" (primitive_type "int") (identifier "unaff_EBX") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined4 *unaff_retaddr;" (type_identifier "undefined4") (pointer_declarator "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (; ";")) (declaration "int local_48;" (primitive_type "int") (identifier "local_48") (; ";")) (declaration "undefined4 local_40;" (type_identifier "undefined4") (identifier "local_40") (; ";")) (declaration "int local_3c;" (primitive_type "int") (identifier "local_3c") (; ";")) (declaration "int local_38 [4];" (primitive_type "int") (array_declarator "local_38 [4]" (identifier "local_38") ([ "[") (number_literal "4") (] "]")) (; ";")) (declaration "char *local_28;" (primitive_type "char") (pointer_declarator "*local_28" (* "*") (identifier "local_28")) (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x5a879;" (assignment_expression "uStack_14 = 0x5a879" (identifier "uStack_14") (= "=") (number_literal "0x5a879")) (; ";")) (expression_statement "entry();" (call_expression "entry()" (identifier "entry") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "puVar1 = (undefined4 *)unaff_retaddr[0x129];" (assignment_expression "puVar1 = (undefined4 *)unaff_retaddr[0x129]" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)unaff_retaddr[0x129]" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "unaff_retaddr[0x129]" (identifier "unaff_retaddr") ([ "[") (number_literal "0x129") (] "]")))) (; ";")) (expression_statement "local_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_24 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_24") (= "=") (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 "uVar5 = *unaff_retaddr;" (assignment_expression "uVar5 = *unaff_retaddr" (identifier "uVar5") (= "=") (pointer_expression "*unaff_retaddr" (* "*") (identifier "unaff_retaddr"))) (; ";")) (expression_statement "local_40 = 0;" (assignment_expression "local_40 = 0" (identifier "local_40") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_38[1] = 0;" (assignment_expression "local_38[1] = 0" (subscript_expression "local_38[1]" (identifier "local_38") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "local_38[2] = 1;" (assignment_expression "local_38[2] = 1" (subscript_expression "local_38[2]" (identifier "local_38") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "1")) (; ";")) (expression_statement "local_38[0] = 0;" (assignment_expression "local_38[0] = 0" (subscript_expression "local_38[0]" (identifier "local_38") ([ "[") (number_literal "0") (] "]")) (= "=") (number_literal "0")) (; ";")) (if_statement "if ((*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0) {\n    if (*(char *)(puVar1 + 5) != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);\n    if (local_48 != 0) goto LAB_0005aa45;\n    if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }" (if "if") (parenthesized_expression "((*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0)" (( "(") (binary_expression "(*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0" (parenthesized_expression "(*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1)" (( "(") (binary_expression "*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1" (pointer_expression "*(byte *)(unaff_retaddr[0x9f] + 0x44)" (* "*") (cast_expression "(byte *)(unaff_retaddr[0x9f] + 0x44)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr[0x9f] + 0x44)" (( "(") (binary_expression "unaff_retaddr[0x9f] + 0x44" (subscript_expression "unaff_retaddr[0x9f]" (identifier "unaff_retaddr") ([ "[") (number_literal "0x9f") (] "]")) (+ "+") (number_literal "0x44")) () ")")))) (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (*(char *)(puVar1 + 5) != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }\n    local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);\n    if (local_48 != 0) goto LAB_0005aa45;\n    if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;\n    goto LAB_0005aa43;\n  }" ({ "{") (if_statement "if (*(char *)(puVar1 + 5) != '\0') {\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }" (if "if") (parenthesized_expression "(*(char *)(puVar1 + 5) != '\0')" (( "(") (binary_expression "*(char *)(puVar1 + 5) != '\0'" (pointer_expression "*(char *)(puVar1 + 5)" (* "*") (cast_expression "(char *)(puVar1 + 5)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 5)" (( "(") (binary_expression "puVar1 + 5" (identifier "puVar1") (+ "+") (number_literal "5")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\nLAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }\n      goto LAB_0005a8e7;\n    }" ({ "{") (labeled_statement "LAB_0005a8dd:\n      if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }" (statement_identifier "LAB_0005a8dd") (: ":") (if_statement "if (*(char *)((int)puVar1 + 0x15) == '\0') {\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }" (if "if") (parenthesized_expression "(*(char *)((int)puVar1 + 0x15) == '\0')" (( "(") (binary_expression "*(char *)((int)puVar1 + 0x15) == '\0'" (pointer_expression "*(char *)((int)puVar1 + 0x15)" (* "*") (cast_expression "(char *)((int)puVar1 + 0x15)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar1 + 0x15)" (( "(") (binary_expression "(int)puVar1 + 0x15" (cast_expression "(int)puVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar1")) (+ "+") (number_literal "0x15")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        ldap_get_option(*puVar1,0x5008,local_38 + 3);\n        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);\n        uVar4 = unaff_retaddr[0x69];\n        *(undefined1 *)((int)puVar1 + 0x15) = 1;\n        puVar1[1] = uVar4;\n        puVar1[2] = unaff_retaddr[0x6b];\n      }" ({ "{") (expression_statement "ldap_get_option(*puVar1,0x5008,local_38 + 3);" (call_expression "ldap_get_option(*puVar1,0x5008,local_38 + 3)" (identifier "ldap_get_option") (argument_list "(*puVar1,0x5008,local_38 + 3)" (( "(") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (, ",") (number_literal "0x5008") (, ",") (binary_expression "local_38 + 3" (identifier "local_38") (+ "+") (number_literal "3")) () ")"))) (; ";")) (expression_statement "ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);" (call_expression "ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr)" (identifier "ber_sockbuf_add_io") (argument_list "(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr)" (( "(") (subscript_expression "local_38[3]" (identifier "local_38") ([ "[") (number_literal "3") (] "]")) (, ",") (binary_expression "unaff_EBX + 0x5682f" (identifier "unaff_EBX") (+ "+") (number_literal "0x5682f")) (, ",") (number_literal "0x14") (, ",") (identifier "unaff_retaddr") () ")"))) (; ";")) (expression_statement "uVar4 = unaff_retaddr[0x69];" (assignment_expression "uVar4 = unaff_retaddr[0x69]" (identifier "uVar4") (= "=") (subscript_expression "unaff_retaddr[0x69]" (identifier "unaff_retaddr") ([ "[") (number_literal "0x69") (] "]"))) (; ";")) (expression_statement "*(undefined1 *)((int)puVar1 + 0x15) = 1;" (assignment_expression "*(undefined1 *)((int)puVar1 + 0x15) = 1" (pointer_expression "*(undefined1 *)((int)puVar1 + 0x15)" (* "*") (cast_expression "(undefined1 *)((int)puVar1 + 0x15)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar1 + 0x15)" (( "(") (binary_expression "(int)puVar1 + 0x15" (cast_expression "(int)puVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar1")) (+ "+") (number_literal "0x15")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "puVar1[1] = uVar4;" (assignment_expression "puVar1[1] = uVar4" (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar4")) (; ";")) (expression_statement "puVar1[2] = unaff_retaddr[0x6b];" (assignment_expression "puVar1[2] = unaff_retaddr[0x6b]" (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) (= "=") (subscript_expression "unaff_retaddr[0x6b]" (identifier "unaff_retaddr") ([ "[") (number_literal "0x6b") (] "]"))) (; ";")) (} "}")))) (goto_statement "goto LAB_0005a8e7;" (goto "goto") (statement_identifier "LAB_0005a8e7") (; ";")) (} "}"))) (expression_statement "local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);" (assignment_expression "local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5)" (identifier "local_48") (= "=") (call_expression "FUN_0007aa40(unaff_retaddr,0,puVar1 + 5)" (identifier "FUN_0007aa40") (argument_list "(unaff_retaddr,0,puVar1 + 5)" (( "(") (identifier "unaff_retaddr") (, ",") (number_literal "0") (, ",") (binary_expression "puVar1 + 5" (identifier "puVar1") (+ "+") (number_literal "5")) () ")")))) (; ";")) (if_statement "if (local_48 != 0) goto LAB_0005aa45;" (if "if") (parenthesized_expression "(local_48 != 0)" (( "(") (binary_expression "local_48 != 0" (identifier "local_48") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_0005aa45;" (goto "goto") (statement_identifier "LAB_0005aa45") (; ";"))) (if_statement "if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;" (if "if") (parenthesized_expression "(*(char *)(puVar1 + 5) != '\0')" (( "(") (binary_expression "*(char *)(puVar1 + 5) != '\0'" (pointer_expression "*(char *)(puVar1 + 5)" (* "*") (cast_expression "(char *)(puVar1 + 5)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 5)" (( "(") (binary_expression "puVar1 + 5" (identifier "puVar1") (+ "+") (number_literal "5")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (goto_statement "goto LAB_0005a8dd;" (goto "goto") (statement_identifier "LAB_0005a8dd") (; ";"))) (goto_statement "goto LAB_0005aa43;" (goto "goto") (statement_identifier "LAB_0005aa43") (; ";")) (} "}"))) (labeled_statement "LAB_0005a8e7:\n  if (*(char *)((int)puVar1 + 0x16) == '\0') {\nLAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }\n    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);\n    local_48 = 0x26;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }\n    goto LAB_0005aa45;\n  }" (statement_identifier "LAB_0005a8e7") (: ":") (if_statement "if (*(char *)((int)puVar1 + 0x16) == '\0') {\nLAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }\n    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);\n    local_48 = 0x26;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }\n    goto LAB_0005aa45;\n  }" (if "if") (parenthesized_expression "(*(char *)((int)puVar1 + 0x16) == '\0')" (( "(") (binary_expression "*(char *)((int)puVar1 + 0x16) == '\0'" (pointer_expression "*(char *)((int)puVar1 + 0x16)" (* "*") (cast_expression "(char *)((int)puVar1 + 0x16)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar1 + 0x16)" (( "(") (binary_expression "(int)puVar1 + 0x16" (cast_expression "(int)puVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar1")) (+ "+") (number_literal "0x16")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\nLAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }\n    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);\n    local_48 = 0x26;\n    if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }\n    goto LAB_0005aa45;\n  }" ({ "{") (labeled_statement "LAB_0005a9a7:\n    if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }" (statement_identifier "LAB_0005a9a7") (: ":") (if_statement "if (*(char *)(unaff_retaddr + 0x94) == '\0') {\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }\n    else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }" (if "if") (parenthesized_expression "(*(char *)(unaff_retaddr + 0x94) == '\0')" (( "(") (binary_expression "*(char *)(unaff_retaddr + 0x94) == '\0'" (pointer_expression "*(char *)(unaff_retaddr + 0x94)" (* "*") (cast_expression "(char *)(unaff_retaddr + 0x94)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x94)" (( "(") (binary_expression "unaff_retaddr + 0x94" (identifier "unaff_retaddr") (+ "+") (number_literal "0x94")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      local_28 = (char *)0x0;\n      uVar5 = 0;\n      local_38[3] = 0;\n    }" ({ "{") (expression_statement "local_28 = (char *)0x0;" (assignment_expression "local_28 = (char *)0x0" (identifier "local_28") (= "=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_38[3] = 0;" (assignment_expression "local_38[3] = 0" (subscript_expression "local_38[3]" (identifier "local_38") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }" (else "else") (compound_statement "{\n      uVar5 = unaff_retaddr[0x5a];\n      local_28 = (char *)unaff_retaddr[0x5b];\n      local_38[3] = strlen(local_28);\n    }" ({ "{") (expression_statement "uVar5 = unaff_retaddr[0x5a];" (assignment_expression "uVar5 = unaff_retaddr[0x5a]" (identifier "uVar5") (= "=") (subscript_expression "unaff_retaddr[0x5a]" (identifier "unaff_retaddr") ([ "[") (number_literal "0x5a") (] "]"))) (; ";")) (expression_statement "local_28 = (char *)unaff_retaddr[0x5b];" (assignment_expression "local_28 = (char *)unaff_retaddr[0x5b]" (identifier "local_28") (= "=") (cast_expression "(char *)unaff_retaddr[0x5b]" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "unaff_retaddr[0x5b]" (identifier "unaff_retaddr") ([ "[") (number_literal "0x5b") (] "]")))) (; ";")) (expression_statement "local_38[3] = strlen(local_28);" (assignment_expression "local_38[3] = strlen(local_28)" (subscript_expression "local_38[3]" (identifier "local_38") ([ "[") (number_literal "3") (] "]")) (= "=") (call_expression "strlen(local_28)" (identifier "strlen") (argument_list "(local_28)" (( "(") (identifier "local_28") () ")")))) (; ";")) (} "}"))))) (expression_statement "iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);" (assignment_expression "iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4)" (identifier "iVar3") (= "=") (call_expression "ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4)" (identifier "ldap_sasl_bind") (argument_list "(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4)" (( "(") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (, ",") (identifier "uVar5") (, ",") (number_literal "0") (, ",") (binary_expression "local_38 + 3" (identifier "local_38") (+ "+") (number_literal "3")) (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (binary_expression "puVar1 + 4" (identifier "puVar1") (+ "+") (number_literal "4")) () ")")))) (; ";")) (expression_statement "local_48 = 0x26;" (assignment_expression "local_48 = 0x26" (identifier "local_48") (= "=") (number_literal "0x26")) (; ";")) (if_statement "if (iVar3 == 0) {\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      *(undefined1 *)((int)puVar1 + 0x16) = 1;\n      local_48 = 0;\n    }" ({ "{") (expression_statement "*(undefined1 *)((int)puVar1 + 0x16) = 1;" (assignment_expression "*(undefined1 *)((int)puVar1 + 0x16) = 1" (pointer_expression "*(undefined1 *)((int)puVar1 + 0x16)" (* "*") (cast_expression "(undefined1 *)((int)puVar1 + 0x16)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar1 + 0x16)" (( "(") (binary_expression "(int)puVar1 + 0x16" (cast_expression "(int)puVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar1")) (+ "+") (number_literal "0x16")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "local_48 = 0;" (assignment_expression "local_48 = 0" (identifier "local_48") (= "=") (number_literal "0")) (; ";")) (} "}"))) (goto_statement "goto LAB_0005aa45;" (goto "goto") (statement_identifier "LAB_0005aa45") (; ";")) (} "}")))) (expression_statement "iVar3 = ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40);" (assignment_expression "iVar3 = ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40)" (identifier "iVar3") (= "=") (call_expression "ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40)" (identifier "ldap_result") (argument_list "(*puVar1,puVar1[4],0,local_38 + 1,&local_40)" (( "(") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (, ",") (subscript_expression "puVar1[4]" (identifier "puVar1") ([ "[") (number_literal "4") (] "]")) (, ",") (number_literal "0") (, ",") (binary_expression "local_38 + 1" (identifier "local_38") (+ "+") (number_literal "1")) (, ",") (pointer_expression "&local_40" (& "&") (identifier "local_40")) () ")")))) (; ";")) (if_statement "if (iVar3 < 0) {\n    uVar4 = ldap_err2string(iVar3);\n    puVar2 = &UNK_0002b79b;\nLAB_0005aafb:\n    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);\n    local_48 = 0x26;\n  }\n  else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }\nLAB_0005aa43:\n    local_48 = 0;\n  }" (if "if") (parenthesized_expression "(iVar3 < 0)" (( "(") (binary_expression "iVar3 < 0" (identifier "iVar3") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    uVar4 = ldap_err2string(iVar3);\n    puVar2 = &UNK_0002b79b;\nLAB_0005aafb:\n    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);\n    local_48 = 0x26;\n  }" ({ "{") (expression_statement "uVar4 = ldap_err2string(iVar3);" (assignment_expression "uVar4 = ldap_err2string(iVar3)" (identifier "uVar4") (= "=") (call_expression "ldap_err2string(iVar3)" (identifier "ldap_err2string") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")")))) (; ";")) (expression_statement "puVar2 = &UNK_0002b79b;" (assignment_expression "puVar2 = &UNK_0002b79b" (identifier "puVar2") (= "=") (pointer_expression "&UNK_0002b79b" (& "&") (identifier "UNK_0002b79b"))) (; ";")) (labeled_statement "LAB_0005aafb:\n    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);" (statement_identifier "LAB_0005aafb") (: ":") (expression_statement "FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);" (call_expression "FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4)" (identifier "FUN_00027240") (argument_list "(uVar5,puVar2 + unaff_EBX,uVar4)" (( "(") (identifier "uVar5") (, ",") (binary_expression "puVar2 + unaff_EBX" (identifier "puVar2") (+ "+") (identifier "unaff_EBX")) (, ",") (identifier "uVar4") () ")"))) (; ";"))) (expression_statement "local_48 = 0x26;" (assignment_expression "local_48 = 0x26" (identifier "local_48") (= "=") (number_literal "0x26")) (; ";")) (} "}")) (else_clause "else {\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }\nLAB_0005aa43:\n    local_48 = 0;\n  }" (else "else") (compound_statement "{\n    if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }\nLAB_0005aa43:\n    local_48 = 0;\n  }" ({ "{") (if_statement "if (iVar3 != 0) {\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);\n      if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }\n      if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }\n      if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }\n      if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }\n      unaff_retaddr[0x69] = unaff_EBX + 0x317;\n      *param_1 = 1;\n    }" ({ "{") (expression_statement "iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);" (assignment_expression "iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1)" (identifier "iVar3") (= "=") (call_expression "ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1)" (identifier "ldap_parse_result") (argument_list "(*puVar1,local_40,&local_3c,0,local_38,0,0,1)" (( "(") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (, ",") (identifier "local_40") (, ",") (pointer_expression "&local_3c" (& "&") (identifier "local_3c")) (, ",") (number_literal "0") (, ",") (identifier "local_38") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "1") () ")")))) (; ";")) (if_statement "if (iVar3 != 0) {\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        uVar4 = ldap_err2string(iVar3);\n        puVar2 = &UNK_0002b7bb;\n        goto LAB_0005aafb;\n      }" ({ "{") (expression_statement "uVar4 = ldap_err2string(iVar3);" (assignment_expression "uVar4 = ldap_err2string(iVar3)" (identifier "uVar4") (= "=") (call_expression "ldap_err2string(iVar3)" (identifier "ldap_err2string") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")")))) (; ";")) (expression_statement "puVar2 = &UNK_0002b7bb;" (assignment_expression "puVar2 = &UNK_0002b7bb" (identifier "puVar2") (= "=") (pointer_expression "&UNK_0002b7bb" (& "&") (identifier "UNK_0002b7bb"))) (; ";")) (goto_statement "goto LAB_0005aafb;" (goto "goto") (statement_identifier "LAB_0005aafb") (; ";")) (} "}"))) (if_statement "if (local_3c == 2) {\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }" (if "if") (parenthesized_expression "(local_3c == 2)" (( "(") (binary_expression "local_3c == 2" (identifier "local_3c") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n        ldap_get_option(*puVar1,0x11,local_38 + 3);\n        if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }\n      }" ({ "{") (expression_statement "ldap_get_option(*puVar1,0x11,local_38 + 3);" (call_expression "ldap_get_option(*puVar1,0x11,local_38 + 3)" (identifier "ldap_get_option") (argument_list "(*puVar1,0x11,local_38 + 3)" (( "(") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (, ",") (number_literal "0x11") (, ",") (binary_expression "local_38 + 3" (identifier "local_38") (+ "+") (number_literal "3")) () ")"))) (; ";")) (if_statement "if (local_38[3] == 3) {\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }" (if "if") (parenthesized_expression "(local_38[3] == 3)" (( "(") (binary_expression "local_38[3] == 3" (subscript_expression "local_38[3]" (identifier "local_38") ([ "[") (number_literal "3") (] "]")) (== "==") (number_literal "3")) () ")")) (compound_statement "{\n          if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }\n          local_38[3] = 2;\n          ldap_set_option(*puVar1,0x11,local_38 + 3);\n          *(undefined1 *)((int)puVar1 + 0x16) = 0;\n          goto LAB_0005a9a7;\n        }" ({ "{") (if_statement "if (local_38[0] != 0) {\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }" (if "if") (parenthesized_expression "(local_38[0] != 0)" (( "(") (binary_expression "local_38[0] != 0" (subscript_expression "local_38[0]" (identifier "local_38") ([ "[") (number_literal "0") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n            ldap_memfree(local_38[0]);\n            local_38[0] = 0;\n          }" ({ "{") (expression_statement "ldap_memfree(local_38[0]);" (call_expression "ldap_memfree(local_38[0])" (identifier "ldap_memfree") (argument_list "(local_38[0])" (( "(") (subscript_expression "local_38[0]" (identifier "local_38") ([ "[") (number_literal "0") (] "]")) () ")"))) (; ";")) (expression_statement "local_38[0] = 0;" (assignment_expression "local_38[0] = 0" (subscript_expression "local_38[0]" (identifier "local_38") ([ "[") (number_literal "0") (] "]")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "local_38[3] = 2;" (assignment_expression "local_38[3] = 2" (subscript_expression "local_38[3]" (identifier "local_38") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "2")) (; ";")) (expression_statement "ldap_set_option(*puVar1,0x11,local_38 + 3);" (call_expression "ldap_set_option(*puVar1,0x11,local_38 + 3)" (identifier "ldap_set_option") (argument_list "(*puVar1,0x11,local_38 + 3)" (( "(") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (, ",") (number_literal "0x11") (, ",") (binary_expression "local_38 + 3" (identifier "local_38") (+ "+") (number_literal "3")) () ")"))) (; ";")) (expression_statement "*(undefined1 *)((int)puVar1 + 0x16) = 0;" (assignment_expression "*(undefined1 *)((int)puVar1 + 0x16) = 0" (pointer_expression "*(undefined1 *)((int)puVar1 + 0x16)" (* "*") (cast_expression "(undefined1 *)((int)puVar1 + 0x16)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar1 + 0x16)" (( "(") (binary_expression "(int)puVar1 + 0x16" (cast_expression "(int)puVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar1")) (+ "+") (number_literal "0x16")) () ")")))) (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_0005a9a7;" (goto "goto") (statement_identifier "LAB_0005a9a7") (; ";")) (} "}"))) (} "}"))) (if_statement "if (local_3c != 0) {\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }" (if "if") (parenthesized_expression "(local_3c != 0)" (( "(") (binary_expression "local_3c != 0" (identifier "local_3c") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        iVar3 = local_38[0];\n        if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }\n        uVar4 = ldap_err2string(0);\n        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);\n        local_48 = 0x43;\n        if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }\n        goto LAB_0005aa45;\n      }" ({ "{") (expression_statement "iVar3 = local_38[0];" (assignment_expression "iVar3 = local_38[0]" (identifier "iVar3") (= "=") (subscript_expression "local_38[0]" (identifier "local_38") ([ "[") (number_literal "0") (] "]"))) (; ";")) (if_statement "if (local_38[0] == 0) {\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }" (if "if") (parenthesized_expression "(local_38[0] == 0)" (( "(") (binary_expression "local_38[0] == 0" (subscript_expression "local_38[0]" (identifier "local_38") ([ "[") (number_literal "0") (] "]")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          iVar3 = unaff_EBX + 0x2d4f7;\n        }" ({ "{") (expression_statement "iVar3 = unaff_EBX + 0x2d4f7;" (assignment_expression "iVar3 = unaff_EBX + 0x2d4f7" (identifier "iVar3") (= "=") (binary_expression "unaff_EBX + 0x2d4f7" (identifier "unaff_EBX") (+ "+") (number_literal "0x2d4f7"))) (; ";")) (} "}"))) (expression_statement "uVar4 = ldap_err2string(0);" (assignment_expression "uVar4 = ldap_err2string(0)" (identifier "uVar4") (= "=") (call_expression "ldap_err2string(0)" (identifier "ldap_err2string") (argument_list "(0)" (( "(") (number_literal "0") () ")")))) (; ";")) (expression_statement "FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);" (call_expression "FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3)" (identifier "FUN_00027240") (argument_list "(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3)" (( "(") (identifier "uVar5") (, ",") (binary_expression "&UNK_0002b7e3 + unaff_EBX" (pointer_expression "&UNK_0002b7e3" (& "&") (identifier "UNK_0002b7e3")) (+ "+") (identifier "unaff_EBX")) (, ",") (identifier "uVar4") (, ",") (identifier "iVar3") () ")"))) (; ";")) (expression_statement "local_48 = 0x43;" (assignment_expression "local_48 = 0x43" (identifier "local_48") (= "=") (number_literal "0x43")) (; ";")) (if_statement "if (local_38[0] != 0) {\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }" (if "if") (parenthesized_expression "(local_38[0] != 0)" (( "(") (binary_expression "local_38[0] != 0" (subscript_expression "local_38[0]" (identifier "local_38") ([ "[") (number_literal "0") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          local_48 = 0x43;\n          ldap_memfree(local_38[0]);\n        }" ({ "{") (expression_statement "local_48 = 0x43;" (assignment_expression "local_48 = 0x43" (identifier "local_48") (= "=") (number_literal "0x43")) (; ";")) (expression_statement "ldap_memfree(local_38[0]);" (call_expression "ldap_memfree(local_38[0])" (identifier "ldap_memfree") (argument_list "(local_38[0])" (( "(") (subscript_expression "local_38[0]" (identifier "local_38") ([ "[") (number_literal "0") (] "]")) () ")"))) (; ";")) (} "}"))) (goto_statement "goto LAB_0005aa45;" (goto "goto") (statement_identifier "LAB_0005aa45") (; ";")) (} "}"))) (if_statement "if (local_38[0] != 0) {\n        ldap_memfree(local_38[0]);\n      }" (if "if") (parenthesized_expression "(local_38[0] != 0)" (( "(") (binary_expression "local_38[0] != 0" (subscript_expression "local_38[0]" (identifier "local_38") ([ "[") (number_literal "0") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        ldap_memfree(local_38[0]);\n      }" ({ "{") (expression_statement "ldap_memfree(local_38[0]);" (call_expression "ldap_memfree(local_38[0])" (identifier "ldap_memfree") (argument_list "(local_38[0])" (( "(") (subscript_expression "local_38[0]" (identifier "local_38") ([ "[") (number_literal "0") (] "]")) () ")"))) (; ";")) (} "}"))) (expression_statement "unaff_retaddr[0x69] = unaff_EBX + 0x317;" (assignment_expression "unaff_retaddr[0x69] = unaff_EBX + 0x317" (subscript_expression "unaff_retaddr[0x69]" (identifier "unaff_retaddr") ([ "[") (number_literal "0x69") (] "]")) (= "=") (binary_expression "unaff_EBX + 0x317" (identifier "unaff_EBX") (+ "+") (number_literal "0x317"))) (; ";")) (expression_statement "*param_1 = 1;" (assignment_expression "*param_1 = 1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "1")) (; ";")) (} "}"))) (labeled_statement "LAB_0005aa43:\n    local_48 = 0;" (statement_identifier "LAB_0005aa43") (: ":") (expression_statement "local_48 = 0;" (assignment_expression "local_48 = 0" (identifier "local_48") (= "=") (number_literal "0")) (; ";"))) (} "}")))) (labeled_statement "LAB_0005aa45:\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }" (statement_identifier "LAB_0005aa45") (: ":") (if_statement "if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }" (if "if") (parenthesized_expression "(local_24 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_24 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_24") (!= "!=") (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_0007c1a0();\n  }" ({ "{") (expression_statement "FUN_0007c1a0();" (call_expression "FUN_0007c1a0()" (identifier "FUN_0007c1a0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return local_48;" (return "return") (identifier "local_48") (; ";")) (} "}")))

/* 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 */

type_1 function_1(type_2 *conn,type_3 *done)

{
  type_4 *ptVar1;
  type_5 *data;
  type_6 *pCVar2;
  int var_9;
  type_7 uVar4;
  char *pcVar5;
  int var_1;
  type_1 var_5;
  type_8 *msg;
  int var_14;
  char *var_16;
  type_9 tv;
  type_10 *var_15;
  char *local_24;
  int var_19;
  type_7 uStack_14;
  
  uStack_14 = 0x5a879;
  ptVar1 = (conn->proto).tftpc;
  var_19 = *(int *)(var_1 + 0x14);
  data = conn->data;
  msg = (type_8 *)0x0;
  tv.tv_sec = 0;
  tv.tv_usec = 1;
  var_16 = (char *)0x0;
  if ((conn->handler->flags & 1) != 0) {
    if ((char)ptVar1->sockfd != '\0') {
LAB_0005a8dd:
      if (*(char *)((int)&ptVar1->sockfd + 1) == '\0') {
        var_2(ptVar1->state,0x5008,&var_15);
        var_3(var_15,&ldapsb_tls,0x14,conn);
        pCVar2 = conn->recv[0];
        *(type_11 *)((int)&ptVar1->sockfd + 1) = 1;
        ptVar1->mode = (type_12)pCVar2;
        ptVar1->error = (type_13)conn->send[0];
      }
      goto LAB_0005a8e7;
    }
    var_5 = var_4(conn,0,(type_3 *)&ptVar1->sockfd);
    if (var_5 != var_6) goto LAB_0005aa45;
    if ((char)ptVar1->sockfd != '\0') goto LAB_0005a8dd;
    goto LAB_0005aa43;
  }
LAB_0005a8e7:
  if (*(char *)((int)&ptVar1->sockfd + 2) == '\0') {
LAB_0005a9a7:
    if ((conn->bits).user_passwd == false) {
      local_24 = (char *)0x0;
      pcVar5 = (char *)0x0;
      var_15 = (type_10 *)0x0;
    }
    else {
      pcVar5 = conn->user;
      local_24 = conn->passwd;
      var_15 = (type_10 *)var_7(local_24);
    }
    var_9 = var_8(ptVar1->state,pcVar5,0,&var_15,0,0,&ptVar1->conn);
    var_5 = CURLE_LDAP_CANNOT_BIND;
    if (var_9 == 0) {
      *(type_11 *)((int)&ptVar1->sockfd + 2) = 1;
      var_5 = var_6;
    }
    goto LAB_0005aa45;
  }
  var_9 = var_10(ptVar1->state,ptVar1->conn,0,&tv,&msg);
  if (var_9 < 0) {
    uVar4 = var_11(var_9);
    pcVar5 = "LDAP local: bind ldap_result %s";
LAB_0005aafb:
    var_12(data,pcVar5,uVar4);
    var_5 = CURLE_LDAP_CANNOT_BIND;
  }
  else {
    if (var_9 != 0) {
      var_9 = var_13(ptVar1->state,msg,&var_14,0,&var_16,0,0,1);
      if (var_9 != 0) {
        uVar4 = var_11(var_9);
        pcVar5 = "LDAP local: bind ldap_parse_result %s";
        goto LAB_0005aafb;
      }
      if (var_14 == 2) {
        var_2(ptVar1->state,0x11,&var_15);
        if (var_15 == (type_10 *)0x3) {
          if (var_16 != (char *)0x0) {
            var_17(var_16);
            var_16 = (char *)0x0;
          }
          var_15 = (type_10 *)0x2;
          var_18(ptVar1->state,0x11,&var_15);
          *(type_11 *)((int)&ptVar1->sockfd + 2) = 0;
          goto LAB_0005a9a7;
        }
      }
      if (var_14 != 0) {
        pcVar5 = var_16;
        if (var_16 == (char *)0x0) {
          pcVar5 = "";
        }
        uVar4 = var_11(0);
        var_12(data,"LDAP remote: bind failed %s %s",uVar4,pcVar5);
        var_5 = CURLE_LOGIN_DENIED;
        if (var_16 != (char *)0x0) {
          var_5 = CURLE_LOGIN_DENIED;
          var_17(var_16);
        }
        goto LAB_0005aa45;
      }
      if (var_16 != (char *)0x0) {
        var_17(var_16);
      }
      conn->recv[0] = ldap_recv;
      *done = true;
    }
LAB_0005aa43:
    var_5 = var_6;
  }
LAB_0005aa45:
  if (var_19 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_20();
  }
  return var_5;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (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: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (labeled_statement label: (statement_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: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (number_literal) (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (subscript_expression argument: (identifier) index: (number_literal)) (binary_expression left: (identifier) right: (number_literal)) (number_literal) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (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: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (subscript_expression argument: (identifier) index: (number_literal))))))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (char_literal (escape_sequence)))) consequence: (goto_statement label: (statement_identifier))) (goto_statement label: (statement_identifier)))) (labeled_statement label: (statement_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: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (labeled_statement label: (statement_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: (number_literal))))) 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: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (identifier) (number_literal) (binary_expression left: (identifier) right: (number_literal)) (number_literal) (number_literal) (binary_expression left: (identifier) right: (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: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (number_literal))) (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 (pointer_expression argument: (identifier)) (subscript_expression argument: (identifier) index: (number_literal)) (number_literal) (binary_expression left: (identifier) right: (number_literal)) (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (identifier)) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (identifier) (pointer_expression argument: (identifier)) (number_literal) (identifier) (number_literal) (number_literal) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (goto_statement label: (statement_identifier)))) (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: (identifier)) (number_literal) (binary_expression left: (identifier) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (number_literal) (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: (cast_expression type: (type_descriptor type: (primitive_type)) value: (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: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) 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 (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (pointer_expression argument: (identifier)) right: (identifier)) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (subscript_expression argument: (identifier) index: (number_literal))))))) (goto_statement label: (statement_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (subscript_expression argument: (identifier) index: (number_literal))))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (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: Type propagation algorithm not settling */

int MASKED(undefined1 *param_1)

{
  undefined4 *puVar1;
  undefined *puVar2;
  int iVar3;
  undefined4 uVar4;
  undefined4 uVar5;
  int unaff_EBX;
  int in_GS_OFFSET;
  undefined4 *unaff_retaddr;
  int local_48;
  undefined4 local_40;
  int local_3c;
  int local_38 [4];
  char *local_28;
  int local_24;
  undefined4 uStack_14;
  
  uStack_14 = 0x5a879;
  entry();
  puVar1 = (undefined4 *)unaff_retaddr[0x129];
  local_24 = *(int *)(in_GS_OFFSET + 0x14);
  uVar5 = *unaff_retaddr;
  local_40 = 0;
  local_38[1] = 0;
  local_38[2] = 1;
  local_38[0] = 0;
  if ((*(byte *)(unaff_retaddr[0x9f] + 0x44) & 1) != 0) {
    if (*(char *)(puVar1 + 5) != '\0') {
LAB_0005a8dd:
      if (*(char *)((int)puVar1 + 0x15) == '\0') {
        ldap_get_option(*puVar1,0x5008,local_38 + 3);
        ber_sockbuf_add_io(local_38[3],unaff_EBX + 0x5682f,0x14,unaff_retaddr);
        uVar4 = unaff_retaddr[0x69];
        *(undefined1 *)((int)puVar1 + 0x15) = 1;
        puVar1[1] = uVar4;
        puVar1[2] = unaff_retaddr[0x6b];
      }
      goto LAB_0005a8e7;
    }
    local_48 = FUN_0007aa40(unaff_retaddr,0,puVar1 + 5);
    if (local_48 != 0) goto LAB_0005aa45;
    if (*(char *)(puVar1 + 5) != '\0') goto LAB_0005a8dd;
    goto LAB_0005aa43;
  }
LAB_0005a8e7:
  if (*(char *)((int)puVar1 + 0x16) == '\0') {
LAB_0005a9a7:
    if (*(char *)(unaff_retaddr + 0x94) == '\0') {
      local_28 = (char *)0x0;
      uVar5 = 0;
      local_38[3] = 0;
    }
    else {
      uVar5 = unaff_retaddr[0x5a];
      local_28 = (char *)unaff_retaddr[0x5b];
      local_38[3] = strlen(local_28);
    }
    iVar3 = ldap_sasl_bind(*puVar1,uVar5,0,local_38 + 3,0,0,puVar1 + 4);
    local_48 = 0x26;
    if (iVar3 == 0) {
      *(undefined1 *)((int)puVar1 + 0x16) = 1;
      local_48 = 0;
    }
    goto LAB_0005aa45;
  }
  iVar3 = ldap_result(*puVar1,puVar1[4],0,local_38 + 1,&local_40);
  if (iVar3 < 0) {
    uVar4 = ldap_err2string(iVar3);
    puVar2 = &UNK_0002b79b;
LAB_0005aafb:
    FUN_00027240(uVar5,puVar2 + unaff_EBX,uVar4);
    local_48 = 0x26;
  }
  else {
    if (iVar3 != 0) {
      iVar3 = ldap_parse_result(*puVar1,local_40,&local_3c,0,local_38,0,0,1);
      if (iVar3 != 0) {
        uVar4 = ldap_err2string(iVar3);
        puVar2 = &UNK_0002b7bb;
        goto LAB_0005aafb;
      }
      if (local_3c == 2) {
        ldap_get_option(*puVar1,0x11,local_38 + 3);
        if (local_38[3] == 3) {
          if (local_38[0] != 0) {
            ldap_memfree(local_38[0]);
            local_38[0] = 0;
          }
          local_38[3] = 2;
          ldap_set_option(*puVar1,0x11,local_38 + 3);
          *(undefined1 *)((int)puVar1 + 0x16) = 0;
          goto LAB_0005a9a7;
        }
      }
      if (local_3c != 0) {
        iVar3 = local_38[0];
        if (local_38[0] == 0) {
          iVar3 = unaff_EBX + 0x2d4f7;
        }
        uVar4 = ldap_err2string(0);
        FUN_00027240(uVar5,&UNK_0002b7e3 + unaff_EBX,uVar4,iVar3);
        local_48 = 0x43;
        if (local_38[0] != 0) {
          local_48 = 0x43;
          ldap_memfree(local_38[0]);
        }
        goto LAB_0005aa45;
      }
      if (local_38[0] != 0) {
        ldap_memfree(local_38[0]);
      }
      unaff_retaddr[0x69] = unaff_EBX + 0x317;
      *param_1 = 1;
    }
LAB_0005aa43:
    local_48 = 0;
  }
LAB_0005aa45:
  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0007c1a0();
  }
  return local_48;
}

