y_win32.asm 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880
  1. %ifidn __OUTPUT_FORMAT__,obj
  2. section code use32 class=code align=256
  3. %elifidn __OUTPUT_FORMAT__,win32
  4. [email protected] equ 1
  5. section .text code align=256
  6. %else
  7. section .text code
  8. %endif
  9. extern _DES_SPtrans
  10. global _fcrypt_body
  11. align 16
  12. _fcrypt_body:
  13. L$_fcrypt_body_begin:
  14. push ebp
  15. push ebx
  16. push esi
  17. push edi
  18. ;
  19. ; Load the 2 words
  20. xor edi,edi
  21. xor esi,esi
  22. lea edx,[_DES_SPtrans]
  23. push edx
  24. mov ebp,DWORD [28+esp]
  25. push DWORD 25
  26. L$000start:
  27. ;
  28. ; Round 0
  29. mov eax,DWORD [36+esp]
  30. mov edx,esi
  31. shr edx,16
  32. mov ecx,DWORD [40+esp]
  33. xor edx,esi
  34. and eax,edx
  35. and edx,ecx
  36. mov ebx,eax
  37. shl ebx,16
  38. mov ecx,edx
  39. shl ecx,16
  40. xor eax,ebx
  41. xor edx,ecx
  42. mov ebx,DWORD [ebp]
  43. xor eax,ebx
  44. mov ecx,DWORD [4+ebp]
  45. xor eax,esi
  46. xor edx,esi
  47. xor edx,ecx
  48. and eax,0xfcfcfcfc
  49. xor ebx,ebx
  50. and edx,0xcfcfcfcf
  51. xor ecx,ecx
  52. mov bl,al
  53. mov cl,ah
  54. ror edx,4
  55. mov ebp,DWORD [4+esp]
  56. xor edi,DWORD [ebx*1+ebp]
  57. mov bl,dl
  58. xor edi,DWORD [0x200+ecx*1+ebp]
  59. mov cl,dh
  60. shr eax,16
  61. xor edi,DWORD [0x100+ebx*1+ebp]
  62. mov bl,ah
  63. shr edx,16
  64. xor edi,DWORD [0x300+ecx*1+ebp]
  65. mov cl,dh
  66. and eax,0xff
  67. and edx,0xff
  68. mov ebx,DWORD [0x600+ebx*1+ebp]
  69. xor edi,ebx
  70. mov ebx,DWORD [0x700+ecx*1+ebp]
  71. xor edi,ebx
  72. mov ebx,DWORD [0x400+eax*1+ebp]
  73. xor edi,ebx
  74. mov ebx,DWORD [0x500+edx*1+ebp]
  75. xor edi,ebx
  76. mov ebp,DWORD [32+esp]
  77. ;
  78. ; Round 1
  79. mov eax,DWORD [36+esp]
  80. mov edx,edi
  81. shr edx,16
  82. mov ecx,DWORD [40+esp]
  83. xor edx,edi
  84. and eax,edx
  85. and edx,ecx
  86. mov ebx,eax
  87. shl ebx,16
  88. mov ecx,edx
  89. shl ecx,16
  90. xor eax,ebx
  91. xor edx,ecx
  92. mov ebx,DWORD [8+ebp]
  93. xor eax,ebx
  94. mov ecx,DWORD [12+ebp]
  95. xor eax,edi
  96. xor edx,edi
  97. xor edx,ecx
  98. and eax,0xfcfcfcfc
  99. xor ebx,ebx
  100. and edx,0xcfcfcfcf
  101. xor ecx,ecx
  102. mov bl,al
  103. mov cl,ah
  104. ror edx,4
  105. mov ebp,DWORD [4+esp]
  106. xor esi,DWORD [ebx*1+ebp]
  107. mov bl,dl
  108. xor esi,DWORD [0x200+ecx*1+ebp]
  109. mov cl,dh
  110. shr eax,16
  111. xor esi,DWORD [0x100+ebx*1+ebp]
  112. mov bl,ah
  113. shr edx,16
  114. xor esi,DWORD [0x300+ecx*1+ebp]
  115. mov cl,dh
  116. and eax,0xff
  117. and edx,0xff
  118. mov ebx,DWORD [0x600+ebx*1+ebp]
  119. xor esi,ebx
  120. mov ebx,DWORD [0x700+ecx*1+ebp]
  121. xor esi,ebx
  122. mov ebx,DWORD [0x400+eax*1+ebp]
  123. xor esi,ebx
  124. mov ebx,DWORD [0x500+edx*1+ebp]
  125. xor esi,ebx
  126. mov ebp,DWORD [32+esp]
  127. ;
  128. ; Round 2
  129. mov eax,DWORD [36+esp]
  130. mov edx,esi
  131. shr edx,16
  132. mov ecx,DWORD [40+esp]
  133. xor edx,esi
  134. and eax,edx
  135. and edx,ecx
  136. mov ebx,eax
  137. shl ebx,16
  138. mov ecx,edx
  139. shl ecx,16
  140. xor eax,ebx
  141. xor edx,ecx
  142. mov ebx,DWORD [16+ebp]
  143. xor eax,ebx
  144. mov ecx,DWORD [20+ebp]
  145. xor eax,esi
  146. xor edx,esi
  147. xor edx,ecx
  148. and eax,0xfcfcfcfc
  149. xor ebx,ebx
  150. and edx,0xcfcfcfcf
  151. xor ecx,ecx
  152. mov bl,al
  153. mov cl,ah
  154. ror edx,4
  155. mov ebp,DWORD [4+esp]
  156. xor edi,DWORD [ebx*1+ebp]
  157. mov bl,dl
  158. xor edi,DWORD [0x200+ecx*1+ebp]
  159. mov cl,dh
  160. shr eax,16
  161. xor edi,DWORD [0x100+ebx*1+ebp]
  162. mov bl,ah
  163. shr edx,16
  164. xor edi,DWORD [0x300+ecx*1+ebp]
  165. mov cl,dh
  166. and eax,0xff
  167. and edx,0xff
  168. mov ebx,DWORD [0x600+ebx*1+ebp]
  169. xor edi,ebx
  170. mov ebx,DWORD [0x700+ecx*1+ebp]
  171. xor edi,ebx
  172. mov ebx,DWORD [0x400+eax*1+ebp]
  173. xor edi,ebx
  174. mov ebx,DWORD [0x500+edx*1+ebp]
  175. xor edi,ebx
  176. mov ebp,DWORD [32+esp]
  177. ;
  178. ; Round 3
  179. mov eax,DWORD [36+esp]
  180. mov edx,edi
  181. shr edx,16
  182. mov ecx,DWORD [40+esp]
  183. xor edx,edi
  184. and eax,edx
  185. and edx,ecx
  186. mov ebx,eax
  187. shl ebx,16
  188. mov ecx,edx
  189. shl ecx,16
  190. xor eax,ebx
  191. xor edx,ecx
  192. mov ebx,DWORD [24+ebp]
  193. xor eax,ebx
  194. mov ecx,DWORD [28+ebp]
  195. xor eax,edi
  196. xor edx,edi
  197. xor edx,ecx
  198. and eax,0xfcfcfcfc
  199. xor ebx,ebx
  200. and edx,0xcfcfcfcf
  201. xor ecx,ecx
  202. mov bl,al
  203. mov cl,ah
  204. ror edx,4
  205. mov ebp,DWORD [4+esp]
  206. xor esi,DWORD [ebx*1+ebp]
  207. mov bl,dl
  208. xor esi,DWORD [0x200+ecx*1+ebp]
  209. mov cl,dh
  210. shr eax,16
  211. xor esi,DWORD [0x100+ebx*1+ebp]
  212. mov bl,ah
  213. shr edx,16
  214. xor esi,DWORD [0x300+ecx*1+ebp]
  215. mov cl,dh
  216. and eax,0xff
  217. and edx,0xff
  218. mov ebx,DWORD [0x600+ebx*1+ebp]
  219. xor esi,ebx
  220. mov ebx,DWORD [0x700+ecx*1+ebp]
  221. xor esi,ebx
  222. mov ebx,DWORD [0x400+eax*1+ebp]
  223. xor esi,ebx
  224. mov ebx,DWORD [0x500+edx*1+ebp]
  225. xor esi,ebx
  226. mov ebp,DWORD [32+esp]
  227. ;
  228. ; Round 4
  229. mov eax,DWORD [36+esp]
  230. mov edx,esi
  231. shr edx,16
  232. mov ecx,DWORD [40+esp]
  233. xor edx,esi
  234. and eax,edx
  235. and edx,ecx
  236. mov ebx,eax
  237. shl ebx,16
  238. mov ecx,edx
  239. shl ecx,16
  240. xor eax,ebx
  241. xor edx,ecx
  242. mov ebx,DWORD [32+ebp]
  243. xor eax,ebx
  244. mov ecx,DWORD [36+ebp]
  245. xor eax,esi
  246. xor edx,esi
  247. xor edx,ecx
  248. and eax,0xfcfcfcfc
  249. xor ebx,ebx
  250. and edx,0xcfcfcfcf
  251. xor ecx,ecx
  252. mov bl,al
  253. mov cl,ah
  254. ror edx,4
  255. mov ebp,DWORD [4+esp]
  256. xor edi,DWORD [ebx*1+ebp]
  257. mov bl,dl
  258. xor edi,DWORD [0x200+ecx*1+ebp]
  259. mov cl,dh
  260. shr eax,16
  261. xor edi,DWORD [0x100+ebx*1+ebp]
  262. mov bl,ah
  263. shr edx,16
  264. xor edi,DWORD [0x300+ecx*1+ebp]
  265. mov cl,dh
  266. and eax,0xff
  267. and edx,0xff
  268. mov ebx,DWORD [0x600+ebx*1+ebp]
  269. xor edi,ebx
  270. mov ebx,DWORD [0x700+ecx*1+ebp]
  271. xor edi,ebx
  272. mov ebx,DWORD [0x400+eax*1+ebp]
  273. xor edi,ebx
  274. mov ebx,DWORD [0x500+edx*1+ebp]
  275. xor edi,ebx
  276. mov ebp,DWORD [32+esp]
  277. ;
  278. ; Round 5
  279. mov eax,DWORD [36+esp]
  280. mov edx,edi
  281. shr edx,16
  282. mov ecx,DWORD [40+esp]
  283. xor edx,edi
  284. and eax,edx
  285. and edx,ecx
  286. mov ebx,eax
  287. shl ebx,16
  288. mov ecx,edx
  289. shl ecx,16
  290. xor eax,ebx
  291. xor edx,ecx
  292. mov ebx,DWORD [40+ebp]
  293. xor eax,ebx
  294. mov ecx,DWORD [44+ebp]
  295. xor eax,edi
  296. xor edx,edi
  297. xor edx,ecx
  298. and eax,0xfcfcfcfc
  299. xor ebx,ebx
  300. and edx,0xcfcfcfcf
  301. xor ecx,ecx
  302. mov bl,al
  303. mov cl,ah
  304. ror edx,4
  305. mov ebp,DWORD [4+esp]
  306. xor esi,DWORD [ebx*1+ebp]
  307. mov bl,dl
  308. xor esi,DWORD [0x200+ecx*1+ebp]
  309. mov cl,dh
  310. shr eax,16
  311. xor esi,DWORD [0x100+ebx*1+ebp]
  312. mov bl,ah
  313. shr edx,16
  314. xor esi,DWORD [0x300+ecx*1+ebp]
  315. mov cl,dh
  316. and eax,0xff
  317. and edx,0xff
  318. mov ebx,DWORD [0x600+ebx*1+ebp]
  319. xor esi,ebx
  320. mov ebx,DWORD [0x700+ecx*1+ebp]
  321. xor esi,ebx
  322. mov ebx,DWORD [0x400+eax*1+ebp]
  323. xor esi,ebx
  324. mov ebx,DWORD [0x500+edx*1+ebp]
  325. xor esi,ebx
  326. mov ebp,DWORD [32+esp]
  327. ;
  328. ; Round 6
  329. mov eax,DWORD [36+esp]
  330. mov edx,esi
  331. shr edx,16
  332. mov ecx,DWORD [40+esp]
  333. xor edx,esi
  334. and eax,edx
  335. and edx,ecx
  336. mov ebx,eax
  337. shl ebx,16
  338. mov ecx,edx
  339. shl ecx,16
  340. xor eax,ebx
  341. xor edx,ecx
  342. mov ebx,DWORD [48+ebp]
  343. xor eax,ebx
  344. mov ecx,DWORD [52+ebp]
  345. xor eax,esi
  346. xor edx,esi
  347. xor edx,ecx
  348. and eax,0xfcfcfcfc
  349. xor ebx,ebx
  350. and edx,0xcfcfcfcf
  351. xor ecx,ecx
  352. mov bl,al
  353. mov cl,ah
  354. ror edx,4
  355. mov ebp,DWORD [4+esp]
  356. xor edi,DWORD [ebx*1+ebp]
  357. mov bl,dl
  358. xor edi,DWORD [0x200+ecx*1+ebp]
  359. mov cl,dh
  360. shr eax,16
  361. xor edi,DWORD [0x100+ebx*1+ebp]
  362. mov bl,ah
  363. shr edx,16
  364. xor edi,DWORD [0x300+ecx*1+ebp]
  365. mov cl,dh
  366. and eax,0xff
  367. and edx,0xff
  368. mov ebx,DWORD [0x600+ebx*1+ebp]
  369. xor edi,ebx
  370. mov ebx,DWORD [0x700+ecx*1+ebp]
  371. xor edi,ebx
  372. mov ebx,DWORD [0x400+eax*1+ebp]
  373. xor edi,ebx
  374. mov ebx,DWORD [0x500+edx*1+ebp]
  375. xor edi,ebx
  376. mov ebp,DWORD [32+esp]
  377. ;
  378. ; Round 7
  379. mov eax,DWORD [36+esp]
  380. mov edx,edi
  381. shr edx,16
  382. mov ecx,DWORD [40+esp]
  383. xor edx,edi
  384. and eax,edx
  385. and edx,ecx
  386. mov ebx,eax
  387. shl ebx,16
  388. mov ecx,edx
  389. shl ecx,16
  390. xor eax,ebx
  391. xor edx,ecx
  392. mov ebx,DWORD [56+ebp]
  393. xor eax,ebx
  394. mov ecx,DWORD [60+ebp]
  395. xor eax,edi
  396. xor edx,edi
  397. xor edx,ecx
  398. and eax,0xfcfcfcfc
  399. xor ebx,ebx
  400. and edx,0xcfcfcfcf
  401. xor ecx,ecx
  402. mov bl,al
  403. mov cl,ah
  404. ror edx,4
  405. mov ebp,DWORD [4+esp]
  406. xor esi,DWORD [ebx*1+ebp]
  407. mov bl,dl
  408. xor esi,DWORD [0x200+ecx*1+ebp]
  409. mov cl,dh
  410. shr eax,16
  411. xor esi,DWORD [0x100+ebx*1+ebp]
  412. mov bl,ah
  413. shr edx,16
  414. xor esi,DWORD [0x300+ecx*1+ebp]
  415. mov cl,dh
  416. and eax,0xff
  417. and edx,0xff
  418. mov ebx,DWORD [0x600+ebx*1+ebp]
  419. xor esi,ebx
  420. mov ebx,DWORD [0x700+ecx*1+ebp]
  421. xor esi,ebx
  422. mov ebx,DWORD [0x400+eax*1+ebp]
  423. xor esi,ebx
  424. mov ebx,DWORD [0x500+edx*1+ebp]
  425. xor esi,ebx
  426. mov ebp,DWORD [32+esp]
  427. ;
  428. ; Round 8
  429. mov eax,DWORD [36+esp]
  430. mov edx,esi
  431. shr edx,16
  432. mov ecx,DWORD [40+esp]
  433. xor edx,esi
  434. and eax,edx
  435. and edx,ecx
  436. mov ebx,eax
  437. shl ebx,16
  438. mov ecx,edx
  439. shl ecx,16
  440. xor eax,ebx
  441. xor edx,ecx
  442. mov ebx,DWORD [64+ebp]
  443. xor eax,ebx
  444. mov ecx,DWORD [68+ebp]
  445. xor eax,esi
  446. xor edx,esi
  447. xor edx,ecx
  448. and eax,0xfcfcfcfc
  449. xor ebx,ebx
  450. and edx,0xcfcfcfcf
  451. xor ecx,ecx
  452. mov bl,al
  453. mov cl,ah
  454. ror edx,4
  455. mov ebp,DWORD [4+esp]
  456. xor edi,DWORD [ebx*1+ebp]
  457. mov bl,dl
  458. xor edi,DWORD [0x200+ecx*1+ebp]
  459. mov cl,dh
  460. shr eax,16
  461. xor edi,DWORD [0x100+ebx*1+ebp]
  462. mov bl,ah
  463. shr edx,16
  464. xor edi,DWORD [0x300+ecx*1+ebp]
  465. mov cl,dh
  466. and eax,0xff
  467. and edx,0xff
  468. mov ebx,DWORD [0x600+ebx*1+ebp]
  469. xor edi,ebx
  470. mov ebx,DWORD [0x700+ecx*1+ebp]
  471. xor edi,ebx
  472. mov ebx,DWORD [0x400+eax*1+ebp]
  473. xor edi,ebx
  474. mov ebx,DWORD [0x500+edx*1+ebp]
  475. xor edi,ebx
  476. mov ebp,DWORD [32+esp]
  477. ;
  478. ; Round 9
  479. mov eax,DWORD [36+esp]
  480. mov edx,edi
  481. shr edx,16
  482. mov ecx,DWORD [40+esp]
  483. xor edx,edi
  484. and eax,edx
  485. and edx,ecx
  486. mov ebx,eax
  487. shl ebx,16
  488. mov ecx,edx
  489. shl ecx,16
  490. xor eax,ebx
  491. xor edx,ecx
  492. mov ebx,DWORD [72+ebp]
  493. xor eax,ebx
  494. mov ecx,DWORD [76+ebp]
  495. xor eax,edi
  496. xor edx,edi
  497. xor edx,ecx
  498. and eax,0xfcfcfcfc
  499. xor ebx,ebx
  500. and edx,0xcfcfcfcf
  501. xor ecx,ecx
  502. mov bl,al
  503. mov cl,ah
  504. ror edx,4
  505. mov ebp,DWORD [4+esp]
  506. xor esi,DWORD [ebx*1+ebp]
  507. mov bl,dl
  508. xor esi,DWORD [0x200+ecx*1+ebp]
  509. mov cl,dh
  510. shr eax,16
  511. xor esi,DWORD [0x100+ebx*1+ebp]
  512. mov bl,ah
  513. shr edx,16
  514. xor esi,DWORD [0x300+ecx*1+ebp]
  515. mov cl,dh
  516. and eax,0xff
  517. and edx,0xff
  518. mov ebx,DWORD [0x600+ebx*1+ebp]
  519. xor esi,ebx
  520. mov ebx,DWORD [0x700+ecx*1+ebp]
  521. xor esi,ebx
  522. mov ebx,DWORD [0x400+eax*1+ebp]
  523. xor esi,ebx
  524. mov ebx,DWORD [0x500+edx*1+ebp]
  525. xor esi,ebx
  526. mov ebp,DWORD [32+esp]
  527. ;
  528. ; Round 10
  529. mov eax,DWORD [36+esp]
  530. mov edx,esi
  531. shr edx,16
  532. mov ecx,DWORD [40+esp]
  533. xor edx,esi
  534. and eax,edx
  535. and edx,ecx
  536. mov ebx,eax
  537. shl ebx,16
  538. mov ecx,edx
  539. shl ecx,16
  540. xor eax,ebx
  541. xor edx,ecx
  542. mov ebx,DWORD [80+ebp]
  543. xor eax,ebx
  544. mov ecx,DWORD [84+ebp]
  545. xor eax,esi
  546. xor edx,esi
  547. xor edx,ecx
  548. and eax,0xfcfcfcfc
  549. xor ebx,ebx
  550. and edx,0xcfcfcfcf
  551. xor ecx,ecx
  552. mov bl,al
  553. mov cl,ah
  554. ror edx,4
  555. mov ebp,DWORD [4+esp]
  556. xor edi,DWORD [ebx*1+ebp]
  557. mov bl,dl
  558. xor edi,DWORD [0x200+ecx*1+ebp]
  559. mov cl,dh
  560. shr eax,16
  561. xor edi,DWORD [0x100+ebx*1+ebp]
  562. mov bl,ah
  563. shr edx,16
  564. xor edi,DWORD [0x300+ecx*1+ebp]
  565. mov cl,dh
  566. and eax,0xff
  567. and edx,0xff
  568. mov ebx,DWORD [0x600+ebx*1+ebp]
  569. xor edi,ebx
  570. mov ebx,DWORD [0x700+ecx*1+ebp]
  571. xor edi,ebx
  572. mov ebx,DWORD [0x400+eax*1+ebp]
  573. xor edi,ebx
  574. mov ebx,DWORD [0x500+edx*1+ebp]
  575. xor edi,ebx
  576. mov ebp,DWORD [32+esp]
  577. ;
  578. ; Round 11
  579. mov eax,DWORD [36+esp]
  580. mov edx,edi
  581. shr edx,16
  582. mov ecx,DWORD [40+esp]
  583. xor edx,edi
  584. and eax,edx
  585. and edx,ecx
  586. mov ebx,eax
  587. shl ebx,16
  588. mov ecx,edx
  589. shl ecx,16
  590. xor eax,ebx
  591. xor edx,ecx
  592. mov ebx,DWORD [88+ebp]
  593. xor eax,ebx
  594. mov ecx,DWORD [92+ebp]
  595. xor eax,edi
  596. xor edx,edi
  597. xor edx,ecx
  598. and eax,0xfcfcfcfc
  599. xor ebx,ebx
  600. and edx,0xcfcfcfcf
  601. xor ecx,ecx
  602. mov bl,al
  603. mov cl,ah
  604. ror edx,4
  605. mov ebp,DWORD [4+esp]
  606. xor esi,DWORD [ebx*1+ebp]
  607. mov bl,dl
  608. xor esi,DWORD [0x200+ecx*1+ebp]
  609. mov cl,dh
  610. shr eax,16
  611. xor esi,DWORD [0x100+ebx*1+ebp]
  612. mov bl,ah
  613. shr edx,16
  614. xor esi,DWORD [0x300+ecx*1+ebp]
  615. mov cl,dh
  616. and eax,0xff
  617. and edx,0xff
  618. mov ebx,DWORD [0x600+ebx*1+ebp]
  619. xor esi,ebx
  620. mov ebx,DWORD [0x700+ecx*1+ebp]
  621. xor esi,ebx
  622. mov ebx,DWORD [0x400+eax*1+ebp]
  623. xor esi,ebx
  624. mov ebx,DWORD [0x500+edx*1+ebp]
  625. xor esi,ebx
  626. mov ebp,DWORD [32+esp]
  627. ;
  628. ; Round 12
  629. mov eax,DWORD [36+esp]
  630. mov edx,esi
  631. shr edx,16
  632. mov ecx,DWORD [40+esp]
  633. xor edx,esi
  634. and eax,edx
  635. and edx,ecx
  636. mov ebx,eax
  637. shl ebx,16
  638. mov ecx,edx
  639. shl ecx,16
  640. xor eax,ebx
  641. xor edx,ecx
  642. mov ebx,DWORD [96+ebp]
  643. xor eax,ebx
  644. mov ecx,DWORD [100+ebp]
  645. xor eax,esi
  646. xor edx,esi
  647. xor edx,ecx
  648. and eax,0xfcfcfcfc
  649. xor ebx,ebx
  650. and edx,0xcfcfcfcf
  651. xor ecx,ecx
  652. mov bl,al
  653. mov cl,ah
  654. ror edx,4
  655. mov ebp,DWORD [4+esp]
  656. xor edi,DWORD [ebx*1+ebp]
  657. mov bl,dl
  658. xor edi,DWORD [0x200+ecx*1+ebp]
  659. mov cl,dh
  660. shr eax,16
  661. xor edi,DWORD [0x100+ebx*1+ebp]
  662. mov bl,ah
  663. shr edx,16
  664. xor edi,DWORD [0x300+ecx*1+ebp]
  665. mov cl,dh
  666. and eax,0xff
  667. and edx,0xff
  668. mov ebx,DWORD [0x600+ebx*1+ebp]
  669. xor edi,ebx
  670. mov ebx,DWORD [0x700+ecx*1+ebp]
  671. xor edi,ebx
  672. mov ebx,DWORD [0x400+eax*1+ebp]
  673. xor edi,ebx
  674. mov ebx,DWORD [0x500+edx*1+ebp]
  675. xor edi,ebx
  676. mov ebp,DWORD [32+esp]
  677. ;
  678. ; Round 13
  679. mov eax,DWORD [36+esp]
  680. mov edx,edi
  681. shr edx,16
  682. mov ecx,DWORD [40+esp]
  683. xor edx,edi
  684. and eax,edx
  685. and edx,ecx
  686. mov ebx,eax
  687. shl ebx,16
  688. mov ecx,edx
  689. shl ecx,16
  690. xor eax,ebx
  691. xor edx,ecx
  692. mov ebx,DWORD [104+ebp]
  693. xor eax,ebx
  694. mov ecx,DWORD [108+ebp]
  695. xor eax,edi
  696. xor edx,edi
  697. xor edx,ecx
  698. and eax,0xfcfcfcfc
  699. xor ebx,ebx
  700. and edx,0xcfcfcfcf
  701. xor ecx,ecx
  702. mov bl,al
  703. mov cl,ah
  704. ror edx,4
  705. mov ebp,DWORD [4+esp]
  706. xor esi,DWORD [ebx*1+ebp]
  707. mov bl,dl
  708. xor esi,DWORD [0x200+ecx*1+ebp]
  709. mov cl,dh
  710. shr eax,16
  711. xor esi,DWORD [0x100+ebx*1+ebp]
  712. mov bl,ah
  713. shr edx,16
  714. xor esi,DWORD [0x300+ecx*1+ebp]
  715. mov cl,dh
  716. and eax,0xff
  717. and edx,0xff
  718. mov ebx,DWORD [0x600+ebx*1+ebp]
  719. xor esi,ebx
  720. mov ebx,DWORD [0x700+ecx*1+ebp]
  721. xor esi,ebx
  722. mov ebx,DWORD [0x400+eax*1+ebp]
  723. xor esi,ebx
  724. mov ebx,DWORD [0x500+edx*1+ebp]
  725. xor esi,ebx
  726. mov ebp,DWORD [32+esp]
  727. ;
  728. ; Round 14
  729. mov eax,DWORD [36+esp]
  730. mov edx,esi
  731. shr edx,16
  732. mov ecx,DWORD [40+esp]
  733. xor edx,esi
  734. and eax,edx
  735. and edx,ecx
  736. mov ebx,eax
  737. shl ebx,16
  738. mov ecx,edx
  739. shl ecx,16
  740. xor eax,ebx
  741. xor edx,ecx
  742. mov ebx,DWORD [112+ebp]
  743. xor eax,ebx
  744. mov ecx,DWORD [116+ebp]
  745. xor eax,esi
  746. xor edx,esi
  747. xor edx,ecx
  748. and eax,0xfcfcfcfc
  749. xor ebx,ebx
  750. and edx,0xcfcfcfcf
  751. xor ecx,ecx
  752. mov bl,al
  753. mov cl,ah
  754. ror edx,4
  755. mov ebp,DWORD [4+esp]
  756. xor edi,DWORD [ebx*1+ebp]
  757. mov bl,dl
  758. xor edi,DWORD [0x200+ecx*1+ebp]
  759. mov cl,dh
  760. shr eax,16
  761. xor edi,DWORD [0x100+ebx*1+ebp]
  762. mov bl,ah
  763. shr edx,16
  764. xor edi,DWORD [0x300+ecx*1+ebp]
  765. mov cl,dh
  766. and eax,0xff
  767. and edx,0xff
  768. mov ebx,DWORD [0x600+ebx*1+ebp]
  769. xor edi,ebx
  770. mov ebx,DWORD [0x700+ecx*1+ebp]
  771. xor edi,ebx
  772. mov ebx,DWORD [0x400+eax*1+ebp]
  773. xor edi,ebx
  774. mov ebx,DWORD [0x500+edx*1+ebp]
  775. xor edi,ebx
  776. mov ebp,DWORD [32+esp]
  777. ;
  778. ; Round 15
  779. mov eax,DWORD [36+esp]
  780. mov edx,edi
  781. shr edx,16
  782. mov ecx,DWORD [40+esp]
  783. xor edx,edi
  784. and eax,edx
  785. and edx,ecx
  786. mov ebx,eax
  787. shl ebx,16
  788. mov ecx,edx
  789. shl ecx,16
  790. xor eax,ebx
  791. xor edx,ecx
  792. mov ebx,DWORD [120+ebp]
  793. xor eax,ebx
  794. mov ecx,DWORD [124+ebp]
  795. xor eax,edi
  796. xor edx,edi
  797. xor edx,ecx
  798. and eax,0xfcfcfcfc
  799. xor ebx,ebx
  800. and edx,0xcfcfcfcf
  801. xor ecx,ecx
  802. mov bl,al
  803. mov cl,ah
  804. ror edx,4
  805. mov ebp,DWORD [4+esp]
  806. xor esi,DWORD [ebx*1+ebp]
  807. mov bl,dl
  808. xor esi,DWORD [0x200+ecx*1+ebp]
  809. mov cl,dh
  810. shr eax,16
  811. xor esi,DWORD [0x100+ebx*1+ebp]
  812. mov bl,ah
  813. shr edx,16
  814. xor esi,DWORD [0x300+ecx*1+ebp]
  815. mov cl,dh
  816. and eax,0xff
  817. and edx,0xff
  818. mov ebx,DWORD [0x600+ebx*1+ebp]
  819. xor esi,ebx
  820. mov ebx,DWORD [0x700+ecx*1+ebp]
  821. xor esi,ebx
  822. mov ebx,DWORD [0x400+eax*1+ebp]
  823. xor esi,ebx
  824. mov ebx,DWORD [0x500+edx*1+ebp]
  825. xor esi,ebx
  826. mov ebp,DWORD [32+esp]
  827. mov ebx,DWORD [esp]
  828. mov eax,edi
  829. dec ebx
  830. mov edi,esi
  831. mov esi,eax
  832. mov DWORD [esp],ebx
  833. jnz NEAR L$000start
  834. ;
  835. ; FP
  836. mov edx,DWORD [28+esp]
  837. ror edi,1
  838. mov eax,esi
  839. xor esi,edi
  840. and esi,0xaaaaaaaa
  841. xor eax,esi
  842. xor edi,esi
  843. ;
  844. rol eax,23
  845. mov esi,eax
  846. xor eax,edi
  847. and eax,0x03fc03fc
  848. xor esi,eax
  849. xor edi,eax
  850. ;
  851. rol esi,10
  852. mov eax,esi
  853. xor esi,edi
  854. and esi,0x33333333
  855. xor eax,esi
  856. xor edi,esi
  857. ;
  858. rol edi,18
  859. mov esi,edi
  860. xor edi,eax
  861. and edi,0xfff0000f
  862. xor esi,edi
  863. xor eax,edi
  864. ;
  865. rol esi,12
  866. mov edi,esi
  867. xor esi,eax
  868. and esi,0xf0f0f0f0
  869. xor edi,esi
  870. xor eax,esi
  871. ;
  872. ror eax,4
  873. mov DWORD [edx],eax
  874. mov DWORD [4+edx],edi
  875. add esp,8
  876. pop edi
  877. pop esi
  878. pop ebx
  879. pop ebp
  880. ret