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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x28
cmp byte [rcx + 8], 0
je 0x1800015fd
mov qword [rsp + 8], r8
mov edi, dword [rdx]
mov r11d, dword [rdx + 4]
bswap edi
xor edi, dword [rcx + 0x1ec]
mov ebp, edi
bswap r11d
xor r11d, dword [rcx + 0x1f0]
mov edi, dword [rdx + 8]
bswap edi
xor edi, dword [rcx + 0x1f4]
mov ebx, dword [rdx + 0xc]
bswap ebx
xor ebx, dword [rcx + 0x1f8]
mov eax, dword [rcx + 0x3d4]
cmp eax, 2
mov qword [rsp + 0x18], rcx
mov qword [rsp + 0x10], rax
jl 0x180001489
lea rsi, [rcx + 0x218]
add rax, 0xffffffffffffffff
mov qword [rsp + 0x20], rax
lea r12, [0x180029500]
lea r15, [0x180029100]
lea r13, [0x180029900]
lea r8, [0x180029d00]
nop word cs:[rax + rax]
nop
mov dword [rsp + 4], ebp
mov edx, ebp
mov eax, ebp
shr eax, 0x18
mov ebp, ebx
shr ebp, 0x10
movzx ebp, bpl
mov r9d, dword [r12 + rbp*4]
xor r9d, dword [r15 + rax*4]
mov ecx, edi
movzx eax, ch
mov r14d, edi
xor r9d, dword [r13 + rax*4]
mov ecx, r11d
movzx eax, cl
xor r9d, dword [r8 + rax*4]
mov eax, r11d
mov ebp, r11d
shr ebp, 0x18
shr edx, 0x10
movzx edx, dl
mov r10d, dword [r12 + rdx*4]
xor r10d, dword [r15 + rbp*4]
movzx ebp, ch
movzx edx, bh
xor r10d, dword [r13 + rdx*4]
mov ecx, dword [rsp + 4]
movzx edx, ch
movzx r11d, r14b
xor r10d, dword [r8 + r11*4]
shr edi, 0x18
shr eax, 0x10
movzx eax, al
mov eax, dword [r12 + rax*4]
xor eax, dword [r15 + rdi*4]
xor r9d, dword [rsi - 0xc]
xor r10d, dword [rsi - 8]
xor eax, dword [r13 + rdx*4]
movzx edi, cl
movzx edx, bl
xor eax, dword [r8 + rdx*4]
xor eax, dword [rsi - 4]
shr ebx, 0x18
shr r14d, 0x10
movzx edx, r14b
mov edx, dword [r12 + rdx*4]
xor edx, dword [r15 + rbx*4]
xor edx, dword [r13 + rbp*4]
xor edx, dword [r8 + rdi*4]
xor edx, dword [rsi]
add rsi, 0x20
mov ebp, r9d
mov r11d, r10d
mov edi, eax
mov ebx, edx
add qword [rsp + 0x20], 0xffffffffffffffff
jne 0x1800013c0
jmp 0x180001493
mov edx, ebx
mov eax, edi
mov r10d, r11d
mov r9d, ebp
movsxd r15, dword [rsp + 0x10]
shl r15, 5
mov rcx, qword [rsp + 0x18]
mov esi, dword [rcx + r15 + 0x1ec]
mov r14d, r9d
mov rdi, r14
shr rdi, 0x18
lea r11, [0x18002a100]
mov ebp, esi
shr ebp, 0x18
xor bpl, byte [rdi + r11]
mov r8, qword [rsp + 8]
mov byte [r8], bpl
mov edi, edx
shr edi, 0x10
movzx edi, dil
mov ebp, esi
shr ebp, 0x10
xor bpl, byte [rdi + r11]
mov edi, eax
shr edi, 8
movzx edi, dil
mov ebx, esi
shr ebx, 8
xor bl, byte [rdi + r11]
mov byte [r8 + 1], bpl
mov byte [r8 + 2], bl
mov edi, r10d
movzx ebx, dil
xor sil, byte [rbx + r11]
mov byte [r8 + 3], sil
mov ebx, dword [rcx + r15 + 0x1f0]
shr rdi, 0x18
mov esi, ebx
shr esi, 0x18
xor sil, byte [rdi + r11]
mov byte [r8 + 4], sil
mov esi, r9d
shr esi, 0x10
movzx esi, sil
mov edi, ebx
shr edi, 0x10
xor dil, byte [rsi + r11]
mov esi, edx
shr esi, 8
movzx esi, sil
mov ebp, ebx
shr ebp, 8
xor bpl, byte [rsi + r11]
mov byte [r8 + 5], dil
mov byte [r8 + 6], bpl
mov esi, eax
movzx edi, sil
xor bl, byte [rdi + r11]
mov byte [r8 + 7], bl
mov r12d, dword [rcx + r15 + 0x1f4]
shr rsi, 0x18
mov ebp, r12d
shr ebp, 0x18
xor bpl, byte [rsi + r11]
movzx esi, r14b
mov byte [r8 + 8], bpl
mov edi, r10d
shr edi, 0x10
movzx edi, dil
mov ebp, r12d
shr ebp, 0x10
xor bpl, byte [rdi + r11]
shr r9d, 8
movzx edi, r9b
mov ebx, r12d
shr ebx, 8
xor bl, byte [rdi + r11]
mov byte [r8 + 9], bpl
mov byte [r8 + 0xa], bl
mov edx, edx
movzx ebp, dl
xor r12b, byte [rbp + r11]
mov byte [r8 + 0xb], r12b
mov ebp, dword [rcx + r15 + 0x1f8]
shr rdx, 0x18
mov ecx, ebp
shr ecx, 0x18
xor cl, byte [rdx + r11]
mov byte [r8 + 0xc], cl
shr eax, 0x10
movzx eax, al
mov ecx, ebp
shr ecx, 0x10
xor cl, byte [rax + r11]
mov byte [r8 + 0xd], cl
shr r10d, 8
movzx eax, r10b
mov ecx, ebp
shr ecx, 8
xor cl, byte [rax + r11]
mov byte [r8 + 0xe], cl
xor bpl, byte [rsi + r11]
mov byte [r8 + 0xf], bpl
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x68
cmp byte [rcx + 8], 0
je 0x180001c17
mov rdi, rcx
mov esi, dword [rcx + 0x3d0]
cmp esi, 0x10
jne 0x180001960
mov rcx, rdi
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp 0x180001320
mov qword [rsp + 0x30], r8
lea ebx, [rsi + 3]
test esi, esi
cmovns ebx, esi
sar ebx, 2
mov eax, esi
and eax, 0xfffffffc
xor ecx, ecx
cmp eax, 0x18
sete cl
mov ebp, 2
sub rbp, rcx
xor ecx, ecx
cmp eax, 0x10
cmovne rcx, rbp
shl rcx, 5
lea rax, [0x18002a200]
mov r10d, dword [rcx + rax + 0xc]
mov r11d, dword [rcx + rax + 0x14]
mov r8d, dword [rcx + rax + 0x1c]
cmp esi, 4
jl 0x1800019fe
xor eax, eax
nop
movzx ecx, byte [rdx + rax*4]
shl ecx, 0x18
mov dword [rdi + rax*4 + 0x458], ecx
movzx ebp, byte [rdx + rax*4 + 1]
shl ebp, 0x10
or ebp, ecx
mov dword [rdi + rax*4 + 0x458], ebp
movzx ecx, byte [rdx + rax*4 + 2]
shl ecx, 8
or ecx, ebp
mov dword [rdi + rax*4 + 0x458], ecx
movzx ebp, byte [rdx + rax*4 + 3]
or ebp, ecx
xor ebp, dword [rdi + rax*4 + 0x1ec]
mov dword [rdi + rax*4 + 0x458], ebp
add rax, 1
cmp rbx, rax
jne 0x1800019b0
mov qword [rsp + 0x28], r8
mov ecx, dword [rdi + 0x3d4]
cmp ecx, 2
jl 0x180001b5b
lea rax, [rdi + 0x458]
mov qword [rsp + 0x48], rax
lea rax, [rdi + 0x438]
mov qword [rsp + 0x40], rax
lea eax, [rbx*4]
cdqe
mov qword [rsp + 0x38], rax
lea r12, [rdi + 0x20c]
mov eax, 1
lea r9, [0x180029100]
lea r13, [0x180029500]
lea r14, [0x180029900]
lea r15, [0x180029d00]
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x50], rcx
jmp 0x180001ac9
mov rcx, qword [rsp + 0x48]
mov rdx, qword [rsp + 0x40]
mov r8, qword [rsp + 0x38]
mov rsi, r10
mov rbp, r11
mov r15, r14
mov r14, r13
mov r13, r9
call fcn.18000a420
mov r9, r13
mov r13, r14
mov r14, r15
lea r15, [0x180029d00]
mov r11, rbp
mov r10, rsi
mov rax, qword [rsp + 0x60]
add rax, 1
add r12, 0x20
mov rcx, qword [rsp + 0x50]
cmp rax, rcx
mov rsi, qword [rsp + 0x58]
je 0x180001b5b
mov qword [rsp + 0x60], rax
cmp esi, 4
mov r8, qword [rsp + 0x28]
jl 0x180001a70
xor ecx, ecx
nop word [rax + rax]
mov ebp, dword [rdi + rcx*4 + 0x458]
shr rbp, 0x16
and ebp, 0x3fc
lea eax, [r10 + rcx]
cdq
idiv ebx
movsxd rax, edx
mov eax, dword [rdi + rax*4 + 0x458]
shr rax, 0xe
and eax, 0x3fc
mov esi, dword [rax + r13]
xor esi, dword [rbp + r9]
lea eax, [r11 + rcx]
cdq
idiv ebx
movsxd rax, edx
mov eax, dword [rdi + rax*4 + 0x458]
movzx eax, ah
xor esi, dword [r14 + rax*4]
lea eax, [r8 + rcx]
cdq
idiv ebx
movsxd rax, edx
movzx eax, byte [rdi + rax*4 + 0x458]
xor esi, dword [r15 + rax*4]
xor esi, dword [r12 + rcx*4]
mov dword [rdi + rcx*4 + 0x438], esi
add rcx, 1
cmp rbx, rcx
jne 0x180001ae0
jmp 0x180001a70
cmp esi, 4
mov rsi, qword [rsp + 0x30]
jl 0x180001c17
mov r8d, 1
sub r8, rbx
xor ebp, ebp
lea r9, [0x18002a100]
nop dword [rax + rax]
movsxd rax, ecx
shl rax, 5
add rax, rdi
mov ecx, dword [rax + rbp*4 + 0x1ec]
movzx eax, byte [rdi + rbp*4 + 0x45b]
mov edx, ecx
shr edx, 0x18
xor dl, byte [rax + r9]
mov byte [rsi + rbp*4], dl
lea eax, [r10 + rbp]
cdq
idiv ebx
movsxd rax, edx
movzx eax, byte [rdi + rax*4 + 0x45a]
mov edx, ecx
shr edx, 0x10
xor dl, byte [rax + r9]
mov byte [rsi + rbp*4 + 1], dl
lea eax, [r11 + rbp]
cdq
idiv ebx
movsxd rax, edx
movzx eax, byte [rdi + rax*4 + 0x459]
mov edx, ecx
shr edx, 8
xor dl, byte [rax + r9]
mov byte [rsi + rbp*4 + 2], dl
mov rax, qword [rsp + 0x28]
add eax, ebp
cdq
idiv ebx
movsxd rax, edx
movzx eax, byte [rdi + rax*4 + 0x458]
xor cl, byte [rax + r9]
mov byte [rsi + rbp*4 + 3], cl
mov rax, r8
add rax, rbp
je 0x180001c17
add rbp, 1
mov ecx, dword [rdi + 0x3d4]
jmp 0x180001b80
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret