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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x178
vmovups xmmword [rsp + 0x140], xmm6
vmovups xmmword [rsp + 0x150], xmm7
vmovups xmmword [rsp + 0x160], xmm8
mov qword [rsp + 0x1d0], r8
mov rax, qword [rsp + 0x1d0]
xor r8d, r8d
mov qword [rsp + 0x1c0], rcx
mov rbx, r9
mov rcx, qword [rsp + 0x1e0]
and eax, 0xf
je 0x1400ca6db
mov r8d, 0x10
sub r8, rax
mov rax, r8
mov r8d, 1
cmp qword [rsp + 0x1c0], 0
je 0x1400cb349
test rdx, rdx
je 0x1400cb369
test rcx, rcx
je 0x1400cb389
mov rdi, qword [rsp + 0x1d0]
mov r9, qword [rcx]
add rdi, rax
mov qword [rsp + 0x110], rdi
mov rdi, qword [rsp + 0x1d0]
lea rax, [rax + rdi + 0x20]
mov qword [rcx], rax
test rbx, rbx
je 0x1400cb339
mov dword [rsp + 0x10c], 9
cmp r9, rax
jb 0x1400ca8e5
mov rax, qword [rsp + 0x1c0]
cmp qword [rax], 0
je 0x1400cb379
vmovdqu xmm4, xmmword [str.OAES]
lea rcx, [rbx + 0x20]
vmovdqu xmmword [rbx], xmm4
movzx eax, word [rax + 8]
mov byte [rbx + 8], r8b
mov r8, qword [rsp + 0x1d0]
mov word [rbx + 6], ax
mov rax, qword [rsp + 0x1c0]
vmovdqu xmm4, xmmword [rax + 0xa]
vmovdqu xmmword [rbx + 0x10], xmm4
vmovdqu xmmword [rsp + 0x20], xmm4
call sym.memcpy
cmp qword [rsp + 0x110], 0
mov rcx, rax
je 0x1400cb339
lea rax, [rsp + 0x130]
vmovdqu xmm4, xmmword [0x1401f7d30]
mov dword [rsp + 0x10c], 0
mov rsi, rcx
mov qword [rsp + 0xe0], rax
mov rax, qword [rsp + 0x1c0]
movzx r8d, word [rax + 8]
mov rax, 0xffffffffffffffe0
sub rax, rbx
mov qword [rsp + 0x118], rax
nop dword [rax]
mov eax, 0x10
cmp qword [rsp + 0x1d0], rax
mov rdx, rsi
cmovbe rax, qword [rsp + 0x1d0]
mov r11, qword [rsp + 0xe0]
mov r9, r11
cmp eax, 8
jae 0x1400ca950
xor ecx, ecx
test al, 4
je 0x1400ca82d
mov ecx, dword [rdx]
mov dword [r9], ecx
mov ecx, 4
test al, 2
je 0x1400ca83f
movzx r10d, word [rdx + rcx]
mov word [r9 + rcx], r10w
add rcx, 2
test al, 1
je 0x1400ca84b
movzx edx, byte [rdx + rcx]
mov byte [r9 + rcx], dl
mov edx, 0x10
sub rdx, rax
cmp qword [rsp + 0x1d0], 0xf
ja 0x1400ca871
cmp rdx, 0x10
jne 0x1400cb230
vmovdqu xmmword [rsp + 0x130], xmm4
and r8d, 2
jne 0x1400cb206
mov eax, dword [rsp + 0x10c]
test eax, eax
je 0x1400ca97f
mov rax, qword [rsp + 0x130]
mov rdx, qword [rsp + 0x138]
mov rdi, qword [rsp + 0x1c0]
mov qword [rsi], rax
mov qword [rsi + 8], rdx
movzx r8d, word [rdi + 8]
test r8b, 2
je 0x1400ca920
mov qword [rdi + 0xa], rax
mov rax, qword [rsp + 0x118]
mov rbx, qword [rsp + 0x110]
add rsi, 0x10
sub qword [rsp + 0x1d0], 0x10
mov qword [rdi + 0x12], rdx
add rax, rsi
cmp rax, rbx
jb 0x1400ca7f0
vmovups xmm6, xmmword [rsp + 0x140]
vmovups xmm7, xmmword [rsp + 0x150]
vmovups xmm8, xmmword [rsp + 0x160]
mov eax, dword [rsp + 0x10c]
add rsp, 0x178
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [rsp + 0x118]
mov rdi, qword [rsp + 0x110]
add rsi, 0x10
sub qword [rsp + 0x1d0], 0x10
add rax, rsi
cmp rax, rdi
jb 0x1400ca7f0
jmp 0x1400ca8e5
mov r10d, eax
xor edx, edx
and r10d, 0xfffffff8
mov ecx, edx
add edx, 8
mov r9, qword [rsi + rcx]
mov qword [r11 + rcx], r9
cmp edx, r10d
jb 0x1400ca959
mov rbx, qword [rsp + 0xe0]
lea r9, [rbx + rdx]
add rdx, rsi
jmp 0x1400ca81d
mov rax, qword [rsp + 0x1c0]
mov rbx, qword [rax]
test rbx, rbx
je 0x1400cb359
mov rax, qword [rbx + 0x18]
mov rbx, qword [rbx + 0x20]
vmovdqu xmm6, xmmword [rax]
lea r12, [rbx - 1]
mov qword [rsp + 0x120], rax
vpxor xmm0, xmm6, xmmword [rsp + 0x130]
mov rbx, r12
mov qword [rsp + 0xe8], r12
lea r12, [0x1401f7c00]
vmovdqu xmmword [rsp + 0x20], xmm6
vpextrb byte [rsp + 0x60], xmm0, 0xd
vpextrb ecx, xmm0, 0xf
vpextrb r11d, xmm0, 0xe
vmovdqu xmmword [rsp + 0x130], xmm0
vpextrb byte [rsp + 0x50], xmm0, 9
vpextrb r14d, xmm0, 0xc
vpextrb byte [rsp + 0x58], xmm0, 8
vpextrb byte [rsp + 0x40], xmm0, 7
vpextrb ebp, xmm0, 0xb
vpextrb byte [rsp + 0x38], xmm0, 2
vpextrb r8d, xmm0, 0xa
vpextrb edi, xmm0, 6
vpextrb r9d, xmm0, 5
vpextrb edx, xmm0, 4
vpextrb r15d, xmm0, 3
vpextrb r13d, xmm0, 1
vpextrb r10d, xmm0, 0
cmp rbx, 1
jbe 0x1400caef5
mov rbx, rax
mov byte [rsp + 0x48], r13b
lea rax, [rsp + 0x134]
movzx r13d, byte [rsp + 0x50]
mov qword [rsp + 0x128], rsi
mov byte [rsp + 0x50], r14b
mov esi, ebp
mov r14d, edx
mov qword [rsp + 0xf0], rax
lea rax, [rsp + 0x138]
add rbx, 0x10
mov qword [rsp + 0x20], 1
mov qword [rsp + 0xf8], rax
lea rax, [rsp + 0x13c]
movzx edx, byte [rsp + 0x60]
mov qword [rsp + 0x100], rax
movzx ebp, byte [rsp + 0x58]
mov rax, r10
and r10d, 0xf0
add r10, r12
and eax, 0xf
mov qword [rsp + 0x60], r10
mov r10, r9
and r9d, 0xf0
mov qword [rsp + 0x58], rax
add r9, r12
mov rax, r13
and r10d, 0xf
and r13d, 0xf0
mov qword [rsp + 0x70], r9
mov r9, r8
and r8d, 0xf0
and eax, 0xf
add r8, r12
mov qword [rsp + 0xa0], rax
movzx eax, byte [rsp + 0x40]
and r9d, 0xf
mov qword [rsp + 0x80], r8
mov r8, rcx
and ecx, 0xf0
mov qword [rsp + 0x78], r9
add rcx, r12
and r8d, 0xf
mov qword [rsp + 0x68], r10
mov r10, rdx
mov qword [rsp + 0x90], rcx
mov rcx, r14
mov qword [rsp + 0x88], r8
movzx r8d, byte [rsp + 0x38]
and ecx, 0xf
and r14d, 0xf0
and edx, 0xf0
add r13, r12
mov qword [rsp + 0x98], rcx
mov rcx, r11
and r11d, 0xf0
add r14, r12
add r11, r12
and ecx, 0xf
and r10d, 0xf
add rdx, r12
mov qword [rsp + 0xb0], r11
mov r11, r15
mov qword [rsp + 0xa8], rcx
mov r9, r8
and r11d, 0xf
and r9d, 0xf
and r8d, 0xf0
and r15d, 0xf0
movzx ecx, byte [rsp + 0x50]
mov qword [rsp + 0xb8], r11
mov r11, rbp
mov qword [rsp + 0x38], r9
and r11d, 0xf
and ebp, 0xf0
add r15, r12
mov qword [rsp + 0xc8], r10
movzx r9d, byte [rsp + 0x48]
mov qword [rsp + 0xc0], r11
mov r11, r8
mov r8, rax
add rbp, r12
add r11, r12
and r8d, 0xf
mov r10, rax
mov qword [rsp + 0x40], r8
mov rax, rcx
mov r8, rdi
and edi, 0xf0
and eax, 0xf
and r8d, 0xf
and r10d, 0xf0
mov qword [rsp + 0x50], rax
mov qword [rsp + 0xd0], r8
mov rax, rcx
mov r8, rdi
mov rcx, r9
mov rdi, rsi
add r10, r12
and eax, 0xf0
and ecx, 0xf
and edi, 0xf
add rax, r12
and r9d, 0xf0
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0xd8], rdi
mov rcx, rsi
mov rdi, qword [rsp + 0x60]
add r9, r12
add r8, r12
and ecx, 0xf0
mov rsi, qword [rsp + 0x58]
add rcx, r12
movzx esi, byte [rdi + rsi]
mov rdi, qword [rsp + 0x70]
vmovd xmm0, esi
mov rsi, qword [rsp + 0x68]
vpinsrb xmm0, xmm0, byte [rdi + rsi], 1
mov rdi, qword [rsp + 0x80]
mov rsi, qword [rsp + 0x78]
movzx esi, byte [rdi + rsi]
mov rdi, qword [rsp + 0x90]
vmovd xmm8, esi
mov rsi, qword [rsp + 0x88]
vpinsrb xmm8, xmm8, byte [rdi + rsi], 1
mov rsi, qword [rsp + 0x98]
mov rdi, qword [rsp + 0xb0]
movzx esi, byte [r14 + rsi]
vmovd xmm3, esi
mov rsi, qword [rsp + 0xa0]
vpunpcklwd xmm0, xmm0, xmm8
vpinsrb xmm3, xmm3, byte [r13 + rsi], 1
mov rsi, qword [rsp + 0xa8]
movzx esi, byte [rdi + rsi]
vmovd xmm7, esi
mov rsi, qword [rsp + 0xb8]
vpinsrb xmm7, xmm7, byte [r15 + rsi], 1
mov rsi, qword [rsp + 0xc0]
movzx esi, byte [rbp + rsi]
vmovd xmm1, esi
mov rsi, qword [rsp + 0xc8]
vpunpcklwd xmm3, xmm3, xmm7
vpunpckldq xmm0, xmm0, xmm3
vpinsrb xmm1, xmm1, byte [rdx + rsi], 1
mov rdx, qword [rsp + 0x38]
movzx edx, byte [r11 + rdx]
vmovd xmm6, edx
mov rdx, qword [rsp + 0x40]
vpinsrb xmm6, xmm6, byte [r10 + rdx], 1
mov rdx, qword [rsp + 0x50]
movzx eax, byte [rax + rdx]
vmovd xmm2, eax
mov rax, qword [rsp + 0x48]
vpunpcklwd xmm1, xmm1, xmm6
vpinsrb xmm2, xmm2, byte [r9 + rax], 1
mov rax, qword [rsp + 0xd0]
movzx eax, byte [r8 + rax]
vmovd xmm5, eax
mov rax, qword [rsp + 0xd8]
vpinsrb xmm5, xmm5, byte [rcx + rax], 1
mov rcx, qword [rsp + 0xe0]
vpunpcklwd xmm2, xmm2, xmm5
vpunpckldq xmm1, xmm1, xmm2
vpunpcklqdq xmm0, xmm0, xmm1
vmovdqu xmmword [rsp + 0x130], xmm0
call sym.oaes_mix_cols.isra.0
mov rcx, qword [rsp + 0xf0]
call sym.oaes_mix_cols.isra.0
mov rcx, qword [rsp + 0xf8]
call sym.oaes_mix_cols.isra.0
mov rcx, qword [rsp + 0x100]
call sym.oaes_mix_cols.isra.0
movzx eax, byte [rsp + 0x131]
xor al, byte [rbx + 1]
movzx r10d, byte [rsp + 0x130]
movzx r15d, byte [rsp + 0x133]
xor r10b, byte [rbx]
xor r15b, byte [rbx + 3]
movzx r14d, byte [rsp + 0x134]
movzx r9d, byte [rsp + 0x135]
xor r14b, byte [rbx + 4]
xor r9b, byte [rbx + 5]
movzx ebp, byte [rsp + 0x138]
mov byte [rsp + 0x48], al
movzx eax, byte [rsp + 0x132]
xor al, byte [rbx + 2]
xor bpl, byte [rbx + 8]
movzx r8d, byte [rsp + 0x13a]
xor r8b, byte [rbx + 0xa]
movzx edx, byte [rsp + 0x13d]
mov byte [rsp + 0x38], al
movzx eax, byte [rsp + 0x136]
xor al, byte [rbx + 6]
mov edi, eax
movzx eax, byte [rsp + 0x137]
xor al, byte [rbx + 7]
mov byte [rsp + 0x40], al
movzx eax, byte [rsp + 0x139]
xor al, byte [rbx + 9]
mov r13d, eax
movzx eax, byte [rsp + 0x13b]
xor al, byte [rbx + 0xb]
mov esi, eax
movzx eax, byte [rsp + 0x13c]
xor al, byte [rbx + 0xc]
add rbx, 0x10
xor dl, byte [rbx - 3]
mov byte [rsp + 0x50], al
movzx r11d, byte [rsp + 0x13e]
vmovdqu xmm5, xmmword [rbx - 0x10]
vpxor xmm0, xmm5, xmmword [rsp + 0x130]
inc qword [rsp + 0x20]
movzx ecx, byte [rsp + 0x13f]
xor r11b, byte [rbx - 2]
xor cl, byte [rbx - 1]
mov rax, qword [rsp + 0xe8]
vmovdqu xmmword [rsp + 0x130], xmm0
cmp qword [rsp + 0x20], rax
jne 0x1400caab0
mov byte [rsp + 0x58], bpl
mov byte [rsp + 0x60], dl
mov ebp, esi
mov rsi, qword [rsp + 0x128]
mov edx, r14d
movzx r14d, byte [rsp + 0x50]
mov byte [rsp + 0x50], r13b
movzx r13d, byte [rsp + 0x48]
mov rbx, r10
movzx eax, byte [rsp + 0x50]
and r10d, 0xf0
and ebx, 0xf
add r10, r12
mov qword [rsp + 0x20], rbx
mov rbx, rcx
mov qword [rsp + 0x48], r10
mov r10, r9
and ebx, 0xf
and r10d, 0xf
and r9d, 0xf0
and ecx, 0xf0
mov qword [rsp + 0x70], rbx
mov rbx, rdx
mov qword [rsp + 0x68], r10
and edx, 0xf0
and ebx, 0xf
mov r10, r8
and r8d, 0xf0
add r9, r12
mov qword [rsp + 0x78], rbx
mov rbx, rax
and eax, 0xf0
and r10d, 0xf
and ebx, 0xf
add rax, r12
add r8, r12
add rcx, r12
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x80], rax
movzx ebx, byte [rsp + 0x58]
mov rax, r11
and eax, 0xf
and r11d, 0xf0
add rdx, r12
mov qword [rsp + 0x88], rax
mov rax, r15
and r15d, 0xf0
add r11, r12
and eax, 0xf
add r15, r12
mov qword [rsp + 0x90], rax
mov rax, rbx
and eax, 0xf
mov qword [rsp + 0x58], rax
mov rax, rbx
movzx ebx, byte [rsp + 0x60]
and eax, 0xf0
add rax, r12
mov qword [rsp + 0x98], rax
mov rax, rbx
and eax, 0xf
mov qword [rsp + 0x60], rax
mov rax, rbx
and eax, 0xf0
lea rbx, [r12 + rax]
mov qword [rsp + 0xa0], rbx
movzx ebx, byte [rsp + 0x38]
mov rax, rbx
and eax, 0xf
mov qword [rsp + 0x38], rax
mov rax, rbx
and eax, 0xf0
lea rbx, [r12 + rax]
movzx eax, byte [rsp + 0x40]
mov qword [rsp + 0xa8], rbx
mov rbx, rax
and ebx, 0xf
and eax, 0xf0
add rax, r12
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0xb0], rax
mov rax, r14
and r14d, 0xf0
lea r14, [r12 + r14]
and eax, 0xf
mov qword [rsp + 0xc0], r14
mov r14, r13
and r13d, 0xf0
mov qword [rsp + 0xb8], rax
lea r13, [r12 + r13]
and r14d, 0xf
mov qword [rsp + 0xd0], r13
mov r13, rdi
mov qword [rsp + 0xc8], r14
and r13d, 0xf
mov qword [rsp + 0xd8], r13
mov r13, rdi
mov rdi, qword [rsp + 0x20]
and r13d, 0xf0
mov rax, r13
mov r13, rbp
and ebp, 0xf0
and r13d, 0xf
add rax, r12
mov rbx, r13
mov r13, rbp
mov rbp, qword [rsp + 0x48]
add r13, r12
movzx r14d, byte [rbp + rdi]
mov rdi, qword [rsp + 0x68]
vmovd xmm0, r14d
vpinsrb xmm0, xmm0, byte [r9 + rdi], 1
movzx r8d, byte [r8 + r10]
mov rdi, qword [rsp + 0x70]
mov r14, qword [rsp + 0xc8]
vmovd xmm8, r8d
vpinsrb xmm8, xmm8, byte [rcx + rdi], 1
mov rdi, qword [rsp + 0x78]
movzx edx, byte [rdx + rdi]
mov rdi, qword [rsp + 0x50]
vmovd xmm3, edx
mov rdx, qword [rsp + 0x80]
vpunpcklwd xmm0, xmm0, xmm8
vpinsrb xmm3, xmm3, byte [rdx + rdi], 1
mov rdi, qword [rsp + 0x88]
movzx edx, byte [r11 + rdi]
mov rdi, qword [rsp + 0x90]
vmovd xmm7, edx
mov rdx, qword [rsp + 0x98]
vpinsrb xmm7, xmm7, byte [r15 + rdi], 1
mov rdi, qword [rsp + 0x58]
movzx edx, byte [rdx + rdi]
mov rdi, qword [rsp + 0x60]
vpunpcklwd xmm3, xmm3, xmm7
vmovd xmm1, edx
mov rdx, qword [rsp + 0xa0]
vpunpckldq xmm0, xmm0, xmm3
vpinsrb xmm1, xmm1, byte [rdx + rdi], 1
mov rdi, qword [rsp + 0x38]
mov rdx, qword [rsp + 0xa8]
movzx edx, byte [rdx + rdi]
mov rdi, qword [rsp + 0x40]
vmovd xmm6, edx
mov rdx, qword [rsp + 0xb0]
vpinsrb xmm6, xmm6, byte [rdx + rdi], 1
mov rdi, qword [rsp + 0xb8]
mov rdx, qword [rsp + 0xc0]
movzx edx, byte [rdx + rdi]
mov rdi, qword [rsp + 0xd8]
vpunpcklwd xmm1, xmm1, xmm6
vmovd xmm2, edx
mov rdx, qword [rsp + 0xd0]
vpinsrb xmm2, xmm2, byte [rdx + r14], 1
movzx edx, byte [rax + rdi]
vmovd xmm5, edx
vpinsrb xmm5, xmm5, byte [r13 + rbx], 1
mov rax, qword [rsp + 0xe8]
mov rdi, qword [rsp + 0x120]
shl rax, 4
vpunpcklwd xmm2, xmm2, xmm5
vpunpckldq xmm1, xmm1, xmm2
vpunpcklqdq xmm0, xmm0, xmm1
vpxor xmm0, xmm0, xmmword [rdi + rax]
vmovdqu xmmword [rsp + 0x130], xmm0
jmp 0x1400ca88a
mov rax, qword [rsp + 0x1c0]
vmovdqu xmm6, xmmword [rax + 0xa]
vpxor xmm0, xmm6, xmmword [rsp + 0x130]
vmovdqu xmmword [rsp + 0x20], xmm6
vmovdqu xmmword [rsp + 0x130], xmm0
jmp 0x1400ca87b
mov byte [rsp + rax + 0x130], 1
cmp rdx, 1
je 0x1400ca871
mov byte [rsp + rax + 0x131], 2
cmp rdx, 2
je 0x1400ca871
mov byte [rsp + rax + 0x132], 3
cmp rdx, 3
je 0x1400ca871
mov byte [rsp + rax + 0x133], 4
cmp rdx, 4
je 0x1400ca871
mov byte [rsp + rax + 0x134], 5
cmp rdx, 5
je 0x1400ca871
mov byte [rsp + rax + 0x135], 6
cmp rdx, 6
je 0x1400ca871
mov byte [rsp + rax + 0x136], 7
cmp rdx, 7
je 0x1400ca871
mov byte [rsp + rax + 0x137], 8
cmp rdx, 8
je 0x1400ca871
mov byte [rsp + rax + 0x138], 9
cmp rdx, 9
je 0x1400ca871
mov byte [rsp + rax + 0x139], 0xa
cmp rdx, 0xa
je 0x1400ca871
mov byte [rsp + rax + 0x13a], 0xb
cmp rdx, 0xb
je 0x1400ca871
mov byte [rsp + rax + 0x13b], 0xc
cmp rdx, 0xc
je 0x1400ca871
mov byte [rsp + rax + 0x13c], 0xd
cmp rdx, 0xd
je 0x1400ca871
mov byte [rsp + rax + 0x13d], 0xe
cmp rdx, 0xf
jne 0x1400ca871
mov byte [rsp + 0x13f], 0xf
jmp 0x1400ca871
mov dword [rsp + 0x10c], 0
jmp 0x1400ca8e5
mov dword [rsp + 0x10c], 2
jmp 0x1400ca8e5
mov dword [rsp + 0x10c], 1
jmp 0x1400ca88a
mov dword [rsp + 0x10c], 3
jmp 0x1400ca8e5
mov dword [rsp + 0x10c], 7
jmp 0x1400ca8e5
mov dword [rsp + 0x10c], 6
jmp 0x1400ca8e5