Function at 0x411c60
Capabilities:
Capture screenshot

Disassembly:
sub esp, 0xac
push ebx
push ebp
push esi
mov esi, dword [esp + 0xbc]
push edi
mov edi, ecx
test esi, esi
je 0x412050
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x14]
lea ecx, [esp + 0x38]
mov ebp, eax
push ecx
push esi
mov ecx, edi
call fcn.004120b0
mov ebx, eax
test ebx, ebx
je 0x411d02
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
push 0x58
push esi
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 0x5a
push esi
mov ebp, eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push esi
push 0
mov dword [esp + 0x24], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
movsx edx, word [esp + 0x3e]
movsx eax, word [esp + 0x42]
mov ecx, dword [esp + 0x46]
sub eax, edx
imul eax, ebp
and ecx, 0xffff
mov esi, ecx
shr esi, 1
add eax, esi
cdq
idiv ecx
movsx edx, word [esp + 0x40]
mov ebp, eax
movsx eax, word [esp + 0x44]
sub eax, edx
mov dword [esp + 0x14], ebp
imul eax, dword [esp + 0x1c]
add eax, esi
cdq
idiv ecx
jmp 0x411d44
mov eax, dword [esi]
push 0
push ebp
mov ecx, esi
call dword [eax + 0x10]
lea ecx, [esp + 0x50]
push ecx
push esi
mov ecx, edi
call fcn.004121f0
mov ebx, eax
test ebx, ebx
jne 0x411d2c
lea edx, [edi + 0x44]
mov edi, str.corrupted_WMF
jmp 0x412033
mov ebp, dword [esp + 0x60]
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x5c]
sub ebp, edx
sub eax, ecx
mov dword [esp + 0x14], ebp
mov ecx, dword [edi + 0x148]
mov dword [esp + 0x10], eax
cmp ecx, 0xffffffff
jne 0x411d9b
push ebx
mov dword [edi + 0xc], ebp
mov dword [edi + 0x10], eax
mov dword [edi + 0x40], 0xa
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
lea edx, [edi + 0x44]
mov edi, str.output_dimensions_returned
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov al, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xac
ret 0xc
test ebp, ebp
je 0x412024
test eax, eax
je 0x412024
mov eax, dword [esp + 0xc4]
test eax, eax
je 0x411dba
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0xc8]
test eax, eax
je 0x411dc9
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push ecx
push edx
mov ecx, edi
call fcn.004122e0
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov ecx, dword [esp + 0x14]
mov ebp, eax
mov eax, dword [esp + 0x10]
push eax
push ecx
push ebp
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push ebp
mov dword [esp + 0x1c], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push ebp
push 0
mov esi, eax
call dword [sym.imp.USER32.dll_ReleaseDC]
test esi, esi
je 0x411fff
mov ebp, dword [esp + 0x18]
xor eax, eax
cmp ebp, eax
je 0x411fe2
mov edx, dword [esp + 0x14]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x10]
push 0xc
push esi
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push ebp
push esi
mov dword [esp + 0x2c], eax
call dword [sym.imp.GDI32.dll_SelectObject]
push 5
mov dword [esp + 0x24], eax
call dword [sym.imp.USER32.dll_GetSysColor]
mov ebp, dword [sym.imp.GDI32.dll_SetBkColor]
push eax
push esi
call ebp
push 0
push 0
lea ecx, [esp + 0x30]
push 0
push ecx
push 2
push 0
push 0
push esi
mov dword [esp + 0x3c], eax
call dword [sym.imp.GDI32.dll_ExtTextOutA]
mov edx, dword [esp + 0x1c]
push edx
push esi
call ebp
push 0
push 0
push ebx
call dword [sym.imp.GDI32.dll_GetEnhMetaFilePaletteEntries]
mov ebp, eax
test ebp, ebp
je 0x411f15
lea eax, [ebp*4 + 4]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x411ed7
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
push ebx
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
lea edx, [edi + 0x44]
mov edi, str.Cancelled
jmp 0x412033
mov word [eax], 0x300
mov word [eax + 2], bp
add eax, 4
push eax
push ebp
push ebx
call dword [sym.imp.GDI32.dll_GetEnhMetaFilePaletteEntries]
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.GDI32.dll_CreatePalette]
mov edx, dword [esp + 0x1c]
mov ebp, eax
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0
push ebp
push esi
call dword [sym.imp.GDI32.dll_SelectPalette]
push esi
call dword [sym.imp.GDI32.dll_RealizePalette]
lea eax, [esp + 0x28]
push eax
push ebx
push esi
call dword [sym.imp.GDI32.dll_PlayEnhMetaFile]
mov ecx, dword [esp + 0x20]
push ecx
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
push ebx
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
mov eax, dword [edi + 0x148]
test eax, eax
je 0x411f5e
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
lea edx, [edi + 0x44]
mov edi, str.Cancelled
jmp 0x412033
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
push 0xa
push ecx
push edx
push eax
mov ecx, edi
call fcn.00406f20
test eax, eax
jne 0x411f9b
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xac
ret 0xc
mov edx, dword [edi + 4]
push 0
push edx
push 0
mov ecx, edi
call fcn.004070d0
mov ebx, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0x1c]
push eax
push 0
push ebx
push esi
call dword [sym.imp.GDI32.dll_GetDIBits]
push ebx
mov edi, eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
xor eax, eax
test edi, edi
pop edi
pop esi
pop ebp
pop ebx
setne al
add esp, 0xac
ret 0xc
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
push ebx
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xac
ret 0xc
mov eax, dword [esp + 0x18]
test eax, eax
je 0x41200e
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push ebx
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xac
ret 0xc
push ebx
call dword [sym.imp.GDI32.dll_DeleteEnhMetaFile]
lea edx, [edi + 0x44]
mov edi, str.empty_WMF
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xac
ret 0xc