Function at 0x1004044
Capabilities:
Check if file exists
Enumerate files on windows
Enumerate files recursively
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x1009024]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0x14]
cmp dword [ebx + 0x10], 0
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x264], eax
mov byte [ebp - 0x255], 0
je 0x10040e9
push eax
call esi
test eax, eax
jne 0x10040e9
push edi
push dword [ebx + 0x10]
call fcn.01001cd8
pop ecx
pop ecx
xor esi, esi
push esi
push dword [ebx + 4]
push edi
call dword [ebx]
test al, al
jne 0x10040c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 2
mov esi, eax
call fcn.01001cd8
push esi
push edi
call fcn.01001d2d
mov al, byte [0x100901c]
add esp, 0xc
jmp 0x1004320
push 1
call fcn.01001cd8
add dword [0x10095e8], 1
pop ecx
mov al, 1
adc dword [0x10095ec], esi
add dword [0x100b600], 1
adc dword [0x100b604], esi
jmp 0x1004320
push edi
call esi
mov esi, dword [ebp + 0xc]
lea ecx, [edi + eax*2]
push edi
mov dword [ebp - 0x260], ecx
sub esi, eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x100411c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
call fcn.01001d2d
pop ecx
pop ecx
xor al, al
jmp 0x1004320
push edi
test eax, 0x4000
je 0x1004129
push dword [ebx + 0x14]
jmp 0x100412c
push dword [ebx + 0x18]
call fcn.01001cd8
add dword [0x10095e8], 1
pop ecx
pop ecx
push dword [ebp - 0x264]
adc dword [0x10095ec], 0
push esi
push dword [ebp - 0x260]
call fcn.01001b6a
test eax, eax
jl 0x1004227
lea eax, [ebp - 0x254]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x25c], eax
cmp eax, 0xffffffff
je 0x1004227
push 0x100154c
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x1004200
push 0x1001544
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x1004200
lea eax, [ebp - 0x228]
push eax
push esi
push dword [ebp - 0x260]
call fcn.01001b6a
test eax, eax
jl 0x1004200
cmp byte [ebx + 8], 0
je 0x10041dc
push edi
call fcn.01001a7c
test al, al
je 0x10041dc
push dword [ebp - 0x260]
push 0x16
call fcn.01001cd8
pop ecx
pop ecx
jmp 0x1004200
lea eax, [ebp - 0x254]
push eax
push dword [ebx + 4]
push edi
call dword [ebx]
test al, al
jne 0x1004200
cmp byte [0x100901c], al
je 0x1004331
mov byte [ebp - 0x255], 1
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1004178
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp byte [0x1009064], 0
je 0x1004315
push 0x1001540
push esi
push dword [ebp - 0x260]
call fcn.01001b6a
test eax, eax
jl 0x1004315
lea eax, [ebp - 0x254]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x25c], eax
cmp eax, 0xffffffff
je 0x1004315
push 0x100154c
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x10042ee
push 0x1001544
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x10042ee
test byte [ebp - 0x254], 0x10
je 0x10042ee
lea eax, [ebp - 0x228]
push eax
push esi
push dword [ebp - 0x260]
call fcn.01001b6a
test eax, eax
jl 0x10042ee
push 0x10013e8
push esi
push dword [ebp - 0x260]
call fcn.010039f0
test eax, eax
jl 0x10042ee
push ebx
push dword [ebp - 0x264]
push dword [ebp + 0xc]
push edi
call fcn.01004044
test al, al
jne 0x10042ee
cmp byte [0x100901c], al
je 0x1004331
mov byte [ebp - 0x255], 1
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x100426a
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
cmp byte [ebp - 0x255], al
sete al
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0100741c
leave
ret 0x10
push dword [ebp - 0x25c]
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x1004115