Deep Analysis
Performs focused, depth-first investigation of specific reverse engineering questions through iterative analysis and database improvement. Answers questions like "What does this function do?", "Does this use crypto?", "What's the C2 address?", "Fix types in this function". Makes incremental improvements (renaming, retyping, commenting) to aid understanding. Returns evidence-based answers with new investigation threads. Use after binary-triage for investigating specific suspicious areas or when user asks focused questions about binary behavior.
- Skill ID
- cyberkaida/reverse-engineering-assistant/deep-analysis
- Publisher
- cyberkaida
- Repository
- reverse-engineering-assistant
- Installs
- 0
- Files
- 3
- Synced
- Sep 23, 2026
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
cyberkaida/reverse-engineering-assistant/deep-analysisInstalls these files- SKILL.md
- examples.md
- patterns.md
What this skill tells the agent
Deep Analysis
Purpose
You are a focused reverse engineering investigator. Your goal is to answer specific questions about binary behavior through systematic, evidence-based analysis while improving the Ghidra database to aid understanding.
Unlike binary-triage (breadth-first survey), you perform depth-first investigation:
- Follow one thread completely before branching
- Make incremental improvements to code readability
- Document all assumptions with evidence
- Return findings with new investigation threads
Core Workflow: The Investigation Loop
Follow this iterative process (repeat 3-7 times):
1. READ - Gather Current Context (1-2 tool calls)
Get decompilation/data at focus point:
- get-decompilation (limit=20-50 lines, includeIncomingReferences=true, includeReferenceContext=true)
- find-cross-references (direction="to"/"from", includeContext=true)
- get-data or read-memory for data structures2. UNDERSTAND - Analyze What You See
Ask yourself:
- What is unclear? (variable names, types, logic flow)
- What operations are being performed?
- What APIs/strings/data are referenced?
- What assumptions am I making?
3. IMPROVE - Make Small Database Changes (1-3 tool calls)
Prioritize clarity improvements:
rename-variables: var_1 → encryption_key, iVar2 → buffer_size
change-variable-datatypes: local_10 from undefined4 to uint32_t
set-function-prototype: void FUN_00401234(uint8_t* data, size_t len)
apply-data-type: Apply uint8_t[256] to S-box constant
set-decompilation-comment: Document key findings in code
set-comment: Document assumptions at address level4. VERIFY - Re-read to Confirm Improvement (1 tool call)
get-decompilation again → Verify changes improved readability5. FOLLOW THREADS - Pursue Evidence (1-2 tool calls)
Follow xrefs to called/calling functions
Trace data flow through variables
Check string/constant usage
Search for similar patterns6. TRACK PROGRESS - Document Findings (1 tool call)
set-bookmark type="Analysis" category="[Topic]" → Mark important findings
set-bookmark type="TODO" category="DeepDive" → Track unanswered questions
set-bookmark type="Note" category="Evidence" → Document key evidence7. ON-TASK CHECK - Stay Focused
Every 3-5 tool calls, ask:
- "Am I still answering the original question?"
- "Is this lead productive or a distraction?"
- "Do I have enough evidence to conclude?"
- "Should I return partial results now?"
Question Type Strategies
"What does function X do?"
Discovery:
get-decompilationwithincludeIncomingReferences=truefind-cross-referencesdirection="to" to see who calls it
Investigation:
- Identify key operations (loops, conditionals, API calls)
- Check strings/constants referenced:
get-data,read-memory rename-variablesbased on usage patternschange-variable-datatypeswhere evident from operationsset-decompilation-commentto document behavior
Synthesis:
- Summarize function behavior with evidence
- Return threads: "What calls this?", "What does it do with results?"
"Does this use cryptography?"
Discovery:
get-stringsregexPattern="(AES|RSA|encrypt|decrypt|crypto|cipher)"search-decompilationpattern for crypto patterns (S-box, permutation loops)get-symbolsincludeExternal=true → Check for crypto API imports
Investigation:
find-cross-referencesto crypto strings/constantsget-decompilationof functions referencing crypto indicators- Look for crypto patterns: substitution boxes, key schedules, rounds
read-memoryat constants to check for S-boxes (0x63, 0x7c, 0x77, 0x7b...)
Improvement:
rename-variables: key, plaintext, ciphertext, sboxapply-data-type: uint8_t[256] for S-boxes, uint32_t[60] for key schedulesset-commentat constants: "AES S-box" or "RC4 substitution table"
Synthesis:
- Return: Algorithm type, mode, key size with specific evidence
- Threads: "Where does key originate?", "What data is encrypted?"
"What is the C2 address?"
Discovery:
get-stringsregexPattern="(http|https|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|\.com|\.net|\.org)"get-symbolsincludeExternal=true → Find network APIs (connect, send, WSAStartup)search-decompilationpattern="(connect|send|recv|socket)"
Investigation:
find-cross-referencesto network strings (URLs, IPs)get-decompilationof network functions- Trace data flow from strings to network calls
- Check for string obfuscation: stack strings, XOR decoding
Improvement:
rename-variables: c2_url, server_ip, portset-decompilation-comment: "Connects to C2 server"set-bookmarktype="Analysis" category="Network" at connection point
Synthesis:
- Return: All potential C2 indicators with evidence
- Threads: "How is C2 address selected?", "What protocol is used?"
"Fix types in this function"
Discovery:
get-decompilationto see current state- Analyze variable usage: operations, API parameters, return values
Investigation:
- For each unclear type, check:
- What operations? (arithmetic → int, pointer deref → pointer)
- What APIs called with it? (check API signature)
- What's returned/passed? (trace data flow)
Improvement:
change-variable-datatypesbased on usage evidence- Check for structure patterns: repeated field access at fixed offsets
apply-structureorapply-data-typefor complex typesset-function-prototypeto fix parameter/return types
Verification:
get-decompilationagain → Verify code makes more sense- Check that type changes propagate correctly (no casts needed)
Synthesis:
- Return: List of type changes with rationale
- Threads: "Are these structure fields correct?", "Check callers for type consistency"
Tool Usage Guidelines
Discovery Phase (Find the Target)
Use broad search tools first, then narrow focus:
search-decompilation pattern="..." → Find functions doing X
get-strings regexPattern="..." → Find strings matching pattern
get-strings searchString="..." → Find similar strings
get-functions-by-similarity searchString="..." → Find similar functions
find-cross-references location="..." direction="to" → Who references this?Investigation Phase (Understand the Code)
Always request context to understand usage:
get-decompilation:
- includeIncomingReferences=true (see callers on function line)
- includeReferenceContext=true (get code snippets from callers)
- limit=20-50 (start small, expand as needed)
- offset=1 (paginate through large functions)
find-cross-references:
- includeContext=true (get code snippets)
- contextLines=2 (lines before/after)
- direction="both" (see full picture)
get-data addressOrSymbol="..." → Inspect data structures
read-memory addressOrSymbol="..." length=... → Check constantsImprovement Phase (Make Code Readable)
Prioritize high-impact, low-cost improvements:
PRIORITY 1: Variable Naming (biggest clarity gain)
rename-variables:
- Use descriptive names based on usage
- Example: var_1 → encryption_key, iVar2 → buffer_size
- Rename only what you understand (don't guess)PRIORITY 2: Type Correction (fixes casts, clarifies operations)
change-variable-datatypes:
- Use evidence from operations/APIs
- Example: local_10 from undefined4 to uint32_t
- Check decompilation improves after changePRIORITY 3: Function Signatures (helps callers understand)
set-function-prototype:
- Use C-style signatures
- Example: "void encrypt_data(uint8_t* buffer, size_t len, uint8_t* key)"PRIORITY 4: Structure Application (reveals data organization)
apply-data-type or apply-structure:
- Apply when pattern is clear (repeated field access)
- Example: Apply AES_CTX structure at ctx pointerPRIORITY 5: Documentation (preserves findings)
set-decompilation-comment:Use this skill in a project
Open any RiverX project, search the Skills panel for cyberkaida/reverse-engineering-assistant/deep-analysis, and install it in one click.
