FindClassMoniker逆向结果

HRESULT __stdcall FindClassMoniker(IBindCtx *pbc, const wchar_t *pszDisplayName, unsigned int *pcchEaten, IMoniker **ppmk)
{
  HRESULT v4; // esi
  struct _TEB *_currentTeb; // eax
  tagSOleTlsData *v6; // ecx
  HRESULT result; // eax
  int *v8; // ecx
  int v9; // edx
  bool v10; // zf
  tagSOleTlsData *v11; // ecx
  tagSOleTlsData *v12; // eax
  tagSOleTlsData *v13; // eax
  unsigned int cEaten; // [esp+Ch] [ebp-30h]
  IBindCtx *v15; // [esp+10h] [ebp-2Ch]
  const wchar_t *_displayName; // [esp+14h] [ebp-28h]
  IMoniker **v17; // [esp+18h] [ebp-24h]
  CActivationFilterContext activationContext; // [esp+1Ch] [ebp-20h]
  COleTls v19; // [esp+20h] [ebp-1Ch]
  IParseDisplayName *pPDN; // [esp+24h] [ebp-18h]
  _GUID classID; // [esp+28h] [ebp-14h]

  v15 = pbc;
  *ppmk = 0;
  v17 = ppmk;
  _currentTeb = NtCurrentTeb();
  *pcchEaten = 0;
  v6 = (tagSOleTlsData *)_currentTeb->ReservedForOle;
  _displayName = pszDisplayName;
  v19._pData = v6;
  if ( v6 )
  {
    result = 0;
  }
  else
  {
    result = COleTls::TLSAllocData(&v19);
    if ( result < 0 )
    {
LABEL_8:
      v11 = (tagSOleTlsData *)NtCurrentTeb()->ReservedForOle;
      if ( v11 )
        v11->dwActivationType = activationContext.m_dwPreviousActivationType;
      return result;
    }
    v6 = v19._pData;
  }
  v8 = (int *)&v6->dwActivationType;
  v9 = *v8;
  *v8 |= 1u;
  v10 = (v19._pData->dwFlags & 0x2000000) == 0;
  activationContext.m_dwPreviousActivationType = v9;
  if ( !v10 )
    result = -2147467231;
  if ( result < 0 )
    goto LABEL_8;
  if ( FindClassID(pszDisplayName, &cEaten, &classID) < 0
    || (pPDN = 0, CoGetClassObject(&classID, 0x417u, 0, &IID_IParseDisplayName, (LPVOID *)&pPDN) < 0)
    && CoCreateInstance(&classID, 0, 0x417u, &IID_IParseDisplayName, (LPVOID *)&pPDN) < 0 )
  {
    v13 = (tagSOleTlsData *)NtCurrentTeb()->ReservedForOle;
    if ( v13 )
      v13->dwActivationType = activationContext.m_dwPreviousActivationType;
    result = -2147221021;
  }
  else
  {
    v4 = pPDN->vtable->GetDisplayName((CFileMoniker *)pPDN, v15, _displayName, pcchEaten, v17);
    pPDN->vtable->Release((IUnknown *)pPDN);
    v12 = (tagSOleTlsData *)NtCurrentTeb()->ReservedForOle;
    if ( v12 )
      v12->dwActivationType = activationContext.m_dwPreviousActivationType;
    result = v4;
  }
  return result;
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值