Function at 0x40a4e0
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 [0x421018]
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 0x40a5bd
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 0x40a5fe
push 0x41be5c
push ebx
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
cmp esi, ebx
je 0x40a5bd
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 0x40a5d9
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 0x1a0], 0xffffffff
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x40a5e8
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.00417cae
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0x10]
cmp esi, ebx
je 0x40a590
mov eax, dword [esi + 4]
cmp eax, 2
je 0x40a61f
cmp eax, 0x17
je 0x40a61f
mov esi, dword [esi + 0x1c]
cmp esi, ebx
jne 0x40a606
jmp 0x40a590
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 0x40a590
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 0x40a590
cmp dword [esi + 4], 2
jne 0x40a66c
lea eax, [esp + 0x38]
mov dword [esp + 0x14], 0x10
jmp 0x40a678
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 0x40a590
cmp dword [esi + 4], 2
jne 0x40a6a0
mov ecx, dword [esp + 0x3a]
push ecx
jmp 0x40a6a5
mov edx, dword [esp + 0x4a]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
push eax
call fcn.00402820
add esp, 4
test eax, eax
je 0x40a6e0
push 0x41be5c
push ebx
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
cmp esi, ebx
je 0x40a5bd
push ebx
push ebx
push ebx
push ebx
push ebx
push 0xc0000007
jmp 0x40a5ac
mov eax, dword [esi + 4]
push eax
call fcn.00402890
add esp, 4
test eax, eax
jne 0x40a6bb
mov ecx, dword [edi + 0x1a0]
push SysReAllocString
push ecx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x40a71b
push 0xc000000b
push 1
call fcn.0040be90
add esp, 8
jmp 0x40a5bd
mov byte [esp + 0xf], 1
jmp 0x40a5d9