Function at 0x140019bf4
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 0x140019c27
mov edx, 0
mov ecx, 0x57
call sym.__MCF_win32_error_p
jmp 0x140019e82
mov rax, qword [rbp + 0x18]
sub rax, 1
and rax, qword [rbp + 0x18]
test rax, rax
je 0x140019c4c
mov edx, 0
mov ecx, 0x32
call sym.__MCF_win32_error_p
jmp 0x140019e82
cmp qword [rbp + 0x18], 0xfffffff
jbe 0x140019c6a
mov edx, 0
mov ecx, 0x32
call sym.__MCF_win32_error_p
jmp 0x140019e82
cmp qword [rbp + 0x28], 0x7fefffff
jbe 0x140019c88
mov edx, 0
mov ecx, 0x216
call sym.__MCF_win32_error_p
jmp 0x140019e82
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 0x140019ce5
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 0x140019d10
mov edx, 0
mov ecx, 8
call sym.__MCF_win32_error_p
jmp 0x140019e82
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 0x140019e07
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 0x140019de5
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 0x140019dbc
lea rax, str._MCF_thread_new_aligned
mov rcx, rax
call sym.__MCF_runtime_failure
mov rax, qword [0x1400d2450]
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 0x140019e07
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 0x140019e61
mov rax, qword [rbp - 0x20]
mov rcx, rax
call sym.__MCF_mfree
mov eax, 0
jmp 0x140019e82
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