Function at 0x40cb00
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4578fb
mov eax, dword fs:[0]
push eax
sub esp, 0x200
push ebx
push esi
push edi
mov eax, dword [0x471920]
xor eax, esp
push eax
lea eax, [esp + 0x210]
mov dword fs:[0], eax
call fcn.0041c08e
xor ecx, ecx
xor esi, esi
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x40cb4e
push 0x80004005
call fcn.00402660
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push 0x7c
lea ecx, [esp + 0x94]
push esi
mov dword [esp + 0x220], esi
push ecx
mov dword [esp + 0x98], esi
call fcn.004406c0
add esp, 0xc
push 0x7c
lea edx, [esp + 0x194]
push esi
push edx
mov dword [esp + 0x198], esi
call fcn.004406c0
mov eax, dword [ebp + 8]
add esp, 0xc
push 0x7c
lea ecx, [esp + 0x114]
push esi
push ecx
mov dword [esp + 0x118], eax
call fcn.004406c0
mov edx, dword [ebp + 0xc]
mov eax, dword [0x47679c]
add esp, 0xc
push 4
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ecx, dword [0x47679c]
mov ebx, eax
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edx, dword [0x47679c]
push ebx
push edx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
movzx ebx, word [edi]
movzx ecx, word [edi + 2]
add eax, edi
test ebx, ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ebx
lea edi, [edi + ecx + 4]
je 0x40cc0b
add edi, 4
cmp edi, eax
jae 0x40cdf0
jmp 0x40cc19
mov ebx, dword [esp + 0x24]
test ebx, ebx
je 0x40cc2c
mov edx, dword [edi + 0xc]
add edi, 0xc
mov dword [esp + 0x18], edx
add edi, 6
jmp 0x40cc44
movzx eax, word [edi]
add edi, 2
test al, 0x10
mov dword [esp + 0x1c], eax
jne 0x40cc44
movzx eax, word [edi]
mov dword [esp + 0x18], eax
add edi, 2
test edi, edi
jne 0x40cc4c
xor eax, eax
jmp 0x40cc60
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40cc51
sub eax, edx
sar eax, 1
push eax
push edi
lea ecx, [esp + 0x1c]
call fcn.004029b0
xor ecx, ecx
cmp word [edi], cx
je 0x40cc7a
add edi, 2
cmp word [edi], cx
jne 0x40cc72
add edi, 2
cmp ebx, ecx
mov dword [esp + 0x28], edi
je 0x40ccd2
mov eax, dword [esp + 0x18]
mov ebx, dword [ebp + 8]
lea edx, [esp + 0x2c]
push edx
push ecx
push eax
push ebx
mov dword [esp + 0x3c], 0x2c
mov dword [esp + 0x40], 0x10
mov dword [esp + 0x64], ecx
mov dword [esp + 0x60], ecx
call dword [sym.imp.USER32.dll_GetMenuItemInfoW]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x2c]
push edx
push 0
push eax
push ebx
mov dword [esp + 0x60], ecx
call dword [sym.imp.USER32.dll_SetMenuItemInfoW]
jmp 0x40cde6
add dword [esp + esi*4 + 0x8c], 1
test byte [esp + 0x1c], 0x10
mov eax, dword [esp + esi*4 + 0x8c]
je 0x40cd74
mov edi, dword [esp + esi*4 + 0x10c]
lea ecx, [esp + 0x2c]
push ecx
lea ebx, [eax - 1]
push 1
xor eax, eax
push ebx
push edi
mov dword [esp + 0x3c], 0x2c
mov dword [esp + 0x40], 0x10
mov dword [esp + 0x64], eax
mov dword [esp + 0x60], eax
call dword [sym.imp.USER32.dll_GetMenuItemInfoW]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x2c]
push eax
push 1
push ebx
push edi
mov dword [esp + 0x60], edx
call dword [sym.imp.USER32.dll_SetMenuItemInfoW]
mov eax, dword [esp + esi*4 + 0x8c]
mov ecx, dword [esp + 0x1c]
add eax, 0xffffffff
push eax
and ecx, 0x80
push edi
mov dword [esp + esi*4 + 0x194], ecx
call dword [sym.imp.USER32.dll_GetSubMenu]
mov edi, dword [esp + 0x28]
mov dword [esp + esi*4 + 0x110], eax
add esi, 1
mov dword [esp + esi*4 + 0x8c], 0
jmp 0x40cde6
mov eax, dword [esp + 0x18]
mov ebx, dword [ebp + 8]
lea edx, [esp + 0x5c]
push edx
push ecx
push eax
push ebx
mov dword [esp + 0x6c], 0x2c
mov dword [esp + 0x70], 0x10
mov dword [esp + 0x94], ecx
mov dword [esp + 0x90], ecx
call dword [sym.imp.USER32.dll_GetMenuItemInfoW]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x5c]
push edx
push 0
push eax
push ebx
mov dword [esp + 0x90], ecx
call dword [sym.imp.USER32.dll_SetMenuItemInfoW]
test byte [esp + 0x1c], 0x80
je 0x40cde6
sub esi, 1
js 0x40cdf0
cmp dword [esp + esi*4 + 0x18c], 0
je 0x40cde2
sub esi, 1
jns 0x40cdd1
jmp 0x40cdf0
test esi, esi
jl 0x40cdf0
cmp edi, dword [esp + 0x20]
jb 0x40cc15
mov dword [esp + 0x218], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ce1b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x210]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret