Function at 0x47f470
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x26c
mov eax, dword [0x5f0524]
xor eax, esp
mov dword [esp + 0x268], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov esi, ecx
mov dword [esp + 0x14], esi
test edi, edi
jne 0x47f4fd
call fcn.0043c7b0
test eax, eax
je 0x47f4ac
lea edi, [eax + 8]
mov dword [esp + 0x10], edi
jmp 0x47f4b4
mov dword [esp + 0x10], 0
call fcn.00408da0
mov esi, eax
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x34]
push ebx
cmp dword [eax + 0x20], 0
jbe 0x47f4e4
dec dword [eax + 0x20]
mov ecx, dword [eax + 0x20]
mov eax, dword [eax + 0x1c]
mov edi, dword [eax + ecx*4]
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call eax
jmp 0x47f4f2
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call eax
mov eax, dword [esi + 0x3c]
call eax
mov edi, eax
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
mov dword [edi + 0x2c], eax
mov ecx, esi
call fcn.0047af60
mov dword [esp + 0x18], eax
mov ecx, esi
mov eax, dword [esi]
push 1
push 0
call dword [eax + 0x118]
mov ecx, dword [esp + 0x18]
mov ebx, eax
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], ebx
push eax
mov eax, dword [ecx]
call dword [eax + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
je 0x47f75a
cmp byte [ebp + 8], 0
mov cl, 1
mov byte [esp + 0xd], 1
mov byte [esp + 0xe], cl
mov byte [esp + 0xf], cl
jne 0x47f592
call fcn.00481310
mov byte [esp + 0xd], al
call fcn.00481410
cmp byte [esp + 0xd], 0
mov cl, al
mov byte [esp + 0xe], cl
je 0x47f572
test cl, cl
jne 0x47f592
call fcn.00476430
push eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xb0]
push eax
call fcn.00521896
add esp, 8
test eax, eax
setne byte [esp + 0xf]
mov esi, dword [esp + 0x10]
nop word [eax + eax]
mov ecx, str..__
lea eax, [esp + 0x4c]
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x47f5d6
test dx, dx
je 0x47f5d2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x47f5d6
add eax, 4
add ecx, 4
test dx, dx
jne 0x47f5b0
xor eax, eax
jmp 0x47f5db
sbb eax, eax
or eax, 1
test eax, eax
je 0x47f73f
mov eax, 0x5cc0c0
lea ecx, [esp + 0x4c]
nop dword [eax]
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x47f616
test dx, dx
je 0x47f612
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x47f616
add ecx, 4
add eax, 4
test dx, dx
jne 0x47f5f0
xor eax, eax
jmp 0x47f61b
sbb eax, eax
or eax, 1
test eax, eax
je 0x47f73f
mov eax, dword [esp + 0x20]
test eax, 0x400
jne 0x47f73f
cmp byte [ebp + 8], 0
jne 0x47f691
cmp byte [esp + 0xd], 0
jne 0x47f647
test al, 2
jne 0x47f73f
cmp byte [esp + 0xe], 0
jne 0x47f656
test al, 4
jne 0x47f73f
cmp byte [esp + 0xf], 0
jne 0x47f691
lea eax, [esp + 0x4c]
push str.AUTOEXEC.BAT
push eax
call fcn.00521896
add esp, 8
test eax, eax
je 0x47f73f
lea eax, [esp + 0x4c]
push str.CONFIG.SYS
push eax
call fcn.00521896
add esp, 8
test eax, eax
je 0x47f73f
mov eax, dword [esp + 0x14]
mov esi, dword [ebx]
mov ecx, dword [eax + 0x80]
mov eax, dword [ecx]
call dword [eax + 0x2c]
inc eax
mov ecx, ebx
push eax
call dword [esi + 0x30]
mov eax, dword [ebx]
lea ecx, [esp + 0x4c]
push ecx
mov ecx, ebx
call dword [eax + 0x1e0]
call fcn.0043c7b0
mov esi, eax
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x34]
push ebx
cmp dword [eax + 0x20], 0
jbe 0x47f6e7
dec dword [eax + 0x20]
mov ecx, dword [eax + 0x20]
mov eax, dword [eax + 0x1c]
mov esi, dword [eax + ecx*4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x47f6f4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esi + 0x3c]
call eax
mov esi, eax
mov eax, dword [esi]
mov ecx, esi
mov ebx, dword [esp + 0x1c]
push ebx
call dword [eax + 0x1e8]
mov eax, dword [edi + 0x20]
cmp eax, dword [edi + 0x24]
jne 0x47f712
mov ecx, edi
call fcn.0042d690
mov ecx, dword [edi + 0x20]
mov eax, dword [edi + 0x1c]
mov dword [eax + ecx*4], esi
inc dword [edi + 0x20]
mov ecx, dword [ebp + 0xc]
test cl, cl
je 0x47f73b
test byte [esp + 0x20], 0x10
je 0x47f73b
mov eax, dword [esi]
push edi
push ecx
push dword [ebp + 8]
mov ecx, esi
call dword [eax + 0x1a8]
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x47f5a0
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x18]
add ecx, 4
mov eax, dword [ecx]
call dword [eax + 4]
test ebx, ebx
je 0x47f76f
lea ecx, [ebx + 4]
jmp 0x47f771
xor ecx, ecx
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [esp + 0x274]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0051a19b
mov esp, ebp
pop ebp
ret 0xc