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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xdc
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea esi, [edi + 4]
push dword [esi]
mov dword [esp + 0x18], esi
call dword [sym.imp.USER32.dll_IsWindow]
xor ebx, ebx
test eax, eax
jne 0x40808c
push str.::IsWindow_m_hWnd_
push ebx
push 0x1f3
push str.E:MyGitmylibraryPeMemoryRunPeMemoryRun2wtl_atlctrlw.h
push 2
call fcn.00415b00
add esp, 0x14
cmp eax, 1
jne 0x40808c
int3
cmp dword [ebp + 0xc], ebx
je 0x4080d1
push dword [ebp + 0xc]
mov esi, dword [sym.imp.USER32.dll_IsMenu]
call esi
test eax, eax
jne 0x4080c0
push str.hMenu__0__::IsMenu_hMenu_
push ebx
push 0x1f4
push str.E:MyGitmylibraryPeMemoryRunPeMemoryRun2wtl_atlctrlw.h
push 2
call fcn.00415b00
add esp, 0x14
cmp eax, 1
jne 0x4080c0
int3
push dword [ebp + 0xc]
call esi
test eax, eax
je 0x408406
mov esi, dword [esp + 0x14]
test byte [edi + 0x86], 1
je 0x4080e4
cmp dword [edi + 0x44], ebx
je 0x4080e4
call fcn.0040b1b0
mov eax, dword [edi + 0x44]
cmp eax, ebx
je 0x4080f8
test byte [edi + 0x58], 2
jne 0x4080f8
push eax
call dword [sym.imp.USER32.dll_DestroyMenu]
test byte [edi + 0x84], 2
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x44], eax
jne 0x408403
push ebx
call fcn.00404f42
mov esi, dword [esp + 0x14]
push dword [esi]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x408141
push str.::IsWindow_m_hWnd_
push ebx
push 0x150a
push str.E:MyGitmylibraryPeMemoryRunPeMemoryRun2wtl_atlctrls.h
push 2
call fcn.00415b00
add esp, 0x14
cmp eax, 1
jne 0x408141
int3
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
push ebx
push ebx
push 0x418
push dword [esi]
call edi
cmp eax, ebx
jle 0x4081bb
mov dword [esp + 0x10], eax
push dword [esi]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x408186
push str.::IsWindow_m_hWnd_
push ebx
push 0x1730
push str.E:MyGitmylibraryPeMemoryRunPeMemoryRun2wtl_atlctrls.h
push 2
call fcn.00415b00
add esp, 0x14
cmp eax, 1
jne 0x408186
int3
push ebx
push ebx
push 0x416
push dword [esi]
call edi
test eax, eax
jne 0x4081b5
push str.DeleteButton_0____0
push ebx
push 0x210
push str.E:MyGitmylibraryPeMemoryRunPeMemoryRun2wtl_atlctrlw.h
push 2
call fcn.00415b00
add esp, 0x14
cmp eax, 1
jne 0x4081b5
int3
dec dword [esp + 0x10]
jne 0x40815a
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x44]
cmp eax, ebx
je 0x4083f2
push eax
call dword [sym.imp.USER32.dll_GetMenuItemCount]
push 0x63
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x85]
push ebx
push eax
mov byte [esp + 0x8c], bl
call fcn.00416960
add esp, 0xc
mov dword [esp + 0x10], ebx
cmp dword [esp + 0x18], ebx
jle 0x4083f2
jmp 0x408201
mov edi, dword [ebp + 8]
lea esi, [esp + 0x30]
call fcn.0040538c
lea eax, [esp + 0x80]
mov dword [esp + 0x54], eax
mov eax, esi
push eax
push 1
push dword [esp + 0x18]
mov dword [esp + 0x40], 0x15
push dword [edi + 0x44]
mov dword [esp + 0x48], ebx
mov dword [esp + 0x68], 0x64
call dword [sym.imp.USER32.dll_GetMenuItemInfoA]
mov esi, str.E:MyGitmylibraryPeMemoryRunPeMemoryRun2wtl_atlctrlw.h
test eax, eax
jne 0x408260
push str.bRet
push ebx
push 0x222
push esi
push 2
call fcn.00415b00
add esp, 0x14
cmp eax, 1
jne 0x408260
int3
lea eax, [esp + 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 0x63
jle 0x408296
lea eax, [esp + 0x30]
push eax
push 1
push dword [esp + 0x18]
mov dword [esp + 0x44], 4
push dword [edi + 0x44]
call dword [sym.imp.USER32.dll_SetMenuItemInfoA]
mov byte [esp + 0x80], bl
cmp dword [esp + 0x44], ebx
jne 0x4082b8
push str.mii.hSubMenu___0
push ebx
push 0x22c
push esi
push 2
call fcn.00415b00
add esp, 0x14
cmp eax, 1
jne 0x4082b8
int3
xor eax, eax
test byte [esp + 0x3c], 3
lea edi, [esp + 0x20]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
push dword [edi]
mov dword [esp + 0x24], eax
setne al
dec al
and al, 4
mov dword [esp + 0x20], ebx
mov byte [esp + 0x28], al
mov byte [esp + 0x29], 0x18
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x40831b
push str.::IsWindow_m_hWnd_
push ebx
push 0x1707
push str.E:MyGitmylibraryPeMemoryRunPeMemoryRun2wtl_atlctrls.h
push 2
call fcn.00415b00
add esp, 0x14
cmp eax, 1
jne 0x40831b
int3
lea eax, [esp + 0x1c]
push eax
push 0xffffffffffffffff
push 0x415
push dword [edi]
call dword [sym.imp.USER32.dll_SendMessageA]
test eax, eax
jne 0x40834f
push str.bRet
push ebx
push 0x237
push esi
push 2
call fcn.00415b00
add esp, 0x14
cmp eax, 1
jne 0x40834f
int3
push 7
pop ecx
xor eax, eax
lea edi, [esp + 0x64]
rep stosd dword es:[edi], eax
push 2
lea eax, [esp + 0x84]
pop edi
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x14]
push dword [eax]
mov dword [esp + 0x64], 0x20
mov dword [esp + 0x68], edi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x4083a3
push str.::IsWindow_m_hWnd_
push ebx
push 0x15e5
push str.E:MyGitmylibraryPeMemoryRunPeMemoryRun2wtl_atlctrls.h
push edi
call fcn.00415b00
add esp, 0x14
cmp eax, 1
jne 0x4083a3
int3
lea eax, [esp + 0x60]
push eax
push dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
push 0x442
push dword [eax]
call dword [sym.imp.USER32.dll_SendMessageA]
test eax, eax
jne 0x4083dc
push str.bRet
push ebx
push 0x23f
push esi
push edi
call fcn.00415b00
add esp, 0x14
cmp eax, 1
jne 0x4083dc
int3
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x18]
jl 0x4081fe
mov esi, dword [esp + 0x14]
push 1
call fcn.00404f42
call fcn.00404f84
call fcn.00404f0d
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8