Function at 0x40d2e0
Capabilities:
Get disk information
Get disk size
Get storage device properties
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x3a0
mov esi, dword [edx + 4]
mov edi, edx
mov ebx, ecx
push esi
call sub.kernel32.dll_GetDriveTypeW
mov ecx, eax
and ecx, 0xfffffffe
cmp ecx, 2
jne 0x40d57b
mov dword [esp + 0xc], ebx
mov dword [esp + 0x18], eax
lea ebx, [esp + 0x192]
push 0x20a
push 0
push ebx
call sub.msvcrt.dll_memset
add esp, 0xc
xorps xmm0, xmm0
mov dword [esp + 0x48], 0
lea ecx, [esp + 0x50]
lea eax, [esp + 0x48]
movaps xmmword [esp + 0x80], xmm0
movaps xmmword [esp + 0x70], xmm0
movaps xmmword [esp + 0x60], xmm0
movaps xmmword [esp + 0x50], xmm0
push 0x20
push ecx
push eax
push 0
push 0
push 0x105
push ebx
push esi
call sub.kernel32.dll_GetVolumeInformationW
test eax, eax
je 0x40d545
mov eax, dword [esp + 0x48]
mov dword [esp + 0x44], edi
mov edi, dword [edi + 8]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x90]
push edi
mov dword [esp + 0x20], esi
push esi
push eax
call fcn.00414200
add esp, 0xc
mov esi, dword [esp + 0x98]
mov ebx, dword [esp + 0xc]
test esi, esi
je 0x40d591
mov eax, edi
sub eax, 2
jb 0x40da03
mov ecx, dword [esp + 0x1c]
lea eax, [ecx + eax*2]
mov dword [esp + 0x138], ecx
lea ecx, [esp + 0x110]
mov dword [esp + 0x13c], eax
lea eax, [esp + 0x128]
mov dword [esp + 0x128], 1
mov dword [esp + 0x12c], 0
mov dword [esp + 0x130], 1
mov word [esp + 0x134], 0
push eax
push ecx
call fcn.004253a0
add esp, 8
mov edi, dword [esp + 0x114]
call fcn.00435ed0
push eax
push 0
push 3
push 0
push 3
push 0
push edi
call sub.kernel32.dll_CreateFileW
lea ecx, [eax - 1]
cmp ecx, 0xfffffffe
jae 0x40d5ed
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x94]
lea edx, [esp + 0x30]
lea ecx, [esp + 0x20]
mov dword [esp + 0x40], eax
mov eax, dword [eax + 4]
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
push edx
push ecx
push 0
push eax
call sub.kernel32.dll_GetDiskFreeSpaceExW
test eax, eax
je 0x40d638
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov eax, ecx
or eax, edx
je 0x40d66a
mov eax, dword [esp + 0x30]
xorps xmm0, xmm0
mov dword [esp + 0xa8], edx
mov dword [esp + 0xac], ecx
mov dword [esp + 0x11c], 7
mov dword [esp + 0x120], 0
mov byte [esp + 0x124], 0
mov dword [esp + 0x108], 0
mov dword [esp + 0x4c], 0
lea ecx, [esp + 0x100]
lea edx, [esp + 0x11c]
movsd qword [esp + 0x100], xmm0
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0xa0], eax
lea eax, [esp + 0x4c]
push 0
push eax
push 0xc
push ecx
push 0xc
push edx
push 0x2d1400
push dword [esp + 0x2c]
call sub.kernel32.dll_DeviceIoControl
test eax, eax
je 0x40d712
cmp dword [esp + 0x4c], 0xc
mov eax, 2
jne 0x40d749
xor eax, eax
cmp byte [esp + 0x108], 0
sete al
jmp 0x40d749
call fcn.00446630
mov ebx, dword [esp + 0xc]
test edx, edx
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], edx
mov dword [esp + 0xb0], 1
je 0x40d57b
lea eax, [esp + 0xb8]
push eax
call fcn.004465e0
add esp, 4
mov dword [ebx], 0
mov dword [ebx + 4], 8
mov dword [ebx + 8], 0
jmp 0x40d5d1
mov edi, dword [esp + 0x94]
mov dword [ebx], 0
mov dword [ebx + 4], 8
mov dword [ebx + 8], 0
mov eax, dword [esp + 0x90]
mov esi, dword [esp + 0x1c]
test eax, eax
je 0x40d5cd
shl eax, 2
lea eax, [eax + eax*2]
push 4
push eax
push edi
call fcn.0040cd20
add esp, 0xc
mov edi, dword [esp + 0x44]
mov eax, dword [edi]
test eax, eax
je 0x40d5e5
add eax, eax
push 2
push eax
push esi
call fcn.0040cd20
add esp, 0xc
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
call fcn.00446630
test edx, edx
mov dword [esp + 0xb8], edx
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb0], 1
je 0x40d61f
lea eax, [esp + 0xb8]
push eax
call fcn.004465e0
add esp, 4
mov dword [ebx], 0
mov dword [ebx + 4], 8
mov dword [ebx + 8], 0
jmp 0x40d6bd
call fcn.00446630
test edx, edx
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], edx
mov dword [esp + 0xb0], 1
je 0x40d66a
lea eax, [esp + 0xb8]
push eax
call fcn.004465e0
add esp, 4
mov dword [ebx], 0
mov dword [ebx + 4], 8
mov dword [ebx + 8], 0
push dword [esp + 0x10]
call sub.kernel32.dll_CloseHandle
test eax, eax
jne 0x40d6bd
call fcn.00446630
test edx, edx
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], edx
mov dword [esp + 0xb0], 1
je 0x40d6bd
lea eax, [esp + 0xb8]
push eax
call fcn.004465e0
add esp, 4
mov eax, dword [esp + 0x110]
test eax, eax
je 0x40d6d6
add eax, eax
push 2
push eax
push edi
call fcn.0040cd20
add esp, 0xc
mov edi, dword [esp + 0x94]
lea ebx, [edi + 4]
jmp 0x40d6fa
add ebx, 0xc
dec esi
je 0x40d5ac
mov eax, dword [ebx - 4]
test eax, eax
je 0x40d6f0
add eax, eax
push 2
push eax
push dword [ebx]
call fcn.0040cd20
add esp, 0xc
jmp 0x40d6f0
call fcn.00446630
test edx, edx
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], edx
mov dword [esp + 0xb0], 1
je 0x40d744
lea eax, [esp + 0xb8]
push eax
call fcn.004465e0
add esp, 4
mov eax, 2
mov dword [esp + 0x9c], eax
xor ecx, ecx
mov edx, 0x20a
lea eax, [esp + 0x148]
nop
cmp word [esp + ecx*2 + 0x192], 0
je 0x40d776
inc ecx
add edx, 0xfffffffe
jne 0x40d760
mov ecx, 0x105
push ecx
lea ecx, [esp + 0x196]
push ecx
push eax
call fcn.0048fe20
add esp, 0xc
cmp word [esp + 0x50], 0
lea eax, [esp + 0x158]
mov ecx, 0
mov dword [esp + 0x3c], 0
je 0x40da42
cmp word [esp + 0x52], 0
je 0x40d93b
cmp word [esp + 0x54], 0
je 0x40d945
cmp word [esp + 0x56], 0
je 0x40d94f
cmp word [esp + 0x58], 0
je 0x40d959
cmp word [esp + 0x5a], 0
je 0x40d963
cmp word [esp + 0x5c], 0
je 0x40d96d
cmp word [esp + 0x5e], 0
je 0x40d977
cmp word [esp + 0x60], 0
je 0x40d981
cmp word [esp + 0x62], 0
je 0x40d98b
cmp word [esp + 0x64], 0
je 0x40d995
cmp word [esp + 0x66], 0
je 0x40d99f
cmp word [esp + 0x68], 0
je 0x40d9a9
cmp word [esp + 0x6a], 0
je 0x40d9b3
cmp word [esp + 0x6c], 0
je 0x40d9bd
cmp word [esp + 0x6e], 0
je 0x40d9c4
cmp word [esp + 0x70], 0
je 0x40d9cb
cmp word [esp + 0x72], 0
je 0x40d9d2
cmp word [esp + 0x74], 0
je 0x40d9d9
cmp word [esp + 0x76], 0
je 0x40d9e0
cmp word [esp + 0x78], 0
je 0x40d9e7
cmp word [esp + 0x7a], 0
je 0x40d9ee
cmp word [esp + 0x7c], 0
je 0x40d9f5
cmp word [esp + 0x7e], 0
je 0x40d9fc
cmp word [esp + 0x80], 0
je 0x40da0f
cmp word [esp + 0x82], 0
je 0x40da16
cmp word [esp + 0x84], 0
je 0x40da1d
cmp word [esp + 0x86], 0
je 0x40da24
cmp word [esp + 0x88], 0
je 0x40da2b
cmp word [esp + 0x8a], 0
je 0x40da32
cmp word [esp + 0x8c], 0
je 0x40da39
cmp word [esp + 0x8e], 1
mov ecx, 0x20
sbb ecx, 0
jmp 0x40da3e
mov ecx, 1
jmp 0x40da42
mov ecx, 2
jmp 0x40da42
mov ecx, 3
jmp 0x40da42
mov ecx, 4
jmp 0x40da42
mov ecx, 5
jmp 0x40da42
mov ecx, 6
jmp 0x40da42
mov ecx, 7
jmp 0x40da42
mov ecx, 8
jmp 0x40da42
mov ecx, 9
jmp 0x40da42
mov ecx, 0xa
jmp 0x40da42
mov ecx, 0xb
jmp 0x40da42
mov ecx, 0xc
jmp 0x40da42
mov ecx, 0xd
jmp 0x40da3e
mov ecx, 0xe
jmp 0x40da3e
mov ecx, 0xf
jmp 0x40da3e
mov ecx, 0x10
jmp 0x40da3e
mov ecx, 0x11
jmp 0x40da3e
mov ecx, 0x12
jmp 0x40da3e
mov ecx, 0x13
jmp 0x40da3e
mov ecx, 0x14
jmp 0x40da3e
mov ecx, 0x15
jmp 0x40da3e
mov ecx, 0x16
jmp 0x40da3e
mov ecx, 0x17
jmp 0x40da3e
push 0x57b4b0
push edi
push eax
call fcn.004e0750
mov ecx, 0x18
jmp 0x40da3e
mov ecx, 0x19
jmp 0x40da3e
mov ecx, 0x1a
jmp 0x40da3e
mov ecx, 0x1b
jmp 0x40da3e
mov ecx, 0x1c
jmp 0x40da3e
mov ecx, 0x1d
jmp 0x40da3e
mov ecx, 0x1e
mov ebx, dword [esp + 0xc]
push ecx
lea ecx, [esp + 0x54]
push ecx
push eax
call fcn.0048fe20
add esp, 0xc
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x180], ecx
mov ecx, dword [esp + 0x9c]
shr eax, 0x13
and al, 1
cmp dword [esp + 0x18], 2
mov dword [esp + 0x140], ecx
mov ecx, dword [esp + 0xa8]
mov dword [esp + 0x144], 0xffffffff
mov dword [esp + 0x16c], ecx
mov ecx, dword [esp + 0xac]
mov dword [esp + 0x168], ecx
mov ecx, dword [esp + 0xa0]
mov dword [esp + 0x174], ecx
mov ecx, dword [esp + 0xa4]
mov dword [esp + 0x170], ecx
sete byte [esp + 0x178]
mov byte [esp + 0x179], al
mov ecx, 0x58
mov eax, esi
mul ecx
mov ecx, dword [esp + 0x90]
jo 0x40dc24
cmp eax, 0x7ffffff8
ja 0x40dc24
test eax, eax
mov dword [esp + 0xc], ecx
mov dword [esp + 0x14], edi
je 0x40db1b
mov ecx, dword [0x59fb24]
movzx ecx, byte [ecx]
push 8
mov edi, eax
push eax
call fcn.0040cd10
add esp, 8
test eax, eax
je 0x40dc1a
mov ecx, esi
mov edi, eax
jmp 0x40db22
mov edi, 8
xor ecx, ecx
mov eax, dword [esp + 0x40]
lea edx, [esi + esi*2]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], 0
lea esi, [esp + 0x140]
mov ecx, 0x11
lea edx, [eax + edx*4]
mov dword [esp + 0x18], edx
mov edx, edi
lea edi, [esp + 0xb0]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0xf4], eax
lea ecx, [esp + 0x28]
mov eax, dword [esp + 0xc]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], edx
mov dword [esp + 0xf8], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0xfc], eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0xb4]
push eax
call fcn.00428a80
add esp, 8
mov eax, dword [esp + 0x28]
movsd xmm0, qword [esp + 0x20]
mov dword [ebx + 8], eax
movsd qword [ebx], xmm0
push dword [esp + 0x10]
call sub.kernel32.dll_CloseHandle
test eax, eax
jne 0x40dbed
call fcn.00446630
test edx, edx
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], edx
mov dword [esp + 0xb0], 1
je 0x40dbed
lea eax, [esp + 0xb8]
push eax
call fcn.004465e0
add esp, 4
mov eax, dword [esp + 0x110]
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x44]
test eax, eax
je 0x40d5d1
add eax, eax
push 2
push eax
push dword [esp + 0x1c]
call fcn.0040cd20
add esp, 0xc
jmp 0x40d5d1
mov eax, edi
mov dword [esp + 0x3c], 8
push eax
push dword [esp + 0x40]
call fcn.004cf340
nop