Function at 0x51c864
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov esi, eax
xor eax, eax
push ebp
push 0x51caba
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [ebp - 4]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x30]
lea eax, [esi + 0x88]
push eax
lea eax, [ebp - 0x18]
mov ecx, 0x51cad8
mov edx, dword [ebp - 4]
call fcn.00405274
mov eax, dword [ebp - 0x18]
call fcn.004053ec
push eax
call sub.kernel32.dll_FindFirstFileA_1
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
setne byte [ebp - 9]
cmp byte [ebp - 9], 0
jne 0x51c8eb
call sub.kernel32.dll_GetLastError_1
sub eax, 2
je 0x51c8e1
sub eax, 3
je 0x51c8e1
xor eax, eax
jmp 0x51c8e3
mov al, 1
mov byte [ebp - 9], al
jmp 0x51ca9f
mov byte [ebp - 0x11], 0
xor eax, eax
push ebp
push 0x51ca98
push dword fs:[eax]
mov dword fs:[eax], esp
jmp 0x51ca64
mov eax, dword [0x60427c]
cmp byte [eax], 0
jne 0x51c913
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x40]
cmp byte [esi + 0x1c8], 0
je 0x51c92a
mov byte [ebp - 9], 0
call fcn.00404960
jmp 0x51ca9f
lea edi, [esi + 0x88]
test dword [edi], 0x10
jbe 0x51ca1f
lea eax, [edi + 0x2c]
call fcn.0051c4b4
test al, al
jne 0x51ca40
test byte [esi + 0x61], 1
jne 0x51c965
lea eax, [esi + 0x88]
call fcn.0051c4d4
test al, al
jne 0x51ca40
movzx eax, byte [esi + 0x1e0]
sub al, 2
jb 0x51c979
sub al, 2
jb 0x51c9c9
jmp 0x51ca40
cmp byte [ebp + 8], 0
je 0x51c99a
test byte [esi + 0x60], 0x10
je 0x51c99a
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x44]
test al, al
je 0x51c99a
mov edx, dword [ebp - 4]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x38]
cmp byte [esi + 0x1e0], 1
jne 0x51ca40
lea eax, [ebp - 0x1c]
lea edx, [edi + 0x2c]
mov ecx, 0x104
call fcn.004051cc
mov edx, dword [ebp - 0x1c]
mov ecx, 1
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0x3c]
jmp 0x51ca40
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x44]
mov byte [ebp - 0x12], al
cmp byte [ebp + 8], 0
je 0x51c9ef
test byte [esi + 0x60], 0x10
je 0x51c9ef
cmp byte [ebp - 0x12], 0
je 0x51c9ef
mov edx, dword [ebp - 4]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x38]
cmp byte [esi + 0x1e0], 2
sete al
or al, byte [ebp - 0x12]
je 0x51ca40
lea eax, [ebp - 0x20]
lea edx, [edi + 0x2c]
mov ecx, 0x104
call fcn.004051cc
mov edx, dword [ebp - 0x20]
movzx ecx, byte [ebp - 0x12]
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0x3c]
jmp 0x51ca40
cmp byte [ebp + 8], 0
je 0x51ca40
test byte [esi + 0x60], 0x20
je 0x51ca40
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x48]
test al, al
je 0x51ca40
mov edx, dword [ebp - 4]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x34]
lea eax, [esi + 0x88]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_FindNextFileA
test eax, eax
jne 0x51ca64
mov byte [ebp - 0x11], 1
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x12
sete byte [ebp - 9]
cmp byte [ebp - 0x11], 0
je 0x51c902
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51ca9f
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_FindClose_1
test eax, eax
je 0x51ca8e
cmp byte [ebp - 9], 0
jne 0x51ca92
xor eax, eax
jmp 0x51ca94
mov al, 1
mov byte [ebp - 9], al
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51cac1
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.00404f80
ret