Function at 0x405010
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4501b8
mov eax, dword fs:[0]
push eax
sub esp, 0x180
mov eax, dword [0x504070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x184], edi
mov dword [ebp - 0x18c], edi
mov dword [ebp - 0x188], 0
mov dword [ebp - 4], 1
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 8], 0
push 0x460560
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x188], 1
call fcn.00408cc0
add esp, 4
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x180]
cmp dword [ebp - 0x2c], 0x10
lea eax, [ebp - 0x40]
push ecx
cmovae eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.DLL_FindFirstFileA]
mov esi, eax
mov dword [ebp - 0x184], esi
cmp esi, 0xffffffff
je 0x40523b
nop dword [eax]
test byte [ebp - 0x180], 0x10
je 0x40521e
cmp byte [ebp - 0x154], 0
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
jne 0x4050ec
xor eax, eax
jmp 0x4050fe
lea eax, [ebp - 0x154]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4050f5
sub eax, edx
push eax
lea eax, [ebp - 0x154]
push eax
lea ecx, [ebp - 0x28]
call fcn.00406fc0
mov byte [ebp - 4], 3
mov ecx, dword [ebp + 0x2c]
test ecx, ecx
je 0x40529f
mov eax, dword [ecx]
lea edx, [ebp - 0x28]
push edx
mov eax, dword [eax + 8]
call eax
mov bl, al
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x405143
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00407d70
test bl, bl
je 0x40521e
cmp byte [ebp - 0x154], 0
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
jne 0x40516a
xor ecx, ecx
jmp 0x40517c
lea ecx, [ebp - 0x154]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405173
sub ecx, edx
push ecx
lea eax, [ebp - 0x154]
push eax
lea ecx, [ebp - 0x28]
call fcn.00406fc0
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 4
cmp eax, dword [edi + 4]
jae 0x4051e1
mov eax, dword [edi]
lea ecx, [ebp - 0x28]
cmp eax, ecx
ja 0x4051e1
sub ecx, eax
mov eax, 0x2aaaaaab
imul ecx
mov eax, dword [edi + 4]
sar edx, 2
mov esi, edx
shr esi, 0x1f
add esi, edx
cmp eax, dword [edi + 8]
jne 0x4051c4
push ecx
mov ecx, edi
call fcn.00406960
mov eax, dword [edi]
lea ecx, [esi + esi*2]
lea eax, [eax + ecx*8]
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x4051d9
push eax
call fcn.004056c0
mov esi, dword [ebp - 0x184]
jmp 0x405201
mov eax, dword [edi + 4]
cmp eax, dword [edi + 8]
jne 0x4051f1
push ecx
mov ecx, edi
call fcn.00406960
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x405201
lea eax, [ebp - 0x28]
push eax
call fcn.004056c0
add dword [edi + 4], 0x18
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x40521e
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00407d70
lea eax, [ebp - 0x180]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_FindNextFileA]
test eax, eax
jne 0x4050c0
push esi
call dword [sym.imp.KERNEL32.DLL_FindClose]
mov eax, dword [ebp - 0x2c]
cmp eax, 0x10
jb 0x405250
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00407d70
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
mov dword [ebp - 4], 5
mov ecx, dword [ebp + 0x2c]
test ecx, ecx
je 0x405281
mov esi, dword [ecx]
lea eax, [ebp + 8]
cmp ecx, eax
setne dl
movzx edx, dl
push edx
call dword [esi + 0x10]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042cc9c
mov esp, ebp
pop ebp
ret
call fcn.004171c8
int3