Function at 0x10031c40
Capabilities:
Get disk information

Disassembly:
push 0xffffffffffffffff
push 0x1009c4a6
mov eax, dword fs:[0]
push eax
sub esp, 0x424
mov eax, dword [0x100c230c]
xor eax, esp
mov dword [esp + 0x420], eax
push ebx
push esi
push edi
mov eax, dword [0x100c230c]
xor eax, esp
push eax
lea eax, [esp + 0x434]
mov dword fs:[0], eax
mov ecx, dword [0x100acaa0]
mov eax, dword [esp + 0x444]
mov dx, word [0x100acaa4]
mov ax, word [eax]
mov dword [esp + 0x28], ecx
lea ecx, [esp + 0x28]
push ecx
mov word [esp + 0x30], dx
mov word [esp + 0x2c], ax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
jne 0x10031de0
lea edx, [esp + 0x14]
push edx
mov ecx, str.._
call fcn.10002500
xor ebx, ebx
mov dword [esp + 0x43c], ebx
lea eax, [esp + 0x28]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x10031cd2
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x1c]
push ecx
call fcn.100039a0
push 0x3ff
lea edx, [esp + 0x35]
push ebx
push edx
mov dword [esp + 0x24], ebx
mov byte [esp + 0x3c], bl
call fcn.10079c60
add esp, 0xc
lea eax, [esp + 0x10]
push eax
call fcn.1000ffe0
mov byte [esp + 0x43c], 1
mov edx, dword [esp + 0x10]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
mov edi, 0x400
sub eax, edi
or eax, ecx
jge 0x10031d47
mov ecx, edi
lea eax, [esp + 0x10]
call fcn.10002ca0
mov edx, dword [esp + 0x10]
cmp dword [edx - 8], edi
jge 0x10031d56
push 0x80070057
call fcn.10002030
mov dword [edx - 0xc], edi
mov eax, dword [esp + 0x10]
xor ecx, ecx
push edi
mov word [eax + 0x800], cx
push edx
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
mov esi, eax
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.10075db4
add esp, 8
cmp eax, ebx
jl 0x10031d4c
mov ecx, dword [esp + 0x10]
cmp eax, dword [ecx - 8]
jg 0x10031d4c
mov dword [ecx - 0xc], eax
mov ecx, dword [esp + 0x10]
xor edx, edx
mov word [ecx + eax*2], dx
cmp esi, ebx
jbe 0x10031de7
mov edx, dword [esp + 0x10]
push 0x10
push str.DeviceHarddisk
push edx
call fcn.10077c12
add esp, 0xc
test eax, eax
je 0x10031de7
mov byte [esp + 0x43c], bl
lea ecx, [esp + 0x10]
call fcn.100025b0
mov dword [esp + 0x43c], 0xffffffff
lea ecx, [esp + 0x14]
call fcn.100025b0
xor eax, eax
jmp 0x10031eac
mov eax, dword [esp + 0x14]
push ebx
push 0x80
push 3
push ebx
push 1
push 0x20000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x10031dbc
push ebx
lea ecx, [esp + 0x1c]
push ecx
push edi
lea edx, [esp + 0x3c]
push edx
push 0xc
lea eax, [esp + 0x30]
push eax
push 0x2d1400
push esi
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x54], edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x10031e6a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esp + 0x43c], bl
lea ecx, [esp + 0x10]
call fcn.100025b0
mov dword [esp + 0x43c], 0xffffffff
lea ecx, [esp + 0x14]
call fcn.100025b0
mov eax, 1
jmp 0x10031eac
mov eax, dword [esp + 0x4c]
mov edi, 1
cmp eax, 4
je 0x10031e7d
cmp eax, 7
jne 0x10031e7f
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esp + 0x43c], bl
lea ecx, [esp + 0x10]
call fcn.100025b0
mov dword [esp + 0x43c], 0xffffffff
lea ecx, [esp + 0x14]
call fcn.100025b0
mov eax, edi
mov ecx, dword [esp + 0x434]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x420]
xor ecx, esp
call fcn.100755ed
add esp, 0x430
ret 4