Function at 0x6c8104b0
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x9c
mov esi, dword [eax + 0xa4]
mov eax, esi
test al, al
je 0x6c8102b0
mov edx, dword [sym.imp.kernel32.dll_GetDriveTypeW]
movzx eax, al
mov dword [ebp - 0x2e], 0x3a
add eax, 0x40
mov word [ebp - 0x30], ax
lea eax, [ebp - 0x30]
mov dword [esp], eax
mov dword [ebp - 0x5c], edx
call edx
mov edx, dword [ebp - 0x5c]
sub esp, 4
cmp eax, 1
jbe 0x6c810320
sub esi, 1
mov eax, esi
movzx eax, al
add eax, 0x41
jmp 0x6c8102c3
call fcn.6c80e860
mov edx, dword [sym.imp.kernel32.dll_GetDriveTypeW]
mov esi, eax
movzx eax, al
add eax, 0x41
lea edi, [ebp - 0x4a]
xor ecx, ecx
mov dword [ebp - 0x48], 0x5c003a
mov word [ebp - 0x44], cx
mov word [ebp - 0x4a], ax
mov dword [esp], edi
call edx
and dword [ebx + 0xc0], 0xfffffffe
sub esp, 4
mov edx, eax
cmp eax, 1
jbe 0x6c810330
mov ecx, dword [ebx + 0xb0]
movzx eax, cl
sub eax, 4
cmp eax, 0xb
ja case.0x6c8102fe.4
jmp dword [eax*4 + 0x6c8495c4]
test byte [0x6c8457b0], 2
jne 0x6c8103a8
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x5b
mov esi, 0x1a
jmp 0x6c8102c3
test byte [0x6c8457b0], 8
jne 0x6c810368
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0xf
mov eax, 0xf
or dword [ebx + 0xc0], 1
mov word [ebx + 0xb0], ax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, esi
movzx esi, al
add esi, 0x41
mov dword [esp + 0x14], esi
movzx eax, byte [ebx + 0xb0]
mov dword [esp + 0xc], str.IOCTL___SUBFUNCTION__d___INVALID_DRIVE__c:_n
mov dword [esp + 8], str.INT21_Ioctl_Block
mov dword [esp + 4], 0x6c8457b0
mov dword [esp + 0x10], eax
mov dword [esp], 3
call fcn.6c80d340
jmp 0x6c810339
movzx eax, word [ebx + 0x94]
movzx ecx, cx
mov dword [esp + 0x34], eax
movzx eax, word [ebx + 0x98]
mov dword [esp + 0x30], eax
movzx eax, word [ebx + 0x9c]
mov dword [esp + 0x2c], eax
movzx eax, word [ebx + 0xa0]
mov dword [esp + 0x28], eax
movzx eax, word [ebx + 0xa8]
mov dword [esp + 0x24], eax
movzx eax, word [ebx + 0xac]
mov dword [esp + 0x20], eax
movzx eax, word [ebx + 0xa4]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], 0x21
mov dword [esp + 0x10], 0x21
mov dword [esp + 0xc], 0x6c848e98
mov dword [esp + 8], str.INT21_Ioctl_Block
mov dword [esp + 4], 0x6c8457b0
mov dword [esp], 1
call fcn.6c80d340
jmp 0x6c810315
test byte [0x6c8457b0], 8
jne 0x6c8109a0
xor cx, cx
mov eax, ecx
or eax, 1
cmp edx, 2
cmovne ecx, eax
mov dword [ebx + 0xb0], ecx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x6c8457b0], 8
jne 0x6c810960
mov eax, dword [ebx + 0xa8]
xor ax, ax
cmp edx, 4
je 0x6c810950
cmp edx, 5
je 0x6c8105e0
mov ecx, eax
or ch, 8
cmp edx, 3
cmove eax, ecx
mov dword [ebx + 0xa8], eax
jmp 0x6c810315
mov eax, dword [ebx + 0xa8]
mov dword [esp + 4], eax
movzx eax, word [ebx + 0x98]
mov dword [esp], eax
call fcn.6c82fe60
movzx ecx, word [ebx + 0xac]
mov edx, eax
lea eax, [ecx - 0x841]
cmp eax, 0x31
ja case.0x6c8104e1.2114
jmp dword [eax*4 + 0x6c8495f4]
test byte [0x6c8457b0], 8
jne 0x6c8109e8
xor cl, cl
mov dword [ebx + 0xb0], ecx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x6c8457b0], 8
je 0x6c8104fd
movzx edx, byte [ebx + 0xa4]
mov eax, str.default
test edx, edx
je 0x6c810545
cmp edx, 0x1a
ja 0x6c810a08
add edx, 0x40
mov dword [esp], 0x6c849581
mov dword [esp + 4], edx
call fcn.6c80caa0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.IOCTL___SET_LOGICAL_DRIVE_MAP_for_drive__s_n
mov dword [esp + 8], str.INT21_Ioctl_Block
mov dword [esp + 4], 0x6c8457b0
mov dword [esp], 3
call fcn.6c80d340
mov ecx, dword [ebx + 0xb0]
jmp 0x6c8104fd
test byte [0x6c8457b0], 2
je 0x6c810315
movzx eax, word [ebx + 0x94]
mov dword [esp + 0x34], eax
movzx eax, word [ebx + 0x98]
mov dword [esp + 0x30], eax
movzx eax, word [ebx + 0x9c]
mov dword [esp + 0x2c], eax
movzx eax, word [ebx + 0xa0]
mov dword [esp + 0x28], eax
movzx eax, word [ebx + 0xa8]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], eax
movzx eax, word [ebx + 0xa4]
mov dword [esp + 0x1c], eax
movzx eax, word [ebx + 0xb0]
mov dword [esp + 0x18], eax
jmp 0x6c8103fc
or ah, 0x10
mov dword [ebx + 0xa8], eax
jmp 0x6c810315
test byte [0x6c8457b0], 8
jne 0x6c810aa8
movzx eax, word [edx + 1]
movzx edi, word [edx + 7]
mov word [ebp - 0x5c], ax
movzx eax, word [edx + 3]
mov word [ebp - 0x5e], ax
movzx eax, word [edx + 5]
mov word [ebp - 0x60], ax
movzx eax, word [edx + 9]
mov dword [esp + 4], eax
movzx eax, word [edx + 0xb]
mov dword [esp], eax
call fcn.6c82fe60
mov ecx, esi
cmp cl, 1
jbe 0x6c810b19
or dword [ebx + 0xc0], 1
mov edi, 0x1d
mov word [ebx + 0xb0], di
jmp 0x6c810315
or dword [ebx + 0xc0], 1
mov eax, 1
mov word [ebx + 0xb0], ax
jmp 0x6c810315
xor eax, eax
mov ecx, 8
mov edi, edx
rep stosd dword es:[edi], eax
mov eax, esi
mov byte [edx], 4
cmp al, 1
jbe 0x6c810a36
mov ecx, 0x202
mov esi, 0xfffff002
mov eax, 0x105
mov byte [edx + 5], 3
mov word [edx + 8], cx
mov edi, 0x38
mov ecx, 0x28
mov word [edx + 0xc], si
mov esi, 0xfffffffa
mov word [edx + 1], ax
mov eax, esi
mov byte [edx + 0x11], 0xf8
mov byte [edx + 0x10], al
mov eax, edi
mov byte [edx + 0x12], cl
mov byte [edx + 0x14], al
mov byte [edx + 0x16], 2
and dword [ebx + 0xc0], 0xfffffffe
jmp 0x6c810315
test byte [0x6c8457b0], 8
je 0x6c810315
mov eax, esi
movzx eax, al
add eax, 0x41
mov dword [esp + 0x18], eax
movzx eax, word [ebx + 0xa8]
mov dword [esp + 0x14], eax
movzx eax, byte [ebx + 0xa5]
mov dword [esp + 0xc], str.GENERIC_IOCTL___Lock_logical_volume__level__d_mode__d____c:_n
mov dword [esp + 8], str.INT21_Ioctl_Block
mov dword [esp + 4], 0x6c8457b0
mov dword [esp + 0x10], eax
mov dword [esp], 3
call fcn.6c80d340
jmp 0x6c810315
movzx eax, byte [edx]
lea esi, [edx + 1]
lea ecx, [eax - 1]
mov ebx, eax
cmp ecx, 4
jae 0x6c810a1d
test ecx, ecx
je 0x6c81074a
mov byte [edx + 1], 0
test cl, 2
jne 0x6c810b5d
mov ecx, 0xffffff07
mov byte [edx + 1], bl
mov word [edx + 2], cx
jmp 0x6c810315
test byte [0x6c8457b0], 8
jne 0x6c810a6d
mov dword [ebp - 0x5c], edx
lea ebx, [ebp - 0x30]
mov dword [esp], edi
xor edi, edi
lea esi, [ebp - 0x42]
mov dword [esp + 4], ebx
lea eax, [ebp - 0x50]
mov dword [esp + 0x1c], 9
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xc
call dword [sym.imp.kernel32.dll_GetVolumeInformationW]
mov edx, dword [ebp - 0x5c]
sub esp, 0x20
mov word [edx], di
mov eax, dword [ebp - 0x50]
mov dword [edx + 2], eax
lea eax, [edx + 6]
mov dword [esp + 8], ebx
mov ebx, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0xb
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xb
mov dword [esp + 4], 0
mov dword [esp], 1
call ebx
mov edx, dword [ebp - 0x5c]
sub esp, 0x20
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
add edx, 0x11
mov dword [esp + 0x14], 8
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 8
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], 1
call ebx
sub esp, 0x20
jmp 0x6c810315
mov eax, esi
movzx edi, al
test byte [0x6c8457b0], 8
jne 0x6c810ae3
movzx eax, word [edx + 1]
movzx ecx, word [edx + 3]
mov word [ebp - 0x5c], ax
movzx eax, word [edx + 5]
mov word [ebp - 0x5e], cx
movzx ecx, word [edx + 7]
mov word [ebp - 0x60], ax
movzx eax, word [edx + 9]
mov word [ebp - 0x62], cx
mov dword [esp + 4], eax
movzx eax, word [edx + 0xb]
mov dword [esp], eax
call fcn.6c82fe60
mov ecx, esi
mov dword [esp + 0x10], 0
mov edx, eax
mov eax, esi
mov dword [esp], edi
mov dword [esp + 0xc], edx
movzx edx, word [ebp - 0x62]
cmp al, 2
sbb eax, eax
and eax, 0xfffff034
add eax, 0xff0
cmp cl, 2
mov dword [esp + 8], edx
movzx edx, word [ebp - 0x5e]
sbb ecx, ecx
and cl, 0x13
add ecx, 0xff
imul edx, eax
movzx eax, word [ebp - 0x60]
add eax, edx
movzx edx, word [ebp - 0x5c]
imul edx, ecx
add eax, edx
mov dword [esp + 4], eax
call fcn.6c8182b0
test eax, eax
jne 0x6c810315
or dword [ebx + 0xc0], 1
mov eax, 0x1e
mov word [ebx + 0xb0], ax
jmp 0x6c810315
test byte [0x6c8457b0], 8
je 0x6c810315
mov eax, esi
mov dword [esp + 0xc], str.GENERIC_IOCTL___Logical_volume_unlocked____c:_n
movzx eax, al
mov dword [esp + 8], str.INT21_Ioctl_Block
add eax, 0x41
mov dword [esp + 4], 0x6c8457b0
mov dword [esp + 0x10], eax
mov dword [esp], 3
call fcn.6c80d340
jmp 0x6c810315
or ah, 0x12
mov dword [ebx + 0xa8], eax
jmp 0x6c810315
mov eax, esi
mov dword [esp + 0xc], str.IOCTL___CHECK_IF_BLOCK_DEVICE_REMOTE____c:_n
movzx esi, al
mov dword [esp + 8], str.INT21_Ioctl_Block
add esi, 0x41
mov dword [esp + 4], 0x6c8457b0
mov dword [esp + 0x10], esi
mov dword [esp], 3
mov dword [ebp - 0x5c], edx
call fcn.6c80d340
mov edx, dword [ebp - 0x5c]
jmp 0x6c810475
mov eax, esi
mov dword [esp + 0xc], str.IOCTL___CHECK_IF_BLOCK_DEVICE_REMOVABLE____c:_n
movzx esi, al
mov dword [esp + 8], str.INT21_Ioctl_Block
add esi, 0x41
mov dword [esp + 4], 0x6c8457b0
mov dword [esp + 0x10], esi
mov dword [esp], 3
mov dword [ebp - 0x5c], edx
call fcn.6c80d340
mov ecx, dword [ebx + 0xb0]
mov edx, dword [ebp - 0x5c]
jmp 0x6c810445
mov eax, esi
mov dword [esp + 0xc], str.IOCTL___GET_LOGICAL_DRIVE_MAP____c:_n
movzx esi, al
add esi, 0x41
mov dword [esp + 0x10], esi
jmp 0x6c810551
mov dword [esp + 4], edx
mov dword [esp], str._Bad_drive:__d_
call fcn.6c80caa0
jmp 0x6c810545
mov dword [esi + ecx - 4], 0
lea ecx, [eax - 2]
mov edi, esi
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
jmp 0x6c81074a
mov eax, 0x207
mov byte [edx + 4], 0x50
mov esi, 0xb
mov ecx, 6
mov word [edx + 1], ax
mov eax, 0x202
mov edi, 0x12
mov word [edx + 8], ax
mov eax, 0xfffff002
mov word [edx + 0xc], ax
mov byte [edx + 0xf], 0x40
jmp 0x6c8106ac
mov eax, esi
mov dword [esp + 0xc], str.GENERIC_IOCTL___Get_media_id____c:_n
movzx eax, al
mov dword [esp + 8], str.INT21_Ioctl_Block
add eax, 0x41
mov dword [esp + 4], 0x6c8457b0
mov dword [esp + 0x10], eax
mov dword [esp], 3
mov dword [ebp - 0x5c], edx
call fcn.6c80d340
mov edx, dword [ebp - 0x5c]
jmp 0x6c810768
mov eax, esi
mov dword [esp + 0xc], str.GENERIC_IOCTL___Write_logical_device_track____c:_n
movzx eax, al
mov dword [esp + 8], str.INT21_Ioctl_Block
add eax, 0x41
mov dword [esp + 4], 0x6c8457b0
mov dword [esp + 0x10], eax
mov dword [esp], 3
mov dword [ebp - 0x5c], edx
call fcn.6c80d340
mov edx, dword [ebp - 0x5c]
jmp 0x6c8105fb
lea eax, [edi + 0x41]
mov dword [esp + 0xc], str.GENERIC_IOCTL___Read_logical_device_track____c:_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.INT21_Ioctl_Block
mov dword [esp + 4], 0x6c8457b0
mov dword [esp], 3
mov dword [ebp - 0x5c], edx
call fcn.6c80d340
mov edx, dword [ebp - 0x5c]
jmp 0x6c810858
mov dword [esp + 0xc], eax
movzx eax, word [ebp - 0x5e]
movzx esi, cl
mov dword [esp + 0x10], 0
mov dword [esp + 8], edi
mov dword [esp], esi
lea edx, [eax + eax*8]
movzx eax, word [ebp - 0x60]
lea edx, [eax + edx*4]
movzx eax, word [ebp - 0x5c]
lea eax, [eax + eax*8]
lea eax, [edx + eax*2]
mov dword [esp + 4], eax
call fcn.6c818640
test eax, eax
jne 0x6c810315
jmp 0x6c810636
mov word [esi + ecx - 2], 0
jmp 0x6c81074a