Function at 0x1400821c8
Capabilities:
Encrypt data using speck

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x298
movaps xmmword [rsp + 0x280], xmm7
movaps xmmword [rsp + 0x270], xmm6
mov rbx, r9
mov r15, r8
mov r13, rdx
mov rsi, rcx
movabs rcx, 0x8000000000000000
mov bpl, byte [rdx + 0x118]
mov rax, qword [r9]
xor rax, rcx
cmp rax, 3
ja 0x14008221a
cmp rax, 1
jne 0x140082231
lea rdi, [rbx + 0x18]
mov rax, qword [rbx + 0x18]
xor rax, rcx
cmp rax, 0x14
ja 0x140082298
cmp rax, 1
je 0x140082298
lea rax, [0x1400ec260]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], 1
lea r8, [0x1400ec131]
lea r14, [rsp + 0x110]
mov r9d, 1
mov rcx, r14
mov rdx, rbx
call fcn.14007c93d
mov al, byte [r14]
mov ecx, dword [r14 + 1]
mov dword [rsp + 0xa0], ecx
mov ecx, dword [r14 + 4]
mov dword [rsp + 0xa3], ecx
mov rdi, qword [r14 + 8]
movups xmm0, xmmword [r14 + 0x10]
movaps xmmword [rsp + 0xc0], xmm0
cmp al, 0x14
jne 0x14008233b
mov rax, qword [rdi + 0x20]
mov rcx, qword [rdi + 0x28]
add rcx, rcx
xor edx, edx
cmp rcx, rdx
je 0x14008237b
cmp byte [rax + rdx], 0
lea rdx, [rdx + 2]
jne 0x1400822a5
mov byte [rsp + 0x47], bpl
mov qword [rsp + 0x60], r15
call fcn.140021164
movups xmm6, xmmword [0x1400f1ed0]
lea r12, [rsp + 0x110]
movaps xmmword [r12 + 0x10], xmm6
movups xmm7, xmmword [0x1400f1ec0]
movaps xmmword [r12], xmm7
mov qword [r12 + 0x20], rax
mov qword [r12 + 0x28], rdx
mov r14, qword [rdi + 0x38]
imul r15, qword [rdi + 0x40], 0x38
test r15, r15
je 0x140082396
mov rcx, r14
call fcn.140063b9a
mov ecx, eax
call fcn.140069bd6
mov ebp, eax
mov rcx, r12
mov edx, eax
call case.0x14000d8a9.1397
test al, al
jne 0x140082529
add r14, 0x38
mov rcx, r12
mov edx, ebp
call fcn.1400675c8
add r15, 0xffffffffffffffc8
jmp 0x1400822fb
mov ecx, dword [rsp + 0xa0]
mov edx, dword [rsp + 0xa3]
mov dword [rsp + 0x84], edx
mov dword [rsp + 0x81], ecx
movaps xmm0, xmmword [rsp + 0xc0]
movups xmmword [rsp + 0x90], xmm0
mov byte [rsp + 0x80], al
mov qword [rsp + 0x88], rdi
jmp 0x140082c1c
mov rdx, qword [r15]
lea rcx, [rsp + 0x80]
mov r8b, 0xd
mov r9b, 8
call fcn.140075149
jmp 0x140082c1c
lea r12, [rsp + 0x110]
mov rcx, qword [r12]
mov rdx, qword [r12 + 8]
call case.0x140010355.1201
mov r14, qword [rsp + 0x60]
mov r15, qword [r14]
mov rcx, r12
mov rdx, r15
call fcn.14007cbd3
mov al, byte [r12]
cmp al, 0x14
jne 0x14008255e
mov rcx, qword [rdi + 0x38]
mov rdx, qword [rdi + 0x40]
call fcn.14006dd0f
test rax, rax
je 0x14008258a
mov rbp, rax
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x58], r13
mov r14, rdx
call fcn.140021164
lea rcx, [rsp + 0x130]
movaps xmmword [rcx - 0x20], xmm7
movaps xmmword [rcx - 0x10], xmm6
mov qword [rcx], rax
mov qword [rcx + 8], rdx
mov qword [rsp + 0x48], r14
imul r15, r14, 0x28
mov r13, rbp
test r15, r15
je 0x1400825c8
cmp byte [r13 + 0x20], 0
movzx r8d, byte [r13 + 0x21]
mov eax, 0
cmove r8d, eax
mov byte [rsp + 0x46], r8b
mov rcx, qword [rsp + 0x130]
mov rdx, qword [rsp + 0x138]
call fcn.1400654e3
mov r14, rax
lea rax, [rsp + 0x46]
mov qword [rsp + 0xa0], rax
cmp qword [rsp + 0x120], 0
je 0x140082514
lea rax, [rsp + 0xa0]
mov qword [rsp + 0xc0], rax
mov qword [rsp + 0xc8], r12
mov rcx, qword [rsp + 0x110]
mov rdx, qword [rsp + 0x118]
lea rax, [0x1400674e3]
mov qword [rsp + 0x20], rax
mov r8, r14
lea r9, [rsp + 0xc0]
call fcn.14002593f
mov rcx, qword [rsp + 0x110]
test rax, rax
je 0x1400826a0
add r13, 0x28
mov al, byte [rsp + 0x46]
movzx r8d, byte [rcx + rdx]
and r8d, 1
sub qword [rsp + 0x120], r8
shr r14, 0x39
lea r8, [rdx - 0x10]
and r8, qword [rsp + 0x118]
mov byte [rcx + rdx], r14b
mov byte [rcx + r8 + 0x10], r14b
inc qword [rsp + 0x128]
mov rcx, qword [rsp + 0x110]
not rdx
mov byte [rdx + rcx], al
add r15, 0xffffffffffffffd8
jmp 0x140082419
mov rcx, r12
lea rdx, [rsp + 0x130]
call fcn.1400e006d
jmp 0x14008246e
mov rcx, qword [rsp + 0x110]
mov rdx, qword [rsp + 0x118]
call case.0x140010355.1201
mov rax, qword [rsp + 0x60]
mov rdx, qword [rax]
lea rcx, [rsp + 0x80]
mov r8b, 0x10
mov r9b, 3
call fcn.140075077
jmp 0x140082c1c
movups xmm0, xmmword [rsp + 0x111]
movups xmm1, xmmword [rsp + 0x120]
movups xmmword [rsp + 0x90], xmm1
movups xmmword [rsp + 0x81], xmm0
mov byte [rsp + 0x80], al
jmp 0x140082c1c
movabs r12, 0x8000000000000000
mov qword [rsp + 0xe0], r12
mov rcx, qword [r14 + 8]
add rcx, 0x48
lea rdx, [rsp + 0xe0]
call fcn.1400862b4
test al, al
jne 0x140082ad7
mov word [rsp + 0x80], 0x3708
jmp 0x140082c0c
mov rcx, qword [rsp + 0x110]
mov rdx, qword [rsp + 0x118]
call case.0x140014861.876
add rbp, 0xffffffffffffffd8
imul rax, qword [rsp + 0x48], 0x28
mov r13, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x50]
test rax, rax
je 0x1400826cf
lea rcx, [rbp + 0x28]
add rax, 0xffffffffffffffd8
cmp qword [rbp + 0x28], 0
mov rbp, rcx
jne 0x1400825f1
mov r13, qword [rcx + 0x10]
mov rdx, qword [rcx + 0x18]
lea r14, [rsp + 0x110]
mov rcx, r14
mov qword [rsp + 0x68], rdx
call fcn.14003e325
mov rax, qword [r14 + 8]
add rax, qword [r14 + 0x10]
xor r11d, r11d
movabs rcx, 0x8080808080808080
mov rdx, r13
lea r8, [r11 + 0x10]
cmp r8, qword [rsp + 0x68]
ja 0x1400826e2
xor r10d, r10d
xor r9d, r9d
cmp r10, 2
je 0x140082665
or r9, qword [rdx + r10*8]
inc r10
jmp 0x140082656
test r9, rcx
jne 0x1400826e2
xor r9d, r9d
cmp r9, 0x10
je 0x140082693
mov r10b, byte [rdx + r9]
lea r11d, [r10 - 0x41]
cmp r11b, 0x1a
setb r11b
shl r11b, 5
or r11b, r10b
mov byte [rax + r9], r11b
inc r9
jmp 0x14008266d
add rdx, 0x10
add rax, 0x10
mov r11, r8
jmp 0x140082641
mov rdx, qword [rsp + 0x118]
call case.0x140014861.876
lea rcx, [rsp + 0x80]
mov rdx, qword [rsp + 0x50]
mov r8b, 0x10
mov r9b, 8
call fcn.140075077
mov r13, qword [rsp + 0x58]
jmp 0x140082c1c
lea rcx, [rsp + 0x80]
mov r8b, 0xd
mov r9b, 0x38
jmp 0x140082554
movups xmm0, xmmword [rsp + 0x110]
lea rax, [rsp + 0xa0]
movaps xmmword [rax], xmm0
lea r15, [r11 + r13]
mov qword [rsp + 0x108], r11
mov qword [rax + 0x10], r11
mov rax, qword [rsp + 0x68]
lea r12, [r13 + rax]
lea rax, [rsp + 0xc0]
mov qword [rax], r15
mov qword [rax + 8], r12
and qword [rax + 0x10], 0
mov qword [rsp + 0x100], r12
lea rcx, [rsp + 0xc0]
call fcn.140023271
cmp eax, 0x110000
je 0x140082a2d
mov r14, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0xc0]
mov rbp, qword [rsp + 0xc8]
add r12, r14
add r15, rbp
sub r12, r15
mov qword [rsp + 0x48], rcx
add r12, rcx
mov qword [rsp + 0xd0], r12
cmp eax, 0x3a3
jne 0x1400827a5
add r14, qword [rsp + 0x108]
je 0x14008282e
cmp r14, qword [rsp + 0x68]
jae 0x140082828
cmp byte [r13 + r14], 0xbf
jg 0x14008282e
jmp 0x140082c9a
cmp eax, 0x80
jae 0x1400827dd
lea ecx, [rax - 0x41]
xor edx, edx
cmp cl, 0x1a
setb dl
shl edx, 5
or edx, eax
mov eax, edx
mov r14, qword [rsp + 0x48]
lea rcx, [rsp + 0xa0]
mov edx, eax
call fcn.14003de4b
mov r15, r14
mov r12, rbp
jmp 0x14008272b
mov ecx, 0x57f
xor edx, edx
mov r8d, 0x57f
lea r11, [rsp + 0x110]
lea r14, [0x1400e7ae4]
cmp rdx, rcx
jae 0x1400827be
shr r8, 1
add r8, rdx
mov r9d, dword [r14 + r8*8]
cmp r9d, eax
je 0x14008290b
lea r10, [r8 + 1]
cmp r9d, eax
cmova rcx, r8
cmovb rdx, r10
mov r8, rcx
sub r8, rdx
jmp 0x1400827f9
jne 0x140082c9a
mov qword [rsp + 0x70], rbp
lea r15, [r14 + r13]
xor eax, eax
mov r12d, 0x3c3
cmp r15, r13
je 0x140082a0e
movzx ebp, byte [r15 - 1]
test bpl, bpl
js 0x140082857
dec r15
jmp 0x1400828b0
movzx ecx, byte [r15 - 2]
cmp cl, 0xc0
jge 0x140082884
movzx edx, byte [r15 - 3]
cmp dl, 0xc0
jge 0x14008288d
movzx r8d, byte [r15 - 4]
add r15, 0xfffffffffffffffc
and r8d, 7
shl r8d, 6
and edx, 0x3f
or edx, r8d
jmp 0x140082894
add r15, 0xfffffffffffffffe
and ecx, 0x1f
jmp 0x14008289c
add r15, 0xfffffffffffffffd
and edx, 0xf
shl edx, 6
and ecx, 0x3f
or ecx, edx
shl ecx, 6
and ebp, 0x3f
or ebp, ecx
cmp ebp, 0x110000
je 0x140082a0e
test al, al
jne 0x1400828c8
mov ecx, ebp
call case.0x140023fff.181
test al, al
je 0x1400828c8
mov ebp, 0x110000
xor eax, eax
jmp 0x1400828ca
mov al, 1
cmp ebp, 0x110000
je 0x140082839
mov ecx, ebp
call fcn.1400438ce
test al, al
je 0x140082a0e
add r14, 2
je 0x1400829ad
cmp r14, qword [rsp + 0x68]
jae 0x1400829a7
cmp byte [r13 + r14], 0xbf
jg 0x1400829ad
jmp 0x140082c9a
mov eax, dword [r14 + r8*8 + 4]
mov ecx, eax
xor ecx, 0xd800
add ecx, 0xffef0000
cmp ecx, 0xffef0800
mov ecx, 0x110000
cmovb eax, ecx
lea rcx, [0x1400ea6dc]
cmp eax, 0x110000
je 0x140082946
and qword [rsp + 0x114], 0
mov rcx, r11
mov dword [rsp + 0x110], eax
mov eax, dword [rcx]
mov r14, qword [rcx + 4]
test r14d, r14d
je 0x1400827be
mov qword [rsp + 0x70], rbp
mov rbp, r14
shr rbp, 0x20
lea r15, [rsp + 0xa0]
mov rcx, r15
mov edx, eax
call fcn.14003de4b
mov rcx, r15
mov edx, r14d
call fcn.14003de4b
mov r14, qword [rsp + 0x48]
mov r15, r14
mov r12, qword [rsp + 0x70]
mov eax, ebp
test rbp, rbp
mov rbp, qword [rsp + 0x70]
jne 0x1400827c3
jmp 0x14008272b
jne 0x140082c9a
add r14, r13
mov qword [rsp + 0x110], r14
mov rax, qword [rsp + 0x100]
mov qword [rsp + 0x118], rax
mov byte [rsp + 0x120], 0
lea r14, [rsp + 0x110]
mov rcx, r14
call fcn.140023271
cmp eax, 0x110000
je 0x140082a08
mov ebp, eax
mov ecx, eax
call case.0x140023fff.181
test al, al
jne 0x1400829d8
mov ecx, ebp
call fcn.1400438ce
movzx r12d, al
or r12d, 0x3c2
jmp 0x140082a0e
mov r12d, 0x3c2
lea rcx, [rsp + 0xa0]
mov edx, r12d
call fcn.14003de4b
mov r15, qword [rsp + 0x48]
mov r12, qword [rsp + 0x70]
jmp 0x14008272b
movaps xmm0, xmmword [rsp + 0xa0]
movaps xmmword [rsp + 0xe0], xmm0
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0xf0], rax
mov r12, qword [rsp + 0xe0]
movabs rax, 0x8000000000000000
cmp r12, rax
je 0x140082c86
cmp byte [rsp + 0x47], 0
mov r13, qword [rsp + 0x58]
mov r14, qword [rsp + 0x60]
jne 0x140082c90
mov r15, qword [r14 + 8]
cmp qword [r15 + 0x48], rax
jne 0x140082c9a
lea r13, [r15 + 0x48]
mov rdx, qword [rsp + 0xe8]
mov r8, qword [rsp + 0xf0]
lea r14, [rsp + 0x110]
mov rcx, r14
call fcn.14003e4ae
mov rcx, qword [r15 + 0x48]
mov rdx, qword [r15 + 0x50]
call fcn.140006818
mov rax, qword [r14 + 0x10]
mov qword [r13 + 0x10], rax
movups xmm0, xmmword [r14]
movups xmmword [r13], xmm0
mov r13, qword [rsp + 0x58]
mov r15, qword [rsp + 0x50]
mov rcx, qword [rdi + 0x38]
mov rdx, qword [rdi + 0x40]
mov r8w, 0xd
call fcn.14006dccf
test rax, rax
je 0x140082afd
cmp dword [rax], 2
jne 0x140082afd
mov rdx, qword [rax + 0x10]
add rax, 0x18
jmp 0x140082b2d
lea r14, [rsp + 0x110]
mov rcx, r14
mov rdx, r15
mov r8b, 6
mov r9b, 0xc
call fcn.140075149
mov al, byte [r14]
cmp al, 0x14
jne 0x140082bc9
lea rax, [rsp + 0x120]
mov rdx, qword [rax - 8]
mov r8, qword [rax]
lea r14, [rsp + 0x88]
mov rcx, r14
call case.0x140014861.686
mov qword [r14 - 8], rdi
mov rdx, qword [rsp + 0xe8]
mov rcx, r12
call fcn.140006818
mov r15, qword [r14 - 8]
mov rax, qword [r14 + 0x10]
mov qword [rsp + 0x240], rax
movups xmm0, xmmword [r14]
lea r14, [rsp + 0x250]
movaps xmmword [r14], xmm0
mov qword [r14 + 0x10], rax
lea r12, [rsp + 0x110]
mov r8d, 0x120
mov rcx, r12
mov rdx, r13
call fcn.1400d3c00
mov rax, qword [rsp + 0x60]
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x28], xmm0
mov qword [rsp + 0x20], rbx
mov rcx, rsi
mov rdx, r12
mov r8, r14
mov r9, r15
call fcn.140082c9c
mov rcx, rbx
call fcn.140073c2d
mov rcx, r13
call fcn.14008aba7
jmp 0x140082c5f
mov ecx, dword [rsp + 0x111]
mov edx, dword [rsp + 0x114]
mov dword [rsp + 0x84], edx
mov dword [rsp + 0x81], ecx
movups xmm0, xmmword [rsp + 0x118]
mov rcx, qword [rsp + 0x128]
mov byte [rsp + 0x80], al
movups xmmword [rsp + 0x88], xmm0
mov qword [rsp + 0x98], rcx
mov rdx, qword [rsp + 0xe8]
mov rcx, r12
call fcn.140006818
mov rax, qword [rsp + 0x80]
movups xmm0, xmmword [rsp + 0x88]
movaps xmmword [rsp + 0x230], xmm0
mov rcx, qword [rsp + 0x98]
mov qword [rsp + 0x240], rcx
mov qword [rsi + 0x18], rcx
movups xmmword [rsi + 8], xmm0
mov qword [rsi], rax
mov rcx, rbx
call fcn.140073c2d
mov rcx, r13
call fcn.140086209
mov rax, rsi
movaps xmm6, xmmword [rsp + 0x270]
movaps xmm7, xmmword [rsp + 0x280]
add rsp, 0x298
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov r13, qword [rsp + 0x58]
mov r14, qword [rsp + 0x60]
mov r15, qword [rsp + 0x50]
jmp 0x14008259c
ud2