Function at 0x140124cf0
Capabilities:
Create thread

Disassembly:
push rdi
sub rsp, 0x60
mov rax, qword [0x14023c048]
xor rax, rsp
mov qword [rsp + 0x40], rax
cmp dword [rcx + 0x28c], 0
mov rdi, rcx
je 0x140124d1e
call fcn.1401238c0
test eax, eax
js 0x140124f53
mov rax, qword [0x1402573e8]
mov qword [rsp + 0x78], rbx
mov ebx, 1
mov qword [rsp + 0x80], rbp
xor ebp, ebp
mov qword [rsp + 0x88], rsi
mov qword [rsp + 0x58], r14
mov r14, qword [0x1402573e0]
mov qword [rsp + 0x50], r15
lea r15d, [rbx + 3]
cmp r14, rax
jae 0x140124df2
nop
test ebx, ebx
js 0x140124df2
mov rsi, qword [r14]
test rsi, rsi
je 0x140124de5
mov r9, qword [rsi + 0x10]
mov qword [rsp + 0x30], rbp
test r9, r9
jne 0x140124d82
mov ebx, ebp
jmp 0x140124de5
mov rcx, qword [rsi + 0x18]
lea r8, [rsp + 0x30]
lea rdx, [0x1401e70e8]
mov rax, r9
call qword [case.0x140024b66.0]
mov ebx, eax
test eax, eax
js 0x140124dc7
mov rax, qword [rsi + 0x20]
mov r9d, 5
mov rdx, qword [rsp + 0x30]
add rax, 8
mov rcx, qword [rsi]
mov r8d, r15d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ole32.dll_CoRegisterClassObject]
mov ebx, eax
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x140124dde
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [case.0x140024b66.0]
mov rax, qword [0x1402573e8]
add r14, 8
cmp r14, rax
jb 0x140124d60
mov r14, qword [rsp + 0x58]
test ebx, ebx
js 0x140124f37
jne 0x140124f33
cmp byte [rdi + 0x60], bpl
je 0x140124ee2
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 0x140124ed3
lea rax, [rsp + 0x38]
mov r9, rdi
mov qword [rsp + 0x28], rax
lea r8, [0x140123fb0]
xor edx, edx
mov dword [rsp + 0x20], ebp
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rsi, rax
test rax, rax
jne 0x140124e64
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x50], rbp
test rsi, rsi
je 0x140124ed3
cmp dword [rdi + 0x28c], ebp
je 0x140124ea4
mov eax, 2
lock cmpxchg dword [rdi + 0x274], r15d
jne 0x140124ea4
lea rdx, str.Service_started_resumed
mov rcx, rdi
call fcn.140123eb0
mov rcx, qword [rdi + 0x268]
lea rdx, [rdi + 0x270]
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
call qword [sym.imp.ole32.dll_CoResumeClassObjects]
mov ebx, eax
test eax, eax
jns 0x140124ec8
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [rdi + 0x58]
mov rcx, rsi
add edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140124f25
mov rcx, rdi
mov ebx, 0x80004005
call fcn.1401253b0
jmp 0x140124f37
cmp dword [rdi + 0x28c], ebp
je 0x140124f1d
mov eax, 2
lock cmpxchg dword [rdi + 0x274], r15d
jne 0x140124f1d
lea rdx, str.Service_started_resumed
mov rcx, rdi
call fcn.140123eb0
mov rcx, qword [rdi + 0x268]
lea rdx, [rdi + 0x270]
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
call qword [sym.imp.ole32.dll_CoResumeClassObjects]
mov ebx, eax
test ebx, ebx
jns 0x140124f37
mov rcx, rdi
call fcn.1401253b0
jmp 0x140124f37
mov byte [rdi + 0x60], bpl
mov rsi, qword [rsp + 0x88]
mov eax, ebx
mov rbx, qword [rsp + 0x78]
mov rbp, qword [rsp + 0x80]
mov r15, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140149290
add rsp, 0x60
pop rdi
ret