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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x660
mov dword [ebp - 0x5f8], edx
mov edx, dword [ebx - 4]
mov byte [ebp - 0x5f1], al
cmp edx, 0x504721
je 0x47f749
cmp edx, 0x504701
je 0x47f753
cmp edx, 0x502561
je 0x47f5ee
cmp edx, 0x502581
je 0x47f5ee
mov eax, edx
and eax, 3
dec eax
jne 0x47f5e0
movzx eax, byte [edx + 3]
sub al, 0x11
cmp al, 7
jbe 0x47f75d
mov edi, 0x1d49
mov dword [esp + 4], edi
jmp 0x47f73d
mov eax, dword [0x4f9d98]
mov dword [ebx], eax
mov eax, dword [0x4f9d7c]
add ebx, 4
mov dword [ebx], eax
add ebx, 4
mov dword [esp], 2
call fcn.00452100
mov edx, eax
mov eax, dword [edx + 3]
cmp al, 0x17
jne 0x47f62a
mov esi, esi
lea edi, [edi]
mov edx, dword [edx + 7]
mov eax, dword [edx + 3]
cmp al, 0x17
je 0x47f620
mov edi, eax
shr edi, 0xa
cmp edx, 0x4fa001
je 0x47f772
movsx eax, al
lea ecx, [eax - 0x11]
sar ecx, 1
cmp ecx, 2
je 0x47f764
lea eax, [edi*4 + 0x1e]
and eax, 0x3fffff0
call fcn.004ea990
lea esi, [esp + 0x27]
and esi, 0xfffffff0
test edi, edi
je 0x47f68c
cmp ecx, 1
je 0x47fa57
test ecx, ecx
jne 0x47f734
mov dword [esp + 8], edi
lea eax, [edx + 7]
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.0044c124
mov dword [ebp - 0x5fc], esi
mov dword [ebp - 0x600], esp
mov eax, dword [ebp - 0x5fc]
mov edx, dword [0x4f99d8]
mov dword [esp + 4], eax
lea esi, [eax + edi*4]
mov dword [esp + 8], esi
mov eax, dword [0x4f99d8]
mov dword [esp], eax
call dword [edx + 0x1f]
lea edx, [eax + 0x1f]
mov ecx, eax
and edx, 0xfffffff0
mov eax, edx
call fcn.004ea990
mov edx, dword [ebp - 0x5fc]
lea edi, [esp + 0x27]
and edi, 0xfffffff0
mov dword [ebp - 0x5dc], edi
lea ecx, [edi + ecx]
lea eax, [ebp - 0x5dc]
mov dword [ebp - 0x5e0], edx
mov edx, dword [0x4f99d8]
mov dword [ebp - 0x604], ecx
mov dword [esp + 0x14], ecx
xor ecx, ecx
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x5e0]
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov eax, dword [0x4f99d8]
mov dword [esp], eax
call dword [edx + 0x23]
cmp dword [ebp - 0x5e0], esi
jne 0x47f734
mov eax, dword [ebp - 0x5dc]
cmp eax, dword [ebp - 0x604]
je 0x47f787
mov eax, 0x1dd8
mov dword [esp + 4], eax
mov dword [esp], str.c:_usr_work_edrive_w32texsrc_clisp249_clisp_2.49_src_pathname.d
call fcn.00420a64
mov eax, dword [0x4f9da8]
jmp 0x47f5f3
mov eax, dword [0x4f9d7c]
jmp 0x47f5f3
mov dword [ebx], edx
jmp 0x47f5f5
add edx, 7
mov dword [ebp - 0x5fc], edx
jmp 0x47f692
xor esi, esi
test edi, edi
mov dword [ebp - 0x5fc], esi
je 0x47f692
call fcn.0042a998
mov byte [eax], 0
lea esi, [ebp - 0x148]
mov dword [0x698fa0], ebx
mov dword [esp + 4], esi
mov dword [esp], edi
call sub.KERNEL32.dll_FindFirstFileA
mov dword [ebp - 0x608], eax
sub esp, 8
inc eax
je 0x480042
xor eax, eax
mov edx, 0xffffffff
mov dword [0x698fa0], eax
lea eax, [ebp - 0x11c]
call fcn.0047f3b0
cmp eax, 0x4fa001
mov edx, eax
je 0x47f894
mov dword [ebx], eax
lea eax, [ebx + 4]
lea ebx, [eax + 4]
mov dword [eax], 0x4fa001
lea ebx, [eax + 8]
xor edi, edi
mov dword [eax + 4], 0x4fa001
lea ebx, [eax + 0xc]
mov dword [eax + 8], edx
mov eax, 1
call fcn.004762f8
test byte [ebp - 0x148], 0x10
je 0x47f92d
mov edx, dword [ebx - 0x14]
mov eax, dword [ebx - 0x1c]
call fcn.0047f150
mov dword [ebx - 0x10], eax
test byte [ebp - 0x148], 0x10
jne 0x47f849
cmp dword [ebx - 4], 0x4fa001
je 0x47f849
mov eax, dword [0x4f9d90]
mov dword [esp + 4], eax
mov eax, dword [ebx - 4]
mov dword [esp], eax
call fcn.0044c95c
test al, al
jne 0x47fa8b
mov eax, dword [ebx - 0x10]
mov dword [ebx - 0xc], eax
mov eax, dword [ebx - 0x14]
mov dword [ebx - 8], eax
sub ebx, 4
cmp edi, 1
je 0x47fa2e
mov eax, dword [ebp - 0x148]
shr eax, 4
cmp edi, 3
sete dl
or eax, edx
test al, 1
je 0x47f956
cmp byte [ebp - 0x5f1], 0
jne 0x47fa6f
mov eax, dword [ebp - 0x5f8]
test eax, eax
js 0x47f8fb
sub ebx, 0x10
mov dword [0x698fa0], ebx
lea esi, [ebp - 0x148]
mov dword [esp + 4], esi
mov eax, dword [ebp - 0x608]
mov dword [esp], eax
call sub.KERNEL32.dll_FindNextFileA
sub esp, 8
test eax, eax
jne 0x47f7b2
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x12
jne 0x47f8e0
mov edx, dword [ebp - 0x608]
mov dword [esp], edx
call sub.KERNEL32.dll_FindClose
sub esp, 4
test eax, eax
jne 0x47fbed
xor esi, esi
mov dword [0x698fa0], esi
mov eax, dword [ebx - 8]
mov dword [esp], 0x503be1
mov dword [esp + 4], eax
call fcn.004396a0
mov eax, dword [ebx - 0x30]
mov edx, dword [ebx - 4]
mov eax, dword [eax + 1]
call fcn.00479b70
test al, al
lea esi, [ebx - 8]
lea edi, [ebx - 0x28]
je 0x47f891
call fcn.0041f7d8
mov edx, dword [esi]
mov dword [eax + 1], edx
mov edx, dword [edi]
mov dword [eax - 3], edx
mov dword [edi], eax
jmp 0x47f891
mov eax, dword [ebx - 0x1c]
call fcn.004794f0
mov dword [ebx - 0x10], eax
mov edx, dword [ebx - 4]
mov dword [eax + 0x17], edx
mov eax, dword [ebx - 8]
mov edx, dword [ebx - 0x10]
mov dword [edx + 0x13], eax
mov eax, dword [ebx - 0x10]
mov dword [eax + 0x1b], 0x504781
jmp 0x47f81b
mov eax, dword [ebp - 0x5f8]
test eax, eax
jle 0x47f891
mov edx, dword [ebx - 4]
mov eax, dword [ebx - 0x34]
call fcn.00479b70
test al, al
je 0x47f891
mov eax, dword [ebp + 8]
cmp byte [eax + 4], 0
setne al
xor edx, edx
cmp edi, 1
setne dl
test eax, edx
je 0x47fc02
mov eax, dword [ebx - 0xc]
lea ecx, [ebx + 4]
cmp edi, 2
mov dword [ebx], eax
mov eax, dword [ecx - 0xc]
lea ebx, [ecx + 4]
mov dword [ecx], eax
je 0x480027
lea edx, [ebp - 0x5d8]
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x134]
test eax, eax
jne 0x47f9ce
mov edi, dword [ebp - 0x130]
lea eax, [ebp - 0x144]
test edi, edi
jne 0x47f9d4
lea eax, [ebp - 0x134]
mov dword [esp], eax
xor edi, edi
call fcn.0049a794
mov eax, dword [ebp - 0x12c]
mov esi, dword [ebp - 0x128]
mov edx, eax
xor eax, eax
or edx, edi
or eax, esi
mov dword [ebp - 0x5f0], eax
mov dword [ebp - 0x5ec], edx
lea edx, [ebp - 0x5f0]
lea eax, [ebp - 0x5d8]
call fcn.0047ee10
lea esi, [ebx - 4]
lea edi, [ebx - 0x44]
call fcn.0041f7d8
mov edx, dword [esi]
sub ebx, 8
mov dword [eax + 1], edx
mov edx, dword [edi]
mov dword [eax - 3], edx
mov dword [edi], eax
jmp 0x47f891
mov esi, dword [ebp + 8]
mov edx, dword [esi]
cmp edx, 1
je 0x480153
test edx, edx
setne al
cmp edx, 3
setne dl
movzx edx, dl
test eax, edx
je 0x47f891
jmp 0x47f861
mov dword [esp + 8], edi
lea eax, [edx + 7]
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.0044c194
jmp 0x47f68c
lea esi, [ebx - 8]
lea edi, [ebx - 0x1c]
call fcn.0041f7d8
mov edx, dword [esi]
mov dword [eax + 1], edx
mov edx, dword [edi]
mov dword [eax - 3], edx
mov dword [edi], eax
jmp 0x47f887
mov eax, dword [ebx - 0x10]
lea edx, [ebp - 0x258]
mov dword [ebp - 0x60c], edx
call fcn.00476b8c
mov edx, eax
mov eax, dword [edx + 3]
cmp al, 0x17
jne 0x47fab2
mov edx, dword [edx + 7]
mov eax, dword [edx + 3]
cmp al, 0x17
je 0x47faa8
mov edi, eax
shr edi, 0xa
cmp edx, 0x4fa001
je 0x480084
movsx eax, al
lea ecx, [eax - 0x11]
sar ecx, 1
cmp ecx, 2
je 0x47fff0
lea eax, [edi*4 + 0x1e]
and eax, 0x3fffff0
call fcn.004ea990
lea esi, [esp + 0x27]
and esi, 0xfffffff0
test edi, edi
je 0x47fb14
cmp ecx, 1
je 0x48013b
test ecx, ecx
jne 0x47f734
mov dword [esp + 8], edi
lea eax, [edx + 7]
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.0044c124
mov dword [ebp - 0x610], esi
mov dword [ebp - 0x614], esp
mov eax, dword [ebp - 0x610]
mov edx, dword [0x4f99d8]
mov dword [esp + 4], eax
lea esi, [eax + edi*4]
mov dword [esp + 8], esi
mov eax, dword [0x4f99d8]
mov dword [esp], eax
call dword [edx + 0x1f]
lea edx, [eax + 0x1f]
mov ecx, eax
and edx, 0xfffffff0
mov eax, edx
call fcn.004ea990
mov edx, dword [ebp - 0x610]
lea edi, [esp + 0x27]
and edi, 0xfffffff0
mov dword [ebp - 0x5e4], edi
lea ecx, [edi + ecx]
lea eax, [ebp - 0x5e4]
mov dword [ebp - 0x5e8], edx
mov edx, dword [0x4f99d8]
mov dword [ebp - 0x618], ecx
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x5e8]
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
mov eax, dword [0x4f99d8]
mov dword [esp], eax
call dword [edx + 0x23]
cmp dword [ebp - 0x5e8], esi
jne 0x47f734
mov eax, dword [ebp - 0x5e4]
cmp eax, dword [ebp - 0x618]
jne 0x47f734
mov byte [eax], 0
lea edx, [ebp - 0x258]
mov eax, edi
call fcn.004741bc
test eax, eax
mov edi, eax
jne 0x47fc0d
test edi, edi
mov esp, dword [ebp - 0x614]
jne 0x47f855
jmp 0x47f849
xor ecx, ecx
mov dword [0x698fa0], ecx
mov esp, dword [ebp - 0x600]
lea esp, [ebp - 8]
pop esi
pop edi
pop ebp
ret
lea esi, [ebx - 8]
lea edi, [ebx - 0x3c]
jmp 0x47f917
mov eax, 1
xor ecx, ecx
lea esi, [ebp - 0x478]
mov dword [ebp - 0x620], eax
lea eax, [ebp - 0x258]
mov dword [ebp - 0x624], ecx
mov dword [ebp - 0x61c], esi
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_strcpy
movzx ecx, byte [ebp - 0x478]
mov al, cl
sub al, 0x61
cmp al, 0x19
mov al, cl
setbe dl
sub al, 0x41
cmp al, 0x19
setbe al
or eax, edx
test al, 1
je 0x47fc6a
cmp byte [ebp - 0x477], 0x3a
je 0x48012a
cmp cl, 0x5c
je 0x4800bd
mov edx, dword [ebp - 0x61c]
mov dword [esp], edx
call sub.msvcrt.dll_strlen
mov esi, eax
mov eax, dword [ebp - 0x61c]
xor edx, edx
test esi, esi
mov byte [esi + eax], 0
je 0x47fcb4
movzx ecx, byte [eax + esi - 1]
cmp cl, 0x5c
sete al
cmp cl, 0x2f
sete dl
or eax, edx
test al, 1
je 0x47ff10
dec esi
mov edx, 4
mov ecx, dword [ebp - 0x620]
dec ecx
cmp ecx, 1
ja 0x47fe94
cmp edx, 4
ja case.0x47fed1.0
jmp dword [edx*4 + 0x567538]
lea eax, [ebp - 0x5b8]
lea edx, [ebp - 0x478]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.KERNEL32.dll_FindFirstFileA
mov dword [ebp - 0x630], eax
sub esp, 8
inc eax
je case.0x47fed1.0
lea eax, [ebp - 0x58c]
mov dword [esp], eax
call sub.msvcrt.dll__strrev
mov eax, dword [ebp - 0x624]
test eax, eax
jle 0x480158
mov edx, dword [ebp - 0x624]
mov cl, 0x5c
mov byte [edx + ebp - 0x368], cl
inc edx
mov dword [ebp - 0x624], edx
lea eax, [ebp - 0x58c]
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x624]
lea eax, [ebp - 0x368]
add eax, edx
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
lea ecx, [ebp - 0x58c]
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
and edx, 0x80808080
je 0x47fd54
test edx, 0x8080
jne 0x47fd79
shr edx, 0x10
add ecx, 2
add dl, dl
mov eax, dword [ebp - 0x630]
lea edx, [ebp - 0x58c]
sbb ecx, 3
sub ecx, edx
add dword [ebp - 0x624], ecx
mov dword [esp], eax
call sub.KERNEL32.dll_FindClose
sub esp, 4
mov eax, 3
mov dword [ebp - 0x620], eax
jmp 0x47fc83
mov eax, 0xb
jmp 0x47fda2
cmp dword [ebp - 0x620], 1
je 0x480113
lea edx, [ebp - 0x478]
cmp edx, dword [ebp - 0x61c]
jae 0x47fe11
mov esi, dword [ebp - 0x624]
mov al, 0x5c
mov byte [esi + ebp - 0x368], al
mov ecx, dword [ebp - 0x61c]
inc esi
mov dword [ebp - 0x624], esi
dec ecx
mov edx, ecx
dec ecx
mov esi, dword [ebp - 0x624]
movzx eax, byte [ecx + 1]
mov byte [esi + ebp - 0x368], al
lea eax, [ebp - 0x478]
inc esi
mov dword [ebp - 0x624], esi
cmp eax, edx
jb 0x47fdec
mov edx, dword [ebp - 0x624]
xor eax, eax
lea esi, [ebp - 0x368]
mov byte [edx + ebp - 0x368], al
mov dword [esp], esi
call sub.msvcrt.dll__strrev
mov dword [ebp - 0x60c], esi
mov eax, dword [ebx - 8]
mov dword [ebx], eax
add ebx, 4
mov eax, 1
call fcn.004762f8
mov edx, dword [ebx - 0x18]
cmp edi, 1
mov eax, dword [ebx - 8]
mov dword [edx + 0x13], eax
mov edx, dword [ebx - 0x18]
mov eax, dword [ebx - 4]
mov dword [edx + 0x17], eax
mov eax, dword [ebx - 0x18]
lea edx, [ebx - 8]
mov ebx, edx
mov dword [eax + 0x1b], 0x504781
jne 0x480099
mov eax, dword [edx - 0x10]
mov dword [edx - 0xc], eax
jmp 0x47fbda
cmp dword [ebp - 0x620], 1
jne case.0x47fed1.0
mov edx, 2
mov dword [ebp - 0x620], edx
jmp 0x47fc83
cmp dword [ebp - 0x620], 3
je 0x47ffe0
mov eax, dword [ebp - 0x620]
shr eax, 0x1f
add eax, dword [ebp - 0x620]
and eax, 0xfffffffe
mov dword [ebp - 0x63c], eax
mov eax, dword [ebp - 0x620]
sub eax, dword [ebp - 0x63c]
dec eax
je 0x47fffe
cmp edx, 4
ja case.default.0x47fed1
jmp dword [edx*4 + 0x56754c]
mov dword [ebp - 0x620], ecx
mov eax, dword [ebp - 0x620]
test eax, eax
jne 0x47fc83
jmp 0x47fdc1
inc dword [ebp - 0x620]
jmp case.default.0x47fed1
sub dword [ebp - 0x620], 3
cmp dword [ebp - 0x620], 8
jg case.default.0x47fed1
jmp case.0x47fed1.0
xor edx, edx
xor eax, eax
test esi, esi
mov dword [ebp - 0x628], edx
mov dword [ebp - 0x62c], eax
jle 0x47ffd6
cmp cl, 0x5c
setne al
xor edx, edx
cmp cl, 0x2f
setne dl
test eax, edx
jne 0x47ff88
jmp 0x47ffd6
mov edx, esi
neg edx
mov dword [ebp - 0x628], edx
cmp cl, 0x2a
sete al
cmp cl, 0x3f
sete dl
or eax, edx
test al, 1
je 0x47ff66
mov eax, 1
mov dword [ebp - 0x62c], eax
dec esi
test esi, esi
jle 0x47ff95
mov eax, dword [ebp - 0x61c]
movzx ecx, byte [eax + esi - 1]
cmp cl, 0x5c
setne al
xor edx, edx
cmp cl, 0x2f
setne dl
test eax, edx
je 0x47ff95
cmp cl, 0x2e
jne 0x47ff3f
inc dword [ebp - 0x628]
jmp 0x47ff49
mov eax, dword [ebp - 0x62c]
test eax, eax
jne case.0x47fed1.0
mov eax, dword [ebp - 0x628]
test eax, eax
jle 0x47ffd6
cmp dword [ebp - 0x628], 1
mov edx, 3
je 0x47fcb4
cmp dword [ebp - 0x628], 2
jne case.0x47fed1.0
mov edx, 2
jmp 0x47fcb4
mov edx, 1
jmp 0x47fcb4
test edx, edx
je 0x480187
cmp edx, 4
jmp 0x47fe82
add edx, 7
mov dword [ebp - 0x610], edx
jmp 0x47fb1a
test edx, edx
je case.0x47fed1.0
cmp edx, 4
jne case.0x47fed1.0
inc dword [ebp - 0x620]
cmp dword [ebp - 0x620], 0xa
jne case.default.0x47fed1
jmp 0x47fe84
lea eax, [ebp - 0x5f0]
lea edx, [ebp - 0x5d8]
mov dword [esp], eax
mov eax, ecx
call fcn.0047ee90
jmp 0x47f9fe
call sub.KERNEL32.dll_GetLastError
cmp eax, 2
je 0x47fbed
call sub.KERNEL32.dll_GetLastError
cmp eax, 3
je 0x47fbed
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x35
je 0x47fbed
xor eax, eax
mov dword [0x698fa0], eax
mov eax, dword [ebp + 8]
cmp dword [eax], 3
je 0x47fbf5
jmp 0x47f8e8
test edi, edi
jne 0x47f782
xor eax, eax
mov dword [ebp - 0x610], eax
jmp 0x47fb1a
mov eax, dword [ebp - 0x60c]
mov edx, 0xffffffff
call fcn.0047f3b0
call fcn.00475748
mov dword [ebx - 0xc], eax
mov dword [eax + 0x1b], 0x504781
jmp 0x47fbda
cmp byte [ebp - 0x477], 0x5c
jne 0x47fc73
lea eax, [ebp - 0x476]
xor esi, esi
mov dword [ebp - 0x61c], eax
mov edx, dword [ebp - 0x61c]
movzx ecx, byte [edx]
test cl, cl
je case.0x47fed1.0
cmp cl, 0x5c
setne al
xor edx, edx
cmp cl, 0x2f
setne dl
test eax, edx
je 0x48016a
inc dword [ebp - 0x61c]
mov eax, dword [ebp - 0x61c]
movzx ecx, byte [eax]
test cl, cl
jne 0x4800e9
jmp case.0x47fed1.0
lea edx, [ebp - 0x478]
cmp edx, dword [ebp - 0x61c]
jne 0x47fdc1
jmp case.0x47fed1.0
lea esi, [ebp - 0x476]
mov dword [ebp - 0x61c], esi
jmp 0x47fc73
mov dword [esp + 8], edi
lea eax, [edx + 7]
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.0044c194
jmp 0x47fb14
call fcn.0047ca94
test byte [ebp - 0x5b8], 0x10
je 0x47fd2e
jmp 0x47fd18
test cl, cl
je case.0x47fed1.0
inc dword [ebp - 0x61c]
inc esi
cmp esi, 1
jle 0x4800d8
jmp 0x47fc73
lea esi, [ebp - 0x478]
cmp esi, dword [ebp - 0x61c]
jne case.0x47fed1.0
jmp 0x47fdc1