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

Disassembly:
sub esp, 0x28c
mov eax, dword [0x434020]
xor eax, esp
mov dword [esp + 0x284], eax
push ebx
push ebp
push esi
push edi
push 0x4c
xor esi, esi
lea eax, [esp + 0xa0]
mov ebx, ecx
push esi
push eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0xa4], 0x50
call sub.MSVCR80.dll_memset
mov eax, dword [ebx + 4]
mov ebp, dword [sym.imp.USER32.dll_SendMessageW]
add esp, 0xc
mov dword [esp + 0x9c], 0x10
mov edx, dword [eax + 0xc]
mov eax, dword [eax]
lea ecx, [esp + 0x98]
push ecx
push edx
push 0x41c
push eax
call ebp
mov edi, dword [esp + 0xb8]
push esi
push esi
push 0x418
push edi
call ebp
cmp eax, esi
mov dword [esp + 0x18], eax
jle 0x415896
push esi
push esi
push 0x52e
push edi
call ebp
cmp eax, esi
setne cl
mov dword [esp + 0x24], eax
mov byte [ebx + 8], cl
call dword [sym.imp.USER32.dll_CreatePopupMenu]
lea edx, [esp + 0x58]
mov dword [esp + 0x14], eax
xor eax, eax
push edx
push edi
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
call dword [sym.imp.USER32.dll_GetClientRect]
cmp dword [esp + 0x18], esi
mov dword [esp + 0x20], esi
jle 0x415874
xor eax, eax
mov dword [esp + 0xec], eax
mov dword [esp + 0xf0], eax
mov dword [esp + 0xf4], eax
mov dword [esp + 0xf8], eax
mov dword [esp + 0xfc], eax
lea eax, [esp + 0xec]
push eax
push esi
push 0x417
push edi
call ebp
test byte [esp + 0xf4], 8
jne 0x41585f
lea ecx, [esp + 0x28]
push ecx
push esi
xor eax, eax
push 0x41d
push edi
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
call ebp
mov eax, dword [esp + 0xf4]
mov edx, dword [esp + 0x30]
mov bl, al
shr bl, 2
and bl, 1
cmp edx, dword [esp + 0x60]
jle 0x41585f
test ah, 1
je 0x4156d3
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.USER32.dll_GetMenuItemCount]
test eax, eax
jle 0x41585f
mov ecx, dword [esp + 0x14]
push 0
push 0
push 0x800
push ecx
call dword [sym.imp.USER32.dll_AppendMenuW]
jmp 0x41585f
mov edx, dword [esp + 0x1c]
cmp byte [edx + 8], 0
push 0x18e
lea eax, [esp + 0x106]
push 0
mov word [esp + 0x108], 0
push eax
je 0x415785
call sub.MSVCR80.dll_memset
push 0x30
lea ecx, [esp + 0x78]
push 0
push ecx
call sub.MSVCR80.dll_memset
add esp, 0x18
mov dword [esp + 0x68], 0x30
call fcn.00405610
test al, al
je 0x415729
mov dword [esp + 0x68], 0x2c
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x68]
push eax
push 1
push esi
lea edx, [esp + 0x10c]
push ecx
mov dword [esp + 0x7c], 0x14
mov dword [esp + 0x9c], edx
mov dword [esp + 0xa0], 0xc8
call dword [sym.imp.USER32.dll_GetMenuItemInfoW]
mov edx, dword [esp + 0x8c]
mov eax, dword [esp + 0x7c]
xor ecx, ecx
test bl, bl
sete cl
push edx
mov edx, dword [esp + 0x18]
push eax
or ecx, 0x10
push ecx
push edx
call dword [sym.imp.USER32.dll_AppendMenuW]
jmp 0x41585f
call sub.MSVCR80.dll_memset
xor eax, eax
add esp, 0xc
mov dword [esp + 0x3c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
lea edx, [esp + 0x38]
push edx
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0xf4]
push eax
lea esi, [esp + 0x108]
push 0x43f
mov ecx, esi
push edi
mov dword [esp + 0x48], 0x20
mov dword [esp + 0x4c], 2
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], 0xc8
call ebp
cmp eax, 0xffffffff
je 0x4157f7
mov ecx, esi
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jne 0x41583f
mov eax, dword [esp + 0xf0]
mov ecx, dword [0x43602c]
push 0xc8
lea edx, [esp + 0x104]
push edx
push eax
push ecx
mov esi, 0x42a364
call dword [sym.imp.USER32.dll_LoadStringW]
xor ecx, ecx
test eax, eax
jle 0x41583f
cmp word [esp + ecx*2 + 0x100], 0xa
je 0x415838
add ecx, 1
cmp ecx, eax
jl 0x415824
jmp 0x41583f
lea esi, [esp + ecx*2 + 0x102]
mov edx, dword [esp + 0xf0]
mov ecx, dword [esp + 0x14]
xor eax, eax
test bl, bl
sete al
push esi
push edx
push eax
push ecx
call dword [sym.imp.USER32.dll_AppendMenuW]
mov esi, dword [esp + 0x20]
add esi, 1
cmp esi, dword [esp + 0x18]
mov dword [esp + 0x20], esi
jl 0x415621
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
test eax, eax
jne 0x41589a
test esi, esi
je 0x41588e
push esi
call dword [sym.imp.USER32.dll_DestroyMenu]
push 0xffffffffffffffff
call dword [sym.imp.USER32.dll_MessageBeep]
xor al, al
jmp 0x41589e
mov dword [ebx], esi
mov al, 1
mov ecx, dword [esp + 0x294]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00424bfa
add esp, 0x28c
ret