Function at 0x475a80
Capabilities:
Open clipboard

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, ecx
push esi
mov esi, edx
push edi
mov ecx, dword [ebx]
mov dword [ebp - 0xc], esi
test ecx, ecx
je 0x475ca3
mov eax, dword [ecx]
call dword [eax + 0x78]
mov ecx, dword [ebx]
test ecx, ecx
je 0x475ca3
mov eax, dword [ecx]
call dword [eax + 0x78]
test eax, eax
je 0x475ca3
mov ecx, dword [ebx]
test ecx, ecx
je 0x475ac3
mov eax, dword [ecx]
call dword [eax + 0x78]
jmp 0x475ac5
xor eax, eax
push dword [ebp + 8]
mov ecx, eax
push esi
call fcn.0047acb0
mov edi, eax
xor esi, esi
test edi, edi
je 0x475aeb
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0x10]
push 0
mov esi, eax
call fcn.004bf8aa
add esp, 4
push 0
call dword [sym.imp.USER32.dll_CreatePopupMenu]
push eax
mov edx, 0xb
mov ecx, 0x568d98
call fcn.00474f90
add esp, 8
mov dword [ebp - 8], eax
test edi, edi
je 0x475b1f
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 4]
test eax, eax
jne 0x475b1c
test esi, esi
jne 0x475b2d
mov eax, dword [ebp - 8]
push 0
push 0x1ac
push eax
call dword [sym.imp.USER32.dll_RemoveMenu]
test edi, edi
je 0x475b41
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
cmp eax, 2
jne 0x475b41
test esi, esi
jne 0x475b51
push 0
push 0x1ad
push dword [ebp - 8]
call dword [sym.imp.USER32.dll_RemoveMenu]
test edi, edi
je 0x475b61
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
cmp eax, 1
je 0x475b71
push 0
push 0x1ab
push dword [ebp - 8]
call dword [sym.imp.USER32.dll_RemoveMenu]
mov eax, dword [ebx + 0x58]
cmp dword [eax + 0x80], 0
jne 0x475b8d
push 1
push 0x1a4
push dword [ebp - 8]
call dword [sym.imp.USER32.dll_EnableMenuItem]
mov edx, dword [ebp - 8]
mov ecx, ebx
push 1
call fcn.00475510
mov ecx, dword [ebx]
add esp, 4
mov eax, dword [ecx]
mov eax, dword [eax + 0x40]
call eax
xor ecx, ecx
test al, al
sete cl
push ecx
push 0x1a1
push dword [ebp - 8]
call dword [sym.imp.USER32.dll_EnableMenuItem]
movzx eax, byte [ebx + 0x95]
neg eax
sbb eax, eax
and eax, 8
push eax
push 0x1a1
push dword [ebp - 8]
call dword [sym.imp.USER32.dll_CheckMenuItem]
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
push 1
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push eax
push 0
push dword [ebx + 0x60]
call dword [sym.imp.USER32.dll_MapWindowPoints]
push 0
push dword [ebx + 0x5c]
push 0
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push 0x102
push dword [ebp - 8]
call dword [sym.imp.USER32.dll_TrackPopupMenu]
lea ecx, [eax - 0x192]
cmp ecx, 0x1b
ja case.0x475c22.404
movzx ecx, byte [ecx + 0x475cbc]
jmp dword [ecx*4 + 0x475cac]
push 0
push eax
push 0x111
push dword [ebx + 0x5c]
call dword [sym.imp.USER32.dll_SendMessageW]
jmp case.0x475c22.404
xor dl, dl
mov ecx, esi
call fcn.00417af0
jmp case.0x475c22.404
test edi, edi
je case.0x475c22.404
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x18]
mov ebx, eax
test ebx, ebx
je case.0x475c22.404
mov eax, dword [ebx]
push 0
mov dword [ebp - 0xc], eax
call dword [sym.imp.USER32.dll_OpenClipboard]
test eax, eax
je 0x475c7d
call dword [sym.imp.USER32.dll_EmptyClipboard]
mov ecx, dword [ebp - 0xc]
call fcn.00417b90
call dword [sym.imp.USER32.dll_CloseClipboard]
push ecx
mov ecx, ebx
call fcn.00401610
push dword [ebp - 8]
call dword [sym.imp.USER32.dll_DestroyMenu]
test edi, edi
je 0x475c9a
mov eax, dword [edi]
mov ecx, edi
push 1
call dword [eax]
push esi
call fcn.004bf8aa
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret