Function at 0x470584
Capabilities:
Capture screenshot

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
push esi
push edi
lea edi, [ebp - 0x34]
cmp dword [0x5a4780], 0
jne 0x4705a0
call fcn.00480458
jmp 0x4705a5
mov eax, dword [0x5a46b8]
test byte [eax + 0x2f1], 0x20
je 0x4705e3
call sub.user32.dll_GetForegroundWindow
mov dword [0x5a549c], eax
cmp dword [0x5a549c], 0
jne 0x4705cb
call sub.user32.dll_GetDesktopWindow
mov dword [0x5a549c], eax
push edi
mov eax, dword [0x5a549c]
push eax
call sub.user32.dll_GetWindowRect
xor eax, eax
mov dword [ebp - 8], eax
xor eax, eax
mov dword [ebp - 4], eax
jmp 0x470632
call sub.user32.dll_GetDesktopWindow
mov dword [0x5a549c], eax
call fcn.0045a864
mov edx, edi
call fcn.0045ea64
cmp dword [edi], 0xffffffff
jne 0x470610
cmp dword [edi + 4], 0xffffffff
jne 0x470610
cmp dword [edi + 8], 0xffffffff
jne 0x470610
cmp dword [edi + 0xc], 0xffffffff
je 0x47061b
mov eax, edi
call fcn.00468c70
test al, al
jne 0x470627
push edi
mov eax, dword [0x5a549c]
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 [0x5a549c]
push eax
call sub.user32.dll_GetWindowDC
mov dword [0x5a54a8], eax
mov eax, dword [0x5a54a8]
push eax
call sub.gdi32.dll_CreateCompatibleDC
mov dword [0x5a54ac], 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 [0x5a54b4], ecx
mov eax, dword [edi + 0xc]
sub eax, edx
mov dword [0x5a54b8], eax
cmp dword [0x5a54b4], 0
jne 0x470687
mov dword [0x5a54b4], 1
cmp dword [0x5a54b8], 0
jne 0x47069a
mov dword [0x5a54b8], 1
mov eax, dword [0x5a54b4]
shl eax, 3
add eax, 0x1f
and eax, 0xffffffe0
shr eax, 3
mov dword [0x5a5068], eax
mov eax, dword [0x5a54b8]
push eax
mov eax, dword [0x5a5068]
push eax
mov eax, dword [0x5a54a8]
push eax
call sub.gdi32.dll_CreateCompatibleBitmap
mov dword [0x5a54b0], eax
mov eax, dword [0x5a54b0]
push eax
mov eax, dword [0x5a54ac]
push eax
call sub.gdi32.dll_SelectObject
mov dword [ebp - 0x24], eax
xor eax, eax
push ebp
push 0x4708d2
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [0x5a5498], 0
xor eax, eax
mov dword [0x5a5494], eax
push 0x26
mov eax, dword [0x5a54a8]
push eax
call sub.gdi32.dll_GetDeviceCaps
test ah, 1
je 0x47077c
mov eax, 0x404
call fcn.0040b930
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 [0x5a54a8]
push eax
call sub.gdi32.dll_GetSystemPaletteEntries
mov ebx, eax
mov eax, dword [ebp - 0x1c]
mov word [eax + 2], bx
test bx, bx
je 0x470774
mov eax, dword [ebp - 0x1c]
push eax
call sub.gdi32.dll_CreatePalette
mov dword [0x5a5494], eax
push 0
mov eax, dword [0x5a5494]
push eax
mov eax, dword [0x5a54ac]
push eax
call sub.gdi32.dll_SelectPalette
mov byte [0x5a5498], 1
jmp 0x47077c
mov eax, dword [ebp - 0x1c]
call fcn.00402c24
push 0xcc0020
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [0x5a54a8]
push eax
mov eax, dword [0x5a54b8]
push eax
mov eax, dword [0x5a54b4]
push eax
push 0
push 0
mov eax, dword [0x5a54ac]
push eax
call sub.gdi32.dll_BitBlt
push edi
mov eax, dword [0x5a54a0]
push eax
call sub.user32.dll_GetWindowRect
test eax, eax
je 0x47082d
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 0x470826
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x20]
push eax
push edi
mov eax, dword [0x5a54ac]
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 [0x5a54ac]
push eax
call sub.user32.dll_FrameRect
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x47082d
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 [0x5a54a4]
push eax
call sub.user32.dll_GetIconInfo
xor eax, eax
push ebp
push 0x47088b
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 0x470892
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