Function at 0x40a8d0
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff6b4
xor eax, eax
mov ecx, 0x100
push ebx
push esi
push edi
mov esi, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov dword [ebp - 8], eax
push esi
lea edi, [ebp - 0x94c]
mov esi, 0x4d1190
rep movsd dword es:[edi], dword [esi]
pop esi
push esi
push ebx
push str.expath__:_path_s_nmax_d_n
push 3
call fcn.00409f1c
add esp, 0x10
push 0x5c
push ebx
call fcn.004b6900
add esp, 8
mov edi, eax
test eax, eax
je 0x40a93d
mov edx, edi
lea ecx, [ebp - 0x94c]
sub edx, ebx
inc edx
push edx
push ebx
push ecx
call fcn.004b68b0
add esp, 0xc
sub edi, ebx
mov byte [ebp + edi - 0x94b], 0
lea eax, [ebp - 0x54c]
push eax
push ebx
call sub.KERNEL32.DLL_FindFirstFileA
mov edi, eax
cmp eax, 0xffffffff
jne 0x40a981
mov edx, dword [ebp + 0xc]
xor eax, eax
mov edi, ebx
mov ecx, dword [edx]
mov esi, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40ab19
lea edx, [ebp - 0x520]
push edx
lea ecx, [ebp - 0x94c]
push ecx
push 0x4d3886
mov eax, dword [ebp - 8]
inc dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov ecx, dword [edx + eax*4]
push ecx
call fcn.004ba3e0
add esp, 0x10
jmp 0x40a9dc
test byte [ebp - 0x54c], 0x10
jne 0x40a9dc
lea eax, [ebp - 0x520]
push eax
lea edx, [ebp - 0x94c]
push edx
push str._s_s
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + ecx*4]
push edx
call fcn.004ba3e0
add esp, 0x10
lea ecx, [ebp - 0x54c]
push ecx
push edi
call sub.KERNEL32.DLL_FindNextFileA
test eax, eax
je 0x40a9f2
cmp esi, dword [ebp - 8]
jg 0x40a9ab
push edi
call sub.KERNEL32.DLL_FindClose
xor eax, eax
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, edx
mov dword [ebp - 0xc], ecx
jmp 0x40aad7
mov edi, dword [ebp - 4]
inc edi
mov eax, dword [ebp + 0xc]
lea ebx, [eax + edi*4]
mov eax, dword [ebp - 0xc]
mov esi, eax
cmp edi, dword [ebp - 8]
jge 0x40aad0
mov eax, dword [esi]
mov edx, dword [ebx]
mov cl, byte [eax]
cmp cl, byte [edx]
jne 0x40aa42
test cl, cl
je 0x40aa42
mov cl, byte [eax + 1]
cmp cl, byte [edx + 1]
jne 0x40aa42
add eax, 2
add edx, 2
test cl, cl
jne 0x40aa26
jbe 0x40aac3
mov eax, dword [esi]
push esi
push edi
mov edi, eax
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea esi, [ebp - 0x40c]
xchg edi, esi
mov edx, ecx
mov eax, edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
mov edx, dword [ebx]
mov eax, dword [esi]
push esi
mov esi, eax
push edi
xor eax, eax
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
mov eax, dword [ebx]
pop esi
push esi
mov esi, eax
push edi
xor eax, eax
lea edi, [ebp - 0x40c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
inc edi
add ebx, 4
cmp edi, dword [ebp - 8]
jl 0x40aa22
inc dword [ebp - 4]
add dword [ebp - 0xc], 4
mov eax, dword [ebp - 8]
dec eax
cmp eax, dword [ebp - 4]
jg 0x40aa0a
xor edx, edx
mov dword [ebp - 4], edx
mov ecx, dword [ebp + 0xc]
mov ebx, ecx
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jge 0x40ab16
mov edx, dword [ebx]
push edx
push str.expath__:_file_s_n
push 3
call fcn.00409f1c
add esp, 0xc
inc dword [ebp - 4]
add ebx, 4
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 8]
jl 0x40aaf6
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret