Function at 0x404f66
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.00446437
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.0044641a
push 0x3b80
add edi, 0x3f4
push ebx
push edi
mov dword [ebp + 0x44], 0xffffff9c
mov dword [ebp + 0x28], ebx
call fcn.004b4520
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 0x405009
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 0x405040
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 0x405066
push 0x103
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
cmp eax, 0xffffffff
mov dword [ebp + 0x24], eax
je 0x4057af
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 0x4050d1
push 4
push edi
push 0x4c731c
call dword [sym.imp.SHLWAPI.dll_StrCmpNW]
test eax, eax
jne 0x4050a6
lea eax, [edi + 8]
cmp word [eax], bx
je 0x4050a6
cmp word [edi + 0xa], 0x3a
jne 0x4050a6
mov dword [ebp + 0x18], eax
mov ax, word [eax]
mov word [ebp + 0x30], ax
jmp 0x4050d1
push 0xb
push edi
push 0x4c7310
call fcn.00441277
add esp, 0xc
test al, al
je 0x4050d1
lea eax, [edi + 0x16]
cmp word [eax], bx
je 0x4050d1
cmp word [edi + 0x18], bx
je 0x4050d1
cmp word [edi + 0x1a], bx
je 0x4050d1
mov dword [ebp + 0x18], eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
dec eax
mov dword [ebp - 8], esi
js 0x4050ea
lea eax, [esi + eax*2]
cmp word [eax], 0x5c
jne 0x4050ea
mov word [eax], bx
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp edi, ebx
je 0x405112
push esi
call fcn.00404f34
test eax, eax
pop ecx
je 0x405112
push 7
push 0x80000000
push esi
call fcn.004148ac
add esp, 0xc
jmp 0x405129
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 0x40577a
cmp eax, ebx
je 0x40577a
mov edi, dword [ebp + 0x58]
push 0xc
push ebx
add edi, 0x320
push edi
call fcn.004b4520
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 0x405182
cmp dword [edi + 4], ebx
jge 0x405188
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.004b4520
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 0x4051d3
mov ecx, dword [esi]
mov dword [ebp + 0x64], ecx
movzx ecx, byte [esi + 0x20]
jmp 0x4051ee
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 0x405207
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 0x405232
cmp dword [eax + 8], ebx
jge 0x4053c8
mov eax, dword [ebp + 0x18]
lea ecx, [ebp + 0x20]
mov dword [ebp + 0x5c], eax
call fcn.0044658e
lea ecx, [ebp + 0x1c]
call fcn.0044658e
cmp word [ebp + 0x30], bx
je 0x4052dc
lea eax, [ebp + 0x20]
push eax
push dword [ebp + 0x30]
call fcn.00443de8
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 0x4052dc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
dec eax
lea eax, [esi + eax*2]
cmp word [eax], 0x5c
jne 0x40528e
mov word [eax], bx
push esi
lea eax, [ebp + 0x1c]
push eax
push esi
mov word [esi + 2], 0x3f
call fcn.0046568b
add esp, 0xc
push dword [ebp + 0x1c]
push dword [ebp + 0x20]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4052ca
push 0x103
push esi
push dword [ebp + 0x64]
mov word [esi], bx
call dword [sym.imp.KERNEL32.dll_FindNextVolumeW]
test eax, eax
jne 0x40527a
jmp 0x4052d3
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 0x4052f7
push dword [ebp + 0x5c]
lea eax, [ebp + 0x38]
push eax
push dword [ebp + 0x74]
call fcn.00465318
add esp, 0xc
mov dword [ebp + 0x44], eax
cmp dword [ebp + 0x44], ebx
jle 0x4053b8
mov esi, dword [ebp + 0x38]
add esi, 4
cmp dword [ebp + 0x5c], ebx
jne 0x40536d
push 0xb
push dword [ebp + 0x48]
push 0x4c72f8
call dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x4053b8
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.004567b5
add esp, 0xc
cmp al, bl
jle 0x4053b8
cmp dword [ebp + 0x44], ebx
mov dword [ebp + 0x64], ebx
jle 0x4053b8
push 0x10
lea eax, [ebp - 0x40]
push eax
push esi
call fcn.0043ff15
add esp, 0xc
test eax, eax
je 0x40536d
inc dword [ebp + 0x64]
mov eax, dword [ebp + 0x64]
add esi, 0x34
cmp eax, dword [ebp + 0x44]
jl 0x40534a
jmp 0x4053b8
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.0043fe25
lea ecx, [ebp + 0x20]
call fcn.0043fe25
cmp word [ebp + 0x78], bx
jl 0x4053e3
movsx ecx, word [ebp + 0x78]
mov eax, dword [ebp + 0x58]
add eax, 0x320
cmp ecx, dword [eax + 8]
jne 0x40577a
mov ecx, dword [ebp + 0x74]
cmp ecx, ebx
jl 0x4053fb
mov eax, dword [ebp + 0x58]
add eax, 0x320
cmp ecx, dword [eax + 4]
jne 0x40577a
cmp dword [ebp - 4], ebx
jne 0x4057a0
push dword [edi + 4]
push dword [edi]
push dword [ebp + 0xc]
call fcn.004a129d
mov edi, dword [ebp + 0x58]
push dword [edi + 0x348]
add edi, 0x334
push dword [edi + 0x10]
push dword [ebp]
call fcn.004a129d
add esp, 0x18
cmp dword [ebp + 0x40], 1
jne 0x405443
push ebx
add edi, 0x20
push edi
push dword [ebp + 0x2c]
call fcn.00443abf
jmp 0x405454
push dword [ebp + 0x4c]
push 0x4c72f0
push dword [ebp + 0x2c]
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
cmp dword [ebp - 0x20], ebx
je 0x405480
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x7c]
add eax, 2
cmp ecx, ebx
mov word [eax], bx
jne 0x40546f
mov ecx, dword [ebp + 0x48]
push 0x4c8058
push 0x13
push eax
push ecx
call fcn.004553e7
add esp, 0x10
mov esi, dword [ebp + 0x58]
mov eax, dword [esi + 0x324]
add esi, 0x320
cmp eax, ebx
jl 0x405498
mov dword [ebp + 0x4c], eax
jmp 0x40549c
or dword [ebp + 0x4c], 0xffffffff
mov eax, dword [esi + 8]
cmp eax, ebx
jl 0x4054a8
mov dword [ebp + 0x60], eax
jmp 0x4054ac
or dword [ebp + 0x60], 0xffffffff
cmp dword [ebp - 0xc], ebx
mov eax, dword [esi]
mov dword [ebp + 0x40], eax
je 0x4054be
mov eax, dword [ebp + 0x3c]
mov word [eax], bx
jmp 0x4054ea
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 0x4c6a64
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.0041491a
add esp, 0x10
test eax, eax
je 0x40552a
mov eax, dword [ebp + 0x28]
cmp eax, ebx
je 0x40552a
cmp word [eax], bx
je 0x40552a
mov dword [ebp + 0x64], eax
cmp dword [ebp - 0x10], ebx
je 0x405753
cmp dword [ebp - 0xc], ebx
mov edi, dword [ebp + 0x3c]
mov eax, edi
jne 0x40554e
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 0x405576
mov word [eax], cx
inc eax
inc eax
mov word [eax], 0x3a
inc eax
inc eax
mov word [eax], bx
jmp 0x405595
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.00455ca3
add esp, 0x1c
sub eax, edi
sar eax, 1
jne 0x405753
cmp dword [ebp + 0x44], 0xffffff9c
mov word [edi - 2], bx
jg 0x4055bc
push ebx
lea eax, [ebp + 0x38]
push eax
push dword [ebp + 0x74]
call fcn.00465318
add esp, 0xc
mov dword [ebp + 0x44], eax
cmp dword [ebp + 0x44], ebx
jle 0x405753
mov eax, dword [ebp + 0x38]
mov esi, dword [ebp + 0x48]
push 0xb
push esi
add eax, 4
push 0x4c72f8
mov dword [ebp + 0x64], eax
call dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x405753
lea ecx, [ebp + 0x14]
mov dword [ebp + 0x5c], ebx
call fcn.0044641a
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.0044ad45
mov eax, dword [ebp + 0x14]
add esp, 0x18
cmp dword [ebp + 0x5c], 0x18
mov dword [ebp + 0x50], eax
jne 0x40564c
push 8
push eax
push str.DMIO:ID:
call fcn.0043ff15
add esp, 0xc
test eax, eax
jne 0x40564c
mov eax, dword [ebp + 0x50]
add eax, 8
push 0x10
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.00414839
mov byte [ebp + 0x57], 2
jmp 0x405664
push 1
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp + 0x50]
add esi, 0x16
push eax
mov dword [ebp + 0x50], esi
call fcn.004567b5
mov byte [ebp + 0x57], al
add esp, 0xc
lea ecx, [ebp + 0x14]
call fcn.0043fe25
cmp byte [ebp + 0x57], bl
jle 0x405753
mov eax, dword [ebp + 0x44]
cmp eax, ebx
jle 0x405753
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.0043ff15
add esp, 0xc
test eax, eax
jne 0x405742
mov eax, dword [ebp + 0x58]
push ebx
add eax, 0x3f4
push ebx
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.00465844
add esp, 0x10
cmp dword [ebp + 0x4c], ebx
mov dword [ebp - 0x14], eax
jl 0x4056d6
cmp dword [ebp + 0x60], ebx
jl 0x4056e4
cmp dword [ebp + 0x40], ebx
jge 0x405726
jmp 0x4056df
mov eax, dword [ebp + 0x5c]
mov eax, dword [eax - 4]
mov dword [ebp + 0x4c], eax
cmp dword [ebp + 0x60], ebx
jge 0x4056ec
mov eax, dword [ebp + 0x5c]
mov eax, dword [eax]
mov dword [ebp + 0x60], eax
cmp dword [ebp + 0x40], ebx
jge 0x4056fa
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 0x4c6a64
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 0x405742
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 0x405692
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.004465fa
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 0x4057d4
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 0x4057cb
mov edi, dword [ebp + 0x7c]
jmp 0x4050d1
mov esi, dword [ebp + 0x70]
push dword [ebp + 0x48]
mov ecx, esi
call fcn.0045066c
mov ebx, dword [esi]
lea ecx, [ebp + 0x28]
call fcn.0043fe25
lea ecx, [ebp + 0x38]
call fcn.0043fe25
lea ecx, [ebp + 0x10]
call fcn.0043fe25
mov eax, ebx
jmp 0x4057f8
push dword [ebp + 0x24]
call dword [sym.imp.KERNEL32.dll_FindVolumeClose]
lea ecx, [ebp + 0x28]
call fcn.0043fe25
lea ecx, [ebp + 0x38]
call fcn.0043fe25
lea ecx, [ebp + 0x10]
call fcn.0043fe25
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