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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x4315b8]
xor eax, ebp
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x1f8], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x1ec], 0
mov dword [ebp - 0x1e8], 0
mov dword [ebp - 0x1f0], 0
mov dword [ebp - 0x1f4], 0
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
call dword [sym.imp.USER32.dll_GetClipboardOwner]
mov dword [ebp - 4], eax
mov ecx, dword [0x439aa4]
push ecx
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
jne 0x40d09a
cmp dword [ebp + 0x14], 0
je 0x40d090
push 0x10
push str.Error
push str.Cannot_open_clipboard
mov edx, dword [ebp + 0x18]
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x40d68d
mov dword [ebp - 0x1f0], 1
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.UKHook40.dll_void___cdecl_VnConvGetOptions_struct__VnConvOptions__]
add esp, 4
lea ecx, [ebp - 0x44]
push ecx
call dword [sym.imp.UKHook40.dll_void___cdecl_VnConvResetOptions_struct__VnConvOptions__]
add esp, 4
mov edx, dword [0x439a8c]
mov dword [ebp - 0x38], edx
mov eax, dword [0x439a90]
mov dword [ebp - 0x3c], eax
mov ecx, dword [0x439a94]
mov dword [ebp - 0x34], ecx
lea edx, [ebp - 0x44]
push edx
call dword [sym.imp.UKHook40.dll_void___cdecl_VnConvSetOptions_struct__VnConvOptions__]
add esp, 4
cmp dword [0x439a88], 0
jne 0x40d12b
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040ccf0
add esp, 0x14
test eax, eax
je 0x40d12b
call dword [sym.imp.USER32.dll_CloseClipboard]
lea edx, [ebp - 0x20]
push edx
call dword [sym.imp.UKHook40.dll_void___cdecl_VnConvSetOptions_struct__VnConvOptions__]
add esp, 4
mov eax, 1
jmp 0x40d724
mov dword [ebp - 0x1e4], 0
mov eax, dword [ebp - 4]
cmp eax, dword [0x439aa4]
jne 0x40d209
mov ecx, dword [0x42f480]
push ecx
call dword [sym.imp.USER32.dll_GetClipboardData]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x40d209
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalSize]
mov dword [ebp - 0x208], eax
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x1f8], eax
cmp dword [ebp - 0x1f8], 0
je 0x40d1dc
cmp dword [ebp - 0x208], 0xc
jb 0x40d1dc
mov ecx, dword [ebp - 0x208]
mov edx, dword [ebp - 0x1f8]
lea eax, [edx + ecx - 0xc]
mov ecx, dword [eax]
mov dword [ebp - 0x204], ecx
mov edx, dword [eax + 4]
mov dword [ebp - 0x200], edx
mov eax, dword [eax + 8]
mov dword [ebp - 0x1fc], eax
movzx ecx, word [ebp - 0x1fc]
cmp ecx, 0xf1e3
jne 0x40d1dc
mov dword [ebp - 0x1e4], 1
mov edx, dword [ebp - 0x200]
mov dword [ebp + 8], edx
cmp dword [ebp - 0x1f8], 0
je 0x40d209
cmp dword [ebp - 0x1e4], 0
jne 0x40d209
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov dword [ebp - 0x1f8], 0
mov dword [ebp - 0x2c], 0
cmp dword [ebp + 0xc], 0
je 0x40d221
cmp dword [ebp + 0xc], 4
je 0x40d221
mov dword [ebp - 0x230], 1
jmp 0x40d22b
mov dword [ebp - 0x230], 0xd
mov ecx, dword [ebp - 0x230]
mov dword [ebp - 0x214], ecx
cmp dword [ebp - 0x1e4], 0
jne 0x40d368
push 0xd
call dword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
je 0x40d274
cmp dword [ebp + 8], 0
je 0x40d268
cmp dword [ebp + 8], 4
je 0x40d268
cmp dword [ebp + 8], 0x14
je 0x40d268
cmp dword [ebp + 8], 0x16
jne 0x40d274
mov dword [ebp - 0x20c], 0xd
jmp 0x40d27e
mov dword [ebp - 0x20c], 1
mov edx, dword [ebp - 0x20c]
push edx
call dword [sym.imp.USER32.dll_GetClipboardData]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x40d2ba
cmp dword [ebp + 0x14], 0
je 0x40d2b0
push 0x10
push str.Error
push str.Cannot_read_clipboard
mov eax, dword [ebp + 0x18]
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x40d68d
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalSize]
mov dword [ebp - 0x208], eax
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x1f8], eax
cmp dword [ebp - 0x1f8], 0
je 0x40d35a
cmp dword [ebp + 8], 0
je 0x40d35a
cmp dword [ebp + 8], 4
je 0x40d35a
cmp dword [ebp - 0x20c], 0xd
jne 0x40d35a
mov eax, dword [ebp - 0x208]
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x208], eax
mov eax, dword [ebp - 0x208]
add eax, 1
push eax
call fcn.004133e4
add esp, 4
mov dword [ebp - 0x224], eax
mov ecx, dword [ebp - 0x224]
mov dword [ebp - 0x1ec], ecx
push 0
push 0
mov edx, dword [ebp - 0x208]
add edx, 1
push edx
mov eax, dword [ebp - 0x1ec]
push eax
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x1f8]
push ecx
push 0
push 0x4e4
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
jmp 0x40d366
mov edx, dword [ebp - 0x1f8]
mov dword [ebp - 0x1ec], edx
jmp 0x40d374
mov eax, dword [ebp - 0x1f8]
mov dword [ebp - 0x1ec], eax
cmp dword [ebp - 0x1ec], 0
je 0x40d68d
cmp dword [ebp - 0x208], 0
jle 0x40d68d
mov ecx, dword [ebp - 0x208]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0040d740
add esp, 0xc
add eax, 0xc
mov dword [ebp - 0x210], eax
mov ecx, dword [ebp - 0x210]
push ecx
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x40d3ec
cmp dword [ebp + 0x14], 0
je 0x40d3e2
push 0x10
push str.Error
push str.Could_not_allocate_enough_memory_to_do_the_conversion
mov edx, dword [ebp + 0x18]
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x40d68d
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x40d409
jmp 0x40d68d
mov dword [ebp - 0x48], 0xffffffff
lea ecx, [ebp - 0x210]
push ecx
lea edx, [ebp - 0x48]
push edx
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x1ec]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.UKHook40.dll_VnConvert]
add esp, 0x18
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov edx, dword [ebp + 0x10]
cmp dword [edx], 0
je 0x40d486
cmp dword [ebp + 0x14], 0
je 0x40d47c
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
push ecx
push str.Error__d_
lea edx, [ebp - 0x1e0]
push edx
call fcn.00412cf6
add esp, 0xc
push 0x30
push str.Result
lea eax, [ebp - 0x1e0]
push eax
mov ecx, dword [ebp + 0x18]
push ecx
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x40d68d
mov edx, 0xf1e3
mov word [ebp - 0x1fc], dx
xor eax, eax
mov word [ebp - 0x204], ax
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x200], ecx
mov edx, dword [ebp - 0x24]
add edx, dword [ebp - 0x210]
mov eax, dword [ebp - 0x204]
mov dword [edx], eax
mov ecx, dword [ebp - 0x200]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x1fc]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 0x210]
add ecx, 0xc
mov dword [ebp - 0x210], ecx
mov edx, dword [ebp - 0x1ec]
cmp edx, dword [ebp - 0x1f8]
je 0x40d509
mov eax, dword [ebp - 0x1ec]
mov dword [ebp - 0x228], eax
mov ecx, dword [ebp - 0x228]
push ecx
call fcn.00413231
add esp, 4
mov dword [ebp - 0x1ec], 0
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov dword [ebp - 0x1f8], 0
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov dword [ebp - 0x24], 0
push 2
mov ecx, dword [ebp - 0x210]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
je 0x40d550
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x28], eax
call dword [sym.imp.USER32.dll_EmptyClipboard]
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x214]
push edx
call dword [sym.imp.USER32.dll_SetClipboardData]
mov dword [ebp - 0x28], 0
mov dword [0x45dca8], 0
cmp dword [ebp - 0x214], 0xd
jne 0x40d5f8
mov dword [ebp - 0x218], 0x427cb0
mov eax, dword [ebp - 0x218]
push eax
call fcn.00413b20
add esp, 4
add eax, 1
push eax
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x1e8], eax
mov edx, dword [ebp - 0x218]
push edx
mov eax, dword [ebp - 0x1e8]
push eax
call fcn.00413a20
add esp, 8
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov dword [ebp - 0x1e8], 0
mov edx, dword [ebp - 8]
push edx
push 1
call dword [sym.imp.USER32.dll_SetClipboardData]
mov dword [ebp - 8], 0
jmp 0x40d65b
cmp dword [ebp - 0x214], 1
jne 0x40d65b
cmp dword [ebp + 0xc], 5
jne 0x40d65b
push 4
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x220], eax
mov eax, dword [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x21c], eax
cmp dword [ebp - 0x21c], 0
je 0x40d64c
mov ecx, dword [ebp - 0x21c]
mov dword [ecx], 0x42a
mov edx, dword [ebp - 0x220]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x220]
push eax
push 0x10
call dword [sym.imp.USER32.dll_SetClipboardData]
cmp dword [ebp + 0x14], 0
je 0x40d677
push 0x40
push str.Result
push str.Successfully_converted
mov ecx, dword [ebp + 0x18]
push ecx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov edx, dword [ebp - 0x214]
mov dword [0x42f480], edx
mov dword [ebp - 0x1f4], 1
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.UKHook40.dll_void___cdecl_VnConvSetOptions_struct__VnConvOptions__]
add esp, 4
cmp dword [ebp - 0x1f8], 0
je 0x40d6df
cmp dword [ebp - 0x1ec], 0
je 0x40d6d5
mov ecx, dword [ebp - 0x1ec]
cmp ecx, dword [ebp - 0x1f8]
je 0x40d6d5
mov edx, dword [ebp - 0x1ec]
mov dword [ebp - 0x22c], edx
mov eax, dword [ebp - 0x22c]
push eax
call fcn.00413231
add esp, 4
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
cmp dword [ebp - 0x24], 0
je 0x40d6ef
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
cmp dword [ebp - 0x28], 0
je 0x40d6ff
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [ebp - 8], 0
je 0x40d70f
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [ebp - 0x1f0], 0
je 0x40d71e
call dword [sym.imp.USER32.dll_CloseClipboard]
mov eax, dword [ebp - 0x1f4]
mov ecx, dword [ebp - 0x50]
xor ecx, ebp
call fcn.0041256e
mov esp, ebp
pop ebp
ret