Function at 0x40f839
Capabilities:
Get disk information via ioctl

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x45d0
call sub.ntdll.dll__chkstk
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor eax, eax
push edi
mov edi, dword [ebp + 8]
mov ebx, ecx
push 0x90
push eax
lea eax, [ebp - 0x45cc]
mov dword [ebp - 0x4514], ebx
push eax
mov dword [ebp - 0x44f8], esi
call sub.ntdll.dll_memset
add esp, 0xc
mov ecx, ebx
call fcn.0041079f
xor eax, eax
mov ecx, ebx
push esi
inc eax
push edi
mov byte [ebx + 0x13d], al
call fcn.0040f411
test al, al
jne 0x40f8ab
mov ecx, ebx
call fcn.0041079f
xor al, al
jmp 0x410012
push esi
lea eax, [ebx + 0x120]
push eax
lea ecx, [ebx + 0x24]
push ecx
push dword [ebp + 0x14]
mov ecx, edi
call fcn.0040f577
mov dword [ebx + 0x38], eax
lea edi, [ebx + 0x24]
mov ecx, dword [edi]
mov dword [ebx + 0x28], ecx
test eax, eax
js 0x40f89d
xor edx, edx
lea eax, [ebp - 0x4500]
push edx
push edx
push edx
push edx
push 0x70024
push eax
push edx
push edx
push edx
push ecx
call dword [sym.imp.ntdll.dll_NtDeviceIoControlFile]
cmp eax, 0xc00000a2
mov dword [ebx + 0x38], eax
setne al
xor ecx, ecx
mov byte [ebx + 0x125], al
inc ecx
mov ax, word [ebp + 0x18]
cmp ax, cx
jne 0x40f914
xor ecx, ecx
cmp word [ebx + 0x136], cx
jne 0x40f91b
mov word [ebx + 0x136], ax
push 4
push 8
lea eax, [ebp - 0x4510]
push eax
lea eax, [ebp - 0x4500]
push eax
push dword [edi]
call dword [sym.imp.ntdll.dll_NtQueryVolumeInformationFile]
mov dword [ebx + 0x38], eax
test eax, eax
js 0x40f9b9
test byte [ebp - 0x450c], 0x10
je 0x40f951
mov dword [ebx + 0x128], 3
jmp 0x40f9c0
mov eax, dword [ebp - 0x4510]
push 2
pop ecx
cmp eax, ecx
jb 0x40f9b9
push 3
pop edx
cmp eax, edx
jbe 0x40f9ad
cmp eax, 6
jbe 0x40f9b9
cmp eax, 8
jbe 0x40f992
cmp eax, 0x12
je 0x40f98a
cmp eax, 0x14
je 0x40f98a
cmp eax, 0x24
jne 0x40f9b9
mov dword [ebx + 0x128], 5
jmp 0x40f9c0
mov dword [ebx + 0x128], edx
jmp 0x40f9c0
xor eax, eax
inc eax
test byte [ebp - 0x450c], al
je 0x40f9a5
mov dword [ebx + 0x128], eax
jmp 0x40f9c0
mov dword [ebx + 0x128], ecx
jmp 0x40f9c0
mov dword [ebx + 0x128], 4
jmp 0x40f9c0
and dword [ebx + 0x128], 0
push 0x18
pop eax
push eax
lea eax, [ebp - 0x44ec]
mov byte [ebx + 0x30], 0
push eax
xor eax, eax
push eax
push eax
push 0x70000
lea eax, [ebp - 0x4500]
push eax
xor eax, eax
push eax
push eax
push eax
push dword [edi]
call dword [sym.imp.ntdll.dll_NtDeviceIoControlFile]
mov dword [ebx + 0x38], eax
test eax, eax
jns 0x40fa84
cmp eax, 0xc0000001
je 0x40fa78
cmp eax, 0xc0000014
je 0x40fa78
cmp dword [ebx + 0x128], 4
jne 0x40fa1c
cmp eax, 0xc000009c
je 0x40fa78
cmp eax, 0xc0000010
je 0x40fa78
mov ecx, ebx
call fcn.0041079f
mov eax, dword [ebx + 0x38]
cmp eax, 0x80000010
je 0x40fa57
cmp eax, 0x80000011
je 0x40fa50
cmp eax, 0xc0000013
je 0x40fa49
cmp eax, 0xc00000a3
je 0x40fa50
mov eax, 0x7d6
jmp 0x40fa5c
mov eax, 0x7d7
jmp 0x40fa5c
mov eax, 0x830
jmp 0x40fa5c
mov eax, 0xbe7
test esi, esi
je 0x40f8a4
push 0x401054
push eax
push esi
call fcn.00416cfc
add esp, 0xc
jmp 0x40f8a4
xor edx, edx
mov eax, edx
mov dword [ebp - 0x44e4], eax
jmp 0x40fa8c
mov eax, dword [ebp - 0x44e4]
xor edx, edx
test eax, eax
jne 0x40faa6
push 6
pop ecx
lea edi, [ebp - 0x44ec]
rep stosd dword es:[edi], eax
mov eax, edx
lea edi, [ebx + 0x24]
mov dword [ebp - 0x44e4], eax
cmp eax, 0xc
je 0x40fab4
cmp eax, 0xb
jne 0x40fbfd
push 8
lea eax, [ebp - 0x4524]
push eax
push edx
push edx
push 0x7405c
lea eax, [ebp - 0x4500]
push eax
push edx
push edx
push edx
push dword [edi]
call dword [sym.imp.ntdll.dll_NtDeviceIoControlFile]
test eax, eax
mov dword [ebx + 0x38], eax
setns cl
test eax, eax
jns 0x40fb07
cmp eax, 0xc0000010
je 0x40fb07
mov ecx, ebx
call fcn.0041079f
test esi, esi
je 0x40f8a4
push 0x401054
push 0x7e7
jmp 0x40fa6a
test cl, cl
je 0x40fbf7
push esi
lea eax, [ebp - 0x4524]
mov ecx, ebx
push eax
lea eax, [ebp - 0x44ec]
push eax
lea eax, [ebp - 0x45cc]
push eax
call fcn.0040f69b
test al, al
je 0x40f8a4
cmp dword [0x47a008], 0x40002
lea edi, [ebx + 0x40]
push 0x24
pop ecx
lea esi, [ebp - 0x45cc]
rep movsd dword es:[edi], dword [esi]
jne 0x40fbb2
mov al, byte [ebp - 0x45ac]
xor ecx, ecx
inc ecx
cmp al, cl
jne 0x40fba0
push ecx
push ecx
mov eax, esp
xor ecx, ecx
push ecx
push ecx
mov dword [eax + 4], ecx
mov ecx, esp
mov dword [eax], 0x300000
mov eax, dword [ebp - 0x45bc]
mov dword [ecx], eax
mov eax, dword [ebp - 0x45b8]
mov dword [ecx + 4], eax
call fcn.00412595
xor ecx, ecx
test al, al
sete cl
dec ecx
and ecx, 0xfffffc00
add ecx, 0x800
mov dword [ebp - 0x44d8], ecx
jmp 0x40fbb2
cmp al, 4
je 0x40fba8
cmp al, 6
jne 0x40fbb2
mov dword [ebp - 0x44d8], 0x800
mov eax, dword [ebp - 0x45a8]
lea esi, [ebx + 0xf0]
push ecx
push ecx
mov ecx, esp
mov dword [ecx], eax
xor eax, eax
push eax
mov dword [ecx + 4], eax
push dword [ebp - 0x44d8]
push dword [ebp - 0x45b8]
push dword [ebp - 0x45bc]
call sub.ntdll.dll__alldiv
push edx
push eax
mov edx, esi
lea ecx, [ebp - 0x44ec]
call fcn.00410a1a
xor eax, eax
jmp 0x40fe3a
mov eax, dword [ebp - 0x44e4]
test eax, eax
jne 0x40fc1e
cmp dword [ebx + 0x128], 4
jne 0x40fc1e
mov dword [ebp - 0x44e4], 0xb
mov dword [ebp - 0x44d8], 0x800
lea edx, [ebx + 0xf0]
lea ecx, [ebp - 0x44ec]
call fcn.004109c4
mov ecx, ebx
call fcn.0041257a
test al, al
je 0x40fe32
push 0x1e0
xor ecx, ecx
lea eax, [ebp - 0x44d4]
push eax
push ecx
push ecx
push 0x70c00
lea eax, [ebp - 0x4500]
push eax
push ecx
push ecx
push ecx
push dword [edi]
call dword [sym.imp.ntdll.dll_NtDeviceIoControlFile]
mov dword [ebx + 0x38], eax
test eax, eax
jns 0x40fcc2
mov ecx, ebx
call fcn.0041079f
test esi, esi
je 0x40f8a4
mov eax, dword [ebx + 0x38]
cmp eax, 0x80000010
je 0x40fcb8
cmp eax, 0x80000011
je 0x40fcae
cmp eax, 0xc0000013
je 0x40fca4
cmp eax, 0xc00000a3
je 0x40fcae
mov eax, 0x7d6
jmp 0x40fa64
mov eax, 0x8aa
jmp 0x40fa64
mov eax, 0x830
jmp 0x40fa64
mov eax, 0xbe7
jmp 0x40fa64
mov eax, dword [ebp - 0x44fc]
xor edx, edx
push 0x18
pop ecx
div ecx
mov dword [ebp - 0x4518], eax
mov dword [ebx + 0x11c], eax
test eax, eax
jne 0x40fcfd
mov ecx, ebx
call fcn.0041079f
test esi, esi
je 0x40f8a4
push 0x401054
push 0x7d6
jmp 0x40fa6a
jle 0x40fda7
lea ecx, [eax - 1]
mov dword [ebp - 0x44f4], eax
push 0x18
mov dword [ebp - 0x4508], ecx
pop ebx
test ecx, ecx
jle 0x40fd8c
lea edx, [ebp - 0x44ac]
mov dword [ebp - 0x4504], ecx
mov esi, ecx
mov ecx, dword [edx - 0x1c]
imul ecx, dword [edx - 0x18]
mov eax, dword [edx - 4]
imul eax, dword [edx + 4]
imul ecx, dword [edx - 0x14]
imul eax, dword [edx - 0x10]
imul ecx, dword [edx - 0x28]
imul eax, dword [edx]
cmp ecx, eax
jae 0x40fd75
push 6
pop ecx
lea esi, [edx - 0x28]
lea edi, [ebp - 0x453c]
rep movsd dword es:[edi], dword [esi]
push 6
pop ecx
lea esi, [edx - 0x10]
lea edi, [edx - 0x28]
rep movsd dword es:[edi], dword [esi]
push 6
pop ecx
lea esi, [ebp - 0x453c]
lea edi, [edx - 0x10]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x4504]
add edx, ebx
dec esi
mov dword [ebp - 0x4504], esi
jne 0x40fd27
mov ecx, dword [ebp - 0x4508]
mov eax, dword [ebp - 0x44f4]
dec eax
mov dword [ebp - 0x44f4], eax
jne 0x40fd15
mov ebx, dword [ebp - 0x4514]
mov esi, dword [ebp - 0x44f8]
mov eax, dword [ebp - 0x4518]
xor ecx, ecx
push 0x28
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
call fcn.004143f5
mov dword [ebx + 0x118], eax
test eax, eax
jne 0x40fde2
mov ecx, ebx
call fcn.0041079f
test esi, esi
je 0x40f8a4
push 0x401054
push 0x801
jmp 0x40fa6a
xor eax, eax
mov dword [ebp - 0x44f4], eax
cmp dword [ebx + 0x11c], eax
jle 0x40fe34
mov esi, eax
lea edi, [ebp - 0x44d4]
mov edx, dword [ebx + 0x118]
mov ecx, edi
add edx, esi
call fcn.004109c4
mov eax, dword [ebp - 0x44f4]
push 0x28
pop edx
push 0x18
inc eax
add esi, edx
pop ecx
add edi, ecx
mov dword [ebp - 0x44f4], eax
cmp eax, dword [ebx + 0x11c]
jl 0x40fdfa
lea esi, [ebx + 0xf0]
xor eax, eax
jmp 0x40fe3d
xor eax, eax
lea esi, [ebx + 0xf0]
push 0x28
pop edx
cmp dword [ebx + 0x11c], eax
jne 0x40fe8b
xor eax, eax
mov ecx, edx
inc eax
mov dword [ebx + 0x11c], eax
call fcn.004143f5
mov dword [ebx + 0x118], eax
test eax, eax
jne 0x40fe84
mov ecx, ebx
call fcn.0041079f
mov eax, dword [ebp - 0x44f8]
test eax, eax
je 0x40f8a4
push 0x401054
push 0x801
push eax
jmp 0x40fa6b
push 0xa
pop ecx
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
call fcn.00411461
mov ecx, ebx
test al, al
jne 0x40fef0
call fcn.0041079f
mov eax, dword [ebp - 0x44f8]
test eax, eax
je 0x40f8a4
mov ecx, dword [ebx + 0x38]
cmp ecx, 0x80000010
je 0x40fee3
cmp ecx, 0x80000011
je 0x40fedc
cmp ecx, 0xc0000013
je 0x40fed5
cmp ecx, 0xc00000a3
je 0x40fedc
mov ecx, 0x7d6
jmp 0x40fee8
mov ecx, 0x8aa
jmp 0x40fee8
mov ecx, 0x830
jmp 0x40fee8
mov ecx, 0xbe7
push 0x401054
push ecx
jmp 0x40fe7e
call fcn.00411593
test al, al
jne 0x40ff06
cmp dword [ebx + 0x38], 0xc0000023
je 0x40f8a4
mov ecx, ebx
call fcn.004116d8
mov ecx, ebx
call fcn.0041172c
mov ecx, ebx
call fcn.00410544
mov dword [ebx + 0x38], eax
test eax, eax
js 0x40f89d
cmp dword [ebp - 0x44e4], 0xb
jne 0x410009
mov esi, dword [sym.imp.ntdll.dll_NtDeviceIoControlFile]
lea eax, [ebp - 0x36cc]
push 0x36c0
push eax
xor ecx, ecx
lea eax, [ebp - 0x4500]
push ecx
push ecx
push 0x70050
push eax
push ecx
push ecx
push ecx
push dword [ebx + 0x24]
mov byte [ebp - 0x44ed], cl
call esi
mov dword [ebx + 0x38], eax
test eax, eax
jns 0x40ffbb
cmp eax, 0xc0000010
jne 0x40ffbb
push 0xc28
xor eax, eax
xor ecx, ecx
inc eax
mov byte [ebp - 0x44ed], al
lea eax, [ebp - 0x42f4]
push eax
push ecx
push ecx
push 0x7400c
lea eax, [ebp - 0x4500]
push eax
push ecx
push ecx
push ecx
push dword [ebx + 0x24]
call esi
mov dword [ebx + 0x38], eax
test eax, eax
js 0x40ffbb
mov eax, dword [ebp - 0x36c8]
xor edx, edx
inc edx
cmp eax, 4
jae 0x40ffc4
mov byte [ebx + 0x124], dl
jmp 0x40ffc4
mov eax, dword [ebp - 0x36c8]
xor edx, edx
inc edx
xor ecx, ecx
cmp dword [ebx + 0x38], ecx
jge 0x40ffd2
mov ecx, ebx
jmp 0x40fe98
cmp byte [ebp - 0x44ed], cl
jne 0x410009
cmp dword [ebp - 0x36cc], ecx
jne 0x40ffe9
cmp eax, 4
jae 0x410009
jmp 0x410003
cmp dword [ebp - 0x36cc], edx
jne 0x410009
cmp eax, edx
jne 0x410009
mov ecx, dword [ebp - 0x3694]
or ecx, dword [ebp - 0x3690]
jne 0x410009
mov byte [ebx + 0x124], dl
xor eax, eax
inc eax
mov dword [ebx + 0x130], eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00478d4e
mov esp, ebp
pop ebp
ret 0x1c