blabberer
September 26th, 2013, 00:07
hi zai ,
you posted ollydbg cant directly understand 
i just opened calc.exe  (xpsp3 )
assembled a call dword [xxxx] in some arbitrary location
at xxxxxx i place address of user32!MessageBoxW 
ollydbg easily recognizes it even without reanalyzing 
if you ask ollydbg to assume commands and dwords 
it resolves it with arguments too 
no analysis just inserted the call and data 
Code:
01013D71                      FF15 793D0101   CALL    NEAR DWORD PTR DS:[1013D79]                 ;  USER32.MessageBoxW
01013D77                      00              DB      00
01013D78                      00              DB      00
01013D79                      34 65           XOR     AL, 65
01013D7B                      46              INC     ESI
01013D7C                      7E 00           JLE     SHORT calc.01013D7E
added assumes ( rightclick -> analysis -> during next analysis treat selection as command on 71 and   as doubleword on 79 ) and reanalyzed
Code:
01013D71                   .  FF15 793D0101   CALL    NEAR DWORD PTR DS:[1013D79]                 ; \MessageBoxW
01013D77                   .  0000            ADD     BYTE PTR DS:[EAX], AL
01013D79                   .  3465467E        DD      USER32.MessageBoxW
is that not the behaviour you find ? or didn't i understand the statement ?
edit i butchered the icztute msgbox to call hardcoded address and loaded it in windbg 
windbg can resolve the names too it seems
Code:
F:\masm32\icztutes\tute02>cdb butch_msgbox.exe
Microsoft (R) Windows Debugger Version 6.12.0002.633 X86
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine: butch_msgbox.exe
ntdll!DbgBreakPoint:
7c90120e cc              int     3
0:000> bp 401000
0:000> g
Breakpoint 0 hit
msgbox!start:
00401000 6a00            push    0
0:000> u
msgbox!start:
00401000 6a00            push    0
00401002 6800304000      push    offset msgbox!MsgCaption (00403000)
00401007 6819304000      push    offset msgbox!MsgBoxText (00403019)
0040100c 6a00            push    0
0040100e ff152f104000    call    dword ptr [msgbox!ExitProcess+0xf (0040102f)]
00401014 6a00            push    0
00401016 ff1533104000    call    dword ptr [msgbox!ExitProcess+0x13 (00401033)]
0040101c 0000            add     byte ptr [eax],al
0:000> ln poi(40102f)
(7e4507ea)   user32!MessageBoxA   |  (7e450838)   user32!MessageBoxExW
Exact matches:
    user32!MessageBoxA = <no type information>
0:000> ln poi(401033)
(7c81cb12)   KERNEL32!ExitProcess   |  (7c81cb30)   KERNEL32!LdrShutdownProcess
Exact matches:
    KERNEL32!ExitProcess = <no type information>
0:000>