Function at 0x1400045c0
Capabilities:
Link many functions at runtime

Disassembly:
push rbp
push r13
lea rbp, [rsp - 0x4f]
sub rsp, 0xc8
mov rax, qword [0x140069250]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov r13, rcx
lea rcx, str.gdi32.dll
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov qword [r13 + 0x38], rax
test rax, rax
je 0x1400048dc
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 0x1400048dc
cmp qword [r13 + 0x10], 0
je 0x1400048dc
cmp qword [r13 + 0x30], 0
je 0x1400048dc
cmp qword [r13 + 0x20], 0
je 0x1400048dc
cmp qword [r13 + 0x28], 0
je 0x1400048dc
test rax, rax
je 0x1400048dc
mov qword [rsp + 0xe8], rbx
mov qword [rsp + 0xf8], rdi
mov qword [rsp + 0xc0], r12
xor r12d, r12d
lea rcx, [rbp - 0x29]
xor r8d, r8d
lea r9d, [r12 + 0x12]
xor edx, edx
mov qword [rsp + 0xb8], r14
mov ebx, r12d
or edi, 0xffffffff
mov dword [rbp - 0x29], 0x1ca05180
mov dword [rbp - 0x25], 0x450aa699
mov dword [rbp - 0x21], 0x4fde0c9a
mov dword [rbp - 0x1d], 0x89dd3dbe
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x1400048aa
mov qword [rsp + 0xf0], rsi
mov dword [rbp - 0x19], 0x20
mov dword [rbp + 7], 0x20
nop dword [rax]
lea rax, [rbp - 0x19]
inc edi
lea r8, [rbp - 0x29]
xor edx, edx
mov rcx, r14
mov r9d, edi
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x140004740
mov esi, r12d
test edi, edi
je 0x1400048a2
mov qword [rsp + 0xb0], r15
nop dword [rax]
nop dword [rax + rax]
lea rax, [rbp - 0x19]
lea r8, [rbp - 0x29]
mov r9d, esi
xor edx, edx
mov rcx, r14
mov dword [rbp - 0x49], r12d
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x14000488d
lea rax, [rbp - 0x49]
lea rdx, [rbp - 0x19]
xor r9d, r9d
xor r8d, r8d
mov rcx, r14
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140004858
test rbx, rbx
je 0x1400047ea
cmp dword [rbp - 0x49], r12d
jbe 0x1400047fe
mov rcx, rbx
call fcn.14002f04c
mov ecx, dword [rbp - 0x49]
call fcn.14002f054
mov rbx, rax
test rax, rax
je 0x14000489a
lea rax, [rbp + 7]
mov dword [rbx], 8
mov r9d, dword [rbp - 0x49]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x49]
lea rdx, [rbp - 0x19]
mov r8, rbx
mov rcx, r14
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
je 0x140004858
lea rdx, str.VEN_8086
lea rcx, [rbx + 4]
call fcn.14002fbe0
test rax, rax
jne 0x140004864
lea rdx, str.ven_8086
lea rcx, [rbx + 4]
call fcn.14002fbe0
test rax, rax
jne 0x140004864
inc esi
cmp esi, edi
jb 0x140004780
jmp 0x14000488d
xor eax, eax
lea rcx, [rbp - 0x41]
mov qword [rbp - 0x41], rax
mov qword [rbp - 0x39], rax
mov qword [rbp - 0x31], rax
lea rax, [rbx + 4]
mov qword [rbp - 0x41], rax
call qword [r13 + 0x10]
test eax, eax
jne 0x14000488d
mov eax, dword [rbp - 0x39]
mov dword [r13], eax
test rbx, rbx
je 0x14000489a
mov rcx, rbx
call main
mov r15, qword [rsp + 0xb0]
mov rsi, qword [rsp + 0xf0]
cmp dword [r13], r12d
mov r14, qword [rsp + 0xb8]
mov rdi, qword [rsp + 0xf8]
mov rbx, qword [rsp + 0xe8]
mov eax, 0x80004005
cmove r12d, eax
mov eax, r12d
mov r12, qword [rsp + 0xc0]
jmp 0x1400048e1
mov eax, 0x80004005
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.14002f810
add rsp, 0xc8
pop r13
pop rbp
ret