Function at 0x1004bd80
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x100540ca
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov eax, dword [0x10080e78]
xor eax, esp
push eax
lea eax, [esp + 0x44]
mov dword fs:[0], eax
mov ebp, ecx
lea ecx, [esp + 0x30]
call fcn.10046f50
lea ecx, [esp + 0x1c]
mov dword [esp + 0x4c], 0
call fcn.10046f90
mov ecx, dword [esp + 0x58]
lea eax, [esp + 0x14]
push eax
push ecx
mov ecx, ebp
mov byte [esp + 0x54], 1
call sym.GuiTk115d.dll_protected:_class_CNewMenu____thiscall_CNewMenu::FindMenuOption_int__int__
mov ebx, dword [esp + 0x5c]
mov ecx, eax
mov dword [esp + 0x18], ecx
test ecx, ecx
je 0x1004be03
mov eax, dword [esp + 0x14]
test eax, eax
jl 0x1004be03
cmp eax, dword [ecx + 0x10]
jge 0x1004bf5e
mov edx, dword [ecx + 0xc]
mov esi, dword [edx + eax*4]
lea eax, [edx + eax*4]
jmp 0x1004be2b
push 0x28
call sub.mfc90.dll_Ordinal_798
add esp, 4
test eax, eax
je 0x1004be1a
mov ecx, eax
call fcn.10045f30
jmp 0x1004be1c
xor eax, eax
mov edx, dword [ebp + 0x10]
lea ecx, [ebp + 8]
push eax
push edx
mov esi, eax
call sub.mfc90.dll_Ordinal_6152
mov eax, dword [esp + 0x54]
test eax, eax
je 0x1004be3b
push eax
mov ecx, esi
call fcn.10045ff0
lea edi, [esi + 0x18]
mov dword [esi + 0x1c], ebx
mov dword [edi], 0xffffffff
test ebx, ebx
jl 0x1004beeb
mov eax, dword [esp + 0x58]
push edi
push ebx
push eax
mov ecx, ebp
mov dword [edi], 0
call sym.GuiTk115d.dll_public:_int___thiscall_CNewMenu::LoadFromToolBar_unsigned_int__unsigned_int__int__
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x1004be71
call sub.mfc90.dll_Ordinal_2100
jmp 0x1004be9b
push 8
call sub.mfc90.dll_Ordinal_798
add esp, 4
mov dword [esp + 0x5c], eax
mov byte [esp + 0x4c], 2
test eax, eax
je 0x1004be91
mov ecx, eax
call sub.mfc90.dll_Ordinal_436
jmp 0x1004be93
xor eax, eax
mov byte [esp + 0x4c], 1
mov dword [esi + 0x20], eax
mov ecx, dword [ebp + 0x34]
mov edx, dword [ebp + 0x30]
push 1
push 1
push 0xff
push ecx
mov ecx, dword [esi + 0x20]
push edx
call sub.mfc90.dll_Ordinal_1691
mov eax, dword [esi + 0x20]
push ebx
push eax
mov ecx, ebp
call sym.GuiTk115d.dll_public:_int___thiscall_CNewMenu::AddBitmapToImageList_class_CImageList___unsigned_int_
test eax, eax
jne 0x1004beeb
mov ecx, dword [esi + 0x20]
call sub.mfc90.dll_Ordinal_2100
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x1004bedc
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 1
call eax
or ebx, 0xffffffff
mov dword [esi + 0x20], 0
mov dword [esi + 0x1c], ebx
mov dword [edi], ebx
mov ecx, dword [esi + 0xc]
mov edi, dword [esp + 0x58]
mov edx, dword [esp + 0x18]
and ecx, 0xfffffbff
or ecx, 0x100
mov dword [esi + 0xc], ecx
mov dword [esi + 0x10], edi
mov eax, dword [esp + 0x38]
push edx
push eax
lea ecx, [esp + 0x38]
call fcn.10047310
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x14]
push ecx
push edx
lea ecx, [esp + 0x24]
call fcn.10047180
cmp dword [esp + 0x18], 0
je 0x1004bf63
cmp dword [esp + 0x14], 0
jl 0x1004bf63
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x1c]
push edx
push edi
mov ecx, ebp
call sym.GuiTk115d.dll_protected:_class_CNewMenu____thiscall_CNewMenu::FindAnotherMenuOption_int__int___class_CArray_class_CNewMenu___class_CNewMenu_____class_CArray_int__int____
mov dword [esp + 0x18], eax
test eax, eax
je 0x1004bf63
mov ecx, eax
jmp 0x1004bde3
call sub.mfc90.dll_Ordinal_1252
mov eax, dword [esi + 0xc]
push esi
push edi
push eax
mov eax, dword [ebp + 4]
push edi
push eax
call dword [sym.imp.USER32.dll_ModifyMenuA]
lea ecx, [esp + 0x1c]
mov esi, eax
mov byte [esp + 0x4c], 0
call fcn.10046fb0
lea ecx, [esp + 0x30]
mov dword [esp + 0x4c], 0xffffffff
call fcn.10046f70
mov eax, esi
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret 0xc