Function at 0x698495
Capabilities:
Get disk information

Disassembly:
push ebp
sub esp, 0x40
mov eax, 0x6baa20
call fcn.00640244
sub esp, 0x6e0
push ebx
push esi
push edi
mov dword [ebp + 0x34], ecx
push 0x12
xor ebx, ebx
push ebx
push ebx
push 0x73294c
mov dword [ebp - 4], ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov esi, eax
cmp esi, 0xffffffff
je 0x698641
push 7
pop ecx
xor eax, eax
mov dword [ebp + 0x3c], ebx
lea edi, [ebp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [ebp + 0x18]
mov dword [ebp + 0x18], 0x1c
push eax
push ebx
push 0x73294c
push ebx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
mov ebx, dword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x69862a
xor ecx, ecx
lea eax, [ebp + 0x40]
push ecx
push eax
push ecx
push ecx
lea eax, [ebp + 0x18]
mov dword [ebp + 0x40], ecx
push eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
jne 0x698525
call ebx
cmp eax, 0x7a
jne 0x6985ff
cmp dword [ebp + 0x40], 0
je 0x6985ff
push dword [ebp + 0x40]
push 0x40
call dword [sym.imp.KERNEL32.DLL_LocalAlloc]
mov edx, eax
lea edi, [ebp - 0x40]
push 7
pop ecx
xor eax, eax
mov dword [ebp + 0x38], edx
mov dword [edx], 6
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 0x1c
push eax
lea eax, [ebp + 0x40]
push eax
push dword [ebp + 0x40]
lea eax, [ebp + 0x18]
push edx
push eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
je 0x6985ff
push 0
push 0x208
lea eax, [ebp - 0x4e4]
push eax
push dword [ebp - 0x2c]
call dword [0x7e84a4]
lea eax, [ebp - 0x4e4]
push eax
lea ecx, [ebp]
call fcn.00429973
lea eax, [ebp]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0xd4]
call fcn.00698b74
cmp dword [ebp - 0xa4], 8
mov ecx, dword [ebp - 0xb8]
mov byte [ebp - 4], 2
jae 0x6985c7
lea ecx, [ebp - 0xb8]
cmp dword [ebp + 0x60], 8
mov eax, dword [ebp + 0x4c]
jae 0x6985d3
lea eax, [ebp + 0x4c]
push ecx
push eax
call fcn.00665a8e
pop ecx
pop ecx
test eax, eax
je 0x698664
lea ecx, [ebp - 0xd4]
call fcn.00698e1b
push 0
push 1
lea ecx, [ebp]
mov byte [ebp - 4], 0
call fcn.004281f2
mov edx, dword [ebp + 0x3c]
lea edi, [ebp + 0x18]
push 7
pop ecx
xor eax, eax
inc edx
rep stosd dword es:[edi], eax
lea eax, [ebp + 0x18]
mov dword [ebp + 0x3c], edx
push eax
push edx
push 0x73294c
push 0
push esi
mov dword [ebp + 0x18], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x6984ff
call ebx
test esi, esi
je 0x69863f
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
xor ebx, ebx
mov esi, ebx
push ebx
push 1
lea ecx, [ebp + 0x4c]
call fcn.004281f2
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
lea esp, [ebp + 0x44]
pop ebp
ret 0x24
mov esi, dword [ebp + 0x38]
lea ecx, [ebp - 0x24]
add esi, 4
push esi
call fcn.00429973
mov ecx, dword [ebp + 0x64]
push eax
call fcn.00427c6d
xor ebx, ebx
lea ecx, [ebp - 0x24]
push ebx
push 1
call fcn.004281f2
lea ecx, [ebp - 0x2dc]
sub ecx, esi
movzx eax, word [esi]
mov word [ecx + esi], ax
lea esi, [esi + 2]
test ax, ax
jne 0x698691
lea ecx, [ebp - 0x2dc]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x6986a9
sub ecx, edx
push 0x5c
sar ecx, 1
pop eax
push 0x104
mov word [ebp + ecx*2 - 0x2dc], ax
xor eax, eax
mov word [ebp + ecx*2 - 0x2da], ax
lea eax, [ebp - 0x6ec]
push eax
lea eax, [ebp - 0x2dc]
push eax
call dword [sym.imp.KERNEL32.DLL_GetVolumeNameForVolumeMountPointW]
test eax, eax
je 0x698739
lea eax, [ebp - 0x6ec]
push eax
lea ecx, [ebp - 0x24]
call fcn.00429973
mov ecx, dword [ebp + 0x68]
push eax
call fcn.00427c6d
push ebx
push 1
lea ecx, [ebp - 0x24]
call fcn.004281f2
lea eax, [ebp + 0x64]
push eax
sub esp, 0x18
mov ecx, esp
push dword [ebp + 0x68]
call fcn.00427b8e
mov ecx, dword [ebp + 0x34]
call fcn.006983b4
test eax, eax
je 0x698739
mov ecx, dword [ebp + 0x6c]
xor esi, esi
mov ax, word [ebp + 0x64]
inc esi
mov word [ecx], ax
jmp 0x69873b
mov esi, ebx
lea ecx, [ebp - 0xd4]
call fcn.00698e1b
push ebx
push 1
lea ecx, [ebp]
call fcn.004281f2
jmp 0x698643