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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1fc
mov eax, dword [0x4cff04]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x18]
push ebx
xor ebx, ebx
mov dword [ebp - 0x1e0], ecx
push esi
push edi
mov dword [ebp - 0x1d4], eax
xor esi, esi
mov dword [ebp - 0x1c8], ebx
xor edi, edi
mov dword [ebp - 0x1cc], ebx
mov dword [ebp - 0x1e4], ebx
mov dword [ebp - 0x1e8], ebx
mov dword [ebp - 0x1ec], ebx
mov dword [ecx], ebx
call dword [sym.imp.USER32.dll_GetClipboardOwner]
push dword [0x4db82c]
mov dword [ebp - 0x1d8], eax
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
jne 0x40b570
cmp dword [ebp + 0x14], ebx
je 0x40b765
push 0x10
push 0x49cf30
push str.Cannot_open_clipboard
push dword [ebp - 0x1d4]
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x40b765
lea eax, [ebp - 0x1c4]
mov dword [ebp - 0x1e8], 1
push eax
call fcn.00412c90
lea eax, [ebp - 0x1ac]
push eax
call fcn.00412cb0
mov eax, dword [0x4db818]
mov dword [ebp - 0x1a0], eax
mov eax, dword [0x4db81c]
mov dword [ebp - 0x1a4], eax
mov eax, dword [0x4db820]
mov dword [ebp - 0x19c], eax
lea eax, [ebp - 0x1ac]
push eax
call fcn.00412cf0
add esp, 0xc
cmp dword [0x4db814], ebx
mov ebx, dword [ebp + 8]
jne 0x40b617
push dword [ebp - 0x1d4]
push dword [ebp + 0x14]
push dword [ebp - 0x1e0]
push dword [ebp + 0xc]
push ebx
call fcn.0040bba0
add esp, 0x14
test eax, eax
je 0x40b617
call dword [sym.imp.USER32.dll_CloseClipboard]
lea eax, [ebp - 0x1c4]
push eax
call fcn.00412cf0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00420b40
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x1d8]
cmp eax, dword [0x4db82c]
jne 0x40b716
push dword [0x4cb5b0]
call dword [sym.imp.USER32.dll_GetClipboardData]
mov dword [ebp - 0x1c8], eax
test eax, eax
je 0x40b716
push eax
call dword [sym.imp.KERNEL32.dll_GlobalSize]
push dword [ebp - 0x1c8]
mov esi, eax
mov dword [ebp - 0x1d0], esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x1cc], eax
test eax, eax
je 0x40b6c0
cmp esi, 0xc
jb 0x40b6a6
movq xmm0, qword [esi + eax - 0xc]
mov eax, dword [esi + eax - 4]
mov dword [ebp - 0x1f4], eax
mov eax, 0xf1e3
movq qword [ebp - 0x1fc], xmm0
cmp word [ebp - 0x1f4], ax
jne 0x40b6a6
mov ebx, dword [ebp - 0x1f8]
mov edx, 1
mov eax, dword [ebp - 0x1cc]
jmp 0x40b6c2
push dword [ebp - 0x1c8]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
xor eax, eax
mov dword [ebp - 0x1cc], eax
mov dword [ebp - 0x1c8], eax
xor edx, edx
mov esi, dword [ebp - 0x1d0]
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x40b6de
mov dword [ebp - 0x1d8], 1
cmp ecx, 4
jne 0x40b6e8
mov dword [ebp - 0x1d8], 0xd
test edx, edx
jne 0x40b816
push 0xd
call dword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
je 0x40b722
test ebx, ebx
je 0x40b70f
cmp ebx, 4
je 0x40b70f
cmp ebx, 0x14
je 0x40b70f
cmp ebx, 0x16
jne 0x40b722
mov eax, 0xd
jmp 0x40b727
mov esi, dword [ebp - 0x1f0]
xor eax, eax
xor edx, edx
jmp 0x40b6c8
mov eax, 1
push eax
mov dword [ebp - 0x1d0], eax
call dword [sym.imp.USER32.dll_GetClipboardData]
mov dword [ebp - 0x1c8], eax
test eax, eax
jne 0x40b7a1
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x40b75d
push 0x10
push 0x49cf30
push str.Cannot_read_clipboard
push dword [ebp - 0x1d4]
call dword [sym.imp.USER32.dll_MessageBoxW]
xor esi, esi
mov ebx, dword [ebp - 0x1c8]
lea eax, [ebp - 0x1c4]
push eax
call fcn.00412cf0
mov eax, dword [ebp - 0x1cc]
add esp, 4
test eax, eax
je 0x40ba74
test edi, edi
je 0x40b793
cmp edi, eax
je 0x40b793
push edi
call fcn.00420fdc
add esp, 4
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
call ebx
jmp 0x40ba7a
push eax
call dword [sym.imp.KERNEL32.dll_GlobalSize]
push dword [ebp - 0x1c8]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x1cc], eax
test eax, eax
je 0x40b813
test ebx, ebx
je 0x40b813
cmp ebx, 4
je 0x40b813
cmp dword [ebp - 0x1d0], 0xd
jne 0x40b813
mov eax, esi
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x1d0], eax
lea esi, [eax + 1]
push esi
call fcn.00420fd3
add esp, 4
mov edi, eax
push 0
push 0
push esi
push edi
push 0xffffffffffffffff
push dword [ebp - 0x1cc]
push 0
push 0x4e4
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, dword [ebp - 0x1d0]
mov ecx, dword [ebp + 0xc]
jmp 0x40b818
mov ecx, dword [ebp + 0xc]
mov edi, eax
test edi, edi
je 0x40b75d
test esi, esi
jle 0x40b75d
push esi
push ecx
push ebx
call fcn.0040be30
add esp, 0xc
add eax, 0xc
mov dword [ebp - 0x1dc], eax
push eax
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
jne 0x40b873
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x40b75f
push 0x10
push 0x49cf30
push str.Could_not_allocate_enough_memory_to_do_the_conversion
push dword [ebp - 0x1d4]
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x40b75f
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x1e4], eax
test eax, eax
je 0x40b75f
lea ecx, [ebp - 0x1dc]
mov dword [ebp - 0x1f0], 0xffffffff
push ecx
lea ecx, [ebp - 0x1f0]
push ecx
push eax
push edi
push dword [ebp + 0xc]
push ebx
call fcn.00411f60
mov ecx, dword [ebp - 0x1e0]
add esp, 0x18
mov dword [ecx], eax
test eax, eax
je 0x40b8f9
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x40b75f
push eax
lea eax, [ebp - 0x194]
push str.Error__d_
push eax
call fcn.00406c90
add esp, 0xc
lea eax, [ebp - 0x194]
push 0x30
push str.Result
push eax
push dword [ebp - 0x1d4]
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x40b75f
mov ecx, dword [ebp - 0x1e4]
mov eax, 0xf1e3
add ecx, dword [ebp - 0x1dc]
mov word [ebp - 0x1f4], ax
xor eax, eax
mov word [ebp - 0x1fc], ax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x1f8], eax
movq xmm0, qword [ebp - 0x1fc]
mov eax, dword [ebp - 0x1f4]
movq qword [ecx], xmm0
mov dword [ecx + 8], eax
add dword [ebp - 0x1dc], 0xc
cmp edi, dword [ebp - 0x1cc]
je 0x40b952
push edi
call fcn.00420fdc
add esp, 4
xor edi, edi
mov ebx, dword [ebp - 0x1c8]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
mov dword [ebp - 0x1cc], 0
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push 2
push dword [ebp - 0x1dc]
mov dword [ebp - 0x1e4], 0
push esi
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
test eax, eax
cmovne esi, eax
call dword [sym.imp.USER32.dll_EmptyClipboard]
push esi
push dword [ebp - 0x1d8]
call dword [sym.imp.USER32.dll_SetClipboardData]
mov eax, dword [ebp - 0x1d8]
xor esi, esi
mov dword [ebp - 0x1e0], esi
mov dword [0x4ddc18], esi
cmp eax, 0xd
jne 0x40b9fb
mov eax, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push 4
push 2
call eax
mov ebx, eax
mov esi, 0x4a580c
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
sub eax, esi
mov cl, byte [esi]
lea esi, [esi + 1]
mov byte [eax + esi - 1], cl
test cl, cl
jne 0x40b9d5
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [sym.imp.USER32.dll_SetClipboardData]
push ebx
push 1
call eax
mov ebx, dword [ebp - 0x1c8]
jmp 0x40ba35
cmp eax, 1
jne 0x40ba3b
cmp dword [ebp + 0xc], 5
jne 0x40ba3b
mov eax, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push 4
push 2
call eax
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x40ba2b
push esi
mov dword [eax], 0x42a
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [sym.imp.USER32.dll_SetClipboardData]
push esi
push 0x10
call eax
mov esi, dword [ebp - 0x1e0]
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x40ba5a
push 0x40
push str.Result
push str.Successfully_converted
push dword [ebp - 0x1d4]
call dword [sym.imp.USER32.dll_MessageBoxW]
mov eax, dword [ebp - 0x1d8]
mov dword [0x4cb5b0], eax
mov dword [ebp - 0x1ec], 1
jmp 0x40b765
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, dword [ebp - 0x1e4]
test ecx, ecx
je 0x40ba87
push esi
call ebx
test esi, esi
je 0x40ba92
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [ebp - 0x1e8], 0
je 0x40baa1
call dword [sym.imp.USER32.dll_CloseClipboard]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x1ec]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00420b40
mov esp, ebp
pop ebp
ret