Function at 0x405860
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push 0xffffffffffffffff
push 0x45dcdc
mov eax, dword fs:[0]
push eax
sub esp, 0x278
mov eax, dword [0x47b5b0]
xor eax, esp
mov dword [esp + 0x270], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47b5b0]
xor eax, esp
push eax
lea eax, [esp + 0x28c]
mov dword fs:[0], eax
mov edi, dword [esp + 0x29c]
push edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x30], edi
call fcn.00401860
push 1
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x29c], 0
call fcn.004036d0
mov eax, dword [eax]
mov ecx, 0x46df28
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4058f8
test dx, dx
je 0x4058f4
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4058f8
add eax, 4
add ecx, 4
test dx, dx
jne 0x4058d2
xor eax, eax
jmp 0x4058fd
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
mov eax, dword [esp + 0x1c]
setne bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405922
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x405936
push 1
push 0x46df28
lea ecx, [esp + 0x20]
call fcn.00402630
push 3
push 0x46df2c
lea ecx, [esp + 0x20]
call fcn.00402630
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x34]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40597c
mov dword [esp + 0x294], eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x405b95
mov esi, dword [sym.imp.KERNEL32.dll_FindNextFileW]
lea ecx, [esp + 0x34]
push ecx
push ebx
call esi
test eax, eax
je 0x405b68
lea edx, [esp + 0x34]
push edx
push ebx
call esi
test eax, eax
je 0x405b68
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, edi
test byte [esp + 0x34], 0x10
push 0x5c
je 0x405a5e
mov eax, dword [esp + 0x1c]
push eax
call fcn.00432ad9
add esp, 8
test eax, eax
jne 0x4059d3
or eax, 0xffffffff
jmp 0x4059d9
sub eax, dword [esp + 0x18]
sar eax, 1
inc eax
push eax
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x20]
call fcn.00402540
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x298], 1
call fcn.00401940
mov byte [esp + 0x294], 0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405a23
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x30]
push eax
call fcn.00403810
add esp, 0xc
mov byte [esp + 0x294], 2
mov eax, dword [eax]
push eax
call fcn.00405860
mov byte [esp + 0x298], 0
mov eax, dword [esp + 0x2c]
add esp, 4
jmp 0x405b34
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00432ad9
add esp, 8
test eax, eax
jne 0x405a74
or eax, 0xffffffff
jmp 0x405a7a
sub eax, dword [esp + 0x18]
sar eax, 1
inc eax
push eax
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x20]
call fcn.00402540
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x298], 3
call fcn.00401940
mov byte [esp + 0x294], 0
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 0x405ac4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x38]
push eax
call fcn.00403810
mov esi, dword [eax]
add esp, 0xc
push esi
call ebp
cmp eax, 0xffffffff
je 0x405af4
test al, 1
je 0x405af4
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405b14
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.00403810
mov eax, dword [eax]
add esp, 0xc
push eax
call edi
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405b50
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x34]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4059b0
mov edi, dword [esp + 0x2c]
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov dword [esp + 0x294], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405ba1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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.00431fec
add esp, 0x284
ret