解密gameguard*.ini,*.cfg文件源码 ctce8.cfg 解密

//DelphiSource
unitUnit6;

{
C:ProgramFiles(x86)WEBZENMuGameGuardMuEng.ini

[GAMEMON]
GAME_NAME=MuEng
UPDATE_SERVER=nprotect.muonline.webzen.net
UPDATE_PATH=/GameGuard/MUGlobal/RealServer/
BACKUP_SERVER=
BACKUP_PATH=
OPTION_VALUE=0
SPEEDCHECK_INTERVAL=1000
GAMECRC=1
USE_GGSCAN=1
SENDERRLOG=3
LOG_SERVER=211.215.21.138
LIMIT_TYAVPDOWN=10
CHECK_GAMEBLOCK=1
USB_EJECT=1


C:ProgramFiles(x86)WEBZENMuMuEngTest.ini
[GAMEMON]
GAME_NAME=MuEngTest
UPDATE_SERVER=nprotect.muonline.webzen.net
UPDATE_PATH=/GameGuard/MUGlobal/TestServer/
BACKUP_SERVER=
BACKUP_PATH=
OPTION_VALUE=0
SPEEDCHECK_INTERVAL=1000
SENDERL=1
GAMECRC=1
USE_GGSCAN=1
SENDERRLOG=3
USE_PROXY=1
REVISION=47
LOG_SERVER=211.233.43.45


C:GamesMU1_08A+_FullMu.ini
[GAMEMON]
GAME_NAME=Mu
UPDATE_SERVER=npro-mu.nefficient.co.kr
UPDATE_PATH=/nProtect/GameGuard/MU/RealServer/
BACKUP_SERVER=
BACKUP_PATH=
OPTION_VALUE=0
SPEEDCHECK_INTERVAL=1000
SENDERL=1
GAMECRC=1
SENDERRLOG=1
USE_GGSCAN=1
REVISION=47
*)

interface

uses
Winapi.Windows,Winapi.Messages,System.SysUtils,System.Variants,
解密gameguard*.ini,*.cfg文件源码 ctce8.cfg 解密
System.Classes,Vcl.Graphics,
Vcl.Controls,Vcl.Forms,Vcl.Dialogs,Vcl.StdCtrls,wcrypt2;

type
TForm6=class(TForm)
Button1:TButton;
Memo1:TMemo;
procedureButton1Click(Sender:TObject);
private
{Privatedeclarations}
public
{Publicdeclarations}
end;

var
Form6:TForm6;

implementation

{$R*.dfm}

{
Offset0123456789ABCDEF

000001904D752E696E69Mu.ini
000001A0006EA10959E65630CE02653C325E44FEnYęV0Īe<2^Dž
000001B02F67478CFAA8C8BC5F1D461DF4A55767/gGŒśØČ¼_FōWg
000001C0AC7ECB7B47D464F94D265BC0CD92D917¬~Ė{GŌdłM&[ĄĶ’Ł
000001D0AEE206149454690A9F9E30AFA2F4B3B2®ā”TiŸ˛0Æ¢ō³²
000001E068222681320700000040000000212681h"&2@!&
000001F0322
}

procedureTForm6.Button1Click(Sender:TObject);
type
TGameGuard_Header=packedrecord
FirstSignature:Cardinal;
FileNameSize:Cardinal;
SignatureSize:Cardinal;
SecondSignature:Cardinal;
end;
PGameGuard_Header=^TGameGuard_Header;

const
FPUBKEY:array[0..83]ofByte=(
$06,$02,$00,$00,$00,$24,$00,$00,$52,$53,$41,$31,$00,$02,$00,
$00,$01,$00,$01,$00,$FB,$E3,$FC,$09,$AF,$AE,$65,$8C,$96,$4C,
$C5,$37,$D2,$A4,$77,$E7,$4C,$41,$C2,$CF,$F2,$FE,$2D,$9C,$80,
$94,$0C,$88,$6D,$B3,$84,$9F,$8C,$22,$A0,$C9,$CD,$C0,$AB,$30,
$65,$82,$42,$3C,$EE,$3C,$A8,$B7,$11,$D6,$22,$FA,$FB,$23,$F7,
$72,$CD,$E7,$D0,$6F,$6A,$8E,$96,$E3);

KEY:array[0..9]ofByte=($65,$63,$74,$47,$61,$6D,$65,$4D,$6F,$6E);

(*
DataHdr:array[0..89]ofbyte=(
$4D,$75,$45,$6E,$67,$2E,$69,$6E,$69,$00,//name
$35,$3C,$05,$11,$01,$07,$24,$B5,$6A,$19,$B2,$A8,$38,$F6,$BD,$E3,//sig
$21,$7A,$03,$20,$5B,$97,$72,$71,$1F,$36,$48,$B5,$E1,$CB,$9C,$01,//na
$AA,$21,$DE,$CA,$B4,$6E,$D0,$DD,$53,$0B,$11,$A8,$67,$EC,$CD,$E4,//tu
$8D,$BA,$E2,$23,$9C,$74,$E7,$33,$BF,$F6,$9D,$3A,$66,$BC,$1B,$D6,//re

$22,$26,$81,$32,//keyF
$0A,$00,$00,$00,//FileName-10
$40,$00,$00,$00,//Signatureslen-64
$21,$26,$81,$32//KeyS
);
*)

SIGNATURE1=$32812622;
SIGNATURE2=$32812621;
var
Fs:TStream;
Buffer:TBytes;
Header:TGameGuard_Header;

Len:DWORD;
Signature:TBytes;
i:Integer;
Result:string;

hProv:HCRYPTPROV;
hHash:HCRYPTHASH;
hKey:HCRYPTKEY;
begin
try
Fs:=TFileStream.Create('C:UsersRonaldoDownloadsupdate(1).cfg',fmOpenRead);
try
SetLength(Buffer,Fs.Size);
Fs.ReadBuffer(Buffer[0],Length(Buffer));
finally
Fs.Free;
end;
except

end;

Len:=Length(Buffer);
Len:=Len-SizeOf(TGameGuard_Header);
Header:=PGameGuard_Header(@Buffer[Len])^;
Len:=Len-(Header.FileNameSize+Header.SignatureSize);



ifnot(SIGNATURE1=Header.FirstSignature)ornot(SIGNATURE2=Header.SecondSignature)then
MessageDlg('0',mtWarning,[mbOK],0);

SetLength(Signature,Header.SignatureSize);
Move(Buffer[Len+Header.FileNameSize],Signature[0],Length(Signature));

ifnotCryptAcquireContext(@hProv,nil,MS_DEF_PROV,PROV_RSA_FULL,CRYPT_VERIFYCONTEXT)then
MessageDlg('1',mtWarning,[mbOK],0);

ifnotCryptCreateHash(hProv,CALG_MD5,0,0,@hHash)then
MessageDlg('2',mtWarning,[mbOK],0);

ifnotCryptImportKey(hProv,@FPUBKEY[0],SizeOf(FPUBKEY),0,0,@hKey)then
MessageDlg('3',mtWarning,[mbOK],0);

ifnotCryptHashData(hHash,@Buffer[0],len+Header.FileNameSize,0)then
MessageDlg('4',mtWarning,[mbOK],0);

ifnotCryptVerifySignature(hHash,@Signature[0],Header.SignatureSize,hKey,nil,0)then
MessageDlg('5',mtWarning,[mbOK],0);

CryptDestroyKey(hKey);
CryptDestroyHash(hHash);

ifnotCryptCreateHash(hProv,CALG_MD5,0,0,@hHash)then
MessageDlg('6',mtWarning,[mbOK],0);

ifnotCryptHashData(hHash,@KEY[0],SizeOf(KEY),0)then
MessageDlg('7',mtWarning,[mbOK],0);

ifnotCryptDeriveKey(hProv,CALG_RC4,hHash,0,@hKey)then
MessageDlg('8',mtWarning,[mbOK],0);

ifnotCryptDecrypt(hKey,0,True,0,@Buffer[0],@Len)then
MessageDlg('9',mtWarning,[mbOK],0);

CryptDestroyKey(hKey);
CryptDestroyHash(hHash);
CryptReleaseContext(hProv,0);

fori:=0toLen-1do
Result:=Result+Chr(Buffer[i]);

Memo1.Clear;
Memo1.Lines.Add(Result)
end;

end.
//C++Source
#include
#include
#include
#include
#include

#include

#defineVER"0.1"
#defineKEY"ectGameMon"
#defineSIGN10x32812622
#defineSIGN20x32812621
#definePUBKEY"x06x02x00x00x00x24x00x00x52x53x41x31x00x02x00x00"
"x01x00x01x00xFBxE3xFCx09xAFxAEx65x8Cx96x4CxC5x37"
"xD2xA4x77xE7x4Cx41xC2xCFxF2xFEx2Dx9Cx80x94x0Cx88"
"x6DxB3x84x9Fx8Cx22xA0xC9xCDxC0xABx30x65x82x42x3C"
"xEEx3CxA8xB7x11xD6x22xFAxFBx23xF7x72xCDxE7xD0x6F"
"x6Ax8Ex96xE3"


voidstd_err(inttype);


intmain(intargc,char*argv[]){
FILE*fd;
structstatxstat;
HCRYPTPROVhProv;
HCRYPTHASHhHash;
HCRYPTKEYhKey;
DWORDlen;
u_intbuffsz;
u_char*buff,
*input,
*output,
*filename,
*signature;

structgameguard_header{
u_intsign1;
u_intfilename_size;
u_intsignature_size;
u_intsign2;
}*gh=NULL;


setbuf(stdout,NULL);

fputs("n"
"GameGuardfilesdecrypter"VER"n"
"byLuigiAuriemman"
"e-mail:aluigi@autistici.orgn"
"web:aluigi.orgn"
"n",stdout);

if(argc<3){
printf("n"
"Usage:%sn"
"n",argv[0]);
exit(1);
}

input=argv[1];
output=argv[2];

printf("-openinputfile:%sn",input);
fd=fopen(input,"rb");
if(!fd)std_err(0);

fstat(fileno(fd),&xstat);
buffsz=xstat.st_size;
printf("filesize:%un",buffsz);

buff=malloc(buffsz);
if(!buff)std_err(0);
len=fread(buff,1,buffsz,fd);
fclose(fd);

len-=sizeof(structgameguard_header);
gh=(structgameguard_header*)(buff+len);
len-=(gh->filename_size+gh->signature_size);

if((gh->sign1!=SIGN1)||
(gh->sign2!=SIGN2)){
printf("n"
"Alert:thesignsinthefiledon'tmatchthedefaultsigns,Itrytocontinue:n"
"0xx(shouldbe0xx)and0xx(shouldbe0xx)n"
"n",
gh->sign1,SIGN1,
gh->sign2,SIGN2);
}

filename=buff+len;
printf("-built-infilename:%sn",filename);
signature=buff+len+gh->filename_size;

if(!CryptAcquireContext(
&hProv,
NULL,
MS_DEF_PROV,
PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT))std_err(1);



fputs("-verifysignature:",stdout);

if(!CryptCreateHash(
hProv,
CALG_MD5,
0,
0,
&hHash))std_err(1);

if(!CryptImportKey(
hProv,
PUBKEY,
sizeof(PUBKEY)-1,
0,
0,
&hKey))std_err(1);

if(!CryptHashData(
hHash,
buff,
len+gh->filename_size,
0))std_err(1);

if(!CryptVerifySignature(
hHash,
signature,
gh->signature_size,
hKey,
NULL,
0)){
fputs("WRONG!n",stdout);
}else{
fputs("OKn",stdout);
}

CryptDestroyKey(hKey);
CryptDestroyHash(hHash);



if(!CryptCreateHash(
hProv,
CALG_MD5,
0,
0,
&hHash))std_err(1);

if(!CryptHashData(
hHash,
KEY,
sizeof(KEY)-1,
0))std_err(1);

if(!CryptDeriveKey(
hProv,
CALG_RC4,
hHash,
0,
&hKey))std_err(1);

if(!CryptDecrypt(
hKey,
0,
TRUE,
0,
buff,
&len))std_err(1);

printf("-writeoutputfile:%sn",output);
fd=fopen(output,"wb");
if(!fd)std_err(0);
fwrite(buff,len,1,fd);
fclose(fd);

CryptDestroyKey(hKey);
CryptDestroyHash(hHash);
CryptReleaseContext(hProv,0);
free(buff);
fputs("-Finishedn",stdout);
return(0);
}



voidstd_err(inttype){
if(type){
printf("n"
"Error:errorduringtheusageofthecryptography(0x%lx)n"
"IfyoureceivedasignerrorbeforemeansthisisnotavalidGameGuardn"
"INIfilen"
"n",GetLastError());
}else{
perror("nError");
}
exit(1);
}

  

爱华网本文地址 » http://www.aihuau.com/a/25101016/323723.html

更多阅读

股票公式全解析:16 股票软件源码引入

股票公式全解析:[16]股票软件源码引入——简介我们上一篇文章主要说明了大智慧的源码引入的基本方法,大家在使用这个源码的时候一定要注意具体的设置,按照我的要求一步一步实现,源码的编写我会专门有一个介绍,现在我继续说明其他股票软件

易语言进度条源码 精易论坛

易语言进度条源码——简介今天,我给大家带来如何弄进度条!易语言进度条源码——工具/原料电脑易语言易语言进度条源码——方法/步骤易语言进度条源码 1、打开易语言!拉

声明:《解密gameguard*.ini,*.cfg文件源码 ctce8.cfg 解密》为网友尼古丁有分享!如侵犯到您的合法权益请联系我们删除