Function at 0x18003b808
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 edx, dword [rcx + 0x24]
mov r8d, dword [rcx + 0x54]
mov r10d, dword [rcx + 0x50]
mov ebp, dword [rcx + 0x28]
mov r12d, dword [rcx + 0x2c]
mov rsi, qword [rcx + 0x30]
mov r13, qword [rcx + 0x38]
mov r9d, edx
mov r15d, 0x7fff
and r9d, r15d
xor edi, edi
mov rbx, rcx
mov dword [rsp + 0x90], edx
mov dword [rsp + 0x80], r8d
mov dword [rsp + 0x88], r10d
lea r11d, [rdi + 1]
mov dword [rsp + 0x98], r9d
mov rcx, qword [rbx + 0xb8]
cmp rcx, rdi
jne 0x18003b887
cmp dword [rbx + 0xa8], edi
je 0x18003bd3b
cmp ebp, edi
je 0x18003bd3b
lea r14d, [rbp + rdx]
and r14d, r15d
mov r15d, 0x1000
sub r15d, ebp
cmp rcx, r15
cmovb r15d, ecx
mov eax, r15d
add ebp, r15d
sub rcx, rax
mov qword [rbx + 0xb8], rcx
cmp r15d, edi
je 0x18003b95a
mov rdx, qword [rbx + 0xb0]
mov eax, 0x8000
mov ecx, r15d
sub eax, r14d
cmp eax, r15d
cmovb ecx, eax
mov eax, ecx
mov dword [rsp + 0x20], ecx
lea rcx, [r14 + rbx + 0xc8]
mov r8, rax
mov qword [rsp + 0x28], rax
call sub.ntdll.dll_memcpy
mov eax, 0x101
cmp r14d, eax
jae 0x18003b918
mov ecx, dword [rsp + 0x20]
mov rdx, qword [rbx + 0xb0]
sub eax, r14d
cmp ecx, eax
cmovb eax, ecx
lea rcx, [r14 + rbx + 0x80c8]
mov r8d, eax
call sub.ntdll.dll_memcpy
mov rax, qword [rsp + 0x28]
add qword [rbx + 0xb0], rax
mov eax, dword [rsp + 0x20]
add r14d, eax
and r14d, 0x7fff
sub r15d, eax
jne 0x18003b8b8
mov r10d, dword [rsp + 0x88]
mov edx, dword [rsp + 0x90]
mov r9d, dword [rsp + 0x98]
mov r8d, dword [rsp + 0x80]
lea r11d, [r15 + 1]
mov eax, 0x8000
sub eax, ebp
cmp eax, r12d
cmovb r12d, eax
cmp dword [rbx + 0xa8], edi
jne 0x18003b97c
cmp ebp, 0x1000
jb 0x18003bd3b
cmp ebp, 4
jb 0x18003bc30
mov r14d, dword [rsp + 0x80]
mov eax, r9d
mov r8d, r11d
lea r15, [rax + rbx + 0xc8]
mov qword [rsp + 0x88], r15
mov r11d, dword [r15]
and r11d, 0xffffff
mov eax, r11d
shr eax, 0x11
xor eax, r11d
and eax, 0xfff
movzx ecx, word [rbx + rax*2 + 0x292aa]
mov word [rbx + rax*2 + 0x292aa], dx
movzx eax, dx
sub ax, cx
movzx r9d, ax
mov dword [rsp + 0x80], r9d
cmp r9d, r12d
ja 0x18003bb35
and ecx, 0x7fff
lea r9, [rcx + rbx + 0xc8]
mov eax, dword [r9]
and eax, 0xffffff
cmp eax, r11d
jne 0x18003bb35
mov r8, r15
mov r15d, 0x20
add r9, 2
add r8, 2
movzx eax, word [r9]
cmp word [r8], ax
jne 0x18003ba5c
add r9, 2
add r8, 2
movzx eax, word [r9]
cmp word [r8], ax
jne 0x18003ba5c
add r9, 2
add r8, 2
movzx eax, word [r9]
cmp word [r8], ax
jne 0x18003ba5c
add r9, 2
add r8, 2
movzx eax, word [r9]
cmp word [r8], ax
jne 0x18003ba5c
add r15d, 0xffffffff
jne 0x18003ba0e
mov al, byte [r9]
mov r9d, dword [rsp + 0x80]
mov ecx, edi
mov rdx, r8
sub rdx, qword [rsp + 0x88]
sar rdx, 1
cmp byte [r8], al
sete cl
lea eax, [rcx + rdx*2]
cmp r15d, edi
jne 0x18003ba91
mov eax, r9d
neg eax
sbb eax, eax
and eax, 0x102
cmp eax, 3
jb 0x18003bb23
jne 0x18003baa5
cmp r9d, 0x2000
jae 0x18003bb23
cmp eax, ebp
lea r11, [0x180000000]
mov r8d, ebp
cmovb r8d, eax
dec r9d
mov word [rsi + 1], r9w
lea eax, [r8 - 3]
mov edx, r9d
mov byte [rsi], al
mov al, byte [r13]
shr rdx, 8
shr al, 1
add rsi, 3
or al, 0x80
mov byte [r13], al
mov eax, r9d
and eax, 0x1ff
cmp r9d, 0x200
mov r9d, 1
movzx ecx, byte [rax + r11 + 0x50370]
movzx eax, byte [rdx + r11 + 0x50770]
mov edx, dword [rsp + 0x90]
cmovb eax, ecx
add word [rbx + rax*2 + 0x840a], r9w
lea eax, [r8 - 3]
movzx eax, word [r11 + rax*2 + 0x50070]
jmp 0x18003bb49
mov edx, dword [rsp + 0x90]
mov r9d, 1
mov r8d, r9d
jmp 0x18003bb3b
mov r9d, 1
mov byte [rsi], r11b
add rsi, r9
shr byte [r13], 1
movzx eax, r11b
add word [rbx + rax*2 + 0x81ca], r9w
add r10d, 0xffffffff
mov dword [rsp + 0x88], r10d
jne 0x18003bb74
mov r10d, 8
mov r13, rsi
add rsi, r9
mov dword [rsp + 0x88], r10d
mov r9d, dword [rsp + 0x98]
lea eax, [r8 + r12]
mov ecx, 0x8000
add r14d, r8d
add edx, r8d
cmp eax, ecx
mov r12d, ecx
lea r15d, [rcx - 1]
mov dword [rsp + 0x80], r14d
cmovb r12d, eax
add r9d, r8d
lea rax, [rbx + 0x192a2]
and r9d, r15d
sub ebp, r8d
mov dword [rsp + 0x90], edx
mov dword [rsp + 0x98], r9d
cmp rsi, rax
jbe 0x18003bc1f
mov dword [rbx + 0x24], edx
mov rcx, rbx
xor edx, edx
mov dword [rbx + 0x28], ebp
mov dword [rbx + 0x2c], r12d
mov dword [rbx + 0x54], r14d
mov qword [rbx + 0x30], rsi
mov qword [rbx + 0x38], r13
mov dword [rbx + 0x50], r10d
call fcn.18003b2a0
cmp eax, edi
jne 0x18003bd5a
mov r14d, dword [rbx + 0x54]
mov r10d, dword [rbx + 0x50]
mov rsi, qword [rbx + 0x30]
mov r13, qword [rbx + 0x38]
mov edx, dword [rsp + 0x90]
mov r9d, dword [rsp + 0x98]
mov dword [rsp + 0x80], r14d
mov dword [rsp + 0x88], r10d
mov r11d, 1
cmp ebp, 4
jae 0x18003b98d
jmp 0x18003bc36
mov r15d, 0x7fff
mov r8d, dword [rsp + 0x80]
mov r11d, 1
cmp ebp, edi
je 0x18003b867
lea r14, [rbx + 0x192a2]
add r8d, r11d
mov eax, r9d
mov cl, byte [rax + rbx + 0xc8]
mov dword [rsp + 0x80], r8d
mov byte [rsi], cl
shr byte [r13], 1
add rsi, r11
add r10d, 0xffffffff
mov dword [rsp + 0x88], r10d
jne 0x18003bc93
mov r10d, 8
mov r13, rsi
add rsi, r11
mov dword [rsp + 0x88], r10d
add edx, r11d
movzx eax, cl
mov ecx, 0x8000
add word [rbx + rax*2 + 0x81ca], r11w
lea eax, [r12 + 1]
mov r12d, ecx
cmp eax, ecx
inc r9d
mov dword [rsp + 0x90], edx
cmovb r12d, eax
and r9d, r15d
dec ebp
mov dword [rsp + 0x98], r9d
cmp rsi, r14
jbe 0x18003bd2e
mov dword [rbx + 0x24], edx
mov rcx, rbx
xor edx, edx
mov dword [rbx + 0x28], ebp
mov dword [rbx + 0x2c], r12d
mov dword [rbx + 0x54], r8d
mov qword [rbx + 0x30], rsi
mov qword [rbx + 0x38], r13
mov dword [rbx + 0x50], r10d
call fcn.18003b2a0
cmp eax, edi
jne 0x18003bd5a
mov r8d, dword [rbx + 0x54]
mov r10d, dword [rbx + 0x50]
mov rsi, qword [rbx + 0x30]
mov r13, qword [rbx + 0x38]
mov edx, dword [rsp + 0x90]
mov r9d, dword [rsp + 0x98]
mov dword [rsp + 0x80], r8d
mov dword [rsp + 0x88], r10d
mov r11d, 1
cmp ebp, edi
jne 0x18003bc53
jmp 0x18003b867
mov dword [rbx + 0x24], edx
mov dword [rbx + 0x28], ebp
mov dword [rbx + 0x2c], r12d
mov dword [rbx + 0x54], r8d
mov qword [rbx + 0x30], rsi
mov qword [rbx + 0x38], r13
mov dword [rbx + 0x50], r10d
mov eax, r11d
jmp 0x18003bd60
setge dil
mov eax, edi
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret