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

Disassembly:
push 0xffffffffffffffff
push 0x44ef07
mov eax, dword fs:[0]
push eax
sub esp, 0x278
mov eax, dword [0x460164]
xor eax, esp
mov dword [esp + 0x270], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x460164]
xor eax, esp
push eax
lea eax, [esp + 0x28c]
mov dword fs:[0], eax
mov esi, dword [esp + 0x29c]
mov eax, dword [esi]
xor edi, edi
push eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x1c], edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40f95b
lea eax, [esp + 0x24]
push eax
mov ecx, 0x455bf0
call fcn.00401a60
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x2c]
push esi
push edx
mov dword [esp + 0x2a0], edi
call fcn.00428b10
add esp, 0xc
mov byte [esp + 0x294], 2
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f7ee
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x34]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x40f92c
mov eax, dword [0x461acc]
mov edx, dword [eax + 0xc]
mov ecx, 0x461acc
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x294], 3
mov bl, 4
lea esp, [esp]
cmp word [esp + 0x60], 0x2e
je 0x40f8e9
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x64]
call fcn.00401a60
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x30]
push esi
push edx
mov byte [esp + 0x2a0], bl
call fcn.00428b10
add esp, 0xc
lea edi, [esp + 0x1c]
mov byte [esp + 0x294], 5
call fcn.00403c60
mov byte [esp + 0x294], bl
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f89c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x294], 3
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f8c4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, byte [esp + 0x34]
test al, 0x10
je 0x40f8e0
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x34]
call fcn.0040f740
add dword [esp + 0x18], eax
jmp 0x40f8e9
test al, 2
jne 0x40f8e9
add dword [esp + 0x18], 1
lea edx, [esp + 0x34]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40f830
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
mov byte [esp + 0x294], 2
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f92c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x294], 0xffffffff
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f957
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x270]
xor ecx, esp
call fcn.00435245
add esp, 0x284
ret 4