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

Disassembly:
push 0xffffffffffffffff
push 0x86cb4d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x258
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor ebx, ebx
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x62]
mov word [esp + 0x60], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [0x98b454]
mov dword [esp + 0x14], eax
mov edi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push ebx
lea ecx, [esp + 0x64]
push 5
push ecx
push ebx
mov dword [esp + 0x280], ebx
call edi
test eax, eax
je 0x5098be
push 0x1072
lea ecx, [esp + 0x18]
call fcn.008325e8
mov eax, dword [esi + 0x488]
lea ecx, [esi + 0x480]
lea edx, [esp + 0x14]
push edx
push eax
call fcn.0082ada5
mov eax, dword [esi + 0x49c]
lea ecx, [esi + 0x494]
lea edx, [esp + 0x60]
push edx
push eax
call fcn.0082ad79
inc dword [esi + 0x47c]
push ebx
lea eax, [esp + 0x64]
push 0x10
push eax
push ebx
call edi
test eax, eax
je 0x50990f
push 0x1073
lea ecx, [esp + 0x18]
call fcn.008325e8
mov eax, dword [esi + 0x488]
lea ecx, [esi + 0x480]
lea edx, [esp + 0x14]
push edx
push eax
call fcn.0082ada5
mov eax, dword [esi + 0x49c]
lea ecx, [esi + 0x494]
lea edx, [esp + 0x60]
push edx
push eax
call fcn.0082ad79
inc dword [esi + 0x47c]
lea ecx, [esp + 0x4c]
call fcn.0082b045
lea ecx, [esp + 0x24]
mov byte [esp + 0x270], 1
call fcn.0082aad0
lea ecx, [esp + 0x38]
mov byte [esp + 0x270], 2
call fcn.0082aad0
mov byte [esp + 0x270], 3
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov ecx, dword [0x9363b0]
mov ebx, dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov dword [esp + 0x18], eax
mov eax, dword [0x9363ac]
mov ebp, 1
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
xor edi, edi
mov edx, dword [esp + 0x18]
test edx, ebp
je 0x509a07
lea ecx, [esp + 0x1c]
lea eax, [edi + 0x41]
push ecx
mov word [esp + 0x20], ax
call ebx
cmp eax, 3
jne 0x509a07
mov edx, dword [esp + 0x54]
push edi
push edx
lea ecx, [esp + 0x54]
call fcn.0082b269
mov eax, dword [0x98b454]
mov dword [esp + 0x10], eax
lea ecx, [edi + 0x41]
lea edx, [esp + 0x10]
push ecx
push 0x93a250
push edx
mov byte [esp + 0x27c], 4
call fcn.00826097
mov ecx, dword [esp + 0x38]
add esp, 0xc
lea eax, [esp + 0x10]
push eax
push ecx
lea ecx, [esp + 0x2c]
call fcn.0082ada5
push 0x92edb8
lea ecx, [esp + 0x14]
call fcn.008322dc
mov eax, dword [esp + 0x40]
lea edx, [esp + 0x10]
push edx
push eax
lea ecx, [esp + 0x40]
call fcn.0082ada5
lea ecx, [esp + 0x10]
mov byte [esp + 0x270], 3
call fcn.00831eeb
shl ebp, 1
inc edi
cmp edi, 0x20
jl 0x50996c
cmp dword [esp + 0x54], 1
jle 0x509b0e
mov eax, dword [0x98b454]
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x2c]
xor edi, edi
test eax, eax
mov byte [esp + 0x270], 6
jle 0x509a9a
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx - 8]
test eax, eax
je 0x509a56
push 0x92f588
lea ecx, [esp + 0x1c]
call fcn.008322dc
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x18]
lea eax, [edx + edi*4]
push eax
call fcn.00832318
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx - 8]
test eax, eax
je 0x509a80
push 0x92f588
lea ecx, [esp + 0x14]
call fcn.008322dc
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x10]
lea eax, [edx + edi*4]
push eax
call fcn.00832318
mov eax, dword [esp + 0x2c]
inc edi
cmp edi, eax
jl 0x509a3d
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x14]
push ecx
push 0x1074
push edx
call fcn.008260aa
mov eax, dword [esi + 0x488]
lea ecx, [esi + 0x480]
add esp, 0xc
lea edx, [esp + 0x14]
push edx
push eax
call fcn.0082ada5
mov eax, dword [esi + 0x49c]
lea ecx, [esi + 0x494]
lea edx, [esp + 0x10]
push edx
push eax
call fcn.0082ada5
mov eax, dword [esi + 0x47c]
lea ecx, [esp + 0x10]
inc eax
mov byte [esp + 0x270], 5
mov dword [esi + 0x47c], eax
call fcn.00831eeb
lea ecx, [esp + 0x18]
mov byte [esp + 0x270], 3
call fcn.00831eeb
mov eax, dword [esp + 0x2c]
xor edi, edi
test eax, eax
jle 0x509b77
lea ebp, [esi + 0x480]
lea ebx, [esi + 0x494]
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x14]
mov ecx, dword [eax + edi*4]
push ecx
push 0x1075
push edx
call fcn.008260aa
mov eax, dword [ebp + 8]
add esp, 0xc
lea ecx, [esp + 0x14]
push ecx
push eax
mov ecx, ebp
call fcn.0082ada5
mov edx, dword [esp + 0x3c]
mov ecx, dword [ebx + 8]
lea eax, [edx + edi*4]
push eax
push ecx
mov ecx, ebx
call fcn.0082ada5
mov edx, dword [esi + 0x47c]
mov eax, dword [esp + 0x2c]
inc edx
inc edi
cmp edi, eax
mov dword [esi + 0x47c], edx
jl 0x509b24
lea ecx, [esp + 0x38]
mov byte [esp + 0x270], 2
call fcn.0082ab03
lea ecx, [esp + 0x24]
mov byte [esp + 0x270], 1
call fcn.0082ab03
lea ecx, [esp + 0x4c]
mov byte [esp + 0x270], 0
call fcn.0082b078
lea ecx, [esp + 0x14]
mov dword [esp + 0x270], 0xffffffff
call fcn.00831eeb
mov ecx, dword [esp + 0x268]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x264
ret