Function at 0x1400190f4
Capabilities:
Create thread

Disassembly:
push rbp
mov rbp, rsp
add rsp, 0xffffffffffffff80
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov qword [rbp + 0x28], r9
cmp qword [rbp + 0x10], 0
jne 0x140019127
mov edx, 0
mov ecx, 0x57
call sym.__MCF_win32_error_p
jmp 0x140019382
mov rax, qword [rbp + 0x18]
sub rax, 1
and rax, qword [rbp + 0x18]
test rax, rax
je 0x14001914c
mov edx, 0
mov ecx, 0x32
call sym.__MCF_win32_error_p
jmp 0x140019382
cmp qword [rbp + 0x18], 0xfffffff
jbe 0x14001916a
mov edx, 0
mov ecx, 0x32
call sym.__MCF_win32_error_p
jmp 0x140019382
cmp qword [rbp + 0x28], 0x7fefffff
jbe 0x140019188
mov edx, 0
mov ecx, 0x216
call sym.__MCF_win32_error_p
jmp 0x140019382
mov qword [rbp - 0x28], 0x10
mov rax, qword [rbp + 0x18]
mov qword [rbp - 0x30], rax
mov rdx, qword [rbp - 0x28]
mov rax, qword [rbp - 0x30]
cmp rdx, rax
cmovae rax, rdx
mov qword [rbp - 8], rax
mov rax, qword [rbp + 0x28]
add rax, 0x640
mov qword [rbp - 0x10], rax
mov rdx, qword [rbp - 0x10]
mov rax, qword [rbp - 8]
add rax, rdx
sub rax, 0x10
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x10]
cmp qword [rbp - 0x18], rax
jae 0x1400191e5
lea rax, str._MCF_thread_new_aligned
mov rcx, rax
call sym.__MCF_runtime_failure
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sym.__MCF_malloc_0
mov qword [rbp - 0x20], rax
cmp qword [rbp - 0x20], 0
jne 0x140019210
mov edx, 0
mov ecx, 8
call sym.__MCF_win32_error_p
jmp 0x140019382
mov rax, qword [rbp - 0x20]
mov qword [rbp - 0x38], rax
mov dword [rbp - 0x3c], 2
mov edx, dword [rbp - 0x3c]
mov rax, qword [rbp - 0x38]
mov dword [rax], edx
mov rax, qword [rbp - 0x20]
mov rdx, qword [rbp + 0x10]
mov qword [rax + 0x10], rdx
cmp qword [rbp + 0x28], 0
je 0x140019307
mov rax, qword [rbp - 0x20]
lea rdx, [rax + 0x640]
mov rax, qword [rbp - 0x20]
mov qword [rax + 0x18], rdx
mov rax, qword [rbp - 0x10]
cmp rax, qword [rbp - 0x18]
je 0x1400192e5
mov rax, qword [rbp - 0x20]
mov rax, qword [rax + 0x18]
lea rdx, [rax - 1]
mov rax, qword [rbp - 8]
sub rax, 1
or rax, rdx
add rax, 1
mov rdx, rax
mov rax, qword [rbp - 0x20]
mov qword [rax + 0x18], rdx
mov rax, qword [rbp - 0x20]
mov rax, qword [rax + 0x18]
mov rdx, rax
mov rax, qword [rbp + 0x28]
add rdx, rax
mov rax, qword [rbp - 0x20]
sub rdx, rax
mov qword [rbp - 0x18], rdx
mov rax, qword [rbp - 0x10]
cmp qword [rbp - 0x18], rax
jae 0x1400192bc
lea rax, str._MCF_thread_new_aligned
mov rcx, rax
call sym.__MCF_runtime_failure
mov rax, qword [0x14001f250]
mov rax, qword [rax]
mov rcx, qword [rbp - 0x18]
mov rdx, qword [rbp - 0x20]
mov r9, rcx
mov r8, rdx
mov edx, 0x10
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_HeapReAlloc]
call rax
cmp qword [rbp + 0x20], 0
je 0x140019307
mov rax, qword [rbp - 0x20]
mov rax, qword [rax + 0x18]
mov rcx, qword [rbp + 0x28]
mov rdx, qword [rbp + 0x20]
mov r8, rcx
mov rcx, rax
call sym.__MCF_mcopy
mov rdx, qword [rbp - 0x20]
lea rax, [rbp - 0x50]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
mov r9, rdx
lea r8, [sym.do_win32_thread_thunk]
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateThread]
call rax
mov rdx, qword [rbp - 0x20]
mov qword [rdx + 8], rax
mov rax, qword [rbp - 0x20]
mov rax, qword [rax + 8]
test rax, rax
jne 0x140019361
mov rax, qword [rbp - 0x20]
mov rcx, rax
call sym.__MCF_mfree
mov eax, 0
jmp 0x140019382
mov eax, dword [rbp - 0x50]
mov edx, eax
mov rax, qword [rbp - 0x20]
add rax, 4
mov qword [rbp - 0x48], rax
mov dword [rbp - 0x4c], edx
mov edx, dword [rbp - 0x4c]
mov rax, qword [rbp - 0x48]
mov dword [rax], edx
mov rax, qword [rbp - 0x20]
sub rsp, 0xffffffffffffff80
pop rbp
ret