Function at 0x1400765a0
Capabilities:
Check if file exists
Copy file
Create directory
Create service
Delete file
Get common file path
Get file attributes
Get system information on windows
Query service status
Start service

Disassembly:
push rbp
push r12
push r14
lea rbp, [rsp - 0x1420]
mov eax, 0x1520
call fcn.1400710e0
sub rsp, rax
mov rax, qword [0x14009a0c0]
xor rax, rsp
mov qword [rbp + 0x1410], rax
xor r12d, r12d
lea rcx, [rbp + 0x410]
xor edx, edx
mov dword [rbp - 0x70], r12d
mov r8d, 0x400
mov qword [rbp - 0x68], r12
mov qword [rbp - 0x60], r12
mov qword [rbp - 0x58], r12
mov qword [rbp - 0x50], r12
mov dword [rbp - 0x48], r12d
call sub.VCRUNTIME140.dll_memset
xor edx, edx
lea rcx, [rbp + 0x200]
mov r8d, 0x104
call sub.VCRUNTIME140.dll_memset
xor edx, edx
lea rcx, [rbp - 0x10]
mov r8d, 0x104
call sub.VCRUNTIME140.dll_memset
xorps xmm0, xmm0
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
movups xmmword [rbp - 0x40], xmm0
movups xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x20], xmm0
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov r14, rax
test rax, rax
je 0x140076af6
mov r8d, 0xf01ff
mov qword [rsp + 0x1540], rbx
lea rdx, [0x14008b838]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rbx, rax
test rax, rax
je 0x140076711
lea rax, [rbp - 0x70]
mov r9d, Ordinal_41
lea r8, [rbp - 0x68]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140076708
cmp dword [rbp - 0x64], 4
je 0x1400766e8
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x1400766f8
cmp dword [rbp - 0x64], 4
je 0x1400766e8
nop word [rax + rax]
lea rax, [rbp - 0x70]
mov r9d, Ordinal_41
lea r8, [rbp - 0x68]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x1400766f8
cmp dword [rbp - 0x64], 4
jne 0x1400766c0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
jmp 0x140076aee
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x140076aee
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov qword [rsp + 0x1548], rsi
lea rcx, [rbp - 0x40]
mov qword [rsp + 0x1550], rdi
mov qword [rsp + 0x1558], r15
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
cmp word [rbp - 0x40], 9
lea rdx, [rbp + 0x410]
mov r8d, 0x400
sete bl
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140076acb
movzx eax, bl
lea rdx, [rbp + 0x200]
xor r9d, r9d
xor ecx, ecx
lea edi, [rax*4 + 0x26]
mov r8d, edi
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x140076acb
lea rcx, [rbp + 0x410]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
je 0x140076acb
lea rax, str._sBattlEyeBEService_x64.exe
test bl, bl
lea rdx, str._sBattlEyeBEService.exe
cmovne rdx, rax
lea r8, [rbp + 0x410]
lea rcx, [rbp + 0x410]
call fcn.1400072d0
xor r9d, r9d
lea rdx, [rbp + 0x200]
mov r8d, edi
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x140076acb
lea r8, [rbp + 0x200]
lea rdx, str._sCommon_FilesBattlEye
lea rcx, [rbp - 0x10]
call fcn.140007330
lea rcx, [rbp - 0x10]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140076802
test al, 0x10
jne 0x140076816
xor edx, edx
lea rcx, [rbp - 0x10]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x140076acb
lea r8, [rbp + 0x200]
lea rdx, str._sCommon_FilesBattlEyeBEService.exe
lea rcx, [rbp - 0x10]
call fcn.140007330
mov qword [rsp + 0x30], r12
lea rcx, [rbp - 0x10]
mov dword [rsp + 0x28], r12d
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x140076882
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp - 0x10]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140076882
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140076acb
cmp qword [0x14009a1d0], r12
jne 0x1400769d9
xor edx, edx
lea rcx, [rbp + 0xc10]
mov r8d, 0x400
call sub.VCRUNTIME140.dll_memset
mov rbx, 0xffffffffffffffff
lea rax, [rbp + 0x410]
mov r8, rbx
inc r8
cmp word [rax + r8*2], r12w
jne 0x1400768b4
add r8, r8
lea rdx, [rbp + 0x410]
lea rcx, [rbp + 0xc10]
call sub.VCRUNTIME140.dll_memcpy
xorps xmm0, xmm0
lea rax, [rbp + 0xc10]
movups xmmword [rsp + 0x70], xmm0
inc rbx
cmp word [rax + rbx*2], r12w
jne 0x1400768e3
movabs rsi, 0x7ffffffffffffffe
cmp rbx, rsi
ja 0x140076b12
cmp rbx, 8
jae 0x140076931
mov qword [rbp - 0x80], rbx
lea rdx, [rbp + 0xc10]
add rbx, rbx
mov qword [rbp - 0x78], 7
mov r8, rbx
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll_memcpy
mov word [rsp + rbx + 0x70], r12w
jmp 0x140076984
mov rax, rbx
or rax, 7
cmp rax, rsi
ja 0x14007694c
mov ecx, 0xa
mov rsi, rax
cmp rax, rcx
cmovb rsi, rcx
lea rdx, [rsi + 1]
lea rcx, [rsp + 0x70]
call fcn.140003df0
mov qword [rbp - 0x80], rbx
lea rdx, [rbp + 0xc10]
add rbx, rbx
mov qword [rsp + 0x70], rax
mov r8, rbx
mov qword [rbp - 0x78], rsi
mov rcx, rax
mov rdi, rax
call sub.VCRUNTIME140.dll_memcpy
mov word [rbx + rdi], r12w
lea rdx, [rsp + 0x70]
lea rcx, [0x14009a1c0]
call fcn.140002670
mov rdx, qword [rbp - 0x78]
cmp rdx, 8
jb 0x1400769d9
mov rcx, qword [rsp + 0x70]
lea rdx, [rdx*2 + 2]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400769d4
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400769d4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140070964
xor r8d, r8d
lea rdx, [rbp - 0x10]
lea rcx, [rbp + 0x410]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x140076acb
mov qword [rsp + 0x60], r12
lea rax, [rbp - 0x10]
mov qword [rsp + 0x58], r12
lea r8, str.BattlEye_Service
mov qword [rsp + 0x50], r12
lea rdx, str.BEService
mov qword [rsp + 0x48], r12
mov r9d, 0xf01ff
mov qword [rsp + 0x40], r12
mov rcx, r14
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rbx, rax
test rax, rax
je 0x140076acb
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x140076ac2
cmp dword [rbp - 0x64], 4
je 0x140076a98
nop dword [rax]
lea rax, [rbp - 0x70]
mov r9d, Ordinal_41
lea r8, [rbp - 0x68]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140076ac2
cmp dword [rbp - 0x64], 4
jne 0x140076a70
test r15, r15
je 0x140076aa6
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp rbx, 0xffffffffffffffff
je 0x140076ab5
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
jmp 0x140076ad6
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
mov rdi, qword [rsp + 0x1550]
mov rsi, qword [rsp + 0x1548]
mov r15, qword [rsp + 0x1558]
mov rbx, qword [rsp + 0x1540]
mov rcx, qword [rbp + 0x1410]
xor rcx, rsp
call fcn.140070900
add rsp, 0x1520
pop r14
pop r12
pop rbp
ret
call fcn.140001cc0
int3