Files
MAG160C/analysis/ida/export_core_decomp.idc
ZXCLI 0bfb926892 完成官方管线全量逆向与 demo3 v5 复刻,清理仓库
- 逆向:Ghidra/IDA 全量反编译 CoreSDKLib.dll/ThermalSDK.dll/libthermalSDK.so/
  libcoresdk.so(ARM64)/libmagcore.so,导出 analysis/ida/export/
- 解码官方渲染管线:DDT 校准表加载->快门端点选择->Q12 插值->ref(4x type1 帧
  均值)->NUC 查表->盲元补偿->窗口->LUT1024 重建->2x 升采样->调色板
- 逐像素验证:NUC+盲元 0/19200、插值 0 误差、2x 0/76800、窗口一致
- demo3 v5:完整复刻官方管线(含 DDT 解析、FFC 状态机、快门温度驱动),
  修复 load_ddt 表错位导致的零像素问题
- 鬼影根因分析写入 analysis/reverse_20260813_full.md
- 心跳/恢复机制:analysis/session_state.md + tools/resume_rev.ps1
- 新增 tsdk_pair3 增强采集工具;历史工具归档 csdk/tools/legacy/;
  根目录抓帧残留删除,历史文档归档 analysis/history/
- csdk/README.md 完整使用文档;.gitignore/.gitattributes 补 LFS 规则
2026-08-13 23:16:12 +08:00

51 lines
1.2 KiB
C

#include <idc.idc>
static decomp_one(out, ea)
{
auto f, end, s, name;
f = get_func_attr(ea, FUNCATTR_START);
if (f == BADADDR)
{
fprintf(out, "### %08X NOT A FUNCTION\n", ea);
return;
}
end = get_func_attr(f, FUNCATTR_END);
name = get_func_name(f);
fprintf(out, "### FUNC %08X - %08X (%d bytes) name=%s\n", f, end, end - f, name);
s = decompile(f);
if (s != 0)
{
fprintf(out, "%s\n", s);
}
else
{
fprintf(out, ";; DECOMPILE FAILED\n");
}
fprintf(out, "\n==================================================================\n\n");
}
static main()
{
auto f;
f = fopen("C:\\Project\\MAG160C\\analysis\\ida\\export\\coresdk_keyfuncs_decomp.txt", "w");
if (f == 0)
{
warning("cannot open decomp output");
return;
}
decomp_one(f, 0x180017200);
decomp_one(f, 0x180017330);
decomp_one(f, 0x180016ae0);
decomp_one(f, 0x180016dd0);
decomp_one(f, 0x180016f10);
decomp_one(f, 0x18000c760);
decomp_one(f, 0x18000c620);
decomp_one(f, 0x1800011a0);
decomp_one(f, 0x18001e920);
decomp_one(f, 0x18000a1d2);
decomp_one(f, 0x180002f50);
decomp_one(f, 0x180010780);
fclose(f);
msg("decomp export done\n");
}