Function at 0x51c520
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc64
mov eax, dword [0x6480b4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [0x651c64]
mov dword [ebp - 0xc64], eax
mov dword [ebp - 0xc58], 0
push edi
test esi, esi
je 0x51c582
mov eax, dword [esi + 0x30]
mov dword [0x651c64], eax
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x51c56d
push 2
push eax
call fcn.0058bb51
add esp, 8
push 0x38
push esi
call fcn.0058bb51
mov esi, dword [0x651c64]
add esp, 8
test esi, esi
jne 0x51c553
lea eax, [ebp - 0x3c4]
mov dword [ebp - 0x3c4], 0x114
push eax
call dword [0x648e54]
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov edi, dword [0x648de0]
mov edx, eax
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
mov dword [ebp - 0xc50], edx
mov eax, 1
mov ecx, esi
shl eax, cl
test edx, eax
je 0x51c669
lea eax, [esi + 0x41]
movzx eax, ax
mov dword [ebp - 0xc54], eax
movzx edi, ax
cmp esi, 2
jge 0x51c5fb
push edi
lea eax, [ebp - 0x64]
push 0x5f6a84
push eax
call fcn.0047c390
add esp, 0xc
lea eax, [ebp - 0x64]
push eax
call dword [0x648e20]
cmp eax, 3
jne 0x51c65d
cmp dword [ebp - 0x3b4], 2
jne 0x51c88a
push edi
lea eax, [ebp - 0x64]
push 0x5efab0
push eax
call fcn.0047c390
add esp, 0xc
lea eax, [ebp - 0x64]
push 0
push 0
push 3
push 0
push 3
push accept
push eax
call dword [0x648de0]
mov edi, eax
cmp edi, 0xffffffff
je 0x51c65d
lea eax, [ebp - 0xc58]
push eax
lea eax, [ebp - 0x3c4]
push eax
mov eax, dword [ebp - 0xc54]
push 0
push eax
push edi
call fcn.0051c0f0
add esp, 0x14
push edi
call ebx
mov edi, dword [0x648de0]
mov edx, dword [ebp - 0xc50]
inc esi
cmp esi, 0x1a
jl 0x51c5b5
cmp dword [ebp - 0x3b4], 2
jne 0x51caa3
cmp dword [ebp - 0x3c0], 4
jbe 0x51caa3
mov eax, dword [0x651c58]
test eax, eax
je 0x51c846
cmp dword [0x651c5c], 0
je 0x51c846
cmp dword [0x651c60], 0
je 0x51c846
push 0x104
lea ecx, [ebp - 0x26c]
push ecx
call eax
mov esi, eax
mov dword [ebp - 0xc5c], esi
cmp esi, 0xffffffff
je 0x51c76f
lea ecx, [ebp - 0x26c]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x51c6e0
sub ecx, edx
sar ecx, 1
lea ecx, [ecx*2 - 2]
cmp ecx, 0x208
jae 0x51cac6
xor eax, eax
push eax
push eax
push 3
push eax
push 3
push eax
mov word [ebp + ecx - 0x26c], ax
lea eax, [ebp - 0x26c]
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x51c747
lea eax, [ebp - 0xc58]
push eax
lea eax, [ebp - 0x3c4]
push eax
lea eax, [ebp - 0x26c]
push eax
push 0
push esi
call fcn.0051c0f0
add esp, 0x14
push esi
call ebx
mov esi, dword [ebp - 0xc5c]
lea eax, [ebp - 0x26c]
push 0x104
push eax
push esi
call dword [0x651c5c]
test eax, eax
jne 0x51c6d3
push esi
call dword [0x651c60]
lea eax, [ebp - 0xc4c]
push eax
push str.global__
call fcn.00532fb0
add esp, 8
test eax, eax
je 0x51c846
nop dword [eax + eax]
movups xmm0, xmmword [str.STORAGEVolume]
push 0xf
lea eax, [ebp - 0x24]
movups xmmword [ebp - 0x24], xmm0
push eax
movups xmm0, xmmword [0x5fd628]
lea eax, [ebp - 0xbc4]
push eax
movups xmmword [ebp - 0x14], xmm0
call fcn.005d1f45
add esp, 0xc
test eax, eax
jne 0x51c820
lea eax, [ebp - 0xbc4]
push eax
push str.___s
lea eax, [ebp - 0x26c]
push 0x104
push eax
call fcn.00502130
add esp, 0x10
xor eax, eax
mov word [ebp - 0x66], ax
push eax
push eax
push 3
push eax
push 3
push eax
lea eax, [ebp - 0x26c]
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x51c820
lea eax, [ebp - 0xc58]
push eax
lea eax, [ebp - 0x3c4]
push eax
lea eax, [ebp - 0x26c]
push eax
push 0
push esi
call fcn.0051c0f0
add esp, 0x14
push esi
call ebx
lea eax, [ebp - 0xc4c]
push eax
call fcn.00533150
add esp, 4
test eax, eax
jne 0x51c790
lea eax, [ebp - 0xc4c]
push eax
call fcn.00532f60
add esp, 4
mov esi, dword [0x651c64]
test esi, esi
je 0x51caa3
mov edi, dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
nop word [eax + eax]
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x51ca5c
push eax
push 0x5fd648
lea eax, [ebp - 0x26c]
push 0x104
push eax
call fcn.00502130
add esp, 0x10
jmp 0x51ca75
mov edi, dword [0x648de0]
xorps xmm0, xmm0
push 0
push 0x4000000
push 0
push 0
push 0
push 0
movups xmmword [ebp - 0x2b0], xmm0
push 0x5fcfcc
movups xmmword [ebp - 0x2a0], xmm0
mov dword [ebp - 0x290], 0
mov word [ebp - 0x28c], 0
mov byte [ebp - 0x2b0], 1
call edi
mov ebx, eax
mov dword [ebp - 0xc5c], ebx
cmp ebx, 0xffffffff
je 0x51ca51
lea eax, [esi + 1]
mov dword [ebp - 0x27c], 0x440d
mov dword [ebp - 0x288], eax
lea eax, [ebp - 0x2b0]
push 0
mov dword [ebp - 0x284], eax
lea eax, [ebp - 0xc60]
push eax
push 0x1c
lea eax, [ebp - 0x288]
mov dword [ebp - 0x280], 0x860
push eax
push 0x1c
push eax
push 1
push ebx
mov dword [ebp - 0x270], 1
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x51ca43
test byte [ebp - 0x270], 1
jne 0x51ca43
cmp byte [ebp - 0x2af], 5
jne 0x51ca43
lea eax, [esi + 1]
mov dword [ebp - 0x27c], 0x440d
mov dword [ebp - 0x288], eax
xorps xmm0, xmm0
push 0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x280], 0x86f
mov dword [ebp - 0x284], eax
lea eax, [ebp - 0xc60]
push eax
push 0x1c
lea eax, [ebp - 0x288]
mov dword [ebp - 0x270], 1
push eax
push 0x1c
push eax
push 1
movups xmmword [ebp - 0x14], xmm0
push ebx
mov byte [ebp - 0x14], 0x10
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x51ca43
test byte [ebp - 0x270], 1
jne 0x51ca43
push 0x38
call fcn.00479f06
mov edi, eax
add esp, 4
test edi, edi
je 0x51ca3d
push 0x38
push 0
push edi
call fcn.005c9220
mov eax, dword [ebp - 0xc54]
add esp, 0xc
mov word [edi + 0x12], ax
mov al, byte [ebp - 0x11]
sub al, 0x80
mov byte [edi + 0x10], al
xor eax, eax
mov ebx, dword [ebp - 0xc]
mov dword [ebp - 0xc54], eax
mov dword [edi + 4], eax
mov dword [edi], ebx
movzx eax, word [ebp - 0x2a1]
cdq
mov ecx, eax
or ecx, edx
jne 0x51ca18
mov eax, dword [ebp - 0x294]
xor edx, edx
add ebx, eax
mov eax, dword [ebp - 0xc54]
push edi
adc eax, edx
add ebx, 0xffffffff
mov dword [edi + 8], ebx
adc eax, 0xffffffff
mov dword [edi + 0xc], eax
call fcn.0051c040
mov ebx, dword [ebp - 0xc5c]
add esp, 4
mov edi, dword [0x648de0]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
jmp 0x51c663
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x51c663
movzx eax, word [esi + 0x12]
push eax
lea eax, [ebp - 0x26c]
push str.._c:_
push eax
call fcn.0047c390
add esp, 0xc
push 8
lea eax, [esi + 0x20]
push eax
lea eax, [ebp - 0xc5c]
push eax
lea eax, [ebp - 0xc54]
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x26c]
push eax
call edi
mov esi, dword [esi + 0x30]
test esi, esi
jne 0x51c860
mov ecx, dword [ebp - 0xc64]
pop edi
pop esi
pop ebx
test ecx, ecx
je 0x51cab8
mov eax, dword [ebp - 0xc58]
mov dword [ecx], eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058bb64
mov esp, ebp
pop ebp
ret
call fcn.0058c358
int3