Function at 0x4038e7
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x418149
call fcn.00417ad0
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 0x403925
push 4
xor ebx, ebx
push dword [ebp + 8]
push ebx
call edi
test eax, eax
je 0x40394c
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x40394c
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 0x403953
xor eax, eax
jmp 0x403bf0
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.00417470
mov dword [ebp - 0x30], 0x41ad24
mov dword [ebp - 4], edi
mov dword [ebp - 0x44], 0x41ad10
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.00406551
jmp 0x4039af
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 0x4039d9
push 2
lea eax, [ebp - 0x14]
push ebx
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
inc ebx
inc ebx
jmp 0x4039dc
mov dword [ebp - 0x14], edi
movzx eax, word [ebp - 0x10]
test al, 0x80
mov dword [ebp + 8], eax
je 0x4039ee
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 0x403ab1
test byte [ebp - 0x10], 0x80
je 0x403a34
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x28]
mov dword [eax + ecx*4 - 4], 1
push 0x54
call sub.MFC42.DLL_operatornew
pop ecx
mov dword [ebp - 0x1c], eax
test eax, eax
mov byte [ebp - 4], 2
je 0x403a52
mov ecx, eax
call fcn.00401541
mov edi, eax
jmp 0x403a54
xor edi, edi
mov eax, dword [esi + 0x48]
mov byte [ebp - 4], 1
mov dword [edi + 0x48], eax
mov eax, dword [esi + 0x44]
mov dword [edi + 0x44], eax
mov eax, dword [esi + 0x3c]
mov dword [edi + 0x3c], eax
mov dword [edi + 0x40], 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.0040361a
push edi
lea ecx, [ebp - 0x30]
push dword [ebp - 0x28]
call sub.MFC42.DLL_CPtrArray::SetAtGrow
push 0
lea ecx, [ebp - 0x44]
call fcn.004061f6
jmp 0x403b1c
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.0040361a
test byte [ebp - 0x10], 0x80
je 0x403ae1
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 0x403b1c
mov eax, dword [ebp - 0x40]
cmp dword [eax + edi*4], 0
je 0x403b1c
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x28]
mov ecx, dword [eax + ecx*4 - 4]
call fcn.00403ed4
push 1
push edi
lea ecx, [ebp - 0x30]
call sub.MFC42.DLL_CPtrArray::RemoveAt
push 1
push edi
lea ecx, [ebp - 0x44]
call fcn.00406219
dec edi
jns 0x403aeb
push dword [ebp - 0x18]
call sub.MFC42.DLL_operatordelete
mov eax, dword [ebp - 0x28]
pop ecx
dec eax
cmp eax, 0xffffffff
jne 0x4039ad
push dword [esi + 4]
xor ebx, ebx
call dword [sym.imp.USER32.dll_GetMenuItemCount]
test eax, eax
jle 0x403bd0
lea eax, [ebp + 8]
mov edi, ebx
push eax
mov eax, dword [esi + 0xc]
shl edi, 2
mov ecx, dword [edi + eax]
call fcn.00401458
push ebx
mov ecx, esi
mov byte [ebp - 4], 3
call fcn.00405b79
test eax, eax
mov eax, dword [esi + 0xc]
je 0x403b8f
mov eax, dword [edi + eax]
mov edi, 0x410
push ebx
mov ecx, esi
mov dword [eax + 0x10], edi
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
call fcn.00405b79
push dword [ebp - 0x18]
mov eax, dword [eax + 4]
push eax
push edi
jmp 0x403ba8
mov ecx, dword [edi + eax]
mov eax, 0x400
mov dword [ecx + 0x10], eax
mov ecx, dword [esi + 0xc]
push dword [ebp + 8]
mov ecx, dword [edi + ecx]
mov ecx, dword [ecx + 0x14]
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 0x403b45
and byte [ebp - 4], 0
push 1
pop edi
lea ecx, [ebp - 0x44]
mov dword [esi + 0x50], edi
call fcn.00406254
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x30]
call sub.MFC42.DLL_CPtrArray::CPtrArray
mov eax, edi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4