Function at 0x40ff50
Capabilities:
Get common file path
Get disk information

Disassembly:
push 0xffffffffffffffff
push 0x471cc0
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push ebp
push esi
push edi
mov eax, dword [0x489320]
xor eax, esp
push eax
lea eax, [esp + 0x3c]
mov dword fs:[0], eax
xor esi, esi
mov dword [esp + 0x18], esi
mov ebx, dword [esp + 0x4c]
push ebx
mov byte [esp + 0x1b], 0
call fcn.00415c90
mov dword [esp + 0x44], esi
mov eax, dword [0x48c7fc]
mov edx, dword [eax + 0xc]
mov ecx, 0x48c7fc
lea ebp, [ebx + 0x20]
call edx
add eax, 0x10
mov dword [ebp], eax
mov byte [esp + 0x44], 1
mov edi, dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
push esi
push esi
mov dword [ebx + 0x24], esi
call edi
mov esi, eax
test esi, esi
jbe 0x41021f
xor ecx, ecx
mov edx, 2
mul edx
seto cl
push 0x48c840
neg ecx
or ecx, eax
push ecx
call fcn.00454ee4
add esp, 8
mov ebx, eax
push ebx
push esi
mov dword [esp + 0x28], ebx
call edi
test eax, eax
je 0x410212
mov eax, dword [ebp]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
mov esi, 0x104
sub eax, esi
or eax, ecx
jge 0x410019
mov ecx, esi
mov eax, ebp
call fcn.00406b60
mov eax, dword [ebp]
cmp dword [eax - 8], esi
jge 0x41002b
push 0x80070057
call fcn.00406db0
mov dword [eax - 0xc], esi
mov ecx, dword [ebp]
push esi
xor edx, edx
push eax
mov word [ecx + 0x208], dx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov eax, dword [ebp]
mov ecx, dword [eax - 8]
test eax, eax
je 0x41005a
push ecx
push eax
call fcn.00454737
add esp, 8
test eax, eax
jl 0x410021
mov ecx, dword [ebp]
cmp eax, dword [ecx - 8]
jg 0x410021
mov dword [ecx - 0xc], eax
mov ecx, dword [ebp]
xor edx, edx
mov word [ecx + eax*2], dx
mov eax, dword [ebp]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jle 0x4100cd
push 0x5c
push eax
call fcn.0045465b
add esp, 8
test eax, eax
je 0x4100cd
sub eax, dword [ebp]
sar eax, 1
test eax, eax
jle 0x4100cd
inc eax
lea ecx, [esp + 0x1c]
mov edx, ebp
call fcn.0040c700
mov edi, ebp
mov byte [esp + 0x44], 2
call fcn.00406a50
mov byte [esp + 0x44], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4100cd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp word [ebx], 0
mov esi, ebx
je 0x410212
lea esp, [esp]
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
jne 0x4101e9
mov ecx, esi
call fcn.00410540
test eax, eax
jne 0x4101e9
mov eax, dword [ebp]
push esi
push eax
call fcn.004545c8
test eax, eax
sete bl
push 0x48c840
push 0x28
mov byte [esp + 0x27], bl
call fcn.00454eef
mov edi, eax
add esp, 0x10
mov dword [esp + 0x24], edi
mov byte [esp + 0x44], 3
test edi, edi
je 0x410155
lea ecx, [esp + 0x1c]
push ecx
mov ecx, esi
call fcn.00405380
mov byte [esp + 0x44], 4
or dword [esp + 0x18], 1
lea edx, [esp + 0x1c]
mov ecx, edi
call fcn.0040fd80
mov edi, eax
jmp 0x410157
xor edi, edi
mov dword [esp + 0x44], 1
test byte [esp + 0x18], 1
je 0x41018b
mov eax, dword [esp + 0x1c]
and dword [esp + 0x18], 0xfffffffe
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41018b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
mov byte [edi + 0x18], bl
call fcn.00405380
mov dword [esp + 0x2c], edi
lea edx, [esp + 0x28]
mov byte [esp + 0x44], 6
mov eax, dword [esp + 0x4c]
push edx
push eax
lea ebx, [esp + 0x38]
call fcn.00410990
mov byte [esp + 0x44], 1
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4101db
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [esp + 0x17], 0
je 0x4101e9
mov ecx, dword [esp + 0x4c]
mov dword [ecx + 0x24], edi
mov eax, esi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4101f0
sub eax, edx
sar eax, 1
cmp word [esi + eax*2 + 2], cx
lea esi, [esi + eax*2 + 2]
jne 0x4100e0
mov ebx, dword [esp + 0x20]
push ebx
call fcn.0045486f
mov ebx, dword [esp + 0x50]
add esp, 4
mov eax, ebx
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret 4