This commit is contained in:
bnnm 2023-10-14 20:01:38 +02:00
parent c45f8bcf30
commit 9da77e4f87
2 changed files with 3 additions and 2 deletions

View File

@ -480,7 +480,8 @@ fail:
return 0;
}
/* ktsr engine reads+decrypts in the same func based on passed flag tho (reversed from exe) */
/* ktsr engine reads+decrypts in the same func based on passed flag tho (reversed from exe)
* Strings are usually ASCII but Shift-JIS is used in rare cases (0x0c3e2edf.srsa) */
static void decrypt_string_ktsr(char* buf, size_t buf_size, uint32_t seed) {
for (int i = 0; i < buf_size - 1; i++) {
if (!buf[i]) /* just in case */

View File

@ -67,7 +67,7 @@ void vgm_log_set_callback(void* ctx_p, int level, int type, void* callback);
do { \
int i; \
for (i=0; i < buf_size; i++) { \
printf("%02x",buf[i]); \
printf("%02x",buf[i] & 0xFF); \
if (bytes_per_line && (i+1) % bytes_per_line == 0) printf("\n"); \
} \
printf("\n"); \