Function at 0x539ce0
Capabilities:
Capture screenshot

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe8
mov dword [ebp - 0xe8], ecx
cmp dword [ebp + 8], 0
jne 0x539cfc
xor al, al
jmp 0x53a1fd
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
call eax
mov dword [ebp - 0x34], eax
lea ecx, [ebp - 0x20]
push ecx
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 0xe8]
call fcn.0053a2c0
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x539da5
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 0x24], eax
push 0x58
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov dword [ebp - 0x38], eax
push 0x5a
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp - 0x24]
push edx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
movzx eax, word [ebp - 0x12]
cdq
sub eax, edx
sar eax, 1
movsx ecx, word [ebp - 0x16]
movsx edx, word [ebp - 0x1a]
sub ecx, edx
imul ecx, dword [ebp - 0x38]
add eax, ecx
movzx ecx, word [ebp - 0x12]
cdq
idiv ecx
mov dword [ebp - 4], eax
movzx eax, word [ebp - 0x12]
cdq
sub eax, edx
sar eax, 1
movsx edx, word [ebp - 0x14]
movsx ecx, word [ebp - 0x18]
sub edx, ecx
imul edx, dword [ebp - 0x3c]
add eax, edx
movzx ecx, word [ebp - 0x12]
cdq
idiv ecx
mov dword [ebp - 0x2c], eax
jmp 0x539e13
push 0
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
call eax
lea ecx, [ebp - 0xb0]
push ecx
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 0xe8]
call fcn.0053a4c0
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jne 0x539df5
push str.corrupted_WMF
mov eax, dword [ebp - 0xe8]
add eax, 0x44
push eax
call fcn.00594ca0
add esp, 8
xor al, al
jmp 0x53a1fd
mov ecx, dword [ebp - 0xa0]
sub ecx, dword [ebp - 0xa8]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0x9c]
sub edx, dword [ebp - 0xa4]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0xe8]
cmp dword [eax + 0x148], 0xffffffff
jne 0x539e6f
mov ecx, dword [ebp - 0xe8]
mov edx, dword [ebp - 4]
mov dword [ecx + 0xc], edx
mov eax, dword [ebp - 0xe8]
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 0x10], ecx
mov edx, dword [ebp - 0xe8]
mov dword [edx + 0x40], 0xa
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
push str.output_dimensions_returned
mov ecx, dword [ebp - 0xe8]
add ecx, 0x44
push ecx
call fcn.00594ca0
add esp, 8
mov al, 1
jmp 0x53a1fd
cmp dword [ebp - 4], 0
je 0x539e7b
cmp dword [ebp - 0x2c], 0
jne 0x539ea3
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
push str.empty_WMF
mov eax, dword [ebp - 0xe8]
add eax, 0x44
push eax
call fcn.00594ca0
add esp, 8
xor al, al
jmp 0x53a1fd
cmp dword [ebp + 0xc], 0
je 0x539eaf
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
cmp dword [ebp + 0x10], 0
je 0x539ebb
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x2c], edx
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 4]
push ecx
mov ecx, dword [ebp - 0xe8]
call fcn.0053a620
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 8], eax
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov dword [ebp - 0x28], eax
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 8]
push eax
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
cmp dword [ebp - 0x24], 0
je 0x53a1e1
cmp dword [ebp - 0x28], 0
je 0x53a1d5
mov dword [ebp - 0xc4], 0
mov dword [ebp - 0xc0], 0
mov ecx, dword [ebp - 4]
mov dword [ebp - 0xbc], ecx
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0xb8], edx
push 0xc
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov dword [ebp - 0xc8], eax
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [ebp - 0xd4], eax
push 5
call dword [sym.imp.USER32.dll_GetSysColor]
mov dword [ebp - 0xd0], eax
mov eax, dword [ebp - 0xd0]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.GDI32.dll_SetBkColor]
mov dword [ebp - 0xb4], eax
push 0
push 0
push 0
lea edx, [ebp - 0xc4]
push edx
push 2
push 0
push 0
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.GDI32.dll_ExtTextOutW]
mov ecx, dword [ebp - 0xb4]
push ecx
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.GDI32.dll_SetBkColor]
push 0
push 0
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.GDI32.dll_GetEnhMetaFilePaletteEntries]
mov dword [ebp - 0xdc], eax
cmp dword [ebp - 0xdc], 0
je 0x53a0cb
mov ecx, dword [ebp - 0xdc]
lea edx, [ecx*4 + 4]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0xe0], eax
cmp dword [ebp - 0xe0], 0
jne 0x53a03c
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.GDI32.dll_DeleteDC]
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
push str.Cancelled
mov eax, dword [ebp - 0xe8]
add eax, 0x44
push eax
call fcn.00594ca0
add esp, 8
xor al, al
jmp 0x53a1fd
mov ecx, 0x300
mov edx, dword [ebp - 0xe0]
mov word [edx], cx
mov eax, dword [ebp - 0xe0]
mov cx, word [ebp - 0xdc]
mov word [eax + 2], cx
mov edx, dword [ebp - 0xe0]
mov dword [ebp - 0xe4], edx
mov eax, dword [ebp - 0xe4]
add eax, 4
mov dword [ebp - 0xe4], eax
mov ecx, dword [ebp - 0xe4]
push ecx
mov edx, dword [ebp - 0xdc]
push edx
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.GDI32.dll_GetEnhMetaFilePaletteEntries]
mov ecx, dword [ebp - 0xe0]
push ecx
call dword [sym.imp.GDI32.dll_CreatePalette]
mov dword [ebp - 0xcc], eax
mov edx, dword [ebp - 0xe0]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0
mov eax, dword [ebp - 0xcc]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.GDI32.dll_SelectPalette]
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.GDI32.dll_RealizePalette]
lea eax, [ebp - 0xc4]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.GDI32.dll_PlayEnhMetaFile]
mov dword [ebp - 0xd8], eax
mov eax, dword [ebp - 0xd4]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
mov eax, dword [ebp - 0xe8]
cmp dword [eax + 0x148], 0
je 0x53a142
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.GDI32.dll_DeleteDC]
push str.Cancelled
mov eax, dword [ebp - 0xe8]
add eax, 0x44
push eax
call fcn.00594ca0
add esp, 8
xor al, al
jmp 0x53a1fd
push 0xa
mov ecx, dword [ebp - 0xc8]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0xe8]
call fcn.0050dc90
test eax, eax
jne 0x53a17d
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.GDI32.dll_DeleteDC]
xor al, al
jmp 0x53a1fd
push 0
mov eax, dword [ebp - 0xe8]
mov ecx, dword [eax + 4]
push ecx
push 0
mov ecx, dword [ebp - 0xe8]
call fcn.0050ded0
push eax
mov edx, dword [ebp - 0x2c]
push edx
push 0
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.GDI32.dll_GetDIBits]
mov dword [ebp - 0xd8], eax
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.GDI32.dll_DeleteDC]
xor eax, eax
cmp dword [ebp - 0xd8], 0
setne al
jmp 0x53a1fd
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.GDI32.dll_DeleteDC]
jmp 0x53a1f1
cmp dword [ebp - 0x28], 0
je 0x53a1f1
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
xor al, al
mov esp, ebp
pop ebp
ret 0xc