Function at 0x1004cb25
Capabilities:
Check for peb ntglobalflag flag

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100c291f
mov eax, dword fs:[0]
push eax
sub esp, 0x58
push ebx
push esi
push edi
mov eax, dword [0x1010f048]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
mov ebx, ecx
xor esi, esi
mov edi, ebx
neg edi
lea eax, [ebx + 0x70]
sbb edi, edi
and edi, eax
push edi
lea eax, [esp + 0x18]
lea ecx, [esp + 0x28]
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
call fcn.10029aa1
pop ecx
mov ecx, dword [ebx + 0xb0]
lea edx, [esp + 0x2c]
push edx
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
mov eax, dword [ecx]
push ebx
call dword [eax + 0x2c]
fld dword [esp + 0x24]
fadd dword [esp + 0x1c]
mov eax, dword [ebx + 0x64]
dec eax
fstp dword [esp + 0x1c]
fld dword [esp + 0x28]
fadd dword [esp + 0x20]
fstp dword [esp + 0x20]
fld dword [esp + 0x24]
fadd dword [esp + 0x2c]
fstp dword [esp + 0x2c]
fld dword [esp + 0x28]
fadd dword [esp + 0x30]
fstp dword [esp + 0x30]
je 0x1004cc56
mov eax, dword [ebx + 0x20]
push esi
push 0x1011053c
push 0x1010f060
push esi
push eax
call sub.MSVCR80.dll___RTDynamicCast
add esp, 0x14
cmp eax, esi
mov dword [esp + 0x14], eax
jne 0x1004cc03
push 3
pop eax
jmp fcn.1000bbb8
push 1
push 0x14
mov ecx, edi
call fcn.1002945e
pop ecx
pop ecx
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
lea edx, [esp + 0x2c]
push edx
lea edx, [esp + 0x20]
push edx
call dword [eax + 0x68]
push 1
push 0x15
mov ecx, edi
call fcn.1002945e
mov eax, esp
mov dword [esp + 0x1c], esp
push eax
call fcn.1000f14e
pop ecx
call fcn.10028bcc
pop ecx
pop ecx
add ebx, 0x120
mov edx, dword [ebx]
push eax
push esi
mov ecx, ebx
call dword [edx + 0x14]
jmp 0x1004cd51
push ebx
call fcn.10049f5f
pop ecx
push eax
lea edi, [esp + 0x28]
call fcn.10012c22
mov dword [esp + 0x70], esi
mov eax, dword [esp + 0x24]
cmp dword [eax], esi
je 0x1004cd43
mov ecx, dword [esp + 0x2c]
sub esp, 0x10
mov eax, esp
mov dword [esp + 0x60], 0x14
mov dword [eax], ecx
mov ecx, dword [esp + 0x40]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x44]
mov dword [eax + 8], ecx
mov ecx, dword [esp + 0x48]
mov dword [eax + 0xc], ecx
lea eax, [esp + 0x4c]
mov dword [esp + 0x24], esp
push eax
call fcn.100117c9
mov esi, eax
mov eax, dword [esp + 0x34]
lea edi, [esp + 0x68]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
add esp, 0x10
movsd dword es:[edi], dword [esi]
mov dword [esp], eax
call fcn.1001186d
mov edi, eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call fcn.1001186d
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x28]
mov esi, dword [eax]
pop ecx
lea eax, [esp + 0x50]
lea ecx, [ebx + 0x70]
push eax
mov eax, dword [ecx]
call dword [eax + 0x130]
push eax
push edi
push dword [esp + 0x20]
push 0x180
push esi
call dword [sym.imp.USER32.dll_TrackPopupMenuEx]
test eax, eax
je 0x1004cd43
cmp eax, 0x36b0
jb 0x1004cd43
lea esi, [eax - 0x36b0]
mov eax, ebx
call fcn.10028fd5
cmp esi, eax
jae 0x1004cd43
push esi
mov edi, ebx
lea eax, [esp + 0x18]
call fcn.100290ea
mov eax, dword [esp + 0x18]
mov edi, dword [eax]
mov eax, dword [ebx]
pop ecx
push edi
mov ecx, ebx
call dword [eax + 0x48]
cmp dword [ebx + 0x64], 1
jne 0x1004cd43
call fcn.10029e1b
or dword [esp + 0x70], 0xffffffff
lea eax, [esp + 0x24]
call fcn.10081438
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret