Function at 0x4098d0
Capabilities:
Check os version
Shutdown system

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421d20
push 0x414670
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xf4
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
xor esi, esi
mov ebx, dword [ebp + 0x10]
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409903
sub eax, edx
mov dword [ebp - 0x1c], eax
xor edx, edx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x48], edx
xor eax, eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x20], 5
mov dword [ebp - 0x104], 0x94
mov dword [ebp - 0x100], edx
mov ecx, 0x23
lea edi, [ebp - 0xfc]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x2c], edx
call fcn.0040e410
push eax
call fcn.0040e540
add esp, 4
test eax, eax
je 0x409971
mov dword [0x42808c], 1
mov eax, dword [ebp - 0x1c]
test eax, eax
jle 0x409b32
lea esp, [esp]
mov al, byte [esi + ebx]
cmp al, 0x20
jle 0x409b28
cmp al, 0x2d
je 0x409993
cmp al, 0x2f
jne 0x4099f1
lea ecx, [esi + 6]
cmp ecx, dword [ebp - 0x1c]
jge 0x4099f1
mov dl, byte [esi + ebx + 1]
or dl, 0x20
cmp dl, 0x72
jne 0x4099f1
mov cl, byte [esi + ebx + 2]
or cl, 0x20
cmp cl, 0x65
jne 0x4099f1
mov dl, byte [esi + ebx + 3]
or dl, 0x20
cmp dl, 0x62
jne 0x4099f1
mov cl, byte [esi + ebx + 4]
or cl, 0x20
cmp cl, 0x6f
jne 0x4099f1
mov dl, byte [esi + ebx + 5]
or dl, 0x20
cmp dl, cl
jne 0x4099f1
mov cl, byte [esi + ebx + 6]
or cl, 0x20
cmp cl, 0x74
jne 0x4099f1
add esi, 7
mov dword [ebp - 0x28], 1
jmp 0x409b29
cmp al, 0x2d
je 0x4099fd
cmp al, 0x2f
jne 0x409a90
lea edx, [esi + 0xa]
cmp edx, dword [ebp - 0x1c]
jge 0x409a90
mov cl, byte [esi + ebx + 1]
or cl, 0x20
cmp cl, 0x72
jne 0x409a90
mov dl, byte [esi + ebx + 2]
or dl, 0x20
cmp dl, 0x65
jne 0x409a90
mov cl, byte [esi + ebx + 3]
or cl, 0x20
cmp cl, 0x6d
jne 0x409a90
mov dl, byte [esi + ebx + 4]
or dl, 0x20
cmp dl, 0x6f
jne 0x409a90
mov cl, byte [esi + ebx + 5]
or cl, 0x20
cmp cl, 0x76
jne 0x409a90
mov dl, byte [esi + ebx + 6]
or dl, 0x20
cmp dl, 0x65
jne 0x409a90
mov cl, byte [esi + ebx + 7]
or cl, 0x20
cmp cl, 0x77
jne 0x409a90
mov dl, byte [esi + ebx + 8]
or dl, 0x20
cmp dl, 0x6c
jne 0x409a90
mov cl, byte [esi + ebx + 9]
or cl, 0x20
cmp cl, 0x73
jne 0x409a90
mov dl, byte [esi + ebx + 0xa]
or dl, 0x20
cmp dl, 0x70
jne 0x409a90
add esi, 0xb
mov dword [ebp - 0x24], 1
jmp 0x409b29
cmp al, 0x2d
je 0x409a98
cmp al, 0x2f
jne 0x409abc
push 6
push str.remote
lea eax, [esi + ebx + 1]
push eax
call fcn.0041f80a
add esp, 0xc
test eax, eax
jne 0x409abc
add esi, 7
mov dword [ebp - 0x2c], 1
jmp 0x409b29
mov al, byte [esi + ebx]
cmp al, 0x2d
je 0x409ac7
cmp al, 0x2f
jne 0x409b28
mov cl, byte [esi + ebx + 1]
or cl, 0x20
cmp cl, 0x77
jne 0x409b28
add esi, 2
lea edi, [esi + ebx]
lea edx, [ebp - 0x20]
push edx
push 0x421c18
push edi
call fcn.00415170
add esp, 0xc
cmp eax, 1
je 0x409af9
mov dword [ebp - 0x20], 5
jmp 0x409b29
cmp byte [edi], 0x20
jg 0x409b0c
mov edi, edi
cmp esi, dword [ebp - 0x1c]
jge 0x409b0c
inc esi
cmp byte [esi + ebx], 0x20
jle 0x409b00
mov al, byte [esi + ebx]
cmp al, 0x20
jle 0x409b29
mov ecx, dword [ebp - 0x1c]
test al, al
je 0x409b29
cmp esi, ecx
jge 0x409b29
inc esi
mov al, byte [esi + ebx]
cmp al, 0x20
jg 0x409b16
jmp 0x409b29
inc esi
cmp esi, dword [ebp - 0x1c]
jl 0x409980
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x409b5c
mov eax, dword [ebp - 0x20]
test eax, eax
jle 0x409b4d
imul eax, eax, 0x3e8
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 6
call dword [sym.imp.USER32.dll_ExitWindowsEx]
jmp 0x409d67
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x409b6d
call fcn.00405a80
jmp 0x409d67
mov dword [ebp - 0x104], 0x94
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x409bbb
cmp dword [ebp - 0xf4], 2
jne 0x409bbb
cmp dword [ebp - 0x100], 5
jb 0x409bbb
mov eax, dword [str.Global_]
mov dword [str.GlobalKaUsrTaskMutex], eax
mov ecx, dword [0x421d10]
mov dword [0x4276a4], ecx
mov dword [str.GlobalKaUsrTaskExitEvent], eax
mov dword [0x4277ac], ecx
mov edi, str.GlobalKaUsrTaskMutex
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x409bc1
mov ecx, dword [str.KaUsrTaskMutex]
mov dword [edi], ecx
mov edx, dword [0x421d00]
mov dword [edi + 4], edx
mov eax, dword [0x421d04]
mov dword [edi + 8], eax
mov cx, word [0x421d08]
mov word [edi + 0xc], cx
mov dl, byte [0x421d0a]
mov byte [edi + 0xe], dl
mov edi, str.GlobalKaUsrTaskExitEvent
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x409c00
mov eax, dword [str.KaUsrTaskExitEvent]
mov dword [edi], eax
mov ecx, dword [0x421cec]
mov dword [edi + 4], ecx
mov edx, dword [0x421cf0]
mov dword [edi + 8], edx
mov eax, dword [0x421cf4]
mov dword [edi + 0xc], eax
mov cx, word [0x421cf8]
mov word [edi + 0x10], cx
mov dl, byte [0x421cfa]
mov byte [edi + 0x12], dl
push 0x1000
call dword [sym.imp.USER32.dll_GetSystemMetrics]
xor edi, edi
cmp eax, edi
je 0x409c6b
cmp dword [ebp - 0x2c], edi
jne 0x409c6b
mov eax, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov dword [ebp - 4], edi
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
cmp eax, edi
jne 0x409cde
mov dword [ebp - 0x70], 3
mov dword [ebp - 0x6c], 0x409510
mov dword [ebp - 0x68], edi
mov dword [ebp - 0x64], edi
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x5c], edi
push 0x7f00
push edi
call dword [sym.imp.USER32.dll_LoadCursorA]
mov dword [ebp - 0x58], eax
push 1
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x4c], str.KaUsrTaskSrvcHelper
mov dword [0x427684], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.USER32.dll_RegisterClassA]
test ax, ax
jne 0x409cde
push 0xffffffffffffffff
lea ecx, [ebp - 0x10]
push ecx
call fcn.004145ba
add esp, 8
jmp 0x409d67
push edi
push esi
push edi
push edi
push edi
push edi
push edi
push edi
push 0x88000000
push str.Kaseya_Agent_Service_Helper
push str.KaUsrTaskSrvcHelper
push edi
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x427680], eax
mov dword [ebp - 4], 1
push edi
push edi
push edi
lea edx, [ebp - 0x48]
push edx
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x409d2f
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea ecx, [ebp - 0x48]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x409d08
mov dword [ebp - 4], edi
jmp 0x409d4b
mov dword [ebp - 4], 0xffffffff
call fcn.00409d7e
mov eax, dword [0x427698]
cmp eax, edi
je 0x409d67
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10