Jump to content
Tuts 4 You

TMG fade bitmap problem


r0ger

Recommended Posts

Hi all

i was working on a crack template now and adding the fade bitmaps effect in the dialog. the thing is when i try to modify its width (adding greater than 122h), the template crashes. but when i normalize it to 122h (which was one of TMG's old bitmap's width value), the effect works without problems but the bmp isn't really complete.

                        
                                  xor     ebx,ebx
                                  invoke LoadBitmap,hInstance,201
                                  mov     dword_401EB0, eax
                                  mov     LogoHeight, 7Ah
                                  jmp     short loc_401AFD

                  loc_401AFD:                             ; CODE XREF: sub_4018D3+20Fj
                                  push    [ebp+hDlg]      ; hWnd
                                  call    GetDC
                                  push    eax             ; HDC
                                  mov     [ebp+arg_8], eax
                                  call    CreateCompatibleDC
                                  push    dword_401EB0    ; HGDIOBJ
                                  mov     hDC, eax
                                  push    eax             ; HDC
                                  call    SelectObject
                                  mov     eax, LogoHeight
                                  imul    eax, 366h
                                  mov     edi, 1000h
                                  push    40h             ; flProtect
                                  push    edi             ; flAllocationType
                                  push    eax             ; dwSize
                                  push    ebx             ; lpAddress
                                  mov     LogoWidth, 123h ; <-- here's the problem here...with the f**king width.
                                  call    VirtualAlloc
                                  mov     lpAddress, eax
                                  mov     eax, LogoWidth
                                  imul    eax, LogoHeight
                                  push    40h             ; flProtect
                                  push    edi             ; flAllocationType
                                  lea     eax, [eax+eax*2]
                                  push    eax             ; dwSize
                                  push    ebx             ; lpAddress
                                  call    VirtualAlloc

any suggestions ?

oopsies.zip

Edited by r0ger
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...