Skip to content

Commit 351ddcc

Browse files
v1.0.0.9 release
1 parent 4350f99 commit 351ddcc

21 files changed

Lines changed: 6613 additions & 4536 deletions

ConquerLoader/CLCore/CLCore.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
<ItemGroup>
6464
<Compile Include="Helpers\ConfigFilesEncryption.cs" />
6565
<Compile Include="Constants.cs" />
66+
<Compile Include="Helpers\Injector.cs" />
6667
<Compile Include="Models\DTOs\ConnectionDTO.cs" />
6768
<Compile Include="Models\LoaderEvents.cs" />
6869
<Compile Include="Models\LogWritter.cs" />

ConquerLoader/CLCore/Constants.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ public static class Constants
1111
public static System.ComponentModel.BackgroundWorker MainWorker = null;
1212
public static bool CloseOnFinish = false;
1313
public static bool HideInTrayOnFinish = false;
14-
public static int MinVersionUseServerDat = 5717;
14+
public static int MinVersionUseRAWServerDat = 5095;
15+
public static int MaxVersionUseRAWServerDat = 5716;
16+
public static int MinVersionUseServerDat = 5717;
1517
public static int MaxVersionUseServerDat = 6736;
1618
public static string LockConfigurationKey = "CONQUERLOADERDFX";
1719
public static int MinVersionUseDX8DX9Folders = 6371;

ConquerLoader/ConquerLoader/Models/Injector.cs renamed to ConquerLoader/CLCore/Helpers/Injector.cs

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace ConquerLoader.Models
1+
namespace CLCore
22
{
33
#region References
44

@@ -46,15 +46,15 @@ public static class Injector
4646
private const uint WAIT_TIMEOUT = 0x00000102;
4747
private const uint WAIT_FAILED = 0xFFFFFFFF;
4848
#endregion
49+
public static InjectionStatus LastStatus { get; set; }
4950

5051
/// <summary>
5152
/// Function to inject a Dll
5253
/// </summary>
5354
/// <param name="DllName">Name of dll for inject.</param>
5455
/// <param name="ProcessName">Nombre del proceso en el que sera injectada la Dll.</param>
55-
public static bool StartInjection(string DllName, uint ProcessID, System.ComponentModel.BackgroundWorker Worker)
56+
public static InjectionStatus StartInjection(string DllName, uint ProcessID, System.ComponentModel.BackgroundWorker Worker)
5657
{
57-
bool Injected = false;
5858
try
5959
{
6060
IntPtr hProcess = new IntPtr(0); //openprocess
@@ -84,36 +84,43 @@ public static bool StartInjection(string DllName, uint ProcessID, System.Compone
8484
{
8585
Worker.ReportProgress(50);
8686
uint Result = WaitForSingleObject(hThread, 10 * 1000);
87-
if (Result != WAIT_FAILED || Result != WAIT_ABANDONED
88-
|| Result != WAIT_OBJECT_0 || Result != WAIT_TIMEOUT)
89-
{
87+
if (Result != WAIT_FAILED && Result != WAIT_ABANDONED && Result != WAIT_TIMEOUT) {
9088
if (VirtualFreeEx(hProcess, hModule, 0, MEM_RELEASE))
9189
{
9290
if (hThread != IntPtr.Zero)
9391
{
9492
Worker.ReportProgress(99);
9593
CloseHandle(hThread);
96-
Injected = true;
97-
return Injected;
94+
return ReturnInjectionStatus(true, "Injection success");
9895
}
99-
else Core.LogWritter.Write("Bad thread handle ... injection failed");
96+
else ReturnInjectionStatus(false, "Bad thread handle ... Injection failed");
10097
}
101-
else Core.LogWritter.Write("Memory free problem ... injection failed");
98+
else ReturnInjectionStatus(false, "Memory free problem ... Injection failed");
10299
}
103-
else Core.LogWritter.Write("WaitForSingle failed: " + Result.ToString() + "...injection failed");
100+
else ReturnInjectionStatus(false, "WaitForSingle failed: " + Result.ToString() + "... Injection failed");
104101
}
105-
else Core.LogWritter.Write("Problem when starting the thread ... injection failed");
102+
else ReturnInjectionStatus(false, "Problem when starting the thread ... Injection failed");
106103
}
107-
else Core.LogWritter.Write("LoadLibraryA address not found ... injection failed");
104+
else ReturnInjectionStatus(false, "LoadLibraryA address not found ... Injection failed");
108105
}
109-
else Core.LogWritter.Write("Write error in process ... injection failed");
106+
else ReturnInjectionStatus(false, "Write error in process ... Injection failed");
110107
}
111-
else Core.LogWritter.Write("Unallocated memory ... injection failed");
108+
else ReturnInjectionStatus(false, "Unallocated memory ... Injection failed");
112109
}
113-
else Core.LogWritter.Write("Unopened process ... injection failed");
110+
else return ReturnInjectionStatus(false, "Unopened process ... Injection failed");
114111
}
115-
catch (Exception Exc) { Core.LogWritter.Write("Injection Error: " + Exc.ToString()); }
116-
return Injected;
112+
catch (Exception Exc) { return ReturnInjectionStatus(false, "Injection Error: " + Exc.ToString()); }
113+
return ReturnInjectionStatus(false, "Unhandled reason... Injection failed");
117114
}
115+
public static InjectionStatus ReturnInjectionStatus (bool Injected, string ResultMessage)
116+
{
117+
LastStatus = new InjectionStatus() { Injected = Injected, ResultMessage = ResultMessage };
118+
return LastStatus;
119+
}
120+
}
121+
public class InjectionStatus
122+
{
123+
public bool Injected { get; set; }
124+
public string ResultMessage { get; set; }
118125
}
119126
}

ConquerLoader/CLCore/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión
3333
// utilizando el carácter "*", como se muestra a continuación:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.8")]
36-
[assembly: AssemblyFileVersion("1.0.0.8")]
35+
[assembly: AssemblyVersion("1.0.0.9")]
36+
[assembly: AssemblyFileVersion("1.0.0.9")]

ConquerLoader/ConquerLoader/ConquerLoader.csproj

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<Prefer32Bit>false</Prefer32Bit>
5858
</PropertyGroup>
5959
<PropertyGroup>
60-
<ApplicationIcon>ConquerLoaderLogo.ico</ApplicationIcon>
60+
<ApplicationIcon>ConquerLoaderICON.ico</ApplicationIcon>
6161
</PropertyGroup>
6262
<PropertyGroup />
6363
<PropertyGroup />
@@ -102,12 +102,6 @@
102102
<Reference Include="Newtonsoft.Json.Bson, Version=1.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
103103
<HintPath>..\packages\Newtonsoft.Json.Bson.1.0.3\lib\net45\Newtonsoft.Json.Bson.dll</HintPath>
104104
</Reference>
105-
<Reference Include="PeNet, Version=5.1.0.0, Culture=neutral, PublicKeyToken=6cf2bfba59bcfb3f, processorArchitecture=MSIL">
106-
<HintPath>..\packages\PeNet.5.1.0\lib\netstandard2.0\PeNet.dll</HintPath>
107-
</Reference>
108-
<Reference Include="PeNet.Asn1, Version=2.0.2.0, Culture=neutral, PublicKeyToken=1e2e3568f0050bf5, processorArchitecture=MSIL">
109-
<HintPath>..\packages\PeNet.Asn1.2.0.2\lib\net461\PeNet.Asn1.dll</HintPath>
110-
</Reference>
111105
<Reference Include="System" />
112106
<Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
113107
<HintPath>..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll</HintPath>
@@ -231,7 +225,6 @@
231225
<Compile Include="Forms\Wizard.Designer.cs">
232226
<DependentUpon>Wizard.cs</DependentUpon>
233227
</Compile>
234-
<Compile Include="Models\Injector.cs" />
235228
<Compile Include="Models\ServersDatGenerator.cs" />
236229
<Compile Include="Program.cs" />
237230
<Compile Include="Properties\AssemblyInfo.cs" />
@@ -284,10 +277,12 @@
284277
<None Include="App.config" />
285278
</ItemGroup>
286279
<ItemGroup>
280+
<Content Include="ConquerLoaderICON.ico" />
287281
<Content Include="ConquerLoaderLogo.ico" />
288282
<Compile Include="Models\TextTranslation.cs" />
289283
<Content Include="Resources\CLHook_Legacy.dll" />
290284
<Content Include="Resources\ConquerCipherHook.dll" />
285+
<None Include="Resources\COServerDat.dll" />
291286
<None Include="Resources\en.json" />
292287
<None Include="Resources\es.json" />
293288
<None Include="Resources\pt.json" />
62.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)