Function at 0x140002590
Capabilities:
Link many functions at runtime

Disassembly:
push rbp
push r13
lea rbp, [rsp - 0x4f]
sub rsp, 0xc8
mov rax, qword [0x140087710]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov r13, rcx
xor r8d, r8d
lea rcx, str.gdi32.dll
xor edx, edx
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov qword [r13 + 0x38], rax
test rax, rax
je 0x1400028b1
lea rdx, str.D3DKMTOpenAdapterFromGdiDisplayName
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [r13 + 0x38]
lea rdx, str.D3DKMTOpenAdapterFromDeviceName
mov qword [r13 + 8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [r13 + 0x38]
lea rdx, str.D3DKMTEscape
mov qword [r13 + 0x10], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [r13 + 0x38]
lea rdx, str.D3DKMTCreateDevice
mov qword [r13 + 0x30], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [r13 + 0x38]
lea rdx, str.D3DKMTDestroyDevice
mov qword [r13 + 0x20], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [r13 + 0x38]
lea rdx, str.D3DKMTCloseAdapter
mov qword [r13 + 0x28], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp qword [r13 + 8], 0
mov qword [r13 + 0x18], rax
je 0x1400028b1
cmp qword [r13 + 0x10], 0
je 0x1400028b1
cmp qword [r13 + 0x30], 0
je 0x1400028b1
cmp qword [r13 + 0x20], 0
je 0x1400028b1
cmp qword [r13 + 0x28], 0
je 0x1400028b1
test rax, rax
je 0x1400028b1
mov qword [rsp + 0xe8], rbx
lea rcx, [rbp - 0x29]
mov qword [rsp + 0xf8], rdi
xor r8d, r8d
mov qword [rsp + 0xc0], r12
xor edx, edx
xor r12d, r12d
mov qword [rsp + 0xb8], r14
mov ebx, r12d
mov dword [rbp - 0x29], 0x1ca05180
or edi, 0xffffffff
mov dword [rbp - 0x25], 0x450aa699
mov dword [rbp - 0x21], 0x4fde0c9a
lea r9d, [r12 + 0x12]
mov dword [rbp - 0x1d], 0x89dd3dbe
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x14000287f
mov qword [rsp + 0xf0], rsi
mov dword [rbp - 0x19], 0x20
mov dword [rbp + 7], 0x20
nop dword [rax]
lea rax, [rbp - 0x19]
inc edi
mov r9d, edi
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x29]
xor edx, edx
mov rcx, r14
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x140002710
mov esi, r12d
test edi, edi
je 0x140002877
mov qword [rsp + 0xb0], r15
nop dword [rax]
nop dword [rax + rax]
lea rax, [rbp - 0x19]
mov dword [rbp - 0x49], r12d
mov r9d, esi
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x29]
xor edx, edx
mov rcx, r14
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x140002862
lea rax, [rbp - 0x49]
mov qword [rsp + 0x28], r12
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rbp - 0x19]
mov rcx, r14
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x14000282a
test rbx, rbx
je 0x1400027ba
cmp dword [rbp - 0x49], r12d
jbe 0x1400027ce
mov rcx, rbx
call fcn.14002acac
mov ecx, dword [rbp - 0x49]
call fcn.140031004
mov rbx, rax
test rax, rax
je 0x14000286f
lea rax, [rbp + 7]
mov dword [rbx], 8
mov r9d, dword [rbp - 0x49]
lea rdx, [rbp - 0x19]
mov qword [rsp + 0x28], rax
mov r8, rbx
lea rax, [rbp - 0x49]
mov rcx, r14
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
je 0x14000282a
lea r15, [rbx + 4]
mov rcx, r15
lea rdx, str.VEN_8086
call fcn.14002e800
test rax, rax
jne 0x140002836
lea rdx, str.ven_8086
mov rcx, r15
call fcn.14002e800
test rax, rax
jne 0x140002836
inc esi
cmp esi, edi
jb 0x140002750
jmp 0x140002862
mov rdi, qword [r13 + 0x10]
xor eax, eax
mov rcx, rdi
mov qword [rbp - 0x39], rax
mov qword [rbp - 0x31], rax
mov qword [rbp - 0x41], r15
call qword [fcn.14000b400]
lea rcx, [rbp - 0x41]
call rdi
test eax, eax
jne 0x140002862
mov eax, dword [rbp - 0x39]
mov dword [r13], eax
test rbx, rbx
je 0x14000286f
mov rcx, rbx
call fcn.140031390
mov r15, qword [rsp + 0xb0]
mov rsi, qword [rsp + 0xf0]
cmp dword [r13], r12d
mov eax, 0x80004005
mov r14, qword [rsp + 0xb8]
mov rdi, qword [rsp + 0xf8]
cmove r12d, eax
mov rbx, qword [rsp + 0xe8]
mov eax, r12d
mov r12, qword [rsp + 0xc0]
jmp 0x1400028b6
mov eax, 0x80004005
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.14002ad40
add rsp, 0xc8
pop r13
pop rbp
ret