Function at 0x480968
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x1a8
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x1c]
push eax
call dword [sym.imp.USER32.dll_GetParent]
push eax
call fcn.004bd9fe
push eax
push 0x4dc830
call fcn.004c2a7e
mov ebx, eax
add esp, 8
test ebx, ebx
mov dword [esp + 0x20], ebx
je 0x480c02
mov ecx, dword [ebx + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push 0
push 0x40c
push ecx
call ebp
xor edi, edi
mov dword [esp + 0x10], eax
test eax, eax
jle 0x4809f6
mov eax, dword [ebx + 0x1c]
lea edx, [esp + 0x58]
push edx
push edi
push 0x41d
push eax
mov dword [esp + 0x68], 0x50
mov dword [esp + 0x6c], 0x10
call ebp
test esi, esi
jne 0x4809e0
xor eax, eax
jmp 0x4809e3
mov eax, dword [esi + 0x1c]
cmp dword [esp + 0x78], eax
je 0x4809f2
mov eax, dword [esp + 0x10]
inc edi
cmp edi, eax
jl 0x4809b7
mov eax, dword [esp + 0x10]
cmp edi, eax
je 0x480c02
mov edx, dword [ebx + 0x1c]
lea ecx, [esp + 0x28]
push ecx
push edi
push 0x409
push edx
call ebp
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
neg eax
neg ecx
push eax
lea edx, [esp + 0x2c]
push ecx
push edx
call dword [sym.imp.USER32.dll_OffsetRect]
call dword [sym.imp.USER32.dll_CreatePopupMenu]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x1c]
push 0
push 0
push 0x418
push eax
call ebp
mov edi, eax
xor ebx, ebx
test edi, edi
mov dword [esp + 0x24], edi
jle 0x480a95
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0xa8]
push ecx
push ebx
push 0x41d
push edx
call ebp
lea eax, [esp + 0x28]
lea ecx, [esp + 0xa8]
push eax
lea edx, [esp + 0x3c]
push ecx
push edx
call dword [sym.imp.USER32.dll_IntersectRect]
lea eax, [esp + 0xa8]
lea ecx, [esp + 0x38]
push eax
push ecx
call dword [sym.imp.USER32.dll_EqualRect]
test eax, eax
je 0x480a95
inc ebx
cmp ebx, edi
jl 0x480a4d
cmp ebx, edi
mov dword [esp + 0x10], 0
jge 0x480b92
lea edx, [esp + 0xb8]
push ebx
mov ecx, esi
mov dword [esp + 0x3c], 0x20
mov dword [esp + 0x40], 0x2f
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], 0x100
call fcn.004c65ab
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x38]
push ecx
push eax
push 0x441
push edx
call ebp
mov ecx, 0xb
xor eax, eax
lea edi, [esp + 0x58]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x58], 0x2c
test eax, eax
je 0x480b4f
mov cl, byte [esp + 0x48]
mov dword [esp + 0x5c], 0x13
test cl, 1
mov dword [esp + 0x60], 0
je 0x480b1c
or dword [esp + 0x64], 8
test cl, 4
jne 0x480b26
or dword [esp + 0x64], 3
mov dword [esp + 0x68], eax
lea ecx, [esp + 0xb8]
lea eax, [esp + 0xb8]
push ecx
mov dword [esp + 0x80], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [esp + 0x80], eax
jmp 0x480b67
mov eax, dword [esp + 0x10]
test eax, eax
je 0x480b85
mov dword [esp + 0x5c], 0x10
mov dword [esp + 0x60], 0x800
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x58]
mov eax, ecx
push edx
push 1
push eax
mov eax, dword [esp + 0x20]
inc ecx
push eax
mov dword [esp + 0x20], ecx
call dword [sym.imp.USER32.dll_InsertMenuItemA]
mov eax, dword [esp + 0x24]
inc ebx
cmp ebx, eax
jl 0x480aa5
mov eax, dword [esp + 0x1bc]
mov ecx, dword [eax + 0x18]
mov edx, dword [eax + 0x24]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x1c], edx
lea eax, [esp + 0x18]
mov edx, dword [ecx + 0x1c]
push eax
push edx
call dword [sym.imp.USER32.dll_ClientToScreen]
mov eax, dword [esi + 0x1c]
mov esi, dword [sym.imp.USER32.dll_GetParent]
push eax
call esi
push eax
call fcn.004bd9fe
mov ecx, dword [eax + 0x1c]
push ecx
call esi
push eax
call fcn.004bd9fe
test eax, eax
je 0x480bdf
mov eax, dword [eax + 0x1c]
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x14]
push 0
push eax
mov eax, dword [esp + 0x20]
push 0
push edx
push eax
push 0
push esi
call dword [sym.imp.USER32.dll_TrackPopupMenu]
push esi
call dword [sym.imp.USER32.dll_DestroyMenu]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret 8