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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x540f20
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x59ff60]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x60], ebx
mov eax, dword [ebp + 8]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 4], 0
mov esi, esp
mov dword [ebp - 0x3c], 0
push eax
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x40], 0
call fcn.00403470
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov ecx, edi
lea eax, [ebp - 0x28]
push eax
call fcn.00407ce0
cmp dword [eax + 0x14], 0x10
mov byte [ebp - 4], 1
jb 0x404a74
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x4c]
call fcn.00401bb0
cmp dword [ebp - 0x14], 0x10
mov byte [ebp - 4], 3
jb 0x404a92
push dword [ebp - 0x28]
call fcn.00408e11
add esp, 4
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
call fcn.0040a217
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x404ac0
push 0x80004005
call fcn.00401e00
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x58], eax
push dword [ebp + 8]
mov ecx, 0x552270
mov byte [ebp - 4], 4
test bl, bl
mov eax, 0x55226c
cmove eax, ecx
push eax
lea eax, [ebp - 0x58]
push 0x552274
push eax
call fcn.00405870
mov esi, dword [ebp - 0x58]
add esp, 0x10
mov ebx, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, dword [esi - 0xc]
push 0
push 0
push edi
push esi
push 0
push 3
call ebx
push eax
push 0
mov dword [ebp - 0x34], eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov dword [ebp - 0x30], eax
test eax, eax
je 0x404e01
push dword [ebp - 0x34]
push eax
push edi
push esi
push 0
push 3
call ebx
mov edi, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
push str.Allow_incoming_network_traffic_to_myservice
call edi
push str.Sample_Rule_Group
mov dword [ebp - 0x50], eax
call edi
push 0
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x4c]
push 0
mov dword [ebp - 0x44], eax
mov ecx, dword [eax - 0xc]
push ecx
push eax
push 0
push 3
mov dword [ebp - 0x5c], ecx
call ebx
push eax
push 0
mov dword [ebp - 0x34], eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov dword [ebp - 0x54], eax
test eax, eax
je 0x404e01
push dword [ebp - 0x34]
push eax
push dword [ebp - 0x5c]
push dword [ebp - 0x44]
push 0
push 3
call ebx
push str.myservicename
call edi
push 0x552318
mov dword [ebp - 0x34], eax
call edi
push 2
push 0
mov dword [ebp - 0x44], eax
call dword [sym.imp.ole32.dll_CoInitializeEx]
mov ebx, eax
cmp ebx, 0x80010106
je 0x404bc8
test ebx, ebx
jns 0x404bc8
push ebx
push str.CoInitializeEx_failed:_0x_08lx_n
call fcn.00524997
mov edi, dword [ebp - 0x30]
jmp 0x404d2a
mov edi, dword [sym.imp.ole32.dll_CoCreateInstance]
lea eax, [ebp - 0x3c]
push eax
push 0x552228
push 1
push 0
push 0x552218
call edi
test eax, eax
jns 0x404bf9
push eax
push str.CoCreateInstance_for_INetFwPolicy2_failed:_0x_08lx_n
call fcn.00524997
mov edi, dword [ebp - 0x30]
jmp 0x404d2a
mov eax, dword [ebp - 0x3c]
lea edx, [ebp - 0x38]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x48]
test eax, eax
jns 0x404c1d
push eax
push str.get_Rules_failed:_0x_08lx_n
call fcn.00524997
mov edi, dword [ebp - 0x30]
jmp 0x404d2a
mov eax, dword [ebp - 0x3c]
lea edx, [ebp - 0x40]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
test eax, eax
jns 0x404c41
push eax
push str.get_CurrentProfileTypes_failed:_0x_08lx_n
call fcn.00524997
mov edi, dword [ebp - 0x30]
jmp 0x404d2a
mov eax, dword [ebp - 0x40]
test al, 4
je 0x404c53
cmp eax, 4
je 0x404c53
xor eax, 4
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x2c]
push eax
push 0x552398
push 1
push 0
push 0x552388
call edi
test eax, eax
jns 0x404c7e
push eax
push str.CoCreateInstance_for_Firewall_Rule_failed:_0x_08lx_n
call fcn.00524997
mov edi, dword [ebp - 0x30]
jmp 0x404d2a
mov eax, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x30]
push edi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov eax, dword [ebp - 0x2c]
push dword [ebp - 0x50]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x28]
mov eax, dword [ebp - 0x2c]
push dword [ebp - 0x54]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x30]
mov eax, dword [ebp - 0x2c]
push dword [ebp - 0x34]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebp - 0x2c]
push 6
push eax
mov ecx, dword [eax]
call dword [ecx + 0x40]
cmp byte [ebp - 0x60], 0
jne 0x404ccb
mov eax, dword [ebp - 0x2c]
push 2
push eax
mov ecx, dword [eax]
call dword [ecx + 0x70]
mov eax, dword [ebp - 0x2c]
push dword [ebp - 0x48]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x90]
mov eax, dword [ebp - 0x2c]
push dword [ebp - 0x40]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x98]
mov eax, dword [ebp - 0x2c]
push 1
push eax
mov ecx, dword [eax]
call dword [ecx + 0xa8]
mov eax, dword [ebp - 0x2c]
push 0xffffffffffffffff
push eax
mov ecx, dword [eax]
call dword [ecx + 0x88]
mov eax, dword [ebp - 0x38]
push edi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov eax, dword [ebp - 0x38]
push dword [ebp - 0x2c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
test eax, eax
jns 0x404d2d
push eax
push str.Firewall_Rule_Add_failed:_0x_08lx_n
call fcn.00524997
add esp, 8
push edi
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
call edi
push dword [ebp - 0x50]
call edi
push dword [ebp - 0x48]
call edi
push dword [ebp - 0x54]
call edi
push dword [ebp - 0x34]
call edi
push dword [ebp - 0x44]
call edi
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x404d5c
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov ecx, dword [ebp - 0x38]
test ecx, ecx
je 0x404d69
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x404d76
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
test ebx, ebx
js 0x404d80
call dword [sym.imp.ole32.dll_CoUninitialize]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 3
or esi, 0xffffffff
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x404da0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x4c]
mov ecx, esi
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x404dc0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x404de1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00525164
mov esp, ebp
pop ebp
ret 8
call fcn.00409980
int3