Function at 0x405800
Capabilities:
Reference wmi statements

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x9a8]
sub rsp, 0xa80
mov qword [rbp + 0x78], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x0041f2d0]
xor rax, rsp
mov qword [rbp + 0x978], rax
mov r15, rdx
mov qword [rbp + 0xa0], rdx
xor r12d, r12d
mov dword [rsp + 0x6c], r12d
call qword [sym.imp.aif_core.dll_public:_static_void___cdecl_AIF::Core::Library::initialize_void_]
lea rcx, [rsp + 0x50]
call qword [sym.imp.aif_ogl.dll_public:_void___cdecl_AIF::OGL::Library::InitOptions::constructor_void____ptr64]
nop
mov rcx, rax
call qword [sym.imp.aif_ogl.dll_public:_static_void___cdecl_AIF::OGL::Library::initialize_class_AIF::OGL::Library::InitOptions_const____ptr64_]
nop
lea rcx, [rsp + 0x50]
call qword [sym.imp.aif_ogl.dll_public:_void___cdecl_AIF::OGL::Library::InitOptions::destructor_void____ptr64]
mov qword [r15], r12
mov qword [r15 + 8], r12
mov qword [r15 + 0x10], r12
mov dword [rsp + 0x6c], 1
mov qword [rbp + 0x108], r12
mov qword [rbp + 0x128], 0xf
mov qword [rbp + 0x120], r12
mov byte [rbp + 0x110], r12b
lea r8d, [r12 + 8]
lea rdx, str.DXGI.dll
lea rcx, [rbp + 0x110]
call fcn.004033a0
nop
mov qword [rbp + 0xd8], r12
mov qword [rbp + 0xf8], 0xf
mov qword [rbp + 0xf0], r12
mov byte [rbp + 0xe0], r12b
lea r8d, [r12 + 8]
lea rdx, str.D3D9.dll
lea rcx, [rbp + 0xe0]
call fcn.004033a0
nop
mov r14d, r12d
mov qword [rbp - 0x78], r12
mov rcx, qword [rbp + 0xd8]
test rcx, rcx
jne 0x405925
xor edx, edx
lea rcx, [rbp + 0xd8]
call fcn.00404e20
mov rcx, qword [rbp + 0xd8]
lea rdx, str.Direct3DCreate9Ex
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x405987
mov rcx, qword [rbp + 0x108]
test rcx, rcx
jne 0x405958
xor edx, edx
lea rcx, [rbp + 0x108]
call fcn.00404e20
mov rcx, qword [rbp + 0x108]
lea rdx, [0x004141d0]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x405987
mov qword [rbp - 0x58], r12
lea rdx, [rbp - 0x58]
lea rcx, [0x004141c0]
call rax
test eax, eax
js 0x405987
mov r14, qword [rbp - 0x58]
mov qword [rbp - 0x78], r14
mov r13, r12
mov qword [rbp - 0x80], r12
mov rcx, qword [rbp + 0xd8]
test rcx, rcx
jne 0x4059af
xor edx, edx
lea rcx, [rbp + 0xd8]
call fcn.00404e20
mov rcx, qword [rbp + 0xd8]
lea rdx, str.Direct3DCreate9
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x4059cf
mov ecx, 0x20
call rax
mov r13, rax
mov qword [rbp - 0x80], rax
mov edx, 2
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
jns 0x405a1e
lea rax, [0x00413d08]
mov qword [rbp + 0x10], rax
lea rdx, [rbp + 0x10]
lea rcx, [rbp + 0xc0]
call qword [sym.imp.MSVCR100.dll_public:_void___cdecl_std::exception::constructor_char_const__const___ptr64_const____ptr64____ptr64]
lea r11, vtable.std::runtime_error.0
mov qword [rbp + 0xc0], r11
lea rdx, [0x0041ad48]
lea rcx, [rbp + 0xc0]
call sub.MSVCR100.dll__CxxThrowException
nop
mov qword [rsp + 0x40], r12
mov dword [rsp + 0x38], r12d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
or edx, 0xffffffff
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitializeSecurity]
test eax, eax
jns 0x405a8d
lea rax, [0x00414198]
mov qword [rbp - 0x20], rax
lea rdx, [rbp - 0x20]
lea rcx, [rbp + 0x88]
call qword [sym.imp.MSVCR100.dll_public:_void___cdecl_std::exception::constructor_char_const__const___ptr64_const____ptr64____ptr64]
lea r11, vtable.std::runtime_error.0
mov qword [rbp + 0x88], r11
lea rdx, [0x0041ad48]
lea rcx, [rbp + 0x88]
call sub.MSVCR100.dll__CxxThrowException
int3
mov qword [rsp + 0x70], r12
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
lea r9, [0x00415f28]
xor edx, edx
lea r8d, [rdx + 5]
lea rcx, [0x00416080]
call qword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jns 0x405af8
lea rax, [0x00414180]
mov qword [rbp], rax
lea rdx, [rbp]
lea rcx, [rbp + 0xa8]
call qword [sym.imp.MSVCR100.dll_public:_void___cdecl_std::exception::constructor_char_const__const___ptr64_const____ptr64____ptr64]
lea r11, vtable.std::runtime_error.0
mov qword [rbp + 0xa8], r11
lea rdx, [0x0041ad48]
lea rcx, [rbp + 0xa8]
call sub.MSVCR100.dll__CxxThrowException
int3
mov rax, qword [rsp + 0x70]
mov qword [rbp - 0x10], rax
mov ecx, 0x18
call sub.MSVCR100.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov rbx, rax
mov qword [rsp + 0x78], rax
test rax, rax
je 0x405b43
mov qword [rax + 8], r12
mov dword [rax + 0x10], 1
lea rcx, str.ROOTCIMV2
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [rbx], rax
test rax, rax
jne 0x405b46
mov ecx, 0x8007000e
call fcn.0040f550
int3
mov rbx, r12
mov qword [rbp + 0x18], rbx
test rbx, rbx
jne 0x405b5a
mov ecx, 0x8007000e
call fcn.0040f550
nop
mov rcx, qword [rsp + 0x70]
mov rax, qword [rcx]
lea rdx, [rbp - 0x60]
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rbx]
call qword [rax + 0x18]
mov edi, eax
or ecx, 0xffffffff
lock xadd dword [rbx + 0x10], ecx
dec ecx
jne 0x405bbd
mov rcx, qword [rbx]
test rcx, rcx
je 0x405ba7
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x405bb5
call sub.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_
mov rcx, rbx
call sub.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_
test edi, edi
jns 0x405bf6
lea rax, str.pLoc__ConnectServer
mov qword [rbp - 0x30], rax
lea rdx, [rbp - 0x30]
lea rcx, [rbp + 0x20]
call qword [sym.imp.MSVCR100.dll_public:_void___cdecl_std::exception::constructor_char_const__const___ptr64_const____ptr64____ptr64]
lea r11, vtable.std::runtime_error.0
mov qword [rbp + 0x20], r11
lea rdx, [0x0041ad48]
lea rcx, [rbp + 0x20]
call sub.MSVCR100.dll__CxxThrowException
int3
mov rax, qword [rbp - 0x60]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x60], r12
mov ecx, 0x18
call sub.MSVCR100.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov rbx, rax
mov qword [rsp + 0x58], rax
test rax, rax
je 0x405c37
mov qword [rax + 8], r12
mov dword [rax + 0x10], 1
lea rcx, str.SELECT__FROM_Win32_VideoController
call fcn.0040f3c0
mov qword [rbx], rax
jmp 0x405c3a
mov rbx, r12
mov qword [rbp + 0x38], rbx
test rbx, rbx
jne 0x405c4e
mov ecx, 0x8007000e
call fcn.0040f550
nop
mov ecx, 0x18
call sub.MSVCR100.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov rdi, rax
mov qword [rsp + 0x58], rax
test rax, rax
je 0x405c81
mov qword [rax + 8], r12
mov dword [rax + 0x10], 1
lea rcx, [0x00414120]
call fcn.0040f3c0
mov qword [rdi], rax
jmp 0x405c84
mov rdi, r12
mov qword [rbp + 0x80], rdi
test rdi, rdi
jne 0x405c9b
mov ecx, 0x8007000e
call fcn.0040f550
nop
mov rcx, qword [rbp - 0x60]
mov rax, qword [rcx]
lea rdx, [rsp + 0x60]
mov qword [rsp + 0x28], rdx
mov qword [rsp + 0x20], r12
mov r9d, 0x30
mov r8, qword [rbx]
mov rdx, qword [rdi]
call qword [rax + 0xa0]
mov esi, eax
or ecx, 0xffffffff
lock xadd dword [rdi + 0x10], ecx
dec ecx
jne 0x405cf6
mov rcx, qword [rdi]
test rcx, rcx
je 0x405cdf
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x405ced
call sub.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_
mov rcx, rdi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_
nop
or eax, 0xffffffff
lock xadd dword [rbx + 0x10], eax
dec eax
jne 0x405d26
mov rcx, qword [rbx]
test rcx, rcx
je 0x405d10
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x405d1e
call sub.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_
mov rcx, rbx
call sub.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_
test esi, esi
jns 0x405d5f
lea rax, str.pSvc__ExecQuery
mov qword [rbp - 8], rax
lea rdx, [rbp - 8]
lea rcx, [rbp + 0x40]
call qword [sym.imp.MSVCR100.dll_public:_void___cdecl_std::exception::constructor_char_const__const___ptr64_const____ptr64____ptr64]
lea r11, vtable.std::runtime_error.0
mov qword [rbp + 0x40], r11
lea rdx, [0x0041ad48]
lea rcx, [rbp + 0x40]
call sub.MSVCR100.dll__CxxThrowException
int3
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x406004
mov qword [rbp + 8], rcx
mov qword [rbp - 0x70], r12
mov dword [rsp + 0x68], r12d
mov rax, qword [rcx]
lea rdx, [rsp + 0x68]
mov qword [rsp + 0x20], rdx
lea r9, [rbp - 0x70]
mov r8d, 1
or edx, 0xffffffff
call qword [rax + 0x20]
test eax, eax
js 0x405fcf
mov rdx, qword [rbp - 0x70]
test rdx, rdx
je 0x405fbe
mov qword [rbp - 0x18], rdx
mov rdi, qword [r15 + 8]
sub rdi, qword [r15]
sar rdi, 4
lea rcx, [rbp + 0x140]
call fcn.004054f0
nop
xor esi, esi
mov qword [rbp - 0x68], rsi
test r14, r14
je 0x405e1d
mov rax, qword [r14]
lea r8, [rbp - 0x68]
mov edx, edi
mov rcx, r14
call qword [rax + 0x38]
test eax, eax
js 0x405e1d
mov rbx, qword [rbp - 0x68]
mov qword [rbp + 0x58], rbx
mov rax, qword [rbx]
lea rdx, [rbp + 0x240]
mov rcx, rbx
call qword [rax + 0x40]
mov r12d, dword [rbp + 0x340]
mov esi, dword [rbp + 0x344]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
test r12d, r12d
je 0x405e1d
test esi, esi
jne 0x405e50
test r13, r13
je 0x405e50
mov rax, qword [r13]
lea r9, [rbp + 0x520]
xor r8d, r8d
mov edx, edi
mov rcx, r13
call qword [rax + 0x28]
test eax, eax
jne 0x405e50
test r12d, r12d
cmove r12d, dword [rbp + 0x948]
test esi, esi
cmove esi, dword [rbp + 0x94c]
mov ecx, edi
lea rdx, [rbp + 0x370]
call qword [sym.imp.aif_ogl.dll_public:_static_void___cdecl_AIF::OGL::Context::displayDevice_unsigned_long_long_unsigned___int64___struct__DISPLAY_DEVICEA____ptr64_]
test byte [rbp + 0x414], 1
je 0x405f88
mov ecx, 0x1d0
call sub.MSVCR100.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov rbx, rax
mov qword [rsp + 0x58], rax
test rax, rax
je 0x405e9f
lea rdx, [rbp + 0x370]
mov rcx, rax
call qword [sym.imp.aif_ogl.dll_public:_void___cdecl_AIF::OGL::ContextOffscreen::constructor_struct__DISPLAY_DEVICEA_const____ptr64____ptr64]
lea rax, vtable.AIF::OGL::ContextOffscreen.0
mov qword [rbx], rax
jmp 0x405ea1
xor ebx, ebx
mov qword [rbp - 0x50], rbx
mov rdx, rbx
lea rcx, [rbp - 0x48]
call fcn.00404540
mov r8, rbx
mov rdx, rbx
lea rcx, [rbp - 0x50]
call fcn.00401d80
nop
mov ecx, 0x170
call sub.MSVCR100.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov rbx, rax
mov qword [rsp + 0x58], rax
test rax, rax
je 0x405f09
lea rdx, [rbp - 0x50]
mov rcx, rax
call fcn.00402a20
nop
lea rax, vtable.GPUWin.0
mov qword [rbx], rax
mov dword [rbx + 0x68], r12d
mov dword [rbx + 0x6c], esi
lea rcx, [rbx + 0x70]
lea rdx, [rbp + 0x140]
call fcn.00404ce0
nop
jmp 0x405f0b
xor ebx, ebx
mov qword [rbp - 0x40], rbx
mov rdx, rbx
lea rcx, [rbp - 0x38]
call fcn.004045b0
mov r8, rbx
mov rdx, rbx
lea rcx, [rbp - 0x40]
call fcn.00401d80
nop
lea rdx, [rbp - 0x40]
mov rcx, r15
call fcn.00405770
nop
mov rbx, qword [rbp - 0x38]
test rbx, rbx
je 0x405f60
lock dec dword [rbx + 8]
jne 0x405f60
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lock dec dword [rbx + 0xc]
jne 0x405f60
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
nop
mov rbx, qword [rbp - 0x48]
test rbx, rbx
je 0x405f88
lock dec dword [rbx + 8]
jne 0x405f88
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lock dec dword [rbx + 0xc]
jne 0x405f88
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
nop
lea rcx, [rbp + 0x140]
call fcn.00404650
nop
mov rcx, qword [rbp - 0x18]
test rcx, rcx
jne 0x405fab
mov rcx, qword [rsp + 0x60]
xor r12d, r12d
jmp 0x405d71
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rsp + 0x60]
xor r12d, r12d
jmp 0x405d71
mov rcx, qword [rbp + 8]
test rcx, rcx
je 0x406004
mov rax, qword [rcx]
call qword [rax + 0x10]
jmp 0x406004
lea rax, str.pEnumerator__Next
mov qword [rbp - 0x28], rax
lea rdx, [rbp - 0x28]
lea rcx, [rbp + 0x60]
call qword [sym.imp.MSVCR100.dll_public:_void___cdecl_std::exception::constructor_char_const__const___ptr64_const____ptr64____ptr64]
lea r11, vtable.std::runtime_error.0
mov qword [rbp + 0x60], r11
lea rdx, [0x0041ad48]
lea rcx, [rbp + 0x60]
call sub.MSVCR100.dll__CxxThrowException
nop
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x406015
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x406025
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
call qword [sym.imp.ole32.dll_CoUninitialize]
nop
mov rcx, qword [rbp - 0x80]
test rcx, rcx
je 0x40603c
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rcx, qword [rbp - 0x78]
test rcx, rcx
je 0x40604c
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rcx, qword [rbp + 0xd8]
test rcx, rcx
je 0x406065
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov qword [rbp + 0xd8], r12
cmp qword [rbp + 0xf8], 0x10
jb 0x40607b
mov rcx, qword [rbp + 0xe0]
call sub.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_
mov qword [rbp + 0xf8], 0xf
mov qword [rbp + 0xf0], r12
mov byte [rbp + 0xe0], 0
mov rcx, qword [rbp + 0x108]
test rcx, rcx
je 0x4060ad
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov qword [rbp + 0x108], r12
cmp qword [rbp + 0x128], 0x10
jb 0x4060c3
mov rcx, qword [rbp + 0x110]
call sub.MSVCR100.dll_void___cdecl_operator_delete_void____ptr64_
mov rax, r15
mov rcx, qword [rbp + 0x978]
xor rcx, rsp
call fcn.0040ead0
lea r11, [rsp + 0xa80]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret