Function at 0x407080
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x5bc
push ebx
mov ebx, dword [esp + 0x5c8]
push ebp
push esi
lea eax, [esp + 0x1c]
push edi
push eax
xor esi, esi
push 1
push esi
push ebx
mov dword [esp + 0x30], 0x2c
mov dword [esp + 0x34], 6
call dword [sym.imp.USER32.dll_GetMenuItemInfoA]
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x50]
mov dword [esp + 0x4c], esi
rep stosd dword es:[edi], eax
mov ecx, 0x1f
lea edi, [esp + 0x150]
mov dword [esp + 0x14c], esi
mov dword [esp + 0xcc], ebx
mov ebx, dword [esp + 0x5d0]
push 4
rep stosd dword es:[edi], eax
mov ecx, 0x1f
lea edi, [esp + 0xd4]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x5dc]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebp, eax
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push ebp
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
xor ebp, ebp
xor edx, edx
mov bp, word [edi]
mov dx, word [edi + 2]
add eax, edi
mov dword [esp + 0x18], ebp
test ebp, ebp
mov dword [esp + 0x1c], eax
lea ebx, [edi + edx + 4]
je 0x407140
add ebx, 4
cmp ebx, eax
jae 0x4072bd
test ebp, ebp
je 0x40715b
mov eax, dword [ebx + 0xc]
add ebx, 0xc
mov dword [esp + 0x14], eax
add ebx, 6
jmp 0x407175
mov ax, word [ebx]
add ebx, 2
test al, 0x10
mov dword [esp + 0x10], eax
jne 0x407175
xor eax, eax
mov ax, word [ebx]
add ebx, 2
mov dword [esp + 0x14], eax
push 0
push 0
lea ecx, [esp + 0x1d4]
push 0x400
push ecx
push 0xffffffffffffffff
push ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp word [ebx], 0
je 0x4071a2
add ebx, 2
cmp word [ebx], 0
jne 0x407199
add ebx, 2
test ebp, ebp
je 0x4071cd
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x5d4]
lea edx, [esp + 0x1cc]
push 0
push edx
push eax
push ecx
call fcn.00406ec0
add esp, 0x10
jmp 0x4072b3
mov ecx, dword [esp + esi*4 + 0x4c]
mov al, byte [esp + 0x10]
inc ecx
test al, 0x10
mov dword [esp + esi*4 + 0x4c], ecx
mov ebp, ecx
je 0x40726b
mov edi, dword [esp + esi*4 + 0xcc]
mov eax, dword [esp + 0x5d4]
cmp eax, edi
jne 0x407229
cmp dword [esp + 0x5d8], 0x81
jne 0x407229
lea edx, [esp + 0x1cc]
push 1
push edx
push ebp
push edi
call fcn.00406ec0
mov eax, dword [esp + 0x20]
add esp, 0x10
and eax, 0x80
mov dword [esp + esi*4 + 0x14c], eax
jmp 0x407251
lea ecx, [esp + 0x1cc]
push 1
lea edx, [ebp - 1]
push ecx
push edx
push edi
call fcn.00406ec0
mov eax, dword [esp + 0x20]
add esp, 0x10
and eax, 0x80
dec ebp
mov dword [esp + esi*4 + 0x14c], eax
push ebp
push edi
call dword [sym.imp.USER32.dll_GetSubMenu]
mov dword [esp + esi*4 + 0xd0], eax
inc esi
mov dword [esp + esi*4 + 0x4c], 0
jmp 0x4072af
mov edx, dword [esp + 0x14]
mov eax, dword [esp + esi*4 + 0xcc]
lea ecx, [esp + 0x1cc]
push 0
push ecx
push edx
push eax
call fcn.00406ec0
mov al, byte [esp + 0x20]
add esp, 0x10
test al, 0x80
je 0x4072af
dec esi
js 0x4072bd
lea eax, [esp + esi*4 + 0x14c]
cmp dword [eax], 0
je 0x4072ab
dec esi
sub eax, 4
test esi, esi
jl 0x4072bd
jmp 0x40729c
test esi, esi
jl 0x4072bd
mov ebp, dword [esp + 0x18]
cmp ebx, dword [esp + 0x1c]
jb 0x407148
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5bc
ret