Function at 0x40a810
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4109d8
mov eax, dword fs:[0]
push eax
sub esp, 0x2a4
mov eax, dword [0x419478]
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 ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x2b0], ecx
xor ecx, ecx
push 0xffffffffffffffff
push ecx
mov word [ebp - 0x58], cx
lea ecx, [ebp - 0x58]
push eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
call fcn.004054b0
lea eax, [ebp - 0x58]
mov dword [ebp - 4], 0
push eax
call fcn.0040b1e0
add esp, 4
test al, al
je 0x40a89a
lea eax, [ebp - 0x58]
push 0
push eax
call fcn.0040ab60
add esp, 8
test al, al
je 0x40aa71
xor eax, eax
mov dword [ebp - 0x2c], 7
push 0xffffffffffffffff
push eax
mov word [ebp - 0x40], ax
lea ecx, [ebp - 0x40]
lea eax, [ebp - 0x58]
mov dword [ebp - 0x30], 0
push eax
call fcn.004054b0
cmp dword [esi + 0x14], 8
mov byte [ebp - 4], 1
jb 0x40a8c9
mov esi, dword [esi]
lea eax, [ebp - 0x40]
push esi
push eax
call fcn.004096d0
push 0x250
lea eax, [ebp - 0x2a8]
push 0
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0x14
lea ecx, [ebp - 0x2a8]
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push 0
push 0
push 0
push ecx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov dword [ebp - 0x2ac], eax
cmp eax, 0xffffffff
je 0x40aa48
nop dword [eax]
cmp byte [ebp + 0x10], 0
je 0x40a933
test byte [ebp - 0x2a8], 0x10
je 0x40aa25
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
cmp word [ebp - 0x27c], ax
je 0x40a96f
lea eax, [ebp - 0x27c]
lea edx, [eax + 2]
nop dword [eax]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40a960
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x27c]
push eax
lea ecx, [ebp - 0x28]
call fcn.00405670
mov edi, dword [ebp - 0x14]
lea ecx, [ebp - 0x28]
mov edx, dword [ebp - 0x28]
cmp edi, 8
mov ebx, dword [ebp - 0x18]
mov esi, 1
cmovae ecx, edx
mov byte [ebp - 4], 2
cmp ebx, esi
cmovb esi, ebx
test esi, esi
je 0x40a9ca
mov edx, 0x4116b0
nop dword [eax + eax]
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x40aaa2
add ecx, 2
add edx, 2
sub esi, 1
jne 0x40a9b0
mov edx, dword [ebp - 0x28]
xor eax, eax
test eax, eax
jne 0x40a9d7
cmp ebx, 1
jb 0x40a9d7
jbe 0x40aa07
push 2
cmp edi, 8
lea eax, [ebp - 0x28]
push 0x412988
cmovae eax, edx
push ebx
push eax
call fcn.00404c90
add esp, 0x10
test eax, eax
je 0x40aa07
mov ecx, dword [ebp - 0x2b0]
lea eax, [ebp - 0x28]
push eax
call fcn.00409d60
mov edi, dword [ebp - 0x14]
mov byte [ebp - 4], 1
cmp edi, 8
jb 0x40aa1f
lea eax, [edi + 1]
push eax
push dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
call fcn.004058f0
mov eax, dword [ebp - 0x2ac]
lea ecx, [ebp - 0x2a8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
mov eax, dword [ebp - 0x2ac]
jne 0x40a920
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x40aa5d
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.004058f0
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
mov eax, dword [ebp - 0x44]
cmp eax, 8
jb 0x40aa86
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.004058f0
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.0040c8cf
mov esp, ebp
pop ebp
ret
movzx eax, word [ecx]
cmp ax, word [edx]
mov edx, dword [ebp - 0x28]
sbb eax, eax
and eax, 0xfffffffe
inc eax
jmp 0x40a9cc