Function at 0x140003ef0
Capabilities:
Create thread
Print debug messages
Resume thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
mov ebx, r8d
lea rdx, str.ReportSvcStatus_start___dwCurrentState___x___n
mov r8d, ecx
mov edi, ecx
mov ecx, 2
call fcn.14001a030
mov edx, edi
lea rcx, str.ReportSvcStatus_start___dwCurrentState___x___n
call fcn.14000e530
xor esi, esi
mov dword [0x14004fb44], edi
mov eax, edi
mov dword [0x14004fb4c], esi
mov dword [0x14004fb58], ebx
mov dword [0x14004fb54], esi
sub eax, 1
je 0x14000414a
sub eax, 1
je 0x140004122
sub eax, 1
je 0x1400040fa
cmp eax, 1
je 0x140003f87
lea rcx, str.In_default__n
call fcn.14000e530
mov eax, dword [0x14004ea40]
mov dword [0x14004fb54], eax
inc eax
mov dword [0x14004ea40], eax
jmp 0x140004162
or dword [0x14004fb48], 1
lea rcx, str.In_case_SERVICE_RUNNING__n
call fcn.14000e530
lea rcx, str.Enter_Function_StartCustomThread____n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp qword [0x14004fb88], rsi
je 0x140003fc2
lea rcx, str.Enter_condition_pSvc__hWorkEvent___NULL__n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x140004162
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov qword [0x14004fb88], rax
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x14004fb98], rax
xor r9d, r9d
lea r8, [0x14000fc90]
xor edx, edx
lea rax, [0x14004fb90]
xor ecx, ecx
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x14004fb80], rax
test rax, rax
je 0x140004038
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov qword [0x14004fb80], rsi
mov ecx, dword [0x14004fb90]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x5e5b
call qword [sym.imp.USER32.dll_PostThreadMessageW]
mov rcx, qword [0x14004fb88]
mov edx, 0x64
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1400040ae
nop word [rax + rax]
lea rdx, str.Create_Thread_fails__n
mov ecx, 1
call fcn.14001a030
mov ecx, dword [0x14004fb90]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x5e5b
call qword [sym.imp.USER32.dll_PostThreadMessageW]
mov rcx, qword [0x14004fb88]
mov edx, 0x64
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x140004070
call fcn.14000a160
cmp eax, 0x14
jl 0x140004162
cmp qword [0x14004fba0], rsi
jne 0x140004162
lea rax, [0x14004fba8]
xor edx, edx
mov qword [rsp + 0x28], rax
lea r9, [0x14004fb40]
lea r8, [0x140001fa0]
mov dword [rsp + 0x20], esi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x14004fba0], rax
jmp 0x140004162
mov eax, dword [0x14004ea40]
lea rcx, str.In_case_SERVICE_STOP_PENDING__n
mov dword [0x14004fb54], eax
inc eax
mov dword [0x14004ea40], eax
mov dword [0x14004fb48], esi
call fcn.14000e530
jmp 0x140004162
mov eax, dword [0x14004ea40]
lea rcx, str.In_case_SERVICE_START_PENDING__n
mov dword [0x14004fb54], eax
inc eax
mov dword [0x14004ea40], eax
mov dword [0x14004fb48], esi
call fcn.14000e530
jmp 0x140004162
or dword [0x14004fb48], 4
lea rcx, str.In_case_SERVICE_STOPPED__n
call fcn.14000e530
call fcn.140002300
mov r8d, edi
lea rdx, str.ReportSvcStatus_dwCurrentState___x__n
mov ecx, 2
call fcn.14001a030
mov edx, edi
lea rcx, str.ReportSvcStatus_dwCurrentState___x__n
call fcn.14000e530
mov rcx, qword [0x14004fb60]
lea rdx, [0x14004fb40]
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
test eax, eax
jne 0x1400041ca
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str._SetServiceStatus__error_code___x_n
mov ecx, 1
mov r8d, eax
call fcn.14001a030
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._SetServiceStatus__error_code___x_n
call fcn.14000e530
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret