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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x418af3
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
mov eax, dword [0x425140]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x405751
push 0xd
mov byte [ebp - 4], 1
call dword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
jne 0x4053b1
push 0
xorps xmm0, xmm0
mov dword [ebp - 0x1c], 0
push 0x41ff68
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], 0
movups xmmword [ebp - 0x2c], xmm0
call fcn.004051a0
jmp 0x405447
push 0xd
call dword [sym.imp.USER32.dll_GetClipboardData]
mov edi, eax
test edi, edi
je 0x405388
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edx, eax
mov dword [ebp - 0x54], 0
xorps xmm0, xmm0
mov dword [ebp - 0x50], 7
xor eax, eax
movups xmmword [ebp - 0x64], xmm0
mov word [ebp - 0x64], ax
mov byte [ebp - 4], 2
test edx, edx
je 0x405435
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4053f0
sub ecx, esi
sar ecx, 1
cmp ecx, 7
ja 0x405421
lea esi, [ecx + ecx]
mov dword [ebp - 0x54], ecx
push esi
push edx
lea eax, [ebp - 0x64]
push eax
call fcn.0040d1b0
add esp, 0xc
xor eax, eax
mov word [ebp + esi - 0x64], ax
jmp 0x40542e
push edx
push dword [ebp - 0x48]
push ecx
lea ecx, [ebp - 0x64]
call fcn.00407bb0
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
movups xmm0, xmmword [ebp - 0x64]
movups xmmword [ebp - 0x2c], xmm0
movq xmm0, qword [ebp - 0x54]
movq qword [ebp - 0x1c], xmm0
push 0x427d50
mov byte [ebp - 4], 3
call fcn.0040b095
mov esi, dword [ebp - 0x1c]
add esp, 4
test esi, esi
je 0x4054a1
cmp dword [0x427d4c], 7
lea edi, [ebp - 0x2c]
mov edx, 0x427d38
cmova edx, dword [0x427d38]
cmp dword [ebp - 0x18], 7
cmova edi, dword [ebp - 0x2c]
cmp esi, dword [0x427d48]
jne 0x4054eb
test esi, esi
je 0x4054a1
sub edi, edx
nop dword [eax + eax]
mov cx, word [edx + edi]
cmp cx, word [edx]
jne 0x4054eb
add edx, 2
sub esi, 1
jne 0x405490
mov esi, dword [ebp - 0x2c]
push 0x427d50
call fcn.0040b0b1
mov eax, dword [ebp - 0x18]
add esp, 4
cmp eax, 7
jbe 0x40572f
lea ecx, [eax*2 + 2]
mov eax, esi
cmp ecx, 0x1000
jb 0x405725
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40576c
jmp 0x405725
push 0x427d50
call fcn.0040b0b1
add esp, 4
lea eax, [ebp - 0x2c]
lea ecx, [ebp - 0x44]
push eax
call fcn.00406e10
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 4
call fcn.00404b10
cmp dword [ebp - 0x18], 7
lea edx, [ebp - 0x2c]
mov ecx, dword [ebp - 0x44]
lea edi, [ebp - 0x44]
cmova edx, dword [ebp - 0x2c]
cmp dword [ebp - 0x30], 7
mov esi, dword [ebp - 0x34]
cmova edi, ecx
cmp esi, dword [ebp - 0x1c]
jne 0x405556
test esi, esi
je 0x405639
sub edi, edx
nop word [eax + eax]
mov cx, word [edx + edi]
cmp cx, word [edx]
jne 0x405556
add edx, 2
sub esi, 1
jne 0x405540
jmp 0x405636
call dword [sym.imp.USER32.dll_EmptyClipboard]
mov eax, dword [ebp - 0x34]
lea eax, [eax*2 + 2]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x405771
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edx, eax
test edx, edx
je 0x40578c
cmp dword [ebp - 0x30], 7
lea ecx, [ebp - 0x44]
mov eax, dword [ebp - 0x34]
cmova ecx, dword [ebp - 0x44]
inc eax
push ecx
push eax
push edx
call fcn.0040edd7
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
push 0xd
call dword [sym.imp.USER32.dll_SetClipboardData]
xorps xmm0, xmm0
movlpd qword [ebp - 0x4c], xmm0
push 0x427d50
mov dword [ebp - 0x4c], 0x427d50
call fcn.0040b087
add esp, 4
mov byte [ebp - 0x48], 1
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x44]
cmp dword [ebp - 0x30], 7
mov edi, dword [ebp - 0x34]
cmova ecx, dword [ebp - 0x44]
mov eax, dword [0x427d4c]
cmp edi, eax
ja 0x40561a
cmp eax, 7
mov dword [0x427d48], edi
lea eax, [edi + edi]
mov esi, 0x427d38
cmova esi, dword [0x427d38]
push eax
push ecx
push esi
call fcn.0040d1b0
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
jmp 0x405629
push ecx
push dword [ebp - 0x48]
mov ecx, 0x427d38
push edi
call fcn.00407bb0
push 0x427d50
call fcn.0040b0a3
add esp, 4
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x30]
cmp edx, 7
jbe 0x405670
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405666
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40576c
push edx
push ecx
call fcn.0040bdd6
add esp, 8
xor eax, eax
mov dword [ebp - 0x34], 0
mov word [ebp - 0x44], ax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x30], 7
cmp eax, 7
jbe 0x40572f
mov edx, dword [ebp - 0x2c]
lea ecx, [eax*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4056b8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40576c
push ecx
push edx
jmp 0x405727
push ecx
push esi
call fcn.0040bdd6
add esp, 8
call dword [sym.imp.USER32.dll_CloseClipboard]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040b978
mov esp, ebp
pop ebp
ret
push str.Failed_to_open_clipboard.
lea ecx, [ebp - 0x74]
call fcn.00401370
push 0x423574
lea eax, [ebp - 0x74]
push eax
call fcn.0040d144
call fcn.0040f1ef
push str.Failed_to_allocate_global_memory.
lea ecx, [ebp - 0x80]
call fcn.00401370
push 0x423574
lea eax, [ebp - 0x80]
push eax
call fcn.0040d144
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push str.Failed_to_lock_global_memory.
lea ecx, [ebp - 0x8c]
call fcn.00401370
push 0x423574
lea eax, [ebp - 0x8c]
push eax
call fcn.0040d144
int3