Function at 0x180034880
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r14
mov eax, 0x1830
call fcn.180044c30
sub rsp, rax
mov esi, ecx
mov rbp, r9
mov ecx, 0x80000
mov r12, r8
mov edi, edx
call fcn.18001d300
mov r14, rax
test rax, rax
jne 0x1800348c4
add rsp, 0x1830
pop r14
pop r12
pop rdi
pop rsi
pop rbp
ret
mov qword [rsp + 0x1860], rbx
lea rdx, [rax + 2]
xor ebx, ebx
mov r8d, 0x8000
mov ecx, ebx
nop word [rax + rax]
mov eax, ecx
lea rdx, [rdx + 0x10]
sar eax, 0xa
mov byte [rdx - 0x12], al
mov eax, ecx
sar eax, 5
and al, 0x1f
mov byte [rdx - 0x11], al
movzx eax, cl
and al, 0x1f
inc ecx
mov byte [rdx - 0x10], al
mov dword [rdx - 0xe], ebx
cmp ecx, r8d
jl 0x1800348e0
imul esi, edi
test esi, esi
jle 0x180034966
mov rax, qword [rsp + 0x1880]
mov r10, rbp
mov r11, qword [rsp + 0x1888]
sub r10, rax
sub r11, rax
mov r9d, esi
mov rdx, rax
nop
movzx eax, byte [r11 + rdx]
movzx ecx, byte [r10 + rdx]
lea rdx, [rdx + 1]
shr eax, 3
shl ecx, 7
and ecx, 0xfffffc00
add ecx, eax
movzx eax, byte [rdx - 1]
shl eax, 2
and eax, 0xffffffe0
add eax, ecx
add rax, rax
inc dword [r14 + rax*8 + 4]
sub r9, 1
jne 0x180034930
lea rdx, [rsp + 0x38]
mov r9d, 0x100
nop dword [rax]
nop word [rax + rax]
mov qword [rdx + 8], rbx
lea rax, [rdx - 5]
mov qword [rdx], rbx
mov ecx, 3
mov byte [rax - 3], bl
mov byte [rax], 0xff
lea rax, [rax + 1]
sub rcx, 1
jne 0x180034990
add rdx, 0x18
sub r9, 1
jne 0x180034980
mov ecx, ebx
nop dword [rax]
movsxd rax, ecx
add rax, rax
cmp dword [r14 + rax*8 + 4], ebx
jg 0x1800349c4
inc ecx
cmp ecx, r8d
jl 0x1800349b0
movsxd rdx, ecx
mov r9d, 1
shl rdx, 4
inc ecx
add rdx, r14
mov qword [rsp + 0x40], rdx
cmp ecx, r8d
jge 0x180034a09
movsxd rax, ecx
shl rax, 4
add rax, r14
sub r8d, ecx
mov ecx, r8d
cmp dword [rax + 4], ebx
jle 0x1800349ff
mov qword [rdx + 8], rax
inc r9d
mov rdx, rax
add rax, 0x10
sub rcx, 1
jne 0x1800349f0
mov qword [rdx + 8], rbx
lea r8, [rsp + 0x20]
mov edx, dword [r12]
lea rcx, [rsp + 0x30]
mov dword [rsp + 0x38], r9d
mov dword [rsp + 0x3c], esi
mov dword [rsp + 0x20], 1
call fcn.180034d30
cmp eax, 1
je 0x180034a45
mov rcx, r14
call fcn.18001d2f0
xor eax, eax
jmp 0x180034c82
mov eax, dword [r12]
mov qword [rsp + 0x1868], r13
mov r13, qword [rsp + 0x1898]
mov qword [rsp + 0x1878], r15
mov r15d, dword [rsp + 0x20]
cmp r15d, eax
jae 0x180034a8e
mov edx, r15d
jge 0x180034a8e
movsxd rcx, edx
inc edx
lea rax, [rcx*2]
add rax, r13
mov word [rcx + rax + 1], bx
mov byte [rcx + rax], bl
cmp edx, dword [r12]
jl 0x180034a70
mov r8d, ebx
test r15d, r15d
je 0x180034b35
nop word [rax + rax]
movsxd r11, r8d
lea rax, [r11 + r11*2]
mov edi, dword [rsp + rax*8 + 0x38]
test edi, edi
jle 0x180034b29
mov rax, qword [rsp + rax*8 + 0x40]
mov r9d, ebx
mov r10d, ebx
mov edx, ebx
test rax, rax
je 0x180034af0
nop dword [rax]
nop word [rax + rax]
mov byte [rax + 3], r8b
movzx ecx, byte [rax]
add edx, ecx
movzx ecx, byte [rax + 1]
add r10d, ecx
movzx ecx, byte [rax + 2]
mov rax, qword [rax + 8]
add r9d, ecx
test rax, rax
jne 0x180034ad0
lea eax, [rdx*8]
cdq
lea rcx, [r11*2]
idiv edi
add rcx, r13
mov byte [rcx + r11], al
lea eax, [r10*8]
cdq
idiv edi
mov byte [rcx + r11 + 1], al
lea eax, [r9*8]
cdq
idiv edi
mov byte [rcx + r11 + 2], al
inc r8d
cmp r8d, r15d
jb 0x180034aa0
mov r9d, ebx
mov r10d, ebx
test esi, esi
jle 0x180034c61
mov rdx, qword [rsp + 0x1888]
mov r12, qword [rsp + 0x1890]
mov r15, qword [rsp + 0x1880]
sub r12, rbp
sub r15, rbp
mov edi, esi
sub rdx, rbp
mov qword [rsp + 0x1888], rdx
nop
movzx ecx, byte [r15 + rbp]
movzx eax, byte [rbp]
shl ecx, 2
shl eax, 7
and ecx, 0xffffffe0
and eax, 0xfffffc00
add ecx, eax
movzx eax, byte [rdx + rbp]
shr eax, 3
add eax, ecx
add rax, rax
movzx ecx, byte [r14 + rax*8 + 3]
mov byte [r12 + rbp], cl
movzx r8d, byte [rbp]
lea r11, [rcx*2]
add r11, r13
add r11, rcx
movzx edx, byte [r11]
mov ecx, edx
sub ecx, r8d
test ecx, ecx
jle 0x180034bc3
mov eax, ecx
jmp 0x180034bc8
mov eax, r8d
sub eax, edx
cmp r10d, eax
jge 0x180034bdc
test ecx, ecx
jle 0x180034bd6
mov r10d, ecx
jmp 0x180034bdc
mov r10d, r8d
sub r10d, edx
movzx edx, byte [r11 + 1]
movzx r8d, byte [r15 + rbp]
mov eax, edx
sub eax, r8d
test eax, eax
jle 0x180034bf3
mov ecx, eax
jmp 0x180034bf8
mov ecx, r8d
sub ecx, edx
cmp r9d, ecx
jge 0x180034c0c
test eax, eax
jle 0x180034c06
mov r9d, eax
jmp 0x180034c0c
mov r9d, r8d
sub r9d, edx
mov rcx, qword [rsp + 0x1888]
movzx edx, byte [r11 + 2]
mov eax, edx
movzx r8d, byte [rcx + rbp]
sub eax, r8d
test eax, eax
jle 0x180034c2b
mov ecx, eax
jmp 0x180034c30
mov ecx, r8d
sub ecx, edx
cmp ebx, ecx
jge 0x180034c3f
test eax, eax
jg 0x180034c3d
mov eax, r8d
sub eax, edx
mov ebx, eax
mov rdx, qword [rsp + 0x1888]
inc rbp
sub rdi, 1
jne 0x180034b70
mov r15d, dword [rsp + 0x20]
mov r12, qword [rsp + 0x1870]
mov rcx, r14
call fcn.18001d2f0
mov r13, qword [rsp + 0x1868]
mov eax, 1
mov dword [r12], r15d
mov r15, qword [rsp + 0x1878]
mov rbx, qword [rsp + 0x1860]
add rsp, 0x1830
pop r14
pop r12
pop rdi
pop rsi
pop rbp
ret