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

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push r13
push r14
push r15
sub rsp, 0x58
mov r13d, r8d
mov r14d, r8d
lea rbp, [rcx + 0x20]
shr r13d, 2
mov rsi, rdx
mov r15, rcx
lea eax, [r13 + 6]
mov dword [rcx + 0x18], eax
lea edx, [rax*4 + 4]
mov rcx, rbp
call fcn.140031b60
cmp byte [0x1400c8804], 0
mov rbx, qword [r15 + 0x128]
jne 0x140031c76
call fcn.140047b10
cmp byte [0x1400c8809], 0
mov rcx, rbx
mov qword [rsp + 0xa0], rdi
mov qword [rsp + 0x50], r12
je 0x140031e9c
movaps xmmword [rsp + 0x40], xmm6
mov r8, r14
movdqu xmm6, xmmword [r14 + rsi - 0x10]
mov rdx, rsi
mov rdi, r14
call fcn.140087590
mov rax, r14
lea r10, [0x140095bbc]
shr rax, 2
aeskeygenassist xmm0, xmm6, 0
pextrd ecx, xmm0, 3
xor ecx, dword [rbx]
lea r9, [rax*4]
xor ecx, 1
mov dword [r9 + rbx], ecx
lea eax, [r13 + 1]
mov edx, dword [rbx + 4]
lea r11, [rax*4]
xor edx, ecx
lea eax, [r13 + 2]
mov dword [r11 + rbx], edx
lea rsi, [rax*4]
mov r8d, dword [rbx + 8]
lea eax, [r13 + 3]
lea r12, [rax*4]
xor r8d, edx
mov dword [rsi + rbx], r8d
mov eax, dword [rbx + 0xc]
xor eax, r8d
mov dword [r12 + rbx], eax
mov rax, qword [rbp + 0x108]
mov rcx, qword [rbp + 0x100]
lea rdx, [rax + rcx*4]
lea rax, [rbx + 0x10]
add rax, r9
cmp rax, rdx
je 0x140031e08
shr rdi, 2
lea r9, [rbx + rdi*4]
cmp r14d, 0x18
jne 0x140031d63
mov eax, dword [rbx + 0x24]
xor eax, dword [rbx + 0x10]
mov ecx, dword [rbx + 0x14]
xor ecx, eax
mov dword [rbx + 0x28], eax
mov dword [rbx + 0x2c], ecx
pinsrd xmm6, ecx, 3
jmp 0x140031da9
cmp r14d, 0x20
jne 0x140031da2
pinsrd xmm6, dword [rbx + 0x2c], 3
mov ecx, dword [rbx + 0x14]
aeskeygenassist xmm0, xmm6, 0
pextrd eax, xmm0, 2
xor eax, dword [rbx + 0x10]
xor ecx, eax
mov dword [rbx + 0x30], eax
mov eax, dword [rbx + 0x18]
xor eax, ecx
mov dword [rbx + 0x34], ecx
mov ecx, dword [rbx + 0x1c]
xor ecx, eax
mov dword [rbx + 0x38], eax
mov dword [rbx + 0x3c], ecx
pinsrd xmm6, ecx, 3
jmp 0x140031da9
pinsrd xmm6, dword [rbx + 0x1c], 3
mov rbx, r9
mov r8, r9
aeskeygenassist xmm0, xmm6, 0
pextrd ecx, xmm0, 3
xor ecx, dword [r10]
lea r9, [r9 + rdi*4]
xor ecx, dword [rbx]
add r10, 4
mov dword [r9], ecx
mov eax, dword [rbx + 4]
xor eax, ecx
mov dword [r11 + rbx], eax
mov ecx, dword [rbx + 8]
xor ecx, eax
mov dword [rsi + rbx], ecx
mov eax, dword [rbx + 0xc]
xor eax, ecx
mov dword [r12 + rbx], eax
mov rax, qword [rbp + 0x108]
mov rcx, qword [rbp + 0x100]
lea rdx, [rax + rcx*4]
lea rax, [rdi + 4]
lea rax, [rbx + rax*4]
cmp rax, rdx
jne 0x140031d44
mov rax, qword [r15 + 8]
lea rcx, [r15 + 8]
call qword [rax + 0x38]
movaps xmm6, xmmword [rsp + 0x40]
test al, al
jne 0x140032828
mov eax, dword [r15 + 0x18]
mov esi, 4
mov r8, qword [r15 + 0x128]
shl eax, 2
movdqa xmm1, xmmword [r8]
movdqa xmm0, xmmword [r8 + rax*4]
movdqa xmmword [r8], xmm0
movdqa xmmword [r8 + rax*4], xmm1
mov eax, dword [r15 + 0x18]
lea edx, [rax*4 - 4]
cmp edx, esi
jbe 0x140031e88
nop dword [rax + rax]
aesimc xmm0, xmmword [r8 + rdx*4]
mov eax, esi
add esi, 4
aesimc xmm1, xmmword [r8 + rax*4]
lea rcx, [r8 + rax*4]
movdqa xmmword [rcx], xmm0
movdqa xmmword [r8 + rdx*4], xmm1
add edx, 0xfffffffc
cmp esi, edx
jb 0x140031e60
mov eax, esi
aesimc xmm0, xmmword [r8 + rax*4]
movdqa xmmword [r8 + rax*4], xmm0
jmp 0x140032828
mov r8, qword [rsp + 0x98]
mov rax, r14
shr rax, 2
mov esi, 4
mov r9, r14
mov qword [rsp + 0x28], r14
mov r12, r14
mov qword [rsp + 0x20], rsi
lea rdi, [rax*4]
mov rdx, rdi
call fcn.14001c4f0
mov r8, rdi
lea rcx, [r14 + rbx]
sub r8, r14
xor edx, edx
call fcn.140087c30
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x28]
call fcn.140031420
mov r8, rax
mov rdx, rbx
mov rcx, rbx
call fcn.140031360
lea r9, [0x140000000]
lea eax, [r13 - 1]
lea r11, [0x1400983e4]
lea rax, [rax*4]
mov edx, dword [rax + rbx]
mov qword [rsp + 0x28], rax
mov eax, edx
shr eax, 0x10
movzx ecx, al
mov eax, edx
shr eax, 8
movzx r8d, byte [rcx + r9 + 0x981e0]
movzx ecx, al
shl r8d, 8
movzx eax, byte [rcx + r9 + 0x981e0]
xor r8d, eax
movzx eax, dl
shl r8d, 8
shr edx, 0x18
movzx eax, byte [rax + r9 + 0x981e0]
xor r8d, eax
movzx eax, dl
shl r8d, 8
movzx eax, byte [rax + r9 + 0x981e0]
xor r8d, eax
mov rax, r14
xor r8d, dword [rbx]
xor r8d, dword [0x1400983e0]
shr rax, 2
mov dword [rdi + rbx], r8d
lea r9, [rax*4]
mov edx, dword [r9 + rbx]
lea eax, [r13 + 1]
xor edx, dword [rbx + 4]
lea rax, [rax*4]
mov dword [rax + rbx], edx
mov r8d, dword [rbx + 8]
mov qword [rsp + 0x20], rax
xor r8d, edx
lea eax, [r13 + 2]
lea rax, [rax*4]
mov dword [rax + rbx], r8d
mov qword [rsp + 0x30], rax
lea eax, [r13 + 3]
lea rcx, [rax*4]
mov eax, dword [rbx + 0xc]
xor eax, r8d
mov qword [rsp + 0x38], rcx
mov dword [rcx + rbx], eax
mov rax, qword [rbp + 0x108]
mov rcx, qword [rbp + 0x100]
lea rdx, [rax + rcx*4]
lea rax, [rbx + 0x10]
add rax, r9
cmp rax, rdx
je 0x14003218c
mov rdi, qword [rsp + 0x28]
mov r13, qword [rsp + 0x20]
mov r15, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
shr r12, 2
lea r10, [rbx + r12*4]
nop
cmp r14d, 0x18
jne 0x14003203c
mov ecx, dword [rbx + 0x24]
xor ecx, dword [rbx + 0x10]
mov eax, dword [rbx + 0x14]
xor eax, ecx
mov dword [rbx + 0x28], ecx
mov dword [rbx + 0x2c], eax
jmp 0x1400320c1
cmp r14d, 0x20
jne 0x1400320c1
mov edx, dword [rbx + 0x2c]
lea r9, [0x140000000]
mov eax, edx
shr eax, 0x18
movzx ecx, al
mov eax, edx
shr eax, 0x10
movzx r8d, byte [rcx + r9 + 0x981e0]
movzx ecx, al
shl r8d, 8
movzx eax, byte [rcx + r9 + 0x981e0]
xor r8d, eax
mov eax, edx
shr eax, 8
movzx ecx, al
shl r8d, 8
movzx eax, byte [rcx + r9 + 0x981e0]
mov ecx, dword [rbx + 0x18]
xor r8d, eax
shl r8d, 8
movzx eax, dl
movzx eax, byte [rax + r9 + 0x981e0]
xor r8d, eax
mov eax, dword [rbx + 0x14]
xor r8d, dword [rbx + 0x10]
xor eax, r8d
mov dword [rbx + 0x30], r8d
xor ecx, eax
mov dword [rbx + 0x34], eax
mov eax, dword [rbx + 0x1c]
xor eax, ecx
mov dword [rbx + 0x38], ecx
mov dword [rbx + 0x3c], eax
mov edx, dword [rdi + r10]
mov rbx, r10
mov eax, edx
mov r9, r10
shr eax, 0x10
lea r10, [r10 + r12*4]
movzx ecx, al
lea rax, [0x140000000]
movzx r8d, byte [rcx + rax + 0x981e0]
mov eax, edx
shr eax, 8
movzx ecx, al
lea rax, [0x140000000]
shl r8d, 8
movzx eax, byte [rcx + rax + 0x981e0]
lea rcx, [0x140000000]
xor r8d, eax
movzx eax, dl
shl r8d, 8
shr edx, 0x18
movzx eax, byte [rax + rcx + 0x981e0]
xor r8d, eax
movzx eax, dl
shl r8d, 8
movzx eax, byte [rax + rcx + 0x981e0]
xor r8d, eax
xor r8d, dword [rbx]
xor r8d, dword [r11]
add r11, 4
mov dword [r10], r8d
mov eax, dword [rbx + 4]
xor eax, r8d
mov dword [rbx + r13], eax
mov ecx, dword [rbx + 8]
xor ecx, eax
mov dword [r15 + rbx], ecx
mov eax, dword [rbx + 0xc]
xor eax, ecx
mov dword [rsi + rbx], eax
mov rax, qword [rbp + 0x108]
mov rcx, qword [rbp + 0x100]
lea rdx, [rax + rcx*4]
lea rax, [r12 + 4]
lea rax, [rbx + rax*4]
cmp rax, rdx
jne 0x140032020
mov r15, qword [rsp + 0x90]
mov esi, 4
mov rax, qword [r15 + 8]
lea rcx, [r15 + 8]
mov rdi, qword [r15 + 0x128]
call qword [rax + 0x38]
test al, al
je 0x1400321e1
movzx eax, byte [0x1400c83d0]
test al, al
jne 0x1400321b2
call fcn.140031ac0
mov r8d, 0x10
mov rdx, rdi
mov rcx, rdi
call fcn.140031360
mov eax, dword [r15 + 0x18]
mov r8d, 0x10
shl eax, 2
lea rcx, [rdi + rax*4]
mov rdx, rcx
call fcn.140031360
jmp 0x1400327f9
movzx eax, byte [0x1400c83d1]
test al, al
jne 0x1400321f1
call fcn.140031920
mov eax, dword [r15 + 0x18]
lea r12, [0x140000000]
lea ebp, [rax*4 - 4]
cmp ebp, 4
jbe 0x1400325ac
lea r14d, [rbp + 2]
mov r13d, 6
nop word [rax + rax]
mov r9d, dword [rdi + rbp*4]
lea r10, [rdi + rbp*4]
mov eax, esi
mov r8d, dword [rdi + rax*4]
lea rbx, [rdi + rax*4]
mov eax, r8d
shr eax, 0x18
movzx ecx, al
mov eax, r8d
shr eax, 0x10
shr r8d, 8
movzx edx, byte [rcx + r12 + 0x981e0]
movzx ecx, al
mov r11d, dword [r12 + rdx*8 + 0xc7bd4]
movzx eax, byte [rcx + r12 + 0x981e0]
xor r11d, dword [r12 + rax*8 + 0xc7bd1]
movzx eax, r8b
movzx ecx, byte [rax + r12 + 0x981e0]
movzx eax, byte [rbx]
xor r11d, dword [r12 + rcx*8 + 0xc7bd2]
movzx ecx, byte [rax + r12 + 0x981e0]
mov eax, r9d
shr eax, 0x18
xor r11d, dword [r12 + rcx*8 + 0xc7bd3]
movzx ecx, al
mov eax, r9d
shr eax, 0x10
shr r9d, 8
movzx edx, byte [rcx + r12 + 0x981e0]
movzx ecx, al
mov r8d, dword [r12 + rdx*8 + 0xc7bd4]
movzx eax, byte [rcx + r12 + 0x981e0]
xor r8d, dword [r12 + rax*8 + 0xc7bd1]
movzx eax, r9b
movzx ecx, byte [rax + r12 + 0x981e0]
movzx eax, byte [r10]
xor r8d, dword [r12 + rcx*8 + 0xc7bd2]
movzx ecx, byte [rax + r12 + 0x981e0]
lea eax, [r13 - 1]
xor r8d, dword [r12 + rcx*8 + 0xc7bd3]
mov dword [rbx], r8d
lea rbx, [rdi + rax*4]
mov dword [r10], r11d
mov r8d, dword [rbx]
mov eax, r8d
shr eax, 0x18
movzx ecx, al
mov eax, r8d
shr eax, 0x10
shr r8d, 8
movzx edx, byte [rcx + r12 + 0x981e0]
movzx ecx, al
mov r11d, dword [r12 + rdx*8 + 0xc7bd4]
movzx eax, byte [rcx + r12 + 0x981e0]
xor r11d, dword [r12 + rax*8 + 0xc7bd1]
movzx eax, r8b
movzx ecx, byte [rax + r12 + 0x981e0]
movzx eax, byte [rbx]
xor r11d, dword [r12 + rcx*8 + 0xc7bd2]
movzx ecx, byte [rax + r12 + 0x981e0]
lea eax, [r14 - 1]
mov r9d, dword [rdi + rax*4]
lea r10, [rdi + rax*4]
mov eax, r9d
shr eax, 0x18
xor r11d, dword [r12 + rcx*8 + 0xc7bd3]
movzx ecx, al
mov eax, r9d
shr eax, 0x10
shr r9d, 8
movzx edx, byte [rcx + r12 + 0x981e0]
movzx ecx, al
mov r8d, dword [r12 + rdx*8 + 0xc7bd4]
movzx eax, byte [rcx + r12 + 0x981e0]
xor r8d, dword [r12 + rax*8 + 0xc7bd1]
movzx eax, r9b
movzx ecx, byte [rax + r12 + 0x981e0]
movzx eax, byte [r10]
xor r8d, dword [r12 + rcx*8 + 0xc7bd2]
movzx ecx, byte [rax + r12 + 0x981e0]
xor r8d, dword [r12 + rcx*8 + 0xc7bd3]
mov dword [rbx], r8d
mov dword [r10], r11d
lea r10, [rdi + r14*4]
mov r9d, dword [r10]
mov eax, r13d
mov r8d, dword [rdi + rax*4]
lea rbx, [rdi + rax*4]
mov eax, r8d
shr eax, 0x18
movzx ecx, al
mov eax, r8d
shr eax, 0x10
shr r8d, 8
movzx edx, byte [rcx + r12 + 0x981e0]
movzx ecx, al
mov r11d, dword [r12 + rdx*8 + 0xc7bd4]
movzx eax, byte [rcx + r12 + 0x981e0]
xor r11d, dword [r12 + rax*8 + 0xc7bd1]
movzx eax, r8b
movzx ecx, byte [rax + r12 + 0x981e0]
movzx eax, byte [rbx]
xor r11d, dword [r12 + rcx*8 + 0xc7bd2]
movzx ecx, byte [rax + r12 + 0x981e0]
mov eax, r9d
shr eax, 0x18
xor r11d, dword [r12 + rcx*8 + 0xc7bd3]
movzx ecx, al
mov eax, r9d
shr eax, 0x10
shr r9d, 8
movzx edx, byte [rcx + r12 + 0x981e0]
movzx ecx, al
mov r8d, dword [r12 + rdx*8 + 0xc7bd4]
movzx eax, byte [rcx + r12 + 0x981e0]
xor r8d, dword [r12 + rax*8 + 0xc7bd1]
movzx eax, r9b
movzx ecx, byte [rax + r12 + 0x981e0]
movzx eax, byte [r10]
xor r8d, dword [r12 + rcx*8 + 0xc7bd2]
movzx ecx, byte [rax + r12 + 0x981e0]
lea eax, [r13 + 1]
xor r8d, dword [r12 + rcx*8 + 0xc7bd3]
mov dword [rbx], r8d
lea rbx, [rdi + rax*4]
mov dword [r10], r11d
mov r8d, dword [rbx]
mov eax, r8d
shr eax, 0x18
movzx ecx, al
mov eax, r8d
shr eax, 0x10
shr r8d, 8
movzx edx, byte [rcx + r12 + 0x981e0]
movzx ecx, al
mov r11d, dword [r12 + rdx*8 + 0xc7bd4]
movzx eax, byte [rcx + r12 + 0x981e0]
xor r11d, dword [r12 + rax*8 + 0xc7bd1]
movzx eax, r8b
movzx ecx, byte [rax + r12 + 0x981e0]
movzx eax, byte [rbx]
xor r11d, dword [r12 + rcx*8 + 0xc7bd2]
movzx ecx, byte [rax + r12 + 0x981e0]
lea eax, [r14 + 1]
mov r9d, dword [rdi + rax*4]
lea r10, [rdi + rax*4]
mov eax, r9d
shr eax, 0x18
xor r11d, dword [r12 + rcx*8 + 0xc7bd3]
movzx ecx, al
mov eax, r9d
shr eax, 0x10
shr r9d, 8
movzx edx, byte [rcx + r12 + 0x981e0]
movzx ecx, al
mov r8d, dword [r12 + rdx*8 + 0xc7bd4]
movzx eax, byte [rcx + r12 + 0x981e0]
xor r8d, dword [r12 + rax*8 + 0xc7bd1]
movzx eax, r9b
movzx ecx, byte [rax + r12 + 0x981e0]
movzx eax, byte [r10]
xor r8d, dword [r12 + rcx*8 + 0xc7bd2]
movzx ecx, byte [rax + r12 + 0x981e0]
lea r14d, [r14 - 4]
add esi, 4
add r13d, 4
add ebp, 0xfffffffc
xor r8d, dword [r12 + rcx*8 + 0xc7bd3]
mov dword [rbx], r8d
mov dword [r10], r11d
cmp esi, ebp
jb 0x140032220
mov eax, esi
mov r9d, dword [rdi + rax*4]
lea r10, [rdi + rax*4]
mov eax, r9d
shr eax, 0x18
movzx ecx, al
mov eax, r9d
shr eax, 0x10
shr r9d, 8
movzx edx, byte [rcx + r12 + 0x981e0]
movzx ecx, al
mov r8d, dword [r12 + rdx*8 + 0xc7bd4]
movzx eax, byte [rcx + r12 + 0x981e0]
xor r8d, dword [r12 + rax*8 + 0xc7bd1]
movzx eax, r9b
movzx ecx, byte [rax + r12 + 0x981e0]
movzx eax, byte [r10]
xor r8d, dword [r12 + rcx*8 + 0xc7bd2]
movzx ecx, byte [rax + r12 + 0x981e0]
lea eax, [rsi + 1]
mov r9d, dword [rdi + rax*4]
xor r8d, dword [r12 + rcx*8 + 0xc7bd3]
mov dword [r10], r8d
lea r10, [rdi + rax*4]
mov eax, r9d
shr eax, 0x18
movzx ecx, al
mov eax, r9d
shr eax, 0x10
shr r9d, 8
movzx edx, byte [rcx + r12 + 0x981e0]
movzx ecx, al
mov r8d, dword [r12 + rdx*8 + 0xc7bd4]
movzx eax, byte [rcx + r12 + 0x981e0]
xor r8d, dword [r12 + rax*8 + 0xc7bd1]
movzx eax, r9b
movzx ecx, byte [rax + r12 + 0x981e0]
movzx eax, byte [r10]
xor r8d, dword [r12 + rcx*8 + 0xc7bd2]
movzx ecx, byte [rax + r12 + 0x981e0]
lea eax, [rsi + 2]
mov r9d, dword [rdi + rax*4]
xor r8d, dword [r12 + rcx*8 + 0xc7bd3]
mov dword [r10], r8d
lea r10, [rdi + rax*4]
mov eax, r9d
shr eax, 0x18
movzx ecx, al
mov eax, r9d
shr eax, 0x10
shr r9d, 8
movzx edx, byte [rcx + r12 + 0x981e0]
movzx ecx, al
mov r8d, dword [r12 + rdx*8 + 0xc7bd4]
movzx eax, byte [rcx + r12 + 0x981e0]
xor r8d, dword [r12 + rax*8 + 0xc7bd1]
movzx eax, r9b
movzx ecx, byte [rax + r12 + 0x981e0]
movzx eax, byte [r10]
xor r8d, dword [r12 + rcx*8 + 0xc7bd2]
movzx ecx, byte [rax + r12 + 0x981e0]
lea eax, [rsi + 3]
mov r9d, dword [rdi + rax*4]
xor r8d, dword [r12 + rcx*8 + 0xc7bd3]
mov dword [r10], r8d
lea r10, [rdi + rax*4]
mov eax, r9d
shr eax, 0x18
movzx ecx, al
mov eax, r9d
shr eax, 0x10
shr r9d, 8
movzx edx, byte [rcx + r12 + 0x981e0]
movzx ecx, al
mov r8d, dword [r12 + rdx*8 + 0xc7bd4]
movzx eax, byte [rcx + r12 + 0x981e0]
xor r8d, dword [r12 + rax*8 + 0xc7bd1]
movzx eax, r9b
movzx ecx, byte [rax + r12 + 0x981e0]
movzx eax, byte [r10]
xor r8d, dword [r12 + rcx*8 + 0xc7bd2]
movzx ecx, byte [rax + r12 + 0x981e0]
xor r8d, dword [r12 + rcx*8 + 0xc7bd3]
mov dword [r10], r8d
mov eax, dword [r15 + 0x18]
mov edx, dword [rdi]
shl eax, 2
bswap edx
mov ecx, dword [rdi + rax*4]
bswap ecx
mov dword [rdi], ecx
mov eax, dword [r15 + 0x18]
shl eax, 2
mov dword [rdi + rax*4], edx
mov eax, dword [r15 + 0x18]
mov edx, dword [rdi + 4]
bswap edx
lea eax, [rax*4 + 1]
mov eax, dword [rdi + rax*4]
bswap eax
mov dword [rdi + 4], eax
mov eax, dword [r15 + 0x18]
lea eax, [rax*4 + 1]
mov dword [rdi + rax*4], edx
mov eax, dword [r15 + 0x18]
mov edx, dword [rdi + 8]
bswap edx
lea eax, [rax*4 + 2]
mov eax, dword [rdi + rax*4]
bswap eax
mov dword [rdi + 8], eax
mov eax, dword [r15 + 0x18]
lea eax, [rax*4 + 2]
mov dword [rdi + rax*4], edx
mov eax, dword [r15 + 0x18]
mov edx, dword [rdi + 0xc]
bswap edx
lea eax, [rax*4 + 3]
mov eax, dword [rdi + rax*4]
bswap eax
mov dword [rdi + 0xc], eax
mov eax, dword [r15 + 0x18]
lea eax, [rax*4 + 3]
mov dword [rdi + rax*4], edx
cmp byte [0x1400c8804], 0
jne 0x140032807
call fcn.140047b10
cmp byte [0x1400c8809], 0
je 0x140032828
mov r8d, dword [r15 + 0x18]
lea rcx, [rdi + 0x10]
shl r8d, 4
mov rdx, rcx
sub r8d, 0x10
call fcn.140031360
mov r12, qword [rsp + 0x50]
mov rdi, qword [rsp + 0xa0]
add rsp, 0x58
pop r15
pop r14
pop r13
pop rsi
pop rbp
pop rbx
ret