Function at 0x40e610
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 [0x42c050]
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 + 0xc]
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 0x40e6ed
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 0x40e72e
push 0x425d34
push ebx
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
cmp esi, ebx
je 0x40e6ed
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 + 0x1a0]
cmp eax, 0xffffffff
je 0x40e709
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 0x1a0], 0xffffffff
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x40e718
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.0041d5b4
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0x10]
cmp esi, ebx
je 0x40e6c0
mov eax, dword [esi + 4]
cmp eax, 2
je 0x40e74f
cmp eax, 0x17
je 0x40e74f
mov esi, dword [esi + 0x1c]
cmp esi, ebx
jne 0x40e736
jmp 0x40e6c0
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 + 0x1a0], eax
cmp eax, 0xffffffff
je 0x40e6c0
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 0x40e6c0
cmp dword [esi + 4], 2
jne 0x40e79c
lea eax, [esp + 0x38]
mov dword [esp + 0x14], 0x10
jmp 0x40e7a8
lea eax, [esp + 0x48]
mov dword [esp + 0x14], 0x1c
lea edx, [esp + 0x14]
push edx
push eax
mov eax, dword [edi + 0x1a0]
push eax
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x40e6c0
cmp dword [esi + 4], 2
jne 0x40e7d0
mov ecx, dword [esp + 0x3a]
push ecx
jmp 0x40e7d5
mov edx, dword [esp + 0x4a]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
push eax
call fcn.004025a0
add esp, 4
test eax, eax
je 0x40e810
push 0x425d34
push ebx
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
cmp esi, ebx
je 0x40e6ed
push ebx
push ebx
push ebx
push ebx
push ebx
push 0xc0000007
jmp 0x40e6dc
mov eax, dword [esi + 4]
push eax
call fcn.00402610
add esp, 4
test eax, eax
jne 0x40e7eb
mov ecx, dword [edi + 0x1a0]
push SysReAllocString
push ecx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x40e84b
push 0xc000000b
push 1
call fcn.0040fe10
add esp, 8
jmp 0x40e6ed
mov byte [esp + 0xf], 1
jmp 0x40e709