I don't have one that takes a specific object as input, but this may help. It will list out the role assignments on web, list, items for users and SharePoint groups.
Start-SPAssignment -global
$sites = Get-SPsite -limit All
foreach ($site in $sites)
{
foreach ($web in $site.allwebs)
{
Write-Host -BackgroundColor green -ForegroundColor white $web.url
$web.RoleAssignments
foreach ($list in $web.lists)
{
If ($list.HasUniqueRoleAssignments)
{
Write-Host -BackgroundColor yellow -ForegroundColor black $list.Title
$list.RoleAssignments
foreach ($item in $list.Items)
{
If ($item.HasUniqueRoleAssignments)
{
Write-Host -BackgroundColor red -ForegroundColor yellow $item.UniqueId
$item.RoleAssignments
}
}
}
}
}
}
Stop-SPAssignment -global