nightxyz on 8:57 PM 11/08/2024: pseudo code:
var1 = length of name
looptimes = var1
repeat looptimes
{
var1 = (var1 * 19660Dh) + 3C6EF35Fh
char result array[] = (var1 mod 5Eh) + 21h
}
split result with xxxx-xxxx-xxxx... format or xxxx-xx if odd length of input name.
if result hex value contains letter like 7A, 4B etc.. then add 0Ch to that value. For example 7A becomes 7M, 3B becomes 3N.
3B645B becomes 3N64-5N
havok on 1:58 AM 11/10/2024: using python I was able to Generate a Serial for 'havok': 6370-697M-47
multiplier = 0x19660D
increment = 0x3C6EF35F
modulus = 2 ** 32 # Sets the range for numbers / 32 bit
return (seed * multiplier + increment) % modulus
Solution by Berardinis: Unpacked the executable:
upx -d Trycrackme1.exe -o TryCrackMe-unpack.exe
Analyzed the algorithm in IDA Pro, focusing on the following functions:
sub_466C74
sub_466CB8
sub_4669AC
sub_466B40
sub_466B64
sub_466A7C
Wrote a serial code generator in Python.
Here's an example of its output:
python serial_gen.py Example
2025-06-02 05:00:01,389 [INFO] Seed initialised to username length: 7
Example → 2P7O-437O-5N54-6R