Function at 0x14003a7d0
Capabilities:
Encode data using xor

Disassembly:
push rdi
sub rsp, 0x30
mov edx, edx
mov r10, rcx
mov r9d, 0x400
mov dword [rcx], 0x4000400
mov qword [rsp + 0x58], rdx
test rdx, rdx
je 0x14003a84c
lea rax, [rcx + 0x104]
mov ecx, edx
nop word [rax + rax]
mov dword [rax - 0x100], 0x4000400
mov dword [rax - 0xfc], 0x4000400
mov dword [rax - 0xf8], 0x4000400
mov dword [rax - 0xf4], 0x4000400
mov dword [rax], 0x4000400
mov dword [rax + 4], 0x4000400
mov dword [rax + 8], 0x4000400
mov dword [rax + 0xc], 0x4000400
lea rax, [rax + 0x10]
dec rcx
jne 0x14003a800
lea rdi, [r10 + 0x204]
movzx eax, r9w
mov ecx, 0x100
rep stosw word [rdi], ax
test r8b, r8b
jne 0x14003aaa1
xor eax, eax
mov qword [rsp + 0x40], rax
test rdx, rdx
je 0x14003aaa1
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rsi
mov qword [rsp + 0x18], r12
mov qword [rsp + 0x10], r13
mov qword [rsp + 8], r14
mov qword [rsp], r15
lea rdi, [0x140068570]
mov esi, dword [r10 + 0x4804]
mov r14d, eax
lea r12, [r10 + 0x404]
mov dword [r10 + r14*4 + 0x4808], esi
movzx ecx, word [r10]
xor r8d, r8d
mov eax, ecx
xor rcx, 0x7f0
shr rcx, 4
shr rax, 4
movzx edx, byte [rcx + rdi]
movzx ebp, byte [rax + rdi]
movzx ecx, word [r10 + 2]
mov eax, ecx
xor rcx, 0x7f0
mov dword [rsp + 0x50], ebp
shr rax, 4
shr rcx, 4
movzx r15d, byte [rax + rdi]
movzx r13d, byte [rcx + rdi]
imul rax, r14, 0x440
add r12, rax
add r15d, edx
add r13d, edx
test esi, esi
je 0x14003aa67
mov rbx, r12
nop dword [rax]
cmp r8d, 8
jae 0x14003a98b
xor r9d, r9d
lea edi, [r8 + 8]
lea r11, [r14*8]
lea rbp, [0x140068570]
nop dword [rax]
mov ecx, edi
shr edi, 1
and ecx, 1
mov eax, edi
add rax, r11
movzx edx, word [r10 + rax*2 + 4]
mov eax, ecx
neg eax
shr rdx, 4
shr rax, 4
and eax, 0x7f
xor rdx, rax
movzx eax, byte [rdx + rbp]
add r9d, eax
cmp edi, 1
jne 0x14003a940
mov eax, dword [rsp + 0x50]
inc r8d
add rbx, 4
add eax, r9d
mov dword [rbx - 4], eax
cmp r8d, esi
jb 0x14003a920
jmp 0x14003aa60
cmp r8d, esi
jae 0x14003aa60
lea rbx, [r12 + r8*4]
lea rbp, [0x140068570]
nop
cmp r8d, 0x10
jae 0x14003a9fc
xor r9d, r9d
mov edi, r8d
lea r11, [r14*8]
mov ecx, edi
shr edi, 1
and ecx, 1
mov eax, edi
add rax, r11
movzx edx, word [r10 + rax*2 + 0x104]
mov eax, ecx
neg eax
shr rdx, 4
shr rax, 4
and eax, 0x7f
xor rdx, rax
movzx eax, byte [rdx + rbp]
add r9d, eax
cmp edi, 1
jne 0x14003a9b4
lea eax, [r9 + r15]
inc r8d
add rbx, 4
mov dword [rbx - 4], eax
cmp r8d, esi
jb 0x14003a9a0
jmp 0x14003aa60
cmp r8d, esi
jae 0x14003aa60
lea r11, [r12 + r8*4]
nop word [rax + rax]
xor r9d, r9d
lea eax, [r8 + 0xf0]
nop word [rax + rax]
mov ecx, eax
shr eax, 1
movzx edi, word [r10 + rax*2 + 0x204]
and ecx, 1
neg ecx
shr rdi, 4
shr rcx, 4
and ecx, 0x7f
xor rdi, rcx
movzx ecx, byte [rdi + rbp]
add r9d, ecx
cmp eax, 1
jne 0x14003aa20
lea eax, [r9 + r13]
inc r8d
add r11, 4
mov dword [r11 - 4], eax
cmp r8d, esi
jb 0x14003aa10
lea rdi, [0x140068570]
mov rax, qword [rsp + 0x40]
inc rax
mov qword [rsp + 0x40], rax
cmp rax, qword [rsp + 0x58]
jb 0x14003a8a1
mov r15, qword [rsp]
mov r14, qword [rsp + 8]
mov r13, qword [rsp + 0x10]
mov r12, qword [rsp + 0x18]
mov rsi, qword [rsp + 0x20]
mov rbp, qword [rsp + 0x28]
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret