Function at 0x412b77
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push 0xa0
mov eax, 0x416f11
call fcn.00416e24
mov esi, ecx
mov dword [ebp - 0x6c], esi
mov eax, dword [ebp + 8]
mov dword [ebp - 0x74], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x70], eax
call dword [sym.imp.USER32.dll_CreatePopupMenu]
mov edi, eax
mov ebx, edi
mov dword [ebp - 0x7c], edi
neg ebx
sbb ebx, ebx
and ebx, 0x7ff8fff2
add ebx, 0x8007000e
test edi, edi
je 0x412f7c
push 8
push 0x28
call dword [sym.imp.COMCTL32.dll_DSA_Create]
mov ecx, dword [ebp - 0x70]
mov ebx, eax
neg ebx
sbb ebx, ebx
and ebx, 0x7ff8fff2
mov dword [ecx], eax
add ebx, 0x8007000e
test eax, eax
je 0x412f75
mov eax, dword [esi + 8]
lea ecx, [ebp - 0x78]
push ecx
push 0x40b1a4
push 0x401620
mov esi, dword [eax]
push 0
push eax
mov ecx, dword [esi + 0xc]
call dword [0x419350]
call dword [esi + 0xc]
mov ebx, eax
mov dword [ebp - 0x50], ebx
test ebx, ebx
js 0x412f75
xor eax, eax
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x98], eax
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], eax
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea ecx, [ebp - 0xa4]
call fcn.0040d6af
cmp eax, 0x80070005
jne 0x412ca6
mov esi, dword [ebp - 0x6c]
mov edi, 0x40a080
push edi
push 0
mov eax, dword [esi + 0x10]
mov dword [eax + 0x7104], 2
push dword [esi + 0x10]
call fcn.0040bc18
push edi
push 1
push dword [esi + 0x10]
call fcn.0040bc18
add esp, 0x18
mov ecx, dword [ebp - 0x68]
mov dword [ebp - 0x5c], 0x7901
mov eax, dword [ecx]
dec eax
mov dword [ebp - 0x64], eax
test eax, eax
js 0x412ea1
push eax
push ecx
call dword [sym.imp.COMCTL32.dll_DSA_GetItemPtr]
mov esi, eax
lea edi, [ebp - 0x20]
xor eax, eax
inc eax
mov dword [ebp - 0x58], eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor edi, edi
xor esi, esi
mov dword [ebp - 0x60], edi
mov dword [ebp - 0x54], esi
test ebx, ebx
js 0x412e8f
test eax, eax
je 0x412e8c
cmp esi, dword [ebp + 0xc]
jae 0x412e8c
push dword [ebp - 0x64]
push dword [ebp - 0x68]
call dword [sym.imp.COMCTL32.dll_DSA_GetItemPtr]
test eax, eax
je 0x412e7d
lea ecx, [ebp - 0x4c]
push ecx
push 0x40b208
push 0x401
push 0
push eax
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x412e7d
lea eax, [ebp - 0xac]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [ebp - 0x74]
mov ecx, dword [ebp - 0x4c]
push dword [eax + esi*4]
push dword [ebp - 0x78]
call fcn.0040d622
test eax, eax
js 0x412dff
mov ebx, dword [ebp - 0x7c]
push ebx
call dword [sym.imp.USER32.dll_GetMenuItemCount]
mov ecx, dword [ebp - 0x4c]
push 0
push 0x7aff
push dword [ebp - 0x5c]
mov esi, dword [ecx]
push edi
push ebx
push ecx
mov ecx, dword [esi + 0xc]
mov dword [ebp - 0x50], eax
call dword [0x419350]
call dword [esi + 0xc]
movzx ecx, ax
test eax, eax
js 0x412dfa
test ecx, ecx
je 0x412dfa
mov eax, dword [ebp - 0x5c]
add eax, ecx
cmp eax, 0x7aff
jbe 0x412da7
mov ecx, dword [ebp - 0x6c]
lea eax, [ebp - 0x20]
push 0
push eax
call fcn.00412996
and dword [ebp - 0x58], 0
jmp 0x412dff
mov dword [ebp - 0x5c], eax
lea edx, [ebp - 0x20]
mov esi, 0x40b4cc
xor ecx, ecx
mov eax, dword [edx + ecx*4]
cmp eax, dword [esi + ecx*4]
jne 0x412de3
inc ecx
cmp ecx, 4
jne 0x412db4
push 0
push 1
push ebx
call dword [sym.imp.USER32.dll_GetMenuDefaultItem]
cmp eax, 0xffffffff
je 0x412dff
push ebx
call dword [sym.imp.USER32.dll_GetMenuItemCount]
sub eax, dword [ebp - 0x50]
add edi, eax
mov dword [ebp - 0x60], edi
jmp 0x412dff
test edi, edi
jne 0x412dfa
push edi
xor esi, esi
inc esi
push esi
push ebx
call dword [sym.imp.USER32.dll_GetMenuDefaultItem]
test eax, eax
jne 0x412dfa
mov dword [ebp - 0x60], esi
xor eax, eax
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x4c]
lea esi, [ebp - 0x20]
mov dword [ebp - 0x48], eax
lea edi, [ebp - 0x44]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x28]
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [ebp - 0xac]
and dword [ebp - 0x34], 0
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x70]
push 0x7fffffff
push dword [eax]
call dword [sym.imp.COMCTL32.dll_DSA_InsertItem]
cmp eax, 0xffffffff
je 0x412e5f
mov eax, dword [ebp - 0x4c]
xor ebx, ebx
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 4]
mov ecx, esi
call dword [0x419350]
call esi
jmp 0x412e64
mov ebx, 0x8007000e
mov eax, dword [ebp - 0x4c]
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x419350]
call esi
mov edi, dword [ebp - 0x60]
mov esi, dword [ebp - 0x54]
mov eax, dword [ebp - 0x58]
inc esi
mov dword [ebp - 0x54], esi
test ebx, ebx
jns 0x412ce7
mov dword [ebp - 0x50], ebx
mov eax, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x68]
dec eax
mov dword [ebp - 0x64], eax
test ebx, ebx
jns 0x412cb6
lea ecx, [ebp - 0xa4]
call fcn.0040d9c5
mov eax, dword [ebp - 0x8c]
mov edi, dword [ebp - 0x88]
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x74], eax
test eax, eax
je 0x412f33
mov ebx, dword [ebp - 0x6c]
xor esi, esi
mov eax, dword [ebp - 0x70]
mov eax, dword [eax]
test eax, eax
je 0x412ed4
mov ecx, dword [eax]
jmp 0x412ed6
xor ecx, ecx
cmp esi, ecx
jge 0x412f30
push esi
push eax
call dword [sym.imp.COMCTL32.dll_DSA_GetItemPtr]
xor edx, edx
test edi, edi
je 0x412f2d
mov ecx, dword [ebp - 0x74]
add ecx, 0x10
mov edi, dword [eax + 0x1c]
cmp edi, dword [ecx + 4]
mov edi, dword [ecx]
jg 0x412f10
jl 0x412eff
cmp dword [eax + 0x18], edi
jae 0x412f10
mov edi, dword [ecx + 4]
cmp dword [eax + 0x24], edi
mov edi, dword [ecx]
jg 0x412f1d
jl 0x412f10
cmp dword [eax + 0x20], edi
ja 0x412f1d
mov edi, dword [ebp - 0x54]
inc edx
add ecx, 0x68
cmp edx, edi
jb 0x412eee
jmp 0x412f2d
push 2
add eax, 4
mov ecx, ebx
push eax
call fcn.00412996
mov edi, dword [ebp - 0x54]
inc esi
jmp 0x412ec7
mov ebx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x78]
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x419350]
call esi
lea ecx, [ebp - 0xa4]
mov dword [ebp - 4], 1
call fcn.0040d9c5
cmp dword [ebp - 0x8c], 0
je 0x412f6e
push dword [ebp - 0x8c]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
or dword [ebp - 4], 0xffffffff
mov edi, dword [ebp - 0x7c]
push edi
call dword [sym.imp.USER32.dll_DestroyMenu]
mov eax, ebx
call fcn.00416de2
ret 0x10