Function at 0x14012d730
Capabilities:
Encrypt data using speck

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x2c8
mov qword [rsp + 0x188], r8
mov rbx, rdx
mov rsi, rcx
mov r14, qword [rdx + 0x38]
mov qword [rdx + 0x38], 0
test r14, r14
mov qword [rsp + 0x48], rdx
je 0x14012d8aa
movzx eax, byte [r14 + 0x80]
test al, al
jne 0x14012d7e3
mov rax, qword [rsp + 0x188]
mov rax, qword [rax]
mov rdx, qword [rax]
mov rcx, qword [rax + 8]
call qword [rdx]
mov cl, 1
xchg byte [r14 + 0x60], cl
test cl, cl
je 0x14012d79d
mov rcx, rdx
call qword [rax + 0x18]
jmp 0x14012d7e3
mov r8, qword [r14 + 0x50]
test r8, r8
je 0x14012d7c5
mov rcx, qword [r14 + 0x58]
mov rbx, rsi
mov rsi, rax
mov rdi, rdx
call qword [r8 + 0x18]
mov rdx, rdi
mov rax, rsi
mov rsi, rbx
mov rbx, qword [rsp + 0x48]
mov qword [r14 + 0x50], rax
mov qword [r14 + 0x58], rdx
xor eax, eax
xchg byte [r14 + 0x60], al
movzx eax, byte [r14 + 0x80]
test al, al
je 0x14012e48f
mov al, 1
xchg byte [r14 + 0x48], al
test al, al
jne 0x14012d805
movzx eax, byte [r14 + 0x41]
mov byte [r14 + 0x41], 2
cmp al, 2
jne 0x14012e434
xor eax, eax
xchg byte [r14 + 0x48], al
mov byte [rsp + 0x208], 1
mov byte [rsp + 0x278], 2
mov bl, 1
mov al, 1
xchg byte [r14 + 0x80], al
mov al, 1
xchg byte [r14 + 0x60], al
test al, al
jne 0x14012d848
mov rax, qword [r14 + 0x50]
mov rcx, qword [r14 + 0x58]
mov qword [r14 + 0x50], 0
xor edx, edx
xchg byte [r14 + 0x60], dl
test rax, rax
je 0x14012d848
call qword [rax + 0x18]
xchg byte [r14 + 0x78], bl
test bl, bl
jne 0x14012d86e
mov rax, qword [r14 + 0x68]
mov rcx, qword [r14 + 0x70]
mov qword [r14 + 0x68], 0
xor edx, edx
xchg byte [r14 + 0x78], dl
test rax, rax
je 0x14012d86e
call qword [rax + 8]
lock dec qword [r14]
mov rbx, qword [rsp + 0x48]
jne 0x14012d881
mov rcx, r14
call fcn.140131aa0
movzx eax, byte [rsp + 0x278]
cmp eax, 2
je 0x14012e523
lea rcx, [r14 + 0x10]
movzx edx, byte [rcx + 0x30]
mov byte [rsp + 0xa0], dl
movdqu xmm0, xmmword [rcx]
movdqu xmm1, xmmword [rcx + 0x10]
movdqu xmm2, xmmword [rcx + 0x20]
movdqa xmmword [rsp + 0x90], xmm2
movdqa xmmword [rsp + 0x80], xmm1
movdqa xmmword [rsp + 0x70], xmm0
mov ecx, dword [r14 + 0x42]
mov dword [rsp + 0xe0], ecx
movzx ecx, word [r14 + 0x46]
mov word [rsp + 0xe4], cx
xor ecx, ecx
xchg byte [r14 + 0x48], cl
cmp al, 3
jne 0x14012e54e
invalid
add byte [rax], al
invalid
mov rdi, rsi
movdqa xmm0, xmmword [rsp + 0x70]
movdqa xmm1, xmmword [rsp + 0x80]
movdqa xmm2, xmmword [rsp + 0x90]
movdqa xmmword [rsp + 0x2a0], xmm2
movzx ecx, byte [rsp + 0xa0]
mov byte [rsp + 0x2b0], cl
movdqa xmmword [rsp + 0x290], xmm1
movdqa xmmword [rsp + 0x280], xmm0
mov byte [rsp + 0x2b1], al
mov eax, dword [rsp + 0xe0]
mov dword [rsp + 0x2b2], eax
movzx eax, word [rsp + 0xe4]
mov word [rsp + 0x2b6], ax
mov rax, qword [rsp + 0x2a8]
movzx eax, byte [rax + 0x10]
test al, al
jne 0x14012e962
mov rax, qword [rsp + 0x280]
mov rax, qword [rax + 0x10]
xor ecx, ecx
cmp rax, 3
setne cl
xor edx, edx
cmp rax, 1
sete dl
cmp byte [rsp + 0x290], 2
cmove edx, ecx
test dl, dl
je 0x14012e962
mov rdx, qword [rbx + 0x30]
lea rcx, [rsp + 0x208]
lea r9, [rsp + 0x280]
mov r8, rbx
call fcn.140136510
jmp 0x14012d815
mov byte [rsp + 0x208], 2
mov byte [rsp + 0x278], 2
lea rcx, [rsp + 0x280]
call fcn.140131b10
jmp 0x14012d815