solved new crackme

This commit is contained in:
Chenx221 2024-11-08 14:36:15 +08:00
parent 753bef8589
commit 82372320dc
Signed by: chenx221
GPG Key ID: D7A9EC07024C3021
13 changed files with 789 additions and 0 deletions

3
Cerberus/info.txt Normal file
View File

@ -0,0 +1,3 @@
This is my first keygen.
It's written in visual c++.
You have to make a keygen and a tutorial.

BIN
Cerberus/keygen.exe Normal file

Binary file not shown.

View File

@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v8.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v8.0": {
"sp_keygen/1.0.0": {
"runtime": {
"sp_keygen.dll": {}
}
}
}
},
"libraries": {
"sp_keygen/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,13 @@
{
"runtimeOptions": {
"tfm": "net8.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0"
},
"configProperties": {
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

287
Cerberus/solve.md Normal file
View File

@ -0,0 +1,287 @@
算密钥
先上算法:
```c#
//判断空判断长度这里省略
public static string CalcSerial(string name)
{
int name_length = name.Length;
int esi = 0x18;
int ebx = 0x400;
int ebp = 0x32;
int ecx = name_length;
int eax, edx, edi, v10 = 0;
foreach (char c in name)
{
eax = c;
eax += 0x56B;
edx = eax;
edx ^= 0x890428;
esi += edx;
edx = name[3];
if (ecx <= 9)
{
edx += ecx;
edx ^= 0x209;
edx *= esi;
ebx += edx;
}
else
{
edx += ecx;
edx ^= 0x209;
edx *= ebx;
esi += edx;
}
edx = eax;
edx <<= 7;
edx += eax;
eax += edx * 8;
v10 = ebx + eax * 4;
ebx = v10; //first loop not run
}
string temp = name;
for (edi = 5; edi > 0; edi--)
{
eax = temp[edi];
ebp = eax + ebp + 0x134A;
temp = Fun_403c80(temp);
}
string temp2 = temp; //edx
edi = 1;
for (ebx = 5; ebx > 0; ebx--)
{
ecx = temp2[0];
eax = temp2[edi];
eax += 0x23;
ebp += ecx + 0x134A;
ecx = eax * 3;
ecx *= 5;
edx = ecx * 5;
eax += edx * 4;
esi += eax * 2;
temp2 = Fun_403c80(temp2);
edi++;
}
edx = temp2[5];
eax = 0x18;
ecx = v10;
eax -= edx;
ebp += ecx;
edx = temp2[2];
eax ^= ebp;
esi += 0x3c;
int eax2 = 0x1337;
eax2 -= edx;
eax2 ^= esi;
return $"LNT-{eax2}-{eax}"; //user32._wsprintfA(edx,"%s-%d-%d","LNT",eax2,eax); //esi
}
//反转字符串
public static string Fun_403c80(string name)
{
return new string(name.Reverse().ToArray());
}
```
测试密钥:
```
chenx221
LNT-72236375--441384786
```
细节:
```assembly
00401130 | 0F85 36020000 | jne keygen.40136C |
00401136 | 8B9424 78010000 | mov edx,dword ptr ss:[esp+178] | edx:EntryPoint
0040113D | 8D4C24 18 | lea ecx,dword ptr ss:[esp+18] | ecx:EntryPoint
00401141 | 6A 32 | push 32 |
00401143 | 51 | push ecx | ecx:EntryPoint
00401144 | 68 E8030000 | push 3E8 |
00401149 | 52 | push edx | edx:EntryPoint
0040114A | FF15 9C404000 | call dword ptr ds:[<GetDlgItemText |
00401150 | 8D7C24 18 | lea edi,dword ptr ss:[esp+18] | Name
00401154 | 83C9 FF | or ecx,FFFFFFFF | ecx:EntryPoint
00401157 | 33C0 | xor eax,eax |
00401159 | F2:AE | repne scasb |
0040115B | F7D1 | not ecx | ecx:EntryPoint
0040115D | 49 | dec ecx | ecx:EntryPoint
0040115E | 83F9 05 | cmp ecx,5 | ecx:EntryPoint
00401161 | 7D 29 | jge keygen.40118C | name.length > 4
00401163 | 8B8424 78010000 | mov eax,dword ptr ss:[esp+178] |
0040116A | 6A 30 | push 30 |
0040116C | 68 F0504000 | push keygen.4050F0 | 4050F0:"Cerberus Keygen"
00401171 | 68 A4504000 | push keygen.4050A4 | 4050A4:"Sorry name must be over 4 characters"
00401176 | 50 | push eax |
00401177 | FF15 98404000 | call dword ptr ds:[<MessageBoxA>] |
0040117D | 5F | pop edi | edi:EntryPoint
0040117E | 5E | pop esi | esi:EntryPoint
0040117F | 5D | pop ebp |
00401180 | 33C0 | xor eax,eax |
00401182 | 5B | pop ebx |
00401183 | 81C4 64010000 | add esp,164 |
00401189 | C2 1000 | ret 10 |
0040118C | 33FF | xor edi,edi | edi:EntryPoint
0040118E | 85C9 | test ecx,ecx | ecx:EntryPoint
00401190 | 7E 56 | jle keygen.4011E8 |
00401192 | EB 04 | jmp keygen.401198 |
00401194 | 8B5C24 10 | mov ebx,dword ptr ss:[esp+10] | loop start
00401198 | 0FBE443C 18 | movsx eax,byte ptr ss:[esp+edi+18] |
0040119D | 05 6B050000 | add eax,56B |
004011A2 | 8BD0 | mov edx,eax | edx:EntryPoint
004011A4 | 81F2 28048900 | xor edx,890428 | edx:EntryPoint
004011AA | 03F2 | add esi,edx | esi:EntryPoint, edx:EntryPoint
004011AC | 83F9 09 | cmp ecx,9 | length
004011AF | 0FBE5424 1B | movsx edx,byte ptr ss:[esp+1B] | edx:EntryPoint
004011B4 | 7E 0F | jle keygen.4011C5 |
004011B6 | 03D1 | add edx,ecx | edx:EntryPoint, ecx:EntryPoint
004011B8 | 81F2 09020000 | xor edx,209 | edx:EntryPoint
004011BE | 0FAFD3 | imul edx,ebx | edx:EntryPoint
004011C1 | 03F2 | add esi,edx | esi:EntryPoint, edx:EntryPoint
004011C3 | EB 0D | jmp keygen.4011D2 |
004011C5 | 03D1 | add edx,ecx | edx:EntryPoint, ecx:EntryPoint
004011C7 | 81F2 09020000 | xor edx,209 | edx:EntryPoint
004011CD | 0FAFD6 | imul edx,esi | edx:EntryPoint, esi:EntryPoint
004011D0 | 03DA | add ebx,edx | edx:EntryPoint
004011D2 | 8BD0 | mov edx,eax | edx:EntryPoint
004011D4 | C1E2 07 | shl edx,7 | edx:EntryPoint
004011D7 | 03D0 | add edx,eax | edx:EntryPoint
004011D9 | 47 | inc edi | edi:EntryPoint
004011DA | 3BF9 | cmp edi,ecx | edi:EntryPoint, ecx:EntryPoint
004011DC | 8D04D0 | lea eax,dword ptr ds:[eax+edx*8] |
004011DF | 8D1483 | lea edx,dword ptr ds:[ebx+eax*4] | edx:EntryPoint
004011E2 | 895424 10 | mov dword ptr ss:[esp+10],edx | [esp+10]:___RtlUserThreadStart@8+2B, edx:EntryPoint
004011E6 | 7C AC | jl keygen.401194 | next loop
004011E8 | BF 05000000 | mov edi,5 | edi:EntryPoint
004011ED | 0FBE443C 18 | movsx eax,byte ptr ss:[esp+edi+18] |
004011F2 | 8D4C24 18 | lea ecx,dword ptr ss:[esp+18] | ecx:EntryPoint
004011F6 | 51 | push ecx | ecx:EntryPoint
004011F7 | 8DAC28 4A130000 | lea ebp,dword ptr ds:[eax+ebp+134A |
004011FE | E8 7D2A0000 | call keygen.403C80 |
00401203 | 83C4 04 | add esp,4 |
00401206 | 4F | dec edi | edi:EntryPoint
00401207 | 85FF | test edi,edi | edi:EntryPoint
00401209 | 7F E2 | jg keygen.4011ED |
0040120B | 8D543C 18 | lea edx,dword ptr ss:[esp+edi+18] | edx:EntryPoint
0040120F | 8D7C24 19 | lea edi,dword ptr ss:[esp+19] | edi:EntryPoint
00401213 | 895424 14 | mov dword ptr ss:[esp+14],edx | edx:EntryPoint
00401217 | BB 05000000 | mov ebx,5 |
0040121C | 8B4424 14 | mov eax,dword ptr ss:[esp+14] |
00401220 | 0FBE08 | movsx ecx,byte ptr ds:[eax] | ecx:EntryPoint
00401223 | 0FBE07 | movsx eax,byte ptr ds:[edi] | edi:EntryPoint
00401226 | 83C0 23 | add eax,23 |
00401229 | 8DAC29 4A130000 | lea ebp,dword ptr ds:[ecx+ebp+134A |
00401230 | 8D0C40 | lea ecx,dword ptr ds:[eax+eax*2] | ecx:EntryPoint
00401233 | 8D0C89 | lea ecx,dword ptr ds:[ecx+ecx*4] | ecx:EntryPoint
00401236 | 8D1489 | lea edx,dword ptr ds:[ecx+ecx*4] | edx:EntryPoint
00401239 | 8D4C24 18 | lea ecx,dword ptr ss:[esp+18] | ecx:EntryPoint
0040123D | 51 | push ecx | ecx:EntryPoint
0040123E | 8D0490 | lea eax,dword ptr ds:[eax+edx*4] |
00401241 | 8D3446 | lea esi,dword ptr ds:[esi+eax*2] | esi:EntryPoint
00401244 | E8 372A0000 | call keygen.403C80 |
00401249 | 83C4 04 | add esp,4 |
0040124C | 47 | inc edi | edi:EntryPoint
0040124D | 4B | dec ebx |
0040124E | 75 CC | jne keygen.40121C |
00401250 | 0FBE5424 1D | movsx edx,byte ptr ss:[esp+1D] | edx:EntryPoint
00401255 | 8B4C24 10 | mov ecx,dword ptr ss:[esp+10] | ecx:EntryPoint, [esp+10]:___RtlUserThreadStart@8+2B
00401259 | B8 18000000 | mov eax,18 |
0040125E | 2BC2 | sub eax,edx | edx:EntryPoint
00401260 | 03E9 | add ebp,ecx | ecx:EntryPoint
00401262 | 0FBE5424 1A | movsx edx,byte ptr ss:[esp+1A] | edx:EntryPoint
00401267 | 33C5 | xor eax,ebp |
00401269 | 83C6 3C | add esi,3C | esi:EntryPoint
0040126C | 50 | push eax |
0040126D | B8 37130000 | mov eax,1337 |
00401272 | 2BC2 | sub eax,edx | edx:EntryPoint
00401274 | 8D8C24 B0000000 | lea ecx,dword ptr ss:[esp+B0] | ecx:EntryPoint
0040127B | 33C6 | xor eax,esi | esi:EntryPoint
0040127D | 8D9424 14010000 | lea edx,dword ptr ss:[esp+114] | edx:EntryPoint
00401284 | 50 | push eax |
00401285 | 51 | push ecx | ecx:EntryPoint
00401286 | 68 98504000 | push keygen.405098 | 405098:"%s-%d-%d"
0040128B | 52 | push edx | edx:EntryPoint
0040128C | FF15 A0404000 | call dword ptr ds:[<wsprintfA>] |
00401292 | 8BBC24 8C010000 | mov edi,dword ptr ss:[esp+18C] | edi:EntryPoint
00401299 | 8B35 9C404000 | mov esi,dword ptr ds:[<GetDlgItemT | esi:EntryPoint
0040129F | 83C4 14 | add esp,14 |
004012A2 | 8D4424 48 | lea eax,dword ptr ss:[esp+48] |
004012A6 | 6A 64 | push 64 |
004012A8 | 50 | push eax |
004012A9 | 68 EA030000 | push 3EA |
004012AE | 57 | push edi | edi:EntryPoint
004012AF | FFD6 | call esi | esi:EntryPoint
004012B1 | 8D4C24 48 | lea ecx,dword ptr ss:[esp+48] | serial
004012B5 | 6A 64 | push 64 |
004012B7 | 51 | push ecx | ecx:EntryPoint
004012B8 | 68 EA030000 | push 3EA |
004012BD | 57 | push edi | edi:EntryPoint
004012BE | FFD6 | call esi | esi:EntryPoint
004012C0 | 85C0 | test eax,eax |
004012C2 | 75 22 | jne keygen.4012E6 | serial不能为空
004012C4 | 6A 30 | push 30 |
004012C6 | 68 F0504000 | push keygen.4050F0 | 4050F0:"Cerberus Keygen"
004012CB | 68 7C504000 | push keygen.40507C | 40507C:"You have to enter a serial"
004012D0 | 57 | push edi | edi:EntryPoint
004012D1 | FF15 98404000 | call dword ptr ds:[<MessageBoxA>] |
004012D7 | 5F | pop edi | edi:EntryPoint
004012D8 | 5E | pop esi | esi:EntryPoint
004012D9 | 5D | pop ebp |
004012DA | 33C0 | xor eax,eax |
004012DC | 5B | pop ebx |
004012DD | 81C4 64010000 | add esp,164 |
004012E3 | C2 1000 | ret 10 |
004012E6 | 8DB424 10010000 | lea esi,dword ptr ss:[esp+110] | esi:EntryPoint
004012ED | 8D4424 48 | lea eax,dword ptr ss:[esp+48] |
004012F1 | 8A10 | mov dl,byte ptr ds:[eax] |
004012F3 | 8A1E | mov bl,byte ptr ds:[esi] | esi:EntryPoint
004012F5 | 8ACA | mov cl,dl |
004012F7 | 3AD3 | cmp dl,bl |
004012F9 | 75 1E | jne keygen.401319 |
004012FB | 84C9 | test cl,cl |
004012FD | 74 16 | je keygen.401315 |
004012FF | 8A50 01 | mov dl,byte ptr ds:[eax+1] |
00401302 | 8A5E 01 | mov bl,byte ptr ds:[esi+1] |
00401305 | 8ACA | mov cl,dl |
00401307 | 3AD3 | cmp dl,bl |
00401309 | 75 0E | jne keygen.401319 |
0040130B | 83C0 02 | add eax,2 |
0040130E | 83C6 02 | add esi,2 | esi:EntryPoint
00401311 | 84C9 | test cl,cl |
00401313 | 75 DC | jne keygen.4012F1 |
00401315 | 33C0 | xor eax,eax |
00401317 | EB 05 | jmp keygen.40131E |
00401319 | 1BC0 | sbb eax,eax |
0040131B | 83D8 FF | sbb eax,FFFFFFFF |
0040131E | 85C0 | test eax,eax |
00401320 | 75 25 | jne keygen.401347 |
00401322 | 6A 40 | push 40 |
00401324 | 68 F0504000 | push keygen.4050F0 | 4050F0:"Cerberus Keygen"
00401329 | 68 44504000 | push keygen.405044 | 405044:"Good job cracker!\n\nNow write a keygen and a tutorial."
0040132E | 57 | push edi | edi:EntryPoint
0040132F | FF15 98404000 | call dword ptr ds:[<MessageBoxA>] |
00401335 | 5F | pop edi | edi:EntryPoint
00401336 | 5E | pop esi | esi:EntryPoint
00401337 | 5D | pop ebp |
00401338 | B8 01000000 | mov eax,1 |
0040133D | 5B | pop ebx |
0040133E | 81C4 64010000 | add esp,164 |
00401344 | C2 1000 | ret 10 |
00401347 | 6A 10 | push 10 |
00401349 | 68 F0504000 | push keygen.4050F0 | 4050F0:"Cerberus Keygen"
0040134E | 68 30504000 | push keygen.405030 | 405030:"Wrong!\n\nTry again!"
00401353 | 57 | push edi | edi:EntryPoint
00401354 | FF15 98404000 | call dword ptr ds:[<MessageBoxA>] |
0040135A | 5F | pop edi | edi:EntryPoint
0040135B | 5E | pop esi | esi:EntryPoint
0040135C | 5D | pop ebp |
0040135D | B8 01000000 | mov eax,1 |
00401362 | 5B | pop ebx |
00401363 | 81C4 64010000 | add esp,164 |
00401369 | C2 1000 | ret 10 |
```
(按钮事件 EP往上翻一点就到了)

163
Cerberus/source/keygen1.sln Normal file
View File

@ -0,0 +1,163 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.11.35303.130
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "keygen1", "keygen1\keygen1.csproj", "{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "keygen2", "keygen2\keygen2.csproj", "{2446CB50-1882-4219-9DB0-E7F5517E6E20}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "keygen3", "keygen3\keygen3.csproj", "{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GiveMeSerial", "GiveMeSerial\GiveMeSerial.vcxproj", "{E3604156-7DF2-4B5F-AECA-64786B92F38C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DllInjector", "DllInjector\DllInjector.csproj", "{A5A24406-1296-457B-91A3-60E67511D807}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GetSerial", "GetSerial\GetSerial.vcxproj", "{85044A5C-C4A3-4C79-9AD5-6895F61F8515}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GuessSerial", "GuessSerial\GuessSerial.csproj", "{7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Validator", "Validator\Validator.csproj", "{6BE1ED72-6CA9-4442-B529-C867A9D6904C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FindKey", "FindKey\FindKey.csproj", "{D5E3C871-EA87-48E7-9287-E96B8410EB18}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sp_keygen", "sp_keygen\sp_keygen.csproj", "{D6614743-D01E-4899-A5E7-B4E45BD1B033}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Debug|x64.ActiveCfg = Debug|Any CPU
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Debug|x64.Build.0 = Debug|Any CPU
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Debug|x86.ActiveCfg = Debug|x86
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Debug|x86.Build.0 = Debug|x86
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Release|Any CPU.Build.0 = Release|Any CPU
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Release|x64.ActiveCfg = Release|x64
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Release|x64.Build.0 = Release|x64
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Release|x86.ActiveCfg = Release|x86
{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Release|x86.Build.0 = Release|x86
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Debug|x64.ActiveCfg = Debug|x64
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Debug|x64.Build.0 = Debug|x64
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Debug|x86.ActiveCfg = Debug|x86
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Debug|x86.Build.0 = Debug|x86
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Release|Any CPU.Build.0 = Release|Any CPU
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Release|x64.ActiveCfg = Release|x64
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Release|x64.Build.0 = Release|x64
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Release|x86.ActiveCfg = Release|x86
{2446CB50-1882-4219-9DB0-E7F5517E6E20}.Release|x86.Build.0 = Release|x86
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Debug|x64.ActiveCfg = Debug|Any CPU
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Debug|x64.Build.0 = Debug|Any CPU
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Debug|x86.ActiveCfg = Debug|x86
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Debug|x86.Build.0 = Debug|x86
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Release|Any CPU.Build.0 = Release|Any CPU
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Release|x64.ActiveCfg = Release|x64
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Release|x64.Build.0 = Release|x64
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Release|x86.ActiveCfg = Release|x86
{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Release|x86.Build.0 = Release|x86
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Debug|Any CPU.ActiveCfg = Debug|x64
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Debug|Any CPU.Build.0 = Debug|x64
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Debug|x64.ActiveCfg = Debug|x64
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Debug|x64.Build.0 = Debug|x64
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Debug|x86.ActiveCfg = Debug|Win32
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Debug|x86.Build.0 = Debug|Win32
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Release|Any CPU.ActiveCfg = Release|x64
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Release|Any CPU.Build.0 = Release|x64
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Release|x64.ActiveCfg = Release|x64
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Release|x64.Build.0 = Release|x64
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Release|x86.ActiveCfg = Release|Win32
{E3604156-7DF2-4B5F-AECA-64786B92F38C}.Release|x86.Build.0 = Release|Win32
{A5A24406-1296-457B-91A3-60E67511D807}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A5A24406-1296-457B-91A3-60E67511D807}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A5A24406-1296-457B-91A3-60E67511D807}.Debug|x64.ActiveCfg = Debug|Any CPU
{A5A24406-1296-457B-91A3-60E67511D807}.Debug|x64.Build.0 = Debug|Any CPU
{A5A24406-1296-457B-91A3-60E67511D807}.Debug|x86.ActiveCfg = Debug|Any CPU
{A5A24406-1296-457B-91A3-60E67511D807}.Debug|x86.Build.0 = Debug|Any CPU
{A5A24406-1296-457B-91A3-60E67511D807}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A5A24406-1296-457B-91A3-60E67511D807}.Release|Any CPU.Build.0 = Release|Any CPU
{A5A24406-1296-457B-91A3-60E67511D807}.Release|x64.ActiveCfg = Release|x64
{A5A24406-1296-457B-91A3-60E67511D807}.Release|x64.Build.0 = Release|x64
{A5A24406-1296-457B-91A3-60E67511D807}.Release|x86.ActiveCfg = Release|x86
{A5A24406-1296-457B-91A3-60E67511D807}.Release|x86.Build.0 = Release|x86
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Debug|Any CPU.ActiveCfg = Debug|x64
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Debug|Any CPU.Build.0 = Debug|x64
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Debug|x64.ActiveCfg = Debug|x64
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Debug|x64.Build.0 = Debug|x64
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Debug|x86.ActiveCfg = Debug|Win32
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Debug|x86.Build.0 = Debug|Win32
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Release|Any CPU.ActiveCfg = Release|x64
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Release|Any CPU.Build.0 = Release|x64
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Release|x64.ActiveCfg = Release|x64
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Release|x64.Build.0 = Release|x64
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Release|x86.ActiveCfg = Release|Win32
{85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Release|x86.Build.0 = Release|Win32
{7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Debug|x64.ActiveCfg = Debug|Any CPU
{7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Debug|x64.Build.0 = Debug|Any CPU
{7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Debug|x86.ActiveCfg = Debug|Any CPU
{7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Debug|x86.Build.0 = Debug|Any CPU
{7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Release|Any CPU.Build.0 = Release|Any CPU
{7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Release|x64.ActiveCfg = Release|x64
{7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Release|x64.Build.0 = Release|x64
{7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Release|x86.ActiveCfg = Release|x86
{7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Release|x86.Build.0 = Release|x86
{6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Debug|x64.ActiveCfg = Debug|Any CPU
{6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Debug|x64.Build.0 = Debug|Any CPU
{6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Debug|x86.ActiveCfg = Debug|Any CPU
{6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Debug|x86.Build.0 = Debug|Any CPU
{6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Release|Any CPU.Build.0 = Release|Any CPU
{6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Release|x64.ActiveCfg = Release|x64
{6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Release|x64.Build.0 = Release|x64
{6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Release|x86.ActiveCfg = Release|x86
{6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Release|x86.Build.0 = Release|x86
{D5E3C871-EA87-48E7-9287-E96B8410EB18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D5E3C871-EA87-48E7-9287-E96B8410EB18}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5E3C871-EA87-48E7-9287-E96B8410EB18}.Debug|x64.ActiveCfg = Debug|Any CPU
{D5E3C871-EA87-48E7-9287-E96B8410EB18}.Debug|x64.Build.0 = Debug|Any CPU
{D5E3C871-EA87-48E7-9287-E96B8410EB18}.Debug|x86.ActiveCfg = Debug|Any CPU
{D5E3C871-EA87-48E7-9287-E96B8410EB18}.Debug|x86.Build.0 = Debug|Any CPU
{D5E3C871-EA87-48E7-9287-E96B8410EB18}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5E3C871-EA87-48E7-9287-E96B8410EB18}.Release|Any CPU.Build.0 = Release|Any CPU
{D5E3C871-EA87-48E7-9287-E96B8410EB18}.Release|x64.ActiveCfg = Release|x64
{D5E3C871-EA87-48E7-9287-E96B8410EB18}.Release|x64.Build.0 = Release|x64
{D5E3C871-EA87-48E7-9287-E96B8410EB18}.Release|x86.ActiveCfg = Release|x86
{D5E3C871-EA87-48E7-9287-E96B8410EB18}.Release|x86.Build.0 = Release|x86
{D6614743-D01E-4899-A5E7-B4E45BD1B033}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D6614743-D01E-4899-A5E7-B4E45BD1B033}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D6614743-D01E-4899-A5E7-B4E45BD1B033}.Debug|x64.ActiveCfg = Debug|Any CPU
{D6614743-D01E-4899-A5E7-B4E45BD1B033}.Debug|x64.Build.0 = Debug|Any CPU
{D6614743-D01E-4899-A5E7-B4E45BD1B033}.Debug|x86.ActiveCfg = Debug|Any CPU
{D6614743-D01E-4899-A5E7-B4E45BD1B033}.Debug|x86.Build.0 = Debug|Any CPU
{D6614743-D01E-4899-A5E7-B4E45BD1B033}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D6614743-D01E-4899-A5E7-B4E45BD1B033}.Release|Any CPU.Build.0 = Release|Any CPU
{D6614743-D01E-4899-A5E7-B4E45BD1B033}.Release|x64.ActiveCfg = Release|Any CPU
{D6614743-D01E-4899-A5E7-B4E45BD1B033}.Release|x64.Build.0 = Release|Any CPU
{D6614743-D01E-4899-A5E7-B4E45BD1B033}.Release|x86.ActiveCfg = Release|Any CPU
{D6614743-D01E-4899-A5E7-B4E45BD1B033}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {01ED3EE8-E89A-4A27-AF68-EF2490CB6BD7}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,103 @@
namespace sp_keygen
{
internal class Program
{
static void Main()
{
Console.Write("Name: ");
string? name = Console.ReadLine();
if (string.IsNullOrEmpty(name))
{
Console.WriteLine("Please input name.");
return;
}
else if (name.Length <= 4)
{
Console.WriteLine("Name must be longer than 4 characters.");
return;
}
Console.WriteLine($"Serial: {CalcSerial(name)}");
Console.ReadKey();
}
public static string CalcSerial(string name)
{
int name_length = name.Length;
int esi = 0x18;
int ebx = 0x400;
int ebp = 0x32;
int ecx = name_length;
int eax, edx, edi, v10 = 0;
foreach (char c in name)
{
eax = c;
eax += 0x56B;
edx = eax;
edx ^= 0x890428;
esi += edx;
edx = name[3];
if (ecx <= 9)
{
edx += ecx;
edx ^= 0x209;
edx *= esi;
ebx += edx;
}
else
{
edx += ecx;
edx ^= 0x209;
edx *= ebx;
esi += edx;
}
edx = eax;
edx <<= 7;
edx += eax;
eax += edx * 8;
v10 = ebx + eax * 4;
ebx = v10; //first loop not run
}
string temp = name;
for (edi = 5; edi > 0; edi--)
{
eax = temp[edi];
ebp = eax + ebp + 0x134A;
temp = Fun_403c80(temp);
}
string temp2 = temp; //edx
edi = 1;
for (ebx = 5; ebx > 0; ebx--)
{
ecx = temp2[0];
eax = temp2[edi];
eax += 0x23;
ebp += ecx + 0x134A;
ecx = eax * 3;
ecx *= 5;
edx = ecx * 5;
eax += edx * 4;
esi += eax * 2;
temp2 = Fun_403c80(temp2);
edi++;
}
edx = temp2[5];
eax = 0x18;
ecx = v10;
eax -= edx;
ebp += ecx;
edx = temp2[2];
eax ^= ebp;
esi += 0x3c;
int eax2 = 0x1337;
eax2 -= edx;
eax2 ^= esi;
return $"LNT-{eax2}-{eax}"; //user32._wsprintfA(edx,"%s-%d-%d","LNT",eax2,eax); //esi
}
//反转字符串
public static string Fun_403c80(string name)
{
return new string(name.Reverse().ToArray());
}
}
}

View File

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace sp_keygen.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("sp_keygen.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,8 @@
{
"profiles": {
"sp_keygen": {
"commandName": "Project",
"commandLineArgs": "chenx221\r\n123-456-789-X"
}
}
}

View File

@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>