The CRUCC 24 tool uses that same formula backwards. You type in the Serial Number (e.g., M123456 ), hit calculate, and— poof —it spits out a 4-digit code.
Originally built as a comprehensive tool for car audio professionals rather than a simple consumer app. Important "Free Download" Warning
The "24" version might not support your specific hardware revision. Try searching for "CRUCC 23" or "CRUCC 25."