Function at 0x403ad0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x53a622
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push esi
push edi
mov eax, dword [0x58bc40]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x24], ebx
call fcn.0041b517
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 0x403b42
push 4
push edi
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
jne 0x403b42
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
xor edi, edi
cmp esi, edi
je 0x403b2b
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.00419de7
test eax, eax
je 0x403b2b
push esi
call dword [sym.imp.KERNEL32.dll_LockResource]
movzx ecx, word [eax + 2]
lea esi, [ecx + eax + 4]
lea ecx, [esp + 0x40]
call fcn.00419a21
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 byte [esp + 0x60], 1
mov edx, dword [esp + 0x48]
push ebx
push edx
lea ecx, [esp + 0x48]
call fcn.00419bb7
push 0xffffffffffffffff
push 1
lea ecx, [esp + 0x34]
call fcn.00407030
mov eax, dword [esp + 0x30]
mov dword [eax], edi
movzx eax, word [esi]
mov ecx, eax
add esi, 2
and ecx, 0x10
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
jne 0x403bf1
movzx ecx, word [esi]
mov dword [esp + 0x18], ecx
add esi, 2
jmp 0x403bf5
mov dword [esp + 0x18], edi
movzx eax, ax
mov dword [esp + 0x10], eax
test al, al
jns 0x403c07
add eax, 0xffffff80
mov dword [esp + 0x10], eax
mov eax, esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x403c10
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.00416564
mov edi, eax
mov edx, edi
add esp, 4
mov dword [esp + 0x14], edi
mov eax, esi
sub edx, esi
movzx ecx, word [eax]
mov word [eax + edx], cx
add eax, 2
test cx, cx
jne 0x403c45
mov eax, esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403c60
sub eax, edx
sar eax, 1
lea eax, [esi + eax*2 + 2]
mov dword [esp + 0x28], eax
cmp word [esp + 0x20], cx
je 0x403d68
test byte [esp + 0x1c], 0x80
je 0x403cad
mov eax, dword [esp + 0x48]
dec eax
js case.0x403e5b.1
mov edi, dword [esp + 0x34]
cmp eax, edi
jge case.0x403e5b.1
mov ecx, dword [esp + 0x30]
mov dword [ecx + eax*4], 1
jmp 0x403cb1
mov edi, dword [esp + 0x34]
push 0x5c
call fcn.0041652a
add esp, 4
mov dword [esp + 0x20], eax
mov byte [esp + 0x60], 2
test eax, eax
je 0x403cd2
push eax
call fcn.00401420
mov esi, eax
jmp 0x403cd4
xor esi, esi
mov byte [esp + 0x60], 1
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 dword [esi + 0x44], ecx
mov dword [esi + 0x48], 1
call dword [sym.imp.USER32.dll_CreatePopupMenu]
push eax
mov ecx, esi
call fcn.00419de7
mov ecx, dword [esp + 0x48]
lea eax, [ecx - 1]
test eax, eax
js case.0x403e5b.1
cmp eax, ecx
jge case.0x403e5b.1
mov edx, dword [esi + 4]
mov ecx, dword [esp + 0x10]
push edx
mov edx, dword [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x4c]
push edx
mov edx, dword [ecx + eax*4]
push edx
call fcn.004038d0
mov eax, dword [esp + 0x48]
push esi
push eax
lea ecx, [esp + 0x48]
call fcn.00419bb7
mov esi, edi
test edi, edi
js case.0x403e5b.1
push 0xffffffffffffffff
inc edi
push edi
lea ecx, [esp + 0x34]
call fcn.00407030
mov ecx, dword [esp + 0x30]
mov dword [ecx + esi*4], 0
jmp 0x403e75
mov ecx, dword [esp + 0x48]
lea eax, [ecx - 1]
test eax, eax
js case.0x403e5b.1
cmp eax, ecx
jge case.0x403e5b.1
movzx edx, word [esp + 0x18]
mov ecx, dword [esp + 0x10]
push edx
mov edx, dword [esp + 0x48]
mov eax, dword [edx + eax*4]
push ecx
push edi
push eax
call fcn.004038d0
test byte [esp + 0x1c], 0x80
je 0x403dbf
mov eax, dword [esp + 0x48]
dec eax
js case.0x403e5b.1
cmp eax, dword [esp + 0x34]
jge case.0x403e5b.1
mov ecx, dword [esp + 0x30]
mov dword [ecx + eax*4], 1
mov ecx, dword [esp + 0x48]
lea esi, [ecx - 1]
test esi, esi
js 0x403e79
mov edx, dword [esp + 0x30]
lea edi, [esi + 1]
lea ebx, [edx + esi*4]
jmp 0x403de4
mov ecx, dword [esp + 0x48]
test esi, esi
js case.0x403e5b.1
cmp esi, dword [esp + 0x34]
jge case.0x403e5b.1
cmp dword [ebx], 0
je 0x403e71
lea eax, [ecx - 1]
test eax, eax
js case.0x403e5b.1
cmp eax, ecx
jge case.0x403e5b.1
mov ecx, dword [esp + 0x44]
mov edx, dword [ecx + eax*4]
push edx
call fcn.004044e0
push 1
push esi
lea ecx, [esp + 0x48]
call fcn.00419c8b
mov eax, dword [esp + 0x34]
cmp edi, eax
jg case.0x403e5b.1
cmp edi, esi
jl case.0x403e5b.1
cmp edi, 1
jl case.0x403e5b.1
sub eax, edi
je case.0x403e5b.0
add eax, eax
add eax, eax
push eax
lea ecx, [ebx + 4]
push ecx
push eax
push ebx
call fcn.00514a6d
add esp, 0x10
cmp eax, 0x50
ja case.0x403e5b.1
movzx edx, byte [eax + 0x403ff8]
jmp dword [edx*4 + 0x403fe8]
dec dword [esp + 0x34]
dec edi
sub ebx, 4
dec esi
jns 0x403de0
mov ebx, dword [esp + 0x24]
mov edi, dword [esp + 0x14]
push edi
call fcn.00416559
mov eax, dword [esp + 0x4c]
dec eax
add esp, 4
cmp eax, 0xffffffff
je 0x403ea1
mov esi, dword [esp + 0x28]
xor edi, edi
jmp 0x403bd0
call fcn.00418869
call fcn.00418831
mov ecx, dword [ebx + 4]
push ecx
xor esi, esi
call dword [sym.imp.USER32.dll_GetMenuItemCount]
test eax, eax
jle 0x403f9e
test esi, esi
js case.0x403e5b.1
cmp esi, dword [ebx + 0x10]
jge case.0x403e5b.1
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + esi*4]
lea edx, [esp + 0x14]
lea edi, [esi*4]
push edx
push eax
call fcn.00401330
mov byte [esp + 0x60], 3
mov ecx, dword [ebx + 4]
push esi
push ecx
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call fcn.00419db2
test eax, eax
je 0x403f28
cmp esi, dword [ebx + 0x10]
jge case.0x403e5b.1
mov eax, dword [ebx + 0xc]
mov edx, dword [eax + edi]
mov dword [edx + 0x14], 0x410
mov eax, dword [ebx + 4]
mov edi, dword [esp + 0x14]
push esi
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call fcn.00419db2
mov eax, dword [eax + 4]
mov ecx, dword [ebx + 4]
push edi
push eax
push 0x410
push esi
push ecx
jmp 0x403f60
cmp esi, dword [ebx + 0x10]
jge case.0x403e5b.1
mov eax, dword [ebx + 0xc]
mov edx, dword [eax + edi]
mov dword [edx + 0x14], 0x400
cmp esi, dword [ebx + 0x10]
jge case.0x403e5b.1
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + edi]
mov ecx, dword [esp + 0x14]
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 byte [esp + 0x60], 1
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 0x403f8b
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 0x403eb5
mov byte [esp + 0x60], 0
mov eax, dword [esp + 0x30]
mov dword [ebx + 0x58], 1
test eax, eax
je 0x403fbb
push eax
call fcn.00416559
add esp, 4
lea ecx, [esp + 0x40]
mov dword [esp + 0x60], 0xffffffff
call fcn.00419a38
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