Whole-known-network
Okay, the lawyers seemed to have weighed in, and admin says we're not to change anything about what we're doing until it all settles down. Suits me.
<p>I forgot about callee cleanup. fucking stdcall is callee cleanup. I can't have a generic int blah(){return 0x1234;} function because it needs to know how many words of arguments were pushed.</p>
<p>ideally I should be able to patch arbitrary python in there and do some kind of interop to return values to python</p><p>but that's hard. and way easier unflexible thing this is 80% of what I need that for</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@film_girl" class="u-url mention">@<span>film_girl</span></a></span> 😠that's a tragedy...</p>
<p>I need this because the decompression routine I'm emulating isn't entirely standalone: it calls malloc() at the beginning and free() at the end</p><p>so I'm replacing malloc() with a static value and free() with a return value no one will check</p>
<p>my latest bad idea: DUMBPATCH.</p><p>to avoid the complexity of generating functions and mapping them into the address space of the emulated PC, I instead designed a simple syntax:</p><p>a 16bit segmented address plus a number. that function is emulated as if it returned that number in AX. There are no other options. I suspect I'll be able to emulate up to 80% of complex subfunctions with this one bit of functionality</p>
<p>it's too bad python's ctypes doesn't support 16-bit x86. it'd be handy right now</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@VeroniqueB99" class="u-url mention">@<span>VeroniqueB99</span></a></span> she’d had a liver transplant recently so maybe it was related to that. Like organ rejection idk. So awful.</p>
<p>I'm implementing unicorn as an x86 emulator to do the decompression, but I'm single-stepping the processor and I'm aiding debugging by showing what instruction I'm on.</p><p>but instead of having to set up an x86 disassembly engine, I'm just parsing a plain text ghidra dump of the disassembly. I'm parsing it with regexes</p>