Function at 0x18003b3c0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rsi
push r14
sub rsp, 0x50
mov rbp, rcx
xor esi, esi
mov rcx, qword [rcx]
mov r14, rdx
mov dword [rsp + 0x20], esi
cmp dword [rbp + 0x14], esi
jle 0x18003ba9f
mov qword [rsp + 0x78], rbx
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r15
nop
movsxd rax, dword [rbp + 0x1c]
mov r15, rcx
mov r13d, dword [r15]
lea rcx, [rcx + rax*4]
dec r13d
mov qword [rsp + 0x28], rcx
test r13d, r13d
jle 0x18003ba77
mov edx, dword [rbp + 0xc]
add r15, 4
mov r10, qword [r14]
add edx, esi
mov rdi, qword [r14 + 8]
xor r8d, r8d
movsxd rax, edx
mov r9d, dword [r15]
movsxd rcx, dword [r10 + 0x14]
sub edx, dword [r14 + 0x18]
imul rcx, rax
add rcx, qword [r10]
mov qword [r14 + 0x20], rcx
movsxd rax, dword [rdi + 0x14]
movsxd rcx, edx
imul rcx, rax
add rcx, qword [rdi]
sub r13d, 1
mov qword [r14 + 0x28], rcx
mov dword [rsp + 0x88], r13d
js 0x18003b889
nop
mov ebp, dword [r15 + 4]
lea r15, [r15 + 8]
mov r12d, dword [r15]
mov eax, r12d
cdq
movzx ecx, dl
add ecx, eax
mov eax, r9d
cdq
sar ecx, 8
movzx edx, dl
add eax, edx
sar eax, 8
mov esi, eax
cmp ecx, eax
jne 0x18003b4aa
mov eax, r12d
sub eax, r9d
imul eax, ebp
add r8d, eax
jmp 0x18003b864
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 edi, eax
test eax, eax
jle 0x18003b6ab
mov rax, qword [r14]
mov edx, dword [rax + 0x18]
mov eax, dword [r14 + 0x14]
imul edx, esi
cmp edi, 0xff
jl 0x18003b5c6
movsxd rdi, edx
mov edx, esi
add rdi, qword [r14 + 0x20]
sub edx, eax
mov rax, qword [r14 + 8]
mov r10d, dword [rdi]
imul edx, dword [rax + 0x18]
movsxd r8, edx
mov edx, 0x100
add r8, qword [r14 + 0x28]
movzx ebx, byte [r8 + 1]
movzx r11d, byte [r8 + 2]
or ebx, 0xff0000
imul ebx, dword [r14 + 0x10]
shl r11d, 0x10
shr ebx, 8
and ebx, 0xff00ff
mov eax, ebx
shr eax, 0x10
sub edx, eax
movzx eax, byte [r8]
or r11d, eax
mov r8d, 0x100
imul r11d, dword [r14 + 0x10]
mov eax, r10d
and eax, 0xff00ff
shr r10d, 8
imul eax, edx
and r10d, 0xff00ff
imul r10d, edx
mov edx, 0x100
shr r11d, 8
and r11d, 0xff00ff
shr eax, 8
and eax, 0xff00ff
shr r10d, 8
add r11d, eax
and r10d, 0xff00ff
add ebx, r10d
mov eax, ebx
shl ebx, 8
shr eax, 8
and eax, 0xff00ff
sub r8d, eax
mov eax, r11d
shl r8d, 8
shr eax, 8
or r8d, ebx
and eax, 0xff00ff
and r8d, 0xff00ff00
sub edx, eax
or edx, r11d
and edx, 0xff00ff
xor edx, r8d
mov dword [rdi], edx
jmp 0x18003b6ab
imul edi, dword [r14 + 0x10]
movsxd rbx, edx
mov edx, esi
add rbx, qword [r14 + 0x20]
sub edx, eax
mov rax, qword [r14 + 8]
sar edi, 8
mov r9d, dword [rbx]
imul edx, dword [rax + 0x18]
movsxd r8, edx
mov edx, 0x100
add r8, qword [r14 + 0x28]
movzx r11d, byte [r8 + 1]
movzx r10d, byte [r8 + 2]
or r11d, 0xff0000
shl r10d, 0x10
imul r11d, edi
shr r11d, 8
and r11d, 0xff00ff
mov eax, r11d
shr eax, 0x10
sub edx, eax
movzx eax, byte [r8]
or r10d, eax
mov r8d, 0x100
mov eax, r9d
imul r10d, edi
and eax, 0xff00ff
shr r9d, 8
imul eax, edx
and r9d, 0xff00ff
imul r9d, edx
mov edx, 0x100
shr r10d, 8
and r10d, 0xff00ff
shr eax, 8
and eax, 0xff00ff
shr r9d, 8
add r10d, eax
and r9d, 0xff00ff
add r11d, r9d
mov eax, r11d
shl r11d, 8
shr eax, 8
and eax, 0xff00ff
sub r8d, eax
mov eax, r10d
shl r8d, 8
shr eax, 8
or r8d, r11d
and eax, 0xff00ff
and r8d, 0xff00ff00
sub edx, eax
or edx, r10d
and edx, 0xff00ff
xor edx, r8d
mov dword [rbx], edx
test ebp, ebp
jle 0x18003b85c
inc esi
sub ecx, esi
test ecx, ecx
jle 0x18003b85c
mov r11, qword [r14]
mov edi, ebp
imul edi, dword [r14 + 0x10]
movsxd r8, dword [r11 + 0x18]
mov eax, r8d
imul eax, esi
sub esi, dword [r14 + 0x14]
sar edi, 8
movsxd rbx, eax
add rbx, qword [r14 + 0x20]
cmp edi, 0xfe
jge 0x18003b7e0
mov r13, r8
mov rax, qword [r14 + 8]
mov edx, esi
mov r9d, dword [rbx]
inc esi
dec ecx
imul edx, dword [rax + 0x18]
movsxd r8, edx
mov edx, 0x100
add r8, qword [r14 + 0x28]
movzx r11d, byte [r8 + 1]
movzx r10d, byte [r8 + 2]
or r11d, 0xff0000
shl r10d, 0x10
imul r11d, edi
shr r11d, 8
and r11d, 0xff00ff
mov eax, r11d
shr eax, 0x10
sub edx, eax
movzx eax, byte [r8]
or r10d, eax
mov r8d, 0x100
mov eax, r9d
imul r10d, edi
and eax, 0xff00ff
shr r9d, 8
imul eax, edx
and r9d, 0xff00ff
imul r9d, edx
mov edx, 0x100
shr r10d, 8
and r10d, 0xff00ff
shr eax, 8
and eax, 0xff00ff
shr r9d, 8
add r10d, eax
and r9d, 0xff00ff
add r11d, r9d
mov eax, r11d
shl r11d, 8
shr eax, 8
and eax, 0xff00ff
sub r8d, eax
mov eax, r10d
shl r8d, 8
shr eax, 8
or r8d, r11d
and eax, 0xff00ff
and r8d, 0xff00ff00
sub edx, eax
or edx, r10d
and edx, 0xff00ff
xor edx, r8d
mov dword [rbx], edx
add rbx, r13
test ecx, ecx
jg 0x18003b6f0
mov r13d, dword [rsp + 0x88]
jmp 0x18003b85c
mov r10, qword [r14 + 8]
movsxd rdx, dword [r10 + 0x18]
mov eax, edx
imul eax, esi
movsxd r9, eax
add r9, qword [r14 + 0x28]
cmp r8d, edx
jne 0x18003b81a
cmp dword [r10 + 0x10], 1
jne 0x18003b81a
cmp dword [r11 + 0x10], 1
jne 0x18003b81a
imul edx, ecx
mov rcx, rbx
movsxd r8, edx
mov rdx, r9
call fcn.18037edb0
jmp 0x18003b85c
mov r10, r8
mov r11, rdx
movzx r8d, word [r9]
dec ecx
movzx edx, byte [r9 + 2]
add r9, r11
or edx, 0xffffff00
mov word [rsp + 0x80], r8w
movzx eax, byte [rsp + 0x81]
shl edx, 8
or edx, eax
movzx eax, r8b
shl edx, 8
or edx, eax
mov dword [rbx], edx
add rbx, r10
test ecx, ecx
jg 0x18003b820
movzx r8d, r12b
imul r8d, ebp
sub r13d, 1
mov r9d, r12d
mov dword [rsp + 0x88], r13d
jns 0x18003b470
mov r10, qword [r14]
mov rdi, qword [r14 + 8]
mov esi, dword [rsp + 0x20]
mov rbp, qword [rsp + 0x70]
mov eax, r8d
cdq
movzx edx, dl
add eax, edx
sar eax, 8
mov ebx, eax
test eax, eax
jle 0x18003ba72
mov ecx, dword [r10 + 0x18]
mov eax, r9d
mov r8d, dword [r14 + 0x14]
cdq
movzx edx, dl
add eax, edx
sar eax, 8
imul ecx, eax
sub eax, r8d
imul eax, dword [rdi + 0x18]
cmp ebx, 0xff
jl 0x18003b99e
movsxd rbx, ecx
mov r8d, 0x100
add rbx, qword [r14 + 0x20]
mov edx, 0x100
movsxd rcx, eax
add rcx, qword [r14 + 0x28]
mov r9d, dword [rbx]
movzx r11d, byte [rcx + 1]
movzx r10d, byte [rcx + 2]
or r11d, 0xff0000
imul r11d, dword [r14 + 0x10]
shl r10d, 0x10
shr r11d, 8
and r11d, 0xff00ff
mov eax, r11d
shr eax, 0x10
sub r8d, eax
movzx eax, byte [rcx]
or r10d, eax
mov ecx, 0x100
imul r10d, dword [r14 + 0x10]
mov eax, r9d
and eax, 0xff00ff
shr r9d, 8
imul eax, r8d
and r9d, 0xff00ff
imul r9d, r8d
shr r10d, 8
and r10d, 0xff00ff
shr eax, 8
and eax, 0xff00ff
shr r9d, 8
add r10d, eax
and r9d, 0xff00ff
add r11d, r9d
mov eax, r11d
shl r11d, 8
shr eax, 8
and eax, 0xff00ff
sub edx, eax
mov eax, r10d
shl edx, 8
shr eax, 8
or edx, r11d
and eax, 0xff00ff
and edx, 0xff00ff00
sub ecx, eax
or ecx, r10d
and ecx, 0xff00ff
xor ecx, edx
mov dword [rbx], ecx
jmp 0x18003ba72
imul ebx, dword [r14 + 0x10]
mov edx, 0x100
movsxd r11, ecx
add r11, qword [r14 + 0x20]
movsxd rcx, eax
add rcx, qword [r14 + 0x28]
sar ebx, 8
mov r8d, dword [r11]
movzx r10d, byte [rcx + 1]
movzx r9d, byte [rcx + 2]
or r10d, 0xff0000
shl r9d, 0x10
imul r10d, ebx
shr r10d, 8
and r10d, 0xff00ff
mov eax, r10d
shr eax, 0x10
sub edx, eax
movzx eax, byte [rcx]
or r9d, eax
mov ecx, 0x100
mov eax, r8d
imul r9d, ebx
and eax, 0xff00ff
shr r8d, 8
imul eax, edx
and r8d, 0xff00ff
imul r8d, edx
mov edx, 0x100
shr r9d, 8
and r9d, 0xff00ff
shr eax, 8
and eax, 0xff00ff
shr r8d, 8
add r9d, eax
and r8d, 0xff00ff
add r10d, r8d
mov eax, r10d
shl r10d, 8
shr eax, 8
and eax, 0xff00ff
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
mov rcx, qword [rsp + 0x28]
inc esi
mov dword [rsp + 0x20], esi
cmp esi, dword [rbp + 0x14]
jl 0x18003b400
mov r15, qword [rsp + 0x30]
mov r13, qword [rsp + 0x38]
mov r12, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x78]
add rsp, 0x50
pop r14
pop rsi
pop rbp
ret