Created
May 13, 2021 17:12
-
-
Save Saket-Upadhyay/b8d0c640e0607ce1b0dce843c55e61af to your computer and use it in GitHub Desktop.
Code that checks for mod7 in Windows95 product key check function in setupx.dll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//reversed by x64mayhem for educational purpose only. | |
bool __cdecl16far MOD7check(char *param_1,undefined2 param_2) | |
{ | |
int IndexCounter; | |
int SUM; | |
char character; | |
IndexCounter = 0; | |
SUM = 0; | |
while( true ) { | |
character = *param_1; | |
if ((character < '0') || ('9' < character)) break; | |
/* Convert Char to Int ?? */ | |
SUM = SUM + character + -48; | |
IndexCounter = IndexCounter + 1; | |
param_1 = param_1 + 1; | |
if (6 < IndexCounter) { | |
return SUM % 7 == 0; | |
} | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment