El Capo 2 Cap 57 -

for (int i = 0; i < 64; i++) uint8_t v = buf[i]; v ^= 0x5A; // XOR with constant v = rotl8(v, (i % 8)); // Rotate left by i%8 bits tmp[i] = v;

(The exact constants differ slightly, but the structure is identical.) The flag is embedded as a static string in the binary’s .rodata section: el capo 2 cap 57

T[i] = rotl8( key[i] ^ 0x5A , i % 8 ) We want Σ T[i] = 0xdeadbeef (mod 2^32) . Because the checksum is a simple sum, we can freely pick the first 63 bytes and solve for the last byte. for (int i = 0; i &lt; 64;

open("key.bin","wb").write(key)

# Write to file with open("key.bin", "wb") as f: f.write(key) for (int i = 0

CONST_XOR = 0x5A TARGET = 0xdeadbeef SIZE = 64

need = (TARGET - csum) & 0xffffffff need_byte = need & 0xFF i = SIZE-1 key[i] = inv_rotl8(need_byte, i % 8) ^ CONST_XOR