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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x914
mov eax, dword [0x1006050]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
or dword [ebp - 0x8c4], 0xffffffff
mov dword [ebp - 0x8cc], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x8c8], eax
mov eax, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x8d0], eax
lea eax, [ebp - 0x8d8]
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0x8c0], 1
push ebx
call fcn.01001bcc
mov dword [ebp - 0x8d4], eax
test eax, eax
je 0x100339f
push 0x10014fc
push dword [ebp - 0x8d8]
push eax
call fcn.01001cf3
test eax, eax
jge 0x1002fdd
and dword [ebp - 0x8c0], 0
jmp 0x1003379
push esi
lea eax, [ebp - 0x8bc]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x8c4], eax
cmp eax, 0xffffffff
jne 0x100304c
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 2
je 0x1003378
call esi
cmp eax, 3
je 0x1003378
mov eax, dword [section..data]
cmp eax, section..data
je 0x1003040
test byte [eax + 0x1c], 4
je 0x1003040
call esi
push eax
mov eax, dword [section..data]
push ebx
push 0x1001240
push 0x37
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100182f
and dword [ebp - 0x8c0], 0
jmp 0x1003378
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
call edi
push 0x10014f0
mov esi, eax
call edi
add esi, eax
lea eax, [ebp - 0x890]
push eax
call edi
lea eax, [eax + esi + 1]
cmp eax, dword [ebp + 0xc]
jae 0x1003353
lea eax, [ebp - 0x890]
push eax
push dword [ebp - 0x8d8]
push dword [ebp - 0x8d4]
call fcn.01001cf3
test eax, eax
jl 0x1003370
test byte [ebp - 0x8bc], 0x10
je 0x10031a6
push 0x10014ec
lea eax, [ebp - 0x890]
push eax
call fcn.010016ae
test eax, eax
jne 0x1003353
push 0x10014e4
lea eax, [ebp - 0x890]
push eax
call fcn.010016ae
test eax, eax
jne 0x1003353
test dword [ebp - 0x8bc], 0x400
je 0x1003114
mov eax, dword [section..data]
cmp eax, section..data
je 0x1003353
test byte [eax + 0x1c], 4
je 0x1003353
push ebx
push 0x1001240
push 0x38
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010016fb
jmp 0x1003353
mov esi, dword [ebp - 0x8d0]
test esi, esi
jne 0x1003177
push dword [ebp - 0x8d0]
push dword [ebp - 0x8c8]
push dword [ebp - 0x8cc]
push dword [ebp + 0xc]
push ebx
call fcn.01002f59
test eax, eax
jne 0x1003353
mov eax, dword [section..data]
cmp eax, section..data
je 0x1003353
test byte [eax + 0x1c], 8
je 0x1003353
push ebx
push 0x1001240
push 0x3a
jmp 0x1003104
push ebx
push esi
call fcn.010016ae
test eax, eax
jne 0x100317f
push esi
call edi
lea esi, [esi + eax*2 + 2]
cmp word [esi], 0
jne 0x1003165
jmp 0x100311e
mov eax, dword [section..data]
cmp eax, section..data
je 0x1003353
test byte [eax + 0x1c], 8
je 0x1003353
push ebx
push 0x1001240
push 0x39
jmp 0x1003104
mov ecx, dword [0x1006154]
add ecx, dword [ebp - 0x89c]
mov dword [0x1006154], ecx
mov eax, dword [section..data]
cmp eax, section..data
je 0x10031e4
test byte [eax + 0x1c], 8
je 0x10031e4
lea edx, [ebp - 0x890]
push edx
push ecx
push 0x1001240
push 0x3b
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010018ce
cmp dword [ebp - 0x8c8], 0
je 0x1003353
lea eax, [ebp - 0x890]
xor esi, esi
push eax
inc esi
call edi
cmp eax, 6
jl 0x1003235
push 6
lea eax, [ebp - 0x890]
push eax
push 6
push 0x10014d4
push esi
push 0x7f
call dword [sym.imp.KERNEL32.dll_CompareStringW]
cmp eax, 2
jne 0x1003235
xor eax, eax
cmp dword [0x100614c], eax
setne al
mov esi, eax
test esi, esi
je 0x1003353
cmp dword [0x10060f0], 0
mov eax, dword [ebp - 0x89c]
je 0x100324d
cmp eax, 0x800
ja 0x100324d
xor esi, esi
test esi, esi
je 0x1003353
cmp eax, 0x400
ja 0x1003261
xor eax, eax
inc eax
jmp 0x1003264
shr eax, 0xa
push eax
push 0x1006070
lea eax, [ebp - 0x54]
push 0x28
push eax
call fcn.01001dbe
add esp, 0x10
test eax, eax
jl 0x1003370
push 0x30c
lea eax, [ebp - 0x66c]
push eax
push dword [ebp - 0x8cc]
xor esi, esi
push ebx
mov dword [ebp - 0x914], 0xd
mov dword [ebp - 0x910], esi
mov dword [ebp - 0x90c], esi
mov dword [ebp - 0x908], esi
mov dword [ebp - 0x904], 3
call fcn.01002722
test eax, eax
lea eax, [ebp - 0x66c]
jne 0x10032d0
mov eax, dword [ebp - 0x8cc]
mov dword [ebp - 0x900], eax
mov eax, dword [ebp - 0x89c]
mov dword [ebp - 0x8f4], eax
lea eax, [ebp - 0x914]
push eax
push esi
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 0x104d
push dword [ebp - 0x8c8]
call esi
and dword [ebp - 0x908], 0
mov dword [ebp - 0x910], eax
lea eax, [ebp - 0x54]
mov dword [ebp - 0x900], eax
mov eax, dword [ebp - 0x89c]
mov dword [ebp - 0x8f4], eax
lea eax, [ebp - 0x914]
push eax
push 0
push 0x104c
push dword [ebp - 0x8c8]
mov dword [ebp - 0x914], 9
mov dword [ebp - 0x90c], 1
mov dword [ebp - 0x904], 3
call esi
lea eax, [ebp - 0x8bc]
push eax
push dword [ebp - 0x8c4]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1003053
jmp 0x1003377
and dword [ebp - 0x8c0], 0
pop edi
pop esi
mov ecx, dword [ebp - 0x8d4]
xor eax, eax
cmp dword [ebp - 0x8c4], 0xffffffff
mov word [ecx], ax
je 0x1003399
push dword [ebp - 0x8c4]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x8c0]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.01004666
leave
ret 0x14