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

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
push edi
xor esi, esi
push esi
xor ebp, ebp
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [esp + 0x34]
test edi, edi
je 0x4057f8
call fcn.004039c0
test eax, eax
jne 0x4057f8
cmp dword [0x6559c8], eax
jne 0x4055f3
push 0x4a6bc4
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x4057ba
cmp dword [0x6559c8], esi
jne 0x4055d9
push str.IsWow64Process
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [0x6559c8], eax
je 0x4057ba
push 0x6559c4
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [0x6559c8]
test eax, eax
je 0x4057ba
mov eax, dword [0x6559c4]
push 0x42ea
mov dword [esp + 0x38], eax
call fcn.00404120
add esp, 4
test eax, eax
je 0x40563a
call fcn.00403c00
push edi
call fcn.00405170
add esp, 4
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x405631
test al, 0x50
je 0x4057ba
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
push 0x4a6b94
call fcn.004053c0
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x4057ba
mov eax, edi
call fcn.00405230
mov ebx, eax
test ebx, ebx
je 0x4057ba
push ebx
call fcn.0045eed3
lea edi, [ebx + eax*2]
add esp, 4
cmp ebx, edi
mov eax, edi
jae 0x40568a
mov cx, word [eax]
cmp cx, 0x5c
je 0x40568a
cmp cx, 0x2e
je 0x40568a
sub eax, 2
cmp ebx, eax
jb 0x405674
cmp word [eax], 0x2e
jne 0x405692
mov edi, eax
push 0x4a6ba4
push edi
call fcn.0045f5b3
add esp, 8
test eax, eax
je 0x4056be
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4056be
push 0x4a6b94
push ebx
call fcn.00404660
add esp, 8
mov esi, eax
push str..sys
push edi
call fcn.0045f5b3
add esp, 8
xor edi, edi
test eax, eax
je 0x405775
cmp esi, edi
jne 0x4057ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x405743
cmp dword [esp + 0x34], edi
mov dword [esp + 0x20], str.UserModeDriverNameWow
mov dword [esp + 0x24], str.OpenGLDriverNameWow
mov dword [esp + 0x28], str.UserModeDListDriverNameWow
mov dword [esp + 0x2c], edi
mov dword [esp + 0x10], str.UserModeDriverName
mov dword [esp + 0x14], str.OpenGLDriverName
mov dword [esp + 0x18], str.UserModeDListDriverName
mov dword [esp + 0x1c], edi
lea eax, [esp + 0x20]
jne 0x40572e
lea eax, [esp + 0x10]
push ebp
push connect
push ebx
call fcn.00404870
mov esi, eax
add esp, 0xc
cmp esi, edi
jne 0x4057ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x405779
push connect
push ebx
lea eax, [esp + 0x28]
mov dword [esp + 0x28], str.SOFTWAREKhronosVulkanDrivers
mov dword [esp + 0x2c], str.SOFTWAREKhronosOpenCLVendors
mov dword [esp + 0x30], edi
call fcn.00404a10
add esp, 8
mov esi, eax
cmp esi, edi
jne 0x4057ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4057ba
cmp dword [esp + 0x34], edi
mov dword [esp + 0x10], str.DriverSupportModulesWow
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], str.DriverSupportModules
mov dword [esp + 0x24], edi
lea eax, [esp + 0x10]
jne 0x4057a9
lea eax, [esp + 0x20]
push ebp
push connect
push ebx
call fcn.00404870
add esp, 0xc
mov esi, eax
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
push ebp
call edi
push ebx
call edi
test esi, esi
je 0x4057dc
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4057ee
push 0x7e
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
push 0xa0
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret