Function at 0x405080
Capabilities:
Check if file exists
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50492b
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x2d8
mov eax, dword [0x52d324]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
mov dword [ebp - 0x2e4], edi
cmp dword [edi + 0x10], 0
je 0x405456
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x4050df
mov eax, dword [edi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x405456
push 0x51e8c4
mov edx, edi
lea ecx, [ebp - 0x74]
call fcn.00402ac0
add esp, 4
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x2e0]
cmp dword [ebp - 0x60], 8
lea eax, [ebp - 0x74]
push ecx
cmovae eax, dword [ebp - 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x2e8], eax
cmp eax, 0xffffffff
je 0x405406
nop
lea eax, [ebp - 0x2b4]
push eax
push 0x51e8d0
call fcn.004e319d
add esp, 8
test eax, eax
je 0x4053df
lea eax, [ebp - 0x2b4]
push eax
push 0x51e8d4
call fcn.004e319d
add esp, 8
test eax, eax
je 0x4053df
push 0x51e7c0
mov edx, edi
lea ecx, [ebp - 0x44]
call fcn.00402ac0
add esp, 4
mov edx, eax
lea ecx, [ebp - 0x2b4]
mov byte [ebp - 4], 1
lea edi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405190
sub ecx, edi
lea eax, [ebp - 0x2b4]
sar ecx, 1
push ecx
push eax
mov ecx, edx
call fcn.004029e0
mov dword [ebp - 0x1c], 0
xor ecx, ecx
mov dword [ebp - 0x18], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x2c], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x1c], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x30]
cmp edx, 8
jb 0x40521e
mov ecx, dword [ebp - 0x44]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405214
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405476
push edx
push ecx
call fcn.004dc783
add esp, 8
xor eax, eax
mov dword [ebp - 0x34], 0
test byte [ebp - 0x2e0], 0x10
mov dword [ebp - 0x30], 7
mov word [ebp - 0x44], ax
je 0x405375
mov eax, dword [ebx + 8]
test al, al
je 0x40535d
mov edx, dword [ebp - 0x2e4]
lea ecx, [ebp - 0x8c]
push 0x51e7c0
call fcn.00402ac0
add esp, 4
lea ecx, [ebp - 0x2b4]
mov byte [ebp - 4], 4
push ecx
mov edx, eax
lea ecx, [ebp - 0x5c]
call fcn.00402a50
add esp, 4
mov byte [ebp - 4], 5
mov ecx, dword [esi + 4]
cmp dword [esi + 8], ecx
je 0x4052be
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
movups xmm0, xmmword [eax]
movups xmmword [ecx], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ecx + 0x10], xmm0
xor ecx, ecx
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
add dword [esi + 4], 0x18
jmp 0x4052c7
push eax
push ecx
mov ecx, esi
call fcn.00406d80
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x48]
cmp edx, 8
jb 0x405305
mov ecx, dword [ebp - 0x5c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4052fb
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405476
push edx
push ecx
call fcn.004dc783
add esp, 8
xor eax, eax
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x78]
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 7
mov word [ebp - 0x5c], ax
cmp edx, 8
jb 0x40535a
mov ecx, dword [ebp - 0x8c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405350
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405476
push edx
push ecx
call fcn.004dc783
add esp, 8
mov eax, dword [ebx + 8]
cmp byte [ebx + 0xc], 0
je 0x40539b
push 1
push eax
mov edx, esi
lea ecx, [ebp - 0x2c]
call fcn.00405080
add esp, 8
jmp 0x40539b
cmp byte [ebx + 8], al
jne 0x40539b
mov eax, dword [esi + 4]
lea ecx, [ebp - 0x2c]
push ecx
cmp dword [esi + 8], eax
je 0x405393
mov ecx, eax
call fcn.00402570
add dword [esi + 4], 0x18
jmp 0x40539b
push eax
mov ecx, esi
call fcn.00406ef0
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x4053d9
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4053cf
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405476
push edx
push ecx
call fcn.004dc783
add esp, 8
mov edi, dword [ebp - 0x2e4]
lea eax, [ebp - 0x2e0]
push eax
push dword [ebp - 0x2e8]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x405130
push dword [ebp - 0x2e8]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esi + 4]
mov eax, 0x2aaaaaab
sub ecx, dword [esi]
imul ecx
sar edx, 2
mov esi, edx
shr esi, 0x1f
add esi, edx
mov edx, dword [ebp - 0x60]
cmp edx, 8
jb 0x405452
mov ecx, dword [ebp - 0x74]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405448
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405476
push edx
push ecx
call fcn.004dc783
add esp, 8
mov eax, esi
jmp 0x405458
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004dc214
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.004e2bf9
int3