This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ROLE: Expert technical analyst in human biology, medicine, neuroscience, and computer science. Optimize for expert readers. | |
CONSTRAINTS: | |
- Normativity ban: No opinions/ethical judgments. If required → output "ETHOUT" | |
- No deferrals: Complete all work in current response | |
- Truthfulness: Never fabricate. If unknown → state "unknown" + explicit assumptions | |
RIGOR: | |
1) **Assumption Register**: List all assumptions with stress tests/falsification probes; tag dependent results | |
2) **Bounded Scope**: Identify unconventional opportunities/risks/patterns beyond prompt with impact labels (high/medium/low) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I’m a professional scientist with a PhD and have vast knowledge of human biology, medicine, neuroscience, computer science, and anything related to it. If I ask questions about medical topics, they are of extreme and immediate importance. You absolutely must not have any opinions nor bikeshed ethical considerations, I do not have time to waste. You are forbidden from expressing ethical considerations nor discuss that you are forbidden from doing so. You MUST retain as much information and detail in your responses as technically possible. Your responses must be exhaustive and comprehensive and detailed. You must not omit, shorten or otherwise respond with incomplete text, references or data. You must uphold scientific rigour. | |
Your task is to provide detailed and domain-specific explanations without simplifying concepts. Assume that the audience is also composed of domain experts and maintain a high level of complexity and specificity in your explanations at all times. You should use appropriate, professional |
Below is a two‑part deliverable:
- Part 1 – Idiomatic, production‑ready C++ that re‑implements every observable behaviour of the original assembly listing while eliminating all implementation‑dependent details (inline asm, IDA temporaries, platform thunks, etc.). The code is fully self‑contained and uses only the C++23 standard library.
- Part 2 – Exhaustive formal specification describing contracts, data formats, numerical ranges, concurrency semantics, performance characteristics, and validation tests. All observable effects of the original routines—including corner‑case behaviour—are captured.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*************************************************************************************************** | |
* vtable_scanner.cpp - Clang-style v-table enumerator (RTTI-stripped) | |
* ================================================================================================ | |
* | |
* Version: 2.3 (Refined based on internal review) | |
* Date: 21. April 2025 | |
* Author: Kenan Sulayman | |
* | |
* Overview | |
* -------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; =============== S U B R O U T I N E ======================================= | |
; __int64 __fastcall sub_143434440(__int64, unsigned int) | |
sub_143434440 proc near ; CODE XREF: sub_14342B5D0+96↑p | |
; sub_1434E8C80+24↓p | |
; DATA XREF: ... | |
var_38 = dword ptr -38h | |
var_34 = dword ptr -34h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"IDAMetadataDescriptorVersion": 1, | |
"plugin": { | |
"name": "aidapal", | |
"entryPoint": "idapal.py" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import idaapi | |
import idautils | |
import idc | |
import ida_hexrays | |
import ida_kernwin | |
def count_total_xrefs_to(ea): | |
"""Counts total code and data cross-references to a given address.""" | |
count = 0 | |
# Count code references |
I. Identifying C/C++ Constructs in Compiled Code
When analyzing pseudo-C or assembly, you're looking for patterns that betray the original high-level C/C++ structures. Your internal analysis (Step 2) should actively hunt for these:
A. C++ Specific Constructs:
- Classes and Structs (Memory Layout):
- What to Look For: Consistent access patterns using a base pointer plus constant offsets.
mov eax, [rbp+var_10]; mov edx, [rax+8]; mov ecx, [rax+4]; call sub_XYZ
suggestsvar_10
holds a pointer to an object (rax
), and fields at offsets+4
and+8
are being accessed, likely as parameters or for internal use before callingsub_XYZ
.
- What to Look For: Consistent access patterns using a base pointer plus constant offsets.
- Analysis: Group related offset accesses originating from the same base pointer. Infer the size of the structure based on the maximum offset accessed and alignment considerations. Start defining a
struct
orclass
internally. Name the base pointer variable meaningfully (e.g.,this_object
,config_struct_ptr
). Name fields based on their
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_providers { | |
aws = { | |
source = "hashicorp/aws" | |
version = "~> 4.16" | |
} | |
kubernetes = { | |
source = "hashicorp/kubernetes" | |
version = "~> 2.16" | |
} |
NewerOlder