Function at 0x491e40
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x57c870]
xor eax, ebp
mov dword [ebp - 8], eax
cmp dword [ebp + 0x1c], 2
jne 0x491e66
cmp dword [ebp + 8], 5
je 0x491e66
mov dword [ebp + 8], 5
cmp dword [0x5fae9c], 0
jne 0x491ef8
mov eax, dword [0x5fae9c]
add eax, 1
mov dword [0x5fae9c], eax
push 0x140
push 0
push 0x5fa5c0
call fcn.005323e0
add esp, 0xc
push 0x140
push 0
push 0x5fa700
call fcn.005323e0
add esp, 0xc
push 0x140
push 0
push 0x5fa840
call fcn.005323e0
add esp, 0xc
push 0x140
push 0
push 0x5fa980
call fcn.005323e0
add esp, 0xc
push 0x140
push 0
push 0x5faac0
call fcn.005323e0
add esp, 0xc
push 0x140
push 0
push 0x5fac00
call fcn.005323e0
add esp, 0xc
mov ecx, dword [ebp + 0x10]
movsx edx, byte [ecx]
test edx, edx
jne 0x491f17
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x208]
push ecx
call fcn.00532580
add esp, 8
jmp 0x491f33
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
push 0x56dd78
lea ecx, [ebp - 0x208]
push ecx
call fcn.00532706
add esp, 0x10
cmp dword [ebp + 0x1c], 1
je 0x491f43
cmp dword [ebp + 0x1c], 2
jne 0x492012
mov edx, dword [ebp + 8]
cmp dword [edx*4 + 0x5fae80], 0
je 0x491f9b
mov eax, dword [ebp + 8]
cmp dword [eax*4 + 0x5fae80], 0xffffffff
je 0x491f9b
mov ecx, dword [ebp + 8]
mov edx, dword [ecx*4 + 0x5fae80]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp + 8]
mov dword [eax*4 + 0x5fae80], 0
push 0x140
push 0
mov ecx, dword [ebp + 8]
imul ecx, ecx, 0x140
add ecx, 0x5fa5c0
push ecx
call fcn.005323e0
add esp, 0xc
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
movsx edx, byte [ebp - 0x208]
test edx, edx
jne 0x491fbe
mov eax, dword [ebp + 8]
mov dword [eax*4 + 0x5fae80], 0xffffffff
jmp 0x491fe5
mov ecx, dword [ebp + 8]
imul ecx, ecx, 0x140
add ecx, 0x5fa5c0
push ecx
lea edx, [ebp - 0x208]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ecx, dword [ebp + 8]
mov dword [ecx*4 + 0x5fae80], eax
push 0
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov edx, dword [ebp + 8]
cmp dword [edx*4 + 0x5fae80], 0xffffffff
jne 0x492006
mov dword [ebp - 0x21c], 0xffffffff
jmp 0x492010
mov dword [ebp - 0x21c], 0
jmp 0x492071
mov eax, dword [ebp + 8]
cmp dword [eax*4 + 0x5fae80], 0xffffffff
jne 0x49202b
mov dword [ebp - 0x21c], 0
jmp 0x492052
mov ecx, dword [ebp + 8]
imul ecx, ecx, 0x140
add ecx, 0x5fa5c0
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx*4 + 0x5fae80]
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov dword [ebp - 0x21c], eax
cmp dword [ebp - 0x21c], 0
je 0x492067
mov dword [ebp - 0x21c], 0
jmp 0x492071
mov dword [ebp - 0x21c], 0xffffffff
cmp dword [ebp - 0x21c], 0
jne 0x492100
cmp dword [ebp + 0x20], 1
jne 0x492100
mov ecx, dword [ebp + 8]
imul ecx, ecx, 0x140
mov edx, dword [ecx + 0x5fa5c0]
and edx, 0x10
jne 0x492100
mov eax, dword [ebp + 8]
imul eax, eax, 0x140
add eax, 0x5fa5c0
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx*4 + 0x5fae80]
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4920ec
mov eax, dword [ebp + 8]
mov ecx, dword [eax*4 + 0x5fae80]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edx, dword [ebp + 8]
mov dword [edx*4 + 0x5fae80], 0xffffffff
mov dword [ebp - 0x21c], 0xffffffff
jmp 0x492100
mov eax, dword [ebp + 8]
imul eax, eax, 0x140
mov ecx, dword [eax + 0x5fa5c0]
and ecx, 0x10
je 0x492098
mov edx, dword [ebp + 8]
cmp dword [edx*4 + 0x5fae80], 0xffffffff
je 0x49226a
mov eax, dword [ebp + 0x18]
cmp dword [eax], 0
jb 0x492121
mov ecx, dword [ebp + 0x18]
cmp dword [ecx], 3
jbe 0x49212a
mov edx, dword [ebp + 0x18]
mov dword [edx], 1
mov eax, dword [ebp + 0x18]
mov ecx, dword [eax]
mov dword [ebp - 0x228], ecx
cmp dword [ebp - 0x228], 1
jne 0x492161
mov edx, dword [ebp + 8]
imul edx, edx, 0x140
mov eax, dword [edx + 0x5fa5d4]
mov ecx, dword [edx + 0x5fa5d8]
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x220], ecx
jmp 0x4921ae
cmp dword [ebp - 0x228], 3
jne 0x49218d
mov edx, dword [ebp + 8]
imul edx, edx, 0x140
mov eax, dword [edx + 0x5fa5d4]
mov ecx, dword [edx + 0x5fa5d8]
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x220], ecx
jmp 0x4921ae
mov edx, dword [ebp + 8]
imul edx, edx, 0x140
mov eax, dword [edx + 0x5fa5c4]
mov ecx, dword [edx + 0x5fa5c8]
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x220], ecx
lea edx, [ebp - 0x210]
push edx
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
lea ecx, [ebp - 0x218]
push ecx
lea edx, [ebp - 0x214]
push edx
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
lea ecx, [ebp - 0x218]
push ecx
lea edx, [ebp - 0x214]
push edx
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
cmp dword [ebp - 0x228], 0
je 0x492225
movzx ecx, word [ebp - 0x218]
push ecx
movzx edx, word [ebp - 0x214]
push edx
mov eax, dword [ebp - 0x228]
push eax
call fcn.00491d90
add esp, 0xc
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
mov edx, dword [ebp + 8]
imul edx, edx, 0x140
mov eax, dword [edx + 0x5fa5c0]
and eax, 0x10
je 0x492244
mov ecx, dword [ebp + 0x24]
mov dword [ecx], 1
jmp 0x49224d
mov edx, dword [ebp + 0x24]
mov dword [edx], 0
mov eax, dword [ebp + 8]
imul eax, eax, 0x140
add eax, 0x5fa5ec
push eax
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.00532580
add esp, 8
jmp 0x492270
mov edx, dword [ebp + 0x14]
mov byte [edx], 0
cmp dword [ebp + 0x1c], 2
jne 0x4922e8
mov eax, dword [ebp + 8]
cmp dword [eax*4 + 0x5fae80], 0
je 0x4922ce
mov ecx, dword [ebp + 8]
cmp dword [ecx*4 + 0x5fae80], 0xffffffff
je 0x4922ce
mov edx, dword [ebp + 8]
mov eax, dword [edx*4 + 0x5fae80]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp + 8]
mov dword [ecx*4 + 0x5fae80], 0
push 0x140
push 0
mov edx, dword [ebp + 8]
imul edx, edx, 0x140
add edx, 0x5fa5c0
push edx
call fcn.005323e0
add esp, 0xc
mov eax, dword [ebp + 0x24]
mov ecx, dword [ebp + 0x20]
cmp ecx, dword [eax]
je 0x4922e8
mov edx, dword [ebp + 0x14]
mov byte [edx], 0
mov dword [ebp - 0x21c], 0xffffffff
mov eax, dword [ebp - 0x21c]
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00532783
mov esp, ebp
pop ebp
ret