Decompile fn_18105 (myGPack::PakCipher::BuildRoundKeys)

Batch #18020 by eAthena: 0 byte-identical, 1 confirmed by peer review.

- fn_18105 myGPack::PakCipher::BuildRoundKeys: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker, Yommy, bibinir
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-11-12 11:09:29 +00:00
commit f674d40994

View file

@ -180,6 +180,7 @@ namespace myGPack {
std::memset(this->m_roundKeys[round], 0, sizeof(this->m_roundKeys[round]));
unsigned bitsPerGroup = 6;
for (unsigned i = 0; i < 48; ++i) {
std::uint8_t bit = s_keyCompression[i] - 1;
unsigned byte;
@ -191,7 +192,7 @@ namespace myGPack {
}
if (halves[byte] & s_bitMasks[bit & 7]) {
this->m_roundKeys[round][i / 6] |= s_bitMasks[i % 6];
this->m_roundKeys[round][i / bitsPerGroup] |= s_bitMasks[i % bitsPerGroup];
}
}
}