当前位置: 首页 > 工具软件 > CLFS > 使用案例 >

clfs逆向2

史飞尘
2023-12-01
__int64 __fastcall CClfsLogFcbPhysical::ResetLog(CClfsLogFcbPhysical *this)
{
  CClfsLogFcbPhysical *that; // rbx
  struct _CLFS_CLIENT_CONTEXT *v2; // rcx
  unsigned int v4; // er8
  unsigned __int8 lastlsn; // al
  CClfsBaseFilePersisted *file; // rcx
  struct _CLFS_CLIENT_CONTEXT *ctnctx; // [rsp+40h] [rbp+8h]

  this->field_CtrateTime_1a0 = 0i64;
  this->field_WriteTime_1b0 = 0i64;
  that = this;
  this->field_AccessTime_1a8 = 0i64;
  ctnctx = 0i64;
  this->field_ctntail_1e0 = CLFS_LSN_NULL;
  this->field_lsnbase_id8 = CLFS_LSN_NULL;
  this->field_lsn1_528 = CLFS_LSN_NULL;
  this->field_lsncurrent_1e8 = CLFS_LSN_NULL;
  this->field_lsnrestart_1f0 = CLFS_LSN_INVALID;
  this->field_lsnnow_1c8 = 0i64;
  this->field_lsn0_1d0 = (CLS_LSN *)CLFS_LSN_NULL;
  CClfsBaseFile::AcquireClientContext((CClfsBaseFile *)this->field_BaseFilePersisted_2A8, 0, &ctnctx);
  v2 = ctnctx;
  if ( !ctnctx )
    return 3222929421i64;
  ctnctx->llCreateTime.QuadPart = that->field_CtrateTime_1a0;
  v2->llAccessTime.QuadPart = that->field_AccessTime_1a8;
  v2->llWriteTime.QuadPart = that->field_WriteTime_1b0;
  v2->lsnArchiveTail.ullOffset = that->field_ctntail_1e0;
  v2->lsnBase.ullOffset = that->field_lsnbase_id8;
  v2->lsnLast.ullOffset = that->field_lsncurrent_1e8;
  v2->lsnRestart.ullOffset = that->field_lsnrestart_1f0;
  v2->eState &= 0xDFu;
  CClfsBaseFile::ReleaseClientContext((CClfsBaseFile *)that->field_BaseFilePersisted_2A8, &ctnctx);
  CClfsBaseFilePersisted::ResetContainerQ(
    that->field_BaseFilePersisted_2A8,
    (unsigned int *const )&that->field_containeridx_558,
    v4,
    (unsigned int *)&that->field_ctnidxoffset_550,
    (unsigned int *)&that->field_ctnidxoffset_550 + 1);
  lastlsn = CClfsBaseFilePersisted::IncrementUsn(that->field_BaseFilePersisted_2A8);
  file = that->field_BaseFilePersisted_2A8;
  HIBYTE(that->field_lastusn_290) = lastlsn;
  HIBYTE(that->field_lastusn_290) = CClfsBaseFilePersisted::IncrementUsn(file);
  return 0i64;
}
 类似资料: