Function at 0x405d90
Capabilities:
Check if file exists
Enumerate files on windows
Enumerate files recursively
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e8e0a
mov eax, dword fs:[0]
push eax
sub esp, 0x51c
mov eax, dword [0x53f1e4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x2c]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x514], eax
mov dword [ebp - 0x51c], ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp dword [ecx], ebx
je 0x405def
cmp dword [ebp + 0x24], 8
jb 0x406182
mov eax, dword [ebp + 0x10]
push eax
jmp 0x40617a
mov esi, 8
cmp dword [eax + 0x10], ebx
je 0x406166
cmp dword [eax + 0x14], esi
jb 0x405e04
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406166
mov edx, dword [ebp - 0x514]
mov ecx, dword [edx + 0x10]
cmp dword [edx + 0x14], esi
jb 0x405e25
mov eax, dword [edx]
jmp 0x405e27
mov eax, edx
cmp word [eax + ecx*2 - 2], 0x5c
je 0x405e43
push 1
mov eax, 0x5062dc
mov ecx, edx
call fcn.00403f00
mov edx, dword [ebp - 0x514]
push 0x506a80
push edx
lea ecx, [ebp - 0x250]
push ecx
call fcn.00403a10
add esp, 0xc
cmp dword [eax + 0x14], esi
jb 0x405e5f
mov eax, dword [eax]
lea edx, [ebp - 0x510]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x518], eax
cmp dword [ebp - 0x23c], esi
jb 0x405e90
mov eax, dword [ebp - 0x250]
push eax
call fcn.004b1676
mov eax, dword [ebp - 0x518]
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x23c], 7
mov dword [ebp - 0x240], ebx
mov word [ebp - 0x250], cx
cmp eax, 0xffffffff
jne 0x405ebb
lea ecx, [ebp + 0x10]
call fcn.00404a50
jmp 0x406182
lea edx, [ebp - 0x510]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x40614d
mov esi, dword [ebp - 0x51c]
cmp dword [esi], ebx
jne 0x40614d
mov ecx, 0x506ae0
lea eax, [ebp - 0x4e4]
lea ebx, [ebx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x405f16
cmp dx, bx
je 0x405f12
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x405f16
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x405ef0
xor eax, eax
jmp 0x405f1b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x40612a
mov ecx, 0x50682c
lea eax, [ebp - 0x4e4]
mov edi, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x405f56
cmp dx, bx
je 0x405f52
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x405f56
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x405f30
xor eax, eax
jmp 0x405f5b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x40612a
mov ecx, dword [ebp - 0x514]
lea eax, [ebp - 0x4e4]
push eax
call fcn.004042e0
push eax
push 0x506a84
lea edx, [ebp - 0x218]
call fcn.00406cd0
add esp, 0xc
test byte [ebp - 0x510], 0x10
je 0x406067
lea ecx, [ebp - 0x218]
push ecx
lea ecx, [ebp - 0x26c]
call fcn.00404190
push 0xffffffffffffffff
mov byte [ebp - 4], 1
push ebx
lea eax, [ebp + 0x10]
xor edx, edx
push eax
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x224], ebx
mov word [ebp - 0x234], dx
call fcn.00404530
lea eax, [ebp - 0x4e4]
mov byte [ebp - 4], 2
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x405fe4
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x4e4]
lea ecx, [ebp - 0x234]
call fcn.00403f00
push 1
mov eax, 0x5062dc
lea ecx, [ebp - 0x234]
call fcn.00403f00
push esi
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x520], esp
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x234]
xor edx, edx
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], ebx
push eax
mov word [ecx], dx
call fcn.00404530
lea ecx, [ebp - 0x26c]
push edi
push ecx
call fcn.00405d90
add esp, 0x28
lea ecx, [ebp - 0x234]
call fcn.00404a50
lea ecx, [ebp - 0x26c]
jmp 0x406122
cmp dword [esi], ebx
jne 0x40614d
lea edx, [ebp - 0x4e4]
push edx
lea eax, [ebp + 0x10]
push eax
lea ecx, [ebp - 0x288]
push ecx
call fcn.00403a10
add esp, 0xc
lea edx, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x26c]
mov byte [ebp - 4], 3
call fcn.00404190
lea eax, [ebp - 0x26c]
push eax
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 4
call fcn.004055f0
add esp, 4
push eax
lea ecx, [ebp - 0x2c0]
push ecx
lea ecx, [ebp - 0x288]
mov byte [ebp - 4], 5
call fcn.00406cf0
add esp, 8
mov ecx, eax
mov edx, edi
mov byte [ebp - 4], 6
call fcn.004075a0
push eax
lea edx, [ebp - 0x528]
push edx
push edi
call fcn.00406e60
lea esi, [ebp - 0x2c0]
call fcn.004061a0
lea ecx, [ebp - 0x234]
call fcn.00401e80
lea ecx, [ebp - 0x26c]
mov byte [ebp - 4], 3
call fcn.00404a50
mov eax, dword [ebp - 0x51c]
lea ecx, [ebp - 0x288]
cmp dword [eax], ebx
jne 0x406148
mov byte [ebp - 4], bl
call fcn.00404a50
mov edx, dword [ebp - 0x518]
lea ecx, [ebp - 0x510]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x405ed1
jmp 0x40614d
call fcn.00404a50
mov eax, dword [ebp - 0x518]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [ebp + 0x10]
call fcn.00404a50
mov al, 1
jmp 0x406184
push 0x506a68
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp + 0x24], esi
jb 0x406182
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.004b1676
add esp, 4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004b1681
mov esp, ebp
pop ebp
ret