- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
Latest commit
57 lines (53 loc) · 1.82 KB
/
Copy pathProgram.cs
File metadata and controls
57 lines (53 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
usingSystem;
usingSystem.Collections.Generic;
usingSystem.IO;
usingSystem.Reflection;
usingSystem.Windows.Forms;
namespaceSentinelLoader
{
internalstaticclassProgram
{
[STAThread]
staticvoidMain()
{
conststringUS_EXE="BCDx36HP_Sentinel.exe";
conststringEU_EXE="UBCD3600XLT_Sentinel.exe";
Dictionary<uint,uint>d=newDictionary<uint,uint>
{
{512000000u,757999999u},
{823987500u,849012499u},
{868987500u,894012499u},
{960000000u,1239999999u},
};
try
{
stringexeFilename=string.Empty;
if(File.Exists(US_EXE))
exeFilename=US_EXE;
elseif(File.Exists(EU_EXE))
exeFilename=EU_EXE;
else
{
MessageBox.Show("No executable Sentinel file found!","Error");
return;
}
Assemblyasm=Assembly.LoadFrom(exeFilename);
varfreqLibType=asm.GetType("HomePatrol_Sentinel.FrequencyLib");
varfreqTableField=freqLibType.GetField("FrequencyTable",BindingFlags.Static|BindingFlags.NonPublic);
varfreqTable=freqTableField.GetValue(null)asuint[,];
for(vari=0;i<freqTable.GetLength(0);i++)
{
if(d.ContainsKey(freqTable[i,1]))
{
freqTable[i,1]=d[freqTable[i,1]];
}
}
asm.EntryPoint.Invoke(null,null);
}
catch
{
MessageBox.Show("Something wrong!","Exception");
}
}
}
}