Function at 0x406c51
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x26c
push ebx
push esi
mov esi, ecx
cmp dword [esi], 1
push edi
jne 0x407165
xor ebx, ebx
cmp dword [esi + 0xc], ebx
je 0x407165
lea ecx, [esi + 0x18]
cmp word [ecx], bx
je 0x407165
push ecx
or eax, 0xffffffff
push str.CreateFile__s__FILE_READ_ATTRIBUTES_...
push 3
mov dword [esi + 0x31d0], eax
mov dword [esi + 0x31d4], eax
mov dword [esi + 0x31d8], eax
mov dword [esi + 0x31dc], eax
mov eax, dword [0x511010]
pop edi
push edi
mov dword [ebp - 8], eax
call fcn.00451479
add esp, 0xc
push ebx
push ebx
push edi
push ebx
push edi
push 0x80
lea eax, [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x406d54
push eax
push str._h0x_08Ix__IOCTL_STORAGE_CHECK_VERIFY2...
push edi
call fcn.00451479
add esp, 0xc
push ebx
lea eax, [ebp - 0x2c]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push ebx
push ebx
push 0x2d0800
push dword [ebp - 4]
mov dword [ebp - 0xc], ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 4]
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x510ff4], ebx
jne 0x407165
mov eax, dword [ebp - 8]
cmp eax, dword [0x511010]
jne 0x407165
cmp dword [esi], 1
jne 0x407165
cmp dword [ebp - 0x28], ebx
je 0x406e86
push dword [ebp - 0x28]
push str._res_i
push edi
call fcn.00451479
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [esi + 0x18]
push eax
lea eax, [ebp - 0x26c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x5c
lea eax, [ebp - 0x26c]
push eax
call fcn.004290f7
push 0x2af8
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
lea eax, [ebp - 0x26c]
push eax
call fcn.004482fe
cmp dword [0x510ff4], ebx
jne 0x407165
mov ecx, dword [ebp - 8]
cmp ecx, dword [0x511010]
jne 0x407165
cmp dword [esi], 1
jne 0x407165
cmp eax, ebx
je 0x406f19
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0x31d8], edx
mov edx, dword [ebp - 0x20]
push 2
mov dword [esi + 0x31dc], edx
lea edx, [esi + 0x31e0]
push edx
push ecx
push eax
mov dword [esi + 0x31d0], eax
mov dword [esi + 0x31d4], ecx
call fcn.0042f5da
push ebx
lea eax, [esi + 0x3200]
push eax
push dword [ebp - 0x18]
mov dword [ebp - 8], eax
push dword [ebp - 0x1c]
call fcn.0042f5da
push ebx
lea eax, [esi + 0x3220]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
call fcn.0042f5f4
push ebx
lea eax, [esi + 0x3280]
push eax
push dword [ebp - 0x20]
mov dword [ebp - 0xc], eax
push dword [ebp - 0x24]
call fcn.0042f5da
push ebx
lea eax, [esi + 0x32a0]
push eax
push dword [ebp - 0x20]
push dword [ebp - 0x24]
call fcn.0042f5f4
lea eax, [esi + 0x3240]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
call fcn.0042ea94
add esi, 0x32c0
push esi
push dword [ebp - 0x20]
push dword [ebp - 0x24]
call fcn.0042ea94
push dword [ebp - 0xc]
push dword [ebp - 8]
push str.Size_s___s_available_
push edi
call fcn.00451479
add esp, 0x10
xor eax, eax
inc eax
jmp 0x407167
push dword [ebp - 0x14]
call fcn.0044c5a0
push eax
push str._err_S
push edi
call fcn.00451479
add esp, 0xc
cmp dword [ebp - 0x14], 0x15
jne 0x406d54
push 6
pop eax
push ebx
lea ecx, [esi + 0x31e0]
push ecx
push ebx
push eax
mov dword [esi + 0x31d0], eax
mov dword [esi + 0x31d4], ebx
call fcn.0042f5da
push ebx
lea eax, [esi + 0x3200]
push eax
push dword [esi + 0x31d4]
push dword [esi + 0x31d0]
call fcn.0042f5da
push ebx
lea eax, [esi + 0x3220]
push eax
push dword [esi + 0x31d4]
push dword [esi + 0x31d0]
call fcn.0042f5f4
xor eax, eax
mov word [esi + 0x3324], ax
mov word [esi + 0x3338], ax
mov word [esi + 0x353a], ax
mov dword [esi + 0x3320], ebx
jmp 0x406e7e
call fcn.0044e457
push eax
push str._err_s
push edi
call fcn.00451479
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x15
jne 0x406fa2
push dword [esi + 0x838]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0042eb4b
cdq
mov dword [esi + 0x31d0], eax
push ebx
lea eax, [esi + 0x31e0]
push eax
push edx
push dword [esi + 0x31d0]
mov dword [esi + 0x31d4], edx
call fcn.0042f5da
push ebx
lea eax, [esi + 0x3200]
push eax
push dword [esi + 0x31d4]
push dword [esi + 0x31d0]
call fcn.0042f5da
push ebx
lea eax, [esi + 0x3220]
push eax
push dword [esi + 0x31d4]
push dword [esi + 0x31d0]
call fcn.0042f5f4
jmp 0x406e7e
lea eax, [esi + 0x18]
push eax
push str.CreateFile__s_...
push edi
call fcn.00451479
add esp, 0xc
push ebx
push ebx
push edi
push ebx
push edi
push 0x80000000
lea eax, [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x40716c
call fcn.0044e457
push eax
push str._err_s
push edi
call fcn.00451479
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x407002
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x40712e
push ebx
push ebx
push edi
push ebx
push edi
push ebx
lea eax, [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x40712e
push str.IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS...
push edi
call fcn.00451479
pop ecx
pop ecx
push ebx
lea eax, [ebp - 0x14]
push eax
push 0x38
lea eax, [ebp - 0x64]
push eax
push ebx
push ebx
push 0x560000
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x407053
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x457de4
cmp dword [ebp - 8], ebx
jne 0x407062
mov ecx, 0x457de0
push dword [ebp - 0x14]
push eax
push ecx
push str.__S_u_br_u
push edi
call fcn.00451479
add esp, 0x14
cmp dword [ebp - 8], ebx
je 0x4070ac
cmp dword [ebp - 0x14], ebx
je 0x4070ac
mov ecx, dword [ebp - 0x64]
mov dword [esi + 0x31d0], ebx
mov dword [esi + 0x31d4], ebx
cmp ecx, ebx
jbe 0x4070ac
lea eax, [ebp - 0x4c]
mov edx, dword [eax]
add dword [esi + 0x31d0], edx
mov edx, dword [eax + 4]
adc dword [esi + 0x31d4], edx
add eax, 0x18
dec ecx
jne 0x407095
push 2
lea eax, [esi + 0x31e0]
push eax
push dword [esi + 0x31d4]
push dword [esi + 0x31d0]
call fcn.0042f5da
push ebx
lea eax, [esi + 0x3200]
push eax
push dword [esi + 0x31d4]
push dword [esi + 0x31d0]
call fcn.0042f5da
push ebx
lea eax, [esi + 0x3220]
push eax
push dword [esi + 0x31d4]
push dword [esi + 0x31d0]
call fcn.0042f5f4
lea eax, [esi + 0x3240]
push eax
push dword [esi + 0x31d4]
push dword [esi + 0x31d0]
call fcn.0042ea94
lea eax, [esi + 0x3200]
push eax
push str.Size_s
push edi
call fcn.00451479
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0044e457
push eax
push str._err_s
push edi
call fcn.00451479
add esp, 0xc
mov dword [esi + 0x31d0], 4
mov dword [esi + 0x31d4], ebx
call fcn.0044e479
push eax
add esi, 0x357a
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
push eax
push str.hVol0x_08Ix__IOCTL_DISK_GET_LENGTH_INFO...
push edi
call fcn.00451479
add esp, 0xc
push ebx
xor eax, eax
mov dword [ebp - 0x10], ebx
lea edi, [ebp - 0xc]
stosd dword es:[edi], eax
lea eax, [ebp - 0x2c]
push eax
push 8
lea eax, [ebp - 0x10]
push eax
push ebx
push ebx
push 0x7405c
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x407245
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
cmp ecx, ebx
jne 0x4071c7
cmp eax, ebx
jne 0x4071c7
mov dword [esi + 0x31d0], 6
mov dword [esi + 0x31d4], ebx
jmp 0x4071d3
mov dword [esi + 0x31d0], ecx
mov dword [esi + 0x31d4], eax
push 2
lea edx, [esi + 0x31e0]
push edx
push eax
push ecx
call fcn.0042f5da
push ebx
lea edi, [esi + 0x3200]
push edi
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call fcn.0042f5da
push ebx
lea eax, [esi + 0x3220]
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call fcn.0042f5f4
lea eax, [esi + 0x3240]
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call fcn.0042ea94
push edi
push dword [esi + 0x31d4]
push dword [esi + 0x31d0]
push str.Size_I64u___s_
push 3
call fcn.00451479
add esp, 0x14
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406e7e
call fcn.0044e457
push eax
push str._err_s
push 3
call fcn.00451479
add esp, 0xc
push dword [esi + 0x838]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0042eb4b
cdq
mov dword [esi + 0x31d0], eax
mov dword [esi + 0x31d4], edx
jmp 0x406e7e