找回密码
 注册
搜索
热搜: 超星 读书 找书
查看: 831|回复: 20

selong 请进!你需要的 11H 解密算法

[复制链接]
发表于 2006-4-28 01:26:27 | 显示全部楼层 |阅读模式
今天将 PDG2.DLL 分析了一下,找到 1xH 解密代码,供你 BE助手 2.0 参考。

Part1
  1. .text:1002CC60 ; 〓〓〓〓〓〓〓〓〓〓〓〓 S U B R O U T I N E  〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
  2. .text:1002CC60
  3. .text:1002CC60
  4. .text:1002CC60 sub_1002CC60   proc near          ; CODE XREF: sub_1002B380+192p
  5. .text:1002CC60                            ; sub_1002B550+1BEp ...
  6. .text:1002CC60
  7. .text:1002CC60 var_6C       = dword ptr -6Ch
  8. .text:1002CC60 var_68       = dword ptr -68h
  9. .text:1002CC60 var_64       = dword ptr -64h
  10. .text:1002CC60 var_60       = dword ptr -60h
  11. .text:1002CC60 var_5C       = dword ptr -5Ch
  12. .text:1002CC60 var_58       = dword ptr -58h
  13. .text:1002CC60 var_54       = dword ptr -54h
  14. .text:1002CC60 var_50       = dword ptr -50h
  15. .text:1002CC60 var_4C       = dword ptr -4Ch
  16. .text:1002CC60 var_48       = dword ptr -48h
  17. .text:1002CC60 var_44       = dword ptr -44h
  18. .text:1002CC60 var_40       = dword ptr -40h
  19. .text:1002CC60 var_3C       = dword ptr -3Ch
  20. .text:1002CC60 var_38       = dword ptr -38h
  21. .text:1002CC60 var_34       = dword ptr -34h
  22. .text:1002CC60 var_30       = dword ptr -30h
  23. .text:1002CC60 var_2C       = dword ptr -2Ch
  24. .text:1002CC60 var_28       = dword ptr -28h
  25. .text:1002CC60 var_24       = dword ptr -24h
  26. .text:1002CC60 var_20       = dword ptr -20h
  27. .text:1002CC60 var_1C       = dword ptr -1Ch
  28. .text:1002CC60 var_18       = dword ptr -18h
  29. .text:1002CC60 var_14       = dword ptr -14h
  30. .text:1002CC60 var_10       = dword ptr -10h
  31. .text:1002CC60 var_C        = dword ptr -0Ch
  32. .text:1002CC60 var_8        = dword ptr -8
  33. .text:1002CC60 var_4        = dword ptr -4
  34. .text:1002CC60 pOh         = dword ptr  4       ; Optional_Header
  35. .text:1002CC60 pdgData      = dword ptr  8
  36. .text:1002CC60
  37. .text:1002CC60            sub    esp, 6Ch
  38. .text:1002CC63            xor    eax, eax
  39. .text:1002CC65            push   esi
  40. .text:1002CC66            mov    esi, [esp+70h+pOh]
  41. .text:1002CC6A            mov    [esp+70h+var_24], eax
  42. .text:1002CC6E            mov    [esp+70h+var_48], eax
  43. .text:1002CC72            mov    [esp+70h+var_6C], eax
  44. .text:1002CC76            lea    eax, [esp+70h+var_24]
  45. .text:1002CC7A            lea    ecx, [esp+70h+var_48]
  46. .text:1002CC7E            push   eax         ; int
  47. .text:1002CC7F            mov    ax, [esi+optional_header.keydata.KeyToDecode1xH]
  48. .text:1002CC83            lea    edx, [esp+74h+var_6C]
  49. .text:1002CC87            push   ecx         ; int
  50. .text:1002CC88            mov    cx, [esi+optional_header.y_pix] ; 扫描图像的纵向参数
  51. .text:1002CC8C            push   edx         ; int
  52. .text:1002CC8D            mov    dx, [esi+optional_header.x_pix] ; 扫描图像的横向参数
  53. .text:1002CC91            push   eax         ; keyToDecode1xH
  54. .text:1002CC92            mov    eax, [esi+optional_header.size_PDG_data]
  55. .text:1002CC95            push   ecx         ; y_pix
  56. .text:1002CC96            push   edx         ; x_pix
  57. .text:1002CC97            push   eax         ; size_pdg_data
  58. .text:1002CC98            call   sub_10035DA0   ; Decode pdg
  59. .text:1002CC9D            xor    eax, eax
  60. .text:1002CC9F            add    esp, 1Ch
  61. .text:1002CCA2            mov    al, [esi+optional_header.pdgType] ; 02H, 11H, ...
  62. .text:1002CCA5            add    eax, 0FFFFFFEFh ; case (pdgType - 11H) of
  63. .text:1002CCA8            pop    esi
  64. .text:1002CCA9            cmp    eax, 0Bh      ; switch 12 cases
  65. .text:1002CCAC            ja    @ELSE        ; default
  66. .text:1002CCB2            jmp    ds:decode_1xH_subs[eax*4] ; switch jump
  67. .text:1002CCB9
  68. .text:1002CCB9 @11H:                        ; DATA XREF: .text:decode_1xH_subso
  69. .text:1002CCB9            mov    ecx, [esp+6Ch+var_64] ; case 0x0
  70. .text:1002CCBD            mov    edx, [esp+6Ch+var_68]
  71. .text:1002CCC1            mov    eax, [esp+6Ch+pdgData]
  72. .text:1002CCC5            push   ecx
  73. .text:1002CCC6            push   edx
  74. .text:1002CCC7            push   eax
  75. .text:1002CCC8            call   sub_1002CEC0
  76. .text:1002CCCD            add    esp, 0Ch
  77. .text:1002CCD0            xor    ecx, ecx
  78. .text:1002CCD2            cmp    eax, 1
  79. .text:1002CCD5            setz   cl
  80. .text:1002CCD8            mov    eax, ecx
  81. .text:1002CCDA            add    esp, 6Ch
  82. .text:1002CCDD            retn
  83. .text:1002CCDE ; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  84. .text:1002CCDE
  85. .text:1002CCDE @12H:                        ; CODE XREF: sub_1002CC60+52j
  86. .text:1002CCDE                            ; DATA XREF: .text:decode_1xH_subso
  87. .text:1002CCDE            mov    ecx, [esp+6Ch+var_5C] ; case 0x1
  88. .text:1002CCE2            mov    edx, [esp+6Ch+var_60]
  89. .text:1002CCE6            mov    eax, [esp+6Ch+pdgData]
  90. .text:1002CCEA            push   ecx
  91. .text:1002CCEB            push   edx
  92. .text:1002CCEC            push   eax
  93. .text:1002CCED            call   sub_1002CEC0
  94. .text:1002CCF2            add    esp, 0Ch
  95. .text:1002CCF5            xor    ecx, ecx
  96. .text:1002CCF7            cmp    eax, 1
  97. .text:1002CCFA            setz   cl
  98. .text:1002CCFD            mov    eax, ecx
  99. .text:1002CCFF            add    esp, 6Ch
  100. .text:1002CD02            retn
  101. .text:1002CD03 ; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  102. .text:1002CD03
  103. .text:1002CD03 @13H:                        ; CODE XREF: sub_1002CC60+52j
  104. .text:1002CD03                            ; DATA XREF: .text:decode_1xH_subso
  105. .text:1002CD03            mov    ecx, [esp+6Ch+var_54] ; case 0x2
  106. .text:1002CD07            mov    edx, [esp+6Ch+var_58]
  107. .text:1002CD0B            mov    eax, [esp+6Ch+pdgData]
  108. .text:1002CD0F            push   ecx
  109. .text:1002CD10            push   edx
  110. .text:1002CD11            push   eax
  111. .text:1002CD12            call   sub_1002CEC0
  112. .text:1002CD17            add    esp, 0Ch
  113. .text:1002CD1A            xor    ecx, ecx
  114. .text:1002CD1C            cmp    eax, 1
  115. .text:1002CD1F            setz   cl
  116. .text:1002CD22            mov    eax, ecx
  117. .text:1002CD24            add    esp, 6Ch
  118. .text:1002CD27            retn
  119. .text:1002CD28 ; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  120. .text:1002CD28
  121. .text:1002CD28 @14H:                        ; CODE XREF: sub_1002CC60+52j
  122. .text:1002CD28                            ; DATA XREF: .text:decode_1xH_subso
  123. .text:1002CD28            mov    ecx, [esp+6Ch+var_4C] ; case 0x3
  124. .text:1002CD2C            mov    edx, [esp+6Ch+var_50]
  125. .text:1002CD30            mov    eax, [esp+6Ch+pdgData]
  126. .text:1002CD34            push   ecx
  127. .text:1002CD35            push   edx
  128. .text:1002CD36            push   eax
  129. .text:1002CD37            call   sub_1002CEC0
  130. .text:1002CD3C            add    esp, 0Ch
  131. .text:1002CD3F            xor    ecx, ecx
  132. .text:1002CD41            cmp    eax, 1
  133. .text:1002CD44            setz   cl
  134. .text:1002CD47            mov    eax, ecx
  135. .text:1002CD49            add    esp, 6Ch
  136. .text:1002CD4C            retn
  137. .text:1002CD4D ; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  138. .text:1002CD4D
  139. .text:1002CD4D @15H:                        ; CODE XREF: sub_1002CC60+52j
  140. .text:1002CD4D                            ; DATA XREF: .text:decode_1xH_subso
  141. .text:1002CD4D            mov    ecx, [esp+6Ch+var_40] ; case 0x4
  142. .text:1002CD51            mov    edx, [esp+6Ch+var_44]
  143. .text:1002CD55            mov    eax, [esp+6Ch+pdgData]
  144. .text:1002CD59            push   ecx
  145. .text:1002CD5A            push   edx
  146. .text:1002CD5B            push   eax
  147. .text:1002CD5C            call   sub_1002CF40
  148. .text:1002CD61            add    esp, 0Ch
  149. .text:1002CD64            xor    ecx, ecx
  150. .text:1002CD66            cmp    eax, 1
  151. .text:1002CD69            setz   cl
  152. .text:1002CD6C            mov    eax, ecx
  153. .text:1002CD6E            add    esp, 6Ch
  154. .text:1002CD71            retn
  155. .text:1002CD72 ; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  156. .text:1002CD72
  157. .text:1002CD72 @16H:                        ; CODE XREF: sub_1002CC60+52j
  158. .text:1002CD72                            ; DATA XREF: .text:decode_1xH_subso
  159. .text:1002CD72            mov    ecx, [esp+6Ch+var_38] ; case 0x5
  160. .text:1002CD76            mov    edx, [esp+6Ch+var_3C]
  161. .text:1002CD7A            mov    eax, [esp+6Ch+pdgData]
  162. .text:1002CD7E            push   ecx
  163. .text:1002CD7F            push   edx
  164. .text:1002CD80            push   eax
  165. .text:1002CD81            call   sub_1002CF40
  166. .text:1002CD86            add    esp, 0Ch
  167. .text:1002CD89            xor    ecx, ecx
  168. .text:1002CD8B            cmp    eax, 1
  169. .text:1002CD8E            setz   cl
  170. .text:1002CD91            mov    eax, ecx
  171. .text:1002CD93            add    esp, 6Ch
  172. .text:1002CD96            retn
  173. .text:1002CD97 ; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  174. .text:1002CD97
  175. .text:1002CD97 @17H:                        ; CODE XREF: sub_1002CC60+52j
  176. .text:1002CD97                            ; DATA XREF: .text:decode_1xH_subso
  177. .text:1002CD97            mov    ecx, [esp+6Ch+var_30] ; case 0x6
  178. .text:1002CD9B            mov    edx, [esp+6Ch+var_34]
  179. .text:1002CD9F            mov    eax, [esp+6Ch+pdgData]
  180. .text:1002CDA3            push   ecx
  181. .text:1002CDA4            push   edx
  182. .text:1002CDA5            push   eax
  183. .text:1002CDA6            call   sub_1002CF40
  184. .text:1002CDAB            add    esp, 0Ch
  185. .text:1002CDAE            xor    ecx, ecx
  186. .text:1002CDB0            cmp    eax, 1
  187. .text:1002CDB3            setz   cl
  188. .text:1002CDB6            mov    eax, ecx
  189. .text:1002CDB8            add    esp, 6Ch
  190. .text:1002CDBB            retn
  191. .text:1002CDBC ; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  192. .text:1002CDBC
  193. .text:1002CDBC @18H:                        ; CODE XREF: sub_1002CC60+52j
  194. .text:1002CDBC                            ; DATA XREF: .text:decode_1xH_subso
  195. .text:1002CDBC            mov    ecx, [esp+6Ch+var_28] ; case 0x7
  196. .text:1002CDC0            mov    edx, [esp+6Ch+var_2C]
  197. .text:1002CDC4            mov    eax, [esp+6Ch+pdgData]
  198. .text:1002CDC8            push   ecx
  199. .text:1002CDC9            push   edx
  200. .text:1002CDCA            push   eax
  201. .text:1002CDCB            call   sub_1002CF40
  202. .text:1002CDD0            add    esp, 0Ch
  203. .text:1002CDD3            xor    ecx, ecx
  204. .text:1002CDD5            cmp    eax, 1
  205. .text:1002CDD8            setz   cl
  206. .text:1002CDDB            mov    eax, ecx
  207. .text:1002CDDD            add    esp, 6Ch
  208. .text:1002CDE0            retn
  209. .text:1002CDE1 ; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  210. .text:1002CDE1
  211. .text:1002CDE1 @19H:                        ; CODE XREF: sub_1002CC60+52j
  212. .text:1002CDE1                            ; DATA XREF: .text:decode_1xH_subso
  213. .text:1002CDE1            mov    ecx, [esp+6Ch+var_1C] ; case 0x8
  214. .text:1002CDE5            mov    edx, [esp+6Ch+var_20]
  215. .text:1002CDE9            mov    eax, [esp+6Ch+pdgData]
  216. .text:1002CDED            push   ecx
  217. .text:1002CDEE            push   edx
  218. .text:1002CDEF            push   eax
  219. .text:1002CDF0            call   sub_1002D030
  220. .text:1002CDF5            add    esp, 0Ch
  221. .text:1002CDF8            xor    ecx, ecx
  222. .text:1002CDFA            cmp    eax, 1
  223. .text:1002CDFD            setz   cl
  224. .text:1002CE00            mov    eax, ecx
  225. .text:1002CE02            add    esp, 6Ch
  226. .text:1002CE05            retn
  227. .text:1002CE06 ; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  228. .text:1002CE06
  229. .text:1002CE06 @1AH:                        ; CODE XREF: sub_1002CC60+52j
  230. .text:1002CE06                            ; DATA XREF: .text:decode_1xH_subso
  231. .text:1002CE06            mov    ecx, [esp+6Ch+var_14] ; case 0x9
  232. .text:1002CE0A            mov    edx, [esp+6Ch+var_18]
  233. .text:1002CE0E            mov    eax, [esp+6Ch+pdgData]
  234. .text:1002CE12            push   ecx
  235. .text:1002CE13            push   edx
  236. .text:1002CE14            push   eax
  237. .text:1002CE15            call   sub_1002D030
  238. .text:1002CE1A            add    esp, 0Ch
  239. .text:1002CE1D            xor    ecx, ecx
  240. .text:1002CE1F            cmp    eax, 1
  241. .text:1002CE22            setz   cl
  242. .text:1002CE25            mov    eax, ecx
  243. .text:1002CE27            add    esp, 6Ch
  244. .text:1002CE2A            retn
  245. .text:1002CE2B ; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  246. .text:1002CE2B
  247. .text:1002CE2B @1BH:                        ; CODE XREF: sub_1002CC60+52j
  248. .text:1002CE2B                            ; DATA XREF: .text:decode_1xH_subso
  249. .text:1002CE2B            mov    ecx, [esp+6Ch+var_C] ; case 0xA
  250. .text:1002CE2F            mov    edx, [esp+6Ch+var_10]
  251. .text:1002CE33            mov    eax, [esp+6Ch+pdgData]
  252. .text:1002CE37            push   ecx
  253. .text:1002CE38            push   edx
  254. .text:1002CE39            push   eax
  255. .text:1002CE3A            call   sub_1002D030
  256. .text:1002CE3F            add    esp, 0Ch
  257. .text:1002CE42            xor    ecx, ecx
  258. .text:1002CE44            cmp    eax, 1
  259. .text:1002CE47            setz   cl
  260. .text:1002CE4A            mov    eax, ecx
  261. .text:1002CE4C            add    esp, 6Ch
  262. .text:1002CE4F            retn
  263. .text:1002CE50 ; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  264. .text:1002CE50
  265. .text:1002CE50 @1CH:                        ; CODE XREF: sub_1002CC60+52j
  266. .text:1002CE50                            ; DATA XREF: .text:decode_1xH_subso
  267. .text:1002CE50            mov    ecx, [esp+6Ch+var_4] ; case 0xB
  268. .text:1002CE54            mov    edx, [esp+6Ch+var_8]
  269. .text:1002CE58            mov    eax, [esp+6Ch+pdgData]
  270. .text:1002CE5C            push   ecx
  271. .text:1002CE5D            push   edx
  272. .text:1002CE5E            push   eax
  273. .text:1002CE5F            call   sub_1002D030
  274. .text:1002CE64            add    esp, 0Ch
  275. .text:1002CE67            xor    ecx, ecx
  276. .text:1002CE69            cmp    eax, 1
  277. .text:1002CE6C            setz   cl
  278. .text:1002CE6F            mov    eax, ecx
  279. .text:1002CE71            add    esp, 6Ch
  280. .text:1002CE74            retn
  281. .text:1002CE75 ; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  282. .text:1002CE75
  283. .text:1002CE75 @ELSE:                       ; CODE XREF: sub_1002CC60+4Cj
  284. .text:1002CE75            mov    eax, [esp+6Ch+pdgData] ; default
  285. .text:1002CE79            xor    ecx, ecx
  286. .text:1002CE7B            cmp    eax, 1
  287. .text:1002CE7E            setz   cl
  288. .text:1002CE81            mov    eax, ecx
  289. .text:1002CE83            add    esp, 6Ch
  290. .text:1002CE86            retn
  291. .text:1002CE86 sub_1002CC60   endp
  292. .text:1002CE86
  293. .text:1002CE86 ; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  294. .text:1002CE87            align 4
  295. .text:1002CE88 decode_1xH_subs dd offset @11H       ; DATA XREF: sub_1002CC60+52r
  296. .text:1002CE88            dd offset @12H       ; jump table for switch statement
  297. .text:1002CE88            dd offset @13H
  298. .text:1002CE88            dd offset @14H
  299. .text:1002CE88            dd offset @15H
  300. .text:1002CE88            dd offset @16H
  301. .text:1002CE88            dd offset @17H
  302. .text:1002CE88            dd offset @18H
  303. .text:1002CE88            dd offset @19H
  304. .text:1002CE88            dd offset @1AH
  305. .text:1002CE88            dd offset @1BH
  306. .text:1002CE88            dd offset @1CH
  307. .text:1002CEB8            align 10h
复制代码
回复

使用道具 举报

 楼主| 发表于 2006-4-28 01:30:53 | 显示全部楼层
上述代码的核心是:

; int __cdecl sub_10035DA0(int size_pdg_data,int x_pix,int y_pix,int keyToDecode1xH,int,int,int)

这段代码会计算一系列数值用于后续1xH解码,这些值保存在下面的数组当中
  1. .text:1002CC60 var_6C       = dword ptr -6Ch
  2. .text:1002CC60 var_68       = dword ptr -68h
  3. .text:1002CC60 var_64       = dword ptr -64h
  4. .text:1002CC60 var_60       = dword ptr -60h
  5. .text:1002CC60 var_5C       = dword ptr -5Ch
  6. .text:1002CC60 var_58       = dword ptr -58h
  7. .text:1002CC60 var_54       = dword ptr -54h
  8. .text:1002CC60 var_50       = dword ptr -50h
  9. .text:1002CC60 var_4C       = dword ptr -4Ch
  10. .text:1002CC60 var_48       = dword ptr -48h
  11. .text:1002CC60 var_44       = dword ptr -44h
  12. .text:1002CC60 var_40       = dword ptr -40h
  13. .text:1002CC60 var_3C       = dword ptr -3Ch
  14. .text:1002CC60 var_38       = dword ptr -38h
  15. .text:1002CC60 var_34       = dword ptr -34h
  16. .text:1002CC60 var_30       = dword ptr -30h
  17. .text:1002CC60 var_2C       = dword ptr -2Ch
  18. .text:1002CC60 var_28       = dword ptr -28h
  19. .text:1002CC60 var_24       = dword ptr -24h
  20. .text:1002CC60 var_20       = dword ptr -20h
  21. .text:1002CC60 var_1C       = dword ptr -1Ch
  22. .text:1002CC60 var_18       = dword ptr -18h
  23. .text:1002CC60 var_14       = dword ptr -14h
  24. .text:1002CC60 var_10       = dword ptr -10h
  25. .text:1002CC60 var_C        = dword ptr -0Ch
  26. .text:1002CC60 var_8        = dword ptr -8
  27. .text:1002CC60 var_4        = dword ptr -4
复制代码

之后,程序会根据 pdgType,分别调用不同的解码程序,比如 11H 的解码:
  1. .text:1002CCB9 @11H:                        ; DATA XREF: .text:decode_1xH_subso
  2. .text:1002CCB9            mov    ecx, [esp+6Ch+var_64] ; case 0x0
  3. .text:1002CCBD            mov    edx, [esp+6Ch+var_68]
  4. .text:1002CCC1            mov    eax, [esp+6Ch+pdgData]
  5. .text:1002CCC5            push   ecx
  6. .text:1002CCC6            push   edx
  7. .text:1002CCC7            push   eax
  8. .text:1002CCC8            call   sub_1002CEC0
复制代码

可以看到,通常只会修改2个字节,由 var_64 和 var_68 两个初始值控制。修改方法比较简单:
  1. .text:1002CEC0 ; 〓〓〓〓〓〓〓〓〓〓〓〓 S U B R O U T I N E  〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
  2. .text:1002CEC0
  3. .text:1002CEC0
  4. .text:1002CEC0 sub_1002CEC0   proc near          ; CODE XREF: sub_1002CC60+68p
  5. .text:1002CEC0                            ; sub_1002CC60+8Dp ...
  6. .text:1002CEC0
  7. .text:1002CEC0 arg_0        = dword ptr  8
  8. .text:1002CEC0 arg_4        = dword ptr  0Ch
  9. .text:1002CEC0 arg_8        = dword ptr  10h
  10. .text:1002CEC0
  11. .text:1002CEC0            push   ebp
  12. .text:1002CEC1            mov    ebp, [esp+arg_8]
  13. .text:1002CEC5            push   edi
  14. .text:1002CEC6            mov    edi, [esp+4+arg_4]
  15. .text:1002CECA            cmp    edi, ebp
  16. .text:1002CECC            mov    eax, 11h
  17. .text:1002CED1            jbe    short loc_1002CF2B
  18. .text:1002CED3            mov    ecx, edi
  19. .text:1002CED5            mov    edi, ebp
  20. .text:1002CED7            mov    ebp, ecx
  21. .text:1002CED9
  22. .text:1002CED9 loc_1002CED9:                  ; CODE XREF: sub_1002CEC0:loc_1002CF2Bj
  23. .text:1002CED9            mov    ecx, ebp
  24. .text:1002CEDB            sub    ecx, edi
  25. .text:1002CEDD            cmp    ecx, 11h
  26. .text:1002CEE0            jnz    short loc_1002CEE7
  27. .text:1002CEE2            mov    eax, 13h
  28. .text:1002CEE7
  29. .text:1002CEE7 loc_1002CEE7:                  ; CODE XREF: sub_1002CEC0+20j
  30. .text:1002CEE7            push   ebx
  31. .text:1002CEE8            push   esi
  32. .text:1002CEE9            mov    esi, [esp+0Ch+arg_0]
  33. .text:1002CEED            add    eax, esi
  34. .text:1002CEEF            mov    dl, [esi+ebp]
  35. .text:1002CEF2            mov    [esp+0Ch+arg_4], eax
  36. .text:1002CEF6            mov    al, [eax+ebp]
  37. .text:1002CEF9            mov    bl, dl
  38. .text:1002CEFB            mov    cl, [esi+edi]
  39. .text:1002CEFE            not    bl
  40. .text:1002CF00            and    bl, al
  41. .text:1002CF02            not    al
  42. .text:1002CF04            and    al, dl
  43. .text:1002CF06            mov    edx, [esp+0Ch+arg_4]
  44. .text:1002CF0A            or    bl, al
  45. .text:1002CF0C            mov    [esi+edi], bl
  46. .text:1002CF0F            mov    al, [edx+edi]
  47. .text:1002CF12            mov    dl, cl
  48. .text:1002CF14            not    dl
  49. .text:1002CF16            and    dl, al
  50. .text:1002CF18            not    al
  51. .text:1002CF1A            and    al, cl
  52. .text:1002CF1C            or    dl, al
  53. .text:1002CF1E            mov    eax, 1
  54. .text:1002CF23            mov    [esi+ebp], dl
  55. .text:1002CF26            pop    esi
  56. .text:1002CF27            pop    ebx
  57. .text:1002CF28            pop    edi
  58. .text:1002CF29            pop    ebp
  59. .text:1002CF2A            retn
  60. .text:1002CF2B ; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  61. .text:1002CF2B
  62. .text:1002CF2B loc_1002CF2B:                  ; CODE XREF: sub_1002CEC0+11j
  63. .text:1002CF2B            jnz    short loc_1002CED9
  64. .text:1002CF2D            pop    edi
  65. .text:1002CF2E            mov    eax, 1
  66. .text:1002CF33            pop    ebp
  67. .text:1002CF34            retn
  68. .text:1002CF34 sub_1002CEC0   endp
  69. .text:1002CF34
复制代码
回复

使用道具 举报

 楼主| 发表于 2006-4-28 01:32:08 | 显示全部楼层
下面我们看看核心代码!

Part2
  1. .text:10035DA0 ; 〓〓〓〓〓〓〓〓〓〓〓〓 S U B R O U T I N E  〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓
  2. .text:10035DA0
  3. .text:10035DA0 ; Decode pdg
  4. .text:10035DA0
  5. .text:10035DA0 ; int __cdecl sub_10035DA0(int size_pdg_data,int x_pix,int y_pix,int keyToDecode1xH,int,int,int)
  6. .text:10035DA0 sub_10035DA0   proc near          ; CODE XREF: sub_1002CC60+38p
  7. .text:10035DA0
  8. .text:10035DA0 var_20       = dword ptr -20h
  9. .text:10035DA0 var_18       = dword ptr -18h
  10. .text:10035DA0 var_14       = dword ptr -14h
  11. .text:10035DA0 var_C        = dword ptr -0Ch
  12. .text:10035DA0 var_4        = dword ptr -4
  13. .text:10035DA0 size_pdg_data  = dword ptr  4
  14. .text:10035DA0 x_pix        = dword ptr  8
  15. .text:10035DA0 y_pix        = dword ptr  0Ch
  16. .text:10035DA0 keyToDecode1xH  = dword ptr  10h
  17. .text:10035DA0 arg_10       = dword ptr  14h
  18. .text:10035DA0 arg_14       = dword ptr  18h
  19. .text:10035DA0 arg_1C       = dword ptr  1Ch
  20. .text:10035DA0
  21. .text:10035DA0            mov    eax, Fibonaci1
  22. .text:10035DA5            sub    esp, 24h
  23. .text:10035DA8            test   eax, eax
  24. .text:10035DAA            jnz    short loc_10035DB6
  25. .text:10035DAC            call   sub_100361F0
  26. .text:10035DB1            call   sub_10036220
  27. .text:10035DB6
  28. .text:10035DB6 loc_10035DB6:                  ; CODE XREF: sub_10035DA0+Aj
  29. .text:10035DB6            mov    eax, [esp+24h+x_pix]
  30. .text:10035DBA            mov    edx, [esp+24h+y_pix]
  31. .text:10035DBE            and    eax, 0FFFFh
  32. .text:10035DC3            and    edx, 0FFFFh
  33. .text:10035DC9            mov    ecx, eax
  34. .text:10035DCB            push   ebx
  35. .text:10035DCC            and    ecx, 0FFh
  36. .text:10035DD2            push   ebp
  37. .text:10035DD3            mov    [esp+2Ch+var_20], ecx
  38. .text:10035DD7            mov    ecx, eax
  39. .text:10035DD9            sub    ecx, edx
  40. .text:10035DDB            push   esi
  41. .text:10035DDC            and    ecx, 0FFh
  42. .text:10035DE2            mov    esi, edx
  43. .text:10035DE4            mov    [esp+30h+var_18], ecx
  44. .text:10035DE8            mov    ecx, [esp+30h+size_pdg_data]
  45. .text:10035DEC            shr    ecx, 8
  46. .text:10035DEF            imul   esi, eax
  47. .text:10035DF2            mov    ebx, ecx
  48. .text:10035DF4            imul   ecx, eax
  49. .text:10035DF7            mov    ebp, edx
  50. .text:10035DF9            and    esi, 0FFh
  51. .text:10035DFF            or    ebp, eax
  52. .text:10035E01            add    eax, edx
  53. .text:10035E03            mov    edx, [esp+30h+size_pdg_data]
  54. .text:10035E07            push   edi
  55. .text:10035E08            and    ebp, 0FFh
  56. .text:10035E0E            and    ecx, 0FFh
  57. .text:10035E14            mov    edi, esi
  58. .text:10035E16            add    eax, edx
  59. .text:10035E18            imul   edi, [esp+34h+var_20]
  60. .text:10035E1D            and    ebx, 0FFh
  61. .text:10035E23            mov    [esp+34h+var_14], ebp
  62. .text:10035E27            mov    [esp+34h+var_C], ecx
  63. .text:10035E2B            and    eax, 0FFh
  64. .text:10035E30            imul   ecx, ebx
  65. .text:10035E33            imul   ebp, esi
  66. .text:10035E36            mov    [esp+34h+var_4], eax
  67. .text:10035E3A            imul   eax, [esp+34h+var_18]
  68. .text:10035E3F            add    edi, [esp+34h+keyToDecode1xH]
  69. .text:10035E43            add    ecx, ebp
  70. .text:10035E45            sub    ecx, eax
  71. .text:10035E47            imul   eax, esi
  72. .text:10035E4A            and    edi, 0FFh
  73. .text:10035E50            lea    edx, [ecx+edi+0FAh]
  74. .text:10035E57            mov    ecx, [esp+34h+arg_10]
  75. .text:10035E5B            and    edx, 1FFh
  76. .text:10035E61            mov    [esp+34h+x_pix], edx
  77. .text:10035E65            mov    [ecx+4], edx
  78. .text:10035E68            mov    edx, edi
  79. .text:10035E6A            imul   edx, [esp+34h+var_C]
  80. .text:10035E6F            sub    eax, edx
  81. .text:10035E71            mov    edx, [esp+34h+var_14]
  82. .text:10035E75            mov    ebp, edx
  83. .text:10035E77            imul   ebp, edx
  84. .text:10035E7A            xor    edx, edx
  85. .text:10035E7C            lea    eax, [eax+ebp+0FAh]
  86. .text:10035E83            mov    ebp, 0D7h
  87. .text:10035E88            and    eax, 1FFh
  88. .text:10035E8D            mov    [ecx+8], eax
  89. .text:10035E90            mov    eax, [esp+34h+var_C]
  90. .text:10035E94            imul   eax, eax
  91. .text:10035E97            mov    [esp+34h+size_pdg_data], eax
  92. .text:10035E9B            mov    eax, edi
  93. .text:10035E9D            div    ebp
  94. .text:10035E9F            mov    ebp, [esp+34h+size_pdg_data]
  95. .text:10035EA3            movsx  eax, byte ptr Key1[edx] ; "132jksdiau34ukjasdflkj!@#234afdji78#%23"...
  96. .text:10035EAA            mov    edx, [esp+34h+var_4]
  97. .text:10035EAE            add    eax, ebp
  98. .text:10035EB0            mov    ebp, [esp+34h+var_18]
  99. .text:10035EB4            add    eax, edx
  100. .text:10035EB6            mov    edx, [esp+34h+var_14]
  101. .text:10035EBA            add    eax, ebx
  102. .text:10035EBC            add    eax, edx
  103. .text:10035EBE            xor    edx, edx
  104. .text:10035EC0            add    eax, ebp
  105. .text:10035EC2            mov    ebp, [esp+34h+var_20]
  106. .text:10035EC6            add    eax, esi
  107. .text:10035EC8            add    eax, ebp
  108. .text:10035ECA            mov    ebp, 0D7h
  109. .text:10035ECF            div    ebp
  110. .text:10035ED1            movsx  ebp, byte ptr Key1[edx] ; "132jksdiau34ukjasdflkj!@#234afdji78#%23"...
  111. .text:10035ED8            mov    eax, edi
  112. .text:10035EDA            xor    edx, edx
  113. .text:10035EDC            mov    edi, 82h
  114. .text:10035EE1            div    edi
  115. .text:10035EE3            mov    edi, [esp+34h+var_4]
  116. .text:10035EE7            movsx  eax, byte ptr Key2[edx] ; "Afgasdkol!@#$564746Lfat0[9i FDLAas09013"...
  117. .text:10035EEE            mov    edx, [esp+34h+size_pdg_data]
  118. .text:10035EF2            add    eax, edx
  119. .text:10035EF4            mov    edx, [esp+34h+var_18]
  120. .text:10035EF8            add    eax, edi
  121. .text:10035EFA            mov    edi, [esp+34h+var_14]
  122. .text:10035EFE            add    eax, ebx
  123. .text:10035F00            add    eax, edi
  124. .text:10035F02            mov    edi, 82h
  125. .text:10035F07            add    eax, edx
  126. .text:10035F09            mov    edx, [esp+34h+var_20]
  127. .text:10035F0D            add    eax, esi
  128. .text:10035F0F            add    eax, edx
  129. .text:10035F11            xor    edx, edx
  130. .text:10035F13            div    edi
  131. .text:10035F15            movsx  edx, byte ptr Key2[edx] ; "Afgasdkol!@#$564746Lfat0[9i FDLAas09013"...
  132. .text:10035F1C            imul   ebp, edx
  133. .text:10035F1F            and    ebp, 800001FFh
  134. .text:10035F25            jns    short loc_10035F2F
  135. .text:10035F27            dec    ebp
  136. .text:10035F28            or    ebp, 0FFFFFE00h
  137. .text:10035F2E            inc    ebp
  138. .text:10035F2F
  139. .text:10035F2F loc_10035F2F:                  ; CODE XREF: sub_10035DA0+185j
  140. .text:10035F2F            mov    eax, [esp+34h+var_18]
  141. .text:10035F33            xor    edx, edx
  142. .text:10035F35            imul   eax, esi
  143. .text:10035F38            sub    eax, ebx
  144. .text:10035F3A            mov    esi, 0D7h
  145. .text:10035F3F            div    esi
  146. .text:10035F41            mov    eax, [esp+34h+var_20]
  147. .text:10035F45            mov    [ecx+0Ch], ebp
  148. .text:10035F48            mov    edi, 82h
  149. .text:10035F4D            movsx  esi, byte ptr Key1[edx] ; "132jksdiau34ukjasdflkj!@#234afdji78#%23"...
  150. .text:10035F54            xor    edx, edx
  151. .text:10035F56            div    edi
  152. .text:10035F58            movsx  eax, byte ptr Key2[edx] ; "Afgasdkol!@#$564746Lfat0[9i FDLAas09013"...
  153. .text:10035F5F            imul   esi, eax
  154. .text:10035F62            and    esi, 800001FFh
  155. .text:10035F68            jns    short loc_10035F72
  156. .text:10035F6A            dec    esi
  157. .text:10035F6B            or    esi, 0FFFFFE00h
  158. .text:10035F71            inc    esi
  159. .text:10035F72
  160. .text:10035F72 loc_10035F72:                  ; CODE XREF: sub_10035DA0+1C8j
  161. .text:10035F72            mov    eax, [esp+34h+var_C]
  162. .text:10035F76            and    ebx, 1Fh
  163. .text:10035F79            mov    [ecx+10h], esi
  164. .text:10035F7C            and    eax, 3Fh
  165. .text:10035F7F            mov    edx, Fibonaci1[ebx*4]
  166. .text:10035F86            mov    ebx, 0D7h
  167. .text:10035F8B            and    edx, 1FFh
  168. .text:10035F91            mov    [ecx+14h], edx
  169. .text:10035F94            mov    esi, Fibonaci2[eax*4]
  170. .text:10035F9B            mov    edi, edx
  171. .text:10035F9D            xor    edx, edx
  172. .text:10035F9F            mov    eax, edi
  173. .text:10035FA1            and    esi, 1FFh
  174. .text:10035FA7            div    ebx
  175. .text:10035FA9            mov    [ecx+18h], esi
  176. .text:10035FAC            mov    ebx, 82h
  177. .text:10035FB1            movsx  eax, byte ptr Key1[edx] ; "132jksdiau34ukjasdflkj!@#234afdji78#%23"...
  178. .text:10035FB8            imul   eax, edi
  179. .text:10035FBB            xor    edx, edx
  180. .text:10035FBD            div    ebx
  181. .text:10035FBF            mov    al, byte ptr Key2[edx] ; "Afgasdkol!@#$564746Lfat0[9i FDLAas09013"...
  182. .text:10035FC5            imul   eax, esi
  183. .text:10035FC8            and    eax, 3Fh
  184. .text:10035FCB            mov    edx, Fibonaci2[eax*4]
  185. .text:10035FD2            mov    eax, esi
  186. .text:10035FD4            and    edx, 1FFh
  187. .text:10035FDA            mov    [ecx+1Ch], edx
  188. .text:10035FDD            xor    edx, edx
  189. .text:10035FDF            div    ebx
  190. .text:10035FE1            movsx  eax, byte ptr Key2[edx] ; "Afgasdkol!@#$564746Lfat0[9i FDLAas09013"...
  191. .text:10035FE8            imul   eax, esi
  192. .text:10035FEB            xor    edx, edx
  193. .text:10035FED            mov    esi, 0D7h
  194. .text:10035FF2            div    esi
  195. .text:10035FF4            mov    esi, [esp+34h+arg_14]
  196. .text:10035FF8            mov    al, byte ptr Key1[edx] ; "132jksdiau34ukjasdflkj!@#234afdji78#%23"...
  197. .text:10035FFE            imul   eax, edi
  198. .text:10036001            and    eax, 1Fh
  199. .text:10036004            mov    edx, Fibonaci1[eax*4]
  200. .text:1003600B            mov    eax, [esp+34h+x_pix]
  201. .text:1003600F            and    edx, 1FFh
  202. .text:10036015            mov    [ecx+20h], edx
  203. .text:10036018            mov    [esi+4], eax
  204. .text:1003601B            mov    edi, [ecx+20h]
  205. .text:1003601E            mov    ebx, [ecx+1Ch]
  206. .text:10036021            imul   edi, [ecx+8]
  207. .text:10036025            imul   ebx, [ecx+18h]
  208. .text:10036029            imul   edi, [ecx+0Ch]
  209. .text:1003602D            mov    edx, [ecx+10h]
  210. .text:10036030            sub    edi, ebx
  211. .text:10036032            mov    ebx, edx
  212. .text:10036034            imul   ebx, edx
  213. .text:10036037            lea    edx, [edi+ebx+0FAh]
  214. .text:1003603E            and    edx, 1FFh
  215. .text:10036044            mov    [esi+8], edx
  216. .text:10036047            mov    edx, [ecx+8]
  217. .text:1003604A            imul   edx, [ecx+0Ch]
  218. .text:1003604E            sub    edx, [ecx+4]
  219. .text:10036051            and    edx, 1FFh
  220. .text:10036057            mov    [esi+0Ch], edx
  221. .text:1003605A            mov    edi, [ecx+8]
  222. .text:1003605D            mov    ebx, [ecx+4]
  223. .text:10036060            mov    edx, [ecx+14h]
  224. .text:10036063            mov    ebp, edi
  225. .text:10036065            imul   ebp, edi
  226. .text:10036068            mov    edi, ebx
  227. .text:1003606A            imul   edi, ebx
  228. .text:1003606D            mov    ebx, edx
  229. .text:1003606F            sub    edi, ebp
  230. .text:10036071            imul   ebx, edx
  231. .text:10036074            add    edi, ebx
  232. .text:10036076            and    edi, 1FFh
  233. .text:1003607C            mov    [esi+10h], edi
  234. .text:1003607F            mov    edx, [ecx+0Ch]
  235. .text:10036082            imul   edx, [ecx+4]
  236. .text:10036086            mov    edi, [ecx+18h]
  237. .text:10036089            sub    edi, edx
  238. .text:1003608B            and    edi, 1FFh
  239. .text:10036091            mov    [esi+14h], edi
  240. .text:10036094            mov    edx, [ecx+18h]
  241. .text:10036097            mov    edi, [ecx+20h]
  242. .text:1003609A            imul   edx, [ecx+14h]
  243. .text:1003609E            imul   edi, [ecx+0Ch]
  244. .text:100360A2            sub    edx, edi
  245. .text:100360A4            mov    edi, [ecx+8]
  246. .text:100360A7            imul   edi, [ecx+10h]
  247. .text:100360AB            add    edx, edi
  248. .text:100360AD            mov    edi, [ecx+1Ch]
  249. .text:100360B0            mov    ebx, 82h
  250. .text:100360B5            mov    ebp, 0D7h
  251. .text:100360BA            lea    edx, [edx+edi+0FAh]
  252. .text:100360C1            and    edx, 1FFh
  253. .text:100360C7            mov    [esi+18h], edx
  254. .text:100360CA            mov    edx, [ecx+8]
  255. .text:100360CD            imul   edx, [ecx+18h]
  256. .text:100360D1            mov    edi, [ecx+1Ch]
  257. .text:100360D4            sub    edi, edx
  258. .text:100360D6            and    edi, 1FFh
  259. .text:100360DC            mov    [esi+1Ch], edi
  260. .text:100360DF            mov    edx, [ecx+20h]
  261. .text:100360E2            imul   edx, [ecx+1Ch]
  262. .text:100360E6            and    edx, 1FFh
  263. .text:100360EC            mov    [esi+20h], edx
  264. .text:100360EF            mov    edi, [ecx+8]
  265. .text:100360F2            add    eax, edi
  266. .text:100360F4            mov    edi, [esp+34h+arg_1C]
  267. .text:100360F8            and    eax, 1FFh
  268. .text:100360FD            xor    edx, edx
  269. .text:100360FF            mov    [edi+4], eax
  270. .text:10036102            mov    eax, [ecx+8]
  271. .text:10036105            div    ebx
  272. .text:10036107            mov    eax, [esi+8]
  273. .text:1003610A            movsx  ebx, byte ptr Key2[edx] ; "Afgasdkol!@#$564746Lfat0[9i FDLAas09013"...
  274. .text:10036111            xor    edx, edx
  275. .text:10036113            div    ebp
  276. .text:10036115            movsx  eax, byte ptr Key1[edx] ; "132jksdiau34ukjasdflkj!@#234afdji78#%23"...
  277. .text:1003611C            add    ebx, eax
  278. .text:1003611E            and    ebx, 800001FFh
  279. .text:10036124            jns    short loc_1003612E
  280. .text:10036126            dec    ebx
  281. .text:10036127            or    ebx, 0FFFFFE00h
  282. .text:1003612D            inc    ebx
  283. .text:1003612E
  284. .text:1003612E loc_1003612E:                  ; CODE XREF: sub_10035DA0+384j
  285. .text:1003612E            mov    [edi+8], ebx
  286. .text:10036131            mov    eax, [esi+0Ch]
  287. .text:10036134            mov    ebx, [ecx+10h]
  288. .text:10036137            add    eax, ebx
  289. .text:10036139            mov    ebx, 0D7h
  290. .text:1003613E            and    eax, 1FFh
  291. .text:10036143            mov    [edi+0Ch], eax
  292. .text:10036146            imul   eax, [ecx+0Ch]
  293. .text:1003614A            and    eax, 3Fh
  294. .text:1003614D            mov    edx, Fibonaci2[eax*4]
  295. .text:10036154            and    edx, 1FFh
  296. .text:1003615A            mov    [edi+10h], edx
  297. .text:1003615D            mov    eax, [esi+14h]
  298. .text:10036160            mov    edx, [ecx+0Ch]
  299. .text:10036163            mov    ebp, [esi+18h]
  300. .text:10036166            sub    eax, edx
  301. .text:10036168            xor    edx, edx
  302. .text:1003616A            add    eax, ebp
  303. .text:1003616C            and    eax, 1FFh
  304. .text:10036171            mov    [edi+14h], eax
  305. .text:10036174            mov    eax, [esi+14h]
  306. .text:10036177            div    ebx
  307. .text:10036179            movsx  edx, byte ptr Key1[edx] ; "132jksdiau34ukjasdflkj!@#234afdji78#%23"...
  308. .text:10036180            and    edx, 8000003Fh
  309. .text:10036186            jns    short loc_1003618D
  310. .text:10036188            dec    edx
  311. .text:10036189            or    edx, 0FFFFFFC0h
  312. .text:1003618C            inc    edx
  313. .text:1003618D
  314. .text:1003618D loc_1003618D:                  ; CODE XREF: sub_10035DA0+3E6j
  315. .text:1003618D            mov    eax, Fibonaci2[edx*4]
  316. .text:10036194            mov    edx, [edi+0Ch]
  317. .text:10036197            and    eax, 1FFh
  318. .text:1003619C            mov    [edi+18h], eax
  319. .text:1003619F            mov    eax, [ecx+20h]
  320. .text:100361A2            mov    ebp, [esi+1Ch]
  321. .text:100361A5            sub    edx, eax
  322. .text:100361A7            add    edx, ebp
  323. .text:100361A9            mov    ecx, 82h
  324. .text:100361AE            and    edx, 1FFh
  325. .text:100361B4            mov    [edi+1Ch], edx
  326. .text:100361B7            mov    eax, [esi+14h]
  327. .text:100361BA            xor    edx, edx
  328. .text:100361BC            div    ecx
  329. .text:100361BE            movsx  edx, byte ptr Key2[edx] ; "Afgasdkol!@#$564746Lfat0[9i FDLAas09013"...
  330. .text:100361C5            and    edx, 8000001Fh
  331. .text:100361CB            jns    short loc_100361D2
  332. .text:100361CD            dec    edx
  333. .text:100361CE            or    edx, 0FFFFFFE0h
  334. .text:100361D1            inc    edx
  335. .text:100361D2
  336. .text:100361D2 loc_100361D2:                  ; CODE XREF: sub_10035DA0+42Bj
  337. .text:100361D2            mov    eax, Fibonaci1[edx*4]
  338. .text:100361D9            and    eax, 1FFh
  339. .text:100361DE            mov    [edi+20h], eax
  340. .text:100361E1            pop    edi
  341. .text:100361E2            pop    esi
  342. .text:100361E3            pop    ebp
  343. .text:100361E4            pop    ebx
  344. .text:100361E5            add    esp, 24h
  345. .text:100361E8            retn
  346. .text:100361E8 sub_10035DA0   endp
  347. .text:100361E8
复制代码
回复

使用道具 举报

 楼主| 发表于 2006-4-28 01:35:38 | 显示全部楼层
核心代码的开头部分,会分别计算两个费波纳切数列(Fibonaci):
  1. .text:10035DA0            mov    eax, Fibonaci1
  2. .text:10035DA5            sub    esp, 24h
  3. .text:10035DA8            test   eax, eax
  4. .text:10035DAA            jnz    short loc_10035DB6
  5. .text:10035DAC            call   sub_100361F0
  6. .text:10035DB1            call   sub_10036220
复制代码

Fibonaci1:
  1. .text:100361F0 sub_100361F0   proc near          ; CODE XREF: sub_10035DA0+Cp
  2. .text:100361F0            mov    eax, 1
  3. .text:100361F5            mov    Fibonaci1, eax
  4. .text:100361FA            mov    dword_100F7C70, eax
  5. .text:100361FF            mov    eax, offset Fibonaci1
  6. .text:10036204
  7. .text:10036204 loc_10036204:                  ; CODE XREF: sub_100361F0+26j
  8. .text:10036204            mov    ecx, [eax]
  9. .text:10036206            mov    edx, [eax+4]
  10. .text:10036209            add    ecx, edx
  11. .text:1003620B            mov    [eax+8], ecx
  12. .text:1003620E            add    eax, 4
  13. .text:10036211            cmp    eax, offset unk_100F7CE4
  14. .text:10036216            jl    short loc_10036204
  15. .text:10036218            retn
  16. .text:10036218 sub_100361F0   endp
复制代码

Fibonaci2:
  1. .text:10036220 sub_10036220   proc near          ; CODE XREF: sub_10035DA0+11p
  2. .text:10036220            mov    Fibonaci2, 2
  3. .text:1003622A            mov    dword_100F7B70, 3
  4. .text:10036234            mov    eax, 5
  5. .text:10036239            mov    ecx, 1
  6. .text:1003623E            mov    edx, offset unk_100F7B74
  7. .text:10036243
  8. .text:10036243 loc_10036243:                  ; CODE XREF: sub_10036220+5Ej
  9. .text:10036243            cmp    eax, 19h
  10. .text:10036246            jz    short loc_10036265
  11. .text:10036248            cmp    eax, 31h
  12. .text:1003624B            jz    short loc_10036265
  13. .text:1003624D            cmp    eax, 79h
  14. .text:10036250            jz    short loc_10036265
  15. .text:10036252            cmp    eax, 0A9h
  16. .text:10036257            jz    short loc_10036265
  17. .text:10036259            cmp    eax, 121h
  18. .text:1003625E            jz    short loc_10036265
  19. .text:10036260            mov    [edx], eax
  20. .text:10036262            add    edx, 4
  21. .text:10036265
  22. .text:10036265 loc_10036265:                  ; CODE XREF: sub_10036220+26j
  23. .text:10036265                            ; sub_10036220+2Bj ...
  24. .text:10036265            inc    ecx
  25. .text:10036266            cmp    ecx, 3
  26. .text:10036269            jz    short loc_10036270
  27. .text:1003626B            add    eax, 2
  28. .text:1003626E            jmp    short loc_10036278
  29. .text:10036270 ; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  30. .text:10036270
  31. .text:10036270 loc_10036270:                  ; CODE XREF: sub_10036220+49j
  32. .text:10036270            add    eax, 4
  33. .text:10036273            mov    ecx, 1
  34. .text:10036278
  35. .text:10036278 loc_10036278:                  ; CODE XREF: sub_10036220+4Ej
  36. .text:10036278            cmp    edx, offset Fibonaci1
  37. .text:1003627E            jl    short loc_10036243
  38. .text:10036280            retn
  39. .text:10036280 sub_10036220   endp
复制代码
回复

使用道具 举报

 楼主| 发表于 2006-4-28 01:40:26 | 显示全部楼层
之后代码虽长,待逻辑不复杂,基本上使用两个Fibonaci数列,加上两个常量加密数组(Key1, Key2),以及pdg文件头的两个字节(KeyToDecode1xH: 0x5E,0x5F两个位置)计算出特定解码字节保存在数组中待用。其中两个常量加密数组分别是:
  1. .data:100EA7C8 Key1        db '132jksdiau34ukjasdflkj!@#234afdji78#%234ADf v'
  2. .data:100EA7C8                            ; DATA XREF: sub_10035DA0+103r
  3. .data:100EA7C8                            ; sub_10035DA0+131r ...
  4. .data:100EA7F5            db  1Ch
  5. .data:100EA7F6 aSdkj908342AdfW db &#39;=-&#39;,7,&#39;sdkj908342<ADF>/#w%4t5o8uwrouyouhj8934038p350|+_SDFad&#39;
  6. .data:100EA7F6            db &#39;wr!234gasM,.spfdlp[WEey3dfsfgsf4890^:9!@#56&8938497890789054&#39;
  7. .data:100EA7F6            db &#39;ioerua^3~!2&*(_+*(80w&uidfs9ghidfower239-89taerC(!7a&#39;,0
  8. .data:100EA89F            db   0
  9. .data:100EA8A0 Key2        db &#39;Afgasdkol!@#$564746Lfat0[9i FDLAas090132!$@##$2354(*^78~*54s&#39;
  10. .data:100EA8A0            db &#39;dfakl;ml;lak;j2a#$2342!@#128-reg;o[werqPWEQRioADSF1234&*(690&#39;
  11. .data:100EA8A0            db &#39;8_)55454!&#39;,0
复制代码
回复

使用道具 举报

 楼主| 发表于 2006-4-28 01:41:42 | 显示全部楼层
至此,全部用于解密 11H 的代码讲解完毕。希望对你有帮助。
回复

使用道具 举报

发表于 2006-4-28 09:14:15 | 显示全部楼层
再次感谢cheming兄!

虽然汇编不是很明白,但是我会努力搞定的。
回复

使用道具 举报

发表于 2006-4-28 09:22:33 | 显示全部楼层
谢谢cheming。
回复

使用道具 举报

发表于 2006-4-28 09:28:29 | 显示全部楼层
cheming老师是给我们上解密课程
回复

使用道具 举报

发表于 2006-4-28 09:34:23 | 显示全部楼层
收藏........
回复

使用道具 举报

qdlsy 该用户已被删除
发表于 2006-4-29 12:53:04 | 显示全部楼层
楼主厉害啊!又看到一堆既熟悉又陌生令人发晕的东西
IDA反出来就是不一样
回复

使用道具 举报

发表于 2006-4-30 09:28:48 | 显示全部楼层
能整理为c++代码就更好了,呵呵。
回复

使用道具 举报

发表于 2006-4-30 09:45:24 | 显示全部楼层
11H解密我动态跟踪了,比较简单,超过你的想象,只有and ,not,add,sub,or,imul等等。写个算法就10行左右。 超星也太..........贴个汇编没有什么用的,要动态跟,看看内存区和堆栈区的值。
回复

使用道具 举报

发表于 2006-4-30 09:55:10 | 显示全部楼层
引用第13楼coolman2006-04-30 09:54发表的“”:

10行左右就搞定? 不得不服。呵呵
你不相信,我现在就可以发一个11Hkiller.10行是指算法部分,不包括读文件的offset的值。
回复

使用道具 举报

发表于 2006-4-30 09:59:02 | 显示全部楼层
除了0x5E,0x5F,还和0x10-0x13,0x18-0x1F有关。本人搞医学的,学反汇编不超过10天。以前还没有学过汇编语言。
回复

使用道具 举报

发表于 2006-4-30 10:07:47 | 显示全部楼层
引用第15楼yzlufei2006-04-30 09:59发表的“”:
除了0x5E,0x5F,还和0x10-0x14,0x18-0x1F有关。本人搞医学的,学反汇编不超过10天。以前还没有学过汇编语言。
更服了。
回复

使用道具 举报

发表于 2006-4-30 10:12:07 | 显示全部楼层
引用第15楼yzlufei2006-04-30 09:59发表的“”:
本人搞医学的,学反汇编不超过10天。以前还没有学过汇编语言。

牛人!不服不行!
回复

使用道具 举报

发表于 2006-4-30 10:21:21 | 显示全部楼层
本来也没有想解11H的,就是coolman大侠的11Hkill解过后,有coolman到此一游的标志,不太好。
牛人谈不上,才入门,9月就要到南京去上学了。coolman好像是南京的吧。
回复

使用道具 举报

发表于 2006-4-30 10:53:34 | 显示全部楼层
引用第15楼yzlufei2006-04-30 09:59发表的“”:
本人搞医学的,学反汇编不超过10天。以前还没有学过汇编语言。



无论如何要佩服一下!!!   
回复

使用道具 举报

发表于 2006-5-1 12:33:17 | 显示全部楼层
过路参观一下。也无论如何要佩服一下!!!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|网上读书园地

GMT+8, 2024-5-17 15:11 , Processed in 0.471584 second(s), 8 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表