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

void share_xchannel_confirmation
               (ssh_sharing_connstate *cs,share_xchannel *xc,share_channel *chan,
               uint downstream_window)

{
  share_xchannel_message *ptr;
  int iVar1;
  uint uVar2;
  int iVar3;
  uchar *pkt;
  int in_GS_OFFSET;
  uchar window_adjust [8];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  ptr = xc->msghead;
  while (ptr != (share_xchannel_message *)0x0) {
    pkt = ptr->data;
    xc->msghead = ptr->next;
    iVar3 = ptr->datalen;
    if (3 < iVar3) {
      *pkt = (uchar)(chan->downstream_id >> 0x18);
      ptr->data[1] = (uchar)(chan->downstream_id >> 0x10);
      ptr->data[2] = (uchar)(chan->downstream_id >> 8);
      ptr->data[3] = (uchar)chan->downstream_id;
      iVar3 = ptr->datalen;
      pkt = ptr->data;
    }
    send_packet_to_downstream
              ((ssh_sharing_connstate *)&cs->sock,ptr->type,pkt,iVar3,chan,
               (share_channel *)&chan->downstream_maxpkt);
    safefree(ptr);
    ptr = xc->msghead;
  }
  uVar2 = xc->server_id;
  window_adjust._0_4_ =
       uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;
  iVar3 = downstream_window - xc->window;
  window_adjust[6] = (uchar)((uint)iVar3 >> 8);
  window_adjust[4] = (uchar)((uint)iVar3 >> 0x18);
  window_adjust[7] = (char)downstream_window - (char)xc->window;
  window_adjust[5] = (uchar)((uint)iVar3 >> 0x10);
  ssh_send_packet_from_downstream
            (cs->parent->ssh,cs->id,0x5d,window_adjust,8,
             "window adjustment after downstream accepted X channel");
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

void FUN_0005a5d0(int param_1,int param_2,undefined4 *param_3,int param_4)

{
  undefined4 *puVar1;
  undefined1 *puVar2;
  uint uVar3;
  int iVar4;
  int in_GS_OFFSET;
  uint local_28;
  undefined1 local_24;
  undefined1 local_23;
  undefined1 local_22;
  char local_21;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x5a5d9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  puVar1 = *(undefined4 **)(param_2 + 0x10);
  while (puVar1 != (undefined4 *)0x0) {
    puVar2 = (undefined1 *)puVar1[2];
    *(undefined4 *)(param_2 + 0x10) = *puVar1;
    iVar4 = puVar1[3];
    if (3 < iVar4) {
      *puVar2 = (char)((uint)*param_3 >> 0x18);
      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);
      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);
      *(char *)(puVar1[2] + 3) = (char)*param_3;
      iVar4 = puVar1[3];
    }
    FUN_000596b0(iVar4,param_3,param_3 + 3);
    FUN_0001d220(puVar1);
    puVar1 = *(undefined4 **)(param_2 + 0x10);
  }
  uVar3 = *(uint *)(param_2 + 4);
  local_28 = uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;
  iVar4 = param_4 - *(int *)(param_2 + 0xc);
  local_22 = (undefined1)((uint)iVar4 >> 8);
  local_24 = (undefined1)((uint)iVar4 >> 0x18);
  local_21 = (char)param_4 - (char)*(int *)(param_2 + 0xc);
  local_23 = (undefined1)((uint)iVar4 >> 0x10);
  FUN_00034aa0(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,
               &local_28,8,"window adjustment after downstream accepted X channel");
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006dad0();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00015fa0
ADD EBX,0x4a797
SUB ESP,0x2c
MOV EAX,dword ptr [ESP + 0x40]
MOV EBP,dword ptr [ESP + 0x44]
MOV EDI,dword ptr [ESP + 0x48]
MOV dword ptr [ESP + 0xc],EAX
MOV ESI,dword ptr [EBP + 0x10]
ADD EAX,0x8
MOV ECX,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x1c],ECX
XOR ECX,ECX
MOV dword ptr [ESP + 0x4],EAX
LEA EAX,[EDI + 0xc]
MOV dword ptr [ESP + 0x8],EAX
TEST ESI,ESI
JZ 0x0005a677
LEA ESI,[ESI]
MOV EAX,dword ptr [ESI]
MOV ECX,dword ptr [ESI + 0x8]
MOV dword ptr [EBP + 0x10],EAX
MOV EAX,dword ptr [ESI + 0xc]
CMP EAX,0x3
JLE 0x0005a650
MOV EAX,dword ptr [EDI]
SHR EAX,0x18
MOV byte ptr [ECX],AL
MOV EAX,dword ptr [EDI]
MOV EDX,dword ptr [ESI + 0x8]
SHR EAX,0x10
MOV byte ptr [EDX + 0x1],AL
MOV EAX,dword ptr [ESI + 0x8]
MOV EDX,dword ptr [EDI]
MOV byte ptr [EAX + 0x2],DH
MOV EAX,dword ptr [ESI + 0x8]
MOV EDX,dword ptr [EDI]
MOV byte ptr [EAX + 0x3],DL
MOV EAX,dword ptr [ESI + 0xc]
MOV ECX,dword ptr [ESI + 0x8]
SUB ESP,0x4
MOV EDX,dword ptr [ESI + 0x4]
PUSH dword ptr [ESP + 0xc]
PUSH EDI
PUSH EAX
MOV EAX,dword ptr [ESP + 0x14]
CALL 0x000596b0
MOV dword ptr [ESP],ESI
CALL 0x0001d220
MOV ESI,dword ptr [EBP + 0x10]
ADD ESP,0x10
TEST ESI,ESI
JNZ 0x0005a618
MOV EAX,dword ptr [EBP + 0x4]
MOV EDX,dword ptr [EBP + 0xc]
SUB ESP,0x8
BSWAP EAX
MOV dword ptr [ESP + 0x1c],EAX
MOV EAX,dword ptr [ESP + 0x54]
SUB EAX,EDX
MOV ECX,EAX
MOV byte ptr [ESP + 0x22],AH
SHR ECX,0x18
MOV byte ptr [ESP + 0x20],CL
MOV ECX,EAX
MOVZX EAX,byte ptr [ESP + 0x54]
SHR ECX,0x10
SUB EAX,EDX
MOV byte ptr [ESP + 0x21],CL
MOV byte ptr [ESP + 0x23],AL
LEA EAX,[EBX + 0xfffd62b4]
PUSH EAX
PUSH 0x8
LEA EAX,[ESP + 0x24]
PUSH EAX
PUSH 0x5d
MOV EAX,dword ptr [ESP + 0x24]
PUSH dword ptr [EAX + 0x4]
MOV EAX,dword ptr [EAX + 0xc]
PUSH dword ptr [EAX + 0x14]
CALL 0x00034aa0
ADD ESP,0x20
MOV EAX,dword ptr [ESP + 0x1c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x0005a6e7
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x0006dad0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0005a5d0(int param_1,int param_2,undefined4 *param_3,int param_4)\n\n{\n  undefined4 *puVar1;\n  undefined1 *puVar2;\n  uint uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  uint local_28;\n  undefined1 local_24;\n  undefined1 local_23;\n  undefined1 local_22;\n  char local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a5d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = *(undefined4 **)(param_2 + 0x10);\n  while (puVar1 != (undefined4 *)0x0) {\n    puVar2 = (undefined1 *)puVar1[2];\n    *(undefined4 *)(param_2 + 0x10) = *puVar1;\n    iVar4 = puVar1[3];\n    if (3 < iVar4) {\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }\n    FUN_000596b0(iVar4,param_3,param_3 + 3);\n    FUN_0001d220(puVar1);\n    puVar1 = *(undefined4 **)(param_2 + 0x10);\n  }\n  uVar3 = *(uint *)(param_2 + 4);\n  local_28 = uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;\n  iVar4 = param_4 - *(int *)(param_2 + 0xc);\n  local_22 = (undefined1)((uint)iVar4 >> 8);\n  local_24 = (undefined1)((uint)iVar4 >> 0x18);\n  local_21 = (char)param_4 - (char)*(int *)(param_2 + 0xc);\n  local_23 = (undefined1)((uint)iVar4 >> 0x10);\n  FUN_00034aa0(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,\n               &local_28,8,"window adjustment after downstream accepted X channel");\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006dad0();\n}\n\n" comment (function_definition "void FUN_0005a5d0(int param_1,int param_2,undefined4 *param_3,int param_4)\n\n{\n  undefined4 *puVar1;\n  undefined1 *puVar2;\n  uint uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  uint local_28;\n  undefined1 local_24;\n  undefined1 local_23;\n  undefined1 local_22;\n  char local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a5d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = *(undefined4 **)(param_2 + 0x10);\n  while (puVar1 != (undefined4 *)0x0) {\n    puVar2 = (undefined1 *)puVar1[2];\n    *(undefined4 *)(param_2 + 0x10) = *puVar1;\n    iVar4 = puVar1[3];\n    if (3 < iVar4) {\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }\n    FUN_000596b0(iVar4,param_3,param_3 + 3);\n    FUN_0001d220(puVar1);\n    puVar1 = *(undefined4 **)(param_2 + 0x10);\n  }\n  uVar3 = *(uint *)(param_2 + 4);\n  local_28 = uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;\n  iVar4 = param_4 - *(int *)(param_2 + 0xc);\n  local_22 = (undefined1)((uint)iVar4 >> 8);\n  local_24 = (undefined1)((uint)iVar4 >> 0x18);\n  local_21 = (char)param_4 - (char)*(int *)(param_2 + 0xc);\n  local_23 = (undefined1)((uint)iVar4 >> 0x10);\n  FUN_00034aa0(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,\n               &local_28,8,"window adjustment after downstream accepted X channel");\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006dad0();\n}" primitive_type (function_declarator "FUN_0005a5d0(int param_1,int param_2,undefined4 *param_3,int param_4)" identifier (parameter_list "(int param_1,int param_2,undefined4 *param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined1 *puVar2;\n  uint uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  uint local_28;\n  undefined1 local_24;\n  undefined1 local_23;\n  undefined1 local_22;\n  char local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a5d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = *(undefined4 **)(param_2 + 0x10);\n  while (puVar1 != (undefined4 *)0x0) {\n    puVar2 = (undefined1 *)puVar1[2];\n    *(undefined4 *)(param_2 + 0x10) = *puVar1;\n    iVar4 = puVar1[3];\n    if (3 < iVar4) {\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }\n    FUN_000596b0(iVar4,param_3,param_3 + 3);\n    FUN_0001d220(puVar1);\n    puVar1 = *(undefined4 **)(param_2 + 0x10);\n  }\n  uVar3 = *(uint *)(param_2 + 4);\n  local_28 = uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;\n  iVar4 = param_4 - *(int *)(param_2 + 0xc);\n  local_22 = (undefined1)((uint)iVar4 >> 8);\n  local_24 = (undefined1)((uint)iVar4 >> 0x18);\n  local_21 = (char)param_4 - (char)*(int *)(param_2 + 0xc);\n  local_23 = (undefined1)((uint)iVar4 >> 0x10);\n  FUN_00034aa0(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,\n               &local_28,8,"window adjustment after downstream accepted X channel");\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006dad0();\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint local_28;" type_identifier identifier ;) (declaration "undefined1 local_24;" type_identifier identifier ;) (declaration "undefined1 local_23;" type_identifier identifier ;) (declaration "undefined1 local_22;" type_identifier identifier ;) (declaration "char local_21;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x5a5d9;" (assignment_expression "uStack_14 = 0x5a5d9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "puVar1 = *(undefined4 **)(param_2 + 0x10);" (assignment_expression "puVar1 = *(undefined4 **)(param_2 + 0x10)" identifier = (pointer_expression "*(undefined4 **)(param_2 + 0x10)" * (cast_expression "(undefined4 **)(param_2 + 0x10)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) ))))) ;) (while_statement "while (puVar1 != (undefined4 *)0x0) {\n    puVar2 = (undefined1 *)puVar1[2];\n    *(undefined4 *)(param_2 + 0x10) = *puVar1;\n    iVar4 = puVar1[3];\n    if (3 < iVar4) {\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }\n    FUN_000596b0(iVar4,param_3,param_3 + 3);\n    FUN_0001d220(puVar1);\n    puVar1 = *(undefined4 **)(param_2 + 0x10);\n  }" while (parenthesized_expression "(puVar1 != (undefined4 *)0x0)" ( (binary_expression "puVar1 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar2 = (undefined1 *)puVar1[2];\n    *(undefined4 *)(param_2 + 0x10) = *puVar1;\n    iVar4 = puVar1[3];\n    if (3 < iVar4) {\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }\n    FUN_000596b0(iVar4,param_3,param_3 + 3);\n    FUN_0001d220(puVar1);\n    puVar1 = *(undefined4 **)(param_2 + 0x10);\n  }" { (expression_statement "puVar2 = (undefined1 *)puVar1[2];" (assignment_expression "puVar2 = (undefined1 *)puVar1[2]" identifier = (cast_expression "(undefined1 *)puVar1[2]" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ]))) ;) (expression_statement "*(undefined4 *)(param_2 + 0x10) = *puVar1;" (assignment_expression "*(undefined4 *)(param_2 + 0x10) = *puVar1" (pointer_expression "*(undefined4 *)(param_2 + 0x10)" * (cast_expression "(undefined4 *)(param_2 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) = (pointer_expression "*puVar1" * identifier)) ;) (expression_statement "iVar4 = puVar1[3];" (assignment_expression "iVar4 = puVar1[3]" identifier = (subscript_expression "puVar1[3]" identifier [ number_literal ])) ;) (if_statement "if (3 < iVar4) {\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }" if (parenthesized_expression "(3 < iVar4)" ( (binary_expression "3 < iVar4" number_literal < identifier) )) (compound_statement "{\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }" { (expression_statement "*puVar2 = (char)((uint)*param_3 >> 0x18);" (assignment_expression "*puVar2 = (char)((uint)*param_3 >> 0x18)" (pointer_expression "*puVar2" * identifier) = (cast_expression "(char)((uint)*param_3 >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)*param_3 >> 0x18)" ( (binary_expression "(uint)*param_3 >> 0x18" (binary_expression "(uint)*param_3" (parenthesized_expression "(uint)" ( identifier )) * identifier) >> number_literal) )))) ;) (expression_statement "*(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);" (assignment_expression "*(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10)" (pointer_expression "*(char *)(puVar1[2] + 1)" * (cast_expression "(char *)(puVar1[2] + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1[2] + 1)" ( (binary_expression "puVar1[2] + 1" (subscript_expression "puVar1[2]" identifier [ number_literal ]) + number_literal) )))) = (cast_expression "(char)((uint)*param_3 >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)*param_3 >> 0x10)" ( (binary_expression "(uint)*param_3 >> 0x10" (binary_expression "(uint)*param_3" (parenthesized_expression "(uint)" ( identifier )) * identifier) >> number_literal) )))) ;) (expression_statement "*(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);" (assignment_expression "*(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8)" (pointer_expression "*(char *)(puVar1[2] + 2)" * (cast_expression "(char *)(puVar1[2] + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1[2] + 2)" ( (binary_expression "puVar1[2] + 2" (subscript_expression "puVar1[2]" identifier [ number_literal ]) + number_literal) )))) = (cast_expression "(char)((uint)*param_3 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)*param_3 >> 8)" ( (binary_expression "(uint)*param_3 >> 8" (binary_expression "(uint)*param_3" (parenthesized_expression "(uint)" ( identifier )) * identifier) >> number_literal) )))) ;) (expression_statement "*(char *)(puVar1[2] + 3) = (char)*param_3;" (assignment_expression "*(char *)(puVar1[2] + 3) = (char)*param_3" (pointer_expression "*(char *)(puVar1[2] + 3)" * (cast_expression "(char *)(puVar1[2] + 3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1[2] + 3)" ( (binary_expression "puVar1[2] + 3" (subscript_expression "puVar1[2]" identifier [ number_literal ]) + number_literal) )))) = (cast_expression "(char)*param_3" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*param_3" * identifier))) ;) (expression_statement "iVar4 = puVar1[3];" (assignment_expression "iVar4 = puVar1[3]" identifier = (subscript_expression "puVar1[3]" identifier [ number_literal ])) ;) })) (expression_statement "FUN_000596b0(iVar4,param_3,param_3 + 3);" (call_expression "FUN_000596b0(iVar4,param_3,param_3 + 3)" identifier (argument_list "(iVar4,param_3,param_3 + 3)" ( identifier , identifier , (binary_expression "param_3 + 3" identifier + number_literal) ))) ;) (expression_statement "FUN_0001d220(puVar1);" (call_expression "FUN_0001d220(puVar1)" identifier (argument_list "(puVar1)" ( identifier ))) ;) (expression_statement "puVar1 = *(undefined4 **)(param_2 + 0x10);" (assignment_expression "puVar1 = *(undefined4 **)(param_2 + 0x10)" identifier = (pointer_expression "*(undefined4 **)(param_2 + 0x10)" * (cast_expression "(undefined4 **)(param_2 + 0x10)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) ))))) ;) })) (expression_statement "uVar3 = *(uint *)(param_2 + 4);" (assignment_expression "uVar3 = *(uint *)(param_2 + 4)" identifier = (pointer_expression "*(uint *)(param_2 + 4)" * (cast_expression "(uint *)(param_2 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) ))))) ;) (expression_statement "local_28 = uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;" (assignment_expression "local_28 = uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18" 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 "iVar4 = param_4 - *(int *)(param_2 + 0xc);" (assignment_expression "iVar4 = param_4 - *(int *)(param_2 + 0xc)" identifier = (binary_expression "param_4 - *(int *)(param_2 + 0xc)" identifier - (pointer_expression "*(int *)(param_2 + 0xc)" * (cast_expression "(int *)(param_2 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xc)" ( (binary_expression "param_2 + 0xc" identifier + number_literal) )))))) ;) (expression_statement "local_22 = (undefined1)((uint)iVar4 >> 8);" (assignment_expression "local_22 = (undefined1)((uint)iVar4 >> 8)" identifier = (call_expression "(undefined1)((uint)iVar4 >> 8)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "((uint)iVar4 >> 8)" ( (binary_expression "(uint)iVar4 >> 8" (cast_expression "(uint)iVar4" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "local_24 = (undefined1)((uint)iVar4 >> 0x18);" (assignment_expression "local_24 = (undefined1)((uint)iVar4 >> 0x18)" identifier = (call_expression "(undefined1)((uint)iVar4 >> 0x18)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "((uint)iVar4 >> 0x18)" ( (binary_expression "(uint)iVar4 >> 0x18" (cast_expression "(uint)iVar4" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "local_21 = (char)param_4 - (char)*(int *)(param_2 + 0xc);" (assignment_expression "local_21 = (char)param_4 - (char)*(int *)(param_2 + 0xc)" identifier = (binary_expression "(char)param_4 - (char)*(int *)(param_2 + 0xc)" (cast_expression "(char)param_4" ( (type_descriptor "char" primitive_type) ) identifier) - (cast_expression "(char)*(int *)(param_2 + 0xc)" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*(int *)(param_2 + 0xc)" * (cast_expression "(int *)(param_2 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xc)" ( (binary_expression "param_2 + 0xc" identifier + number_literal) ))))))) ;) (expression_statement "local_23 = (undefined1)((uint)iVar4 >> 0x10);" (assignment_expression "local_23 = (undefined1)((uint)iVar4 >> 0x10)" identifier = (call_expression "(undefined1)((uint)iVar4 >> 0x10)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "((uint)iVar4 >> 0x10)" ( (binary_expression "(uint)iVar4 >> 0x10" (cast_expression "(uint)iVar4" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "FUN_00034aa0(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,\n               &local_28,8,"window adjustment after downstream accepted X channel");" (call_expression "FUN_00034aa0(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,\n               &local_28,8,"window adjustment after downstream accepted X channel")" identifier (argument_list "(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,\n               &local_28,8,"window adjustment after downstream accepted X channel")" ( (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14)" * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0xc) + 0x14)" ( (binary_expression "*(int *)(param_1 + 0xc) + 0x14" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) , number_literal , (pointer_expression "&local_28" & identifier) , number_literal , (string_literal ""window adjustment after downstream accepted X channel"" " string_content ") ))) ;) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\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;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_0006dad0();" (call_expression "FUN_0006dad0()" 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/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid share_xchannel_confirmation\n               (ssh_sharing_connstate *cs,share_xchannel *xc,share_channel *chan,\n               uint downstream_window)\n\n{\n  share_xchannel_message *ptr;\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  uchar *pkt;\n  int in_GS_OFFSET;\n  uchar window_adjust [8];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  ptr = xc->msghead;\n  while (ptr != (share_xchannel_message *)0x0) {\n    pkt = ptr->data;\n    xc->msghead = ptr->next;\n    iVar3 = ptr->datalen;\n    if (3 < iVar3) {\n      *pkt = (uchar)(chan->downstream_id >> 0x18);\n      ptr->data[1] = (uchar)(chan->downstream_id >> 0x10);\n      ptr->data[2] = (uchar)(chan->downstream_id >> 8);\n      ptr->data[3] = (uchar)chan->downstream_id;\n      iVar3 = ptr->datalen;\n      pkt = ptr->data;\n    }\n    send_packet_to_downstream\n              ((ssh_sharing_connstate *)&cs->sock,ptr->type,pkt,iVar3,chan,\n               (share_channel *)&chan->downstream_maxpkt);\n    safefree(ptr);\n    ptr = xc->msghead;\n  }\n  uVar2 = xc->server_id;\n  window_adjust._0_4_ =\n       uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n  iVar3 = downstream_window - xc->window;\n  window_adjust[6] = (uchar)((uint)iVar3 >> 8);\n  window_adjust[4] = (uchar)((uint)iVar3 >> 0x18);\n  window_adjust[7] = (char)downstream_window - (char)xc->window;\n  window_adjust[5] = (uchar)((uint)iVar3 >> 0x10);\n  ssh_send_packet_from_downstream\n            (cs->parent->ssh,cs->id,0x5d,window_adjust,8,\n             "window adjustment after downstream accepted X channel");\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment comment (function_definition "void share_xchannel_confirmation\n               (ssh_sharing_connstate *cs,share_xchannel *xc,share_channel *chan,\n               uint downstream_window)\n\n{\n  share_xchannel_message *ptr;\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  uchar *pkt;\n  int in_GS_OFFSET;\n  uchar window_adjust [8];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  ptr = xc->msghead;\n  while (ptr != (share_xchannel_message *)0x0) {\n    pkt = ptr->data;\n    xc->msghead = ptr->next;\n    iVar3 = ptr->datalen;\n    if (3 < iVar3) {\n      *pkt = (uchar)(chan->downstream_id >> 0x18);\n      ptr->data[1] = (uchar)(chan->downstream_id >> 0x10);\n      ptr->data[2] = (uchar)(chan->downstream_id >> 8);\n      ptr->data[3] = (uchar)chan->downstream_id;\n      iVar3 = ptr->datalen;\n      pkt = ptr->data;\n    }\n    send_packet_to_downstream\n              ((ssh_sharing_connstate *)&cs->sock,ptr->type,pkt,iVar3,chan,\n               (share_channel *)&chan->downstream_maxpkt);\n    safefree(ptr);\n    ptr = xc->msghead;\n  }\n  uVar2 = xc->server_id;\n  window_adjust._0_4_ =\n       uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n  iVar3 = downstream_window - xc->window;\n  window_adjust[6] = (uchar)((uint)iVar3 >> 8);\n  window_adjust[4] = (uchar)((uint)iVar3 >> 0x18);\n  window_adjust[7] = (char)downstream_window - (char)xc->window;\n  window_adjust[5] = (uchar)((uint)iVar3 >> 0x10);\n  ssh_send_packet_from_downstream\n            (cs->parent->ssh,cs->id,0x5d,window_adjust,8,\n             "window adjustment after downstream accepted X channel");\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "share_xchannel_confirmation\n               (ssh_sharing_connstate *cs,share_xchannel *xc,share_channel *chan,\n               uint downstream_window)" identifier (parameter_list "(ssh_sharing_connstate *cs,share_xchannel *xc,share_channel *chan,\n               uint downstream_window)" ( (parameter_declaration "ssh_sharing_connstate *cs" type_identifier (pointer_declarator "*cs" * identifier)) , (parameter_declaration "share_xchannel *xc" type_identifier (pointer_declarator "*xc" * identifier)) , (parameter_declaration "share_channel *chan" type_identifier (pointer_declarator "*chan" * identifier)) , (parameter_declaration "uint downstream_window" type_identifier identifier) ))) (compound_statement "{\n  share_xchannel_message *ptr;\n  int iVar1;\n  uint uVar2;\n  int iVar3;\n  uchar *pkt;\n  int in_GS_OFFSET;\n  uchar window_adjust [8];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  ptr = xc->msghead;\n  while (ptr != (share_xchannel_message *)0x0) {\n    pkt = ptr->data;\n    xc->msghead = ptr->next;\n    iVar3 = ptr->datalen;\n    if (3 < iVar3) {\n      *pkt = (uchar)(chan->downstream_id >> 0x18);\n      ptr->data[1] = (uchar)(chan->downstream_id >> 0x10);\n      ptr->data[2] = (uchar)(chan->downstream_id >> 8);\n      ptr->data[3] = (uchar)chan->downstream_id;\n      iVar3 = ptr->datalen;\n      pkt = ptr->data;\n    }\n    send_packet_to_downstream\n              ((ssh_sharing_connstate *)&cs->sock,ptr->type,pkt,iVar3,chan,\n               (share_channel *)&chan->downstream_maxpkt);\n    safefree(ptr);\n    ptr = xc->msghead;\n  }\n  uVar2 = xc->server_id;\n  window_adjust._0_4_ =\n       uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;\n  iVar3 = downstream_window - xc->window;\n  window_adjust[6] = (uchar)((uint)iVar3 >> 8);\n  window_adjust[4] = (uchar)((uint)iVar3 >> 0x18);\n  window_adjust[7] = (char)downstream_window - (char)xc->window;\n  window_adjust[5] = (uchar)((uint)iVar3 >> 0x10);\n  ssh_send_packet_from_downstream\n            (cs->parent->ssh,cs->id,0x5d,window_adjust,8,\n             "window adjustment after downstream accepted X channel");\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "share_xchannel_message *ptr;" type_identifier (pointer_declarator "*ptr" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uchar *pkt;" type_identifier (pointer_declarator "*pkt" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uchar window_adjust [8];" type_identifier (array_declarator "window_adjust [8]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "ptr = xc->msghead;" (assignment_expression "ptr = xc->msghead" identifier = (field_expression "xc->msghead" identifier -> field_identifier)) ;) (while_statement "while (ptr != (share_xchannel_message *)0x0) {\n    pkt = ptr->data;\n    xc->msghead = ptr->next;\n    iVar3 = ptr->datalen;\n    if (3 < iVar3) {\n      *pkt = (uchar)(chan->downstream_id >> 0x18);\n      ptr->data[1] = (uchar)(chan->downstream_id >> 0x10);\n      ptr->data[2] = (uchar)(chan->downstream_id >> 8);\n      ptr->data[3] = (uchar)chan->downstream_id;\n      iVar3 = ptr->datalen;\n      pkt = ptr->data;\n    }\n    send_packet_to_downstream\n              ((ssh_sharing_connstate *)&cs->sock,ptr->type,pkt,iVar3,chan,\n               (share_channel *)&chan->downstream_maxpkt);\n    safefree(ptr);\n    ptr = xc->msghead;\n  }" while (parenthesized_expression "(ptr != (share_xchannel_message *)0x0)" ( (binary_expression "ptr != (share_xchannel_message *)0x0" identifier != (cast_expression "(share_xchannel_message *)0x0" ( (type_descriptor "share_xchannel_message *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pkt = ptr->data;\n    xc->msghead = ptr->next;\n    iVar3 = ptr->datalen;\n    if (3 < iVar3) {\n      *pkt = (uchar)(chan->downstream_id >> 0x18);\n      ptr->data[1] = (uchar)(chan->downstream_id >> 0x10);\n      ptr->data[2] = (uchar)(chan->downstream_id >> 8);\n      ptr->data[3] = (uchar)chan->downstream_id;\n      iVar3 = ptr->datalen;\n      pkt = ptr->data;\n    }\n    send_packet_to_downstream\n              ((ssh_sharing_connstate *)&cs->sock,ptr->type,pkt,iVar3,chan,\n               (share_channel *)&chan->downstream_maxpkt);\n    safefree(ptr);\n    ptr = xc->msghead;\n  }" { (expression_statement "pkt = ptr->data;" (assignment_expression "pkt = ptr->data" identifier = (field_expression "ptr->data" identifier -> field_identifier)) ;) (expression_statement "xc->msghead = ptr->next;" (assignment_expression "xc->msghead = ptr->next" (field_expression "xc->msghead" identifier -> field_identifier) = (field_expression "ptr->next" identifier -> field_identifier)) ;) (expression_statement "iVar3 = ptr->datalen;" (assignment_expression "iVar3 = ptr->datalen" identifier = (field_expression "ptr->datalen" identifier -> field_identifier)) ;) (if_statement "if (3 < iVar3) {\n      *pkt = (uchar)(chan->downstream_id >> 0x18);\n      ptr->data[1] = (uchar)(chan->downstream_id >> 0x10);\n      ptr->data[2] = (uchar)(chan->downstream_id >> 8);\n      ptr->data[3] = (uchar)chan->downstream_id;\n      iVar3 = ptr->datalen;\n      pkt = ptr->data;\n    }" if (parenthesized_expression "(3 < iVar3)" ( (binary_expression "3 < iVar3" number_literal < identifier) )) (compound_statement "{\n      *pkt = (uchar)(chan->downstream_id >> 0x18);\n      ptr->data[1] = (uchar)(chan->downstream_id >> 0x10);\n      ptr->data[2] = (uchar)(chan->downstream_id >> 8);\n      ptr->data[3] = (uchar)chan->downstream_id;\n      iVar3 = ptr->datalen;\n      pkt = ptr->data;\n    }" { (expression_statement "*pkt = (uchar)(chan->downstream_id >> 0x18);" (assignment_expression "*pkt = (uchar)(chan->downstream_id >> 0x18)" (pointer_expression "*pkt" * identifier) = (call_expression "(uchar)(chan->downstream_id >> 0x18)" (parenthesized_expression "(uchar)" ( identifier )) (argument_list "(chan->downstream_id >> 0x18)" ( (binary_expression "chan->downstream_id >> 0x18" (field_expression "chan->downstream_id" identifier -> field_identifier) >> number_literal) )))) ;) (expression_statement "ptr->data[1] = (uchar)(chan->downstream_id >> 0x10);" (assignment_expression "ptr->data[1] = (uchar)(chan->downstream_id >> 0x10)" (subscript_expression "ptr->data[1]" (field_expression "ptr->data" identifier -> field_identifier) [ number_literal ]) = (call_expression "(uchar)(chan->downstream_id >> 0x10)" (parenthesized_expression "(uchar)" ( identifier )) (argument_list "(chan->downstream_id >> 0x10)" ( (binary_expression "chan->downstream_id >> 0x10" (field_expression "chan->downstream_id" identifier -> field_identifier) >> number_literal) )))) ;) (expression_statement "ptr->data[2] = (uchar)(chan->downstream_id >> 8);" (assignment_expression "ptr->data[2] = (uchar)(chan->downstream_id >> 8)" (subscript_expression "ptr->data[2]" (field_expression "ptr->data" identifier -> field_identifier) [ number_literal ]) = (call_expression "(uchar)(chan->downstream_id >> 8)" (parenthesized_expression "(uchar)" ( identifier )) (argument_list "(chan->downstream_id >> 8)" ( (binary_expression "chan->downstream_id >> 8" (field_expression "chan->downstream_id" identifier -> field_identifier) >> number_literal) )))) ;) (expression_statement "ptr->data[3] = (uchar)chan->downstream_id;" (assignment_expression "ptr->data[3] = (uchar)chan->downstream_id" (subscript_expression "ptr->data[3]" (field_expression "ptr->data" identifier -> field_identifier) [ number_literal ]) = (cast_expression "(uchar)chan->downstream_id" ( (type_descriptor "uchar" type_identifier) ) (field_expression "chan->downstream_id" identifier -> field_identifier))) ;) (expression_statement "iVar3 = ptr->datalen;" (assignment_expression "iVar3 = ptr->datalen" identifier = (field_expression "ptr->datalen" identifier -> field_identifier)) ;) (expression_statement "pkt = ptr->data;" (assignment_expression "pkt = ptr->data" identifier = (field_expression "ptr->data" identifier -> field_identifier)) ;) })) (expression_statement "send_packet_to_downstream\n              ((ssh_sharing_connstate *)&cs->sock,ptr->type,pkt,iVar3,chan,\n               (share_channel *)&chan->downstream_maxpkt);" (call_expression "send_packet_to_downstream\n              ((ssh_sharing_connstate *)&cs->sock,ptr->type,pkt,iVar3,chan,\n               (share_channel *)&chan->downstream_maxpkt)" identifier (argument_list "((ssh_sharing_connstate *)&cs->sock,ptr->type,pkt,iVar3,chan,\n               (share_channel *)&chan->downstream_maxpkt)" ( (cast_expression "(ssh_sharing_connstate *)&cs->sock" ( (type_descriptor "ssh_sharing_connstate *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&cs->sock" & (field_expression "cs->sock" identifier -> field_identifier))) , (field_expression "ptr->type" identifier -> field_identifier) , identifier , identifier , identifier , (cast_expression "(share_channel *)&chan->downstream_maxpkt" ( (type_descriptor "share_channel *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&chan->downstream_maxpkt" & (field_expression "chan->downstream_maxpkt" identifier -> field_identifier))) ))) ;) (expression_statement "safefree(ptr);" (call_expression "safefree(ptr)" identifier (argument_list "(ptr)" ( identifier ))) ;) (expression_statement "ptr = xc->msghead;" (assignment_expression "ptr = xc->msghead" identifier = (field_expression "xc->msghead" identifier -> field_identifier)) ;) })) (expression_statement "uVar2 = xc->server_id;" (assignment_expression "uVar2 = xc->server_id" identifier = (field_expression "xc->server_id" identifier -> field_identifier)) ;) (expression_statement "window_adjust._0_4_ =\n       uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18;" (assignment_expression "window_adjust._0_4_ =\n       uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18" (field_expression "window_adjust._0_4_" identifier . field_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 "iVar3 = downstream_window - xc->window;" (assignment_expression "iVar3 = downstream_window - xc->window" identifier = (binary_expression "downstream_window - xc->window" identifier - (field_expression "xc->window" identifier -> field_identifier))) ;) (expression_statement "window_adjust[6] = (uchar)((uint)iVar3 >> 8);" (assignment_expression "window_adjust[6] = (uchar)((uint)iVar3 >> 8)" (subscript_expression "window_adjust[6]" identifier [ number_literal ]) = (call_expression "(uchar)((uint)iVar3 >> 8)" (parenthesized_expression "(uchar)" ( identifier )) (argument_list "((uint)iVar3 >> 8)" ( (binary_expression "(uint)iVar3 >> 8" (cast_expression "(uint)iVar3" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "window_adjust[4] = (uchar)((uint)iVar3 >> 0x18);" (assignment_expression "window_adjust[4] = (uchar)((uint)iVar3 >> 0x18)" (subscript_expression "window_adjust[4]" identifier [ number_literal ]) = (call_expression "(uchar)((uint)iVar3 >> 0x18)" (parenthesized_expression "(uchar)" ( identifier )) (argument_list "((uint)iVar3 >> 0x18)" ( (binary_expression "(uint)iVar3 >> 0x18" (cast_expression "(uint)iVar3" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "window_adjust[7] = (char)downstream_window - (char)xc->window;" (assignment_expression "window_adjust[7] = (char)downstream_window - (char)xc->window" (subscript_expression "window_adjust[7]" identifier [ number_literal ]) = (binary_expression "(char)downstream_window - (char)xc->window" (cast_expression "(char)downstream_window" ( (type_descriptor "char" primitive_type) ) identifier) - (cast_expression "(char)xc->window" ( (type_descriptor "char" primitive_type) ) (field_expression "xc->window" identifier -> field_identifier)))) ;) (expression_statement "window_adjust[5] = (uchar)((uint)iVar3 >> 0x10);" (assignment_expression "window_adjust[5] = (uchar)((uint)iVar3 >> 0x10)" (subscript_expression "window_adjust[5]" identifier [ number_literal ]) = (call_expression "(uchar)((uint)iVar3 >> 0x10)" (parenthesized_expression "(uchar)" ( identifier )) (argument_list "((uint)iVar3 >> 0x10)" ( (binary_expression "(uint)iVar3 >> 0x10" (cast_expression "(uint)iVar3" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "ssh_send_packet_from_downstream\n            (cs->parent->ssh,cs->id,0x5d,window_adjust,8,\n             "window adjustment after downstream accepted X channel");" (call_expression "ssh_send_packet_from_downstream\n            (cs->parent->ssh,cs->id,0x5d,window_adjust,8,\n             "window adjustment after downstream accepted X channel")" identifier (argument_list "(cs->parent->ssh,cs->id,0x5d,window_adjust,8,\n             "window adjustment after downstream accepted X channel")" ( (field_expression "cs->parent->ssh" (field_expression "cs->parent" identifier -> field_identifier) -> field_identifier) , (field_expression "cs->id" identifier -> field_identifier) , number_literal , identifier , number_literal , (string_literal ""window adjustment after downstream accepted X channel"" " string_content ") ))) ;) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\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;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void FUN_0005a5d0(int param_1,int param_2,undefined4 *param_3,int param_4)\n\n{\n  undefined4 *puVar1;\n  undefined1 *puVar2;\n  uint uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  uint local_28;\n  undefined1 local_24;\n  undefined1 local_23;\n  undefined1 local_22;\n  char local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a5d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = *(undefined4 **)(param_2 + 0x10);\n  while (puVar1 != (undefined4 *)0x0) {\n    puVar2 = (undefined1 *)puVar1[2];\n    *(undefined4 *)(param_2 + 0x10) = *puVar1;\n    iVar4 = puVar1[3];\n    if (3 < iVar4) {\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }\n    FUN_000596b0(iVar4,param_3,param_3 + 3);\n    FUN_0001d220(puVar1);\n    puVar1 = *(undefined4 **)(param_2 + 0x10);\n  }\n  uVar3 = *(uint *)(param_2 + 4);\n  local_28 = uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;\n  iVar4 = param_4 - *(int *)(param_2 + 0xc);\n  local_22 = (undefined1)((uint)iVar4 >> 8);\n  local_24 = (undefined1)((uint)iVar4 >> 0x18);\n  local_21 = (char)param_4 - (char)*(int *)(param_2 + 0xc);\n  local_23 = (undefined1)((uint)iVar4 >> 0x10);\n  FUN_00034aa0(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,\n               &local_28,8,"window adjustment after downstream accepted X channel");\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006dad0();\n}\n\n" (function_definition "void FUN_0005a5d0(int param_1,int param_2,undefined4 *param_3,int param_4)\n\n{\n  undefined4 *puVar1;\n  undefined1 *puVar2;\n  uint uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  uint local_28;\n  undefined1 local_24;\n  undefined1 local_23;\n  undefined1 local_22;\n  char local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a5d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = *(undefined4 **)(param_2 + 0x10);\n  while (puVar1 != (undefined4 *)0x0) {\n    puVar2 = (undefined1 *)puVar1[2];\n    *(undefined4 *)(param_2 + 0x10) = *puVar1;\n    iVar4 = puVar1[3];\n    if (3 < iVar4) {\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }\n    FUN_000596b0(iVar4,param_3,param_3 + 3);\n    FUN_0001d220(puVar1);\n    puVar1 = *(undefined4 **)(param_2 + 0x10);\n  }\n  uVar3 = *(uint *)(param_2 + 4);\n  local_28 = uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;\n  iVar4 = param_4 - *(int *)(param_2 + 0xc);\n  local_22 = (undefined1)((uint)iVar4 >> 8);\n  local_24 = (undefined1)((uint)iVar4 >> 0x18);\n  local_21 = (char)param_4 - (char)*(int *)(param_2 + 0xc);\n  local_23 = (undefined1)((uint)iVar4 >> 0x10);\n  FUN_00034aa0(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,\n               &local_28,8,"window adjustment after downstream accepted X channel");\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006dad0();\n}" primitive_type (function_declarator "FUN_0005a5d0(int param_1,int param_2,undefined4 *param_3,int param_4)" identifier (parameter_list "(int param_1,int param_2,undefined4 *param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined1 *puVar2;\n  uint uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  uint local_28;\n  undefined1 local_24;\n  undefined1 local_23;\n  undefined1 local_22;\n  char local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a5d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = *(undefined4 **)(param_2 + 0x10);\n  while (puVar1 != (undefined4 *)0x0) {\n    puVar2 = (undefined1 *)puVar1[2];\n    *(undefined4 *)(param_2 + 0x10) = *puVar1;\n    iVar4 = puVar1[3];\n    if (3 < iVar4) {\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }\n    FUN_000596b0(iVar4,param_3,param_3 + 3);\n    FUN_0001d220(puVar1);\n    puVar1 = *(undefined4 **)(param_2 + 0x10);\n  }\n  uVar3 = *(uint *)(param_2 + 4);\n  local_28 = uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;\n  iVar4 = param_4 - *(int *)(param_2 + 0xc);\n  local_22 = (undefined1)((uint)iVar4 >> 8);\n  local_24 = (undefined1)((uint)iVar4 >> 0x18);\n  local_21 = (char)param_4 - (char)*(int *)(param_2 + 0xc);\n  local_23 = (undefined1)((uint)iVar4 >> 0x10);\n  FUN_00034aa0(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,\n               &local_28,8,"window adjustment after downstream accepted X channel");\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006dad0();\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint local_28;" type_identifier identifier ;) (declaration "undefined1 local_24;" type_identifier identifier ;) (declaration "undefined1 local_23;" type_identifier identifier ;) (declaration "undefined1 local_22;" type_identifier identifier ;) (declaration "char local_21;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x5a5d9;" (assignment_expression "uStack_14 = 0x5a5d9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "puVar1 = *(undefined4 **)(param_2 + 0x10);" (assignment_expression "puVar1 = *(undefined4 **)(param_2 + 0x10)" identifier = (pointer_expression "*(undefined4 **)(param_2 + 0x10)" * (cast_expression "(undefined4 **)(param_2 + 0x10)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) ))))) ;) (while_statement "while (puVar1 != (undefined4 *)0x0) {\n    puVar2 = (undefined1 *)puVar1[2];\n    *(undefined4 *)(param_2 + 0x10) = *puVar1;\n    iVar4 = puVar1[3];\n    if (3 < iVar4) {\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }\n    FUN_000596b0(iVar4,param_3,param_3 + 3);\n    FUN_0001d220(puVar1);\n    puVar1 = *(undefined4 **)(param_2 + 0x10);\n  }" while (parenthesized_expression "(puVar1 != (undefined4 *)0x0)" ( (binary_expression "puVar1 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar2 = (undefined1 *)puVar1[2];\n    *(undefined4 *)(param_2 + 0x10) = *puVar1;\n    iVar4 = puVar1[3];\n    if (3 < iVar4) {\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }\n    FUN_000596b0(iVar4,param_3,param_3 + 3);\n    FUN_0001d220(puVar1);\n    puVar1 = *(undefined4 **)(param_2 + 0x10);\n  }" { (expression_statement "puVar2 = (undefined1 *)puVar1[2];" (assignment_expression "puVar2 = (undefined1 *)puVar1[2]" identifier = (cast_expression "(undefined1 *)puVar1[2]" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ]))) ;) (expression_statement "*(undefined4 *)(param_2 + 0x10) = *puVar1;" (assignment_expression "*(undefined4 *)(param_2 + 0x10) = *puVar1" (pointer_expression "*(undefined4 *)(param_2 + 0x10)" * (cast_expression "(undefined4 *)(param_2 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) = (pointer_expression "*puVar1" * identifier)) ;) (expression_statement "iVar4 = puVar1[3];" (assignment_expression "iVar4 = puVar1[3]" identifier = (subscript_expression "puVar1[3]" identifier [ number_literal ])) ;) (if_statement "if (3 < iVar4) {\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }" if (parenthesized_expression "(3 < iVar4)" ( (binary_expression "3 < iVar4" number_literal < identifier) )) (compound_statement "{\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }" { (expression_statement "*puVar2 = (char)((uint)*param_3 >> 0x18);" (assignment_expression "*puVar2 = (char)((uint)*param_3 >> 0x18)" (pointer_expression "*puVar2" * identifier) = (cast_expression "(char)((uint)*param_3 >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)*param_3 >> 0x18)" ( (binary_expression "(uint)*param_3 >> 0x18" (binary_expression "(uint)*param_3" (parenthesized_expression "(uint)" ( identifier )) * identifier) >> number_literal) )))) ;) (expression_statement "*(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);" (assignment_expression "*(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10)" (pointer_expression "*(char *)(puVar1[2] + 1)" * (cast_expression "(char *)(puVar1[2] + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1[2] + 1)" ( (binary_expression "puVar1[2] + 1" (subscript_expression "puVar1[2]" identifier [ number_literal ]) + number_literal) )))) = (cast_expression "(char)((uint)*param_3 >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)*param_3 >> 0x10)" ( (binary_expression "(uint)*param_3 >> 0x10" (binary_expression "(uint)*param_3" (parenthesized_expression "(uint)" ( identifier )) * identifier) >> number_literal) )))) ;) (expression_statement "*(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);" (assignment_expression "*(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8)" (pointer_expression "*(char *)(puVar1[2] + 2)" * (cast_expression "(char *)(puVar1[2] + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1[2] + 2)" ( (binary_expression "puVar1[2] + 2" (subscript_expression "puVar1[2]" identifier [ number_literal ]) + number_literal) )))) = (cast_expression "(char)((uint)*param_3 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)*param_3 >> 8)" ( (binary_expression "(uint)*param_3 >> 8" (binary_expression "(uint)*param_3" (parenthesized_expression "(uint)" ( identifier )) * identifier) >> number_literal) )))) ;) (expression_statement "*(char *)(puVar1[2] + 3) = (char)*param_3;" (assignment_expression "*(char *)(puVar1[2] + 3) = (char)*param_3" (pointer_expression "*(char *)(puVar1[2] + 3)" * (cast_expression "(char *)(puVar1[2] + 3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1[2] + 3)" ( (binary_expression "puVar1[2] + 3" (subscript_expression "puVar1[2]" identifier [ number_literal ]) + number_literal) )))) = (cast_expression "(char)*param_3" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*param_3" * identifier))) ;) (expression_statement "iVar4 = puVar1[3];" (assignment_expression "iVar4 = puVar1[3]" identifier = (subscript_expression "puVar1[3]" identifier [ number_literal ])) ;) })) (expression_statement "FUN_000596b0(iVar4,param_3,param_3 + 3);" (call_expression "FUN_000596b0(iVar4,param_3,param_3 + 3)" identifier (argument_list "(iVar4,param_3,param_3 + 3)" ( identifier , identifier , (binary_expression "param_3 + 3" identifier + number_literal) ))) ;) (expression_statement "FUN_0001d220(puVar1);" (call_expression "FUN_0001d220(puVar1)" identifier (argument_list "(puVar1)" ( identifier ))) ;) (expression_statement "puVar1 = *(undefined4 **)(param_2 + 0x10);" (assignment_expression "puVar1 = *(undefined4 **)(param_2 + 0x10)" identifier = (pointer_expression "*(undefined4 **)(param_2 + 0x10)" * (cast_expression "(undefined4 **)(param_2 + 0x10)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) ))))) ;) })) (expression_statement "uVar3 = *(uint *)(param_2 + 4);" (assignment_expression "uVar3 = *(uint *)(param_2 + 4)" identifier = (pointer_expression "*(uint *)(param_2 + 4)" * (cast_expression "(uint *)(param_2 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) ))))) ;) (expression_statement "local_28 = uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;" (assignment_expression "local_28 = uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18" 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 "iVar4 = param_4 - *(int *)(param_2 + 0xc);" (assignment_expression "iVar4 = param_4 - *(int *)(param_2 + 0xc)" identifier = (binary_expression "param_4 - *(int *)(param_2 + 0xc)" identifier - (pointer_expression "*(int *)(param_2 + 0xc)" * (cast_expression "(int *)(param_2 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xc)" ( (binary_expression "param_2 + 0xc" identifier + number_literal) )))))) ;) (expression_statement "local_22 = (undefined1)((uint)iVar4 >> 8);" (assignment_expression "local_22 = (undefined1)((uint)iVar4 >> 8)" identifier = (call_expression "(undefined1)((uint)iVar4 >> 8)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "((uint)iVar4 >> 8)" ( (binary_expression "(uint)iVar4 >> 8" (cast_expression "(uint)iVar4" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "local_24 = (undefined1)((uint)iVar4 >> 0x18);" (assignment_expression "local_24 = (undefined1)((uint)iVar4 >> 0x18)" identifier = (call_expression "(undefined1)((uint)iVar4 >> 0x18)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "((uint)iVar4 >> 0x18)" ( (binary_expression "(uint)iVar4 >> 0x18" (cast_expression "(uint)iVar4" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "local_21 = (char)param_4 - (char)*(int *)(param_2 + 0xc);" (assignment_expression "local_21 = (char)param_4 - (char)*(int *)(param_2 + 0xc)" identifier = (binary_expression "(char)param_4 - (char)*(int *)(param_2 + 0xc)" (cast_expression "(char)param_4" ( (type_descriptor "char" primitive_type) ) identifier) - (cast_expression "(char)*(int *)(param_2 + 0xc)" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*(int *)(param_2 + 0xc)" * (cast_expression "(int *)(param_2 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xc)" ( (binary_expression "param_2 + 0xc" identifier + number_literal) ))))))) ;) (expression_statement "local_23 = (undefined1)((uint)iVar4 >> 0x10);" (assignment_expression "local_23 = (undefined1)((uint)iVar4 >> 0x10)" identifier = (call_expression "(undefined1)((uint)iVar4 >> 0x10)" (parenthesized_expression "(undefined1)" ( identifier )) (argument_list "((uint)iVar4 >> 0x10)" ( (binary_expression "(uint)iVar4 >> 0x10" (cast_expression "(uint)iVar4" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) )))) ;) (expression_statement "FUN_00034aa0(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,\n               &local_28,8,"window adjustment after downstream accepted X channel");" (call_expression "FUN_00034aa0(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,\n               &local_28,8,"window adjustment after downstream accepted X channel")" identifier (argument_list "(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,\n               &local_28,8,"window adjustment after downstream accepted X channel")" ( (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14)" * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0xc) + 0x14)" ( (binary_expression "*(int *)(param_1 + 0xc) + 0x14" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) , number_literal , (pointer_expression "&local_28" & identifier) , number_literal , (string_literal ""window adjustment after downstream accepted X channel"" " string_content ") ))) ;) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\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;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_0006dad0();" (call_expression "FUN_0006dad0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * IDENT) >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * IDENT) >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * IDENT) >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT + LIT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + 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 (assignment_expression IDENT = (binary_expression IDENT - (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , (pointer_expression & IDENT) , LIT , (string_literal " string_content ") ))) ;) (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 ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void FUN_0005a5d0(int param_1,int param_2,undefined4 *param_3,int param_4)\n\n{\n  undefined4 *puVar1;\n  undefined1 *puVar2;\n  uint uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  uint local_28;\n  undefined1 local_24;\n  undefined1 local_23;\n  undefined1 local_22;\n  char local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a5d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = *(undefined4 **)(param_2 + 0x10);\n  while (puVar1 != (undefined4 *)0x0) {\n    puVar2 = (undefined1 *)puVar1[2];\n    *(undefined4 *)(param_2 + 0x10) = *puVar1;\n    iVar4 = puVar1[3];\n    if (3 < iVar4) {\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }\n    FUN_000596b0(iVar4,param_3,param_3 + 3);\n    FUN_0001d220(puVar1);\n    puVar1 = *(undefined4 **)(param_2 + 0x10);\n  }\n  uVar3 = *(uint *)(param_2 + 4);\n  local_28 = uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;\n  iVar4 = param_4 - *(int *)(param_2 + 0xc);\n  local_22 = (undefined1)((uint)iVar4 >> 8);\n  local_24 = (undefined1)((uint)iVar4 >> 0x18);\n  local_21 = (char)param_4 - (char)*(int *)(param_2 + 0xc);\n  local_23 = (undefined1)((uint)iVar4 >> 0x10);\n  FUN_00034aa0(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,\n               &local_28,8,"window adjustment after downstream accepted X channel");\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006dad0();\n}" (primitive_type "void") (function_declarator "FUN_0005a5d0(int param_1,int param_2,undefined4 *param_3,int param_4)" (identifier "FUN_0005a5d0") (parameter_list "(int param_1,int param_2,undefined4 *param_3,int param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 *param_3" (type_identifier "undefined4") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined1 *puVar2;\n  uint uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  uint local_28;\n  undefined1 local_24;\n  undefined1 local_23;\n  undefined1 local_22;\n  char local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5a5d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = *(undefined4 **)(param_2 + 0x10);\n  while (puVar1 != (undefined4 *)0x0) {\n    puVar2 = (undefined1 *)puVar1[2];\n    *(undefined4 *)(param_2 + 0x10) = *puVar1;\n    iVar4 = puVar1[3];\n    if (3 < iVar4) {\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }\n    FUN_000596b0(iVar4,param_3,param_3 + 3);\n    FUN_0001d220(puVar1);\n    puVar1 = *(undefined4 **)(param_2 + 0x10);\n  }\n  uVar3 = *(uint *)(param_2 + 4);\n  local_28 = uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;\n  iVar4 = param_4 - *(int *)(param_2 + 0xc);\n  local_22 = (undefined1)((uint)iVar4 >> 8);\n  local_24 = (undefined1)((uint)iVar4 >> 0x18);\n  local_21 = (char)param_4 - (char)*(int *)(param_2 + 0xc);\n  local_23 = (undefined1)((uint)iVar4 >> 0x10);\n  FUN_00034aa0(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,\n               &local_28,8,"window adjustment after downstream accepted X channel");\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006dad0();\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined1 *puVar2;" (type_identifier "undefined1") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "uint local_28;" (type_identifier "uint") (identifier "local_28") (; ";")) (declaration "undefined1 local_24;" (type_identifier "undefined1") (identifier "local_24") (; ";")) (declaration "undefined1 local_23;" (type_identifier "undefined1") (identifier "local_23") (; ";")) (declaration "undefined1 local_22;" (type_identifier "undefined1") (identifier "local_22") (; ";")) (declaration "char local_21;" (primitive_type "char") (identifier "local_21") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x5a5d9;" (assignment_expression "uStack_14 = 0x5a5d9" (identifier "uStack_14") (= "=") (number_literal "0x5a5d9")) (; ";")) (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 "puVar1 = *(undefined4 **)(param_2 + 0x10);" (assignment_expression "puVar1 = *(undefined4 **)(param_2 + 0x10)" (identifier "puVar1") (= "=") (pointer_expression "*(undefined4 **)(param_2 + 0x10)" (* "*") (cast_expression "(undefined4 **)(param_2 + 0x10)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (while_statement "while (puVar1 != (undefined4 *)0x0) {\n    puVar2 = (undefined1 *)puVar1[2];\n    *(undefined4 *)(param_2 + 0x10) = *puVar1;\n    iVar4 = puVar1[3];\n    if (3 < iVar4) {\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }\n    FUN_000596b0(iVar4,param_3,param_3 + 3);\n    FUN_0001d220(puVar1);\n    puVar1 = *(undefined4 **)(param_2 + 0x10);\n  }" (while "while") (parenthesized_expression "(puVar1 != (undefined4 *)0x0)" (( "(") (binary_expression "puVar1 != (undefined4 *)0x0" (identifier "puVar1") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    puVar2 = (undefined1 *)puVar1[2];\n    *(undefined4 *)(param_2 + 0x10) = *puVar1;\n    iVar4 = puVar1[3];\n    if (3 < iVar4) {\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }\n    FUN_000596b0(iVar4,param_3,param_3 + 3);\n    FUN_0001d220(puVar1);\n    puVar1 = *(undefined4 **)(param_2 + 0x10);\n  }" ({ "{") (expression_statement "puVar2 = (undefined1 *)puVar1[2];" (assignment_expression "puVar2 = (undefined1 *)puVar1[2]" (identifier "puVar2") (= "=") (cast_expression "(undefined1 *)puVar1[2]" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")))) (; ";")) (expression_statement "*(undefined4 *)(param_2 + 0x10) = *puVar1;" (assignment_expression "*(undefined4 *)(param_2 + 0x10) = *puVar1" (pointer_expression "*(undefined4 *)(param_2 + 0x10)" (* "*") (cast_expression "(undefined4 *)(param_2 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (pointer_expression "*puVar1" (* "*") (identifier "puVar1"))) (; ";")) (expression_statement "iVar4 = puVar1[3];" (assignment_expression "iVar4 = puVar1[3]" (identifier "iVar4") (= "=") (subscript_expression "puVar1[3]" (identifier "puVar1") ([ "[") (number_literal "3") (] "]"))) (; ";")) (if_statement "if (3 < iVar4) {\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }" (if "if") (parenthesized_expression "(3 < iVar4)" (( "(") (binary_expression "3 < iVar4" (number_literal "3") (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n      *puVar2 = (char)((uint)*param_3 >> 0x18);\n      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);\n      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);\n      *(char *)(puVar1[2] + 3) = (char)*param_3;\n      iVar4 = puVar1[3];\n    }" ({ "{") (expression_statement "*puVar2 = (char)((uint)*param_3 >> 0x18);" (assignment_expression "*puVar2 = (char)((uint)*param_3 >> 0x18)" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (cast_expression "(char)((uint)*param_3 >> 0x18)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)*param_3 >> 0x18)" (( "(") (binary_expression "(uint)*param_3 >> 0x18" (binary_expression "(uint)*param_3" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "param_3")) (>> ">>") (number_literal "0x18")) () ")")))) (; ";")) (expression_statement "*(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);" (assignment_expression "*(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10)" (pointer_expression "*(char *)(puVar1[2] + 1)" (* "*") (cast_expression "(char *)(puVar1[2] + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1[2] + 1)" (( "(") (binary_expression "puVar1[2] + 1" (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) (+ "+") (number_literal "1")) () ")")))) (= "=") (cast_expression "(char)((uint)*param_3 >> 0x10)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)*param_3 >> 0x10)" (( "(") (binary_expression "(uint)*param_3 >> 0x10" (binary_expression "(uint)*param_3" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "param_3")) (>> ">>") (number_literal "0x10")) () ")")))) (; ";")) (expression_statement "*(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);" (assignment_expression "*(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8)" (pointer_expression "*(char *)(puVar1[2] + 2)" (* "*") (cast_expression "(char *)(puVar1[2] + 2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1[2] + 2)" (( "(") (binary_expression "puVar1[2] + 2" (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) (+ "+") (number_literal "2")) () ")")))) (= "=") (cast_expression "(char)((uint)*param_3 >> 8)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)*param_3 >> 8)" (( "(") (binary_expression "(uint)*param_3 >> 8" (binary_expression "(uint)*param_3" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "param_3")) (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "*(char *)(puVar1[2] + 3) = (char)*param_3;" (assignment_expression "*(char *)(puVar1[2] + 3) = (char)*param_3" (pointer_expression "*(char *)(puVar1[2] + 3)" (* "*") (cast_expression "(char *)(puVar1[2] + 3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1[2] + 3)" (( "(") (binary_expression "puVar1[2] + 3" (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) (+ "+") (number_literal "3")) () ")")))) (= "=") (cast_expression "(char)*param_3" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*param_3" (* "*") (identifier "param_3")))) (; ";")) (expression_statement "iVar4 = puVar1[3];" (assignment_expression "iVar4 = puVar1[3]" (identifier "iVar4") (= "=") (subscript_expression "puVar1[3]" (identifier "puVar1") ([ "[") (number_literal "3") (] "]"))) (; ";")) (} "}"))) (expression_statement "FUN_000596b0(iVar4,param_3,param_3 + 3);" (call_expression "FUN_000596b0(iVar4,param_3,param_3 + 3)" (identifier "FUN_000596b0") (argument_list "(iVar4,param_3,param_3 + 3)" (( "(") (identifier "iVar4") (, ",") (identifier "param_3") (, ",") (binary_expression "param_3 + 3" (identifier "param_3") (+ "+") (number_literal "3")) () ")"))) (; ";")) (expression_statement "FUN_0001d220(puVar1);" (call_expression "FUN_0001d220(puVar1)" (identifier "FUN_0001d220") (argument_list "(puVar1)" (( "(") (identifier "puVar1") () ")"))) (; ";")) (expression_statement "puVar1 = *(undefined4 **)(param_2 + 0x10);" (assignment_expression "puVar1 = *(undefined4 **)(param_2 + 0x10)" (identifier "puVar1") (= "=") (pointer_expression "*(undefined4 **)(param_2 + 0x10)" (* "*") (cast_expression "(undefined4 **)(param_2 + 0x10)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (} "}"))) (expression_statement "uVar3 = *(uint *)(param_2 + 4);" (assignment_expression "uVar3 = *(uint *)(param_2 + 4)" (identifier "uVar3") (= "=") (pointer_expression "*(uint *)(param_2 + 4)" (* "*") (cast_expression "(uint *)(param_2 + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 4)" (( "(") (binary_expression "param_2 + 4" (identifier "param_2") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "local_28 = uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;" (assignment_expression "local_28 = uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18" (identifier "local_28") (= "=") (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 "uVar3") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(uVar3 & 0xff0000) >> 8" (parenthesized_expression "(uVar3 & 0xff0000)" (( "(") (binary_expression "uVar3 & 0xff0000" (identifier "uVar3") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(uVar3 & 0xff00) << 8" (parenthesized_expression "(uVar3 & 0xff00)" (( "(") (binary_expression "uVar3 & 0xff00" (identifier "uVar3") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "uVar3 << 0x18" (identifier "uVar3") (<< "<<") (number_literal "0x18")))) (; ";")) (expression_statement "iVar4 = param_4 - *(int *)(param_2 + 0xc);" (assignment_expression "iVar4 = param_4 - *(int *)(param_2 + 0xc)" (identifier "iVar4") (= "=") (binary_expression "param_4 - *(int *)(param_2 + 0xc)" (identifier "param_4") (- "-") (pointer_expression "*(int *)(param_2 + 0xc)" (* "*") (cast_expression "(int *)(param_2 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0xc)" (( "(") (binary_expression "param_2 + 0xc" (identifier "param_2") (+ "+") (number_literal "0xc")) () ")")))))) (; ";")) (expression_statement "local_22 = (undefined1)((uint)iVar4 >> 8);" (assignment_expression "local_22 = (undefined1)((uint)iVar4 >> 8)" (identifier "local_22") (= "=") (call_expression "(undefined1)((uint)iVar4 >> 8)" (parenthesized_expression "(undefined1)" (( "(") (identifier "undefined1") () ")")) (argument_list "((uint)iVar4 >> 8)" (( "(") (binary_expression "(uint)iVar4 >> 8" (cast_expression "(uint)iVar4" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "iVar4")) (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "local_24 = (undefined1)((uint)iVar4 >> 0x18);" (assignment_expression "local_24 = (undefined1)((uint)iVar4 >> 0x18)" (identifier "local_24") (= "=") (call_expression "(undefined1)((uint)iVar4 >> 0x18)" (parenthesized_expression "(undefined1)" (( "(") (identifier "undefined1") () ")")) (argument_list "((uint)iVar4 >> 0x18)" (( "(") (binary_expression "(uint)iVar4 >> 0x18" (cast_expression "(uint)iVar4" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "iVar4")) (>> ">>") (number_literal "0x18")) () ")")))) (; ";")) (expression_statement "local_21 = (char)param_4 - (char)*(int *)(param_2 + 0xc);" (assignment_expression "local_21 = (char)param_4 - (char)*(int *)(param_2 + 0xc)" (identifier "local_21") (= "=") (binary_expression "(char)param_4 - (char)*(int *)(param_2 + 0xc)" (cast_expression "(char)param_4" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "param_4")) (- "-") (cast_expression "(char)*(int *)(param_2 + 0xc)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*(int *)(param_2 + 0xc)" (* "*") (cast_expression "(int *)(param_2 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0xc)" (( "(") (binary_expression "param_2 + 0xc" (identifier "param_2") (+ "+") (number_literal "0xc")) () ")"))))))) (; ";")) (expression_statement "local_23 = (undefined1)((uint)iVar4 >> 0x10);" (assignment_expression "local_23 = (undefined1)((uint)iVar4 >> 0x10)" (identifier "local_23") (= "=") (call_expression "(undefined1)((uint)iVar4 >> 0x10)" (parenthesized_expression "(undefined1)" (( "(") (identifier "undefined1") () ")")) (argument_list "((uint)iVar4 >> 0x10)" (( "(") (binary_expression "(uint)iVar4 >> 0x10" (cast_expression "(uint)iVar4" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "iVar4")) (>> ">>") (number_literal "0x10")) () ")")))) (; ";")) (expression_statement "FUN_00034aa0(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,\n               &local_28,8,"window adjustment after downstream accepted X channel");" (call_expression "FUN_00034aa0(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,\n               &local_28,8,"window adjustment after downstream accepted X channel")" (identifier "FUN_00034aa0") (argument_list "(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,\n               &local_28,8,"window adjustment after downstream accepted X channel")" (( "(") (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14)" (* "*") (cast_expression "(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0xc) + 0x14)" (( "(") (binary_expression "*(int *)(param_1 + 0xc) + 0x14" (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (+ "+") (number_literal "0x14")) () ")")))) (, ",") (pointer_expression "*(undefined4 *)(param_1 + 4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (, ",") (number_literal "0x5d") (, ",") (pointer_expression "&local_28" (& "&") (identifier "local_28")) (, ",") (number_literal "8") (, ",") (string_literal ""window adjustment after downstream accepted X channel"" (" """) (string_content "window adjustment after downstream accepted X channel") (" """)) () ")"))) (; ";")) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\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;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0006dad0();" (call_expression "FUN_0006dad0()" (identifier "FUN_0006dad0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

void function_1
               (type_1 *cs,type_2 *xc,type_3 *chan,
               type_4 var_7)

{
  type_5 *var_2;
  int var_9;
  type_4 var_6;
  int var_3;
  type_6 *pkt;
  int var_1;
  type_6 window_adjust [8];
  
  var_9 = *(int *)(var_1 + 0x14);
  var_2 = xc->msghead;
  while (var_2 != (type_5 *)0x0) {
    pkt = var_2->data;
    xc->msghead = var_2->next;
    var_3 = var_2->datalen;
    if (3 < var_3) {
      *pkt = (type_6)(chan->downstream_id >> 0x18);
      var_2->data[1] = (type_6)(chan->downstream_id >> 0x10);
      var_2->data[2] = (type_6)(chan->downstream_id >> 8);
      var_2->data[3] = (type_6)chan->downstream_id;
      var_3 = var_2->datalen;
      pkt = var_2->data;
    }
    var_4
              ((type_1 *)&cs->sock,var_2->type,pkt,var_3,chan,
               (type_3 *)&chan->downstream_maxpkt);
    var_5(var_2);
    var_2 = xc->msghead;
  }
  var_6 = xc->server_id;
  window_adjust._0_4_ =
       var_6 >> 0x18 | (var_6 & 0xff0000) >> 8 | (var_6 & 0xff00) << 8 | var_6 << 0x18;
  var_3 = var_7 - xc->window;
  window_adjust[6] = (type_6)((type_4)var_3 >> 8);
  window_adjust[4] = (type_6)((type_4)var_3 >> 0x18);
  window_adjust[7] = (char)var_7 - (char)xc->window;
  window_adjust[5] = (type_6)((type_4)var_3 >> 0x10);
  var_8
            (cs->parent->ssh,cs->id,0x5d,window_adjust,8,
             "window adjustment after downstream accepted X channel");
  if (var_9 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_10();
}


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

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

void MASKED(int param_1,int param_2,undefined4 *param_3,int param_4)

{
  undefined4 *puVar1;
  undefined1 *puVar2;
  uint uVar3;
  int iVar4;
  int in_GS_OFFSET;
  uint local_28;
  undefined1 local_24;
  undefined1 local_23;
  undefined1 local_22;
  char local_21;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x5a5d9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  puVar1 = *(undefined4 **)(param_2 + 0x10);
  while (puVar1 != (undefined4 *)0x0) {
    puVar2 = (undefined1 *)puVar1[2];
    *(undefined4 *)(param_2 + 0x10) = *puVar1;
    iVar4 = puVar1[3];
    if (3 < iVar4) {
      *puVar2 = (char)((uint)*param_3 >> 0x18);
      *(char *)(puVar1[2] + 1) = (char)((uint)*param_3 >> 0x10);
      *(char *)(puVar1[2] + 2) = (char)((uint)*param_3 >> 8);
      *(char *)(puVar1[2] + 3) = (char)*param_3;
      iVar4 = puVar1[3];
    }
    FUN_000596b0(iVar4,param_3,param_3 + 3);
    FUN_0001d220(puVar1);
    puVar1 = *(undefined4 **)(param_2 + 0x10);
  }
  uVar3 = *(uint *)(param_2 + 4);
  local_28 = uVar3 >> 0x18 | (uVar3 & 0xff0000) >> 8 | (uVar3 & 0xff00) << 8 | uVar3 << 0x18;
  iVar4 = param_4 - *(int *)(param_2 + 0xc);
  local_22 = (undefined1)((uint)iVar4 >> 8);
  local_24 = (undefined1)((uint)iVar4 >> 0x18);
  local_21 = (char)param_4 - (char)*(int *)(param_2 + 0xc);
  local_23 = (undefined1)((uint)iVar4 >> 0x10);
  FUN_00034aa0(*(undefined4 *)(*(int *)(param_1 + 0xc) + 0x14),*(undefined4 *)(param_1 + 4),0x5d,
               &local_28,8,"window adjustment after downstream accepted X channel");
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006dad0();
}

