Function at 0x40f700
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4d1728
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push ebp
mov ebp, dword [sym.imp.USER32.dll_CreatePopupMenu]
push edi
mov dword [esp + 0xc], ecx
call ebp
mov edi, dword [esp + 0x30]
push eax
mov ecx, edi
call fcn.004a97f9
xor ebx, ebx
cmp eax, ebx
jne 0x40f74f
pop edi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret 8
mov eax, dword [esp + 0x34]
push esi
mov esi, dword [sym.imp.USER32.dll_InsertMenuA]
cmp eax, ebx
je 0x40f8e7
mov eax, dword [0x510634]
mov dword [esp + 0x34], eax
push 0xef43
lea ecx, [esp + 0x38]
mov dword [esp + 0x30], ebx
call fcn.004aafb2
lea ecx, [esp + 0x34]
push str...._tCtrlD
lea edx, [esp + 0x3c]
push ecx
push edx
call fcn.004a93fe
mov eax, dword [eax]
push eax
mov eax, dword [edi + 4]
push 0x803e
push ebx
push ebx
push eax
call esi
lea ecx, [esp + 0x38]
call fcn.004a9169
push 0xef44
lea ecx, [esp + 0x38]
call fcn.004aafb2
lea ecx, [esp + 0x34]
push 0x50e198
lea edx, [esp + 0x3c]
push ecx
push edx
call fcn.004a93fe
mov eax, dword [eax]
push eax
mov eax, dword [edi + 4]
push 0x8043
push ebx
push 1
push eax
call esi
lea ecx, [esp + 0x38]
call fcn.004a9169
mov dword [esp + 0x14], vtable.CMenu.0
mov dword [esp + 0x18], ebx
mov byte [esp + 0x2c], 1
call ebp
push eax
lea ecx, [esp + 0x18]
call fcn.004a97f9
cmp eax, ebx
push 0xef48
lea ecx, [esp + 0x38]
je 0x40f874
call fcn.004aafb2
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x18]
push ecx
push 0x8081
push ebx
push ebx
push edx
call esi
push 0xef49
lea ecx, [esp + 0x38]
call fcn.004aafb2
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x18]
push eax
push 0x8082
push ebx
push 1
push ecx
call esi
push 0xef4a
lea ecx, [esp + 0x38]
call fcn.004aafb2
mov ebp, dword [esp + 0x34]
lea ecx, [esp + 0x14]
call fcn.004a9826
mov edx, dword [edi + 4]
push ebp
push eax
push 0x410
push 0xffffffffffffffff
push edx
jmp 0x40f8ab
call fcn.004aafb2
mov eax, dword [esp + 0x34]
mov ecx, dword [edi + 4]
push eax
push 0x8081
push ebx
push 2
push ecx
call esi
push 0xef49
lea ecx, [esp + 0x38]
call fcn.004aafb2
mov edx, dword [esp + 0x34]
mov eax, dword [edi + 4]
push edx
push 0x8082
push ebx
push 3
push eax
call esi
mov ecx, dword [edi + 4]
push 0x515d3c
push ebx
push 0x800
push 4
push ecx
call esi
mov dword [esp + 0x14], vtable.CMenu.0
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c], 2
call fcn.004a9850
lea ecx, [esp + 0x34]
mov dword [esp + 0x2c], 0xffffffff
call fcn.004a9169
mov edx, dword [esp + 0x10]
mov ebp, dword [edx + 0x18]
cmp ebp, ebx
je 0x40f987
mov eax, ebp
mov ebp, dword [ebp]
mov ebx, dword [eax + 8]
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x40f919
mov ecx, dword [ebx + 4]
mov edx, dword [edi + 4]
push ecx
push eax
push 0x400
push 0xffffffffffffffff
push edx
call esi
jmp 0x40f97f
mov dword [esp + 0x1c], vtable.CMenu.0
mov dword [esp + 0x20], 0
lea eax, [esp + 0x1c]
push 0
push eax
mov ecx, ebx
mov dword [esp + 0x34], 3
call fcn.0040f700
test eax, eax
je 0x40f95e
mov ebx, dword [ebx + 4]
lea ecx, [esp + 0x1c]
call fcn.004a9826
mov ecx, dword [edi + 4]
push ebx
push eax
push 0x410
push 0xffffffffffffffff
push ecx
call esi
mov dword [esp + 0x1c], vtable.CMenu.0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x2c], 4
call fcn.004a9850
mov dword [esp + 0x2c], 0xffffffff
test ebp, ebp
jne 0x40f8f6
mov ecx, dword [esp + 0x24]
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x20
ret 8