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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x50f66c
mov eax, dword fs:[0]
push eax
sub esp, 0x748
mov eax, dword [0x551bd0]
xor eax, esp
mov dword [esp + 0x740], eax
push ebx
push esi
push edi
mov eax, dword [0x551bd0]
xor eax, esp
push eax
lea eax, [esp + 0x758]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x10], eax
xor eax, eax
push 0x206
mov word [esp + 0x340], ax
xor ebx, ebx
lea eax, [esp + 0x342]
push ebx
push eax
mov dword [esp + 0x24], esi
call fcn.0049d740
add esp, 0xc
push esi
lea eax, [esp + 0x340]
push str._s.
push eax
call fcn.00401e39
add esp, 0xc
lea eax, [esp + 0xec]
push eax
lea eax, [esp + 0x340]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
je 0x409928
mov ecx, 0x5384dc
lea eax, [esp + 0x118]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x409604
cmp dx, bx
je 0x409600
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x409604
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x4095de
xor eax, eax
jmp 0x409609
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x409904
mov ecx, 0x5384e0
lea eax, [esp + 0x118]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x409643
cmp dx, bx
je 0x40963f
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x409643
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x40961d
xor eax, eax
jmp 0x409648
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x409904
test byte [esp + 0xec], 0x10
je 0x4096b5
xor eax, eax
push 0x206
mov word [esp + 0x548], ax
lea eax, [esp + 0x54a]
push ebx
push eax
call fcn.0049d740
add esp, 0xc
lea eax, [esp + 0x118]
push eax
push dword [esp + 0x1c]
lea eax, [esp + 0x54c]
push str._s_s
push eax
call fcn.00401e39
push dword [esp + 0x20]
lea eax, [esp + 0x558]
push dword [esp + 0x28]
push eax
call fcn.00409522
add esp, 0x1c
jmp 0x409904
push dword [esp + 0x18]
lea ecx, [esp + 0xd4]
call fcn.00401685
push 0x538040
lea eax, [esp + 0xd4]
push eax
lea eax, [esp + 0x68]
push eax
mov dword [esp + 0x76c], ebx
call fcn.00409dbb
add esp, 0xc
lea ecx, [esp + 0x118]
push ecx
push eax
lea eax, [esp + 0x84]
push eax
mov byte [esp + 0x76c], 1
call fcn.00409dbb
add esp, 0xc
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0xdc]
mov byte [esp + 0x76c], 2
call fcn.004019f3
push ebx
push 1
lea ecx, [esp + 0x84]
call fcn.0040184d
push ebx
push 1
lea ecx, [esp + 0x68]
mov byte [esp + 0x768], bl
call fcn.0040184d
push dword [esp + 0x14]
lea ecx, [esp + 0xb8]
call fcn.00401685
push dword [esp + 0x14]
lea ecx, [esp + 0x9c]
mov byte [esp + 0x764], 3
call fcn.00401685
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0xb8]
mov byte [esp + 0x764], 4
call fcn.00409c01
mov esi, eax
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0xb8]
call fcn.00409c21
mov edi, eax
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0xb8]
call fcn.00409c01
push fcn.0049c0dd
push dword [esi + 4]
push dword [esi]
push dword [edi + 4]
push dword [edi]
push dword [eax + 4]
push dword [eax]
lea eax, [esp + 0x5c]
push eax
call fcn.00479477
add esp, 0x20
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x9c]
call fcn.00409c01
mov esi, eax
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x9c]
call fcn.00409c21
mov edi, eax
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x9c]
call fcn.00409c01
push fcn.0049c21f
push dword [esi + 4]
push dword [esi]
push dword [edi + 4]
push dword [edi]
push dword [eax + 4]
push dword [eax]
lea eax, [esp + 0x74]
push eax
call fcn.00479477
mov eax, dword [esp + 0xd8]
add esp, 0x20
cmp dword [esp + 0xcc], 8
jae 0x409839
lea eax, [esp + 0xb8]
push dword [esp + 0xc8]
or edi, 0xffffffff
push edi
push eax
lea ecx, [esp + 0xdc]
call fcn.00407a14
mov esi, dword [esp + 0xe4]
mov ecx, esi
sub ecx, dword [esp + 0xc8]
cmp eax, ecx
je 0x40989d
cmp dword [esp + 0xb0], 8
mov eax, dword [esp + 0x9c]
jae 0x40987d
lea eax, [esp + 0x9c]
push dword [esp + 0xac]
lea ecx, [esp + 0xd4]
push edi
push eax
call fcn.00407a14
sub esi, dword [esp + 0xac]
cmp eax, esi
jne 0x4098d0
mov ecx, dword [esp + 0x10]
push 0x535d58
call fcn.00403d14
test eax, eax
je 0x4098bd
mov ecx, dword [esp + 0x10]
push 0x5384f4
call fcn.00403850
mov ecx, dword [esp + 0x10]
push edi
push ebx
lea eax, [esp + 0xd8]
push eax
call fcn.004039ea
push ebx
push 1
lea ecx, [esp + 0xa0]
call fcn.0040184d
push ebx
push 1
lea ecx, [esp + 0xbc]
call fcn.0040184d
push ebx
push 1
lea ecx, [esp + 0xd8]
mov dword [esp + 0x768], edi
call fcn.0040184d
lea eax, [esp + 0xec]
push eax
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4095d2
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x758]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x740]
xor ecx, esp
call fcn.0049a49b
mov esp, ebp
pop ebp
ret