Function at 0x14004c690
Capabilities:
Encode data using xor

Disassembly:
push rdi
push r13
sub rsp, 0x58
mov r13, qword [rcx + 0x10]
mov rdi, rdx
movsxd rax, dword [rcx + 0x1c]
shl rax, 4
add rax, r13
mov qword [rsp + 0x20], r13
mov qword [rsp + 0x28], rax
cmp r13, rax
je 0x14004c92c
mov qword [rsp + 0x78], rbx
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r15
nop dword [rax + rax]
mov eax, dword [r13]
mov esi, dword [r13 + 4]
mov r12d, dword [r13 + 8]
mov dword [rsp + 0x80], eax
mov eax, dword [r13 + 0xc]
add eax, esi
mov dword [rsp + 0x88], eax
cmp esi, eax
jge 0x14004c8fa
mov r13d, dword [rsp + 0x80]
mov r11, qword [rdi]
mov ebp, r13d
mov r10, qword [rdi + 8]
mov r15d, r12d
sub ebp, dword [rdi + 0x14]
mov eax, dword [r11 + 0xc]
imul eax, esi
movsxd rdx, eax
mov eax, esi
add rdx, qword [r11]
sub eax, dword [rdi + 0x18]
mov qword [rdi + 0x20], rdx
imul eax, dword [r10 + 0xc]
movsxd r14, eax
add r14, qword [r10]
mov qword [rdi + 0x28], r14
movsxd r9, dword [r11 + 0x10]
mov eax, r9d
imul eax, r13d
movsxd rbx, eax
add rbx, rdx
cmp dword [rdi + 0x10], 0xfe
jge 0x14004c86f
mov r14, r9
nop word [rax + rax]
mov rax, qword [rdi + 8]
mov r8d, 0x100
mov r9d, dword [rbx]
dec r15d
mov ecx, dword [rax + 0x10]
imul ecx, ebp
inc ebp
movsxd rdx, ecx
mov ecx, 0x100
add rdx, qword [rdi + 0x28]
movzx r11d, byte [rdx + 1]
movzx r10d, byte [rdx + 2]
or r11d, 0xff0000
imul r11d, dword [rdi + 0x10]
shl r10d, 0x10
shr r11d, 8
and r11d, 0xff00ff
mov eax, r11d
shr eax, 0x10
sub r8d, eax
movzx eax, byte [rdx]
or r10d, eax
mov edx, 0x100
imul r10d, dword [rdi + 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
shr eax, 8
and eax, 0xff00ff
sub edx, eax
mov eax, r11d
shl eax, 8
shl edx, 8
or edx, eax
mov eax, r10d
shr eax, 8
and eax, 0xff00ff
sub ecx, eax
mov eax, r11d
or ecx, r10d
shr eax, 8
xor edx, ecx
shl r11d, 8
and eax, 0xff00ff
and edx, 0xff00ff
mov ecx, 0x100
sub ecx, eax
shl ecx, 8
or ecx, r11d
xor edx, ecx
mov dword [rbx], edx
add rbx, r14
test r15d, r15d
jg 0x14004c770
jmp 0x14004c8e6
movsxd rcx, dword [r10 + 0x10]
mov r8d, r12d
mov eax, ecx
imul eax, ebp
cdqe
add rax, r14
cmp r9d, ecx
jne 0x14004c8a7
cmp dword [r10 + 8], 1
jne 0x14004c8a7
cmp dword [r11 + 8], 1
jne 0x14004c8a7
imul ecx, r12d
mov rdx, rax
movsxd r8, ecx
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcpy
jmp 0x14004c8e6
mov r10, rcx
nop word [rax + rax]
movzx ecx, word [rax]
dec r8d
movzx edx, byte [rax + 2]
add rax, r10
shl edx, 8
mov word [rsp + 0x70], cx
movzx ecx, byte [rsp + 0x71]
or edx, ecx
movzx ecx, byte [rsp + 0x70]
shl edx, 8
or edx, ecx
or edx, 0xff000000
mov dword [rbx], edx
add rbx, r9
test r8d, r8d
jg 0x14004c8b0
inc esi
cmp esi, dword [rsp + 0x88]
jl 0x14004c710
mov r13, qword [rsp + 0x20]
add r13, 0x10
mov qword [rsp + 0x20], r13
cmp r13, qword [rsp + 0x28]
jne 0x14004c6e0
mov r15, qword [rsp + 0x30]
mov r14, qword [rsp + 0x38]
mov r12, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x78]
add rsp, 0x58
pop r13
pop rdi
ret