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

Disassembly:
sub esp, 0x188
mov eax, dword [0x50fb70]
xor eax, esp
mov dword [esp + 0x184], eax
cmp dword [esp + 0x190], 0x4e
push ebx
push esi
mov esi, dword [esp + 0x1a0]
mov ebx, ecx
jne 0x4a1051
mov eax, dword [esi]
mov ecx, dword [ebx]
cmp eax, ecx
je 0x4a0d97
cmp eax, dword [ebx + 8]
je 0x4a0d97
cmp dword [esi + 8], 0xfffffdee
jne 0x4a1051
mov edx, dword [esi + 8]
cmp edx, 0xfffffdee
jne 0x4a0db1
push esi
mov ecx, ebx
call fcn.0049fee0
mov al, 1
jmp 0x4a1053
cmp eax, ecx
jne 0x4a0de4
cmp edx, 0xfffffd3c
je 0x4a0dcf
lea ecx, [edx + 0x2c3]
cmp ecx, 1
ja 0x4a0de4
mov al, 1
jmp 0x4a1053
mov ecx, ebx
call fcn.0049f6e0
mov ecx, ebx
call fcn.004a03f0
mov al, 1
jmp 0x4a1053
mov ecx, dword [ebx + 8]
cmp eax, ecx
jne 0x4a1051
cmp edx, 0xfffffcb7
je 0x4a0e21
cmp edx, 0xfffffcbc
je 0x4a0e15
cmp edx, 0xfffffcc1
jne 0x4a1051
call fcn.004b79b0
jmp 0x4a1051
mov ecx, ebx
call fcn.004a05b0
jmp 0x4a1051
mov eax, dword [esi + 0xc]
push edi
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
lea edx, [esp + 0x5c]
push edx
push eax
push 0x409
push ecx
call edi
test eax, eax
je 0x4a1050
mov edx, dword [ebx]
mov ecx, dword [esi + 0x18]
push ebp
push 0
push 0
push 0x418
push edx
mov dword [esp + 0x78], ecx
call edi
mov ebp, eax
xor esi, esi
mov dword [esp + 0x14], ebp
test ebp, ebp
jle 0x4a104f
mov edi, dword [sym.imp.USER32.dll_IntersectRect]
lea ecx, [ecx]
mov ecx, dword [ebx]
lea eax, [esp + 0x50]
push eax
push esi
push 0x41d
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
je 0x4a0ea7
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x78]
push ecx
call edi
test eax, eax
je 0x4a0eb1
mov edx, dword [esp + 0x78]
cmp edx, dword [esp + 0x58]
jne 0x4a0eb1
inc esi
cmp esi, ebp
jl 0x4a0e70
jmp 0x4a104f
call dword [sym.imp.USER32.dll_CreatePopupMenu]
cmp esi, ebp
mov edi, eax
mov dword [esp + 0x10], esi
jge 0x4a101f
mov esi, dword [sym.imp.USER32.dll_InsertMenuItemW]
mov ebp, dword [sym.imp.USER32.dll_SetMenuItemInfoW]
mov ecx, dword [esp + 0x10]
mov edx, dword [ebx]
lea eax, [esp + 0x80]
push eax
push ecx
push 0x417
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
je 0x4a101f
mov al, byte [esp + 0x88]
test al, 4
je 0x4a100c
test al, 8
jne 0x4a100c
mov ecx, dword [esp + 0x84]
mov edx, dword [ebx]
lea eax, [esp + 0x94]
push eax
push ecx
push 0x44b
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
cmp eax, 0xffffffff
jne 0x4a0f91
mov edx, dword [esp + 0x84]
xor eax, eax
mov word [esp + 0x94], ax
xor ecx, ecx
cmp edx, dword [eax + 0x50f128]
je 0x4a0f59
add eax, 0x38
inc ecx
cmp eax, 0x460
jb 0x4a0f41
jmp 0x4a100c
lea edx, [ecx*8]
sub edx, ecx
mov eax, dword [edx*8 + 0x50f134]
push eax
call fcn.004610c0
lea edx, [esp + 0x94]
movzx ecx, word [eax]
mov word [edx], cx
add eax, 2
add edx, 2
test cx, cx
jne 0x4a0f76
cmp word [esp + 0x94], cx
je 0x4a100c
push 0x30
lea ecx, [esp + 0x24]
push 0
push ecx
call fcn.004e01d0
mov edx, dword [esp + 0x90]
lea eax, [esp + 0xa0]
mov dword [esp + 0x3c], edx
add esp, 0xc
mov dword [esp + 0x20], 0x30
mov dword [esp + 0x24], 0x12
mov dword [esp + 0x28], 0
mov dword [esp + 0x44], eax
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4a0fd3
lea ecx, [esp + 0x20]
push ecx
push 1
sub eax, edx
push 0x3e8
sar eax, 1
push edi
mov dword [esp + 0x58], eax
call esi
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x20]
push edx
push 0
push eax
push edi
mov dword [esp + 0x38], 0x100
call ebp
mov eax, dword [esp + 0x10]
inc eax
cmp eax, dword [esp + 0x14]
mov dword [esp + 0x10], eax
jl 0x4a0ed1
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.USER32.dll_GetCursorPos]
mov edx, dword [0x5354dc]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
push 0
push edx
push 0
push eax
push ecx
push 2
push edi
call dword [sym.imp.USER32.dll_TrackPopupMenu]
push edi
call dword [sym.imp.USER32.dll_DestroyMenu]
pop ebp
pop edi
xor al, al
mov ecx, dword [esp + 0x18c]
pop esi
pop ebx
xor ecx, esp
call fcn.004df2c4
add esp, 0x188
ret 0x10