Function at 0x1400382b0
Capabilities:
Encode data using xor
Encrypt data using aes via x86 extensions

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x50
mov rbx, rdx
mov rdx, qword [rcx + 0x58]
mov rsi, rcx
mov qword [rsp + 0x40], rcx
mov rcx, qword [rcx + 0x50]
mov r14d, r8d
cmp rcx, 0x1238
je 0x1400382ff
test rdx, rdx
je 0x1400382f2
mov rdi, rdx
xor eax, eax
rep stosb byte [rdi], al
mov rcx, rdx
call fcn.14002b840
mov ecx, 0x1238
call fcn.14002b7b0
mov rdx, rax
mov qword [rsi + 0x58], rdx
mov qword [rsi + 0x50], 0x1238
mov qword [rsi + 0x48], 0xffffffffffffffff
mov r12d, r14d
lea r13, [rsi + 0x20]
xor ebp, ebp
shr r12d, 2
mov rcx, r13
mov qword [rsi + 0x48], rbp
lea eax, [r12 + 6]
mov dword [rsi + 0x18], eax
lea eax, [rax*4 + 4]
mov edx, eax
call fcn.140037c50
movzx eax, byte [0x1400c2e60]
mov rdi, qword [rsi + 0x38]
test al, al
jne 0x140038358
call fcn.140040bb0
movzx eax, byte [0x1400c2e60]
cmp byte [0x1400c2e66], bpl
je 0x1400383ae
test al, al
jne 0x14003836a
call fcn.140040bb0
cmp byte [0x1400c2e63], bpl
je 0x1400383ae
mov rdx, r14
mov r8, rdi
mov rcx, rbx
call fcn.140041a00
mov rax, qword [rsi + 8]
lea rcx, [rsi + 8]
call qword [rax + 0x40]
test al, al
jne 0x140038d51
mov edx, dword [rsi + 0x18]
mov rcx, qword [rsi + 0x38]
add rsp, 0x50
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
jmp 0x140041990
mov rax, r14
mov qword [rsp + 0xa8], r15
mov r15d, 4
shr rax, 2
mov r9, r14
mov r8, rbx
lea rdx, [rax*4]
mov rcx, rdi
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], r15
call fcn.1400431e4
mov rcx, qword [rsp + 0x20]
xor edx, edx
lea r8, [rcx*4]
lea rcx, [r14 + rdi]
sub r8, r14
call fcn.140046360
lea rdx, [rsp + 0x28]
lea rcx, [rsp + 0x30]
call fcn.140034c70
mov rdx, rbp
shr rax, 2
test rax, rax
je 0x140038431
nop
mov ecx, dword [rdi + rdx*4]
inc rdx
bswap ecx
mov dword [rdi + rdx*4 - 4], ecx
cmp rdx, rax
jb 0x140038420
lea r9, [0x140000000]
lea eax, [r12 - 1]
lea r10, [0x14008b0c4]
lea rbx, [rax*4]
mov edx, dword [rbx + rdi]
mov eax, edx
shr eax, 0x10
movzx ecx, al
mov eax, edx
movzx r8d, byte [rcx + r9 + 0x8aec0]
shr eax, 8
movzx ecx, al
shl r8d, 8
movzx eax, byte [rcx + r9 + 0x8aec0]
xor r8d, eax
movzx eax, dl
shr edx, 0x18
movzx eax, byte [rax + r9 + 0x8aec0]
shl r8d, 8
xor r8d, eax
movzx eax, dl
movzx eax, byte [rax + r9 + 0x8aec0]
shl r8d, 8
xor r8d, eax
mov rax, qword [rsp + 0x20]
xor r8d, dword [rdi]
lea r11, [rax*4]
lea eax, [r12 + 1]
xor r8d, dword [0x14008b0c0]
lea rax, [rax*4]
lea r9, [r11 + rdi]
mov dword [r9], r8d
mov edx, dword [rdi + 4]
mov qword [rsp + 0x30], rax
xor edx, r8d
mov dword [rax + rdi], edx
mov r8d, dword [rdi + 8]
lea eax, [r12 + 2]
lea rax, [rax*4]
xor r8d, edx
mov dword [rax + rdi], r8d
mov qword [rsp + 0x28], rax
lea eax, [r12 + 3]
lea rcx, [rax*4]
mov eax, dword [rdi + 0xc]
xor eax, r8d
mov qword [rsp + 0x38], rcx
mov dword [rcx + rdi], eax
mov rax, qword [r13 + 0x18]
mov rcx, qword [r13 + 0x10]
lea rdx, [rax + rcx*4]
mov rax, qword [rsp + 0x20]
add rax, r15
lea rax, [rdi + rax*4]
cmp rax, rdx
je 0x1400386bd
mov r12, qword [rsp + 0x30]
mov r15, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x20]
cmp r14d, 0x18
jne 0x140038563
mov ecx, dword [rdi + 0x24]
mov eax, dword [rdi + 0x14]
xor ecx, dword [rdi + 0x10]
xor eax, ecx
mov dword [rdi + 0x28], ecx
mov dword [rdi + 0x2c], eax
jmp 0x1400385fe
cmp r14d, 0x20
jne 0x1400385fe
mov edx, dword [rdi + 0x2c]
mov eax, edx
shr eax, 0x18
movzx ecx, al
lea rax, [0x140000000]
movzx r8d, byte [rcx + rax + 0x8aec0]
mov eax, edx
shr eax, 0x10
shl r8d, 8
movzx ecx, al
lea rax, [0x140000000]
movzx eax, byte [rcx + rax + 0x8aec0]
xor r8d, eax
mov eax, edx
shr eax, 8
shl r8d, 8
movzx ecx, al
lea rax, [0x140000000]
movzx eax, byte [rcx + rax + 0x8aec0]
lea rcx, [0x140000000]
xor r8d, eax
movzx eax, dl
movzx eax, byte [rax + rcx + 0x8aec0]
mov ecx, dword [rdi + 0x18]
shl r8d, 8
xor r8d, eax
mov eax, dword [rdi + 0x14]
xor r8d, dword [rdi + 0x10]
xor eax, r8d
mov dword [rdi + 0x30], r8d
xor ecx, eax
mov dword [rdi + 0x34], eax
mov eax, dword [rdi + 0x1c]
xor eax, ecx
mov dword [rdi + 0x38], ecx
mov dword [rdi + 0x3c], eax
mov edx, dword [rbx + r9]
mov rdi, r9
add r9, r11
mov eax, edx
add r10, 4
shr eax, 0x10
movzx ecx, al
lea rax, [0x140000000]
movzx r8d, byte [rcx + rax + 0x8aec0]
mov eax, edx
shr eax, 8
shl r8d, 8
movzx ecx, al
lea rax, [0x140000000]
movzx eax, byte [rcx + rax + 0x8aec0]
lea rcx, [0x140000000]
xor r8d, eax
movzx eax, dl
shr edx, 0x18
movzx eax, byte [rax + rcx + 0x8aec0]
shl r8d, 8
xor r8d, eax
movzx eax, dl
movzx eax, byte [rax + rcx + 0x8aec0]
shl r8d, 8
xor r8d, eax
xor r8d, dword [r10 - 4]
xor r8d, dword [rdi]
mov dword [r9], r8d
mov eax, dword [rdi + 4]
xor eax, r8d
mov dword [r12 + rdi], eax
mov ecx, dword [rdi + 8]
xor ecx, eax
mov dword [r15 + rdi], ecx
mov eax, dword [rdi + 0xc]
xor eax, ecx
mov dword [rsi + rdi], eax
mov rax, qword [r13 + 0x18]
mov rcx, qword [r13 + 0x10]
lea rdx, [rax + rcx*4]
lea rax, [rbp + 4]
lea rax, [rdi + rax*4]
cmp rax, rdx
jne 0x140038547
mov rsi, qword [rsp + 0x40]
xor ebp, ebp
lea r15d, [rbp + 4]
mov rax, qword [rsi + 8]
mov rbx, qword [rsi + 0x38]
lea rcx, [rsi + 8]
call qword [rax + 0x40]
test al, al
je 0x140038726
movzx eax, byte [0x1400c2640]
test al, al
jne 0x1400386e0
call fcn.140037bb0
mov eax, dword [rbx + rbp*4]
inc rbp
bswap eax
mov dword [rbx + rbp*4 - 4], eax
cmp rbp, 4
jb 0x1400386e0
mov eax, dword [rsi + 0x18]
shl eax, 2
lea rcx, [rbx + rax*4]
mov rdx, rcx
sub rdx, rcx
nop word [rax + rax]
mov eax, dword [rdx + rcx]
lea rcx, [rcx + 4]
bswap eax
mov dword [rcx - 4], eax
dec r15
jne 0x140038710
jmp 0x140038d0d
movzx eax, byte [0x1400c2641]
test al, al
jne 0x140038736
call fcn.140037a00
mov eax, dword [rsi + 0x18]
lea r12, [0x140000000]
lea r11d, [rax*4 - 4]
cmp r11d, 4
jbe 0x140038ad4
lea ebp, [r11 + 2]
mov r14d, 6
nop dword [rax]
mov eax, r15d
lea r8, [rbx + r11*4]
mov edi, dword [rbx + rax*4]
lea r10, [rbx + rax*4]
mov eax, edi
shr eax, 0x18
movzx ecx, al
mov eax, edi
shr edi, 8
movzx edx, byte [rcx + r12 + 0x8aec0]
shr eax, 0x10
mov r9d, dword [r12 + rdx*8 + 0xc2654]
movzx ecx, al
movzx eax, byte [rcx + r12 + 0x8aec0]
xor r9d, dword [r12 + rax*8 + 0xc2651]
movzx eax, dil
mov edi, dword [r8]
movzx ecx, byte [rax + r12 + 0x8aec0]
movzx eax, byte [r10]
xor r9d, dword [r12 + rcx*8 + 0xc2652]
movzx ecx, byte [rax + r12 + 0x8aec0]
mov eax, edi
xor r9d, dword [r12 + rcx*8 + 0xc2653]
shr eax, 0x18
movzx ecx, al
mov eax, edi
shr edi, 8
movzx edx, byte [rcx + r12 + 0x8aec0]
shr eax, 0x10
mov edx, dword [r12 + rdx*8 + 0xc2654]
movzx ecx, al
movzx eax, byte [rcx + r12 + 0x8aec0]
xor edx, dword [r12 + rax*8 + 0xc2651]
movzx eax, dil
movzx ecx, byte [rax + r12 + 0x8aec0]
movzx eax, byte [r8]
xor edx, dword [r12 + rcx*8 + 0xc2652]
movzx ecx, byte [rax + r12 + 0x8aec0]
lea eax, [r14 - 1]
xor edx, dword [r12 + rcx*8 + 0xc2653]
mov dword [r10], edx
mov dword [r8], r9d
mov edi, dword [rbx + rax*4]
lea r10, [rbx + rax*4]
mov eax, edi
shr eax, 0x18
movzx ecx, al
mov eax, edi
shr edi, 8
movzx edx, byte [rcx + r12 + 0x8aec0]
shr eax, 0x10
mov r9d, dword [r12 + rdx*8 + 0xc2654]
movzx ecx, al
movzx eax, byte [rcx + r12 + 0x8aec0]
xor r9d, dword [r12 + rax*8 + 0xc2651]
movzx eax, dil
movzx ecx, byte [rax + r12 + 0x8aec0]
movzx eax, byte [r10]
xor r9d, dword [r12 + rcx*8 + 0xc2652]
movzx ecx, byte [rax + r12 + 0x8aec0]
lea eax, [rbp - 1]
xor r9d, dword [r12 + rcx*8 + 0xc2653]
mov edi, dword [rbx + rax*4]
lea r8, [rbx + rax*4]
mov eax, edi
shr eax, 0x18
movzx ecx, al
mov eax, edi
shr edi, 8
movzx edx, byte [rcx + r12 + 0x8aec0]
shr eax, 0x10
mov edx, dword [r12 + rdx*8 + 0xc2654]
movzx ecx, al
movzx eax, byte [rcx + r12 + 0x8aec0]
xor edx, dword [r12 + rax*8 + 0xc2651]
movzx eax, dil
movzx ecx, byte [rax + r12 + 0x8aec0]
movzx eax, byte [r8]
xor edx, dword [r12 + rcx*8 + 0xc2652]
movzx ecx, byte [rax + r12 + 0x8aec0]
xor edx, dword [r12 + rcx*8 + 0xc2653]
mov dword [r10], edx
mov dword [r8], r9d
mov eax, r14d
mov edi, dword [rbx + rax*4]
lea r10, [rbx + rax*4]
lea r8, [rbx + rbp*4]
mov eax, edi
shr eax, 0x18
movzx ecx, al
mov eax, edi
shr edi, 8
movzx edx, byte [rcx + r12 + 0x8aec0]
shr eax, 0x10
mov r9d, dword [r12 + rdx*8 + 0xc2654]
movzx ecx, al
movzx eax, byte [rcx + r12 + 0x8aec0]
xor r9d, dword [r12 + rax*8 + 0xc2651]
movzx eax, dil
mov edi, dword [r8]
movzx ecx, byte [rax + r12 + 0x8aec0]
movzx eax, byte [r10]
xor r9d, dword [r12 + rcx*8 + 0xc2652]
movzx ecx, byte [rax + r12 + 0x8aec0]
mov eax, edi
xor r9d, dword [r12 + rcx*8 + 0xc2653]
shr eax, 0x18
movzx ecx, al
mov eax, edi
shr edi, 8
movzx edx, byte [rcx + r12 + 0x8aec0]
shr eax, 0x10
mov edx, dword [r12 + rdx*8 + 0xc2654]
movzx ecx, al
movzx eax, byte [rcx + r12 + 0x8aec0]
xor edx, dword [r12 + rax*8 + 0xc2651]
movzx eax, dil
movzx ecx, byte [rax + r12 + 0x8aec0]
movzx eax, byte [r8]
xor edx, dword [r12 + rcx*8 + 0xc2652]
movzx ecx, byte [rax + r12 + 0x8aec0]
lea eax, [r14 + 1]
xor edx, dword [r12 + rcx*8 + 0xc2653]
mov dword [r10], edx
lea r10, [rbx + rax*4]
mov dword [r8], r9d
mov edi, dword [r10]
mov eax, edi
shr eax, 0x18
movzx ecx, al
mov eax, edi
shr edi, 8
movzx edx, byte [rcx + r12 + 0x8aec0]
shr eax, 0x10
mov r9d, dword [r12 + rdx*8 + 0xc2654]
movzx ecx, al
movzx eax, byte [rcx + r12 + 0x8aec0]
xor r9d, dword [r12 + rax*8 + 0xc2651]
movzx eax, dil
movzx ecx, byte [rax + r12 + 0x8aec0]
movzx eax, byte [r10]
xor r9d, dword [r12 + rcx*8 + 0xc2652]
movzx ecx, byte [rax + r12 + 0x8aec0]
lea eax, [rbp + 1]
xor r9d, dword [r12 + rcx*8 + 0xc2653]
mov edi, dword [rbx + rax*4]
lea r8, [rbx + rax*4]
mov eax, edi
shr eax, 0x18
movzx ecx, al
mov eax, edi
shr edi, 8
movzx edx, byte [rcx + r12 + 0x8aec0]
shr eax, 0x10
mov edx, dword [r12 + rdx*8 + 0xc2654]
movzx ecx, al
movzx eax, byte [rcx + r12 + 0x8aec0]
xor edx, dword [r12 + rax*8 + 0xc2651]
movzx eax, dil
movzx ecx, byte [rax + r12 + 0x8aec0]
movzx eax, byte [r8]
xor edx, dword [r12 + rcx*8 + 0xc2652]
movzx ecx, byte [rax + r12 + 0x8aec0]
add r15d, 4
add r11d, 0xfffffffc
xor edx, dword [r12 + rcx*8 + 0xc2653]
add r14d, 4
lea ebp, [rbp - 4]
mov dword [r10], edx
mov dword [r8], r9d
cmp r15d, r11d
jb 0x140038760
mov eax, r15d
lea r8, [rbx + rax*4]
mov edi, dword [r8]
mov eax, edi
shr eax, 0x18
movzx ecx, al
mov eax, edi
shr edi, 8
movzx edx, byte [rcx + r12 + 0x8aec0]
shr eax, 0x10
mov edx, dword [r12 + rdx*8 + 0xc2654]
movzx ecx, al
movzx eax, byte [rcx + r12 + 0x8aec0]
xor edx, dword [r12 + rax*8 + 0xc2651]
movzx eax, dil
movzx ecx, byte [rax + r12 + 0x8aec0]
movzx eax, byte [r8]
xor edx, dword [r12 + rcx*8 + 0xc2652]
movzx ecx, byte [rax + r12 + 0x8aec0]
lea eax, [r15 + 1]
xor edx, dword [r12 + rcx*8 + 0xc2653]
mov edi, dword [rbx + rax*4]
mov dword [r8], edx
lea r8, [rbx + rax*4]
mov eax, edi
shr eax, 0x18
movzx ecx, al
mov eax, edi
shr edi, 8
movzx edx, byte [rcx + r12 + 0x8aec0]
shr eax, 0x10
mov edx, dword [r12 + rdx*8 + 0xc2654]
movzx ecx, al
movzx eax, byte [rcx + r12 + 0x8aec0]
xor edx, dword [r12 + rax*8 + 0xc2651]
movzx eax, dil
movzx ecx, byte [rax + r12 + 0x8aec0]
movzx eax, byte [r8]
xor edx, dword [r12 + rcx*8 + 0xc2652]
movzx ecx, byte [rax + r12 + 0x8aec0]
lea eax, [r15 + 2]
xor edx, dword [r12 + rcx*8 + 0xc2653]
mov edi, dword [rbx + rax*4]
mov dword [r8], edx
lea r8, [rbx + rax*4]
mov eax, edi
shr eax, 0x18
movzx ecx, al
mov eax, edi
shr edi, 8
movzx edx, byte [rcx + r12 + 0x8aec0]
shr eax, 0x10
mov edx, dword [r12 + rdx*8 + 0xc2654]
movzx ecx, al
movzx eax, byte [rcx + r12 + 0x8aec0]
xor edx, dword [r12 + rax*8 + 0xc2651]
movzx eax, dil
movzx ecx, byte [rax + r12 + 0x8aec0]
movzx eax, byte [r8]
xor edx, dword [r12 + rcx*8 + 0xc2652]
movzx ecx, byte [rax + r12 + 0x8aec0]
lea eax, [r15 + 3]
xor edx, dword [r12 + rcx*8 + 0xc2653]
mov edi, dword [rbx + rax*4]
mov dword [r8], edx
lea r8, [rbx + rax*4]
mov eax, edi
shr eax, 0x18
movzx ecx, al
mov eax, edi
shr edi, 8
movzx edx, byte [rcx + r12 + 0x8aec0]
shr eax, 0x10
mov edx, dword [r12 + rdx*8 + 0xc2654]
movzx ecx, al
movzx eax, byte [rcx + r12 + 0x8aec0]
xor edx, dword [r12 + rax*8 + 0xc2651]
movzx eax, dil
movzx ecx, byte [rax + r12 + 0x8aec0]
movzx eax, byte [r8]
xor edx, dword [r12 + rcx*8 + 0xc2652]
movzx ecx, byte [rax + r12 + 0x8aec0]
xor edx, dword [r12 + rcx*8 + 0xc2653]
mov dword [r8], edx
mov eax, dword [rsi + 0x18]
mov edx, dword [rbx]
bswap edx
shl eax, 2
mov ecx, dword [rbx + rax*4]
bswap ecx
mov dword [rbx], ecx
mov eax, dword [rsi + 0x18]
shl eax, 2
mov dword [rbx + rax*4], edx
mov eax, dword [rsi + 0x18]
mov edx, dword [rbx + 4]
bswap edx
lea eax, [rax*4 + 1]
mov eax, dword [rbx + rax*4]
bswap eax
mov dword [rbx + 4], eax
mov eax, dword [rsi + 0x18]
lea eax, [rax*4 + 1]
mov dword [rbx + rax*4], edx
mov eax, dword [rsi + 0x18]
mov edx, dword [rbx + 8]
bswap edx
lea eax, [rax*4 + 2]
mov eax, dword [rbx + rax*4]
bswap eax
mov dword [rbx + 8], eax
mov eax, dword [rsi + 0x18]
lea eax, [rax*4 + 2]
mov dword [rbx + rax*4], edx
mov eax, dword [rsi + 0x18]
mov edx, dword [rbx + 0xc]
bswap edx
lea eax, [rax*4 + 3]
mov eax, dword [rbx + rax*4]
bswap eax
mov dword [rbx + 0xc], eax
mov eax, dword [rsi + 0x18]
lea eax, [rax*4 + 3]
mov dword [rbx + rax*4], edx
cmp byte [0x1400c2e60], 0
mov r15, qword [rsp + 0xa8]
jne 0x140038d23
call fcn.140040bb0
cmp byte [0x1400c2e66], 0
je 0x140038d51
mov edx, dword [rsi + 0x18]
lea rcx, [rbx + 0x10]
dec edx
shl edx, 4
shr rdx, 2
test rdx, rdx
je 0x140038d51
mov eax, dword [rcx]
lea rcx, [rcx + 4]
bswap eax
mov dword [rcx - 4], eax
dec rdx
jne 0x140038d41
add rsp, 0x50
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
movdqa xmm1, xmmword [rcx]
lea edx, [rdx*4]
mov r8d, 4
mov r9, rcx
movdqa xmm0, xmmword [rcx + rdx*4]
movdqa xmmword [rcx], xmm0
movdqa xmmword [rcx + rdx*4], xmm1
add edx, 0xfffffffc
cmp edx, r8d
jbe 0x1400419eb
nop word [rax + rax]
aesimc xmm0, xmmword [r9 + rdx*4]
mov eax, r8d
add r8d, 4
aesimc xmm1, xmmword [r9 + rax*4]
lea rcx, [r9 + rax*4]
movdqa xmmword [rcx], xmm0
movdqa xmmword [r9 + rdx*4], xmm1
add edx, 0xfffffffc
cmp r8d, edx
jb 0x1400419c0
mov eax, r8d
aesimc xmm0, xmmword [r9 + rax*4]
movdqa xmmword [r9 + rax*4], xmm0
ret