Function at 0x50cb40
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc8
mov eax, dword [0x6480b4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0xac], 0
mov al, byte [ebx + 1]
test al, al
je 0x50cb82
cmp al, 0x20
je 0x50cb82
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058bb64
mov esp, ebp
pop ebp
ret
push esi
push 0x64
push 0
push edi
call fcn.005c9220
add esp, 0xc
cmp dword [0x651b34], 0
je 0x50ce44
cmp word [ebx + 0x2e], 1
jne 0x50cbb7
push ebx
call fcn.0050c610
add esp, 4
mov dword [ebp - 0xb4], eax
mov esi, eax
jmp 0x50cbc0
mov esi, dword [ebx + 0x24]
mov dword [ebp - 0xb4], esi
cmp esi, 0xffffffff
je 0x50d11b
push 0x77
lea eax, [ebp - 0x7c]
push 0
push eax
call fcn.005c9220
add esp, 0xc
mov dword [ebp - 0xb8], 0
lea eax, [ebp - 0xc8]
xorps xmm0, xmm0
movups xmmword [ebp - 0xc8], xmm0
push eax
lea eax, [ebp - 0xa8]
push eax
push 0x77
lea eax, [ebp - 0x7c]
push eax
push 0
push 0
push 0x700a0
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x50cc41
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x50ccbe
lea eax, [ebp - 0xa8]
push eax
lea eax, [ebp - 0xc8]
push eax
push esi
call fcn.0050c6c0
add esp, 0xc
test eax, eax
je 0x50ccbe
cmp dword [ebp - 0xa8], 0x20
jb 0x50ccbe
mov ecx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x7c]
push 0
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x70]
push ecx
push dword [ebp - 0x60]
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x6c]
push dword [ebp - 0x64]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0xac], 1
mov word [edi], cx
mov dword [edi + 0x18], eax
call fcn.0058c810
mov ecx, dword [ebp - 0x5c]
movups xmm0, xmmword [ebp - 0x54]
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x58]
mov dword [edi + 0x14], edx
mov dword [edi + 0x1c], eax
movups xmmword [edi + 0x20], xmm0
mov eax, dword [ebp + ecx - 0x58]
mov dword [edi + 0x30], eax
movups xmm0, xmmword [ebp + ecx - 0x54]
movups xmmword [edi + 0x34], xmm0
movups xmm0, xmmword [ebp + ecx - 0x44]
movups xmmword [edi + 0x44], xmm0
movups xmm0, xmmword [ebp + ecx - 0x34]
movups xmmword [edi + 0x54], xmm0
jmp 0x50cd82
lea eax, [ebp - 0xc8]
mov dword [ebp - 0xb8], 0
push eax
lea eax, [ebp - 0xa8]
xorps xmm0, xmm0
push eax
push 0x18
lea eax, [ebp - 0x98]
push eax
push 0
push 0
push 0x70000
push esi
movups xmmword [ebp - 0xc8], xmm0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x50cd25
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x50cd82
lea eax, [ebp - 0xa8]
push eax
lea eax, [ebp - 0xc8]
push eax
push esi
call fcn.0050c6c0
add esp, 0xc
test eax, eax
je 0x50cd82
cmp dword [ebp - 0xa8], 0x18
jne 0x50cd82
mov ax, word [ebp - 0x84]
mov ecx, dword [ebp - 0x8c]
push dword [ebp - 0x94]
mov esi, dword [ebp - 0x98]
mov word [edi], ax
mov eax, dword [ebp - 0x88]
mov dword [edi + 0xc], eax
mul ecx
push esi
push edx
push eax
mov dword [ebp - 0xac], 1
mov dword [edi + 4], esi
mov dword [edi + 8], ecx
call fcn.0058c440
mov esi, dword [ebp - 0xb4]
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x90]
mov dword [edi + 0x14], edx
mov dword [edi + 0x18], eax
cmp word [ebx + 0x2e], 1
jne 0x50d030
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0xac]
test esi, esi
je 0x50d11d
mov ebx, dword [ebx + 0x24]
lea eax, [ebp - 0xc8]
push eax
lea eax, [ebp - 0xb4]
mov dword [ebp - 0xb8], 0
push eax
push 8
lea eax, [ebp - 0xb0]
xorps xmm0, xmm0
push eax
push 0
push 0
push 0x7405c
push ebx
movups xmmword [ebp - 0xc8], xmm0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x50ce14
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x50d11b
lea eax, [ebp - 0xb4]
push eax
lea eax, [ebp - 0xc8]
push eax
push ebx
call fcn.0050c6c0
add esp, 0xc
test eax, eax
je 0x50d11b
movzx eax, word [edi]
cdq
push edx
push eax
push dword [ebp - 0xac]
push dword [ebp - 0xb0]
call fcn.0058c810
mov dword [edi + 0x10], eax
mov eax, esi
pop esi
mov dword [edi + 0x14], edx
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058bb64
mov esp, ebp
pop ebp
ret
cmp byte [ebx + 1], 0x20
jne 0x50d049
lea eax, [ebp - 0xa4]
push eax
movzx eax, byte [ebx + 0x2c]
push 1
push eax
call fcn.00519130
add esp, 0xc
test eax, eax
je 0x50d11b
mov ax, word [ebp - 0x9d]
mov dword [ebp - 0xac], 1
test ax, ax
jne 0x50ce87
mov eax, 0x200
mov bx, word [ebp - 0x90]
mov cx, word [ebp - 0x95]
movzx edx, word [ebp - 0xa0]
mov word [edi], ax
movzx eax, word [ebp - 0x8e]
movzx esi, bx
mov dword [edi + 4], edx
mov dword [edi + 8], eax
mov dword [edi + 0xc], esi
mov dword [edi + 0x14], 0
test cx, cx
je 0x50cec3
movzx eax, cx
jmp 0x50ced8
mov ecx, dword [ebp - 0x88]
test ecx, ecx
je 0x50ced2
mov dword [edi + 0x10], ecx
jmp 0x50cedb
imul eax, edx
imul eax, esi
mov dword [edi + 0x10], eax
movzx eax, byte [ebp - 0x93]
xor ecx, ecx
add eax, 0xffffff10
cmp eax, 0xf
ja case.0x50cef9.241
movzx eax, byte [eax + 0x50d154]
jmp dword [eax*4 + 0x50d130]
cmp byte [ebp - 0xa3], 1
jne 0x50cf2a
mov esi, dword [ebp - 0xac]
mov ecx, 1
mov eax, esi
mov dword [edi + 0x18], ecx
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058bb64
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0xac]
mov ax, 0x12
cmp ax, bx
mov eax, esi
pop esi
sbb ecx, ecx
neg ecx
add ecx, 2
mov dword [edi + 0x18], ecx
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058bb64
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0xac]
mov ecx, 0xc
mov eax, esi
mov dword [edi + 0x18], ecx
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058bb64
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0xac]
xor ecx, ecx
cmp byte [ebp - 0xa3], 1
mov eax, esi
pop esi
setne cl
lea ecx, [ecx*4 + 1]
mov dword [edi + 0x18], ecx
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058bb64
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0xac]
mov ecx, 7
mov eax, esi
mov dword [edi + 0x18], ecx
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058bb64
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0xac]
mov ecx, 0xe
mov eax, esi
mov dword [edi + 0x18], ecx
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058bb64
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0xac]
mov ecx, 9
mov eax, esi
mov dword [edi + 0x18], ecx
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058bb64
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0xac]
mov ecx, 6
mov eax, esi
mov dword [edi + 0x18], ecx
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058bb64
mov esp, ebp
pop ebp
ret
mov ecx, 0xa
mov dword [edi + 0x18], ecx
mov esi, dword [ebp - 0xac]
mov eax, esi
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058bb64
mov esp, ebp
pop ebp
ret
mov eax, 0x1e
mov dword [ebp - 0x82], 0
push eax
mov word [ebp - 0x9c], ax
xorps xmm0, xmm0
lea eax, [ebp - 0x9c]
movlpd qword [ebp - 0x9a], xmm0
push eax
mov al, byte [ebx + 0x28]
sub al, 0x80
movlpd qword [ebp - 0x92], xmm0
movzx eax, al
push eax
movlpd qword [ebp - 0x8a], xmm0
call dword [0x651b48]
test eax, eax
je 0x50d11b
mov ebx, dword [ebp - 0x90]
mov esi, 1
mov edx, dword [ebp - 0x94]
mov ecx, ebx
shr ecx, 0x10
test ecx, ecx
je 0x50d0cc
mov eax, ecx
shr edx, 0x18
mov ebx, ecx
and eax, 0xc0
shr ecx, 8
inc edx
and ebx, 0x3f
lea ecx, [ecx + eax*4]
inc ecx
jmp 0x50d0d2
mov ecx, dword [ebp - 0x98]
mov ax, word [ebp - 0x84]
test ax, ax
jne 0x50d0e3
mov eax, 0x200
mov dword [edi + 4], ecx
mov ecx, dword [ebp - 0x8c]
mov word [edi], ax
mov eax, esi
mov dword [edi + 0x10], ecx
mov ecx, dword [ebp - 0x88]
pop esi
mov dword [edi + 0xc], ebx
mov dword [edi + 8], edx
mov dword [edi + 0x14], ecx
mov dword [edi + 0x18], 0xc
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058bb64
mov esp, ebp
pop ebp
ret
xor esi, esi
mov ecx, dword [ebp - 4]
mov eax, esi
pop esi
pop edi
xor ecx, ebp
pop ebx
call fcn.0058bb64
mov esp, ebp
pop ebp
ret