Function at 0x413290
Capabilities:
Check os version
Create service

Disassembly:
mov r11, rsp
sub rsp, 0x198
mov qword [rsp + 0x98], 0xfffffffffffffffe
mov qword [r11 - 8], rbx
mov qword [r11 - 0x10], rbp
mov qword [r11 - 0x18], rsi
mov qword [r11 - 0x20], rdi
mov qword [r11 - 0x28], r12
mov qword [r11 - 0x30], r13
mov qword [r11 - 0x38], r14
mov qword [r11 - 0x40], r15
mov rax, qword [0x0046d048]
mov qword [rsp + 0x140], rax
mov r12, r9
mov r15, r8
mov r14, rdx
mov r13, rcx
mov rsi, qword [rsp + 0x1c0]
mov dword [rsp + 0xa0], 0x94
xor ebx, ebx
mov dword [rsp + 0xa4], ebx
xor edx, edx
mov r8d, 0x8c
lea rcx, [r11 - 0xf0]
call fcn.0042b070
lea rcx, [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x41359f
cmp dword [rsp + 0xb0], 2
jne 0x41359f
xor edx, edx
xor ecx, ecx
lea r8d, [rbx + 2]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rbp, rax
test rax, rax
jne 0x413358
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x4135a6
mov qword [rsp + 0x78], rbx
mov dword [rsp + 0x80], ebx
lea rax, [0x004555a0]
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x88], ebx
xor edx, edx
lea rcx, [rsp + 0x70]
call qword [0x004555a8]
nop
lea rax, [0x004555d8]
mov qword [rsp + 0x70], rax
test rsi, rsi
je 0x4133aa
cmp byte [rsi], 0
je 0x4133aa
mov rax, rsi
nop
inc ebx
inc rax
cmp byte [rax], 0
jne 0x4133a0
movsxd rdi, dword [rsp + 0x80]
lea edx, [rdi + rbx]
lea rcx, [rsp + 0x70]
call qword [0x004555e0]
cmp edi, edi
jge 0x4133e5
mov rdx, qword [rsp + 0x78]
lea r9, [rdi + rdx]
movsxd rcx, ebx
add rcx, rdi
add rcx, rdx
mov eax, edi
sub eax, edi
movsxd r8, eax
mov rdx, r9
call fcn.00429770
movsxd r8, ebx
mov rcx, rdi
add rcx, qword [rsp + 0x78]
mov rdx, rsi
call fcn.00429770
nop
lea r9, [0x00455668]
mov qword [rsp + 0x70], r9
xor esi, esi
mov ecx, esi
mov rax, rsi
mov r8d, dword [rsp + 0x80]
test r8d, r8d
jle 0x413446
nop
nop
mov rdx, qword [rsp + 0x78]
cmp byte [rax + rdx], 0x2f
jne 0x413437
mov byte [rax + rdx], sil
mov r8d, dword [rsp + 0x80]
inc ecx
inc rax
cmp ecx, r8d
jl 0x413420
mov r9, qword [rsp + 0x70]
neg dword [rsp + 0x1c8]
sbb ebx, ebx
add ebx, 3
mov edx, r8d
lea rcx, [rsp + 0x70]
call qword [r9 + 8]
neg dword [rsp + 0x1d0]
sbb ecx, ecx
and ecx, 0x100
or ecx, 0x10
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x58], rsi
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], r13
mov dword [rsp + 0x30], esi
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ecx
mov r9d, 0xf01ff
mov r8, r15
mov rdx, r14
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov rdi, rax
test rax, rax
jne 0x413505
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
lea rax, [0x004555a0]
mov qword [rsp + 0x70], rax
mov rcx, qword [rsp + 0x78]
mov qword [rsp + 0x78], rsi
mov dword [rsp + 0x80], esi
mov dword [rsp + 0x88], esi
test rcx, rcx
je 0x4135a6
call fcn.00429ab0
jmp 0x4135a6
cmp dword [rsp + 0xa4], 5
jb 0x41355c
lea rcx, str.advapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rbx, rax
test rax, rax
je 0x41355c
lea rdx, str.ChangeServiceConfig2A
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x413553
mov qword [rsp + 0x90], r12
lea r8, [rsp + 0x90]
mov edx, 1
mov rcx, rdi
call rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
lea rax, [0x004555a0]
mov qword [rsp + 0x70], rax
mov rcx, qword [rsp + 0x78]
mov qword [rsp + 0x78], rsi
mov dword [rsp + 0x80], esi
mov dword [rsp + 0x88], esi
test rcx, rcx
je 0x4135ef
call fcn.00429ab0
jmp 0x4135ef
mov ebx, 0x47e
jmp 0x4135aa
test ebx, ebx
je 0x4135ef
sub ebx, 5
je 0x4135e8
sub ebx, 0x2f
je 0x4135e1
sub ebx, 0x3fc
je 0x4135da
dec ebx
je 0x4135d3
cmp ebx, 0x4d
je 0x4135cc
mov eax, 0x119
jmp 0x4135f1
mov eax, 0x110
jmp 0x4135f1
mov eax, 0x118
jmp 0x4135f1
mov eax, 0x117
jmp 0x4135f1
mov eax, 0x116
jmp 0x4135f1
mov eax, 0x115
jmp 0x4135f1
xor eax, eax
mov rcx, qword [rsp + 0x140]
call fcn.004541d0
mov rbx, qword [rsp + 0x190]
mov rbp, qword [rsp + 0x188]
mov rsi, qword [rsp + 0x180]
mov rdi, qword [rsp + 0x178]
mov r12, qword [rsp + 0x170]
mov r13, qword [rsp + 0x168]
mov r14, qword [rsp + 0x160]
mov r15, qword [rsp + 0x158]
add rsp, 0x198
ret