Function at 0x40a170
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 4]
and eax, 0xffff
mov dword [esp + 4], eax
jmp 0x40a190
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x473e32
push eax
mov dword fs:[0], esp
sub esp, 0x30
push ebx
push esi
push edi
mov edi, ecx
call fcn.0047144d
mov ebx, dword [eax + 0xc]
mov eax, dword [esp + 0x4c]
push 4
push eax
push ebx
call dword [sym.imp.kernel32.dll_FindResourceA]
xor esi, esi
cmp eax, esi
jne 0x40a1df
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
add esp, 0x3c
ret 4
push eax
push ebx
call dword [sym.imp.kernel32.dll_LoadResource]
mov ebx, eax
cmp ebx, esi
jne 0x40a203
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
add esp, 0x3c
ret 4
call dword [sym.imp.user32.dll_CreateMenu]
push eax
mov ecx, edi
call fcn.00460ffd
test eax, eax
jne 0x40a229
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
add esp, 0x3c
ret 4
push ebp
push ebx
call dword [sym.imp.kernel32.dll_LockResource_1]
xor ecx, ecx
mov cx, word [eax + 2]
lea ebx, [ecx + eax + 4]
lea ecx, [esp + 0x2c]
call fcn.0045bb05
mov dword [esp + 0x2c], 0x479b98
mov dword [esp + 0x48], esi
mov dword [esp + 0x18], 0x479b8c
mov dword [esp + 0x1c], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], esi
mov edx, dword [esp + 0x34]
push edi
push edx
lea ecx, [esp + 0x34]
mov byte [esp + 0x50], 1
call fcn.0045bcb8
mov eax, dword [esp + 0x20]
push esi
push eax
lea ecx, [esp + 0x20]
call fcn.0040bf60
jmp 0x40a291
mov ebx, dword [esp + 0x50]
mov ax, word [ebx]
add ebx, 2
mov ebp, eax
mov dword [esp + 0x14], eax
and ebp, 0x10
mov dword [esp + 0x50], ebx
cmp bp, si
jne 0x40a2b3
mov si, word [ebx]
add ebx, 2
mov dword [esp + 0x50], ebx
mov ebx, eax
and ebx, 0xffff
test bl, bl
jns 0x40a2c5
sub ebx, 0x80
mov ecx, dword [esp + 0x50]
push ecx
call fcn.004475e4
lea edx, [eax + eax + 2]
push edx
call fcn.0045cc2f
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x18], eax
push ecx
push eax
call fcn.004475bf
mov edx, dword [esp + 0x60]
push edx
call fcn.004475e4
mov ecx, dword [esp + 0x64]
add esp, 0x14
test bp, bp
lea edx, [ecx + eax*2 + 2]
mov dword [esp + 0x50], edx
je 0x40a3c1
mov al, byte [esp + 0x14]
test al, al
jns 0x40a322
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x34]
mov dword [eax + ecx*4 - 4], 1
push 0x58
call fcn.0045cc2f
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
mov byte [esp + 0x48], 2
je 0x40a344
mov ecx, eax
call fcn.004074e0
mov esi, eax
jmp 0x40a346
xor esi, esi
mov edx, dword [edi + 0x50]
mov byte [esp + 0x48], 1
mov dword [esi + 0x50], edx
mov eax, dword [edi + 0x4c]
mov dword [esi + 0x4c], eax
mov ecx, dword [edi + 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.00460ffd
mov edx, dword [esi + 4]
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x10]
push 0xffffffffffffffff
push edx
mov edx, dword [esp + 0x38]
push ebx
push eax
mov ecx, dword [edx + ecx*4 - 4]
call fcn.004098c0
mov eax, dword [esp + 0x34]
push esi
push eax
lea ecx, [esp + 0x34]
call fcn.0045bcb8
mov eax, dword [esp + 0x20]
push 0xffffffffffffffff
mov esi, eax
inc eax
push eax
lea ecx, [esp + 0x20]
call fcn.0040be20
mov ecx, dword [esp + 0x1c]
mov dword [ecx + esi*4], 0
jmp 0x40a45d
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x10]
and esi, 0xffff
mov ecx, dword [eax + ecx*4 - 4]
push 0xffffffffffffffff
push esi
push ebx
push edx
call fcn.004098c0
mov al, byte [esp + 0x14]
test al, al
jns 0x40a3f9
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x34]
mov dword [edx + eax*4 - 4], 1
mov ecx, dword [esp + 0x34]
lea esi, [ecx - 1]
test esi, esi
jl 0x40a45d
mov edx, dword [esp + 0x1c]
cmp dword [edx + esi*4], 0
je 0x40a45d
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov ecx, dword [eax + ecx*4 - 4]
call fcn.0040a570
push 1
push esi
lea ecx, [esp + 0x34]
call fcn.0045bd71
mov eax, dword [esp + 0x20]
sub eax, esi
dec eax
je 0x40a451
lea edx, [eax*4]
mov eax, dword [esp + 0x1c]
push edx
lea ecx, [eax + esi*4 + 4]
lea edx, [eax + esi*4]
push ecx
push edx
call fcn.00447680
add esp, 0xc
mov ecx, dword [esp + 0x20]
dec ecx
dec esi
mov dword [esp + 0x20], ecx
jns 0x40a404
mov eax, dword [esp + 0x10]
push eax
call fcn.0045cc58
mov ecx, dword [esp + 0x38]
add esp, 4
dec ecx
xor esi, esi
cmp ecx, 0xffffffff
jne 0x40a28d
mov edx, dword [edi + 4]
push edx
call dword [sym.imp.user32.dll_GetMenuItemCount]
test eax, eax
jle 0x40a520
mov ebx, dword [sym.imp.user32.dll_ModifyMenuA]
mov ecx, dword [edi + 0xc]
lea eax, [esp + 0x50]
push eax
mov ecx, dword [ecx + esi*4]
call fcn.004073b0
push esi
mov ecx, edi
mov byte [esp + 0x4c], 3
call fcn.0040b9f0
mov edx, dword [edi + 0xc]
test eax, eax
mov eax, dword [edx + esi*4]
je 0x40a4dd
mov dword [eax + 0xc], 0x410
mov ebp, dword [esp + 0x50]
push esi
mov ecx, edi
call fcn.0040b9f0
mov eax, dword [eax + 4]
mov ecx, dword [edi + 4]
push ebp
push eax
push 0x410
push esi
push ecx
jmp 0x40a4fd
mov dword [eax + 0xc], 0x400
mov ecx, dword [edi + 0xc]
mov edx, dword [ecx + esi*4]
mov ecx, dword [esp + 0x50]
push ecx
mov eax, dword [edx + 0x10]
mov edx, dword [edi + 4]
push eax
push 0x400
push esi
push edx
call ebx
lea ecx, [esp + 0x50]
mov byte [esp + 0x48], 1
call fcn.0045c6d0
mov eax, dword [edi + 4]
inc esi
push eax
call dword [sym.imp.user32.dll_GetMenuItemCount]
cmp esi, eax
jl 0x40a492
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0x479b8c
test eax, eax
pop ebp
je 0x40a53a
push eax
call fcn.0045cc58
add esp, 4
lea ecx, [esp + 0x28]
mov dword [esp + 0x44], 0xffffffff
call fcn.0045bb38
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x3c
ret 4