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

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x258
test eax, eax
push ebx
jle 0x406a2d
mov ebx, dword [esp + 0x260]
test ebx, ebx
je 0x406a2d
cmp byte [ebx], 0
je 0x406a2d
push ebp
push esi
push edi
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x10]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x10]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0xf], 0x5c
je 0x4068a4
mov edi, 0x42c770
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x42c76c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
xor ebp, ebp
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x50
lea edi, [esp + 0x128]
rep stosd dword es:[edi], eax
test ebp, ebp
jne 0x40690e
lea eax, [esp + 0x128]
lea ecx, [esp + 0x10]
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_FindFirstFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x406a20
test ebp, ebp
je 0x406a20
jmp 0x406925
lea edx, [esp + 0x128]
push edx
push ebp
call dword [sym.imp.KERNEL32.DLL_FindNextFileA]
test eax, eax
je 0x406a15
cmp byte [esp + 0x154], 0x2e
jne 0x406949
mov al, byte [esp + 0x155]
test al, al
je 0x4068e2
cmp al, 0x2e
jne 0x406949
mov al, byte [esp + 0x156]
test al, al
je 0x4068e2
lea eax, [esp + 0x10]
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcpyA]
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0xf], 0x5c
je 0x406998
mov edi, 0x42c770
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x154]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x128]
mov ecx, edx
and eax, 0x10
and ecx, 3
cmp al, 0x10
rep movsb byte es:[edi], byte [esi]
jne 0x4069fb
mov ecx, dword [esp + 0x270]
lea edx, [esp + 0x10]
dec ecx
push ecx
push edx
call fcn.00406810
lea eax, [esp + 0x18]
push eax
call fcn.004066a0
add esp, 0xc
jmp 0x4068e2
lea ecx, [esp + 0x128]
lea edx, [esp + 0x10]
push ecx
push edx
call fcn.004066d0
add esp, 8
jmp 0x4068e2
test ebp, ebp
je 0x406a20
push ebp
call dword [sym.imp.KERNEL32.DLL_FindClose]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x258
ret
mov eax, 1
pop ebx
add esp, 0x258
ret