Function at 0x100364d0
Capabilities:
Get disk information
Get disk information via ioctl
Get disk size
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100a1815
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x68
push ebx
mov bl, byte [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 0xc]
lea eax, [edi + 8]
mov dword [ebp - 0x10], ecx
mov ecx, eax
mov dword [edi], 0
mov dword [edi + 4], 0
mov esi, dword [eax]
push dword [esi + 4]
push eax
call fcn.100266d0
mov eax, dword [ebp + 0x14]
mov dword [esi + 4], esi
mov dword [esi], esi
mov dword [esi + 8], esi
mov dword [edi + 0xc], 0
test eax, eax
je 0x1003652d
mov byte [eax], 0
test bl, bl
je 0x1003653e
mov dword [edi], 0x1000
mov dword [edi + 4], 0x1000
mov esi, dword [ebp + 8]
push 4
push 0x100b280c
push esi
call fcn.10087454
add esp, 0xc
test eax, eax
jne 0x10036558
add esi, 8
movzx eax, word [esi]
test ax, ax
je 0x10036702
cmp word [esi + 2], 0x3a
jne 0x10036702
mov edi, eax
mov eax, dword [ebp - 0x10]
add eax, 8
mov dword [ebp + 0x10], edi
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [ebp - 0x10]
movzx ecx, di
mov dword [ebp + 8], ecx
lea eax, [ecx - 0x61]
cmp ax, 0x19
ja 0x1003659c
lea eax, [edi - 0x20]
movzx ecx, ax
mov dword [ebp + 8], ecx
movzx eax, cx
lea ecx, [edx + 0x84]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.10038740
mov edi, dword [ebp - 0x3c]
cmp byte [edi + 0xd], 0
jne 0x100366b8
mov eax, dword [ebp + 8]
cmp ax, word [edi + 0x10]
jb 0x100366b8
mov eax, dword [ebp - 0x10]
cmp edi, dword [eax + 0x84]
je 0x100366b8
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x48], eax
mov eax, dword [edi + 0x18]
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x40]
push 0x18
mov dword [ebp + 0x10], eax
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
call fcn.10079cc9
add esp, 4
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [ebp - 0x40], eax
mov dword [ebp - 4], 0
lea eax, [edi + 0x1c]
push eax
lea ecx, [ebp - 0x40]
call fcn.10038550
mov dword [ebp - 0x24], 0
mov dword [ebp - 4], 3
mov eax, dword [ebp - 0x10]
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x48], 0
je 0x10036671
cmp dword [ebp - 0x44], 0
je 0x10036671
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x48]
push eax
call fcn.10036410
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x1003666f
mov byte [eax], 1
mov bl, 1
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x40]
mov dword [ebp + 0x10], eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x40]
push dword [eax + 4]
lea eax, [ebp - 0x40]
push eax
mov ecx, eax
call fcn.100266d0
push 0x18
push dword [ebp - 0x40]
call fcn.10079cf9
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edi, dword [ebp - 0x10]
lea eax, [edi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ax, word [esi]
mov word [ebp - 0x50], ax
xor eax, eax
mov word [ebp - 0x4a], ax
lea eax, [ebp - 0x50]
push eax
mov dword [ebp - 0x58], 0x5c005c
mov dword [ebp - 0x54], 0x5c002e
mov dword [ebp - 0x4e], 0x5c003a
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
je 0x1003671a
push 0
push dword [ebp + 0x10]
mov ecx, edi
call fcn.10036270
test bl, bl
setne al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
lea ecx, [ebp - 0x30]
call fcn.10038340
mov dword [ebp - 4], 6
xor eax, eax
push eax
push 0x80
push 3
push eax
push 3
push eax
mov word [ebp - 0x4c], ax
lea eax, [ebp - 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x1c], esi
push 0
cmp esi, 0xffffffff
jne 0x10036760
push dword [ebp + 0x10]
mov ecx, edi
call fcn.10036270
jmp 0x10036a01
mov eax, 0x5c
mov dword [ebp - 0x44], 6
mov word [ebp - 0x4c], ax
xor eax, eax
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x40], eax
mov byte [ebp - 0x3c], al
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
push 0x1c
lea eax, [ebp - 0x74]
push eax
push 0xc
lea eax, [ebp - 0x44]
push eax
push 0x2d1400
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x10036820
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x32
je 0x100367dc
cmp eax, 1
je 0x100367dc
test eax, eax
je 0x10036820
push 0
push dword [ebp + 0x10]
mov ecx, edi
call fcn.10036270
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100369f7
lea ecx, [ebp - 0x58]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100367e2
sub ecx, edx
sar ecx, 1
cmp ecx, 7
jne 0x100367c4
cmp word [ebp - 0x4c], 0x5c
jne 0x100367c4
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
test eax, eax
je 0x100367c4
mov eax, dword [ebp - 0x64]
jmp 0x10036823
mov eax, dword [ebp - 0x60]
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x20], eax
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10036830
sub ecx, edx
sar ecx, 1
cmp ecx, 7
jne 0x10036869
cmp word [ebp - 0x4c], 0x5c
jne 0x10036869
movzx eax, word [ebp - 0x50]
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x24], 2
push eax
call fcn.100383a0
xor eax, eax
push eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
push 0xc
lea eax, [ebp - 0x44]
push eax
push 0
push 0
push 0x2d1080
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x100368b3
mov eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x24], 0
push eax
call fcn.100383a0
mov edi, 5
xor esi, esi
mov dword [ebp - 0x14], edi
test esi, esi
je 0x100368ca
push esi
call fcn.10086818
add esp, 4
lea eax, [edi + edi*2]
lea edi, [eax*8 + 8]
push edi
call fcn.1008680d
mov esi, eax
add esp, 4
test esi, esi
je 0x10036973
push edi
push 0
push esi
call fcn.1007cff0
add esp, 0xc
mov dword [ebp + 8], 0
lea eax, [ebp + 8]
push 0
push eax
push edi
push esi
push 0
push 0
push 0x560000
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x10036930
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x1003696a
mov eax, dword [esi]
cmp eax, dword [ebp - 0x14]
jbe 0x1003696a
mov edi, eax
jmp 0x100368ba
xor edi, edi
cmp dword [esi], edi
jbe 0x1003696a
lea eax, [esi + 8]
mov dword [ebp - 0x14], eax
lea esp, [esp]
mov eax, dword [eax]
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0x24], 1
push eax
call fcn.100383a0
mov eax, dword [ebp - 0x14]
inc edi
add eax, 0x18
mov dword [ebp - 0x14], eax
cmp edi, dword [esi]
jb 0x10036940
push esi
call fcn.10086818
add esp, 4
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x64]
test ecx, ecx
je 0x100369ea
mov esi, dword [ebp - 0x20]
test esi, esi
je 0x100369ea
cmp ecx, esi
jae 0x1003699e
xor edx, edx
mov eax, esi
div ecx
test edx, edx
jne 0x1003699c
mov ecx, esi
jmp 0x100369a0
cmp ecx, esi
jne 0x100369bc
cmp ecx, 0x1000
jae 0x100369bc
xor edx, edx
mov eax, 0x1000
div ecx
test edx, edx
jne 0x100369bc
mov esi, 0x1000
mov ecx, esi
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0x30]
push eax
mov dword [edi], ecx
lea ecx, [edi + 8]
mov dword [edi + 4], esi
call fcn.10038300
mov ecx, dword [ebp - 0x10]
push edi
push dword [ebp + 0x10]
call fcn.10036270
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x100369e6
mov byte [eax], 1
mov bl, 1
jmp 0x10036a01
mov ecx, dword [ebp - 0x10]
push 0
push dword [ebp + 0x10]
call fcn.10036270
test bl, bl
je 0x100369ff
mov bl, 1
jmp 0x10036a01
xor bl, bl
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x30]
mov esi, dword [eax + 4]
cmp byte [esi + 0xd], 0
jne 0x10036a3a
push dword [esi + 8]
lea eax, [ebp - 0x30]
push eax
mov ecx, eax
call fcn.100266d0
mov eax, esi
mov esi, dword [esi]
push 0x18
push eax
call fcn.10079cf9
add esp, 8
cmp byte [esi + 0xd], 0
je 0x10036a14
mov eax, dword [ebp - 0x30]
push 0x18
push eax
call fcn.10079cf9
mov ecx, dword [ebp - 0xc]
add esp, 8
mov al, bl
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10