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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x486350
push 0x459d70
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.00403a90
cmp eax, 1
je 0x405e6c
call fcn.00403990
cmp eax, 1
jne 0x405bd9
mov byte [ebp - 0x278], 0
push 0x257
push 0
lea eax, [ebp - 0x277]
push eax
call fcn.00452270
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], 0x482a78
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 0x405bab
xor eax, eax
jmp 0x405e71
lea ecx, [ebp - 0x278]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x405ba4
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.00452270
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 0x405c33
test al, 0x10
jne 0x405e6c
call fcn.00403a10
test eax, eax
je 0x405ba4
mov dword [ebp - 0x610], 0
push 0x13c
push 0
lea eax, [ebp - 0x60c]
push eax
call fcn.00452270
add esp, 0xc
mov ecx, 0x5a
mov dword [ebp - 0x638], ecx
mov eax, 0x43
mov dword [ebp - 0x634], eax
cmp eax, ecx
jg 0x405e5a
mov byte [ebp - 0x278], 0
push 0x257
push 0
lea eax, [ebp - 0x277]
push eax
call fcn.00452270
add esp, 0xc
mov eax, dword [ebp - 0x634]
movsx esi, al
push esi
push str._c:.
lea eax, [ebp - 0x278]
push eax
call fcn.004573bf
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 0x405e41
push 0x258
push 0
lea eax, [ebp - 0x278]
push eax
call fcn.00452270
add esp, 0xc
push esi
push 0x482a9c
lea eax, [ebp - 0x278]
push eax
call fcn.004573bf
add esp, 0xc
lea ecx, [ebp - 0x278]
call fcn.00405460
lea eax, [ebp - 0x610]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x405e41
mov ecx, 0x482a18
lea eax, [ebp - 0x5e4]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x405d56
test dl, dl
je 0x405d52
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x405d56
add eax, 2
add ecx, 2
test dl, dl
jne 0x405d36
xor eax, eax
jmp 0x405d5b
sbb eax, eax
or eax, 1
test eax, eax
je 0x405d15
mov eax, 0x482a74
lea ecx, [ebp - 0x5e4]
lea ebx, [ebx]
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x405d90
test dl, dl
je 0x405d8c
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x405d90
add ecx, 2
add eax, 2
test dl, dl
jne 0x405d70
xor eax, eax
jmp 0x405d95
sbb eax, eax
or eax, 1
test eax, eax
je 0x405d15
push str.windows
lea eax, [ebp - 0x5e4]
push eax
call fcn.004572e3
add esp, 8
test eax, eax
je 0x405d15
test byte [ebp - 0x610], 0x10
je 0x405d15
push 0x258
push 0
lea eax, [ebp - 0x278]
push eax
call fcn.00452270
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.004573bf
add esp, 0x10
lea ecx, [ebp - 0x278]
call fcn.00405870
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 0x405e41
jmp 0x405d15
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0x634]
inc eax
mov ecx, dword [ebp - 0x638]
jmp 0x405c70
mov eax, dword [0x4ab490]
test eax, eax
je 0x405e6c
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.00451570
mov esp, ebp
pop ebp
ret