Function at 0x140040a10
Capabilities:
Create thread
Load ntoskrnl

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r12
push rbp
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [0x1401470c0]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov r14, rcx
xor r15d, r15d
mov rax, qword [0x14019bcd0]
test rax, rax
jne 0x140040cb9
cmp word [0x14019bd78], r15w
jne 0x140040cb9
cmp qword [0x14019bd70], r15
jne 0x140040cb9
mov r8b, 1
lea rdx, [0x1401257e0]
call fcn.1400401f0
mov dword [0x14019bd7c], eax
mov ecx, 0xfff
and ax, cx
mov word [0x14019bd78], ax
xor edx, edx
lea r8d, [r15 + 1]
lea rcx, [0x1401257d0]
call qword [sym.imp.kernel32.dll_LoadLibraryExA]
mov qword [0x14019bd70], rax
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x30], xmm1
mov qword [rbp - 0x20], r15
mov rbx, qword [0x14019bc90]
mov rbx, qword [rbx]
cmp byte [rbx + 0x19], r15b
jne 0x140040bdf
lea r12, [0x140040cf0]
nop dword [rax]
nop dword [rax + rax]
mov rsi, qword [rbx + 0x20]
mov rdi, qword [rbx + 0x28]
mov ecx, 0x20
call fcn.14010750c
mov qword [rax], rdi
mov qword [rax + 8], rsi
mov qword [rax + 0x10], r14
mov qword [rax + 0x18], r12
mov qword [rbp - 0x18], rax
lea rcx, [rbp - 0x38]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], r15d
mov r9, rax
lea r8, [0x1400421a0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ucrtbase.dll__beginthreadex]
mov qword [rbp - 0x40], rax
test rax, rax
je 0x140040bcf
mov rdx, qword [rbp - 0x28]
cmp rdx, qword [rbp - 0x20]
je 0x140040b5b
xorps xmm0, xmm0
movaps xmm1, xmmword [rbp - 0x40]
movdqa xmmword [rbp - 0x40], xmm0
movups xmmword [rdx], xmm1
mov rdi, qword [rbp - 0x28]
add rdi, 0x10
mov qword [rbp - 0x28], rdi
jmp 0x140040b6c
lea r8, [rbp - 0x40]
lea rcx, [rbp - 0x30]
call fcn.140041f00
mov rdi, qword [rbp - 0x28]
cmp dword [rbp - 0x38], 0
jne 0x140040bc8
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
je 0x140040b9e
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x140040b99
cmp rbx, qword [rax + 0x10]
jne 0x140040b99
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x140040b86
mov rbx, rax
jmp 0x140040bbc
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
jne 0x140040bbc
nop word [rax + rax]
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
je 0x140040bb0
cmp byte [rbx + 0x19], 0
je 0x140040ae0
jmp 0x140040be3
call qword [sym.imp.ucrtbase.dll_terminate]
nop
mov dword [rbp - 0x38], r15d
mov ecx, 6
call qword [sym.imp.msvcp140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
nop
mov rdi, qword [rbp - 0x28]
mov rbx, qword [rbp - 0x30]
cmp rbx, rdi
je 0x140040c37
nop dword [rax]
cmp dword [rbx + 8], 0
je 0x140040c9e
call qword [sym.imp.msvcp140.dll_long_int___cdecl_Concurrency::details::platform::GetCurrentThreadId_void_]
cmp dword [rbx + 8], eax
je 0x140040c92
movups xmm0, xmmword [rbx]
movaps xmmword [rbp - 0x40], xmm0
xor edx, edx
lea rcx, [rbp - 0x40]
call qword [sym.imp.msvcp140.dll__Thrd_join]
test eax, eax
jne 0x140040c86
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
add rbx, 0x10
cmp rbx, rdi
jne 0x140040bf0
mov rdi, qword [rbp - 0x28]
mov rbx, qword [rbp - 0x30]
test rbx, rbx
je 0x140040cb9
mov rax, rbx
cmp rbx, rdi
je 0x140040c53
cmp dword [rax + 8], 0
jne 0x140040caa
add rax, 0x10
cmp rax, rdi
jne 0x140040c44
mov rdx, qword [rbp - 0x20]
sub rdx, rbx
and rdx, 0xfffffffffffffff0
mov rax, rbx
cmp rdx, 0x1000
jb 0x140040cb1
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140040cb1
call qword [sym.imp.ucrtbase.dll__invalid_parameter_noinfo_noreturn]
nop
mov ecx, 2
call qword [sym.imp.msvcp140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
int3
mov ecx, 5
call qword [sym.imp.msvcp140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
int3
mov ecx, 1
call qword [sym.imp.msvcp140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
nop
call qword [sym.imp.ucrtbase.dll_terminate]
int3
mov rcx, rbx
call fcn.140107550
mov rax, r14
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.140107250
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret