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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5c
mov eax, dword [0x425018]
xor eax, esp
mov dword [esp + 0x58], eax
xor eax, eax
push ebx
push esi
push edi
xor ebx, ebx
mov edi, ecx
mov ecx, dword [edi + 0x10]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], 1
mov dword [esp + 0x24], 6
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov eax, dword [ecx]
mov edx, dword [eax]
mov byte [esp + 0xf], bl
call edx
test al, al
je 0x40b03d
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
push ebx
push str.localhost
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x40b07e
push 0x41ef14
push ebx
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
cmp esi, ebx
je 0x40b03d
push ebx
push ebx
push ebx
push ebx
push ebx
push 0xc000000b
push ebx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov eax, dword [edi + 0x1a8]
cmp eax, 0xffffffff
je 0x40b059
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 0x1a8], 0xffffffff
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x40b068
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov ecx, dword [esp + 0x64]
mov al, byte [esp + 0xf]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00419b16
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0x10]
cmp esi, ebx
je 0x40b010
mov eax, dword [esi + 4]
cmp eax, 2
je 0x40b09f
cmp eax, 0x17
je 0x40b09f
mov esi, dword [esi + 0x1c]
cmp esi, ebx
jne 0x40b086
jmp 0x40b010
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [edi + 0x1a8], eax
cmp eax, 0xffffffff
je 0x40b010
mov edx, dword [esi + 0x10]
mov ecx, dword [esi + 0x18]
push edx
push ecx
push eax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x40b010
cmp dword [esi + 4], 2
jne 0x40b0ec
lea eax, [esp + 0x38]
mov dword [esp + 0x14], 0x10
jmp 0x40b0f8
lea eax, [esp + 0x48]
mov dword [esp + 0x14], 0x1c
lea edx, [esp + 0x14]
push edx
push eax
mov eax, dword [edi + 0x1a8]
push eax
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x40b010
cmp dword [esi + 4], 2
jne 0x40b120
mov ecx, dword [esp + 0x3a]
push ecx
jmp 0x40b125
mov edx, dword [esp + 0x4a]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
push eax
call fcn.00402800
add esp, 4
test eax, eax
je 0x40b160
push 0x41ef14
push ebx
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
cmp esi, ebx
je 0x40b03d
push ebx
push ebx
push ebx
push ebx
push ebx
push 0xc0000007
jmp 0x40b02c
mov eax, dword [esi + 4]
push eax
call fcn.00402870
add esp, 4
test eax, eax
jne 0x40b13b
mov ecx, dword [edi + 0x1a8]
push SysReAllocString
push ecx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x40b19b
push 0xc000000b
push 1
call fcn.0040c2a0
add esp, 8
jmp 0x40b03d
mov byte [esp + 0xf], 1
jmp 0x40b059