Function at 0x14003b580
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 8], rcx
push rsi
push rdi
push r15
sub rsp, 0x20
mov r15, rcx
xor esi, esi
mov rcx, qword [rcx]
mov rdi, rdx
mov dword [rsp + 0x50], esi
cmp dword [r15 + 0x14], esi
jle 0x14003bc93
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x10], r12
mov qword [rsp + 8], r13
mov qword [rsp], r14
nop
movsxd rax, dword [r15 + 0x1c]
mov r14, rcx
mov r13d, dword [r14]
lea rcx, [rcx + rax*4]
dec r13d
mov qword [rsp + 0x58], rcx
test r13d, r13d
jle 0x14003bc6b
mov edx, dword [r15 + 0xc]
add r14, 4
mov rbx, qword [rdi + 8]
add edx, esi
mov r10, qword [rdi]
xor r8d, r8d
movsxd rax, edx
sub edx, dword [rdi + 0x18]
mov r9d, dword [r14]
movsxd rcx, dword [r10 + 0x14]
imul rcx, rax
mov eax, edx
add rcx, qword [r10]
cdq
mov qword [rdi + 0x20], rcx
idiv dword [rbx + 0x20]
movsxd rax, dword [rbx + 0x14]
movsxd rcx, edx
imul rcx, rax
add rcx, qword [rbx]
sub r13d, 1
mov qword [rdi + 0x28], rcx
js 0x14003ba8e
nop dword [rax]
mov ebp, dword [r14 + 4]
lea r14, [r14 + 8]
mov r15d, dword [r14]
mov eax, r15d
cdq
movzx esi, dl
add esi, eax
mov eax, r9d
cdq
sar esi, 8
movzx edx, dl
add eax, edx
sar eax, 8
mov ecx, eax
cmp esi, eax
jne 0x14003b66a
mov eax, r15d
sub eax, r9d
imul eax, ebp
add r8d, eax
jmp 0x14003ba71
movzx eax, r9b
mov edx, 0x100
sub edx, eax
imul edx, ebp
lea eax, [r8 + rdx]
cdq
movzx edx, dl
add eax, edx
sar eax, 8
mov ebx, eax
test eax, eax
jle 0x14003b870
mov rax, qword [rdi]
mov r10d, dword [rdi + 0x14]
mov r8, qword [rdi + 8]
mov edx, dword [rax + 0x18]
mov eax, ecx
sub eax, r10d
imul edx, ecx
cmp ebx, 0xff
jl 0x14003b790
movsxd rbx, edx
cdq
idiv dword [r8 + 0x1c]
mov rax, qword [rdi + 0x28]
imul edx, dword [r8 + 0x18]
add rbx, qword [rdi + 0x20]
movsxd r8, edx
mov edx, 0x100
mov r11d, dword [r8 + rax]
mov r10d, r11d
mov r8d, dword [rbx]
and r11d, 0xff00ff
imul r11d, dword [rdi + 0x10]
shr r10d, 8
and r10d, 0xff00ff
imul r10d, dword [rdi + 0x10]
shr r11d, 8
and r11d, 0xff00ff
shr r10d, 8
and r10d, 0xff00ff
mov eax, r10d
shr eax, 0x10
sub edx, eax
mov eax, r8d
shr r8d, 8
and eax, 0xff00ff
imul eax, edx
and r8d, 0xff00ff
imul r8d, edx
mov edx, 0x100
shr eax, 8
and eax, 0xff00ff
shr r8d, 8
add r11d, eax
and r8d, 0xff00ff
add r10d, r8d
mov r8d, 0x100
mov eax, r10d
shl r10d, 8
shr eax, 8
and eax, 0xff00ff
sub r8d, eax
mov eax, r11d
shl r8d, 8
shr eax, 8
or r8d, r10d
and eax, 0xff00ff
and r8d, 0xff00ff00
sub edx, eax
or edx, r11d
and edx, 0xff00ff
xor edx, r8d
mov dword [rbx], edx
jmp 0x14003b870
imul ebx, dword [rdi + 0x10]
movsxd r11, edx
cdq
idiv dword [r8 + 0x1c]
mov rax, qword [rdi + 0x28]
imul edx, dword [r8 + 0x18]
add r11, qword [rdi + 0x20]
sar ebx, 8
movsxd r8, edx
mov edx, 0x100
mov r10d, dword [r8 + rax]
mov r9d, r10d
mov r8d, dword [r11]
and r10d, 0xff00ff
shr r9d, 8
and r9d, 0xff00ff
imul r10d, ebx
imul r9d, ebx
shr r10d, 8
shr r9d, 8
and r10d, 0xff00ff
and r9d, 0xff00ff
mov eax, r9d
shr eax, 0x10
sub edx, eax
mov eax, r8d
shr r8d, 8
and eax, 0xff00ff
imul eax, edx
and r8d, 0xff00ff
imul r8d, edx
mov edx, 0x100
shr eax, 8
and eax, 0xff00ff
shr r8d, 8
add r10d, eax
and r8d, 0xff00ff
add r9d, r8d
mov r8d, 0x100
mov eax, r9d
shl r9d, 8
shr eax, 8
and eax, 0xff00ff
sub r8d, eax
mov eax, r10d
shl r8d, 8
shr eax, 8
or r8d, r9d
and eax, 0xff00ff
and r8d, 0xff00ff00
sub edx, eax
or edx, r10d
and edx, 0xff00ff
xor edx, r8d
mov dword [r11], edx
test ebp, ebp
jle 0x14003ba69
inc ecx
sub esi, ecx
test esi, esi
jle 0x14003ba69
mov rax, qword [rdi]
mov ebx, ebp
imul ebx, dword [rdi + 0x10]
movsxd rdx, dword [rax + 0x18]
mov eax, edx
imul eax, ecx
sub ecx, dword [rdi + 0x14]
sar ebx, 8
movsxd r11, eax
add r11, qword [rdi + 0x20]
cmp ebx, 0xfe
jge 0x14003b99e
mov r12, rdx
mov r8, qword [rdi + 8]
mov eax, ecx
cdq
inc ecx
dec esi
idiv dword [r8 + 0x1c]
mov rax, qword [rdi + 0x28]
imul edx, dword [r8 + 0x18]
mov r8d, dword [r11]
movsxd rdx, edx
mov r10d, dword [rdx + rax]
mov r9d, r10d
shr r9d, 8
and r10d, 0xff00ff
and r9d, 0xff00ff
imul r10d, ebx
imul r9d, ebx
mov edx, 0x100
shr r10d, 8
shr r9d, 8
and r10d, 0xff00ff
and r9d, 0xff00ff
mov eax, r9d
shr eax, 0x10
sub edx, eax
mov eax, r8d
shr r8d, 8
and eax, 0xff00ff
imul eax, edx
and r8d, 0xff00ff
imul r8d, edx
mov edx, 0x100
shr eax, 8
and eax, 0xff00ff
shr r8d, 8
add r10d, eax
and r8d, 0xff00ff
add r9d, r8d
mov r8d, 0x100
mov eax, r9d
shl r9d, 8
shr eax, 8
and eax, 0xff00ff
sub r8d, eax
mov eax, r10d
shl r8d, 8
shr eax, 8
or r8d, r9d
and eax, 0xff00ff
and r8d, 0xff00ff00
sub edx, eax
or edx, r10d
and edx, 0xff00ff
xor edx, r8d
mov dword [r11], edx
add r11, r12
test esi, esi
jg 0x14003b8b2
jmp 0x14003ba69
mov rbx, rdx
mov r8, qword [rdi + 8]
mov eax, ecx
cdq
inc ecx
dec esi
idiv dword [r8 + 0x1c]
mov rax, qword [rdi + 0x28]
imul edx, dword [r8 + 0x18]
movsxd rdx, edx
mov r8d, dword [rdx + rax]
mov r10d, r8d
and r8d, 0xff00ff
shr r10d, 8
and r10d, 0xff00ff
mov edx, 0x100
mov eax, r10d
shr eax, 0x10
sub edx, eax
mov eax, dword [r11]
mov r9d, eax
shr eax, 8
and eax, 0xff00ff
and r9d, 0xff00ff
imul eax, edx
imul r9d, edx
mov edx, 0x100
shr eax, 8
and eax, 0xff00ff
shr r9d, 8
add r10d, eax
and r9d, 0xff00ff
add r9d, r8d
mov eax, r10d
shr eax, 8
mov r8d, 0x100
and eax, 0xff00ff
shl r10d, 8
sub r8d, eax
mov eax, r9d
shl r8d, 8
shr eax, 8
or r8d, r10d
and eax, 0xff00ff
and r8d, 0xff00ff00
sub edx, eax
or edx, r9d
and edx, 0xff00ff
xor edx, r8d
mov dword [r11], edx
add r11, rbx
test esi, esi
jg 0x14003b9a1
movzx r8d, r15b
imul r8d, ebp
sub r13d, 1
mov r9d, r15d
jns 0x14003b630
mov r10, qword [rdi]
mov rbx, qword [rdi + 8]
mov esi, dword [rsp + 0x50]
mov r15, qword [rsp + 0x40]
mov eax, r8d
cdq
movzx edx, dl
add eax, edx
sar eax, 8
mov r11d, eax
test eax, eax
jle 0x14003bc66
mov ecx, dword [r10 + 0x18]
mov eax, r9d
cdq
movzx edx, dl
add eax, edx
mov edx, dword [rdi + 0x14]
sar eax, 8
imul ecx, eax
sub eax, edx
cdq
idiv dword [rbx + 0x1c]
mov rax, qword [rdi + 0x28]
imul edx, dword [rbx + 0x18]
cmp r11d, 0xff
jl 0x14003bb9d
movsxd r11, ecx
add r11, qword [rdi + 0x20]
movsxd rcx, edx
mov edx, dword [rcx + rax]
mov r10d, edx
and edx, 0xff00ff
shr r10d, 8
imul edx, dword [rdi + 0x10]
and r10d, 0xff00ff
imul r10d, dword [rdi + 0x10]
mov ecx, 0x100
shr edx, 8
and edx, 0xff00ff
shr r10d, 8
and r10d, 0xff00ff
mov eax, r10d
shr eax, 0x10
sub ecx, eax
mov eax, dword [r11]
mov r9d, eax
shr eax, 8
and eax, 0xff00ff
and r9d, 0xff00ff
imul eax, ecx
imul r9d, ecx
mov ecx, 0x100
shr eax, 8
and eax, 0xff00ff
shr r9d, 8
add r10d, eax
and r9d, 0xff00ff
add r9d, edx
mov eax, r10d
shr eax, 8
mov edx, 0x100
and eax, 0xff00ff
shl r10d, 8
sub edx, eax
mov eax, r9d
shl edx, 8
shr eax, 8
or edx, r10d
and eax, 0xff00ff
and edx, 0xff00ff00
sub ecx, eax
or ecx, r9d
and ecx, 0xff00ff
xor ecx, edx
mov dword [r11], ecx
jmp 0x14003bc66
imul r11d, dword [rdi + 0x10]
movsxd r10, ecx
add r10, qword [rdi + 0x20]
movsxd rcx, edx
sar r11d, 8
mov edx, dword [r10]
mov r9d, dword [rcx + rax]
mov r8d, r9d
shr r8d, 8
and r9d, 0xff00ff
and r8d, 0xff00ff
imul r9d, r11d
imul r8d, r11d
mov ecx, 0x100
shr r9d, 8
shr r8d, 8
and r9d, 0xff00ff
and r8d, 0xff00ff
mov eax, r8d
shr eax, 0x10
sub ecx, eax
mov eax, edx
shr edx, 8
and eax, 0xff00ff
imul eax, ecx
and edx, 0xff00ff
imul edx, ecx
mov ecx, 0x100
shr eax, 8
and eax, 0xff00ff
shr edx, 8
add r9d, eax
and edx, 0xff00ff
add r8d, edx
mov edx, 0x100
mov eax, r8d
shl r8d, 8
shr eax, 8
and eax, 0xff00ff
sub edx, eax
mov eax, r9d
shl edx, 8
shr eax, 8
or edx, r8d
and eax, 0xff00ff
and edx, 0xff00ff00
sub ecx, eax
or ecx, r9d
and ecx, 0xff00ff
xor ecx, edx
mov dword [r10], ecx
mov rcx, qword [rsp + 0x58]
inc esi
mov dword [rsp + 0x50], esi
cmp esi, dword [r15 + 0x14]
jl 0x14003b5c0
mov r14, qword [rsp]
mov r13, qword [rsp + 8]
mov r12, qword [rsp + 0x10]
mov rbp, qword [rsp + 0x18]
mov rbx, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rdi
pop rsi
ret