Function at 0x1800682cc
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x38
mov r9d, dword [rcx + 0x24]
mov rbx, rcx
mov r8d, dword [rcx + 0x54]
mov r11d, r9d
mov r10d, dword [rcx + 0x50]
and r11d, 0x7fff
mov edi, dword [rcx + 0x28]
mov r15d, 1
mov r13d, dword [rcx + 0x2c]
mov r12, qword [rcx + 0x30]
mov r14, qword [rcx + 0x38]
mov dword [rsp + 0x90], r11d
mov dword [rsp + 0x88], r9d
mov dword [rsp + 0x80], r8d
mov dword [rsp + 0x98], r10d
mov dword [rsp + 0x20], 8
mov rcx, qword [rbx + 0xb8]
test rcx, rcx
jne 0x180068353
cmp dword [rbx + 0xa8], ecx
je 0x180068811
test edi, edi
je 0x180068811
mov esi, 0x1000
lea ebp, [rdi + r9]
and ebp, 0x7fff
sub esi, edi
cmp rcx, rsi
jae 0x18006836f
mov esi, dword [rbx + 0xb8]
mov eax, esi
add edi, esi
sub rcx, rax
mov qword [rbx + 0xb8], rcx
test esi, esi
je 0x18006841d
mov rdx, qword [rbx + 0xb0]
mov eax, 0x8000
sub eax, ebp
mov ecx, ebp
cmp eax, esi
mov r15d, esi
cmovb r15d, eax
add rcx, 0xc8
add rcx, rbx
mov r8d, r15d
call sub.msvcrt.dll_memcpy
cmp ebp, 0x101
jae 0x1800683e1
mov rdx, qword [rbx + 0xb0]
mov eax, 0x101
sub eax, ebp
mov ecx, ebp
cmp r15d, eax
cmovb eax, r15d
add rcx, 0x80c8
add rcx, rbx
mov r8d, eax
call sub.msvcrt.dll_memcpy
add ebp, r15d
mov eax, r15d
add qword [rbx + 0xb0], rax
and ebp, 0x7fff
sub esi, r15d
jne 0x180068385
mov r10d, dword [rsp + 0x98]
lea r15d, [rsi + 1]
mov r9d, dword [rsp + 0x88]
mov r8d, dword [rsp + 0x80]
mov r11d, dword [rsp + 0x90]
mov eax, 0x8000
sub eax, edi
cmp eax, r13d
cmovb r13d, eax
cmp dword [rbx + 0xa8], 0
jne 0x180068440
cmp edi, 0x1000
jb 0x180068811
lea rsi, [rbx + 0x192a2]
cmp edi, 4
jb 0x18006870f
mov r8d, r15d
mov r15d, r11d
add r15, 0xc8
add r15, rbx
mov r11d, dword [r15]
and r11d, 0xffffff
mov eax, r11d
mov ecx, r11d
shr rcx, 0x11
xor rcx, rax
movzx eax, r9w
and ecx, 0xfff
movzx edx, word [rbx + rcx*2 + 0x292aa]
sub ax, dx
mov word [rbx + rcx*2 + 0x292aa], r9w
movzx ebp, ax
cmp ebp, r13d
ja 0x18006860c
and edx, 0x7fff
lea r9, [rbx + 0xc8]
add r9, rdx
mov eax, dword [r9]
and eax, 0xffffff
cmp eax, r11d
jne 0x180068604
mov r8, r15
mov esi, 0x20
add r9, 2
add r8, 2
movzx eax, word [r9]
cmp word [r8], ax
jne 0x180068517
add r9, 2
add r8, 2
movzx eax, word [r9]
cmp word [r8], ax
jne 0x180068517
add r9, 2
add r8, 2
movzx eax, word [r9]
cmp word [r8], ax
jne 0x180068517
add r9, 2
add r8, 2
movzx eax, word [r9]
cmp word [r8], ax
jne 0x180068517
add esi, 0xffffffff
jne 0x1800684ca
mov al, byte [r9]
xor ecx, ecx
mov rdx, r8
sub rdx, r15
sar rdx, 1
cmp byte [r8], al
sete cl
lea eax, [rcx + rdx*2]
test esi, esi
jne 0x18006853d
mov eax, ebp
neg eax
sbb eax, eax
and eax, 0x102
mov r9d, 3
cmp eax, r9d
jb 0x1800685d3
jne 0x180068556
cmp ebp, 0x2000
jae 0x1800685d3
cmp eax, edi
lea r11, [0x180000000]
mov r15d, 1
mov r8d, edi
cmovb r8d, eax
dec ebp
mov dword [r12 + 1], ebp
mov al, r8b
sub al, r9b
mov edx, ebp
mov byte [r12], al
mov al, byte [r14]
shr al, 1
or al, 0x80
shr rdx, 8
mov byte [r14], al
mov eax, ebp
and eax, 0x1ff
cmp ebp, 0x200
movzx ecx, byte [rax + r11 + 0xc0120]
movzx eax, byte [rdx + r11 + 0xbfb00]
cmovb eax, ecx
add word [rbx + rax*2 + 0x840a], r15w
lea eax, [r8 - 3]
movzx eax, word [r11 + rax*2 + 0xbff20]
add word [rbx + rax*2 + 0x81ca], r15w
mov rax, r9
jmp 0x1800685f3
movzx eax, r11b
mov r15d, 1
mov byte [r12], al
mov r8d, r15d
shr byte [r14], 1
add word [rbx + rax*2 + 0x81ca], r15w
mov eax, r15d
mov r9d, dword [rsp + 0x88]
lea rsi, [rbx + 0x192a2]
jmp 0x180068629
mov r9d, dword [rsp + 0x88]
movzx eax, r11b
mov r15d, 1
mov byte [r12], al
shr byte [r14], 1
add word [rbx + rax*2 + 0x81ca], r15w
mov eax, r15d
mov r11d, dword [rsp + 0x90]
lea rdx, [rax + r12]
or ebp, 0xffffffff
lea r12, [rdx + 1]
add r10d, ebp
mov eax, 8
mov ecx, r10d
cmove r10d, eax
test ecx, ecx
mov ecx, dword [rsp + 0x80]
mov rax, rdx
cmovne rax, r14
mov dword [rsp + 0x98], r10d
cmovne r12, rdx
mov r14, rax
lea eax, [r8 + r13]
add ecx, r8d
add r9d, r8d
mov dword [rsp + 0x80], ecx
mov r13d, 0x8000
mov dword [rsp + 0x88], r9d
cmp eax, r13d
cmovb r13d, eax
add r11d, r8d
and r11d, 0x7fff
sub edi, r8d
mov dword [rsp + 0x90], r11d
cmp r12, rsi
jbe 0x180068704
mov dword [rbx + 0x54], ecx
xor edx, edx
mov rcx, rbx
mov dword [rbx + 0x24], r9d
mov dword [rbx + 0x28], edi
mov dword [rbx + 0x2c], r13d
mov qword [rbx + 0x30], r12
mov qword [rbx + 0x38], r14
mov dword [rbx + 0x50], r10d
call fcn.180067d40
test eax, eax
jne 0x180068831
mov eax, dword [rbx + 0x54]
mov r10d, dword [rbx + 0x50]
mov r12, qword [rbx + 0x30]
mov r14, qword [rbx + 0x38]
mov r9d, dword [rsp + 0x88]
mov r11d, dword [rsp + 0x90]
mov dword [rsp + 0x80], eax
mov dword [rsp + 0x98], r10d
cmp edi, 4
jae 0x180068450
jmp 0x180068712
or ebp, 0xffffffff
mov r8d, dword [rsp + 0x80]
test edi, edi
je 0x180068333
add r8d, r15d
mov eax, r11d
lea rcx, [r12 + 1]
mov dword [rsp + 0x80], r8d
movzx edx, byte [rax + rbx + 0xc8]
mov byte [r12], dl
shr byte [r14], 1
add r10d, ebp
mov eax, r10d
cmove r10d, dword [rsp + 0x20]
test eax, eax
mov dword [rsp + 0x98], r10d
cmovne rcx, r14
neg eax
mov r14, rcx
sbb rax, rax
add word [rbx + rdx*2 + 0x81ca], r15w
add rax, 2
add r9d, r15d
add r12, rax
mov dword [rsp + 0x88], r9d
lea eax, [r13 + 1]
mov r13d, 0x8000
cmp eax, r13d
inc r11d
cmovb r13d, eax
and r11d, 0x7fff
add edi, ebp
mov dword [rsp + 0x90], r11d
cmp r12, rsi
jbe 0x180068804
mov qword [rbx + 0x38], rcx
xor edx, edx
mov rcx, rbx
mov dword [rbx + 0x24], r9d
mov dword [rbx + 0x28], edi
mov dword [rbx + 0x2c], r13d
mov dword [rbx + 0x54], r8d
mov qword [rbx + 0x30], r12
mov dword [rbx + 0x50], r10d
call fcn.180067d40
test eax, eax
jne 0x180068831
mov r8d, dword [rbx + 0x54]
mov r10d, dword [rbx + 0x50]
mov r12, qword [rbx + 0x30]
mov r14, qword [rbx + 0x38]
mov r9d, dword [rsp + 0x88]
mov r11d, dword [rsp + 0x90]
mov dword [rsp + 0x80], r8d
mov dword [rsp + 0x98], r10d
test edi, edi
jne 0x180068722
jmp 0x180068333
mov dword [rbx + 0x24], r9d
mov eax, r15d
mov dword [rbx + 0x28], edi
mov dword [rbx + 0x2c], r13d
mov dword [rbx + 0x54], r8d
mov qword [rbx + 0x30], r12
mov qword [rbx + 0x38], r14
mov dword [rbx + 0x50], r10d
jmp 0x180068836
not eax
shr eax, 0x1f
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret