Thread: Research: Asm-scanner
View Single Post
Old July 26th, 2010, 09:15 AM
HackMew's Avatar
Mewtwo Strikes Back
Join Date: Jun 2006
Well, the non-ASM code in the picture is actually more confusing to read than pure ASM code from my point of view...

081de39c  b570 push {r4-r6,lr}
081de39e  1c02 add r2, r0, #0x0
081de3a0  481e ldr r0, [$081de41c] (=$03007ff0)
081de3a2  6804 ldr r4, [r0, #0x0]
081de3a4  20f0 mov r0, #0xf0
081de3a6  0300 lsl r0, r0, #0x0c
081de3a8  4010 and r0, r2
081de3aa  0c02 lsr r2, r0, #0x10
081de3ac  2600 mov r6, #0x0
081de3ae  7222 strb r2, [r4, #0x8]
081de3b0  491b ldr r1, [$081de420] (=$0842fae8)
081de3b2  1e50 sub r0, r2, #0x1
081de3b4  0040 lsl r0, r0, #0x01
081de3b6  1840 add r0, r0, r1
081de3b8  8805 ldrh r5, [r0, #0x0]
081de3ba  6125 str r5, [r4, #0x10]
081de3bc  20c6 mov r0, #0xc6
081de3be  00c0 lsl r0, r0, #0x03
081de3c0  1c29 add r1, r5, #0x0
081de3c2  f002 bl $081e0868
081de3c6  72e0 strb r0, [r4, #0xb]
081de3c8  4816 ldr r0, [$081de424] (=$00091d1b)
081de3ca  4368 mul r0, r5
081de3cc  4916 ldr r1, [$081de428] (=$00001388)
081de3ce  1840 add r0, r0, r1
081de3d0  4916 ldr r1, [$081de42c] (=$00002710)
081de3d2  f002 bl $081e0868
081de3d6  1c01 add r1, r0, #0x0
081de3d8  6161 str r1, [r4, #0x14]
081de3da  2080 mov r0, #0x80
081de3dc  0440 lsl r0, r0, #0x11
081de3de  f002 bl $081e0868
081de3e2  3001 add r0, #0x1
081de3e4  1040 asr r0, r0, #0x01
081de3e6  61a0 str r0, [r4, #0x18]
081de3e8  4811 ldr r0, [$081de430] (=$04000102)
081de3ea  8006 strh r6, [r0, #0x0]
081de3ec  4c11 ldr r4, [$081de434] (=$04000100)
081de3ee  4812 ldr r0, [$081de438] (=$00044940)
081de3f0  1c29 add r1, r5, #0x0
All those "+00" could be easily skipped to remove unuseful complexity, for example. Pointer dereferencing is not a very good idea as well. Oh, and brackets could help too.
Reply With Quote