Function at 0x180191700
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov byte [rsp + 0x18], r8b
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xd10
mov qword [rsp + 0xa8], 0xfffffffffffffffe
mov rax, qword [0x18036d060]
xor rax, rsp
mov qword [rsp + 0xd00], rax
mov r15, r9
mov qword [rsp + 0x90], r9
movzx ebx, r8b
mov qword [rsp + 0xa0], rdx
mov qword [rsp + 0x88], rcx
mov qword [rsp + 0x98], rcx
mov qword [rsp + 0xb8], rdx
mov qword [rsp + 0x70], r9
mov rdi, qword [rsp + 0xd70]
mov qword [rsp + 0x60], rdi
xor esi, esi
mov qword [rsp + 0x80], rsi
mov qword [rsp + 0x78], rsi
mov ecx, 0x80000
call fcn.18007bb88
mov r14, rax
mov qword [rsp + 0x80], rax
mov ecx, 0x40000
call fcn.18007bb88
mov r13, rax
mov qword [rsp + 0x78], rax
mov rcx, qword [rsp + 0x88]
jmp 0x1801917ff
test r14, r14
je 0x180191de2
test r13, r13
je 0x180191de2
mov r12d, esi
mov dword [rsp + 0xb4], esi
mov byte [rsp + 0xb0], 0
nop dword [rax]
nop word [rax + rax]
movsxd rax, r12d
lea rdx, [rsp + 0xc0]
add rdx, rax
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], esi
mov qword [rsp + 0x28], r15
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0xb4]
mov r8d, 0x200
call fcn.180176e50
test al, al
je 0x180191dc2
mov ecx, dword [rsp + 0xb4]
mov dword [rsp + 0x58], ecx
test ecx, ecx
je 0x180191dc2
add r12d, ecx
mov dword [rsp + 0x44], r12d
cmp r12d, 3
mov rcx, qword [rsp + 0x88]
jl 0x180191830
test bl, bl
je 0x1801918cb
cmp byte [rsp + 0xc0], 0x1f
jne 0x1801918bf
cmp byte [rsp + 0xc1], 0x9d
jne 0x1801918bf
movzx edx, byte [rsp + 0xc2]
jmp 0x1801918d3
lea rdx, str.Invalid_header.
jmp 0x180191dc9
movzx edx, byte [rsp + 0xc0]
mov ecx, edx
and ecx, 0x1f
and edx, 0x80
mov dword [rsp + 0x68], edx
mov dword [rsp + 0x70], ecx
mov eax, 1
shl eax, cl
mov dword [rsp + 0x6c], eax
cmp ecx, 0x10
jbe 0x180191902
lea rdx, str.maxbits_too_large.
jmp 0x180191dc9
movsxd rax, r12d
mov qword [rsp + 0x98], rax
mov dword [rsp + 0x40], 9
mov dword [rsp + 0x54], 0x1ff
mov dword [rsp + 0x50], 0x1ff
mov edi, 0xffffffff
mov dword [rsp + 0x48], edi
mov r12d, esi
movzx ebx, bl
shl ebx, 4
add ebx, 8
xor r15d, r15d
test edx, edx
setne r15b
add r15d, 0x100
xor edx, edx
mov r8d, 0x100
mov rcx, r13
call fcn.180211600
mov eax, 0xff
lea rcx, [r14 + 0xff]
nop word [rax + rax]
mov byte [rcx], al
lea rcx, [rcx - 1]
sub eax, 1
jns 0x180191970
nop dword [rax + rax]
sar ebx, 3
mov r10d, dword [rsp + 0x44]
sub r10d, ebx
mov dword [rsp + 0x44], r10d
xor edx, edx
movsxd r8, r10d
test r10d, r10d
jle 0x1801919ba
movsxd r9, ebx
nop dword [rax]
lea rcx, [rsp + 0xc0]
add rcx, rdx
movzx eax, byte [rcx + r9]
mov byte [rcx], al
inc rdx
cmp rdx, r8
jl 0x1801919a0
xor ebx, ebx
cmp r10d, 0x40
jge 0x180191a32
lea rdx, [rsp + 0xc0]
add rdx, r8
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], ebx
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xb1]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0xb8]
mov r8d, 0x200
mov rcx, qword [rsp + 0x88]
call fcn.180176e50
test al, al
je 0x180191d34
mov ecx, dword [rsp + 0xb8]
mov dword [rsp + 0x58], ecx
mov r10d, dword [rsp + 0x44]
add r10d, ecx
mov dword [rsp + 0x44], r10d
jmp 0x180191a36
mov ecx, dword [rsp + 0x58]
mov r9d, dword [rsp + 0x40]
test ecx, ecx
jle 0x180191a50
mov eax, r10d
cdq
idiv r9d
mov eax, r10d
sub eax, edx
shl eax, 3
jmp 0x180191a5d
lea eax, [r10*8]
sub eax, r9d
inc eax
mov dword [rsp + 0x4c], eax
mov r10d, dword [rsp + 0x6c]
cmp eax, ebx
jle 0x180191ccf
cmp r15d, dword [rsp + 0x54]
jg 0x180191c7f
movsxd rax, ebx
sar rax, 3
lea rdx, [rsp + 0xc0]
add rdx, rax
movzx eax, byte [rdx + 2]
shl eax, 8
movzx ecx, byte [rdx + 1]
or eax, ecx
shl eax, 8
movzx ecx, byte [rdx]
or eax, ecx
mov ecx, ebx
and ecx, 7
sar eax, cl
and eax, dword [rsp + 0x50]
add ebx, r9d
mov dword [rsp + 0x80], ebx
cmp edi, 0xffffffff
jne 0x180191ad5
mov edi, eax
mov dword [rsp + 0x48], eax
mov r12d, eax
movsxd rcx, esi
mov byte [rsp + rcx + 0x300], al
inc esi
mov eax, dword [rsp + 0x4c]
jmp 0x180191a66
cmp eax, 0x100
jne 0x180191ae7
cmp dword [rsp + 0x68], 0
jne 0x180191c28
mov dword [rsp + 0x78], eax
lea rbx, [r14 + 0x7fffc]
cmp eax, r15d
jl 0x180191b05
jg 0x180191d8c
dec rbx
mov byte [rbx], r12b
mov eax, edi
cmp eax, 0x100
jl 0x180191b2a
nop dword [rax]
dec rbx
movsxd rcx, eax
movzx eax, byte [rcx + r14]
mov byte [rbx], al
movzx eax, word [r13 + rcx*2]
cmp eax, 0x100
jae 0x180191b10
movsxd rcx, eax
movzx r12d, byte [rcx + r14]
dec rbx
mov byte [rbx], r12b
mov eax, r14d
sub eax, ebx
add eax, 0x7fffc
lea edi, [rax + rsi]
cmp edi, 0x200
jl 0x180191bd2
mov edi, 0x200
sub edi, esi
cmp eax, edi
cmovle edi, eax
test edi, edi
jle 0x180191b7c
movsxd r8, edi
movsxd rax, esi
lea rcx, [rsp + 0x300]
add rcx, rax
mov rdx, rbx
call fcn.180210e90
add esi, edi
cmp esi, 0x200
jl 0x180191bbc
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x90]
mov r9, qword [rax + 8]
mov r8d, esi
lea rdx, [rsp + 0x300]
mov rcx, qword [rsp + 0xa0]
call fcn.180187fc0
test al, al
je 0x180191d9d
xor esi, esi
movsxd rax, edi
add rbx, rax
mov eax, r14d
sub eax, ebx
add eax, 0x7fffc
test eax, eax
jg 0x180191b51
jmp 0x180191bed
movsxd r8, eax
movsxd rax, esi
lea rcx, [rsp + 0x300]
add rcx, rax
mov rdx, rbx
call fcn.180210e90
mov esi, edi
mov r10d, dword [rsp + 0x6c]
cmp r15d, r10d
jge 0x180191c0b
movsxd rax, r15d
mov ecx, dword [rsp + 0x48]
mov word [r13 + rax*2], cx
mov byte [rax + r14], r12b
inc r15d
mov edi, dword [rsp + 0x78]
mov dword [rsp + 0x48], edi
mov ebx, dword [rsp + 0x80]
mov eax, dword [rsp + 0x4c]
mov r9d, dword [rsp + 0x40]
jmp 0x180191a66
xor edx, edx
mov r8d, 0x100
mov rcx, r13
call fcn.180211600
mov r15d, 0x100
mov ecx, dword [rsp + 0x40]
lea r8d, [rcx*8]
lea eax, [r8 - 1]
add eax, ebx
lea ecx, [rcx*8]
cdq
idiv ecx
sub r8d, edx
dec ebx
add ebx, r8d
mov dword [rsp + 0x40], 9
mov dword [rsp + 0x54], 0x1ff
mov dword [rsp + 0x50], 0x1ff
jmp 0x180191980
lea r8d, [r9*8]
lea eax, [rbx - 1]
add eax, r8d
lea ecx, [r9*8]
cdq
idiv ecx
sub r8d, edx
dec ebx
add ebx, r8d
inc r9d
mov dword [rsp + 0x40], r9d
mov ecx, r9d
mov eax, 1
shl eax, cl
lea ecx, [rax - 1]
mov dword [rsp + 0x50], ecx
dec eax
mov ecx, r10d
cmp r9d, dword [rsp + 0x70]
cmovne ecx, eax
mov dword [rsp + 0x54], ecx
jmp 0x180191980
movsxd rcx, dword [rsp + 0x58]
add qword [rsp + 0x98], rcx
test ecx, ecx
jg 0x180191980
test esi, esi
jle 0x180191dae
mov rbx, qword [rsp + 0x60]
mov qword [rsp + 0x20], rbx
mov rax, qword [rsp + 0x90]
mov r9, qword [rax + 8]
mov r8d, esi
lea rdx, [rsp + 0x300]
mov rcx, qword [rsp + 0xa0]
call fcn.180187fc0
test al, al
jne 0x180191dae
mov rax, qword [rbx]
lea rdx, str.Failed_to_write_final_amount_to_LZW_output.
mov rcx, rbx
jmp 0x180191dcf
mov rbx, qword [rsp + 0x60]
mov rax, qword [rbx]
lea rdx, str.Failed_to_read_more_from_LZW_source.
mov rcx, rbx
call qword [rax + 0x28]
movzx r8d, byte [rsp + 0xb1]
lea rdx, [0x1802c0510]
mov rcx, rbx
call fcn.180106220
xor r8d, r8d
lea rdx, str.readSuccess
mov rcx, rbx
call fcn.180106220
mov r8d, dword [rsp + 0xb8]
lea rdx, str.numBytesReceived
mov rcx, rbx
call fcn.180106220
jmp 0x180191dd2
mov rcx, qword [rsp + 0x60]
mov rax, qword [rcx]
lea rdx, str.Internal_LZW_failure.
jmp 0x180191dcf
mov rcx, qword [rsp + 0x60]
mov rax, qword [rcx]
lea rdx, str.Failed_to_write_more_to_LZW_output.
jmp 0x180191dcf
mov rcx, r14
call fcn.18007b164
mov rcx, r13
call fcn.18007b164
mov al, 1
jmp 0x180191de4
lea rdx, str.Failed_to_read_header.
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x28]
mov rcx, r14
call fcn.18007b164
mov rcx, r13
call fcn.18007b164
xor al, al
mov rcx, qword [rsp + 0xd00]
xor rcx, rsp
call fcn.18007b140
add rsp, 0xd10
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret