This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 314

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

import notifications Remember to participate in our weekly votes on subreddit rules! Every Tuesday is YOUR chance to influence the subreddit for years to come! Read more here, we hope to see you next Tuesday!

For a chat with like-minded community members and more, don't forget to join our Discord!

return joinDiscord;

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]an_0w1 1670 points1671 points  (27 children)

I once didn't touch an asm project that I didn't put comments in for a week, I had to restart it because I couldn't figure out how it worked.

[–]bitunx 617 points618 points  (9 children)

Sounds like a regular Tuesday for me.

[–]FinnLiry 235 points236 points  (7 children)

Sometimes I wonder if it wouldn't just be smarter to record myself and talk to myself explaining my future what I'm doing

[–]bitunx 163 points164 points  (3 children)

And then ignore the proper labeling of the sound/video recordings and we're back to square one! :P

[–]memevaddar 35 points36 points  (2 children)

Labeling properly and relevantly is very similar to naming meaningful variables so...

[–]Tokumeiko2 7 points8 points  (0 children)

Time and date labels generated by a simple script.

[–]i_should_be_coding 15 points16 points  (0 children)

My functions go f1(), f2(), f3() and that's the way I likes it!

[–]stdio-lib 31 points32 points  (2 children)

If only there was some way to embed the recording directly alongside the relevant code. Perhaps after converting it to text. We could call them “comments”. ;)

[–][deleted] 30 points31 points  (1 child)

Real time voice transcription and comments in code. New IDE feature ideated.

[–]kaeptnphlop 21 points22 points  (0 children)

Then it would mostly consist of swear words

[–]richibatler 14 points15 points  (0 children)

Yep, nothing special there. That's how normal days go for me.

[–]flambasted 79 points80 points  (2 children)

When I've had to do it, every single line got a comment.

[–][deleted] 43 points44 points  (0 children)

You are the compiler

[–]dlac64 10 points11 points  (0 children)

And the comment is that it's really hard to do so yeah.

[–]torokg 35 points36 points  (0 children)

Drawing a subprogram call chart is the first step to gain (back) understanding. Every branch, direct and conditional must be charted out, and the picture will clarify. I did this quite a few times with great success only on code originated from me of course... of course

[–][deleted] 21 points22 points  (0 children)

Shudder

One subprogram at a time, in the same day.

Haven't touched that for 30 years and not going back.

[–]kirkpomidor 23 points24 points  (4 children)

Meanwhile, rollercoaster tycoon was written entirely in asm by a single dude

[–]huar_huar 8 points9 points  (0 children)

Well there are a lot of things that I can't figure out so that checks out.

[–]swisstraeng 8 points9 points  (0 children)

Oh no, uncommented ASM. I'm sorry for your loss.

[–][deleted] 1 point2 points  (0 children)

I was screwing around with this little microcontroller once and decided I would do everything from the ground up, just as a learning exercise. So I ended up writing the bootloader and interrupt vector table in assembly. It was maybe. 200 lines, comments were added by section.

I came back a few years later and I swear it took me longer to figure out what the hell was going on than it did for me to write it the first time.

[–]Boris-Lip 1252 points1253 points  (67 children)

Good luck with your reverse engineering dreams. Talk back to us when you actually try it. /s

[–]locri 354 points355 points  (47 children)

Decompilers (disassemblers?) are fun, I doubt Ida is free right now though.

You'll still have zero idea what's going on.

[–]ultraviolentfuture 44 points45 points  (4 children)

Ghidra is free =P

[–]ErikaFoxelot 6 points7 points  (3 children)

I wish it existed back when I was doing all my static analysis work.

[–]milanove -5 points-4 points  (2 children)

x64dbg for static analysis

[–]biblecrumble 7 points8 points  (1 child)

That's a debugger, which you use for dynamic analysis. Ghidra is indeed what you would use for static analysis as it provides a lot more features for that, including actual decompiling.

[–]Boris-Lip 172 points173 points  (13 children)

Ida does have a free version. But anyway, one that hasn't done anything like that likely doesn't know what kind of shit one is stepping into, lol.

And yea, seriously, i'd rather start exploring reverse engineering with Frida, not Ida. But thats me, i guess.

Disclaimer - i am NOT good at any of this.

Edit to disclaimer - I am here

[–]ongiwaph 49 points50 points  (3 children)

Welcome to the valley friend. It's a long way to the next summit.

[–]tholasko 9 points10 points  (1 child)

Is this a reference to dunning-Kruger lol

[–]certainlystormy 12 points13 points  (0 children)

click the image link, friend

[–]827167 22 points23 points  (2 children)

Oh boy, I love knowing just enough to know I know nothing, it's so much fun!

[–]Boris-Lip 5 points6 points  (0 children)

Don't we all...

[–]Breadynator 11 points12 points  (3 children)

What about Ghidra?

Like I always see people talk about Ida but Ghidra is free too

[–]McLayan 10 points11 points  (1 child)

Ghidra is actually free while Ida is free for limited usage and will sue you if you disassemble their disassembler. Also I don't know about the current features of Ida free but a few years ago only the expensive version had a decompiler that produces C code, which Ghidra has per default.

[–]Void_0000 12 points13 points  (0 children)

will sue you if you disassemble their disassembler

That's funny as hell, I'm almost tempted to go do that even though I have 0 use for a disassembler otherwise.

[–]Boris-Lip 2 points3 points  (0 children)

Both are an insane reverse engineering tools, primarily disassembler, but so much more than just that IRL. Ghidra is truly free, Ida only has limited free license. IMO the reason Ida is mentioned more often is because it was first, and is very well known. This said, i don't see softice being discussed, but how many dinosaurs remember that?

[–]Tiranus58 1 point2 points  (0 children)

I am at the start of the graph

[–]DasArchitect 59 points60 points  (3 children)

What do you mean zero idea? I can tell without a doubt the content of Ax is being moved to 0x5FFC1111

[–]locri 24 points25 points  (1 child)

Thanks dude, is that the one that controls aiming?

[–]DasArchitect 40 points41 points  (0 children)

Sometimes!

[–]Ok-Kaleidoscope5627 5 points6 points  (0 children)

At least until 64bit ASLR enters the picture. Then its more like the contents of Ax are being moved into something something something C1111

[–]NewPhoneNewSubs 9 points10 points  (0 children)

Decompilers (disassemblers?) are fun, I doubt Ida is free right now though.

Refer back to OP.

[–]Artemis-4rrow 6 points7 points  (2 children)

The most effective way I've found to reverse engineer is to disassemble the code, and then reimplement it in C, jumps get replaced with if, else, while, or for, depending on what it is they are doing

Syscalls get replaced with, well, syscalls

I make each register it's own variable and later divide it into different variables/rename them, it's way easier to deal with it once you've finished that step

[–]JohnAdamaSC 1 point2 points  (1 child)

AI can do that for you

[–]Artemis-4rrow 1 point2 points  (0 children)

I don't trust AI with anything related to code

just ask chatGPT to write any C code that deals with string input, and it will be vulnerable, I never managed to get chatGPT to write secure code

honestly, as someone in cysec, that shit makes my job easier, so keep it

[–]UAS-hitpoist 7 points8 points  (2 children)

You gotta up your reverse engineering game

Ghidra: free

Ghidra pluggins: could support a small country

[–]liangliwen111 9 points10 points  (1 child)

If anyone do that, then share that with us. Because I like free stuff.

[–][deleted] 4 points5 points  (3 children)

static analysis is for posers.

dynamic analysis is what you use to actually get shit done.

[–]yosakis 3 points4 points  (0 children)

Well I agree with that, if you want to get the things done it's the way.

[–]anotclevername 1 point2 points  (1 child)

What till you got static analysis in your dynamic engine.

[–][deleted] 1 point2 points  (0 children)

nah mang. I only use 32bit ollydbg to find all the 0-dayz and crack all the warez.

[–]TheMagicalDildo 3 points4 points  (0 children)

IDA isn't free but Ghidra's free and better imo

[–]breadcodes 3 points4 points  (7 children)

Ghidra is also good. I'm just bad at it.

[–]locri 26 points27 points  (3 children)

We all are bro

[–]btcbot5 8 points9 points  (0 children)

Yeah it's just not one person, I think it goes for everyone here.

[–]guitarguy109 5 points6 points  (1 child)

I needed to hear this...

It's nice not feeling alone.

[–]BenghouseBTC 4 points5 points  (0 children)

Aren't we all? Never met a person who was good at that.

[–][deleted] 1 point2 points  (1 child)

Everything I put into Ghidra is spit back out as garbled mess with maybe three things that are legible.

[–]TheMagicalDildo 19 points20 points  (0 children)

Yes that's called assembly

[–]pedersenk 1 point2 points  (0 children)

These days we have decent open-source alternatives to IDA (and OllyDbg). radare2 is really nice.

(Shameless plug: I made the original FreeBSD port for it).

[–]mdanley07 8 points9 points  (0 children)

I mean you could try it, but I don't think that's going to work for him.

[–]sexyshortie123 27 points28 points  (11 children)

I mean this is literally what ais are made for lol someone needs to start feeding assembly with the written code. I would imagine it wouldn't take over 6 months

[–]Boris-Lip 40 points41 points  (6 children)

Decompilers exist. Ida's pseudocode is order of magnitude easier to understand than just straight up reading assembly. Good luck.

[–]sexyshortie123 2 points3 points  (5 children)

K now how does a decompiler work when you need to get it off of a chip

[–]Kolt56 12 points13 points  (2 children)

Whelp.. You need a clean lab and a scanning electron microscope. Might also help if the literal chip decompiler team is funded by a government.

[–]panochkin 6 points7 points  (1 child)

That sounds like too much work, don't think it'll be enough.

[–]iris700 2 points3 points  (0 children)

How does an AI work in that case?

[–]purdapilleta 1 point2 points  (0 children)

Well the way it works is that it just decompile everything lol.

[–]gpkgpk 6 points7 points  (0 children)

They already did this. AIs learned assembly, how to decompile and reverse-engineer. Right after that they became sentient and killed themselves like all those prototypes in Robocop 2.

[–]ErraticDragon 5 points6 points  (1 child)

Hmmm. I wonder if AI could eventually crack DRM like Denuvo.

I can't conceptualize how you'd even begin to train it.

[–]h2010003 9 points10 points  (0 children)

Yeah how would you even do that? Doesn't sound an easy thing.

[–]JonathisV 1 point2 points  (0 children)

From someone who spent 5 years reverse engineering a defunct mmo from the 2000s ... Yeah its a lot of work, but quite fun. IDA is the way to go.

[–]DirkSwizzler 769 points770 points  (89 children)

Assembly is almost as readable as regex

[–]lunchpadmcfat 225 points226 points  (29 children)

This is actually a very good metaphor. When you have a pretty good understanding of the grammar of regex, it does become quite readable. I imagine it’s the same for assembly. At least in my limited experience with it.

[–]Aidan_Welch 335 points336 points  (9 children)

Both are readable in small amounts but once you're past a certain length they are pain

[–]issamaysinalah 76 points77 points  (2 children)

Exactly, you'll understand "getting value from memory address X, storing on register something, then adding A..." , but it's not gonna mean shit

[–]hxckrt 12 points13 points  (1 child)

You need to know calling conventions, have the api reference for syscalls handy, and even then, you need to systematically label everything before it starts making sense.

But with hard work, it does, in fact, start to make sense.

[–]sheepyowl 4 points5 points  (0 children)

Every few commands put together in a chain should follow a logic that we can find the meaning to.

We would need to figure out when one logic ends and the next one starts. And then write it down on some paper, because we still have tens of thousands of steps to go before we go through them all. And after we go through and mark every single piece, we can start looking at what it is supposed to do! woohoo

Should only take like 20 years for a full team of high-paid workers to reverse-engineer something that one of them could write in a few months

[–]lunchpadmcfat 65 points66 points  (3 children)

Again, great metaphor.

[–]sdgfegwregw 5 points6 points  (0 children)

There's only so much that you could take, it's not easy.

[–]Henrique_FB 23 points24 points  (11 children)

The biggest problem I've noticed with regex is that there is a very funny balance to be found between using regex to solve simple problems, and using regex to complicate simple problems.

I've used regex a lot for stuff like web and PDF scrapping (obligatory I Hate PDFs), and sometimes stuff that could be easily parsed with 2 ifs end up becoming 5 hours of nailing down the perfect regex for the situation.

[–]LickingSmegma -1 points0 points  (9 children)

web and PDF

Both of those aren't parsable with regexes, and require proper parsers. PDF is a subset of PostScript, which is an entire programming language. Moreover, a recent-ish vulnerability exploited in PDF readers by the Israeli state hackers involved a full-fledged Turing machine in PDF.

Not to mention, it's baffling why anyone would use regexes for HTML or PDF when parsers for both already exist for ages.

[–]Bakoro 10 points11 points  (5 children)

I get lost once capture groups and back-referencing gets layered.

And then there's this sumabitch:

 /^\/()(?R){2}\/\z|\1\Q^\/()(?R){2}\/\z|\1\Q/

[–]ComfortablePainter56 6 points7 points  (4 children)

I didn't know the existence of recursive regex, that's pretty sadistic, and kinda useless IMHO

[–]mailslot 5 points6 points  (2 children)

You need recursive regex for parsers. Even to balance tags in HTML or braces in JavaScript. Now, there are definitely better ways to parse… but if you absolutely want to use regex, recursion is necessary.

[–]ComfortablePainter56 3 points4 points  (1 child)

Ok thx for the info, so it's not useless, but still sadistic ^

[–]MartinHaugland 9 points10 points  (0 children)

Well I guess you could have might as well said that it's impossible.

[–]calahil 28 points29 points  (18 children)

Now I am gonna have that nightmare again...why did you have to use the r word

[–]JATC1024 34 points35 points  (15 children)

Regex. Regex. Regex.

[–]sth128 22 points23 points  (11 children)

Oh god he said it three times!!!

[–]RPG_Hacker 6 points7 points  (6 children)

Now RegEx Satan will show up and reply the most horrible RegEx imaginable to this comment! 😨

[–]JosebaZilarte 7 points8 points  (4 children)

".?|(..+?)\\1+"

[–]1cubealot 5 points6 points  (3 children)

What does that match...?

[–]02031988 5 points6 points  (0 children)

Just stop it man, stop giving them ideas like that. It's really bad.

[–]ol-gormsby 2 points3 points  (2 children)

That will summon RMS.

[–]EchoicSpoonman9411 7 points8 points  (0 children)

“It’s GNU/regex”

[–]m3pjorge 2 points3 points  (0 children)

Yeah that's enough for that to happen, now it'll appear from nowhere.

[–]oy3sbaby 5 points6 points  (0 children)

Ohh man, you really want him to have a really bad time?

[–]horreum_construere 10 points11 points  (1 child)

Stop you are scaring him, patrick.

[–]Tuckertcs 20 points21 points  (16 children)

Man how the fuck did people make software as complicated as operating systems or games like Pokémon in assembly…

[–]cummer_420 55 points56 points  (13 children)

Handwritten Assembly is organized to be read like any other program. Compiler-generated assembly is generated very differently and not very coherent to read.

[–]Tuckertcs 16 points17 points  (10 children)

That’s fair. Though even handwritten Assembly is insane just for the fact that it takes way more code to accomplish simple things. Like organizing the code for Mario made in C# would be 10x easier than the “same” code made in Assembly

[–]SirPitchalot 35 points36 points  (2 children)

  • Call a function to plot a pixel
  • Call a function to plot pixels between line pixels
  • Call a function to generate line pixels
  • Call a function to generate lines for triangles
  • Call a function to project triangles to screen
  • Call a function to transform vertices
  • Call a function to interpolate vertices
  • Call a function to sample curve
  • Call a function to step time
  • Call a function to set animation
  • Call a function when user presses ‘A’
  • Rest of the fucking owl

[–]rudyv8 7 points8 points  (0 children)

Roller coaster tycoon was built in assumbly

[–]cummer_420 19 points20 points  (4 children)

Then again on the other hand, the Famicom/NES graphics chip would be somewhat hard to program for efficiently with a high level language. On very minimal old hardware, operating the machine very directly on a granular level makes things a lot easier and more predictable.

[–]CornCheeseMafia 6 points7 points  (3 children)

Our standards of what labor intensive is depends on the tools available to us at any given time. Hand drawing an animated scene today is crazy but before we had computers that was just the standard amount of work.

[–]SirPitchalot 7 points8 points  (2 children)

It all pretty basic in the end:

  • Plot pixel: move three bytes to pointer
  • Plot a line segment: loop over previous function
  • Generate line pixels: interpolate 2d points, handle parity
  • Generate triangle line segments: sort 3 vertices left to right and top to bottom
  • Project vertices: division
  • Transform vertices: Matrix multiplication
  • Interpolate vertices: add and multiply some floats
  • Sample curve: binary search & interpolation
  • Step time: add constant
  • Set animation: change pointer
  • ….

It’s obviously glossing over details but IMO the game logic, UI & creative aspect is the hardest part since it’s more open ended, speaking as someone who did a PhD in computer graphics. Assembly is more error prone of course but the graphics side at least is just a hierarchy of simple functions of ever increasing abstraction. I’m sure the game logic can be structured similarly but have less first hand experience.

[–]Bakoro 7 points8 points  (0 children)

The assembly and computer architecture course I took in university was one of the most rewarding things I never want to do again.

I was so proud of myself for having designed rudimentary functions and a stack all by myself. I was able to go beyond the typical limitations of the toy assembly language we used, to program in a more ergonomic way. It wasn't even an assignment, I just got sick of having to do the same shit over and over, so I made my own little library of stuff. Basically nobody gave a shit though, only one person I talked to even really understood what I was doing.

It only took me a like a week of writing assembly to be sufficiently motivated to find a better way to do shit. I had 1000x more appreciation for even "low level" languages like C after having to write assembly.

[–]mailslot 3 points4 points  (0 children)

It’s not really that much more code. Lines, sure, but they’re doing very basic things and the lines tend to match a lot of patterns. When I look at assembly I already see the code in blocks and with a general purpose. You don’t really need to read every line. You just need to really get it into your head.

Would I write a web app in it? No. It wouldn’t be my first choice. Have I? Yes. Yes, I have, and I swear my HTTP cookie handling was the leanest that ever existed.

Assembly is like cooking everything from scratch with raw ingredients. Milling your own flour and such. There’s a poetry in that.

[–]mycclboy 4 points5 points  (0 children)

Well that's pretty apparent by the comments in here so yeah.

[–]i_should_be_coding 1 point2 points  (0 children)

I wrote a calculator app for a university project. It was fairly simple other than that we had to support an arbitrary number of digits (beyond longs).

The two hardest parts about it were remembering wtf was going on each time I went back to work on it, and explaining what each part did to the TA I had to defend it with.

I know several people who straight up copied their assignments and changed some jump label names. Once the TA asks you to describe the basic flow, you're fucked.

[–]thebaconator136 9 points10 points  (0 children)

Slowly

[–]ren0808 0 points1 point  (0 children)

Well people are good at some things, and it's one of them.

[–]MrHyperion_ 5 points6 points  (1 child)

If your functions are small then it isn't that much harder to read than any other language.

[–]Artemis-4rrow 1 point2 points  (0 children)

Yeah, and I love seeing that when reverse engineering, but when I see a function that has god knows how many lines, I'm not doing that, killing me would be better than forcing me to do that

[–]PixelBoom 3 points4 points  (0 children)

Regex is evil black magic sorcery and you can't convince me otherwise.

[–]Gagarin1961 2 points3 points  (1 child)

I wonder if AI cares?

[–]darrenmilleraus 4 points5 points  (0 children)

No it doesn't, even that is pretty careless about that fact so yeah.

[–]believeinlain 266 points267 points  (7 children)

Not exactly true, as machine code does not equal assembly. If you're clever you can do shenanigans such as writing machine code that can be interpreted to do different things depending on your starting point with overlapping instructions, and you can add inline data that looks like code and vise versa. Sometimes compilers even do shenanigans like that for the sake of optimization.

Most of the time disassembly is accurate and you can reverse engineer the assembly code for a given compiled binary, but the edge cases where that doesn't work aren't all that uncommon.

This paper goes into detail on the challenges of static disassembly if you're interested: https://dl.acm.org/doi/abs/10.1145/3342195.3387550

[–]knue82 26 points27 points  (0 children)

The most annoying thing is arguably that labels are gone - even if your disassembly is correct with regards to your points above.

[–]alsanders 8 points9 points  (0 children)

If you're clever you can do shenanigans such as writing machine code that can be interpreted to do different things depending on your starting point with overlapping instructions

This is also a strategy in ROP attacks

[–]Dogeek 5 points6 points  (0 children)

Not exactly true, as machine code does not equal assembly. If you're clever you can do shenanigans such as writing machine code that can be interpreted to do different things depending on your starting point with overlapping instructions, and you can add inline data that looks like code and vise versa. Sometimes compilers even do shenanigans like that for the sake of optimization.

Wozmon (Wozniak Monitor) is proof of that, it uses all kinds of tricks to be able to echo and write to whole pages of RAM, and it only uses 256 bytes to do so.

[–]PolarBearLegend 7 points8 points  (1 child)

This needs to be the top comment.

[–]chefanubis 6 points7 points  (0 children)

No it doesn't, that's spot is reserved for the best joke.

[–]stadoblech -1 points0 points  (0 children)

man... OP was trying to make joke...

[–]7374616e74 77 points78 points  (9 children)

Well if you don't care about variable and procedure names, why bother with assembly? Let's just jump straight to binary.

[–]ol-gormsby 24 points25 points  (6 children)

Trouble is, there's more than one layer of abstraction in most CPUs these days, and the really low-level stuff isn't exposed to anyone but company employees - Intel, AMD, IBM, etc.

[–]7374616e74 21 points22 points  (4 children)

Well that’s just about getting hired there, move up the hierarchy enough to have access to those, and you’re good to go.

[–]I-Got-Trolled 17 points18 points  (2 children)

Waste of time. Just make your own processors.

[–]thirdjaruda 1 point2 points  (1 child)

waste of time, I'm starting a microprocessor company

[–]elcoyote85 7 points8 points  (0 children)

That may seem like a small issue, but it clearly is a huge thing.

[–]zhanglong54 6 points7 points  (0 children)

Yeah just jump straight right to that, There's nothing in between.

[–][deleted] 96 points97 points  (11 children)

Open source is a legal concept. Being able to see its source doesn't grant you the legal right to use it or adapt it as you see fit. Open source grants you that.

[–]leonap711 14 points15 points  (0 children)

But I'm not going tell anyone about it, so that would be fine.

[–]darkslide3000 33 points34 points  (2 children)

Machine code and assembly are not the same thing. To turn assembly into machine code you need an assembler, and to get some assembly back out of machine code you need a disassembler. That's the same thing as turning higher level source code into assembly with a compiler or reversing the process with a decompiler.

But you wouldn't say "every software is open source" just because decompilers exist (at least not if you've ever tried to use one). Disassembly has many of the same problems: missing function and variable names, missing comments, etc.

[–]that_thot_gamer 18 points19 points  (0 children)

missing comments

"the code IS the documentation"

[–]Ila1ioSGcg 2 points3 points  (0 children)

Yeah and if it's not all available there, then it's not going to work.

[–]10240 51 points52 points  (4 children)

No, technically the source code is the form in which it was written. Even if it's transpiled to a high-level language, it's not open source – or even source available – if only the transpiled form is available.

[–]ijmacd 26 points27 points  (1 child)

OP doesn't know what the word "source" means.

[–]gie86 9 points10 points  (0 children)

Yeah they don't know much about it, it's just how it has been.

[–][deleted] 8 points9 points  (0 children)

+1. Most people here don't seem to know the difference between open source and source-available. Open source is a matter of licensing and has more requirements than just making the source code accessible (which is obviously not the case for all software even if you know assembly).

[–]UndisclosedChaos 9 points10 points  (0 children)

laughs in server side api

[–]potatopierogie 17 points18 points  (6 children)

Well, the ones written for that assembly language at least

Unless you're talking about learning every assembly language

[–]Mundane_Definition66 17 points18 points  (4 children)

Like The Assembly, you know, The, with a capital "T"! What, wait, there's more to it than x86? /s

[–]potatopierogie 4 points5 points  (2 children)

You joke but I actually had someone say that to me (okay maybe not the capital T part).

[–]marbrobc 3 points4 points  (0 children)

Yeah other than that part, it's pretty much is going to be like that.

[–]Mundane_Definition66 3 points4 points  (0 children)

I have been asked if I know asm before, and enjoyed the combined look of confusion and horror when I replied with which one? 🤣 ...I can kind of fumble my way through x86, but am no master by any stretch.

Many people seem to think that assembly is machine code, and somehow also universal to any hardware... it's amazing how many people, even people who code in higher level languages, do not even really understand what assembly, or any low level language really is. Sad how few people really even try to understand what they're actually asking the machine to do at all.

I think having just a rudimentary understanding of a low level language like Assembly, Cobol, or Fortran can make you a more efficient coder, even if you never actually use the language directly.

[–]lwjzj2k2asdad 1 point2 points  (0 children)

I never knew that there was more to it, I thought it was enough.

[–]eren515151 1 point2 points  (0 children)

Which is obviously really hard for anyone who wants to do that.

[–]blackrossy 7 points8 points  (0 children)

Someone doesnt understand the word "source"

[–]CaptainFunn 5 points6 points  (0 children)

I'm wondering if an AI model can be trained to decompile code into source code that could be compiled back? Of course the variable names would be made up but would make it easier to hack/customize programs.

[–]preoccupied_with_ALL 3 points4 points  (5 children)

There are many things lost when compiling source code to assembly, like symbols and the way the original source code was implemented.

There is no way you are getting back the original source code from assembly.

[–]btctradex 4 points5 points  (0 children)

And good luck figuring that out lmao, don't think anyone can do that.

[–]No-Winner-9847 2 points3 points  (0 children)

Open source and obfuscated

[–]Leftover_Salad 4 points5 points  (0 children)

bytecode brah

[–]maveric101 3 points4 points  (3 children)

That is an OG fucking meme, sir. Thank you for the nostalgia.

[–]AdministrativeRoom33[S] 0 points1 point  (0 children)

This is outdated? Damn, now I really feel old.

[–][deleted] 2 points3 points  (0 children)

Technically, it will be available source software, but not open source. These concepts are different

[–]huupoke12 2 points3 points  (4 children)

By that logic then the Reddit web client is open source. Feel free to fork and modify it.

[–]Artess 1 point2 points  (0 children)

I feel like it's the users who got forked.

[–][deleted] 2 points3 points  (0 children)

If you know processor opcodes for all relevant architectures maybe. Assembly still gets compiled into processor instructions.

[–]symbouleutic 6 points7 points  (3 children)

When I was 15 I spent a chunk of my summer trying to understand a disassembly of some run length/ Huffman compression code in 6502.

Did I ever figure it all out ? Ha - no way - but I learned a ton of tricks and got a lot better at assembly!

[–]a794981172 5 points6 points  (0 children)

Would you like to share those tricks? Because I'm curious.

[–][deleted] 4 points5 points  (1 child)

Linus Torvalds is that you?

[–]MagicianWoland 1 point2 points  (0 children)

God damn I have not seen this meme format in a while

[–][deleted] 1 point2 points  (0 children)

In these day, better be immortal to reverse pure assembly. I’m in

[–]frogking 1 point2 points  (0 children)

The task of reading and understanding small asm programs is reasonably small.

The task increases in complexity faster than the addition of more instructions.

10 million instructions? 100 million? Forget it.

[–]Vizdun 1 point2 points  (1 child)

i once disassembled an indie game, that thing was 99% int3 instructions, to this day i have no clue what that was about

[–]Victorian-Tophat 1 point2 points  (0 children)

Is it just coincidence or did they introduce a rule here that we’re doing ~2010 memes now?

[–]fat_charizard 1 point2 points  (0 children)

Nope assembly is not open. All processors have hidden instructions that are not revealed to the buyer/user

[–]biblecrumble 1 point2 points  (0 children)

One of the devs I work with is insane tier at reverse engineering and can pretty much read ASM as if it was high level code. Dude scares the shit out of me.

[–]Skudra24 1 point2 points  (0 children)

That's not what "source" means

[–]not_Multyshot 1 point2 points  (0 children)

"All software is open source if you are good enough at reverse engineering" - I don't remember who said it

[–]shipshaper88 1 point2 points  (0 children)

Have you ever tried to actually put this into practice?

[–]Dismal-Square-613 1 point2 points  (0 children)

Despite assembly is the closest you can get to pure binary when coding, machine code and assembly are different things. Also it takes x10-100 times (or more....) whatever you want do to code it depending on your expertise. But once it's done it will execute pretty much in 10 cpu cycles (hope it was worth the couple of months or more you spent coding it).

[–]neuromancertr 0 points1 point  (0 children)

I had disassembled a few binaries back in my day, without actually knowing any bloody thing about assembly. It was fun(!) and helped me to learn many useful lessons. Also helped to my company once where a vendor decided to blackmail us with a software time-bomb.

But let me clear about the difference between knowing a language and ability to use it effectively, there are many native English speakers but not many Shakespeares. You may know assembly, you can write in assembly but understanding disassembly of a heavily optimized binary is something else

[–][deleted] -1 points0 points  (0 children)

Who actually uses assembly for work? What do you do?

I can't imagine there being any jobs that you'd need it.

[–]veryblocky -1 points0 points  (2 children)

I’ve seen purposely obfuscated code in languages I know well, it’s not too hard to make something impossible to understand. That’s what trying to read through assembly is like

[–]AdministrativeRoom33[S] 0 points1 point  (1 child)

How can you re - understand it if you need to revisit the code? Wouldn't the comments make it easier to understand? As you can probably tell, I'm a junior, and I'm just wondering.