Function at 0x405760
Capabilities:
Check if file exists
Enumerate files on windows
Get file attributes
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x484150
push 0x458ff0
mov eax, dword fs:[0]
push eax
sub esp, 0x628
mov eax, dword [0x4a2300]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
call fcn.004038c0
cmp eax, 1
je 0x405b0a
call fcn.004037c0
cmp eax, 1
jne 0x405889
mov byte [ebp - 0x278], 0
push 0x257
push 0
lea eax, [ebp - 0x277]
push eax
call fcn.00451650
add esp, 0xc
mov dword [ebp - 0x630], 0
xorps xmm0, xmm0
movdqu xmmword [ebp - 0x62c], xmm0
movq qword [ebp - 0x61c], xmm0
mov dword [ebp - 0x614], 0
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov dword [ebp - 0x630], eax
mov dword [ebp - 0x62c], 0
lea eax, [ebp - 0x278]
mov dword [ebp - 0x628], eax
mov dword [ebp - 0x624], 0x480a38
mov dword [ebp - 0x620], 0x43
mov dword [ebp - 0x61c], 0
mov dword [ebp - 0x614], 0
lea eax, [ebp - 0x630]
push eax
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderA]
test eax, eax
jne 0x40585b
xor eax, eax
jmp 0x405b0f
lea ecx, [ebp - 0x278]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x405854
push 0x4a6890
lea eax, [ebp - 0x278]
push eax
push str.Game
push str.PATH
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov byte [ebp - 0x4d0], 0
push 0x257
push 0
lea eax, [ebp - 0x4cf]
push eax
call fcn.00451650
add esp, 0xc
push 0x4a6890
push 0x258
lea eax, [ebp - 0x4d0]
push eax
push 0
push str.Game
push str.PATH
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x4d0]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4058e3
test al, 0x10
jne 0x405b0a
call fcn.00403840
test eax, eax
je 0x405854
mov dword [ebp - 0x610], 0
push 0x13c
push 0
lea eax, [ebp - 0x60c]
push eax
call fcn.00451650
add esp, 0xc
mov ecx, 0x5a
mov dword [ebp - 0x638], ecx
mov eax, 0x43
mov dword [ebp - 0x634], eax
cmp eax, ecx
jg 0x405af8
mov byte [ebp - 0x278], 0
push 0x257
push 0
lea eax, [ebp - 0x277]
push eax
call fcn.00451650
mov eax, dword [ebp - 0x634]
movsx esi, al
push esi
push str._c:.
lea eax, [ebp - 0x278]
push eax
call fcn.0045671f
add esp, 0x18
mov dword [ebp - 4], 0
lea eax, [ebp - 0x610]
push eax
lea eax, [ebp - 0x278]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x405adf
push 0x258
push 0
lea eax, [ebp - 0x278]
push eax
call fcn.00451650
push esi
push 0x480a5c
lea eax, [ebp - 0x278]
push eax
call fcn.0045671f
add esp, 0x18
lea ecx, [ebp - 0x278]
call fcn.00405120
nop
lea eax, [ebp - 0x610]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x405adf
mov ecx, 0x4809d8
lea eax, [ebp - 0x5e4]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x405a01
test dl, dl
je 0x4059fd
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x405a01
add eax, 2
add ecx, 2
test dl, dl
jne 0x4059e1
xor eax, eax
jmp 0x405a06
sbb eax, eax
or eax, 1
test eax, eax
je 0x4059c0
mov eax, 0x480a34
lea ecx, [ebp - 0x5e4]
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x405a35
test dl, dl
je 0x405a31
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x405a35
add ecx, 2
add eax, 2
test dl, dl
jne 0x405a15
xor eax, eax
jmp 0x405a3a
sbb eax, eax
or eax, 1
test eax, eax
je 0x4059c0
push str.windows
lea eax, [ebp - 0x5e4]
push eax
call fcn.00456643
add esp, 8
test eax, eax
je 0x4059c0
test byte [ebp - 0x610], 0x10
je 0x4059c0
push 0x258
push 0
lea eax, [ebp - 0x278]
push eax
call fcn.00451650
lea eax, [ebp - 0x5e4]
push eax
mov eax, dword [ebp - 0x634]
movsx eax, al
push eax
push str._c:_s
lea eax, [ebp - 0x278]
push eax
call fcn.0045671f
add esp, 0x1c
lea ecx, [ebp - 0x278]
call fcn.00405530
push 0x4a6890
push 0x258
lea eax, [ebp - 0x4d0]
push eax
push 0
push str.Game
push str.PATH
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
jne 0x405adf
jmp 0x4059c0
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0x634]
inc eax
mov ecx, dword [ebp - 0x638]
jmp 0x405920
mov eax, dword [0x4a6ae8]
test eax, eax
je 0x405b0a
push str._STS_DUILIB_CloseSearchWnd
call eax
call eax
mov eax, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0045094b
mov esp, ebp
pop ebp
ret