Function at 0x405130
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59ba08
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x704608]
xor eax, ebp
mov dword [ebp - 0x24], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], 0
push 0
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x40531d
call dword [sym.imp.USER32.dll_EmptyClipboard]
lea ecx, [ebp - 0x18]
call fcn.00427ef0
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
movzx edx, word [ecx]
test edx, edx
je 0x4051f4
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x14]
movzx edx, word [ecx]
push edx
call fcn.00404ed0
add esp, 8
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jg 0x4051b2
jmp 0x4051f4
mov eax, dword [ebp - 0x30]
mov byte [ebp + eax - 0x2c], 0
lea ecx, [ebp - 0x2c]
test ecx, ecx
jne 0x4051ca
mov dword [ebp - 0x54], 0
jmp 0x4051d9
lea edx, [ebp - 0x2c]
push edx
call fcn.00560b00
add esp, 4
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x54]
push eax
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x18]
call fcn.004260b0
mov edx, dword [ebp - 0x14]
add edx, 2
mov dword [ebp - 0x14], edx
jmp 0x40518a
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x58]
push ecx
call fcn.00560b00
add esp, 4
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x20]
add edx, 1
push edx
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x405277
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x405277
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x34]
push eax
call fcn.00560680
add esp, 0xc
mov ecx, dword [ebp - 0x34]
add ecx, dword [ebp - 0x20]
mov byte [ecx], 0
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [0x70667c]
push ecx
call dword [sym.imp.USER32.dll_SetClipboardData]
test eax, eax
je 0x405277
mov dword [ebp - 0x10], 1
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x38]
push eax
call fcn.00405340
add esp, 8
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x5c], ecx
mov edx, dword [ebp - 0x5c]
push edx
call fcn.005604bc
add esp, 4
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
lea ecx, [eax + eax + 2]
push ecx
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x405300
mov edx, dword [ebp - 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
je 0x405300
mov eax, dword [ebp - 0x40]
shl eax, 1
push eax
mov ecx, dword [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x44]
push edx
call fcn.00560680
add esp, 0xc
xor eax, eax
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x44]
mov word [edx + ecx*2], ax
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, dword [ebp - 0x3c]
push ecx
push 0xd
call dword [sym.imp.USER32.dll_SetClipboardData]
lea ecx, [ebp - 0x38]
call fcn.004287f0
call dword [sym.imp.USER32.dll_CloseClipboard]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.004287f0
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x24]
xor ecx, ebp
call fcn.0055fc29
mov esp, ebp
pop ebp
ret