Function at 0x51b920
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x158
mov eax, dword [0x601694]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0
je 0x51b966
mov eax, dword [ebp + 0xc]
movsx ecx, byte [eax + 0x6055e4]
test ecx, ecx
je 0x51ba8a
mov edx, dword [str.text_plain]
push edx
mov eax, dword [ebp + 0x10]
push eax
call fcn.0056d7b0
add esp, 8
test eax, eax
jne 0x51ba8a
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx*4 + 0x6055cc]
mov dword [ebp - 0x9c], edx
cmp dword [ebp - 0x9c], 0
jne 0x51b98e
mov dword [0x5ffa38], 0
jmp 0x51c58a
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax*4 + 0x6055d4]
add ecx, 1
push ecx
call fcn.0055e782
add esp, 4
mov dword [ebp - 0x120], eax
mov edx, dword [ebp - 0x120]
mov dword [0x5ffa38], edx
mov eax, dword [0x5ffa38]
mov dword [ebp - 0xb4], eax
mov ecx, dword [ebp - 0x9c]
movsx edx, byte [ecx]
test edx, edx
je 0x51ba2c
mov eax, dword [ebp - 0x9c]
movsx ecx, byte [eax]
cmp ecx, 0xd
jne 0x51b9fc
mov edx, dword [ebp - 0x9c]
movsx eax, byte [edx + 1]
cmp eax, 0xa
jne 0x51b9fc
mov ecx, dword [ebp - 0x9c]
add ecx, 1
mov dword [ebp - 0x9c], ecx
jmp 0x51ba2a
mov edx, dword [ebp - 0xb4]
mov eax, dword [ebp - 0x9c]
mov cl, byte [eax]
mov byte [edx], cl
mov edx, dword [ebp - 0xb4]
add edx, 1
mov dword [ebp - 0xb4], edx
mov eax, dword [ebp - 0x9c]
add eax, 1
mov dword [ebp - 0x9c], eax
jmp 0x51b9c1
mov ecx, dword [ebp - 0xb4]
mov byte [ecx], 0
mov edx, dword [ebp - 0xb4]
sub edx, dword [0x5ffa38]
mov dword [0x605648], edx
mov eax, dword [str.text_plain]
mov dword [0x5ffa3c], eax
push 0x11
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 8]
call eax
mov ecx, dword [0x5ffa38]
mov dword [ebp - 0x154], ecx
mov edx, dword [ebp - 0x154]
push edx
call fcn.0055d77b
add esp, 4
mov dword [0x5ffa38], 0
jmp 0x51c58a
cmp dword [ebp + 0xc], 0
je 0x51c58a
push 0
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
jne 0x51baa5
jmp 0x51c58a
mov eax, dword [str.text_plain]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.0056d7b0
add esp, 8
test eax, eax
jne 0x51bc5b
push 0xd
call dword [sym.imp.USER32.dll_GetClipboardData]
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0
je 0x51bc56
mov edx, dword [ebp - 0x98]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x110], eax
mov eax, dword [ebp - 0x110]
push eax
call fcn.0056ee29
add esp, 4
mov dword [ebp - 0xc0], eax
mov ecx, dword [ebp - 0xc0]
lea edx, [ecx*4 + 1]
push edx
call fcn.0055e782
add esp, 4
mov dword [ebp - 0x118], eax
mov eax, dword [ebp - 0x118]
mov dword [0x5ffa38], eax
mov ecx, dword [ebp - 0xc0]
push ecx
mov edx, dword [ebp - 0x110]
push edx
mov eax, dword [ebp - 0xc0]
shl eax, 2
push eax
mov ecx, dword [0x5ffa38]
push ecx
call fcn.00535ef0
add esp, 0x10
mov dword [ebp - 0x11c], eax
mov edx, dword [0x5ffa38]
add edx, dword [ebp - 0x11c]
mov byte [edx], 0
mov eax, dword [ebp - 0x98]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, dword [0x5ffa38]
mov dword [ebp - 0xac], ecx
mov edx, dword [ebp - 0xac]
mov dword [ebp - 0xa0], edx
mov eax, dword [ebp - 0xa0]
movsx ecx, byte [eax]
test ecx, ecx
je 0x51bbfd
mov edx, dword [ebp - 0xa0]
movsx eax, byte [edx]
cmp eax, 0xd
jne 0x51bbcd
mov ecx, 1
shl ecx, 0
mov edx, dword [ebp - 0xa0]
movsx eax, byte [edx + ecx]
cmp eax, 0xa
jne 0x51bbcd
mov ecx, dword [ebp - 0xa0]
add ecx, 1
mov dword [ebp - 0xa0], ecx
jmp 0x51bbfb
mov edx, dword [ebp - 0xac]
mov eax, dword [ebp - 0xa0]
mov cl, byte [eax]
mov byte [edx], cl
mov edx, dword [ebp - 0xac]
add edx, 1
mov dword [ebp - 0xac], edx
mov eax, dword [ebp - 0xa0]
add eax, 1
mov dword [ebp - 0xa0], eax
jmp 0x51bb8a
mov ecx, dword [ebp - 0xac]
mov byte [ecx], 0
mov edx, dword [ebp - 0xac]
sub edx, dword [0x5ffa38]
mov dword [0x605648], edx
mov eax, dword [str.text_plain]
mov dword [0x5ffa3c], eax
push 0x11
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 8]
call eax
mov ecx, dword [0x5ffa38]
mov dword [ebp - 0x13c], ecx
mov edx, dword [ebp - 0x13c]
push edx
call fcn.0055d77b
add esp, 4
mov dword [0x5ffa38], 0
jmp 0x51c584
mov eax, dword [str.image]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.0056d7b0
add esp, 8
test eax, eax
jne 0x51c584
mov dword [ebp - 0xb0], 0
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x8c], 0
mov dword [ebp - 0xa8], 0
push 8
call dword [sym.imp.USER32.dll_GetClipboardData]
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0
je 0x51c14c
mov edx, dword [ebp - 0x98]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x88]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x84], ecx
mov edx, dword [ebp - 0x88]
mov eax, dword [edx + 8]
mov dword [ebp - 0x8c], eax
mov ecx, dword [ebp - 0x88]
movzx edx, word [ecx + 0xe]
cmp edx, 0x18
je 0x51bd0b
mov eax, dword [ebp - 0x88]
movzx ecx, word [eax + 0xe]
cmp ecx, 0x20
jne 0x51bf20
mov edx, dword [ebp - 0x88]
cmp dword [edx + 0x10], 0
jne 0x51bf20
mov eax, dword [ebp - 0x88]
cmp dword [eax + 0x20], 0
jne 0x51bf20
mov ecx, dword [ebp - 0x88]
movzx eax, word [ecx + 0xe]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ebp - 0xa8], eax
cmp dword [ebp - 0xa8], 3
jne 0x51bd6b
imul eax, dword [ebp - 0x84], 3
add eax, 3
cdq
and edx, 3
add eax, edx
sar eax, 2
shl eax, 2
mov dword [ebp - 0x114], eax
jmp 0x51bd7a
mov edx, dword [ebp - 0x84]
shl edx, 2
mov dword [ebp - 0x114], edx
mov eax, dword [ebp - 0x84]
imul eax, dword [ebp - 0x8c]
imul eax, dword [ebp - 0xa8]
push eax
call fcn.0055e782
add esp, 4
mov dword [ebp - 0x124], eax
mov ecx, dword [ebp - 0x124]
mov dword [ebp - 0xb0], ecx
mov edx, dword [ebp - 0xb0]
mov dword [ebp - 0x94], edx
mov eax, dword [ebp - 0x8c]
sub eax, 1
mov dword [ebp - 0xb8], eax
jmp 0x51bdd5
mov ecx, dword [ebp - 0xb8]
sub ecx, 1
mov dword [ebp - 0xb8], ecx
cmp dword [ebp - 0xb8], 0
jl 0x51bf1b
mov edx, dword [ebp - 0xb8]
imul edx, dword [ebp - 0x114]
mov eax, dword [ebp - 0x88]
lea ecx, [eax + edx + 0x28]
mov dword [ebp - 0x90], ecx
mov dword [ebp - 0xc4], 0
jmp 0x51be1a
mov edx, dword [ebp - 0xc4]
add edx, 1
mov dword [ebp - 0xc4], edx
mov eax, dword [ebp - 0xc4]
cmp eax, dword [ebp - 0x84]
jge 0x51bf16
mov ecx, dword [ebp - 0x90]
mov dl, byte [ecx]
mov byte [ebp - 0xa2], dl
mov eax, dword [ebp - 0x90]
add eax, 1
mov dword [ebp - 0x90], eax
mov ecx, dword [ebp - 0x90]
mov dl, byte [ecx]
mov byte [ebp - 0xa1], dl
mov eax, dword [ebp - 0x90]
add eax, 1
mov dword [ebp - 0x90], eax
mov ecx, dword [ebp - 0x90]
mov dl, byte [ecx]
mov byte [ebp - 0xa3], dl
mov eax, dword [ebp - 0x90]
add eax, 1
mov dword [ebp - 0x90], eax
mov ecx, dword [ebp - 0x94]
mov dl, byte [ebp - 0xa3]
mov byte [ecx], dl
mov eax, dword [ebp - 0x94]
add eax, 1
mov dword [ebp - 0x94], eax
mov ecx, dword [ebp - 0x94]
mov dl, byte [ebp - 0xa1]
mov byte [ecx], dl
mov eax, dword [ebp - 0x94]
add eax, 1
mov dword [ebp - 0x94], eax
mov ecx, dword [ebp - 0x94]
mov dl, byte [ebp - 0xa2]
mov byte [ecx], dl
mov eax, dword [ebp - 0x94]
add eax, 1
mov dword [ebp - 0x94], eax
cmp dword [ebp - 0xa8], 4
jne 0x51bf11
mov ecx, dword [ebp - 0x94]
mov edx, dword [ebp - 0x90]
mov al, byte [edx]
mov byte [ecx], al
mov ecx, dword [ebp - 0x94]
add ecx, 1
mov dword [ebp - 0x94], ecx
mov edx, dword [ebp - 0x90]
add edx, 1
mov dword [ebp - 0x90], edx
jmp 0x51be0b
jmp 0x51bdc6
jmp 0x51c13a
mov eax, dword [ebp - 0x88]
add eax, 0x28
mov dword [ebp - 0xc8], eax
mov ecx, dword [ebp - 0x88]
cmp dword [ecx + 0x10], 3
jne 0x51bf4c
mov edx, dword [ebp - 0x88]
add edx, 0x34
mov dword [ebp - 0xc8], edx
jmp 0x51bf71
mov eax, dword [ebp - 0x88]
cmp dword [eax + 0x20], 0
jbe 0x51bf71
mov ecx, dword [ebp - 0x88]
mov edx, dword [ecx + 0x20]
mov eax, dword [ebp - 0x88]
lea ecx, [eax + edx*4 + 0x28]
mov dword [ebp - 0xc8], ecx
cmp dword [0x6055f8], 0
je 0x51bf88
mov edx, dword [0x6055f8]
mov dword [ebp - 0xdc], edx
jmp 0x51bf98
push 0
call fcn.0051fc30
add esp, 4
mov dword [ebp - 0xdc], eax
mov eax, dword [ebp - 0x8c]
push eax
mov ecx, dword [ebp - 0x84]
push ecx
mov edx, dword [ebp - 0xdc]
push edx
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov dword [ebp - 0xcc], eax
mov eax, dword [0x6055f8]
mov dword [ebp - 0x130], eax
mov ecx, dword [0x6055f4]
mov dword [ebp - 0x12c], ecx
cmp dword [0x606514], 0
je 0x51bfe7
mov edx, dword [0x606514]
mov dword [ebp - 0xe0], edx
jmp 0x51bff2
call fcn.0052a850
mov dword [ebp - 0xe0], eax
mov eax, dword [ebp - 0xe0]
mov dword [ebp - 0xe8], eax
call fcn.0052a8c0
mov dword [ebp - 0xe4], eax
mov ecx, dword [ebp - 0xe4]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0xe4]
mov eax, dword [edx + 8]
call eax
mov ecx, dword [ebp - 0xcc]
push ecx
call fcn.00538c30
add esp, 4
mov dword [0x6055f8], eax
mov edx, dword [0x6055f8]
push edx
call dword [sym.imp.GDI32.dll_SaveDC]
mov dword [ebp - 0x128], eax
mov eax, dword [ebp - 0xcc]
mov dword [0x6055f4], eax
mov ecx, dword [0x606518]
mov edx, dword [ecx]
mov ecx, dword [0x606518]
mov eax, dword [edx + 0xbc]
call eax
push 0
mov ecx, dword [ebp - 0x88]
push ecx
mov edx, dword [ebp - 0xc8]
push edx
mov eax, dword [ebp - 0x8c]
push eax
push 0
push 0
push 0
mov ecx, dword [ebp - 0x8c]
push ecx
mov edx, dword [ebp - 0x84]
push edx
push 0
push 0
mov eax, dword [0x6055f8]
push eax
call dword [sym.imp.GDI32.dll_SetDIBitsToDevice]
push 0
mov ecx, dword [ebp - 0x8c]
push ecx
mov edx, dword [ebp - 0x84]
push edx
push 0
push 0
push 0
call fcn.0053d7a0
add esp, 0x18
mov dword [ebp - 0xb0], eax
mov dword [ebp - 0xa8], 3
mov eax, dword [0x606518]
mov edx, dword [eax]
mov ecx, dword [0x606518]
mov eax, dword [edx + 0xc0]
call eax
mov ecx, dword [ebp - 0x128]
push ecx
mov edx, dword [0x6055f8]
push edx
call dword [sym.imp.GDI32.dll_RestoreDC]
mov eax, dword [0x6055f8]
push eax
call dword [sym.imp.GDI32.dll_DeleteDC]
mov ecx, dword [ebp - 0xe8]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0xe8]
mov eax, dword [edx + 8]
call eax
mov ecx, dword [ebp - 0x12c]
mov dword [0x6055f4], ecx
mov edx, dword [ebp - 0x130]
mov dword [0x6055f8], edx
mov eax, dword [ebp - 0xcc]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [ebp - 0x98]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
jmp 0x51c479
push 0xe
call dword [sym.imp.USER32.dll_GetClipboardData]
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0
je 0x51c479
lea edx, [ebp - 0x80]
push edx
push 0x6c
mov eax, dword [ebp - 0x98]
push eax
call dword [sym.imp.GDI32.dll_GetEnhMetaFileHeader]
mov ecx, dword [ebp - 0x60]
sub ecx, dword [ebp - 0x68]
add ecx, 1
mov dword [ebp - 0x84], ecx
mov edx, dword [ebp - 0x5c]
sub edx, dword [ebp - 0x64]
add edx, 1
mov dword [ebp - 0x8c], edx
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 0xbc], eax
push 4
mov eax, dword [ebp - 0xbc]
push eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov dword [ebp - 0x138], eax
push 8
mov ecx, dword [ebp - 0xbc]
push ecx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov dword [ebp - 0xec], eax
push 0x76
mov edx, dword [ebp - 0xbc]
push edx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov dword [ebp - 0x134], eax
mov eax, dword [ebp - 0xbc]
push eax
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
cvtsi2ss xmm0, dword [ebp - 0x134]
cvtsi2ss xmm1, dword [ebp - 0xec]
divss xmm0, xmm1
movss dword [ebp - 0xf0], xmm0
cvtsi2ss xmm0, dword [ebp - 0x138]
mulss xmm0, dword [0x5dfec8]
cvtsi2ss xmm1, dword [ebp - 0xec]
divss xmm0, xmm1
movss dword [ebp - 0xf4], xmm0
cvtsi2ss xmm0, dword [ebp - 0x84]
mulss xmm0, dword [ebp - 0xf0]
divss xmm0, dword [ebp - 0xf4]
cvttss2si ecx, xmm0
mov dword [ebp - 0x84], ecx
cvtsi2ss xmm0, dword [ebp - 0x8c]
mulss xmm0, dword [ebp - 0xf0]
divss xmm0, dword [ebp - 0xf4]
cvttss2si edx, xmm0
mov dword [ebp - 0x8c], edx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x84]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x8c]
mov dword [ebp - 8], ecx
cmp dword [0x6055f8], 0
je 0x51c2af
mov edx, dword [0x6055f8]
mov dword [ebp - 0xf8], edx
jmp 0x51c2bf
push 0
call fcn.0051fc30
add esp, 4
mov dword [ebp - 0xf8], eax
mov eax, dword [ebp - 0x8c]
push eax
mov ecx, dword [ebp - 0x84]
push ecx
mov edx, dword [ebp - 0xf8]
push edx
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov dword [ebp - 0xd0], eax
mov eax, dword [0x6055f8]
mov dword [ebp - 0x144], eax
mov ecx, dword [0x6055f4]
mov dword [ebp - 0x140], ecx
cmp dword [0x606514], 0
je 0x51c30e
mov edx, dword [0x606514]
mov dword [ebp - 0xfc], edx
jmp 0x51c319
call fcn.0052a850
mov dword [ebp - 0xfc], eax
mov eax, dword [ebp - 0xfc]
mov dword [ebp - 0x104], eax
call fcn.0052a8c0
mov dword [ebp - 0x100], eax
mov ecx, dword [ebp - 0x100]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x100]
mov eax, dword [edx + 8]
call eax
mov ecx, dword [ebp - 0xd0]
push ecx
call fcn.00538c30
add esp, 4
mov dword [0x6055f8], eax
mov edx, dword [0x6055f8]
push edx
call dword [sym.imp.GDI32.dll_SaveDC]
mov dword [ebp - 0x158], eax
mov eax, dword [ebp - 0xd0]
mov dword [0x6055f4], eax
mov ecx, dword [0x606518]
mov edx, dword [ecx]
mov ecx, dword [0x606518]
mov eax, dword [edx + 0xbc]
call eax
push 0xff
mov ecx, dword [0x606518]
mov edx, dword [ecx]
mov ecx, dword [0x606518]
mov eax, dword [edx + 0x50]
call eax
mov ecx, dword [ebp - 0x8c]
push ecx
mov edx, dword [ebp - 0x84]
push edx
push 0
push 0
mov eax, dword [0x606518]
mov edx, dword [eax]
mov ecx, dword [0x606518]
mov eax, dword [edx + 0xc]
call eax
lea ecx, [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x98]
push edx
mov eax, dword [0x6055f8]
push eax
call dword [sym.imp.GDI32.dll_PlayEnhMetaFile]
push 0
mov ecx, dword [ebp - 0x8c]
push ecx
mov edx, dword [ebp - 0x84]
push edx
push 0
push 0
push 0
call fcn.0053d7a0
add esp, 0x18
mov dword [ebp - 0xb0], eax
mov dword [ebp - 0xa8], 3
mov eax, dword [0x606518]
mov edx, dword [eax]
mov ecx, dword [0x606518]
mov eax, dword [edx + 0xc0]
call eax
mov ecx, dword [ebp - 0x158]
push ecx
mov edx, dword [0x6055f8]
push edx
call dword [sym.imp.GDI32.dll_RestoreDC]
mov eax, dword [0x6055f8]
push eax
call dword [sym.imp.GDI32.dll_DeleteDC]
mov ecx, dword [ebp - 0x104]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x104]
mov eax, dword [edx + 8]
call eax
mov ecx, dword [ebp - 0x140]
mov dword [0x6055f4], ecx
mov edx, dword [ebp - 0x144]
mov dword [0x6055f8], edx
mov eax, dword [ebp - 0xd0]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
cmp dword [ebp - 0xb0], 0
je 0x51c584
push 0x2c
call fcn.0055d73a
add esp, 4
mov dword [ebp - 0x108], eax
cmp dword [ebp - 0x108], 0
je 0x51c4d0
push 0
mov ecx, dword [ebp - 0xa8]
push ecx
mov edx, dword [ebp - 0x8c]
push edx
mov eax, dword [ebp - 0x84]
push eax
mov ecx, dword [ebp - 0xb0]
push ecx
mov ecx, dword [ebp - 0x108]
call fcn.00530b70
mov dword [ebp - 0x10c], eax
jmp 0x51c4da
mov dword [ebp - 0x10c], 0
mov edx, dword [ebp - 0x10c]
mov dword [ebp - 0xd4], edx
mov eax, dword [ebp - 0xd4]
mov dword [eax + 0x20], 1
mov ecx, dword [ebp - 0xd4]
mov dword [0x60564c], ecx
mov edx, dword [str.image]
mov dword [0x5ffa3c], edx
push 0x11
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 8]
call eax
mov dword [ebp - 0x148], eax
mov dword [0x5ffa3c], 0x5dfa96
cmp dword [ebp - 0x148], 0
jne 0x51c584
mov dword [0x60564c], 0
mov ecx, dword [ebp - 0xd4]
mov dword [ebp - 0x14c], ecx
mov edx, dword [ebp - 0x14c]
mov dword [ebp - 0xd8], edx
cmp dword [ebp - 0xd8], 0
je 0x51c57a
push 1
mov eax, dword [ebp - 0xd8]
mov edx, dword [eax]
mov ecx, dword [ebp - 0xd8]
mov eax, dword [edx]
call eax
mov dword [ebp - 0x150], eax
jmp 0x51c584
mov dword [ebp - 0x150], 0
call dword [sym.imp.USER32.dll_CloseClipboard]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055e98a
mov esp, ebp
pop ebp
ret