Function at 0x402982
Capabilities:
Extract resource via kernel32 functions

Disassembly:
jmp 0x40c733
mov eax, 0x803a2d
call fcn.0072bca0
sub esp, 0x38
push ebx
push esi
push edi
push 4
push dword [ebp + 8]
mov esi, ecx
call sub.MFC42.DLL_AfxFindResourceHandle
mov edi, dword [sym.imp.KERNEL32.dll_FindResourceA]
push 4
push dword [ebp + 8]
mov ebx, eax
push ebx
call edi
test eax, eax
jne 0x40c771
push 4
xor ebx, ebx
push dword [ebp + 8]
push ebx
call edi
test eax, eax
je 0x40c798
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x40c798
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x24]
call dword [sym.imp.USER32.dll_CreateMenu]
push eax
mov ecx, esi
call sub.MFC42.DLL_CMenu::Attach
test eax, eax
jne 0x40c79f
xor eax, eax
jmp 0x40ca46
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
movzx ecx, word [eax + 2]
xor edi, edi
lea ebx, [ecx + eax + 4]
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], edi
call fcn.0072af9c
mov dword [ebp - 0x30], 0x81bc70
mov dword [ebp - 4], edi
mov dword [ebp - 0x44], 0x81bc58
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x3c], edi
push esi
lea ecx, [ebp - 0x30]
push dword [ebp - 0x28]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CPtrArray::SetAtGrow
push edi
lea ecx, [ebp - 0x44]
push dword [ebp - 0x3c]
call fcn.0040277a
jmp 0x40c7fb
xor edi, edi
push 2
lea eax, [ebp - 0x10]
push ebx
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
inc ebx
inc ebx
test byte [ebp - 0x10], 0x10
jne 0x40c825
push 2
lea eax, [ebp - 0x14]
push ebx
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
inc ebx
inc ebx
jmp 0x40c828
mov dword [ebp - 0x14], edi
movzx eax, word [ebp - 0x10]
test al, 0x80
mov dword [ebp + 8], eax
je 0x40c83a
sub dword [ebp + 8], 0x80
mov edi, dword [sym.imp.MSVCRT.dll_wcslen]
push ebx
call edi
lea eax, [eax + eax + 2]
push eax
call sub.MFC42.DLL_operatornew
push ebx
push eax
mov dword [ebp - 0x18], eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
push ebx
call edi
add esp, 0x14
lea ebx, [ebx + eax*2 + 2]
test byte [ebp - 0x10], 0x10
je 0x40c8fd
test byte [ebp - 0x10], 0x80
je 0x40c880
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x28]
mov dword [eax + ecx*4 - 4], 1
push 0x5c
call sub.MFC42.DLL_operatornew
pop ecx
mov dword [ebp - 0x1c], eax
test eax, eax
mov byte [ebp - 4], 2
je 0x40c89e
mov ecx, eax
call fcn.00401d43
mov edi, eax
jmp 0x40c8a0
xor edi, edi
mov eax, dword [esi + 0x50]
mov byte [ebp - 4], 1
mov dword [edi + 0x50], eax
mov eax, dword [esi + 0x4c]
mov dword [edi + 0x4c], eax
mov eax, dword [esi + 0x44]
mov dword [edi + 0x44], eax
mov dword [edi + 0x48], 1
call dword [sym.imp.USER32.dll_CreatePopupMenu]
push eax
mov ecx, edi
call sub.MFC42.DLL_CMenu::Attach
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
push 0xffffffffffffffff
push dword [edi + 4]
mov ecx, dword [ecx + eax*4 - 4]
push dword [ebp + 8]
push dword [ebp - 0x18]
call fcn.00402a6d
push edi
lea ecx, [ebp - 0x30]
push dword [ebp - 0x28]
call sub.MFC42.DLL_CPtrArray::SetAtGrow
push 0
lea ecx, [ebp - 0x44]
call fcn.00402a9f
jmp 0x40c968
movzx eax, word [ebp - 0x14]
mov ecx, dword [ebp - 0x28]
push 0xffffffffffffffff
push eax
mov eax, dword [ebp - 0x2c]
push dword [ebp + 8]
mov ecx, dword [eax + ecx*4 - 4]
push dword [ebp - 0x18]
call fcn.00402a6d
test byte [ebp - 0x10], 0x80
je 0x40c92d
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x28]
mov dword [eax + ecx*4 - 4], 1
mov eax, dword [ebp - 0x28]
lea edi, [eax - 1]
test edi, edi
jl 0x40c968
mov eax, dword [ebp - 0x40]
cmp dword [eax + edi*4], 0
je 0x40c968
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x28]
mov ecx, dword [eax + ecx*4 - 4]
call fcn.00401a91
push 1
push edi
lea ecx, [ebp - 0x30]
call sub.MFC42.DLL_CPtrArray::RemoveAt
push 1
push edi
lea ecx, [ebp - 0x44]
call fcn.00402383
dec edi
jns 0x40c937
push dword [ebp - 0x18]
call sub.MFC42.DLL_operatordelete
mov eax, dword [ebp - 0x28]
pop ecx
dec eax
cmp eax, 0xffffffff
jne 0x40c7f9
push dword [esi + 4]
xor ebx, ebx
call dword [sym.imp.USER32.dll_GetMenuItemCount]
test eax, eax
jle 0x40ca26
lea eax, [ebp + 8]
mov edi, ebx
push eax
mov eax, dword [esi + 0xc]
shl edi, 2
mov ecx, dword [edi + eax]
call fcn.00401f8c
push ebx
mov byte [ebp - 4], 3
push dword [esi + 4]
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call sub.MFC42.DLL_CMenu::FromHandle
test eax, eax
mov eax, dword [esi + 0xc]
je 0x40c9e5
mov eax, dword [edi + eax]
mov edi, 0x410
push ebx
mov dword [eax + 0x14], edi
push dword [esi + 4]
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call sub.MFC42.DLL_CMenu::FromHandle
push dword [ebp + 8]
mov eax, dword [eax + 4]
push eax
push edi
jmp 0x40c9fe
mov ecx, dword [edi + eax]
mov eax, 0x400
mov dword [ecx + 0x14], eax
mov ecx, dword [esi + 0xc]
push dword [ebp + 8]
mov ecx, dword [edi + ecx]
mov ecx, dword [ecx + 0x18]
push ecx
push eax
push ebx
push dword [esi + 4]
call dword [sym.imp.USER32.dll_ModifyMenuA]
lea ecx, [ebp + 8]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
push dword [esi + 4]
inc ebx
call dword [sym.imp.USER32.dll_GetMenuItemCount]
cmp ebx, eax
jl 0x40c991
and byte [ebp - 4], 0
push 1
pop edi
lea ecx, [ebp - 0x44]
mov dword [esi + 0x58], edi
call fcn.00401253
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x30]
call fcn.0072af90
mov eax, edi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4