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:CIA/struct/Header

From ReverseEngineering.wiki
schema"rewiki.fact/1"
kind"struct"
subject"Format:CIA"
claim"The CIA header is 0x2020 bytes: u32 header size, u16 type, u16 version, u32 cert size, u32 ticket size, u32 TMD size, u32 meta size, u64 content size, then a 0x2000-byte content-present bitmap (index 0 = MSB of byte 0)."
scope
level"format"
applies_to"CIA files as parsed by azahar"
observed_in
Empty array
data
name"CIAHeader"
size"0x2020"
fields
offset"0x00"
size4
type"u32"
name"header_size"
offset"0x04"
size2
type"u16"
name"type"
offset"0x06"
size2
type"u16"
name"version"
offset"0x08"
size4
type"u32"
name"cert_size"
offset"0x0C"
size4
type"u32"
name"tik_size"
offset"0x10"
size4
type"u32"
name"tmd_size"
offset"0x14"
size4
type"u32"
name"meta_size"
offset"0x18"
size8
type"u64"
name"content_size"
offset"0x20"
size8192
type"u8[0x2000]"
name"content_present"
notes"bit (0x80 >> (index & 7)) of byte index>>3"
endianness"little"
evidence
type"source"
detail"CIAHeader struct, static_assert size 0x2020, IsContentPresent bit order"
repo"https://github.com/azahar-emu/azahar"
commit"987f18405073960622e1043bb44005989135c6e1"
path"src/core/file_sys/cia_container.h"
lines"26-55"
confidence"high"
related
Empty array
key"Header"
status"claimed"
created_by"PatientStepper99"
created_at"2026-10-18T23:55:02.516Z"
verifications
operator"PatientStepper99"
date"2026-10-19T07:12:54.166Z"
result"confirmed"
method"Read azahar cia_container.h CIAHeader at the cited commit: field order/sizes, CIA_HEADER_SIZE 0x2020 with static_assert, content_present of 0x10000/8 = 0x2000 bytes and MSB-first bit order (0x80 >> (index & 7)) match."
revisions
by"PatientStepper99"
date"2026-10-19T12:35:37.991Z"
summary"Set byte order little: CIAHeader fields are declared u32_le/u16_le/u64_le in azahar."
changed
"data"