peview: Disable resource tab hash column due to crashes inspecting vmprotected binaries
@@ -108,7 +108,7 @@ INT_PTR CALLBACK PvpPeResourcesDlgProc(
PhAddListViewColumn(lvHandle, 2, 2, 2, LVCFMT_LEFT, 80, L"Name");
PhAddListViewColumn(lvHandle, 3, 3, 3, LVCFMT_LEFT, 100, L"Size");
PhAddListViewColumn(lvHandle, 4, 4, 4, LVCFMT_LEFT, 100, L"Language");
- PhAddListViewColumn(lvHandle, 5, 5, 5, LVCFMT_LEFT, 100, L"Hash");
+ //PhAddListViewColumn(lvHandle, 5, 5, 5, LVCFMT_LEFT, 100, L"Hash");
PhSetExtendedListView(lvHandle);
PhLoadListViewColumnsFromSetting(L"ImageResourcesListViewColumns", lvHandle);
@@ -177,20 +177,21 @@ INT_PTR CALLBACK PvpPeResourcesDlgProc(
PhSetListViewSubItem(lvHandle, lvItemIndex, PVE_RESOURCES_COLUMN_INDEX_SIZE, PhaFormatSize(entry.Size, -1)->Buffer);
- if (entry.Data && entry.Size)
- {
- PH_HASH_CONTEXT hashContext;
- PPH_STRING hashString;
- UCHAR hash[32];
-
- PhInitializeHash(&hashContext, PhGetIntegerSetting(L"HashAlgorithm"));
- PhUpdateHash(&hashContext, entry.Data, entry.Size);
- PhFinalHash(&hashContext, hash, 16, NULL);
-
- hashString = PhBufferToHexString(hash, 16);
- PhSetListViewSubItem(lvHandle, lvItemIndex, PVE_RESOURCES_COLUMN_INDEX_HASH, hashString->Buffer);
- PhDereferenceObject(hashString);
- }
+ // dmex: This crashes when enumerating resources of VM protected binaries.
+ //if (entry.Data && entry.Size)
+ //{
+ // PH_HASH_CONTEXT hashContext;
+ // PPH_STRING hashString;
+ // UCHAR hash[32];
+ //
+ // PhInitializeHash(&hashContext, PhGetIntegerSetting(L"HashAlgorithm"));
+ // PhUpdateHash(&hashContext, entry.Data, entry.Size);
+ // PhFinalHash(&hashContext, hash, 16, NULL);
+ //
+ // hashString = PhBufferToHexString(hash, 16);
+ // PhSetListViewSubItem(lvHandle, lvItemIndex, PVE_RESOURCES_COLUMN_INDEX_HASH, hashString->Buffer);
+ // PhDereferenceObject(hashString);
+ //}
}
PhFree(resources.ResourceEntries);
@@ -212,10 +213,8 @@ INT_PTR CALLBACK PvpPeResourcesDlgProc(
{
PPH_LAYOUT_ITEM dialogItem;
- dialogItem = PvAddPropPageLayoutItem(hwndDlg, hwndDlg,
- PH_PROP_PAGE_TAB_CONTROL_PARENT, PH_ANCHOR_ALL);
- PvAddPropPageLayoutItem(hwndDlg, GetDlgItem(hwndDlg, IDC_LIST),
- dialogItem, PH_ANCHOR_ALL);
+ dialogItem = PvAddPropPageLayoutItem(hwndDlg, hwndDlg, PH_PROP_PAGE_TAB_CONTROL_PARENT, PH_ANCHOR_ALL);
+ PvAddPropPageLayoutItem(hwndDlg, GetDlgItem(hwndDlg, IDC_LIST), dialogItem, PH_ANCHOR_ALL);
PvDoPropPageLayout(hwndDlg);
