[MPlayer-dev-eng] silly code
Arpi
arpi at thot.banki.hu
Tue Jan 1 05:42:21 CET 2002
Hi,
ok, i understand it now.
it's a hashtable handler func. it inserts new element to hashed linked list.
the code bellow calculates a hash value from [esp+4], checks the 0x00001837
long hash table. if that field is zero, then it will be a new list, if it's
non-zero it appends to existing linked list.
maybe this is the codec registration stuff i'm searching for.
(i'll never like gdb's silly reversed asm, compared to tasm's intel syntax)
> i'm still on quicktime.qts...
> it still does sig11 with win32 loader here:
>
> 0x629a1d80: mov 0x4(%esp,1),%ecx ;; ecx = AABBCCDD == 0x0806b738
> 0x629a1d84: xor %edx,%edx ;; edx = 00000000
> 0x629a1d86: mov %ecx,%eax ;; eax = AABBCCDD
> 0x629a1d88: mov %cl,%dh ;; edx = 0000DD00
> 0x629a1d8a: shr $0x8,%eax ;; eax = 00AABBCC
> 0x629a1d8d: mov %al,%dl ;; edx = 0000DDCC
> 0x629a1d8f: and $0xff00,%eax ;; eax = 0000BB00
> 0x629a1d94: and $0xff0000,%ecx ;; ecx = 00BB0000
> 0x629a1d9a: or %ecx,%eax ;; eax = 00BBBB00
> 0x629a1d9c: shr $0x8,%eax ;; eax = 0000BBBB
> 0x629a1d9f: xor %edx,%eax ;; eax = 0000(BBBB^DDCC)
>
> 0x629a1da1: xor %edx,%edx
> 0x629a1da3: div 0x62b6fa94,%eax ;; 0x00001837
> 0x629a1da9: mov 0x62b7d640,%eax ;; 0x00000000 < problem?
> 0x629a1dae: mov (%eax,%edx,4),%eax
> ^^^^^^^^^^ sig11 here.
>
> 0x629a1db1: test %eax,%eax
> 0x629a1db3: jne 0x629a1dcf
>
> after ;; there are my comments. i tried to find out what the hell this code
> do, but i don't really understand. it seems to be nonsense to me.
> it get a memory address in stack (maybe it's wrong here), then it starts
> swapping bytes in weird way, finally divide by 0x00001837 and use the modulo
> as index in dword data table, with (another error?) zero base address.
>
>
> A'rpi / Astral & ESP-team
>
> --
> mailto:arpi at thot.banki.hu
> http://esp-team.scene.hu
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>
>
A'rpi / Astral & ESP-team
--
mailto:arpi at thot.banki.hu
http://esp-team.scene.hu
More information about the MPlayer-dev-eng
mailing list