Function at 0x405160
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 [0x4b9b20]
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 0x40532e
push str.Seach_Disk_find_2
call ebp
test edi, edi
jle 0x40528e
jmp 0x4051d0
cmp word [esi], 0
je 0x40528e
push esi
lea edx, [esp + 0x18]
push 0x104
push edx
call fcn.0046be85
lea eax, [esp + 0x20]
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4051f4
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x12], 0x5c
jne 0x405228
lea eax, [esp + 0x14]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405212
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.00469e58
add esp, 0xc
lea eax, [esp + 0x14]
push eax
call ebx
cmp eax, 0xffffffff
je 0x40525d
lea ecx, [esp + 0x14]
push ecx
call ebx
test eax, 0x10000
je 0x405310
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x405310
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405271
sub eax, edx
sar eax, 1
inc eax
sub edi, eax
lea esi, [esi + eax*2]
test edi, edi
jg 0x4051d0
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 0x4052ee
push str.Lnvsdisk.eed
lea ecx, [esp + 0x18]
push 0x104
push ecx
call fcn.00469e58
add esp, 0xc
lea edx, [esp + 0x14]
push edx
call ebx
cmp eax, 0xffffffff
je 0x4052df
lea eax, [esp + 0x14]
push eax
call ebx
test eax, 0x10000
je 0x4053b6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x4053b6
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.00466d50
add esp, 0x418
ret
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
push 0x104
push eax
call fcn.0046be85
add esp, 0xc
mov eax, 1
jmp 0x4052f7
push str.Seach_Disk_find_3
call ebp
push 0x49f0d8
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
xor esi, esi
jmp 0x405350
add word [esp + 0x21c], si
lea edx, [esp + 0x21c]
push edx
lea eax, [esp + 0x18]
push 0x104
push eax
call fcn.0046be85
push str.Lnvsdisk.eed
lea ecx, [esp + 0x24]
push 0x104
push ecx
call fcn.00469e58
add esp, 0x18
lea edx, [esp + 0x14]
push edx
call ebx
cmp eax, 0xffffffff
je 0x4053a0
lea eax, [esp + 0x14]
push eax
call ebx
test eax, 0x10000
je 0x4053b6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x4053b6
inc esi
cmp esi, 0x1a
jb 0x405350
jmp 0x40528e
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push 0x104
push edx
call fcn.0046be85
add esp, 0xc
mov eax, 1
jmp 0x4052f7