Function at 0x41cfe0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x54e502
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push esi
push edi
mov eax, dword [0x5ab720]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov dword [esp + 0x14], ecx
call fcn.00503137
mov ebx, dword [ebp + 8]
mov esi, dword [eax + 0xc]
push 4
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
xor edi, edi
cmp eax, edi
jne 0x41d052
push 4
push ebx
push edi
xor esi, esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
cmp eax, edi
jne 0x41d052
xor eax, eax
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
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
cmp esi, edi
je 0x41d03b
mov ebx, dword [esp + 0x14]
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.00508d69
test eax, eax
je 0x41d03b
push esi
call dword [sym.imp.KERNEL32.dll_LockResource]
movzx ecx, word [eax + 2]
lea ebx, [ecx + eax + 4]
lea ecx, [esp + 0x40]
call fcn.00508f87
mov dword [esp + 0x40], vtable.CTypedPtrArray_class_CPtrArray__class_BCMenu__.0
mov dword [esp + 0x60], edi
mov dword [esp + 0x2c], vtable.CArray_int__int_.0
mov dword [esp + 0x30], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], edi
mov edx, dword [esp + 0x14]
mov byte [esp + 0x60], 1
mov eax, dword [esp + 0x48]
push edx
push eax
lea ecx, [esp + 0x48]
call fcn.00508ebf
mov edi, 1
lea esi, [esp + 0x2c]
call fcn.004206e0
mov ecx, dword [esp + 0x30]
mov dword [ecx], 0
jmp 0x41d0f0
movzx eax, word [ebx]
mov esi, eax
add ebx, 2
and esi, 0x10
mov dword [esp + 0x20], eax
jne 0x41d10d
movzx edx, word [ebx]
mov dword [esp + 0x1c], edx
add ebx, 2
jmp 0x41d115
mov dword [esp + 0x1c], 0
movzx eax, ax
test al, al
mov dword [esp + 0x18], eax
jns 0x41d129
sub eax, 0x80
mov dword [esp + 0x18], eax
mov eax, ebx
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41d130
sub eax, edx
sar eax, 1
xor ecx, ecx
add eax, 1
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004faec4
mov edi, eax
mov eax, ebx
add esp, 4
mov dword [esp + 0x24], edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41d166
sub eax, edx
sar eax, 1
push ebx
add eax, 1
push eax
push edi
call fcn.0052225e
mov eax, ebx
add esp, 0xc
lea edx, [eax + 2]
jmp 0x41d190
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41d190
sub eax, edx
sar eax, 1
test si, si
lea eax, [ebx + eax*2 + 2]
mov dword [esp + 0x28], eax
je 0x41d299
test byte [esp + 0x20], 0x80
je 0x41d1dd
mov eax, dword [esp + 0x48]
add eax, 0xffffffff
js 0x41d3b1
mov edi, dword [esp + 0x34]
cmp eax, edi
jge 0x41d3b1
mov ecx, dword [esp + 0x30]
mov dword [ecx + eax*4], 1
jmp 0x41d1e1
mov edi, dword [esp + 0x34]
push 0x54
call fcn.004fae94
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
mov byte [esp + 0x60], 2
je 0x41d202
push eax
call fcn.0041a150
mov esi, eax
jmp 0x41d204
xor esi, esi
mov eax, dword [esp + 0x14]
mov byte [esp + 0x60], 1
mov edx, dword [eax + 0x48]
mov dword [esi + 0x48], edx
mov ecx, dword [eax + 0x44]
mov dword [esi + 0x44], ecx
mov edx, dword [eax + 0x3c]
mov dword [esi + 0x3c], edx
mov dword [esi + 0x40], 1
call dword [sym.imp.USER32.dll_CreatePopupMenu]
push eax
mov ecx, esi
call fcn.00508d69
mov eax, dword [esp + 0x48]
lea ecx, [eax - 1]
test ecx, ecx
jl 0x41d3b1
cmp ecx, eax
jge 0x41d3b1
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
push eax
mov eax, dword [esi + 4]
push edx
mov edx, dword [esp + 0x4c]
mov ebx, dword [edx + ecx*4]
call fcn.0041c880
mov eax, dword [esp + 0x48]
push esi
push eax
lea ecx, [esp + 0x48]
call fcn.00508ebf
test edi, edi
mov ebx, edi
jl 0x41d3b1
add edi, 1
lea esi, [esp + 0x2c]
call fcn.004206e0
mov ecx, dword [esp + 0x30]
mov dword [ecx + ebx*4], 0
jmp 0x41d38f
mov eax, dword [esp + 0x48]
lea ecx, [eax - 1]
test ecx, ecx
jl 0x41d3b1
cmp ecx, eax
jge 0x41d3b1
mov edx, dword [esp + 0x18]
movzx eax, word [esp + 0x1c]
push edx
mov edx, dword [esp + 0x48]
mov ebx, dword [edx + ecx*4]
push edi
call fcn.0041c880
test byte [esp + 0x20], 0x80
je 0x41d2f0
mov eax, dword [esp + 0x48]
add eax, 0xffffffff
js 0x41d3b1
cmp eax, dword [esp + 0x34]
jge 0x41d3b1
mov ecx, dword [esp + 0x30]
mov dword [ecx + eax*4], 1
mov ecx, dword [esp + 0x48]
lea esi, [ecx - 1]
test esi, esi
jl 0x41d38f
mov edx, dword [esp + 0x30]
lea ebx, [esi + 1]
lea edi, [edx + esi*4]
jmp 0x41d314
mov ecx, dword [esp + 0x48]
test esi, esi
jl 0x41d3b1
cmp esi, dword [esp + 0x34]
jge 0x41d3b1
cmp dword [edi], 0
je 0x41d38f
lea eax, [ecx - 1]
test eax, eax
jl 0x41d3b1
cmp eax, ecx
jge 0x41d3b1
mov ecx, dword [esp + 0x44]
mov edx, dword [ecx + eax*4]
push edx
call fcn.0041d950
push 1
push esi
lea ecx, [esp + 0x48]
call fcn.00509096
mov eax, dword [esp + 0x34]
cmp ebx, eax
jg 0x41d3b1
cmp ebx, esi
jl 0x41d3b1
cmp ebx, 1
jl 0x41d3b1
sub eax, ebx
je 0x41d37d
add eax, eax
add eax, eax
push eax
lea ecx, [edi + 4]
push ecx
push eax
push edi
call fcn.00521aec
push eax
call fcn.00404920
add esp, 0x14
sub dword [esp + 0x34], 1
sub esi, 1
sub ebx, 1
sub edi, 4
test esi, esi
jge 0x41d310
mov edx, dword [esp + 0x24]
push edx
call fcn.004faebf
mov eax, dword [esp + 0x4c]
add eax, 0xffffffff
add esp, 4
cmp eax, 0xffffffff
je 0x41d3b6
mov ebx, dword [esp + 0x28]
jmp 0x41d0f0
call fcn.00504221
mov esi, dword [esp + 0x14]
mov ecx, dword [esi + 4]
push ecx
xor ebx, ebx
call dword [sym.imp.USER32.dll_GetMenuItemCount]
test eax, eax
jle 0x41d4c1
mov edi, edi
test ebx, ebx
jl 0x41d3b1
cmp ebx, dword [esi + 0x10]
jge 0x41d3b1
mov eax, dword [esi + 0xc]
lea edi, [ebx*4]
add eax, edi
mov eax, dword [eax]
lea edx, [esp + 0x18]
push edx
push eax
call fcn.0041a090
mov byte [esp + 0x60], 3
mov ecx, dword [esi + 4]
push ebx
push ecx
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call fcn.00508d41
test eax, eax
je 0x41d446
cmp ebx, dword [esi + 0x10]
jge 0x41d3b1
mov eax, dword [esi + 0xc]
mov edx, dword [eax + edi]
add eax, edi
mov dword [edx + 0x1c], 0x410
mov eax, dword [esi + 4]
mov edi, dword [esp + 0x18]
push ebx
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call fcn.00508d41
mov eax, dword [eax + 4]
mov ecx, dword [esi + 4]
push edi
push eax
push 0x410
push ebx
push ecx
jmp 0x41d481
cmp ebx, dword [esi + 0x10]
jge 0x41d3b1
mov eax, dword [esi + 0xc]
mov edx, dword [eax + edi]
add eax, edi
mov dword [edx + 0x1c], 0x400
cmp ebx, dword [esi + 0x10]
jge 0x41d3b1
mov eax, dword [esi + 0xc]
mov ecx, dword [esp + 0x18]
mov edx, dword [esi + 4]
add eax, edi
mov eax, dword [eax]
mov eax, dword [eax + 0x20]
push ecx
push eax
push 0x400
push ebx
push edx
call dword [sym.imp.USER32.dll_ModifyMenuW]
mov byte [esp + 0x60], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41d4ac
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esi + 4]
push ecx
add ebx, 1
call dword [sym.imp.USER32.dll_GetMenuItemCount]
cmp ebx, eax
jl 0x41d3d0
mov byte [esp + 0x60], 0
mov eax, dword [esp + 0x30]
test eax, eax
mov dword [esi + 0x50], 1
je 0x41d4de
push eax
call fcn.004faebf
add esp, 4
lea ecx, [esp + 0x40]
mov dword [esp + 0x60], 0xffffffff
call fcn.00508f9e
mov eax, 1
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