Function at 0x405870
Capabilities:
Check if file exists
Get common file path
Get disk information
Get file attributes
Print debug messages

Disassembly:
sub esp, 0x418
mov eax, dword [0x4bcb20]
xor eax, esp
mov dword [esp + 0x414], eax
mov eax, dword [esp + 0x41c]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push esi
push edi
push str.Seach_Disk_File_GetLogicalDriveStrings
mov dword [esp + 0x14], eax
lea esi, [esp + 0x220]
call ebp
mov ecx, esi
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
push str.Seach_Disk_find_1
mov edi, eax
call ebp
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test edi, edi
je 0x405a3e
push str.Seach_Disk_find_2
call ebp
test edi, edi
jle 0x40599e
jmp 0x4058e0
cmp word [esi], 0
je 0x40599e
push esi
lea edx, [esp + 0x18]
push 0x104
push edx
call fcn.0046aed5
lea eax, [esp + 0x20]
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405904
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x12], 0x5c
jne 0x405938
lea eax, [esp + 0x14]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405922
sub eax, edx
sar eax, 1
xor ecx, ecx
mov word [esp + eax*2 + 0x12], cx
push str.Lnvsdisk.eed
lea edx, [esp + 0x18]
push 0x104
push edx
call fcn.0046a578
add esp, 0xc
lea eax, [esp + 0x14]
push eax
call ebx
cmp eax, 0xffffffff
je 0x40596d
lea ecx, [esp + 0x14]
push ecx
call ebx
test eax, 0x10000
je 0x405a20
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x405a20
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405981
sub eax, edx
sar eax, 1
inc eax
sub edi, eax
lea esi, [esi + eax*2]
test edi, edi
jg 0x4058e0
push str.Seach_Disk_find_search_My_Document
call ebp
push 0
push 5
lea eax, [esp + 0x1c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4059fe
push str.Lnvsdisk.eed
lea ecx, [esp + 0x18]
push 0x104
push ecx
call fcn.0046a578
add esp, 0xc
lea edx, [esp + 0x14]
push edx
call ebx
cmp eax, 0xffffffff
je 0x4059ef
lea eax, [esp + 0x14]
push eax
call ebx
test eax, 0x10000
je 0x405ac6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x405ac6
push str.Seach_Disk_find_end
call ebp
xor eax, eax
mov ecx, dword [esp + 0x424]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00466b40
add esp, 0x418
ret
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
push 0x104
push eax
call fcn.0046aed5
add esp, 0xc
mov eax, 1
jmp 0x405a07
push str.Seach_Disk_find_3
call ebp
push 0x4a1ef0
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
xor esi, esi
jmp 0x405a60
add word [esp + 0x21c], si
lea edx, [esp + 0x21c]
push edx
lea eax, [esp + 0x18]
push 0x104
push eax
call fcn.0046aed5
push str.Lnvsdisk.eed
lea ecx, [esp + 0x24]
push 0x104
push ecx
call fcn.0046a578
add esp, 0x18
lea edx, [esp + 0x14]
push edx
call ebx
cmp eax, 0xffffffff
je 0x405ab0
lea eax, [esp + 0x14]
push eax
call ebx
test eax, 0x10000
je 0x405ac6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x405ac6
inc esi
cmp esi, 0x1a
jb 0x405a60
jmp 0x40599e
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push 0x104
push edx
call fcn.0046aed5
add esp, 0xc
mov eax, 1
jmp 0x405a07