当前位置: 首页 > news >正文

pidgen!DecodeProdKey函数分析之iDecodedBytesMax


第一部分:
else
{
iDecodedBytes = 0;
unsigned int i = (unsigned int)iDigits;
while (iDecodedBytes <= iDecodedBytesMax)
{
i += iBase * abDecodedBytes[iDecodedBytes];
abDecodedBytes[iDecodedBytes] = (unsigned char)i;
i /= 256;
++iDecodedBytes;
}

              if (i != 0)
{

                        if (iDecodedBytes < sizeof(abDecodedBytes))
{
abDecodedBytes[iDecodedBytes] = (unsigned char)i;
iDecodedBytesMax = iDecodedBytes;
}

第二部分:

1: kd> dv iDecodedBytesMax
iDecodedBytesMax = 0n6

1: kd>  dv   abDecodedBytes
abDecodedBytes = unsigned char [64] "???"
1: kd> dx -r1 (*((PIDGen!unsigned char (*)[64])0x6fba8))
(*((PIDGen!unsigned char (*)[64])0x6fba8))                 [Type: unsigned char [64]]
[0]              : 0x12 [Type: unsigned char]
[1]              : 0x9b [Type: unsigned char]
[2]              : 0x6 [Type: unsigned char]
[3]              : 0x55 [Type: unsigned char]
[4]              : 0xdb [Type: unsigned char]
[5]              : 0xb5 [Type: unsigned char]
[6]              : 0xe1 [Type: unsigned char]
[7]              : 0x0 [Type: unsigned char]
[8]              : 0x0 [Type: unsigned char]


1: kd> p
Breakpoint 8 hit
eax=00000004 ebx=00000001 ecx=0006fbae edx=0000009c esi=00000006 edi=0006fe36
eip=0040157c esp=0006fb6c ebp=0006fbec iopl=0         nv up ei pl nz na po cy
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000203
PIDGen!DecodeProdKey+0x124:
001b:0040157c 46              inc     esi
1: kd> p
eax=00000004 ebx=00000001 ecx=0006fbae edx=0000009c esi=00000007 edi=0006fe36
eip=0040157d esp=0006fb6c ebp=0006fbec iopl=0         nv up ei pl nz na po cy
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000203
PIDGen!DecodeProdKey+0x125:
001b:0040157d 3b759c          cmp     esi,dword ptr [ebp-64h] ss:0023:0006fb88=00000006

        i /= 256;    eax=00000004

        ++iDecodedBytes;esi=00000007


1: kd> dv abDecodedBytes
abDecodedBytes = unsigned char [64] "???"
sizeof(abDecodedBytes)=64=0x40

第三部分:

1: kd> p
eax=00000004 ebx=00000001 ecx=0006fbae edx=0000009c esi=00000007 edi=0006fe36
eip=00401584 esp=0006fb6c ebp=0006fbec iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202
PIDGen!DecodeProdKey+0x12c:
001b:00401584 7413            je      PIDGen!DecodeProdKey+0x141 (00401599) [br=0]
1: kd> p
eax=00000004 ebx=00000001 ecx=0006fbae edx=0000009c esi=00000007 edi=0006fe36
eip=00401586 esp=0006fb6c ebp=0006fbec iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202
PIDGen!DecodeProdKey+0x12e:
001b:00401586 83fe40          cmp     esi,40h

1: kd> p
eax=00000004 ebx=00000001 ecx=0006fbae edx=0000009c esi=00000007 edi=0006fe36
eip=00401589 esp=0006fb6c ebp=0006fbec iopl=0         nv up ei ng nz na po cy
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000283
PIDGen!DecodeProdKey+0x131:
001b:00401589 7309            jae     PIDGen!DecodeProdKey+0x13c (00401594) [br=0]
1: kd> p
eax=00000004 ebx=00000001 ecx=0006fbae edx=0000009c esi=00000007 edi=0006fe36
eip=0040158b esp=0006fb6c ebp=0006fbec iopl=0         nv up ei ng nz na po cy
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000283
PIDGen!DecodeProdKey+0x133:
001b:0040158b 884435bc        mov     byte ptr [ebp+esi-44h],al ss:0023:0006fbaf=00


eax=00000004
0023:0006fbaf

1: kd> dx -r1 (*((PIDGen!unsigned char (*)[64])0x6fba8))
(*((PIDGen!unsigned char (*)[64])0x6fba8))                 [Type: unsigned char [64]]
[0]              : 0x12 [Type: unsigned char]    0x6fba8
[1]              : 0x9b [Type: unsigned char]    0x6fba9
[2]              : 0x6 [Type: unsigned char]    0x6fbaa
[3]              : 0x55 [Type: unsigned char]    0x6fbab
[4]              : 0xdb [Type: unsigned char]    0x6fbac
[5]              : 0xb5 [Type: unsigned char]    0x6fbad
[6]              : 0xe1 [Type: unsigned char]    0x6fbae
[7]              : 0x0 [Type: unsigned char]    0x6fbaf
[8]              : 0x0 [Type: unsigned char]


1: kd> dv abDecodedBytes
abDecodedBytes = unsigned char [64] "???"
1: kd> dx -r1 (*((PIDGen!unsigned char (*)[64])0x6fba8))
(*((PIDGen!unsigned char (*)[64])0x6fba8))                 [Type: unsigned char [64]]
[0]              : 0x12 [Type: unsigned char]
[1]              : 0x9b [Type: unsigned char]
[2]              : 0x6 [Type: unsigned char]
[3]              : 0x55 [Type: unsigned char]
[4]              : 0xdb [Type: unsigned char]
[5]              : 0xb5 [Type: unsigned char]
[6]              : 0xe1 [Type: unsigned char]
[7]              : 0x4 [Type: unsigned char]


第四部分:

                           iDecodedBytesMax = iDecodedBytes;

1: kd> p
eax=00000004 ebx=00000001 ecx=0006fbae edx=0000009c esi=00000007 edi=0006fe36
eip=0040158f esp=0006fb6c ebp=0006fbec iopl=0         nv up ei ng nz na po cy
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000283
PIDGen!DecodeProdKey+0x137:
001b:0040158f 89759c          mov     dword ptr [ebp-64h],esi ss:0023:0006fb88=00000006

1: kd> dv iDecodedBytesMax
iDecodedBytesMax = 0n6

1: kd> dd 0006fbec-64h
0006fb88  00000006


1: kd> p
eax=00000004 ebx=00000001 ecx=0006fbae edx=0000009c esi=00000007 edi=0006fe36
eip=00401592 esp=0006fb6c ebp=0006fbec iopl=0         nv up ei ng nz na po cy
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000283
PIDGen!DecodeProdKey+0x13a:
001b:00401592 eb05            jmp     PIDGen!DecodeProdKey+0x141 (00401599)


1: kd> dv iDecodedBytesMax
iDecodedBytesMax = 0n7
1: kd>  dd 0006fbec-64h
0006fb88  00000007

http://www.dtcms.com/a/335218.html

相关文章:

  • docker安装mongodb及java连接实战
  • 视频理解综述
  • 【异步】js中异步的实现方式 async await /Promise / Generator
  • 码上爬第十一题【协程+wasm】
  • 博弈论07——Lemke-Howson 算法
  • STM32-GPIO实践部分1-跑马灯实验
  • 【Java基础面试题】Java基础概念
  • 按键及消抖
  • C++ 最短路Dijkstra
  • [Python]PTA:for 求奇数分之一序列前N项和
  • 安卓开发选择题
  • CUDA 编程笔记:CUDA延迟隐藏
  • 通配符 重定向 管道符
  • Java 中重载与重写的全面解析(更新版)
  • 在浏览器端使用 xml2js 遇到的报错及解决方法
  • BM25算法和传统的TF-IDF算法的区别
  • 改进版的QGIS 的(属性查询) identify featrues 功能
  • 算法题Day2
  • 计组-间接寻址
  • 抽象代数 · 代数结构 | 群、环、域、向量空间
  • 【QT】常⽤控件详解(八) Qt窗⼝ 菜单栏 工具栏 状态栏 浮动窗口 五种内置对话框
  • Oracle数据库文件管理与空间问题解决指南
  • Java中 23 种设计模式介绍,附带示例
  • IO流-打印流
  • leetcode hot100数组:缺失的第一个正数
  • 洛谷B3924 [GESP202312 二级] 小杨的H字矩阵
  • 洛谷B3865 [GESP202309 二级] 小杨的 X 字矩阵(举一反三)
  • CSDN部分内容改为视频转到B站-清单
  • 如何解决pip安装报错ModuleNotFoundError: No module named ‘opencv-python’问题
  • Cloudflare Tunnel 使用SAAS回源加速配置教程