Function at 0x40f1f8
Capabilities:
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x28
mov ecx, dword [eax]
mov eax, dword [eax + 4]
push ebx
xor ebx, ebx
push esi
cmp ecx, 5
jne 0x40f231
cmp eax, ebx
jne 0x40f231
mov esi, str.boot:
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov ecx, dword [ebp + 0xc]
push eax
push esi
call fcn.0043c867
xor eax, eax
jmp 0x40f40a
cmp ecx, 6
jne 0x40f405
cmp eax, ebx
jne 0x40f405
push edi
lea edx, [ebp - 0x1c]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
call fcn.0044c804
call fcn.0043d5bb
push eax
lea ecx, [ebp - 4]
call fcn.0043bbe8
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
cmp eax, ecx
mov esi, dword [ebp - 4]
mov dword [ebp - 0x10], ecx
jmp 0x40f349
mov ecx, dword [eax]
call fcn.0044c5df
mov edi, eax
mov dword [ebp - 8], edi
cmp edi, 0xffffffff
je 0x40f338
lea edx, [ebp - 4]
mov ecx, edi
call fcn.0044c656
mov esi, dword [ebp - 4]
test eax, eax
jne 0x40f338
cmp dword [esi - 4], 1
jle 0x40f2b3
push dword [esi - 0xc]
lea ecx, [ebp - 4]
call fcn.0043bb69
mov esi, dword [ebp - 4]
cmp dword [esi], ebx
jne 0x40f314
mov edx, dword [ebp + 8]
cmp dword [edx + 0x24], 1
jne 0x40f338
mov eax, dword [esi + 8]
cmp eax, dword [edx + 0x28]
jne 0x40f338
mov ecx, ebx
mov dword [ebp - 4], ecx
cmp ecx, dword [esi + 4]
je 0x40f3e5
lea eax, [esi + 0x38]
mov dword [ebp + 8], eax
cmp dword [eax - 8], 5
je 0x40f301
cmp dword [eax - 8], 0xf
je 0x40f301
mov eax, dword [eax]
cmp eax, dword [edx + 0x10]
mov eax, dword [ebp + 8]
jne 0x40f301
mov eax, dword [eax + 4]
cmp eax, dword [edx + 0x14]
je 0x40f392
mov eax, dword [ebp + 8]
inc ecx
add eax, 0x90
mov dword [ebp - 4], ecx
mov dword [ebp + 8], eax
cmp ecx, dword [esi + 4]
jne 0x40f2dc
jmp 0x40f392
cmp dword [esi], 1
jne 0x40f338
mov eax, dword [ebp + 8]
cmp dword [eax + 0x24], ebx
jne 0x40f338
add eax, 0x28
push 0x10
push eax
lea eax, [esi + 8]
push eax
call dword [sym.imp.msvcrt.dll_memcmp]
add esp, 0xc
test eax, eax
je 0x40f357
lea ecx, [ebp - 8]
call fcn.0043bb32
mov eax, dword [ebp - 0xc]
add eax, 4
cmp eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
jne 0x40f275
jmp 0x40f3ed
mov ecx, ebx
mov dword [ebp - 4], ecx
cmp dword [esi + 4], ebx
je 0x40f392
mov edi, dword [ebp + 8]
lea ebx, [esi + 0x60]
add edi, 0x10
push 0x10
push edi
push ebx
call dword [sym.imp.msvcrt.dll_memcmp]
mov ecx, dword [ebp - 4]
add esp, 0xc
test eax, eax
je 0x40f38d
inc ecx
add ebx, 0x90
mov dword [ebp - 4], ecx
cmp ecx, dword [esi + 4]
jne 0x40f36a
mov edi, dword [ebp - 8]
xor ebx, ebx
cmp ecx, dword [esi + 4]
je 0x40f3e5
push ebx
lea eax, [ebp + 8]
push eax
push 0xc
lea eax, [ebp - 0x28]
push eax
push ebx
push ebx
push 0x2d1080
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40f3bd
call fcn.0044cc8a
mov ebx, eax
jmp 0x40f3db
imul eax, dword [ebp - 4], 0x90
push dword [eax + esi + 0x48]
push dword [ebp - 0x24]
push str._GLOBALROOTDeviceHarddisk_uPartition_u
push dword [ebp + 0xc]
call fcn.0043c575
add esp, 0x10
lea ecx, [ebp - 8]
call fcn.0043bb32
jmp 0x40f3f0
lea ecx, [ebp - 8]
call fcn.0043bb32
push 3
pop ebx
lea ecx, [esi - 0x10]
call fcn.0043d912
lea ecx, [ebp - 0x1c]
call fcn.004316fe
mov eax, ebx
pop edi
jmp 0x40f40a
mov eax, 0x80004002
pop esi
pop ebx
leave
ret 8