Function at 0x42fc2c
Capabilities:
Get common file path
Get disk information
Get disk size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x294
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
xor ebx, ebx
mov dword [esp + 0x34], eax
cmp eax, ebx
jne 0x42fc52
xor eax, eax
jmp 0x42fe8d
push 0x1da
push 8
push dword [0x4401c8]
mov dword [esp + 0x20], 2
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
cmp edi, ebx
je 0x42fc4b
lea eax, [esp + 0x90]
push eax
push ebx
push ebx
push 0x6024
push ebx
mov byte [edi], 1
mov dword [esp + 0x2c], ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x42fca6
lea eax, [esp + 0x90]
push eax
call dword [sym.imp.SHLWAPI.dll_PathGetDriveNumberW]
mov dword [esp + 0x18], eax
push 0x408da0
lea eax, [esp + 0x22]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea esi, [esp + 0x48]
mov eax, 0xab
call fcn.00413de7
mov eax, esi
mov byte [esp + 0x24], 1
mov dword [esp + 0x28], 0x23
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ebx
mov byte [esp + 0xf], bl
mov dword [esp + 0x10], ebx
mov ecx, dword [esp + 0x10]
xor eax, eax
inc eax
shl eax, cl
test dword [esp + 0x34], eax
je 0x42fe5f
mov eax, dword [esp + 0x14]
inc byte [edi + 1]
add dword [esp + 0x14], 0x12
lea esi, [edi + eax]
mov al, byte [esp + 0xf]
mov byte [esi], al
movzx eax, al
add ax, 0x41
mov word [esp + 0x1c], ax
lea eax, [esp + 0x1c]
push eax
mov byte [esp + 0x11], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
dec eax
dec eax
je 0x42fdf1
dec eax
je 0x42fde7
dec eax
je 0x42fde0
dec eax
je 0x42fdd9
dec eax
jne 0x42fdf6
mov byte [esp + 0xd], 5
mov al, 1
mov byte [esp + 0xe], 0
test al, al
je 0x42fe45
push 0x105
lea eax, [esp + 0x94]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
test eax, eax
je 0x42fe0f
xor eax, eax
mov word [esp + 0x298], ax
lea eax, [esp + 0x90]
push eax
call dword [sym.imp.USER32.dll_CharUpperW]
mov dword [esp + 0x30], ebx
xor bl, bl
lea eax, [esp + 0x24]
call fcn.00424b47
test eax, eax
je 0x42fe0d
push eax
lea eax, [esp + 0x94]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x42fe09
test bl, bl
je 0x42fe04
cmp bl, 1
je 0x42fdfd
lea eax, [ebx - 2]
cmp al, 3
ja 0x42fe09
mov byte [esp + 0xe], 0x10
jmp 0x42fe09
mov byte [esp + 0xd], 4
jmp 0x42fdf6
mov byte [esp + 0xd], 3
jmp 0x42fdf6
mov byte [esp + 0xd], 2
jmp 0x42fd50
mov byte [esp + 0xd], 1
xor al, al
jmp 0x42fd52
mov byte [esp + 0xe], 0x30
jmp 0x42fe09
mov byte [esp + 0xe], 0x20
inc bl
jmp 0x42fda2
xor ebx, ebx
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x3c]
push eax
push ebx
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
je 0x42fe45
mov eax, dword [esp + 0x38]
mov dword [esi + 2], eax
mov eax, dword [esp + 0x3c]
mov dword [esi + 6], eax
mov eax, dword [esp + 0x40]
mov dword [esi + 0xa], eax
mov eax, dword [esp + 0x44]
mov dword [esi + 0xe], eax
mov al, byte [esp + 0xe]
or al, byte [esp + 0xd]
mov ecx, dword [esp + 0x10]
mov byte [esi + 1], al
cmp dword [esp + 0x18], ecx
jne 0x42fe5f
or al, 0x80
mov byte [esi + 1], al
inc byte [esp + 0xf]
inc dword [esp + 0x10]
cmp byte [esp + 0xf], 0x1a
jb 0x42fce3
cmp byte [esp + 0x24], 0
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x14]
mov dword [eax], ecx
jne 0x42fe8b
push dword [esp + 0x2c]
call fcn.00421ce7
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4