Function at 0x1800016c0
Capabilities:
Acquire debug privileges

Disassembly:
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rdi, rcx
call fcn.1800254e0
cmp qword [0x180033c50], 0
jne 0x1800010ed
mov ecx, 1
call fcn.1800251fc
mov qword [0x180033c50], rax
xor esi, esi
mov qword [rsp + 0x30], rbx
cmp qword [0x180033c70], rsi
jne 0x180001135
lea ecx, [rsi + 0x40]
call fcn.1800251fc
mov rbx, rax
test rax, rax
je 0x18000112e
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea r11, [rbx + 0x28]
mov qword [0x180033c70], rbx
mov qword [r11], r11
mov qword [r11 + 8], r11
mov dword [r11 + 0x10], esi
jmp 0x180001135
mov qword [0x180033c70], rsi
cmp qword [0x180033c58], rsi
jne 0x180001184
mov ecx, 0x30
call fcn.1800251fc
mov rbx, rax
test rax, rax
je 0x18000117d
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
mov qword [rax + 0x18], rsi
mov qword [rax + 0x28], rsi
mov qword [rax + 0x20], rsi
mov dword [rax + 0x10], esi
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbx], rax
mov qword [0x180033c58], rbx
jmp 0x180001184
mov qword [0x180033c58], rsi
cmp qword [0x180033c60], rsi
jne 0x1800011b4
mov ecx, 0x38
call fcn.1800251fc
test rax, rax
je 0x1800011ad
mov rcx, rax
call fcn.180009d40
mov qword [0x180033c60], rax
jmp 0x1800011b4
mov qword [0x180033c60], rsi
cmp qword [0x180033c88], rsi
jne 0x1800011ef
mov ecx, 8
call fcn.1800251fc
mov rbx, rax
test rax, rax
je 0x1800011e8
lea rcx, [0x180006160]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov qword [0x180033c88], rbx
mov qword [rbx], rax
jmp 0x1800011ef
mov qword [0x180033c88], rsi
cmp qword [0x180033c68], rsi
jne 0x18000121d
mov ecx, 0x1994
call fcn.1800251fc
test rax, rax
je 0x180001216
mov dword [rax + 0x1990], esi
mov qword [0x180033c68], rax
jmp 0x18000121d
mov qword [0x180033c68], rsi
cmp qword [0x180033c78], rsi
jne 0x180001272
mov ecx, 0x690
call fcn.1800251fc
test rax, rax
je 0x18000126b
lea rcx, [rax + 8]
mov edx, 0x20
nop
mov dword [rcx - 8], 0xffffffff
mov qword [rcx - 4], rsi
add rcx, 0x34
dec rdx
jne 0x180001240
mov qword [rax + 0x680], rsi
mov qword [rax + 0x688], rsi
mov qword [0x180033c78], rax
jmp 0x180001272
mov qword [0x180033c78], rsi
cmp qword [0x180033c80], rsi
jne 0x1800012c8
mov ecx, 0x2038
call fcn.1800251fc
mov rbx, rax
test rax, rax
je 0x1800012c1
lea rcx, [rax + 0x2010]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
xor edx, edx
mov r8d, 0x2000
mov rcx, rbx
call fcn.1800252b0
mov qword [rbx + 0x2000], rsi
mov qword [rbx + 0x2008], rsi
mov qword [0x180033c80], rbx
jmp 0x1800012c8
mov qword [0x180033c80], rsi
mov rcx, rdi
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp 0x1800016c0
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
mov rbx, qword [0x180033c58]
xor esi, esi
mov rdi, rcx
test rbx, rbx
jne 0x18000171f
lea ecx, [rsi + 0x30]
call fcn.1800251fc
mov rbx, rax
test rax, rax
je 0x180001715
lea edx, [rsi + 1]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x28], rsi
mov qword [rax + 0x20], rsi
mov dword [rax + 0x10], esi
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbx], rax
jmp 0x180001718
mov rbx, rsi
mov qword [0x180033c58], rbx
lea rcx, str.SeDebugPrivilege
mov qword [rbx + 8], rdi
call fcn.18001d0e0
lea rcx, str.SeTcbPrivilege
call fcn.18001d0e0
mov rbx, qword [0x180033c70]
test rbx, rbx
jne 0x18000177b
lea ecx, [rbx + 0x40]
call fcn.1800251fc
mov rbx, rax
test rax, rax
je 0x180001771
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea r11, [rbx + 0x28]
mov qword [r11], r11
mov qword [r11 + 8], r11
mov dword [r11 + 0x10], esi
jmp 0x180001774
mov rbx, rsi
mov qword [0x180033c70], rbx
lea r9, [0x180001850]
lea r8, str.bootProc
lea rdx, [0x1800377e0]
mov rcx, rbx
mov qword [rsp + 0x20], rsi
call fcn.180024e40
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret