Tutorial :IDA(4.9) Is it possible to change definitions of imported functions?



Question:

Is it possible to change argument types/names of arguments of imported functions like StretchBlt in IDA 4.9? It's painful and error-prone to manually change from

  ...  .text:0040A49E                 push    eax             ; HDC  .text:0040A49F                 push    36h             ; int  .text:0040A4A1                 push    48h             ; int  .text:0040A4A3                 push    5Ah             ; int  .text:0040A4A5                 push    0               ; int  .text:0040A4A7                 push    ecx             ; HDC  .text:0040A4A8                 call    edi ; StretchBlt  

to

  ...  .text:0040A49E                 push    eax             ; HDC srcHDC  .text:0040A49F                 push    36h             ; int destHeight  .text:0040A4A1                 push    48h             ; int destWidth  .text:0040A4A3                 push    5Ah             ; int destY  .text:0040A4A5                 push    0               ; int destX  .text:0040A4A7                 push    ecx             ; HDC destHDC  .text:0040A4A8                 call    edi ; StretchBlt  

each time


Solution:1

Have you tried writing an .IDC script to search for that block of comment, then adjust the previous lines comments.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »