Function at 0x40db95
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x850
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x694]
xor ebx, ebx
mov dword [ebp - 8], ebx
call fcn.00409a24
mov edx, eax
lea eax, [ebp - 0x34]
call fcn.004082c5
cmp dword [ebp + 0x10], ebx
je 0x40dc5b
mov eax, dword [edi + 0x694]
cmp dword [eax + 0x2c], ebx
mov dword [ebp + 0x10], ebx
jle 0x40dcfa
push dword [ebp + 0x10]
mov esi, dword [edi + 0x694]
call fcn.00409818
and word [ebp - 0x84c], 0
push 0x7fe
mov esi, eax
lea eax, [ebp - 0x84a]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x84c]
push eax
mov eax, esi
call fcn.00402bf6
lea eax, [ebp - 0x84c]
push eax
call sub.msvcrt.dll_wcslen
lea ebx, [ebx + eax + 1]
pop ecx
lea eax, [ebp - 0x84c]
push eax
lea eax, [ebp - 0x34]
call fcn.0040830d
cmp dword [ebp + 0xc], 2
jne 0x40dc45
mov dword [edi + 0x6d0], 1
inc dword [ebp + 0x10]
mov eax, dword [edi + 0x694]
mov ecx, dword [ebp + 0x10]
cmp ecx, dword [eax + 0x2c]
jl 0x40dbd9
jmp 0x40dcfa
lea esi, [edx - 1]
test esi, esi
jl 0x40dcfa
and dword [ebp + 0x10], 0
push esi
lea eax, [ebp - 8]
push eax
mov eax, dword [edi + 0x694]
call fcn.0040a203
test eax, eax
je 0x40dce2
and word [ebp - 0x84c], 0
push 0x7fe
lea eax, [ebp - 0x84a]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x84c]
push eax
mov eax, dword [ebp - 8]
call fcn.00402bf6
lea eax, [ebp - 0x84c]
push eax
call sub.msvcrt.dll_wcslen
lea ebx, [ebx + eax + 1]
pop ecx
lea eax, [ebp - 0x84c]
push eax
lea eax, [ebp - 0x34]
call fcn.0040830d
cmp dword [ebp + 0xc], 2
jne 0x40dce2
mov dword [ebp + 0x10], 4
mov dword [edi + 0x6d0], 1
mov eax, dword [edi + 0x694]
push 4
push dword [ebp + 0x10]
push esi
call fcn.00409a3e
dec esi
jns 0x40dc66
xor ecx, ecx
inc ecx
test ebx, ebx
mov dword [edi + 0x6cc], ecx
jle 0x40de16
xor eax, eax
lea edi, [ebp - 0x44]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
push 0x14
pop esi
lea eax, [ebx + ebx + 0x16]
push eax
push 0x2042
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x48], esi
call edi
mov ebx, dword [sym.imp.KERNEL32.DLL_GlobalLock]
push eax
mov dword [ebp - 8], eax
call ebx
push esi
lea ecx, [ebp - 0x48]
push ecx
push eax
mov dword [ebp - 0x14], eax
call sub.msvcrt.dll_memcpy
xor esi, esi
add esp, 0xc
cmp dword [ebp - 0x18], esi
mov dword [ebp + 0x10], esi
jle 0x40dd9e
mov ecx, dword [ebp + 0x10]
test ecx, ecx
jl 0x40dd6a
lea eax, [ebp - 0x34]
call fcn.00408404
mov dword [ebp - 0xc], eax
jmp 0x40dd6e
and dword [ebp - 0xc], 0
push dword [ebp - 0xc]
call sub.msvcrt.dll_wcslen
push dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
lea eax, [eax + esi*2 + 0x14]
push eax
call sub.msvcrt.dll_wcscpy
mov eax, dword [ebp - 0x10]
add esp, 0xc
inc dword [ebp + 0x10]
lea esi, [esi + eax + 1]
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp - 0x18]
jl 0x40dd56
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_GlobalUnlock]
mov eax, dword [ebp + 8]
push dword [eax + 0x208]
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x40de0a
call dword [sym.imp.USER32.dll_EmptyClipboard]
push dword [ebp - 8]
mov esi, dword [sym.imp.USER32.dll_SetClipboardData]
push 0xf
call esi
push 4
push 0x2042
call edi
mov edi, eax
push edi
call ebx
mov cl, byte [ebp + 0xc]
push edi
mov byte [eax], cl
mov byte [eax + 1], 0
mov byte [eax + 2], 0
mov byte [eax + 3], 0
call dword [sym.imp.KERNEL32.DLL_GlobalUnlock]
push str.Preferred_DropEffect
call dword [sym.imp.USER32.dll_RegisterClipboardFormatW]
push edi
push eax
call esi
call dword [sym.imp.USER32.dll_CloseClipboard]
jmp 0x40de13
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
mov edi, dword [ebp + 8]
and dword [edi + 0x6cc], 0
lea esi, [ebp - 0x34]
call fcn.004082e7
pop edi
pop esi
pop ebx
leave
ret 0xc