frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Godecompose: Go decompiler that uses pattern matchers

https://github.com/cookiengineer/godecompose
2•cookiengineer•4h ago

Comments

cookiengineer•4h ago
This project was something that I had in the back of my head for a long time.

I'm analyzing golang malware for my dayjob most of the time and I was annoyed by the typical decompiler pipelines that always try to generate Pseudo C code instead of reusing the information of known symbols to try to reconstruct the actual source code in the actual language it was written in.

So I'm using ImHex a LOT because it's by far the best hex editor out there, and it uses a (custom) pattern description language which is really useful for container formats, binary formats, and finding things that "come after known byte headers". The pattern descriptors are useful because they can replace binwalk and similar tools if you know how to write the patterns for the file formats you're looking for.

Coming back to Go binaries: A lot of times the assembled binaries still contain useful symbol names or strings that you can use to reconstruct what the source code looked like, but most decompilers don't care about intelligent symbol matching, and they always focus on pure disassembly workflows which are kind of useless for any binary that's been compiled by a VM based programming language.

This decompiler tries to use pattern matching to reconstruct things that are part of the stdlib in Go. Theoretically, you can extend this pattern database with whatever standard libraries are the most common ones out there to get better results (gin, gorilla, etc?).

I have no idea about other VM based binaries like C#, but if there's a runtime-specific header in that binary, and if the symbol names aren't obfuscated, this project could be ported to those languages, too.

However, this is a prototype that's been written with a lot of LLM assistance.

I would have never had the months of time needed to just write those thousands of demo code programs, debug the headers in the symbol/hash tables, find out how the Plan9/Go assembler looks like, and then add the pattern matchers and end to end unit tests for those.

Thought I'd share this approach, might be useful for a lot of other VM-based languages that have their own stdlibs. For the next couple weeks I'm probably going to refactor this, and try to find more efficient ways to lookup/replace known matching symbols.

Show HN: Free car spec db to defeat the paywalls

https://openlaborproject.com/
1•chackleman•4m ago•1 comments

Madison Square Garden Sues Wired Magazine over L.G.B.T.Q. Tracking Report

https://www.nytimes.com/2026/07/18/business/media/msg-entertainment-sues-wired-magazine.html
1•ChrisArchitect•4m ago•1 comments

How Word Count Is Important for Social Media Posts

https://medium.com/@thesuperrepemail/how-word-count-is-important-for-social-media-posts-87372645377c
2•rajsuper123•16m ago•0 comments

William Gaddis and William H. Gass: A Literary Conversation and Reading (1995)

https://www.92ny.org/archives/william-gaddis-and-william-h-gass-a-literary-conversation-and-reading
1•ofalkaed•21m ago•0 comments

Trump Media pitched $100K monthly fee for fastest feed of US president's posts

https://www.reuters.com/business/media-telecom/trump-media-pitched-100000-monthly-fee-fast-feed-u...
3•geox•23m ago•1 comments

Disney Has Started Feeding Your Kids AI Slop

https://kotaku.com/disney-has-started-feeding-your-kids-ai-slop-2000717222
3•wslh•29m ago•0 comments

Lawyers risk being sued for failing to use AI

https://www.legalcheek.com/2026/07/lawyers-risk-being-sued-for-failing-to-use-ai/
3•Tomte•30m ago•0 comments

LLM-Integrated Multivariable Calculus Course

https://calculus.academa.ai/
3•sinaatalay•37m ago•1 comments

Topographical Collection of King George III

https://www.flickr.com/photos/britishlibrary/collections/72157719509637544/
1•Eridanus2•37m ago•0 comments

XRPLink – Cryptographically Verified XRP Payment Receipts, Powered by Flare FDC

https://github.com/joverman/xrplink
1•joverman•50m ago•0 comments

FDA approves new kind of cholesterol pill

https://www.fda.gov/news-events/press-announcements/fda-approves-first-oral-pcsk9-inhibitor-lower...
2•mgh2•52m ago•0 comments

Useless Use of Cat Award

https://porkmail.org/era/unix/award
1•gregsadetsky•1h ago•1 comments

Novo Space builds modular computers for satellite constellations

https://runtimewire.com/article/startup-spotlight-novo-space-builds-modular-computers-for-satelli...
1•ryanmerket•1h ago•0 comments

Gaming Sickness and Its Impact on Players' Experiences with Games

https://dl.acm.org/doi/10.1145/3670653.3677494
2•BiraIgnacio•1h ago•0 comments

I built a browser-based P2P file transfer tool using WebRTC

https://airdows.com/
2•SamOkampo•1h ago•1 comments

Jordan Ellenberg explains how geometry helps us understand the world

https://www.cbc.ca/lite/story/1.6448326
1•colinprince•1h ago•0 comments

Retry is not a loop, its a data structure

https://siddhantkhare.com/writing/retry-is-not-a-loop
2•meetpateltech•1h ago•0 comments

Association Between Low/No-Calorie Artificial Sweeteners and Cognitive Decline

https://www.neurology.org/doi/10.1212/WNL.0000000000214023
2•corvad•1h ago•0 comments

PersonalDrive: Personal Cloud Storage

https://personaldrive.xyz/
1•thunderbong•1h ago•1 comments

Implementation of "Writing a C compiler" in Zig

https://github.com/igor84/wcc
2•rguiscard•1h ago•0 comments

Toyota pump tech could be key to hydrogen-combustion practicality

https://www.autocar.co.uk/car-news/technology/toyota-pump-tech-could-be-key-hydrogen-combustion-p...
1•breve•1h ago•0 comments

Track you Claude Code usage in dollars

https://www.claudeusage.com/leaderboard
2•bazarkua•1h ago•1 comments

Seamless iPad (or any device that can run a web browser) drawing into org-mode

https://github.com/larrasket/org-pad.el
1•lr0•1h ago•0 comments

China cracks down on AI companions, forcing millions to break up

https://www.abc.net.au/news/2026-07-19/china-cracks-down-on-artificial-intelligence-companions/10...
3•defrost•1h ago•1 comments

Archaeologists found Homer's Iliad inside a 1,600-year-old Egyptian mummy

https://www.sciencedaily.com/releases/2026/07/260713084918.htm
4•NordStreamYacht•1h ago•0 comments

IceCream – Never use print() to debug again

https://github.com/gruns/icecream
1•gregsadetsky•1h ago•0 comments

Claude Is Painful

5•kderbyma•1h ago•3 comments

Deepsec

https://github.com/vercel-labs/deepsec
2•handfuloflight•1h ago•0 comments

AI Mania Is Eviscerating Global Decision-Making

https://ludic.mataroa.blog/blog/ai-mania-is-eviscerating-global-decision-making/#fnref:3
40•subset•2h ago•5 comments

Prompt Injection Attacks Are Thwarting AI Hacking Agents

https://arstechnica.com/security/2026/07/now-defenders-are-embracing-the-prompt-injection-too/
1•sbulaev•2h ago•1 comments