Function at 0x40cbe0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x551b02
push eax
mov dword fs:[0], esp
sub esp, 0x34
push ebx
push esi
push edi
mov ebx, ecx
call fcn.0043a9f2
mov edi, dword [ebp + 8]
mov esi, dword [eax + 0xc]
push 4
push edi
push esi
call dword [sym.imp.KERNEL32.DLL_FindResourceW]
test eax, eax
jne 0x40cc3e
push 4
push edi
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.DLL_FindResourceW]
test eax, eax
jne 0x40cc3e
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_LoadResource]
mov esi, eax
test esi, esi
je 0x40cc29
mov eax, dword [ebx]
mov edx, dword [eax + 0x1c]
mov ecx, ebx
call edx
call dword [sym.imp.USER32.dll_CreateMenu]
push eax
mov ecx, ebx
call fcn.00439813
test eax, eax
je 0x40cc29
push esi
call dword [sym.imp.KERNEL32.DLL_LockResource]
movzx ecx, word [eax + 2]
lea edi, [ecx + eax + 4]
lea ecx, [ebp - 0x2c]
call fcn.00439feb
mov dword [ebp - 0x2c], 0x5637bc
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0
call fcn.004069f0
mov edx, dword [ebp - 0x24]
push ebx
push edx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call fcn.005232b3
mov eax, dword [ebp - 0x38]
push 0
push eax
lea ecx, [ebp - 0x40]
call fcn.004061c0
movzx eax, word [edi]
add edi, 2
mov esi, eax
and esi, 0x10
mov dword [ebp - 0x18], eax
mov dword [ebp + 8], edi
jne 0x40cccf
movzx edi, word [edi]
add dword [ebp + 8], 2
jmp 0x40ccd1
xor edi, edi
movzx eax, ax
mov dword [ebp - 0x10], eax
test al, al
jns 0x40cce1
add eax, 0xffffff80
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40cce7
sub eax, edx
sar eax, 1
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0042cd90
mov edx, eax
mov eax, dword [ebp + 8]
add esp, 4
mov dword [ebp - 0x14], edx
sub edx, eax
lea ebx, [ebx]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40cd20
mov eax, dword [ebp + 8]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40cd35
mov ecx, dword [ebp + 8]
sub eax, edx
sar eax, 1
lea edx, [ecx + eax*2 + 2]
mov dword [ebp + 8], edx
test si, si
je 0x40ce16
test byte [ebp - 0x18], 0x80
je 0x40cd7a
mov eax, dword [ebp - 0x24]
dec eax
js 0x40ced1
cmp eax, dword [ebp - 0x38]
jge 0x40ced1
mov ecx, dword [ebp - 0x3c]
mov dword [ecx + eax*4], 1
push 0x5c
call fcn.0042cd61
add esp, 4
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 2
test eax, eax
je 0x40cd9a
mov ecx, eax
call fcn.004065b0
mov esi, eax
jmp 0x40cd9c
xor esi, esi
mov edx, dword [ebx + 0x50]
mov dword [esi + 0x50], edx
mov eax, dword [ebx + 0x4c]
mov dword [esi + 0x4c], eax
mov ecx, dword [ebx + 0x44]
mov byte [ebp - 4], 1
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], 1
call dword [sym.imp.USER32.dll_CreatePopupMenu]
push eax
mov ecx, esi
call fcn.00439813
mov ecx, dword [ebp - 0x24]
lea eax, [ecx - 1]
test eax, eax
js 0x40ced1
cmp eax, ecx
jge 0x40ced1
mov edx, dword [esi + 4]
mov ecx, dword [ebp - 0x10]
push 0xffffffffffffffff
push edx
mov edx, dword [ebp - 0x14]
push ecx
mov ecx, dword [ebp - 0x28]
mov ecx, dword [ecx + eax*4]
push edx
call fcn.0040bd50
mov edx, dword [ebp - 0x24]
push esi
push edx
lea ecx, [ebp - 0x2c]
call fcn.005232b3
mov eax, dword [ebp - 0x38]
push 0
push eax
lea ecx, [ebp - 0x40]
call fcn.004061c0
jmp 0x40ceb4
mov ecx, dword [ebp - 0x24]
lea eax, [ecx - 1]
test eax, eax
js 0x40ced1
cmp eax, ecx
jge 0x40ced1
mov edx, dword [ebp - 0x10]
push 0xffffffffffffffff
movzx ecx, di
push ecx
mov ecx, dword [ebp - 0x14]
push edx
mov edx, dword [ebp - 0x28]
push ecx
mov ecx, dword [edx + eax*4]
call fcn.0040bd50
test byte [ebp - 0x18], 0x80
je 0x40ce64
mov eax, dword [ebp - 0x24]
dec eax
js 0x40ced1
cmp eax, dword [ebp - 0x38]
jge 0x40ced1
mov ecx, dword [ebp - 0x3c]
mov dword [ecx + eax*4], 1
mov ecx, dword [ebp - 0x24]
lea esi, [ecx - 1]
test esi, esi
js 0x40ceb4
jmp 0x40ce73
mov ecx, dword [ebp - 0x24]
test esi, esi
js 0x40ced1
cmp esi, dword [ebp - 0x38]
jge 0x40ced1
mov edx, dword [ebp - 0x3c]
cmp dword [edx + esi*4], 0
je 0x40ceb4
lea eax, [ecx - 1]
test eax, eax
js 0x40ced1
cmp eax, ecx
jge 0x40ced1
mov ecx, dword [ebp - 0x28]
mov ecx, dword [ecx + eax*4]
call fcn.0040bee0
push 1
push esi
lea ecx, [ebp - 0x2c]
call fcn.0043a0fb
push 1
push esi
lea ecx, [ebp - 0x40]
call fcn.00406160
dec esi
jns 0x40ce70
mov edx, dword [ebp - 0x14]
push edx
call fcn.0042cd9b
mov eax, dword [ebp - 0x24]
dec eax
add esp, 4
cmp eax, 0xffffffff
je 0x40ced6
mov edi, dword [ebp + 8]
jmp 0x40ccb3
call fcn.0042d763
mov ecx, dword [ebx + 4]
push ecx
xor esi, esi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
test eax, eax
jle 0x40cfc0
lea ebx, [ebx]
test esi, esi
js 0x40ced1
cmp esi, dword [ebx + 0x10]
jge 0x40ced1
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax + esi*4]
lea edx, [ebp + 8]
lea edi, [esi*4]
push edx
call fcn.00409c90
push esi
mov ecx, ebx
mov byte [ebp - 4], 3
call fcn.004069a0
test eax, eax
je 0x40cf4d
cmp esi, dword [ebx + 0x10]
jge 0x40ced1
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + edi]
mov dword [eax + 0x14], 0x410
mov edi, dword [ebp + 8]
push esi
mov ecx, ebx
call fcn.004069a0
mov eax, dword [eax + 4]
mov ecx, dword [ebx + 4]
push edi
push eax
push 0x410
push esi
push ecx
jmp 0x40cf84
cmp esi, dword [ebx + 0x10]
jge 0x40ced1
mov eax, dword [ebx + 0xc]
mov edx, dword [eax + edi]
mov dword [edx + 0x14], 0x400
cmp esi, dword [ebx + 0x10]
jge 0x40ced1
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + edi]
mov ecx, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov edx, dword [ebx + 4]
push ecx
push eax
push 0x400
push esi
push edx
call dword [sym.imp.USER32.dll_ModifyMenuW]
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cfad
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebx + 4]
push ecx
inc esi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
cmp esi, eax
jl 0x40cef0
lea ecx, [ebp - 0x40]
mov dword [ebx + 0x58], 1
call fcn.00406a10
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0xffffffff
call fcn.0043a002
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, 1
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4