Function at 0x4099c3
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53f859
mov eax, dword fs:[0]
push eax
sub esp, 0x114
mov eax, dword [0x58ee50]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xec], ecx
call fcn.0042e2bf
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x1c], eax
push 4
push dword [ebp + 8]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
jne 0x409a28
and dword [ebp - 0x1c], 0
push 4
push dword [ebp + 8]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
jne 0x409a35
xor eax, eax
jmp 0x40a151
push dword [ebp - 0x54]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x409a51
xor eax, eax
jmp 0x40a151
mov eax, dword [ebp - 0xec]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xec]
call dword [eax + 0x1c]
call dword [sym.imp.USER32.dll_CreateMenu]
push eax
mov ecx, dword [ebp - 0xec]
call fcn.0041a10e
test eax, eax
jne 0x409a7f
xor eax, eax
jmp 0x40a151
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
movzx eax, word [eax + 2]
mov ecx, dword [ebp - 0x14]
lea eax, [ecx + eax + 4]
mov dword [ebp - 0x60], eax
and dword [ebp - 0x5c], 0
xor eax, eax
mov word [ebp - 0x50], ax
xor eax, eax
mov word [ebp - 0x10], ax
and dword [ebp - 0x20], 0
and dword [ebp - 0x18], 0
lea ecx, [ebp - 0x34]
call fcn.0042ff25
mov dword [ebp - 0x34], 0x56ca78
and dword [ebp - 4], 0
lea ecx, [ebp - 0x4c]
call fcn.0040e559
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x84], eax
push dword [ebp - 0xec]
push dword [ebp - 0x84]
lea ecx, [ebp - 0x34]
call fcn.0050e12c
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x88], eax
push 0
push dword [ebp - 0x88]
lea ecx, [ebp - 0x4c]
call fcn.0040ec08
mov eax, dword [ebp - 0x60]
mov ax, word [eax]
mov word [ebp - 0x50], ax
mov eax, dword [ebp - 0x60]
inc eax
inc eax
mov dword [ebp - 0x60], eax
movzx eax, word [ebp - 0x50]
and eax, 0x10
jne 0x409b38
mov eax, dword [ebp - 0x60]
mov ax, word [eax]
mov word [ebp - 0x10], ax
mov eax, dword [ebp - 0x60]
inc eax
inc eax
mov dword [ebp - 0x60], eax
jmp 0x409b3e
xor eax, eax
mov word [ebp - 0x10], ax
movzx eax, word [ebp - 0x50]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
and eax, 0x80
je 0x409b5a
mov eax, dword [ebp - 0x58]
sub eax, 0x80
mov dword [ebp - 0x58], eax
and dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0xf0], eax
mov eax, dword [ebp - 0xf0]
add eax, 2
mov dword [ebp - 0xf4], eax
mov eax, dword [ebp - 0xf0]
mov ax, word [eax]
mov word [ebp - 0xf6], ax
add dword [ebp - 0xf0], 2
cmp word [ebp - 0xf6], 0
jne 0x409b76
mov eax, dword [ebp - 0xf0]
sub eax, dword [ebp - 0xf4]
sar eax, 1
mov dword [ebp - 0xfc], eax
mov eax, dword [ebp - 0xfc]
inc eax
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00410038
pop ecx
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x100], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x104], eax
mov eax, dword [ebp - 0x104]
mov dword [ebp - 0x108], eax
mov eax, dword [ebp - 0x100]
mov ax, word [eax]
mov word [ebp - 0x10a], ax
mov eax, dword [ebp - 0x104]
mov cx, word [ebp - 0x10a]
mov word [eax], cx
mov eax, dword [ebp - 0x100]
inc eax
inc eax
mov dword [ebp - 0x100], eax
mov eax, dword [ebp - 0x104]
inc eax
inc eax
mov dword [ebp - 0x104], eax
cmp word [ebp - 0x10a], 0
jne 0x409bee
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x110], eax
mov eax, dword [ebp - 0x110]
add eax, 2
mov dword [ebp - 0x114], eax
mov eax, dword [ebp - 0x110]
mov ax, word [eax]
mov word [ebp - 0x116], ax
add dword [ebp - 0x110], 2
cmp word [ebp - 0x116], 0
jne 0x409c4c
mov eax, dword [ebp - 0x110]
sub eax, dword [ebp - 0x114]
sar eax, 1
mov dword [ebp - 0x11c], eax
mov eax, dword [ebp - 0x11c]
mov ecx, dword [ebp - 0x60]
lea eax, [ecx + eax*2 + 2]
mov dword [ebp - 0x60], eax
movzx eax, word [ebp - 0x50]
and eax, 0x10
je 0x409ddd
movzx eax, word [ebp - 0x50]
and eax, 0x80
je 0x409cd7
mov eax, dword [ebp - 0x2c]
dec eax
mov dword [ebp - 0x8c], eax
js 0x409cd2
mov eax, dword [ebp - 0x8c]
cmp eax, dword [ebp - 0x44]
jge 0x409cd2
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x8c]
mov dword [eax + ecx*4], 1
jmp 0x409cd7
call fcn.0041f84b
push 0x54
call fcn.0040fffe
pop ecx
mov dword [ebp - 0x78], eax
mov byte [ebp - 4], 2
cmp dword [ebp - 0x78], 0
je 0x409cfc
mov ecx, dword [ebp - 0x78]
call fcn.00404f17
mov dword [ebp - 0x120], eax
jmp 0x409d03
and dword [ebp - 0x120], 0
mov eax, dword [ebp - 0x120]
mov dword [ebp - 0x74], eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x64]
mov ecx, dword [ebp - 0xec]
mov ecx, dword [ecx + 0x48]
mov dword [eax + 0x48], ecx
mov eax, dword [ebp - 0x64]
mov ecx, dword [ebp - 0xec]
mov ecx, dword [ecx + 0x44]
mov dword [eax + 0x44], ecx
mov eax, dword [ebp - 0x64]
mov ecx, dword [ebp - 0xec]
mov ecx, dword [ecx + 0x3c]
mov dword [eax + 0x3c], ecx
mov eax, dword [ebp - 0x64]
mov dword [eax + 0x40], 1
call dword [sym.imp.USER32.dll_CreatePopupMenu]
push eax
mov ecx, dword [ebp - 0x64]
call fcn.0041a10e
mov eax, dword [ebp - 0x2c]
dec eax
mov dword [ebp - 0x90], eax
js 0x409d73
mov eax, dword [ebp - 0x90]
cmp eax, dword [ebp - 0x2c]
jl 0x409d78
call fcn.0041f84b
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x90]
lea eax, [eax + ecx*4]
mov dword [ebp - 0x94], eax
push 0xffffffffffffffff
mov eax, dword [ebp - 0x64]
push dword [eax + 4]
push dword [ebp - 0x58]
push dword [ebp - 0x20]
mov eax, dword [ebp - 0x94]
mov ecx, dword [eax]
call fcn.00408b49
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x98], eax
push dword [ebp - 0x64]
push dword [ebp - 0x98]
lea ecx, [ebp - 0x34]
call fcn.0050e12c
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x9c], eax
push 0
push dword [ebp - 0x9c]
lea ecx, [ebp - 0x4c]
call fcn.0040ec08
jmp 0x409eff
mov eax, dword [ebp - 0x2c]
dec eax
mov dword [ebp - 0xa0], eax
js 0x409df4
mov eax, dword [ebp - 0xa0]
cmp eax, dword [ebp - 0x2c]
jl 0x409df9
call fcn.0041f84b
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0xa0]
lea eax, [eax + ecx*4]
mov dword [ebp - 0xa4], eax
push 0xffffffffffffffff
movzx eax, word [ebp - 0x10]
push eax
push dword [ebp - 0x58]
push dword [ebp - 0x20]
mov eax, dword [ebp - 0xa4]
mov ecx, dword [eax]
call fcn.00408b49
movzx eax, word [ebp - 0x50]
and eax, 0x80
je 0x409e5e
mov eax, dword [ebp - 0x2c]
dec eax
mov dword [ebp - 0xa8], eax
js 0x409e59
mov eax, dword [ebp - 0xa8]
cmp eax, dword [ebp - 0x44]
jge 0x409e59
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0xa8]
mov dword [eax + ecx*4], 1
jmp 0x409e5e
call fcn.0041f84b
mov eax, dword [ebp - 0x2c]
dec eax
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
jl 0x409eff
cmp dword [ebp - 0x5c], 0
jl 0x409e8e
mov eax, dword [ebp - 0x5c]
cmp eax, dword [ebp - 0x44]
jge 0x409e8e
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x5c]
lea eax, [eax + ecx*4]
mov dword [ebp - 0xac], eax
jmp 0x409e93
call fcn.0041f84b
mov eax, dword [ebp - 0xac]
cmp dword [eax], 0
je 0x409eff
mov eax, dword [ebp - 0x2c]
dec eax
mov dword [ebp - 0xb0], eax
js 0x409eb5
mov eax, dword [ebp - 0xb0]
cmp eax, dword [ebp - 0x2c]
jl 0x409eba
call fcn.0041f84b
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0xb0]
lea eax, [eax + ecx*4]
mov dword [ebp - 0xb4], eax
mov eax, dword [ebp - 0xb4]
mov ecx, dword [eax]
call fcn.0040a4db
push 1
push dword [ebp - 0x5c]
lea ecx, [ebp - 0x34]
call fcn.00430035
push 1
push dword [ebp - 0x5c]
lea ecx, [ebp - 0x4c]
call fcn.0040e58a
mov eax, dword [ebp - 0x5c]
dec eax
mov dword [ebp - 0x5c], eax
jmp 0x409e65
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x7c], eax
push dword [ebp - 0x7c]
call fcn.0041002d
pop ecx
mov eax, dword [ebp - 0x2c]
dec eax
cmp eax, 0xffffffff
jne 0x409b09
and dword [ebp - 0x68], 0
jmp 0x409f28
mov eax, dword [ebp - 0x68]
inc eax
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0xec]
push dword [eax + 4]
call dword [sym.imp.USER32.dll_GetMenuItemCount]
cmp dword [ebp - 0x68], eax
jge 0x40a122
mov eax, dword [ebp - 0xec]
add eax, 8
mov dword [ebp - 0xbc], eax
cmp dword [ebp - 0x68], 0
jl 0x409f63
mov eax, dword [ebp - 0xbc]
mov ecx, dword [ebp - 0x68]
cmp ecx, dword [eax + 8]
jl 0x409f68
call fcn.0041f84b
mov eax, dword [ebp - 0xbc]
mov eax, dword [eax + 4]
mov ecx, dword [ebp - 0x68]
lea eax, [eax + ecx*4]
mov dword [ebp - 0xb8], eax
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebp - 0xb8]
mov ecx, dword [eax]
call fcn.00404d82
mov byte [ebp - 4], 3
push dword [ebp - 0x68]
mov ecx, dword [ebp - 0xec]
call fcn.0040d390
test eax, eax
je 0x40a03c
mov eax, dword [ebp - 0xec]
add eax, 8
mov dword [ebp - 0xc4], eax
cmp dword [ebp - 0x68], 0
jl 0x409fcb
mov eax, dword [ebp - 0xc4]
mov ecx, dword [ebp - 0x68]
cmp ecx, dword [eax + 8]
jl 0x409fd0
call fcn.0041f84b
mov eax, dword [ebp - 0xc4]
mov eax, dword [eax + 4]
mov ecx, dword [ebp - 0x68]
lea eax, [eax + ecx*4]
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp - 0xc0]
mov eax, dword [eax]
mov dword [eax + 0x10], 0x410
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0xc8], eax
push dword [ebp - 0x68]
mov ecx, dword [ebp - 0xec]
call fcn.0040d390
mov eax, dword [eax + 4]
mov dword [ebp - 0xcc], eax
push dword [ebp - 0xc8]
push dword [ebp - 0xcc]
push 0x410
push dword [ebp - 0x68]
mov eax, dword [ebp - 0xec]
push dword [eax + 4]
call dword [sym.imp.USER32.dll_ModifyMenuA]
jmp 0x40a102
mov eax, dword [ebp - 0xec]
add eax, 8
mov dword [ebp - 0xd4], eax
cmp dword [ebp - 0x68], 0
jl 0x40a05f
mov eax, dword [ebp - 0xd4]
mov ecx, dword [ebp - 0x68]
cmp ecx, dword [eax + 8]
jl 0x40a064
call fcn.0041f84b
mov eax, dword [ebp - 0xd4]
mov eax, dword [eax + 4]
mov ecx, dword [ebp - 0x68]
lea eax, [eax + ecx*4]
mov dword [ebp - 0xd0], eax
mov eax, dword [ebp - 0xd0]
mov eax, dword [eax]
mov dword [eax + 0x10], 0x400
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0xd8], eax
mov eax, dword [ebp - 0xec]
add eax, 8
mov dword [ebp - 0xe0], eax
cmp dword [ebp - 0x68], 0
jl 0x40a0b4
mov eax, dword [ebp - 0xe0]
mov ecx, dword [ebp - 0x68]
cmp ecx, dword [eax + 8]
jl 0x40a0b9
call fcn.0041f84b
mov eax, dword [ebp - 0xe0]
mov eax, dword [eax + 4]
mov ecx, dword [ebp - 0x68]
lea eax, [eax + ecx*4]
mov dword [ebp - 0xdc], eax
mov eax, dword [ebp - 0xdc]
mov eax, dword [eax]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0xe4], eax
push dword [ebp - 0xd8]
push dword [ebp - 0xe4]
push 0x400
push dword [ebp - 0x68]
mov eax, dword [ebp - 0xec]
push dword [eax + 4]
call dword [sym.imp.USER32.dll_ModifyMenuA]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x6c]
sub eax, 0x10
mov dword [ebp - 0xe8], eax
mov ecx, dword [ebp - 0xe8]
call fcn.00403d0e
jmp 0x409f21
mov eax, dword [ebp - 0xec]
mov dword [eax + 0x50], 1
mov dword [ebp - 0x80], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4c]
call fcn.0040e645
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x34]
call fcn.0042ff3c
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
leave
ret 4