Function at 0x10018180
Capabilities:
Get disk information via ioctl
Get disk size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x10d4
call fcn.1001e400
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x10d0], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
push 0x1018
push 0
push esi
mov dword [esp + 0x20], esi
call sub.msvcrt.dll_memset
add esp, 0xc
push 0
push 0
push 3
push 0
push 3
push 0x80100000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [esp + 0x10], edi
cmp edi, 0xffffffff
jne 0x100181f8
mov esi, 1
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x10d0]
xor ecx, esp
call fcn.1000d340
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push 0
lea eax, [esp + 0x10]
push eax
push 0x90
lea ecx, [esp + 0x24]
push ecx
push 0
push 0
push 0x70048
push edi
call ebx
test eax, eax
je 0x10018292
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov dword [esi + 4], edx
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], ecx
push 0
lea eax, [esp + 0x10]
push eax
push 0xc
lea ecx, [esp + 0xb8]
push ecx
push 0
push 0
push 0x2d1080
push edi
call ebx
push 0
test eax, eax
je 0x10018318
mov eax, dword [esp + 0xb4]
mov edx, dword [esp + 0xb8]
push eax
mov dword [esi + 4], 1
mov dword [esi], 0
mov dword [esi + 8], edx
mov dword [esi + 0x18], eax
call sym.dcapi.dll_dc_dsk_get_size
add esp, 8
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], edx
xor esi, esi
jmp 0x100183af
push 0
lea edx, [esp + 0x10]
push edx
push 0x20
lea eax, [esp + 0xc4]
push eax
push 0
push 0
push 0x74004
push edi
call ebx
test eax, eax
je 0x100182d6
mov ecx, dword [esp + 0xcc]
mov edx, dword [esp + 0xc0]
mov eax, dword [esp + 0xc4]
mov dword [esi + 4], ecx
mov dword [esi + 0x10], edx
mov dword [esi + 0x14], eax
jmp 0x10018234
push 0
lea ecx, [esp + 0x10]
push ecx
push 8
lea edx, [esi + 0x10]
push edx
push 0
push 0
push 0x7405c
push edi
mov dword [esi + 4], 0
call ebx
test eax, eax
jne 0x10018234
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x10d0]
xor ecx, esp
call fcn.1000d340
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x10]
push eax
push 0x1000
lea ecx, [esp + 0xe4]
push ecx
push 0
push 0
push 0x560000
push edi
call ebx
test eax, eax
je 0x100183aa
mov eax, dword [esp + 0xd8]
xor ebx, ebx
test eax, eax
je 0x10018398
add esi, 0x28
lea edi, [esp + 0xe8]
mov edx, dword [edi]
mov ecx, dword [edi + 4]
mov eax, dword [edi - 8]
mov dword [esi], edx
mov edx, dword [edi + 8]
mov dword [esi + 4], ecx
mov ecx, dword [edi + 0xc]
push 0
push eax
mov dword [esi - 0x10], eax
mov dword [esi + 8], edx
mov dword [esi + 0xc], ecx
call sym.dcapi.dll_dc_dsk_get_size
mov dword [esi - 8], eax
mov eax, dword [esp + 0xe0]
mov dword [esi - 4], edx
inc ebx
add esp, 8
add edi, 0x18
add esi, 0x20
cmp ebx, eax
jb 0x10018351
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
xor edx, edx
cmp eax, 1
setne dl
mov dword [esi + 4], eax
inc edx
mov dword [esi], edx
xor esi, esi
jmp 0x100183af
mov esi, 0xf
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x10dc]
pop edi
mov eax, esi
pop esi
pop ebx
xor ecx, esp
call fcn.1000d340
mov esp, ebp
pop ebp
ret