| 本帖最后由 wwwab 于 2025-6-25 20:22 编辑 
 这里面有个复杂的字符串解密,sub_140002E64和sub_140004E18,涉及到一个映射表byte_1400BB020,然后byte_1400BB020又是sub_140002A60(调用sub_140012680?)写进去的。其中,dword_1400B85C0是这个映射表是否被建立的标志。
 
 
 
  
 
 这个函数吓死了个人:
 
 复制代码__int64 __fastcall sub_140001954(
        unsigned int a1,
        __int64 a2,
        __int64 a3,
        unsigned int a4,
        char a5,
        _DWORD *a6,
        __int64 a7)
{
  __int64 v7; // rdi
  __int64 result; // rax
  _BYTE *v12; // rbx
  unsigned int v13; // r15d
  __int64 v14; // rax
  __int64 v15; // rsi
  _BYTE *v16; // rax
  _BYTE *v17; // rdi
  int v18; // ebp
  int v19; // r14d
  int v20; // esi
  v7 = a4;
  result = sub_14000638C(2i64 * a4 + 4);
  v12 = (_BYTE *)result;
  v13 = 0;
  if ( result )
  {
    sub_140009AB8(a1);
    v12[(unsigned int)sub_140005DF4(a3, v12, 2 * v7 + 4)] = 0;
    v14 = -1i64;
    do
      ++v14;
    while ( *(_WORD *)(a2 + 2 * v14) );
    v15 = 2 * v14 + 128;
    v16 = (_BYTE *)sub_14000638C(v15);
    v17 = v16;
    if ( !v16 )
      goto LABEL_135;
    *v16 = 0;
    sub_140005DF4(a2, v16, v15);
    v18 = sub_140007D68(v17, "$p1O0zd1fK<");
    v19 = sub_140007D68(v17, "$p1O0zaff!<-i");
    v20 = sub_140007D68(v17, "$p1O0bg|yo<OiEk");
    if ( ((unsigned int)sub_140004E18("$G1O0taff!<-i", v17)
       || (unsigned int)sub_140004E18("$G1O0z:1fK<", v17)
       || (unsigned int)sub_140004E18("$G1O0yo1fK<", v17))
      && (unsigned int)sub_140004E18("$Glby^eeF!gyz", v12)
      || (unsigned int)sub_140004E18("$G1O0|zbPK$!<-i", v17) && (unsigned int)sub_140004E18("$GJJ}`0d>l", v12) )
    {
      v13 = 1;
      *a6 = 0;
    }
    else
    {
      if ( (!v18 && !v20
         || (unsigned int)sub_140004E18("$G,ieljh:!ge+", v12)
         || !(unsigned int)sub_140004E18("$G,2S1|bgg^1", v12)
         || (unsigned int)sub_140007ED0(v12, ".dll"))
        && (!(unsigned int)sub_140004E18("$Gl|aflR{!<-i", v17) || !(unsigned int)sub_140004E18("$Gn}};ngR.3<z|", v12)) )
      {
        if ( ((unsigned int)sub_140004E18("$Gn}};u|cPL$3hDj", v17) || (unsigned int)sub_140004E18("$Gn}};t%z!<-i", v17))
          && ((unsigned int)sub_140004E18("$GnN}ylvif<v(vjhDorteu", v12)
           || (unsigned int)sub_140004E18("$Gn}};5b{ejOiEk", v12)
           || (unsigned int)sub_140004E18("$GnN;/0e+g", v12)
           || (unsigned int)sub_140004E18("$G5Ju;a:hg3<g!", v12)
           || (unsigned int)sub_140004E18("$Gn}};xye:whmZuzjqy!|q", v12)
           || (unsigned int)sub_140004E18("$GnNN^%ldi3hDj3", v12)
           || (unsigned int)sub_140004E18("$G@dkzRO`jLOiEkO", v12)
           || (unsigned int)sub_140004E18("$GnN9fd:ks<G-{+R4o2z4", v12)
           || (unsigned int)sub_140004E18("$GDejgD", v12)) )
        {
          *(_QWORD *)(a7 + 8) = 0i64;
          *(_DWORD *)a7 = -1073741790;
          *a6 = 4;
          goto LABEL_134;
        }
        if ( (!(unsigned int)sub_140004E18("$G5k<uodcv<OiEk", v17) || !(unsigned int)sub_140004E18("$GnN;i:eR!gyz", v12))
          && (!(unsigned int)sub_140004E18("$Gkhbi0e+g", v17) || !(unsigned int)sub_140004E18("$G^j%kjocf3<g", v12))
          && (!(unsigned int)sub_140004E18("$Glz>:zjilohw)k.l", v17)
           && !(unsigned int)sub_140004E18("$G,5Pv$zRelAk<`{F_l1y_", v17)
           || !(unsigned int)sub_140004E18("$GDoPv$z", v12) && !(unsigned int)sub_140004E18("$GDb{:", v12))
          && (!(unsigned int)sub_140004E18("$Gn}};u|cPL$3hDj", v17)
           && !(unsigned int)sub_140004E18("$Gn}};t%z!<-i", v17)
           || !(unsigned int)sub_140004E18("$G,}/;jovfn|+j+_>vw_", v12)
           && !(unsigned int)sub_140004E18("$G,}VB<kfMoGSiR%S", v12)
           && !(unsigned int)sub_140004E18("$G,}/86sRzLPD$SiR%S", v12)
           && !(unsigned int)sub_140004E18("$G,s7xxy>zd<SiR%S", v12)
           && !(unsigned int)sub_140004E18("$G,s7x@bdi<Oh|RO", v12)
           && !(unsigned int)sub_140004E18("$G,}/UakBz{hSiR%S", v12)
           && !(unsigned int)sub_140004E18("$G,5|ld|njoy#{jD{oEHzKLH", v12)
           && !(unsigned int)sub_140004E18("$G,Vcd%RfUzlihL_>vw_", v12)
           && !(unsigned int)sub_140004E18("$G,}/8>%iUzlihL_>vw_", v12)
           && !(unsigned int)sub_140004E18("$G,N]ivbRg5Rkoi_>vw_", v12)
           && !(unsigned int)sub_140004E18("$G,s7x@kf:zMw)j%{)", v12)
           && !(unsigned int)sub_140004E18("$G,sstPG$Rnjwxw{FP0$4lwG4", v12)
           && !(unsigned int)sub_140004E18("$G,5Pv$zRelAk<`{F_l1y_", v12)
           && !(unsigned int)sub_140004E18("$G,ao.:k>.", v12)
           && !(unsigned int)sub_140004E18("$G,}/sRyCV5Oh|RO", v12)
           && !(unsigned int)sub_140004E18("$G,}/sRyBi<gy)j%{)", v12)
           && !(unsigned int)sub_140004E18("$G,}/@jdf%3<z|3", v12)
           && !(unsigned int)sub_140004E18("$G,}/Aw%2foy2", v12)
           && !(unsigned int)sub_140004E18("$GDa^-", v12)
           && !(unsigned int)sub_140004E18("$G,}/9Aud:z|iGTkiET", v12)) )
        {
          if ( (a5 & 0x20) == 0 )
            goto LABEL_134;
          if ( (sub_140004E18("$Ga%>il|f%3hDj", v17), !(unsigned int)sub_140004E18("$G1O0zd1fK<", v17))
            && !(unsigned int)sub_140004E18("$G1O0bg|yo<OiEk", v17)
            && !(unsigned int)sub_140004E18("$G]do>ke2gLh", v17)
            || !(unsigned int)sub_140004E18("$G1O0taff.3<z|", v12)
            && !(unsigned int)sub_140004E18("$G1O0z:E2foy", v12)
            && !(unsigned int)sub_140004E18("$Gn}};ngR.3<z|", v12)
            && !(unsigned int)sub_140004E18("$Gfeje|ogv0Oh|R", v12)
            && !(unsigned int)sub_140004E18("$Gf|a^:E2foy", v12)
            && !(unsigned int)sub_140004E18("$Gl[::g>zh0Oh|R", v12)
            && !(unsigned int)sub_140004E18("$GZizgjRz!gyz", v12)
            && !(unsigned int)sub_140004E18("$Glby^ee2foy", v12)
            && !(unsigned int)sub_140004E18("$G1O0%d|i<P-$Oh|R", v12)
            && !(unsigned int)sub_140004E18("$Gf]^abE2foy", v12)
            && !(unsigned int)sub_140004E18("$GUj>Ro,ofCy%h|>L)ry+K", v12)
            && !(unsigned int)sub_140004E18("$G[[fc%Re.3<z|", v12)
            && !(unsigned int)sub_140004E18("$Gylhlzod!gyz", v12)
            && !(unsigned int)sub_140004E18("$G`z;^#<i.3<z|", v12)
            && !(unsigned int)sub_140004E18("$G[[fc%bo.3<z|", v12)
            && !(unsigned int)sub_140004E18("$G#b^taff.3<z|", v12)
            && !(unsigned int)sub_140004E18("$GJlk{|eR#{R+ji-SqoG+", v12)
            && !(unsigned int)sub_140004E18("$G#b^taff.3<z|", v12)
            && !(unsigned int)sub_140004E18("$GJlk{|eR#{R+ji-SqoG+", v12)
            && !(unsigned int)sub_140004E18("$G}eyg>gF!gyz", v12)
            && !(unsigned int)sub_140004E18("$GVP{$yc<b<.3<z|", v12)
            && !(unsigned int)sub_140004E18("$G023S5Ax:hh2)j%{", v12)
            && !(unsigned int)sub_140004E18("$GI9s^eexg0Oh|R", v12)
            && !(unsigned int)sub_140004E18("$G8lf%d|Mgz>K+3_>vw", v12)
            && !(unsigned int)sub_140004E18("$G,Vk^khoh^o2)j%{", v12)
            && !(unsigned int)sub_140004E18("$G^yo^kyy.3<z|", v12) )
          {
            if ( (!(unsigned int)sub_140004E18("$Gn}8ylw%g{OiEk", v17)
               && !(unsigned int)sub_140004E18("$G,oe>%Giy3hDj3", v17)
               && !(unsigned int)sub_140004E18("$G,]]g:{:%|LGj+_l1y_", v17)
               && !(unsigned int)sub_140004E18("$G,d]>!O)d{R-+kK4o2z4", v17)
               && !(unsigned int)sub_140004E18("$G,m|PG[        DISCUZ_CODE_0        ]lt;1fK<1", v17)
               && !(unsigned int)sub_140004E18("$G,<]R>:hg{OiEkO", v17)
               && !(unsigned int)sub_140004E18("$G,5]da|i!<-i!", v17)
               && !(unsigned int)sub_140004E18("$G,1!O)C+|oRwj+_l1y_", v17)
               && !(unsigned int)sub_140004E18("$G,1!O):h%|zi)k.l)", v17)
               && !(unsigned int)sub_140004E18("$G,cfydfyK3hDj3", v17)
               && !(unsigned int)sub_140004E18("$G,N]vR<yy3hDj3", v17)
               && !(unsigned int)sub_140004E18("$G,labb1fK<1", v17)
               && !(unsigned int)sub_140004E18("$G,5kel{mKRy%GkK4o2z4", v17)
               && !(unsigned int)sub_140004E18("$G,se:poRlgOiEkO", v17)
               && !(unsigned int)sub_140004E18("$G,t99zoG{<vSjF>S", v17)
               && !(unsigned int)sub_140004E18("$G,6pAwy>z{hw)k.l)", v17)
               && !(unsigned int)sub_140004E18("$G,J;taff6<OiEkO", v17)
               && !(unsigned int)sub_140004E18("$G,s]>;|y+vhw)k.l)", v17)
               || !(unsigned int)sub_140004E18("$G1O0taff.3<z|", v12)
               && !(unsigned int)sub_140004E18("$G1O0z:E2foy", v12)
               && !(unsigned int)sub_140004E18("$Gn7s^ee2foy", v12)
               && !(unsigned int)sub_140004E18("$Gn}};ngR.3<z|", v12)
               && !(unsigned int)sub_140004E18("$Gf|a^:E2foy", v12)
               && !(unsigned int)sub_140004E18("$Gfeje|ogv0Oh|R", v12)
               && !(unsigned int)sub_140004E18("$G,Vk^khoh^o2)j%{", v12)
               && !(unsigned int)sub_140004E18("$GUj>Ro,ofCy%h|>L)ry+K", v12)
               && !(unsigned int)sub_140004E18("$G[[fc%Re.3<z|", v12)
               && !(unsigned int)sub_140004E18("$Gl[::g>zh0Oh|R", v12)
               && !(unsigned int)sub_140004E18("$G`z;^#<i.3<z|", v12)
               && !(unsigned int)sub_140004E18("$G[[fc%bo.3<z|", v12)
               && !(unsigned int)sub_140004E18("$G#b^taff.3<z|", v12)
               && !(unsigned int)sub_140004E18("$GJlk{|eR#{R+ji-SqoG+", v12)
               && !(unsigned int)sub_140004E18("$G}eyg>gF!gyz", v12)
               && !(unsigned int)sub_140004E18("$GVP{$yc<b<.3<z|", v12)
               && !(unsigned int)sub_140004E18("$G023S5Ax:hh2)j%{", v12)
               && !(unsigned int)sub_140004E18("$GI9s^eexg0Oh|R", v12)
               && !(unsigned int)sub_140004E18("$G8lf%d|Mgz>K+3_>vw", v12)
               && !(unsigned int)sub_140004E18("$G^yo^kyy.3<z|", v12))
              && (!v19
               || !(unsigned int)sub_140004E18("$GbbX-:Rc%lOh|R", v12)
               && !(unsigned int)sub_140004E18("$GbbXcPG$l>.3<z|", v12)) )
            {
              goto LABEL_134;
            }
          }
        }
      }
      *(_QWORD *)(a7 + 8) = 0i64;
      *(_DWORD *)a7 = -1073741790;
      *a6 = 4;
    }
LABEL_134:
    sub_1400062C8(v17);
LABEL_135:
    sub_1400062C8(v12);
    return v13;
  }
  return result;
}
 期待有高手/大佬能够搞定它
  
 
 
  
 
 
 复制代码__int64 __fastcall sub_140002E64(__int64 a1, __int64 a2, unsigned int a3)
{
  __int64 v5; // rdx
  __int64 v6; // r9
  __int64 result; // rax
  if ( a1 )
  {
    v5 = -1i64;
    do
      ++v5;
    while ( *(_BYTE *)(a1 + v5) );
  }
  else
  {
    v5 = 0i64;
  }
  v6 = a3;
  if ( a3 )
    v6 = a3 - 1;
  result = sub_140002CE8(a1, v5, a2, v6);
  if ( a3 && a2 && (unsigned int)result < a3 )
    *(_BYTE *)((unsigned int)result + a2) = 0;
  return result;
}
复制代码__int64 __fastcall sub_140002CE8(_BYTE *a1, int a2, _BYTE *a3, unsigned int a4)
{
  unsigned __int64 v5; // r13
  _BYTE *v8; // rdi
  __int64 v9; // rbx
  int v10; // esi
  unsigned __int8 v11; // r14
  int v12; // r9d
  __int64 v13; // rax
  __int64 v14; // rax
  int v15; // ecx
  unsigned int v16; // ecx
  unsigned int v17; // eax
  char v18; // cl
  char v19; // dl
  v5 = (unsigned __int64)&a1[a2];
  v8 = a1;
  v9 = 0i64;
  v10 = 0;
  v11 = 0;
  sub_140002A60();
  if ( a3 && a4 )
    *a3 = 0;
  if ( !v8 || !a2 || !a3 || !a4 )
    return 0i64;
  v12 = 0;
  if ( (unsigned __int64)v8 >= v5 )
  {
LABEL_29:
    if ( (unsigned int)v9 < a4 )
LABEL_30:
      a3[v9] = 0;
  }
  else
  {
    while ( (unsigned int)v9 < a4 )
    {
      if ( !v12 || (v13 = (unsigned __int8)*v8, byte_1400BB020[v13] <= -2) )
      {
        if ( (int)v9 + 1 > a4 )
          goto LABEL_30;
        v14 = (unsigned __int8)*v8;
        v15 = (unsigned __int8)byte_1400BB020[v14];
        if ( (unsigned __int8)(byte_1400BB020[v14] + 0x80) > 0x7Eu )
          goto LABEL_30;
        v10 = v15 - 128;
        if ( (unsigned __int8)(v15 + 0x80) < 4u )
        {
          if ( (_BYTE)v15 == 0x80 )
          {
            v11 = 37;
          }
          else
          {
            v11 = 84;
            if ( (_BYTE)v15 == 0x83 )
              v11 = 51;
          }
        }
        else
        {
          v11 = 0;
        }
        ++v8;
        ++v12;
        LOBYTE(v13) = *v8;
      }
      v16 = (unsigned __int8)byte_1400BB020[(unsigned __int8)v13];
      if ( (unsigned __int8)v16 >= 0x80u || v16 >= v11 )
        goto LABEL_30;
      v17 = (unsigned int)v9 % v11;
      if ( v16 < v17 )
        v18 = v11 - (unsigned int)v9 % v11 + v16;
      else
        v18 = v16 - v17;
      v19 = v18 + 84 * v10 - 47;
      if ( !v10 )
        v19 = v18;
      ++v8;
      a3[v9] = v19;
      ++v12;
      v9 = (unsigned int)(v9 + 1);
      if ( (unsigned __int64)v8 >= v5 )
        goto LABEL_29;
    }
  }
  return (unsigned int)v9;
}
复制代码char *sub_140002A60()
{
  int v0; // ebx
  const char *v1; // rdi
  unsigned __int8 v2; // al
  v0 = 0;
  v1 = "R%{vwG+KL-DEF.012!3OS)T_4qrH&IJ789;@ABCm`MN/Un}V5st#ux6p,WX(YZ[]^abc:defg<hijk>loyz|~";
  if ( !dword_1400B85C0 )
  {
    sub_140012680(byte_1400BB020, 255i64, 256i64);
    v2 = 82;
    do
    {
      ++v1;
      byte_1400BB020[v2] = v0++;
      v2 = *v1;
    }
    while ( *v1 );
    byte_1400BB05F = 0x80;
    byte_1400BB044 = -127;
    word_1400BB070 = -31870;
    dword_1400B85C0 = 1;
  }
  return byte_1400BB020;
}
复制代码__m128 *__fastcall sub_140012680(__m128 *a1, unsigned __int8 a2, unsigned __int64 a3)
{
  __m128 *result; // rax
  __int64 v4; // rdx
  unsigned __int64 v5; // r9
  char *v6; // rcx
  unsigned __int64 v7; // r8
  __m128 v8; // xmm0
  char *v9; // r8
  __m128 *v10; // rcx
  unsigned __int64 v11; // r8
  unsigned __int64 v12; // r9
  unsigned __int64 i; // r9
  __int64 v14; // r8
  result = a1;
  if ( a3 < 8 )
  {
    for ( ; a3; --a3 )
      a1->m128_i8[a3 - 1] = a2;
  }
  else
  {
    v4 = 0x101010101010101i64 * a2;
    if ( a3 >= 0x4F )
    {
      v8 = _mm_movelh_ps((__m128)(unsigned __int64)v4, (__m128)(unsigned __int64)v4);
      *a1 = v8;
      v9 = (char *)a1 + a3;
      v10 = (__m128 *)((unsigned __int64)&a1[1] & 0xFFFFFFFFFFFFFFF0ui64);
      v11 = v9 - (char *)v10;
      v12 = v11 >> 7;
      if ( v11 >> 7 )
      {
        do
        {
          *v10 = v8;
          v10[1] = v8;
          v10 += 8;
          v10[-6] = v8;
          v10[-5] = v8;
          --v12;
          v10[-4] = v8;
          v10[-3] = v8;
          v10[-2] = v8;
          v10[-1] = v8;
        }
        while ( v12 );
        v11 &= 0x7Fu;
      }
      for ( i = v11 >> 4; i; --i )
        *v10++ = v8;
      v14 = v11 & 0xF;
      if ( v14 )
        *(__m128 *)((char *)v10 + v14 - 16) = v8;
    }
    else
    {
      v5 = a3 & 0x78;
      v6 = (char *)a1 + (a3 & 0xFFFFFFFFFFFFFFF8ui64);
      do
      {
        *(unsigned __int64 *)((char *)&result->m128_u64[-1] + v5) = v4;
        v5 -= 8i64;
      }
      while ( v5 );
      v7 = a3 & 7;
      if ( v7 )
        *(_QWORD *)&v6[v7 - 8] = v4;
    }
  }
  return result;
}
复制代码__int64 __fastcall sub_140004E18(_BYTE *a1, _BYTE *a2)
{
  char *PoolWithTag; // rdi
  __int64 v5; // rsi
  SIZE_T v6; // rbx
  unsigned int v7; // ebx
  char P[256]; // [rsp+20h] [rbp-128h] BYREF
  PoolWithTag = P;
  if ( !a1 || !*a1 || !a2 || !*a2 )
    return 0i64;
  v5 = -1i64;
  v6 = -1i64;
  do
    ++v6;
  while ( a1[v6] );
  if ( v6 >= 0x100 )
  {
    v6 += 4i64;
    if ( KeGetCurrentIrql() <= 2u )
      PoolWithTag = (char *)ExAllocatePoolWithTag(NonPagedPool, v6, 0x4E507331u);
    else
      PoolWithTag = 0i64;
  }
  sub_140002E64(a1, PoolWithTag, (unsigned int)v6);
  do
    ++v5;
  while ( PoolWithTag[v5] );
  v7 = sub_1400052B0(a2, PoolWithTag, v5);
  if ( PoolWithTag != P && PoolWithTag && KeGetCurrentIrql() <= 2u )
    ExFreePoolWithTag(PoolWithTag, 0);
  return v7;
}
复制代码__int64 __fastcall sub_1400052B0(_BYTE *a1, char *a2, int a3)
{
  unsigned int v3; // r9d
  __int64 v4; // rax
  char *v5; // r10
  _BYTE *v6; // rbx
  int v7; // ebp
  char *v8; // rdi
  _BYTE *v9; // rsi
  char *i; // r11
  int v11; // ecx
  int v12; // eax
  int v13; // edx
  int v14; // ecx
  char v16; // dl
  char *v17; // rcx
  v3 = 0;
  LODWORD(v4) = a3;
  v5 = a2;
  v6 = a1;
  v7 = 0;
  if ( !a1 || !*a1 || !a2 || !*a2 )
    return 0i64;
  if ( a3 <= 0 )
  {
    v4 = -1i64;
    do
      ++v4;
    while ( a2[v4] );
  }
  v8 = &a2[(int)v4];
LABEL_9:
  v9 = v6;
  for ( i = v5; ; ++i )
  {
    v11 = (char)*v9;
    v12 = *i;
    if ( !*v9 )
      break;
    if ( (_BYTE)v12 == 42 )
    {
      v5 = i + 1;
      v7 = 1;
      v6 = v9;
      if ( !i[1] || v5 == v8 )
        return 1i64;
      goto LABEL_9;
    }
    if ( (_BYTE)v12 == 63 )
    {
      if ( (_BYTE)v11 == 46 )
        goto LABEL_18;
    }
    else
    {
      v13 = v12 + 32;
      if ( (unsigned int)(v12 - 65) > 0x19 )
        v13 = *i;
      v14 = v11 + 32;
      if ( (unsigned int)((char)*v9 - 65) > 0x19 )
        v14 = (char)*v9;
      if ( v14 != v13 )
      {
LABEL_18:
        if ( !v7 )
          return 0i64;
        ++v6;
        goto LABEL_9;
      }
    }
    ++v9;
  }
  v16 = *i;
  if ( (_BYTE)v12 == 42 )
    v16 = i[1];
  v17 = i + 1;
  if ( (_BYTE)v12 != 42 )
    v17 = i;
  if ( !v16 || v17 == v8 )
    return 1;
  return v3;
}
 |