Function at 0x100d6460
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub rsp, 0x28
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x48], rdi
mov edi, edx
mov rbx, rcx
xor esi, esi
nop
nop
cmp dword [rbx + 0x14], 3
jae 0x100d6559
inc dword [rbx + 8]
mov eax, dword [rbx + 8]
inc dword [rbx + 0x18]
inc qword [rbx]
cmp eax, dword [rbx + 0xc]
jne 0x100d665d
cmp eax, 0xffffffff
jne 0x100d64e7
mov eax, dword [rbx + 0x84]
mov rcx, qword [rbx + 0x28]
mov edx, 0xfffffffe
sub edx, dword [rbx + 0x78]
and edx, 0xfffffc00
add eax, dword [rbx + 0x80]
je 0x100d64de
mov r8d, eax
mov eax, dword [rcx]
cmp eax, edx
ja 0x100d64d1
mov eax, esi
jmp 0x100d64d3
sub eax, edx
mov dword [rcx], eax
add rcx, 4
dec r8
jne 0x100d64c7
sub dword [rbx + 0xc], edx
sub dword [rbx + 8], edx
sub dword [rbx + 0x10], edx
cmp dword [rbx + 0x50], esi
jne 0x100d64ff
mov eax, dword [rbx + 0x10]
sub eax, dword [rbx + 8]
cmp dword [rbx + 0x5c], eax
jne 0x100d64ff
mov rcx, rbx
call fcn.100d4370
mov eax, dword [rbx + 0x1c]
cmp dword [rbx + 0x18], eax
jne 0x100d650a
mov dword [rbx + 0x18], esi
sub eax, dword [rbx + 0x18]
mov r9d, dword [rbx + 8]
mov edx, dword [rbx + 0x10]
mov r8d, dword [rbx + 0x5c]
mov ecx, 0xffffffff
sub ecx, r9d
cmp eax, ecx
cmovb ecx, eax
sub edx, r9d
cmp edx, r8d
mov eax, edx
ja 0x100d653a
test edx, edx
je 0x100d653d
mov eax, 1
jmp 0x100d653d
sub eax, r8d
cmp eax, ecx
cmovb ecx, eax
mov eax, dword [rbx + 0x20]
cmp edx, eax
cmova edx, eax
lea eax, [r9 + rcx]
mov dword [rbx + 0xc], eax
mov dword [rbx + 0x14], edx
jmp 0x100d665d
mov rcx, qword [rbx]
movzx edx, byte [rcx]
movzx eax, byte [rcx + 2]
shl edx, 8
or edx, eax
movzx eax, byte [rcx + 1]
mov rcx, qword [rbx + 0x28]
xor edx, dword [rbx + rax*4 + 0x8c]
movzx eax, dx
mov rdx, rax
mov r8d, dword [rcx + rax*4]
mov eax, dword [rbx + 8]
mov dword [rcx + rdx*4], eax
mov ecx, dword [rbx + 0x18]
mov rax, qword [rbx + 0x30]
mov dword [rax + rcx*4], r8d
inc dword [rbx + 8]
mov eax, dword [rbx + 8]
inc dword [rbx + 0x18]
inc qword [rbx]
cmp eax, dword [rbx + 0xc]
jne 0x100d665d
cmp eax, 0xffffffff
jne 0x100d65f0
mov eax, dword [rbx + 0x84]
mov rcx, qword [rbx + 0x28]
mov edx, 0xfffffffe
sub edx, dword [rbx + 0x78]
and edx, 0xfffffc00
add eax, dword [rbx + 0x80]
je 0x100d65e7
mov r8d, eax
nop
mov eax, dword [rcx]
cmp eax, edx
ja 0x100d65da
mov eax, esi
jmp 0x100d65dc
sub eax, edx
mov dword [rcx], eax
add rcx, 4
dec r8
jne 0x100d65d0
sub dword [rbx + 0xc], edx
sub dword [rbx + 8], edx
sub dword [rbx + 0x10], edx
cmp dword [rbx + 0x50], esi
jne 0x100d6608
mov eax, dword [rbx + 0x10]
sub eax, dword [rbx + 8]
cmp dword [rbx + 0x5c], eax
jne 0x100d6608
mov rcx, rbx
call fcn.100d4370
mov eax, dword [rbx + 0x1c]
cmp dword [rbx + 0x18], eax
jne 0x100d6613
mov dword [rbx + 0x18], esi
sub eax, dword [rbx + 0x18]
mov r9d, dword [rbx + 8]
mov edx, dword [rbx + 0x10]
mov r8d, dword [rbx + 0x5c]
mov ecx, 0xffffffff
sub ecx, r9d
cmp eax, ecx
cmovb ecx, eax
sub edx, r9d
cmp edx, r8d
mov eax, edx
ja 0x100d6643
test edx, edx
je 0x100d6646
mov eax, 1
jmp 0x100d6646
sub eax, r8d
cmp eax, ecx
cmovb ecx, eax
mov eax, dword [rbx + 0x20]
cmp edx, eax
cmova edx, eax
lea eax, [r9 + rcx]
mov dword [rbx + 0xc], eax
mov dword [rbx + 0x14], edx
add edi, 0xffffffff
jne 0x100d6480
mov rdi, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x38]
add rsp, 0x28
ret