Function at 0x401fa0
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x148c
call fcn.004128e0
mov eax, dword [0x41a004]
xor eax, esp
mov dword [esp + 0x1488], eax
push ebx
push esi
push edi
push 0x13fd320
call fcn.00405549
mov ebx, eax
add esp, 4
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x402319
lea edi, [ebx + 8]
mov dword [ebx + 4], 0
push edi
mov dword [ebx], 0
mov dword [esp + 0x14], edi
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x418d84
lea eax, [esp + 0xa8c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x20c
call fcn.00405549
add esp, 4
mov dword [esp + 0xc], eax
test eax, eax
je 0x40206b
mov edi, eax
mov dword [eax + 0x208], 0
mov ecx, 0x82
lea esi, [esp + 0xa88]
rep movsd dword es:[edi], dword [esi]
lea edi, [ebx + 8]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebx]
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0xc]
test esi, esi
jne 0x40205f
mov dword [ebx], ecx
jmp 0x402068
mov eax, dword [ebx + 4]
mov dword [eax + 0x208], ecx
mov dword [ebx + 4], ecx
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebx]
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
je 0x402319
nop word [eax + eax]
mov esi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push edi
call esi
push 0x208
lea eax, [esp + 0x67c]
push 0
push eax
call fcn.004033c0
add esp, 0xc
push edi
call esi
mov esi, dword [ebx]
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
jne 0x4020d0
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esi, [esp + 0x678]
jmp 0x402110
mov edx, dword [ebx]
lea edi, [esp + 0x220]
mov esi, edx
mov ecx, 0x82
rep movsd dword es:[edi], dword [esi]
mov eax, dword [edx + 0x208]
push edx
mov dword [ebx], eax
call fcn.00405554
add esp, 4
cmp dword [ebx], 0
jne 0x4020ff
mov dword [ebx + 4], 0
lea eax, [ebx + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esi, [esp + 0x220]
mov ecx, 0x82
lea edi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
push 0x400
lea eax, [esp + 0xc94]
mov ecx, 0x82
lea esi, [esp + 0x1c]
lea edi, [esp + 0x884]
push 0
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.004033c0
add esp, 0xc
lea eax, [esp + 0x428]
push 0x250
push 0
push eax
call fcn.004033c0
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [esp + 0x88c]
add esp, 0xc
push eax
lea eax, [esp + 0xc94]
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [esp + 0xc90]
push 0x418ef0
push eax
call edi
push 2
push 0
push 0
lea eax, [esp + 0x434]
push eax
push 1
lea eax, [esp + 0xca4]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov dword [esp + 0xc], eax
cmp eax, 0xffffffff
je 0x4022fe
mov ebx, eax
nop word [eax + eax]
cmp word [esp + 0x454], 0x2e
je 0x4022dc
lea eax, [esp + 0x880]
push eax
lea eax, [esp + 0xc94]
push eax
call esi
push 0x418ef8
lea eax, [esp + 0xc94]
push eax
call edi
lea eax, [esp + 0x454]
push eax
lea eax, [esp + 0xc94]
push eax
call edi
test byte [esp + 0x428], 0x10
lea ecx, [esp + 0xc90]
je 0x4022b7
call fcn.00401dc0
test eax, eax
je 0x4022dc
lea eax, [esp + 0xc90]
push eax
lea eax, [esp + 0x67c]
push eax
call esi
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x20c
call fcn.00405549
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4022a7
push dword [esp + 0x10]
mov ecx, 0x82
lea esi, [esp + 0x67c]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov dword [ebx + 0x208], 0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esp + 0x14]
mov esi, dword [edi]
lea eax, [edi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
jne 0x402295
mov dword [edi], ebx
jmp 0x40229e
mov eax, dword [edi + 4]
mov dword [eax + 0x208], ebx
mov dword [edi + 4], ebx
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebx, dword [esp + 0xc]
jmp 0x4022dc
call fcn.00401ea0
test eax, eax
je 0x4022dc
lea ecx, [esp + 0xc90]
call fcn.00401ea0
test eax, eax
je 0x4022dc
lea ecx, [esp + 0xc90]
call fcn.00401a80
lea eax, [esp + 0x428]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4021c0
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, dword [esp + 0x14]
lea edi, [ebx + 8]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebx]
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
jne 0x402090
mov ecx, dword [esp + 0x1494]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040232e
mov esp, ebp
pop ebp
ret