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

void * x11_make_greeting(int endian,int protomajor,int protominor,int auth_proto,void *auth_data,
                        int auth_len,char *peer_addr,int peer_port,int *outlen)

{
  int iVar1;
  char *__s;
  size_t __n;
  int iVar2;
  uint uVar3;
  undefined1 *__s_00;
  ushort uVar4;
  uint uVar5;
  undefined1 uVar6;
  size_t n;
  int in_GS_OFFSET;
  uchar *local_a0;
  uchar *local_9c;
  undefined1 local_90;
  undefined1 local_8c;
  size_t local_88;
  undefined1 local_84;
  int i [4];
  uchar realauthdata [64];
  
  local_a0 = (uchar *)auth_data;
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  __s = *(char **)(x11_authnames + auth_proto * 4);
  __n = strlen(__s);
  if (auth_proto == 1) {
    local_8c = (undefined1)auth_len;
    local_84 = (undefined1)((uint)auth_len >> 8);
    local_88 = auth_len;
    uVar5 = auth_len + 3U & 0xfffffffc;
    goto LAB_0008de80;
  }
  if ((auth_proto != 2) || (auth_len != 0x10)) {
    local_a0 = realauthdata;
    local_88 = 0;
    uVar5 = 0;
    local_84 = 0;
    local_8c = 0;
    goto LAB_0008de80;
  }
  if (peer_addr == (char *)0x0) {
LAB_0008dd92:
    local_8c = 0;
    uVar5 = 0;
    uVar6 = 0;
    local_90 = 0;
  }
  else {
    iVar2 = __isoc99_sscanf(peer_addr,"%d.%d.%d.%d",i,i + 1,i + 2,i + 3);
    if (iVar2 != 4) goto LAB_0008dd92;
    uVar5 = i[0] << 0x18 | i[1] << 0x10 | i[3] | i[2] << 8;
    uVar6 = (undefined1)(uVar5 >> 0x18);
    local_90 = (undefined1)(uVar5 >> 0x10);
    local_8c = (undefined1)(uVar5 >> 8);
  }
  local_a0 = realauthdata;
                    /* WARNING: Load size is inaccurate */
  realauthdata._0_4_ = *auth_data;
  realauthdata._4_4_ = *(undefined4 *)((int)auth_data + 4);
  realauthdata[0x16] = '\0';
  realauthdata[0x17] = '\0';
  realauthdata[0xe] = '\0';
  realauthdata[0xf] = '\0';
  realauthdata[0x10] = '\0';
  realauthdata[0x11] = '\0';
  realauthdata[0x12] = '\0';
  realauthdata[0x13] = '\0';
  realauthdata[0x14] = '\0';
  realauthdata[0x15] = '\0';
  realauthdata._8_4_ = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar6)) | uVar5 << 0x18;
  uVar5 = 0x18;
  realauthdata._12_2_ = (ushort)peer_port << 8 | (ushort)peer_port >> 8;
  uVar3 = time((time_t *)0x0);
  realauthdata._14_4_ =
       uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;
  des_encrypt_xdmauth((uchar *)((int)auth_data + 9),local_a0,0x18);
  local_88 = 0x18;
  local_84 = 0;
  local_8c = 0x18;
LAB_0008de80:
  local_9c = realauthdata;
  iVar2 = (__n + 3 & 0xfffffffc) + 0xc;
  n = uVar5 + iVar2;
  __s_00 = (undefined1 *)safemalloc(n,1);
  memset(__s_00,0,n);
  *__s_00 = (undefined1)endian;
  uVar4 = (ushort)__n;
  if (endian == 0x42) {
    *(ushort *)(__s_00 + 2) = (ushort)protomajor << 8 | (ushort)protomajor >> 8;
    *(ushort *)(__s_00 + 4) = (ushort)protominor << 8 | (ushort)protominor >> 8;
    *(ushort *)(__s_00 + 6) = uVar4 << 8 | uVar4 >> 8;
    __s_00[8] = local_84;
    __s_00[9] = local_8c;
  }
  else {
    *(ushort *)(__s_00 + 2) = (ushort)protomajor;
    *(ushort *)(__s_00 + 6) = uVar4;
    *(ushort *)(__s_00 + 4) = (ushort)protominor;
    __s_00[8] = local_8c;
    __s_00[9] = local_84;
  }
  memcpy(__s_00 + 0xc,__s,__n);
  memcpy(__s_00 + iVar2,local_a0,local_88);
  smemclr(local_9c,0x40);
  *outlen = n;
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return __s_00;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

undefined1 *
FUN_0008dcd0(int param_1,ushort param_2,ushort param_3,int param_4,undefined4 *param_5,
            size_t param_6,int param_7,ushort param_8,size_t *param_9)

{
  char *__s;
  size_t __n;
  int iVar1;
  uint uVar2;
  undefined1 *__s_00;
  ushort uVar3;
  uint uVar4;
  undefined1 uVar5;
  size_t __n_00;
  int in_GS_OFFSET;
  undefined4 *local_a0;
  undefined4 *local_9c;
  undefined1 local_90;
  undefined1 local_8c;
  size_t local_88;
  undefined1 local_84;
  int local_70;
  int local_6c;
  int local_68;
  uint local_64;
  undefined4 local_60;
  undefined4 local_5c;
  uint local_58;
  ushort local_54;
  uint local_52;
  undefined4 local_4e;
  undefined2 local_4a;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x8dcd9;
  local_a0 = param_5;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  __s = (&PTR_DAT_000cfb2c)[param_4];
  __n = strlen(__s);
  if (param_4 == 1) {
    local_8c = (undefined1)param_6;
    local_84 = (undefined1)(param_6 >> 8);
    local_88 = param_6;
    uVar4 = param_6 + 3 & 0xfffffffc;
    goto LAB_0008de80;
  }
  if ((param_4 != 2) || (param_6 != 0x10)) {
    local_a0 = &local_60;
    local_88 = 0;
    uVar4 = 0;
    local_84 = 0;
    local_8c = 0;
    goto LAB_0008de80;
  }
  if (param_7 == 0) {
LAB_0008dd92:
    local_8c = 0;
    uVar4 = 0;
    uVar5 = 0;
    local_90 = 0;
  }
  else {
    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);
    if (iVar1 != 4) goto LAB_0008dd92;
    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;
    uVar5 = (undefined1)(uVar4 >> 0x18);
    local_90 = (undefined1)(uVar4 >> 0x10);
    local_8c = (undefined1)(uVar4 >> 8);
  }
  local_a0 = &local_60;
  local_60 = *param_5;
  local_5c = param_5[1];
  local_4a = 0;
  local_52 = 0;
  local_4e = 0;
  local_58 = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18;
  uVar4 = 0x18;
  local_54 = param_8 << 8 | param_8 >> 8;
  uVar2 = time((time_t *)0x0);
  local_52 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;
  FUN_0005f8c0((int)param_5 + 9,local_a0,0x18);
  local_88 = 0x18;
  local_84 = 0;
  local_8c = 0x18;
LAB_0008de80:
  local_9c = &local_60;
  iVar1 = (__n + 3 & 0xfffffffc) + 0xc;
  __n_00 = uVar4 + iVar1;
  __s_00 = (undefined1 *)FUN_0001db90(__n_00,1);
  memset(__s_00,0,__n_00);
  *__s_00 = (undefined1)param_1;
  uVar3 = (ushort)__n;
  if (param_1 == 0x42) {
    *(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;
    *(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;
    *(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;
    __s_00[8] = local_84;
    __s_00[9] = local_8c;
  }
  else {
    *(ushort *)(__s_00 + 2) = param_2;
    *(ushort *)(__s_00 + 6) = uVar3;
    *(ushort *)(__s_00 + 4) = param_3;
    __s_00[8] = local_8c;
    __s_00[9] = local_84;
  }
  memcpy(__s_00 + 0xc,__s,__n);
  memcpy(__s_00 + iVar1,local_a0,local_88);
  FUN_0001de10(local_9c,0x40);
  *param_9 = __n_00;
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return __s_00;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0008eb20();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000149a0
ADD EBX,0x420b7
SUB ESP,0xa8
MOV EAX,dword ptr [ESP + 0xcc]
MOV EDI,dword ptr [ESP + 0xc8]
MOV EBP,dword ptr [ESP + 0xd4]
MOV dword ptr [ESP + 0x18],EAX
MOV EAX,dword ptr [ESP + 0xdc]
MOV dword ptr [ESP + 0x24],EAX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x98],EAX
XOR EAX,EAX
MOV EAX,dword ptr [EBX + EDI*0x4 + 0xfffffd9c]
MOV dword ptr [ESP + 0x20],EAX
PUSH EAX
CALL 0x00014470
ADD ESP,0x10
MOV ECX,EAX
ADD EAX,0x3
AND EAX,0xfffffffc
MOV ESI,EAX
CMP EDI,0x1
JZ 0x0008df50
CMP EDI,0x2
JNZ 0x0008de60
CMP dword ptr [ESP + 0xc4],0x10
JNZ 0x0008de60
TEST EBP,EBP
JZ 0x0008dd92
MOV dword ptr [ESP + 0x10],ECX
SUB ESP,0x8
LEA EDX,[ESP + 0x50]
LEA EAX,[ESP + 0x44]
PUSH EDX
LEA EDX,[ESP + 0x50]
PUSH EDX
LEA EDX,[ESP + 0x50]
PUSH EDX
PUSH EAX
LEA EAX,[EBX + 0xfffc06cc]
PUSH EAX
PUSH EBP
CALL 0x000144f0
ADD ESP,0x20
MOV ECX,dword ptr [ESP + 0x10]
CMP EAX,0x4
JZ 0x0008dfd0
MOV byte ptr [ESP + 0x20],0x0
XOR EBP,EBP
XOR EDI,EDI
MOV byte ptr [ESP + 0x1c],0x0
MOV EDX,dword ptr [ESP + 0xc]
LEA EAX,[ESP + 0x4c]
MOV dword ptr [ESP + 0x2c],ECX
XOR ECX,ECX
MOV dword ptr [ESP + 0x10],EAX
SUB ESP,0xc
MOV EAX,dword ptr [EDX]
MOV EDX,dword ptr [EDX + 0x4]
MOV word ptr [ESP + 0x6e],CX
MOV ECX,EDI
MOV EDI,EBP
MOV byte ptr [ESP + 0x30],CL
MOV dword ptr [ESP + 0x58],EAX
XOR EAX,EAX
SHL EDI,0x18
MOV dword ptr [ESP + 0x5c],EDX
MOV AL,CL
MOVZX EDX,byte ptr [ESP + 0x2c]
MOV AH,byte ptr [ESP + 0x28]
MOV dword ptr [ESP + 0x66],0x0
SHL EDX,0x10
MOV dword ptr [ESP + 0x6a],0x0
MOVZX EAX,AX
OR EAX,EDX
OR EAX,EDI
MOV EDI,0x18
MOV dword ptr [ESP + 0x60],EAX
MOVZX EAX,word ptr [ESP + 0xd8]
ROL AX,0x8
MOV word ptr [ESP + 0x64],AX
PUSH 0x0
CALL 0x00014180
BSWAP EAX
MOV dword ptr [ESP + 0x6a],EAX
ADD ESP,0xc
PUSH 0x18
MOV EBP,dword ptr [ESP + 0x18]
PUSH EBP
MOV EDX,dword ptr [ESP + 0x18]
LEA EAX,[EDX + 0x9]
PUSH EAX
CALL 0x0005f8c0
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0x2c]
MOV dword ptr [ESP + 0x24],0x18
MOV byte ptr [ESP + 0x28],0x0
MOV byte ptr [ESP + 0x20],0x18
MOV dword ptr [ESP + 0xc],EBP
JMP 0x0008de80
LEA EAX,[ESP + 0x4c]
MOV dword ptr [ESP + 0x24],0x0
XOR EDI,EDI
MOV byte ptr [ESP + 0x28],0x0
MOV byte ptr [ESP + 0x20],0x0
MOV dword ptr [ESP + 0x10],EAX
MOV dword ptr [ESP + 0xc],EAX
ADD ESI,0xc
MOV dword ptr [ESP + 0x1c],ECX
SUB ESP,0x8
ADD EDI,ESI
PUSH 0x1
PUSH EDI
CALL 0x0001db90
ADD ESP,0xc
PUSH EDI
MOV EBP,EAX
PUSH 0x0
PUSH EAX
CALL 0x00014500
MOVZX EAX,byte ptr [ESP + 0xc0]
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0x1c]
CMP dword ptr [ESP + 0xb0],0x42
MOV byte ptr [EBP],AL
MOVZX EAX,word ptr [ESP + 0xb4]
JZ 0x0008df90
MOV word ptr [EBP + 0x2],AX
MOVZX EAX,word ptr [ESP + 0xb8]
MOV word ptr [EBP + 0x6],CX
MOV word ptr [EBP + 0x4],AX
MOVZX EAX,byte ptr [ESP + 0x20]
MOV byte ptr [EBP + 0x8],AL
MOVZX EAX,byte ptr [ESP + 0x28]
MOV byte ptr [EBP + 0x9],AL
SUB ESP,0x4
LEA EAX,[EBP + 0xc]
ADD ESI,EBP
PUSH ECX
PUSH dword ptr [ESP + 0x1c]
PUSH EAX
CALL 0x00014130
ADD ESP,0xc
PUSH dword ptr [ESP + 0x28]
PUSH dword ptr [ESP + 0x14]
PUSH ESI
CALL 0x00014130
POP EAX
POP EDX
PUSH 0x40
PUSH dword ptr [ESP + 0x1c]
CALL 0x0001de10
MOV EAX,dword ptr [ESP + 0x28]
ADD ESP,0x10
MOV dword ptr [EAX],EDI
MOV EAX,EBP
MOV EDX,dword ptr [ESP + 0x8c]
XOR EDX,dword ptr GS:[0x14]
JNZ 0x0008e00b
ADD ESP,0x9c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOVZX EAX,byte ptr [ESP + 0xc4]
MOV byte ptr [ESP + 0x20],AL
MOV EAX,dword ptr [ESP + 0xc4]
MOVZX EAX,AH
MOV dword ptr [ESP + 0x28],EAX
MOV EAX,dword ptr [ESP + 0xc4]
LEA EDI,[EAX + 0x3]
MOV dword ptr [ESP + 0x24],EAX
LEA EAX,[ESP + 0x4c]
AND EDI,0xfffffffc
MOV dword ptr [ESP + 0x10],EAX
JMP 0x0008de80
ROL AX,0x8
MOV word ptr [EBP + 0x2],AX
MOVZX EAX,word ptr [ESP + 0xb8]
ROL AX,0x8
MOV word ptr [EBP + 0x4],AX
MOV EAX,ECX
ROL AX,0x8
MOV word ptr [EBP + 0x6],AX
MOVZX EAX,byte ptr [ESP + 0x28]
MOV byte ptr [EBP + 0x8],AL
MOVZX EAX,byte ptr [ESP + 0x20]
MOV byte ptr [EBP + 0x9],AL
JMP 0x0008deee
MOV EAX,dword ptr [ESP + 0x3c]
MOV EDX,dword ptr [ESP + 0x40]
SHL EAX,0x18
SHL EDX,0x10
OR EAX,EDX
MOV EDX,dword ptr [ESP + 0x44]
OR EAX,dword ptr [ESP + 0x48]
SHL EDX,0x8
OR EAX,EDX
MOV EDX,EAX
MOV EBP,EAX
SHR EDX,0x18
MOV EDI,EDX
MOV EDX,EAX
SHR EDX,0x10
MOV byte ptr [ESP + 0x1c],DL
MOVZX EDX,AH
MOV dword ptr [ESP + 0x20],EDX
JMP 0x0008dda0
CALL 0x0008eb20
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined1 *\nFUN_0008dcd0(int param_1,ushort param_2,ushort param_3,int param_4,undefined4 *param_5,\n            size_t param_6,int param_7,ushort param_8,size_t *param_9)\n\n{\n  char *__s;\n  size_t __n;\n  int iVar1;\n  uint uVar2;\n  undefined1 *__s_00;\n  ushort uVar3;\n  uint uVar4;\n  undefined1 uVar5;\n  size_t __n_00;\n  int in_GS_OFFSET;\n  undefined4 *local_a0;\n  undefined4 *local_9c;\n  undefined1 local_90;\n  undefined1 local_8c;\n  size_t local_88;\n  undefined1 local_84;\n  int local_70;\n  int local_6c;\n  int local_68;\n  uint local_64;\n  undefined4 local_60;\n  undefined4 local_5c;\n  uint local_58;\n  ushort local_54;\n  uint local_52;\n  undefined4 local_4e;\n  undefined2 local_4a;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x8dcd9;\n  local_a0 = param_5;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = (&PTR_DAT_000cfb2c)[param_4];\n  __n = strlen(__s);\n  if (param_4 == 1) {\n    local_8c = (undefined1)param_6;\n    local_84 = (undefined1)(param_6 >> 8);\n    local_88 = param_6;\n    uVar4 = param_6 + 3 & 0xfffffffc;\n    goto LAB_0008de80;\n  }\n  if ((param_4 != 2) || (param_6 != 0x10)) {\n    local_a0 = &local_60;\n    local_88 = 0;\n    uVar4 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }\n  if (param_7 == 0) {\nLAB_0008dd92:\n    local_8c = 0;\n    uVar4 = 0;\n    uVar5 = 0;\n    local_90 = 0;\n  }\n  else {\n    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);\n    if (iVar1 != 4) goto LAB_0008dd92;\n    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;\n    uVar5 = (undefined1)(uVar4 >> 0x18);\n    local_90 = (undefined1)(uVar4 >> 0x10);\n    local_8c = (undefined1)(uVar4 >> 8);\n  }\n  local_a0 = &local_60;\n  local_60 = *param_5;\n  local_5c = param_5[1];\n  local_4a = 0;\n  local_52 = 0;\n  local_4e = 0;\n  local_58 = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18;\n  uVar4 = 0x18;\n  local_54 = param_8 << 8 | param_8 >> 8;\n  uVar2 = time((time_t *)0x0);\n  local_52 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n  FUN_0005f8c0((int)param_5 + 9,local_a0,0x18);\n  local_88 = 0x18;\n  local_84 = 0;\n  local_8c = 0x18;\nLAB_0008de80:\n  local_9c = &local_60;\n  iVar1 = (__n + 3 & 0xfffffffc) + 0xc;\n  __n_00 = uVar4 + iVar1;\n  __s_00 = (undefined1 *)FUN_0001db90(__n_00,1);\n  memset(__s_00,0,__n_00);\n  *__s_00 = (undefined1)param_1;\n  uVar3 = (ushort)__n;\n  if (param_1 == 0x42) {\n    *(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;\n    *(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;\n    *(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }\n  else {\n    *(ushort *)(__s_00 + 2) = param_2;\n    *(ushort *)(__s_00 + 6) = uVar3;\n    *(ushort *)(__s_00 + 4) = param_3;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }\n  memcpy(__s_00 + 0xc,__s,__n);\n  memcpy(__s_00 + iVar1,local_a0,local_88);\n  FUN_0001de10(local_9c,0x40);\n  *param_9 = __n_00;\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return __s_00;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0008eb20();\n}\n\n" comment (function_definition "undefined1 *\nFUN_0008dcd0(int param_1,ushort param_2,ushort param_3,int param_4,undefined4 *param_5,\n            size_t param_6,int param_7,ushort param_8,size_t *param_9)\n\n{\n  char *__s;\n  size_t __n;\n  int iVar1;\n  uint uVar2;\n  undefined1 *__s_00;\n  ushort uVar3;\n  uint uVar4;\n  undefined1 uVar5;\n  size_t __n_00;\n  int in_GS_OFFSET;\n  undefined4 *local_a0;\n  undefined4 *local_9c;\n  undefined1 local_90;\n  undefined1 local_8c;\n  size_t local_88;\n  undefined1 local_84;\n  int local_70;\n  int local_6c;\n  int local_68;\n  uint local_64;\n  undefined4 local_60;\n  undefined4 local_5c;\n  uint local_58;\n  ushort local_54;\n  uint local_52;\n  undefined4 local_4e;\n  undefined2 local_4a;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x8dcd9;\n  local_a0 = param_5;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = (&PTR_DAT_000cfb2c)[param_4];\n  __n = strlen(__s);\n  if (param_4 == 1) {\n    local_8c = (undefined1)param_6;\n    local_84 = (undefined1)(param_6 >> 8);\n    local_88 = param_6;\n    uVar4 = param_6 + 3 & 0xfffffffc;\n    goto LAB_0008de80;\n  }\n  if ((param_4 != 2) || (param_6 != 0x10)) {\n    local_a0 = &local_60;\n    local_88 = 0;\n    uVar4 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }\n  if (param_7 == 0) {\nLAB_0008dd92:\n    local_8c = 0;\n    uVar4 = 0;\n    uVar5 = 0;\n    local_90 = 0;\n  }\n  else {\n    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);\n    if (iVar1 != 4) goto LAB_0008dd92;\n    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;\n    uVar5 = (undefined1)(uVar4 >> 0x18);\n    local_90 = (undefined1)(uVar4 >> 0x10);\n    local_8c = (undefined1)(uVar4 >> 8);\n  }\n  local_a0 = &local_60;\n  local_60 = *param_5;\n  local_5c = param_5[1];\n  local_4a = 0;\n  local_52 = 0;\n  local_4e = 0;\n  local_58 = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18;\n  uVar4 = 0x18;\n  local_54 = param_8 << 8 | param_8 >> 8;\n  uVar2 = time((time_t *)0x0);\n  local_52 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n  FUN_0005f8c0((int)param_5 + 9,local_a0,0x18);\n  local_88 = 0x18;\n  local_84 = 0;\n  local_8c = 0x18;\nLAB_0008de80:\n  local_9c = &local_60;\n  iVar1 = (__n + 3 & 0xfffffffc) + 0xc;\n  __n_00 = uVar4 + iVar1;\n  __s_00 = (undefined1 *)FUN_0001db90(__n_00,1);\n  memset(__s_00,0,__n_00);\n  *__s_00 = (undefined1)param_1;\n  uVar3 = (ushort)__n;\n  if (param_1 == 0x42) {\n    *(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;\n    *(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;\n    *(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }\n  else {\n    *(ushort *)(__s_00 + 2) = param_2;\n    *(ushort *)(__s_00 + 6) = uVar3;\n    *(ushort *)(__s_00 + 4) = param_3;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }\n  memcpy(__s_00 + 0xc,__s,__n);\n  memcpy(__s_00 + iVar1,local_a0,local_88);\n  FUN_0001de10(local_9c,0x40);\n  *param_9 = __n_00;\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return __s_00;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0008eb20();\n}" type_identifier (pointer_declarator "*\nFUN_0008dcd0(int param_1,ushort param_2,ushort param_3,int param_4,undefined4 *param_5,\n            size_t param_6,int param_7,ushort param_8,size_t *param_9)" * (function_declarator "FUN_0008dcd0(int param_1,ushort param_2,ushort param_3,int param_4,undefined4 *param_5,\n            size_t param_6,int param_7,ushort param_8,size_t *param_9)" identifier (parameter_list "(int param_1,ushort param_2,ushort param_3,int param_4,undefined4 *param_5,\n            size_t param_6,int param_7,ushort param_8,size_t *param_9)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "ushort param_2" type_identifier identifier) , (parameter_declaration "ushort param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "undefined4 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "size_t param_6" primitive_type identifier) , (parameter_declaration "int param_7" primitive_type identifier) , (parameter_declaration "ushort param_8" type_identifier identifier) , (parameter_declaration "size_t *param_9" primitive_type (pointer_declarator "*param_9" * identifier)) )))) (compound_statement "{\n  char *__s;\n  size_t __n;\n  int iVar1;\n  uint uVar2;\n  undefined1 *__s_00;\n  ushort uVar3;\n  uint uVar4;\n  undefined1 uVar5;\n  size_t __n_00;\n  int in_GS_OFFSET;\n  undefined4 *local_a0;\n  undefined4 *local_9c;\n  undefined1 local_90;\n  undefined1 local_8c;\n  size_t local_88;\n  undefined1 local_84;\n  int local_70;\n  int local_6c;\n  int local_68;\n  uint local_64;\n  undefined4 local_60;\n  undefined4 local_5c;\n  uint local_58;\n  ushort local_54;\n  uint local_52;\n  undefined4 local_4e;\n  undefined2 local_4a;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x8dcd9;\n  local_a0 = param_5;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = (&PTR_DAT_000cfb2c)[param_4];\n  __n = strlen(__s);\n  if (param_4 == 1) {\n    local_8c = (undefined1)param_6;\n    local_84 = (undefined1)(param_6 >> 8);\n    local_88 = param_6;\n    uVar4 = param_6 + 3 & 0xfffffffc;\n    goto LAB_0008de80;\n  }\n  if ((param_4 != 2) || (param_6 != 0x10)) {\n    local_a0 = &local_60;\n    local_88 = 0;\n    uVar4 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }\n  if (param_7 == 0) {\nLAB_0008dd92:\n    local_8c = 0;\n    uVar4 = 0;\n    uVar5 = 0;\n    local_90 = 0;\n  }\n  else {\n    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);\n    if (iVar1 != 4) goto LAB_0008dd92;\n    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;\n    uVar5 = (undefined1)(uVar4 >> 0x18);\n    local_90 = (undefined1)(uVar4 >> 0x10);\n    local_8c = (undefined1)(uVar4 >> 8);\n  }\n  local_a0 = &local_60;\n  local_60 = *param_5;\n  local_5c = param_5[1];\n  local_4a = 0;\n  local_52 = 0;\n  local_4e = 0;\n  local_58 = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18;\n  uVar4 = 0x18;\n  local_54 = param_8 << 8 | param_8 >> 8;\n  uVar2 = time((time_t *)0x0);\n  local_52 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n  FUN_0005f8c0((int)param_5 + 9,local_a0,0x18);\n  local_88 = 0x18;\n  local_84 = 0;\n  local_8c = 0x18;\nLAB_0008de80:\n  local_9c = &local_60;\n  iVar1 = (__n + 3 & 0xfffffffc) + 0xc;\n  __n_00 = uVar4 + iVar1;\n  __s_00 = (undefined1 *)FUN_0001db90(__n_00,1);\n  memset(__s_00,0,__n_00);\n  *__s_00 = (undefined1)param_1;\n  uVar3 = (ushort)__n;\n  if (param_1 == 0x42) {\n    *(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;\n    *(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;\n    *(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }\n  else {\n    *(ushort *)(__s_00 + 2) = param_2;\n    *(ushort *)(__s_00 + 6) = uVar3;\n    *(ushort *)(__s_00 + 4) = param_3;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }\n  memcpy(__s_00 + 0xc,__s,__n);\n  memcpy(__s_00 + iVar1,local_a0,local_88);\n  FUN_0001de10(local_9c,0x40);\n  *param_9 = __n_00;\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return __s_00;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0008eb20();\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "undefined1 *__s_00;" type_identifier (pointer_declarator "*__s_00" * identifier) ;) (declaration "ushort uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "undefined1 uVar5;" type_identifier identifier ;) (declaration "size_t __n_00;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 *local_a0;" type_identifier (pointer_declarator "*local_a0" * identifier) ;) (declaration "undefined4 *local_9c;" type_identifier (pointer_declarator "*local_9c" * identifier) ;) (declaration "undefined1 local_90;" type_identifier identifier ;) (declaration "undefined1 local_8c;" type_identifier identifier ;) (declaration "size_t local_88;" primitive_type identifier ;) (declaration "undefined1 local_84;" type_identifier identifier ;) (declaration "int local_70;" primitive_type identifier ;) (declaration "int local_6c;" primitive_type identifier ;) (declaration "int local_68;" primitive_type identifier ;) (declaration "uint local_64;" type_identifier identifier ;) (declaration "undefined4 local_60;" type_identifier identifier ;) (declaration "undefined4 local_5c;" type_identifier identifier ;) (declaration "uint local_58;" type_identifier identifier ;) (declaration "ushort local_54;" type_identifier identifier ;) (declaration "uint local_52;" type_identifier identifier ;) (declaration "undefined4 local_4e;" type_identifier identifier ;) (declaration "undefined2 local_4a;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x8dcd9;" (assignment_expression "uStack_14 = 0x8dcd9" identifier = number_literal) ;) (expression_statement "local_a0 = param_5;" (assignment_expression "local_a0 = param_5" identifier = 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 "__s = (&PTR_DAT_000cfb2c)[param_4];" (assignment_expression "__s = (&PTR_DAT_000cfb2c)[param_4]" identifier = (subscript_expression "(&PTR_DAT_000cfb2c)[param_4]" (parenthesized_expression "(&PTR_DAT_000cfb2c)" ( (pointer_expression "&PTR_DAT_000cfb2c" & identifier) )) [ identifier ])) ;) (expression_statement "__n = strlen(__s);" (assignment_expression "__n = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (if_statement "if (param_4 == 1) {\n    local_8c = (undefined1)param_6;\n    local_84 = (undefined1)(param_6 >> 8);\n    local_88 = param_6;\n    uVar4 = param_6 + 3 & 0xfffffffc;\n    goto LAB_0008de80;\n  }" if (parenthesized_expression "(param_4 == 1)" ( (binary_expression "param_4 == 1" identifier == number_literal) )) (compound_statement "{\n    local_8c = (undefined1)param_6;\n    local_84 = (undefined1)(param_6 >> 8);\n    local_88 = param_6;\n    uVar4 = param_6 + 3 & 0xfffffffc;\n    goto LAB_0008de80;\n  }" { (expression_statement "local_8c = (undefined1)param_6;" (assignment_expression "local_8c = (undefined1)param_6" identifier = (cast_expression "(undefined1)param_6" ( (type_descriptor "undefined1" type_identifier) ) identifier)) ;) (expression_statement "local_84 = (undefined1)(param_6 >> 8);" (assignment_expression "local_84 = (undefined1)(param_6 >> 8)" identifier = (call_expression "(undefined1)(param_6 >> 8)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "(param_6 >> 8)" ( (binary_expression "param_6 >> 8" identifier >> number_literal) )))) ;) (expression_statement "local_88 = param_6;" (assignment_expression "local_88 = param_6" identifier = identifier) ;) (expression_statement "uVar4 = param_6 + 3 & 0xfffffffc;" (assignment_expression "uVar4 = param_6 + 3 & 0xfffffffc" identifier = (binary_expression "param_6 + 3 & 0xfffffffc" (binary_expression "param_6 + 3" identifier + number_literal) & number_literal)) ;) (goto_statement "goto LAB_0008de80;" goto statement_identifier ;) })) (if_statement "if ((param_4 != 2) || (param_6 != 0x10)) {\n    local_a0 = &local_60;\n    local_88 = 0;\n    uVar4 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }" if (parenthesized_expression "((param_4 != 2) || (param_6 != 0x10))" ( (binary_expression "(param_4 != 2) || (param_6 != 0x10)" (parenthesized_expression "(param_4 != 2)" ( (binary_expression "param_4 != 2" identifier != number_literal) )) || (parenthesized_expression "(param_6 != 0x10)" ( (binary_expression "param_6 != 0x10" identifier != number_literal) ))) )) (compound_statement "{\n    local_a0 = &local_60;\n    local_88 = 0;\n    uVar4 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }" { (expression_statement "local_a0 = &local_60;" (assignment_expression "local_a0 = &local_60" identifier = (pointer_expression "&local_60" & identifier)) ;) (expression_statement "local_88 = 0;" (assignment_expression "local_88 = 0" identifier = number_literal) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "local_84 = 0;" (assignment_expression "local_84 = 0" identifier = number_literal) ;) (expression_statement "local_8c = 0;" (assignment_expression "local_8c = 0" identifier = number_literal) ;) (goto_statement "goto LAB_0008de80;" goto statement_identifier ;) })) (if_statement "if (param_7 == 0) {\nLAB_0008dd92:\n    local_8c = 0;\n    uVar4 = 0;\n    uVar5 = 0;\n    local_90 = 0;\n  }\n  else {\n    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);\n    if (iVar1 != 4) goto LAB_0008dd92;\n    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;\n    uVar5 = (undefined1)(uVar4 >> 0x18);\n    local_90 = (undefined1)(uVar4 >> 0x10);\n    local_8c = (undefined1)(uVar4 >> 8);\n  }" if (parenthesized_expression "(param_7 == 0)" ( (binary_expression "param_7 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0008dd92:\n    local_8c = 0;\n    uVar4 = 0;\n    uVar5 = 0;\n    local_90 = 0;\n  }" { (labeled_statement "LAB_0008dd92:\n    local_8c = 0;" statement_identifier : (expression_statement "local_8c = 0;" (assignment_expression "local_8c = 0" identifier = number_literal) ;)) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (expression_statement "local_90 = 0;" (assignment_expression "local_90 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);\n    if (iVar1 != 4) goto LAB_0008dd92;\n    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;\n    uVar5 = (undefined1)(uVar4 >> 0x18);\n    local_90 = (undefined1)(uVar4 >> 0x10);\n    local_8c = (undefined1)(uVar4 >> 8);\n  }" else (compound_statement "{\n    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);\n    if (iVar1 != 4) goto LAB_0008dd92;\n    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;\n    uVar5 = (undefined1)(uVar4 >> 0x18);\n    local_90 = (undefined1)(uVar4 >> 0x10);\n    local_8c = (undefined1)(uVar4 >> 8);\n  }" { (expression_statement "iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);" (assignment_expression "iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64)" identifier = (call_expression "__isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64)" identifier (argument_list "(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64)" ( identifier , (string_literal ""%d.%d.%d.%d"" " string_content ") , (pointer_expression "&local_70" & identifier) , (pointer_expression "&local_6c" & identifier) , (pointer_expression "&local_68" & identifier) , (pointer_expression "&local_64" & identifier) )))) ;) (if_statement "if (iVar1 != 4) goto LAB_0008dd92;" if (parenthesized_expression "(iVar1 != 4)" ( (binary_expression "iVar1 != 4" identifier != number_literal) )) (goto_statement "goto LAB_0008dd92;" goto statement_identifier ;)) (expression_statement "uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;" (assignment_expression "uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8" identifier = (binary_expression "local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8" (binary_expression "local_70 << 0x18 | local_6c << 0x10 | local_64" (binary_expression "local_70 << 0x18 | local_6c << 0x10" (binary_expression "local_70 << 0x18" identifier << number_literal) | (binary_expression "local_6c << 0x10" identifier << number_literal)) | identifier) | (binary_expression "local_68 << 8" identifier << number_literal))) ;) (expression_statement "uVar5 = (undefined1)(uVar4 >> 0x18);" (assignment_expression "uVar5 = (undefined1)(uVar4 >> 0x18)" identifier = (call_expression "(undefined1)(uVar4 >> 0x18)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "(uVar4 >> 0x18)" ( (binary_expression "uVar4 >> 0x18" identifier >> number_literal) )))) ;) (expression_statement "local_90 = (undefined1)(uVar4 >> 0x10);" (assignment_expression "local_90 = (undefined1)(uVar4 >> 0x10)" identifier = (call_expression "(undefined1)(uVar4 >> 0x10)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "(uVar4 >> 0x10)" ( (binary_expression "uVar4 >> 0x10" identifier >> number_literal) )))) ;) (expression_statement "local_8c = (undefined1)(uVar4 >> 8);" (assignment_expression "local_8c = (undefined1)(uVar4 >> 8)" identifier = (call_expression "(undefined1)(uVar4 >> 8)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "(uVar4 >> 8)" ( (binary_expression "uVar4 >> 8" identifier >> number_literal) )))) ;) }))) (expression_statement "local_a0 = &local_60;" (assignment_expression "local_a0 = &local_60" identifier = (pointer_expression "&local_60" & identifier)) ;) (expression_statement "local_60 = *param_5;" (assignment_expression "local_60 = *param_5" identifier = (pointer_expression "*param_5" * identifier)) ;) (expression_statement "local_5c = param_5[1];" (assignment_expression "local_5c = param_5[1]" identifier = (subscript_expression "param_5[1]" identifier [ number_literal ])) ;) (expression_statement "local_4a = 0;" (assignment_expression "local_4a = 0" identifier = number_literal) ;) (expression_statement "local_52 = 0;" (assignment_expression "local_52 = 0" identifier = number_literal) ;) (expression_statement "local_4e = 0;" (assignment_expression "local_4e = 0" identifier = number_literal) ;) (expression_statement "local_58 = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18;" (assignment_expression "local_58 = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18" identifier = (binary_expression "(uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18" (cast_expression "(uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5))" ( (type_descriptor "uint" type_identifier) ) (call_expression "CONCAT12(local_8c,CONCAT11(local_90,uVar5))" identifier (argument_list "(local_8c,CONCAT11(local_90,uVar5))" ( identifier , (call_expression "CONCAT11(local_90,uVar5)" identifier (argument_list "(local_90,uVar5)" ( identifier , identifier ))) )))) | (binary_expression "uVar4 << 0x18" identifier << number_literal))) ;) (expression_statement "uVar4 = 0x18;" (assignment_expression "uVar4 = 0x18" identifier = number_literal) ;) (expression_statement "local_54 = param_8 << 8 | param_8 >> 8;" (assignment_expression "local_54 = param_8 << 8 | param_8 >> 8" identifier = (binary_expression "param_8 << 8 | param_8 >> 8" (binary_expression "param_8 << 8" identifier << number_literal) | (binary_expression "param_8 >> 8" identifier >> number_literal))) ;) (expression_statement "uVar2 = time((time_t *)0x0);" (assignment_expression "uVar2 = time((time_t *)0x0)" identifier = (call_expression "time((time_t *)0x0)" identifier (argument_list "((time_t *)0x0)" ( (cast_expression "(time_t *)0x0" ( (type_descriptor "time_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "local_52 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;" (assignment_expression "local_52 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" identifier = (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8" (binary_expression "uVar2 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar2 & 0xff0000) >> 8" (parenthesized_expression "(uVar2 & 0xff0000)" ( (binary_expression "uVar2 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar2 & 0xff00) << 8" (parenthesized_expression "(uVar2 & 0xff00)" ( (binary_expression "uVar2 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar2 << 0x18" identifier << number_literal))) ;) (expression_statement "FUN_0005f8c0((int)param_5 + 9,local_a0,0x18);" (call_expression "FUN_0005f8c0((int)param_5 + 9,local_a0,0x18)" identifier (argument_list "((int)param_5 + 9,local_a0,0x18)" ( (binary_expression "(int)param_5 + 9" (cast_expression "(int)param_5" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier , number_literal ))) ;) (expression_statement "local_88 = 0x18;" (assignment_expression "local_88 = 0x18" identifier = number_literal) ;) (expression_statement "local_84 = 0;" (assignment_expression "local_84 = 0" identifier = number_literal) ;) (expression_statement "local_8c = 0x18;" (assignment_expression "local_8c = 0x18" identifier = number_literal) ;) (labeled_statement "LAB_0008de80:\n  local_9c = &local_60;" statement_identifier : (expression_statement "local_9c = &local_60;" (assignment_expression "local_9c = &local_60" identifier = (pointer_expression "&local_60" & identifier)) ;)) (expression_statement "iVar1 = (__n + 3 & 0xfffffffc) + 0xc;" (assignment_expression "iVar1 = (__n + 3 & 0xfffffffc) + 0xc" identifier = (binary_expression "(__n + 3 & 0xfffffffc) + 0xc" (parenthesized_expression "(__n + 3 & 0xfffffffc)" ( (binary_expression "__n + 3 & 0xfffffffc" (binary_expression "__n + 3" identifier + number_literal) & number_literal) )) + number_literal)) ;) (expression_statement "__n_00 = uVar4 + iVar1;" (assignment_expression "__n_00 = uVar4 + iVar1" identifier = (binary_expression "uVar4 + iVar1" identifier + identifier)) ;) (expression_statement "__s_00 = (undefined1 *)FUN_0001db90(__n_00,1);" (assignment_expression "__s_00 = (undefined1 *)FUN_0001db90(__n_00,1)" identifier = (cast_expression "(undefined1 *)FUN_0001db90(__n_00,1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001db90(__n_00,1)" identifier (argument_list "(__n_00,1)" ( identifier , number_literal ))))) ;) (expression_statement "memset(__s_00,0,__n_00);" (call_expression "memset(__s_00,0,__n_00)" identifier (argument_list "(__s_00,0,__n_00)" ( identifier , number_literal , identifier ))) ;) (expression_statement "*__s_00 = (undefined1)param_1;" (assignment_expression "*__s_00 = (undefined1)param_1" (pointer_expression "*__s_00" * identifier) = (cast_expression "(undefined1)param_1" ( (type_descriptor "undefined1" type_identifier) ) identifier)) ;) (expression_statement "uVar3 = (ushort)__n;" (assignment_expression "uVar3 = (ushort)__n" identifier = (cast_expression "(ushort)__n" ( (type_descriptor "ushort" type_identifier) ) identifier)) ;) (if_statement "if (param_1 == 0x42) {\n    *(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;\n    *(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;\n    *(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }\n  else {\n    *(ushort *)(__s_00 + 2) = param_2;\n    *(ushort *)(__s_00 + 6) = uVar3;\n    *(ushort *)(__s_00 + 4) = param_3;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }" if (parenthesized_expression "(param_1 == 0x42)" ( (binary_expression "param_1 == 0x42" identifier == number_literal) )) (compound_statement "{\n    *(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;\n    *(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;\n    *(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }" { (expression_statement "*(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;" (assignment_expression "*(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8" (pointer_expression "*(ushort *)(__s_00 + 2)" * (cast_expression "(ushort *)(__s_00 + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s_00 + 2)" ( (binary_expression "__s_00 + 2" identifier + number_literal) )))) = (binary_expression "param_2 << 8 | param_2 >> 8" (binary_expression "param_2 << 8" identifier << number_literal) | (binary_expression "param_2 >> 8" identifier >> number_literal))) ;) (expression_statement "*(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;" (assignment_expression "*(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8" (pointer_expression "*(ushort *)(__s_00 + 4)" * (cast_expression "(ushort *)(__s_00 + 4)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s_00 + 4)" ( (binary_expression "__s_00 + 4" identifier + number_literal) )))) = (binary_expression "param_3 << 8 | param_3 >> 8" (binary_expression "param_3 << 8" identifier << number_literal) | (binary_expression "param_3 >> 8" identifier >> number_literal))) ;) (expression_statement "*(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "*(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8" (pointer_expression "*(ushort *)(__s_00 + 6)" * (cast_expression "(ushort *)(__s_00 + 6)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s_00 + 6)" ( (binary_expression "__s_00 + 6" identifier + number_literal) )))) = (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) (expression_statement "__s_00[8] = local_84;" (assignment_expression "__s_00[8] = local_84" (subscript_expression "__s_00[8]" identifier [ number_literal ]) = identifier) ;) (expression_statement "__s_00[9] = local_8c;" (assignment_expression "__s_00[9] = local_8c" (subscript_expression "__s_00[9]" identifier [ number_literal ]) = identifier) ;) }) (else_clause "else {\n    *(ushort *)(__s_00 + 2) = param_2;\n    *(ushort *)(__s_00 + 6) = uVar3;\n    *(ushort *)(__s_00 + 4) = param_3;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }" else (compound_statement "{\n    *(ushort *)(__s_00 + 2) = param_2;\n    *(ushort *)(__s_00 + 6) = uVar3;\n    *(ushort *)(__s_00 + 4) = param_3;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }" { (expression_statement "*(ushort *)(__s_00 + 2) = param_2;" (assignment_expression "*(ushort *)(__s_00 + 2) = param_2" (pointer_expression "*(ushort *)(__s_00 + 2)" * (cast_expression "(ushort *)(__s_00 + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s_00 + 2)" ( (binary_expression "__s_00 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(ushort *)(__s_00 + 6) = uVar3;" (assignment_expression "*(ushort *)(__s_00 + 6) = uVar3" (pointer_expression "*(ushort *)(__s_00 + 6)" * (cast_expression "(ushort *)(__s_00 + 6)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s_00 + 6)" ( (binary_expression "__s_00 + 6" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(ushort *)(__s_00 + 4) = param_3;" (assignment_expression "*(ushort *)(__s_00 + 4) = param_3" (pointer_expression "*(ushort *)(__s_00 + 4)" * (cast_expression "(ushort *)(__s_00 + 4)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s_00 + 4)" ( (binary_expression "__s_00 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "__s_00[8] = local_8c;" (assignment_expression "__s_00[8] = local_8c" (subscript_expression "__s_00[8]" identifier [ number_literal ]) = identifier) ;) (expression_statement "__s_00[9] = local_84;" (assignment_expression "__s_00[9] = local_84" (subscript_expression "__s_00[9]" identifier [ number_literal ]) = identifier) ;) }))) (expression_statement "memcpy(__s_00 + 0xc,__s,__n);" (call_expression "memcpy(__s_00 + 0xc,__s,__n)" identifier (argument_list "(__s_00 + 0xc,__s,__n)" ( (binary_expression "__s_00 + 0xc" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "memcpy(__s_00 + iVar1,local_a0,local_88);" (call_expression "memcpy(__s_00 + iVar1,local_a0,local_88)" identifier (argument_list "(__s_00 + iVar1,local_a0,local_88)" ( (binary_expression "__s_00 + iVar1" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "FUN_0001de10(local_9c,0x40);" (call_expression "FUN_0001de10(local_9c,0x40)" identifier (argument_list "(local_9c,0x40)" ( identifier , number_literal ))) ;) (expression_statement "*param_9 = __n_00;" (assignment_expression "*param_9 = __n_00" (pointer_expression "*param_9" * identifier) = identifier) ;) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return __s_00;\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    return __s_00;\n  }" { (return_statement "return __s_00;" return identifier ;) })) comment (expression_statement "FUN_0008eb20();" (call_expression "FUN_0008eb20()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid * x11_make_greeting(int endian,int protomajor,int protominor,int auth_proto,void *auth_data,\n                        int auth_len,char *peer_addr,int peer_port,int *outlen)\n\n{\n  int iVar1;\n  char *__s;\n  size_t __n;\n  int iVar2;\n  uint uVar3;\n  undefined1 *__s_00;\n  ushort uVar4;\n  uint uVar5;\n  undefined1 uVar6;\n  size_t n;\n  int in_GS_OFFSET;\n  uchar *local_a0;\n  uchar *local_9c;\n  undefined1 local_90;\n  undefined1 local_8c;\n  size_t local_88;\n  undefined1 local_84;\n  int i [4];\n  uchar realauthdata [64];\n  \n  local_a0 = (uchar *)auth_data;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = *(char **)(x11_authnames + auth_proto * 4);\n  __n = strlen(__s);\n  if (auth_proto == 1) {\n    local_8c = (undefined1)auth_len;\n    local_84 = (undefined1)((uint)auth_len >> 8);\n    local_88 = auth_len;\n    uVar5 = auth_len + 3U & 0xfffffffc;\n    goto LAB_0008de80;\n  }\n  if ((auth_proto != 2) || (auth_len != 0x10)) {\n    local_a0 = realauthdata;\n    local_88 = 0;\n    uVar5 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }\n  if (peer_addr == (char *)0x0) {\nLAB_0008dd92:\n    local_8c = 0;\n    uVar5 = 0;\n    uVar6 = 0;\n    local_90 = 0;\n  }\n  else {\n    iVar2 = __isoc99_sscanf(peer_addr,"%d.%d.%d.%d",i,i + 1,i + 2,i + 3);\n    if (iVar2 != 4) goto LAB_0008dd92;\n    uVar5 = i[0] << 0x18 | i[1] << 0x10 | i[3] | i[2] << 8;\n    uVar6 = (undefined1)(uVar5 >> 0x18);\n    local_90 = (undefined1)(uVar5 >> 0x10);\n    local_8c = (undefined1)(uVar5 >> 8);\n  }\n  local_a0 = realauthdata;\n                    /* WARNING: Load size is inaccurate */\n  realauthdata._0_4_ = *auth_data;\n  realauthdata._4_4_ = *(undefined4 *)((int)auth_data + 4);\n  realauthdata[0x16] = '\0';\n  realauthdata[0x17] = '\0';\n  realauthdata[0xe] = '\0';\n  realauthdata[0xf] = '\0';\n  realauthdata[0x10] = '\0';\n  realauthdata[0x11] = '\0';\n  realauthdata[0x12] = '\0';\n  realauthdata[0x13] = '\0';\n  realauthdata[0x14] = '\0';\n  realauthdata[0x15] = '\0';\n  realauthdata._8_4_ = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar6)) | uVar5 << 0x18;\n  uVar5 = 0x18;\n  realauthdata._12_2_ = (ushort)peer_port << 8 | (ushort)peer_port >> 8;\n  uVar3 = time((time_t *)0x0);\n  realauthdata._14_4_ =\n       uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;\n  des_encrypt_xdmauth((uchar *)((int)auth_data + 9),local_a0,0x18);\n  local_88 = 0x18;\n  local_84 = 0;\n  local_8c = 0x18;\nLAB_0008de80:\n  local_9c = realauthdata;\n  iVar2 = (__n + 3 & 0xfffffffc) + 0xc;\n  n = uVar5 + iVar2;\n  __s_00 = (undefined1 *)safemalloc(n,1);\n  memset(__s_00,0,n);\n  *__s_00 = (undefined1)endian;\n  uVar4 = (ushort)__n;\n  if (endian == 0x42) {\n    *(ushort *)(__s_00 + 2) = (ushort)protomajor << 8 | (ushort)protomajor >> 8;\n    *(ushort *)(__s_00 + 4) = (ushort)protominor << 8 | (ushort)protominor >> 8;\n    *(ushort *)(__s_00 + 6) = uVar4 << 8 | uVar4 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }\n  else {\n    *(ushort *)(__s_00 + 2) = (ushort)protomajor;\n    *(ushort *)(__s_00 + 6) = uVar4;\n    *(ushort *)(__s_00 + 4) = (ushort)protominor;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }\n  memcpy(__s_00 + 0xc,__s,__n);\n  memcpy(__s_00 + iVar2,local_a0,local_88);\n  smemclr(local_9c,0x40);\n  *outlen = n;\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return __s_00;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "void * x11_make_greeting(int endian,int protomajor,int protominor,int auth_proto,void *auth_data,\n                        int auth_len,char *peer_addr,int peer_port,int *outlen)\n\n{\n  int iVar1;\n  char *__s;\n  size_t __n;\n  int iVar2;\n  uint uVar3;\n  undefined1 *__s_00;\n  ushort uVar4;\n  uint uVar5;\n  undefined1 uVar6;\n  size_t n;\n  int in_GS_OFFSET;\n  uchar *local_a0;\n  uchar *local_9c;\n  undefined1 local_90;\n  undefined1 local_8c;\n  size_t local_88;\n  undefined1 local_84;\n  int i [4];\n  uchar realauthdata [64];\n  \n  local_a0 = (uchar *)auth_data;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = *(char **)(x11_authnames + auth_proto * 4);\n  __n = strlen(__s);\n  if (auth_proto == 1) {\n    local_8c = (undefined1)auth_len;\n    local_84 = (undefined1)((uint)auth_len >> 8);\n    local_88 = auth_len;\n    uVar5 = auth_len + 3U & 0xfffffffc;\n    goto LAB_0008de80;\n  }\n  if ((auth_proto != 2) || (auth_len != 0x10)) {\n    local_a0 = realauthdata;\n    local_88 = 0;\n    uVar5 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }\n  if (peer_addr == (char *)0x0) {\nLAB_0008dd92:\n    local_8c = 0;\n    uVar5 = 0;\n    uVar6 = 0;\n    local_90 = 0;\n  }\n  else {\n    iVar2 = __isoc99_sscanf(peer_addr,"%d.%d.%d.%d",i,i + 1,i + 2,i + 3);\n    if (iVar2 != 4) goto LAB_0008dd92;\n    uVar5 = i[0] << 0x18 | i[1] << 0x10 | i[3] | i[2] << 8;\n    uVar6 = (undefined1)(uVar5 >> 0x18);\n    local_90 = (undefined1)(uVar5 >> 0x10);\n    local_8c = (undefined1)(uVar5 >> 8);\n  }\n  local_a0 = realauthdata;\n                    /* WARNING: Load size is inaccurate */\n  realauthdata._0_4_ = *auth_data;\n  realauthdata._4_4_ = *(undefined4 *)((int)auth_data + 4);\n  realauthdata[0x16] = '\0';\n  realauthdata[0x17] = '\0';\n  realauthdata[0xe] = '\0';\n  realauthdata[0xf] = '\0';\n  realauthdata[0x10] = '\0';\n  realauthdata[0x11] = '\0';\n  realauthdata[0x12] = '\0';\n  realauthdata[0x13] = '\0';\n  realauthdata[0x14] = '\0';\n  realauthdata[0x15] = '\0';\n  realauthdata._8_4_ = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar6)) | uVar5 << 0x18;\n  uVar5 = 0x18;\n  realauthdata._12_2_ = (ushort)peer_port << 8 | (ushort)peer_port >> 8;\n  uVar3 = time((time_t *)0x0);\n  realauthdata._14_4_ =\n       uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;\n  des_encrypt_xdmauth((uchar *)((int)auth_data + 9),local_a0,0x18);\n  local_88 = 0x18;\n  local_84 = 0;\n  local_8c = 0x18;\nLAB_0008de80:\n  local_9c = realauthdata;\n  iVar2 = (__n + 3 & 0xfffffffc) + 0xc;\n  n = uVar5 + iVar2;\n  __s_00 = (undefined1 *)safemalloc(n,1);\n  memset(__s_00,0,n);\n  *__s_00 = (undefined1)endian;\n  uVar4 = (ushort)__n;\n  if (endian == 0x42) {\n    *(ushort *)(__s_00 + 2) = (ushort)protomajor << 8 | (ushort)protomajor >> 8;\n    *(ushort *)(__s_00 + 4) = (ushort)protominor << 8 | (ushort)protominor >> 8;\n    *(ushort *)(__s_00 + 6) = uVar4 << 8 | uVar4 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }\n  else {\n    *(ushort *)(__s_00 + 2) = (ushort)protomajor;\n    *(ushort *)(__s_00 + 6) = uVar4;\n    *(ushort *)(__s_00 + 4) = (ushort)protominor;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }\n  memcpy(__s_00 + 0xc,__s,__n);\n  memcpy(__s_00 + iVar2,local_a0,local_88);\n  smemclr(local_9c,0x40);\n  *outlen = n;\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return __s_00;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (pointer_declarator "* x11_make_greeting(int endian,int protomajor,int protominor,int auth_proto,void *auth_data,\n                        int auth_len,char *peer_addr,int peer_port,int *outlen)" * (function_declarator "x11_make_greeting(int endian,int protomajor,int protominor,int auth_proto,void *auth_data,\n                        int auth_len,char *peer_addr,int peer_port,int *outlen)" identifier (parameter_list "(int endian,int protomajor,int protominor,int auth_proto,void *auth_data,\n                        int auth_len,char *peer_addr,int peer_port,int *outlen)" ( (parameter_declaration "int endian" primitive_type identifier) , (parameter_declaration "int protomajor" primitive_type identifier) , (parameter_declaration "int protominor" primitive_type identifier) , (parameter_declaration "int auth_proto" primitive_type identifier) , (parameter_declaration "void *auth_data" primitive_type (pointer_declarator "*auth_data" * identifier)) , (parameter_declaration "int auth_len" primitive_type identifier) , (parameter_declaration "char *peer_addr" primitive_type (pointer_declarator "*peer_addr" * identifier)) , (parameter_declaration "int peer_port" primitive_type identifier) , (parameter_declaration "int *outlen" primitive_type (pointer_declarator "*outlen" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  char *__s;\n  size_t __n;\n  int iVar2;\n  uint uVar3;\n  undefined1 *__s_00;\n  ushort uVar4;\n  uint uVar5;\n  undefined1 uVar6;\n  size_t n;\n  int in_GS_OFFSET;\n  uchar *local_a0;\n  uchar *local_9c;\n  undefined1 local_90;\n  undefined1 local_8c;\n  size_t local_88;\n  undefined1 local_84;\n  int i [4];\n  uchar realauthdata [64];\n  \n  local_a0 = (uchar *)auth_data;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = *(char **)(x11_authnames + auth_proto * 4);\n  __n = strlen(__s);\n  if (auth_proto == 1) {\n    local_8c = (undefined1)auth_len;\n    local_84 = (undefined1)((uint)auth_len >> 8);\n    local_88 = auth_len;\n    uVar5 = auth_len + 3U & 0xfffffffc;\n    goto LAB_0008de80;\n  }\n  if ((auth_proto != 2) || (auth_len != 0x10)) {\n    local_a0 = realauthdata;\n    local_88 = 0;\n    uVar5 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }\n  if (peer_addr == (char *)0x0) {\nLAB_0008dd92:\n    local_8c = 0;\n    uVar5 = 0;\n    uVar6 = 0;\n    local_90 = 0;\n  }\n  else {\n    iVar2 = __isoc99_sscanf(peer_addr,"%d.%d.%d.%d",i,i + 1,i + 2,i + 3);\n    if (iVar2 != 4) goto LAB_0008dd92;\n    uVar5 = i[0] << 0x18 | i[1] << 0x10 | i[3] | i[2] << 8;\n    uVar6 = (undefined1)(uVar5 >> 0x18);\n    local_90 = (undefined1)(uVar5 >> 0x10);\n    local_8c = (undefined1)(uVar5 >> 8);\n  }\n  local_a0 = realauthdata;\n                    /* WARNING: Load size is inaccurate */\n  realauthdata._0_4_ = *auth_data;\n  realauthdata._4_4_ = *(undefined4 *)((int)auth_data + 4);\n  realauthdata[0x16] = '\0';\n  realauthdata[0x17] = '\0';\n  realauthdata[0xe] = '\0';\n  realauthdata[0xf] = '\0';\n  realauthdata[0x10] = '\0';\n  realauthdata[0x11] = '\0';\n  realauthdata[0x12] = '\0';\n  realauthdata[0x13] = '\0';\n  realauthdata[0x14] = '\0';\n  realauthdata[0x15] = '\0';\n  realauthdata._8_4_ = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar6)) | uVar5 << 0x18;\n  uVar5 = 0x18;\n  realauthdata._12_2_ = (ushort)peer_port << 8 | (ushort)peer_port >> 8;\n  uVar3 = time((time_t *)0x0);\n  realauthdata._14_4_ =\n       uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;\n  des_encrypt_xdmauth((uchar *)((int)auth_data + 9),local_a0,0x18);\n  local_88 = 0x18;\n  local_84 = 0;\n  local_8c = 0x18;\nLAB_0008de80:\n  local_9c = realauthdata;\n  iVar2 = (__n + 3 & 0xfffffffc) + 0xc;\n  n = uVar5 + iVar2;\n  __s_00 = (undefined1 *)safemalloc(n,1);\n  memset(__s_00,0,n);\n  *__s_00 = (undefined1)endian;\n  uVar4 = (ushort)__n;\n  if (endian == 0x42) {\n    *(ushort *)(__s_00 + 2) = (ushort)protomajor << 8 | (ushort)protomajor >> 8;\n    *(ushort *)(__s_00 + 4) = (ushort)protominor << 8 | (ushort)protominor >> 8;\n    *(ushort *)(__s_00 + 6) = uVar4 << 8 | uVar4 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }\n  else {\n    *(ushort *)(__s_00 + 2) = (ushort)protomajor;\n    *(ushort *)(__s_00 + 6) = uVar4;\n    *(ushort *)(__s_00 + 4) = (ushort)protominor;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }\n  memcpy(__s_00 + 0xc,__s,__n);\n  memcpy(__s_00 + iVar2,local_a0,local_88);\n  smemclr(local_9c,0x40);\n  *outlen = n;\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return __s_00;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined1 *__s_00;" type_identifier (pointer_declarator "*__s_00" * identifier) ;) (declaration "ushort uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "undefined1 uVar6;" type_identifier identifier ;) (declaration "size_t n;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uchar *local_a0;" type_identifier (pointer_declarator "*local_a0" * identifier) ;) (declaration "uchar *local_9c;" type_identifier (pointer_declarator "*local_9c" * identifier) ;) (declaration "undefined1 local_90;" type_identifier identifier ;) (declaration "undefined1 local_8c;" type_identifier identifier ;) (declaration "size_t local_88;" primitive_type identifier ;) (declaration "undefined1 local_84;" type_identifier identifier ;) (declaration "int i [4];" primitive_type (array_declarator "i [4]" identifier [ number_literal ]) ;) (declaration "uchar realauthdata [64];" type_identifier (array_declarator "realauthdata [64]" identifier [ number_literal ]) ;) (expression_statement "local_a0 = (uchar *)auth_data;" (assignment_expression "local_a0 = (uchar *)auth_data" identifier = (cast_expression "(uchar *)auth_data" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "__s = *(char **)(x11_authnames + auth_proto * 4);" (assignment_expression "__s = *(char **)(x11_authnames + auth_proto * 4)" identifier = (pointer_expression "*(char **)(x11_authnames + auth_proto * 4)" * (cast_expression "(char **)(x11_authnames + auth_proto * 4)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(x11_authnames + auth_proto * 4)" ( (binary_expression "x11_authnames + auth_proto * 4" identifier + (binary_expression "auth_proto * 4" identifier * number_literal)) ))))) ;) (expression_statement "__n = strlen(__s);" (assignment_expression "__n = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (if_statement "if (auth_proto == 1) {\n    local_8c = (undefined1)auth_len;\n    local_84 = (undefined1)((uint)auth_len >> 8);\n    local_88 = auth_len;\n    uVar5 = auth_len + 3U & 0xfffffffc;\n    goto LAB_0008de80;\n  }" if (parenthesized_expression "(auth_proto == 1)" ( (binary_expression "auth_proto == 1" identifier == number_literal) )) (compound_statement "{\n    local_8c = (undefined1)auth_len;\n    local_84 = (undefined1)((uint)auth_len >> 8);\n    local_88 = auth_len;\n    uVar5 = auth_len + 3U & 0xfffffffc;\n    goto LAB_0008de80;\n  }" { (expression_statement "local_8c = (undefined1)auth_len;" (assignment_expression "local_8c = (undefined1)auth_len" identifier = (cast_expression "(undefined1)auth_len" ( (type_descriptor "undefined1" type_identifier) ) identifier)) ;) (expression_statement "local_84 = (undefined1)((uint)auth_len >> 8);" (assignment_expression "local_84 = (undefined1)((uint)auth_len >> 8)" identifier = (call_expression "(undefined1)((uint)auth_len >> 8)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "((uint)auth_len >> 8)" ( (binary_expression "(uint)auth_len >> 8" (cast_expression "(uint)auth_len" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "local_88 = auth_len;" (assignment_expression "local_88 = auth_len" identifier = identifier) ;) (expression_statement "uVar5 = auth_len + 3U & 0xfffffffc;" (assignment_expression "uVar5 = auth_len + 3U & 0xfffffffc" identifier = (binary_expression "auth_len + 3U & 0xfffffffc" (binary_expression "auth_len + 3U" identifier + number_literal) & number_literal)) ;) (goto_statement "goto LAB_0008de80;" goto statement_identifier ;) })) (if_statement "if ((auth_proto != 2) || (auth_len != 0x10)) {\n    local_a0 = realauthdata;\n    local_88 = 0;\n    uVar5 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }" if (parenthesized_expression "((auth_proto != 2) || (auth_len != 0x10))" ( (binary_expression "(auth_proto != 2) || (auth_len != 0x10)" (parenthesized_expression "(auth_proto != 2)" ( (binary_expression "auth_proto != 2" identifier != number_literal) )) || (parenthesized_expression "(auth_len != 0x10)" ( (binary_expression "auth_len != 0x10" identifier != number_literal) ))) )) (compound_statement "{\n    local_a0 = realauthdata;\n    local_88 = 0;\n    uVar5 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }" { (expression_statement "local_a0 = realauthdata;" (assignment_expression "local_a0 = realauthdata" identifier = identifier) ;) (expression_statement "local_88 = 0;" (assignment_expression "local_88 = 0" identifier = number_literal) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (expression_statement "local_84 = 0;" (assignment_expression "local_84 = 0" identifier = number_literal) ;) (expression_statement "local_8c = 0;" (assignment_expression "local_8c = 0" identifier = number_literal) ;) (goto_statement "goto LAB_0008de80;" goto statement_identifier ;) })) (if_statement "if (peer_addr == (char *)0x0) {\nLAB_0008dd92:\n    local_8c = 0;\n    uVar5 = 0;\n    uVar6 = 0;\n    local_90 = 0;\n  }\n  else {\n    iVar2 = __isoc99_sscanf(peer_addr,"%d.%d.%d.%d",i,i + 1,i + 2,i + 3);\n    if (iVar2 != 4) goto LAB_0008dd92;\n    uVar5 = i[0] << 0x18 | i[1] << 0x10 | i[3] | i[2] << 8;\n    uVar6 = (undefined1)(uVar5 >> 0x18);\n    local_90 = (undefined1)(uVar5 >> 0x10);\n    local_8c = (undefined1)(uVar5 >> 8);\n  }" if (parenthesized_expression "(peer_addr == (char *)0x0)" ( (binary_expression "peer_addr == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_0008dd92:\n    local_8c = 0;\n    uVar5 = 0;\n    uVar6 = 0;\n    local_90 = 0;\n  }" { (labeled_statement "LAB_0008dd92:\n    local_8c = 0;" statement_identifier : (expression_statement "local_8c = 0;" (assignment_expression "local_8c = 0" identifier = number_literal) ;)) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (expression_statement "local_90 = 0;" (assignment_expression "local_90 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar2 = __isoc99_sscanf(peer_addr,"%d.%d.%d.%d",i,i + 1,i + 2,i + 3);\n    if (iVar2 != 4) goto LAB_0008dd92;\n    uVar5 = i[0] << 0x18 | i[1] << 0x10 | i[3] | i[2] << 8;\n    uVar6 = (undefined1)(uVar5 >> 0x18);\n    local_90 = (undefined1)(uVar5 >> 0x10);\n    local_8c = (undefined1)(uVar5 >> 8);\n  }" else (compound_statement "{\n    iVar2 = __isoc99_sscanf(peer_addr,"%d.%d.%d.%d",i,i + 1,i + 2,i + 3);\n    if (iVar2 != 4) goto LAB_0008dd92;\n    uVar5 = i[0] << 0x18 | i[1] << 0x10 | i[3] | i[2] << 8;\n    uVar6 = (undefined1)(uVar5 >> 0x18);\n    local_90 = (undefined1)(uVar5 >> 0x10);\n    local_8c = (undefined1)(uVar5 >> 8);\n  }" { (expression_statement "iVar2 = __isoc99_sscanf(peer_addr,"%d.%d.%d.%d",i,i + 1,i + 2,i + 3);" (assignment_expression "iVar2 = __isoc99_sscanf(peer_addr,"%d.%d.%d.%d",i,i + 1,i + 2,i + 3)" identifier = (call_expression "__isoc99_sscanf(peer_addr,"%d.%d.%d.%d",i,i + 1,i + 2,i + 3)" identifier (argument_list "(peer_addr,"%d.%d.%d.%d",i,i + 1,i + 2,i + 3)" ( identifier , (string_literal ""%d.%d.%d.%d"" " string_content ") , identifier , (binary_expression "i + 1" identifier + number_literal) , (binary_expression "i + 2" identifier + number_literal) , (binary_expression "i + 3" identifier + number_literal) )))) ;) (if_statement "if (iVar2 != 4) goto LAB_0008dd92;" if (parenthesized_expression "(iVar2 != 4)" ( (binary_expression "iVar2 != 4" identifier != number_literal) )) (goto_statement "goto LAB_0008dd92;" goto statement_identifier ;)) (expression_statement "uVar5 = i[0] << 0x18 | i[1] << 0x10 | i[3] | i[2] << 8;" (assignment_expression "uVar5 = i[0] << 0x18 | i[1] << 0x10 | i[3] | i[2] << 8" identifier = (binary_expression "i[0] << 0x18 | i[1] << 0x10 | i[3] | i[2] << 8" (binary_expression "i[0] << 0x18 | i[1] << 0x10 | i[3]" (binary_expression "i[0] << 0x18 | i[1] << 0x10" (binary_expression "i[0] << 0x18" (subscript_expression "i[0]" identifier [ number_literal ]) << number_literal) | (binary_expression "i[1] << 0x10" (subscript_expression "i[1]" identifier [ number_literal ]) << number_literal)) | (subscript_expression "i[3]" identifier [ number_literal ])) | (binary_expression "i[2] << 8" (subscript_expression "i[2]" identifier [ number_literal ]) << number_literal))) ;) (expression_statement "uVar6 = (undefined1)(uVar5 >> 0x18);" (assignment_expression "uVar6 = (undefined1)(uVar5 >> 0x18)" identifier = (call_expression "(undefined1)(uVar5 >> 0x18)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "(uVar5 >> 0x18)" ( (binary_expression "uVar5 >> 0x18" identifier >> number_literal) )))) ;) (expression_statement "local_90 = (undefined1)(uVar5 >> 0x10);" (assignment_expression "local_90 = (undefined1)(uVar5 >> 0x10)" identifier = (call_expression "(undefined1)(uVar5 >> 0x10)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "(uVar5 >> 0x10)" ( (binary_expression "uVar5 >> 0x10" identifier >> number_literal) )))) ;) (expression_statement "local_8c = (undefined1)(uVar5 >> 8);" (assignment_expression "local_8c = (undefined1)(uVar5 >> 8)" identifier = (call_expression "(undefined1)(uVar5 >> 8)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "(uVar5 >> 8)" ( (binary_expression "uVar5 >> 8" identifier >> number_literal) )))) ;) }))) (expression_statement "local_a0 = realauthdata;" (assignment_expression "local_a0 = realauthdata" identifier = identifier) ;) comment (expression_statement "realauthdata._0_4_ = *auth_data;" (assignment_expression "realauthdata._0_4_ = *auth_data" (field_expression "realauthdata._0_4_" identifier . field_identifier) = (pointer_expression "*auth_data" * identifier)) ;) (expression_statement "realauthdata._4_4_ = *(undefined4 *)((int)auth_data + 4);" (assignment_expression "realauthdata._4_4_ = *(undefined4 *)((int)auth_data + 4)" (field_expression "realauthdata._4_4_" identifier . field_identifier) = (pointer_expression "*(undefined4 *)((int)auth_data + 4)" * (cast_expression "(undefined4 *)((int)auth_data + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)auth_data + 4)" ( (binary_expression "(int)auth_data + 4" (cast_expression "(int)auth_data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (expression_statement "realauthdata[0x16] = '\0';" (assignment_expression "realauthdata[0x16] = '\0'" (subscript_expression "realauthdata[0x16]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "realauthdata[0x17] = '\0';" (assignment_expression "realauthdata[0x17] = '\0'" (subscript_expression "realauthdata[0x17]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "realauthdata[0xe] = '\0';" (assignment_expression "realauthdata[0xe] = '\0'" (subscript_expression "realauthdata[0xe]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "realauthdata[0xf] = '\0';" (assignment_expression "realauthdata[0xf] = '\0'" (subscript_expression "realauthdata[0xf]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "realauthdata[0x10] = '\0';" (assignment_expression "realauthdata[0x10] = '\0'" (subscript_expression "realauthdata[0x10]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "realauthdata[0x11] = '\0';" (assignment_expression "realauthdata[0x11] = '\0'" (subscript_expression "realauthdata[0x11]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "realauthdata[0x12] = '\0';" (assignment_expression "realauthdata[0x12] = '\0'" (subscript_expression "realauthdata[0x12]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "realauthdata[0x13] = '\0';" (assignment_expression "realauthdata[0x13] = '\0'" (subscript_expression "realauthdata[0x13]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "realauthdata[0x14] = '\0';" (assignment_expression "realauthdata[0x14] = '\0'" (subscript_expression "realauthdata[0x14]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "realauthdata[0x15] = '\0';" (assignment_expression "realauthdata[0x15] = '\0'" (subscript_expression "realauthdata[0x15]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "realauthdata._8_4_ = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar6)) | uVar5 << 0x18;" (assignment_expression "realauthdata._8_4_ = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar6)) | uVar5 << 0x18" (field_expression "realauthdata._8_4_" identifier . field_identifier) = (binary_expression "(uint)CONCAT12(local_8c,CONCAT11(local_90,uVar6)) | uVar5 << 0x18" (cast_expression "(uint)CONCAT12(local_8c,CONCAT11(local_90,uVar6))" ( (type_descriptor "uint" type_identifier) ) (call_expression "CONCAT12(local_8c,CONCAT11(local_90,uVar6))" identifier (argument_list "(local_8c,CONCAT11(local_90,uVar6))" ( identifier , (call_expression "CONCAT11(local_90,uVar6)" identifier (argument_list "(local_90,uVar6)" ( identifier , identifier ))) )))) | (binary_expression "uVar5 << 0x18" identifier << number_literal))) ;) (expression_statement "uVar5 = 0x18;" (assignment_expression "uVar5 = 0x18" identifier = number_literal) ;) (expression_statement "realauthdata._12_2_ = (ushort)peer_port << 8 | (ushort)peer_port >> 8;" (assignment_expression "realauthdata._12_2_ = (ushort)peer_port << 8 | (ushort)peer_port >> 8" (field_expression "realauthdata._12_2_" identifier . field_identifier) = (binary_expression "(ushort)peer_port << 8 | (ushort)peer_port >> 8" (binary_expression "(ushort)peer_port << 8" (cast_expression "(ushort)peer_port" ( (type_descriptor "ushort" type_identifier) ) identifier) << number_literal) | (binary_expression "(ushort)peer_port >> 8" (cast_expression "(ushort)peer_port" ( (type_descriptor "ushort" type_identifier) ) identifier) >> number_literal))) ;) (expression_statement "uVar3 = time((time_t *)0x0);" (assignment_expression "uVar3 = time((time_t *)0x0)" identifier = (call_expression "time((time_t *)0x0)" identifier (argument_list "((time_t *)0x0)" ( (cast_expression "(time_t *)0x0" ( (type_descriptor "time_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "realauthdata._14_4_ =\n       uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;" (assignment_expression "realauthdata._14_4_ =\n       uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18" (field_expression "realauthdata._14_4_" identifier . field_identifier) = (binary_expression "uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18" (binary_expression "uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8" (binary_expression "uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8" (binary_expression "uVar3 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar3 & 0xff0000) >> 8" (parenthesized_expression "(uVar3 & 0xff0000)" ( (binary_expression "uVar3 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar3 & 0xff00) << 8" (parenthesized_expression "(uVar3 & 0xff00)" ( (binary_expression "uVar3 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar3 << 0x18" identifier << number_literal))) ;) (expression_statement "des_encrypt_xdmauth((uchar *)((int)auth_data + 9),local_a0,0x18);" (call_expression "des_encrypt_xdmauth((uchar *)((int)auth_data + 9),local_a0,0x18)" identifier (argument_list "((uchar *)((int)auth_data + 9),local_a0,0x18)" ( (cast_expression "(uchar *)((int)auth_data + 9)" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)auth_data + 9)" ( (binary_expression "(int)auth_data + 9" (cast_expression "(int)auth_data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) , identifier , number_literal ))) ;) (expression_statement "local_88 = 0x18;" (assignment_expression "local_88 = 0x18" identifier = number_literal) ;) (expression_statement "local_84 = 0;" (assignment_expression "local_84 = 0" identifier = number_literal) ;) (expression_statement "local_8c = 0x18;" (assignment_expression "local_8c = 0x18" identifier = number_literal) ;) (labeled_statement "LAB_0008de80:\n  local_9c = realauthdata;" statement_identifier : (expression_statement "local_9c = realauthdata;" (assignment_expression "local_9c = realauthdata" identifier = identifier) ;)) (expression_statement "iVar2 = (__n + 3 & 0xfffffffc) + 0xc;" (assignment_expression "iVar2 = (__n + 3 & 0xfffffffc) + 0xc" identifier = (binary_expression "(__n + 3 & 0xfffffffc) + 0xc" (parenthesized_expression "(__n + 3 & 0xfffffffc)" ( (binary_expression "__n + 3 & 0xfffffffc" (binary_expression "__n + 3" identifier + number_literal) & number_literal) )) + number_literal)) ;) (expression_statement "n = uVar5 + iVar2;" (assignment_expression "n = uVar5 + iVar2" identifier = (binary_expression "uVar5 + iVar2" identifier + identifier)) ;) (expression_statement "__s_00 = (undefined1 *)safemalloc(n,1);" (assignment_expression "__s_00 = (undefined1 *)safemalloc(n,1)" identifier = (cast_expression "(undefined1 *)safemalloc(n,1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(n,1)" identifier (argument_list "(n,1)" ( identifier , number_literal ))))) ;) (expression_statement "memset(__s_00,0,n);" (call_expression "memset(__s_00,0,n)" identifier (argument_list "(__s_00,0,n)" ( identifier , number_literal , identifier ))) ;) (expression_statement "*__s_00 = (undefined1)endian;" (assignment_expression "*__s_00 = (undefined1)endian" (pointer_expression "*__s_00" * identifier) = (cast_expression "(undefined1)endian" ( (type_descriptor "undefined1" type_identifier) ) identifier)) ;) (expression_statement "uVar4 = (ushort)__n;" (assignment_expression "uVar4 = (ushort)__n" identifier = (cast_expression "(ushort)__n" ( (type_descriptor "ushort" type_identifier) ) identifier)) ;) (if_statement "if (endian == 0x42) {\n    *(ushort *)(__s_00 + 2) = (ushort)protomajor << 8 | (ushort)protomajor >> 8;\n    *(ushort *)(__s_00 + 4) = (ushort)protominor << 8 | (ushort)protominor >> 8;\n    *(ushort *)(__s_00 + 6) = uVar4 << 8 | uVar4 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }\n  else {\n    *(ushort *)(__s_00 + 2) = (ushort)protomajor;\n    *(ushort *)(__s_00 + 6) = uVar4;\n    *(ushort *)(__s_00 + 4) = (ushort)protominor;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }" if (parenthesized_expression "(endian == 0x42)" ( (binary_expression "endian == 0x42" identifier == number_literal) )) (compound_statement "{\n    *(ushort *)(__s_00 + 2) = (ushort)protomajor << 8 | (ushort)protomajor >> 8;\n    *(ushort *)(__s_00 + 4) = (ushort)protominor << 8 | (ushort)protominor >> 8;\n    *(ushort *)(__s_00 + 6) = uVar4 << 8 | uVar4 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }" { (expression_statement "*(ushort *)(__s_00 + 2) = (ushort)protomajor << 8 | (ushort)protomajor >> 8;" (assignment_expression "*(ushort *)(__s_00 + 2) = (ushort)protomajor << 8 | (ushort)protomajor >> 8" (pointer_expression "*(ushort *)(__s_00 + 2)" * (cast_expression "(ushort *)(__s_00 + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s_00 + 2)" ( (binary_expression "__s_00 + 2" identifier + number_literal) )))) = (binary_expression "(ushort)protomajor << 8 | (ushort)protomajor >> 8" (binary_expression "(ushort)protomajor << 8" (cast_expression "(ushort)protomajor" ( (type_descriptor "ushort" type_identifier) ) identifier) << number_literal) | (binary_expression "(ushort)protomajor >> 8" (cast_expression "(ushort)protomajor" ( (type_descriptor "ushort" type_identifier) ) identifier) >> number_literal))) ;) (expression_statement "*(ushort *)(__s_00 + 4) = (ushort)protominor << 8 | (ushort)protominor >> 8;" (assignment_expression "*(ushort *)(__s_00 + 4) = (ushort)protominor << 8 | (ushort)protominor >> 8" (pointer_expression "*(ushort *)(__s_00 + 4)" * (cast_expression "(ushort *)(__s_00 + 4)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s_00 + 4)" ( (binary_expression "__s_00 + 4" identifier + number_literal) )))) = (binary_expression "(ushort)protominor << 8 | (ushort)protominor >> 8" (binary_expression "(ushort)protominor << 8" (cast_expression "(ushort)protominor" ( (type_descriptor "ushort" type_identifier) ) identifier) << number_literal) | (binary_expression "(ushort)protominor >> 8" (cast_expression "(ushort)protominor" ( (type_descriptor "ushort" type_identifier) ) identifier) >> number_literal))) ;) (expression_statement "*(ushort *)(__s_00 + 6) = uVar4 << 8 | uVar4 >> 8;" (assignment_expression "*(ushort *)(__s_00 + 6) = uVar4 << 8 | uVar4 >> 8" (pointer_expression "*(ushort *)(__s_00 + 6)" * (cast_expression "(ushort *)(__s_00 + 6)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s_00 + 6)" ( (binary_expression "__s_00 + 6" identifier + number_literal) )))) = (binary_expression "uVar4 << 8 | uVar4 >> 8" (binary_expression "uVar4 << 8" identifier << number_literal) | (binary_expression "uVar4 >> 8" identifier >> number_literal))) ;) (expression_statement "__s_00[8] = local_84;" (assignment_expression "__s_00[8] = local_84" (subscript_expression "__s_00[8]" identifier [ number_literal ]) = identifier) ;) (expression_statement "__s_00[9] = local_8c;" (assignment_expression "__s_00[9] = local_8c" (subscript_expression "__s_00[9]" identifier [ number_literal ]) = identifier) ;) }) (else_clause "else {\n    *(ushort *)(__s_00 + 2) = (ushort)protomajor;\n    *(ushort *)(__s_00 + 6) = uVar4;\n    *(ushort *)(__s_00 + 4) = (ushort)protominor;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }" else (compound_statement "{\n    *(ushort *)(__s_00 + 2) = (ushort)protomajor;\n    *(ushort *)(__s_00 + 6) = uVar4;\n    *(ushort *)(__s_00 + 4) = (ushort)protominor;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }" { (expression_statement "*(ushort *)(__s_00 + 2) = (ushort)protomajor;" (assignment_expression "*(ushort *)(__s_00 + 2) = (ushort)protomajor" (pointer_expression "*(ushort *)(__s_00 + 2)" * (cast_expression "(ushort *)(__s_00 + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s_00 + 2)" ( (binary_expression "__s_00 + 2" identifier + number_literal) )))) = (cast_expression "(ushort)protomajor" ( (type_descriptor "ushort" type_identifier) ) identifier)) ;) (expression_statement "*(ushort *)(__s_00 + 6) = uVar4;" (assignment_expression "*(ushort *)(__s_00 + 6) = uVar4" (pointer_expression "*(ushort *)(__s_00 + 6)" * (cast_expression "(ushort *)(__s_00 + 6)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s_00 + 6)" ( (binary_expression "__s_00 + 6" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(ushort *)(__s_00 + 4) = (ushort)protominor;" (assignment_expression "*(ushort *)(__s_00 + 4) = (ushort)protominor" (pointer_expression "*(ushort *)(__s_00 + 4)" * (cast_expression "(ushort *)(__s_00 + 4)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s_00 + 4)" ( (binary_expression "__s_00 + 4" identifier + number_literal) )))) = (cast_expression "(ushort)protominor" ( (type_descriptor "ushort" type_identifier) ) identifier)) ;) (expression_statement "__s_00[8] = local_8c;" (assignment_expression "__s_00[8] = local_8c" (subscript_expression "__s_00[8]" identifier [ number_literal ]) = identifier) ;) (expression_statement "__s_00[9] = local_84;" (assignment_expression "__s_00[9] = local_84" (subscript_expression "__s_00[9]" identifier [ number_literal ]) = identifier) ;) }))) (expression_statement "memcpy(__s_00 + 0xc,__s,__n);" (call_expression "memcpy(__s_00 + 0xc,__s,__n)" identifier (argument_list "(__s_00 + 0xc,__s,__n)" ( (binary_expression "__s_00 + 0xc" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "memcpy(__s_00 + iVar2,local_a0,local_88);" (call_expression "memcpy(__s_00 + iVar2,local_a0,local_88)" identifier (argument_list "(__s_00 + iVar2,local_a0,local_88)" ( (binary_expression "__s_00 + iVar2" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "smemclr(local_9c,0x40);" (call_expression "smemclr(local_9c,0x40)" identifier (argument_list "(local_9c,0x40)" ( identifier , number_literal ))) ;) (expression_statement "*outlen = n;" (assignment_expression "*outlen = n" (pointer_expression "*outlen" * identifier) = identifier) ;) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return __s_00;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return __s_00;\n  }" { (return_statement "return __s_00;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "undefined1 *\nFUN_0008dcd0(int param_1,ushort param_2,ushort param_3,int param_4,undefined4 *param_5,\n            size_t param_6,int param_7,ushort param_8,size_t *param_9)\n\n{\n  char *__s;\n  size_t __n;\n  int iVar1;\n  uint uVar2;\n  undefined1 *__s_00;\n  ushort uVar3;\n  uint uVar4;\n  undefined1 uVar5;\n  size_t __n_00;\n  int in_GS_OFFSET;\n  undefined4 *local_a0;\n  undefined4 *local_9c;\n  undefined1 local_90;\n  undefined1 local_8c;\n  size_t local_88;\n  undefined1 local_84;\n  int local_70;\n  int local_6c;\n  int local_68;\n  uint local_64;\n  undefined4 local_60;\n  undefined4 local_5c;\n  uint local_58;\n  ushort local_54;\n  uint local_52;\n  undefined4 local_4e;\n  undefined2 local_4a;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x8dcd9;\n  local_a0 = param_5;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = (&PTR_DAT_000cfb2c)[param_4];\n  __n = strlen(__s);\n  if (param_4 == 1) {\n    local_8c = (undefined1)param_6;\n    local_84 = (undefined1)(param_6 >> 8);\n    local_88 = param_6;\n    uVar4 = param_6 + 3 & 0xfffffffc;\n    goto LAB_0008de80;\n  }\n  if ((param_4 != 2) || (param_6 != 0x10)) {\n    local_a0 = &local_60;\n    local_88 = 0;\n    uVar4 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }\n  if (param_7 == 0) {\nLAB_0008dd92:\n    local_8c = 0;\n    uVar4 = 0;\n    uVar5 = 0;\n    local_90 = 0;\n  }\n  else {\n    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);\n    if (iVar1 != 4) goto LAB_0008dd92;\n    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;\n    uVar5 = (undefined1)(uVar4 >> 0x18);\n    local_90 = (undefined1)(uVar4 >> 0x10);\n    local_8c = (undefined1)(uVar4 >> 8);\n  }\n  local_a0 = &local_60;\n  local_60 = *param_5;\n  local_5c = param_5[1];\n  local_4a = 0;\n  local_52 = 0;\n  local_4e = 0;\n  local_58 = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18;\n  uVar4 = 0x18;\n  local_54 = param_8 << 8 | param_8 >> 8;\n  uVar2 = time((time_t *)0x0);\n  local_52 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n  FUN_0005f8c0((int)param_5 + 9,local_a0,0x18);\n  local_88 = 0x18;\n  local_84 = 0;\n  local_8c = 0x18;\nLAB_0008de80:\n  local_9c = &local_60;\n  iVar1 = (__n + 3 & 0xfffffffc) + 0xc;\n  __n_00 = uVar4 + iVar1;\n  __s_00 = (undefined1 *)FUN_0001db90(__n_00,1);\n  memset(__s_00,0,__n_00);\n  *__s_00 = (undefined1)param_1;\n  uVar3 = (ushort)__n;\n  if (param_1 == 0x42) {\n    *(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;\n    *(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;\n    *(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }\n  else {\n    *(ushort *)(__s_00 + 2) = param_2;\n    *(ushort *)(__s_00 + 6) = uVar3;\n    *(ushort *)(__s_00 + 4) = param_3;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }\n  memcpy(__s_00 + 0xc,__s,__n);\n  memcpy(__s_00 + iVar1,local_a0,local_88);\n  FUN_0001de10(local_9c,0x40);\n  *param_9 = __n_00;\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return __s_00;\n  }\n                    \n  FUN_0008eb20();\n}\n\n" (function_definition "undefined1 *\nFUN_0008dcd0(int param_1,ushort param_2,ushort param_3,int param_4,undefined4 *param_5,\n            size_t param_6,int param_7,ushort param_8,size_t *param_9)\n\n{\n  char *__s;\n  size_t __n;\n  int iVar1;\n  uint uVar2;\n  undefined1 *__s_00;\n  ushort uVar3;\n  uint uVar4;\n  undefined1 uVar5;\n  size_t __n_00;\n  int in_GS_OFFSET;\n  undefined4 *local_a0;\n  undefined4 *local_9c;\n  undefined1 local_90;\n  undefined1 local_8c;\n  size_t local_88;\n  undefined1 local_84;\n  int local_70;\n  int local_6c;\n  int local_68;\n  uint local_64;\n  undefined4 local_60;\n  undefined4 local_5c;\n  uint local_58;\n  ushort local_54;\n  uint local_52;\n  undefined4 local_4e;\n  undefined2 local_4a;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x8dcd9;\n  local_a0 = param_5;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = (&PTR_DAT_000cfb2c)[param_4];\n  __n = strlen(__s);\n  if (param_4 == 1) {\n    local_8c = (undefined1)param_6;\n    local_84 = (undefined1)(param_6 >> 8);\n    local_88 = param_6;\n    uVar4 = param_6 + 3 & 0xfffffffc;\n    goto LAB_0008de80;\n  }\n  if ((param_4 != 2) || (param_6 != 0x10)) {\n    local_a0 = &local_60;\n    local_88 = 0;\n    uVar4 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }\n  if (param_7 == 0) {\nLAB_0008dd92:\n    local_8c = 0;\n    uVar4 = 0;\n    uVar5 = 0;\n    local_90 = 0;\n  }\n  else {\n    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);\n    if (iVar1 != 4) goto LAB_0008dd92;\n    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;\n    uVar5 = (undefined1)(uVar4 >> 0x18);\n    local_90 = (undefined1)(uVar4 >> 0x10);\n    local_8c = (undefined1)(uVar4 >> 8);\n  }\n  local_a0 = &local_60;\n  local_60 = *param_5;\n  local_5c = param_5[1];\n  local_4a = 0;\n  local_52 = 0;\n  local_4e = 0;\n  local_58 = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18;\n  uVar4 = 0x18;\n  local_54 = param_8 << 8 | param_8 >> 8;\n  uVar2 = time((time_t *)0x0);\n  local_52 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n  FUN_0005f8c0((int)param_5 + 9,local_a0,0x18);\n  local_88 = 0x18;\n  local_84 = 0;\n  local_8c = 0x18;\nLAB_0008de80:\n  local_9c = &local_60;\n  iVar1 = (__n + 3 & 0xfffffffc) + 0xc;\n  __n_00 = uVar4 + iVar1;\n  __s_00 = (undefined1 *)FUN_0001db90(__n_00,1);\n  memset(__s_00,0,__n_00);\n  *__s_00 = (undefined1)param_1;\n  uVar3 = (ushort)__n;\n  if (param_1 == 0x42) {\n    *(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;\n    *(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;\n    *(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }\n  else {\n    *(ushort *)(__s_00 + 2) = param_2;\n    *(ushort *)(__s_00 + 6) = uVar3;\n    *(ushort *)(__s_00 + 4) = param_3;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }\n  memcpy(__s_00 + 0xc,__s,__n);\n  memcpy(__s_00 + iVar1,local_a0,local_88);\n  FUN_0001de10(local_9c,0x40);\n  *param_9 = __n_00;\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return __s_00;\n  }\n                    \n  FUN_0008eb20();\n}" type_identifier (pointer_declarator "*\nFUN_0008dcd0(int param_1,ushort param_2,ushort param_3,int param_4,undefined4 *param_5,\n            size_t param_6,int param_7,ushort param_8,size_t *param_9)" * (function_declarator "FUN_0008dcd0(int param_1,ushort param_2,ushort param_3,int param_4,undefined4 *param_5,\n            size_t param_6,int param_7,ushort param_8,size_t *param_9)" identifier (parameter_list "(int param_1,ushort param_2,ushort param_3,int param_4,undefined4 *param_5,\n            size_t param_6,int param_7,ushort param_8,size_t *param_9)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "ushort param_2" type_identifier identifier) , (parameter_declaration "ushort param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "undefined4 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "size_t param_6" primitive_type identifier) , (parameter_declaration "int param_7" primitive_type identifier) , (parameter_declaration "ushort param_8" type_identifier identifier) , (parameter_declaration "size_t *param_9" primitive_type (pointer_declarator "*param_9" * identifier)) )))) (compound_statement "{\n  char *__s;\n  size_t __n;\n  int iVar1;\n  uint uVar2;\n  undefined1 *__s_00;\n  ushort uVar3;\n  uint uVar4;\n  undefined1 uVar5;\n  size_t __n_00;\n  int in_GS_OFFSET;\n  undefined4 *local_a0;\n  undefined4 *local_9c;\n  undefined1 local_90;\n  undefined1 local_8c;\n  size_t local_88;\n  undefined1 local_84;\n  int local_70;\n  int local_6c;\n  int local_68;\n  uint local_64;\n  undefined4 local_60;\n  undefined4 local_5c;\n  uint local_58;\n  ushort local_54;\n  uint local_52;\n  undefined4 local_4e;\n  undefined2 local_4a;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x8dcd9;\n  local_a0 = param_5;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = (&PTR_DAT_000cfb2c)[param_4];\n  __n = strlen(__s);\n  if (param_4 == 1) {\n    local_8c = (undefined1)param_6;\n    local_84 = (undefined1)(param_6 >> 8);\n    local_88 = param_6;\n    uVar4 = param_6 + 3 & 0xfffffffc;\n    goto LAB_0008de80;\n  }\n  if ((param_4 != 2) || (param_6 != 0x10)) {\n    local_a0 = &local_60;\n    local_88 = 0;\n    uVar4 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }\n  if (param_7 == 0) {\nLAB_0008dd92:\n    local_8c = 0;\n    uVar4 = 0;\n    uVar5 = 0;\n    local_90 = 0;\n  }\n  else {\n    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);\n    if (iVar1 != 4) goto LAB_0008dd92;\n    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;\n    uVar5 = (undefined1)(uVar4 >> 0x18);\n    local_90 = (undefined1)(uVar4 >> 0x10);\n    local_8c = (undefined1)(uVar4 >> 8);\n  }\n  local_a0 = &local_60;\n  local_60 = *param_5;\n  local_5c = param_5[1];\n  local_4a = 0;\n  local_52 = 0;\n  local_4e = 0;\n  local_58 = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18;\n  uVar4 = 0x18;\n  local_54 = param_8 << 8 | param_8 >> 8;\n  uVar2 = time((time_t *)0x0);\n  local_52 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n  FUN_0005f8c0((int)param_5 + 9,local_a0,0x18);\n  local_88 = 0x18;\n  local_84 = 0;\n  local_8c = 0x18;\nLAB_0008de80:\n  local_9c = &local_60;\n  iVar1 = (__n + 3 & 0xfffffffc) + 0xc;\n  __n_00 = uVar4 + iVar1;\n  __s_00 = (undefined1 *)FUN_0001db90(__n_00,1);\n  memset(__s_00,0,__n_00);\n  *__s_00 = (undefined1)param_1;\n  uVar3 = (ushort)__n;\n  if (param_1 == 0x42) {\n    *(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;\n    *(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;\n    *(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }\n  else {\n    *(ushort *)(__s_00 + 2) = param_2;\n    *(ushort *)(__s_00 + 6) = uVar3;\n    *(ushort *)(__s_00 + 4) = param_3;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }\n  memcpy(__s_00 + 0xc,__s,__n);\n  memcpy(__s_00 + iVar1,local_a0,local_88);\n  FUN_0001de10(local_9c,0x40);\n  *param_9 = __n_00;\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return __s_00;\n  }\n                    \n  FUN_0008eb20();\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "undefined1 *__s_00;" type_identifier (pointer_declarator "*__s_00" * identifier) ;) (declaration "ushort uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "undefined1 uVar5;" type_identifier identifier ;) (declaration "size_t __n_00;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 *local_a0;" type_identifier (pointer_declarator "*local_a0" * identifier) ;) (declaration "undefined4 *local_9c;" type_identifier (pointer_declarator "*local_9c" * identifier) ;) (declaration "undefined1 local_90;" type_identifier identifier ;) (declaration "undefined1 local_8c;" type_identifier identifier ;) (declaration "size_t local_88;" primitive_type identifier ;) (declaration "undefined1 local_84;" type_identifier identifier ;) (declaration "int local_70;" primitive_type identifier ;) (declaration "int local_6c;" primitive_type identifier ;) (declaration "int local_68;" primitive_type identifier ;) (declaration "uint local_64;" type_identifier identifier ;) (declaration "undefined4 local_60;" type_identifier identifier ;) (declaration "undefined4 local_5c;" type_identifier identifier ;) (declaration "uint local_58;" type_identifier identifier ;) (declaration "ushort local_54;" type_identifier identifier ;) (declaration "uint local_52;" type_identifier identifier ;) (declaration "undefined4 local_4e;" type_identifier identifier ;) (declaration "undefined2 local_4a;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x8dcd9;" (assignment_expression "uStack_14 = 0x8dcd9" identifier = number_literal) ;) (expression_statement "local_a0 = param_5;" (assignment_expression "local_a0 = param_5" identifier = 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 "__s = (&PTR_DAT_000cfb2c)[param_4];" (assignment_expression "__s = (&PTR_DAT_000cfb2c)[param_4]" identifier = (subscript_expression "(&PTR_DAT_000cfb2c)[param_4]" (parenthesized_expression "(&PTR_DAT_000cfb2c)" ( (pointer_expression "&PTR_DAT_000cfb2c" & identifier) )) [ identifier ])) ;) (expression_statement "__n = strlen(__s);" (assignment_expression "__n = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (if_statement "if (param_4 == 1) {\n    local_8c = (undefined1)param_6;\n    local_84 = (undefined1)(param_6 >> 8);\n    local_88 = param_6;\n    uVar4 = param_6 + 3 & 0xfffffffc;\n    goto LAB_0008de80;\n  }" if (parenthesized_expression "(param_4 == 1)" ( (binary_expression "param_4 == 1" identifier == number_literal) )) (compound_statement "{\n    local_8c = (undefined1)param_6;\n    local_84 = (undefined1)(param_6 >> 8);\n    local_88 = param_6;\n    uVar4 = param_6 + 3 & 0xfffffffc;\n    goto LAB_0008de80;\n  }" { (expression_statement "local_8c = (undefined1)param_6;" (assignment_expression "local_8c = (undefined1)param_6" identifier = (cast_expression "(undefined1)param_6" ( (type_descriptor "undefined1" type_identifier) ) identifier)) ;) (expression_statement "local_84 = (undefined1)(param_6 >> 8);" (assignment_expression "local_84 = (undefined1)(param_6 >> 8)" identifier = (call_expression "(undefined1)(param_6 >> 8)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "(param_6 >> 8)" ( (binary_expression "param_6 >> 8" identifier >> number_literal) )))) ;) (expression_statement "local_88 = param_6;" (assignment_expression "local_88 = param_6" identifier = identifier) ;) (expression_statement "uVar4 = param_6 + 3 & 0xfffffffc;" (assignment_expression "uVar4 = param_6 + 3 & 0xfffffffc" identifier = (binary_expression "param_6 + 3 & 0xfffffffc" (binary_expression "param_6 + 3" identifier + number_literal) & number_literal)) ;) (goto_statement "goto LAB_0008de80;" goto statement_identifier ;) })) (if_statement "if ((param_4 != 2) || (param_6 != 0x10)) {\n    local_a0 = &local_60;\n    local_88 = 0;\n    uVar4 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }" if (parenthesized_expression "((param_4 != 2) || (param_6 != 0x10))" ( (binary_expression "(param_4 != 2) || (param_6 != 0x10)" (parenthesized_expression "(param_4 != 2)" ( (binary_expression "param_4 != 2" identifier != number_literal) )) || (parenthesized_expression "(param_6 != 0x10)" ( (binary_expression "param_6 != 0x10" identifier != number_literal) ))) )) (compound_statement "{\n    local_a0 = &local_60;\n    local_88 = 0;\n    uVar4 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }" { (expression_statement "local_a0 = &local_60;" (assignment_expression "local_a0 = &local_60" identifier = (pointer_expression "&local_60" & identifier)) ;) (expression_statement "local_88 = 0;" (assignment_expression "local_88 = 0" identifier = number_literal) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "local_84 = 0;" (assignment_expression "local_84 = 0" identifier = number_literal) ;) (expression_statement "local_8c = 0;" (assignment_expression "local_8c = 0" identifier = number_literal) ;) (goto_statement "goto LAB_0008de80;" goto statement_identifier ;) })) (if_statement "if (param_7 == 0) {\nLAB_0008dd92:\n    local_8c = 0;\n    uVar4 = 0;\n    uVar5 = 0;\n    local_90 = 0;\n  }\n  else {\n    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);\n    if (iVar1 != 4) goto LAB_0008dd92;\n    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;\n    uVar5 = (undefined1)(uVar4 >> 0x18);\n    local_90 = (undefined1)(uVar4 >> 0x10);\n    local_8c = (undefined1)(uVar4 >> 8);\n  }" if (parenthesized_expression "(param_7 == 0)" ( (binary_expression "param_7 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0008dd92:\n    local_8c = 0;\n    uVar4 = 0;\n    uVar5 = 0;\n    local_90 = 0;\n  }" { (labeled_statement "LAB_0008dd92:\n    local_8c = 0;" statement_identifier : (expression_statement "local_8c = 0;" (assignment_expression "local_8c = 0" identifier = number_literal) ;)) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (expression_statement "local_90 = 0;" (assignment_expression "local_90 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);\n    if (iVar1 != 4) goto LAB_0008dd92;\n    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;\n    uVar5 = (undefined1)(uVar4 >> 0x18);\n    local_90 = (undefined1)(uVar4 >> 0x10);\n    local_8c = (undefined1)(uVar4 >> 8);\n  }" else (compound_statement "{\n    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);\n    if (iVar1 != 4) goto LAB_0008dd92;\n    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;\n    uVar5 = (undefined1)(uVar4 >> 0x18);\n    local_90 = (undefined1)(uVar4 >> 0x10);\n    local_8c = (undefined1)(uVar4 >> 8);\n  }" { (expression_statement "iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);" (assignment_expression "iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64)" identifier = (call_expression "__isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64)" identifier (argument_list "(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64)" ( identifier , (string_literal ""%d.%d.%d.%d"" " string_content ") , (pointer_expression "&local_70" & identifier) , (pointer_expression "&local_6c" & identifier) , (pointer_expression "&local_68" & identifier) , (pointer_expression "&local_64" & identifier) )))) ;) (if_statement "if (iVar1 != 4) goto LAB_0008dd92;" if (parenthesized_expression "(iVar1 != 4)" ( (binary_expression "iVar1 != 4" identifier != number_literal) )) (goto_statement "goto LAB_0008dd92;" goto statement_identifier ;)) (expression_statement "uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;" (assignment_expression "uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8" identifier = (binary_expression "local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8" (binary_expression "local_70 << 0x18 | local_6c << 0x10 | local_64" (binary_expression "local_70 << 0x18 | local_6c << 0x10" (binary_expression "local_70 << 0x18" identifier << number_literal) | (binary_expression "local_6c << 0x10" identifier << number_literal)) | identifier) | (binary_expression "local_68 << 8" identifier << number_literal))) ;) (expression_statement "uVar5 = (undefined1)(uVar4 >> 0x18);" (assignment_expression "uVar5 = (undefined1)(uVar4 >> 0x18)" identifier = (call_expression "(undefined1)(uVar4 >> 0x18)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "(uVar4 >> 0x18)" ( (binary_expression "uVar4 >> 0x18" identifier >> number_literal) )))) ;) (expression_statement "local_90 = (undefined1)(uVar4 >> 0x10);" (assignment_expression "local_90 = (undefined1)(uVar4 >> 0x10)" identifier = (call_expression "(undefined1)(uVar4 >> 0x10)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "(uVar4 >> 0x10)" ( (binary_expression "uVar4 >> 0x10" identifier >> number_literal) )))) ;) (expression_statement "local_8c = (undefined1)(uVar4 >> 8);" (assignment_expression "local_8c = (undefined1)(uVar4 >> 8)" identifier = (call_expression "(undefined1)(uVar4 >> 8)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "(uVar4 >> 8)" ( (binary_expression "uVar4 >> 8" identifier >> number_literal) )))) ;) }))) (expression_statement "local_a0 = &local_60;" (assignment_expression "local_a0 = &local_60" identifier = (pointer_expression "&local_60" & identifier)) ;) (expression_statement "local_60 = *param_5;" (assignment_expression "local_60 = *param_5" identifier = (pointer_expression "*param_5" * identifier)) ;) (expression_statement "local_5c = param_5[1];" (assignment_expression "local_5c = param_5[1]" identifier = (subscript_expression "param_5[1]" identifier [ number_literal ])) ;) (expression_statement "local_4a = 0;" (assignment_expression "local_4a = 0" identifier = number_literal) ;) (expression_statement "local_52 = 0;" (assignment_expression "local_52 = 0" identifier = number_literal) ;) (expression_statement "local_4e = 0;" (assignment_expression "local_4e = 0" identifier = number_literal) ;) (expression_statement "local_58 = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18;" (assignment_expression "local_58 = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18" identifier = (binary_expression "(uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18" (cast_expression "(uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5))" ( (type_descriptor "uint" type_identifier) ) (call_expression "CONCAT12(local_8c,CONCAT11(local_90,uVar5))" identifier (argument_list "(local_8c,CONCAT11(local_90,uVar5))" ( identifier , (call_expression "CONCAT11(local_90,uVar5)" identifier (argument_list "(local_90,uVar5)" ( identifier , identifier ))) )))) | (binary_expression "uVar4 << 0x18" identifier << number_literal))) ;) (expression_statement "uVar4 = 0x18;" (assignment_expression "uVar4 = 0x18" identifier = number_literal) ;) (expression_statement "local_54 = param_8 << 8 | param_8 >> 8;" (assignment_expression "local_54 = param_8 << 8 | param_8 >> 8" identifier = (binary_expression "param_8 << 8 | param_8 >> 8" (binary_expression "param_8 << 8" identifier << number_literal) | (binary_expression "param_8 >> 8" identifier >> number_literal))) ;) (expression_statement "uVar2 = time((time_t *)0x0);" (assignment_expression "uVar2 = time((time_t *)0x0)" identifier = (call_expression "time((time_t *)0x0)" identifier (argument_list "((time_t *)0x0)" ( (cast_expression "(time_t *)0x0" ( (type_descriptor "time_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "local_52 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;" (assignment_expression "local_52 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" identifier = (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8" (binary_expression "uVar2 >> 0x18" identifier >> number_literal) | (binary_expression "(uVar2 & 0xff0000) >> 8" (parenthesized_expression "(uVar2 & 0xff0000)" ( (binary_expression "uVar2 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(uVar2 & 0xff00) << 8" (parenthesized_expression "(uVar2 & 0xff00)" ( (binary_expression "uVar2 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "uVar2 << 0x18" identifier << number_literal))) ;) (expression_statement "FUN_0005f8c0((int)param_5 + 9,local_a0,0x18);" (call_expression "FUN_0005f8c0((int)param_5 + 9,local_a0,0x18)" identifier (argument_list "((int)param_5 + 9,local_a0,0x18)" ( (binary_expression "(int)param_5 + 9" (cast_expression "(int)param_5" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier , number_literal ))) ;) (expression_statement "local_88 = 0x18;" (assignment_expression "local_88 = 0x18" identifier = number_literal) ;) (expression_statement "local_84 = 0;" (assignment_expression "local_84 = 0" identifier = number_literal) ;) (expression_statement "local_8c = 0x18;" (assignment_expression "local_8c = 0x18" identifier = number_literal) ;) (labeled_statement "LAB_0008de80:\n  local_9c = &local_60;" statement_identifier : (expression_statement "local_9c = &local_60;" (assignment_expression "local_9c = &local_60" identifier = (pointer_expression "&local_60" & identifier)) ;)) (expression_statement "iVar1 = (__n + 3 & 0xfffffffc) + 0xc;" (assignment_expression "iVar1 = (__n + 3 & 0xfffffffc) + 0xc" identifier = (binary_expression "(__n + 3 & 0xfffffffc) + 0xc" (parenthesized_expression "(__n + 3 & 0xfffffffc)" ( (binary_expression "__n + 3 & 0xfffffffc" (binary_expression "__n + 3" identifier + number_literal) & number_literal) )) + number_literal)) ;) (expression_statement "__n_00 = uVar4 + iVar1;" (assignment_expression "__n_00 = uVar4 + iVar1" identifier = (binary_expression "uVar4 + iVar1" identifier + identifier)) ;) (expression_statement "__s_00 = (undefined1 *)FUN_0001db90(__n_00,1);" (assignment_expression "__s_00 = (undefined1 *)FUN_0001db90(__n_00,1)" identifier = (cast_expression "(undefined1 *)FUN_0001db90(__n_00,1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001db90(__n_00,1)" identifier (argument_list "(__n_00,1)" ( identifier , number_literal ))))) ;) (expression_statement "memset(__s_00,0,__n_00);" (call_expression "memset(__s_00,0,__n_00)" identifier (argument_list "(__s_00,0,__n_00)" ( identifier , number_literal , identifier ))) ;) (expression_statement "*__s_00 = (undefined1)param_1;" (assignment_expression "*__s_00 = (undefined1)param_1" (pointer_expression "*__s_00" * identifier) = (cast_expression "(undefined1)param_1" ( (type_descriptor "undefined1" type_identifier) ) identifier)) ;) (expression_statement "uVar3 = (ushort)__n;" (assignment_expression "uVar3 = (ushort)__n" identifier = (cast_expression "(ushort)__n" ( (type_descriptor "ushort" type_identifier) ) identifier)) ;) (if_statement "if (param_1 == 0x42) {\n    *(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;\n    *(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;\n    *(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }\n  else {\n    *(ushort *)(__s_00 + 2) = param_2;\n    *(ushort *)(__s_00 + 6) = uVar3;\n    *(ushort *)(__s_00 + 4) = param_3;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }" if (parenthesized_expression "(param_1 == 0x42)" ( (binary_expression "param_1 == 0x42" identifier == number_literal) )) (compound_statement "{\n    *(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;\n    *(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;\n    *(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }" { (expression_statement "*(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;" (assignment_expression "*(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8" (pointer_expression "*(ushort *)(__s_00 + 2)" * (cast_expression "(ushort *)(__s_00 + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s_00 + 2)" ( (binary_expression "__s_00 + 2" identifier + number_literal) )))) = (binary_expression "param_2 << 8 | param_2 >> 8" (binary_expression "param_2 << 8" identifier << number_literal) | (binary_expression "param_2 >> 8" identifier >> number_literal))) ;) (expression_statement "*(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;" (assignment_expression "*(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8" (pointer_expression "*(ushort *)(__s_00 + 4)" * (cast_expression "(ushort *)(__s_00 + 4)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s_00 + 4)" ( (binary_expression "__s_00 + 4" identifier + number_literal) )))) = (binary_expression "param_3 << 8 | param_3 >> 8" (binary_expression "param_3 << 8" identifier << number_literal) | (binary_expression "param_3 >> 8" identifier >> number_literal))) ;) (expression_statement "*(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "*(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8" (pointer_expression "*(ushort *)(__s_00 + 6)" * (cast_expression "(ushort *)(__s_00 + 6)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s_00 + 6)" ( (binary_expression "__s_00 + 6" identifier + number_literal) )))) = (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) (expression_statement "__s_00[8] = local_84;" (assignment_expression "__s_00[8] = local_84" (subscript_expression "__s_00[8]" identifier [ number_literal ]) = identifier) ;) (expression_statement "__s_00[9] = local_8c;" (assignment_expression "__s_00[9] = local_8c" (subscript_expression "__s_00[9]" identifier [ number_literal ]) = identifier) ;) }) (else_clause "else {\n    *(ushort *)(__s_00 + 2) = param_2;\n    *(ushort *)(__s_00 + 6) = uVar3;\n    *(ushort *)(__s_00 + 4) = param_3;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }" else (compound_statement "{\n    *(ushort *)(__s_00 + 2) = param_2;\n    *(ushort *)(__s_00 + 6) = uVar3;\n    *(ushort *)(__s_00 + 4) = param_3;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }" { (expression_statement "*(ushort *)(__s_00 + 2) = param_2;" (assignment_expression "*(ushort *)(__s_00 + 2) = param_2" (pointer_expression "*(ushort *)(__s_00 + 2)" * (cast_expression "(ushort *)(__s_00 + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s_00 + 2)" ( (binary_expression "__s_00 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(ushort *)(__s_00 + 6) = uVar3;" (assignment_expression "*(ushort *)(__s_00 + 6) = uVar3" (pointer_expression "*(ushort *)(__s_00 + 6)" * (cast_expression "(ushort *)(__s_00 + 6)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s_00 + 6)" ( (binary_expression "__s_00 + 6" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(ushort *)(__s_00 + 4) = param_3;" (assignment_expression "*(ushort *)(__s_00 + 4) = param_3" (pointer_expression "*(ushort *)(__s_00 + 4)" * (cast_expression "(ushort *)(__s_00 + 4)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(__s_00 + 4)" ( (binary_expression "__s_00 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "__s_00[8] = local_8c;" (assignment_expression "__s_00[8] = local_8c" (subscript_expression "__s_00[8]" identifier [ number_literal ]) = identifier) ;) (expression_statement "__s_00[9] = local_84;" (assignment_expression "__s_00[9] = local_84" (subscript_expression "__s_00[9]" identifier [ number_literal ]) = identifier) ;) }))) (expression_statement "memcpy(__s_00 + 0xc,__s,__n);" (call_expression "memcpy(__s_00 + 0xc,__s,__n)" identifier (argument_list "(__s_00 + 0xc,__s,__n)" ( (binary_expression "__s_00 + 0xc" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "memcpy(__s_00 + iVar1,local_a0,local_88);" (call_expression "memcpy(__s_00 + iVar1,local_a0,local_88)" identifier (argument_list "(__s_00 + iVar1,local_a0,local_88)" ( (binary_expression "__s_00 + iVar1" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "FUN_0001de10(local_9c,0x40);" (call_expression "FUN_0001de10(local_9c,0x40)" identifier (argument_list "(local_9c,0x40)" ( identifier , number_literal ))) ;) (expression_statement "*param_9 = __n_00;" (assignment_expression "*param_9 = __n_00" (pointer_expression "*param_9" * identifier) = identifier) ;) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return __s_00;\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    return __s_00;\n  }" { (return_statement "return __s_00;" return identifier ;) })) (expression_statement "FUN_0008eb20();" (call_expression "FUN_0008eb20()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE (pointer_declarator * 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 IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (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 = (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ IDENT ])) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) & LIT)) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) || (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , (pointer_expression & IDENT) , (pointer_expression & IDENT) , (pointer_expression & IDENT) , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (binary_expression IDENT << LIT) | (binary_expression IDENT << LIT)) | IDENT) | (binary_expression IDENT << LIT))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT >> LIT) )))) ;) }))) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( IDENT , (call_expression IDENT (argument_list ( IDENT , IDENT ))) )))) | (binary_expression IDENT << LIT))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT << LIT) | (binary_expression IDENT >> LIT))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (binary_expression IDENT >> LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression IDENT << LIT))) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) , IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;)) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) & LIT) )) + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (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 IDENT + LIT) )))) = (binary_expression (binary_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 IDENT + LIT) )))) = (binary_expression (binary_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 IDENT + LIT) )))) = (binary_expression (binary_expression IDENT << LIT) | (binary_expression IDENT >> LIT))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) }))) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (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 { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "undefined1 *\nFUN_0008dcd0(int param_1,ushort param_2,ushort param_3,int param_4,undefined4 *param_5,\n            size_t param_6,int param_7,ushort param_8,size_t *param_9)\n\n{\n  char *__s;\n  size_t __n;\n  int iVar1;\n  uint uVar2;\n  undefined1 *__s_00;\n  ushort uVar3;\n  uint uVar4;\n  undefined1 uVar5;\n  size_t __n_00;\n  int in_GS_OFFSET;\n  undefined4 *local_a0;\n  undefined4 *local_9c;\n  undefined1 local_90;\n  undefined1 local_8c;\n  size_t local_88;\n  undefined1 local_84;\n  int local_70;\n  int local_6c;\n  int local_68;\n  uint local_64;\n  undefined4 local_60;\n  undefined4 local_5c;\n  uint local_58;\n  ushort local_54;\n  uint local_52;\n  undefined4 local_4e;\n  undefined2 local_4a;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x8dcd9;\n  local_a0 = param_5;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = (&PTR_DAT_000cfb2c)[param_4];\n  __n = strlen(__s);\n  if (param_4 == 1) {\n    local_8c = (undefined1)param_6;\n    local_84 = (undefined1)(param_6 >> 8);\n    local_88 = param_6;\n    uVar4 = param_6 + 3 & 0xfffffffc;\n    goto LAB_0008de80;\n  }\n  if ((param_4 != 2) || (param_6 != 0x10)) {\n    local_a0 = &local_60;\n    local_88 = 0;\n    uVar4 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }\n  if (param_7 == 0) {\nLAB_0008dd92:\n    local_8c = 0;\n    uVar4 = 0;\n    uVar5 = 0;\n    local_90 = 0;\n  }\n  else {\n    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);\n    if (iVar1 != 4) goto LAB_0008dd92;\n    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;\n    uVar5 = (undefined1)(uVar4 >> 0x18);\n    local_90 = (undefined1)(uVar4 >> 0x10);\n    local_8c = (undefined1)(uVar4 >> 8);\n  }\n  local_a0 = &local_60;\n  local_60 = *param_5;\n  local_5c = param_5[1];\n  local_4a = 0;\n  local_52 = 0;\n  local_4e = 0;\n  local_58 = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18;\n  uVar4 = 0x18;\n  local_54 = param_8 << 8 | param_8 >> 8;\n  uVar2 = time((time_t *)0x0);\n  local_52 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n  FUN_0005f8c0((int)param_5 + 9,local_a0,0x18);\n  local_88 = 0x18;\n  local_84 = 0;\n  local_8c = 0x18;\nLAB_0008de80:\n  local_9c = &local_60;\n  iVar1 = (__n + 3 & 0xfffffffc) + 0xc;\n  __n_00 = uVar4 + iVar1;\n  __s_00 = (undefined1 *)FUN_0001db90(__n_00,1);\n  memset(__s_00,0,__n_00);\n  *__s_00 = (undefined1)param_1;\n  uVar3 = (ushort)__n;\n  if (param_1 == 0x42) {\n    *(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;\n    *(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;\n    *(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }\n  else {\n    *(ushort *)(__s_00 + 2) = param_2;\n    *(ushort *)(__s_00 + 6) = uVar3;\n    *(ushort *)(__s_00 + 4) = param_3;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }\n  memcpy(__s_00 + 0xc,__s,__n);\n  memcpy(__s_00 + iVar1,local_a0,local_88);\n  FUN_0001de10(local_9c,0x40);\n  *param_9 = __n_00;\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return __s_00;\n  }\n                    \n  FUN_0008eb20();\n}" (type_identifier "undefined1") (pointer_declarator "*\nFUN_0008dcd0(int param_1,ushort param_2,ushort param_3,int param_4,undefined4 *param_5,\n            size_t param_6,int param_7,ushort param_8,size_t *param_9)" (* "*") (function_declarator "FUN_0008dcd0(int param_1,ushort param_2,ushort param_3,int param_4,undefined4 *param_5,\n            size_t param_6,int param_7,ushort param_8,size_t *param_9)" (identifier "FUN_0008dcd0") (parameter_list "(int param_1,ushort param_2,ushort param_3,int param_4,undefined4 *param_5,\n            size_t param_6,int param_7,ushort param_8,size_t *param_9)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "ushort param_2" (type_identifier "ushort") (identifier "param_2")) (, ",") (parameter_declaration "ushort param_3" (type_identifier "ushort") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) (, ",") (parameter_declaration "undefined4 *param_5" (type_identifier "undefined4") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) (, ",") (parameter_declaration "size_t param_6" (primitive_type "size_t") (identifier "param_6")) (, ",") (parameter_declaration "int param_7" (primitive_type "int") (identifier "param_7")) (, ",") (parameter_declaration "ushort param_8" (type_identifier "ushort") (identifier "param_8")) (, ",") (parameter_declaration "size_t *param_9" (primitive_type "size_t") (pointer_declarator "*param_9" (* "*") (identifier "param_9"))) () ")")))) (compound_statement "{\n  char *__s;\n  size_t __n;\n  int iVar1;\n  uint uVar2;\n  undefined1 *__s_00;\n  ushort uVar3;\n  uint uVar4;\n  undefined1 uVar5;\n  size_t __n_00;\n  int in_GS_OFFSET;\n  undefined4 *local_a0;\n  undefined4 *local_9c;\n  undefined1 local_90;\n  undefined1 local_8c;\n  size_t local_88;\n  undefined1 local_84;\n  int local_70;\n  int local_6c;\n  int local_68;\n  uint local_64;\n  undefined4 local_60;\n  undefined4 local_5c;\n  uint local_58;\n  ushort local_54;\n  uint local_52;\n  undefined4 local_4e;\n  undefined2 local_4a;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x8dcd9;\n  local_a0 = param_5;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = (&PTR_DAT_000cfb2c)[param_4];\n  __n = strlen(__s);\n  if (param_4 == 1) {\n    local_8c = (undefined1)param_6;\n    local_84 = (undefined1)(param_6 >> 8);\n    local_88 = param_6;\n    uVar4 = param_6 + 3 & 0xfffffffc;\n    goto LAB_0008de80;\n  }\n  if ((param_4 != 2) || (param_6 != 0x10)) {\n    local_a0 = &local_60;\n    local_88 = 0;\n    uVar4 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }\n  if (param_7 == 0) {\nLAB_0008dd92:\n    local_8c = 0;\n    uVar4 = 0;\n    uVar5 = 0;\n    local_90 = 0;\n  }\n  else {\n    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);\n    if (iVar1 != 4) goto LAB_0008dd92;\n    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;\n    uVar5 = (undefined1)(uVar4 >> 0x18);\n    local_90 = (undefined1)(uVar4 >> 0x10);\n    local_8c = (undefined1)(uVar4 >> 8);\n  }\n  local_a0 = &local_60;\n  local_60 = *param_5;\n  local_5c = param_5[1];\n  local_4a = 0;\n  local_52 = 0;\n  local_4e = 0;\n  local_58 = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18;\n  uVar4 = 0x18;\n  local_54 = param_8 << 8 | param_8 >> 8;\n  uVar2 = time((time_t *)0x0);\n  local_52 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n  FUN_0005f8c0((int)param_5 + 9,local_a0,0x18);\n  local_88 = 0x18;\n  local_84 = 0;\n  local_8c = 0x18;\nLAB_0008de80:\n  local_9c = &local_60;\n  iVar1 = (__n + 3 & 0xfffffffc) + 0xc;\n  __n_00 = uVar4 + iVar1;\n  __s_00 = (undefined1 *)FUN_0001db90(__n_00,1);\n  memset(__s_00,0,__n_00);\n  *__s_00 = (undefined1)param_1;\n  uVar3 = (ushort)__n;\n  if (param_1 == 0x42) {\n    *(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;\n    *(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;\n    *(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }\n  else {\n    *(ushort *)(__s_00 + 2) = param_2;\n    *(ushort *)(__s_00 + 6) = uVar3;\n    *(ushort *)(__s_00 + 4) = param_3;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }\n  memcpy(__s_00 + 0xc,__s,__n);\n  memcpy(__s_00 + iVar1,local_a0,local_88);\n  FUN_0001de10(local_9c,0x40);\n  *param_9 = __n_00;\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return __s_00;\n  }\n                    \n  FUN_0008eb20();\n}" ({ "{") (declaration "char *__s;" (primitive_type "char") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "undefined1 *__s_00;" (type_identifier "undefined1") (pointer_declarator "*__s_00" (* "*") (identifier "__s_00")) (; ";")) (declaration "ushort uVar3;" (type_identifier "ushort") (identifier "uVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "undefined1 uVar5;" (type_identifier "undefined1") (identifier "uVar5") (; ";")) (declaration "size_t __n_00;" (primitive_type "size_t") (identifier "__n_00") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined4 *local_a0;" (type_identifier "undefined4") (pointer_declarator "*local_a0" (* "*") (identifier "local_a0")) (; ";")) (declaration "undefined4 *local_9c;" (type_identifier "undefined4") (pointer_declarator "*local_9c" (* "*") (identifier "local_9c")) (; ";")) (declaration "undefined1 local_90;" (type_identifier "undefined1") (identifier "local_90") (; ";")) (declaration "undefined1 local_8c;" (type_identifier "undefined1") (identifier "local_8c") (; ";")) (declaration "size_t local_88;" (primitive_type "size_t") (identifier "local_88") (; ";")) (declaration "undefined1 local_84;" (type_identifier "undefined1") (identifier "local_84") (; ";")) (declaration "int local_70;" (primitive_type "int") (identifier "local_70") (; ";")) (declaration "int local_6c;" (primitive_type "int") (identifier "local_6c") (; ";")) (declaration "int local_68;" (primitive_type "int") (identifier "local_68") (; ";")) (declaration "uint local_64;" (type_identifier "uint") (identifier "local_64") (; ";")) (declaration "undefined4 local_60;" (type_identifier "undefined4") (identifier "local_60") (; ";")) (declaration "undefined4 local_5c;" (type_identifier "undefined4") (identifier "local_5c") (; ";")) (declaration "uint local_58;" (type_identifier "uint") (identifier "local_58") (; ";")) (declaration "ushort local_54;" (type_identifier "ushort") (identifier "local_54") (; ";")) (declaration "uint local_52;" (type_identifier "uint") (identifier "local_52") (; ";")) (declaration "undefined4 local_4e;" (type_identifier "undefined4") (identifier "local_4e") (; ";")) (declaration "undefined2 local_4a;" (type_identifier "undefined2") (identifier "local_4a") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x8dcd9;" (assignment_expression "uStack_14 = 0x8dcd9" (identifier "uStack_14") (= "=") (number_literal "0x8dcd9")) (; ";")) (expression_statement "local_a0 = param_5;" (assignment_expression "local_a0 = param_5" (identifier "local_a0") (= "=") (identifier "param_5")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "__s = (&PTR_DAT_000cfb2c)[param_4];" (assignment_expression "__s = (&PTR_DAT_000cfb2c)[param_4]" (identifier "__s") (= "=") (subscript_expression "(&PTR_DAT_000cfb2c)[param_4]" (parenthesized_expression "(&PTR_DAT_000cfb2c)" (( "(") (pointer_expression "&PTR_DAT_000cfb2c" (& "&") (identifier "PTR_DAT_000cfb2c")) () ")")) ([ "[") (identifier "param_4") (] "]"))) (; ";")) (expression_statement "__n = strlen(__s);" (assignment_expression "__n = strlen(__s)" (identifier "__n") (= "=") (call_expression "strlen(__s)" (identifier "strlen") (argument_list "(__s)" (( "(") (identifier "__s") () ")")))) (; ";")) (if_statement "if (param_4 == 1) {\n    local_8c = (undefined1)param_6;\n    local_84 = (undefined1)(param_6 >> 8);\n    local_88 = param_6;\n    uVar4 = param_6 + 3 & 0xfffffffc;\n    goto LAB_0008de80;\n  }" (if "if") (parenthesized_expression "(param_4 == 1)" (( "(") (binary_expression "param_4 == 1" (identifier "param_4") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    local_8c = (undefined1)param_6;\n    local_84 = (undefined1)(param_6 >> 8);\n    local_88 = param_6;\n    uVar4 = param_6 + 3 & 0xfffffffc;\n    goto LAB_0008de80;\n  }" ({ "{") (expression_statement "local_8c = (undefined1)param_6;" (assignment_expression "local_8c = (undefined1)param_6" (identifier "local_8c") (= "=") (cast_expression "(undefined1)param_6" (( "(") (type_descriptor "undefined1" (type_identifier "undefined1")) () ")") (identifier "param_6"))) (; ";")) (expression_statement "local_84 = (undefined1)(param_6 >> 8);" (assignment_expression "local_84 = (undefined1)(param_6 >> 8)" (identifier "local_84") (= "=") (call_expression "(undefined1)(param_6 >> 8)" (parenthesized_expression "(undefined1)" (( "(") (identifier "undefined1") () ")")) (argument_list "(param_6 >> 8)" (( "(") (binary_expression "param_6 >> 8" (identifier "param_6") (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "local_88 = param_6;" (assignment_expression "local_88 = param_6" (identifier "local_88") (= "=") (identifier "param_6")) (; ";")) (expression_statement "uVar4 = param_6 + 3 & 0xfffffffc;" (assignment_expression "uVar4 = param_6 + 3 & 0xfffffffc" (identifier "uVar4") (= "=") (binary_expression "param_6 + 3 & 0xfffffffc" (binary_expression "param_6 + 3" (identifier "param_6") (+ "+") (number_literal "3")) (& "&") (number_literal "0xfffffffc"))) (; ";")) (goto_statement "goto LAB_0008de80;" (goto "goto") (statement_identifier "LAB_0008de80") (; ";")) (} "}"))) (if_statement "if ((param_4 != 2) || (param_6 != 0x10)) {\n    local_a0 = &local_60;\n    local_88 = 0;\n    uVar4 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }" (if "if") (parenthesized_expression "((param_4 != 2) || (param_6 != 0x10))" (( "(") (binary_expression "(param_4 != 2) || (param_6 != 0x10)" (parenthesized_expression "(param_4 != 2)" (( "(") (binary_expression "param_4 != 2" (identifier "param_4") (!= "!=") (number_literal "2")) () ")")) (|| "||") (parenthesized_expression "(param_6 != 0x10)" (( "(") (binary_expression "param_6 != 0x10" (identifier "param_6") (!= "!=") (number_literal "0x10")) () ")"))) () ")")) (compound_statement "{\n    local_a0 = &local_60;\n    local_88 = 0;\n    uVar4 = 0;\n    local_84 = 0;\n    local_8c = 0;\n    goto LAB_0008de80;\n  }" ({ "{") (expression_statement "local_a0 = &local_60;" (assignment_expression "local_a0 = &local_60" (identifier "local_a0") (= "=") (pointer_expression "&local_60" (& "&") (identifier "local_60"))) (; ";")) (expression_statement "local_88 = 0;" (assignment_expression "local_88 = 0" (identifier "local_88") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_84 = 0;" (assignment_expression "local_84 = 0" (identifier "local_84") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_8c = 0;" (assignment_expression "local_8c = 0" (identifier "local_8c") (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_0008de80;" (goto "goto") (statement_identifier "LAB_0008de80") (; ";")) (} "}"))) (if_statement "if (param_7 == 0) {\nLAB_0008dd92:\n    local_8c = 0;\n    uVar4 = 0;\n    uVar5 = 0;\n    local_90 = 0;\n  }\n  else {\n    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);\n    if (iVar1 != 4) goto LAB_0008dd92;\n    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;\n    uVar5 = (undefined1)(uVar4 >> 0x18);\n    local_90 = (undefined1)(uVar4 >> 0x10);\n    local_8c = (undefined1)(uVar4 >> 8);\n  }" (if "if") (parenthesized_expression "(param_7 == 0)" (( "(") (binary_expression "param_7 == 0" (identifier "param_7") (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_0008dd92:\n    local_8c = 0;\n    uVar4 = 0;\n    uVar5 = 0;\n    local_90 = 0;\n  }" ({ "{") (labeled_statement "LAB_0008dd92:\n    local_8c = 0;" (statement_identifier "LAB_0008dd92") (: ":") (expression_statement "local_8c = 0;" (assignment_expression "local_8c = 0" (identifier "local_8c") (= "=") (number_literal "0")) (; ";"))) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_90 = 0;" (assignment_expression "local_90 = 0" (identifier "local_90") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);\n    if (iVar1 != 4) goto LAB_0008dd92;\n    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;\n    uVar5 = (undefined1)(uVar4 >> 0x18);\n    local_90 = (undefined1)(uVar4 >> 0x10);\n    local_8c = (undefined1)(uVar4 >> 8);\n  }" (else "else") (compound_statement "{\n    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);\n    if (iVar1 != 4) goto LAB_0008dd92;\n    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;\n    uVar5 = (undefined1)(uVar4 >> 0x18);\n    local_90 = (undefined1)(uVar4 >> 0x10);\n    local_8c = (undefined1)(uVar4 >> 8);\n  }" ({ "{") (expression_statement "iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);" (assignment_expression "iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64)" (identifier "iVar1") (= "=") (call_expression "__isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64)" (identifier "__isoc99_sscanf") (argument_list "(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64)" (( "(") (identifier "param_7") (, ",") (string_literal ""%d.%d.%d.%d"" (" """) (string_content "%d.%d.%d.%d") (" """)) (, ",") (pointer_expression "&local_70" (& "&") (identifier "local_70")) (, ",") (pointer_expression "&local_6c" (& "&") (identifier "local_6c")) (, ",") (pointer_expression "&local_68" (& "&") (identifier "local_68")) (, ",") (pointer_expression "&local_64" (& "&") (identifier "local_64")) () ")")))) (; ";")) (if_statement "if (iVar1 != 4) goto LAB_0008dd92;" (if "if") (parenthesized_expression "(iVar1 != 4)" (( "(") (binary_expression "iVar1 != 4" (identifier "iVar1") (!= "!=") (number_literal "4")) () ")")) (goto_statement "goto LAB_0008dd92;" (goto "goto") (statement_identifier "LAB_0008dd92") (; ";"))) (expression_statement "uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;" (assignment_expression "uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8" (identifier "uVar4") (= "=") (binary_expression "local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8" (binary_expression "local_70 << 0x18 | local_6c << 0x10 | local_64" (binary_expression "local_70 << 0x18 | local_6c << 0x10" (binary_expression "local_70 << 0x18" (identifier "local_70") (<< "<<") (number_literal "0x18")) (| "|") (binary_expression "local_6c << 0x10" (identifier "local_6c") (<< "<<") (number_literal "0x10"))) (| "|") (identifier "local_64")) (| "|") (binary_expression "local_68 << 8" (identifier "local_68") (<< "<<") (number_literal "8")))) (; ";")) (expression_statement "uVar5 = (undefined1)(uVar4 >> 0x18);" (assignment_expression "uVar5 = (undefined1)(uVar4 >> 0x18)" (identifier "uVar5") (= "=") (call_expression "(undefined1)(uVar4 >> 0x18)" (parenthesized_expression "(undefined1)" (( "(") (identifier "undefined1") () ")")) (argument_list "(uVar4 >> 0x18)" (( "(") (binary_expression "uVar4 >> 0x18" (identifier "uVar4") (>> ">>") (number_literal "0x18")) () ")")))) (; ";")) (expression_statement "local_90 = (undefined1)(uVar4 >> 0x10);" (assignment_expression "local_90 = (undefined1)(uVar4 >> 0x10)" (identifier "local_90") (= "=") (call_expression "(undefined1)(uVar4 >> 0x10)" (parenthesized_expression "(undefined1)" (( "(") (identifier "undefined1") () ")")) (argument_list "(uVar4 >> 0x10)" (( "(") (binary_expression "uVar4 >> 0x10" (identifier "uVar4") (>> ">>") (number_literal "0x10")) () ")")))) (; ";")) (expression_statement "local_8c = (undefined1)(uVar4 >> 8);" (assignment_expression "local_8c = (undefined1)(uVar4 >> 8)" (identifier "local_8c") (= "=") (call_expression "(undefined1)(uVar4 >> 8)" (parenthesized_expression "(undefined1)" (( "(") (identifier "undefined1") () ")")) (argument_list "(uVar4 >> 8)" (( "(") (binary_expression "uVar4 >> 8" (identifier "uVar4") (>> ">>") (number_literal "8")) () ")")))) (; ";")) (} "}")))) (expression_statement "local_a0 = &local_60;" (assignment_expression "local_a0 = &local_60" (identifier "local_a0") (= "=") (pointer_expression "&local_60" (& "&") (identifier "local_60"))) (; ";")) (expression_statement "local_60 = *param_5;" (assignment_expression "local_60 = *param_5" (identifier "local_60") (= "=") (pointer_expression "*param_5" (* "*") (identifier "param_5"))) (; ";")) (expression_statement "local_5c = param_5[1];" (assignment_expression "local_5c = param_5[1]" (identifier "local_5c") (= "=") (subscript_expression "param_5[1]" (identifier "param_5") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "local_4a = 0;" (assignment_expression "local_4a = 0" (identifier "local_4a") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_52 = 0;" (assignment_expression "local_52 = 0" (identifier "local_52") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_4e = 0;" (assignment_expression "local_4e = 0" (identifier "local_4e") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_58 = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18;" (assignment_expression "local_58 = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18" (identifier "local_58") (= "=") (binary_expression "(uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18" (cast_expression "(uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5))" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (call_expression "CONCAT12(local_8c,CONCAT11(local_90,uVar5))" (identifier "CONCAT12") (argument_list "(local_8c,CONCAT11(local_90,uVar5))" (( "(") (identifier "local_8c") (, ",") (call_expression "CONCAT11(local_90,uVar5)" (identifier "CONCAT11") (argument_list "(local_90,uVar5)" (( "(") (identifier "local_90") (, ",") (identifier "uVar5") () ")"))) () ")")))) (| "|") (binary_expression "uVar4 << 0x18" (identifier "uVar4") (<< "<<") (number_literal "0x18")))) (; ";")) (expression_statement "uVar4 = 0x18;" (assignment_expression "uVar4 = 0x18" (identifier "uVar4") (= "=") (number_literal "0x18")) (; ";")) (expression_statement "local_54 = param_8 << 8 | param_8 >> 8;" (assignment_expression "local_54 = param_8 << 8 | param_8 >> 8" (identifier "local_54") (= "=") (binary_expression "param_8 << 8 | param_8 >> 8" (binary_expression "param_8 << 8" (identifier "param_8") (<< "<<") (number_literal "8")) (| "|") (binary_expression "param_8 >> 8" (identifier "param_8") (>> ">>") (number_literal "8")))) (; ";")) (expression_statement "uVar2 = time((time_t *)0x0);" (assignment_expression "uVar2 = time((time_t *)0x0)" (identifier "uVar2") (= "=") (call_expression "time((time_t *)0x0)" (identifier "time") (argument_list "((time_t *)0x0)" (( "(") (cast_expression "(time_t *)0x0" (( "(") (type_descriptor "time_t *" (type_identifier "time_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) () ")")))) (; ";")) (expression_statement "local_52 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;" (assignment_expression "local_52 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (identifier "local_52") (= "=") (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8" (binary_expression "uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8" (binary_expression "uVar2 >> 0x18" (identifier "uVar2") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(uVar2 & 0xff0000) >> 8" (parenthesized_expression "(uVar2 & 0xff0000)" (( "(") (binary_expression "uVar2 & 0xff0000" (identifier "uVar2") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(uVar2 & 0xff00) << 8" (parenthesized_expression "(uVar2 & 0xff00)" (( "(") (binary_expression "uVar2 & 0xff00" (identifier "uVar2") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "uVar2 << 0x18" (identifier "uVar2") (<< "<<") (number_literal "0x18")))) (; ";")) (expression_statement "FUN_0005f8c0((int)param_5 + 9,local_a0,0x18);" (call_expression "FUN_0005f8c0((int)param_5 + 9,local_a0,0x18)" (identifier "FUN_0005f8c0") (argument_list "((int)param_5 + 9,local_a0,0x18)" (( "(") (binary_expression "(int)param_5 + 9" (cast_expression "(int)param_5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_5")) (+ "+") (number_literal "9")) (, ",") (identifier "local_a0") (, ",") (number_literal "0x18") () ")"))) (; ";")) (expression_statement "local_88 = 0x18;" (assignment_expression "local_88 = 0x18" (identifier "local_88") (= "=") (number_literal "0x18")) (; ";")) (expression_statement "local_84 = 0;" (assignment_expression "local_84 = 0" (identifier "local_84") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_8c = 0x18;" (assignment_expression "local_8c = 0x18" (identifier "local_8c") (= "=") (number_literal "0x18")) (; ";")) (labeled_statement "LAB_0008de80:\n  local_9c = &local_60;" (statement_identifier "LAB_0008de80") (: ":") (expression_statement "local_9c = &local_60;" (assignment_expression "local_9c = &local_60" (identifier "local_9c") (= "=") (pointer_expression "&local_60" (& "&") (identifier "local_60"))) (; ";"))) (expression_statement "iVar1 = (__n + 3 & 0xfffffffc) + 0xc;" (assignment_expression "iVar1 = (__n + 3 & 0xfffffffc) + 0xc" (identifier "iVar1") (= "=") (binary_expression "(__n + 3 & 0xfffffffc) + 0xc" (parenthesized_expression "(__n + 3 & 0xfffffffc)" (( "(") (binary_expression "__n + 3 & 0xfffffffc" (binary_expression "__n + 3" (identifier "__n") (+ "+") (number_literal "3")) (& "&") (number_literal "0xfffffffc")) () ")")) (+ "+") (number_literal "0xc"))) (; ";")) (expression_statement "__n_00 = uVar4 + iVar1;" (assignment_expression "__n_00 = uVar4 + iVar1" (identifier "__n_00") (= "=") (binary_expression "uVar4 + iVar1" (identifier "uVar4") (+ "+") (identifier "iVar1"))) (; ";")) (expression_statement "__s_00 = (undefined1 *)FUN_0001db90(__n_00,1);" (assignment_expression "__s_00 = (undefined1 *)FUN_0001db90(__n_00,1)" (identifier "__s_00") (= "=") (cast_expression "(undefined1 *)FUN_0001db90(__n_00,1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001db90(__n_00,1)" (identifier "FUN_0001db90") (argument_list "(__n_00,1)" (( "(") (identifier "__n_00") (, ",") (number_literal "1") () ")"))))) (; ";")) (expression_statement "memset(__s_00,0,__n_00);" (call_expression "memset(__s_00,0,__n_00)" (identifier "memset") (argument_list "(__s_00,0,__n_00)" (( "(") (identifier "__s_00") (, ",") (number_literal "0") (, ",") (identifier "__n_00") () ")"))) (; ";")) (expression_statement "*__s_00 = (undefined1)param_1;" (assignment_expression "*__s_00 = (undefined1)param_1" (pointer_expression "*__s_00" (* "*") (identifier "__s_00")) (= "=") (cast_expression "(undefined1)param_1" (( "(") (type_descriptor "undefined1" (type_identifier "undefined1")) () ")") (identifier "param_1"))) (; ";")) (expression_statement "uVar3 = (ushort)__n;" (assignment_expression "uVar3 = (ushort)__n" (identifier "uVar3") (= "=") (cast_expression "(ushort)__n" (( "(") (type_descriptor "ushort" (type_identifier "ushort")) () ")") (identifier "__n"))) (; ";")) (if_statement "if (param_1 == 0x42) {\n    *(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;\n    *(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;\n    *(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }\n  else {\n    *(ushort *)(__s_00 + 2) = param_2;\n    *(ushort *)(__s_00 + 6) = uVar3;\n    *(ushort *)(__s_00 + 4) = param_3;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }" (if "if") (parenthesized_expression "(param_1 == 0x42)" (( "(") (binary_expression "param_1 == 0x42" (identifier "param_1") (== "==") (number_literal "0x42")) () ")")) (compound_statement "{\n    *(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;\n    *(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;\n    *(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;\n    __s_00[8] = local_84;\n    __s_00[9] = local_8c;\n  }" ({ "{") (expression_statement "*(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;" (assignment_expression "*(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8" (pointer_expression "*(ushort *)(__s_00 + 2)" (* "*") (cast_expression "(ushort *)(__s_00 + 2)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(__s_00 + 2)" (( "(") (binary_expression "__s_00 + 2" (identifier "__s_00") (+ "+") (number_literal "2")) () ")")))) (= "=") (binary_expression "param_2 << 8 | param_2 >> 8" (binary_expression "param_2 << 8" (identifier "param_2") (<< "<<") (number_literal "8")) (| "|") (binary_expression "param_2 >> 8" (identifier "param_2") (>> ">>") (number_literal "8")))) (; ";")) (expression_statement "*(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;" (assignment_expression "*(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8" (pointer_expression "*(ushort *)(__s_00 + 4)" (* "*") (cast_expression "(ushort *)(__s_00 + 4)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(__s_00 + 4)" (( "(") (binary_expression "__s_00 + 4" (identifier "__s_00") (+ "+") (number_literal "4")) () ")")))) (= "=") (binary_expression "param_3 << 8 | param_3 >> 8" (binary_expression "param_3 << 8" (identifier "param_3") (<< "<<") (number_literal "8")) (| "|") (binary_expression "param_3 >> 8" (identifier "param_3") (>> ">>") (number_literal "8")))) (; ";")) (expression_statement "*(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;" (assignment_expression "*(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8" (pointer_expression "*(ushort *)(__s_00 + 6)" (* "*") (cast_expression "(ushort *)(__s_00 + 6)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(__s_00 + 6)" (( "(") (binary_expression "__s_00 + 6" (identifier "__s_00") (+ "+") (number_literal "6")) () ")")))) (= "=") (binary_expression "uVar3 << 8 | uVar3 >> 8" (binary_expression "uVar3 << 8" (identifier "uVar3") (<< "<<") (number_literal "8")) (| "|") (binary_expression "uVar3 >> 8" (identifier "uVar3") (>> ">>") (number_literal "8")))) (; ";")) (expression_statement "__s_00[8] = local_84;" (assignment_expression "__s_00[8] = local_84" (subscript_expression "__s_00[8]" (identifier "__s_00") ([ "[") (number_literal "8") (] "]")) (= "=") (identifier "local_84")) (; ";")) (expression_statement "__s_00[9] = local_8c;" (assignment_expression "__s_00[9] = local_8c" (subscript_expression "__s_00[9]" (identifier "__s_00") ([ "[") (number_literal "9") (] "]")) (= "=") (identifier "local_8c")) (; ";")) (} "}")) (else_clause "else {\n    *(ushort *)(__s_00 + 2) = param_2;\n    *(ushort *)(__s_00 + 6) = uVar3;\n    *(ushort *)(__s_00 + 4) = param_3;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }" (else "else") (compound_statement "{\n    *(ushort *)(__s_00 + 2) = param_2;\n    *(ushort *)(__s_00 + 6) = uVar3;\n    *(ushort *)(__s_00 + 4) = param_3;\n    __s_00[8] = local_8c;\n    __s_00[9] = local_84;\n  }" ({ "{") (expression_statement "*(ushort *)(__s_00 + 2) = param_2;" (assignment_expression "*(ushort *)(__s_00 + 2) = param_2" (pointer_expression "*(ushort *)(__s_00 + 2)" (* "*") (cast_expression "(ushort *)(__s_00 + 2)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(__s_00 + 2)" (( "(") (binary_expression "__s_00 + 2" (identifier "__s_00") (+ "+") (number_literal "2")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (expression_statement "*(ushort *)(__s_00 + 6) = uVar3;" (assignment_expression "*(ushort *)(__s_00 + 6) = uVar3" (pointer_expression "*(ushort *)(__s_00 + 6)" (* "*") (cast_expression "(ushort *)(__s_00 + 6)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(__s_00 + 6)" (( "(") (binary_expression "__s_00 + 6" (identifier "__s_00") (+ "+") (number_literal "6")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "*(ushort *)(__s_00 + 4) = param_3;" (assignment_expression "*(ushort *)(__s_00 + 4) = param_3" (pointer_expression "*(ushort *)(__s_00 + 4)" (* "*") (cast_expression "(ushort *)(__s_00 + 4)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(__s_00 + 4)" (( "(") (binary_expression "__s_00 + 4" (identifier "__s_00") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "param_3")) (; ";")) (expression_statement "__s_00[8] = local_8c;" (assignment_expression "__s_00[8] = local_8c" (subscript_expression "__s_00[8]" (identifier "__s_00") ([ "[") (number_literal "8") (] "]")) (= "=") (identifier "local_8c")) (; ";")) (expression_statement "__s_00[9] = local_84;" (assignment_expression "__s_00[9] = local_84" (subscript_expression "__s_00[9]" (identifier "__s_00") ([ "[") (number_literal "9") (] "]")) (= "=") (identifier "local_84")) (; ";")) (} "}")))) (expression_statement "memcpy(__s_00 + 0xc,__s,__n);" (call_expression "memcpy(__s_00 + 0xc,__s,__n)" (identifier "memcpy") (argument_list "(__s_00 + 0xc,__s,__n)" (( "(") (binary_expression "__s_00 + 0xc" (identifier "__s_00") (+ "+") (number_literal "0xc")) (, ",") (identifier "__s") (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "memcpy(__s_00 + iVar1,local_a0,local_88);" (call_expression "memcpy(__s_00 + iVar1,local_a0,local_88)" (identifier "memcpy") (argument_list "(__s_00 + iVar1,local_a0,local_88)" (( "(") (binary_expression "__s_00 + iVar1" (identifier "__s_00") (+ "+") (identifier "iVar1")) (, ",") (identifier "local_a0") (, ",") (identifier "local_88") () ")"))) (; ";")) (expression_statement "FUN_0001de10(local_9c,0x40);" (call_expression "FUN_0001de10(local_9c,0x40)" (identifier "FUN_0001de10") (argument_list "(local_9c,0x40)" (( "(") (identifier "local_9c") (, ",") (number_literal "0x40") () ")"))) (; ";")) (expression_statement "*param_9 = __n_00;" (assignment_expression "*param_9 = __n_00" (pointer_expression "*param_9" (* "*") (identifier "param_9")) (= "=") (identifier "__n_00")) (; ";")) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return __s_00;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return __s_00;\n  }" ({ "{") (return_statement "return __s_00;" (return "return") (identifier "__s_00") (; ";")) (} "}"))) (expression_statement "FUN_0008eb20();" (call_expression "FUN_0008eb20()" (identifier "FUN_0008eb20") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

void * function_1(int var_19,int protomajor,int protominor,int var_3,void *auth_data,
                        int var_5,char *var_6,int peer_port,int *outlen)

{
  int var_24;
  char *__s;
  size_t var_16;
  int var_9;
  type_1 var_14;
  type_2 *var_20;
  type_3 var_21;
  type_1 var_10;
  type_2 uVar6;
  size_t n;
  int var_1;
  type_4 *local_a0;
  type_4 *local_9c;
  type_2 local_90;
  type_2 local_8c;
  size_t local_88;
  type_2 local_84;
  int var_8 [4];
  type_4 realauthdata [64];
  
  local_a0 = (type_4 *)auth_data;
  var_24 = *(int *)(var_1 + 0x14);
  __s = *(char **)(var_2 + var_3 * 4);
  var_16 = var_4(__s);
  if (var_3 == 1) {
    local_8c = (type_2)var_5;
    local_84 = (type_2)((type_1)var_5 >> 8);
    local_88 = var_5;
    var_10 = var_5 + 3U & 0xfffffffc;
    goto LAB_0008de80;
  }
  if ((var_3 != 2) || (var_5 != 0x10)) {
    local_a0 = realauthdata;
    local_88 = 0;
    var_10 = 0;
    local_84 = 0;
    local_8c = 0;
    goto LAB_0008de80;
  }
  if (var_6 == (char *)0x0) {
LAB_0008dd92:
    local_8c = 0;
    var_10 = 0;
    uVar6 = 0;
    local_90 = 0;
  }
  else {
    var_9 = var_7(var_6,"%d.%d.%d.%d",var_8,var_8 + 1,var_8 + 2,var_8 + 3);
    if (var_9 != 4) goto LAB_0008dd92;
    var_10 = var_8[0] << 0x18 | var_8[1] << 0x10 | var_8[3] | var_8[2] << 8;
    uVar6 = (type_2)(var_10 >> 0x18);
    local_90 = (type_2)(var_10 >> 0x10);
    local_8c = (type_2)(var_10 >> 8);
  }
  local_a0 = realauthdata;
                    /* WARNING: Load size is inaccurate */
  realauthdata._0_4_ = *auth_data;
  realauthdata._4_4_ = *(type_5 *)((int)auth_data + 4);
  realauthdata[0x16] = '\0';
  realauthdata[0x17] = '\0';
  realauthdata[0xe] = '\0';
  realauthdata[0xf] = '\0';
  realauthdata[0x10] = '\0';
  realauthdata[0x11] = '\0';
  realauthdata[0x12] = '\0';
  realauthdata[0x13] = '\0';
  realauthdata[0x14] = '\0';
  realauthdata[0x15] = '\0';
  realauthdata._8_4_ = (type_1)var_11(local_8c,var_12(local_90,uVar6)) | var_10 << 0x18;
  var_10 = 0x18;
  realauthdata._12_2_ = (type_3)peer_port << 8 | (type_3)peer_port >> 8;
  var_14 = var_13((type_6 *)0x0);
  realauthdata._14_4_ =
       var_14 >> 0x18 | (var_14 & 0xff0000) >> 8 | (var_14 & 0xff00) << 8 | var_14 << 0x18;
  var_15((type_4 *)((int)auth_data + 9),local_a0,0x18);
  local_88 = 0x18;
  local_84 = 0;
  local_8c = 0x18;
LAB_0008de80:
  local_9c = realauthdata;
  var_9 = (var_16 + 3 & 0xfffffffc) + 0xc;
  n = var_10 + var_9;
  var_20 = (type_2 *)var_17(n,1);
  var_18(var_20,0,n);
  *var_20 = (type_2)var_19;
  var_21 = (type_3)var_16;
  if (var_19 == 0x42) {
    *(type_3 *)(var_20 + 2) = (type_3)protomajor << 8 | (type_3)protomajor >> 8;
    *(type_3 *)(var_20 + 4) = (type_3)protominor << 8 | (type_3)protominor >> 8;
    *(type_3 *)(var_20 + 6) = var_21 << 8 | var_21 >> 8;
    var_20[8] = local_84;
    var_20[9] = local_8c;
  }
  else {
    *(type_3 *)(var_20 + 2) = (type_3)protomajor;
    *(type_3 *)(var_20 + 6) = var_21;
    *(type_3 *)(var_20 + 4) = (type_3)protominor;
    var_20[8] = local_8c;
    var_20[9] = local_84;
  }
  var_22(var_20 + 0xc,__s,var_16);
  var_22(var_20 + var_9,local_a0,local_88);
  var_23(local_9c,0x40);
  *outlen = n;
  if (var_24 == *(int *)(var_1 + 0x14)) {
    return var_20;
  }
                    /* WARNING: Subroutine does not return */
  var_25();
}


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

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

undefined1 *
MASKED(int param_1,ushort param_2,ushort param_3,int param_4,undefined4 *param_5,
            size_t param_6,int param_7,ushort param_8,size_t *param_9)

{
  char *__s;
  size_t __n;
  int iVar1;
  uint uVar2;
  undefined1 *__s_00;
  ushort uVar3;
  uint uVar4;
  undefined1 uVar5;
  size_t __n_00;
  int in_GS_OFFSET;
  undefined4 *local_a0;
  undefined4 *local_9c;
  undefined1 local_90;
  undefined1 local_8c;
  size_t local_88;
  undefined1 local_84;
  int local_70;
  int local_6c;
  int local_68;
  uint local_64;
  undefined4 local_60;
  undefined4 local_5c;
  uint local_58;
  ushort local_54;
  uint local_52;
  undefined4 local_4e;
  undefined2 local_4a;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x8dcd9;
  local_a0 = param_5;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  __s = (&PTR_DAT_000cfb2c)[param_4];
  __n = strlen(__s);
  if (param_4 == 1) {
    local_8c = (undefined1)param_6;
    local_84 = (undefined1)(param_6 >> 8);
    local_88 = param_6;
    uVar4 = param_6 + 3 & 0xfffffffc;
    goto LAB_0008de80;
  }
  if ((param_4 != 2) || (param_6 != 0x10)) {
    local_a0 = &local_60;
    local_88 = 0;
    uVar4 = 0;
    local_84 = 0;
    local_8c = 0;
    goto LAB_0008de80;
  }
  if (param_7 == 0) {
LAB_0008dd92:
    local_8c = 0;
    uVar4 = 0;
    uVar5 = 0;
    local_90 = 0;
  }
  else {
    iVar1 = __isoc99_sscanf(param_7,"%d.%d.%d.%d",&local_70,&local_6c,&local_68,&local_64);
    if (iVar1 != 4) goto LAB_0008dd92;
    uVar4 = local_70 << 0x18 | local_6c << 0x10 | local_64 | local_68 << 8;
    uVar5 = (undefined1)(uVar4 >> 0x18);
    local_90 = (undefined1)(uVar4 >> 0x10);
    local_8c = (undefined1)(uVar4 >> 8);
  }
  local_a0 = &local_60;
  local_60 = *param_5;
  local_5c = param_5[1];
  local_4a = 0;
  local_52 = 0;
  local_4e = 0;
  local_58 = (uint)CONCAT12(local_8c,CONCAT11(local_90,uVar5)) | uVar4 << 0x18;
  uVar4 = 0x18;
  local_54 = param_8 << 8 | param_8 >> 8;
  uVar2 = time((time_t *)0x0);
  local_52 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;
  FUN_0005f8c0((int)param_5 + 9,local_a0,0x18);
  local_88 = 0x18;
  local_84 = 0;
  local_8c = 0x18;
LAB_0008de80:
  local_9c = &local_60;
  iVar1 = (__n + 3 & 0xfffffffc) + 0xc;
  __n_00 = uVar4 + iVar1;
  __s_00 = (undefined1 *)FUN_0001db90(__n_00,1);
  memset(__s_00,0,__n_00);
  *__s_00 = (undefined1)param_1;
  uVar3 = (ushort)__n;
  if (param_1 == 0x42) {
    *(ushort *)(__s_00 + 2) = param_2 << 8 | param_2 >> 8;
    *(ushort *)(__s_00 + 4) = param_3 << 8 | param_3 >> 8;
    *(ushort *)(__s_00 + 6) = uVar3 << 8 | uVar3 >> 8;
    __s_00[8] = local_84;
    __s_00[9] = local_8c;
  }
  else {
    *(ushort *)(__s_00 + 2) = param_2;
    *(ushort *)(__s_00 + 6) = uVar3;
    *(ushort *)(__s_00 + 4) = param_3;
    __s_00[8] = local_8c;
    __s_00[9] = local_84;
  }
  memcpy(__s_00 + 0xc,__s,__n);
  memcpy(__s_00 + iVar1,local_a0,local_88);
  FUN_0001de10(local_9c,0x40);
  *param_9 = __n_00;
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return __s_00;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0008eb20();
}

