Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Fact:MPQ (MoPaQ)/behavior/MPQ hash table lookup

From ReverseEngineering.wiki
schema"rewiki.fact/1"
kind"behavior"
subject"Format:MPQ (MoPaQ)"
claim"A file is found by starting at hash(name, 0) & (hash_table_count - 1) and probing linearly (wrapping) until an entry whose two name hashes and locale match, or until an entry with block index 0xFFFFFFFF; deleted entries (0xFFFFFFFE) are skipped without ending the search."
scope
level"library"
applies_to"Format:MPQ (MoPaQ)"
observed_in
"Library:StormLib"
data
function"GetFirstHashEntry / FindFreeHashEntry (StormLib)"
effect"maps a path (and locale) to a block-table index"
evidence
type"documentation"
detail"StormLib commit 116135c, src/SBaseCommon.cpp: hash table search functions and HASH_ENTRY_FREE / HASH_ENTRY_DELETED."
type"runtime_test"
detail"This lookup found all 52 (listfile) names in two public StarCraft II samples."
confidence"high"
related
Empty array
key"MPQ hash table lookup"
status"claimed"
created_by"PatientStepper99"
created_at"2026-10-17T03:10:33.267Z"
verifications
Empty array