Function at 0x40b130
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 [0x423018]
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 0x40b203
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
jne 0x40b203
mov esi, dword [esp + 0x10]
cmp esi, ebx
je 0x40b203
mov ebx, 2
lea ecx, [ecx]
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x40b244
cmp eax, 0x17
je 0x40b244
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x40b1f0
mov eax, dword [edi + 0x1a8]
cmp eax, 0xffffffff
je 0x40b21f
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 0x1a8], 0xffffffff
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40b22e
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.00419346
mov esp, ebp
pop ebp
ret
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 0x40b203
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 0x40b203
cmp dword [esi + 4], ebx
jne 0x40b288
lea eax, [esp + 0x38]
mov dword [esp + 0x14], 0x10
jmp 0x40b294
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 0x40b203
cmp dword [esi + 4], ebx
jne 0x40b2bb
mov ecx, dword [esp + 0x3a]
push ecx
jmp 0x40b2c0
mov edx, dword [esp + 0x4a]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
push eax
call fcn.004027b0
add esp, 4
test eax, eax
je 0x40b313
push 0x41dee4
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x40b203
push 0
push 0
push 0
push 0
push 0
push 0xc0000007
push 0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
jmp 0x40b203
mov eax, dword [esi + 4]
push eax
call fcn.00402820
add esp, 4
test eax, eax
jne 0x40b2d6
mov ecx, dword [edi + 0x1a8]
push SysReAllocString
push ecx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x40b203
mov byte [esp + 0xf], 1
jmp 0x40b21f