Function at 0x510680
Capabilities:
Get disk information

Disassembly:
push ebp
lea ebp, [esp - 0x20c]
sub esp, 0x20c
push 0xffffffffffffffff
push 0x5c5577
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x72b01c]
xor eax, ebp
mov dword [ebp + 0x208], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0x214]
mov ecx, dword [ebp + 0x218]
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x30], 0
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 8], 0
lea eax, [ebp - 0x2c]
mov dword [ebp - 4], 0
push eax
mov dword [ebp - 0x30], 1
call fcn.00508e40
push 0
push 0x2200000
push 3
push 0
push 7
push 8
mov ecx, eax
mov dword [ebp - 4], 1
call fcn.00496d70
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [ebp - 0x2c]
mov esi, eax
or ebx, 0xffffffff
mov dword [ebp - 0x20], esi
mov byte [ebp - 4], 0
test ecx, ecx
je 0x510750
mov eax, ebx
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x510750
push 4
push 2
push dword [ebp - 0x2c]
call fcn.0045fe90
add esp, 0xc
cmp esi, 0xffffffff
je 0x510ad4
push 0x4000
call fcn.0059a128
mov esi, eax
add esp, 4
test esi, esi
je 0x510af9
push 0
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x3c], 0
push eax
push 0x4000
push esi
push 0
push 0
push 0x900a8
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x510895
mov eax, dword [esi]
cmp eax, 0xa0000003
jne 0x5107ea
movzx eax, word [esi + 8]
movzx ecx, word [esi + 0xa]
shr eax, 1
add eax, 8
shr ecx, 1
push ecx
lea eax, [esi + eax*2]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.004b4d80
mov ecx, dword [edi]
mov edx, eax
add esp, 0xc
mov eax, dword [edx]
mov dword [edi], eax
mov eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [edi + 4]
mov dword [edi + 4], eax
mov eax, dword [edx + 8]
mov dword [edx + 4], ecx
mov ecx, dword [edi + 8]
mov dword [edi + 8], eax
mov dword [edx + 8], ecx
jmp 0x510819
cmp eax, 0xa000000c
jne 0x510821
movzx eax, word [esi + 8]
movzx ecx, word [esi + 0xa]
shr eax, 1
add eax, 0xa
shr ecx, 1
push ecx
lea eax, [esi + eax*2]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.004b4d80
add esp, 0xc
mov ecx, edi
push eax
call fcn.004029a0
lea ecx, [ebp - 0x18]
call fcn.004019e0
mov edx, dword [edi]
sub esp, 0xc
mov ecx, esp
mov dword [ecx], edx
mov eax, dword [edi + 4]
mov dword [ecx + 4], eax
mov eax, dword [edi + 8]
mov dword [ecx + 8], eax
test edx, edx
je 0x510843
mov eax, 1
lock xadd dword [edx], eax
lea eax, [ebp - 0x18]
push eax
call fcn.00508fa0
mov ecx, dword [edi]
mov edx, eax
add esp, 0x10
mov eax, dword [edx]
mov dword [edi], eax
mov eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [edi + 4]
mov dword [edi + 4], eax
mov eax, dword [edx + 8]
mov dword [edx + 4], ecx
mov ecx, dword [edi + 8]
mov dword [edi + 8], eax
mov dword [edx + 8], ecx
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x510895
mov eax, ebx
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x510895
push 4
push 2
push ecx
call fcn.0045fe90
add esp, 0xc
push esi
call fcn.0059a133
add esp, 4
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0x72e618
call fcn.0050cc70
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
push str.Volume__a_z__0_9____
lea eax, [ebp - 0x2c]
mov dword [ebp - 4], 2
push 0x1d
push eax
call fcn.00491f10
mov edx, dword [ebp - 0x18]
add esp, 0xc
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x28], ecx
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x30], 3
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x24], ecx
test edx, edx
je 0x51092c
mov eax, ebx
lock xadd dword [edx], eax
cmp eax, 1
setne al
test al, al
jne 0x51092c
push 4
push 2
push edx
call fcn.0045fe90
add esp, 0xc
push ecx
mov eax, esp
mov dword [ebp - 4], 3
lea ecx, [ebp - 0x38]
mov dword [eax], 1
lea eax, [ebp - 0x18]
push eax
call fcn.004eb840
mov ecx, dword [ebp - 0x18]
mov byte [ebp - 4], 5
test ecx, ecx
je 0x510970
mov eax, ebx
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x510970
push 4
push 2
push ecx
call fcn.0045fe90
add esp, 0xc
push ecx
mov eax, esp
lea ecx, [ebp - 0x38]
push 0
push 0
push edi
mov dword [eax], 0
lea eax, [ebp - 0x1c]
push eax
call fcn.004ecb80
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 6
call fcn.004ecb70
test al, al
je 0x510ac4
push 0
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004ec1f0
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x14], 4
mov dword [ebp - 0x10], 0x664f5c
mov eax, dword [eax + 8]
lea ecx, [ebp - 0x2c]
add eax, 4
mov byte [ebp - 4], 8
push 0
push eax
call fcn.0048d840
mov eax, dword [ebp - 0x28]
mov esi, 0x5e2da0
test eax, eax
cmovne esi, eax
push esi
push 0x664f5c
push 4
call fcn.0048eb90
mov eax, 4
add esp, 0xc
lea esi, [esi + eax*2]
mov eax, dword [ebp - 0x20]
mov edx, dword [eax + 8]
test edx, edx
je 0x510a1c
mov eax, dword [eax + 4]
mov ecx, 0x5e2da0
test eax, eax
cmovne ecx, eax
lea eax, [edx + edx]
push eax
push ecx
push esi
call fcn.00597bd0
add esp, 0xc
mov dword [ebp - 4], 7
mov dword [ebp - 0x30], 7
mov ecx, dword [ebp - 0x4c]
mov byte [ebp - 4], 0xa
test ecx, ecx
je 0x510a52
mov eax, ebx
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x510a52
push 4
push 2
push ecx
call fcn.0045fe90
add esp, 0xc
lea eax, [ebp - 0x34]
push eax
push 0x104
lea eax, [ebp]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00496d70
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumePathNamesForVolumeNameW]
test eax, eax
je 0x510aa7
push 0xffffffffffffffff
lea eax, [ebp]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.004b4d80
add esp, 0xc
mov esi, eax
push 0
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0xb
call fcn.004ec220
push esi
push eax
push 0
mov ecx, edi
call fcn.004948f0
lea ecx, [ebp - 0x58]
call fcn.004019e0
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x510ac4
lock xadd dword [eax], ebx
cmp ebx, 1
jne 0x510ac4
push 4
push 2
push eax
call fcn.0045fe90
add esp, 0xc
lea ecx, [ebp - 0x1c]
call fcn.004eba10
lea ecx, [ebp - 0x38]
call fcn.004eb9f0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x208]
xor ecx, ebp
call fcn.00594d69
lea esp, [ebp + 0x20c]
pop ebp
ret
call fcn.0049e4c0
int3