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

Disassembly:
mov eax, 0x4e2fd8
call fcn.004bb144
sub esp, 0x68
push ebx
push esi
mov esi, ecx
push edi
cmp dword [esi + 0x6c], 0
je 0x40d4dd
mov eax, dword [0x52d2c4]
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x10]
mov ebx, dword [esi + 0x14]
and dword [ebp - 4], 0
cmp eax, ebx
jge 0x40d0a0
mov ebx, eax
mov ecx, dword [esi + 0x14]
cmp eax, ecx
mov dword [ebp - 0x14], ecx
jl 0x40d0ad
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
dec eax
je 0x40d3ec
dec eax
je 0x40d0c6
dec eax
je 0x40d3ec
jmp 0x40d4d1
mov eax, dword [ebp + 8]
push dword [eax + 0x1c]
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x40d4d1
push 1
call dword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
je 0x40d4d1
push 1
call dword [sym.imp.USER32.dll_GetClipboardData]
test eax, eax
mov dword [ebp - 0x18], eax
je 0x40d4cb
push eax
call dword [sym.imp.KERNEL32.DLL_GlobalLock]
mov edi, eax
test edi, edi
mov dword [ebp - 0x20], edi
je 0x40d4cb
push 0x531e00
lea ecx, [ebp + 0xc]
call fcn.004d8436
and dword [ebp - 0x1c], 0
push edi
mov byte [ebp - 4], 2
call fcn.004bd360
test eax, eax
pop ecx
jle 0x40d14d
push 0x511ef4
lea ecx, [ebp + 0xc]
call fcn.004d87a4
inc dword [ebp - 0x1c]
push edi
call fcn.004bd360
cmp dword [ebp - 0x1c], eax
pop ecx
jl 0x40d131
mov eax, dword [esi + 0xc]
cmp dword [ebp - 0x14], 0xffffffff
lea edi, [esi + 0xc]
mov eax, dword [eax - 8]
jle 0x40d1db
sub eax, dword [ebp - 0x14]
mov ecx, edi
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.004d23bc
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x2c]
push ebx
push eax
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.004d2438
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 4
push ecx
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.004d85f7
push dword [ebp - 0x1c]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.004d85f7
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 6
call fcn.004d8501
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 5
call fcn.004d83c8
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 4
call fcn.004d83c8
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call fcn.004d83c8
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x30]
jmp 0x40d257
sub eax, ebx
mov ecx, edi
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.004d23bc
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x3c]
push ebx
push eax
mov ecx, edi
mov byte [ebp - 4], 7
call fcn.004d2438
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 8
push ecx
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.004d85f7
push dword [ebp - 0x1c]
mov byte [ebp - 4], 9
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.004d85f7
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0xa
call fcn.004d8501
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 9
call fcn.004d83c8
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 8
call fcn.004d83c8
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 7
call fcn.004d83c8
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x40]
call fcn.004d83c8
lea eax, [ebp - 0x10]
mov ecx, edi
push eax
call fcn.004d8501
mov eax, dword [esi + 8]
cmp dword [ebp - 0x14], 0xffffffff
lea edi, [esi + 8]
mov eax, dword [eax - 8]
jle 0x40d2f4
sub eax, dword [ebp - 0x14]
mov ecx, edi
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.004d23bc
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x4c]
push ebx
push eax
mov ecx, edi
mov byte [ebp - 4], 0xb
call fcn.004d2438
push dword [ebp - 0x20]
mov byte [ebp - 4], 0xc
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.004d865d
push dword [ebp - 0x1c]
mov byte [ebp - 4], 0xd
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.004d85f7
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0xe
call fcn.004d8501
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 0xd
call fcn.004d83c8
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 0xc
call fcn.004d83c8
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 0xb
call fcn.004d83c8
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x50]
jmp 0x40d36f
sub eax, ebx
mov ecx, edi
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.004d23bc
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x5c]
push ebx
push eax
mov ecx, edi
mov byte [ebp - 4], 0xf
call fcn.004d2438
push dword [ebp - 0x20]
mov byte [ebp - 4], 0x10
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.004d865d
push dword [ebp - 0x1c]
mov byte [ebp - 4], 0x11
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.004d85f7
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0x12
call fcn.004d8501
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 0x11
call fcn.004d83c8
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0x10
call fcn.004d83c8
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 0xf
call fcn.004d83c8
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x60]
call fcn.004d83c8
lea eax, [ebp - 0x10]
mov ecx, edi
push eax
call fcn.004d8501
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.004bd360
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.004484d8
and byte [ebp - 4], 0
lea ecx, [ebp + 0xc]
call fcn.004d83c8
jmp 0x40d4cb
mov eax, dword [ebp + 8]
push dword [eax + 0x1c]
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x40d4d1
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.004d2326
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.004d8501
and byte [ebp - 4], 0
lea ecx, [ebp - 0x64]
call fcn.004d83c8
inc edi
push edi
push 2
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
test eax, eax
mov dword [ebp - 0x18], eax
je 0x40d4cb
push eax
call dword [sym.imp.KERNEL32.DLL_GlobalLock]
mov edi, eax
test edi, edi
je 0x40d4cb
push dword [ebp - 0x20]
lea ecx, [ebp - 0x10]
push 0
call fcn.004d87f8
push eax
push edi
call fcn.004bb730
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 0x40d4cb
push dword [ebp - 0x20]
lea ecx, [esi + 8]
push ebx
call fcn.004d200f
push dword [ebp - 0x20]
lea ecx, [esi + 0xc]
push ebx
call fcn.004d200f
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.004484d8
call dword [sym.imp.USER32.dll_CloseClipboard]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.004d83c8
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8