Function at 0x1400314a0
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x50
mov rdi, rcx
xor ebp, ebp
lea ebx, [rbp + 1]
cmp dword [rcx + 0x28c], ebp
je 0x1400314f3
mov qword [rsp + 0x40], rbp
mov dword [rsp + 0x38], ebp
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
lea edx, [rbp - 1]
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitializeSecurity]
test eax, eax
js 0x1400316f1
mov r14, qword [0x1400fd3e0]
mov r15d, 4
mov rax, qword [0x1400fd3e8]
cmp r14, rax
jae 0x1400315b2
test ebx, ebx
js 0x1400316ef
mov rsi, qword [r14]
test rsi, rsi
je 0x1400315a5
mov qword [rsp + 0x90], rbp
mov r9, qword [rsi + 0x10]
test r9, r9
jne 0x140031539
mov ebx, ebp
jmp 0x1400315a5
lea r8, [rsp + 0x90]
lea rdx, [0x1400c6350]
mov rcx, qword [rsi + 0x18]
mov rax, r9
call qword [case.0x14005f7f8.0]
mov ebx, eax
test eax, eax
js 0x140031584
mov rax, qword [rsi + 0x20]
add rax, 8
mov qword [rsp + 0x20], rax
mov r9d, 5
mov r8d, r15d
mov rdx, qword [rsp + 0x90]
mov rcx, qword [rsi]
call qword [sym.imp.ole32.dll_CoRegisterClassObject]
mov ebx, eax
mov rcx, qword [rsp + 0x90]
test rcx, rcx
je 0x14003159e
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [case.0x14005f7f8.0]
mov rax, qword [0x1400fd3e8]
add r14, 8
cmp r14, rax
jb 0x140031510
test ebx, ebx
js 0x1400316ef
jne 0x1400316eb
cmp byte [rdi + 0x60], bpl
je 0x14003169a
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rdi + 0x50], rax
test rax, rax
je 0x14003161e
lea rax, [rsp + 0x80]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ebp
mov r9, rdi
lea r8, [0x140030bb0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rsi, rax
test rax, rax
jne 0x140031630
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x50], rbp
mov ebx, 0x80004005
mov rcx, rdi
call fcn.140032290
jmp 0x1400316ef
cmp dword [rdi + 0x28c], ebp
je 0x14003166b
mov eax, 2
lock cmpxchg dword [rdi + 0x274], r15d
jne 0x14003166b
lea rdx, str.Service_started_resumed
mov rcx, rdi
call fcn.140030880
lea rdx, [rdi + 0x270]
mov rcx, qword [rdi + 0x268]
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
call qword [sym.imp.ole32.dll_CoResumeClassObjects]
mov ebx, eax
test eax, eax
jns 0x14003168f
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [rdi + 0x58]
add edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400316dd
cmp dword [rdi + 0x28c], ebp
je 0x1400316d5
mov eax, 2
lock cmpxchg dword [rdi + 0x274], r15d
jne 0x1400316d5
lea rdx, str.Service_started_resumed
mov rcx, rdi
call fcn.140030880
lea rdx, [rdi + 0x270]
mov rcx, qword [rdi + 0x268]
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
call qword [sym.imp.ole32.dll_CoResumeClassObjects]
mov ebx, eax
test ebx, ebx
jns 0x1400316ef
mov rcx, rdi
call fcn.140032290
jmp 0x1400316ef
mov byte [rdi + 0x60], bpl
mov eax, ebx
mov rbx, qword [rsp + 0x88]
add rsp, 0x50
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret