Function at 0x405910
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408ab6
mov eax, dword fs:[0]
push eax
mov eax, 0xb054
call fcn.00408940
mov eax, dword [0x40c024]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x405958
test al, 0x10
jne 0x405958
mov al, 1
jmp 0x40595a
xor al, al
test al, al
jne 0x405a5b
push esi
lea ecx, reloc.KERNEL32.dll_GetCommandLineW
call fcn.004051a0
lea edx, reloc.KERNEL32.dll_GetCommandLineW
mov dword [ebp - 4], 0
lea ecx, [ebp - 0xb044]
call fcn.00407210
cmp dword [eax + 0x14], 0x10
jb 0x40598e
mov eax, dword [eax]
push eax
push str.exe_path:_s_not_exists
lea eax, [ebp - 0x2810]
push 0x2800
push eax
call fcn.00404670
mov ecx, dword [ebp - 0xb030]
add esp, 0x10
cmp ecx, 0x10
jb 0x4059de
mov edx, dword [ebp - 0xb044]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4059d4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405a2b
push ecx
push edx
call fcn.00407c0f
add esp, 8
mov ecx, dword [ebp - 0xb048]
mov dword [ebp - 0xb034], 0
mov dword [ebp - 0xb030], 0xf
mov byte [ebp - 0xb044], 0
cmp ecx, 8
jb 0x405a3b
mov edx, dword [ebp - reloc.KERNEL32.dll_GetCommandLineW]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x405a31
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x405a31
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00407c0f
add esp, 8
lea eax, [ebp - 0x2810]
mov edx, 0x92
push eax
mov ecx, str.nv::CheckNvidiaConfig
call fcn.00407570
add esp, 4
mov al, 1
jmp 0x40608d
call fcn.00401c40
test eax, eax
je 0x405a9b
push eax
push str.NvAPI_Initialize_failed__status:_d
lea eax, [ebp - 0x2810]
push 0x2800
push eax
call fcn.00404670
lea eax, [ebp - 0x2810]
mov edx, 0x98
push eax
mov ecx, str.nv::CheckNvidiaConfig
call fcn.00407570
add esp, 0x14
mov al, 1
jmp 0x40608d
lea eax, [ebp - 0xb024]
mov dword [ebp - 0xb024], 0
push eax
call fcn.00401290
add esp, 4
test eax, eax
je 0x405aef
push eax
push str.NvAPI_DRS_CreateSession_failed__status:_d
lea eax, [ebp - 0x2810]
push 0x2800
push eax
call fcn.00404670
lea eax, [ebp - 0x2810]
mov edx, 0x9f
push eax
mov ecx, str.nv::CheckNvidiaConfig
call fcn.00407570
add esp, 0x14
mov al, 1
jmp 0x40608d
push dword [ebp - 0xb024]
call fcn.00401430
add esp, 4
test eax, eax
je 0x405b38
push eax
push str.NvAPI_DRS_LoadSettings_failed__status:_d
lea eax, [ebp - 0x2810]
push 0x2800
push eax
call fcn.00404670
lea eax, [ebp - 0x2810]
mov edx, 0xa5
push eax
mov ecx, str.nv::CheckNvidiaConfig
call fcn.00407570
add esp, 0x14
mov al, 1
jmp 0x40608d
push esi
lea eax, [ebp - 0x3810]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x5008
lea eax, [ebp - 0xb01c]
mov dword [ebp - 0xb028], 0
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0xb020], 0x13008
lea eax, [ebp - 0xb020]
push eax
lea eax, [ebp - 0xb028]
push eax
lea eax, [ebp - 0x3810]
push eax
push dword [ebp - 0xb024]
call fcn.004019e0
add esp, 0x10
lea ecx, reloc.KERNEL32.dll_GetCommandLineW
mov edi, eax
push esi
call fcn.004051a0
test edi, edi
je 0x405c88
lea edx, reloc.KERNEL32.dll_GetCommandLineW
mov dword [ebp - 4], 1
lea ecx, [ebp - 0xb044]
call fcn.00407210
cmp dword [eax + 0x14], 0x10
jb 0x405bc9
mov eax, dword [eax]
push edi
push eax
push str.NvAPI_DRS_FindApplicationByName_failed__path:_s__status:_d
lea eax, [ebp - 0x2810]
push 0x2800
push eax
call fcn.00404670
mov ecx, dword [ebp - 0xb030]
add esp, 0x14
cmp ecx, 0x10
jb 0x405c1a
mov edx, dword [ebp - 0xb044]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x405c10
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405c6e
push ecx
push edx
call fcn.00407c0f
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xb048]
mov dword [ebp - 0xb034], 0
mov dword [ebp - 0xb030], 0xf
mov byte [ebp - 0xb044], 0
cmp ecx, 8
jb 0x405c7e
mov edx, dword [ebp - reloc.KERNEL32.dll_GetCommandLineW]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x405c74
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x405c74
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00407c0f
add esp, 8
mov edx, 0xb4
jmp 0x405d63
lea edx, reloc.KERNEL32.dll_GetCommandLineW
mov dword [ebp - 4], 2
lea ecx, [ebp - 0xb044]
call fcn.00407210
cmp dword [eax + 0x14], 0x10
jb 0x405ca8
mov eax, dword [eax]
push 0
push eax
push str.NvAPI_DRS_FindApplicationByName_found__path:_s__status:_d
lea eax, [ebp - 0x2810]
push 0x2800
push eax
call fcn.00404670
mov ecx, dword [ebp - 0xb030]
add esp, 0x14
cmp ecx, 0x10
jb 0x405cfa
mov edx, dword [ebp - 0xb044]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x405cf0
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405d4e
push ecx
push edx
call fcn.00407c0f
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xb048]
mov dword [ebp - 0xb034], 0
mov dword [ebp - 0xb030], 0xf
mov byte [ebp - 0xb044], 0
cmp ecx, 8
jb 0x405d5e
mov edx, dword [ebp - reloc.KERNEL32.dll_GetCommandLineW]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x405d54
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x405d54
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00407c0f
add esp, 8
mov edx, 0xb7
lea eax, [ebp - 0x2810]
mov ecx, str.nv::CheckNvidiaConfig
push eax
call fcn.00407570
add esp, 4
mov dword [ebp - 0xb02c], 0
lea eax, [ebp - 0xb02c]
push eax
push dword [ebp - 0xb024]
call fcn.004016a0
add esp, 8
test eax, eax
je 0x405dca
push eax
push str.NvAPI_DRS_GetCurrentGlobalProfile_failed__status:_d
lea eax, [ebp - 0x2810]
push 0x2800
push eax
call fcn.00404670
lea eax, [ebp - 0x2810]
mov edx, 0xbd
push eax
mov ecx, str.nv::CheckNvidiaConfig
call fcn.00407570
add esp, 0x14
push str.nvapi.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
jne 0x405e16
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LoadLibraryW_failed__error:_d
lea eax, [ebp - 0x2810]
push 0x2800
push eax
call fcn.00404670
lea eax, [ebp - 0x2810]
mov edx, 0xc8
push eax
mov ecx, str.nv::CheckNvidiaConfig
call fcn.00407570
add esp, 0x14
mov al, 1
jmp 0x40608d
cmp dword [0x40ce10], 0
jne 0x405eff
push str.nvapi_QueryInterface
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
jne 0x405e6e
push str.GetProcAddress_failed__error
lea eax, [ebp - 0x2810]
push 0x2800
push eax
call fcn.00404670
add esp, 0xc
lea eax, [ebp - 0x2810]
mov edx, 0xd0
mov ecx, str.nv::CheckNvidiaConfig
push eax
call fcn.00407570
add esp, 4
mov al, 1
jmp 0x40608d
push 0xea99498d
call esi
add esp, 4
mov dword [0x40ce10], eax
test eax, eax
jne 0x405eff
push str.NvAPI_QueryInterface_0xEA99498D__failed__error.
lea eax, [ebp - 0x2810]
push 0x2800
push eax
call fcn.00404670
add esp, 0xc
lea eax, [ebp - 0x2810]
mov edx, 0xd6
mov ecx, str.nv::CheckNvidiaConfig
push eax
call fcn.00407570
add esp, 4
push 0x73bf8338
call esi
add esp, 4
mov dword [0x40ce10], eax
test eax, eax
jne 0x405eff
push str.NvAPI_QueryInterface_0x73BF8338__failed__error.
lea eax, [ebp - 0x6010]
push 0x2800
push eax
call fcn.00404670
add esp, 0xc
lea eax, [ebp - 0x6010]
mov edx, 0xd9
mov ecx, str.nv::CheckNvidiaConfig
push eax
call fcn.00407570
add esp, 4
mov al, 1
jmp 0x40608d
mov edx, dword [ebp - 0xb02c]
mov bh, 1
mov ecx, dword [ebp - 0xb024]
push 0
push 0x1034cb89
push dword [ebp - 0xb028]
call fcn.004052d0
mov edx, dword [ebp - 0xb02c]
add esp, 0xc
mov ecx, dword [ebp - 0xb024]
mov bl, al
neg bl
push 0
push 0x98c1ac
push dword [ebp - 0xb028]
sbb bl, bl
and bl, bh
call fcn.004052d0
mov edx, dword [ebp - 0xb02c]
add esp, 0xc
mov ecx, dword [ebp - 0xb024]
mov bh, al
neg bh
push 0
push 0xabac21
push dword [ebp - 0xb028]
sbb bh, bh
and bh, bl
call fcn.004052d0
mov edx, dword [ebp - 0xb02c]
add esp, 0xc
mov ecx, dword [ebp - 0xb024]
mov bl, al
neg bl
push 0
push 0xabab21
push dword [ebp - 0xb028]
sbb bl, bl
and bl, bh
call fcn.004052d0
mov edx, dword [ebp - 0xb02c]
add esp, 0xc
mov ecx, dword [ebp - 0xb024]
mov bh, al
neg bh
push 0
push 0x598949
push dword [ebp - 0xb028]
sbb bh, bh
and bh, bl
call fcn.004052d0
mov edx, dword [ebp - 0xb02c]
add esp, 0xc
mov ecx, dword [ebp - 0xb024]
mov bl, al
neg bl
push 0
push 0x80857a28
push dword [ebp - 0xb028]
sbb bl, bl
and bl, bh
call fcn.004052d0
mov edx, dword [ebp - 0xb02c]
add esp, 0xc
mov ecx, dword [ebp - 0xb024]
mov bh, al
neg bh
push 0x8416747
push 0xa879cf
push dword [ebp - 0xb028]
sbb bh, bh
and bh, bl
call fcn.004052d0
add esp, 0xc
mov bl, al
neg bl
sbb bl, bl
push 0
push 0x10fdec23
push dword [ebp - 0xb028]
and bl, bh
mov edx, dword [ebp - 0xb02c]
mov ecx, dword [ebp - 0xb024]
call fcn.004052d0
mov edx, dword [ebp - 0xb02c]
add esp, 0xc
mov ecx, dword [ebp - 0xb024]
mov bh, al
neg bh
push 0x96861077
push 0x5a375c
push dword [ebp - 0xb028]
sbb bh, bh
and bh, bl
call fcn.004052d0
add esp, 0xc
mov bl, al
neg bl
sbb bl, bl
push dword [ebp - 0xb024]
and bl, bh
call fcn.00401360
add esp, 4
call fcn.00401d50
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00407bd1
mov esp, ebp
pop ebp
ret