Malcat 0.9.9 离线激活

Malcat 0.9.9 离线激活

文件来源

Malcat Full Edition v0.9.9 Full Activated - Multiple OS - OnLine KeyGen | RevTeam.Re - Reverse Engineering Team

https://seyarabata.com/Malcat.Full.Edition.v0.9.9.KG

check_ActivationCode_1400C1150

Malcat (Windows x64 - Python 3.8)

malcat.exe

char __fastcall check_ActivationCode_1400C1150(__int64 a1, std_string *code)
{
  // [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]

  v23 = 0xFFFFFFFFFFFFFFFEui64;
  if ( !code->_Mysize )
    return 0;

  v4 = *(_QWORD *)(a1 + 0x290);
  std::vector<enum AlertType>::vector<enum AlertType>(
    (std::vector<enum AlertType> *)v11,
    (const std::vector<enum AlertType> *)(v4 + 0x48));
  std::vector<enum AlertType>::vector<enum AlertType>(
    (std::vector<enum AlertType> *)v12,
    (const std::vector<enum AlertType> *)(v4 + 0x60));
  std::vector<enum AlertType>::vector<enum AlertType>(
    (std::vector<enum AlertType> *)v13,
    (const std::vector<enum AlertType> *)(v4 + 0x78));
  sub_140038530(v14, v4 + 0x90);
  v14[4] = *(_QWORD *)(v4 + 0xB0);
  v14[5] = *(_QWORD *)(v4 + 0xB8);
  v14[6] = *(_QWORD *)(v4 + 0xC0);
  v15 = *(_DWORD *)(v4 + 0xC8);
  v16 = *(_DWORD *)(v4 + 0xCC);
  v17 = *(_BYTE *)(v4 + 0xD0);
  kanal::ActivationCode::ActivationCode(&parse_code, code);
  if ( !parse_code.valid_88 )
  {
    std::logic_error::logic_error((std::logic_error *)pExceptionObject, "Invalid activation code");
    CxxThrowException(pExceptionObject, (_ThrowInfo *)&_TI2_AVruntime_error_std__);
  }

  obj = (ActivationCode *)(*(_QWORD *)(a1 + 0x290) + 0x48i64);
  if ( obj != &parse_code )
    vec_1400B13B0(
      (std_vector_char *)(*(_QWORD *)(a1 + 0x290) + 0x48i64),
      parse_code.hardwareid0.os_id_0._Myfirst,
      (__int64)parse_code.hardwareid0.os_id_0._Mylast,
      v5);

  if ( &obj->hardwareid0.disk_id_18 != &parse_code.hardwareid0.disk_id_18 )
    vec_1400B13B0(
      &obj->hardwareid0.disk_id_18,
      parse_code.hardwareid0.disk_id_18._Myfirst,
      (__int64)parse_code.hardwareid0.disk_id_18._Mylast,
      v5);

  if ( &obj->hardwareid0.network_id_30 != &parse_code.hardwareid0.network_id_30 )
    vec_1400B13B0(
      &obj->hardwareid0.network_id_30,
      parse_code.hardwareid0.network_id_30._Myfirst,
      (__int64)parse_code.hardwareid0.network_id_30._Mylast,
      v5);

  if ( &obj->user_wstr_48 != &parse_code.user_wstr_48 )
  {
    Src_1 = &parse_code.user_wstr_48;
    if ( parse_code.user_wstr_48._Myres >= 8 )
      Src_1 = (std_wstring *)parse_code.user_wstr_48.u._Ptr;

    sub_140038300(&obj->user_wstr_48, Src_1, parse_code.user_wstr_48._Mysize);
  }

  obj->activation_68 = parse_code.activation_68;
  obj->order_70 = parse_code.order_70;
  obj->end_of_updates_timestamp_s_78 = parse_code.end_of_updates_timestamp_s_78;
  obj->lic_type_80 = parse_code.lic_type_80;
  obj->x_timestamp_s_84 = parse_code.x_timestamp_s_84;
  obj->valid_88 = parse_code.valid_88;
  //   return *(_BYTE *)(a1 + 0xD0)                  // +88h ==>valid_88;
  //       // 2025-02-16 07:00:00
  //       && *(__int64 *)(a1 + 0xC0) >= 1739660400  // end_of_updates_timestamp_s_78
  //       && *(_DWORD *)(a1 + 0xC8) == 1            // +80h==>lic_type_80
  //       && (unsigned __int8)kanal::HardwareId::operator==(a1 + 0x48, a1)
  //       && *(_QWORD *)(a1 + 0xB8) != 33i64;       // +0x70==>  _QWORD order_70;
  if ( !kanal::HardwareId::operator==(*(_QWORD *)(a1 + 0x290)) )
  {
    // 2025-02-16 07:00:00
    // 0xc0-0x48==0x78
    if ( *(__int64 *)(*(_QWORD *)(a1 + 0x290) + 0xC0i64) < 1739660400 )// end_of_updates_timestamp_s_78
    {
      std::logic_error::logic_error(
        (std::logic_error *)pExceptionObject_1,
        "Your update time has expired and does not cover this version, please renew your license.");
      CxxThrowException(pExceptionObject_1, (_ThrowInfo *)&_TI2_AVruntime_error_std__);
    }

    std::logic_error::logic_error(
      (std::logic_error *)pExceptionObject_2,
      "Wrong activation, did your hardware change? You can try to reactivate the software (may consume one activation if "
      "your hardware did change) or contact us.");
    CxxThrowException(pExceptionObject_2, (_ThrowInfo *)&_TI2_AVruntime_error_std__);
  }

  v8 = *(_QWORD *)(a1 + 0x2D0);
  v9 = sub_140032370(v21, (__int64 *)&code->u._Ptr);
  sub_140032220(v18, (__int64)"License/Code");
  (*(void (__fastcall **)(__int64, char *, void *))(*(_QWORD *)v8 + 0xD8i64))(v8, v18, v9);
  free(Block);
  unknown_libname_6(v18);
  free(v22);
  unknown_libname_6(v21);
  (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 0x2D0) + 0x78i64))(*(_QWORD *)(a1 + 0x2D0), 0i64);
  unknown_libname_6(&parse_code.user_wstr_48);
  sub_140072700(&parse_code);
  unknown_libname_6(v14);
  sub_140072700(v11);
  return 1;
}

kanal::ActivationCode::ActivationCode

kanal.dll 导出函数

ActivationCode *__fastcall kanal::ActivationCode::ActivationCode(ActivationCode *a1, std_string *code)
{
  // [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]

  v34 = 0xFFFFFFFFFFFFFFFEui64;
  v35 = a1;
  kanal::HardwareId::HardwareId(&a1->hardwareid0);
  std_vector_char = (__int128 *)&a1->user_wstr_48;
  v5 = 0i64;
  a1->user_wstr_48._Mysize = 0i64;
  a1->user_wstr_48._Myres = 7i64;
  a1->user_wstr_48.u._Buf[0] = 0;
  a1->valid_88 = 0;
  a1->lic_type_80 = 0;
  v6 = pcre2_compile_8(
         "^([0-2])-([0-9a-f]{8})?-([0-9a-f]{8})?-([0-9a-f]{8})?-([0-9a-f]+)-(\\d+)-([0-9a-f]*)-(\\d+)-([0-9a-f]+)$",
         0xFFFFFFFFFFFFFFFFui64,
         0i64,
         v39,
         v40,
         0i64);
  v33 = v6;
  if ( !v6 )
  {
    sub_190072E70(&obj, "error while compiling regex");
    CxxThrowException(&obj, (_ThrowInfo *)&_TI2_AVruntime_error_std__);
  }

  v7 = pcre2_match_data_create_8(0xA);
  v8 = v7;
  v32 = v7;
  code_1 = code;
  if ( code->_Myres >= 0x10 )
    code_1 = (std_string *)code->u._Ptr;

  if ( (int)pcre2_match_8(v6, (unsigned __int64)code_1, code->_Mysize, 0i64, 0, v7, 0i64) > 0 )
  {
    ovector_pointer_8 = pcre2_get_ovector_pointer_8(v8);
    memset(&obj, 0, sizeof(obj));
    vec_1903AEA20(&obj, 9i64);
    t = obj._Myfirst;
    if ( obj._Mylast - obj._Myfirst )
    {
      v13 = 0i64;
      p__Myend = (_QWORD *)(ovector_pointer_8 + 0x10);
      do
      {
        ActivationCode_2 = code;
        n0x10 = code->_Myres;
        if ( n0x10 >= 0x10 )
          ActivationCode_2 = (std_string *)code->u._Ptr;

        v17 = &ActivationCode_2->u._Buf[p__Myend[1]];
        ActivationCode_3 = code;
        if ( n0x10 >= 0x10 )
          ActivationCode_3 = (std_string *)code->u._Ptr;

        v19 = &ActivationCode_3->u._Buf[*p__Myend];
        str._Mysize = 0i64;
        str._Myres = 0xFi64;
        str.u._Buf[0] = 0;
        if ( v19 != v17 )
        {
          string_add_19009AE90(&str, v19, v17 - v19);
          t = obj._Myfirst;
        }

        v20 = &t[v13];
        if ( &t[v13] != &str )
        {
          x_destruct_19009ABB0((__int64)&t[v13]);
          *v20 = str;
          str._Mysize = 0i64;
          str._Myres = 0xFi64;
          str.u._Buf[0] = 0;
        }

        x_destruct_19009ABB0((__int64)&str);
        ++v5;
        p__Myend += 2;
        ++v13;
        t = obj._Myfirst;
      }
      while ( v5 < obj._Mylast - obj._Myfirst );

      v8 = v32;
    }

    a1->lic_type_80 = xx_strtol_190235130(t, v11, 0xAi64);
    p_network_id = hex2bytes((std_vector_char *)&str, obj._Myfirst + 3);
    p_disk_id = hex2bytes((std_vector_char *)&std_vector_char__1, obj._Myfirst + 2);
    os_id = hex2bytes(&std_vector_char__2, obj._Myfirst + 1);
    v24 = kanal::HardwareId::HardwareId(&HardwareId_, os_id, p_disk_id, p_network_id);
    if ( a1 != (ActivationCode *)v24 )
    {
      vec_destructor_19009A8A0(&a1->hardwareid0.os_id_0);
      a1->hardwareid0.os_id_0._Myfirst = v24->os_id_0._Myfirst;
      a1->hardwareid0.os_id_0._Mylast = v24->os_id_0._Mylast;
      a1->hardwareid0.os_id_0._Myend = v24->os_id_0._Myend;
      v24->os_id_0._Myfirst = 0i64;
      v24->os_id_0._Mylast = 0i64;
      v24->os_id_0._Myend = 0i64;
    }

    p_Myfirst = &v24->disk_id_18._Myfirst;
    if ( &a1->hardwareid0.disk_id_18 != &v24->disk_id_18 )
    {
      vec_destructor_19009A8A0(&a1->hardwareid0.disk_id_18);
      a1->hardwareid0.disk_id_18._Myfirst = *p_Myfirst;
      a1->hardwareid0.disk_id_18._Mylast = v24->disk_id_18._Mylast;
      a1->hardwareid0.disk_id_18._Myend = v24->disk_id_18._Myend;
      *p_Myfirst = 0i64;
      v24->disk_id_18._Mylast = 0i64;
      v24->disk_id_18._Myend = 0i64;
    }

    p_network_id_30 = (ActivationCode *)&v24->network_id_30;
    if ( &a1->hardwareid0.network_id_30 != (std_vector_char *)p_network_id_30 )
    {
      vec_destructor_19009A8A0(&a1->hardwareid0.network_id_30);
      a1->hardwareid0.network_id_30 = p_network_id_30->hardwareid0.os_id_0;
      p_network_id_30->hardwareid0.os_id_0._Myfirst = 0i64;
      p_network_id_30->hardwareid0.os_id_0._Mylast = 0i64;
      p_network_id_30->hardwareid0.os_id_0._Myend = 0i64;
    }

    vec_destructor_19009A8A0(&HardwareId_.network_id_30);
    vec_destructor_19009A8A0(&HardwareId_.disk_id_18);
    vec_destructor_19009A8A0(&HardwareId_.os_id_0);
    vec_destructor_19009A8A0(&std_vector_char__2);
    vec_destructor_19009A8A0((std_vector_char *)&std_vector_char__1);
    vec_destructor_19009A8A0((std_vector_char *)&str);
    a1->end_of_updates_timestamp_s_78 = x_strtoull_1902522D0(obj._Myfirst + 4, 0i64, 0x10);
    a1->order_70 = x_strtoull_1902522D0(obj._Myfirst + 5, 0i64, 0xA);
    v27 = hex2bytes((std_vector_char *)&str, obj._Myfirst + 6);
    ConvertFromUtf8(&std_vector_char__1, v27->_Myfirst, v27->_Mylast - v27->_Myfirst);
    if ( std_vector_char != &std_vector_char__1 )
    {
      unknown_libname_250((__int64)&a1->user_wstr_48);
      *std_vector_char = std_vector_char__1;
      *(__m128i *)&a1->user_wstr_48._Mysize = si128;
      si128 = _mm_load_si128((const __m128i *)&xmmword_1906D86E0);
      LOWORD(std_vector_char__1) = 0;
    }

    unknown_libname_250((__int64)&std_vector_char__1);
    vec_destructor_19009A8A0((std_vector_char *)&str);
    a1->activation_68 = x_strtoull_1902522D0(obj._Myfirst + 7, 0i64, 0xA);
    a1->x_timestamp_s_84 = x_strtoull_1902522D0(obj._Myfirst + 8, 0i64, 0x10);
    a1->valid_88 = 1;
    sub_19009A570((__int64)&obj);
    v6 = v33;
  }

  pcre2_get_ovector_pointer_8(v8);
  pcre2_match_data_free_8(v8);
  pcre2_code_free_8(v6);
  return a1;
}

py

离线激活



import time


def kg_Personal( hardwareid: str, end_of_updates_timestamp_s: int, order: int, user: str, activation: int, x_timestamp_s: int):
    assert '-' in hardwareid, "hardwareid error"
    assert order!=33 ,'order 33 invalid'
    l = [
        '1', #Personal,non-commercial use only  仅供个人和非商业使用
        hardwareid.lower(),
        end_of_updates_timestamp_s.to_bytes(4, 'big').hex(),
        str(order),
        user.encode().hex(),
        str(activation),
        x_timestamp_s.to_bytes(4, 'big').hex()
    ]
    code = '-'.join(l)
    return code


def test():
    print('please input your hardwareid(like "XXXXXXXX-XXXXXXXX-XXXXXXX" , copy from about):')
    hardwareid = input()
    end_of_updates_timestamp_s = int(time.mktime( time.strptime('2066-8-1', '%Y-%m-%d')))
    x_timestamp_s = int(time.mktime(time.strptime('2025-8-2', '%Y-%m-%d')))
    activation = 666
    user = 'ikun'
    order = 1
    code = kg_Personal( hardwareid, end_of_updates_timestamp_s,
              order, user, activation, x_timestamp_s)
    print(code)
    return code
    pass


if __name__ == '__main__':
    test()
    pass

ps

image-20250802121515499

image-20250802121449658

posted @ 2025-08-02 12:31  DirWangK  阅读(294)  评论(0)    收藏  举报