Function at 0x100e3770
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov rax, rsp
sub rsp, 0x148
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rdi, rcx
mov rcx, qword [rcx]
cmp word [rcx], 1
mov qword [rax - 0x10], r13
mov rbx, rdx
mov r13d, r8d
je 0x100e3a3b
mov esi, dword [rcx + 4]
add rsi, qword [rdi + 0x40]
movzx eax, byte [rsi]
cmp eax, r8d
jne 0x100e384b
movzx ecx, word [rcx + 2]
mov eax, dword [rbx + 8]
movzx r8d, byte [rsi + 1]
xor edx, edx
div ecx
imul eax, r8d
cmp eax, 0x1000000
mov dword [rbx + 8], eax
jae 0x100e383a
nop
nop
nop
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x100e37f7
mov rax, qword [rbx]
shr rax, 0x20
je 0x100e3825
movzx ecx, byte [rbx + 0xc]
nop
nop
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
dec qword [rbx + 0x10]
mov cl, 0xff
jne 0x100e3800
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x100e37e0
mov rcx, rdi
mov qword [rdi + 0x10], rsi
call fcn.100e2f60
jmp 0x100e3e99
mov dword [rdi + 0x20], 0
movzx r9d, byte [rsi + 1]
mov rdx, rcx
movzx ecx, word [rcx]
dec ecx
nop
movzx eax, byte [rsi + 6]
add rsi, 6
cmp eax, r8d
je 0x100e399f
movzx eax, byte [rsi + 1]
add r9d, eax
add ecx, 0xffffffff
jne 0x100e3860
mov rax, qword [rdi + 0x10]
movzx ecx, byte [rax]
movzx eax, byte [rcx + rdi + 0x3ac]
mov ecx, 4
mov dword [rdi + 0x28], eax
lea rax, [rsp + 0x38]
nop
nop
mov qword [rax - 8], 0xffffffffffffffff
mov qword [rax], 0xffffffffffffffff
mov qword [rax + 8], 0xffffffffffffffff
mov qword [rax + 0x10], 0xffffffffffffffff
mov qword [rax + 0x18], 0xffffffffffffffff
mov qword [rax + 0x20], 0xffffffffffffffff
mov qword [rax + 0x28], 0xffffffffffffffff
mov qword [rax + 0x30], 0xffffffffffffffff
add rax, 0x40
dec rcx
jne 0x100e38a0
movzx eax, byte [rsi]
mov byte [rsp + rax + 0x30], cl
movzx ecx, word [rdx]
dec ecx
nop
nop
nop
movzx eax, byte [rsi - 6]
sub rsi, 6
add ecx, 0xffffffff
mov byte [rsp + rax + 0x30], 0
jne 0x100e3900
movzx ecx, word [rdx + 2]
mov eax, dword [rbx + 8]
xor edx, edx
div ecx
mov r8d, ecx
mov dword [rbx + 8], eax
sub r8d, r9d
imul eax, r9d
add qword [rbx], rax
mov eax, dword [rbx + 8]
imul eax, r8d
cmp eax, 0x1000000
mov dword [rbx + 8], eax
jae 0x100e3c73
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x100e3959
mov rax, qword [rbx]
shr rax, 0x20
je 0x100e3985
movzx ecx, byte [rbx + 0xc]
nop
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
dec qword [rbx + 0x10]
mov cl, 0xff
jne 0x100e3960
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x100e3942
jmp 0x100e3c73
movzx ecx, word [rdx + 2]
mov eax, dword [rbx + 8]
movzx r8d, byte [rsi + 1]
xor edx, edx
div ecx
mov dword [rbx + 8], eax
imul eax, r9d
add qword [rbx], rax
mov eax, dword [rbx + 8]
imul eax, r8d
cmp eax, 0x1000000
mov dword [rbx + 8], eax
jae 0x100e3a2a
nop
nop
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x100e39e7
mov rax, qword [rbx]
shr rax, 0x20
je 0x100e3a15
movzx ecx, byte [rbx + 0xc]
nop
nop
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
dec qword [rbx + 0x10]
mov cl, 0xff
jne 0x100e39f0
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x100e39d0
mov rcx, rdi
mov qword [rdi + 0x10], rsi
call fcn.100e2eb0
jmp 0x100e3e99
mov r10, qword [rdi]
mov rax, qword [rdi + 0x10]
movzx ecx, byte [rax]
mov rax, qword [rdi + 0x40]
lea rbp, [r10 + 2]
movzx r9d, byte [rcx + rdi + 0x3ac]
mov dword [rdi + 0x28], r9d
mov ecx, dword [r10 + 8]
movzx ecx, word [rcx + rax]
movzx eax, byte [rbp]
movzx edx, byte [rcx + rdi + 0x2ab]
movzx ecx, byte [rax + rdi + 0x3ac]
mov eax, dword [rdi + 0x2c]
sar eax, 0x1a
lea esi, [rdx + rcx*2]
and eax, 0x20
add esi, eax
movzx eax, byte [r10 + 3]
add esi, dword [rdi + 0x20]
dec eax
movsxd rcx, eax
movzx eax, byte [rbp]
add esi, r9d
shl rcx, 6
add rsi, rcx
cmp eax, r8d
jne 0x100e3b58
mov ecx, dword [rbx + 8]
movzx eax, word [rdi + rsi*2 + 0xaf0]
shr ecx, 0xe
imul ecx, eax
cmp ecx, 0x1000000
mov dword [rbx + 8], ecx
jae 0x100e3b2a
nop
nop
nop
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x100e3ae7
mov rax, qword [rbx]
shr rax, 0x20
je 0x100e3b15
movzx ecx, byte [rbx + 0xc]
nop
nop
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
dec qword [rbx + 0x10]
mov cl, 0xff
jne 0x100e3af0
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x100e3ad0
movzx ecx, word [rdi + rsi*2 + 0xaf0]
lea eax, [rcx + 0x20]
sar eax, 7
sub cx, ax
sub cx, 0xff80
mov word [rdi + rsi*2 + 0xaf0], cx
mov rcx, rdi
mov qword [rdi + 0x10], rbp
call fcn.100e2ff0
jmp 0x100e3e99
movzx eax, word [rdi + rsi*2 + 0xaf0]
mov ecx, dword [rbx + 8]
shr ecx, 0xe
imul ecx, eax
sub dword [rbx + 8], ecx
mov eax, ecx
add qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jae 0x100e3bda
nop
nop
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x100e3b97
mov rax, qword [rbx]
shr rax, 0x20
je 0x100e3bc5
movzx ecx, byte [rbx + 0xc]
nop
nop
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
dec qword [rbx + 0x10]
mov cl, 0xff
jne 0x100e3ba0
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x100e3b80
movzx ecx, word [rdi + rsi*2 + 0xaf0]
lea eax, [rcx + 0x20]
sar eax, 7
sub cx, ax
movzx eax, cx
lea rcx, [0x101002b0]
mov word [rdi + rsi*2 + 0xaf0], ax
shr rax, 0xa
movzx eax, byte [rax + rcx]
mov ecx, 4
mov dword [rdi + 0x1c], eax
lea rax, [rsp + 0x38]
nop
nop
nop
nop
mov qword [rax - 8], 0xffffffffffffffff
mov qword [rax], 0xffffffffffffffff
mov qword [rax + 8], 0xffffffffffffffff
mov qword [rax + 0x10], 0xffffffffffffffff
mov qword [rax + 0x18], 0xffffffffffffffff
mov qword [rax + 0x20], 0xffffffffffffffff
mov qword [rax + 0x28], 0xffffffffffffffff
mov qword [rax + 0x30], 0xffffffffffffffff
add rax, 0x40
dec rcx
jne 0x100e3c20
movzx eax, byte [rbp]
mov dword [rdi + 0x20], ecx
mov byte [rsp + rax + 0x30], cl
mov qword [rsp + 0x140], r12
nop
nop
mov rax, qword [rdi]
movzx edx, word [rax]
nop
nop
nop
inc dword [rdi + 0x18]
mov rax, qword [rdi]
mov ecx, dword [rax + 8]
test ecx, ecx
je 0x100e3e91
mov r8, rcx
add r8, qword [rdi + 0x40]
mov qword [rdi], r8
movzx eax, word [r8]
cmp eax, edx
je 0x100e3c90
lea r8, [rsp + 0x20]
mov rcx, rdi
call fcn.100e2dc0
mov rcx, qword [rdi]
mov r8d, dword [rcx + 4]
movzx r9d, word [rcx]
mov r12, rax
add r8, qword [rdi + 0x40]
xor esi, esi
nop
nop
nop
movzx ecx, byte [r8]
cmp ecx, r13d
je 0x100e3dad
mov rdx, rcx
movzx ecx, byte [r8 + 1]
add r8, 6
movsx eax, byte [rsp + rdx + 0x30]
mov byte [rsp + rdx + 0x30], 0
and ecx, eax
add esi, ecx
add r9d, 0xffffffff
jne 0x100e3ce0
mov eax, dword [rbx + 8]
mov r8d, dword [rsp + 0x20]
xor edx, edx
lea ecx, [rsi + r8]
div ecx
mov dword [rbx + 8], eax
imul eax, esi
add qword [rbx], rax
mov eax, dword [rbx + 8]
imul eax, r8d
cmp eax, 0x1000000
mov dword [rbx + 8], eax
jae 0x100e3d9f
nop
nop
nop
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x100e3d57
mov rax, qword [rbx]
shr rax, 0x20
je 0x100e3d85
movzx ecx, byte [rbx + 0xc]
nop
nop
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
dec qword [rbx + 0x10]
mov cl, 0xff
jne 0x100e3d60
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x100e3d40
mov r8d, dword [rsp + 0x20]
add r8w, si
add word [r12], r8w
jmp 0x100e3c80
mov r10d, esi
mov rbp, r8
movzx eax, byte [r8]
add r8, 6
movsx ecx, byte [rsp + rax + 0x30]
movzx eax, byte [r8 - 5]
and ecx, eax
add esi, ecx
add r9d, 0xffffffff
jne 0x100e3db3
mov eax, dword [rsp + 0x20]
movzx r8d, byte [rbp + 1]
xor edx, edx
lea ecx, [rsi + rax]
mov eax, dword [rbx + 8]
div ecx
mov dword [rbx + 8], eax
imul eax, r10d
add qword [rbx], rax
mov eax, dword [rbx + 8]
imul eax, r8d
cmp eax, 0x1000000
mov dword [rbx + 8], eax
jae 0x100e3e5a
nop
mov ecx, dword [rbx]
shl dword [rbx + 8], 8
cmp ecx, 0xff000000
jb 0x100e3e17
mov rax, qword [rbx]
shr rax, 0x20
je 0x100e3e45
movzx ecx, byte [rbx + 0xc]
nop
nop
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
dec qword [rbx + 0x10]
mov cl, 0xff
jne 0x100e3e20
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x100e3e00
movzx ecx, byte [r12 + 2]
cmp cl, 7
jae 0x100e3e85
add byte [r12 + 3], 0xff
jne 0x100e3e85
shl word [r12], 1
mov eax, 3
shl al, cl
inc cl
mov byte [r12 + 2], cl
mov byte [r12 + 3], al
mov rcx, rdi
mov qword [rdi + 0x10], rbp
call fcn.100e3040
mov r12, qword [rsp + 0x140]
mov r13, qword [rsp + 0x138]
mov rdi, qword [rsp + 0x168]
mov rsi, qword [rsp + 0x160]
mov rbp, qword [rsp + 0x158]
mov rbx, qword [rsp + 0x150]
add rsp, 0x148
ret