Function at 0x6657ff
Capabilities:
Get disk information

Disassembly:
mov eax, 0x6848fb
call fcn.006313fc
sub esp, 0x720
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x18], ecx
push 0x12
xor ebx, ebx
push ebx
push ebx
push 0x6f85f0
mov dword [esp + 0x748], ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov esi, eax
cmp esi, 0xffffffff
je 0x6659ed
push 7
pop ecx
xor eax, eax
mov dword [esp + 0x14], ebx
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0x1c
push eax
push ebx
push 0x6f85f0
push ebx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
mov ebx, dword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x6659d6
xor ecx, ecx
lea eax, [esp + 0x10]
push ecx
push eax
push ecx
push ecx
lea eax, [esp + 0x2c]
mov dword [esp + 0x20], ecx
push eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
jne 0x665898
call ebx
cmp eax, 0x7a
jne 0x6659a6
cmp dword [esp + 0x10], 0
je 0x6659a6
push dword [esp + 0x10]
push 0x40
call dword [sym.imp.KERNEL32.DLL_LocalAlloc]
mov ebp, eax
lea edi, [esp + 0x68]
push 7
pop ecx
xor eax, eax
mov dword [ebp], 6
rep stosd dword es:[edi], eax
lea eax, [esp + 0x68]
mov dword [esp + 0x68], 0x1c
push eax
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x18]
lea eax, [esp + 0x28]
push ebp
push eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
je 0x6659a6
push 0
push 0x208
lea eax, [esp + 0x328]
push eax
push dword [esp + 0x88]
call dword [0x7982b8]
lea eax, [esp + 0x320]
push eax
lea ecx, [esp + 0x3c]
call fcn.004249e7
lea eax, [esp + 0x38]
mov byte [esp + 0x738], 1
push eax
lea ecx, [esp + 0x88]
call fcn.00665f4b
cmp dword [esp + 0xb4], 8
mov ecx, dword [esp + 0xa0]
mov byte [esp + 0x738], 2
jae 0x665954
lea ecx, [esp + 0xa0]
cmp dword [esp + 0x758], 8
mov eax, dword [esp + 0x744]
jae 0x66596c
lea eax, [esp + 0x744]
push ecx
push eax
call fcn.0063299b
pop ecx
pop ecx
test eax, eax
je 0x665a16
lea ecx, [esp + 0x84]
mov byte [esp + 0x738], 1
call fcn.00666193
push 0
push 1
lea ecx, [esp + 0x40]
mov byte [esp + 0x740], 0
call fcn.0042341c
mov edx, dword [esp + 0x14]
lea edi, [esp + 0x1c]
push 7
pop ecx
xor eax, eax
inc edx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x14], edx
push eax
push edx
push 0x6f85f0
push 0
push esi
mov dword [esp + 0x30], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x66586f
call ebx
test esi, esi
je 0x6659eb
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
xor ebx, ebx
mov esi, ebx
push ebx
push 1
lea ecx, [esp + 0x74c]
call fcn.0042341c
mov ecx, dword [esp + 0x730]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
leave
ret 0x24
lea esi, [ebp + 4]
push esi
lea ecx, [esp + 0x54]
call fcn.004249e7
mov ecx, dword [esp + 0x75c]
push eax
call fcn.0044dbe6
xor ebx, ebx
lea ecx, [esp + 0x50]
push ebx
push 1
call fcn.0042341c
lea ecx, [esp + 0x118]
sub ecx, esi
movzx eax, word [esi]
mov word [ecx + esi], ax
lea esi, [esi + 2]
test ax, ax
jne 0x665a47
lea ecx, [esp + 0x118]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x665a60
sub ecx, edx
push 0x5c
sar ecx, 1
pop eax
push 0x104
mov word [esp + ecx*2 + 0x11c], ax
xor eax, eax
mov word [esp + ecx*2 + 0x11e], ax
lea eax, [esp + 0x52c]
push eax
lea eax, [esp + 0x120]
push eax
call dword [sym.imp.KERNEL32.DLL_GetVolumeNameForVolumeMountPointW]
test eax, eax
je 0x665b04
lea eax, [esp + 0x528]
push eax
lea ecx, [esp + 0x54]
call fcn.004249e7
mov ecx, dword [esp + 0x760]
push eax
call fcn.0044dbe6
push ebx
push 1
lea ecx, [esp + 0x58]
call fcn.0042341c
lea eax, [esp + 0x14]
push eax
sub esp, 0x18
mov ecx, esp
push dword [esp + 0x77c]
call fcn.00422efb
mov ecx, dword [esp + 0x34]
call fcn.0066571e
test eax, eax
je 0x665b04
mov ecx, dword [esp + 0x764]
xor esi, esi
mov ax, word [esp + 0x14]
inc esi
mov word [ecx], ax
jmp 0x665b06
mov esi, ebx
lea ecx, [esp + 0x84]
mov byte [esp + 0x738], 1
call fcn.00666193
push ebx
push 1
lea ecx, [esp + 0x40]
call fcn.0042341c
jmp 0x6659ef