Function at 0x405040
Capabilities:
Hide graphical window
Open clipboard
Write clipboard data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov dword [ebp - 0x38], ecx
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x2c]
or ecx, 2
mov edx, dword [ebp - 0x38]
mov dword [edx + 0x2c], ecx
mov eax, dword [ebp - 0x38]
xor ecx, ecx
cmp dword [eax + 0x58], 0
setne cl
test ecx, ecx
jne 0x40506d
jmp 0x4052f5
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0x58]
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0x4373f0
jmp 0x40508a
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
add edx, 0x10
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
cmp ecx, dword [ebp - 0xc]
je 0x4050a3
mov edx, dword [ebp - 8]
cmp dword [edx], 0
jne 0x4050a1
jmp 0x4052f5
jmp 0x40507f
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x10]
mov dword [eax], edx
mov eax, dword [ebp - 0x38]
mov dword [eax + 0x58], 0
mov ecx, dword [0x4373f0]
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0x10], 0
je 0x40510c
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 8]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
call fcn.0040c832
cmp eax, dword [ebp - 0x38]
jne 0x405101
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x14]
call dword [edx + 0x18]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x2c]
and ecx, 0xfffffffd
mov edx, dword [ebp - 0x14]
mov dword [edx + 0x2c], ecx
mov eax, dword [0x4373f0]
mov dword [ebp - 0x10], eax
jmp 0x40510a
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x10]
mov dword [ebp - 0x10], edx
jmp 0x4050c1
mov eax, dword [ebp - 0x38]
cmp eax, dword [0x437088]
jne 0x405156
call fcn.004041c0
mov dword [ebp - 0x18], eax
jmp 0x405130
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.004041ed
add esp, 4
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x40514d
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x2c]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x24]
and ecx, 0x40
test ecx, ecx
je 0x40514b
jmp 0x40514d
jmp 0x405121
mov edx, dword [ebp - 0x18]
mov dword [0x437088], edx
mov eax, dword [ebp - 0x38]
push eax
call fcn.0040475e
add esp, 4
push 0xf
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x38]
call dword [edx + 8]
call dword [sym.imp.USER32.dll_GetClipboardOwner]
mov ecx, dword [ebp - 0xc]
cmp eax, dword [ecx]
jne 0x4051ce
call fcn.004041c0
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x4051ce
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 0x58]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x4051a3
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx]
mov dword [ebp - 0x3c], edx
jmp 0x4051aa
mov dword [ebp - 0x3c], 0
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x4051ce
call dword [sym.imp.USER32.dll_EmptyClipboard]
push 0
push 1
call dword [sym.imp.USER32.dll_SetClipboardData]
call dword [sym.imp.USER32.dll_CloseClipboard]
push 0
push 0
push 0x8000
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx]
push edx
call dword [sym.imp.USER32.dll_PostMessageA]
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x18], 0
je 0x405201
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x18]
push edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
push ecx
call fcn.0040936e
add esp, 8
mov edx, dword [ebp - 0xc]
mov eax, dword [edx]
cmp eax, dword [0x437650]
jne 0x405241
cmp dword [0x43764c], 0
je 0x405241
mov ecx, dword [0x43764c]
push ecx
mov edx, dword [0x437650]
push edx
call fcn.0040936e
add esp, 8
mov dword [0x437650], 0xffffffff
mov dword [0x43764c], 0
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0xc], 0
je 0x40525d
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0xc]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx]
push edx
call dword [sym.imp.USER32.dll_GetParent]
cmp dword [ebp - 4], eax
jne 0x405291
push 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
push 8
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.USER32.dll_DestroyWindow]
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0x2c]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
and ecx, 0x60
test ecx, ecx
je 0x4052e3
call fcn.004041c0
test eax, eax
je 0x4052e3
call fcn.004041c0
xor edx, edx
cmp dword [eax + 0x58], 0
setne dl
mov dword [ebp - 0x34], edx
cmp dword [ebp - 0x34], 0
je 0x4052e3
call fcn.004041c0
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x40]
call dword [edx + 0x14]
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov esp, ebp
pop ebp
ret