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

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x258
test eax, eax
push ebx
jle 0x405553
mov ebx, dword [esp + 0x260]
test ebx, ebx
je 0x405553
cmp byte [ebx], 0
je 0x405553
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 0x4053d4
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 0x40543e
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 0x405546
test ebp, ebp
je 0x405546
jmp 0x405455
lea edx, [esp + 0x128]
push edx
push ebp
call dword [sym.imp.KERNEL32.DLL_FindNextFileA]
test eax, eax
je 0x40553b
cmp byte [esp + 0x154], 0x2e
jne 0x405479
mov al, byte [esp + 0x155]
test al, al
je 0x405412
cmp al, 0x2e
jne 0x405479
mov al, byte [esp + 0x156]
test al, al
je 0x405412
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 0x4054c8
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 0x405521
mov ecx, dword [esp + 0x270]
lea edx, [esp + 0x10]
dec ecx
push ecx
push edx
call fcn.00405340
add esp, 8
jmp 0x405412
lea eax, [esp + 0x128]
lea ecx, [esp + 0x10]
push eax
push ecx
call fcn.00405180
add esp, 8
jmp 0x405412
test ebp, ebp
je 0x405546
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