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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x31
push 0
push 0
dec ecx
jne 0x510dd8
push ebx
push esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
call fcn.00404ed0
xor eax, eax
push ebp
push 0x51120d
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x15c]
call fcn.00501e08
mov eax, dword [ebp - 0x15c]
lea edx, [ebp - 0xc]
call fcn.00408ebc
lea eax, [ebp - 0x158]
push eax
lea eax, [ebp - 0x160]
mov ecx, 0x511224
mov edx, dword [ebp - 8]
call fcn.00404d2c
mov eax, dword [ebp - 0x160]
call fcn.00404ee0
push eax
call sub.kernel32.dll_FindFirstFileA_1
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
je 0x510e51
mov al, 1
jmp 0x5111c9
xor eax, eax
jmp 0x5111c9
mov eax, dword [0x5809f4]
cmp byte [eax], 2
je 0x5111d1
mov eax, dword [0x581040]
mov eax, dword [eax]
call fcn.0048d8b8
lea eax, [ebp - 0x10]
lea edx, [ebp - 0x12c]
mov ecx, 0x104
call fcn.00404c90
mov eax, dword [ebp - 0x158]
cmp eax, 0x10
je 0x510ebb
cmp eax, 2
je 0x510ebb
cmp eax, 4
je 0x510ebb
cmp eax, 0x80
je 0x510ebb
cmp eax, 0x100
je 0x510ebb
cmp eax, 0x12
je 0x510ebb
cmp eax, 0x13
je 0x510ebb
cmp eax, 0x20
jne 0x510f9f
push dword [ebp - 8]
push 0x511234
push dword [ebp - 0x10]
lea eax, [ebp - 0x164]
mov edx, 3
call fcn.00404da0
mov edx, dword [ebp - 0x164]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x344]
call fcn.0046cef4
mov eax, dword [ebp - 0x10]
mov edx, 0x511240
call fcn.00404e2c
je 0x510f9f
mov eax, dword [ebp - 0x10]
mov edx, 0x51124c
call fcn.00404e2c
je 0x510f9f
push dword [ebp - 8]
push 0x511234
push dword [ebp - 0x10]
lea eax, [ebp - 0x168]
mov edx, 3
call fcn.00404da0
mov eax, dword [ebp - 0x168]
call fcn.0050e514
test al, al
je 0x510f9f
push dword [ebp - 8]
push 0x511234
push dword [ebp - 0x10]
lea eax, [ebp - 0x170]
mov edx, 3
call fcn.00404da0
mov eax, dword [ebp - 0x170]
lea edx, [ebp - 0x16c]
call fcn.00408ebc
mov edx, dword [ebp - 0x16c]
mov eax, dword [ebp - 0xc]
call fcn.00404e2c
je 0x510f9f
push dword [ebp - 8]
push 0x511234
push dword [ebp - 0x10]
lea eax, [ebp - 0x174]
mov edx, 3
call fcn.00404da0
mov edx, dword [ebp - 0x174]
mov eax, dword [ebp - 4]
call fcn.00510dd0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x320]
mov eax, dword [eax + 0x22c]
call fcn.004511d0
mov esi, eax
dec esi
test esi, esi
jl 0x5111b3
inc esi
xor ebx, ebx
mov eax, dword [0x581040]
mov eax, dword [eax]
call fcn.0048d8b8
mov eax, dword [0x5809f4]
cmp byte [eax], 2
je 0x5111b3
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x320]
mov eax, dword [eax + 0x22c]
mov edx, ebx
call fcn.00451200
call fcn.00450b5c
test al, al
je 0x5111ab
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x320]
mov eax, dword [eax + 0x22c]
mov edx, ebx
call fcn.00451200
mov edx, dword [eax + 0x24]
lea eax, [ebp - 0x18]
call fcn.00404ab8
mov edx, dword [ebp - 0x18]
mov eax, 0x511258
call fcn.00405024
test eax, eax
jle 0x51112e
lea eax, [ebp - 0x178]
push eax
mov ecx, 2
mov edx, 1
mov eax, dword [ebp - 0x18]
call fcn.00404f40
mov eax, dword [ebp - 0x178]
mov edx, 0x511264
call fcn.00404e2c
jne 0x51110a
lea eax, [ebp - 0x18]
mov ecx, 1
mov edx, 1
call fcn.00404f80
lea edx, [ebp - 0x17c]
mov eax, dword [ebp - 0x10]
call fcn.00409c98
mov edx, dword [ebp - 0x17c]
mov eax, dword [ebp - 0x18]
call fcn.00404e2c
jne 0x5111ab
mov edx, dword [0x50f274]
mov eax, 0xc
call fcn.00405924
mov esi, eax
mov eax, esi
lea edx, [ebp - 0x12c]
mov ecx, 0x104
call fcn.00404c90
push dword [ebp - 8]
push 0x511234
lea eax, [ebp - 0x180]
lea edx, [ebp - 0x12c]
mov ecx, 0x104
call fcn.00404c90
push dword [ebp - 0x180]
lea eax, [esi + 4]
mov edx, 3
call fcn.00404da0
mov eax, dword [ebp - 0x138]
mov dword [esi + 8], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3e8]
mov edx, esi
call fcn.0041ab90
jmp 0x5111b3
lea edx, [ebp - 0x184]
mov eax, dword [ebp - 0x10]
call fcn.00409c98
mov edx, dword [ebp - 0x184]
mov eax, dword [ebp - 0x18]
call fcn.00404e2c
je 0x5111b3
jmp 0x5111ab
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x10]
call fcn.00404e2c
jne 0x5111ab
mov edx, dword [0x50f274]
mov eax, 0xc
call fcn.00405924
mov esi, eax
mov eax, esi
lea edx, [ebp - 0x12c]
mov ecx, 0x104
call fcn.00404c90
push dword [ebp - 8]
push 0x511234
lea eax, [ebp - 0x188]
lea edx, [ebp - 0x12c]
mov ecx, 0x104
call fcn.00404c90
push dword [ebp - 0x188]
lea eax, [esi + 4]
mov edx, 3
call fcn.00404da0
mov eax, dword [ebp - 0x138]
mov dword [esi + 8], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3e8]
mov edx, esi
call fcn.0041ab90
jmp 0x5111b3
inc ebx
dec esi
jne 0x510fc1
lea eax, [ebp - 0x158]
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_FindNextFileA
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x510e58
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_FindClose_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x511214
lea eax, [ebp - 0x188]
mov edx, 0xc
call fcn.00404a44
lea eax, [ebp - 0x18]
call fcn.00404a20
lea eax, [ebp - 0x10]
mov edx, 3
call fcn.00404a44
ret