Log: Reverse Engineering Human Resource Machine

July 3rd 2024

I’ve been wanting to build a small assembler

The save file

On my box Human Resource machine keeps its data in .local/share/Tomorrow Corporation/Human Resource Machine. Here’s what that looks like:

λ  ls
profiles.bin   settings.txt   steam_autocloud.vdf

settings.txt and steam_autocloud.vdf contain some information about cloud saves and fullscreen settings etc. The really interesting file is profiles.bin. Which is where I will show HRM is keeping all of its state. To start off let’s remove the file completely:

λ  rm profiles.bin

And start the game:

Choose Profile Page
Chosen Profile
Level Zero

Now that that’s done. We’ll close the game and examine profiles.bin:

λ  la profiles.bin 
.rw-rw-r-- kingsfoil kingsfoil 14 MB Wed Jul  3 22:41:35 2024  profiles.bin

λ  hexyl profiles.bin 
┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐
00000000│ b0 1b b6 b9 05 00 00 00 ┊ 18 f9 8c 24 62 3e 16 ec │ו×ו⋄⋄⋄┊•××$b>•×│
00000010│ 50 d1 99 7e d6 15 f1 f3 ┊ 01 00 00 00 31 6c 72 67 │P××~ו××┊•⋄⋄⋄1lrg│
00000020│ 00 00 00 00 00 00 00 00 ┊ 00 00 00 00 00 00 00 00 │⋄⋄⋄⋄⋄⋄⋄⋄┊⋄⋄⋄⋄⋄⋄⋄⋄│
*       │                         ┊                         │        ┊        │
00e4bb80│ 00 00 00 00 00 00 00 00 ┊                         │⋄⋄⋄⋄⋄⋄⋄⋄┊        │
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘

λ  cp profiles.bin level0.profiles.bin
'profiles.bin' -> 'level0.profiles.bin'

λ  sha256sum level0.profiles.bin 
2ef459accf8188a4a38981fd3ee74b2f5be5453652899a76badb5742ccdb3785  level0.profiles.bin

Make a note of that checksum.

Next we’ll start the game up again, and begin playing level 1:

Empty Level 1

Add a single INBOX instruction:

Single INBOX instruction

Stop again! Check the profile:

λ  hexyl profiles.bin 
┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐
00000000│ 7d 4a 0c 63 05 00 00 00 ┊ 18 f9 8c 24 62 3e 16 ec │}J_c•⋄⋄⋄┊•××$b>•×│
00000010│ 50 d1 99 7e d6 15 f1 f3 ┊ 01 00 00 00 31 6c 72 67 │P××~ו××┊•⋄⋄⋄1lrg│
00000020│ 01 00 00 00 c9 bb c5 30 ┊ f6 48 10 1a 54 d3 b6 a2 │•⋄⋄⋄×××0┊×H••T×××│
00000030│ f8 1c bd 8d 00 00 00 00 ┊ 00 00 00 00 ff ff ff ff │ו××⋄⋄⋄⋄┊⋄⋄⋄⋄××××│
00000040│ ff ff ff ff 00 00 00 00 ┊ 00 00 00 00 01 00 00 00 │××××⋄⋄⋄⋄┊⋄⋄⋄⋄•⋄⋄⋄│
00000050│ 00 00 00 00 00 00 00 00 ┊ 00 00 00 00 00 00 00 00 │⋄⋄⋄⋄⋄⋄⋄⋄┊⋄⋄⋄⋄⋄⋄⋄⋄│
*       │                         ┊                         │        ┊        │
00e4bb80│ 00 00 00 00 00 00 00 00 ┊                         │⋄⋄⋄⋄⋄⋄⋄⋄┊        │
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘