Function at 0x408890
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
mov eax, edx
mov dword [ebp - 0x28], 0xf
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
push edi
mov edi, dword [ebp + 0x14]
lea ecx, [eax + 0x24]
mov dword [ebp - 0x10], eax
add eax, 0x30
mov dword [ebp - 0x34], eax
mov dword [ebp - 4], ebx
mov dword [edi + 8], 1
mov dword [edi], 1
mov dword [edi + 4], 2
mov eax, dword [esi]
mov dword [ebp - 0x24], 0xfa
mov dword [ebp - 0x18], ecx
test eax, eax
jne 0x4088ed
mov dword [edi + 4], 0x57
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0xc]
xor ecx, ecx
mov dword [eax + 8], 0
mov eax, dword [esi]
mov word [eax + 2], cx
mov eax, dword [esi]
mov dword [eax + 4], ecx
mov eax, dword [esi]
movzx ecx, word [eax + 0xe]
mov dword [0x457638], ecx
cmp word [edx + ecx*2 - 2], 0x2a
jne 0x40892f
nop dword [eax + eax]
dec ecx
mov dword [0x457638], ecx
cmp word [edx + ecx*2 - 2], 0x2a
je 0x408920
cmp word [edx + ecx*2 - 2], 0x5c
jne 0x40893e
dec ecx
mov dword [0x457638], ecx
mov eax, dword [0x4441fc]
push 0xf0
mov dword [edx + ecx*2], eax
mov ax, word [0x444200]
push 0
push dword [0x45764c]
mov word [edx + ecx*2 + 4], ax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [ebp - 8], edx
test edx, edx
jne 0x40899e
mov eax, dword [esi]
push dword [eax + 0x10]
push edx
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esi]
mov dword [eax + 0x10], 0
xor al, al
mov dword [edi], 3
mov dword [edi + 4], 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [0x457708]
xorps xmm0, xmm0
movups xmmword [edx], xmm0
mov ecx, dword [esi]
mov ax, word [0x457638]
push 0
push 0
push dword [ebp - 0x18]
mov word [ecx + 0xe], ax
mov eax, dword [0x457638]
push dword [0x457704]
inc eax
push dword [ebp + 0xc]
mov dword [0x457638], eax
movzx eax, ax
mov ecx, eax
mov dword [edx + 0x18], 0
inc eax
mov dword [ebp - 0x30], ecx
mov dword [edx + 0x14], 0xf
mov word [edx + 0xc], ax
mov word [edx + 0x1c], ax
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov edx, dword [ebp - 8]
mov dword [edx + 0x10], eax
cmp eax, 0xffffffff
je 0x4090bc
push 0x7d0
push 0
push dword [0x45764c]
mov edi, 1
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp + 8]
mov esi, eax
mov eax, dword [ecx]
mov dword [eax + 0x14], esi
test esi, esi
je 0x409047
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x14]
lea eax, [eax + eax*2]
shl eax, 3
push eax
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [ebp - 0x14], ebx
mov dword [esi], ebx
test ebx, ebx
je 0x409044
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
inc dword [ecx + 8]
xor eax, eax
mov word [esi + 4], ax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x38], edi
mov ecx, dword [eax]
mov eax, ecx
shr eax, 4
and al, 1
mov dword [ebp - 0x3c], eax
je 0x408ab3
test ecx, 0x400
jne 0x408e5a
mov ecx, dword [ebp - 0x10]
cmp word [ecx + 0x50], 0x2e
jne 0x408ab6
movzx eax, word [ecx + 0x52]
test ax, ax
je 0x408e5a
cmp eax, 0x2e
jne 0x408ab6
cmp word [ecx + 0x54], 0
je 0x408e5a
jmp 0x408ab6
mov ecx, dword [ebp - 0x10]
lea eax, [ecx + 0x50]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x408ae1
push 0x457630
mov edx, 0x104
mov ecx, eax
call fcn.00402470
test eax, eax
js 0x408ade
movzx ecx, word [0x457630]
jmp 0x408afe
mov eax, dword [ebp - 0x20]
mov dword [0x457630], 0
test eax, eax
je 0x408afc
cmp word [eax], 0
je 0x408afc
mov ecx, 0x104
jmp 0x408afe
xor ecx, ecx
mov eax, dword [ebp - 8]
mov edx, edi
add eax, 0xc
shl edx, 4
add eax, edx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x2c], edx
mov ax, word [eax]
add ax, cx
cmp byte [ebp - 0x3c], 0
movzx eax, ax
mov dword [ebp - 0x14], eax
je 0x408bfa
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov ecx, dword [edx + 8]
mov eax, dword [edx + 0x14]
lea esi, [eax + ecx*8]
lea eax, [ecx + 1]
mov ecx, dword [ebp + 0xc]
mov dword [edx + 8], eax
sub ecx, 2
xor eax, eax
mov word [esi + 4], ax
mov dword [esi], eax
mov eax, dword [ebp - 0x1c]
movzx eax, ax
add eax, eax
push eax
mov eax, dword [ebp - 0x40]
push dword [ebp - 0x20]
movzx eax, word [eax]
lea eax, [ecx + eax*2]
push eax
call fcn.0043c9e0
mov eax, dword [ebp - 0x14]
inc edi
mov ecx, dword [ebp + 0xc]
add esp, 0xc
movzx eax, ax
lea ecx, [ecx + eax*2]
mov eax, dword [0x4441fc]
mov dword [ecx - 2], eax
mov ax, word [0x444200]
mov word [ecx + 2], ax
mov eax, dword [ebp - 0x28]
cmp edi, eax
jne 0x408bb5
add eax, eax
mov dword [ebp - 0x28], eax
shl eax, 4
push eax
push dword [ebp - 8]
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [ebp - 8], eax
test eax, eax
je 0x408f81
push dword [0x457708]
push 0
push 0
push dword [ebp - 0x18]
push dword [0x457704]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov edx, dword [ebp - 8]
mov ecx, edi
add ecx, ecx
mov dword [edx + ecx*8], eax
cmp eax, 0xffffffff
jne 0x408cc1
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 8]
mov edi, dword [ebp + 0xc]
movzx eax, word [edx + eax + 0xc]
mov dword [edi + eax*2 - 2], 0x2a
mov edi, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x44]
add dword [edi + 0x50], eax
mov eax, dword [ebp + 8]
adc dword [edi + 0x54], 0
mov ecx, dword [eax]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x44]
add dword [ecx + 4], eax
mov ecx, dword [ebp - 0x10]
mov eax, dword [edi + 0x54]
cmp eax, dword [ecx + 0x14]
ja 0x40902c
jb 0x408c35
mov eax, dword [edi + 0x50]
cmp eax, dword [ecx + 0x10]
ja 0x40902c
mov eax, dword [ebp + 8]
mov edx, 0xffff
mov eax, dword [eax]
cmp word [eax + 2], dx
mov edx, dword [ebp - 0x2c]
je 0x409014
cmp dword [ecx + 0x40], 0
jne 0x408ffc
cmp dword [ecx + 0x44], 0x7fff8000
ja 0x408ffc
cmp dword [eax + 4], 0x7fff8000
ja 0x408ffc
mov ecx, dword [ebp - 8]
movzx eax, word [esi + 4]
add ecx, edx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x40], eax
mov edx, dword [ecx + 4]
cmp eax, edx
jne 0x408d14
lea eax, [edx + edx]
mov dword [ecx + 4], eax
lea eax, [eax + eax*2]
shl eax, 3
push eax
push dword [esi]
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x408f89
movzx edx, word [esi + 4]
mov ecx, edx
mov dword [esi], eax
lea ecx, [ecx + ecx*2]
lea ebx, [eax + ecx*8]
mov eax, edx
jmp 0x408d17
mov eax, dword [ebp - 0x14]
inc eax
mov word [edx + ecx*8 + 0xc], ax
mov eax, dword [ebp + 8]
push 0x168
push 0
push dword [0x45764c]
mov eax, dword [eax]
mov eax, dword [eax + 8]
dec eax
mov dword [edx + ecx*8 + 4], 0xf
mov dword [edx + ecx*8 + 8], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [ebp - 0x14], ebx
mov dword [esi], ebx
test ebx, ebx
jne 0x408a67
mov ecx, dword [ebp + 0x14]
mov ebx, dword [ebp - 4]
test edi, edi
je 0x4090b6
jmp 0x40904a
mov eax, dword [ebp - 0x40]
inc eax
mov word [esi + 4], ax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x44]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x14]
movzx eax, ax
add eax, eax
push eax
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebx + 4], eax
test eax, eax
je 0x408f89
mov ecx, dword [ebp - 0x2c]
movzx ecx, word [ecx + 0xc]
add ecx, ecx
push ecx
push dword [ebp + 0xc]
push eax
call fcn.0043c9e0
mov eax, dword [ebp - 0x1c]
inc eax
movzx eax, ax
add eax, eax
push eax
mov eax, dword [ebp - 0x2c]
push dword [ebp - 0x20]
movzx ecx, word [eax + 0xc]
mov eax, dword [ebx + 4]
lea eax, [eax + ecx*2]
add eax, 0xfffffffe
push eax
call fcn.0043c9e0
mov eax, dword [ebp - 0x30]
add esp, 0x18
movzx ecx, ax
mov eax, dword [ebx + 4]
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
lea eax, [eax + ecx*2]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movzx eax, ax
mov ecx, 0x100
mov dword [ebp - 0x40], eax
cmp ax, cx
ja 0x408fe4
mov ecx, dword [ebp - 0x14]
lea eax, [ecx - 1]
sub ecx, dword [ebp - 0x30]
cmp dword [0x4574d4], 0
mov word [ebx], ax
mov dword [ebp - 0x14], ecx
jne 0x408dee
mov eax, dword [ebp - 0x10]
mov edx, dword [ebx + 4]
push 0x120089
mov ecx, dword [eax + 0x20]
call fcn.00403f10
add esp, 4
test al, al
je 0x408f91
push dword [ebp - 0x34]
mov eax, dword [ebp - 0x10]
add eax, 0x38
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
test eax, eax
je 0x408fcc
lea eax, [ebx + 0x12]
push eax
lea eax, [ebx + 0x10]
push eax
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
test eax, eax
je 0x408fcc
mov eax, dword [ebp - 0x18]
mov ax, word [eax]
and ax, 0x27
movzx ecx, ax
mov word [ebx + 0x14], ax
mov eax, dword [ebp - 0x40]
cmp word [ebp - 0x14], ax
je 0x408e43
or ecx, 0x80
mov word [ebx + 0x14], cx
mov eax, dword [ebp + 8]
mov eax, dword [eax]
inc word [eax + 2]
add dword [edi + 0x60], 1
adc dword [edi + 0x64], 0
add ebx, 0x18
mov dword [ebp - 0x14], ebx
mov edi, dword [ebp - 0x38]
mov eax, edi
mov ebx, dword [ebp - 8]
shl eax, 4
add ebx, 8
add ebx, eax
nop word [eax + eax]
test edi, edi
je 0x4090b3
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
test eax, eax
jne 0x408fab
push dword [ebp - 0x18]
push dword [ebx - 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x408f21
movzx eax, word [esi + 4]
test ax, ax
jne 0x408ec1
push dword [esi]
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [esi], 0
jmp 0x408ee3
cmp dword [ebx - 4], eax
jbe 0x408ee3
lea eax, [eax + eax*2]
shl eax, 3
push eax
push dword [esi]
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x408ee3
mov dword [esi], eax
push dword [ebx - 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp + 8]
dec edi
mov ecx, dword [ebx - 0x10]
sub ebx, 0x10
mov eax, dword [eax]
mov eax, dword [eax + 0x14]
lea esi, [eax + ecx*8]
movzx eax, word [esi + 4]
lea ecx, [eax + eax*2]
mov eax, dword [esi]
lea eax, [eax + ecx*8]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
movzx eax, word [ebx + 4]
mov dword [ecx + eax*2 - 2], 0x2a
jmp 0x408e70
mov eax, dword [ebp + 8]
mov ebx, dword [ebp - 0x14]
mov ecx, dword [eax]
mov eax, dword [ebp - 0x24]
cmp dword [ecx + 8], eax
jne 0x408a67
add eax, eax
mov dword [ebp - 0x24], eax
shl eax, 3
push eax
push dword [ecx + 0x14]
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x408d01
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 8]
mov ecx, dword [ecx]
mov dword [ecx + 0x14], eax
mov ecx, edi
add ecx, ecx
mov ecx, dword [edx + ecx*8 + 8]
lea esi, [eax + ecx*8]
movzx eax, word [esi + 4]
lea ecx, [eax + eax*2]
mov eax, dword [esi]
lea ebx, [eax + ecx*8]
mov dword [ebp - 0x14], ebx
jmp 0x408a67
mov edi, dword [ebp - 0x38]
jmp 0x408d01
mov edi, dword [ebp - 0xc]
jmp 0x408d01
mov eax, dword [ebp + 0x14]
mov ecx, eax
mov edi, dword [ebp - 0xc]
mov dword [eax], 7
mov dword [eax + 4], 5
jmp 0x408d04
mov ebx, dword [ebp - 4]
mov ecx, ebx
call fcn.004036e0
mov eax, dword [ebp + 0x14]
mov ecx, eax
mov dword [eax], 7
mov dword [eax + 4], 0x4c7
jmp 0x408d07
mov ecx, dword [ebp + 0x14]
mov edi, dword [ebp - 0xc]
mov dword [ecx], 7
mov dword [ecx + 4], 0xd
jmp 0x408d04
mov ecx, dword [ebp + 0x14]
mov edi, dword [ebp - 0xc]
mov dword [ecx], 9
mov dword [ecx + 4], 0xce
jmp 0x408d04
mov ecx, dword [ebp + 0x14]
mov edi, dword [ebp - 0xc]
mov dword [ecx], 9
mov dword [ecx + 4], 0xdf
jmp 0x408d04
mov ecx, dword [ebp + 0x14]
mov edi, dword [ebp - 0xc]
mov dword [ecx], 9
mov dword [ecx + 4], 0x50c
jmp 0x408d04
mov ecx, dword [ebp + 0x14]
mov edi, dword [ebp - 0xc]
mov dword [ecx], 7
mov dword [ecx + 4], 1
jmp 0x408d04
mov ebx, dword [ebp - 4]
mov ecx, dword [ebp + 0x14]
mov esi, dword [ebp + 8]
mov eax, dword [esi]
mov eax, dword [eax + 4]
sub dword [ebx + 0x50], eax
sbb dword [ebx + 0x54], 0
mov eax, dword [esi]
movzx eax, word [eax + 2]
cdq
sub dword [ebx + 0x60], eax
sbb dword [ebx + 0x64], edx
cmp dword [ecx], 1
jg 0x409078
mov dword [ecx], 3
mov dword [ecx + 4], 8
mov ebx, dword [ebp - 8]
mov esi, edi
shl esi, 4
add esi, ebx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_FindClose]
lea esi, [esi - 0x10]
sub edi, 1
jne 0x409082
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
call fcn.004082e0
push ebx
push edi
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 4]
mov edi, dword [ebp + 0x14]
mov esi, dword [ebp + 8]
push dword [ebp - 8]
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [esi]
cmp word [ecx + 2], 0
jne 0x4090f0
mov eax, dword [ecx + 4]
sub dword [ebx + 0x50], eax
sbb dword [ebx + 0x54], 0
mov ecx, dword [esi]
call fcn.004082e0
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ecx + 8]
cmp dword [ebp - 0x24], eax
jbe 0x409116
shl eax, 3
push eax
push dword [ecx + 0x14]
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x409116
mov ecx, dword [esi]
mov dword [ecx + 0x14], eax
mov dword [edi], 0
mov al, 1
mov dword [edi + 4], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret