1 ; Don't even think of reading this code
2 ; It was automatically generated by rc5-586.pl
3 ; Which is a perl program used to generate the x86 assember for
4 ; any of elf, a.out, BSDI,Win32, or Solaris
5 ; eric <eay@cryptsoft.com>
11 PUBLIC _RC5_32_encrypt
13 _RC5_32_encrypt PROC NEAR
18 mov edx, DWORD PTR 16[esp]
19 mov ebp, DWORD PTR 20[esp]
21 mov edi, DWORD PTR [edx]
22 mov esi, DWORD PTR 4[edx]
24 mov ebx, DWORD PTR [ebp]
25 add edi, DWORD PTR 4[ebp]
26 add esi, DWORD PTR 8[ebp]
28 mov eax, DWORD PTR 12[ebp]
33 mov eax, DWORD PTR 16[ebp]
38 mov eax, DWORD PTR 20[ebp]
43 mov eax, DWORD PTR 24[ebp]
48 mov eax, DWORD PTR 28[ebp]
53 mov eax, DWORD PTR 32[ebp]
58 mov eax, DWORD PTR 36[ebp]
63 mov eax, DWORD PTR 40[ebp]
68 mov eax, DWORD PTR 44[ebp]
73 mov eax, DWORD PTR 48[ebp]
78 mov eax, DWORD PTR 52[ebp]
83 mov eax, DWORD PTR 56[ebp]
88 mov eax, DWORD PTR 60[ebp]
93 mov eax, DWORD PTR 64[ebp]
98 mov eax, DWORD PTR 68[ebp]
103 mov eax, DWORD PTR 72[ebp]
110 mov eax, DWORD PTR 76[ebp]
115 mov eax, DWORD PTR 80[ebp]
120 mov eax, DWORD PTR 84[ebp]
125 mov eax, DWORD PTR 88[ebp]
130 mov eax, DWORD PTR 92[ebp]
135 mov eax, DWORD PTR 96[ebp]
140 mov eax, DWORD PTR 100[ebp]
145 mov eax, DWORD PTR 104[ebp]
152 mov eax, DWORD PTR 108[ebp]
157 mov eax, DWORD PTR 112[ebp]
162 mov eax, DWORD PTR 116[ebp]
167 mov eax, DWORD PTR 120[ebp]
172 mov eax, DWORD PTR 124[ebp]
177 mov eax, DWORD PTR 128[ebp]
182 mov eax, DWORD PTR 132[ebp]
187 mov eax, DWORD PTR 136[ebp]
192 mov DWORD PTR [edx],edi
193 mov DWORD PTR 4[edx],esi
202 PUBLIC _RC5_32_decrypt
204 _RC5_32_decrypt PROC NEAR
209 mov edx, DWORD PTR 16[esp]
210 mov ebp, DWORD PTR 20[esp]
212 mov edi, DWORD PTR [edx]
213 mov esi, DWORD PTR 4[edx]
215 mov ebx, DWORD PTR [ebp]
220 mov eax, DWORD PTR 136[ebp]
225 mov eax, DWORD PTR 132[ebp]
230 mov eax, DWORD PTR 128[ebp]
235 mov eax, DWORD PTR 124[ebp]
240 mov eax, DWORD PTR 120[ebp]
245 mov eax, DWORD PTR 116[ebp]
250 mov eax, DWORD PTR 112[ebp]
255 mov eax, DWORD PTR 108[ebp]
261 mov eax, DWORD PTR 104[ebp]
266 mov eax, DWORD PTR 100[ebp]
271 mov eax, DWORD PTR 96[ebp]
276 mov eax, DWORD PTR 92[ebp]
281 mov eax, DWORD PTR 88[ebp]
286 mov eax, DWORD PTR 84[ebp]
291 mov eax, DWORD PTR 80[ebp]
296 mov eax, DWORD PTR 76[ebp]
302 mov eax, DWORD PTR 72[ebp]
307 mov eax, DWORD PTR 68[ebp]
312 mov eax, DWORD PTR 64[ebp]
317 mov eax, DWORD PTR 60[ebp]
322 mov eax, DWORD PTR 56[ebp]
327 mov eax, DWORD PTR 52[ebp]
332 mov eax, DWORD PTR 48[ebp]
337 mov eax, DWORD PTR 44[ebp]
342 mov eax, DWORD PTR 40[ebp]
347 mov eax, DWORD PTR 36[ebp]
352 mov eax, DWORD PTR 32[ebp]
357 mov eax, DWORD PTR 28[ebp]
362 mov eax, DWORD PTR 24[ebp]
367 mov eax, DWORD PTR 20[ebp]
372 mov eax, DWORD PTR 16[ebp]
377 mov eax, DWORD PTR 12[ebp]
382 sub esi, DWORD PTR 8[ebp]
383 sub edi, DWORD PTR 4[ebp]
385 mov DWORD PTR [edx],edi
386 mov DWORD PTR 4[edx],esi
395 PUBLIC _RC5_32_cbc_encrypt
397 _RC5_32_cbc_encrypt PROC NEAR
403 mov ebp, DWORD PTR 28[esp]
404 ; getting iv ptr from parameter 4
405 mov ebx, DWORD PTR 36[esp]
406 mov esi, DWORD PTR [ebx]
407 mov edi, DWORD PTR 4[ebx]
413 mov esi, DWORD PTR 36[esp]
414 mov edi, DWORD PTR 40[esp]
415 ; getting encrypt flag from parameter 5
416 mov ecx, DWORD PTR 56[esp]
417 ; get and push parameter 3
418 mov eax, DWORD PTR 48[esp]
424 mov eax, DWORD PTR 8[esp]
425 mov ebx, DWORD PTR 12[esp]
426 jz $L005encrypt_finish
428 mov ecx, DWORD PTR [esi]
429 mov edx, DWORD PTR 4[esi]
432 mov DWORD PTR 8[esp],eax
433 mov DWORD PTR 12[esp],ebx
435 mov eax, DWORD PTR 8[esp]
436 mov ebx, DWORD PTR 12[esp]
437 mov DWORD PTR [edi],eax
438 mov DWORD PTR 4[edi],ebx
444 mov ebp, DWORD PTR 52[esp]
449 mov ebp, DWORD PTR $L008cbc_enc_jmp_table[ebp*4]
452 mov dh, BYTE PTR 6[esi]
455 mov dh, BYTE PTR 5[esi]
457 mov dl, BYTE PTR 4[esi]
459 mov ecx, DWORD PTR [esi]
462 mov ch, BYTE PTR 2[esi]
465 mov ch, BYTE PTR 1[esi]
467 mov cl, BYTE PTR [esi]
471 mov DWORD PTR 8[esp],eax
472 mov DWORD PTR 12[esp],ebx
474 mov eax, DWORD PTR 8[esp]
475 mov ebx, DWORD PTR 12[esp]
476 mov DWORD PTR [edi],eax
477 mov DWORD PTR 4[edi],ebx
481 mov eax, DWORD PTR 16[esp]
482 mov ebx, DWORD PTR 20[esp]
483 jz $L017decrypt_finish
485 mov eax, DWORD PTR [esi]
486 mov ebx, DWORD PTR 4[esi]
487 mov DWORD PTR 8[esp],eax
488 mov DWORD PTR 12[esp],ebx
490 mov eax, DWORD PTR 8[esp]
491 mov ebx, DWORD PTR 12[esp]
492 mov ecx, DWORD PTR 16[esp]
493 mov edx, DWORD PTR 20[esp]
496 mov eax, DWORD PTR [esi]
497 mov ebx, DWORD PTR 4[esi]
498 mov DWORD PTR [edi],ecx
499 mov DWORD PTR 4[edi],edx
500 mov DWORD PTR 16[esp],eax
501 mov DWORD PTR 20[esp],ebx
507 mov ebp, DWORD PTR 52[esp]
510 mov eax, DWORD PTR [esi]
511 mov ebx, DWORD PTR 4[esi]
512 mov DWORD PTR 8[esp],eax
513 mov DWORD PTR 12[esp],ebx
515 mov eax, DWORD PTR 8[esp]
516 mov ebx, DWORD PTR 12[esp]
517 mov ecx, DWORD PTR 16[esp]
518 mov edx, DWORD PTR 20[esp]
521 mov eax, DWORD PTR [esi]
522 mov ebx, DWORD PTR 4[esi]
525 mov BYTE PTR 6[edi],dl
528 mov BYTE PTR 5[edi],dh
530 mov BYTE PTR 4[edi],dl
532 mov DWORD PTR [edi],ecx
536 mov BYTE PTR 2[edi],cl
539 mov BYTE PTR 1[esi],ch
541 mov BYTE PTR [esi], cl
545 mov ecx, DWORD PTR 60[esp]
547 mov DWORD PTR [ecx],eax
548 mov DWORD PTR 4[ecx],ebx
554 $L008cbc_enc_jmp_table:
563 L027cbc_dec_jmp_table:
572 _RC5_32_cbc_encrypt ENDP