Function at 0x404064
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x178
push esi
mov dword [ebp - 0x178], 0
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCRT.dll__strdup]
add esp, 4
mov dword [ebp + 8], eax
mov ecx, dword [ebp + 8]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
mov dword [ebp - 0xc], eax
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0xc]
movsx eax, byte [edx - 1]
cmp eax, 0x2f
je 0x4040c3
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0xc]
movsx edx, byte [ecx - 1]
cmp edx, 0x5c
jne 0x4040d7
mov eax, dword [ebp - 0xc]
sub eax, 1
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0xc]
mov byte [ecx], 0
jmp 0x4040a5
lea edx, [ebp - 0x170]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCRT.dll__stat]
add esp, 8
test eax, eax
je 0x404103
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor eax, eax
jmp 0x4042ef
mov edx, dword [ebp + 0xc]
mov dword [0x406634], edx
mov eax, dword [ebp + 0xc]
push eax
call sub.MSVCRT.dll_strlen
add esp, 4
mov dword [0x406638], eax
mov ecx, dword [ebp + 8]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
mov esi, eax
mov edx, dword [ebp + 0xc]
push edx
call sub.MSVCRT.dll_strlen
add esp, 4
lea eax, [esi + eax + 4]
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
push ecx
movsx edx, byte [0x4065bc]
push edx
mov eax, dword [ebp + 8]
push eax
push str._s_c_s_
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x14
lea edx, [ebp - 0x14c]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x174], eax
cmp dword [ebp - 0x174], 0xffffffff
je 0x404269
lea ecx, [ebp - 0x120]
push ecx
call fcn.00404538
add esp, 4
test eax, eax
je 0x4041b7
lea edx, [ebp - 0x120]
push edx
call dword [sym.imp.MSVCRT.dll__strdup]
add esp, 4
mov dword [ebp - 0x178], eax
lea eax, [ebp - 0x14c]
push eax
mov ecx, dword [ebp - 0x174]
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x40425c
lea edx, [ebp - 0x120]
push edx
call fcn.00404538
add esp, 4
test eax, eax
je 0x404257
cmp dword [ebp - 0x178], 0
jne 0x404207
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.MSVCRT.dll__strdup]
add esp, 4
mov dword [ebp - 0x178], eax
jmp 0x404257
mov ecx, dword [0x406638]
lea edx, [ebp + ecx - 0x11f]
push edx
mov eax, dword [0x406638]
mov ecx, dword [ebp - 0x178]
lea edx, [ecx + eax + 1]
push edx
call fcn.004042f4
add esp, 8
test eax, eax
jge 0x404257
mov eax, dword [ebp - 0x178]
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
lea ecx, [ebp - 0x120]
push ecx
call dword [sym.imp.MSVCRT.dll__strdup]
add esp, 4
mov dword [ebp - 0x178], eax
jmp 0x4041b7
mov edx, dword [ebp - 0x174]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x178], 0
je 0x4042df
mov eax, dword [ebp - 0x178]
push eax
call sub.MSVCRT.dll_strlen
add esp, 4
mov ecx, dword [ebp - 0xc]
lea edx, [ecx + eax + 2]
push edx
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 8]
push ecx
call sub.MSVCRT.dll_strcpy
add esp, 8
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov al, byte [0x4065bc]
mov byte [edx], al
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0xc]
mov byte [ecx + 1], 0
mov edx, dword [ebp - 0x178]
push edx
mov eax, dword [ebp - 8]
push eax
call sub.MSVCRT.dll_strcat
add esp, 8
mov ecx, dword [ebp - 0x178]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, dword [ebp - 8]
pop esi
mov esp, ebp
pop ebp
ret