Function at 0x140017a20
Capabilities:
Encode data using xor

Disassembly:
test rdx, rdx
je 0x140017e47
push rbx
push rsi
push rdi
sub rsp, 0x40
lea eax, [r9 - 0x10]
mov rsi, r8
mov rbx, rdx
mov rdi, rcx
test eax, 0xffffffe7
jne 0x140017e40
cmp r9d, 0x28
je 0x140017e40
movsxd rcx, dword [rsp + 0x80]
lea eax, [rcx - 0x10]
test eax, 0xffffffe7
jne 0x140017e40
cmp ecx, 0x28
je 0x140017e40
mov qword [rsp + 0x60], rbp
mov r8, rcx
mov qword [rsp + 0x70], r12
mov rdx, rsi
mov qword [rsp + 0x78], r13
mov dword [rdi + 0x3d0], ecx
lea rcx, [rdi + 0x3d8]
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r15
mov dword [rdi + 0x3cc], r9d
call sub.VCRUNTIME140.dll_memcpy
movsxd r8, dword [rdi + 0x3d0]
lea rcx, [rdi + 0x3f8]
mov rdx, rsi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rdi + 0x3cc]
cmp eax, 0x10
je 0x140017aec
cmp eax, 0x18
lea r14, [rdi + 0x3d4]
mov eax, SafeArrayGetDim
jne 0x140017b13
cmp dword [rdi + 0x3d0], 0x20
mov ecx, SafeArrayGetDim
cmovne eax, ecx
jmp 0x140017b13
mov edx, dword [rdi + 0x3d0]
cmp edx, 0x10
jne 0x140017afc
lea eax, [rdx - 6]
jmp 0x140017b0c
cmp edx, 0x18
mov eax, SafeArrayGetDim
mov ecx, SafeArrayGetDim
cmove eax, ecx
lea r14, [rdi + 0x3d4]
mov dword [r14], eax
lea rbp, [rdi + 0xc]
mov eax, dword [rdi + 0x3d0]
cdq
and edx, 3
add eax, edx
sar eax, 2
movsxd r13, eax
xor esi, esi
mov r15, r13
mov qword [rsp + 0x20], r13
test r15, r15
jle 0x140017b4c
mov r8, r15
xor edx, edx
shl r8, 2
mov rcx, rbp
call sub.VCRUNTIME140.dll_memset
mov eax, dword [r14]
inc esi
add rbp, 0x20
cmp esi, eax
jle 0x140017b36
xor esi, esi
test eax, eax
js 0x140017b8b
lea rbp, [rdi + 0x1ec]
test r15, r15
jle 0x140017b7c
mov r8, r15
xor edx, edx
shl r8, 2
mov rcx, rbp
call sub.VCRUNTIME140.dll_memset
mov eax, dword [r14]
inc esi
add rbp, 0x20
cmp esi, eax
jle 0x140017b66
jmp 0x140017b90
mov qword [rsp + 0x20], r15
lea r12d, [rax + 1]
mov eax, dword [rdi + 0x3cc]
cdq
imul r12d, r13d
and edx, 3
lea r10, [rdi + 0x418]
add eax, edx
mov rdx, r10
sar eax, 2
movsxd rsi, eax
test eax, eax
jle 0x140017bf8
mov r8d, esi
nop dword [rax + rax]
movzx ecx, byte [rbx]
lea rdx, [rdx + 4]
shl ecx, 0x18
lea rbx, [rbx + 4]
mov dword [rdx - 4], ecx
movzx eax, byte [rbx - 3]
shl eax, 0x10
or eax, ecx
mov dword [rdx - 4], eax
movzx ecx, byte [rbx - 2]
shl ecx, 8
or ecx, eax
mov dword [rdx - 4], ecx
movzx eax, byte [rbx - 1]
or ecx, eax
mov dword [rdx - 4], ecx
sub r8, 1
jne 0x140017bc0
xor ebx, ebx
mov rbp, rsi
test esi, esi
jle 0x140017c4e
xor r11d, r11d
cmp ebx, r12d
jge 0x140017d91
mov ecx, dword [r10]
mov eax, ebx
cdq
inc r11
idiv r13d
movsxd r9, eax
mov eax, ebx
cdq
inc ebx
idiv r13d
movsxd r8, edx
lea rdx, [r8 + r9*8]
mov dword [rdi + rdx*4 + 0xc], ecx
mov eax, dword [r14]
sub eax, r9d
cdqe
lea rcx, [r8 + rax*8]
mov eax, dword [r10]
add r10, 4
mov dword [rdi + rcx*4 + 0x1ec], eax
cmp r11, rbp
jl 0x140017c04
cmp ebx, r12d
jge 0x140017d91
lea rax, [0x140025570]
lea rcx, [rdi + 0x41c]
nop word [rax + rax]
movzx r8d, byte [rax]
inc rax
mov r11d, dword [rdi + rbp*4 + 0x414]
mov qword [rsp + 0x28], rax
movsxd r9, r11d
mov rax, r9
sar rax, 0x10
movzx edx, al
lea rax, [0x140000000]
movsx r10d, byte [rdx + rax + 0x22370]
mov rax, r9
sar rax, 8
xor r10d, r8d
movzx edx, al
lea r8, [0x140000000]
shl r10d, 8
movzx eax, byte [rdx + r8 + 0x22370]
xor r10d, eax
movzx eax, r9b
shl r10d, 8
movzx eax, byte [rax + r8 + 0x22370]
xor r10d, eax
mov eax, r11d
shr rax, 0x18
lea r11, [0x140000000]
shl r10d, 8
movzx eax, byte [rax + r11 + 0x22370]
xor r10d, eax
xor dword [rdi + 0x418], r10d
cmp esi, 8
je 0x140017e48
cmp rbp, 1
jle 0x140017d20
lea rdx, [rbp - 1]
mov eax, dword [rcx - 4]
xor dword [rcx], eax
lea rcx, [rcx + 4]
sub rdx, 1
jne 0x140017d11
lea rcx, [rdi + 0x41c]
xor esi, esi
test rbp, rbp
jle 0x140017d7c
lea r11, [rdi + 0x418]
cmp ebx, r12d
jge 0x140017d8c
mov eax, ebx
inc rsi
cdq
idiv r13d
movsxd r10, eax
mov eax, ebx
cdq
inc ebx
idiv r13d
movsxd r9, edx
mov edx, dword [r11]
lea r8, [r9 + r10*8]
mov dword [rdi + r8*4 + 0xc], edx
mov eax, dword [r14]
sub eax, r10d
cdqe
lea rdx, [r9 + rax*8]
mov eax, dword [r11]
add r11, 4
mov dword [rdi + rdx*4 + 0x1ec], eax
cmp rsi, rbp
jl 0x140017d35
mov rax, qword [rsp + 0x28]
mov esi, ebp
cmp ebx, r12d
jl 0x140017c70
mov r15, qword [rsp + 0x20]
mov r13, qword [rsp + 0x78]
mov ebx, 1
mov rbp, qword [rsp + 0x60]
cmp dword [r14], ebx
jle 0x140017e2d
lea rsi, [rdi + 0x20c]
test r15, r15
jle 0x140017e22
mov r10, rsi
lea r12, [0x140000000]
mov r11, r15
nop dword [rax]
nop word [rax + rax]
mov eax, dword [r10]
lea r10, [r10 + 4]
mov edx, eax
movsxd r9, eax
shr rdx, 0x18
mov rax, r9
sar rax, 0x10
movzx ecx, al
mov rax, r9
sar rax, 8
mov r8d, dword [r12 + rdx*4 + 0x24570]
xor r8d, dword [r12 + rcx*4 + 0x24970]
movzx ecx, al
movzx eax, r9b
xor r8d, dword [r12 + rcx*4 + 0x24d70]
xor r8d, dword [r12 + rax*4 + 0x25170]
mov dword [r10 - 4], r8d
sub r11, 1
jne 0x140017dd0
inc ebx
add rsi, 0x20
cmp ebx, dword [r14]
jl 0x140017db0
mov r15, qword [rsp + 0x30]
mov r14, qword [rsp + 0x38]
mov r12, qword [rsp + 0x70]
mov byte [rdi + 8], 1
add rsp, 0x40
pop rdi
pop rsi
pop rbx
ret
mov rdx, rcx
mov r8d, 3
mov eax, dword [rdx - 4]
xor dword [rdx], eax
lea rdx, [rdx + 4]
sub r8, 1
jne 0x140017e51
mov eax, dword [rdi + 0x424]
mov edx, eax
movsxd r8, eax
shr rdx, 0x18
mov rax, r8
sar rax, 0x10
movsx r9d, byte [rdx + r11 + 0x22370]
movzx edx, al
shl r9d, 8
movzx eax, byte [rdx + r11 + 0x22370]
xor r9d, eax
mov rax, r8
sar rax, 8
shl r9d, 8
movzx edx, al
movzx eax, byte [rdx + r11 + 0x22370]
xor r9d, eax
movzx eax, r8b
shl r9d, 8
movzx eax, byte [rax + r11 + 0x22370]
xor r9d, eax
xor dword [rdi + 0x428], r9d
cmp rbp, 5
jle 0x140017d27
lea rdx, [rdi + 0x42c]
lea r8, [rbp - 5]
nop dword [rax]
mov eax, dword [rdx - 4]
xor dword [rdx], eax
lea rdx, [rdx + 4]
sub r8, 1
jne 0x140017ee0
xor esi, esi
jmp 0x140017d2e