Function at 0x40cfe8
Capabilities:
Open clipboard
Read clipboard data
Write clipboard data

Disassembly:
mov eax, 0x4dfe3c
call fcn.004b8e80
sub esp, 0x68
push ebx
push esi
mov esi, ecx
push edi
cmp dword [esi + 0x6c], 0
je 0x40d459
mov eax, dword [0x52933c]
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x10]
mov ebx, dword [esi + 0x14]
and dword [ebp - 4], 0
cmp eax, ebx
jge 0x40d01c
mov ebx, eax
mov ecx, dword [esi + 0x14]
cmp eax, ecx
mov dword [ebp - 0x14], ecx
jl 0x40d029
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
dec eax
je 0x40d368
dec eax
je 0x40d042
dec eax
je 0x40d368
jmp 0x40d44d
mov eax, dword [ebp + 8]
push dword [eax + 0x1c]
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x40d44d
push 1
call dword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
je 0x40d44d
push 1
call dword [sym.imp.USER32.dll_GetClipboardData]
test eax, eax
mov dword [ebp - 0x18], eax
je 0x40d447
push eax
call dword [sym.imp.KERNEL32.DLL_GlobalLock]
mov edi, eax
test edi, edi
mov dword [ebp - 0x20], edi
je 0x40d447
push 0x52be40
lea ecx, [ebp + 0xc]
call fcn.004d520a
and dword [ebp - 0x1c], 0
push edi
mov byte [ebp - 4], 2
call fcn.004baf40
test eax, eax
pop ecx
jle 0x40d0c9
push 0x50eef4
lea ecx, [ebp + 0xc]
call fcn.004d5578
inc dword [ebp - 0x1c]
push edi
call fcn.004baf40
cmp dword [ebp - 0x1c], eax
pop ecx
jl 0x40d0ad
mov eax, dword [esi + 0xc]
cmp dword [ebp - 0x14], 0xffffffff
lea edi, [esi + 0xc]
mov eax, dword [eax - 8]
jle 0x40d157
sub eax, dword [ebp - 0x14]
mov ecx, edi
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.004cf1ac
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x2c]
push ebx
push eax
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.004cf228
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 4
push ecx
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.004d53cb
push dword [ebp - 0x1c]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.004d53cb
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 6
call fcn.004d52d5
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 5
call fcn.004d519c
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 4
call fcn.004d519c
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call fcn.004d519c
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x30]
jmp 0x40d1d3
sub eax, ebx
mov ecx, edi
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.004cf1ac
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x3c]
push ebx
push eax
mov ecx, edi
mov byte [ebp - 4], 7
call fcn.004cf228
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 8
push ecx
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.004d53cb
push dword [ebp - 0x1c]
mov byte [ebp - 4], 9
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.004d53cb
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0xa
call fcn.004d52d5
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 9
call fcn.004d519c
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 8
call fcn.004d519c
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 7
call fcn.004d519c
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x40]
call fcn.004d519c
lea eax, [ebp - 0x10]
mov ecx, edi
push eax
call fcn.004d52d5
mov eax, dword [esi + 8]
cmp dword [ebp - 0x14], 0xffffffff
lea edi, [esi + 8]
mov eax, dword [eax - 8]
jle 0x40d270
sub eax, dword [ebp - 0x14]
mov ecx, edi
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.004cf1ac
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x4c]
push ebx
push eax
mov ecx, edi
mov byte [ebp - 4], 0xb
call fcn.004cf228
push dword [ebp - 0x20]
mov byte [ebp - 4], 0xc
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.004d5431
push dword [ebp - 0x1c]
mov byte [ebp - 4], 0xd
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.004d53cb
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0xe
call fcn.004d52d5
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 0xd
call fcn.004d519c
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 0xc
call fcn.004d519c
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 0xb
call fcn.004d519c
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x50]
jmp 0x40d2eb
sub eax, ebx
mov ecx, edi
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.004cf1ac
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x5c]
push ebx
push eax
mov ecx, edi
mov byte [ebp - 4], 0xf
call fcn.004cf228
push dword [ebp - 0x20]
mov byte [ebp - 4], 0x10
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.004d5431
push dword [ebp - 0x1c]
mov byte [ebp - 4], 0x11
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.004d53cb
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0x12
call fcn.004d52d5
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 0x11
call fcn.004d519c
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0x10
call fcn.004d519c
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 0xf
call fcn.004d519c
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x60]
call fcn.004d519c
lea eax, [ebp - 0x10]
mov ecx, edi
push eax
call fcn.004d52d5
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_GlobalUnlock]
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x74]
push eax
push dword [edi + 0x1c]
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esi + 0x38]
push 1
mov dword [ebp - 0x74], eax
mov eax, dword [esi + 0x3c]
mov dword [ebp - 0x70], eax
mov eax, dword [esi + 0x44]
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x74]
push eax
push dword [edi + 0x1c]
call dword [sym.imp.USER32.dll_InvalidateRect]
push dword [ebp - 0x20]
call fcn.004baf40
pop ecx
add ebx, eax
push dword [esi + 4]
mov ecx, edi
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x1c], 7
call fcn.00446a0f
and byte [ebp - 4], 0
lea ecx, [ebp + 0xc]
call fcn.004d519c
jmp 0x40d447
mov eax, dword [ebp + 8]
push dword [eax + 0x1c]
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x40d44d
call dword [sym.imp.USER32.dll_EmptyClipboard]
mov edi, dword [ebp - 0x14]
lea eax, [ebp - 0x64]
sub edi, ebx
lea ecx, [esi + 8]
push edi
push ebx
push eax
mov dword [ebp - 0x20], edi
call fcn.004cf116
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.004d52d5
and byte [ebp - 4], 0
lea ecx, [ebp - 0x64]
call fcn.004d519c
inc edi
push edi
push 2
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
test eax, eax
mov dword [ebp - 0x18], eax
je 0x40d447
push eax
call dword [sym.imp.KERNEL32.DLL_GlobalLock]
mov edi, eax
test edi, edi
je 0x40d447
push dword [ebp - 0x20]
lea ecx, [ebp - 0x10]
push 0
call fcn.004d55cc
push eax
push edi
call fcn.004b9460
mov eax, dword [ebp - 0x14]
add esp, 0xc
sub edi, ebx
push dword [ebp - 0x18]
and byte [edi + eax], 0
call dword [sym.imp.KERNEL32.DLL_GlobalUnlock]
push dword [ebp - 0x18]
push 1
call dword [sym.imp.USER32.dll_SetClipboardData]
cmp dword [ebp + 0xc], 3
jne 0x40d447
push dword [ebp - 0x20]
lea ecx, [esi + 8]
push ebx
call fcn.004cedff
push dword [ebp - 0x20]
lea ecx, [esi + 0xc]
push ebx
call fcn.004cedff
mov edi, dword [ebp + 8]
lea eax, [esi + 0x38]
push 1
push eax
push dword [edi + 0x1c]
call dword [sym.imp.USER32.dll_InvalidateRect]
push dword [esi + 4]
mov ecx, edi
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], ebx
call fcn.00446a0f
call dword [sym.imp.USER32.dll_CloseClipboard]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.004d519c
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8