Function at 0x410120
Capabilities:
Check if file exists
Copy file
Create service
Delete file
Get common file path
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x448750]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
call fcn.0041d1f1
mov ebx, eax
mov dword [ebp - 0x41c], ebx
call fcn.00411ec0
test al, al
jne 0x41015f
mov dword [esi + 8], 2
push str.Setup_requires_Administrator_rights_to_run_
jmp 0x41054f
cmp dword [esi + 4], 1
jne 0x4103df
push 0x104
lea eax, [ebp - 0x418]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x4101ae
mov dword [esi + 8], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetModuleFileName_failed___d_
push esi
call fcn.00410570
add esp, 0xc
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041bc45
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x210]
push eax
push 0
push 0
push 0x25
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x4103b2
push 0x43f3c4
lea eax, [ebp - 0x210]
push 0x104
push eax
call fcn.0041d0ac
push 0x440504
lea eax, [ebp - 0x210]
push 0x104
push eax
call fcn.0041d0ac
add esp, 0x18
lea eax, [ebp - 0x210]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x410253
mov dword [esi + 8], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Copying_service_executable_failed___d_
push esi
call fcn.00410570
add esp, 0xc
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041bc45
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi]
call fcn.004114f0
test al, al
jne 0x410268
push str.AddGameRegistryEntry_failed
jmp 0x410548
mov ecx, 0x43ffc0
call fcn.00411af0
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
test ebx, ebx
jne 0x4102b1
mov dword [esi + 8], 5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed___d_
push esi
call fcn.00410570
add esp, 0xc
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041bc45
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x210]
push eax
push 1
push 3
push 0x10
push 0xf01ff
push 0x43ffc0
push 0x43ffc0
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
test edi, edi
jne 0x410327
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
je 0x410327
mov dword [esi + 8], 5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateService_failed___d_
push esi
call fcn.00410570
add esp, 0xc
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041bc45
mov esp, ebp
pop ebp
ret
call fcn.00411b90
test al, al
jne 0x41033e
mov dword [esi + 8], 6
push str.GrantAllUsersAccessToService_failed
jmp 0x410384
cmp byte [esi + 0xc], 0
mov dword [esi + 8], 0
je 0x41037f
call fcn.0041d1f1
mov ecx, eax
mov eax, 0x431bde83
sub ecx, dword [ebp - 0x41c]
imul ecx
sar edx, 0x12
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ecx, 0x2bc
jge 0x41037f
mov eax, 0x2bc
sub eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.EasyAntiCheat_installed_successfully.
push esi
call fcn.00410570
add esp, 8
test edi, edi
je 0x41030d
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push ebx
call esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041bc45
mov esp, ebp
pop ebp
ret
mov dword [esi + 8], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetServicePath_failed___d_
push esi
call fcn.00410570
add esp, 0xc
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041bc45
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi]
call fcn.00411720
test al, al
je 0x410543
mov ecx, 0x43ffc0
call fcn.00411af0
test al, al
je 0x410516
lea eax, [ebp - 0x210]
push eax
push 0
push 0
push 0x25
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x4104e9
push 0x43f3c4
lea eax, [ebp - 0x210]
push 0x104
push eax
call fcn.0041d0ac
push 0x440504
lea eax, [ebp - 0x210]
push 0x104
push eax
call fcn.0041d0ac
add esp, 0x18
lea eax, [ebp - 0x210]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4104a5
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 2
je 0x4104a5
mov dword [esi + 8], 4
call edi
push eax
push str.Failed_to_delete_service_file____d_
push esi
call fcn.00410570
add esp, 0xc
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041bc45
mov esp, ebp
pop ebp
ret
cmp byte [esi + 0xc], 0
mov dword [esi + 8], 0
je 0x4104e2
call fcn.0041d1f1
mov ecx, eax
mov eax, 0x431bde83
sub ecx, ebx
imul ecx
sar edx, 0x12
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ecx, 0x2bc
jge 0x4104e2
mov eax, 0x2bc
sub eax, ecx
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.EasyAntiCheat_uninstalled_successfully.
jmp 0x41054f
mov dword [esi + 8], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_get_system32_path____d_
push esi
call fcn.00410570
add esp, 0xc
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041bc45
mov esp, ebp
pop ebp
ret
mov dword [esi + 8], 5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_delete_service____d_
push esi
call fcn.00410570
add esp, 0xc
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041bc45
mov esp, ebp
pop ebp
ret
push str.Failed_to_access_registry_
mov dword [esi + 8], 3
push esi
call fcn.00410570
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0041bc45
mov esp, ebp
pop ebp
ret