[64bit 코드]        

        var nop = 0xdaba0000;
        var ab_map_obj = [
                nop,nop,
                0x1f000008,0x000900c0,0x082003ff,0x0,
                nop,nop,   // use ut32.prototype replace it
                nop,nop,0x0,0x0
        ]

[32bit 코드]

        var nop = 0xdaba0000;
        var ab_map_obj = [
                nop,0x3d000008 0x000900c3 0x082003ff
                nop,nop,   // use ut32.prototype replace it
                0x0,nop
        ]

 

[안되는 코드]

gef➤  x/32wx 0x4eba2fe0
0x4eba2fe0: 0x3c4d4fd1 0x3c4d4fd1 0x3c4d4fd1 0x00004000
0x4eba2ff0: 0x12345678 0x00000004 0x00000000 0x00000000
0x4eba3000: 0x9999999a 0x3ff19999 0x9999999a 0x3ff19999

gef➤  x/32wx 0x3c4d4fd0
0x3c4d4fd0: 0xdaba0000 0x3d000008 0x000900c3 0x082003ff
0x3c4d4fe0: 0x3608f2d1 0x3608f299 0x00000000 0x00000000
0x3c4d4ff0: 0x9999999a 0x3ff19999 0x9999999a 0x3ff19999

[정상]

gef➤  x/32wx 0x4150818c
0x4150818c: 0x43f065c9 0x4c684125 0x4c684125 0x00000018
0x4150819c: 0x565f07a0 0x00000004 0x00000000 0x00000000
0x415081ac: 0x43f064c1 0x4c684125 0x4c684125 0x4150818d
gef➤  x/32wx 0x43f065c8
0x43f065c8: 0x5f28412d 0x3d000008 0x000900c3 0x082003ff
0x43f065d8: 0x3ed0f2d1 0x3ed0f299 0x00000000 0x4c68411d
0x43f065e8: 0x4c684125 0x4c684125 0x00000000 0x5f28412d

 

 

[디버깅용 코드]

var buffer = new ArrayBuffer(12);
var dataView = new DataView(buffer);
print(buffer);
%DebugPrint(buffer);
print("ok");

 

gef➤  b *fprintf
Breakpoint 1 at 0xf5f4d2b0
gef➤  r --allow_natives_syntax test.js

 

 

 

 

 

Posted by goldpapa
,