Function at 0x4061b0
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
push ebx
push esi
mov esi, ecx
cmp dword [esi], 1
push edi
jne 0x406546
xor ebx, ebx
cmp dword [esi + 0xc], ebx
je 0x406546
lea ecx, [esi + 0x18]
cmp word [ecx], bx
je 0x406546
push ecx
or eax, 0xffffffff
push str.CreateFile__s_...
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 [0x4fb8ec]
pop edi
push edi
mov dword [ebp - 0x10], eax
call fcn.00445f0b
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 0x4062ad
push str.IOCTL_STORAGE_CHECK_VERIFY2...
push edi
mov dword [ebp - 8], ebx
call fcn.00445f0b
pop ecx
pop ecx
push ebx
lea eax, [ebp - 0x24]
push eax
push 4
lea eax, [ebp - 8]
push eax
push ebx
push ebx
push 0x2d0800
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 4]
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x4fb8d0], ebx
jne 0x406546
mov eax, dword [ebp - 0x10]
cmp eax, dword [0x4fb8ec]
jne 0x406546
cmp dword [esi], 1
jne 0x406546
cmp dword [ebp - 0x14], ebx
je 0x406383
push dword [ebp - 0x14]
push str._res_i
push edi
call fcn.00445f0b
add esp, 0xc
lea eax, [esi + 0x18]
push eax
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x5c
lea eax, [ebp - 0x234]
push eax
call fcn.00424af4
lea eax, [ebp - 0x234]
push eax
push str.GetDiskFreeSpaceEx__s_...
push edi
call fcn.00445f0b
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
push eax
push ebx
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
cmp dword [0x4fb8d0], ebx
jne 0x406546
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [0x4fb8ec]
jne 0x406546
cmp dword [esi], 1
jne 0x406546
cmp eax, ebx
je 0x4063e2
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x2c]
push 1
lea ebx, [esi + 0x31e0]
push ebx
mov dword [esi + 0x31d8], edx
mov edx, dword [ebp - 0x1c]
push ecx
push eax
mov dword [esi + 0x31d0], eax
mov dword [esi + 0x31d4], ecx
mov dword [esi + 0x31dc], edx
call fcn.0041a518
push 1
add esi, 0x3220
push esi
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
call fcn.0041a518
push esi
push ebx
push str.Size_s___s_available_
push edi
call fcn.00445f0b
add esp, 0x10
xor eax, eax
inc eax
jmp 0x406548
push dword [ebp - 0x18]
call fcn.00440b33
push eax
push str._err_S
push edi
call fcn.00445f0b
add esp, 0xc
cmp dword [ebp - 0x18], 0x15
jne 0x4062ad
push 6
pop eax
push 1
lea ecx, [esi + 0x31e0]
push ecx
push ebx
push eax
mov dword [esi + 0x31d0], eax
mov dword [esi + 0x31d4], ebx
call fcn.0041a518
xor eax, eax
mov word [esi + 0x3264], ax
mov word [esi + 0x3278], ax
mov word [esi + 0x347a], ax
mov dword [esi + 0x3260], ebx
jmp 0x40637b
call fcn.00443928
push eax
push str._err_s
push edi
call fcn.00445f0b
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x15
jne 0x406445
mov ecx, dword [esi + 0x838]
cmp ecx, 2
je 0x40641b
push 5
pop eax
cmp ecx, eax
je 0x40641b
mov dword [esi + 0x31d0], eax
jmp 0x406425
mov dword [esi + 0x31d0], 6
push 1
lea eax, [esi + 0x31e0]
push eax
push ebx
push dword [esi + 0x31d0]
mov dword [esi + 0x31d4], ebx
call fcn.0041a518
jmp 0x40637b
lea eax, [esi + 0x18]
push eax
push str.CreateFile__s_...
push edi
call fcn.00445f0b
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 0x40648c
call fcn.00443928
push eax
push str._err_s
push edi
call fcn.00445f0b
add esp, 0xc
jmp 0x40650f
push eax
push str.hVol0x_Ix__IOCTL_DISK_GET_LENGTH_INFO...
push edi
call fcn.00445f0b
add esp, 0xc
push ebx
xor eax, eax
mov dword [ebp - 0xc], ebx
lea edi, [ebp - 8]
stosd dword es:[edi], eax
lea eax, [ebp - 0x24]
push eax
push 8
lea eax, [ebp - 0xc]
push eax
push ebx
push ebx
push 0x7405c
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x406503
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
push 1
mov dword [esi + 0x31d0], eax
mov dword [esi + 0x31d4], ecx
add esi, 0x31e0
push esi
push ecx
push eax
call fcn.0041a518
push esi
push str.Size_s
push 3
call fcn.00445f0b
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40637b
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 3
pop edi
call fcn.00443928
push eax
push str._err_s
push edi
call fcn.00445f0b
add esp, 0xc
mov dword [esi + 0x31d0], 4
mov dword [esi + 0x31d4], ebx
call fcn.0044394a
push eax
add esi, 0x34ba
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret