Function at 0x406a00
Capabilities:
Get disk information
Get disk size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x40c
mov eax, dword [0x45cefc]
xor eax, esp
mov dword [esp + 0x408], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov esi, edx
push edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], ebx
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov ecx, dword [ebp + 0xc]
mov edx, 1
shl edx, cl
test edx, eax
je 0x406a60
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x408]
xor ecx, esp
call fcn.00423893
mov esp, ebp
pop ebp
ret
test esi, esi
jne 0x406a84
mov ecx, dword [0x463dd0]
push esi
lea eax, [esp + 0x34]
push eax
push esi
push esi
push esi
push esi
push 0x7202c
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x406a49
push 0x2cc
lea edx, [esp + 0x3c]
push 0
push edx
call fcn.00423160
xor eax, eax
add esp, 0xc
cmp dword [ebp + 0x14], eax
sete al
mov dword [esp + 0x2a8], eax
test esi, esi
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x290], ecx
mov dword [esp + 0x28c], edx
je 0x406acf
mov ecx, 0x12
lea edi, [esp + 0x244]
rep movsd dword es:[edi], dword [esi]
jmp 0x406ada
mov dword [esp + 0x244], 0
mov eax, dword [ebx]
test eax, eax
jne 0x406b03
cmp dword [ebx + 8], eax
je 0x406b03
lea esi, [ebx + 0x18]
mov ecx, 0x12
lea edi, [esp + 0x2bc]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x2b8], 1
jmp 0x406b0e
mov dword [esp + 0x2b8], 0
cmp dword [0x471aac], 5
mov ecx, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
mov dword [esp + 0x2a0], eax
mov eax, dword [ebx + 4]
mov dword [esp + 0x2a4], eax
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x298], ecx
mov dword [esp + 0x29c], edx
mov dword [esp + 0x2b4], eax
mov dword [esp + 0x2ac], 1
jne 0x406b65
cmp dword [0x471ab0], 0
jne 0x406b65
mov dword [esp + 0x2ac], 0
mov ebx, dword [esp + 0x28]
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.00405be0
add esp, 8
cmp dword [esp + 0x2c], 0
jne 0x406c5d
cmp byte [ebx], 0x5c
jne 0x406bb7
cmp byte [ebx + 1], 0x5c
lea eax, [ebx + 1]
jne 0x406bb7
push eax
push str.UNC_s
lea eax, [esp + 0x44]
push 0x104
push eax
call fcn.0042662e
add esp, 0x10
mov dword [esp + 0x2b0], 1
push 0x103
lea ecx, [esp + 0x30c]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetVolumePathNameA]
test eax, eax
je 0x406c5d
lea edx, [esp + 0x10]
push edx
mov eax, edx
push eax
lea ecx, [esp + 0x24]
push ecx
push edx
lea eax, [esp + 0x318]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x406bfe
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x294], ecx
cmp dword [esp + 0x2a0], 0
jne 0x406c3f
push 0
push 0
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x1c]
push eax
push 0
push 0
push 0
lea ecx, [esp + 0x324]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
je 0x406c3f
mov edx, dword [esp + 0x24]
shr edx, 0x13
and edx, 1
mov dword [esp + 0x2a0], edx
lea eax, [esp + 0x308]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 4
jne 0x406c5d
mov dword [esp + 0x2b0], 1
lea esi, [esp + 0x3c]
call fcn.00405e30
push 0
lea ecx, [esp + 0x38]
push ecx
mov ecx, dword [0x463dd0]
push 0x2cc
lea edx, [esp + 0x44]
push edx
push 0x2cc
mov eax, edx
push eax
push 0x72000
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
lea esi, [esp + 0x244]
mov edx, 0x48
mov edi, edx
mov ecx, esi
mov byte [ecx], 0
add ecx, 1
sub edi, 1
jne 0x406ca1
lea esp, [esp]
sub edx, 1
mov byte [esi], 0
add esi, 1
test edx, edx
jne 0x406cb0
lea esi, [esp + 0x2bc]
mov edx, 0x48
mov edi, edx
mov ecx, esi
lea ecx, [ecx]
mov byte [ecx], 0
add ecx, 1
sub edi, 1
jne 0x406cd0
jmp 0x406ce0
sub edx, 1
mov byte [esi], 0
add esi, 1
test edx, edx
jne 0x406ce0
test eax, eax
jne 0x406d8d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x406d22
cmp dword [esp + 0x2a8], 0
je 0x406d44
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov dword [esp + 0x2a8], 0
jmp 0x406aa7
cmp dword [esp + 0x2b0], 0
jne 0x406d75
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov dword [esp + 0x2b0], 1
jmp 0x406aa7
push str.FILE_IN_USE_FAILED
push str.____hs___
push 0x474260
call dword [sym.imp.USER32.dll_wsprintfW]
mov edx, dword [0x471a9c]
mov eax, dword [esp + 0x2c]
add esp, 0xc
push 0x10
push edx
push 0x474260
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x408]
xor ecx, esp
call fcn.00423893
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x38]
test eax, eax
je 0x406db7
xor ecx, ecx
cmp eax, 3
setne cl
sub ecx, 1
mov eax, ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x408]
xor ecx, esp
call fcn.00423893
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
mov edi, 0x8000
call fcn.00406870
mov eax, dword [esp + 0x2a8]
mov ecx, dword [esp + 0x414]
pop edi
neg eax
pop esi
sbb eax, eax
pop ebx
xor ecx, esp
add eax, 2
call fcn.00423893
mov esp, ebp
pop ebp
ret