能力值:
( LV2,RANK:10 )
|
-
-
2 楼
这个是InitGame函数:
int InitGame()
{
unsigned __int16 seed;
int result;
int v2;
HWND hWnd;
HDC hDC;
HDC hDC1;
int v6;
HWND hWnd1;
DWORD dwDisposition;
seed = GetTickCount();
srand(seed); //用时间当做随机种子
//加载字符串
LoadStringRes(1, (LPWSTR)&AppName, 32); //程序名字
LoadStringRes(7, (LPWSTR)&Seconds, 32); //游戏耗时
LoadStringRes(8, (LPWSTR)&PlayerName, 32); //游戏者的名字
//一些窗口的坐标
CaptionHeight = GetSystemMetrics(4) + 1;
MenuBarHeight = GetSystemMetrics(15) + 1;
WindowBorderHeight = GetSystemMetrics(6) + 1;
LeftTopX = GetSystemMetrics(5) + 1;
//注册表的干活
int ret = RegCreateKeyExW(HKEY_CURRENT_USER, L"Software\\Microsoft\\winmine", 0, 0, 0, 0x20019u, 0, &hKey, &dwDisposition);
//
v2 = GetParamFromReg(0x11u, 0, 0, 1);
result = RegCloseKey(hKey);
if ( ret != 0 || v2 == 0 )
{
uValue = ReadParamFromINI(2, 9, 9, 25);
dword_10056AC = ReadParamFromINI(3, 9, 9, 30);
LOWORD(dword_10056A0) = ReadParamFromINI(0, 0, 0, 3);
dword_10056A4 = ReadParamFromINI(1, 10, 10, 999);
*(_DWORD *)&X = ReadParamFromINI(4, 80, 0, 1024);
*(_DWORD *)&Y = ReadParamFromINI(5, 80, 0, 1024);
*(_DWORD *)&dword_10056B8 = ReadParamFromINI(6, 0, 0, 3);
*(_DWORD *)&Data = ReadParamFromINI(7, 1, 0, 1);
dword_10056C0 = ReadParamFromINI(9, 0, 0, 1);
dword_10056C4 = ReadParamFromINI(8, 0, 0, 2);
*(_DWORD *)&dword_10056CC = ReadParamFromINI(11, 999, 0, 999);
*(_DWORD *)&dword_10056D0 = ReadParamFromINI(13, 999, 0, 999);
*(_DWORD *)&dword_10056D4 = ReadParamFromINI(15, 999, 0, 999);
GetProfileString(12, &String1);
GetProfileString(14, &word_1005718);
GetProfileString(16, &String);
hWnd = GetDesktopWindow();
hDC = GetDC(hWnd);
hDC1 = hDC;
v6 = GetDeviceCaps(hDC, 24);
*(_DWORD *)&dword_10056C8 = ReadParamFromINI(10, v6 != 2, 0, 1);
hWnd1 = GetDesktopWindow();
ReleaseDC(hWnd1, hDC1);
if ( *(_DWORD *)&dword_10056B8 == 3 )
{
*(_DWORD *)&dword_10056B8 = PlaySound();
}
result = SetRegTable();
}
return result;
}
|
能力值:
( LV2,RANK:10 )
|
-
-
4 楼
int LoadStringRes(unsigned __int16 uID, LPWSTR lpBuffer, int nBufferMax)
{
int result;
result = LoadStringW(hInstance, uID, lpBuffer, nBufferMax);
if ( !result )
{
result = PrintError(0x3E9u);
}
return result;
}
|
能力值:
( LV2,RANK:10 )
|
-
-
5 楼
这个是AlsoInit()函数:
int AlsoInit(DWORD this)
{
HWND hWnd1;
HDC hDC;
HDC hDC1;
int v4;
HWND hWnd2;
DWORD dwDisposition;
dwDisposition = this;
RegCreateKeyExW(HKEY_CURRENT_USER, L"Software\\Microsoft\\winmine", 0, 0, 0, 0x20019u, 0, &hKey, &dwDisposition);
uValue = GetParamFromReg(2u, 9, 9, 25);
ZoneY = uValue;
dword_10056AC = GetParamFromReg(3u, 9, 9, 30);
ZoneX = dword_10056AC;
LOWORD(dword_10056A0) = GetParamFromReg(0, 0, 0, 3);
dword_10056A4 = GetParamFromReg(1u, 10, 10, 999);
*(_DWORD *)&X = GetParamFromReg(4u, 80, 0, 1024);
*(_DWORD *)&Y = GetParamFromReg(5u, 80, 0, 1024);
*(_DWORD *)&dword_10056B8 = GetParamFromReg(6u, 0, 0, 3);
*(_DWORD *)&Data = GetParamFromReg(7u, 1, 0, 1);
dword_10056C0 = GetParamFromReg(9u, 0, 0, 1);
dword_10056C4 = GetParamFromReg(8u, 0, 0, 2);
*(_DWORD *)&dword_10056CC = GetParamFromReg(0xBu, 999, 0, 999);
*(_DWORD *)&dword_10056D0 = GetParamFromReg(0xDu, 999, 0, 999);
*(_DWORD *)&dword_10056D4 = GetParamFromReg(0xFu, 999, 0, 999);
GetValueFromReg(12, &String1);
GetValueFromReg(14, &word_1005718);
GetValueFromReg(16, &String);
hWnd1 = GetDesktopWindow();
hDC = GetDC(hWnd1);
hDC1 = hDC;
v4 = GetDeviceCaps(hDC, 24);
*(_DWORD *)&dword_10056C8 = GetParamFromReg(0xAu, v4 != 2, 0, 1);
hWnd2 = GetDesktopWindow();
ReleaseDC(hWnd2, hDC1);
if ( *(_DWORD *)&dword_10056B8 == 3 )
{
*(_DWORD *)&dword_10056B8 = PlaySound();
}
return RegCloseKey(hKey);
}
|