Function at 0x140040350
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
movaps xmmword [rsp + 0x2b0], xmm6
mov qword [rsp + 0x38], rdx
mov r14, rcx
movabs rax, 0x900000007fffffff
mov qword [rsp + 0x258], rax
movabs rax, 0xd400c029ffffffff
mov qword [rsp + 0x250], rax
mov rcx, qword [rcx + 0x40]
cmp qword [r14 + 0x48], 0
jne 0x1400403a8
mov rdx, qword [r14 + 0x50]
jmp 0x1400403ac
lea rdx, [r14 + 0x50]
xor eax, eax
cmp rcx, 2
cmovne rax, rdx
cmp qword [r14 + 0xf0], 0
jne 0x1400403d4
mov rsi, qword [r14 + 0xf8]
cmp qword [r14 + 8], 0
je 0x1400403e2
lea rbx, [r14 + 0x10]
jmp 0x1400403e6
lea rsi, [r14 + 0xf8]
cmp qword [r14 + 8], 0
jne 0x1400403ce
mov rbx, qword [r14 + 0x10]
mov rdx, qword [rsp + 0x330]
movzx edi, byte [r14]
cmp ecx, 2
mov qword [rsp + 0x238], r8
jne 0x140040403
xor ecx, ecx
jmp 0x14004040a
movzx ecx, byte [rax + 0x4a]
and cl, 1
mov qword [rsp + 0x58], r9
lea r13, [r9 + rdx*4]
mov rbp, qword [r14 + 0xa0]
lea r8, [r14 + 0xa8]
mov rdx, qword [r14 + 0xa8]
movzx r9d, byte [r14 + 0x12a]
mov dword [rsp + 0x28], r9d
mov r9, qword [rsi]
mov r10, qword [rsi + 8]
mov r11, qword [rsi + 0x18]
mov rsi, qword [rsi + 0x20]
test dil, 1
je 0x14004045b
mov r12, qword [rbx]
mov r15, qword [rbx + 8]
mov rdi, qword [rbx + 0x18]
mov rbx, qword [rbx + 0x20]
jmp 0x14004046b
mov edi, 1
xor ebx, ebx
xor r15d, r15d
mov r12d, 1
test rbp, rbp
cmove r8, rdx
mov rdx, qword [rsp + 0x58]
mov qword [rsp + 0x1b8], rdx
mov qword [rsp + 0x1c0], r13
mov dword [rsp + 0x168], 0
movups xmm0, xmmword [rsp + 0x26c]
movups xmm1, xmmword [rsp + 0x27c]
movups xmm2, xmmword [rsp + 0x28c]
movups xmm3, xmmword [rsp + 0x29c]
movups xmmword [rsp + 0x16c], xmm0
movups xmmword [rsp + 0x17c], xmm1
movups xmmword [rsp + 0x18c], xmm2
movups xmmword [rsp + 0x19c], xmm3
mov edx, dword [rsp + 0x2ac]
mov dword [rsp + 0x1ac], edx
mov qword [rsp + 0x1b0], 0
mov qword [rsp + 0x210], 0
mov dword [rsp + 0x224], 0
mov byte [rsp + 0x228], 0
movzx edx, word [rsp + 0x35]
mov word [rsp + 0x229], dx
movzx edx, byte [rsp + 0x37]
mov byte [rsp + 0x22b], dl
mov qword [rsp + 0x1c8], r8
mov qword [rsp + 0x218], rax
mov qword [rsp + 0x1d0], r9
mov qword [rsp + 0x1d8], r10
mov qword [rsp + 0x1e0], r11
mov qword [rsp + 0x1e8], rsi
mov qword [rsp + 0x1f0], r12
mov qword [rsp + 0x1f8], r15
mov qword [rsp + 0x200], rdi
mov qword [rsp + 0x208], rbx
mov byte [rsp + 0x230], cl
mov eax, dword [rsp + 0x28]
mov dword [rsp + 0x22c], eax
mov byte [rsp + 0x231], 2
mov r8d, dword [rsp + 0x224]
mov dword [rsp + 0x220], 0x110000
lea r15, [rsp + 0x168]
mov rcx, r15
mov edx, 0xffff
call fcn.1400428d0
lea rcx, [rsp + 0x70]
mov r8d, 0xd0
mov rdx, r15
call sub.VCRUNTIME140.dll_memcpy
cmp qword [r14 + 0x130], 0
jne 0x1400405dc
mov rax, qword [r14 + 0x138]
jmp 0x1400405e3
lea rax, [r14 + 0x138]
movups xmm0, xmmword [rax]
movzx eax, word [r14 + 0x128]
movups xmmword [rsp + 0x140], xmm0
mov qword [rsp + 0x150], 0
mov dword [rsp + 0x158], 0x110000
mov dword [rsp + 0x15c], eax
lea rax, [rsp + 0x250]
mov qword [rsp + 0x160], rax
mov rax, qword [rsp + 0x38]
lea r15, [rax + 0x3f8]
lea rcx, [rax + 4]
mov qword [rsp + 0x48], rcx
add rax, 8
mov qword [rsp + 0x60], rax
mov eax, 0x110000
xorps xmm6, xmm6
mov qword [rsp + 0x20], r15
jmp 0x140040688
mov rcx, qword [rsp + 0x38]
mov rax, qword [rcx + 8]
mov rcx, qword [rcx + 0x10]
mov rdx, qword [rsp + 0x60]
cmp rax, r8
je 0x1400410a2
mov dword [rcx + rax*4], ebx
inc qword [rdx]
mov eax, dword [rsp + 0x158]
cmp eax, 0x110000
jne 0x1400407e0
mov rax, qword [rsp + 0xb8]
lea rcx, [rsp + 0x74]
mov r8, rax
cmp rax, 0x12
jb 0x1400406b6
mov r8, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x80]
mov rdx, qword [rsp + 0x118]
cmp rdx, r8
jae 0x140040700
mov ecx, dword [rcx + rdx*4]
inc rdx
mov qword [rsp + 0x118], rdx
cmp rax, 0x12
jb 0x140040792
cmp rdx, qword [rsp + 0x78]
jne 0x1400407b7
mov rax, qword [rsp + 0x78]
lea r8, [rsp + 0x78]
jmp 0x14004079f
mov ebx, dword [rsp + 0x128]
mov r13, qword [rsp + 0x12c]
mov dword [rsp + 0x128], 0x110000
cmp ebx, 0x110000
je 0x140041116
cmp ebx, dword [rsp + 0x15c]
jb 0x140040739
cmp r13d, 2
jae 0x140040f26
lea rcx, [rsp + 0x168]
lea rdx, [rsp + 0x70]
call fcn.140043180
mov eax, dword [rsp + 0x168]
cmp eax, 0x110000
je 0x140041025
mov edx, dword [rsp + 0x16c]
mov ecx, dword [rsp + 0x170]
cmp eax, dword [rsp + 0x15c]
jae 0x140040fa7
mov dword [rsp + 0x128], eax
mov dword [rsp + 0x12c], edx
mov dword [rsp + 0x130], ecx
jmp 0x140041025
lea r8, [rsp + 0xb8]
cmp rdx, rax
jne 0x1400407b7
test rax, rax
je 0x1400407ab
mov qword [r8], 0
mov qword [rsp + 0x118], 0
mov ebx, ecx
and ebx, 0xffffff
cmp ecx, 0xffffff
ja 0x140041031
mov dword [rsp + 0x158], ebx
nop word cs:[rax + rax]
xor r13d, r13d
xor ebx, ebx
xor esi, esi
mov edx, ebx
xor ebx, ebx
jmp 0x140040806
mov r13, qword [rsp + 0x12c]
mov dword [rsp + 0x128], 0x110000
mov sil, 1
mov eax, dword [rsp + 0x158]
mov dword [rsp + 0x158], 0x110000
cmp eax, 0x110000
jne 0x1400408a0
lea rcx, [rsp + 0x70]
mov r8d, r13d
call fcn.1400428d0
mov r13d, eax
mov rbp, qword [rsp + 0x140]
mov r15, qword [rsp + 0x148]
test sil, 1
je 0x1400408c0
mov qword [rsp + 0x188], rbp
mov qword [rsp + 0x190], r15
mov qword [rsp + 0x168], 1
lea eax, [r13 - 0x1161]
lea rcx, [rsp + 0x170]
movups xmmword [rcx], xmm6
cmp eax, 0x9e
jbe 0x140040ea8
lea rcx, [rsp + 0x168]
mov edx, ebx
mov r8d, r13d
call fcn.14003dce0
cmp eax, 0x110000
jne 0x1400408c3
jmp 0x14004100f
mov rbp, qword [rsp + 0x140]
mov r15, qword [rsp + 0x148]
jmp 0x1400408c3
mov eax, r13d
mov rsi, qword [rsp + 0xb8]
cmp rsi, 0x12
mov rcx, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x80]
mov rdi, qword [rsp + 0x118]
mov r14, rsi
mov qword [rsp + 0x28], rcx
cmovae rsi, rcx
lea r13, [rsp + 0x74]
mov qword [rsp + 0x40], rdx
cmovae r13, rdx
mov ebx, eax
jmp 0x140040942
lea ecx, [rbx - 0x1100]
cmp ecx, 0x13
jae 0x140040af0
imul ecx, ecx, 0x24c
lea edx, [rax + rax*8]
lea edx, [rdx + rdx*2]
add edx, eax
add edx, ecx
add edx, 0xac00
inc rdi
mov qword [rsp + 0x118], rdi
mov ebx, edx
cmp rdi, rsi
jae 0x140040b60
mov r12d, dword [r13 + rdi*4]
mov edx, r12d
and edx, 0xffffff
mov qword [rsp + 0x188], rbp
mov qword [rsp + 0x190], r15
mov qword [rsp + 0x168], 1
lea eax, [rdx - 0x1161]
lea rcx, [rsp + 0x170]
movups xmmword [rcx], xmm6
cmp eax, 0x9e
jbe 0x1400409c0
cmp edx, 0x10000
jae 0x140040a20
mov edx, r12d
lea rcx, [rsp + 0x168]
call fcn.14003d7b0
cmp eax, 1
je 0x140040a67
jmp 0x140040af0
cmp eax, 0x15
jb 0x140040910
lea eax, [rdx - 0x11a8]
cmp eax, 0x1b
jae 0x140040af0
lea eax, [rbx - 0xac00]
cmp eax, 0x2ba3
ja 0x140040af0
mov ecx, eax
shr ecx, 2
imul rcx, rcx, 0x24924925
shr rcx, 0x20
lea r8d, [rcx + rcx*8]
lea r8d, [r8 + r8*2]
add r8d, ecx
sub eax, r8d
jne 0x140040af0
add edx, ebx
add edx, 0xffffee59
jmp 0x140040935
shr edx, 0xa
add edx, 0xffffd7c0
lea rcx, [rsp + 0x168]
call fcn.14003d7b0
or eax, 2
cmp eax, 3
jne 0x140040af0
mov edx, r12d
and edx, 0x3ff
or edx, 0xdc00
lea rcx, [rsp + 0x168]
call fcn.14003d7b0
cmp eax, 1
jne 0x140040af0
cmp ebx, 0x10000
jae 0x140040a90
mov edx, ebx
lea rcx, [rsp + 0x168]
call fcn.14003d7b0
cmp eax, 2
je 0x140040ad0
jmp 0x140040af0
mov edx, ebx
shr edx, 0xa
add edx, 0xffffd7c0
lea rcx, [rsp + 0x168]
call fcn.14003d7b0
or eax, 2
cmp eax, 3
jne 0x140040af0
mov edx, ebx
and edx, 0x3ff
or edx, 0xdc00
lea rcx, [rsp + 0x168]
call fcn.14003d7b0
cmp eax, 2
jne 0x140040af0
mov eax, edx
xor eax, 0xd800
add eax, 0xffef0000
cmp eax, 0xffef07ff
jbe 0x140040af0
cmp edx, 0x110000
jne 0x140040935
nop
cmp r14, 0x12
jb 0x140040b10
lea rax, [rsp + 0x78]
mov rcx, qword [rsp + 0x28]
cmp rcx, rdi
jae 0x140040b24
jmp 0x1400411fb
mov rcx, r14
lea rax, [rsp + 0xb8]
cmp r14, rdi
jb 0x1400411fb
mov qword [rax], 0
mov rsi, rcx
sub rsi, rdi
je 0x140040bfc
mov r15, rbx
mov rbx, qword [rsp + 0xb8]
cmp rbx, 0x12
jb 0x140040baf
mov rbx, qword [rsp + 0x78]
lea rax, [rsp + 0x78]
cmp rdi, rbx
jne 0x140040bbe
jmp 0x140040bf6
cmp r14, 0x12
mov rax, qword [rsp + 0x28]
cmovb rax, r14
test rax, rax
je 0x140040b8f
xor eax, eax
cmp r14, 0x12
setb al
shl eax, 6
mov qword [rsp + rax + 0x78], 0
mov r14, qword [rsp + 0xb8]
mov r15, qword [rsp + 0x20]
mov qword [rsp + 0x118], 0
cmp r14, 0x12
jae 0x140040e40
jmp 0x140040e45
lea rax, [rsp + 0x74]
mov qword [rsp + 0x40], rax
cmp rdi, rbx
je 0x140040bee
mov rax, qword [rsp + 0x40]
lea rdx, [rax + rdi*4]
lea rcx, [rax + rbx*4]
lea r8, [rsi*4]
call sub.VCRUNTIME140.dll_memmove
add rbx, rsi
cmp qword [rsp + 0xb8], 0x11
mov rcx, rbx
lea rax, [rsp + 0x78]
ja 0x140040bf6
lea rax, [rsp + 0xb8]
mov qword [rax], rcx
mov rbx, r15
mov qword [rsp + 0x118], 0
cmp r12d, 0x1000000
mov r15, qword [rsp + 0x20]
jb 0x140041025
shr r12d, 0x18
mov esi, 1
mov r14, qword [rsp + 0xb8]
mov eax, ebx
shr eax, 0xa
add eax, 0xffffd7c0
mov dword [rsp + 0x40], eax
mov eax, ebx
and eax, 0x3ff
or eax, 0xdc00
mov dword [rsp + 0x54], eax
cmp r14, 0x12
mov rax, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x80]
mov rdx, qword [rsp + 0x140]
mov qword [rsp + 0x28], rdx
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x248], rax
cmovae r14, rax
mov rbp, qword [rsp + 0x148]
lea r15, [rsp + 0x74]
mov qword [rsp + 0x240], rcx
cmovae r15, rcx
jmp 0x140040ca9
inc rsi
mov r12d, ebx
mov rbx, rdi
cmp rsi, r14
jae 0x140040e30
mov r13d, dword [r15 + rsi*4]
cmp r13d, 0x1000000
jb 0x140041020
mov rdi, rbx
mov ebx, r13d
shr ebx, 0x18
cmp r12b, bl
je 0x140040ca0
mov edx, r13d
and edx, 0xffffff
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x188], rax
mov qword [rsp + 0x190], rbp
mov qword [rsp + 0x168], 1
lea rax, [rsp + 0x170]
movups xmmword [rax], xmm6
cmp edx, 0x10000
jb 0x140040d3e
shr edx, 0xa
add edx, 0xffffd7c0
lea rcx, [rsp + 0x168]
call fcn.14003d7b0
or eax, 2
cmp eax, 3
jne 0x140040ca0
and r13d, 0x3ff
or r13d, 0xdc00
lea rcx, [rsp + 0x168]
mov edx, r13d
call fcn.14003d7b0
cmp eax, 1
jne 0x140040ca0
mov rax, rdi
mov edx, eax
cmp eax, 0x10000
jb 0x140040d86
lea rcx, [rsp + 0x168]
mov edx, dword [rsp + 0x40]
call fcn.14003d7b0
or eax, 2
mov ecx, dword [rsp + 0x54]
mov edx, ecx
cmp eax, 3
jne 0x140040ca0
lea rcx, [rsp + 0x168]
call fcn.14003d7b0
cmp eax, 2
jne 0x140040ca0
mov eax, edx
xor eax, 0xd800
add eax, 0xffef0000
cmp eax, 0xffef07ff
jbe 0x140040ca0
cmp edx, 0x110000
je 0x140040ca0
mov rcx, qword [rsp + 0x68]
cmp rcx, 0x12
mov r9, qword [rsp + 0x248]
cmovb r9, rcx
cmp r9, rsi
jbe 0x140041222
mov edi, edx
xor eax, eax
cmp rcx, 0x12
setb al
lea rcx, [rsp + 0x74]
mov rdx, qword [rsp + 0x240]
cmovb rdx, rcx
shl eax, 6
lea rcx, [r9 - 1]
mov qword [rsp + rax + 0x78], rcx
lea rcx, [rdx + rsi*4]
lea rdx, [rdx + rsi*4]
add rdx, 4
mov r8, rsi
not r8
add r8, r9
shl r8, 2
call sub.VCRUNTIME140.dll_memmove
mov ebx, edi
jmp 0x140040c23
mov r15, qword [rsp + 0x20]
mov r14, qword [rsp + 0x68]
cmp r14, 0x12
jb 0x140040e45
mov r14, qword [rsp + 0x78]
test r14, r14
jne 0x140041025
mov edx, dword [rsp + 0x128]
cmp edx, 0x110000
je 0x140041025
cmp edx, dword [rsp + 0x15c]
jb 0x140041025
mov eax, dword [rsp + 0x12c]
lea ecx, [rax - 0x1161]
cmp ecx, 0x62
jb 0x1400407f0
mov ecx, eax
and ecx, 0xffffff00
cmp ecx, 0xd800
je 0x1400407f0
dec eax
cmp eax, 1
jbe 0x1400407f0
jmp 0x140041025
cmp eax, 0x15
jae 0x140040ed7
lea ecx, [rbx - 0x1100]
cmp ecx, 0x13
jae 0x14004100f
imul ecx, ecx, 0x24c
lea edx, [rax + rax*8]
lea edx, [rdx + rdx*2]
add edx, eax
lea eax, [rcx + rdx]
add eax, 0xac00
jmp 0x1400408c3
lea eax, [r13 - 0x11a8]
cmp eax, 0x1b
jae 0x14004100f
lea eax, [rbx - 0xac00]
cmp eax, 0x2ba3
ja 0x14004100f
mov ecx, eax
shr ecx, 2
imul rcx, rcx, 0x24924925
shr rcx, 0x20
lea edx, [rcx + rcx*8]
lea edx, [rdx + rdx*2]
add edx, ecx
sub eax, edx
jne 0x14004100f
lea eax, [rbx + r13]
add eax, 0xffffee59
jmp 0x1400408c3
bt r13, 0x20
jb 0x1400407e5
cmp r13d, 0x10000
jb 0x1400407e5
test r13w, r13w
je 0x140040739
movzx eax, r13w
cmp eax, 1
je 0x1400407e5
mov ecx, r13d
shr ecx, 0x10
mov eax, ecx
and eax, 0x7f
cmp ax, 0x3c
setne al
add ecx, 0xfffff400
movzx ecx, cx
cmp ecx, 0xfd00
setb cl
lea edx, [rbx - 0x1ffc]
cmp edx, 0xffffff74
ja 0x1400407e5
lea edx, [rbx - 0xfb4f]
cmp edx, 0xffffffcd
ja 0x1400407e5
or al, cl
jne 0x140040739
jmp 0x1400407e5
mov r8d, edx
and r8d, 0xffffff00
cmp r8d, 0xd800
sete r8b
lea r9d, [rdx - 1]
cmp r9d, 2
setb r9b
or r9b, r8b
je 0x140040fe7
mov dword [rsp + 0x128], eax
mov dword [rsp + 0x12c], edx
mov dword [rsp + 0x130], ecx
jmp 0x1400407e5
lea r8d, [rdx - 0x11c3]
mov dword [rsp + 0x128], eax
mov dword [rsp + 0x12c], edx
mov dword [rsp + 0x130], ecx
cmp r8d, 0xffffff9e
jae 0x1400407e5
jmp 0x140041025
mov dword [rsp + 0x158], r13d
nop word [rax + rax]
mov r15, qword [rsp + 0x20]
cmp ebx, 0x110000
je 0x14004110e
cmp ebx, 0x7f
ja 0x140041070
xor eax, eax
mov ecx, ebx
mov edx, 1
shld rax, rdx, cl
shl rdx, cl
mov rcx, qword [rsp + 0x160]
test bl, 0x40
cmovne rax, rdx
mov r8d, 0
cmovne rdx, r8
and rax, qword [rcx + 8]
and rdx, qword [rcx]
or rdx, rax
je 0x140041078
jmp 0x1400410c1
cmp ebx, 0xfffd
je 0x1400410c1
mov r8, qword [r15]
cmp r8, 0xfe
jae 0x140040660
mov rax, r8
mov rcx, qword [rsp + 0x48]
mov rdx, r15
mov r8d, 0xfd
cmp rax, r8
jne 0x14004067b
mov rsi, qword [rsp + 0x38]
mov rcx, rsi
call fcn.140116490
mov rax, qword [rsi + 8]
mov rcx, qword [rsi + 0x10]
mov rdx, qword [rsp + 0x60]
jmp 0x14004067b
cmp qword [rsp + 0xb8], 0x12
jb 0x1400410e3
mov r8, qword [rsp + 0x80]
mov rcx, qword [0x140177e28]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp qword [rsp + 0x150], 0
je 0x1400411dd
mov r8, qword [rsp + 0x140]
mov rcx, qword [0x140177e28]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x1400411dd
mov rax, qword [rsp + 0xb8]
cmp rax, 0x12
jb 0x140041133
mov r8, qword [rsp + 0x80]
mov rcx, qword [0x140177e28]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp qword [rsp + 0x150], 0
mov rsi, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x238]
je 0x140041162
mov r8, qword [rsp + 0x140]
mov rcx, qword [0x140177e28]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rdx, qword [r15]
cmp rdx, 0xfe
jb 0x140041180
mov rax, qword [rsp + 0x38]
mov rdx, qword [rax + 8]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x48], rax
mov rax, rdx
sub rax, rdi
jb 0x140041213
movabs rcx, 0x3fffffffffffffff
and rax, rcx
mov rcx, qword [rsp + 0x330]
cmp rax, rcx
cmovae rax, rcx
test rax, rax
je 0x1400411d2
mov rcx, qword [rsp + 0x48]
lea rcx, [rcx + rdi*4]
xor edx, edx
nop dword [rax + rax]
mov r8d, dword [rcx + rdx*4]
cmp r8d, dword [rsi + rdx*4]
jne 0x1400411d6
inc rdx
cmp rax, rdx
jne 0x1400411c0
xor eax, eax
jmp 0x1400411df
mov dword [rcx + rdx*4], 0xfffd
mov al, 1
movaps xmm6, xmmword [rsp + 0x2b0]
add rsp, 0x2c8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, str.assertion_failed:_end___len
lea r8, [0x140139a38]
mov edx, 0x1c
call fcn.140113740
lea r8, [0x140139830]
mov rcx, rdi
call fcn.1401135b0
lea rcx, str.assertion_failed:_index___len
lea r8, [0x140139a70]
mov edx, 0x1d
call fcn.140113740
int3