OUTLOOK.PST(5)
π OUTLOOK.PST π β the libpst Utilities - Version 0.6 era, bestie
okay so this is the manual page for outlook.pst, section 5 of the manual. it's giving "deep lore" energy and honestly? it's a lot. but we're gonna get through it together, no cap. π«Ά
β¨ NAME β¨
outlook.pst β the format of an MS Outlook .pst file π
πΈ SYNOPSIS πΈ
outlook.pst
π¦ OVERVIEW π¦
so. the low-level, like primitive items inside a .pst file? those are ID'd by an I_ID value. the higher-level, composite items? those get a D_ID value instead. two different kinds of clout, basically. π
and there are two separate b-trees, one indexed by the I_ID values and one indexed by the D_ID values. two trees. iconic behavior honestly.
here's the plot twist tho: starting with Outlook 2003, the file format switched from 32 bit pointers to 64 bit pointers. glow-up fr fr. so we're describing both formats here, because of course we are. π
π 32 BIT FILE HEADER π
the 32 bit file header lives at offset 0 in the .pst file. home sweet home.
0000 21 42 44 4e 49 f8 64 d9 53 4d 0e 00 13 00 01 01
0010 00 00 00 00 00 00 00 00 50 d6 03 00 bd 1e 02 00
0020 08 4c 00 00 00 04 00 00 00 04 00 00 0f 04 00 00
0030 0d 40 00 00 99 0a 01 00 18 04 00 00 0d 40 00 00
0040 0d 40 00 00 11 80 00 00 02 04 00 00 0a 04 00 00
0050 00 04 00 00 00 04 00 00 0f 04 00 00 0f 04 00 00
0060 0f 04 00 00 0d 40 00 00 00 04 00 00 00 04 00 00
0070 04 40 00 00 00 04 00 00 00 04 00 00 00 04 00 00
0080 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00
0090 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00
00a0 0c 09 00 00 00 00 00 00 00 04 27 00 00 24 23 00
00b0 c0 09 0a 00 00 c8 00 00 bc 1e 02 00 00 7e 0c 00
00c0 b4 1e 02 00 00 54 00 00 01 00 00 00 23 55 44 d1
00d0 5a 4f ce 6b 80 ff ff ff 00 00 00 00 00 00 00 00
00e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0140 00 00 00 00 00 00 00 00 00 00 00 00 3f ff ff ff
0150 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0160 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0170 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0180 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0190 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
01a0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
01b0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
01c0 ff ff ff ff ff ff ff ff ff ff ff ff 80 01 00 00
01d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
and here's the β¨ annotated β¨ version, the field-by-field tea:
0000 signature [4 bytes] 0x4e444221 constant
000a indexType [1 byte] 0x0e constant
01cd encryptionType [1 byte] 0x01 in this case
00a8 total file size [4 bytes] 0x270400 in this case
00c0 backPointer1 [4 bytes] 0x021eb4 in this case
00c4 offsetIndex1 [4 bytes] 0x005400 in this case
00b8 backPointer2 [4 bytes] 0x021ebc in this case
00bc offsetIndex2 [4 bytes] 0x0c7e00 in this case
okay now the important part, bestie, listen up. we only support index types 0x0e, 0x0f, 0x15, and 0x17, and encryption types 0x00, 0x01 and 0x02. that's the whole list. no extras. π
- index type
0x0eis the older 32 bit Outlook format. - index type
0x0fseems to be rare, and so far the data looks identical to what's in0x0efiles. like, same data, different font. - index type
0x17is the newer 64 bit Outlook format. - index type
0x15seems to be rare too, and according to the libpff project it should have the same format as0x17files. it was found in a 64-bit pst file created by Visual Recovery.
and here's a little theory: it may be that index types less than 0x10 are 32 bit, and index types greater than or equal to 0x10 are 64 bit, and the low order four bits of the index type is some subtype or minor version number. cute little encoded family tree honestly. π
now the encryption types:
- encryption type
0x00is no encryption. living dangerously, nothing hidden. - encryption type
0x01is "compressible" encryption, which is a simple substitution cipher. - encryption type
0x02is "strong" encryption, which is a simple three rotor Enigma cipher from WWII. yes, that Enigma. we're doing history now. π
okay and the pointers:
offsetIndex1is the file offset of the root of the index1 b-tree, which holds(I_ID, offset, size, unknown)tuples for each item in the file.backPointer1is the value that should appear in the parent pointer of that root node.offsetIndex2is the file offset of the root of the index2 b-tree, which holds(D_ID, DESC-I_ID, TREE-I_ID, PARENT-D_ID)tuples for each item in the file.backPointer2is the value that should appear in the parent pointer of that root node.
π₯ 64 BIT FILE HEADER π₯
the 64 bit file header also lives at offset 0 in the .pst file. same address, different era. β
0000 21 42 44 4e 03 02 23 b2 53 4d 17 00 13 00 01 01
0010 00 00 00 00 00 00 00 00 04 00 00 00 01 00 00 00
0020 8b 00 00 00 00 00 00 00 1d 00 00 00 00 04 00 00
0030 00 04 00 00 04 04 00 00 00 40 00 00 02 00 01 00
0040 00 04 00 00 00 04 00 00 00 04 00 00 00 80 00 00
0050 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00
0060 04 04 00 00 04 04 00 00 04 04 00 00 00 04 00 00
0070 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00
0080 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00
0090 00 04 00 00 00 04 00 00 00 04 00 00 00 04 00 00
00a0 00 04 00 00 00 04 00 00 02 04 00 00 00 00 00 00
00b0 00 00 00 00 00 00 00 00 00 24 04 00 00 00 00 00
00c0 00 44 00 00 00 00 00 00 00 71 03 00 00 00 00 00
00d0 00 22 00 00 00 00 00 00 83 00 00 00 00 00 00 00
00e0 00 6a 00 00 00 00 00 00 8a 00 00 00 00 00 00 00
00f0 00 60 00 00 00 00 00 00 01 00 00 00 00 00 00 00
0100 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0180 7f ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0190 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
01a0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
01b0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
01c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
01d0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
01e0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
01f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0200 80 00 00 00 e8 00 00 00 00 00 00 00 c4 68 cb 89
and the field breakdown, because we stay organized in this house:
0000 signature [4 bytes] 0x4e444221 constant
000a indexType [1 byte] 0x17 constant
0201 encryptionType [1 byte] 0x00 in this case
00b8 total file size [8 bytes] 0x042400 in this case
00e8 backPointer1 [8 bytes] 0x00008a in this case
00f0 offsetIndex1 [8 bytes] 0x006000 in this case
00d8 backPointer2 [8 bytes] 0x000083 in this case
00e0 offsetIndex2 [8 bytes] 0x006a00 in this case
π 32 BIT INDEX 1 NODE π
the 32 bit index1 b-tree nodes are 512 byte blocks and they look like this:
0000 04 00 00 00 8a 1e 02 00 00 1c 0b 00
000c 58 27 03 00 b3 1e 02 00 00 52 00 00
0018 00 00 00 00 00 00 00 00 00 00 00 00
0024 00 00 00 00 00 00 00 00 00 00 00 00
0030 00 00 00 00 00 00 00 00 00 00 00 00
003c 00 00 00 00 00 00 00 00 00 00 00 00
0048 00 00 00 00 00 00 00 00 00 00 00 00
0054 00 00 00 00 00 00 00 00 00 00 00 00
0060 00 00 00 00 00 00 00 00 00 00 00 00
006c 00 00 00 00 00 00 00 00 00 00 00 00
0078 00 00 00 00 00 00 00 00 00 00 00 00
0084 00 00 00 00 00 00 00 00 00 00 00 00
0090 00 00 00 00 00 00 00 00 00 00 00 00
009c 00 00 00 00 00 00 00 00 00 00 00 00
00a8 00 00 00 00 00 00 00 00 00 00 00 00
00b4 00 00 00 00 00 00 00 00 00 00 00 00
00c0 00 00 00 00 00 00 00 00 00 00 00 00
00cc 00 00 00 00 00 00 00 00 00 00 00 00
00d8 00 00 00 00 00 00 00 00 00 00 00 00
00e4 00 00 00 00 00 00 00 00 00 00 00 00
00f0 00 00 00 00 00 00 00 00 00 00 00 00
00fc 00 00 00 00 00 00 00 00 00 00 00 00
0108 00 00 00 00 00 00 00 00 00 00 00 00
0114 00 00 00 00 00 00 00 00 00 00 00 00
0120 00 00 00 00 00 00 00 00 00 00 00 00
012c 00 00 00 00 00 00 00 00 00 00 00 00
0138 00 00 00 00 00 00 00 00 00 00 00 00
0144 00 00 00 00 00 00 00 00 00 00 00 00
0150 00 00 00 00 00 00 00 00 00 00 00 00
015c 00 00 00 00 00 00 00 00 00 00 00 00
0168 00 00 00 00 00 00 00 00 00 00 00 00
0174 00 00 00 00 00 00 00 00 00 00 00 00
0180 00 00 00 00 00 00 00 00 00 00 00 00
018c 00 00 00 00 00 00 00 00 00 00 00 00
0198 00 00 00 00 00 00 00 00 00 00 00 00
01a4 00 00 00 00 00 00 00 00 00 00 00 00
01b0 00 00 00 00 00 00 00 00 00 00 00 00
01bc 00 00 00 00 00 00 00 00 00 00 00 00
01c8 00 00 00 00 00 00 00 00 00 00 00 00
01d4 00 00 00 00 00 00 00 00 00 00 00 00
01e0 00 00 00 00 00 00 00 00 00 00 00 00
01ec 00 00 00 00 02 29 0c 02 80 80 b6 4a
01f8 b4 1e 02 00 27 9c cc 56
and the fields, one more time with feeling:
01f0 itemCount [1 byte] 0x02 in this case
01f1 maxItemCount [1 byte] 0x29 constant
01f2 itemSize [1 byte] 0x0c constant
01f3 nodeLevel [1 byte] 0x02 in this case
01f8 backPointer [4 bytes] 0x021eb4 in this case
so what do these actually mean, bestie:
itemCounttells you the number of 12 byte records that are active.nodeLevelis non-zero for this style of nodes. the leaf nodes have a different format, so don't get it twisted. πbackPointermust match thebackPointerfrom the triple that pointed to this node. it's a matching-sets situation, it has to line up.
and each item in this node is a triple of (I_ID, backPointer, offset) where:
- the
offsetpoints to the next deeper node in the tree, - the
backPointervalue must match thebackPointerin that deeper node, - and
I_IDis the lowestI_IDvalue in the subtree. the littlest one. the baby of the family. π₯Ί
πΈ 64 BIT INDEX 1 NODE πΈ
okay bestie so the 64 bit index1 b-tree nodes are 512 byte blocks, and their format is literally this:
0000 04 00 00 00 00 00 00 00 88 00 00 00
000C 00 00 00 00 00 48 00 00 00 00 00 00
0018 74 00 00 00 00 00 00 00 86 00 00 00
0024 00 00 00 00 00 54 00 00 00 00 00 00
0030 00 00 00 00 00 00 00 00 00 00 00 00
003C 00 00 00 00 00 00 00 00 00 00 00 00
0048 00 00 00 00 00 00 00 00 00 00 00 00
0054 00 00 00 00 00 00 00 00 00 00 00 00
0060 00 00 00 00 00 00 00 00 00 00 00 00
006C 00 00 00 00 00 00 00 00 00 00 00 00
0078 00 00 00 00 00 00 00 00 00 00 00 00
0084 00 00 00 00 00 00 00 00 00 00 00 00
0090 00 00 00 00 00 00 00 00 00 00 00 00
009C 00 00 00 00 00 00 00 00 00 00 00 00
00A8 00 00 00 00 00 00 00 00 00 00 00 00
00B4 00 00 00 00 00 00 00 00 00 00 00 00
00C0 00 00 00 00 00 00 00 00 00 00 00 00
00CC 00 00 00 00 00 00 00 00 00 00 00 00
00D8 00 00 00 00 00 00 00 00 00 00 00 00
00E4 00 00 00 00 00 00 00 00 00 00 00 00
00F0 00 00 00 00 00 00 00 00 00 00 00 00
00FC 00 00 00 00 00 00 00 00 00 00 00 00
0108 00 00 00 00 00 00 00 00 00 00 00 00
0114 00 00 00 00 00 00 00 00 00 00 00 00
0120 00 00 00 00 00 00 00 00 00 00 00 00
012C 00 00 00 00 00 00 00 00 00 00 00 00
0138 00 00 00 00 00 00 00 00 00 00 00 00
0144 00 00 00 00 00 00 00 00 00 00 00 00
0150 00 00 00 00 00 00 00 00 00 00 00 00
015C 00 00 00 00 00 00 00 00 00 00 00 00
0168 00 00 00 00 00 00 00 00 00 00 00 00
0174 00 00 00 00 00 00 00 00 00 00 00 00
0180 00 00 00 00 00 00 00 00 00 00 00 00
018C 00 00 00 00 00 00 00 00 00 00 00 00
0198 00 00 00 00 00 00 00 00 00 00 00 00
01A4 00 00 00 00 00 00 00 00 00 00 00 00
01B0 00 00 00 00 00 00 00 00 00 00 00 00
01BC 00 00 00 00 00 00 00 00 00 00 00 00
01C8 00 00 00 00 00 00 00 00 00 00 00 00
01D4 00 00 00 00 00 00 00 00 00 00 00 00
01E0 00 00 00 00 00 00 00 00 02 14 18 01
01EC 00 00 00 00 80 80 8a 60 68 e5 b5 19
01F8 8a 00 00 00 00 00 00 00
and the fields at the tail end are giving:
01e8 itemCount [1 byte] 0x02 in this case
01e9 maxItemCount [1 byte] 0x14 constant
01ea itemSize [1 byte] 0x18 constant
01eb nodeLevel [1 byte] 0x01 in this case
01f8 backPointer [8 bytes] 0x00008a in this case
so itemCount tells you how many 24 byte records are actually active rn. the nodeLevel is non-zero for this style of node β key detail, bestie. the leaf nodes have a different format (we get to those in a sec π«Ά). and the backPointer has to match the backPointer from the triple that pointed to this node. no mismatches allowed, it's giving strict π
.
each item in this node is a triple of (I_ID, backPointer, offset), where:
- the
offsetpoints to the next deeper node in the tree - the
backPointervalue must match thebackPointerin that deeper node I_IDis the lowestI_IDvalue in the subtree
periodt. that's the whole vibe of this node.
π¦ 32 BIT INDEX 1 LEAF NODE π¦
now the 32 bit index1 b-tree leaf nodes β also 512 byte blocks, and they look like:
0000 04 00 00 00 00 58 00 00 64 00 0f 00
000c 08 00 00 00 80 58 00 00 ac 00 06 00
0018 0c 00 00 00 40 59 00 00 ac 00 06 00
0024 10 00 00 00 00 5a 00 00 bc 00 03 00
0030 14 00 00 00 00 5b 00 00 a4 00 02 00
003c 18 00 00 00 c0 5b 00 00 64 00 02 00
0048 1c 00 00 00 40 5c 00 00 5c 00 02 00
0054 50 00 00 00 80 62 00 00 60 00 02 00
0060 74 00 00 00 00 77 00 00 5e 00 02 00
006c 7c 00 00 00 80 77 00 00 66 00 02 00
0078 84 00 00 00 00 76 00 00 ca 00 02 00
0084 88 00 00 00 00 63 00 00 52 00 02 00
0090 90 00 00 00 00 79 00 00 58 00 02 00
009c cc 00 00 00 c0 61 00 00 76 00 02 00
00a8 e0 00 00 00 00 61 00 00 74 00 02 00
00b4 f4 00 00 00 80 65 00 00 6e 00 02 00
00c0 8c 01 00 00 40 60 00 00 70 00 02 00
00cc ea 01 00 00 80 61 00 00 10 00 02 00
00d8 ec 01 00 00 40 8a 00 00 f3 01 02 00
00e4 f0 01 00 00 80 93 00 00 f4 1f 02 00
00f0 fa 01 00 00 c0 7f 00 00 10 00 02 00
00fc 00 02 00 00 00 89 00 00 34 01 02 00
0108 1c 02 00 00 40 ec 00 00 12 06 02 00
0114 22 02 00 00 00 84 00 00 10 00 02 00
0120 24 02 00 00 c0 ea 00 00 3c 01 02 00
012c 40 02 00 00 00 f4 00 00 0a 06 02 00
0138 46 02 00 00 40 8c 00 00 10 00 02 00
0144 48 02 00 00 80 f2 00 00 36 01 02 00
0150 64 02 00 00 80 fb 00 00 bf 07 02 00
015c 6a 02 00 00 80 63 00 00 10 00 02 00
0168 6c 02 00 00 40 fa 00 00 2a 01 02 00
0174 6c 02 00 00 40 fa 00 00 2a 01 02 00
0180 6c 02 00 00 40 fa 00 00 2a 01 02 00
018c 6c 02 00 00 40 fa 00 00 2a 01 02 00
0198 6c 02 00 00 40 fa 00 00 2a 01 02 00
01a4 6c 02 00 00 40 fa 00 00 2a 01 02 00
01b0 64 02 00 00 80 fb 00 00 bf 07 02 00
01bc 64 02 00 00 80 fb 00 00 bf 07 02 00
01c8 64 02 00 00 80 fb 00 00 bf 07 02 00
01d4 64 02 00 00 80 fb 00 00 bf 07 02 00
01e0 64 02 00 00 80 fb 00 00 bf 07 02 00
01ec 00 00 00 00 1f 29 0c 00 80 80 5b b3
01f8 5a 67 01 00 4f ae 70 a7
and the field rundown:
01f0 itemCount [1 byte] 0x1f in this case
01f1 maxItemCount [1 byte] 0x29 constant
01f2 itemSize [1 byte] 0x0c constant
01f3 nodeLevel [1 byte] 0x00 defines a leaf node
01f8 backPointer [4 bytes] 0x01675a in this case
so itemCount = how many 12 byte records are active. nodeLevel is zero for these leaf nodes β that's literally what defines a leaf node here. and yeah, backPointer must match the backPointer from the triple that pointed at this node. same rule as before, no exceptions π
.
each item in this node is a tuple of (I_ID, offset, size, unknown). and ooooh the tea on I_ID: the two low order bits of the I_ID value seem to be flags.
- I've never seen a case with bit zero set π
- bit one means the item is not encrypted β¨
heads up bestie: references to these I_ID values elsewhere may have the low order bit set (and no, I don't know what that means either π), but when we do the search in this tree we need to clear that bit so we can find the correct item. fr fr, don't skip that part.
π 64 BIT INDEX 1 LEAF NODE π
and now the 64 bit index1 b-tree leaf nodes β 512 byte blocks, format is this:
0000 04 00 00 00 00 00 00 00 00 58 00 00
000C 00 00 00 00 6c 00 05 00 00 00 00 00
0018 08 00 00 00 00 00 00 00 80 58 00 00
0024 00 00 00 00 b4 00 06 00 d8 22 37 08
0030 0c 00 00 00 00 00 00 00 80 59 00 00
003C 00 00 00 00 ac 00 07 00 d8 22 37 08
0048 10 00 00 00 00 00 00 00 40 5a 00 00
0054 00 00 00 00 bc 00 03 00 d8 22 37 08
0060 14 00 00 00 00 00 00 00 40 5b 00 00
006C 00 00 00 00 a4 00 02 00 d8 22 37 08
0078 18 00 00 00 00 00 00 00 00 5c 00 00
0084 00 00 00 00 64 00 02 00 d8 22 37 08
0090 1c 00 00 00 00 00 00 00 80 5c 00 00
009C 00 00 00 00 5c 00 02 00 d8 22 37 08
00A8 24 00 00 00 00 00 00 00 80 5d 00 00
00B4 00 00 00 00 72 00 02 00 d8 22 37 08
00C0 34 00 00 00 00 00 00 00 00 70 00 00
00CC 00 00 00 00 8c 00 02 00 00 0d 00 00
00D8 38 00 00 00 00 00 00 00 c0 71 00 00
00E4 00 00 00 00 5c 00 02 00 d8 22 9c 00
00F0 40 00 00 00 00 00 00 00 40 72 00 00
00FC 00 00 00 00 26 00 02 00 d8 22 9c 00
0108 4c 00 00 00 00 00 00 00 80 5f 00 00
0114 00 00 00 00 3e 00 02 00 d8 22 9c 00
0120 5c 00 00 00 00 00 00 00 c0 76 00 00
012C 00 00 00 00 8c 00 02 00 d8 22 9c 00
0138 64 00 00 00 00 00 00 00 40 75 00 00
0144 00 00 00 00 76 00 02 00 d8 22 9c 00
0150 6c 00 00 00 00 00 00 00 c0 73 00 00
015C 00 00 00 00 5e 00 02 00 d8 22 9c 00
0168 70 00 00 00 00 00 00 00 80 72 00 00
0174 00 00 00 00 1e 01 02 00 d8 22 9c 00
0180 70 00 00 00 00 00 00 00 80 72 00 00
018C 00 00 00 00 1e 01 02 00 d8 22 9c 00
0198 70 00 00 00 00 00 00 00 80 72 00 00
01A4 00 00 00 00 1e 01 02 00 d8 22 9c 00
01B0 74 00 00 00 00 00 00 00 40 74 00 00
01BC 00 00 00 00 e0 00 02 00 d8 22 9c 00
01C8 7c 00 00 00 00 00 00 00 80 77 00 00
01D4 00 00 00 00 dc 00 02 00 d8 22 9c 00
01E0 00 00 00 00 00 00 00 00 10 14 18 00
01EC 00 00 00 00 80 80 88 48 3f 50 0b 04
01F8 88 00 00 00 00 00 00 00
fields, as always:
01e8 itemCount [1 byte] 0x10 in this case
01e9 maxItemCount [1 byte] 0x14 constant
01ea itemSize [1 byte] 0x18 constant
01eb nodeLevel [1 byte] 0x00 defines a leaf node
01f8 backPointer [8 bytes] 0x000088 in this case
itemCount = number of active 24 byte records. nodeLevel is zero for these leaf nodes (again, that's the leaf giveaway). and yes β the backPointer must match the backPointer from the triple that pointed to this node. every. single. time.
each item in this node is a tuple of (I_ID, offset, size, unknown). and the I_ID tea is the exact same as the 32 bit leaf, so I'm repeating it because it MATTERS: the two low order bits of the I_ID value seem to be flags. I've never seen a case with bit zero set π. Bit one indicates that the item is not encrypted β¨.
and once more, for the people in the back: references to these I_ID values elsewhere may have the low order bit set (and I don't know what that means either, bestie π), but when we do the search in this tree we need to clear that bit so we can find the correct item. clearing it is non-negotiable, iykyk π
π¦ 32 BIT INDEX 2 NODE π¦
okay bestie, so the 32 bit index2 b-tree nodes are 512 byte blocks and they look like this:
0000 21 00 00 00 bb 1e 02 00 00 e2 0b 00
000c 64 78 20 00 8c 1e 02 00 00 dc 0b 00
0018 00 00 00 00 00 00 00 00 00 00 00 00
0024 00 00 00 00 00 00 00 00 00 00 00 00
0030 00 00 00 00 00 00 00 00 00 00 00 00
003c 00 00 00 00 00 00 00 00 00 00 00 00
0048 00 00 00 00 00 00 00 00 00 00 00 00
0054 00 00 00 00 00 00 00 00 00 00 00 00
0060 00 00 00 00 00 00 00 00 00 00 00 00
006c 00 00 00 00 00 00 00 00 00 00 00 00
0078 00 00 00 00 00 00 00 00 00 00 00 00
0084 00 00 00 00 00 00 00 00 00 00 00 00
0090 00 00 00 00 00 00 00 00 00 00 00 00
009c 00 00 00 00 00 00 00 00 00 00 00 00
00a8 00 00 00 00 00 00 00 00 00 00 00 00
00b4 00 00 00 00 00 00 00 00 00 00 00 00
00c0 00 00 00 00 00 00 00 00 00 00 00 00
00cc 00 00 00 00 00 00 00 00 00 00 00 00
00d8 00 00 00 00 00 00 00 00 00 00 00 00
00e4 00 00 00 00 00 00 00 00 00 00 00 00
00f0 00 00 00 00 00 00 00 00 00 00 00 00
00fc 00 00 00 00 00 00 00 00 00 00 00 00
0108 00 00 00 00 00 00 00 00 00 00 00 00
0114 00 00 00 00 00 00 00 00 00 00 00 00
0120 00 00 00 00 00 00 00 00 00 00 00 00
012c 00 00 00 00 00 00 00 00 00 00 00 00
0138 00 00 00 00 00 00 00 00 00 00 00 00
0144 00 00 00 00 00 00 00 00 00 00 00 00
0150 00 00 00 00 00 00 00 00 00 00 00 00
015c 00 00 00 00 00 00 00 00 00 00 00 00
0168 00 00 00 00 00 00 00 00 00 00 00 00
0174 00 00 00 00 00 00 00 00 00 00 00 00
0180 00 00 00 00 00 00 00 00 00 00 00 00
018c 00 00 00 00 00 00 00 00 00 00 00 00
0198 00 00 00 00 00 00 00 00 00 00 00 00
01a4 00 00 00 00 00 00 00 00 00 00 00 00
01b0 00 00 00 00 00 00 00 00 00 00 00 00
01bc 00 00 00 00 00 00 00 00 00 00 00 00
01c8 00 00 00 00 00 00 00 00 00 00 00 00
01d4 00 00 00 00 00 00 00 00 00 00 00 00
01e0 00 00 00 00 00 00 00 00 00 00 00 00
01ec 00 00 00 00 02 29 0c 02 81 81 b2 60
01f8 bc 1e 02 00 7e 70 dc e3
and the little legend at the tail end of the block, the receipts:
01f0itemCountβ[1 byte]β0x02β in this case01f1maxItemCountβ[1 byte]β0x29β constant01f2itemSizeβ[1 byte]β0x0cβ constant01f3nodeLevelβ[1 byte]β0x02β in this case01f8backPointerβ[4 bytes]β0x021ebcβ in this case
so like, itemCount is the number of 12 byte records that are actually active rn. nodeLevel is non-zero for this style of node β the leaf nodes have a whole different format, don't even worry about it yet. and backPointer must match the backPointer from the triple that pointed to this node. like, they have to agree. it's giving β¨accountabilityβ¨.
each item in this node is a triple of (D_ID, backPointer, offset) where the offset points to the next deeper node in the tree, the backPointer value must match the backPointer in that deeper node, and D_ID is the lowest D_ID value in the subtree. slay, hierarchy π
π 64 BIT INDEX 2 NODE π
the 64 bit index2 b-tree nodes are also 512 byte blocks and they go like this:
0000 21 00 00 00 00 00 00 00 77 00 00 00
000C 00 00 00 00 00 56 00 00 00 00 00 00
0018 4c 06 00 00 00 00 00 00 82 00 00 00
0024 00 00 00 00 00 68 00 00 00 00 00 00
0030 4f 80 00 00 00 00 00 00 84 00 00 00
003C 00 00 00 00 00 6e 00 00 00 00 00 00
0048 00 00 00 00 00 00 00 00 00 00 00 00
0054 00 00 00 00 00 00 00 00 00 00 00 00
0060 00 00 00 00 00 00 00 00 00 00 00 00
006C 00 00 00 00 00 00 00 00 00 00 00 00
0078 00 00 00 00 00 00 00 00 00 00 00 00
0084 00 00 00 00 00 00 00 00 00 00 00 00
0090 00 00 00 00 00 00 00 00 00 00 00 00
009C 00 00 00 00 00 00 00 00 00 00 00 00
00A8 00 00 00 00 00 00 00 00 00 00 00 00
00B4 00 00 00 00 00 00 00 00 00 00 00 00
00C0 00 00 00 00 00 00 00 00 00 00 00 00
00CC 00 00 00 00 00 00 00 00 00 00 00 00
00D8 00 00 00 00 00 00 00 00 00 00 00 00
00E4 00 00 00 00 00 00 00 00 00 00 00 00
00F0 00 00 00 00 00 00 00 00 00 00 00 00
00FC 00 00 00 00 00 00 00 00 00 00 00 00
0108 00 00 00 00 00 00 00 00 00 00 00 00
0114 00 00 00 00 00 00 00 00 00 00 00 00
0120 00 00 00 00 00 00 00 00 00 00 00 00
012C 00 00 00 00 00 00 00 00 00 00 00 00
0138 00 00 00 00 00 00 00 00 00 00 00 00
0144 00 00 00 00 00 00 00 00 00 00 00 00
0150 00 00 00 00 00 00 00 00 00 00 00 00
015C 00 00 00 00 00 00 00 00 00 00 00 00
0168 00 00 00 00 00 00 00 00 00 00 00 00
0174 00 00 00 00 00 00 00 00 00 00 00 00
0180 00 00 00 00 00 00 00 00 00 00 00 00
018C 00 00 00 00 00 00 00 00 00 00 00 00
0198 00 00 00 00 00 00 00 00 00 00 00 00
01A4 00 00 00 00 00 00 00 00 00 00 00 00
01B0 00 00 00 00 00 00 00 00 00 00 00 00
01BC 00 00 00 00 00 00 00 00 00 00 00 00
01C8 00 00 00 00 00 00 00 00 00 00 00 00
01D4 00 00 00 00 00 00 00 00 00 00 00 00
01E0 00 00 00 00 00 00 00 00 03 14 18 01
01EC 00 00 00 00 81 81 83 6a 49 da f3 d3
01F8 83 00 00 00 00 00 00 00
and the fields, bestie, look:
01e8itemCountβ[1 byte]β0x03β in this case01e9maxItemCountβ[1 byte]β0x14β constant01eaitemSizeβ[1 byte]β0x18β constant01ebnodeLevelβ[1 byte]β0x01β in this case01f8backPointerβ[8 bytes]β0x000083β in this case
itemCount = the number of 24 byte records that are active. nodeLevel is non-zero for this style of node. the leaf nodes? different format, we'll get there π«Ά and backPointer must match the backPointer from the triple that pointed to this node. no cap.
each item here is a triple of (D_ID, backPointer, offset) β offset points to the next deeper node in the tree, backPointer must match the backPointer in that deeper node, and D_ID is the lowest D_ID value in the subtree. same energy as the 32 bit one, just wider. it's giving growth πβ¨
π 32 BIT INDEX 2 LEAF NODE π
and now THE LEAF NODES β the 32 bit index2 b-tree leaf nodes are 512 byte blocks and they're built like:
0000 21 00 00 00 38 e6 00 00 00 00 00 00 00 00 00 00
0010 61 00 00 00 2c a8 02 00 36 a8 02 00 00 00 00 00
0020 22 01 00 00 20 a2 02 00 00 00 00 00 22 01 00 00
0030 2d 01 00 00 88 7b 03 00 00 00 00 00 00 00 00 00
0040 2e 01 00 00 08 00 00 00 00 00 00 00 00 00 00 00
0050 2f 01 00 00 0c 00 00 00 00 00 00 00 00 00 00 00
0060 e1 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0070 01 02 00 00 b4 e4 02 00 00 00 00 00 00 00 00 00
0080 61 02 00 00 a0 e4 02 00 00 00 00 00 00 00 00 00
0090 0d 06 00 00 04 00 00 00 00 00 00 00 00 00 00 00
00A0 0e 06 00 00 08 00 00 00 00 00 00 00 00 00 00 00
00B0 0f 06 00 00 0c 00 00 00 00 00 00 00 00 00 00 00
00C0 10 06 00 00 10 00 00 00 00 00 00 00 00 00 00 00
00D0 2b 06 00 00 84 00 00 00 00 00 00 00 00 00 00 00
00E0 4c 06 00 00 1c 00 00 00 00 00 00 00 00 00 00 00
00F0 71 06 00 00 18 00 00 00 00 00 00 00 00 00 00 00
0100 92 06 00 00 14 00 00 00 00 00 00 00 00 00 00 00
0110 23 22 00 00 14 a0 02 00 00 00 00 00 22 01 00 00
0120 26 22 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0130 27 22 00 00 1c a0 02 00 00 00 00 00 00 00 00 00
0140 22 80 00 00 50 00 00 00 00 00 00 00 22 01 00 00
0150 2d 80 00 00 f8 9f 02 00 00 00 00 00 00 00 00 00
0160 2e 80 00 00 08 00 00 00 00 00 00 00 00 00 00 00
0170 2f 80 00 00 34 e6 00 00 00 00 00 00 00 00 00 00
0180 42 80 00 00 3c 6d 02 00 00 00 00 00 22 80 00 00
0190 4d 80 00 00 04 00 00 00 00 00 00 00 00 00 00 00
01A0 4e 80 00 00 10 6d 02 00 00 00 00 00 00 00 00 00
01B0 4f 80 00 00 ec 23 00 00 00 00 00 00 00 00 00 00
01C0 62 80 00 00 38 78 02 00 00 00 00 00 22 01 00 00
01D0 6d 80 00 00 34 78 02 00 00 00 00 00 00 00 00 00
01E0 6e 80 00 00 08 00 00 00 00 00 00 00 00 00 00 00
01F0 10 1f 10 00 81 81 a0 9a ae 1e 02 00 89 44 6a 0f
fields time, obvi:
01f0itemCountβ[1 byte]β0x10β in this case01f1maxItemCountβ[1 byte]β0x1fβ constant01f2itemSizeβ[1 byte]β0x10β constant01f3nodeLevelβ[1 byte]β0x00β in this case01f8backPointerβ[4 bytes]β0x021eaeβ in this case
itemCount here is the number of 16 byte records that are active. nodeLevel is zero for these leaf nodes β that's literally how you know it's a leaf, bestie π β and backPointer must match the backPointer from the triple that pointed to this node. every time. it's a whole trust fall π€
each item in this node is a tuple of (D_ID, DESC-I_ID, TREE-I_ID, PARENT-D_ID).
- the
DESC-I_IDpoints to the main data for this item (Associated Descriptor Items0x7cec,0xbcec, or0x0101) via the index1 tree π³ - the
TREE-I_IDis zero or points to an Associated Tree Item0x0002via the index1 tree π³ - the
PARENT-D_IDpoints to the parent of this item in this index2 tree
so basically every leaf item knows its own data, maybe a tree thing, and who its parent is. family tree but make it bytes π§π
64 BIT INDEX 2 LEAF NODE π
okay bestie, the 64 bit index2 b-tree leaf nodes are 512 byte blocks and they look like this, no cap:
0000 21 00 00 00 00 00 00 00 74 00 00 00 00 00 00 00
0010 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00
0020 61 00 00 00 00 00 00 00 34 00 00 00 00 00 00 00
0030 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00
0040 22 01 00 00 00 00 00 00 4c 00 00 00 00 00 00 00
0050 00 00 00 00 00 00 00 00 22 01 00 00 02 00 00 00
0060 2d 01 00 00 00 00 00 00 70 00 00 00 00 00 00 00
0070 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00
0080 2e 01 00 00 00 00 00 00 08 00 00 00 00 00 00 00
0090 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00
00A0 2f 01 00 00 00 00 00 00 0c 00 00 00 00 00 00 00
00B0 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00
00C0 e1 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00D0 00 00 00 00 00 00 00 00 00 00 00 00 d8 e3 13 00
00E0 01 02 00 00 00 00 00 00 8c 00 00 00 00 00 00 00
00F0 00 00 00 00 00 00 00 00 00 00 00 00 b0 e3 13 00
0100 61 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0110 00 00 00 00 00 00 00 00 00 00 00 00 d8 e3 13 00
0120 0d 06 00 00 00 00 00 00 04 00 00 00 00 00 00 00
0130 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00
0140 0e 06 00 00 00 00 00 00 08 00 00 00 00 00 00 00
0150 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00
0160 0f 06 00 00 00 00 00 00 0c 00 00 00 00 00 00 00
0170 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00
0180 10 06 00 00 00 00 00 00 10 00 00 00 00 00 00 00
0190 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00
01A0 2b 06 00 00 00 00 00 00 24 00 00 00 00 00 00 00
01B0 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00
01C0 71 06 00 00 00 00 00 00 18 00 00 00 00 00 00 00
01D0 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00
01E0 00 00 00 00 00 00 00 00 0e 0f 20 00 00 00 00 00
01F0 81 81 77 56 f8 32 43 49 77 00 00 00 00 00 00 00
01e8 itemCount [1 byte] 0x0e in this case
01e9 maxItemCount [1 byte] 0x0f constant
01ea itemSize [1 byte] 0x20 constant
01eb nodeLevel [1 byte] 0x00 defines a leaf node
01f8 backPointer [8 bytes] 0x000077 in this case
itemCount tells you how many of those 32 byte records are actually active (like, alive and doing the most). nodeLevel is zero for these leaf nodes, and backPointer has to match the backPointer from the triple that pointed at this node β they gotta be twins fr fr, no mismatches allowed. π ββοΈ
Every item in this node is a tuple of (D_ID, DESC-I_ID, TREE-I_ID, PARENT-D_ID). The DESC-I_ID points to the main data for this item (Associated Descriptor Items 0x7cec, 0xbcec, or 0x0101) via the index1 tree. The TREE-I_ID is either zero or it points to an Associated Tree Item 0x0002 via the index1 tree. And the PARENT-D_ID points to the parent of this item in this index2 tree. slay, family tree but make it hex π
32 BIT ASSOCIATED TREE ITEM 0X0002 π¦
so a D_ID value can point to an entry in the index2 tree with a non-zero TREE-I_ID, and that points to this descriptor block via the index1 tree. What does it do?? It maps local ID2 values (referenced in the main data for the original D_ID item) to I_ID values. This descriptor block is holding triples of (ID2, I_ID, CHILD-I_ID) where the local ID2 data can be found via I_ID, and CHILD-I_ID is either zero or it points to another Associated Tree Item via the index1 tree.
In the 32 bit leaf node above, we've got a tuple of (0x61, 0x02a82c, 0x02a836, 0) β 0x02a836 is the I_ID of the associated tree, and we can look up that I_ID value in the index1 b-tree to find the (offset,size) of the data in the .pst file. obsessed. π
0000 02 00 01 00 9f 81 00 00 30 a8 02 00 00 00 00 00
0000 signature [2 bytes] 0x0002 constant
0002 count [2 bytes] 0x0001 in this case
repeating
0004 id2 [4 bytes] 0x00819f in this case
0008 i_id [4 bytes] 0x02a830 in this case
000c child-i_id [4 bytes] 0 in this case
64 BIT ASSOCIATED TREE ITEM 0X0002 π
this descriptor block contains a tree that maps local ID2 values to I_ID entries β literally the same energy as the 32 bit version described above, just bigger bestie:
0000 02 00 02 00 00 00 00 00 92 06 00 00 00 00 00 00
0010 a8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0020 3f 80 00 00 00 00 00 00 98 00 00 00 00 00 00 00
0030 00 00 00 00 00 00 00 00
0000 signature [2 bytes] 0x0002 constant
0002 count [2 bytes] 0x0002 in this case
0004 unknown [4 bytes] 0 possibly constant
repeating
0008 id2 [4 bytes] 0x000692 in this case
000c unknown1 [2 bytes] 0 may be a count or size
000e unknown2 [2 bytes] 0 may be a count or size
0010 i_id [8 bytes] 0x0000a8 in this case
0018 child-i_id [8 bytes] 0 in this case
ASSOCIATED DESCRIPTOR ITEM 0XBCEC π
Contains info about the item, which may be email, contact, or other outlook types β the whole menu, honestly. In the leaf node above, we've got a tuple of (0x21, 0x00e638, 0, 0) β 0x00e638 is the I_ID of the associated descriptor, and we can look up that I_ID value in the index1 b-tree to find the (offset,size) of the data in the .pst file. This descriptor is eventually decoded to a list of MAPI elements. it's giving decoder ring, it's giving lore π₯
0000 3c 01 ec bc 20 00 00 00 00 00 00 00 b5 02 06 00
0010 40 00 00 00 f9 0f 02 01 60 00 00 00 01 30 1e 00
0020 80 00 00 00 04 30 1e 00 00 00 00 00 df 35 03 00
0030 ff 00 00 00 e0 35 02 01 a0 00 00 00 e2 35 02 01
0040 e0 00 00 00 e3 35 02 01 c0 00 00 00 e4 35 02 01
0050 00 01 00 00 e5 35 02 01 20 01 00 00 e6 35 02 01
0060 40 01 00 00 e7 35 02 01 60 01 00 00 1e 66 0b 00
0070 00 00 00 00 ff 67 03 00 00 00 00 00 d2 7f 17 d8
0080 64 8c d5 11 83 24 00 50 04 86 95 45 53 74 61 6e
0090 6c 65 79 00 00 00 00 d2 7f 17 d8 64 8c d5 11 83
00A0 24 00 50 04 86 95 45 22 80 00 00 00 00 00 00 d2
00B0 7f 17 d8 64 8c d5 11 83 24 00 50 04 86 95 45 42
00C0 80 00 00 00 00 00 00 d2 7f 17 d8 64 8c d5 11 83
00D0 24 00 50 04 86 95 45 a2 80 00 00 00 00 00 00 d2
00E0 7f 17 d8 64 8c d5 11 83 24 00 50 04 86 95 45 c2
00F0 80 00 00 00 00 00 00 d2 7f 17 d8 64 8c d5 11 83
0100 24 00 50 04 86 95 45 e2 80 00 00 00 00 00 00 d2
0110 7f 17 d8 64 8c d5 11 83 24 00 50 04 86 95 45 02
0120 81 00 00 00 00 00 00 d2 7f 17 d8 64 8c d5 11 83
0130 24 00 50 04 86 95 45 62 80 00 00 00 0b 00 00 00
0140 0c 00 14 00 7c 00 8c 00 93 00 ab 00 c3 00 db 00
0150 f3 00 0b 01 23 01 3b 01
0000 indexOffset [2 bytes] 0x013c in this case
0002 signature [2 bytes] 0xbcec constant
0004 b5offset [4 bytes] 0x0020 index reference
Note the signature of 0xbcec. There are other descriptor block formats with other signatures β so don't assume, bestie. And note the indexOffset of 0x013c β starting at that position in the descriptor block, we have an array of two byte integers. The first integer (0x000b) is a (count-1) of the number of overlapping pairs following the count. The first pair is (0, 0xc), the next pair is (0xc, 0x14) and the last (12th) pair is (0x123, 0x13b). These pairs are (start,end+1) offsets of items in this block. So we have count+2 integers following the count value. math is mathing β¨
Now note the b5offset of 0x0020, which is a type I'm gonna call an index reference. Such index references have at least two different forms, and may point to data either in this block, or in some other block. External pointer references have the low order 4 bits all set, and are ID2 values that can be used to fetch data. This value of 0x0020 is an internal pointer reference, which needs to be right shifted by 4 bits to become 0x0002, which is then a byte offset to be added to the above indexOffset plus two (to skip the count), so it points to the (0xc, 0x14) pair. iykyk π
So far we've only described internal index references where the high order 16 bits are zero. That suffices for single descriptor blocks. But in the case of the type 0x0101 descriptor block, we have an array of subblocks. In this case, the high order 16 bits of an internal index reference are used to select the subblock. Each subblock starts with a 16 bit indexOffset which points to the count and array of 16 bit integer pairs which are offsets in the current subblock. nesting!! we love to see it πͺ
Finally, we have the offset and size of the "b5" block located at offset 0xc with a size of 8 bytes in this descriptor block. The "b5" block has the following format:
0000 signature [2 bytes] 0x02b5 constant
0002 datasize [2 bytes] 0x0006 constant +2 for 8 byte entries
0004 descoffset [4 bytes] 0x0040 index reference
Note the descoffset of 0x0040, which again is an index reference. In this case, it's an internal pointer reference, which needs to be right shifted by 4 bits to become 0x0004, which is then a byte offset to be added to the above indexOffset plus two (to skip the count), so it points to the (0x14, 0x7c) pair. The datasize (6) plus the b5 code (02) gives the size of the entries, in this case 8 bytes. We now have the offset 0x14 of the descriptor array, composed of 8 byte entries that describe MAPI elements. Each descriptor entry has the following format:
0000 itemType [2 bytes]
0002 referenceType [2 bytes]
0004 value [4 bytes]
For some reference types (2, 3, 0xb) the value is used directly. Otherwise, the value is an index reference, which is either an ID2 value, or an offset, to be right shifted by 4 bits and used to fetch a pair from the index table to find the (offset,size)... wait no, the offset and size of the item in this descriptor block. π―
The following reference types are known, but not all of these are implemented in the code yet β so don't come for me if your fave isn't there, bestie:
0x0002- Signed 16bit value0x0003- Signed 32bit value0x0004- 4-byte floating point0x0005- Floating point double0x0006- Signed 64-bit int0x0007- Application Time0x000A- 32-bit error value0x000B- Boolean (non-zero = true)0x000D- Embedded Object0x0014- 8-byte signed integer (64-bit)0x001E- Null terminated String0x001F- Unicode string0x0040- Systime - Filetime structure0x0048- OLE Guid0x0102- Binary data0x1003- Array of 32bit values0x1014- Array of 64bit values0x101E- Array of Strings0x1102- Array of Binary data
The following item types are known, but not all of these are implemented in the code yet.
okay so this next stretch is a long one, bestie β we're listing values and what they mean, and we are not skipping a single one π«Ά lock in:
0x0002β alternate recipient allowed0x0003β Extended Attributes Table0x0017β importance level0x001aβ IPM context, i.e. the message class0x0023β global delivery report requested0x0026β priority0x0029β read receipt0x002bβ reassignment prohibited0x002eβ original sensitivity0x0032β report time0x0036β sensitivity0x0037β email subject β¨0x0039β client submit time / date sent0x003bβ Outlook address of sender0x003fβ Outlook structure describing the recipient0x0040β name of the Outlook recipient structure0x0041β Outlook structure describing the sender0x0042β name of the Outlook sender structure0x0043β another structure describing the recipient0x0044β name of the second recipient structure0x004fβ Reply-To Outlook structure0x0050β name of the Reply-To structure0x0051β Outlook name of recipient0x0052β second Outlook name of recipient0x0057β my address in the TO field0x0058β my address in the CC field0x0059β message addressed to me0x0063β response requested0x0064β sender's address access method (SMTP,EX)0x0065β sender's address0x0070β conversation topic, aka the processed subject (withFwd:,Re, ... stripped out)0x0071β conversation index0x0072β original display BCC0x0073β original display CC0x0074β original display TO0x0075β recipient address access method (SMTP,EX)0x0076β recipient's address0x0077β second recipient access method (SMTP,EX)0x0078β second recipient address0x007dβ email header, aka the header that was attached to the email0x0c04β NDR reason code0x0c05β NDR diag code0x0c06β non-receipt notification requested0x0c17β reply requested0x0c19β second sender structure0x0c1aβ name of second sender structure0x0c1bβ supplementary info0x0c1dβ second Outlook name of sender0x0c1eβ second sender access method (SMTP,EX)0x0c1fβ second sender address0x0c20β NDR status code0x0e01β delete after submit0x0e02β BCC addresses0x0e03β CC addresses0x0e04β SentTo address0x0e06β date.0x0e07β flag bits, and the way this one has layers π :0x01- Read0x02- Unmodified0x04- Submit0x08- Unsent0x10- Has Attachments0x20- From Me0x40- Associated0x80- Resend0x100- RN Pending0x200- NRN Pending
0x0e08β message size0x0e0aβ Sentmail EntryID0x0e1dβ normalized subject0x0e1fβ compressed RTF in sync0x0e20β attachment size0x0ff9β binary record header0x1000β plain text email body. Does not exist if the email doesn't have a plain text version. periodt.0x1001β report text0x1006β RTF sync body CRC0x1007β RTF sync body character count0x1008β RTF sync body tag0x1009β RTF compressed body0x1010β RTF whitespace prefix count0x1011β RTF whitespace tailing count0x1013β HTML email body. Does not exist if the email doesn't have an HTML version. same energy fr fr.0x1035β message ID0x1042β In-Reply-To, or the parent's message ID0x1046β return path0x3001β folder name? π (the original literally says "Folder Name?" and adds: I have also seen this value used for the contacts record) β keeping the question mark, bestie, we don't guess0x3002β address type0x3003β contact address0x3004β comment0x3007β date item creation0x3008β date item modification0x300bβ binary record header0x35dfβ valid folder mask0x35e0β binary record containing a reference to the "Top of Personal Folder" item0x35e2β binary record containing a reference to the default outbox item0x35e3β binary record containing a reference to the "Deleted Items" item0x35e4β binary record containing a reference to the sent items folder item0x35e5β binary record containing a reference to the user views folder item0x35e6β binary record containing a reference to the common views folder item0x35e7β binary record containing a reference to the "Search Root" item0x3602β the number of emails stored in a folder0x3603β the number of unread emails in a folder0x360aβ has subfolders0x3613β the folder content description0x3617β associate content count0x3701β binary data attachment0x3704β attachment filename0x3705β attachment method0x3707β attachment filename long0x370bβ attachment position0x370eβ attachment mime encoding0x3710β attachment mime sequence0x3712β content ID0x3a00β contact's account name0x3a01β contact alternate recipient0x3a02β callback telephone number0x3a03β message conversion prohibited0x3a05β contacts suffix0x3a06β contacts first name0x3a07β contacts government ID number0x3a08β business telephone number0x3a09β home telephone number0x3a0aβ contacts initials0x3a0bβ keyword0x3a0cβ contact's language0x3a0dβ contact's location0x3a0eβ mail permission0x3a0fβ MHS common name0x3a10β organizational ID #0x3a11β contacts surname0x3a12β original entry id0x3a13β original display name0x3a14β original search key0x3a15β default postal address0x3a16β company name0x3a17β job title0x3a18β department name0x3a19β office location0x3a1aβ primary telephone0x3a1bβ business phone number 20x3a1cβ mobile phone number0x3a1dβ radio phone number0x3a1eβ car phone number0x3a1fβ other phone number0x3a20β transmittable display name0x3a21β pager phone number0x3a22β user certificate0x3a23β primary fax number0x3a24β business fax number0x3a25β home fax number0x3a26β business address country0x3a27β business address city0x3a28β business address state0x3a29β business address street0x3a2aβ business postal code0x3a2bβ business PO box0x3a2cβ telex number0x3a2dβ ISDN number0x3a2eβ assistant phone number0x3a2fβ home phone 20x3a30β assistant's name0x3a40β can receive rich text0x3a41β wedding anniversary π0x3a42β birthday π0x3a43β hobbies0x3a44β middle name0x3a45β display name prefix (title)0x3a46β profession0x3a47β preferred by name0x3a48β spouse's name0x3a49β computer network name0x3a4aβ customer ID0x3a4bβ TTY/TDD phone0x3a4cβ Ftp site0x3a4dβ gender0x3a4eβ manager's name0x3a4fβ nickname0x3a50β personal home page0x3a51β business home page0x3a57β company main phone0x3a58β childrens names0x3a59β home address city0x3a5aβ home address country0x3a5bβ home address postal code0x3a5cβ home address state or province0x3a5dβ home address street0x3a5eβ home address post office box0x3a5fβ other address city0x3a60β other address country0x3a61β other address postal code0x3a62β other address state0x3a63β other address street0x3a64β other address post office box0x3fdeβ internet code page0x3ffdβ message code page0x65e3β entry ID0x67f2β attachment ID2 value0x67ffβ password checksum π0x6f02β secure HTML body0x6f04β secure text body0x7c07β top of folders RecID0x8005β contact fullname0x801aβ home address0x801bβ business address0x801cβ other address0x8045β work address street0x8046β work address city0x8047β work address state0x8048β work address postal code0x8049β work address country0x804aβ work address post office box0x8082β email address 1 transport0x8083β email address 1 address0x8084β email address 1 description0x8085β email address 1 record0x8092β email address 2 transport0x8093β email address 2 address0x8094β email address 2 description0x8095β email address 2 record0x80a2β email address 3 transport0x80a3β email address 3 address0x80a4β email address 3 description0x80a5β email address 3 record0x80d8β internet free/busy0x8205β appointment shows as0x8208β appointment location0x820dβ appointment start0x820eβ appointment end0x8214β label for appointment0x8215β all day appointment flag0x8216β appointment recurrence data0x8223β appointment is recurring0x8231β recurrence type0x8232β recurrence description0x8234β timezone of times0x8235β recurrence start time0x8236β recurrence end time0x8501β reminder minutes before appointment start0x8503β reminder alarm β°0x8516β common time start0x8517β common time end0x851fβ play reminder sound filename0x8530β followup string0x8534β mileage0x8535β billing information0x8554β Outlook version0x8560β appointment reminder time0x8700β journal entry type0x8706β start timestamp0x8708β end timestamp0x8712β journal entry type β duplicate? π again, keeping the question mark exactly as it's written, no cap
β¨ ASSOCIATED DESCRIPTOR ITEM 0X7CEC β¨
okay bestie, this descriptor block is lowkey the cousin of the 0xbcec format β same energy, different signature. It also eventually gets decoded into a list of MAPI elements. Here's the raw tea:
0000 7a 01 ec 7c 40 00 00 00 00 00 00 00 b5 04 02 00
0010 60 00 00 00 7c 18 60 00 60 00 62 00 65 00 20 00
0020 00 00 80 00 00 00 00 00 00 00 03 00 20 0e 0c 00
0030 04 03 1e 00 01 30 2c 00 04 0b 1e 00 03 37 28 00
0040 04 0a 1e 00 04 37 14 00 04 05 03 00 05 37 10 00
0050 04 04 1e 00 07 37 24 00 04 09 1e 00 08 37 20 00
0060 04 08 02 01 0a 37 18 00 04 06 03 00 0b 37 08 00
0070 04 02 1e 00 0d 37 1c 00 04 07 1e 00 0e 37 40 00
0080 04 10 02 01 0f 37 30 00 04 0c 1e 00 11 37 34 00
0090 04 0d 1e 00 12 37 3c 00 04 0f 1e 00 13 37 38 00
00A0 04 0e 03 00 f2 67 00 00 04 00 03 00 f3 67 04 00
00B0 04 01 03 00 09 69 44 00 04 11 03 00 fa 7f 5c 00
00C0 04 15 40 00 fb 7f 4c 00 08 13 40 00 fc 7f 54 00
00D0 08 14 03 00 fd 7f 48 00 04 12 0b 00 fe 7f 60 00
00E0 01 16 0b 00 ff 7f 61 00 01 17 45 82 00 00 00 00
00F0 45 82 00 00 78 3c 00 00 ff ff ff ff 49 1e 00 00
0100 06 00 00 00 00 00 00 00 a0 00 00 00 00 00 00 00
0110 00 00 00 00 00 00 00 00 00 00 00 00 c0 00 00 00
0120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0130 00 00 00 00 00 00 00 00 00 00 00 00 00 40 dd a3
0140 57 45 b3 0c 00 40 dd a3 57 45 b3 0c 02 00 00 00
0150 00 00 fa 10 3e 2a 86 48 86 f7 14 03 0a 03 02 01
0160 4a 2e 20 44 61 76 69 64 20 4b 61 72 61 6d 27 73
0170 20 42 69 72 74 68 64 61 79 00 06 00 00 00 0c 00
0180 14 00 ea 00 f0 00 55 01 60 01 79 01
0000 indexOffset [2 bytes] 0x017a in this case
0002 signature [2 bytes] 0x7cec constant
0004 7coffset [4 bytes] 0x0040 index reference
So the signature is 0x7cec. There are other descriptor block formats with other signatures, so don't get it twisted. And peep the indexOffset of 0x017a β starting at that position in the descriptor block, we have an array of two-byte integers. The first integer (0x0006) is a (count-1) of the number of overlapping pairs following the count. The first pair is (0, 0xc), the next pair is (0xc, 0x14), and the last (7th) pair is (0x160, 0x179). These pairs are (start,end+1) offsets of items in this block. So we have count+2 integers following the count value. π
Now look at the 7coffset of 0x0040, which is an index reference. In this case it's an internal reference pointer, and you need to right shift it by 4 bits to become 0x0004. That becomes a byte offset you add to the indexOffset above plus two (to skip the count), so it points to the (0x14, 0xea) pair. So we've got the offset and size of the "7c" block: offset 0x14 with a size of 214 bytes in this case. The "7c" block starts with a header that looks like this:
0000 signature [1 bytes] 0x7c constant
0001 itemCount [1 bytes] 0x18 in this case
0002 unknown [2 bytes] 0x0060 in this case
0004 unknown [2 bytes] 0x0060 in this case
0006 unknown [2 bytes] 0x0062 in this case
0008 recordSize [2 bytes] 0x0065 in this case
000a b5Offset [4 bytes] 0x0020 index reference
000e index2Offset [4 bytes] 0x0080 index reference
0012 unknown [2 bytes] 0x0000 in this case
0014 unknown [2 bytes] 0x0000 in this case
Note the b5Offset of 0x0020, which is an index reference. Again, internal reference pointer, right shift by 4 bits β 0x0002. Add that as a byte offset to the indexOffset above plus two (skip the count), and it points to the (0xc, 0x14) pair. Finally, we have the offset and size of the "b5" block: offset 0xc with a size of 8 bytes in this descriptor block. The "b5" block has this format:
0000 signature [2 bytes] 0x04b5 constant
0002 datasize [2 bytes] 0x0002 +4 for 6 byte entries in this case
0004 descoffset [4 bytes] 0x0060 index reference
Now the descoffset of 0x0060 β yes, another index reference. Internal pointer reference, right shift by 4 bits β 0x0006. Add that as a byte offset to the indexOffset above plus two (skip the count), so it points to the (0xea, 0xf0) pair. The datasize (2) plus the b5 code (04) gives the size of the entries, which is 6 bytes in this case. So now we have offset 0xea of an unused block of data in an unknown format, made of 6-byte entries. That gives us (0xf0 - 0xea)/6 = 1, so we have a recordCount of one. π
We have seen cases where the descoffset in the b5 block is zero, and the index2Offset in the 7c block is zero. This has been seen for objects that seem to be attachments on messages that have been read. Before the message was read, it did not have any attachments. No cap.
Note the index2Offset above of 0x0080, which again is an index reference. Internal pointer reference, right shift by 4 bits β 0x0008. Add that as a byte offset to the indexOffset above plus two (skip the count), so it points to the (0xf0, 0x155) pair. This is an array of tables of four-byte integers. We're calling these the IND2 tables. The size of each of these tables is specified by the recordSize field of the "7c" header. The number of these tables is the above recordCount value derived from the "b5" block.
Now the remaining data in the "7c" block after the header starts at offset 0x2a. There should be itemCount 8-byte items here, with the following format:
0000 referenceType [2 bytes]
0002 itemType [2 bytes]
0004 ind2Offset [2 bytes]
0006 size [1 byte]
0007 unknown [1 byte]
The ind2Offset is a byte offset into the current IND2 table of some value. If that is a four-byte integer value, then once we fetch that, we have the same triple (item type, reference type, value) as we find in the 0xbcec style descriptor blocks. If not, then this value is used directly. These 8-byte descriptors are processed recordCount times, each time using the next IND2 table. The item and reference types are as described above for the 0xbcec format descriptor block.
πΈ 32 BIT ASSOCIATED DESCRIPTOR ITEM 0X0101 πΈ
This descriptor block contains a list of I_ID values. It is used when an I_ID (that would normally point to a type 0x7cec or 0xbcec descriptor block) contains more data than can fit in any single descriptor of those types. In this case, it points to a type 0x0101 block, which contains a list of I_ID values that themselves point to the actual descriptor blocks. The total length value in the 0x0101 header is the sum of the lengths of the blocks pointed to by the list of I_ID values. The result is an array of subblocks, that may contain index references where the high order 16 bits specify which descriptor subblock to use. Only the first descriptor subblock contains the signature (0xbcec or 0x7cec).
0000 01 01 02 00 26 28 00 00 18 77 0c 00 b8 04 00 00
0000 signature [2 bytes] 0x0101 constant
0002 count [2 bytes] 0x0002 in this case
0004 total length [4 bytes] 0x002826 in this case
repeating
0008 i_id [4 bytes] 0x0c7718 in this case
000c i_id [4 bytes] 0x0004b8 in this case
π¦ 64 BIT ASSOCIATED DESCRIPTOR ITEM 0X0101 π¦
This descriptor block contains a list of I_ID values, similar to the 32-bit version described above.
0000 01 01 02 00 ea 29 00 00 10 83 00 00 00 00 00 00
0010 1c 83 00 00 00 00 00 00
0000 signature [2 bytes] 0x0101 constant
0002 count [2 bytes] 0x0002 in this case
0004 total length [4 bytes] 0x0029ea in this case
repeating
0008 i_id [8 bytes] 0x008310 in this case
0010 i_id [8 bytes] 0x00831c in this case
and that's the whole vibe for this part, bestie π source/version: [FIXME: source] β’ date: 2017-12-07 β’ page: OUTLOOK.PST(5) β¨π«Ά
π¦ where this page comes from
- arch rolling: libpst 0.6.76-11 Β· GPL-2.0-or-later
- debian bookworm: libpst-dev 0.6.76-1 Β· GPL-2.0-or-later
- debian trixie: libpst-dev 0.6.76-1.2 Β· GPL-2.0-or-later
- epel 10: libpst 0.6.76-24.el10_1 Β· GPL-2.0-or-later
- fedora 43: libpst 0.6.76-26.fc43 Β· GPL-2.0-or-later
- fedora 44: libpst 0.6.76-28.fc44 Β· GPL-2.0-or-later
- nixos 26.05: libpst 0.6.76
- nixpkgs unstable: libpst 0.6.76
- opensuse-leap 16.0: libpst 0.6.76-bp160.1.8 Β· GPL-2.0-or-later
- opensuse-leap 16.0: libpst 0.6.76-bp160.1.8 Β· GPL-2.0-or-later
- opensuse-leap 16.0: libpst 0.6.76-bp160.1.8 Β· GPL-2.0-or-later
- opensuse-leap 16.0: libpst 0.6.76-bp160.1.8 Β· GPL-2.0-or-later
- ubuntu jammy: libpst-dev 0.6.76-1 Β· GPL-2.0-or-later
- ubuntu noble: libpst-dev 0.6.76-1.1build1 Β· GPL-2.0-or-later
- ubuntu questing: libpst-dev 0.6.76-1.2
- ubuntu resolute: libpst-dev 0.6.76-1.3 Β· GPL-2.0-or-later
- ubuntu stonking: libpst-dev 0.6.76-1.3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms