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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1023c
call fcn.004238d0
mov eax, dword [0x43b028]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
push edi
push esi
mov dword [ebp - 0x10224], eax
mov dword [ebp - 0x1021c], esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
je 0x40d216
cmp eax, 2
jne 0x40d5d9
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x40d21b
sub eax, edx
sar eax, 1
mov dword [ebp - 0x10214], eax
dec eax
push eax
push esi
mov ebx, 0x104
lea eax, [ebp - 0x210]
push ebx
push eax
call dword [sym.imp.MSVCR90.dll_wcsncpy_s]
add esp, 0x10
xor edi, edi
push edi
push edi
push 3
push edi
push 3
push SysReAllocString
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10228], eax
cmp eax, 0xffffffff
je 0x40d5d9
mov esi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push edi
lea ecx, [ebp - 0x10214]
push ecx
push 0x10000
lea ecx, [ebp - 0x10210]
push ecx
push edi
push edi
push 0x70048
push eax
call esi
test eax, eax
je 0x40d307
cmp dword [ebp - 0x10210], edi
jne 0x40d307
mov eax, dword [ebp - 0x10200]
mov ecx, dword [ebp - 0x101fc]
mov edx, eax
or edx, ecx
je 0x40d307
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp - 0x10224]
imul edx, edx, 0x590
add esi, edx
mov edx, dword [ebp - 0x10208]
mov dword [esi + 0x578], eax
movzx eax, byte [ebp - 0x101ef]
mov dword [esi + 0x570], edx
mov edx, dword [ebp - 0x10204]
mov dword [esi + 0x574], edx
mov edx, dword [ebp - 0x101f8]
mov dword [esi + 0x584], eax
mov al, byte [ebp - 0x101f0]
mov dword [esi + 0x57c], ecx
jmp 0x40d392
push edi
lea eax, [ebp - 0x10214]
push eax
push 0x10000
lea eax, [ebp - 0x10210]
push eax
push edi
push edi
push 0x70048
push dword [ebp - 0x10228]
call esi
test eax, eax
je 0x40d5c7
mov eax, dword [ebp - 0x10208]
mov ecx, dword [ebp - 0x10204]
mov edx, eax
or edx, ecx
je 0x40d5c7
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp - 0x10224]
imul edx, edx, 0x590
add esi, edx
mov edx, dword [ebp - 0x10210]
mov dword [esi + 0x578], eax
mov eax, dword [ebp - 0x101f8]
mov dword [esi + 0x570], edx
mov edx, dword [ebp - 0x1020c]
mov dword [esi + 0x57c], ecx
movzx ecx, ah
mov dword [esi + 0x574], edx
mov edx, dword [ebp - 0x101fc]
mov dword [esi + 0x584], ecx
push edi
mov byte [esi + 0x588], al
lea eax, [ebp - 0x10214]
push eax
push 0x10000
lea eax, [ebp - 0x10210]
push eax
push edi
push edi
push 0x560000
push dword [ebp - 0x10228]
mov dword [esi + 0x580], edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40d5cd
mov dword [ebp - 0x10214], edi
cmp dword [ebp - 0x10210], edi
jbe 0x40d424
mov eax, dword [ebp + 0xc]
imul eax, eax, 0x164
mov dword [ebp - 0x1022c], eax
jmp 0x40d3f2
mov eax, dword [ebp - 0x1022c]
mov ecx, dword [ebp - 0x10214]
mov edx, ecx
imul edx, edx, 0x18
add eax, ecx
mov ecx, dword [ebp + edx - 0x10208]
mov edx, dword [ebp - 0x10224]
mov dword [edx + eax*4 + 4], ecx
inc dword [ebp - 0x10214]
mov eax, dword [ebp - 0x10214]
cmp eax, dword [ebp - 0x10210]
jb 0x40d3ec
push dword [esi + 0x57c]
movzx eax, byte [esi + 0x588]
push dword [esi + 0x578]
push dword [esi + 0x574]
push dword [esi + 0x570]
push dword [esi + 0x584]
push eax
push dword [esi + 0x580]
push dword [ebp + 0xc]
push str.vn_u__pn_u__type_u__boot_u__start_I64u__length_I64u
call fcn.0040d16f
add esp, 0x24
push 0x20
lea eax, [esi + 0x528]
push eax
push edi
push edi
mov dword [ebp - 0x1022c], eax
lea eax, [esi + 0x568]
push eax
lea ecx, [esi + 0x2a0]
push ebx
push ecx
push dword [ebp - 0x1021c]
mov dword [ebp - 0x10224], ecx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
lea ebx, [esi + 0x90]
push ebx
lea edi, [esi + 0x88]
push edi
push 0
push dword [ebp - 0x1021c]
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
push 0x20
lea eax, [esi + 0x4a8]
push eax
push 0x400
push dword [edi + 4]
push dword [edi]
call dword [sym.imp.ASOHelper.dll_int___cdecl_BytesToString_unsigned_long_long_unsigned___int64___unsigned_int__wchar_t___unsigned_int_]
mov ecx, dword [edi]
mov eax, dword [edi + 4]
mov edx, ecx
add esp, 0x14
or edx, eax
jne 0x40d4f1
push str.100___
lea eax, [esi + 0x4e8]
push 0x20
push eax
call dword [sym.imp.MSVCR90.dll_wcscpy_s]
add esp, 0xc
jmp 0x40d58e
mov edx, ecx
sub edx, dword [ebx]
push ecx
sbb eax, dword [ebx + 4]
and dword [ebp - 0x10220], 0
mov dword [ebp - 0x1021c], eax
and dword [ebp - 0x1021c], 0x80000000
mov dword [ebp - 0x10238], edx
mov edx, SysReAllocString
and eax, edx
mov dword [ebp - 0x10234], eax
fild qword [ebp - 0x10238]
mov eax, dword [edi + 4]
fild qword [ebp - 0x10220]
and dword [ebp - 0x10220], 0
mov dword [ebp - 0x1021c], eax
and dword [ebp - 0x1021c], 0x80000000
fchs
and eax, edx
faddp st(1)
mov dword [ebp - 0x10234], eax
mov dword [ebp - 0x10238], ecx
fild qword [ebp - 0x10238]
push ecx
fild qword [ebp - 0x10220]
lea eax, [esi + 0x4e8]
fchs
faddp st(1)
fdivp st(1)
fmul qword [0x4322a8]
fstp qword [esp]
push str._0.1f___
push 0x20
push eax
call dword [sym.imp.MSVCR90.dll_swprintf_s]
add esp, 0x14
push dword [ebx + 4]
mov eax, dword [ebp + 0xc]
push dword [ebx]
mov dword [esi], eax
push dword [edi + 4]
push dword [edi]
push dword [ebp - 0x1022c]
push dword [ebp - 0x10224]
push str.label_s__fs_s__size_I64u__free_I64u
call fcn.0040d16f
add esp, 0x1c
push dword [ebp - 0x10228]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
jmp 0x40d5db
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x10228]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00423038
leave
ret