Function at 0x140019460
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
sub rsp, 0x460
mov rax, qword [0x140053010]
xor rax, rsp
mov qword [rsp + 0x450], rax
cmp dword [rcx + 0x3c], 0
mov rbx, rcx
jne 0x1400196f6
mov dword [rcx + 0x3c], 1
lea rcx, str.HPProfiler.dll
mov qword [rsp + 0x478], rsi
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
xor esi, esi
mov qword [rbx + 8], rax
test rax, rax
jne 0x1400195fb
lea rcx, str.HPProfiler.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [rbx + 8], rax
test rax, rax
jne 0x1400195fb
lea rdx, [rsp + 0x40]
mov r8d, 0x208
xor ecx, ecx
mov dword [rsp + 0x30], esi
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140019581
lea rcx, [rsp + 0x40]
call fcn.140024ce4
lea rdx, [0x140046e98]
mov rcx, rax
call fcn.140024230
test rax, rax
jne 0x140019581
lea rax, [rsp + 0x30]
lea r9, [rsp + 0x40]
lea r8d, [rsi + 1]
mov qword [rsp + 0x28], rax
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], 0x410
call qword [sym.imp.WINSPOOL.DRV_GetPrinterDriverDirectoryW]
test eax, eax
je 0x1400195fb
lea rcx, [rsp + 0x40]
or rax, 0xffffffffffffffff
cmp word [rcx + rax*2 + 2], si
lea rax, [rax + 1]
jne 0x140019540
cmp word [rsp + rax*2 + 0x3e], 0x5c
je 0x140019569
lea r8, [0x140046e94]
lea rcx, [rsp + 0x40]
mov edx, 0x208
call fcn.140024458
lea r8, [0x140046eb0]
lea rcx, [rsp + 0x40]
mov edx, 0x208
call fcn.140024458
jmp 0x1400195d6
mov ecx, 1
mov qword [rsp + 0x480], rdi
call fcn.140019280
mov rdi, rax
test rax, rax
je 0x1400195b6
lea rcx, [rsp + 0x40]
mov r8, rax
mov edx, 0x208
call fcn.140024568
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
lea rcx, [rsp + 0x40]
mov edx, 0x5c
call fcn.140024180
mov rdi, qword [rsp + 0x480]
test rax, rax
je 0x1400195fb
mov word [rax + 2], si
lea r8, str.HPProfiler.dll
lea rcx, [rsp + 0x40]
mov edx, 0x208
call fcn.140024458
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [rbx + 8], rax
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x1400196ee
lea rdx, str.UseLogger
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1400196ee
call rax
test eax, eax
je 0x1400196ee
mov rcx, qword [rbx + 8]
lea rdx, str.LogTrace
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx + 8]
lea rdx, str.ProfileScopeBegin
mov qword [rbx + 0x10], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx + 8]
lea rdx, str.ProfileScopeEnd
mov qword [rbx + 0x18], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx + 8]
lea rdx, str.AttachLogger
mov qword [rbx + 0x20], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx + 8]
lea rdx, str.DetachLogger
mov qword [rbx + 0x30], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbx + 0x28], rax
cmp qword [rbx + 0x10], rsi
je 0x1400196ee
cmp qword [rbx + 0x18], rsi
je 0x1400196ee
cmp qword [rbx + 0x20], rsi
je 0x1400196ee
cmp qword [rbx + 0x30], rsi
je 0x1400196ee
test rax, rax
je 0x1400196ee
xor ecx, ecx
call fcn.140019280
mov qword [rbx + 0x50], rax
test rax, rax
je 0x1400196e7
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rbx + 0x48], rax
test rax, rax
je 0x1400196d9
mov rcx, rax
call qword [rbx + 0x30]
mov dword [rbx + 0x40], eax
mov rcx, qword [rbx + 0x50]
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov qword [rbx + 0x50], rsi
mov dword [rbx + 0x38], 1
mov rsi, qword [rsp + 0x478]
mov eax, dword [rbx + 0x38]
mov rcx, qword [rsp + 0x450]
xor rcx, rsp
call fcn.140023790
add rsp, 0x460
pop rbx
ret