I have a keystore file from an old ellipal wallet with some eth with it. The corresponding password is correct (I can use it to display the private key and keystore in it) and I can also run the following code with that password.
const fs = require("fs");
const keythereum = require("keythereum");
const KEYSTORE = "KeystoreFileName";
const PASSWORD = "YourPassword";
const keyObject = JSON.parse(fs.readFileSync(KEYSTORE, {encoding: "utf8"}));
const privateKey = keythereum.recover(PASSWORD, keyObject).toString("hex");
console.log(`0x${keyObject.address}: 0x${privateKey}`);
But the problem with all these methods is: I get an unusable private key containing the start being 0xffffff.... and then some chars/numbers. When I inspect the QR code it looks off and it will not get recognised by Metamask or other programs. The bottom right corner looks damaged which seems to be because of these many ffffff. Sending out from the ellipal wallet also does not work (obviously since the private key seems damaged).
I thought about changing some decryption parameters in the keystore file but no idea if that would yield success.
What can I do with this?