Function at 0x435770
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x463050
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push esi
push edi
mov eax, dword [0x487010]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov dword [esp + 0x18], ecx
push 4
push dword [ebp + 8]
call sub.MFC42u.dll_AfxFindResourceHandle
mov esi, dword [sym.imp.KERNEL32.dll_FindResourceW]
push 4
push dword [ebp + 8]
mov edi, eax
push edi
call esi
xor ebx, ebx
cmp eax, ebx
jne 0x4357d5
push 4
push dword [ebp + 8]
xor edi, edi
push ebx
call esi
cmp eax, ebx
jne 0x4357d5
xor eax, eax
jmp 0x435b73
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
cmp esi, ebx
je 0x4357ce
mov edi, dword [esp + 0x18]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x24]
call dword [sym.imp.USER32.dll_CreateMenu]
push eax
mov ecx, edi
call sub.MFC42u.dll_CMenu::Attach
test eax, eax
je 0x4357ce
push esi
call dword [sym.imp.KERNEL32.dll_LockResource]
movzx ecx, word [eax + 2]
lea esi, [ecx + eax + 4]
lea ecx, [esp + 0x2c]
call sub.MFC42u.dll_CPtrArray::CPtrArray
mov dword [esp + 0x2c], vtable.CTypedPtrArray_class_CPtrArray__class_BCMenu__.0
lea ecx, [esp + 0x40]
mov dword [esp + 0x60], ebx
call fcn.0045b1cc
mov dword [esp + 0x40], vtable.CTypedPtrArray_class_CUIntArray__int_.0
push edi
mov byte [esp + 0x64], 1
push dword [esp + 0x38]
lea ecx, [esp + 0x34]
call sub.MFC42u.dll_CPtrArray::SetAtGrow
push ebx
push dword [esp + 0x4c]
lea ecx, [esp + 0x48]
call sub.MFC42u.dll_CUIntArray::SetAtGrow
movzx eax, word [esi]
push 2
pop ebx
add esi, ebx
mov dword [esp + 0x14], eax
and dword [esp + 0x14], 0x10
mov dword [esp + 0x20], eax
jne 0x435878
movzx ecx, word [esi]
mov dword [esp + 0x1c], ecx
add esi, ebx
jmp 0x43587d
and dword [esp + 0x1c], 0
movzx eax, ax
mov dword [esp + 0x10], eax
test al, al
jns 0x43588d
add dword [esp + 0x10], 0xffffff80
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, ebx
test cx, cx
jne 0x435892
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 fcn.0045a52c
mov edi, eax
mov edx, edi
pop ecx
mov dword [esp + 0x24], edi
mov eax, esi
sub edx, esi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, ebx
test cx, cx
jne 0x4358c1
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, ebx
test cx, cx
jne 0x4358d4
sub eax, edx
sar eax, 1
lea eax, [esi + eax*2 + 2]
xor esi, esi
mov dword [esp + 0x28], eax
cmp word [esp + 0x14], si
je 0x4359b3
test byte [esp + 0x20], 0x80
je 0x435920
mov eax, dword [esp + 0x34]
dec eax
cmp eax, esi
jl 0x435a7f
cmp eax, dword [esp + 0x48]
jge 0x435a7f
mov ecx, dword [esp + 0x44]
mov dword [ecx + eax*4], 1
push 0x54
call fcn.0045a4b6
pop ecx
mov dword [esp + 0x20], eax
mov byte [esp + 0x60], bl
cmp eax, esi
je 0x43593c
push eax
call fcn.00433217
mov esi, eax
mov eax, dword [esp + 0x18]
mov byte [esp + 0x60], 1
mov ecx, dword [eax + 0x48]
mov dword [esi + 0x48], ecx
mov ecx, dword [eax + 0x44]
mov dword [esi + 0x44], ecx
mov eax, dword [eax + 0x3c]
push esi
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], 1
call fcn.00414ec6
mov ecx, dword [esp + 0x34]
lea eax, [ecx - 1]
test eax, eax
jl 0x435a7f
cmp eax, ecx
jge 0x435a7f
mov ecx, dword [esp + 0x30]
push dword [esp + 0x10]
mov ebx, dword [esi + 4]
lea eax, [ecx + eax*4]
push edi
mov edi, dword [eax]
call fcn.00435239
push esi
push dword [esp + 0x38]
lea ecx, [esp + 0x34]
call sub.MFC42u.dll_CPtrArray::SetAtGrow
push 0
push dword [esp + 0x4c]
lea ecx, [esp + 0x48]
call sub.MFC42u.dll_CUIntArray::SetAtGrow
jmp 0x435a62
mov ecx, dword [esp + 0x34]
lea eax, [ecx - 1]
cmp eax, esi
jl 0x435a7f
cmp eax, ecx
jge 0x435a7f
mov ecx, dword [esp + 0x30]
push dword [esp + 0x10]
movzx ebx, word [esp + 0x20]
lea eax, [ecx + eax*4]
push edi
mov edi, dword [eax]
call fcn.00435239
test byte [esp + 0x20], 0x80
je 0x435a09
mov eax, dword [esp + 0x34]
dec eax
js 0x435a7f
cmp eax, dword [esp + 0x48]
jge 0x435a7f
mov ecx, dword [esp + 0x44]
mov dword [ecx + eax*4], 1
mov ecx, dword [esp + 0x34]
lea esi, [ecx - 1]
test esi, esi
jl 0x435a62
jmp 0x435a1a
mov ecx, dword [esp + 0x34]
test esi, esi
jl 0x435a7f
cmp esi, dword [esp + 0x48]
jge 0x435a7f
mov eax, dword [esp + 0x44]
cmp dword [eax + esi*4], 0
je 0x435a62
lea eax, [ecx - 1]
test eax, eax
jl 0x435a7f
cmp eax, ecx
jge 0x435a7f
mov ecx, dword [esp + 0x30]
lea eax, [ecx + eax*4]
mov ecx, dword [eax]
call fcn.00435d5d
push 1
push esi
lea ecx, [esp + 0x34]
call sub.MFC42u.dll_CPtrArray::RemoveAt
push 1
push esi
lea ecx, [esp + 0x48]
call sub.MFC42u.dll_CUIntArray::RemoveAt
dec esi
jns 0x435a16
push dword [esp + 0x24]
call fcn.0045a520
mov eax, dword [esp + 0x38]
dec eax
pop ecx
cmp eax, 0xffffffff
je 0x435a84
mov esi, dword [esp + 0x28]
jmp 0x435856
call fcn.0042b887
mov esi, dword [esp + 0x18]
push dword [esi + 4]
xor edi, edi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
test eax, eax
jle 0x435b4f
mov ebx, dword [sym.imp.USER32.dll_ModifyMenuW]
mov eax, edi
lea ecx, [esi + 8]
call fcn.00437ce8
lea ecx, [esp + 0x14]
push ecx
push dword [eax]
call fcn.004331c7
push edi
mov eax, esi
mov byte [esp + 0x64], 3
call fcn.00437803
test eax, eax
lea ecx, [esi + 8]
mov eax, edi
je 0x435afa
call fcn.00437ce8
mov eax, dword [eax]
mov dword [eax + 0x10], 0x410
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], eax
push edi
mov eax, esi
call fcn.00437803
push dword [esp + 0x28]
mov eax, dword [eax + 4]
push eax
push 0x410
jmp 0x435b29
call fcn.00437ce8
mov eax, dword [eax]
mov dword [eax + 0x10], 0x400
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], eax
mov eax, edi
lea ecx, [esi + 8]
call fcn.00437ce8
mov eax, dword [eax]
push dword [esp + 0x28]
mov eax, dword [eax + 0x14]
push eax
push 0x400
push edi
push dword [esi + 4]
call ebx
lea ecx, [esp + 0x14]
mov byte [esp + 0x60], 1
call sub.MFC42u.dll_CString::CString
push dword [esi + 4]
inc edi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
cmp edi, eax
jl 0x435aa1
xor edi, edi
inc edi
lea ecx, [esp + 0x40]
mov dword [esi + 0x50], edi
mov byte [esp + 0x60], 0
call sub.MFC42u.dll_CUIntArray::CUIntArray
or dword [esp + 0x60], 0xffffffff
lea ecx, [esp + 0x2c]
call fcn.0045a62c
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