Function at 0x40cf30
Capabilities:
Check os version
Create service
Delete service
Print debug messages
Set file attributes
Start service
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45c0d6
mov eax, dword fs:[0]
push eax
sub esp, 0x1a0
mov eax, dword [0x47b008]
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 edi, dword [ebp + 8]
xor eax, eax
mov byte [ebp - 0x19d], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
mov dword [ebp - 4], eax
mov dword [ebp - 0xac], eax
mov dword [ebp - 0xa8], 7
mov word [ebp - 0xbc], ax
lea eax, [edi + 0x10]
mov byte [ebp - 4], 1
cmp dword [edi + 0x14], 8
mov dword [ebp - 0x1a8], eax
mov dword [eax], 0
mov eax, edi
jb 0x40cfb3
mov eax, dword [edi]
xor ecx, ecx
mov dword [ebp - 0x48], 7
mov word [eax], cx
xor eax, eax
mov dword [ebp - 0x4c], ecx
lea ecx, [ebp - 0x5c]
push 0x46e0e8
mov word [ebp - 0x5c], ax
call fcn.00401590
lea edx, [ebp - 0xbc]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x5c]
call fcn.004185b0
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 1
call fcn.00401520
mov esi, dword [0x47ba08]
mov ebx, dword [esi]
test ebx, ebx
je 0x40d3e7
cmp ebx, 0x3ffffc
ja 0x40d3e7
cmp ebx, 2
jb 0x40d04e
mov al, bl
lea edx, [esi + ebx]
add al, al
mov cl, bl
add cl, al
mov al, 3
sub al, cl
add byte [edx + 3], al
lea edx, [ebx - 2]
test edx, edx
je 0x40d048
lea ecx, [ecx]
movzx eax, dl
lea ecx, [edx + esi]
imul eax, eax, 0xfd
sub al, byte [edx + esi + 5]
add byte [ecx + 4], al
sub edx, 1
jne 0x40d030
mov al, byte [esi + 5]
sub byte [esi + 4], al
lea eax, [ebp - 0x2c]
mov dl, 1
push eax
mov ecx, 1
call fcn.00418bb0
add esp, 4
test al, al
jne 0x40d098
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0xd4]
push str.GetServicePath_failed_with__i.
push eax
call fcn.00411e60
add esp, 0xc
mov ecx, edi
push eax
call fcn.00403810
lea ecx, [ebp - 0xd4]
call fcn.00401520
jmp 0x40d3f3
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
jb 0x40d0a4
mov eax, dword [ebp - 0x2c]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
jb 0x40d0bc
mov eax, dword [ebp - 0x2c]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, eax
mov dword [ebp - 0x1a4], ecx
cmp ecx, 0xffffffff
jne 0x40d115
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0xec]
push str.CreateFile_failed_with__i.
push eax
call fcn.00411e60
add esp, 0xc
mov ecx, edi
push eax
call fcn.00403810
lea ecx, [ebp - 0xec]
call fcn.00401520
jmp 0x40d3f3
push 0
lea eax, [ebp - 0x1ac]
push eax
mov eax, dword [0x47ba08]
push ebx
add eax, 4
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x1a4]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x40d176
push ebx
lea eax, [ebp - 0x104]
push str.WriteFile_failed_with__i.
push eax
call fcn.00411e60
add esp, 0xc
mov ecx, edi
push eax
call fcn.00403810
lea ecx, [ebp - 0x104]
call fcn.00401520
jmp 0x40d3f3
mov eax, dword fs:[0x30]
cmp dword [eax + 0xa4], 6
ja 0x40d1a5
mov eax, dword fs:[0x30]
cmp dword [eax + 0xa4], 6
jne 0x40d27e
cmp dword [eax + 0xa8], 2
jb 0x40d27e
xor eax, eax
mov dword [ebp - 0x64], 0
push str.EasyAntiCheat_Oy
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x60], 7
mov word [ebp - 0x74], ax
call fcn.00401590
sub esp, 8
mov byte [ebp - 4], 3
lea eax, [ebp - 0x74]
mov ecx, 0x47ba20
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0040c230
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 1
mov esi, eax
call fcn.00401520
sub esi, 0
je 0x40d27e
sub esi, 2
je 0x40d243
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x40d205
mov eax, dword [edi]
push eax
lea eax, [ebp - 0x8c]
push str._EAC_Service___Error__Certificate_validation_failed____s_
push eax
call fcn.00411e60
add esp, 0xc
lea eax, [ebp - 0x8c]
cmp dword [ebp - 0x78], 8
jb 0x40d22c
mov eax, dword [ebp - 0x8c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [ebp - 0x8c]
call fcn.00401520
jmp 0x40d3f3
lea eax, [ebp - 0xa4]
push str._EAC_Service___Error__Certificate_validation_timed_out_
push eax
call fcn.00411d70
add esp, 8
lea eax, [ebp - 0xa4]
cmp dword [ebp - 0x90], 0x10
jb 0x40d26c
mov eax, dword [ebp - 0xa4]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea ecx, [ebp - 0xa4]
call fcn.00401680
push 2
xor esi, esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
test ebx, ebx
je 0x40d36e
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
jb 0x40d2a0
mov eax, dword [ebp - 0x2c]
push 0
push 0
push 0
push 0
push 0
push eax
push 0
push 3
push 1
push 0x10030
push 0x46e0e8
push 0x46e0e8
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
test esi, esi
je 0x40d337
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x40d365
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
je 0x40d365
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x11c]
push str.StartService_failed_with__i.
push eax
call fcn.00411e60
add esp, 0xc
mov ecx, edi
push eax
call fcn.00403810
lea ecx, [ebp - 0x11c]
call fcn.00401520
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
xor esi, esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x40d3d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x134]
push str.CreateService_failed_with__i.
push eax
call fcn.00411e60
add esp, 0xc
mov ecx, edi
push eax
call fcn.00403810
lea ecx, [ebp - 0x134]
call fcn.00401520
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x40d3d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x14c]
push str.OpenSCManager_failed_with__i.
push eax
call fcn.00411e60
mov ebx, eax
add esp, 0xc
cmp edi, ebx
je 0x40d3c7
mov ecx, edi
call fcn.00401520
mov ecx, dword [ebx]
mov dword [edi], ecx
mov ecx, dword [ebx + 4]
mov dword [edi + 4], ecx
mov eax, dword [ebx + 8]
mov dword [edi + 8], eax
mov eax, dword [ebx + 0xc]
mov dword [edi + 0xc], eax
mov eax, dword [ebx + 0x10]
mov dword [edi + 0x10], eax
mov eax, dword [ebx + 0x14]
mov dword [edi + 0x14], eax
xor eax, eax
mov dword [ebx + 0x10], esi
mov dword [ebx + 0x14], 7
mov word [ebx], ax
lea ecx, [ebp - 0x14c]
call fcn.00401520
test esi, esi
mov dword [0x47ba1c], esi
setne bl
test esi, esi
jne 0x40d4d7
jmp 0x40d3f9
push str.Invalid_binary_size.
mov ecx, edi
call fcn.00401590
mov bl, byte [ebp - 0x19d]
lea ecx, [ebp - 0x19c]
call fcn.0040d5a0
mov ecx, eax
mov byte [ebp - 4], 4
cmp dword [edi + 0x14], 8
jb 0x40d412
mov edi, dword [edi]
mov eax, dword [ebp - 0x1a8]
mov eax, dword [eax]
lea eax, [edi + eax*2]
push eax
push edi
lea eax, [ebp - 0x44]
push eax
call fcn.0040dd10
lea ecx, [ebp - 0x174]
mov dword [ebp - 0x19c], 0x46e710
call fcn.00401520
lea ecx, [ebp - 0x18c]
call fcn.00401680
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x190]
test ecx, ecx
je 0x40d467
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x40d467
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x34]
cmp ecx, 0x200
jb 0x40d4ac
cmp ecx, 0x1ff
jb 0x40d49a
cmp dword [ebp - 0x30], 0x10
lea eax, [ebp - 0x44]
mov dword [ebp - 0x34], 0x1ff
jb 0x40d491
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x1ff], 0
jmp 0x40d4ac
mov eax, 0x1ff
sub eax, ecx
lea ecx, [ebp - 0x44]
push 0
push eax
call fcn.00406730
cmp dword [ebp - 0x30], 0x10
lea eax, [ebp - 0x44]
jb 0x40d4b8
mov eax, dword [ebp - 0x44]
push eax
mov eax, dword [0x47ba08]
add eax, 4
push 0x200
push eax
call fcn.0043f79d
add esp, 0xc
lea ecx, [ebp - 0x44]
call fcn.00401680
mov ecx, dword [0x47ba08]
movzx edx, bl
mov dword [ecx], edx
push dword [0x47ba14]
call dword [sym.imp.KERNEL32.dll_SetEvent]
lea ecx, [ebp - 0xbc]
call fcn.00401520
lea ecx, [ebp - 0x2c]
call fcn.00401520
mov al, bl
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.0042207c
mov esp, ebp
pop ebp
ret 4