File size: 1,057 Bytes
d517dc9 | 1 2 3 4 5 | {"type": "session", "harness": "opencode", "id": "pe-0002", "name": "PE import table parsing"}
{"type": "message", "message": {"role": "system", "content": "You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing code, identify bugs, security issues, and performance problems. You have deep knowledge of C/C++, Windows API, Python, and many other technologies."}}
{"type": "message", "message": {"role": "user", "content": "How to parse PE import tables"}}
{"type": "message", "message": {"role": "assistant", "content": "PE Import Table via IMAGE_DIRECTORY_ENTRY_IMPORT:\\n\\nIMAGE_IMPORT_DESCRIPTOR per DLL: Name (DLL name), OriginalFirstThunk (INT), FirstThunk (IAT)\\n\\nIAT entries: by ordinal (high bit set) or by name (IMAGE_IMPORT_BY_NAME with hint+name)\\n\\nWith pelib: PeLib::ImportDirectory importDir = pe->imports(); importDir.getDllName(i); importDir.getFunctionName(i, j)"}}
|