Function at 0x499440
Capabilities:
Capture screenshot

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb8
mov eax, dword [0x62bcc0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
mov dword [ebp - 0xa8], ebx
test esi, esi
jne 0x499478
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ff23c
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [esi]
mov ecx, esi
push edi
call dword [eax + 0x14]
mov dword [ebp - 0x9c], eax
mov ecx, ebx
lea eax, [ebp - 0x2c]
push eax
push esi
call fcn.00499300
mov edi, eax
mov dword [ebp - 0xa0], edi
test edi, edi
mov edi, dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 0
je 0x49950b
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
push 0x58
push esi
call edi
push 0x5a
push esi
mov dword [ebp - 0x9c], eax
call edi
push esi
push 0
mov edi, eax
call dword [sym.imp.USER32.dll_ReleaseDC]
movsx ecx, word [ebp - 0x24]
movsx eax, word [ebp - 0x20]
movzx ebx, word [ebp - 0x1e]
sub eax, ecx
imul eax, edi
mov esi, ebx
shr esi, 1
movsx ecx, word [ebp - 0x26]
add eax, esi
cdq
idiv ebx
mov edi, eax
movsx eax, word [ebp - 0x22]
sub eax, ecx
imul eax, dword [ebp - 0x9c]
add eax, esi
cdq
idiv ebx
mov ebx, dword [ebp - 0xa8]
mov ecx, eax
mov eax, dword [ebp - 0xa0]
jmp 0x49956d
mov eax, dword [esi]
mov ecx, esi
push dword [ebp - 0x9c]
call dword [eax + 0x10]
lea eax, [ebp - 0x98]
mov ecx, ebx
push eax
push esi
call fcn.00499230
mov dword [ebp - 0xa0], eax
test eax, eax
jne 0x499555
movq xmm0, qword [str.corrupted_WMF]
movq qword [ebx + 0x44], xmm0
mov eax, dword [0x5ace38]
mov dword [ebx + 0x4c], eax
mov ax, word [0x5ace3c]
mov word [ebx + 0x50], ax
jmp 0x4998a6
mov edi, dword [ebp - 0x84]
mov ecx, dword [ebp - 0x88]
sub edi, dword [ebp - 0x8c]
sub ecx, dword [ebp - 0x90]
cmp dword [ebx + 0x148], 0xffffffff
jne 0x4995c9
push eax
mov dword [ebx + 0xc], ecx
mov dword [ebx + 0x10], edi
mov dword [ebx + 0x40], 0xa
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
movups xmm0, xmmword [str.output_dimensions_returned]
pop edi
pop esi
movups xmmword [ebx + 0x44], xmm0
movq xmm0, qword [0x5ac99c]
movq qword [ebx + 0x54], xmm0
mov ax, word [0x5ac9a4]
mov word [ebx + 0x5c], ax
mov al, byte [0x5ac9a6]
mov byte [ebx + 0x5e], al
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ff23c
mov esp, ebp
pop ebp
ret 0xc
test ecx, ecx
je 0x499888
test edi, edi
je 0x499888
mov eax, dword [ebp + 0xc]
test eax, eax
cmovne ecx, eax
mov eax, dword [ebp + 0x10]
test eax, eax
mov dword [ebp - 0xa8], ecx
mov ecx, ebx
cmovne edi, eax
lea eax, [ebp - 0xac]
push eax
lea eax, [ebp - 0xa8]
mov dword [ebp - 0xac], edi
push eax
call fcn.00499900
push 0
call dword [sym.imp.USER32.dll_GetDC]
push dword [ebp - 0xac]
mov esi, eax
push dword [ebp - 0xa8]
push esi
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push esi
mov dword [ebp - 0xa4], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push esi
mov edi, eax
push 0
mov dword [ebp - 0x9c], edi
call dword [sym.imp.USER32.dll_ReleaseDC]
test edi, edi
je 0x499868
mov esi, dword [ebp - 0xa4]
test esi, esi
je 0x499852
mov eax, dword [ebp - 0xa8]
push 0xc
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xac]
push edi
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 8], eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push esi
push edi
mov dword [ebp - 0xb8], eax
call dword [sym.imp.GDI32.dll_SelectObject]
push 5
mov dword [ebp - 0xb4], eax
call dword [sym.imp.USER32.dll_GetSysColor]
push eax
push edi
mov edi, dword [sym.imp.GDI32.dll_SetBkColor]
call edi
push 0
push 0
push 0
mov esi, eax
lea eax, [ebp - 0x14]
push eax
push 2
push 0
push 0
push dword [ebp - 0x9c]
call dword [sym.imp.GDI32.dll_ExtTextOutA]
push esi
mov esi, dword [ebp - 0x9c]
push esi
call edi
mov edi, dword [ebp - 0xa0]
push 0
push 0
push edi
call dword [sym.imp.GDI32.dll_GetEnhMetaFilePaletteEntries]
mov dword [ebp - 0xb0], eax
test eax, eax
je 0x49978c
lea ecx, [eax*4 + 4]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0xa0], eax
test eax, eax
jne 0x49973d
push dword [ebp - 0xa4]
call dword [sym.imp.GDI32.dll_DeleteObject]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
push edi
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
movq xmm0, qword [str.Cancelled]
movq qword [ebx + 0x44], xmm0
mov ax, word [0x5ac9b0]
jmp 0x4998a2
mov ecx, 0x300
mov word [eax], cx
mov ecx, dword [ebp - 0xb0]
mov word [eax + 2], cx
add eax, 4
push eax
push ecx
push edi
call dword [sym.imp.GDI32.dll_GetEnhMetaFilePaletteEntries]
push dword [ebp - 0xa0]
call dword [sym.imp.GDI32.dll_CreatePalette]
push dword [ebp - 0xa0]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0
push esi
mov esi, dword [ebp - 0x9c]
push esi
call dword [sym.imp.GDI32.dll_SelectPalette]
push esi
call dword [sym.imp.GDI32.dll_RealizePalette]
lea eax, [ebp - 0x14]
push eax
push edi
push esi
call dword [sym.imp.GDI32.dll_PlayEnhMetaFile]
push dword [ebp - 0xb4]
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
push edi
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
cmp dword [ebx + 0x148], 0
je 0x4997cd
push dword [ebp - 0xa4]
call dword [sym.imp.GDI32.dll_DeleteObject]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
jmp 0x499725
mov edi, dword [ebp - 0xac]
mov ecx, ebx
push 0xa
push dword [ebp - 0xb8]
push edi
push dword [ebp - 0xa8]
call fcn.00488f20
test eax, eax
jne 0x499805
push dword [ebp - 0xa4]
call dword [sym.imp.GDI32.dll_DeleteObject]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
jmp 0x4998a6
push 0
push dword [ebx + 4]
mov ecx, ebx
push 0
call fcn.004892b0
mov ebx, dword [ebp - 0xa4]
push eax
push edi
push 0
push ebx
push esi
call dword [sym.imp.GDI32.dll_GetDIBits]
push ebx
mov esi, eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push dword [ebp - 0x9c]
call dword [sym.imp.GDI32.dll_DeleteDC]
pop edi
test esi, esi
pop esi
setne al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ff23c
mov esp, ebp
pop ebp
ret 0xc
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov edi, dword [ebp - 0xa0]
push edi
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
jmp 0x4998a6
mov eax, dword [ebp - 0xa4]
test eax, eax
je 0x499879
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov edi, dword [ebp - 0xa0]
push edi
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
jmp 0x4998a6
push eax
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
movq xmm0, qword [str.empty_WMF]
movq qword [ebx + 0x44], xmm0
mov ax, word [0x5ace48]
mov word [ebx + 0x4c], ax
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004ff23c
mov esp, ebp
pop ebp
ret 0xc