Function at 0x1400403b0
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 0x140040408
mov rdx, qword [r14 + 0x50]
jmp 0x14004040c
lea rdx, [r14 + 0x50]
xor eax, eax
cmp rcx, 2
cmovne rax, rdx
cmp qword [r14 + 0xf0], 0
jne 0x140040434
mov rsi, qword [r14 + 0xf8]
cmp qword [r14 + 8], 0
je 0x140040442
lea rbx, [r14 + 0x10]
jmp 0x140040446
lea rsi, [r14 + 0xf8]
cmp qword [r14 + 8], 0
jne 0x14004042e
mov rbx, qword [r14 + 0x10]
mov rdx, qword [rsp + 0x330]
movzx edi, byte [r14]
cmp ecx, 2
mov qword [rsp + 0x238], r8
jne 0x140040463
xor ecx, ecx
jmp 0x14004046a
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 0x1400404bb
mov r12, qword [rbx]
mov r15, qword [rbx + 8]
mov rdi, qword [rbx + 0x18]
mov rbx, qword [rbx + 0x20]
jmp 0x1400404cb
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.1400434e0
lea rcx, [rsp + 0x70]
mov r8d, 0xd0
mov rdx, r15
call sub.VCRUNTIME140.dll_memcpy
cmp qword [r14 + 0x130], 0
jne 0x14004063c
mov rax, qword [r14 + 0x138]
jmp 0x140040643
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 rdi, [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], rdi
cmp eax, 0x110000
jne 0x140040900
nop word [rax + rax]
mov rax, qword [rsp + 0xb8]
lea rcx, [rsp + 0x74]
mov r8, rax
cmp rax, 0x12
jb 0x1400406e3
mov r8, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x80]
mov rdx, qword [rsp + 0x118]
cmp rdx, r8
jae 0x140040730
mov ecx, dword [rcx + rdx*4]
inc rdx
mov qword [rsp + 0x118], rdx
cmp rax, 0x12
jb 0x1400407d0
cmp rdx, qword [rsp + 0x78]
jne 0x1400407f5
mov rax, qword [rsp + 0x78]
lea r8, [rsp + 0x78]
jmp 0x1400407dd
mov ebx, dword [rsp + 0x128]
mov r13, qword [rsp + 0x12c]
mov dword [rsp + 0x128], 0x110000
cmp ebx, 0x110000
je 0x14004115e
cmp ebx, dword [rsp + 0x15c]
jb 0x140040769
cmp r13d, 2
jae 0x140040815
lea rcx, [rsp + 0x168]
lea rdx, [rsp + 0x70]
call fcn.140043da0
mov eax, dword [rsp + 0x168]
cmp eax, 0x110000
je 0x140041035
mov edx, dword [rsp + 0x16c]
mov ecx, dword [rsp + 0x170]
cmp eax, dword [rsp + 0x15c]
jae 0x140040893
mov dword [rsp + 0x128], eax
mov dword [rsp + 0x12c], edx
mov dword [rsp + 0x130], ecx
jmp 0x140041035
lea r8, [rsp + 0xb8]
cmp rdx, rax
jne 0x1400407f5
test rax, rax
je 0x1400407e9
mov qword [r8], 0
mov qword [rsp + 0x118], 0
mov ebx, ecx
and ebx, 0xffffff
cmp ecx, 0xffffff
ja 0x140041041
mov dword [rsp + 0x158], ebx
jmp 0x140040900
bt r13, 0x20
jb 0x140040905
cmp r13d, 0x10000
jb 0x140040905
test r13w, r13w
je 0x140040769
movzx eax, r13w
cmp eax, 1
je 0x140040905
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 0x140040905
lea edx, [rbx - 0xfb4f]
cmp edx, 0xffffffcd
ja 0x140040905
or al, cl
jne 0x140040769
jmp 0x140040905
mov r8d, edx
and r8d, 0xffffff00
cmp r8d, 0xd800
sete r8b
lea r9d, [rdx - 1]
cmp r9d, 2
setb r9b
or r9b, r8b
je 0x1400408d0
mov dword [rsp + 0x128], eax
mov dword [rsp + 0x12c], edx
mov dword [rsp + 0x130], ecx
jmp 0x140040905
lea r8d, [rdx - 0x11c3]
mov dword [rsp + 0x128], eax
mov dword [rsp + 0x12c], edx
mov dword [rsp + 0x130], ecx
cmp r8d, 0xffffff9e
jae 0x140040905
jmp 0x140041035
xor r13d, r13d
xor ebx, ebx
xor esi, esi
mov edx, ebx
xor ebx, ebx
jmp 0x140040926
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 0x1400409c0
lea rcx, [rsp + 0x70]
mov r8d, r13d
call fcn.1400434e0
mov r13d, eax
mov rbp, qword [rsp + 0x140]
mov r15, qword [rsp + 0x148]
test sil, 1
je 0x1400409e0
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 0x140040fb8
lea rcx, [rsp + 0x168]
mov edx, ebx
mov r8d, r13d
call fcn.14003c5e0
cmp eax, 0x110000
jne 0x1400409e3
jmp 0x140041026
mov rbp, qword [rsp + 0x140]
mov r15, qword [rsp + 0x148]
jmp 0x1400409e3
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 0x140040a3d
inc rdi
mov qword [rsp + 0x118], rdi
mov ebx, edx
cmp rdi, rsi
jae 0x140040c80
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 0x140040ab0
cmp edx, 0x10000
jae 0x140040af0
mov edx, r12d
lea rcx, [rsp + 0x168]
call fcn.14003c0b0
cmp eax, 1
je 0x140040b37
jmp 0x140040c10
cmp eax, 0x15
jae 0x140040b60
lea ecx, [rbx - 0x1100]
cmp ecx, 0x13
jae 0x140040c10
imul ecx, ecx, 0x24c
lea edx, [rax + rax*8]
lea edx, [rdx + rdx*2]
add edx, eax
add edx, ecx
add edx, 0xac00
jmp 0x140040a30
shr edx, 0xa
add edx, 0xffffd7c0
lea rcx, [rsp + 0x168]
call fcn.14003c0b0
or eax, 2
cmp eax, 3
jne 0x140040c10
mov edx, r12d
and edx, 0x3ff
or edx, 0xdc00
lea rcx, [rsp + 0x168]
call fcn.14003c0b0
cmp eax, 1
jne 0x140040c10
cmp ebx, 0x10000
jae 0x140040bb0
mov edx, ebx
lea rcx, [rsp + 0x168]
call fcn.14003c0b0
cmp eax, 2
je 0x140040bf0
jmp 0x140040c10
lea eax, [rdx - 0x11a8]
cmp eax, 0x1b
jae 0x140040c10
lea eax, [rbx - 0xac00]
cmp eax, 0x2ba3
ja 0x140040c10
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 0x140040c10
add edx, ebx
add edx, 0xffffee59
jmp 0x140040a30
mov edx, ebx
shr edx, 0xa
add edx, 0xffffd7c0
lea rcx, [rsp + 0x168]
call fcn.14003c0b0
or eax, 2
cmp eax, 3
jne 0x140040c10
mov edx, ebx
and edx, 0x3ff
or edx, 0xdc00
lea rcx, [rsp + 0x168]
call fcn.14003c0b0
cmp eax, 2
jne 0x140040c10
mov eax, edx
xor eax, 0xd800
add eax, 0xffef0000
cmp eax, 0xffef07ff
jbe 0x140040c10
cmp edx, 0x110000
jne 0x140040a30
nop
cmp r14, 0x12
jb 0x140040c30
lea rax, [rsp + 0x78]
mov rcx, qword [rsp + 0x28]
cmp rcx, rdi
jae 0x140040c44
jmp 0x14004125b
mov rcx, r14
lea rax, [rsp + 0xb8]
cmp r14, rdi
jb 0x14004125b
mov qword [rax], 0
mov rsi, rcx
sub rsi, rdi
je 0x140040d1c
mov r15, rbx
mov rbx, qword [rsp + 0xb8]
cmp rbx, 0x12
jb 0x140040ccf
mov rbx, qword [rsp + 0x78]
lea rax, [rsp + 0x78]
cmp rdi, rbx
jne 0x140040cde
jmp 0x140040d16
cmp r14, 0x12
mov rax, qword [rsp + 0x28]
cmovb rax, r14
test rax, rax
je 0x140040caf
xor eax, eax
cmp r14, 0x12
setb al
shl eax, 6
mov qword [rsp + rax + 0x78], 0
mov r14, qword [rsp + 0xb8]
mov rdi, qword [rsp + 0x20]
mov qword [rsp + 0x118], 0
cmp r14, 0x12
jae 0x140040f50
jmp 0x140040f55
lea rax, [rsp + 0x74]
mov qword [rsp + 0x40], rax
cmp rdi, rbx
je 0x140040d0e
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 0x140040d16
lea rax, [rsp + 0xb8]
mov qword [rax], rcx
mov rbx, r15
mov qword [rsp + 0x118], 0
cmp r12d, 0x1000000
jb 0x140041030
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 0x140040db9
inc rsi
mov r12d, ebx
mov rbx, rdi
cmp rsi, r14
jae 0x140040f40
mov r13d, dword [r15 + rsi*4]
cmp r13d, 0x1000000
jb 0x140041030
mov rdi, rbx
mov ebx, r13d
shr ebx, 0x18
cmp r12b, bl
je 0x140040db0
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 0x140040e4e
shr edx, 0xa
add edx, 0xffffd7c0
lea rcx, [rsp + 0x168]
call fcn.14003c0b0
or eax, 2
cmp eax, 3
jne 0x140040db0
and r13d, 0x3ff
or r13d, 0xdc00
lea rcx, [rsp + 0x168]
mov edx, r13d
call fcn.14003c0b0
cmp eax, 1
jne 0x140040db0
mov rax, rdi
mov edx, eax
cmp eax, 0x10000
jb 0x140040e96
lea rcx, [rsp + 0x168]
mov edx, dword [rsp + 0x40]
call fcn.14003c0b0
or eax, 2
mov ecx, dword [rsp + 0x54]
mov edx, ecx
cmp eax, 3
jne 0x140040db0
lea rcx, [rsp + 0x168]
call fcn.14003c0b0
cmp eax, 2
jne 0x140040db0
mov eax, edx
xor eax, 0xd800
add eax, 0xffef0000
cmp eax, 0xffef07ff
jbe 0x140040db0
cmp edx, 0x110000
je 0x140040db0
mov rcx, qword [rsp + 0x68]
cmp rcx, 0x12
mov r9, qword [rsp + 0x248]
cmovb r9, rcx
cmp r9, rsi
jbe 0x140041282
xor eax, eax
cmp rcx, 0x12
setb al
lea rcx, [rsp + 0x74]
mov r8, qword [rsp + 0x240]
cmovb r8, rcx
shl eax, 6
lea rcx, [r9 - 1]
mov qword [rsp + rax + 0x78], rcx
lea rcx, [r8 + rsi*4]
lea rax, [r8 + rsi*4]
add rax, 4
mov r8, rsi
not r8
add r8, r9
shl r8, 2
mov edi, edx
mov rdx, rax
call sub.VCRUNTIME140.dll_memmove
mov ebx, edi
jmp 0x140040d3e
mov rdi, qword [rsp + 0x20]
mov r14, qword [rsp + 0x68]
cmp r14, 0x12
jb 0x140040f55
mov r14, qword [rsp + 0x78]
test r14, r14
jne 0x140041035
mov edx, dword [rsp + 0x128]
cmp edx, 0x110000
je 0x140041035
cmp edx, dword [rsp + 0x15c]
jb 0x140041035
mov eax, dword [rsp + 0x12c]
lea ecx, [rax - 0x1161]
cmp ecx, 0x62
jb 0x140040910
mov ecx, eax
and ecx, 0xffffff00
cmp ecx, 0xd800
je 0x140040910
dec eax
cmp eax, 1
jbe 0x140040910
jmp 0x140041035
cmp eax, 0x15
jae 0x140040fe3
lea ecx, [rbx - 0x1100]
cmp ecx, 0x13
jae 0x140041026
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 0x1400409e3
lea eax, [r13 - 0x11a8]
cmp eax, 0x1b
jae 0x140041026
lea eax, [rbx - 0xac00]
cmp eax, 0x2ba3
ja 0x140041026
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 0x140041026
lea eax, [rbx + r13]
add eax, 0xffffee59
jmp 0x1400409e3
mov dword [rsp + 0x158], r13d
nop
mov rdi, qword [rsp + 0x20]
cmp ebx, 0x110000
je 0x140041156
cmp ebx, 0x7f
ja 0x140041080
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 0x140041088
jmp 0x1400410ff
cmp ebx, 0xfffd
je 0x1400410ff
mov r8, qword [rdi]
cmp r8, 0xfe
jb 0x1400410b0
mov rcx, qword [rsp + 0x38]
mov rax, qword [rcx + 8]
mov rcx, qword [rcx + 0x10]
mov rdx, qword [rsp + 0x60]
jmp 0x1400410c1
mov rax, r8
mov rcx, qword [rsp + 0x48]
mov rdx, rdi
mov r8d, 0xfd
cmp rax, r8
je 0x1400410e3
mov dword [rcx + rax*4], ebx
inc qword [rdx]
mov eax, dword [rsp + 0x158]
cmp eax, 0x110000
je 0x1400406c0
jmp 0x140040900
mov rsi, qword [rsp + 0x38]
mov rcx, rsi
call fcn.1400fa6e0
mov rax, qword [rsi + 8]
mov rcx, qword [rsi + 0x10]
mov rdx, qword [rsp + 0x60]
jmp 0x1400410c6
cmp qword [rsp + 0xb8], 0x12
jb 0x140041126
mov rsi, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
xor edx, edx
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp qword [rsp + 0x150], 0
je 0x14004123d
mov rsi, qword [rsp + 0x140]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
xor edx, edx
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x14004123d
mov rax, qword [rsp + 0xb8]
cmp rax, 0x12
jb 0x140041185
mov r14, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
xor edx, edx
mov r8, r14
mov rdi, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, rdi
cmp qword [rsp + 0x150], 0
mov rsi, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x238]
je 0x1400411c1
mov r14, qword [rsp + 0x140]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
xor edx, edx
mov r8, r14
mov rbx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rdx, qword [rbx]
cmp rdx, 0xfe
jb 0x1400411df
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 0x140041273
movabs rcx, 0x3fffffffffffffff
and rax, rcx
mov rcx, qword [rsp + 0x330]
cmp rax, rcx
cmovae rax, rcx
test rax, rax
je 0x140041232
mov rcx, qword [rsp + 0x48]
lea rcx, [rcx + rdi*4]
xor edx, edx
nop word [rax + rax]
mov r8d, dword [rcx + rdx*4]
cmp r8d, dword [rsi + rdx*4]
jne 0x140041236
inc rdx
cmp rax, rdx
jne 0x140041220
xor eax, eax
jmp 0x14004123f
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, [0x1401347f0]
mov edx, 0x1c
call fcn.1400f8090
lea r8, str..cargo_registry_srcindex.crates.io_6f17d22bba15001fidna_1.0.3_srcuts46.rsPunycode_overflows_should_not_be_possible_due_to_PUNYCODE_ENCODE_MAX_INPUT_LENGTH
mov rcx, rdi
call fcn.1400f7fd0
lea rcx, str.assertion_failed:_index___len
lea r8, [0x140134828]
mov edx, 0x1d
call fcn.1400f8090
int3