Statistics

Members: 1927
News: 293
Web Links: 1
Visitors: 3962630

Who's Online

We have 1 guest online
Damn Vulnerable LinuxDamn Vulnerable Linux (DVL) is a Linux-based (modified Damn Small Linux) tool for IT-Security & IT-Anti- Security and Attack & Defense. [CLICK HERE FOR MORE INFOS! ]

Featured Conference Video

T16-Recon2006-Joe_Stewart-OllyBonE.gif OllyBone - Semi-Automatic Unpacking on IA-32. View the conference video here!
Home
MMX ltostr
User Rating: / 0
PoorBest 
Written by Cecchinel Stephan   


;Summary:       Convert long [dword] value to an ASCII string
;Compatibility: MMX
;Notes:         Converts a number in EAX to an 8 bytes hexadecimal string
;               at [edi]
;               14 clocks on a Celeron-333
Sum1:      dd 0x30303030, 0x30303030
Mask1:    dd 0x0f0f0f0f, 0x0f0f0f0f
Comp1:    dd 0x09090909, 0x09090909
Hex32:
        bswap eax
        movq mm3,[Sum1]
        movq mm4,[Comp1]
        movq mm2,[Mask1]
        movq mm5,mm3
        psubb mm5,mm4
        movd mm0,eax
        movq mm1,mm0
        psrlq mm0,4
        pand mm0,mm2
        pand mm1,mm2
        punpcklbw mm0,mm1
        movq mm1,mm0
        pcmpgtb mm0,mm4
        pand mm0,mm5
        paddb mm1,mm3
        paddb mm1,mm0
        movq [edi],mm1
        ret