Function at 0x511ff4
Capabilities:
Capture screenshot

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff84
push ebx
push esi
push edi
mov edi, edx
mov ebx, eax
mov eax, dword [ebx + 0x30]
test eax, eax
je 0x5120c2
movzx edx, byte [eax + 0x240]
mov byte [ebp - 0xd], dl
mov byte [eax + 0x240], 0
mov esi, dword [edi + 4]
push esi
call sub.gdi32.dll_SaveDC
mov dword [ebp - 0x1c], eax
lea edx, [ebp - 0x15]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x40]
lea eax, [ebp - 0x15]
push eax
mov eax, dword [ebx + 0x30]
call fcn.0045d110
push eax
call sub.user32.dll_ScreenToClient
neg dword [ebp - 0x15]
mov eax, dword [ebp - 0x11]
neg eax
mov dword [ebp - 0x11], eax
mov ecx, eax
mov edx, dword [ebp - 0x15]
mov eax, esi
call fcn.00453614
push 0
push esi
push 0x14
mov eax, dword [ebx + 0x30]
call fcn.0045d110
push eax
call sub.user32.dll_SendMessageA
push 0
push esi
push 0xf
mov eax, dword [ebx + 0x30]
call fcn.0045d110
push eax
call sub.user32.dll_SendMessageA
mov eax, dword [ebx + 0x30]
mov edx, dword [0x50abd4]
call fcn.00404a90
test al, al
je 0x5120ab
mov eax, dword [ebx + 0x30]
mov edx, dword [0x50abd4]
call fcn.00404ab4
xor ecx, ecx
mov edx, esi
call fcn.005122e8
mov eax, dword [ebp - 0x1c]
push eax
push esi
call sub.gdi32.dll_RestoreDC
mov eax, dword [ebx + 0x30]
movzx edx, byte [ebp - 0xd]
mov byte [eax + 0x240], dl
cmp byte [ebx + 0x240], 0
je 0x5120d1
cmp dword [edi + 4], 0
je 0x5120fe
test byte [ebx + 0x55], 1
jne 0x5120f0
mov eax, ebx
call fcn.00459044
test eax, eax
jne 0x5120f0
mov edx, edi
mov eax, ebx
call fcn.0045f24c
jmp 0x51220e
mov edx, edi
mov eax, ebx
call fcn.0045a808
jmp 0x51220e
push 0
call sub.user32.dll_GetDC
mov esi, eax
lea edx, [ebp - 0x6c]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x44]
mov eax, dword [ebp - 0x60]
push eax
lea edx, [ebp - 0x7c]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x44]
mov eax, dword [ebp - 0x74]
push eax
push esi
call sub.gdi32.dll_CreateCompatibleBitmap
mov dword [ebp - 8], eax
push esi
push 0
call sub.user32.dll_ReleaseDC
push 0
call sub.gdi32.dll_CreateCompatibleDC
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.gdi32.dll_SelectObject
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x512207
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x5c]
push eax
mov eax, ebx
call fcn.0045d110
push eax
call sub.user32.dll_BeginPaint
mov esi, eax
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 4]
mov edx, 0x14
mov eax, ebx
call fcn.00456318
mov eax, dword [ebp - 4]
mov dword [edi + 4], eax
mov edx, edi
mov eax, ebx
call fcn.00511ff4
xor eax, eax
mov dword [edi + 4], eax
push 0xcc0020
push 0
push 0
mov eax, dword [ebp - 4]
push eax
lea edx, [ebp - 0x6c]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x44]
mov eax, dword [ebp - 0x60]
push eax
lea edx, [ebp - 0x7c]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x44]
mov eax, dword [ebp - 0x74]
push eax
push 0
push 0
push esi
call sub.gdi32.dll_BitBlt
lea eax, [ebp - 0x5c]
push eax
mov eax, ebx
call fcn.0045d110
push eax
call sub.user32.dll_EndPaint
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51220e
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.gdi32.dll_SelectObject
mov eax, dword [ebp - 4]
push eax
call sub.gdi32.dll_DeleteDC
mov eax, dword [ebp - 8]
push eax
call sub.gdi32.dll_DeleteObject
ret
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret