Function at 0x46d970
Capabilities:
Capture screenshot

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
push esi
push edi
lea edi, [ebp - 0x34]
cmp dword [0x57d780], 0
jne 0x46d98c
call fcn.0047d840
jmp 0x46d991
mov eax, dword [0x57d6b8]
test byte [eax + 0x2f1], 0x20
je 0x46d9cf
call sub.user32.dll_GetForegroundWindow
mov dword [0x57e49c], eax
cmp dword [0x57e49c], 0
jne 0x46d9b7
call sub.user32.dll_GetDesktopWindow
mov dword [0x57e49c], eax
push edi
mov eax, dword [0x57e49c]
push eax
call sub.user32.dll_GetWindowRect
xor eax, eax
mov dword [ebp - 8], eax
xor eax, eax
mov dword [ebp - 4], eax
jmp 0x46da1e
call sub.user32.dll_GetDesktopWindow
mov dword [0x57e49c], eax
call fcn.00457e90
mov edx, edi
call fcn.0045be60
cmp dword [edi], 0xffffffff
jne 0x46d9fc
cmp dword [edi + 4], 0xffffffff
jne 0x46d9fc
cmp dword [edi + 8], 0xffffffff
jne 0x46d9fc
cmp dword [edi + 0xc], 0xffffffff
je 0x46da07
mov eax, edi
call fcn.0046605c
test al, al
jne 0x46da13
push edi
mov eax, dword [0x57e49c]
push eax
call sub.user32.dll_GetWindowRect
mov eax, dword [edi]
mov dword [ebp - 8], eax
mov eax, dword [edi + 4]
mov dword [ebp - 4], eax
mov eax, dword [0x57e49c]
push eax
call sub.user32.dll_GetWindowDC
mov dword [0x57e4a8], eax
mov eax, dword [0x57e4a8]
push eax
call sub.gdi32.dll_CreateCompatibleDC
mov dword [0x57e4ac], eax
mov eax, dword [edi]
mov dword [ebp - 0x10], eax
mov edx, dword [edi + 4]
mov esi, edx
mov dword [ebp - 0xc], esi
mov ecx, dword [edi + 8]
sub ecx, eax
mov dword [0x57e4b4], ecx
mov eax, dword [edi + 0xc]
sub eax, edx
mov dword [0x57e4b8], eax
cmp dword [0x57e4b4], 0
jne 0x46da73
mov dword [0x57e4b4], 1
cmp dword [0x57e4b8], 0
jne 0x46da86
mov dword [0x57e4b8], 1
mov eax, dword [0x57e4b4]
shl eax, 3
add eax, 0x1f
and eax, 0xffffffe0
shr eax, 3
mov dword [0x57e068], eax
mov eax, dword [0x57e4b8]
push eax
mov eax, dword [0x57e068]
push eax
mov eax, dword [0x57e4a8]
push eax
call sub.gdi32.dll_CreateCompatibleBitmap
mov dword [0x57e4b0], eax
mov eax, dword [0x57e4b0]
push eax
mov eax, dword [0x57e4ac]
push eax
call sub.gdi32.dll_SelectObject
mov dword [ebp - 0x24], eax
xor eax, eax
push ebp
push 0x46dcbe
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [0x57e498], 0
xor eax, eax
mov dword [0x57e494], eax
push 0x26
mov eax, dword [0x57e4a8]
push eax
call sub.gdi32.dll_GetDeviceCaps
test ah, 1
je 0x46db68
mov eax, 0x404
call fcn.0040b9fc
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov word [eax], 0x300
mov eax, dword [ebp - 0x1c]
add eax, 4
push eax
push pe_nt_image_headers32
push 0
mov eax, dword [0x57e4a8]
push eax
call sub.gdi32.dll_GetSystemPaletteEntries
mov ebx, eax
mov eax, dword [ebp - 0x1c]
mov word [eax + 2], bx
test bx, bx
je 0x46db60
mov eax, dword [ebp - 0x1c]
push eax
call sub.gdi32.dll_CreatePalette
mov dword [0x57e494], eax
push 0
mov eax, dword [0x57e494]
push eax
mov eax, dword [0x57e4ac]
push eax
call sub.gdi32.dll_SelectPalette
mov byte [0x57e498], 1
jmp 0x46db68
mov eax, dword [ebp - 0x1c]
call fcn.00402c04
push 0xcc0020
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [0x57e4a8]
push eax
mov eax, dword [0x57e4b8]
push eax
mov eax, dword [0x57e4b4]
push eax
push 0
push 0
mov eax, dword [0x57e4ac]
push eax
call sub.gdi32.dll_BitBlt
push edi
mov eax, dword [0x57e4a0]
push eax
call sub.user32.dll_GetWindowRect
test eax, eax
je 0x46dc19
neg esi
push esi
mov eax, dword [ebp - 0x10]
neg eax
push eax
push edi
call sub.user32.dll_OffsetRect
push 0xff
call sub.gdi32.dll_CreateSolidBrush
mov dword [ebp - 0x20], eax
xor eax, eax
push ebp
push 0x46dc12
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x20]
push eax
push edi
mov eax, dword [0x57e4ac]
push eax
call sub.user32.dll_FrameRect
inc dword [edi]
inc dword [edi + 4]
dec dword [edi + 8]
dec dword [edi + 0xc]
mov eax, dword [ebp - 0x20]
push eax
push edi
mov eax, dword [0x57e4ac]
push eax
call sub.user32.dll_FrameRect
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x46dc19
mov eax, dword [ebp - 0x20]
push eax
call sub.gdi32.dll_DeleteObject
ret
lea eax, [ebp - 0x18]
push eax
call sub.user32.dll_GetCursorPos
mov eax, dword [ebp - 0x10]
sub dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
sub dword [ebp - 0x14], eax
lea eax, [ebp - 0x48]
push eax
mov eax, dword [0x57e4a4]
push eax
call sub.user32.dll_GetIconInfo
xor eax, eax
push ebp
push 0x46dc77
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x44]
sub dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x40]
sub dword [ebp - 0x14], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x46dc7e
mov eax, dword [ebp - 0x3c]
push eax
call sub.gdi32.dll_DeleteObject
mov eax, dword [ebp - 0x38]
push eax
call sub.gdi32.dll_DeleteObject
ret