Function at 0x407ffb
Capabilities:
Check if file exists
Enumerate files on windows
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x888
push ebx
push esi
xor esi, esi
push edi
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
push esi
push esi
push 0x1042
push dword [0x47d9c8]
mov dword [ebp - 4], esi
call edi
cmp eax, 0xffffffff
jne 0x408032
and byte [0x47da04], 0
jmp 0x408359
imul eax, eax, 0x210
add eax, dword [0x47eed4]
mov ebx, dword [sym.imp.KERNEL32.DLL_lstrcpyA]
push eax
lea eax, [ebp - 0x234]
push eax
call ebx
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x408359
cmp dword [ebp + 0xc], esi
je 0x4080e3
cmp byte [ebp - 0x233], 0x3a
mov esi, 0x47da04
je 0x4080b5
cmp byte [ebp - 0x234], 0x5c
jne 0x408088
cmp byte [ebp - 0x233], 0x5c
je 0x4080b5
lea eax, [ebp - 0x680]
push esi
push eax
call ebx
lea eax, [ebp - 0x680]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x680]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcatA]
jmp 0x4080c5
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x680]
push eax
call ebx
lea eax, [ebp - 0x680]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryA]
test eax, eax
je 0x408359
lea eax, [ebp - 0x680]
push eax
jmp 0x408139
cmp byte [ebp - 0x233], 0x3a
je 0x408113
cmp byte [ebp - 0x234], 0x5c
jne 0x4080fe
cmp byte [ebp - 0x233], 0x5c
je 0x408113
mov esi, 0x47da04
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashA]
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
jmp 0x40813c
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashA]
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
lea eax, [ebp - 0x234]
mov esi, 0x47da04
push eax
push esi
call ebx
cmp dword [0x47d760], 0
je 0x408194
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashA]
push esi
push dword [0x42ebbc]
call fcn.00405833
pop ecx
cmp eax, 0xffffffff
pop ecx
jne 0x408172
push 0
push esi
push dword [0x42ebbc]
call fcn.0040155b
add esp, 0xc
jmp 0x40818f
push eax
push dword [0x42ebbc]
call fcn.00401508
push 0
push esi
push eax
mov dword [0x42ebbc], eax
call fcn.0040155b
add esp, 0x14
mov dword [0x42ebbc], eax
push esi
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
push esi
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
lea eax, [ebp - 0x888]
push esi
push eax
call ebx
lea eax, [ebp - 0x888]
push 0x40d870
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcatA]
lea eax, [ebp - 0x478]
push eax
lea eax, [ebp - 0x888]
push eax
call dword [sym.imp.KERNEL32.DLL_FindFirstFileA]
mov dword [ebp + 0xc], eax
lea eax, [ebp - 0x44c]
push 0x40d86c
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpA]
test eax, eax
je 0x408228
push esi
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
lea eax, [ebp - 0x44c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryA]
test eax, eax
je 0x408228
lea eax, [ebp - 0x44c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
mov eax, dword [0x47eed4]
push esi
push eax
mov dword [ebp - 4], 1
call ebx
push 1
call fcn.004078b6
pop ecx
mov eax, dword [ebp - 4]
lea ecx, [ebp - 0x44c]
imul eax, eax, 0x210
add eax, dword [0x47eed4]
inc dword [ebp - 4]
push ecx
push eax
call ebx
push dword [ebp - 4]
call fcn.004078b6
pop ecx
lea eax, [ebp - 0x478]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.DLL_FindNextFileA]
test eax, eax
je 0x408299
cmp dword [ebp - 4], 1
jne 0x40827d
lea eax, [ebp - 0x44c]
push 0x40dab4
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpA]
test eax, eax
je 0x40824d
mov eax, dword [ebp - 0x478]
and eax, 0x10
cmp al, 0x10
jne 0x408228
lea eax, [ebp - 0x44c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
jmp 0x408228
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryA]
test eax, eax
je 0x4082ab
push esi
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
push esi
push dword [0x47eed4]
call ebx
push esi
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
mov dword [0x47da00], 1
call fcn.00405536
xor ebx, ebx
push ebx
push ebx
push 0x1009
push dword [0x47d9c8]
call edi
push 2
pop esi
push esi
push dword [ebp - 4]
push 0x102f
push dword [0x47d9c8]
call edi
push ebx
push 0x24
push 0x100
push dword [0x47d9c8]
call dword [sym.imp.USER32.dll_PostMessageA]
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x1c], esi
push eax
push ebx
push ebx
push 0x1042
push dword [0x47d9c8]
mov dword [ebp - 0x20], ebx
call edi
mov ebx, 0x102b
push eax
push ebx
push dword [0x47d9c8]
call edi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], esi
lea eax, [ebp - 0x2c]
xor esi, esi
push eax
push esi
push ebx
push dword [0x47d9c8]
call edi
push esi
push esi
push 0x1043
push dword [0x47d9c8]
call edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.DLL_FindClose]
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret