Function at 0x140074270
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.14006ecd0
sub rsp, rax
mov rax, qword [0x1400970c0]
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 0x1400747c6
mov r8d, 0xf01ff
mov qword [rsp + 0x1540], rbx
lea rdx, [0x140089920]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rbx, rax
test rax, rax
je 0x1400743e1
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 0x1400743d8
cmp dword [rbp - 0x64], 4
je 0x1400743b8
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x1400743c8
cmp dword [rbp - 0x64], 4
je 0x1400743b8
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 0x1400743c8
cmp dword [rbp - 0x64], 4
jne 0x140074390
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
jmp 0x1400747be
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x1400747be
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 0x14007479b
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 0x14007479b
lea rcx, [rbp + 0x410]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
je 0x14007479b
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.140005f60
xor r9d, r9d
lea rdx, [rbp + 0x200]
mov r8d, edi
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x14007479b
lea r8, [rbp + 0x200]
lea rdx, str._sCommon_FilesBattlEye
lea rcx, [rbp - 0x10]
call fcn.140005fc0
lea rcx, [rbp - 0x10]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400744d2
test al, 0x10
jne 0x1400744e6
xor edx, edx
lea rcx, [rbp - 0x10]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x14007479b
lea r8, [rbp + 0x200]
lea rdx, str._sCommon_FilesBattlEyeBEService.exe
lea rcx, [rbp - 0x10]
call fcn.140005fc0
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 0x140074552
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 0x140074552
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14007479b
cmp qword [0x140097200], r12
jne 0x1400746a1
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 0x140074584
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 0x1400745b3
movabs rsi, 0x7ffffffffffffffe
cmp rbx, rsi
ja 0x1400747e2
cmp rbx, 8
jae 0x1400745f9
lea r8, [rbx + rbx]
mov qword [rbp - 0x80], rbx
lea rdx, [rbp + 0xc10]
mov qword [rbp - 0x78], 7
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll_memcpy
jmp 0x14007464c
mov rax, rbx
or rax, 7
cmp rax, rsi
ja 0x140074614
mov ecx, 0xa
mov rsi, rax
cmp rax, rcx
cmovb rsi, rcx
lea rdx, [rsi + 1]
lea rcx, [rsp + 0x70]
call fcn.140003e50
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, [0x1400971f0]
call fcn.140002490
mov rdx, qword [rbp - 0x78]
cmp rdx, 8
jb 0x1400746a1
mov rcx, qword [rsp + 0x70]
lea rdx, [rdx*2 + 2]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14007469c
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14007469c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14006e3d4
xor r8d, r8d
lea rdx, [rbp - 0x10]
lea rcx, [rbp + 0x410]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x14007479b
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 0x14007479b
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x140074792
cmp dword [rbp - 0x64], 4
je 0x140074768
nop dword [rax]
nop dword [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 0x140074792
cmp dword [rbp - 0x64], 4
jne 0x140074740
test r15, r15
je 0x140074776
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp rbx, 0xffffffffffffffff
je 0x140074785
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
jmp 0x1400747a6
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.14006e370
add rsp, 0x1520
pop r14
pop r12
pop rbp
ret
call fcn.140001b10
int3