Function at 0x45ae00
Capabilities:
Check for time delay via queryperformancecounter
Print debug messages
Query service status
Start service

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c58d0
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x78
mov eax, dword [0x501040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
xor al, al
cmp dword [esi + 0x10], 0
mov byte [ebp - 0x55], al
je 0x45b03d
push 5
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x5c], eax
test eax, eax
je 0x45b03a
cmp dword [esi + 0x14], 7
jbe 0x45ae6e
mov esi, dword [esi]
push 0x14
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x45b031
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea eax, [ebp - 0x54]
push eax
push esi
call edi
test eax, eax
je 0x45b02a
cmp dword [ebp - 0x50], 4
je 0x45b026
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x45af3d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1c], eax
lea ecx, [ebp - 0x20]
sub esp, 8
mov dword [ebp - 0x20], 0x20000000
mov eax, esp
mov dword [ebp - 4], 0xffffffff
push 0x22
mov dword [eax + 4], ecx
lea ecx, [ebp - 0x74]
push str._WINTUN__2_StartServiceW_Fail:__d_n
mov dword [eax], 1
call fcn.0040a510
add esp, 0x10
lea eax, [ebp - 0x74]
cmp dword [ebp - 0x60], 0xf
cmova eax, dword [ebp - 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [ebp - 0x60]
cmp ecx, 0xf
jbe 0x45b02a
mov edx, dword [ebp - 0x74]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x45af2e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x45b05b
push ecx
push edx
call fcn.00472d8e
add esp, 8
jmp 0x45b02a
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x45af75
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x45af75
push 0
push 0x3e8
push dword [ebp - 0x24]
push dword [ebp - 0x28]
call fcn.004c0000
push edx
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
jmp 0x45af89
lea ecx, [ebp - 0x30]
call fcn.00415d10
push 0
push 0xf4240
push dword [eax + 4]
push dword [eax]
call fcn.004c0000
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x54]
push eax
push esi
call edi
test eax, eax
je 0x45b02a
mov eax, dword [ebp - 0x50]
cmp eax, 4
je 0x45b026
cmp eax, 2
jne 0x45b02a
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x45aff3
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x45aff3
push 0
push 0x3e8
push dword [ebp - 0x34]
push dword [ebp - 0x38]
call fcn.004c0000
push edx
push eax
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
jmp 0x45b007
lea ecx, [ebp - 0x80]
call fcn.00415d10
push 0
push 0xf4240
push dword [eax + 4]
push dword [eax]
call fcn.004c0000
sub eax, dword [ebp - 0x1c]
sbb edx, dword [ebp - 0x24]
jne 0x45b02a
jb 0x45af94
cmp eax, 0xea60
ja 0x45b02a
jmp 0x45af94
mov byte [ebp - 0x55], 1
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0x5c]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, byte [ebp - 0x55]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00472b2a
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.004a091e
int3