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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x486370
push 0x459ee0
mov eax, dword fs:[0]
push eax
sub esp, 0x628
mov eax, dword [0x4a4300]
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.00403a70
cmp eax, 1
je 0x405ecc
call fcn.00403970
cmp eax, 1
jne 0x405c39
mov byte [ebp - 0x278], 0
push 0x257
push 0
lea eax, [ebp - 0x277]
push eax
call fcn.004523e0
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], 0x482a80
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 0x405c0b
xor eax, eax
jmp 0x405ed1
lea ecx, [ebp - 0x278]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x405c04
push 0x4a8890
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.004523e0
add esp, 0xc
push 0x4a8890
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 0x405c93
test al, 0x10
jne 0x405ecc
call fcn.004039f0
test eax, eax
je 0x405c04
mov dword [ebp - 0x610], 0
push 0x13c
push 0
lea eax, [ebp - 0x60c]
push eax
call fcn.004523e0
add esp, 0xc
mov ecx, 0x5a
mov dword [ebp - 0x638], ecx
mov eax, 0x43
mov dword [ebp - 0x634], eax
cmp eax, ecx
jg 0x405eba
mov byte [ebp - 0x278], 0
push 0x257
push 0
lea eax, [ebp - 0x277]
push eax
call fcn.004523e0
add esp, 0xc
mov eax, dword [ebp - 0x634]
movsx esi, al
push esi
push str._c:.
lea eax, [ebp - 0x278]
push eax
call fcn.0045752f
add esp, 0xc
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 0x405ea1
push 0x258
push 0
lea eax, [ebp - 0x278]
push eax
call fcn.004523e0
add esp, 0xc
push esi
push 0x482aa4
lea eax, [ebp - 0x278]
push eax
call fcn.0045752f
add esp, 0xc
lea ecx, [ebp - 0x278]
call fcn.004054c0
lea eax, [ebp - 0x610]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x405ea1
mov ecx, 0x482a18
lea eax, [ebp - 0x5e4]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x405db6
test dl, dl
je 0x405db2
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x405db6
add eax, 2
add ecx, 2
test dl, dl
jne 0x405d96
xor eax, eax
jmp 0x405dbb
sbb eax, eax
or eax, 1
test eax, eax
je 0x405d75
mov eax, 0x482a7c
lea ecx, [ebp - 0x5e4]
lea ebx, [ebx]
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x405df0
test dl, dl
je 0x405dec
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x405df0
add ecx, 2
add eax, 2
test dl, dl
jne 0x405dd0
xor eax, eax
jmp 0x405df5
sbb eax, eax
or eax, 1
test eax, eax
je 0x405d75
push str.windows
lea eax, [ebp - 0x5e4]
push eax
call fcn.00457453
add esp, 8
test eax, eax
je 0x405d75
test byte [ebp - 0x610], 0x10
je 0x405d75
push 0x258
push 0
lea eax, [ebp - 0x278]
push eax
call fcn.004523e0
add esp, 0xc
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.0045752f
add esp, 0x10
lea ecx, [ebp - 0x278]
call fcn.004058d0
push 0x4a8890
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 0x405ea1
jmp 0x405d75
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0x634]
inc eax
mov ecx, dword [ebp - 0x638]
jmp 0x405cd0
mov eax, dword [0x4a8b54]
test eax, eax
je 0x405ecc
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.004516e1
mov esp, ebp
pop ebp
ret