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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x27c
mov eax, dword [0x5f0524]
xor eax, esp
mov dword [esp + 0x278], eax
mov al, byte [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x14]
mov esi, ecx
mov dword [esp + 0x10], esi
mov byte [esp + 0xd], al
mov byte [esp + 0x28], al
test edi, edi
jne 0x4801f8
call fcn.0043c7b0
test eax, eax
je 0x4801a7
lea edi, [eax + 8]
mov dword [esp + 0x1c], edi
jmp 0x4801af
mov dword [esp + 0x1c], 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 0x4801df
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 0x4801ed
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call eax
mov eax, dword [esi + 0x3c]
call eax
mov edi, eax
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x10]
mov dword [edi + 0x2c], eax
mov ecx, dword [esi + 0x1c]
mov eax, dword [ecx]
call dword [eax + 0x2c]
test eax, eax
je 0x480209
mov ecx, dword [esi + 0x1c]
jmp 0x48020f
mov ecx, dword [esi + 0x80]
mov eax, dword [ecx]
call dword [eax + 0x50]
mov ecx, eax
call fcn.00408f00
mov dword [esp + 0x18], eax
mov ecx, esi
mov eax, dword [esi]
push 1
push 0
call dword [eax + 0x124]
mov ebx, eax
mov ecx, ebx
mov dword [esp + 0x1c], ebx
mov eax, dword [ebx]
call dword [eax + 0x2c]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x30]
push eax
mov eax, dword [ecx]
call dword [eax + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
je 0x480469
cmp byte [esp + 0xd], 0
mov al, 1
mov byte [esp + 0xc], 1
mov byte [esp + 0xe], al
mov byte [esp + 0xf], al
jne 0x4802b3
call fcn.00481310
mov byte [esp + 0xc], al
call fcn.00481410
cmp byte [esp + 0xc], 0
mov byte [esp + 0xe], al
je 0x480293
test al, al
jne 0x4802b3
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 + 0x14]
nop word [eax + eax]
mov ecx, str..__
lea eax, [esp + 0x5c]
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4802f6
test dx, dx
je 0x4802f2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4802f6
add eax, 4
add ecx, 4
test dx, dx
jne 0x4802d0
xor eax, eax
jmp 0x4802fb
sbb eax, eax
or eax, 1
test eax, eax
je 0x48044e
mov eax, 0x5cc0c0
lea ecx, [esp + 0x5c]
nop dword [eax]
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x480336
test dx, dx
je 0x480332
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x480336
add ecx, 4
add eax, 4
test dx, dx
jne 0x480310
xor eax, eax
jmp 0x48033b
sbb eax, eax
or eax, 1
test eax, eax
je 0x48044e
mov eax, dword [esp + 0x30]
test eax, 0x400
jne 0x48044e
cmp byte [esp + 0xd], 0
jne 0x4803b2
cmp byte [esp + 0xc], 0
jne 0x480368
test al, 2
jne 0x48044e
cmp byte [esp + 0xe], 0
jne 0x480377
test al, 4
jne 0x48044e
cmp byte [esp + 0xf], 0
jne 0x4803b2
lea eax, [esp + 0x5c]
push str.AUTOEXEC.BAT
push eax
call fcn.00521896
add esp, 8
test eax, eax
je 0x48044e
lea eax, [esp + 0x5c]
push str.CONFIG.SYS
push eax
call fcn.00521896
add esp, 8
test eax, eax
je 0x48044e
mov eax, dword [ebx]
mov ecx, ebx
push dword [esp + 0x20]
call dword [eax + 0x30]
mov eax, dword [ebx]
lea ecx, [esp + 0x5c]
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 0x4803fb
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 0x480408
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]
cmp byte [ebp + 8], 0
jne 0x48042f
test byte [esp + 0x30], 0x10
je 0x48042f
mov eax, dword [esi + 4]
lea ecx, [esi + 4]
call dword [eax + 4]
jmp 0x48044a
mov eax, dword [edi + 0x20]
cmp eax, dword [edi + 0x24]
jne 0x48043e
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 esi, dword [esp + 0x14]
lea eax, [esp + 0x30]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4802c0
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]
cmp byte [ebp + 0x10], 0
je 0x48069f
mov eax, dword [ebx]
mov ecx, ebx
push dword [esp + 0x20]
call dword [eax + 0x30]
call fcn.0043c7b0
mov esi, eax
lea ebx, [esi + 0x1c]
push ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x34]
cmp dword [eax + 0x20], 0
jbe 0x4804c4
dec dword [eax + 0x20]
mov ecx, dword [eax + 0x20]
mov eax, dword [eax + 0x1c]
push dword [esp + 0x24]
mov ebx, dword [eax + ecx*4]
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x4804d6
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esi + 0x3c]
call eax
mov ebx, eax
mov dword [esp + 0x2c], eax
mov eax, dword [ebx]
mov ecx, ebx
push dword [esp + 0x1c]
call dword [eax + 0x1e8]
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
call dword [eax + 0x138]
mov ecx, eax
call fcn.00408f00
mov dword [esp + 0x24], eax
call fcn.00407db0
mov dword [esp + 0x10], eax
lea esi, [eax + 0x1c]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 0x34]
cmp dword [eax + 0x20], 0
jbe 0x480537
dec dword [eax + 0x20]
mov ecx, dword [eax + 0x20]
mov eax, dword [eax + 0x1c]
mov esi, dword [eax + ecx*4]
lea eax, [edx + 0x1c]
push eax
mov dword [esp + 0x18], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x48054d
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0x3c]
call eax
mov esi, eax
mov dword [esp + 0x14], eax
mov eax, dword [ebx]
mov ecx, ebx
mov eax, dword [eax + 0x30]
call eax
test al, al
je 0x480679
mov eax, dword [ebx]
mov ecx, ebx
mov eax, dword [eax + 0x34]
call eax
test al, al
je 0x480679
push dword [esp + 0x28]
mov eax, dword [ebx]
mov ecx, ebx
push 1
call dword [eax + 0x1a0]
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], 0
lea ecx, [eax + 8]
mov eax, dword [ecx]
call dword [eax + 0x30]
test eax, eax
je 0x48066d
mov ebx, dword [esp + 0x14]
xor esi, esi
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 0x24]
mov ecx, dword [eax + esi*4]
mov esi, dword [ebx]
mov eax, dword [ecx]
call dword [eax + 0x50]
push eax
mov ecx, ebx
call dword [esi + 0x210]
mov eax, dword [ebx]
mov ecx, ebx
push 0x5bb850
call dword [eax + 0x1e0]
push dword [esp + 0x24]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x1dc]
call fcn.0043c7b0
mov dword [esp + 0x10], eax
lea esi, [eax + 0x1c]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 0x34]
cmp dword [eax + 0x20], 0
jbe 0x480610
dec dword [eax + 0x20]
mov ecx, dword [eax + 0x20]
mov eax, dword [eax + 0x1c]
mov esi, dword [eax + ecx*4]
lea eax, [edx + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x480622
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0x3c]
call eax
mov esi, eax
mov eax, dword [esi]
mov ecx, esi
push ebx
call dword [eax + 0x1e8]
push edi
push dword [ebp + 0x10]
mov ecx, esi
push dword [esp + 0x30]
push dword [ebp + 8]
call fcn.00480160
mov eax, dword [esi + 4]
lea ecx, [esi + 4]
call dword [eax + 4]
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
add ecx, 8
inc esi
mov dword [esp + 0x20], esi
mov eax, dword [ecx]
call dword [eax + 0x30]
cmp esi, eax
jb 0x4805a1
mov ebx, dword [esp + 0x2c]
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
add ecx, 4
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
je 0x480686
mov eax, dword [esi + 4]
lea ecx, [esi + 4]
call dword [eax + 4]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x480696
lea ecx, [eax + 4]
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebx + 4]
lea ecx, [ebx + 4]
call dword [edx + 4]
mov ecx, dword [esp + 0x1c]
add ecx, 4
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [esp + 0x284]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0051a19b
mov esp, ebp
pop ebp
ret 0x10