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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x51
push 0
push 0
dec ecx
jne 0x51558d
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov byte [ebp - 0x11], cl
mov dword [ebp - 4], edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
call fcn.00407214
xor eax, eax
push ebp
push 0x515908
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
test eax, eax
je 0x5155d7
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x5155d7
lea eax, [ebp - 4]
mov edx, dword [ebp - 4]
call fcn.004068c0
mov ebx, eax
test ebx, ebx
je 0x5155e2
sub ebx, 4
mov ebx, dword [ebx]
lea eax, [ebp - 0x26c]
push eax
mov ecx, 1
mov edx, ebx
mov eax, dword [ebp - 4]
call fcn.0040796c
mov eax, dword [ebp - 0x26c]
mov edx, 0x515924
call fcn.00407904
je 0x515617
lea eax, [ebp - 4]
mov edx, 0x515924
call fcn.00407640
lea eax, [ebp - 0x268]
push eax
lea eax, [ebp - 0x270]
mov ecx, 0x515934
mov edx, dword [ebp - 4]
call fcn.00407700
mov eax, dword [ebp - 0x270]
call fcn.004072b8
push eax
call sub.kernel32.dll_FindFirstFileW_1
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jbe 0x515777
lea eax, [ebp - 8]
lea edx, [ebp - 0x23c]
mov ecx, 0x104
call fcn.0040742c
lea edx, [ebp - 0x274]
mov eax, dword [ebp - 8]
call fcn.004141ec
mov edx, dword [ebp - 0x274]
lea eax, [ebp - 8]
call fcn.00407280
mov eax, dword [ebp - 8]
test eax, eax
je 0x51569b
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x51569b
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.004068c0
test eax, eax
je 0x5156a4
sub eax, 4
mov eax, dword [eax]
test eax, eax
jle 0x515777
mov eax, dword [ebp - 0x268]
and eax, 0x10
cmp eax, 0x10
jne 0x515755
lea eax, [ebp - 0x278]
push eax
mov ecx, 1
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.0040796c
mov eax, dword [ebp - 0x278]
mov edx, 0x515948
call fcn.00407904
je 0x515777
lea eax, [ebp - 0x27c]
push eax
mov ecx, 2
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.0040796c
mov eax, dword [ebp - 0x27c]
mov edx, 0x515958
call fcn.00407904
je 0x515777
push dword [ebp - 4]
push dword [ebp - 8]
push 0x515924
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.004077e4
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
mov edx, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x38]
cmp byte [ebp - 0x11], 0
je 0x515777
movzx ecx, byte [ebp - 0x11]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
call fcn.00515584
jmp 0x515777
lea eax, [ebp - 0x280]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.00407700
mov edx, dword [ebp - 0x280]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea eax, [ebp - 0x268]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_FindNextFileW
mov edi, eax
jmp 0x5158cc
lea eax, [ebp - 8]
lea edx, [ebp - 0x23c]
mov ecx, 0x104
call fcn.0040742c
lea edx, [ebp - 0x284]
mov eax, dword [ebp - 8]
call fcn.004141ec
mov edx, dword [ebp - 0x284]
lea eax, [ebp - 8]
call fcn.00407280
mov ebx, dword [ebp - 8]
test ebx, ebx
je 0x5157dc
mov eax, ebx
sub eax, 0xa
cmp word [eax], 2
je 0x5157dc
lea eax, [ebp - 8]
mov edx, dword [ebp - 8]
call fcn.004068c0
mov ebx, eax
mov esi, ebx
test esi, esi
je 0x5157e7
sub esi, 4
mov esi, dword [esi]
test esi, esi
jle 0x5158ba
mov eax, dword [ebp - 0x268]
and eax, 0x10
cmp eax, 0x10
jne 0x515898
lea eax, [ebp - 0x288]
push eax
mov ecx, 1
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.0040796c
mov eax, dword [ebp - 0x288]
mov edx, 0x515948
call fcn.00407904
je 0x5158ba
lea eax, [ebp - 0x28c]
push eax
mov ecx, 2
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.0040796c
mov eax, dword [ebp - 0x28c]
mov edx, 0x515958
call fcn.00407904
je 0x5158ba
push dword [ebp - 4]
push dword [ebp - 8]
push 0x515924
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.004077e4
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
mov edx, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x38]
cmp byte [ebp - 0x11], 0
je 0x5158ba
movzx ecx, byte [ebp - 0x11]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
call fcn.00515584
jmp 0x5158ba
lea eax, [ebp - 0x290]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.00407700
mov edx, dword [ebp - 0x290]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea eax, [ebp - 0x268]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_FindNextFileW
mov edi, eax
test edi, edi
jne 0x51578e
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_FindClose_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51590f
lea eax, [ebp - 0x290]
mov edx, 0xa
call fcn.00407224
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00407224
ret