Function at 0x489770
Capabilities:
Check if file exists
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4eb3fa
mov eax, dword fs:[0]
push eax
sub esp, 0x308
mov eax, dword [0x522104]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, edx
mov dword [ebp - 0x29c], eax
mov edi, ecx
mov dword [ebp - 0x294], edi
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x298], ecx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x288], 0
mov dword [ebp - 0x290], ecx
test cl, cl
je 0x489811
push 1
xorps xmm0, xmm0
mov dword [ebp - 0x2bc], 0
push 0x5081ec
lea ecx, [ebp - 0x2cc]
mov dword [ebp - 0x2b8], 0
movups xmmword [ebp - 0x2cc], xmm0
call fcn.0040aa50
lea esi, [ebp - 0x2cc]
mov dword [ebp - 4], 0
mov eax, 1
jmp 0x48982b
push eax
lea ecx, [ebp - 0x314]
call fcn.0040ea10
mov esi, eax
mov dword [ebp - 4], 1
mov eax, 2
mov ecx, dword [edi + 0x10]
mov dword [ebp - 0x288], eax
mov dword [ebp - 0x284], eax
mov eax, 0x5c
mov word [ebp - 0x14], ax
cmp ecx, 0x7ffffffe
je 0x489c19
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x489859
mov eax, dword [edi]
push 1
lea edx, [ebp - 0x14]
push edx
push ecx
push eax
push ecx
push dword [ebp - 0x28c]
lea ecx, [ebp - 0x2e4]
call fcn.0040a4c0
mov eax, dword [ebp - 0x284]
or eax, 4
mov dword [ebp - 0x284], eax
mov dword [ebp - 0x288], eax
mov dword [ebp - 4], 2
cmp dword [esi + 0x14], 8
mov eax, dword [esi + 0x10]
jb 0x48989a
mov esi, dword [esi]
push eax
push esi
lea ecx, [ebp - 0x2e4]
call fcn.0040a6b0
mov dword [ebp - 0x1c], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x2c], xmm0
mov dword [ebp - 0x18], 0
xor ecx, ecx
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x2c], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x1c], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
or dword [ebp - 0x284], 8
lea ecx, [ebp - 0x2e4]
call fcn.0040ab30
mov eax, dword [ebp - 0x284]
test al, 2
je 0x489916
and eax, 0xfffffffd
lea ecx, [ebp - 0x314]
mov dword [ebp - 0x284], eax
call fcn.0040ab30
mov eax, dword [ebp - 0x284]
mov byte [ebp - 4], 6
test al, 1
je 0x489932
and eax, 0xfffffffe
lea ecx, [ebp - 0x2cc]
mov dword [ebp - 0x284], eax
call fcn.0040ab30
xor ecx, ecx
call fcn.0048ff80
push 0
xor ecx, ecx
lea edx, [ebp - 0x280]
test al, al
lea eax, [ebp - 0x2c]
push 0
push 0
setne cl
cmp dword [ebp - 0x18], 8
push edx
cmovae eax, dword [ebp - 0x2c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
mov dword [ebp - 0x30], esi
mov byte [ebp - 4], 7
cmp esi, 0xffffffff
jne 0x489984
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
jne 0x489c1e
jmp 0x489bf1
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x288], eax
nop dword [eax]
mov eax, dword [ebp - 0x280]
shr eax, 4
and al, 1
mov dword [ebp - 0x28c], eax
je 0x489a2c
mov ecx, 0x502774
lea eax, [ebp - 0x254]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4899d8
test dx, dx
je 0x4899d4
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4899d8
add eax, 4
add ecx, 4
test dx, dx
jne 0x4899b2
xor eax, eax
jmp 0x4899dd
sbb eax, eax
or eax, 1
test eax, eax
je 0x489bb6
mov eax, 0x50bbc8
lea ecx, [ebp - 0x254]
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x489a16
test dx, dx
je 0x489a12
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x489a16
add ecx, 4
add eax, 4
test dx, dx
jne 0x4899f0
xor eax, eax
jmp 0x489a1b
sbb eax, eax
or eax, 1
test eax, eax
je 0x489bb6
cmp byte [ebp - 0x288], 0
jne 0x489a9d
cmp byte [ebp - 0x290], 0
je 0x489a57
mov ecx, dword [ebp - 0x29c]
mov eax, ecx
cmp dword [ecx + 0x14], 8
jb 0x489a45
mov eax, dword [ecx]
push eax
lea eax, [ebp - 0x254]
push eax
call dword [sym.imp.SHLWAPI.dll_PathMatchSpecW]
test eax, eax
je 0x489a90
mov eax, dword [ebp - 0x298]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x489c14
mov eax, dword [eax]
mov edi, dword [eax + 8]
lea eax, [ebp - 0x280]
push eax
push dword [ebp - 0x294]
mov ecx, edi
call dword [0x4ee33c]
mov ecx, dword [ebp - 0x14]
call edi
mov edi, dword [ebp - 0x294]
cmp byte [ebp - 0x28c], 0
je 0x489bb6
cmp byte [ebp - 0x290], 0
je 0x489bb6
mov ecx, dword [edi + 0x10]
mov eax, 0x5c
mov word [ebp - 0x14], ax
cmp ecx, 0x7ffffffe
je 0x489c19
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x489acc
mov eax, dword [edi]
push 1
lea edx, [ebp - 0x14]
push edx
push ecx
push eax
push ecx
push dword [ebp - 0x28c]
lea ecx, [ebp - 0x2fc]
call fcn.0040a4c0
or dword [ebp - 0x284], 0x10
lea ecx, [ebp - 0x254]
mov byte [ebp - 4], 8
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x489b00
sub ecx, edx
lea eax, [ebp - 0x254]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2fc]
call fcn.0040a6b0
mov dword [ebp - 0x2a4], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x2b4], xmm0
mov dword [ebp - 0x2a0], 0
xor ecx, ecx
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x2b4], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x2a4], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
or dword [ebp - 0x284], 0x20
mov edx, dword [ebp - 0x29c]
push ecx
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x2b4]
push dword [ebp - 0x288]
push dword [ebp - 0x290]
push dword [ebp - 0x298]
call fcn.00489770
add esp, 0x10
lea ecx, [ebp - 0x2b4]
call fcn.0040ab30
lea ecx, [ebp - 0x2fc]
mov byte [ebp - 4], 7
call fcn.0040ab30
lea eax, [ebp - 0x280]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x489990
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0x12
je 0x489bea
lea ecx, [ebp - 0x2c]
call fcn.0040abd0
push eax
push str.Unable_to_enumerate_directory__ls_
push edi
jmp 0x489c2d
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [ebp - 0x2c]
call fcn.0040ab30
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a4c5b
mov esp, ebp
pop ebp
ret
call fcn.004a17ca
call fcn.0040a8d0
lea ecx, [ebp - 0x2c]
call fcn.0040abd0
push eax
push str.Unable_to_enumerate_directory__ls_
push esi
lea ecx, [ebp - 0x2b0]
call fcn.004138d0
push 0x51f1f8
lea eax, [ebp - 0x2b0]
push eax
call fcn.004a765b
int3