Function at 0x409588
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push 0x6dc
mov eax, 0x41b06a
call fcn.0041a03d
cmp dword [0x428640], 0
mov eax, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x18]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x694], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x698], ebx
mov dword [ebp - 0x69c], eax
jne 0x409684
push edi
call dword [sym.imp.MSVCR80.dll_wcslen]
test edi, edi
pop ecx
mov esi, eax
je 0x409684
test esi, esi
jbe 0x409684
test ebx, ebx
je 0x409684
lea eax, [ebp - 0x690]
push edi
push eax
call fcn.00411959
push dword [eax]
push str._r_n_s_r_n_r_n
push dword [ebx + 4]
call dword [sym.imp.MSVCR80.dll_fprintf]
mov eax, dword [ebp - 0x690]
add esp, 0x14
add eax, 0xfffffff0
call fcn.004016a7
and dword [ebp - 4], 0
lea eax, [ebp - 0x42c]
push edi
push eax
call dword [sym.imp.MSVCR80.dll_wcscpy]
lea esi, [edi + esi*2 - 2]
cmp word [esi], 0x5c
pop ecx
pop ecx
mov dword [ebp - 0x6a0], esi
je 0x40964a
lea eax, [ebp - 0x42c]
push 0x420fb4
push eax
call dword [sym.imp.MSVCR80.dll_wcscat]
pop ecx
pop ecx
lea eax, [ebp - 0x42c]
push 0x421838
push eax
call dword [sym.imp.MSVCR80.dll_wcscat]
pop ecx
pop ecx
lea eax, [ebp - 0x67c]
push eax
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x680], eax
jne 0x40968a
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
call fcn.0041a099
ret
call fcn.00404b9a
and dword [ebp - 0x684], 0
mov dword [ebp - 0x688], eax
mov byte [ebp - 4], 1
xor eax, eax
test eax, eax
jne 0x40987c
cmp dword [0x428640], eax
jne 0x40987c
lea eax, [ebp - 0x224]
push edi
push eax
call dword [sym.imp.MSVCR80.dll_wcscpy]
mov eax, dword [ebp - 0x6a0]
cmp word [eax], 0x5c
pop ecx
pop ecx
je 0x4096e6
lea eax, [ebp - 0x224]
push 0x420fb4
push eax
call dword [sym.imp.MSVCR80.dll_wcscat]
pop ecx
pop ecx
lea eax, [ebp - 0x650]
push eax
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.MSVCR80.dll_wcscat]
mov esi, dword [ebp - 0x67c]
shr esi, 4
and esi, 1
pop ecx
pop ecx
je 0x409755
mov ebx, dword [sym.imp.MSVCR80.dll_wcscmp]
lea eax, [ebp - 0x650]
push 0x421138
push eax
call ebx
test eax, eax
pop ecx
pop ecx
je 0x409738
lea eax, [ebp - 0x650]
push 0x42113c
push eax
call ebx
test eax, eax
pop ecx
pop ecx
jne 0x409755
lea eax, [ebp - 0x67c]
push eax
push dword [ebp - 0x680]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
neg eax
sbb eax, eax
inc eax
jmp 0x4096a2
cmp dword [ebp - 0x694], 0
je 0x4097a9
cmp dword [ebp + 0x10], esi
je 0x4097a9
push dword [ebp - 0x698]
lea eax, [ebp - 0x650]
push dword [ebp - 0x664]
push dword [ebp - 0x668]
push eax
lea eax, [ebp - 0x224]
push eax
call dword [ebp - 0x694]
test eax, eax
jne 0x4097a9
push dword [ebp - 0x680]
call dword [sym.imp.KERNEL32.dll_FindClose]
lea esi, [ebp - 0x68c]
call fcn.00404bb2
jmp 0x409684
test esi, esi
je 0x409738
cmp dword [ebp + 0xc], 0
je 0x409738
mov ebx, dword [ebp - 0x69c]
mov eax, ebx
call fcn.00411439
test eax, eax
je 0x4097d7
lea ecx, [ebp - 0x224]
call fcn.00409492
test eax, eax
jne 0x409738
lea eax, [ebp - 0x690]
push eax
lea ecx, [ebp - 0x224]
call fcn.0040453a
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x688]
lea ecx, [ebp - 0x690]
push ecx
lea esi, [eax + 4]
push dword [esi]
push eax
call fcn.00409f93
mov ecx, 0x3fffffff
sub ecx, dword [ebp - 0x684]
cmp ecx, 1
jae 0x409858
push str.list_T__too_long
lea ecx, [ebp - 0x6e8]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea eax, [ebp - 0x6e8]
push eax
lea eax, [ebp - 0x6cc]
push eax
mov byte [ebp - 4], 3
call fcn.00405946
push 0x422f1c
lea eax, [ebp - 0x6cc]
push eax
mov dword [ebp - 0x6cc], 0x4211e0
call sub.MSVCR80.dll__CxxThrowException
inc dword [ebp - 0x684]
mov dword [esi], eax
mov ecx, dword [eax + 4]
mov dword [ecx], eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x690]
add eax, 0xfffffff0
call fcn.004016a7
jmp 0x409738
push dword [ebp - 0x680]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x688]
mov ebx, dword [eax]
lea edi, [ebp - 0x68c]
mov dword [ebp - 0x6a0], eax
test edi, edi
je 0x4098aa
lea ecx, [ebp - 0x68c]
cmp edi, ecx
je 0x4098b6
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [ebp - 0x688]
cmp ebx, dword [ebp - 0x6a0]
je 0x40996a
test edi, edi
jne 0x4098cc
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp ebx, dword [edi + 4]
jne 0x4098d7
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [ebx + 8]
sub eax, 0x10
call fcn.00404f3d
lea esi, [eax + 0x10]
mov dword [ebp - 0x680], esi
mov byte [ebp - 4], 4
cmp dword [esi - 4], 1
jle 0x40990a
push dword [esi - 0xc]
lea eax, [ebp - 0x680]
push eax
call fcn.004015bf
mov esi, dword [ebp - 0x680]
push dword [ebp - 0x69c]
push dword [ebp - 0x698]
push dword [ebp - 0x694]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call fcn.00409588
add esp, 0x18
test esi, esi
jne 0x409933
xor eax, eax
jmp 0x40993b
push esi
call dword [sym.imp.MSVCR80.dll_wcslen]
pop ecx
lea edx, [ebp - 0x680]
call fcn.004014bf
lea eax, [esi - 0x10]
mov byte [ebp - 4], 1
call fcn.004016a7
cmp ebx, dword [edi + 4]
jne 0x40995d
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov ebx, dword [ebx]
mov eax, dword [ebp - 0x688]
jmp 0x40989c
mov esi, dword [eax]
mov dword [eax], eax
mov eax, dword [ebp - 0x688]
mov dword [eax + 4], eax
and dword [ebp - 0x684], 0
cmp esi, dword [ebp - 0x688]
je 0x40999e
mov eax, dword [esi + 8]
mov edi, dword [esi]
sub eax, 0x10
call fcn.004016a7
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
pop ecx
mov esi, edi
jmp 0x40997e
push dword [ebp - 0x688]
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x409684