Function at 0x40a490
Capabilities:
Access firewall policy via inetfwpolicy2
Access firewall rule properties via inetfwrule

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4585b0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push esi
mov dword [ebp - 4], 2
push str.Rule_Group
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov ebx, eax
mov dword [ebp - 0x14], 0
mov byte [ebp - 4], 4
push 2
push 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
mov esi, eax
cmp esi, 0x80010106
je 0x40a4fd
test esi, esi
js 0x40a63e
lea eax, [ebp - 0x14]
push eax
push 0x4660e4
push 1
push 0
push 0x463ca4
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 0x1c]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x48]
test eax, eax
jns 0x40a531
push eax
push str.get_Rules_failed:_0x_08lx_n
jmp 0x40a636
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 0x18]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
test eax, eax
jns 0x40a54d
push eax
push str.get_CurrentProfileTypes_failed:_0x_08lx_n
jmp 0x40a636
mov eax, dword [ebp - 0x18]
test al, 4
je 0x40a55f
cmp eax, 4
je 0x40a55f
xor eax, 4
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x10]
push eax
push 0x463d24
push 1
push 0
push 0x463d14
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jns 0x40a586
push eax
push str.CoCreateInstance_for_Firewall_Rule_failed:_0x_08lx_n
jmp 0x40a636
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax - 8]
add ecx, ecx
mov dword [eax - 4], ecx
mov eax, dword [ebp - 0x10]
push dword [ebp + 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x40a5b8
add ecx, ecx
mov dword [eax - 4], ecx
mov eax, dword [ebp - 0x10]
push dword [ebp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x28]
mov eax, dword [ebp + 8]
mov ecx, dword [eax - 8]
add ecx, ecx
mov dword [eax - 4], ecx
mov eax, dword [ebp - 0x10]
push dword [ebp + 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x30]
mov eax, dword [ebp - 0x10]
push 0x100
push eax
mov ecx, dword [eax]
call dword [ecx + 0x40]
mov eax, dword [ebp - 0x10]
push 2
push eax
mov ecx, dword [eax]
call dword [ecx + 0x70]
mov eax, dword [ebp - 0x10]
push ebx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x90]
mov eax, dword [ebp - 0x10]
push dword [ebp - 0x18]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x98]
mov eax, dword [ebp - 0x10]
push 1
push eax
mov ecx, dword [eax]
call dword [ecx + 0xa8]
mov eax, dword [ebp - 0x10]
push 0xffffffffffffffff
push eax
mov ecx, dword [eax]
call dword [ecx + 0x88]
mov eax, dword [ebp - 0x1c]
push dword [ebp - 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
test eax, eax
jns 0x40a63e
push eax
push str.Firewall_Rule_Add_failed:_0x_08lx_n
call fcn.004471c4
add esp, 8
push ebx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x40a652
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x40a65f
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x40a673
mov dword [ebp - 0x14], 0
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
test esi, esi
js 0x40a67d
call dword [sym.imp.ole32.dll_CoUninitialize]
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40a68e
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov byte [ebp - 4], 1
or esi, 0xffffffff
mov eax, dword [ebp + 8]
lea ecx, [eax - 0x20]
cmp ecx, dword [0x476474]
je 0x40a6c0
lea ecx, [eax - 0x20]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40a6c0
mov eax, dword [ebp + 8]
add eax, 0xffffffe0
push eax
call fcn.004471aa
add esp, 4
mov byte [ebp - 4], 0
mov eax, dword [ebp + 0xc]
lea ecx, [eax - 0x20]
cmp ecx, dword [0x476474]
je 0x40a6ef
lea ecx, [eax - 0x20]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40a6ef
mov eax, dword [ebp + 0xc]
add eax, 0xffffffe0
push eax
call fcn.004471aa
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0x10]
lea ecx, [eax - 0x20]
cmp ecx, dword [0x476474]
je 0x40a71f
add eax, 0xffffffe0
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x40a71f
mov eax, dword [ebp + 0x10]
add eax, 0xffffffe0
push eax
call fcn.004471aa
add esp, 4
mov ecx, dword [ebp - 0xc]
xor eax, eax
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret