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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x298
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
lea ebx, [ebp - 0x268]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.0041060c
cmp dword [ebp - 0x1c], 0
mov dword [ebp - 0x270], eax
je 0x406886
lea eax, [0x41b8d8]
lea ecx, [ebp - 0x268]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.00405e38
mov dword [ebp - 0x274], eax
jmp 0x4068a1
lea eax, [ebp - 0x268]
mov ecx, dword [ebp - 0x18]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.00405e38
mov dword [ebp - 0x278], eax
lea eax, [ebp - 0x268]
lea ecx, [ebp - 0x164]
mov edx, esp
mov dword [edx + 4], ecx
mov dword [edx], eax
call sub.KERNEL32.DLL_FindFirstFileA
sub esp, 8
mov ecx, 0xffffffff
mov dword [ebp - 0x168], eax
cmp dword [ebp - 0x168], ecx
jne 0x4068db
mov dword [ebp - 0x10], 0
jmp 0x406ac7
mov dword [ebp - 0x26c], 0
mov eax, dword [ebp - 0x164]
and eax, 0x10
cmp eax, 0
je 0x4069e2
cmp dword [ebp - 0x1c], 0
je 0x4069dd
lea eax, [0x41b8da]
lea ecx, [ebp - 0x164]
add ecx, 0x2c
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.004105bc
cmp eax, 0
je 0x4069dd
lea eax, [0x41b8dc]
lea ecx, [ebp - 0x164]
add ecx, 0x2c
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.004105bc
cmp eax, 0
je 0x4069dd
lea eax, [ebp - 0x268]
mov ecx, dword [ebp - 0x14]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0041060c
lea ecx, [ebp - 0x164]
lea edx, [ebp - 0x268]
add ecx, 0x2c
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [ebp - 0x27c], eax
call fcn.00405e38
mov ecx, 1
lea edx, [ebp - 0x268]
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x24]
mov dword [esp], edx
mov dword [esp + 4], esi
mov dword [esp + 8], 1
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], ebx
mov dword [ebp - 0x280], eax
mov dword [ebp - 0x284], ecx
call fcn.00406818
mov ecx, dword [ebp - 0x26c]
add ecx, eax
mov dword [ebp - 0x26c], ecx
jmp 0x406a7d
lea eax, [ebp - 0x164]
add eax, 0x2c
mov ecx, dword [ebp - 0x18]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.00405b44
cmp eax, 0
je 0x406a7b
lea eax, [ebp - 0x268]
mov ecx, dword [ebp - 0x14]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.0041060c
lea ecx, [ebp - 0x164]
lea edx, [ebp - 0x268]
add ecx, 0x2c
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [ebp - 0x288], eax
call fcn.00405e38
lea ecx, [ebp - 0x164]
lea edx, [ebp - 0x268]
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp - 0x24]
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], edi
mov dword [ebp - 0x28c], eax
call esi
cmp eax, 0
jne 0x406a6a
jmp 0x406aa6
mov eax, dword [ebp - 0x26c]
add eax, 1
mov dword [ebp - 0x26c], eax
jmp 0x406a7d
mov eax, dword [ebp - 0x168]
lea ecx, [ebp - 0x164]
mov edx, esp
mov dword [edx + 4], ecx
mov dword [edx], eax
call sub.KERNEL32.DLL_FindNextFileA
sub esp, 8
cmp eax, 0
jne 0x406aa1
jmp 0x406aa6
jmp 0x4068e5
mov eax, dword [ebp - 0x168]
mov ecx, esp
mov dword [ecx], eax
call sub.KERNEL32.DLL_FindClose
sub esp, 4
mov ecx, dword [ebp - 0x26c]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x290], eax
mov eax, dword [ebp - 0x10]
add esp, 0x298
pop esi
pop edi
pop ebx
pop ebp
ret