Function at 0x5287e0
Capabilities:
Check for time delay via gettickcount
Connect socket
Resolve dns
Resolve function by parsing pe exports
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a3f99
mov eax, dword fs:[0]
push eax
sub esp, 0x2e4
mov eax, dword [0x62d12c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x2ac], esi
push 0x51c050
call fcn.005624dd
add esp, 4
mov dword [ebp - 0x2c8], eax
xor edi, edi
mov dword [ebp - 4], edi
push 0xffffffffffffffff
push edi
lea eax, [esi + 0x1b4]
push eax
lea ecx, [esi + 0x208]
call fcn.00422470
mov ecx, esi
call fcn.00528530
mov ecx, esi
call fcn.0051f2f0
mov ecx, esi
call fcn.00526a40
mov byte [esi + 0x1c], 1
call sub.KERNEL32.dll_GetTickCount
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 0x2a4], edi
call sub.KERNEL32.dll_GetTickCount
mov dword [ebp - 0x2b8], eax
mov dword [ebp - 0x2b4], edi
mov ebx, dword [esi + 0x44]
cmp ebx, dword [esi + 0x48]
je 0x528a4d
lea edi, [ebx + 0x38]
cmp dword [edi - 0x30], 0xffffffff
jne 0x528975
cmp dword [edi], 0x10
jb 0x5288a4
mov eax, dword [edi - 0x14]
jmp 0x5288a7
lea eax, [edi - 0x14]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [edi - 0x20], eax
cmp eax, 0xffffffff
jne 0x528959
cmp dword [edi], 0x10
jb 0x5288c4
mov eax, dword [edi - 0x14]
jmp 0x5288c7
lea eax, [edi - 0x14]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x52894f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, dword [ebx]
je 0x528a3e
mov dword [ebx], eax
xor ecx, ecx
mov word [ebp - 0x214], cx
push 0x1fe
push ecx
lea edx, [ebp - 0x212]
push edx
call fcn.0055aed0
add esp, 0xc
mov eax, dword [edi - 4]
cmp dword [edi], 0x10
jb 0x52890d
mov ecx, dword [edi - 0x14]
jmp 0x528910
lea ecx, [edi - 0x14]
push 0x100
lea edx, [ebp - 0x214]
push edx
inc eax
push eax
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x528a3e
lea eax, [ebp - 0x214]
push eax
mov ecx, dword [ebx]
push ecx
push str._DIAG__EVENTError_connecting_to_Syslog__ERROR_d__EVENTMSG_Error_connecting_to__s_
push 4
call fcn.00530200
add esp, 0x10
jmp 0x528a3e
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov dword [edi - 0x20], ecx
mov edx, dword [edi - 0x28]
push edx
mov eax, dword [edi - 0x2c]
push eax
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [edi - 0x30], eax
cmp eax, 0xffffffff
je 0x5288d2
cmp dword [edi - 0x34], 0
jg 0x528a3e
push 0x10
lea edx, [edi - 0x24]
push edx
mov eax, dword [edi - 0x30]
push eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x5289ee
movzx ecx, byte [edi - 0x1d]
push ecx
movzx edx, byte [edi - 0x1e]
push edx
movzx eax, byte [edi - 0x1f]
push eax
movzx ecx, byte [edi - 0x20]
push ecx
push str._DIAG__EVENTSyslog_connected__EVENTMSG_Connected_to__d._d._d._d_
push 4
call fcn.00530200
add esp, 0x18
mov dword [ebx], 0
mov dword [edi - 0x34], 1
cmp byte [esi + 0x2a8], 0
jne 0x528a3e
mov dword [ebp - 0x29c], 1
lea edx, [ebp - 0x29c]
push edx
push 0x8004667e
mov eax, dword [edi - 0x30]
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
jmp 0x528a3e
cmp dword [edi - 0x34], 0
jge 0x528a1e
movzx ecx, byte [edi - 0x1d]
push ecx
movzx edx, byte [edi - 0x1e]
push edx
movzx eax, byte [edi - 0x1f]
push eax
movzx ecx, byte [edi - 0x20]
push ecx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._DIAG__EVENTSyslog_disconnected__ERROR_d__EVENTMSG_Connect_failed_to__d._d._d._d_
push 4
call fcn.00530200
add esp, 0x1c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebx], eax
mov edx, dword [edi - 0x30]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi - 0x30], 0xffffffff
mov dword [edi - 0x34], 0
add ebx, 0x40
add edi, 0x40
cmp ebx, dword [esi + 0x48]
jne 0x528890
push 0
push 0xc8
lea ecx, [esi + 0xc]
call fcn.0050a600
mov dword [ebp - 0x2b0], eax
cmp dword [ebp - 0x2b0], 1
jne 0x528a6f
mov byte [esi + 0x1c], 0
cmp byte [esi + 0x2ab], 0
je 0x528b8f
mov byte [ebp - 0x292], 0
cmp byte [esi + 0x298], 0
je 0x528b3c
xor eax, eax
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x234], eax
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x22c], eax
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x248]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [ebp - 0x242]
mov dword [ebp - 0x22c], ecx
mov eax, dword [ebp - 0x246]
lea edx, [eax - 1]
cmp dx, 0xb
ja 0x528afb
movzx eax, ax
dec eax
mov dword [ebp - 0x228], eax
movzx eax, word [ebp - 0x248]
add eax, 0xfffff894
test eax, eax
jle 0x528b11
mov dword [ebp - 0x224], eax
lea ecx, [ebp - 0x238]
push ecx
call fcn.0056246b
mov edi, eax
mov ebx, edx
lea edx, [esi + 0x78]
push edx
call fcn.0056246b
add esp, 8
cmp edi, eax
jne 0x528b35
cmp ebx, edx
je 0x528b3c
mov byte [ebp - 0x292], 1
cmp dword [esi + 0x10c], 0
je 0x528b58
mov eax, dword [esi + 0xa0]
mov ecx, dword [eax + 4]
test byte [ecx + esi + 0xac], 6
je 0x528b6a
call sub.KERNEL32.dll_GetTickCount
sub eax, dword [ebp - 0x2b8]
cmp eax, 0x493e0
jg 0x528b73
cmp byte [ebp - 0x292], 1
jne 0x528b8f
call sub.KERNEL32.dll_GetTickCount
mov dword [ebp - 0x2b8], eax
mov dword [ebp - 0x2b4], 0
mov ecx, esi
call fcn.00523bd0
lea ecx, [esi + 0x20]
call fcn.00521f50
mov edi, eax
mov dword [ebp - 0x29c], edi
mov dword [ebp - 0x2f0], edi
mov byte [ebp - 4], 1
test edi, edi
jne 0x528f09
mov byte [ebp - 4], al
cmp dword [ebp - 0x2b0], 1
jne 0x528c04
mov ecx, esi
call fcn.00523b40
mov ecx, esi
call fcn.0051cd00
mov ecx, esi
call fcn.005207b0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x2c8]
push edx
call fcn.005624dd
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00558b78
mov esp, ebp
pop ebp
ret
cmp byte [esi + 0x178], 0
je 0x528881
call sub.KERNEL32.dll_GetTickCount
xor edx, edx
mov ecx, eax
sub ecx, dword [ebp - 0x2a8]
mov edi, edx
sbb edi, dword [ebp - 0x2a4]
mov dword [ebp - 0x29c], edi
js 0x528881
jg 0x528c42
cmp ecx, 0x7530
jbe 0x528881
mov dword [ebp - 0x2a8], eax
mov dword [ebp - 0x2a4], edx
cmp dword [esi + 0x18c], edx
je 0x528881
lea eax, [esi + 0x17c]
cmp dword [eax + 0x14], 8
jb 0x528c68
mov eax, dword [eax]
push 1
movzx ecx, byte [esi + 0x179]
push ecx
push eax
lea ecx, [ebp - 0x290]
call fcn.0050e880
mov byte [ebp - 4], 0xc
push 0
lea ecx, [ebp - 0x290]
call fcn.0050ef60
test al, al
je 0x528ef5
lea edx, [ebp - 0x298]
push edx
push 0x5d9790
lea ecx, [ebp - 0x290]
call fcn.0050e090
test al, al
je 0x528cbd
mov eax, dword [ebp - 0x298]
cmp eax, 0xf
jbe 0x528cc3
mov eax, dword [esi + 0x160]
mov dword [esi + 0x164], eax
lea ecx, [ebp - 0x298]
push ecx
push str.EventLogLevel
lea ecx, [ebp - 0x290]
call fcn.0050e090
test al, al
je 0x528cf7
mov eax, dword [ebp - 0x298]
cmp eax, 0xf
ja 0x528cf7
mov dword [esi + 0x168], eax
jmp 0x528d01
mov dword [esi + 0x168], 2
lea edx, [ebp - 0x298]
push edx
push str.SysLogLevel
lea ecx, [ebp - 0x290]
call fcn.0050e090
test al, al
je 0x528d2f
mov eax, dword [ebp - 0x298]
cmp eax, 0xf
ja 0x528d2f
mov dword [esi + 0x16c], eax
jmp 0x528d39
mov dword [esi + 0x16c], 2
lea eax, [ebp - 0x298]
push eax
push str.ConsoleLogLevel
lea ecx, [ebp - 0x290]
call fcn.0050e090
test al, al
je 0x528d70
mov eax, dword [ebp - 0x298]
cmp eax, 0xf
ja 0x528d70
mov dword [esi + 0x170], eax
lea edi, [esi + 0x2ad]
mov byte [edi], 1
jmp 0x528d83
mov dword [esi + 0x170], 3
lea edi, [esi + 0x2ad]
mov byte [edi], 0
mov ecx, esi
call fcn.0051cdf0
push edi
push str.ConsoleLogEnabled
lea ecx, [ebp - 0x290]
call fcn.0050e1d0
push 0
lea ecx, [esi + 0x2a4]
push ecx
push str.DebugLogMaxDailyFileAge
lea ecx, [ebp - 0x290]
call fcn.0050e0e0
push 0
lea edx, [esi + 0x2c8]
push edx
push str.DebugLogEncoding
lea ecx, [ebp - 0x290]
call fcn.0050e0e0
push 1
lea eax, [esi + 0x2a8]
push eax
push str.BlockingSyslog
lea ecx, [ebp - 0x290]
call fcn.0050e220
push 1
lea ecx, [esi + 0x2a9]
push ecx
push str.AddSyslogHeader
lea ecx, [ebp - 0x290]
call fcn.0050e220
cmp dword [esi + 0x64], 0
setne dl
movzx eax, dl
push eax
lea ecx, [ebp - 0x291]
push ecx
push str.SysLogEnabled
lea ecx, [ebp - 0x290]
call fcn.0050e220
mov al, byte [ebp - 0x291]
cmp al, byte [esi + 0x2ac]
je 0x528e47
mov byte [esi + 0x2ac], al
mov ecx, esi
test al, al
je 0x528e42
call fcn.00528530
jmp 0x528e47
call fcn.005207b0
cmp dword [esi + 0x1e0], 0
setne dl
movzx eax, dl
push eax
lea ecx, [ebp - 0x291]
push ecx
push str.DebugLogEnabled
lea ecx, [ebp - 0x290]
call fcn.0050e220
mov al, byte [ebp - 0x291]
cmp al, byte [esi + 0x2ab]
je 0x528e92
mov byte [esi + 0x2ab], al
mov ecx, esi
test al, al
je 0x528e8d
call fcn.00523bd0
jmp 0x528e92
call fcn.00523b40
push 1
lea edx, [ebp - 0x291]
push edx
push str.EventLogEnabled
lea ecx, [ebp - 0x290]
call fcn.0050e220
mov al, byte [ebp - 0x291]
cmp al, byte [esi + 0x2ae]
je 0x528ed1
mov byte [esi + 0x2ae], al
mov ecx, esi
test al, al
je 0x528ecc
call fcn.0051f2f0
jmp 0x528ed1
call fcn.0051cd00
push 0x3c
lea eax, [esi + 0x2b8]
push eax
push str.EventLogTimeThreshold
lea ecx, [ebp - 0x290]
call fcn.0050e180
lea ecx, [ebp - 0x290]
call fcn.0050b020
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x290]
call fcn.0050e450
jmp 0x528881
mov byte [ebp - 4], 4
mov eax, dword [esi + 0x29c]
test eax, eax
jle 0x529169
mov ecx, dword [esi + 0x3c]
cmp ecx, eax
jbe 0x528fe0
cmp byte [esi + 0x2a1], 0
jne 0x528fd4
call sub.KERNEL32.dll_GetCurrentThreadId
mov ebx, eax
push str._DIAG__EVENTDebugLog_Max_Event_Queue_Exceeded__EVENTMSG_Dropping_messages_except_for_log_file_
lea ecx, [ebp - 0x2d4]
call fcn.00510590
mov byte [ebp - 4], 5
push 0
lea ecx, [ebp - 0x2d4]
call fcn.00510a00
push eax
push 0
push ebx
lea eax, [edi + 0x24]
push eax
mov ecx, esi
call fcn.0051c9d0
push 0
lea ecx, [ebp - 0x2d4]
call fcn.00510a00
push eax
push 0
push ebx
lea eax, [edi + 0x24]
push eax
mov ecx, esi
call fcn.0051cc90
push 0
push 0
lea ecx, [ebp - 0x2d4]
call fcn.00510a00
push eax
push 0
push ebx
lea eax, [edi + 0x24]
push eax
mov ecx, esi
call fcn.00520320
push 0x5e3368
push 0
lea ecx, [ebp - 0x2d4]
call fcn.00510a00
push eax
push 0
push ebx
lea eax, [edi + 0x24]
push eax
mov ecx, esi
call fcn.00526710
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2d4]
call fcn.00510710
mov byte [esi + 0x2a1], 1
jmp 0x529169
lea edx, [eax + eax*2]
shr edx, 2
cmp ecx, edx
jbe 0x5290a8
cmp byte [esi + 0x2a0], 0
jne 0x52909c
call sub.KERNEL32.dll_GetCurrentThreadId
mov ebx, eax
push str._DIAG__EVENTDebugLog_Max_Event_Queue_Threshold_Warning__EVENTMSG_Event_queue_has_exceeded_75__
lea ecx, [ebp - 0x2ec]
call fcn.00510590
mov byte [ebp - 4], 6
push 0
lea ecx, [ebp - 0x2ec]
call fcn.00510a00
push eax
push 1
push ebx
lea eax, [edi + 0x24]
push eax
mov ecx, esi
call fcn.0051c9d0
push 0
lea ecx, [ebp - 0x2ec]
call fcn.00510a00
push eax
push 1
push ebx
lea eax, [edi + 0x24]
push eax
mov ecx, esi
call fcn.0051cc90
push 0
push 0
lea ecx, [ebp - 0x2ec]
call fcn.00510a00
push eax
push 1
push ebx
lea eax, [edi + 0x24]
push eax
mov ecx, esi
call fcn.00520320
push 0x5e3368
push 0
lea ecx, [ebp - 0x2ec]
call fcn.00510a00
push eax
push 1
push ebx
lea eax, [edi + 0x24]
push eax
mov ecx, esi
call fcn.00526710
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2ec]
call fcn.00510710
mov byte [esi + 0x2a0], 1
jmp 0x529169
shr eax, 1
cmp ecx, eax
jae 0x529169
cmp byte [esi + 0x2a1], 0
je 0x529160
call sub.KERNEL32.dll_GetCurrentThreadId
mov ebx, eax
push str._DIAG__EVENTDebugLog_Max_Event_Queue_Threshold_Enabled__EVENTMSG_Event_queue_has_dropped_below_50___re_enabling_all_logging._
lea ecx, [ebp - 0x2e0]
call fcn.00510590
mov byte [ebp - 4], 7
push 0
lea ecx, [ebp - 0x2e0]
call fcn.00510a00
push eax
push 1
push ebx
lea eax, [edi + 0x24]
push eax
mov ecx, esi
call fcn.0051c9d0
push 0
lea ecx, [ebp - 0x2e0]
call fcn.00510a00
push eax
push 1
push ebx
lea eax, [edi + 0x24]
push eax
mov ecx, esi
call fcn.0051cc90
push 0
push 0
lea ecx, [ebp - 0x2e0]
call fcn.00510a00
push eax
push 1
push ebx
lea eax, [edi + 0x24]
push eax
mov ecx, esi
call fcn.00520320
push 0x5e3368
push 0
lea ecx, [ebp - 0x2e0]
call fcn.00510a00
push eax
push 1
push ebx
lea eax, [edi + 0x24]
push eax
mov ecx, esi
call fcn.00526710
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2e0]
call fcn.00510710
mov word [esi + 0x2a0], 0
cmp byte [esi + 0x2a1], 0
je 0x529190
push 0x5e3368
mov eax, dword [edi]
push eax
lea ecx, [edi + 0x18]
call fcn.00510a00
push eax
mov ecx, dword [edi + 8]
push ecx
mov edx, dword [edi + 4]
push edx
jmp 0x529213
mov ecx, dword [edi]
push ecx
lea ecx, [edi + 0x18]
call fcn.00510a00
push eax
mov edx, dword [edi + 8]
push edx
mov eax, dword [edi + 4]
push eax
lea eax, [edi + 0x24]
push eax
mov ecx, esi
call fcn.0051c9d0
mov ecx, dword [edi]
push ecx
lea ecx, [edi + 0x18]
call fcn.00510a00
push eax
mov edx, dword [edi + 8]
push edx
mov eax, dword [edi + 4]
push eax
lea eax, [edi + 0x24]
push eax
mov ecx, esi
call fcn.0051cc90
lea ecx, [edi + 0xc]
call fcn.00510a00
push eax
mov ecx, dword [edi]
push ecx
lea ecx, [edi + 0x18]
call fcn.00510a00
push eax
mov edx, dword [edi + 8]
push edx
mov eax, dword [edi + 4]
push eax
lea eax, [edi + 0x24]
push eax
mov ecx, esi
call fcn.00520320
lea ecx, [edi + 0xc]
call fcn.00510a00
push eax
mov ecx, dword [edi]
push ecx
lea ecx, [edi + 0x18]
call fcn.00510a00
push eax
mov edx, dword [edi + 8]
push edx
mov eax, dword [edi + 4]
push eax
lea eax, [edi + 0x24]
push eax
mov ecx, esi
call fcn.00526710
mov dword [ebp - 4], 1
jmp 0x5292e7
mov byte [ebp - 4], 0
mov dword [ebp - 0x29c], edi
mov byte [ebp - 4], 0xa
lea ecx, [edi + 0x18]
call fcn.00510710
mov byte [ebp - 4], 0
lea ecx, [edi + 0xc]
call fcn.00510710
push edi
call fcn.00558723
add esp, 4
jmp 0x528a62