Code

Assembly & Reverse Engineering

ARM64 (Winnie) & x86-64 registers, stack frames, calling conventions, Ghidra/REA, and binary patching.

Chapter 1: Why Assembly Matters (CPU Execution, ISAs & ARM64 vs. x86-64)

Understanding what the processor actually executes: the fetch-decode-execute cycle, Instruction Set Architectures, machine-code encoding, and how ARM64 compares with x86-64.

6 scenes · 3 min

Chapter 2: Registers, Flags & Data Representation

Mastering CPU register files (`x0`–`x30`/`w0`–`w30` and `rax`–`r15`), condition flags (`NZCV`/`RFLAGS`), two's complement signed integers, hex math, and little-endian byte order.

6 scenes · 4 min

Chapter 3: Addressing Modes & Virtual Memory Layout

Decoding how instructions calculate memory addresses—base+offset, scaled indexing, pre/post-increment, PC-relative (`adrp`/`RIP-relative`)—and mapping every region of a live process.

6 scenes · 4 min

Chapter 4: Data Movement, Arithmetic & Bitwise Operations

Reading everyday instruction idioms: moves, load/store widths, `LEA` math tricks, integer multiply/divide magic constants, shifts, masks, and `XOR` obfuscation.

6 scenes · 4 min

Chapter 5: Control Flow, Comparisons, Branches & Loops

Mapping assembly branches back into structured C control flow: `if`/`else`, short-circuit `&&`/`||`, branchless `csel`/`cmov`, `while`/`for` loops, and compiler loop inversion.

6 scenes · 4 min

Chapter 6: Functions, Stack Frames & Calling Conventions

Mastering how functions pass arguments, return values, preserve registers, and manage stack frames under AAPCS64 (ARM64) and System V AMD64 (x86-64).

6 scenes · 4 min

Chapter 7: System Calls, Traps & the OS Kernel Interface

Crossing the hardware privilege boundary from User Space (EL0 / Ring 3) into Kernel Space (EL1 / Ring 0) via `svc #0x80` and `syscall`, syscall tables, `errno`, and libc wrappers.

6 scenes · 4 min

Chapter 8: Reading Compiler Output (`-O0` vs. `-O2`, Inlining & SIMD)

Understanding how GCC and Clang transform C source into machine code across optimization levels: stack-heavy `-O0`, register-allocated `-O2`, function inlining, dead-code elimination, and NEON/SSE SIMD vectorization.

6 scenes · 4 min

Chapter 9: Executable Formats (Mach-O & ELF Internals)

Dissecting binary containers on disk: magic bytes, headers, segments vs. sections, Mach-O load commands, ELF program headers, symbol tables, and dynamic linking stubs (PLT/GOT & `__stubs`).

6 scenes · 4 min

Chapter 10: Static Disassembly & Control Flow Graphs

Moving from linear CLI tools (`strings`, `nm`, `objdump`, `otool`) to interactive cross-reference analysis, Basic Blocks, Control Flow Graphs (CFGs), and Ghidra decompiler workflows.

6 scenes · 4 min

Chapter 11: Dynamic Debugging & Runtime Tracing (LLDB & GDB)

Inspecting live execution: batch & interactive LLDB/GDB commands, breakpoints, single-stepping (`si`/`ni`), hardware watchpoints, live register/memory editing, and backtraces.

6 scenes · 3 min

Chapter 12: Recognizing High-Level Patterns in Assembly

Translating compiled idioms back into clean C and C++: arrays, nested structs, linked lists, `switch` jump tables, C++ `this` pointers & vtables, and C vs. Rust/Go string layouts.

6 scenes · 4 min

Chapter 13: Binary Patching, Hooking & Modern Exploit Mitigations

Safely patching instructions (`NOP` sleds, branch flips), dynamic library interposition (`DYLD_INSERT_LIBRARIES` / `LD_PRELOAD`), and understanding ASLR, PIE, NX/W^X, Stack Canaries, PAC, and CFI.

6 scenes · 4 min

Chapter 14: End-to-End Reverse Engineering Lab (Triage to Full Solution)

Putting all 13 chapters together in a disciplined, safe reverse-engineering workflow: isolating a target, static triage, control-flow analysis, dynamic verification, keygenning/patching, and clean technical reporting.

6 scenes · 3 min