Function at 0x1003e780
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1005b53a
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push esi
push edi
mov eax, dword [0x10086038]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x10], esi
push 4
push dword [ebp + 8]
call sub.mfc90u.dll_AfxFindResourceHandle
mov edi, dword [sym.imp.KERNEL32.dll_FindResourceW]
push 4
push dword [ebp + 8]
mov ebx, eax
push ebx
call edi
test eax, eax
jne 0x1003e7e5
push 4
push dword [ebp + 8]
xor ebx, ebx
push ebx
call edi
test eax, eax
jne 0x1003e7e5
xor eax, eax
jmp 0x1003ebdf
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
xor ebx, ebx
cmp edi, ebx
je 0x1003e7de
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.mfc90u.dll_CMenu::Attach
test eax, eax
je 0x1003e7de
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
movzx ecx, word [eax + 2]
lea edi, [ecx + eax + 4]
lea ecx, [esp + 0x40]
call fcn.100505d2
mov dword [esp + 0x40], vtable.CTypedPtrArray_class_CPtrArray__class_BCMenu__.0
mov dword [esp + 0x60], ebx
mov dword [esp + 0x2c], vtable.CArray_int__int_.0
mov dword [esp + 0x30], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], ebx
push esi
mov byte [esp + 0x64], 1
push dword [esp + 0x4c]
lea ecx, [esp + 0x48]
call sub.mfc90u.dll_CPtrArray::SetAtGrow
lea eax, [esp + 0x2c]
call fcn.1004078e
movzx eax, word [edi]
push 2
pop ebx
mov dword [esp + 0x18], eax
add edi, ebx
and dword [esp + 0x18], 0x10
mov dword [esp + 0x24], eax
jne 0x1003e888
movzx ecx, word [edi]
mov dword [esp + 0x20], ecx
add edi, ebx
jmp 0x1003e88d
and dword [esp + 0x20], 0
movzx eax, ax
mov dword [esp + 0x14], eax
test al, al
jns 0x1003e89d
add dword [esp + 0x14], 0xffffff80
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, ebx
test cx, cx
jne 0x1003e8a2
sub eax, edx
sar eax, 1
xor ecx, ecx
inc eax
mov edx, ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.mfc90u.dll_new__
mov edx, eax
mov dword [esp + 0x20], edx
pop ecx
mov eax, edi
sub edx, edi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, ebx
test cx, cx
jne 0x1003e8cf
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, ebx
test cx, cx
jne 0x1003e8e2
sub eax, edx
sar eax, 1
lea eax, [edi + eax*2 + 2]
mov dword [esp + 0x28], eax
cmp word [esp + 0x18], cx
je 0x1003e9c5
test byte [esp + 0x24], 0x80
je 0x1003e92a
mov eax, dword [esp + 0x48]
dec eax
js 0x1003eacd
cmp eax, dword [esp + 0x34]
jge 0x1003eacd
mov ecx, dword [esp + 0x30]
mov dword [ecx + eax*4], 1
push 0x58
call sub.mfc90u.dll_new
pop ecx
mov dword [esp + 0x24], eax
mov byte [esp + 0x60], bl
test eax, eax
je 0x1003e949
mov ebx, eax
call fcn.1003c4cc
mov ebx, eax
jmp 0x1003e94b
xor ebx, ebx
mov byte [esp + 0x60], 1
mov eax, dword [esi + 0x4c]
mov dword [ebx + 0x4c], eax
mov eax, dword [esi + 0x48]
mov dword [ebx + 0x48], eax
mov eax, dword [esi + 0x40]
mov dword [ebx + 0x40], eax
mov dword [ebx + 0x44], 1
call dword [sym.imp.USER32.dll_CreatePopupMenu]
push eax
mov ecx, ebx
call sub.mfc90u.dll_CMenu::Attach
mov ecx, dword [esp + 0x48]
lea eax, [ecx - 1]
test eax, eax
jl 0x1003eacd
cmp eax, ecx
jge 0x1003eacd
mov ecx, dword [esp + 0x44]
push 0xffffffffffffffff
push dword [ebx + 4]
lea eax, [ecx + eax*4]
push dword [esp + 0x1c]
mov edi, dword [eax]
push dword [esp + 0x28]
call fcn.1003e56b
push ebx
push dword [esp + 0x4c]
lea ecx, [esp + 0x48]
call sub.mfc90u.dll_CPtrArray::SetAtGrow
lea eax, [esp + 0x2c]
call fcn.1004078e
jmp 0x1003eab0
mov ecx, dword [esp + 0x48]
lea eax, [ecx - 1]
test eax, eax
jl 0x1003eacd
cmp eax, ecx
jge 0x1003eacd
mov ecx, dword [esp + 0x44]
lea eax, [ecx + eax*4]
movzx ecx, word [esp + 0x20]
mov edi, dword [eax]
push 0xffffffffffffffff
push ecx
push dword [esp + 0x1c]
push dword [esp + 0x28]
call fcn.1003e56b
test byte [esp + 0x24], 0x80
je 0x1003ea21
mov eax, dword [esp + 0x48]
dec eax
js 0x1003eacd
cmp eax, dword [esp + 0x34]
jge 0x1003eacd
mov ecx, dword [esp + 0x30]
mov dword [ecx + eax*4], 1
mov ecx, dword [esp + 0x48]
lea edi, [ecx - 1]
test edi, edi
jl 0x1003eab0
mov eax, dword [esp + 0x30]
lea ebx, [edi + 1]
lea esi, [eax + edi*4]
jmp 0x1003ea40
mov ecx, dword [esp + 0x48]
test edi, edi
jl 0x1003eacd
cmp edi, dword [esp + 0x34]
jge 0x1003eacd
cmp dword [esi], 0
je 0x1003eaac
lea eax, [ecx - 1]
test eax, eax
jl 0x1003eacd
cmp eax, ecx
jge 0x1003eacd
mov ecx, dword [esp + 0x44]
lea eax, [ecx + eax*4]
mov ecx, dword [eax]
call fcn.1003edd6
push 1
push edi
lea ecx, [esp + 0x48]
call sub.mfc90u.dll_CPtrArray::RemoveAt
mov eax, dword [esp + 0x34]
cmp ebx, eax
jg 0x1003eacd
cmp ebx, edi
jl 0x1003eacd
cmp ebx, 1
jl 0x1003eacd
sub eax, ebx
je 0x1003ea9f
shl eax, 2
push eax
lea ecx, [esi + 4]
push ecx
push eax
push esi
call fcn.1000ede8
add esp, 0x10
dec dword [esp + 0x34]
dec edi
dec ebx
sub esi, 4
test edi, edi
jge 0x1003ea3c
mov esi, dword [esp + 0x10]
push dword [esp + 0x1c]
call sub.mfc90u.dll_delete__
mov eax, dword [esp + 0x4c]
dec eax
pop ecx
cmp eax, 0xffffffff
je 0x1003ead2
mov edi, dword [esp + 0x28]
jmp 0x1003e866
call sub.mfc90u.dll_AfxThrowInvalidArgException
push dword [esi + 4]
xor edi, edi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
test eax, eax
jle 0x1003ebb3
mov ebx, dword [sym.imp.USER32.dll_ModifyMenuW]
mov esi, 0x400
mov ecx, dword [esp + 0x10]
mov eax, edi
add ecx, 0xc
call fcn.10040779
lea ecx, [esp + 0x1c]
push ecx
push dword [eax]
call fcn.1003c47f
mov eax, dword [esp + 0x10]
push edi
mov byte [esp + 0x64], 3
call fcn.1004031b
mov ecx, dword [esp + 0x10]
add ecx, 0xc
test eax, eax
mov eax, edi
je 0x1003eb55
call fcn.10040779
mov eax, dword [eax]
mov dword [eax + 0x10], 0x410
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x10]
push edi
call fcn.1004031b
push dword [esp + 0x28]
mov eax, dword [eax + 4]
push eax
push 0x410
jmp 0x1003eb80
call fcn.10040779
mov eax, dword [eax]
mov ecx, dword [esp + 0x10]
mov dword [eax + 0x10], esi
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x28], eax
mov eax, edi
add ecx, 0xc
call fcn.10040779
mov eax, dword [eax]
push dword [esp + 0x28]
mov eax, dword [eax + 0x14]
push eax
push esi
mov eax, dword [esp + 0x1c]
push edi
push dword [eax + 4]
call ebx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x60], 1
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, dword [esp + 0x10]
push dword [eax + 4]
inc edi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
cmp edi, eax
jl 0x1003eaf0
mov esi, dword [esp + 0x10]
xor edi, edi
inc edi
mov byte [esp + 0x60], 0
cmp dword [esp + 0x30], 0
mov dword [esi + 0x54], edi
je 0x1003ebcf
push dword [esp + 0x30]
call sub.mfc90u.dll_delete__
pop ecx
or dword [esp + 0x60], 0xffffffff
lea ecx, [esp + 0x40]
call sub.mfc90u.dll_CPtrArray::CPtrArray
mov eax, edi
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4