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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [0x10145188]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, 0x41
mov dword [ebp - 0x60], 0x1a
nop
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
push edi
lea eax, [ebp - 0x14]
push 0x100f607c
push eax
call esi
add esp, 0xc
lea ecx, [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov dword [ebp - 0x58], eax
cmp eax, 2
je 0x100842c0
cmp eax, 3
jne 0x1008441e
push edi
lea edx, [ebp - 0x14]
push str.._c:
push edx
call esi
add esp, 0xc
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push 3
push ebx
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x1008440e
push ebx
lea ecx, [ebp - 0x68]
push ecx
push 0x28
lea edx, [ebp - 0x54]
push edx
push 0xc
lea eax, [ebp - 0x2c]
push eax
push 0x2d1400
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push esi
call ebx
test eax, eax
je 0x10084405
cmp dword [ebp - 0x38], 7
jne 0x10084405
push edi
push str.RemoveAllUsbDisk_Disk__c_Is_Usb_Disk
push 1
call dword [sym.imp.Common.dll_int___cdecl_COMMON::WriteLog_int__wchar_t_const__]
add esp, 0xc
push 0
lea ecx, [ebp - 0x68]
push ecx
push 0xc
lea edx, [ebp - 0x20]
push edx
push 0
push 0
push 0x2d1080
push esi
call ebx
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
cmp ebx, esi
je 0x100843fc
mov eax, dword [ebp - 0x1c]
mov ebx, dword [sym.imp.Common.dll_int___cdecl_COMMON::WriteLog_int__wchar_t_const__]
push eax
push edi
push str.RemoveAllUsbDisk_Disk__cs_Device_Number_Is__d
push 1
call ebx
mov ecx, dword [ebp - 0x1c]
push ecx
mov ecx, dword [ebp - 0x58]
call fcn.10084000
add esp, 0x14
mov dword [ebp - 0x5c], eax
cmp eax, esi
je 0x100843f1
push esi
push eax
lea edx, [ebp - 0x5c]
push edx
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x58], esi
call dword [sym.imp.SETUPAPI.dll_CM_Get_Parent]
mov eax, dword [ebp - 0x5c]
push esi
push eax
lea ecx, [ebp - 0x6c]
push ecx
lea edx, [ebp - 0x64]
push edx
call dword [sym.imp.SETUPAPI.dll_CM_Get_DevNode_Status]
mov eax, dword [ebp - 0x64]
shr eax, 0xe
test al, 1
je 0x1008441e
mov edx, dword [ebp - 0x5c]
push esi
push esi
push esi
lea ecx, [ebp - 0x58]
push ecx
push edx
call dword [sym.imp.SETUPAPI.dll_CM_Request_Device_EjectW]
test eax, eax
jne 0x100843dc
mov eax, str.Success
cmp dword [ebp - 0x58], esi
je 0x100843e1
mov eax, str.Failed
push eax
push edi
push str.RemoveAllUsbDisk_EJect_Disk__cs_Result_Is__s
push 1
call ebx
add esp, 0x10
jmp 0x1008441e
push edi
push str.RemoveAllUsbDisk_Cannot_Get_Disk__cs_Instance
push esi
call ebx
jmp 0x1008441b
push edi
push str.RemoveAllUsbDisk_Cannot_Get_Disk__cs_Device_Number
push esi
jmp 0x10084415
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1008441e
push edi
push str.RemoveAllUsbDisk_Open_Disk__cs_Failed
push ebx
call dword [sym.imp.Common.dll_int___cdecl_COMMON::WriteLog_int__wchar_t_const__]
add esp, 0xc
inc edi
dec dword [ebp - 0x60]
jne 0x10084290
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.100d0962
mov esp, ebp
pop ebp
ret