Function at 0x14003f9c0
Capabilities:
Link many functions at runtime
Query environment variable

Disassembly:
push rdi
sub rsp, 0x550
mov rax, qword [0x140177090]
xor rax, rsp
mov qword [rsp + 0x520], rax
lea rdx, [rsp + 0x320]
lea rcx, str._PROGRAMFILES_NVIDIA_CorporationNVSMI_nvml.dll
mov r8d, 0x200
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea rcx, [rsp + 0x320]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rdi, rax
test rax, rax
jne 0x14003fa34
cmp dword [0x1401d1ae8], eax
je 0x14003fa34
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r9, [rsp + 0x320]
lea rdx, str.dlopen__d_:_failed_to_load__s
lea ecx, [rdi + 4]
mov r8d, eax
call fcn.14003ce00
test rdi, rdi
jne 0x14003fa81
lea rcx, str.nvml.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rdi, rax
test rax, rax
jne 0x14003fa75
cmp dword [0x1401d1ae8], eax
je 0x14003fa75
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r9, str.nvml.dll
lea rdx, str.dlopen__d_:_failed_to_load__s
lea ecx, [rdi + 4]
mov r8d, eax
call fcn.14003ce00
test rdi, rdi
jne 0x14003fa81
xor eax, eax
jmp 0x14003fefb
mov edx, 0x1d0
mov ecx, 1
mov qword [rsp + 0x560], rbx
call qword [sym.imp.MSVCR120.dll_calloc]
lea rdx, str.nvmlInit_v2
mov rcx, rdi
mov qword [rax], rdi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbx + 0x58], rax
test rax, rax
jne 0x14003facc
mov rcx, qword [rbx]
lea rdx, str.nvmlInit
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbx + 0x58], rax
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetCount_v2
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbx + 0x60], rax
test rax, rax
jne 0x14003faf9
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetCount
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbx + 0x60], rax
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetHandleByIndex_v2
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetAPIRestriction
mov qword [rbx + 0x68], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceSetAPIRestriction
mov qword [rbx + 0x70], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetDefaultApplicationsClock
mov qword [rbx + 0x78], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetApplicationsClock
mov qword [rbx + 0x80], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceSetApplicationsClocks
mov qword [rbx + 0x88], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceResetApplicationsClocks
mov qword [rbx + 0x90], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetSupportedGraphicsClocks
mov qword [rbx + 0x98], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetSupportedMemoryClocks
mov qword [rbx + 0xa0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetClockInfo
mov qword [rbx + 0xa8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetMaxClockInfo
mov qword [rbx + 0xb0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetPciInfo_v2
mov qword [rbx + 0xb8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbx + 0xe0], rax
test rax, rax
jne 0x14003fc20
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetPciInfo
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbx + 0xe0], rax
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetCurrPcieLinkGeneration
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetCurrPcieLinkWidth
mov qword [rbx + 0xe8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetMaxPcieLinkGeneration
mov qword [rbx + 0xf0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetMaxPcieLinkWidth
mov qword [rbx + 0xf8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetPowerUsage
mov qword [rbx + 0x100], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetPowerManagementDefaultLimit
mov qword [rbx + 0x128], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetPowerManagementLimit
mov qword [rbx + 0xc0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetPowerManagementLimitConstraints
mov qword [rbx + 0xc8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceSetPowerManagementLimit
mov qword [rbx + 0xd0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetName
mov qword [rbx + 0xd8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetTemperature
mov qword [rbx + 0x108], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetFanSpeed
mov qword [rbx + 0x110], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetPerformanceState
mov qword [rbx + 0x118], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetSerial
mov qword [rbx + 0x120], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetUUID
mov qword [rbx + 0x130], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetVbiosVersion
mov qword [rbx + 0x138], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlSystemGetDriverVersion
mov qword [rbx + 0x140], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlErrorString
mov qword [rbx + 0x148], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlShutdown
mov qword [rbx + 0x150], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetEnforcedPowerLimit
mov qword [rbx + 0x158], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.nvmlDeviceGetPcieThroughput
mov qword [rbx + 0x160], rax
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
lea rdx, str.nvmlDeviceGetClock
mov qword [rbx + 0x168], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbx + 0x170], rax
mov rax, qword [rbx + 0x58]
test rax, rax
je 0x1400401e5
cmp qword [rbx + 0x158], 0
je 0x1400401e5
cmp qword [rbx + 0x150], 0
je 0x1400401e5
cmp qword [rbx + 0x60], 0
je 0x1400401e5
cmp qword [rbx + 0x68], 0
je 0x1400401e5
cmp qword [rbx + 0xe0], 0
je 0x1400401e5
cmp qword [rbx + 0x108], 0
je 0x1400401e5
mov qword [rsp + 0x548], r12
mov qword [rsp + 0x538], r14
call rax
mov rax, qword [rbx + 0x148]
test rax, rax
je 0x14003fea1
lea rcx, [0x1401d2310]
mov edx, 0x20
call rax
lea rcx, [rbx + 8]
call qword [rbx + 0x60]
lea rcx, [rbx + 0xc]
call fcn.1400015b0
test eax, eax
je 0x14003ff14
cmp dword [0x1401d1ae8], 0
je 0x14003fecf
lea rdx, str.Failed_to_query_CUDA_device_count_
mov ecx, 4
call fcn.14003ce00
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rcx, rbx
call qword [sym.imp.MSVCR120.dll_free]
xor eax, eax
mov r12, qword [rsp + 0x548]
mov r14, qword [rsp + 0x538]
mov rbx, qword [rsp + 0x560]
mov rcx, qword [rsp + 0x520]
xor rcx, rsp
call fcn.140129b50
add rsp, 0x550
pop rdi
ret
mov qword [rsp + 0x568], rbp
mov qword [rsp + 0x570], rsi
movsxd rsi, dword [rbx + 8]
mov rcx, rsi
mov edx, 8
call qword [sym.imp.MSVCR120.dll_calloc]
mov edx, 4
mov rcx, rsi
mov qword [rbx + 0x48], rax
call qword [sym.imp.MSVCR120.dll_calloc]
mov edx, 4
mov rcx, rsi
mov qword [rbx + 0x10], rax
call qword [sym.imp.MSVCR120.dll_calloc]
mov edx, 4
mov rcx, rsi
mov qword [rbx + 0x18], rax
call qword [sym.imp.MSVCR120.dll_calloc]
mov edx, 4
mov rcx, rsi
mov qword [rbx + 0x20], rax
call qword [sym.imp.MSVCR120.dll_calloc]
mov edx, 4
mov rcx, rsi
mov qword [rbx + 0x28], rax
call qword [sym.imp.MSVCR120.dll_calloc]
mov edx, 4
mov rcx, rsi
mov qword [rbx + 0x30], rax
call qword [sym.imp.MSVCR120.dll_calloc]
movsxd rcx, dword [rbx + 0xc]
mov edx, 4
mov qword [rbx + 0x38], rax
call qword [sym.imp.MSVCR120.dll_calloc]
mov edx, 4
mov rcx, rsi
mov qword [rbx + 0x40], rax
call qword [sym.imp.MSVCR120.dll_calloc]
xor edi, edi
mov qword [rbx + 0x50], rax
test esi, esi
jle 0x14003fff7
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rbx + 0x48]
movsxd rcx, edi
lea rdx, [rax + rcx*8]
mov ecx, edi
call qword [rbx + 0x68]
inc edi
cmp edi, dword [rbx + 8]
jl 0x14003ffe0
xor ebp, ebp
cmp dword [rbx + 8], ebp
jle 0x1400400b2
xor esi, esi
xor edi, edi
nop word [rax + rax]
mov rcx, qword [rbx + 0x48]
lea rdx, [rsp + 0x30]
mov rcx, qword [rcx + rsi]
call qword [rbx + 0xe0]
mov eax, dword [rsp + 0x40]
mov rcx, qword [rbx + 0x10]
mov dword [rdi + rcx], eax
mov eax, dword [rsp + 0x44]
mov rcx, qword [rbx + 0x18]
mov dword [rdi + rcx], eax
mov eax, dword [rsp + 0x48]
mov rcx, qword [rbx + 0x20]
mov dword [rdi + rcx], eax
mov eax, dword [rsp + 0x4c]
mov rcx, qword [rbx + 0x28]
mov dword [rdi + rcx], eax
mov eax, dword [rsp + 0x50]
mov rcx, qword [rbx + 0x30]
mov dword [rdi + rcx], eax
mov rax, qword [rbx + 0x50]
mov dword [rdi + rax], 2
mov rax, qword [rbx + 0x78]
test rax, rax
je 0x14004007e
mov rcx, qword [rbx + 0x48]
xor edx, edx
mov rcx, qword [rcx + rsi]
lea r8d, [rdx + 1]
call rax
mov r9, qword [rbx + 0x70]
test r9, r9
je 0x14004009f
mov rax, qword [rbx + 0x50]
movsxd rcx, ebp
xor edx, edx
lea r8, [rax + rcx*4]
mov rcx, qword [rbx + 0x48]
mov rcx, qword [rcx + rsi]
call r9
inc ebp
add rdi, 4
add rsi, 8
cmp ebp, dword [rbx + 8]
jl 0x140040010
xor edx, edx
cmp dword [rbx + 8], edx
jle 0x1400400d7
xor ecx, ecx
nop dword [rax + rax]
mov rax, qword [rbx + 0x38]
inc edx
lea rcx, [rcx + 4]
mov dword [rcx + rax - 4], 0xffffffff
cmp edx, dword [rbx + 8]
jl 0x1400400c0
xor ebp, ebp
cmp dword [rbx + 0xc], ebp
jle 0x1400401cd
mov qword [rsp + 0x540], r13
mov qword [rsp + 0x530], r15
xor r15d, r15d
lea r13, [0x1401f2780]
nop dword [rax]
mov rax, qword [rbx + 0x40]
lea rcx, [rsp + 0x70]
mov edx, ebp
mov dword [r15 + rax], 0xffffffff
call fcn.1400016d0
test eax, eax
jne 0x1400401ae
mov edx, dword [rsp + 0x298]
xor esi, esi
mov dword [r15 + r13], edx
cmp dword [rbx + 8], esi
jle 0x1400401ae
xor edi, edi
nop dword [rax]
nop dword [rax + rax]
mov rcx, qword [rbx + 0x10]
mov eax, dword [rsp + 0x2a0]
cmp dword [rdi + rcx], eax
jne 0x1400401a3
mov rax, qword [rbx + 0x18]
cmp dword [rdi + rax], edx
jne 0x1400401a3
mov rcx, qword [rbx + 0x20]
mov eax, dword [rsp + 0x29c]
cmp dword [rdi + rcx], eax
jne 0x1400401a3
cmp dword [0x1401d1ae8], 0
je 0x14004018d
mov dword [rsp + 0x20], edx
lea rdx, str.CUDA_GPU__d_matches_NVML_GPU__d_by_busId__u
mov r9d, esi
mov r8d, ebp
mov ecx, 4
call fcn.14003ce00
mov rax, qword [rbx + 0x38]
mov dword [rdi + rax], ebp
mov rax, qword [rbx + 0x40]
mov dword [r15 + rax], esi
mov edx, dword [rsp + 0x298]
inc esi
add rdi, 4
cmp esi, dword [rbx + 8]
jl 0x140040140
inc ebp
add r15, 4
cmp ebp, dword [rbx + 0xc]
jl 0x140040100
mov r15, qword [rsp + 0x530]
mov r13, qword [rsp + 0x540]
mov rsi, qword [rsp + 0x570]
mov rbp, qword [rsp + 0x568]
mov rax, rbx
jmp 0x14003fee3
cmp dword [0x1401d1ae8], 0
je 0x1400401ff
lea rdx, str.Failed_to_obtain_required_NVML_function_pointers
mov ecx, 4
call fcn.14003ce00
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rcx, rbx
call qword [sym.imp.MSVCR120.dll_free]
xor eax, eax
jmp 0x14003fef3