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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x485780
push 0x45aae0
mov eax, dword fs:[0]
push eax
sub esp, 0x628
mov eax, dword [0x4a3300]
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.00406470
cmp eax, 1
je 0x40866a
call fcn.00406370
cmp eax, 1
jne 0x4083e9
mov byte [ebp - 0x278], 0
push 0x257
push 0
lea eax, [ebp - 0x277]
push eax
call fcn.00453200
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], 0x481db0
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 0x4083bb
xor eax, eax
jmp 0x40866f
lea ecx, [ebp - 0x278]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x4083b4
push 0x4a78b0
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.00453200
add esp, 0xc
push 0x4a78b0
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 0x408443
test al, 0x10
jne 0x40866a
call fcn.004063f0
test eax, eax
je 0x4083b4
mov dword [ebp - 0x610], 0
push 0x13c
push 0
lea eax, [ebp - 0x60c]
push eax
call fcn.00453200
add esp, 0xc
mov ecx, 0x5a
mov dword [ebp - 0x638], ecx
mov eax, 0x43
mov dword [ebp - 0x634], eax
cmp eax, ecx
jg 0x408658
mov byte [ebp - 0x278], 0
push 0x257
push 0
lea eax, [ebp - 0x277]
push eax
call fcn.00453200
mov eax, dword [ebp - 0x634]
movsx esi, al
push esi
push str._c:.
lea eax, [ebp - 0x278]
push eax
call fcn.004582cf
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 0x40863f
push 0x258
push 0
lea eax, [ebp - 0x278]
push eax
call fcn.00453200
push esi
push 0x481dd4
lea eax, [ebp - 0x278]
push eax
call fcn.004582cf
add esp, 0x18
lea ecx, [ebp - 0x278]
call fcn.00407c80
nop
lea eax, [ebp - 0x610]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x40863f
mov ecx, 0x481d50
lea eax, [ebp - 0x5e4]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x408561
test dl, dl
je 0x40855d
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x408561
add eax, 2
add ecx, 2
test dl, dl
jne 0x408541
xor eax, eax
jmp 0x408566
sbb eax, eax
or eax, 1
test eax, eax
je 0x408520
mov eax, 0x481dac
lea ecx, [ebp - 0x5e4]
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x408595
test dl, dl
je 0x408591
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x408595
add ecx, 2
add eax, 2
test dl, dl
jne 0x408575
xor eax, eax
jmp 0x40859a
sbb eax, eax
or eax, 1
test eax, eax
je 0x408520
push str.windows
lea eax, [ebp - 0x5e4]
push eax
call fcn.004581f3
add esp, 8
test eax, eax
je 0x408520
test byte [ebp - 0x610], 0x10
je 0x408520
push 0x258
push 0
lea eax, [ebp - 0x278]
push eax
call fcn.00453200
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.004582cf
add esp, 0x1c
lea ecx, [ebp - 0x278]
call fcn.00408090
push 0x4a78b0
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 0x40863f
jmp 0x408520
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0x634]
inc eax
mov ecx, dword [ebp - 0x638]
jmp 0x408480
mov eax, dword [0x4a7b14]
test eax, eax
je 0x40866a
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.004524fc
mov esp, ebp
pop ebp
ret