Function at 0x140005980
Capabilities:
Create thread
Load ntoskrnl

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov r15, rcx
xor r12d, r12d
mov rax, qword [0x1401dd770]
test rax, rax
jne 0x140005c21
cmp word [0x1401dde40], r12w
jne 0x140005c21
cmp qword [0x1401dde38], r12
jne 0x140005c21
mov r8b, 1
lea rdx, str.NtShutdownSystem
call fcn.140005090
mov dword [0x1401dde44], eax
mov ecx, 0xfff
and ax, cx
mov word [0x1401dde40], ax
xor edx, edx
lea r8d, [r12 + 1]
lea rcx, [0x1400e3c70]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov qword [0x1401dde38], rax
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x40], xmm0
mov r14d, r12d
mov qword [rsp + 0x50], r12
mov rbx, qword [0x1401dd8e8]
mov rbx, qword [rbx]
mov rbp, qword [rsp + 0x48]
cmp byte [rbx + 0x19], r12b
jne 0x140005b36
lea r13, [0x140005c50]
nop dword [rax]
mov rsi, qword [rbx + 0x20]
mov rdi, qword [rbx + 0x28]
mov ecx, reloc.WLDAP32.dll_Ordinal_32
call fcn.1400cfd64
mov qword [rax], rdi
mov qword [rax + 8], rsi
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], r13
mov qword [rsp + 0x98], rax
lea rcx, [rsp + 0x38]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], r12d
mov r9, rax
lea r8, [0x140007400]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [rsp + 0x30], rax
test rax, rax
je 0x140005bda
cmp rbp, r14
je 0x140005abc
xorps xmm0, xmm0
movaps xmm1, xmmword [rsp + 0x30]
movdqa xmmword [rsp + 0x30], xmm0
movups xmmword [rbp], xmm1
add rbp, 0x10
mov qword [rsp + 0x48], rbp
jmp 0x140005ad8
lea r8, [rsp + 0x30]
mov rdx, rbp
lea rcx, [rsp + 0x40]
call fcn.140006ef0
mov r14, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x48]
cmp dword [rsp + 0x38], 0
jne 0x140005bd3
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
je 0x140005b0f
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x140005b0a
cmp rbx, qword [rax + 0x10]
jne 0x140005b0a
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x140005af7
mov rbx, rax
jmp 0x140005b2c
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
jne 0x140005b2c
nop dword [rax + rax]
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
je 0x140005b20
cmp byte [rbx + 0x19], 0
je 0x140005a40
mov rdi, qword [rsp + 0x40]
mov rbx, rdi
cmp rdi, rbp
je 0x140005b84
cmp dword [rbx + 8], 0
je 0x140005c03
call qword [sym.imp.MSVCP140.dll__Thrd_id]
cmp dword [rbx + 8], eax
je 0x140005bf7
movups xmm0, xmmword [rbx]
movaps xmmword [rsp + 0x30], xmm0
xor edx, edx
lea rcx, [rsp + 0x30]
call qword [sym.imp.MSVCP140.dll__Thrd_join]
test eax, eax
jne 0x140005beb
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
add rbx, 0x10
cmp rbx, rbp
jne 0x140005b43
test rdi, rdi
je 0x140005c21
mov rax, rdi
cmp rdi, rbp
je 0x140005ba4
cmp dword [rax + 8], 0
jne 0x140005c0f
add rax, 0x10
cmp rax, rbp
jne 0x140005b95
sub r14, rdi
and r14, 0xfffffffffffffff0
mov rax, rdi
cmp r14, 0x1000
jb 0x140005c16
add r14, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140005c16
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_terminate]
nop
mov dword [rsp + 0x38], r12d
mov ecx, 6
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
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.api_ms_win_crt_runtime_l1_1_0.dll_terminate]
int3
mov rdx, r14
mov rcx, rdi
call fcn.1400cfda8
mov rax, r15
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret