Function at 0x4047ef
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [0x478b78]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
xor edi, edi
mov dword [ebp - 0x18], eax
push dword [ebx + 0x50]
mov esi, edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x24], edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
xor ecx, ecx
mov edx, dword [eax + 0x10]
test edx, edx
jle 0x40484a
add eax, 0x18
test byte [eax + 0x70], 1
je 0x40483b
cmp dword [eax], 7
jne 0x404847
inc ecx
add eax, 0xd0
cmp ecx, edx
jl 0x404830
jmp 0x40484a
xor edi, edi
inc edi
push dword [ebx + 0x50]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
test edi, edi
jne 0x40485e
xor eax, eax
jmp 0x404d3e
push dword [0x49d9fc]
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x4048fd
movzx eax, word [0x49cd68]
push eax
call dword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
je 0x4048b2
cmp dword [ebp + 0x14], esi
je 0x4048c2
mov eax, dword [ebp - 0x18]
push 8
push eax
call fcn.00453c92
and dword [0x49ec64], 0
mov esi, eax
test esi, esi
jne 0x404d2f
push dword [0x49ec60]
call fcn.0043e07f
jmp 0x4048e3
cmp dword [ebp + 0x14], esi
je 0x4048c2
mov eax, dword [ebp - 0x18]
push eax
call fcn.004536b5
mov esi, eax
and dword [0x49ec64], 0
test esi, esi
jne 0x404d2f
push dword [0x49ec60]
call fcn.0043dfd5
mov dword [ebp - 0x20], 1
mov esi, eax
test esi, esi
jne 0x4048ef
call dword [sym.imp.USER32.dll_EmptyClipboard]
call dword [sym.imp.USER32.dll_CloseClipboard]
test esi, esi
jne 0x404d2f
call fcn.00405629
mov esi, eax
test esi, esi
jne 0x404d2f
cmp dword [ebp - 0x20], eax
je 0x40491c
push dword [0x49ec60]
call fcn.0043e07f
mov edi, dword [ebp - 0x18]
lea eax, [ebp - 0x34]
push eax
push 0x72
push 0x64
push dword [edi + 0x26]
call fcn.0043c164
test eax, eax
jne 0x404949
push dword [ebp - 0x34]
push 0x72
push 0x64
call fcn.00403f85
mov esi, eax
test esi, esi
jne 0x404d2f
push dword [edi + 0x1c6]
mov edi, dword [sym.imp.KERNEL32.dll_GlobalSize]
call edi
lea ecx, [ebp - 0x34]
add eax, 0x10
push ecx
push eax
push 0x69
push 0x64
push dword [0x49ec60]
call fcn.0043b5e2
mov esi, eax
test esi, esi
jne 0x404d2f
mov esi, dword [ebp - 0x18]
push dword [ebp - 0x34]
push dword [esi + 0x1c6]
call fcn.0043d7f6
push dword [esi + 0xb6]
call edi
lea ecx, [ebp - 0x40]
add eax, 0x10
push ecx
push eax
push 0x6f
push 0x64
pop edi
push edi
push dword [0x49ec60]
call fcn.0043b5e2
mov esi, eax
test esi, esi
jne 0x404d2f
mov eax, dword [ebp - 0x18]
push dword [ebp - 0x40]
push dword [eax + 0xb6]
call fcn.0043d7f6
push dword [ebx + 0x50]
push 0x6c
push edi
call fcn.00403f85
mov esi, eax
test esi, esi
jne 0x404d2f
push dword [ebx + 0x58]
push 0x6d
push edi
call fcn.00403f85
mov esi, eax
test esi, esi
jne 0x404d2f
lea eax, [ebp - 0x2c]
push eax
push 0x6c
push edi
push dword [0x49ec60]
call fcn.0043c164
mov esi, eax
test esi, esi
jne 0x404d2f
lea eax, [ebp - 0x30]
push eax
push 0x6d
push edi
push dword [0x49ec60]
call fcn.0043c164
mov esi, eax
test esi, esi
jne 0x404d2f
push dword [ebp - 0x2c]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalLock]
call ebx
push dword [ebp - 0x30]
mov edi, eax
mov dword [ebp - 0x48], edi
call ebx
mov dword [ebp - 0x38], eax
mov ecx, dword [eax + 0x10]
sub ecx, 1
mov dword [ebp - 0x1c], ecx
js 0x404cad
add eax, 0x14
lea ecx, [eax + ecx*4]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], ecx
mov ecx, dword [ecx]
imul ebx, ecx, 0xd0
mov dword [ebp - 0x28], ecx
test byte [ebx + edi + 0x88], 1
je 0x404c19
cmp dword [ebx + edi + 0x18], 7
je 0x404c19
cmp dword [ebx + edi + 0x80], 0
jl 0x404c98
xor ecx, ecx
mov dword [ebp - 0x28], ecx
cmp dword [ebx + edi + 0x84], ecx
jle 0x404c98
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebx + edi + 0x80]
add eax, ecx
push eax
mov eax, dword [ebp - 0x18]
push dword [ebx + edi + 0x7c]
push dword [eax + 0x26]
call fcn.0043c164
mov esi, eax
test esi, esi
jne 0x404c95
mov esi, dword [ebp - 0x24]
test esi, esi
jne 0x404be2
cmp dword [ebx + edi + 0x18], 6
jne 0x404af2
push dword [ebx + edi + 0x80]
mov eax, dword [ebp - 0x18]
push dword [ebx + edi + 0x7c]
push dword [eax + 0x26]
call fcn.00434571
jmp 0x404b84
cmp dword [ebx + edi + 0x18], 8
jne 0x404be2
mov eax, dword [ebx + edi + 0x7c]
sub eax, 0x6d
je 0x404b8c
sub eax, 1
jne 0x404be2
mov esi, dword [ebp - 0x18]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x3c]
push eax
push dword [ebx + edi + 0x84]
push dword [ebx + edi + 0x80]
push 0x6e
push dword [esi + 0x26]
call fcn.00431217
test eax, eax
jne 0x404be2
push dword [0x49d9fc]
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x404b6c
push dword [ebp - 0x3c]
push 8
call dword [sym.imp.USER32.dll_SetClipboardData]
test eax, eax
jne 0x404b66
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
call dword [sym.imp.USER32.dll_CloseClipboard]
push dword [ebx + edi + 0x84]
push dword [ebx + edi + 0x80]
push 0x6e
push dword [esi + 0x26]
call fcn.00434c33
xor eax, eax
inc eax
mov dword [ebp - 0x24], eax
jmp 0x404be2
push dword [0x49d9fc]
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x404be2
movsx eax, word [ebx + edi + 0x90]
mov dword [ebp - 0x50], eax
movsx eax, word [ebx + edi + 0x92]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x50]
push dword [ebx + edi + 0x84]
push dword [ebx + edi + 0x80]
push eax
mov eax, dword [ebp - 0x18]
push 0x6d
push dword [eax + 0x26]
call fcn.00463a53
test eax, eax
push 1
pop eax
cmove esi, eax
mov dword [ebp - 0x24], esi
call dword [sym.imp.USER32.dll_CloseClipboard]
push dword [ebp - 0x44]
mov eax, dword [ebx + edi + 0x80]
add eax, dword [ebp - 0x28]
push eax
push dword [ebx + edi + 0x7c]
call fcn.00403f85
mov esi, eax
test esi, esi
jne 0x404d2f
mov ecx, dword [ebp - 0x28]
inc ecx
mov dword [ebp - 0x28], ecx
cmp ecx, dword [ebx + edi + 0x84]
jl 0x404a9e
jmp 0x404c95
mov eax, dword [edi + 0x10]
sub eax, ecx
dec eax
imul eax, eax, 0xd0
test eax, eax
je 0x404c42
push eax
lea eax, [edi + 0xe4]
add eax, ebx
push eax
lea eax, [edi + 0x14]
add eax, ebx
push eax
call dword [sym.imp.VCRUNTIME140.dll_memmove]
add esp, 0xc
mov eax, dword [ebp - 0x38]
dec dword [edi + 0x10]
mov eax, dword [eax + 0x10]
sub eax, dword [ebp - 0x1c]
lea eax, [eax*4 - 4]
test eax, eax
je 0x404c6b
mov ecx, dword [ebp - 0x20]
push eax
lea eax, [ecx + 4]
push eax
push ecx
call dword [sym.imp.VCRUNTIME140.dll_memmove]
add esp, 0xc
mov eax, dword [ebp - 0x38]
xor edx, edx
dec dword [eax + 0x10]
cmp dword [eax + 0x10], edx
jle 0x404c95
mov ebx, dword [ebp - 0x28]
mov edi, eax
lea ecx, [edi + 0x14]
mov eax, dword [ecx]
cmp eax, ebx
jle 0x404c89
dec eax
mov dword [ecx], eax
inc edx
add ecx, 4
cmp edx, dword [edi + 0x10]
jl 0x404c80
mov edi, dword [ebp - 0x48]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
dec eax
sub ecx, 4
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], ecx
test eax, eax
jns 0x404a5a
push dword [ebp - 0x2c]
mov edi, dword [edi + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
call ebx
push dword [ebp - 0x30]
call ebx
test esi, esi
jne 0x404d2f
imul eax, edi, 0xd0
add eax, 0x14
push eax
push dword [ebp - 0x2c]
call fcn.0043b8ef
lea eax, [edi*4 + 0x14]
push eax
push dword [ebp - 0x30]
call fcn.0043b8ef
push dword [0x49d9fc]
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x404d3c
cmp dword [ebp - 0x24], esi
jne 0x404d01
call dword [sym.imp.USER32.dll_EmptyClipboard]
push 2
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
movzx ecx, word [0x49cd68]
mov edi, eax
push edi
push ecx
call dword [sym.imp.USER32.dll_SetClipboardData]
test eax, eax
jne 0x404d27
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
call dword [sym.imp.USER32.dll_CloseClipboard]
jmp 0x404d3c
push 0
push dword [0x49ec60]
call fcn.0043e0df
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00475d95
mov esp, ebp
pop ebp
ret 0x10