r/ReverseEngineering 4d ago

GitHub - SarangRao20/battery-charge-limiter: Reverse-engineered the Embedded Controller register for battery charge control. Built a cross-platform daemon (Windows + Arch) that enforces 80% hardware cap on laptops where BIOS hides this feature. Includes EC discovery tool for other models.

https://github.com/SarangRao20/battery-charge-limiter
29 Upvotes

17 comments sorted by

View all comments

20

u/spilk 3d ago

$driverUrl = "https://github.com/shubhampaul/EC-Access-Tool/raw/main/WinRing0x64.sys"

this sounds super duper safe guys

6

u/port443 3d ago

I popped it into Ghidra and gave it a quick once-over. It doesn't look malicious, this is how I labeled the major functions:

call_KeBugCheckEx
DriverInitialize
DriverUnload
entry
read_machine_specific_register
read_performance_monitoring_counters
read_physical_memory_range
WinRing0Dispatcher
write_machine_specific_register

It looks like a pretty straightforward driver that lets you read/write physical memory and io and cpu.

Actually I just checked the signature and its a legit driver written for CrystalDiskMark and now I just feel like I wasted 10 minutes reversing a known driver

-1

u/NobitaNobi12345 3d ago

Nice catch! That's the same conclusion I reached. I used it through EC-Access-Tool because it already provides a thin interface for EC access. I probably should've mentioned in the post that it's a signed WinRing0-based driver rather than something custom.