Function at 0x10004e95
Capabilities:
Enumerate disk volumes
Get disk information via ioctl

Disassembly:
push ebp
lea ebp, [esp - 0x68]
sub esp, 0xa8
push ebx
push esi
push edi
push 0x527c
lea ecx, [ebp + 0x10]
call fcn.10045fcc
mov eax, dword [ebp + 0x10]
lea ecx, [eax + 0x5a0]
mov dword [ebp + 0xc], ecx
lea ecx, [eax + 0x618]
mov dword [ebp], ecx
lea ecx, [eax + 0x690]
mov dword [ebp + 0x2c], ecx
lea ecx, [eax + 0x708]
lea esi, [eax + 0x398]
mov dword [ebp + 8], ecx
lea edi, [eax + 0xf08]
xor ebx, ebx
lea ecx, [ebp + 0x38]
mov dword [ebp + 0x3c], eax
mov dword [ebp + 0x48], esi
mov dword [ebp + 0x58], edi
mov dword [ebp + 0x34], ebx
mov dword [ebp - 0x1c], esi
call fcn.10045faf
push 0x3b80
add edi, 0x3f4
push ebx
push edi
mov dword [ebp + 0x44], 0xffffff9c
mov dword [ebp + 0x28], ebx
call fcn.100b40f0
add esp, 0xc
cmp dword [ebp + 0x7c], ebx
push 0xfffffffffffffffe
pop eax
mov dword [edi + 4], eax
mov dword [edi], eax
mov word [esi], bx
mov dword [ebp + 4], 2
je 0x10004f38
mov esi, dword [ebp + 0x7c]
mov dword [ebp + 0x48], esi
mov eax, dword [ebp + 0x78]
shr eax, 0x10
mov ecx, eax
and ecx, 8
mov edi, eax
mov dword [ebp - 0x10], ecx
mov ecx, eax
and eax, 0x48
sub al, 0x48
and ecx, 0x10
and edi, 0x20
neg al
mov dword [ebp - 4], ecx
mov dword [ebp - 0x20], edi
sbb eax, eax
inc eax
mov dword [ebp - 0xc], eax
movsx eax, word [ebp + 0x78]
mov dword [ebp + 0x78], eax
je 0x10004f6f
mov dword [ebp + 4], ebx
cmp dword [ebp + 0x7c], ebx
mov dword [ebp + 0x30], ebx
mov dword [ebp + 0x18], ebx
mov dword [ebp + 0x24], ebx
jne 0x10004f95
push 0x103
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
cmp eax, 0xffffffff
mov dword [ebp + 0x24], eax
je 0x100056de
mov eax, dword [ebp + 8]
neg edi
sbb edi, edi
and edi, 0x20
mov dword [eax], edi
mov edi, dword [ebp + 0x7c]
cmp edi, ebx
je 0x10005000
push 4
push edi
push 0x100c731c
call dword [sym.imp.SHLWAPI.dll_StrCmpNW]
test eax, eax
jne 0x10004fd5
lea eax, [edi + 8]
cmp word [eax], bx
je 0x10004fd5
cmp word [edi + 0xa], 0x3a
jne 0x10004fd5
mov dword [ebp + 0x18], eax
mov ax, word [eax]
mov word [ebp + 0x30], ax
jmp 0x10005000
push 0xb
push edi
push 0x100c7310
call fcn.10040df5
add esp, 0xc
test al, al
je 0x10005000
lea eax, [edi + 0x16]
cmp word [eax], bx
je 0x10005000
cmp word [edi + 0x18], bx
je 0x10005000
cmp word [edi + 0x1a], bx
je 0x10005000
mov dword [ebp + 0x18], eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
dec eax
mov dword [ebp - 8], esi
js 0x10005019
lea eax, [esi + eax*2]
cmp word [eax], 0x5c
jne 0x10005019
mov word [eax], bx
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp edi, ebx
je 0x10005041
push esi
call fcn.10004e63
test eax, eax
pop ecx
je 0x10005041
push 7
push 0x80000000
push esi
call fcn.10014572
add esp, 0xc
jmp 0x10005058
push ebx
push 0x2000080
push 3
push ebx
push 7
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp + 0x60], eax
je 0x100056a9
cmp eax, ebx
je 0x100056a9
mov edi, dword [ebp + 0x58]
push 0xc
push ebx
add edi, 0x320
push edi
call fcn.100b40f0
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0xffffffffffffffaa
pop esi
push ebx
push dword [ebp + 0x58]
mov dword [edi + 8], esi
push 0xc
push edi
push ebx
push ebx
push 0x2d1080
push dword [ebp + 0x60]
mov dword [edi + 4], esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x100050b1
cmp dword [edi + 4], ebx
jge 0x100050b7
mov dword [edi + 8], esi
mov dword [edi + 4], esi
mov esi, dword [ebp + 0x58]
mov edi, 0x90
push edi
push ebx
add esi, 0x334
push esi
call fcn.100b40f0
add esp, 0xc
push ebx
push dword [ebp + 0x58]
mov dword [esi + 0x18], 0xffffffaa
push edi
push esi
push ebx
push ebx
push 0x70048
push dword [ebp + 0x60]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
cmp eax, ebx
lea edi, [esi + 8]
mov dword [ebp + 0x64], ebx
je 0x10005102
mov ecx, dword [esi]
mov dword [ebp + 0x64], ecx
movzx ecx, byte [esi + 0x20]
jmp 0x1000511d
push ebx
push dword [ebp + 0x58]
push 0x20
push edi
push ebx
push ebx
push 0x74004
push dword [ebp + 0x60]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
movzx ecx, byte [edi + 0x18]
cmp eax, ebx
mov dword [ebp + 0x4c], ecx
jne 0x10005136
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [edi], ebx
mov dword [edi + 4], ebx
mov dword [esi + 0x18], 0xffffffaa
push dword [ebp + 0x60]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
cmp dword [ebp + 0x64], 1
sete al
mov dword [ebp + 0x40], eax
mov eax, dword [ebp + 0x58]
add eax, 0x320
cmp dword [eax + 4], ebx
jl 0x10005161
cmp dword [eax + 8], ebx
jge 0x100052f7
mov eax, dword [ebp + 0x18]
lea ecx, [ebp + 0x20]
mov dword [ebp + 0x5c], eax
call fcn.10046123
lea ecx, [ebp + 0x1c]
call fcn.10046123
cmp word [ebp + 0x30], bx
je 0x1000520b
lea eax, [ebp + 0x20]
push eax
push dword [ebp + 0x30]
call fcn.10043966
mov esi, dword [ebp - 0x1c]
pop ecx
pop ecx
push 0x103
push esi
mov dword [ebp + 0x5c], ebx
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
cmp eax, 0xffffffff
mov dword [ebp + 0x64], eax
je 0x1000520b
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
dec eax
lea eax, [esi + eax*2]
cmp word [eax], 0x5c
jne 0x100051bd
mov word [eax], bx
push esi
lea eax, [ebp + 0x1c]
push eax
push esi
mov word [esi + 2], 0x3f
call fcn.10065259
add esp, 0xc
push dword [ebp + 0x1c]
push dword [ebp + 0x20]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x100051f9
push 0x103
push esi
push dword [ebp + 0x64]
mov word [esi], bx
call dword [sym.imp.KERNEL32.dll_FindNextVolumeW]
test eax, eax
jne 0x100051a9
jmp 0x10005202
mov dword [ebp + 0x48], esi
add esi, 0x16
mov dword [ebp + 0x5c], esi
push dword [ebp + 0x64]
call dword [sym.imp.KERNEL32.dll_FindVolumeClose]
cmp dword [ebp + 0x44], 0xffffff9c
jg 0x10005226
push dword [ebp + 0x5c]
lea eax, [ebp + 0x38]
push eax
push dword [ebp + 0x74]
call fcn.10064ee6
add esp, 0xc
mov dword [ebp + 0x44], eax
cmp dword [ebp + 0x44], ebx
jle 0x100052e7
mov esi, dword [ebp + 0x38]
add esi, 4
cmp dword [ebp + 0x5c], ebx
jne 0x1000529c
push 0xb
push dword [ebp + 0x48]
push 0x100c72f8
call dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x100052e7
mov eax, dword [ebp + 0x48]
add eax, 0x16
mov dword [ebp + 0x50], eax
push 1
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp + 0x50]
push eax
call fcn.100563b5
add esp, 0xc
cmp al, bl
jle 0x100052e7
cmp dword [ebp + 0x44], ebx
mov dword [ebp + 0x64], ebx
jle 0x100052e7
push 0x10
lea eax, [ebp - 0x40]
push eax
push esi
call fcn.1003fa82
add esp, 0xc
test eax, eax
je 0x1000529c
inc dword [ebp + 0x64]
mov eax, dword [ebp + 0x64]
add esi, 0x34
cmp eax, dword [ebp + 0x44]
jl 0x10005279
jmp 0x100052e7
mov ecx, dword [ebp + 0x58]
or dword [ebp + 0x40], 0x10
add esi, 0x10
mov edx, dword [esi]
lea eax, [ecx + 0x320]
mov dword [eax + 4], edx
add esi, 4
mov edx, dword [esi]
mov dword [eax + 8], edx
add esi, 4
mov edx, dword [esi]
mov dword [eax], edx
add esi, 4
mov eax, dword [esi]
add esi, 4
mov dword [ebp + 0x4c], eax
mov eax, dword [esi]
mov dword [edi], eax
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov edx, dword [esi + 8]
lea eax, [ecx + 0x334]
mov dword [eax + 0x10], edx
mov ecx, dword [esi + 0xc]
mov dword [eax + 0x14], ecx
lea ecx, [ebp + 0x1c]
call fcn.1003f96c
lea ecx, [ebp + 0x20]
call fcn.1003f96c
cmp word [ebp + 0x78], bx
jl 0x10005312
movsx ecx, word [ebp + 0x78]
mov eax, dword [ebp + 0x58]
add eax, 0x320
cmp ecx, dword [eax + 8]
jne 0x100056a9
mov ecx, dword [ebp + 0x74]
cmp ecx, ebx
jl 0x1000532a
mov eax, dword [ebp + 0x58]
add eax, 0x320
cmp ecx, dword [eax + 4]
jne 0x100056a9
cmp dword [ebp - 4], ebx
jne 0x100056cf
push dword [edi + 4]
push dword [edi]
push dword [ebp + 0xc]
call fcn.100a0e43
mov edi, dword [ebp + 0x58]
push dword [edi + 0x348]
add edi, 0x334
push dword [edi + 0x10]
push dword [ebp]
call fcn.100a0e43
add esp, 0x18
cmp dword [ebp + 0x40], 1
jne 0x10005372
push ebx
add edi, 0x20
push edi
push dword [ebp + 0x2c]
call fcn.1004363d
jmp 0x10005383
push dword [ebp + 0x4c]
push 0x100c72f0
push dword [ebp + 0x2c]
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
cmp dword [ebp - 0x20], ebx
je 0x100053af
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x7c]
add eax, 2
cmp ecx, ebx
mov word [eax], bx
jne 0x1000539e
mov ecx, dword [ebp + 0x48]
push 0x100c8058
push 0x13
push eax
push ecx
call fcn.10054fe7
add esp, 0x10
mov esi, dword [ebp + 0x58]
mov eax, dword [esi + 0x324]
add esi, 0x320
cmp eax, ebx
jl 0x100053c7
mov dword [ebp + 0x4c], eax
jmp 0x100053cb
or dword [ebp + 0x4c], 0xffffffff
mov eax, dword [esi + 8]
cmp eax, ebx
jl 0x100053d7
mov dword [ebp + 0x60], eax
jmp 0x100053db
or dword [ebp + 0x60], 0xffffffff
cmp dword [ebp - 0xc], ebx
mov eax, dword [esi]
mov dword [ebp + 0x40], eax
je 0x100053ed
mov eax, dword [ebp + 0x3c]
mov word [eax], bx
jmp 0x10005419
push dword [ebp + 8]
push dword [ebp]
push dword [ebp + 0xc]
push dword [ebp + 0x2c]
push eax
push dword [ebp + 0x60]
push dword [ebp + 0x4c]
push 0x100c6a64
push dword [ebp - 8]
push str._r_n_s_s__d__d__d__s__s__s_s
push dword [ebp + 0x3c]
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x2c
mov eax, dword [ebp + 0x70]
push dword [eax]
or dword [ebp + 0x34], 0xffffffff
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [ebp + 0x28]
push ecx
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 4]
push ebx
mov dword [ebp + 0x50], eax
mov eax, dword [ebp + 0x48]
push ebx
push eax
mov dword [ebp + 0x64], eax
call fcn.100145e0
add esp, 0x10
test eax, eax
je 0x10005459
mov eax, dword [ebp + 0x28]
cmp eax, ebx
je 0x10005459
cmp word [eax], bx
je 0x10005459
mov dword [ebp + 0x64], eax
cmp dword [ebp - 0x10], ebx
je 0x10005682
cmp dword [ebp - 0xc], ebx
mov edi, dword [ebp + 0x3c]
mov eax, edi
jne 0x1000547d
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [edi + eax*2]
mov word [eax], 0x20
inc eax
inc eax
mov ecx, eax
sub ecx, dword [ebp + 0x3c]
mov word [eax], bx
sar ecx, 1
mov dword [ebp + 0x34], ecx
mov ecx, dword [ebp + 0x30]
cmp cx, bx
mov edi, eax
je 0x100054a5
mov word [eax], cx
inc eax
inc eax
mov word [eax], 0x3a
inc eax
inc eax
mov word [eax], bx
jmp 0x100054c4
push dword [ebp + 0x64]
mov ecx, dword [ebp + 0x58]
push 0x20
push ebx
add ecx, 0x3f4
push ecx
push dword [esi + 8]
push dword [ebp + 0x50]
push eax
call fcn.100558a3
add esp, 0x1c
sub eax, edi
sar eax, 1
jne 0x10005682
cmp dword [ebp + 0x44], 0xffffff9c
mov word [edi - 2], bx
jg 0x100054eb
push ebx
lea eax, [ebp + 0x38]
push eax
push dword [ebp + 0x74]
call fcn.10064ee6
add esp, 0xc
mov dword [ebp + 0x44], eax
cmp dword [ebp + 0x44], ebx
jle 0x10005682
mov eax, dword [ebp + 0x38]
mov esi, dword [ebp + 0x48]
push 0xb
push esi
add eax, 4
push 0x100c72f8
mov dword [ebp + 0x64], eax
call dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x10005682
lea ecx, [ebp + 0x14]
mov dword [ebp + 0x5c], ebx
call fcn.10045faf
push ebx
lea eax, [ebp + 0x5c]
push eax
lea eax, [ebp + 0x14]
push eax
push esi
push str.SYSTEMMountedDevices
push 0x80000002
mov word [esi + 2], 0x3f
call fcn.1004a913
mov eax, dword [ebp + 0x14]
add esp, 0x18
cmp dword [ebp + 0x5c], 0x18
mov dword [ebp + 0x50], eax
jne 0x1000557b
push 8
push eax
push str.DMIO:ID:
call fcn.1003fa82
add esp, 0xc
test eax, eax
jne 0x1000557b
mov eax, dword [ebp + 0x50]
add eax, 8
push 0x10
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.100144ff
mov byte [ebp + 0x57], 2
jmp 0x10005593
push 1
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp + 0x50]
add esi, 0x16
push eax
mov dword [ebp + 0x50], esi
call fcn.100563b5
mov byte [ebp + 0x57], al
add esp, 0xc
lea ecx, [ebp + 0x14]
call fcn.1003f96c
cmp byte [ebp + 0x57], bl
jle 0x10005682
mov eax, dword [ebp + 0x44]
cmp eax, ebx
jle 0x10005682
mov ecx, dword [ebp + 0x64]
mov esi, dword [ebp + 0x3c]
add ecx, 0x14
mov dword [ebp + 0x5c], ecx
mov dword [ebp + 0x50], eax
push 0x10
lea eax, [ebp - 0x30]
push eax
push dword [ebp + 0x64]
call fcn.1003fa82
add esp, 0xc
test eax, eax
jne 0x10005671
mov eax, dword [ebp + 0x58]
push ebx
add eax, 0x3f4
push ebx
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.10065412
add esp, 0x10
cmp dword [ebp + 0x4c], ebx
mov dword [ebp - 0x14], eax
jl 0x10005605
cmp dword [ebp + 0x60], ebx
jl 0x10005613
cmp dword [ebp + 0x40], ebx
jge 0x10005655
jmp 0x1000560e
mov eax, dword [ebp + 0x5c]
mov eax, dword [eax - 4]
mov dword [ebp + 0x4c], eax
cmp dword [ebp + 0x60], ebx
jge 0x1000561b
mov eax, dword [ebp + 0x5c]
mov eax, dword [eax]
mov dword [ebp + 0x60], eax
cmp dword [ebp + 0x40], ebx
jge 0x10005629
mov eax, dword [ebp + 0x5c]
mov eax, dword [eax + 4]
mov dword [ebp + 0x40], eax
push dword [ebp]
push dword [ebp + 0xc]
push dword [ebp + 0x2c]
push dword [ebp + 0x40]
push dword [ebp + 0x60]
push dword [ebp + 0x4c]
push 0x100c6a64
push dword [ebp - 8]
push str._r_n_s_s__d__d__d__s__s__s
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x28
lea edi, [esi + eax*2]
mov eax, dword [ebp - 0x14]
cmp eax, ebx
jle 0x10005671
mov word [edi - 2], 0x20
mov word [edi], ax
inc edi
inc edi
mov word [edi], 0x3a
inc edi
inc edi
mov word [edi], bx
add dword [ebp + 0x64], 0x34
add dword [ebp + 0x5c], 0x34
dec dword [ebp + 0x50]
jne 0x100055c1
mov eax, dword [ebp + 0x3c]
mov esi, dword [ebp + 4]
mov edi, dword [ebp + 0x70]
lea eax, [eax + esi*2]
push eax
mov ecx, edi
call fcn.1004618f
mov eax, dword [ebp - 0x18]
mov ecx, dword [edi]
sub eax, esi
add eax, dword [ebp + 0x34]
mov dword [ebp + 4], ebx
lea eax, [ecx + eax*2]
mov dword [ebp + 0x34], eax
cmp dword [ebp + 0x24], ebx
je 0x10005703
mov esi, dword [ebp + 0x48]
push 0x103
push esi
push dword [ebp + 0x24]
mov word [esi], bx
call dword [sym.imp.KERNEL32.dll_FindNextVolumeW]
test eax, eax
je 0x100056fa
mov edi, dword [ebp + 0x7c]
jmp 0x10005000
mov esi, dword [ebp + 0x70]
push dword [ebp + 0x48]
mov ecx, esi
call fcn.1005026c
mov ebx, dword [esi]
lea ecx, [ebp + 0x28]
call fcn.1003f96c
lea ecx, [ebp + 0x38]
call fcn.1003f96c
lea ecx, [ebp + 0x10]
call fcn.1003f96c
mov eax, ebx
jmp 0x10005727
push dword [ebp + 0x24]
call dword [sym.imp.KERNEL32.dll_FindVolumeClose]
lea ecx, [ebp + 0x28]
call fcn.1003f96c
lea ecx, [ebp + 0x38]
call fcn.1003f96c
lea ecx, [ebp + 0x10]
call fcn.1003f96c
mov eax, dword [ebp - 4]
neg eax
sbb eax, eax
not eax
and eax, dword [ebp + 0x34]
pop edi
pop esi
pop ebx
add ebp, 0x68
leave
ret