Function at 0x18001d160
Capabilities:
Link many functions at runtime

Disassembly:
mov r11, rsp
push rdi
sub rsp, 0x60
mov qword [r11 - 0x28], 0xfffffffffffffffe
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rsi
lea rax, [0x1800e249c]
mov qword [r11 + 8], rax
mov eax, 1
xchg dword [0x1800e249c], eax
xor esi, esi
test eax, eax
je 0x18001d27d
mov ecx, esi
mov dword [rsp + 0x50], ecx
lea rdx, [0x180008450]
mov qword [r11 - 0x10], rdx
lea ebx, [rsi + 3]
nop dword [rax]
mov eax, ecx
test ecx, ecx
je 0x18001d22b
sub eax, 1
je 0x18001d212
sub eax, 1
je 0x18001d202
sub eax, 1
je 0x18001d1d5
cmp eax, 1
jne 0x18001d260
call rdx
jmp 0x18001d260
mov dword [rsp + 0x50], esi
call fcn.180007350
test eax, eax
jne 0x18001d1ec
mov dword [rsp + 0x50], 4
jmp 0x18001d260
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x4c], 1
mov dword [rsp + 0x50], 1
jmp 0x18001d260
add dword [rsp + 0x4c], 0xffffffff
cmove ecx, ebx
mov dword [rsp + 0x50], ecx
call rdx
jmp 0x18001d260
pause
add dword [rsp + 0x48], 0xffffffff
jne 0x18001d260
mov eax, dword [rsp + 0x4c]
neg eax
sbb ecx, ecx
add ecx, ebx
mov dword [rsp + 0x50], ecx
jmp 0x18001d260
mov dword [rsp + 0x50], esi
call fcn.180007350
test eax, eax
jne 0x18001d242
mov dword [rsp + 0x50], 4
jmp 0x18001d256
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x4c], 1
mov dword [rsp + 0x50], 1
lea rcx, [rsp + 0x48]
call fcn.180007150
mov eax, 1
xchg dword [0x1800e249c], eax
test eax, eax
je 0x18001d27d
mov rdx, qword [rsp + 0x58]
mov ecx, dword [rsp + 0x50]
jmp 0x18001d1b0
cmp qword [0x1800e2588], 0
jne 0x18001d3f2
mov ecx, 0x30
call sub.msvcrt.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov rbx, rax
test rax, rax
je 0x18001d396
xor edx, edx
mov r8d, 0x800
lea rcx, str.advapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov rdi, rax
test rax, rax
jne 0x18001d2e6
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x18001d38d
lea rcx, str.advapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rdi, rax
test rax, rax
je 0x18001d38d
lea rdx, str.RegisterTraceGuidsW
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.180007f70
mov qword [rbx], rax
lea rdx, str.UnregisterTraceGuids
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.180007f70
mov qword [rbx + 8], rax
lea rdx, str.TraceEvent
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.180007f70
mov qword [rbx + 0x10], rax
lea rdx, str.GetTraceLoggerHandle
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.180007f70
mov qword [rbx + 0x18], rax
lea rdx, str.GetTraceEnableLevel
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.180007f70
mov qword [rbx + 0x20], rax
lea rdx, str.GetTraceEnableFlags
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call fcn.180007f70
mov qword [rbx + 0x28], rax
mov qword [0x1800e2588], rbx
jmp 0x18001d3a0
mov qword [0x1800e2588], rsi
mov rbx, rsi
mov rbx, qword [rbx]
xor ecx, ecx
call fcn.180007f70
cmp rbx, rax
je 0x18001d3f2
mov rcx, rbx
call fcn.180007f70
lea rcx, [0x1800e2570]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x28], rsi
lea rcx, [0x18003f0d0]
mov qword [rsp + 0x20], rcx
mov r9d, 7
lea r8, [0x180033130]
xor edx, edx
lea rcx, [0x18001cf90]
call rax
nop
mov dword [0x1800e249c], esi
mov rbx, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
add rsp, 0x60
pop rdi
ret