Function at 0x40f7f0
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x64c
mov eax, dword [0x440008]
xor eax, esp
mov dword [esp + 0x648], eax
push ebx
push esi
push edi
lea eax, [esp + 0x1c]
mov dword [esp + 0x30], 0
xorps xmm0, xmm0
xor esi, esi
push eax
push 8
movq qword [esp + 0x30], xmm0
movlpd qword [esp + 0x18], xmm0
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40f869
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 4
push eax
push 4
lea eax, [esp + 0x28]
push eax
push 0x14
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
cmovne esi, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40f87a
push eax
call edi
test esi, esi
jne 0x40f894
push esi
xor edx, edx
lea ecx, [esi + 6]
call fcn.0040a5f0
add esp, 4
test al, al
jne 0x40fb30
mov byte [esp + 0xf], 1
lea eax, [esp + 0x38]
mov ecx, 0x104
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x40f8a2
push 0x104
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
test eax, eax
je 0x40fab1
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.SHLWAPI.dll_PathGetDriveNumberW]
test eax, eax
js 0x40fab1
mov edx, 0x104
lea ecx, [esp + 0x240]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub edx, 1
jne 0x40f8e4
add eax, 0x41
push eax
push str.._C:
lea eax, [esp + 0x248]
push 0x104
push eax
call dword [sym.imp.SHLWAPI.dll_wnsprintfW]
add esp, 0x10
lea eax, [esp + 0x240]
push 0
push 0x2000000
push 3
push 0
push 3
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x18], esi
cmp esi, 0xffffffff
je 0x40fab1
push 0x2000
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
mov dword [esp + 0x24], ebx
test ebx, ebx
je 0x40fa9a
push 0
lea eax, [esp + 0x38]
mov dword [esp + 0x38], 0
push eax
push 0x2000
push ebx
push 0
push 0
push 0x560000
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40fa86
cmp dword [ebx], 0
jbe 0x40fa86
mov eax, dword [esp + 0x14]
xor edi, edi
mov esi, dword [esp + 0x10]
add ebx, 8
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], esi
nop dword [eax]
nop word [eax + eax]
push dword [ebx]
lea eax, [esp + 0x44c]
push str..PhysicalDrive_u
push 0x104
push eax
call dword [sym.imp.SHLWAPI.dll_wnsprintfW]
add esp, 0x10
test eax, eax
jle 0x40fa7f
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
lea eax, [esp + 0x460]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40fa7f
push 0
lea eax, [esp + 0x34]
push eax
push 8
lea eax, [esp + 0x34]
push eax
push 0
push 0
push 0x7405c
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [esp + 0x10], eax
test eax, eax
je 0x40fa42
mov eax, dword [esp + 0x20]
add eax, dword [esp + 0x28]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
adc eax, dword [esp + 0x2c]
mov dword [esp + 0x1c], eax
mov byte [esp + 0xf], 0
jmp 0x40fa47
mov byte [esp + 0xf], 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x10], 0
je 0x40fa65
mov esi, dword [esp + 0x24]
inc edi
add ebx, 0x18
cmp edi, dword [esi]
jb 0x40f9b0
push dword [esp + 0x24]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40faa2
mov byte [esp + 0xf], 1
jmp 0x40fa65
push dword [esp + 0x24]
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40faa2
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
push dword [esp + 0x18]
call edi
cmp byte [esp + 0xf], 0
je 0x40fb0b
jmp 0x40fab9
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
push str..PhysicalDrive0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40fb0b
push 0
lea eax, [esp + 0x34]
push eax
push 8
lea eax, [esp + 0x34]
push eax
push 0
push 0
push 0x7405c
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40fb04
mov esi, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, 0x14
jg 0x40fb30
jl 0x40fb16
test esi, esi
jae 0x40fb30
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x648]
xor ecx, esp
call fcn.0041396d
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x654]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041396d
mov esp, ebp
pop ebp
ret