Function at 0x140016810
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
push rbp
push r13
lea rbp, [rsp - 0x68]
sub rsp, 0x168
xor r13d, r13d
mov r11d, edx
mov rdx, rcx
mov qword [rsp + 0x20], r13
mov r10, rcx
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x30], r13
mov ecx, r11d
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x58], r13
mov eax, dword [rdx]
lea rdx, [rdx + 4]
inc dword [rsp + rax*4 + 0x20]
add ecx, 0xffffffff
jne 0x140016860
cmp dword [rsp + 0x20], r11d
jne 0x140016897
mov rax, qword [rbp + 0xa8]
mov qword [rax], r13
mov rax, qword [rbp + 0xb0]
mov dword [rax], r13d
xor eax, eax
add rsp, 0x168
pop r13
pop rbp
ret
mov r8, qword [rbp + 0xb0]
mov ecx, 1
mov qword [rsp + 0x160], rbx
mov qword [rsp + 0x158], rsi
mov qword [rsp + 0x140], r14
mov esi, dword [r8]
nop
mov eax, ecx
cmp dword [rsp + rax*4 + 0x20], r13d
jne 0x1400168d0
inc ecx
cmp ecx, 0xf
jbe 0x1400168c0
cmp esi, ecx
mov r14d, ecx
mov edx, reloc.OLEAUT32.dll_SafeArrayDestroy
cmovb esi, ecx
nop dword [rax]
mov eax, edx
cmp dword [rsp + rax*4 + 0x20], r13d
jne 0x1400168ee
add edx, 0xffffffff
jne 0x1400168e0
cmp esi, edx
mov dword [rbp + 0x88], edx
mov r9d, 1
cmova esi, edx
shl r9d, cl
mov dword [r8], esi
cmp ecx, edx
jae 0x140016922
nop dword [rax]
mov eax, ecx
sub r9d, dword [rsp + rax*4 + 0x20]
js 0x14001693a
inc ecx
add r9d, r9d
cmp ecx, edx
jb 0x140016910
mov eax, edx
lea rcx, [rsp + 0x20]
lea rcx, [rcx + rax*4]
mov r8d, r9d
sub r9d, dword [rcx]
mov dword [rsp + 0x14], r9d
jns 0x140016944
mov eax, 0xfffffffd
jmp 0x140016ca5
mov qword [rsp + 0x150], rdi
mov dword [rcx], r8d
mov ecx, r13d
mov qword [rsp + 0x138], r15
mov dword [rsp + 0x74], r13d
add edx, 0xffffffff
je 0x140016981
mov rax, r13
nop word [rax + rax]
add ecx, dword [rsp + rax + 0x24]
mov dword [rsp + rax + 0x78], ecx
lea rax, [rax + 4]
add edx, 0xffffffff
jne 0x140016970
mov rbx, qword [rbp + 0xc8]
mov edx, r13d
nop dword [rax + rax]
mov eax, dword [r10]
lea r10, [r10 + 4]
test eax, eax
je 0x1400169ad
lea rcx, [rsp + 0x70]
lea rcx, [rcx + rax*4]
mov eax, dword [rcx]
mov dword [rbx + rax*4], edx
inc eax
mov dword [rcx], eax
inc edx
cmp edx, r11d
jb 0x140016990
movsxd rbx, dword [rbp + 0x88]
mov r11d, esi
mov rdx, qword [rbp + 0xc8]
or r15, 0xffffffffffffffff
neg r11d
mov qword [rsp + 0x148], r12
mov qword [rsp + 8], rdx
mov edi, r13d
mov eax, dword [rsp + rbx*4 + 0x70]
mov r9, r13
mov dword [rsp + 0x10], eax
mov r10d, r13d
mov dword [rsp + 0x70], r13d
mov qword [rbp - 0x50], r13
cmp r14d, ebx
jg 0x140016c78
mov rbx, r15
nop
movsxd rax, r14d
mov r8d, dword [rsp + rax*4 + 0x20]
lea rax, [rsp + rax*4 + 0x20]
mov qword [rsp + 0x60], rax
test r8d, r8d
je 0x140016c62
nop dword [rax + rax]
mov r12d, r8d
lea ecx, [r11 + rsi]
dec r8d
mov dword [rbp + 0x80], r8d
cmp r14d, ecx
jle 0x140016b52
mov eax, esi
neg eax
lea r13d, [rax + rax]
nop dword [rax]
nop word [rax + rax]
mov r9d, dword [rbp + 0x88]
inc r15d
sub r9d, ecx
inc rbx
cmp r9d, esi
mov edx, r14d
mov r11d, ecx
mov eax, 1
cmova r9d, esi
sub edx, ecx
mov ecx, edx
shl eax, cl
cmp eax, r12d
jbe 0x140016ab7
or ecx, 0xffffffff
sub ecx, r8d
mov r8, qword [rsp + 0x60]
add eax, ecx
cmp edx, r9d
jae 0x140016ab7
inc edx
cmp edx, r9d
jae 0x140016ab7
nop word [rax + rax]
mov ecx, dword [r8 + 4]
lea r8, [r8 + 4]
add eax, eax
cmp eax, ecx
jbe 0x140016ab7
sub eax, ecx
inc edx
cmp edx, r9d
jb 0x140016aa0
mov r8, qword [rbp + 0xc0]
mov ecx, edx
mov r10d, 1
shl r10d, cl
mov eax, dword [r8]
lea ecx, [rax + r10]
cmp ecx, 0x5a0
ja 0x140016cc8
mov r9, qword [rbp + 0xb8]
mov dword [r8], ecx
lea r9, [r9 + rax*8]
mov qword [rbp + rbx*8 - 0x50], r9
test rbx, rbx
je 0x140016b2c
mov byte [rsp], dl
lea ecx, [r11 + r13]
mov rdx, qword [rbp + rbx*8 - 0x58]
add ecx, esi
mov r8d, edi
mov byte [rsp + 1], sil
shr r8d, cl
mov rax, r9
sub rax, rdx
mov dword [rsp + rbx*4 + 0x70], edi
sar rax, 3
sub eax, r8d
mov dword [rsp + 4], eax
mov rax, qword [rsp]
mov qword [rdx + r8*8], rax
jmp 0x140016b36
mov rax, qword [rbp + 0xa8]
mov qword [rax], r9
mov r8d, dword [rbp + 0x80]
lea ecx, [r11 + rsi]
cmp r14d, ecx
jg 0x140016a50
mov rdx, qword [rsp + 8]
xor r13d, r13d
mov rcx, qword [rbp + 0xc8]
movzx eax, r14b
sub al, r11b
mov byte [rsp + 1], al
mov eax, dword [rsp + 0x10]
lea rcx, [rcx + rax*4]
cmp rdx, rcx
jb 0x140016b77
mov byte [rsp], 0xc0
jmp 0x140016bcf
mov ecx, dword [rdx]
mov r12d, dword [rbp + 0x90]
cmp ecx, r12d
jae 0x140016b9d
cmp ecx, 0x100
mov dword [rsp + 4], ecx
mov eax, 0x60
cmovb eax, r13d
mov byte [rsp], al
jmp 0x140016bc6
mov rax, qword [rbp + 0xa0]
sub ecx, r12d
lea rcx, [rcx*4]
movzx eax, byte [rcx + rax]
add al, 0x50
mov byte [rsp], al
mov rax, qword [rbp + 0x98]
mov eax, dword [rcx + rax]
mov dword [rsp + 4], eax
add rdx, 4
mov qword [rsp + 8], rdx
mov ecx, r14d
mov r8d, 1
sub ecx, r11d
mov edx, edi
shl r8d, cl
mov ecx, r11d
shr edx, cl
cmp edx, r10d
jae 0x140016bfc
mov rax, qword [rsp]
nop
mov qword [r9 + rdx*8], rax
add edx, r8d
cmp edx, r10d
jb 0x140016bf0
lea ecx, [r14 - 1]
mov eax, 1
shl eax, cl
test edi, eax
je 0x140016c18
nop dword [rax + rax]
xor edi, eax
shr eax, 1
test edi, eax
jne 0x140016c10
xor edi, eax
mov ecx, r11d
mov eax, 1
shl eax, cl
dec eax
and eax, edi
cmp eax, dword [rsp + rbx*4 + 0x70]
je 0x140016c4d
nop
sub r11d, esi
mov eax, 1
mov ecx, r11d
dec rbx
shl eax, cl
dec r15d
dec eax
and eax, edi
cmp eax, dword [rsp + rbx*4 + 0x70]
jne 0x140016c30
mov r8d, dword [rbp + 0x80]
mov rdx, qword [rsp + 8]
test r8d, r8d
jne 0x140016a20
inc r14d
cmp r14d, dword [rbp + 0x88]
jle 0x140016a00
mov ebx, dword [rbp + 0x88]
cmp dword [rsp + 0x14], 0
je 0x140016c8a
cmp ebx, 1
je 0x140016c8a
mov r13d, 0xfffffffb
mov eax, r13d
mov r12, qword [rsp + 0x148]
mov rdi, qword [rsp + 0x150]
mov r15, qword [rsp + 0x138]
mov rsi, qword [rsp + 0x158]
mov rbx, qword [rsp + 0x160]
mov r14, qword [rsp + 0x140]
add rsp, 0x168
pop r13
pop rbp
ret
mov eax, 0xfffffffd
jmp 0x140016c8d