Function at 0x408720
Capabilities:
Get disk information via ioctl

Disassembly:
push 0xffffffffffffffff
push 0x454b88
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x46f650]
xor eax, esp
push eax
lea eax, [esp + 0x2c]
mov dword fs:[0], eax
mov esi, ecx
mov edi, edx
mov al, byte [esp + 0x3c]
push 0
lea ecx, [esp + 0x20]
push ecx
push 0xc
lea edx, [esp + 0x2c]
push edx
push 0
push 0
push 0x2d1080
push esi
mov dword [edi + 8], 0
mov byte [edi + 0x1c], al
mov dword [edi + 0xc], esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x4087fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea esi, [esp + 0x3c]
call fcn.004089f0
mov dword [esp + 0x34], 0
mov eax, dword [eax]
push eax
lea ecx, [edi + 0x10]
push 0x461a1c
push ecx
call fcn.00407970
or ebx, 0xffffffff
mov dword [esp + 0x40], ebx
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
add esp, 0xc
lea edx, [eax + 0xc]
mov ecx, ebx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4087d0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [edi + 8], 0
je 0x4087e3
mov ecx, dword [edi + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0xc], ebx
xor eax, eax
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x28
ret 4
push esi
call fcn.0044ab20
add esp, 4
test eax, eax
jne 0x40886f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea esi, [esp + 0x3c]
call fcn.004089f0
mov dword [esp + 0x34], 1
mov edx, dword [eax]
push edx
push 0x461a38
add edi, 0x10
push edi
call fcn.00407970
or ebx, 0xffffffff
mov dword [esp + 0x40], ebx
mov eax, dword [esp + 0x48]
add esp, 0xc
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], ebx
dec ebx
test ebx, ebx
jg 0x408858
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x28
ret 4
mov ecx, dword [esp + 0x24]
mov dword [edi], ecx
call fcn.0040b9e7
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40888f
push 0x80004005
call fcn.00401510
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x3c], eax
lea esi, [esp + 0x18]
mov dword [esp + 0x34], 2
call fcn.00408980
push str.BinFilesScan_0.bin
push eax
lea ecx, [esp + 0x1c]
mov bl, 3
push ecx
mov byte [esp + 0x40], bl
call fcn.00407a80
add esp, 0xc
push eax
lea ecx, [esp + 0x40]
mov byte [esp + 0x38], 4
call fcn.004077d0
mov byte [esp + 0x34], bl
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
or ebx, 0xffffffff
lea edx, [eax + 0xc]
mov ecx, ebx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4088fe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x34], 2
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408922
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x3c]
mov edx, dword [edi + 0xc]
push esi
mov ecx, edi
call fcn.00407f10
test eax, eax
lea eax, [esi - 0x10]
mov dword [esp + 0x34], ebx
lea ecx, [eax + 0xc]
je 0x408845
mov dword [edi + 4], 1
lock xadd dword [ecx], ebx
dec ebx
test ebx, ebx
jg 0x40895d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x28
ret 4