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

Disassembly:
sub esp, 0x120
push ebx
push ebp
xor ebx, ebx
push esi
push edi
mov edi, dword [esp + 0x13c]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [edi], ebx
call dword [sym.imp.USER32.dll_GetClipboardOwner]
mov esi, eax
mov eax, dword [0x4235cc]
push eax
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
jne 0x4091f1
cmp dword [esp + 0x140], ebx
je 0x40965b
mov ecx, dword [esp + 0x144]
push 0x10
push str.Error
push str.Cannot_open_clipboard
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x40965b
lea edx, [esp + 0x54]
push edx
mov dword [esp + 0x2c], 1
call dword [sym.imp.UKHook40.dll_void___cdecl_VnConvGetOptions_struct__VnConvOptions__]
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.UKHook40.dll_VnConvResetOptions]
mov ecx, dword [0x4235b8]
mov edx, dword [0x4235bc]
mov eax, dword [0x4235c0]
mov dword [esp + 0x54], ecx
lea ecx, [esp + 0x48]
push ecx
mov dword [esp + 0x54], edx
mov dword [esp + 0x5c], eax
call dword [sym.imp.UKHook40.dll_VnConvSetOptions]
mov eax, dword [0x4235b4]
mov ebp, dword [esp + 0x140]
add esp, 0xc
cmp eax, ebx
jne 0x409294
mov edx, dword [esp + 0x144]
mov eax, dword [esp + 0x140]
mov ecx, dword [esp + 0x138]
push edx
push eax
push edi
push ecx
push ebp
call fcn.00408b30
add esp, 0x14
test eax, eax
je 0x409294
call dword [sym.imp.USER32.dll_CloseClipboard]
lea edx, [esp + 0x54]
push edx
call dword [sym.imp.UKHook40.dll_VnConvSetOptions]
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x120
ret
mov eax, dword [0x4235cc]
xor edi, edi
cmp esi, eax
jne 0x409309
mov eax, dword [0x41fda0]
push eax
call dword [sym.imp.USER32.dll_GetClipboardData]
test eax, eax
mov dword [esp + 0x10], eax
je 0x409309
push eax
call dword [sym.imp.KERNEL32.dll_GlobalSize]
mov ecx, dword [esp + 0x10]
push ecx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
test ebx, ebx
je 0x40930d
cmp esi, 0xc
jb 0x4092f6
lea edx, [esi + ebx - 0xc]
mov eax, dword [edx]
mov dword [esp + 0x34], eax
mov eax, dword [edx + 4]
mov ecx, dword [edx + 8]
cmp cx, 0xf1e3
mov dword [esp + 0x3c], ecx
jne 0x4092f6
mov edi, 1
mov ebp, eax
jmp 0x40930d
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
xor ebx, ebx
mov dword [esp + 0x10], ebx
jmp 0x40930d
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0x138]
test eax, eax
je 0x409325
cmp eax, 4
mov dword [esp + 0x24], 1
jne 0x40932d
mov dword [esp + 0x24], 0xd
test edi, edi
jne 0x4093f6
push 0xd
call dword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
je 0x40935b
test ebp, ebp
je 0x409354
cmp ebp, 4
je 0x409354
cmp ebp, 0x14
je 0x409354
cmp ebp, 0x16
jne 0x40935b
mov edi, 0xd
jmp 0x409360
mov edi, 1
push edi
call dword [sym.imp.USER32.dll_GetClipboardData]
test eax, eax
mov dword [esp + 0x10], eax
jne 0x40939d
mov eax, dword [esp + 0x140]
test eax, eax
je 0x40965b
mov eax, dword [esp + 0x144]
push 0x10
push str.Error
push str.Cannot_read_clipboard
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x40965b
push eax
call dword [sym.imp.KERNEL32.dll_GlobalSize]
mov ecx, dword [esp + 0x10]
push ecx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
test ebx, ebx
je 0x4093f6
test ebp, ebp
je 0x4093f6
cmp ebp, 4
je 0x4093f6
cmp edi, 0xd
jne 0x4093f6
mov eax, esi
cdq
sub eax, edx
sar eax, 1
mov esi, eax
lea edi, [esi + 1]
push edi
call fcn.0040e26e
add esp, 4
push 0
push 0
push edi
push eax
push 0xffffffffffffffff
push ebx
push 0
push 0x4e4
mov dword [esp + 0x38], eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
jmp 0x4093fa
mov dword [esp + 0x18], ebx
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40965b
test esi, esi
jle 0x40965b
mov edx, dword [esp + 0x138]
push esi
push edx
push ebp
call fcn.00408d70
mov esi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
add esp, 0xc
add eax, 0xc
push eax
push 2
mov dword [esp + 0x24], eax
call esi
test eax, eax
mov dword [esp + 0x14], eax
jne 0x409468
mov eax, dword [esp + 0x140]
test eax, eax
je 0x40965b
mov eax, dword [esp + 0x144]
push 0x10
push str.Error
push str.Could_not_allocate_enough_memory_to_do_the_conversion
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x40965b
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
mov dword [esp + 0x20], eax
je 0x40965b
mov edi, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x13c]
lea edx, [esp + 0x34]
push edx
push eax
push edi
push ecx
push ebp
mov dword [esp + 0x48], 0xffffffff
call dword [sym.imp.UKHook40.dll_VnConvert]
mov ebp, dword [esp + 0x154]
add esp, 0x18
test eax, eax
mov dword [ebp], eax
je 0x4094ff
mov ecx, dword [esp + 0x140]
test ecx, ecx
je 0x40965b
push eax
call dword [sym.imp.UKHook40.dll_VnConvErrMsg]
mov edx, dword [ebp]
push eax
push edx
lea eax, [esp + 0x74]
push str.Error__d_:__s
push eax
call fcn.0040e058
mov edx, dword [esp + 0x158]
add esp, 0x14
push 0x30
push str.Result
lea ecx, [esp + 0x70]
push ecx
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x40965b
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
add eax, ecx
mov ecx, dword [esp + 0x138]
mov word [esp + 0x34], 0
mov edx, dword [esp + 0x34]
mov dword [eax], edx
mov dword [eax + 4], ecx
mov word [esp + 0x3c], 0xf1e3
mov edx, dword [esp + 0x3c]
mov dword [eax + 8], edx
mov ecx, dword [esp + 0x1c]
add ecx, 0xc
cmp edi, ebx
mov dword [esp + 0x1c], ecx
je 0x40954e
push edi
call fcn.0040e27c
add esp, 4
mov dword [esp + 0x18], 0
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov edi, dword [esp + 0x14]
push edi
xor ebp, ebp
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, dword [esp + 0x1c]
push 2
push ecx
push edi
mov dword [esp + 0x2c], ebp
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
cmp eax, ebp
je 0x409584
mov dword [esp + 0x14], eax
mov edi, eax
call dword [sym.imp.USER32.dll_EmptyClipboard]
push edi
mov edi, dword [esp + 0x28]
push edi
call dword [sym.imp.USER32.dll_SetClipboardData]
cmp edi, 0xd
mov dword [esp + 0x14], ebp
mov dword [0x4246b0], ebp
jne 0x4095f2
mov eax, 0x41abc0
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4095b0
sub eax, edx
inc eax
push eax
push 2
call esi
mov edi, eax
push edi
mov esi, 0x41abc0
call dword [sym.imp.KERNEL32.dll_GlobalLock]
lea ecx, [ecx]
mov cl, byte [esi]
inc esi
mov byte [eax], cl
inc eax
test cl, cl
jne 0x4095d0
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
push 1
call dword [sym.imp.USER32.dll_SetClipboardData]
mov edi, dword [esp + 0x24]
xor ebp, ebp
jmp 0x40962a
cmp edi, 1
jne 0x40962a
cmp dword [esp + 0x138], 5
jne 0x40962a
push 4
push 2
call esi
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
cmp eax, ebp
je 0x409621
push esi
mov dword [eax], 0x42a
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
push 0x10
call dword [sym.imp.USER32.dll_SetClipboardData]
cmp dword [esp + 0x140], ebp
je 0x40964d
mov edx, dword [esp + 0x144]
push 0x40
push str.Result
push str.Successfully_converted
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [0x41fda0], edi
mov dword [esp + 0x2c], 1
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.UKHook40.dll_VnConvSetOptions]
add esp, 4
test ebx, ebx
je 0x40968d
mov eax, dword [esp + 0x18]
test eax, eax
je 0x409682
cmp eax, ebx
je 0x409682
push eax
call fcn.0040e27c
add esp, 4
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esp + 0x20]
test eax, eax
mov esi, dword [esp + 0x14]
je 0x4096a0
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
test esi, esi
je 0x4096ab
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4096b9
call dword [sym.imp.USER32.dll_CloseClipboard]
mov eax, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x120
ret