This commit is contained in:
pmagixc 2024-10-27 16:17:28 +02:00
commit 49fff917f2
4 changed files with 194 additions and 0 deletions

102
Program.cs Normal file
View File

@ -0,0 +1,102 @@
using cavestory_imguihack;
using Swed32;
Renderer renderer = new Renderer();
renderer.Start().Wait();
Swed swed = new Swed("CaveStory+");
IntPtr moduleBase = swed.GetModuleBase("CaveStory+.exe");
// CaveStory+.exe+35E6C - 89 8E 3CF8E400 1st wp ammo
// CaveStory+.exe+35E0E - 66 89 1D 34E1E500 hp
// CaveStory+.exe+364A7 - 89 35 3CE1E500 hp2????
// CaveStory+.exe+6E4E0 - 89 81 48F8E400 missile launcher ammo
// CaveStory+.exe+6E7E5 - 89 81 48F8E400 bubbleline ammo??
// CaveStory+.exe+6E97F - 89 0C 85 48F8E400 obliterate bubbleline ammo
// CaveStory+.exe+6E968 - FF 04 85 48F8E400 stop bubbleline ammo increase
// CaveStory+.exe+32EC0 - 89 3D 50E1E500 booster fuel recharge
// CaveStory+.exe+32DFD - 89 3D 50E1E500 booster fuel decrease
IntPtr healthAddr = moduleBase + 0x35E0E;
IntPtr currentWpAmmoAddr = moduleBase + 0x35E6C;
IntPtr mlammo = moduleBase + 0x6E4E0;
IntPtr bypassBLAmmo = moduleBase + 0x6E97F;
IntPtr stopBLAmmoinc = moduleBase + 0x6E968;
IntPtr blammo = moduleBase + 0x6E7E5;
IntPtr bfuel = moduleBase + 0x32DFD;
IntPtr stopbfuel = moduleBase + 0x32EC0;
while (true)
{
if (renderer.freezeHP)
{
swed.WriteBytes(healthAddr, "90 90 90 90 90 90 90");
}
else
{
swed.WriteBytes(healthAddr, "66 89 1D 34 E1 E5 00");
}
if (renderer.freezecurrentwplvl)
{
swed.WriteBytes(currentWpAmmoAddr, "90 90 90 90 90 90");
}
else
{
swed.WriteBytes(currentWpAmmoAddr, "89 8E 3C F8 E4 00");
}
if (renderer.freezeMissileAmmo)
{
swed.WriteBytes(mlammo, "90 90 90 90 90 90");
}
else
{
swed.WriteBytes(mlammo, "89 81 48 F8 E4 00");
}
if (renderer.freezeBubblelineAmmo)
{
swed.WriteBytes(blammo, "90 90 90 90 90 90");
}
else
{
swed.WriteBytes(blammo, "89 81 48 F8 E4 00");
}
if (renderer.bypassBLAmmo)
{
swed.WriteBytes(bypassBLAmmo, "90 90 90 90 90 90 90");
}
else
{
swed.WriteBytes(bypassBLAmmo, "89 0C 85 48 F8 E4 00");
}
if (renderer.stopBLAmmo)
{
swed.WriteBytes(stopBLAmmoinc, "90 90 90 90 90 90 90");
}
else
{
swed.WriteBytes(stopBLAmmoinc, "89 0C 85 48 F8 E4 00");
}
if (renderer.freezebfuel)
{
swed.WriteBytes(bfuel, "90 90 90 90 90 90");
}
else
{
swed.WriteBytes(bfuel, "89 3D 50 E1 E5 00");
}
if (renderer.freezebfuelinc)
{
swed.WriteBytes(stopbfuel, "90 90 90 90 90 90");
}
else
{
swed.WriteBytes(stopbfuel, "89 3D 50 E1 E5 00");
}
Thread.Sleep(20);
}

50
Renderer.cs Normal file
View File

@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ClickableTransparentOverlay;
using ImGuiNET;
using SixLabors.ImageSharp.Metadata.Profiles.Exif;
namespace cavestory_imguihack
{
public class Renderer : Overlay
{
public bool freezeHP = false;
public bool freezecurrentwplvl = false;
public bool freezeMissileAmmo = false;
public bool freezeBubblelineAmmo = false;
public bool bypassBLAmmo = false;
public bool stopBLAmmo = false;
public bool freezebfuel = false;
public bool freezebfuelinc = false;
public bool disable290 = false;
protected override void Render()
{
ImGui.Begin("haker");
ImGui.SeparatorText("v31");
ImGui.Text("evil quote");
ImGui.SeparatorText("Weapon functions");
ImGui.Checkbox("Freeze current weapon level", ref freezecurrentwplvl);
ImGui.Checkbox("Freeze Missile launcher ammo", ref freezeMissileAmmo);
ImGui.Checkbox("Freeze Bubbleline ammo", ref freezeBubblelineAmmo);
ImGui.Checkbox("Bypass Bubbleline ammo limit", ref bypassBLAmmo);
ImGui.Checkbox("Stop Bubbleline ammo from increasing", ref stopBLAmmo);
ImGui.SeparatorText("Player functions");
ImGui.Checkbox("Freeze health", ref freezeHP);
ImGui.Checkbox("Freeze booster fuel", ref freezebfuel);
ImGui.Checkbox("Stop booster fuel from increasing", ref freezebfuelinc);
ImGui.SeparatorText("options for betas");
ImGui.Checkbox("disable 290 counter", ref disable290);
ImGui.Separator();
if (ImGui.Button("exit"))
{
System.Environment.Exit(0);
}
}
}
}

View File

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>cavestory_imguihack</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ClickableTransparentOverlay" Version="11.0.1" />
<PackageReference Include="swed32" Version="1.1.0" />
</ItemGroup>
</Project>

25
cavestory-imguihack.sln Normal file
View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.11.35219.272
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cavestory-imguihack", "cavestory-imguihack.csproj", "{7C188E3E-6244-464C-98E8-0DAFB9F0EF44}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7C188E3E-6244-464C-98E8-0DAFB9F0EF44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C188E3E-6244-464C-98E8-0DAFB9F0EF44}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C188E3E-6244-464C-98E8-0DAFB9F0EF44}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7C188E3E-6244-464C-98E8-0DAFB9F0EF44}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {35506DBB-3CB3-459A-B137-C0A208E10242}
EndGlobalSection
EndGlobal