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

Disassembly:
mov eax, 0x4d8258
call fcn.004aef44
sub esp, 0x190
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [0x51f03c]
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 2
call fcn.0040e663
lea eax, [ebp + 8]
push 0x5108d0
push eax
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x14], ebx
call fcn.004c613f
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.004c5fe3
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 3
call fcn.004c5eaa
mov esi, dword [sym.imp.KERNEL32.DLL_FindFirstFileA]
lea eax, [ebp - 0x19c]
push eax
push dword [ebp - 0x10]
call esi
cmp eax, 0xffffffff
mov dword [ebp - 0x18], eax
je 0x40eb13
mov ecx, edi
call fcn.0040ecb4
lea eax, [ebp - 0x170]
push 0x5108cc
push eax
call fcn.004b0bc0
pop ecx
test eax, eax
pop ecx
je 0x40eae7
lea eax, [ebp - 0x170]
push 0x5108c8
push eax
call fcn.004b0bc0
pop ecx
test eax, eax
pop ecx
je 0x40eae7
test byte [ebp - 0x19c], 0x10
je 0x40eae7
lea eax, [ebp - 0x170]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.004c613f
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 5
call fcn.004c5fe3
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.004c5eaa
cmp dword [ebp + 0x18], ebx
je 0x40ea9d
push ebx
push ecx
lea eax, [ebp + 8]
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
call fcn.004c5c1f
lea eax, [ebp - 0x19c]
lea ecx, [ebp - 0x5c]
push eax
call fcn.0040e6db
push dword [ebp + 0x14]
mov eax, dword [edi]
lea ecx, [ebp - 0x5c]
push ecx
mov ecx, edi
call dword [eax + 0xc]
inc dword [ebp - 0x14]
cmp dword [ebp + 0x20], ebx
je 0x40ea9d
push dword [ebp + 0x20]
call dword [sym.imp.KERNEL32.DLL_InterlockedIncrement]
cmp dword [ebp + 0x10], ebx
je 0x40eae7
push dword [ebp + 0x20]
lea eax, [ebp + 0xc]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
call fcn.004c5c1f
push ecx
lea ecx, [ebp - 0x10]
mov eax, esp
mov dword [ebp - 0x24], esp
push 0x510870
push ecx
push eax
mov byte [ebp - 4], 6
call fcn.004c613f
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.0040e965
add dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x1c]
cmp eax, ebx
je 0x40eaf2
cmp dword [eax], ebx
jne 0x40eb0a
lea eax, [ebp - 0x19c]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_FindNextFileA]
test eax, eax
jne 0x40e9e3
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_FindClose]
mov eax, dword [ebp + 0x1c]
cmp eax, ebx
je 0x40eb22
cmp dword [eax], ebx
jne 0x40ebff
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp + 0x18]
push eax
call fcn.004c60d9
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 7
call fcn.004c5fe3
lea ecx, [ebp + 0x18]
mov byte [ebp - 4], 3
call fcn.004c5eaa
lea eax, [ebp - 0x19c]
push eax
push dword [ebp - 0x10]
call esi
mov esi, eax
cmp esi, 0xffffffff
je 0x40ebff
test byte [ebp - 0x19c], 0x10
jne 0x40ebd7
lea eax, [ebp - 0x170]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp + 0x18]
push eax
call fcn.004c613f
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 8
call fcn.004c5fe3
lea ecx, [ebp + 0x18]
mov byte [ebp - 4], 3
call fcn.004c5eaa
push ebx
push ecx
lea eax, [ebp + 8]
mov ecx, esp
mov dword [ebp + 0x10], esp
push eax
call fcn.004c5c1f
lea eax, [ebp - 0x19c]
lea ecx, [ebp - 0x5c]
push eax
call fcn.0040e6db
push dword [ebp + 0x14]
mov eax, dword [edi]
lea ecx, [ebp - 0x5c]
push ecx
mov ecx, edi
call dword [eax + 0xc]
inc dword [ebp - 0x14]
cmp dword [ebp + 0x20], ebx
je 0x40ebd7
push dword [ebp + 0x20]
call dword [sym.imp.KERNEL32.DLL_InterlockedIncrement]
mov eax, dword [ebp + 0x1c]
cmp eax, ebx
je 0x40ebe2
cmp dword [eax], ebx
jne 0x40ebf8
lea eax, [ebp - 0x19c]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_FindNextFileA]
test eax, eax
jne 0x40eb63
push esi
call dword [sym.imp.KERNEL32.DLL_FindClose]
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 2
call fcn.0040e6d3
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.004c5eaa
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call fcn.004c5eaa
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.004c5eaa
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0x1c