Function at 0x140119990
Capabilities:
Create thread

Disassembly:
push rdi
sub rsp, 0x60
mov rax, qword [0x140228058]
xor rax, rsp
mov qword [rsp + 0x40], rax
cmp dword [rcx + 0x28c], 0
mov rdi, rcx
je 0x1401199be
call fcn.140118560
test eax, eax
js 0x140119bf3
mov rax, qword [0x14023f8a8]
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 [0x14023f8a0]
mov qword [rsp + 0x50], r15
lea r15d, [rbx + 3]
cmp r14, rax
jae 0x140119a92
nop
test ebx, ebx
js 0x140119a92
mov rsi, qword [r14]
test rsi, rsi
je 0x140119a85
mov r9, qword [rsi + 0x10]
mov qword [rsp + 0x30], rbp
test r9, r9
jne 0x140119a22
mov ebx, ebp
jmp 0x140119a85
mov rcx, qword [rsi + 0x18]
lea r8, [rsp + 0x30]
lea rdx, [0x1401d6a98]
mov rax, r9
call qword [case.0x14001ac40.0]
mov ebx, eax
test eax, eax
js 0x140119a67
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 0x140119a7e
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [case.0x14001ac40.0]
mov rax, qword [0x14023f8a8]
add r14, 8
cmp r14, rax
jb 0x140119a00
mov r14, qword [rsp + 0x58]
test ebx, ebx
js 0x140119bd7
jne 0x140119bd3
cmp byte [rdi + 0x60], bpl
je 0x140119b82
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 0x140119b73
lea rax, [rsp + 0x38]
mov r9, rdi
mov qword [rsp + 0x28], rax
lea r8, [0x140118c50]
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 0x140119b04
mov rcx, qword [rdi + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x50], rbp
test rsi, rsi
je 0x140119b73
cmp dword [rdi + 0x28c], ebp
je 0x140119b44
mov eax, 2
lock cmpxchg dword [rdi + 0x274], r15d
jne 0x140119b44
lea rdx, str.Service_started_resumed
mov rcx, rdi
call fcn.140118b50
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 0x140119b68
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 0x140119bc5
mov rcx, rdi
mov ebx, 0x80004005
call fcn.14011a080
jmp 0x140119bd7
cmp dword [rdi + 0x28c], ebp
je 0x140119bbd
mov eax, 2
lock cmpxchg dword [rdi + 0x274], r15d
jne 0x140119bbd
lea rdx, str.Service_started_resumed
mov rcx, rdi
call fcn.140118b50
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 0x140119bd7
mov rcx, rdi
call fcn.14011a080
jmp 0x140119bd7
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.14013df50
add rsp, 0x60
pop rdi
ret