Function at 0x470480
Capabilities:
Check if file exists
Enumerate files on windows

Disassembly:
push 0xffffffffffffffff
push 0x62e2b0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x178
mov eax, dword [0x6bd8a0]
push ebx
push ebp
push esi
xor ebx, ebx
mov dword [esp + 0x180], eax
push edi
mov dword [esp + 0x28], ebx
mov ebp, 1
mov dword [esp + 0x190], ebp
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov ecx, dword [esp + 0x1b0]
lea eax, [esp + 0x1ac]
cmp ecx, eax
mov byte [esp + 0x190], 2
lea eax, [esp + 0x19c]
je 0x4704f1
mov eax, dword [esp + 0x19c]
lea ecx, [esp + 0x44]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4705d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x470562
push 0x19
push str.c:work_fishdom_aqua_gameDirectoryListing.h
sub esp, 0x18
mov ecx, esp
mov dword [esp + 0x44], esp
lea edx, [esp + 0x33]
push edx
push str.GetLastError____ERROR_FILE_NOT_FOUND
call fcn.00403db0
sub esp, 0x18
mov ecx, esp
mov dword [esp + 0x4c], esp
lea eax, [esp + 0x4b]
push eax
push str.Assertion_failed
mov byte [esp + 0x1d0], 3
call fcn.00403db0
mov byte [esp + 0x1c8], 2
call fcn.00405c50
add esp, 0x38
mov esi, dword [esp + 0x198]
lea ecx, [esp + 0x18]
push ecx
mov ecx, esi
call fcn.00460210
lea ecx, [esp + 0x18]
mov dword [esp + 0x28], ebp
mov byte [esp + 0x190], 1
call fcn.00459610
mov eax, dword [esp + 0x1b0]
lea edx, [esp + 0x1ac]
cmp eax, edx
mov byte [esp + 0x190], bl
je 0x4707d1
mov ecx, dword [esp + 0x19c]
cmp ecx, ebx
je 0x4707d1
sub eax, ecx
cmp eax, 0x80
jbe 0x4707c7
push ecx
call fcn.00611869
add esp, 4
jmp 0x4707d1
mov ebp, dword [esp + 0x1b8]
mov esi, dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov edi, edi
mov eax, dword [esp + 0x44]
and eax, dword [esp + 0x1b4]
cmp eax, ebp
jne 0x4706bd
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x3c]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], edx
lea eax, [esp + 0x70]
mov byte [esp + 0x190], 4
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x470612
sub eax, edx
lea eax, [esp + eax + 0x70]
push eax
lea ecx, [esp + 0x74]
push ecx
lea ecx, [esp + 0x34]
call fcn.00403b50
mov ecx, dword [esp + 0x1c]
cmp ecx, dword [esp + 0x20]
mov byte [esp + 0x190], 5
je 0x47066b
mov dword [esp + 0x14], ecx
mov dword [esp + 0x24], ecx
cmp ecx, ebx
mov byte [esp + 0x190], 6
je 0x470662
lea edx, [esp + 0x2c]
push edx
call fcn.00403e10
mov ecx, dword [esp + 0x1c]
add ecx, 0x18
mov dword [esp + 0x1c], ecx
jmp 0x470683
push 1
push 1
lea eax, [esp + 0x1b]
push eax
lea edx, [esp + 0x38]
push edx
push ecx
lea ecx, [esp + 0x2c]
call fcn.0046a660
mov eax, dword [esp + 0x40]
lea ecx, [esp + 0x3c]
cmp eax, ecx
mov byte [esp + 0x190], 2
je 0x4706bd
mov ecx, dword [esp + 0x2c]
cmp ecx, ebx
je 0x4706bd
sub eax, ecx
cmp eax, 0x80
jbe 0x4706b3
push ecx
call fcn.00611869
add esp, 4
jmp 0x4706bd
push eax
push ecx
call fcn.005d6970
add esp, 8
lea edx, [esp + 0x44]
push edx
push edi
call esi
test eax, eax
setne al
cmp al, bl
jne 0x4705e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x47072c
push 0x22
push str.c:work_fishdom_aqua_gameDirectoryListing.h
sub esp, 0x18
mov ecx, esp
mov dword [esp + 0x34], esp
lea eax, [esp + 0x33]
push eax
push str.GetLastError____ERROR_NO_MORE_FILES
call fcn.00403db0
sub esp, 0x18
mov ecx, esp
mov dword [esp + 0x5c], esp
lea edx, [esp + 0x4b]
push edx
push str.Assertion_failed
mov byte [esp + 0x1d0], 7
call fcn.00403db0
mov byte [esp + 0x1c8], 2
call fcn.00405c50
add esp, 0x38
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
jne 0x470786
push 0x26
push str.c:work_fishdom_aqua_gameDirectoryListing.h
sub esp, 0x18
mov ecx, esp
mov dword [esp + 0x34], esp
lea eax, [esp + 0x33]
push eax
push str.FindClose_searchHandle____0
call fcn.00403db0
sub esp, 0x18
mov ecx, esp
mov dword [esp + 0x5c], esp
lea edx, [esp + 0x4b]
push edx
push str.Assertion_failed
mov byte [esp + 0x1d0], 8
call fcn.00403db0
mov byte [esp + 0x1c8], 2
call fcn.00405c50
add esp, 0x38
mov esi, dword [esp + 0x198]
lea eax, [esp + 0x18]
push eax
mov ecx, esi
call fcn.00460210
lea ecx, [esp + 0x18]
mov dword [esp + 0x28], 1
mov byte [esp + 0x190], 1
call fcn.00459610
mov eax, dword [esp + 0x1b0]
lea ecx, [esp + 0x1ac]
cmp eax, ecx
jmp 0x47059a
push eax
push ecx
call fcn.005d6970
add esp, 8
mov ecx, dword [esp + 0x188]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x184]
mov eax, esi
call fcn.006122a5
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x184
ret