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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1fc
mov eax, dword [0x576f24]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 0x18]
xor ebx, ebx
push edi
xor edi, edi
mov dword [ebp - 0x1e8], eax
mov dword [ebp - 0x1e0], esi
mov dword [ebp - 0x1c8], 0
mov dword [ebp - 0x1cc], edi
mov dword [ebp - 0x1e4], edi
mov dword [ebp - 0x1ec], ebx
mov dword [eax], ebx
call dword [sym.imp.USER32.dll_GetClipboardOwner]
push dword [0x582a2c]
mov dword [ebp - 0x1d0], eax
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
jne 0x40b9f4
cmp dword [ebp + 0x14], ebx
je 0x40b9ce
push 0x10
push 0x4b6d18
push str.Cannot_open_clipboard
push esi
call dword [sym.imp.USER32.dll_MessageBoxW]
lea eax, [ebp - 0x1c4]
push eax
call fcn.00413680
mov eax, dword [ebp - 0x1ec]
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00424790
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x1c4]
push eax
call fcn.00413620
lea eax, [ebp - 0x1ac]
push eax
call fcn.00413640
mov eax, dword [0x582a18]
mov dword [ebp - 0x1a0], eax
mov eax, dword [0x582a1c]
mov dword [ebp - 0x1a4], eax
mov eax, dword [0x582a20]
mov dword [ebp - 0x19c], eax
lea eax, [ebp - 0x1ac]
push eax
call fcn.00413680
add esp, 0xc
cmp dword [0x582a14], ebx
jne 0x40ba8c
push esi
push dword [ebp + 0x14]
mov esi, dword [ebp + 8]
push dword [ebp - 0x1e8]
push dword [ebp + 0xc]
push esi
call fcn.0040bfe0
add esp, 0x14
test eax, eax
je 0x40ba8f
call dword [sym.imp.USER32.dll_CloseClipboard]
lea eax, [ebp - 0x1c4]
push eax
call fcn.00413680
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00424790
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 0x1d0]
mov dword [ebp - 0x1dc], ebx
cmp eax, dword [0x582a2c]
jne 0x40bb50
push dword [0x572488]
call dword [sym.imp.USER32.dll_GetClipboardData]
mov dword [ebp - 0x1c8], eax
test eax, eax
je 0x40bb50
push eax
call dword [sym.imp.KERNEL32.dll_GlobalSize]
push dword [ebp - 0x1c8]
mov dword [ebp - 0x1d4], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x1cc], eax
test eax, eax
je 0x40bb5e
mov ecx, dword [ebp - 0x1d4]
cmp ecx, 0xc
jb 0x40bb30
movq xmm0, qword [ecx + eax - 0xc]
mov eax, dword [ecx + eax - 4]
mov dword [ebp - 0x1f4], eax
mov eax, 0xf1e3
movq qword [ebp - 0x1fc], xmm0
cmp word [ebp - 0x1f4], ax
jne 0x40bb30
mov esi, dword [ebp - 0x1f8]
mov eax, dword [ebp - 0x1cc]
mov dword [ebp - 0x1dc], 1
mov dword [ebp + 8], esi
jmp 0x40bb5e
push dword [ebp - 0x1c8]
mov eax, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
call eax
xor eax, eax
mov dword [ebp + 8], esi
mov dword [ebp - 0x1cc], eax
mov dword [ebp - 0x1c8], eax
jmp 0x40bb5e
mov eax, dword [ebp - 0x1f0]
mov dword [ebp - 0x1d4], eax
xor eax, eax
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x40bb74
mov dword [ebp - 0x1d0], 1
cmp edx, 4
jne 0x40bb7e
mov dword [ebp - 0x1d0], 0xd
cmp dword [ebp - 0x1dc], ebx
jne 0x40bca2
push 0xd
call dword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
je 0x40bbb0
test esi, esi
je 0x40bba9
cmp esi, 4
je 0x40bba9
cmp esi, 0x14
je 0x40bba9
cmp esi, 0x16
jne 0x40bbb0
mov eax, 0xd
jmp 0x40bbb5
mov eax, 1
push eax
mov dword [ebp - 0x1dc], eax
call dword [sym.imp.USER32.dll_GetClipboardData]
mov dword [ebp - 0x1c8], eax
test eax, eax
jne 0x40bc2a
cmp dword [ebp + 0x14], ebx
je 0x40bbe9
push 0x10
push 0x4b6d18
push str.Cannot_read_clipboard
push dword [ebp - 0x1e0]
call dword [sym.imp.USER32.dll_MessageBoxW]
lea eax, [ebp - 0x1c4]
push eax
call fcn.00413680
mov eax, dword [ebp - 0x1cc]
add esp, 4
test eax, eax
je 0x40bec5
test ebx, ebx
je 0x40bc17
cmp ebx, eax
je 0x40bc17
push ebx
call fcn.00424bcd
add esp, 4
push dword [ebp - 0x1c8]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
call ebx
jmp 0x40becb
push eax
call dword [sym.imp.KERNEL32.dll_GlobalSize]
push dword [ebp - 0x1c8]
mov ebx, eax
mov dword [ebp - 0x1d4], ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x1cc], eax
test eax, eax
je 0x40bc9f
test esi, esi
je 0x40bc9f
cmp esi, 4
je 0x40bc9f
cmp dword [ebp - 0x1dc], 0xd
jne 0x40bc9f
mov eax, ebx
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x1d4], eax
lea esi, [eax + 1]
push esi
call fcn.00424bc4
add esp, 4
mov ebx, eax
push 0
push 0
push esi
push ebx
push 0xffffffffffffffff
push dword [ebp - 0x1cc]
push 0
push 0x4e4
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
jmp 0x40bca4
mov edx, dword [ebp + 0xc]
mov ebx, eax
test ebx, ebx
je 0x40bbe9
mov eax, dword [ebp - 0x1d4]
test eax, eax
jle 0x40bbe9
push eax
push edx
push esi
call fcn.0040c2b0
add esp, 0xc
add eax, 0xc
mov dword [ebp - 0x1d8], eax
push eax
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
jne 0x40bcf7
cmp dword [ebp + 0x14], eax
je 0x40bbe9
push 0x10
push 0x4b6d18
push str.Could_not_allocate_enough_memory_to_do_the_conversion
jmp 0x40bbdd
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x1e4], eax
test eax, eax
je 0x40bbe9
lea ecx, [ebp - 0x1d8]
mov dword [ebp - 0x1f0], 0xffffffff
push ecx
lea ecx, [ebp - 0x1f0]
push ecx
push eax
push ebx
push dword [ebp + 0xc]
push esi
call fcn.00412910
mov ecx, dword [ebp - 0x1e8]
add esp, 0x18
mov dword [ecx], eax
test eax, eax
je 0x40bd70
cmp dword [ebp + 0x14], 0
je 0x40bbe9
push eax
lea eax, [ebp - 0x194]
push str.Error__d_
push eax
call fcn.00406f60
add esp, 0xc
lea eax, [ebp - 0x194]
push 0x30
push str.Result
push eax
jmp 0x40bbdd
mov ecx, dword [ebp - 0x1e4]
mov eax, 0xf1e3
add ecx, dword [ebp - 0x1d8]
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 - 0x1d8], 0xc
cmp ebx, dword [ebp - 0x1cc]
je 0x40bdc7
push ebx
call fcn.00424bcd
add esp, 4
push dword [ebp - 0x1c8]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
call ebx
push edi
call ebx
push 2
push dword [ebp - 0x1d8]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
test eax, eax
cmovne edi, eax
call dword [sym.imp.USER32.dll_EmptyClipboard]
mov esi, dword [ebp - 0x1d0]
mov ebx, dword [sym.imp.USER32.dll_SetClipboardData]
push edi
push esi
call ebx
mov dword [0x585028], 0
cmp esi, 0xd
jne 0x40be4a
mov eax, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push 4
push 2
call eax
mov edi, eax
mov esi, 0x548e9c
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
sub eax, esi
nop dword [eax]
mov cl, byte [esi]
lea esi, [esi + 1]
mov byte [eax + esi - 1], cl
test cl, cl
jne 0x40be30
mov eax, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call eax
push edi
push 1
jmp 0x40be7e
cmp esi, 1
jne 0x40be86
cmp dword [ebp + 0xc], 5
jne 0x40be86
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 0x40be7b
mov dword [eax], 0x42a
mov eax, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call eax
push esi
push 0x10
call ebx
mov esi, dword [ebp - 0x1d0]
cmp dword [ebp + 0x14], 0
je 0x40bea4
push 0x40
push str.Result
push str.Successfully_converted
push dword [ebp - 0x1e0]
call dword [sym.imp.USER32.dll_MessageBoxW]
lea eax, [ebp - 0x1c4]
mov dword [0x572488], esi
push eax
mov dword [ebp - 0x1ec], 1
call fcn.00413680
add esp, 4
jmp 0x40bee2
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
cmp dword [ebp - 0x1e4], 0
je 0x40bed7
push edi
call ebx
test edi, edi
je 0x40bee2
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
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.00424790
mov esp, ebp
pop ebp
ret