Function at 0x140151420
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
mov rbx, r9
and rsp, 0xfffffffffffffff0
sub rsp, 0x230
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x30]
mov qword [rbp + 0x20], r8
mov rcx, qword [rbp + 0x20]
and ecx, 0xf
je 0x140151676
mov r8d, 0x10
sub r8, rcx
cmp qword [rbp + 0x10], 0
mov rcx, r8
mov r8d, 1
je 0x140151684
test rdx, rdx
je 0x1401521dc
test rax, rax
je 0x1401521e9
add rcx, qword [rbp + 0x20]
mov r9, qword [rax]
mov qword [rsp + 0x40], rcx
add rcx, 0x20
mov qword [rax], rcx
test rbx, rbx
je 0x140151659
mov dword [rsp + 0x4c], 9
cmp rcx, r9
ja 0x140151661
movdqa xmm4, xmmword [0x140255fe0]
mov rax, qword [rbp + 0x10]
lea rsi, [rbx + 0x20]
mov rcx, rsi
mov qword [rsp + 0x38], rsi
movups xmmword [rbx], xmm4
movzx eax, word [rax + 0x130]
mov byte [rbx + 8], r8b
mov r8, qword [rbp + 0x20]
mov word [rbx + 6], ax
mov rax, qword [rbp + 0x10]
movdqu xmm5, xmmword [rax + 0x132]
movups xmmword [rbx + 0x10], xmm5
movaps xmmword [rsp + 0x120], xmm5
call sub.msvcrt.dll_memcpy
cmp qword [rsp + 0x40], 0
je 0x140151659
lea rax, [rsp + 0x220]
mov dword [rsp + 0x4c], 0
movdqa xmm1, xmmword [0x1402d11f0]
mov qword [rsp + 0x70], rax
mov rax, qword [rbp + 0x10]
movzx r10d, word [rax + 0x130]
mov rax, 0xffffffffffffffe0
sub rax, rbx
mov qword [rsp + 0x30], rax
jmp 0x1401515fe
xor ecx, ecx
test r8b, 4
je 0x140151562
mov ecx, dword [rdx]
mov dword [r11], ecx
mov ecx, 4
test r8b, 2
je 0x140151575
movzx ebx, word [rdx + rcx]
mov word [r11 + rcx], bx
add rcx, 2
and r8d, 1
je 0x140151583
movzx edx, byte [rdx + rcx]
mov byte [r11 + rcx], dl
mov edx, 0x10
sub rdx, rax
je 0x14015159e
cmp rsi, r9
jne 0x140151690
movups xmmword [rsp + rax + 0x220], xmm1
and r10d, 2
jne 0x14015179e
mov eax, dword [rsp + 0x4c]
test eax, eax
je 0x1401517d3
mov rax, qword [rsp + 0x220]
mov rdx, qword [rsp + 0x228]
mov rbx, qword [rbp + 0x10]
mov qword [rsi], rax
mov qword [rsi + 8], rdx
movzx r10d, word [rbx + 0x130]
test r10b, 2
je 0x1401515eb
mov qword [rbx + 0x132], rax
mov qword [rbx + 0x13a], rdx
mov rax, qword [rsp + 0x30]
add rsi, 0x10
add rax, rsi
cmp qword [rsp + 0x40], rax
jbe 0x140151661
mov r9, qword [rsp + 0x38]
add r9, qword [rbp + 0x20]
mov edx, 0x10
mov rax, r9
mov rdi, qword [rsp + 0x70]
sub rax, rsi
cmp rax, rdx
mov r11, rdi
cmova rax, rdx
mov rdx, rsi
mov r8d, eax
cmp eax, 8
jb 0x140151550
mov ebx, eax
xor edx, edx
and ebx, 0xfffffff8
mov ecx, edx
add edx, 8
mov r11, qword [rsi + rcx]
mov qword [rdi + rcx], r11
cmp edx, ebx
jb 0x140151637
mov rbx, qword [rsp + 0x70]
lea r11, [rbx + rdx]
add rdx, rsi
jmp 0x140151550
mov dword [rsp + 0x4c], 0
mov eax, dword [rsp + 0x4c]
lea rsp, [rbp - 0x38]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
xor r8d, r8d
cmp qword [rbp + 0x10], 0
jne 0x140151473
mov dword [rsp + 0x4c], 2
jmp 0x140151661
mov byte [rsp + rax + 0x220], 1
cmp rdx, 1
je 0x14015159e
mov byte [rsp + rax + 0x221], 2
cmp rdx, 2
je 0x14015159e
mov byte [rsp + rax + 0x222], 3
cmp rdx, 3
je 0x14015159e
mov byte [rsp + rax + 0x223], 4
cmp rdx, 4
je 0x14015159e
mov byte [rsp + rax + 0x224], 5
cmp rdx, 5
je 0x14015159e
mov byte [rsp + rax + 0x225], 6
cmp rdx, 6
je 0x14015159e
mov byte [rsp + rax + 0x226], 7
cmp rdx, 7
je 0x14015159e
mov byte [rsp + rax + 0x227], 8
cmp rdx, 8
je 0x14015159e
mov byte [rsp + rax + 0x228], 9
cmp rdx, 9
je 0x14015159e
mov byte [rsp + rax + 0x229], 0xa
cmp rdx, 0xa
je 0x14015159e
mov byte [rsp + rax + 0x22a], 0xb
cmp rdx, 0xb
je 0x14015159e
mov byte [rsp + rax + 0x22b], 0xc
cmp rdx, 0xc
je 0x14015159e
mov byte [rsp + rax + 0x22c], 0xd
cmp rdx, 0xd
je 0x14015159e
mov byte [rsp + rax + 0x22d], 0xe
cmp rdx, 0xf
jne 0x14015159e
and r10d, 2
mov byte [rsp + rax + 0x22e], 0xf
je 0x1401515a8
movdqa xmm0, xmmword [rsp + 0x220]
mov rax, qword [rbp + 0x10]
movdqu xmm3, xmmword [rax + 0x132]
mov eax, dword [rsp + 0x4c]
pxor xmm0, xmm3
movaps xmmword [rsp + 0x120], xmm3
movaps xmmword [rsp + 0x220], xmm0
test eax, eax
jne 0x1401515b4
mov rax, qword [rbp + 0x10]
cmp qword [rax], 0xf
jbe 0x1401521cf
movdqu xmm4, xmmword [rax + 0x30]
lea r12, [0x1402d10e0]
movdqa xmm0, xmmword [rsp + 0x220]
pxor xmm0, xmm4
movaps xmmword [rsp + 0x120], xmm4
movaps xmmword [rsp + 0x1a0], xmm0
movzx edi, byte [rsp + 0x1a8]
movaps xmmword [rsp + 0x1f0], xmm0
movzx eax, byte [rsp + 0x1fd]
mov byte [rsp + 0x100], dil
movaps xmmword [rsp + 0x1e0], xmm0
movzx ebx, byte [rsp + 0x1ec]
movaps xmmword [rsp + 0x190], xmm0
movzx edi, byte [rsp + 0x197]
mov byte [rsp + 0xe8], al
mov byte [rsp + 0xf0], bl
movd ebx, xmm0
mov byte [rsp + 0x108], dil
movaps xmmword [rsp + 0x210], xmm0
movzx ecx, byte [rsp + 0x21f]
movaps xmmword [rsp + 0x200], xmm0
movzx r10d, byte [rsp + 0x20e]
movaps xmmword [rsp + 0x1d0], xmm0
movzx r13d, byte [rsp + 0x1db]
movaps xmmword [rsp + 0x1c0], xmm0
movzx edx, byte [rsp + 0x1ca]
movaps xmmword [rsp + 0x1b0], xmm0
movzx r9d, byte [rsp + 0x1b9]
movaps xmmword [rsp + 0x180], xmm0
movzx r14d, byte [rsp + 0x186]
movaps xmmword [rsp + 0x170], xmm0
movzx eax, byte [rsp + 0x175]
movaps xmmword [rsp + 0x160], xmm0
movzx r8d, byte [rsp + 0x164]
movaps xmmword [rsp + 0x150], xmm0
movzx r11d, byte [rsp + 0x153]
movaps xmmword [rsp + 0x140], xmm0
movzx edi, byte [rsp + 0x142]
movaps xmmword [rsp + 0x130], xmm0
movzx r15d, byte [rsp + 0x131]
mov byte [rsp + 0x110], dil
mov rdi, qword [rbp + 0x10]
mov rdi, qword [rdi + 0x120]
mov qword [rsp + 0x120], rdi
sub rdi, 1
mov qword [rsp + 0x68], rdi
cmp rdi, 1
jbe 0x140151e57
mov rdi, qword [rbp + 0x10]
mov byte [rsp + 0x120], r13b
mov qword [rsp + 0x118], 1
add rdi, 0x40
mov byte [rsp + 0xf8], r15b
movzx r15d, byte [rsp + 0xe8]
mov qword [rsp + 0xe0], rdi
lea rdi, [rsp + 0x224]
mov qword [rsp + 0x60], rdi
lea rdi, [rsp + 0x228]
mov qword [rsp + 0x58], rdi
lea rdi, [rsp + 0x22c]
mov qword [rsp + 0x50], rdi
mov rdi, qword [rsp + 0xe0]
mov qword [rsp + 0x28], rsi
movzx esi, byte [rsp + 0xf0]
nop word [rax + rax]
mov r13, rbx
and ebx, 0xf0
and r13d, 0xf
add rbx, r12
mov qword [rsp + 0xf0], r13
mov r13, rax
and eax, 0xf0
add rax, r12
and r13d, 0xf
mov qword [rsp + 0xe0], rax
mov rax, rdx
and edx, 0xf0
add rdx, r12
and eax, 0xf
mov qword [rsp + 0xe8], r13
movzx r13d, byte [rsp + 0x100]
mov qword [rsp + 0xd0], rdx
mov rdx, rcx
and ecx, 0xf0
mov qword [rsp + 0xd8], rax
lea rax, [r12 + rcx]
and edx, 0xf
mov rcx, r10
mov qword [rsp + 0xc0], rax
mov rax, r8
and r8d, 0xf0
and ecx, 0xf
and eax, 0xf
add r8, r12
mov qword [rsp + 0xc8], rdx
and r10d, 0xf0
mov qword [rsp + 0xb8], rax
mov rax, r13
and r13d, 0xf0
add r10, r12
lea r13, [r12 + r13]
and eax, 0xf
movzx ecx, byte [r10 + rcx]
mov qword [rsp + 0xb0], r8
mov qword [rsp + 0xa8], r13
mov r13, r15
mov r8, r9
and r15d, 0xf0
and r13d, 0xf
and r8d, 0xf
add r15, r12
mov qword [rsp + 0x100], rax
mov qword [rsp + 0xa0], r13
mov rdx, r8
movzx r13d, byte [rsp + 0x110]
and r9d, 0xf0
mov r8, r11
and r11d, 0xf0
add r9, r12
mov rax, r13
add r11, r12
and r8d, 0xf
movzx edx, byte [r9 + rdx]
and eax, 0xf
movzx r8d, byte [r11 + r8]
mov r9, qword [rsp + 0xb8]
mov qword [rsp + 0x110], rax
mov rax, r13
and eax, 0xf0
lea r13, [r12 + rax]
movzx eax, byte [rsp + 0x108]
mov qword [rsp + 0x98], r13
mov r13, rax
and eax, 0xf0
and r13d, 0xf
add rax, r12
shl r8, 8
mov qword [rsp + 0x90], rax
mov rax, rsi
or r8, rcx
and esi, 0xf0
and eax, 0xf
mov qword [rsp + 0x108], r13
shl r8, 8
add rsi, r12
mov qword [rsp + 0x88], rax
movzx eax, byte [rsp + 0xf8]
or r8, rdx
mov rcx, qword [rsp + 0xb0]
shl r8, 8
mov r13, rax
and eax, 0xf0
and r13d, 0xf
movzx edx, byte [rcx + r9]
add rax, r12
mov qword [rsp + 0xf8], r13
mov r13, r14
and r14d, 0xf0
and r13d, 0xf
or r8, rdx
add r14, r12
mov qword [rsp + 0x80], r13
mov r13, qword [rsp + 0x120]
shl r8, 8
and r13d, 0xf
mov qword [rsp + 0x78], r13
mov r13, qword [rsp + 0x120]
mov r9, qword [rsp + 0xc0]
mov rdx, qword [rsp + 0xc8]
mov r11, qword [rsp + 0xd8]
mov r10, qword [rsp + 0xe8]
and r13d, 0xf0
movzx ecx, byte [r9 + rdx]
mov rdx, r8
mov r9, qword [rsp + 0x78]
add r13, r12
mov r8, qword [rsp + 0xe0]
or rdx, rcx
mov rcx, qword [rsp + 0xd0]
shl rdx, 8
movzx ecx, byte [rcx + r11]
mov r11, qword [rsp + 0x80]
or rdx, rcx
movzx ecx, byte [r8 + r10]
movzx r8d, byte [r13 + r9]
mov r10, qword [rsp + 0xf8]
movzx r9d, byte [r14 + r11]
shl rdx, 8
shl r8, 8
mov r14, qword [rsp + 0x88]
or rdx, rcx
mov rcx, qword [rsp + 0xf0]
or r8, r9
movzx eax, byte [rax + r10]
mov r10, qword [rsp + 0x90]
shl rdx, 8
shl r8, 8
movzx ecx, byte [rbx + rcx]
mov rbx, qword [rsp + 0x108]
or r8, rax
movzx eax, byte [rsi + r14]
mov r14, qword [rsp + 0x98]
shl r8, 8
mov rsi, qword [rsp + 0x110]
mov r13, qword [rsp + 0xa0]
or r8, rax
movzx eax, byte [r10 + rbx]
mov rbx, qword [rsp + 0xa8]
shl r8, 8
or rdx, rcx
add rdi, 0x10
or r8, rax
movzx eax, byte [r14 + rsi]
mov qword [rsp + 0x120], rdx
shl r8, 8
or r8, rax
movzx eax, byte [r15 + r13]
shl r8, 8
or r8, rax
mov rax, qword [rsp + 0x100]
shl r8, 8
movzx eax, byte [rbx + rax]
or r8, rax
mov qword [rsp + 0x128], r8
mov rcx, qword [rsp + 0x70]
movdqa xmm2, xmmword [rsp + 0x120]
movaps xmmword [rsp + 0x220], xmm2
call fcn.140152820
mov rcx, qword [rsp + 0x60]
call fcn.140152820
mov rcx, qword [rsp + 0x58]
call fcn.140152820
mov rcx, qword [rsp + 0x50]
call fcn.140152820
movzx edx, byte [rsp + 0x226]
xor dl, byte [rdi - 0xa]
mov r14d, edx
movzx edx, byte [rsp + 0x227]
xor dl, byte [rdi - 9]
mov byte [rsp + 0x108], dl
movzx eax, byte [rsp + 0x221]
movzx edx, byte [rsp + 0x228]
xor al, byte [rdi - 0xf]
xor dl, byte [rdi - 8]
mov byte [rsp + 0xf8], al
mov byte [rsp + 0x100], dl
movzx eax, byte [rsp + 0x222]
movzx edx, byte [rsp + 0x229]
xor al, byte [rdi - 0xe]
xor dl, byte [rdi - 7]
movzx ecx, byte [rsp + 0x22b]
mov byte [rsp + 0x110], al
xor cl, byte [rdi - 5]
mov r9d, edx
movzx ebx, byte [rsp + 0x220]
mov byte [rsp + 0x120], cl
movzx eax, byte [rsp + 0x225]
movzx r11d, byte [rsp + 0x223]
movzx edx, byte [rsp + 0x22a]
movzx r8d, byte [rsp + 0x224]
movzx esi, byte [rsp + 0x22c]
xor bl, byte [rdi - 0x10]
xor r11b, byte [rdi - 0xd]
xor r8b, byte [rdi - 0xc]
xor al, byte [rdi - 0xb]
xor dl, byte [rdi - 6]
xor sil, byte [rdi - 4]
movzx ecx, byte [rsp + 0x22d]
xor cl, byte [rdi - 3]
add qword [rsp + 0x118], 1
mov r15d, ecx
movzx ecx, byte [rsp + 0x22e]
xor cl, byte [rdi - 2]
mov r13, qword [rsp + 0x118]
mov r10d, ecx
movzx ecx, byte [rsp + 0x22f]
xor cl, byte [rdi - 1]
cmp r13, qword [rsp + 0x68]
jne 0x1401519c0
mov byte [rsp + 0xf0], sil
mov rsi, qword [rsp + 0x28]
mov byte [rsp + 0xe8], r15b
movzx r13d, byte [rsp + 0x120]
movzx r15d, byte [rsp + 0xf8]
mov rdi, rbx
and ebx, 0xf0
and edi, 0xf
add rbx, r12
mov qword [rsp + 0x120], rdi
mov rdi, rax
and eax, 0xf0
add rax, r12
and edi, 0xf
mov qword [rsp + 0xf8], rax
mov rax, rdx
and edx, 0xf0
add rdx, r12
and eax, 0xf
mov qword [rsp + 0x118], rdi
mov qword [rsp + 0xd8], rdx
mov rdx, rcx
and ecx, 0xf0
and edx, 0xf
mov qword [rsp + 0xe0], rax
add rcx, r12
mov qword [rsp + 0xd0], rdx
mov rdx, r8
and r8d, 0xf0
add r8, r12
and edx, 0xf
mov qword [rsp + 0xc0], r8
mov r8, r9
and r9d, 0xf0
and r8d, 0xf
mov qword [rsp + 0xc8], rdx
add r9, r12
mov qword [rsp + 0xb8], r8
mov r8, r10
and r10d, 0xf0
and r8d, 0xf
lea rax, [r12 + r10]
mov r10, r11
and r11d, 0xf0
mov qword [rsp + 0xb0], r8
and r10d, 0xf
add r11, r12
movzx r8d, byte [rsp + 0x100]
mov rdx, r10
mov r10, r8
and r8d, 0xf0
movzx edx, byte [r11 + rdx]
mov r11, qword [rsp + 0xb0]
and r10d, 0xf
mov qword [rsp + 0x100], r10
lea r10, [r12 + r8]
movzx r8d, byte [rsp + 0xe8]
mov qword [rsp + 0xa8], r10
movzx eax, byte [rax + r11]
mov r10, r8
and r8d, 0xf0
lea rdi, [r12 + r8]
and r10d, 0xf
mov qword [rsp + 0xa0], rdi
movzx edi, byte [rsp + 0x110]
mov qword [rsp + 0xe8], r10
mov r8, rdi
and edi, 0xf0
lea r10, [r12 + rdi]
and r8d, 0xf
mov qword [rsp + 0x98], r10
movzx r10d, byte [rsp + 0x108]
mov qword [rsp + 0x110], r8
movzx r8d, byte [rsp + 0xf0]
mov rdi, r10
and r10d, 0xf0
lea r10, [r12 + r10]
and edi, 0xf
mov qword [rsp + 0x90], r10
mov r10, r8
and r10d, 0xf
and r8d, 0xf0
shl rdx, 8
mov qword [rsp + 0x108], rdi
add r8, r12
mov qword [rsp + 0xf0], r10
mov r10, r15
and r15d, 0xf0
and r10d, 0xf
mov qword [rsp + 0x88], r8
mov r8, r15
mov r15, r14
and r14d, 0xf0
add r8, r12
or rdx, rax
and r15d, 0xf
mov qword [rsp + 0x80], r10
mov r10, r14
mov r14, r13
and r13d, 0xf0
add r10, r12
add r12, r13
shl rdx, 8
and r14d, 0xf
mov r13, qword [rsp + 0xb8]
movzx eax, byte [r9 + r13]
mov r13, qword [rsp + 0xc0]
mov r9, qword [rsp + 0xc8]
mov r11, qword [rsp + 0xd0]
or rdx, rax
mov rdi, qword [rsp + 0x120]
movzx eax, byte [r13 + r9]
shl rdx, 8
movzx r9d, byte [r10 + r15]
mov r15, qword [rsp + 0xf0]
mov r10, qword [rsp + 0x100]
or rdx, rax
movzx eax, byte [rcx + r11]
mov r11, qword [rsp + 0xd8]
mov rcx, qword [rsp + 0xe0]
shl rdx, 8
or rdx, rax
movzx eax, byte [r11 + rcx]
shl rdx, 8
mov rcx, qword [rsp + 0xf8]
mov r11, qword [rsp + 0x88]
or rdx, rax
mov rax, qword [rsp + 0x118]
shl rdx, 8
movzx eax, byte [rcx + rax]
movzx ecx, byte [r12 + r14]
mov r14, qword [rsp + 0x80]
shl rcx, 8
or rdx, rax
movzx eax, byte [rbx + rdi]
mov rdi, qword [rsp + 0x108]
movzx r8d, byte [r8 + r14]
or rcx, r9
mov r14, qword [rsp + 0x90]
shl rdx, 8
shl rcx, 8
mov rbx, qword [rsp + 0xe8]
or rcx, r8
movzx r8d, byte [r11 + r15]
mov r15, qword [rsp + 0x98]
shl rcx, 8
or rcx, r8
movzx r8d, byte [r14 + rdi]
mov rdi, qword [rsp + 0xa0]
shl rcx, 8
or rcx, r8
mov r8, qword [rsp + 0x110]
shl rcx, 8
or rdx, rax
movzx r8d, byte [r15 + r8]
or rcx, r8
movzx r8d, byte [rdi + rbx]
mov rbx, qword [rsp + 0xa8]
shl rcx, 8
or rcx, r8
movzx r8d, byte [rbx + r10]
mov qword [rsp + 0x120], rdx
mov rax, qword [rsp + 0x68]
mov rbx, qword [rbp + 0x10]
shl rcx, 8
or rcx, r8
shl rax, 4
mov qword [rsp + 0x128], rcx
movdqu xmm0, xmmword [rbx + rax + 0x30]
pxor xmm0, xmmword [rsp + 0x120]
movaps xmmword [rsp + 0x220], xmm0
jmp 0x1401515b4
mov dword [rsp + 0x4c], 1
jmp 0x1401515b4
mov dword [rsp + 0x4c], 3
jmp 0x140151661
mov dword [rsp + 0x4c], 6
jmp 0x140151661