Function at 0x14003d1e0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
lea rbp, [rsp + 0x20]
xor eax, eax
xor edi, edi
mov rsi, rdx
mov qword [rcx], rax
mov qword [rcx + 8], rax
mov qword [rcx + 0x10], rax
mov qword [rcx + 0x18], rax
mov qword [rcx + 0x20], rax
mov qword [rcx + 0x28], rax
mov qword [rcx + 0x30], rax
mov qword [rcx + 0x38], rax
mov qword [rcx + 0x40], rax
mov edx, dword [rdx + 4]
mov qword [rbp + 0x58], rbx
mov rbx, rcx
mov r14d, edi
test edx, edx
jle 0x14003d246
mov rax, qword [rsi + 8]
mov ecx, edx
cmp dword [rax], edi
jle 0x14003d23d
inc r14d
add rax, 4
dec rcx
jne 0x14003d236
mov dword [rbx + 4], edx
mov dword [rbx + 8], r14d
mov eax, dword [rsi]
mov dword [rbx], eax
test r14d, r14d
jle 0x14003d79e
mov edx, dword [rsi + 4]
mov rcx, qword [rsi + 8]
mov r8d, r14d
call fcn.14003c650
movsxd r12, r14d
movabs r13, 0xffffffffffffff0
lea rcx, [r12*8]
mov r15, rax
lea rax, [rcx + 0xf]
cmp rax, rcx
ja 0x14003d28d
mov rax, r13
and rax, 0xfffffffffffffff0
call fcn.140076ae0
sub rsp, rax
lea r10, [rsp + 0x20]
mov qword [rbp + 0x40], r10
test r15, r15
jne 0x14003d2b7
mov rcx, rbx
call fcn.14003d050
or eax, 0xffffffff
jmp 0x14003d7a0
mov r9d, edi
mov r8, rdi
test r14d, r14d
jle 0x14003d356
nop word [rax + rax]
mov ecx, dword [r15 + r8*4]
inc r8
rol ecx, 0x10
mov eax, ecx
mov edx, ecx
shl ecx, 8
shr edx, 8
shl eax, 8
xor edx, eax
and edx, 0xff00ff
xor edx, ecx
mov ecx, edx
mov eax, edx
shl edx, 4
shr ecx, 4
shl eax, 4
xor ecx, eax
and ecx, 0xf0f0f0f
xor ecx, edx
mov edx, ecx
lea eax, [rcx*4]
shr edx, 2
xor edx, eax
lea eax, [rcx*4]
and edx, 0x33333333
xor edx, eax
mov ecx, edx
shr ecx, 1
lea eax, [rdx + rdx]
xor ecx, eax
lea eax, [rdx + rdx]
and ecx, 0x55555555
xor ecx, eax
movsxd rax, r9d
inc r9d
mov dword [r15 + r8*4 - 4], ecx
lea rcx, [r15 + rax*4]
mov qword [r10 + r8*8 - 8], rcx
cmp r8, r12
jl 0x14003d2d0
lea r9, [0x14003d1c0]
mov r8d, 8
mov rdx, r12
mov rcx, r10
call sub.msvcrt.dll_qsort
lea rcx, [r12*4]
lea rax, [rcx + 0xf]
mov qword [rbp + 0x48], rcx
cmp rax, rcx
ja 0x14003d386
mov rax, r13
and rax, 0xfffffffffffffff0
call fcn.140076ae0
sub rsp, rax
lea r13, [rsp + 0x20]
call sub.msvcrt.dll_malloc
mov edx, edi
mov rcx, rdi
mov qword [rbx + 0x20], rax
test r14d, r14d
jle 0x14003d3f8
mov r8, qword [rbp + 0x40]
nop
mov rax, qword [r8 + rcx*8]
inc rcx
sub rax, r15
sar rax, 2
cdqe
mov dword [r13 + rax*4], edx
inc edx
cmp rcx, r12
jl 0x14003d3b0
test r14d, r14d
jle 0x14003d3f8
mov rdx, r15
mov r9, r13
sub rdx, r13
nop word [rax + rax]
movsxd r8, dword [r9]
mov eax, dword [rdx + r9]
mov rcx, qword [rbx + 0x20]
add r9, 4
dec r12
mov dword [rcx + r8*4], eax
jne 0x14003d3e0
mov rcx, r15
call sub.msvcrt.dll_free
mov r8, r13
mov edx, r14d
mov rcx, rsi
call fcn.14003c880
mov rcx, qword [rbp + 0x48]
mov qword [rbx + 0x18], rax
call sub.msvcrt.dll_malloc
mov edx, edi
mov qword [rbx + 0x28], rax
mov r10d, edi
cmp dword [rsi + 4], edx
jle 0x14003d456
mov r8, rdi
mov r9, r13
nop
mov rax, qword [rsi + 8]
cmp dword [r8 + rax], edi
jle 0x14003d44b
movsxd rcx, dword [r9]
mov rax, qword [rbx + 0x28]
inc r10d
mov dword [rax + rcx*4], edx
add r9, 4
inc edx
add r8, 4
cmp edx, dword [rsi + 4]
jl 0x14003d430
movsxd rcx, r10d
call sub.msvcrt.dll_malloc
mov r12d, edi
mov r9d, edi
mov qword [rbx + 0x30], rax
cmp dword [rsi + 4], edi
jle 0x14003d49e
mov r8, rdi
mov rax, qword [rsi + 8]
cmp dword [rax + r8], edi
jle 0x14003d491
movsxd rdx, dword [r13]
mov rcx, qword [rbx + 0x30]
movzx eax, byte [rax + r8]
inc r12d
mov byte [rdx + rcx], al
add r13, 4
inc r9d
add r8, 4
cmp r9d, dword [rsi + 4]
jl 0x14003d470
mov eax, dword [rbx + 8]
mov ecx, edi
test eax, eax
je 0x14003d4ad
inc ecx
shr eax, 1
jne 0x14003d4a7
lea eax, [rcx - 4]
mov ecx, 5
mov edx, 4
cmp eax, ecx
cmovl eax, ecx
mov ecx, 8
mov dword [rbx + 0x40], eax
cmp eax, 8
cmovg eax, ecx
mov ecx, eax
mov dword [rbx + 0x40], eax
mov eax, 1
shl eax, cl
movsxd rcx, eax
mov dword [rbp + 0x40], eax
call sub.msvcrt.dll_calloc
mov dword [rbx + 0x44], edi
mov r9, rdi
movsxd r13, r12d
mov qword [rbx + 0x38], rax
test r12d, r12d
jle 0x14003d5f7
mov r10d, 1
mov rcx, qword [rbx + 0x30]
movsx eax, byte [rcx + r9]
cmp dword [rbx + 0x44], eax
jge 0x14003d511
mov dword [rbx + 0x44], eax
movsx esi, byte [rcx + r9]
mov r11d, dword [rbx + 0x40]
cmp esi, r11d
jg 0x14003d5e8
mov rax, qword [rbx + 0x20]
sub r11d, esi
mov r8d, edi
mov ecx, dword [rax + r9*4]
rol ecx, 0x10
mov edx, ecx
mov eax, ecx
shl ecx, 8
shr edx, 8
shl eax, 8
xor edx, eax
and edx, 0xff00ff
xor edx, ecx
mov ecx, edx
mov eax, edx
shl edx, 4
shl eax, 4
shr ecx, 4
xor ecx, eax
and ecx, 0xf0f0f0f
xor ecx, edx
mov edx, ecx
shr edx, 2
lea eax, [rcx*4]
xor edx, eax
lea eax, [rcx*4]
movzx ecx, r11b
and edx, 0x33333333
xor edx, eax
mov r14d, edx
shr r14d, 1
lea eax, [rdx + rdx]
xor r14d, eax
lea eax, [rdx + rdx]
and r14d, 0x55555555
xor r14d, eax
mov eax, 1
shl eax, cl
test eax, eax
jle 0x14003d5e8
mov r11d, r14d
nop word [rax + rax]
mov rax, qword [rbx + 0x30]
movzx ecx, byte [r9 + rax]
mov eax, r8d
inc r8d
shl eax, cl
mov ecx, eax
mov rax, qword [rbx + 0x38]
or rcx, r11
mov dword [rax + rcx*4], r10d
mov rax, qword [rbx + 0x30]
mov ecx, dword [rbx + 0x40]
movsx edx, byte [rax + r9]
sub ecx, edx
mov edx, 1
shl edx, cl
cmp r8d, edx
jl 0x14003d5b0
inc r9
inc r10d
cmp r9, r13
jl 0x14003d500
mov ecx, 0x1f
mov r14d, 0xfffffffe
mov esi, edi
sub ecx, dword [rbx + 0x40]
mov r15d, edi
mov r11, rdi
shl r14d, cl
mov r10, rdi
cmp dword [rbp + 0x40], edi
jle 0x14003d79e
nop dword [rax]
mov ecx, 0x20
mov r8d, r15d
sub ecx, dword [rbx + 0x40]
shl r8d, cl
mov ecx, r8d
rol ecx, 0x10
mov r9d, ecx
mov eax, ecx
shl ecx, 8
shl eax, 8
shr r9d, 8
xor r9d, eax
and r9d, 0xff00ff
xor r9d, ecx
mov edx, r9d
mov eax, r9d
mov dword [rbp + 0x48], r9d
shr edx, 4
shl eax, 4
xor edx, eax
mov eax, r9d
mov r9, qword [rbx + 0x38]
and edx, 0xf0f0f0f
shl eax, 4
mov qword [rbp + 0x50], r9
xor edx, eax
mov ecx, edx
lea eax, [rdx*4]
shr ecx, 2
xor ecx, eax
lea eax, [rdx*4]
and ecx, 0x33333333
xor ecx, eax
mov edx, ecx
shr rdx, 1
lea eax, [rcx + rcx]
add ecx, ecx
xor rdx, rax
and edx, 0x55555555
xor rdx, rcx
cmp dword [r9 + rdx*4], 0
jne 0x14003d791
lea ecx, [rdi + 1]
cmp ecx, r12d
jge 0x14003d6dc
mov rax, qword [rbx + 0x20]
lea rdx, [rax + r11*4 + 4]
cmp dword [rdx], r8d
ja 0x14003d6dc
inc ecx
inc edi
inc r11
add rdx, 4
cmp ecx, r12d
jl 0x14003d6c7
cmp r10, r13
jge 0x14003d708
mov rax, qword [rbx + 0x20]
lea rcx, [rax + r10*4]
nop dword [rax]
mov eax, dword [rcx]
and eax, r14d
cmp r8d, eax
jb 0x14003d708
inc r10
inc esi
add rcx, 4
cmp r10, r13
jl 0x14003d6f0
mov r8d, dword [rbp + 0x48]
mov eax, 0x7fff
mov edx, r12d
sub edx, esi
cmp edi, eax
mov ecx, r8d
mov r9d, edi
cmova r9d, eax
cmp edx, eax
cmova edx, eax
mov eax, r8d
shl r8d, 4
shl eax, 4
shr ecx, 4
or r9d, 0xffff0000
xor ecx, eax
shl r9d, 0xf
or r9d, edx
and ecx, 0xf0f0f0f
xor ecx, r8d
mov r8d, ecx
lea eax, [rcx*4]
shr r8d, 2
xor r8d, eax
lea eax, [rcx*4]
and r8d, 0x33333333
xor r8d, eax
mov edx, r8d
shr rdx, 1
lea eax, [r8 + r8]
lea ecx, [r8 + r8]
xor rdx, rax
mov rax, qword [rbp + 0x50]
and edx, 0x55555555
xor rdx, rcx
mov dword [rax + rdx*4], r9d
inc r15d
cmp r15d, dword [rbp + 0x40]
jl 0x14003d620
xor eax, eax
mov rbx, qword [rbp + 0x58]
mov rsp, rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret