| 子程序名 | 返回值类型 | 公开 | 备 注 | ||||
| BintoHex | 文本型 | 将字节集转换为 AA BB CC DD EE FF 的十六进制文本 | |||||
| 参数名 | 类 型 | 参考 | 可空 | 数组 | 备 注 | ||
| 原文 | 字节集 | ||||||
| 变量名 | 类 型 | 静态 | 数组 | 备 注 | ||
| 原文长度 | 整数型 | |||||
| 原文地址 | 整数型 | |||||
| 结果 | 文本型 | |||||
| 结果地址 | 整数型 | |||||
| 码表地址 | 整数型 | |||||
' 原文长度---dword ptr [ebp-4]
如果真 (原文长度 < 1)
返回 (“”)置入代码 ({ 232, 0, 0, 0, 0, 89, 131, 193, 9, 233, 0, 2, 0, 0 }) ' 跳转到代码
' 下面是码表
置入代码 ({ 48, 48, 48, 49, 48, 50, 48, 51, 48, 52, 48, 53, 48, 54, 48, 55, 48, 56, 48, 57, 48, 65, 48, 66, 48, 67, 48, 68, 48, 69, 48, 70, 49, 48, 49, 49, 49, 50, 49, 51, 49, 52, 49, 53, 49, 54, 49, 55, 49, 56, 49, 57, 49, 65, 49, 66, 49, 67, 49, 68, 49, 69, 49, 70, 50, 48, 50, 49, 50, 50, 50, 51, 50, 52, 50, 53, 50, 54, 50, 55, 50, 56, 50, 57, 50, 65, 50, 66, 50, 67, 50, 68, 50, 69, 50, 70, 51, 48, 51, 49, 51, 50, 51, 51, 51, 52, 51, 53, 51, 54, 51, 55, 51, 56, 51, 57, 51, 65, 51, 66, 51, 67, 51, 68, 51, 69, 51, 70, 52, 48, 52, 49, 52, 50, 52, 51, 52, 52, 52, 53, 52, 54, 52, 55, 52, 56, 52, 57, 52, 65, 52, 66, 52, 67, 52, 68, 52, 69, 52, 70, 53, 48, 53, 49, 53, 50, 53, 51, 53, 52, 53, 53, 53, 54, 53, 55, 53, 56, 53, 57, 53, 65, 53, 66, 53, 67, 53, 68, 53, 69, 53, 70, 54, 48, 54, 49, 54, 50, 54, 51, 54, 52, 54, 53, 54, 54, 54, 55, 54, 56, 54, 57, 54, 65, 54, 66, 54, 67, 54, 68, 54, 69, 54, 70, 55, 48, 55, 49, 55, 50, 55, 51, 55, 52, 55, 53, 55, 54, 55, 55, 55, 56, 55, 57, 55, 65, 55, 66, 55, 67, 55, 68, 55, 69, 55, 70, 56, 48, 56, 49, 56, 50, 56, 51, 56, 52, 56, 53, 56, 54, 56, 55, 56, 56, 56, 57, 56, 65, 56, 66, 56, 67, 56, 68, 56, 69, 56, 70, 57, 48, 57, 49, 57, 50, 57, 51, 57, 52, 57, 53, 57, 54, 57, 55, 57, 56, 57, 57, 57, 65, 57, 66, 57, 67, 57, 68, 57, 69, 57, 70, 65, 48, 65, 49, 65, 50, 65, 51, 65, 52, 65, 53, 65, 54, 65, 55, 65, 56, 65, 57, 65, 65, 65, 66, 65, 67, 65, 68, 65, 69, 65, 70, 66, 48, 66, 49, 66, 50, 66, 51, 66, 52, 66, 53, 66, 54, 66, 55, 66, 56, 66, 57, 66, 65, 66, 66, 66, 67, 66, 68, 66, 69, 66, 70, 67, 48, 67, 49, 67, 50, 67, 51, 67, 52, 67, 53, 67, 54, 67, 55, 67, 56, 67, 57, 67, 65, 67, 66, 67, 67, 67, 68, 67, 69, 67, 70, 68, 48, 68, 49, 68, 50, 68, 51, 68, 52, 68, 53, 68, 54, 68, 55, 68, 56, 68, 57, 68, 65, 68, 66, 68, 67, 68, 68, 68, 69, 68, 70, 69, 48, 69, 49, 69, 50, 69, 51, 69, 52, 69, 53, 69, 54, 69, 55, 69, 56, 69, 57, 69, 65, 69, 66, 69, 67, 69, 68, 69, 69, 69, 70, 70, 48, 70, 49, 70, 50, 70, 51, 70, 52, 70, 53, 70, 54, 70, 55, 70, 56, 70, 57, 70, 65, 70, 66, 70, 67, 70, 68, 70, 69, 70, 70 })
' 跳转到这里了~~
码表地址 = 0 ' ebp-8
结果地址 = 1 ' ebp-c
原文地址 = 2 ' ebp-10
' _asm{
' mov dword [ebp-0x08],ecx ;码表地址到---》变量dword ptr [ebp-8]
' push dword [ebp-0x04] ;原文长度 × 2
' mov eax,[ebp-0x04]
' shl dword [ebp-0x04],2
' sub dword [ebp-0x04],eax
' }
结果 = 取空白文本 (原文长度)
' _asm{
' mov dword [ebp-0x0C],eax ;结果地址 ebp-c
' mov ebx,dword [ebp 0x08]
' mov ebx,dword [ebx]
' add ebx,0x08
' mov dword [ebp-0x10],ebx ;原文地址ebp-10
' ;核心计算过程
' mov esi,dword [ebp-0x10]
' mov ebx,dword [ebp-0x08]
' mov edi,dword [ebp-0x0C]
' pop dword [ebp-0x04]
' mov ecx,dword [ebp-0x04]
' add ecx,esi
' label1:
' xor eax,eax
' mov al,byte [esi]
' inc esi
' shl eax,1
' mov dx,word [eax ebx]
' mov word [edi],dx
' inc edi
' inc edi
' mov byte [edi],0x20
' inc edi
' cmp esi,ecx
' jl label1
' }
返回 (结果)
词条作者信息 使用例程
