Function at 0x401fe0
Capabilities:
Access the windows event log

Disassembly:
sub esp, 0x238
mov eax, dword [0x43e008]
xor eax, esp
mov dword [esp + 0x234], eax
push ebx
push ebp
mov ebp, dword [esp + 0x24c]
lea eax, [esp + 0x24]
push esi
push edi
push eax
mov ebx, ecx
mov dword [esp + 0x18], ebp
lea eax, [esp + 0x34]
mov dword [esp + 0x30], 0x105
xor esi, esi
push eax
push esi
lea edi, [ebx + 0x64]
mov dword [esp + 0x24], esi
push edi
mov dword [esp + 0x38], esi
call dword [sym.imp.instapi160.dll_GetInstRegPathByID]
test eax, eax
je 0x402086
xor eax, eax
mov word [esp + 0x238], ax
lea eax, [esp + 0x28]
push eax
push 0x20019
push esi
push edi
call dword [sym.imp.instapi160.dll_GetInstRegKeyAccessMask]
test eax, eax
jne 0x4020b3
test byte [0x43f278], 2
je 0x402086
cmp dword [str._SafeGetInstRegPathWithMaskERR__access_mask:__dWINERR_pInstanceID:___pPINST_ID_n], esi
je 0x402082
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [str._SafeGetInstRegPathWithMaskERR__access_mask:__dWINERR_pInstanceID:___pPINST_ID_n]
push eax
mov eax, dword [str.sql_ntdbms_browser_sqlbrowser_brwssafe.cpp]
push 0xbc00
push eax
call fcn.00405110
add esp, 0x14
mov esi, dword [esp + 0x18]
xor edi, edi
push 0x410
push esi
call fcn.0041482a
mov ecx, dword [esp + 0x24c]
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004145b4
add esp, 0x238
ret 0xc
lea ecx, [esp + 0x30]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4020c0
sub ecx, edx
mov eax, 0x104
sar ecx, 1
sub eax, ecx
cmp eax, 0x12
jae 0x402145
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.SQLBrowser
push 0
mov dword [esp + 0x1c], eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov edi, eax
test edi, edi
je 0x40212e
lea eax, [esp + 0x30]
push eax
push 0
push 0x20a
push 0
push 0
push 0xc04e0001
push 0
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push edi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x402086
push 0
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x402086
push str.SuperSocketNetLib
mov edx, 0x105
lea ecx, [esp + 0x34]
call fcn.00401120
test eax, eax
js 0x402086
lea edi, [ebx + 0x4d8]
push edi
push dword [esp + 0x2c]
lea eax, [esp + 0x38]
push 0
push eax
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40218d
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x402086
push 1
push dword [ebx + 0x4d4]
push 4
push 1
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_RegNotifyChangeKeyValue]
test eax, eax
je 0x402214
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov dword [esp + 0x14], eax
call edi
push str.SQLBrowser
push 0
mov dword [esp + 0x2c], eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov edi, eax
test edi, edi
je 0x4021fd
lea eax, [esp + 0x14]
push eax
push 0
push 4
push 0
push 0
push 0xc04e0006
push 0
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push edi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x402086
push 0
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x402086
push 1
push 0
lea edx, [esp + 0x20]
mov ecx, ebx
call fcn.0040ae80
test eax, eax
jne 0x402082
lea eax, [esp + 0x24]
mov dword [esp + 0x24], esi
mov esi, dword [esp + 0x18]
mov ecx, esi
push eax
push 0x416a18
call fcn.0040afb0
mov ecx, dword [ebx + 0xcc]
test eax, eax
je 0x40226b
cmp eax, 2
jne 0x402258
and ecx, 0xfffffffd
jmp 0x40227b
or ecx, 2
mov edi, 1
mov dword [ebx + 0xcc], ecx
jmp 0x402088
mov eax, dword [esp + 0x24]
neg eax
sbb eax, eax
and ecx, 0xfffffffd
and eax, 2
or ecx, eax
push ebp
push dword [esp + 0x254]
mov dword [ebx + 0xcc], ecx
mov ecx, ebx
push dword [esp + 0x254]
push esi
call fcn.004017f0
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
test eax, eax
jne 0x4022fd
mov dword [esp + 0x1c], 0x416a34
mov dword [esp + 0x20], ebx
call edi
push str.SQLBrowser
push 0
mov dword [esp + 0x20], eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov edi, eax
push 0
test edi, edi
je 0x4022eb
lea eax, [esp + 0x20]
push eax
push 0
push 2
push 0
push 0xc04e0003
push 0
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push edi
call ebp
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [esp + 0x14]
mov ecx, ebx
push dword [esp + 0x254]
push dword [esp + 0x254]
push esi
call fcn.004019b0
test eax, eax
jne 0x40236a
mov dword [esp + 0x1c], 0x416a3c
mov dword [esp + 0x20], ebx
call edi
push str.SQLBrowser
push 0
mov dword [esp + 0x20], eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov edi, eax
push 0
test edi, edi
je 0x40235e
lea eax, [esp + 0x20]
push eax
push 0
push 2
push 0
push 0xc04e0003
push 0
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push edi
call ebp
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [esp + 0x14]
mov ecx, ebx
push dword [esp + 0x254]
push dword [esp + 0x254]
push esi
call fcn.00401c00
test eax, eax
jne 0x4023db
mov dword [esp + 0x1c], 0x416a44
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.SQLBrowser
push 0
mov dword [esp + 0x1c], eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov edi, eax
push 0
test edi, edi
je 0x4023cf
lea eax, [esp + 0x20]
push eax
push 0
push 2
push 0
push 0xc04e0003
push 0
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push edi
call ebp
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
mov ecx, ebx
call fcn.00401e00
test eax, eax
jne 0x40243a
mov dword [esp + 0x1c], str.AdminConnectionTCP
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.SQLBrowser
push 0
mov dword [esp + 0x1c], eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov edi, eax
push 0
test edi, edi
je 0x40242e
lea eax, [esp + 0x20]
push eax
push 0
push 2
push 0
push 0xc04e0003
push 0
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push edi
call ebp
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, 1
jmp 0x402088