Function at 0x40f620
Capabilities:
Access the windows event log
Get local ipv4 addresses
Get socket information
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x78
mov eax, dword [0x42e00c]
xor eax, esp
mov dword [esp + 0x74], eax
push esi
push edi
mov edi, ecx
mov dword [esp + 0x1c], 0
xorps xmm0, xmm0
mov dword [esp + 0x18], 0
xor al, al
movaps xmmword [esp + 0x20], xmm0
mov byte [esp + 0x17], al
mov ecx, dword [edi + 0xc]
movaps xmmword [esp + 0x30], xmm0
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 1
mov dword [esp + 0x2c], 6
movaps xmmword [esp + 0x40], xmm0
movaps xmmword [esp + 0x50], xmm0
movq qword [esp + 0x60], xmm0
mov dword [esp + 0x68], 0
mov eax, dword [ecx]
mov eax, dword [eax]
call eax
test al, al
jne 0x40f6aa
push str.dispatcher_init_failed_n
call fcn.00401aa0
add esp, 4
jmp 0x40f878
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x24]
push eax
push 0
push str.localhost
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x40f6d7
push str.failed_to_get_adderss_info_n
call fcn.00401aa0
add esp, 4
jmp 0x40f844
mov esi, dword [esp + 0x18]
test esi, esi
jne 0x40f6f1
push str.no_adderss_info_recieved_n
call fcn.00401aa0
add esp, 4
jmp 0x40f844
mov eax, dword [esi + 4]
cmp eax, 2
je 0x40f717
cmp eax, 0x17
je 0x40f717
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x40f6f1
push str.failed_to_find_IPV4_or_IPV6_address_n
call fcn.00401aa0
add esp, 4
jmp 0x40f844
push dword [esi + 0xc]
push dword [esi + 8]
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [edi + 0x1a0], eax
cmp eax, 0xffffffff
jne 0x40f740
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.socket___failed_with_error:__d_n
jmp 0x40f83c
push dword [esi + 0x10]
push dword [esi + 0x18]
push eax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x40f763
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.bind___failed_with_error:__d_n
jmp 0x40f83c
mov ecx, dword [esi + 4]
mov edx, 0x10
cmp ecx, 2
mov eax, 0x1c
cmove eax, edx
lea edx, [esp + 0x40]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x54]
cmove eax, edx
push eax
push dword [edi + 0x1a0]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x40f7ac
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.getsockname___failed_with_error:__d_n
jmp 0x40f83c
cmp dword [esi + 4], 2
jne 0x40f7b8
push dword [esp + 0x42]
jmp 0x40f7bc
push dword [esp + 0x52]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
call fcn.00402fe0
test eax, eax
je 0x40f803
push str.failed_to_write_service_port_at_registry.
call fcn.00401aa0
add esp, 4
push str.IntelDalJhi
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x40f878
push 0
push 0
push 0
push 0
push 0
push 0xc0000007
jmp 0x40f866
mov ecx, dword [esi + 4]
call fcn.00403080
test eax, eax
je 0x40f816
push str.failed_to_write_address_type_at_registry.
jmp 0x40f7d3
push SysReAllocString
push dword [edi + 0x1a0]
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x40f8bc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.listen_failed_with_error:__d_n
call fcn.00401aa0
add esp, 8
push str.IntelDalJhi
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x40f878
push 0
push 0
push 0
push 0
push 0
push 0xc000000b
push 0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov eax, dword [edi + 0x1a0]
cmp eax, 0xffffffff
je 0x40f894
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 0x1a0], 0xffffffff
mov al, byte [esp + 0x17]
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x40f8ab
push ecx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov al, byte [esp + 0x17]
mov ecx, dword [esp + 0x7c]
pop edi
pop esi
xor ecx, esp
call fcn.0041e725
mov esp, ebp
pop ebp
ret
mov al, 1
mov byte [esp + 0x17], al
jmp 0x40f898