Function at 0x140003eb0
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.140019630
mov edx, edi
lea rcx, str.ReportSvcStatus_start___dwCurrentState___x___n
call fcn.14000db40
xor esi, esi
mov dword [0x14004eb54], edi
mov eax, edi
mov dword [0x14004eb5c], esi
mov dword [0x14004eb68], ebx
mov dword [0x14004eb64], esi
sub eax, 1
je 0x14000410a
sub eax, 1
je 0x1400040e2
sub eax, 1
je 0x1400040ba
cmp eax, 1
je 0x140003f47
lea rcx, str.In_default__n
call fcn.14000db40
mov eax, dword [0x14004da50]
mov dword [0x14004eb64], eax
inc eax
mov dword [0x14004da50], eax
jmp 0x140004122
or dword [0x14004eb58], 1
lea rcx, str.In_case_SERVICE_RUNNING__n
call fcn.14000db40
lea rcx, str.Enter_Function_StartCustomThread____n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp qword [0x14004eb98], rsi
je 0x140003f82
lea rcx, str.Enter_condition_pSvc__hWorkEvent___NULL__n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x140004122
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 [0x14004eb98], rax
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x14004eba8], rax
xor r9d, r9d
lea r8, [0x14000f200]
xor edx, edx
lea rax, [0x14004eba0]
xor ecx, ecx
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x14004eb90], rax
test rax, rax
je 0x140003ff8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov qword [0x14004eb90], rsi
mov ecx, dword [0x14004eba0]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x5e5b
call qword [sym.imp.USER32.dll_PostThreadMessageW]
mov rcx, qword [0x14004eb98]
mov edx, 0x64
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x14000406e
nop word [rax + rax]
lea rdx, str.Create_Thread_fails__n
mov ecx, 1
call fcn.140019630
mov ecx, dword [0x14004eba0]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x5e5b
call qword [sym.imp.USER32.dll_PostThreadMessageW]
mov rcx, qword [0x14004eb98]
mov edx, 0x64
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x140004030
call fcn.140009fa0
cmp eax, 0x14
jl 0x140004122
cmp qword [0x14004ebb0], rsi
jne 0x140004122
lea rax, [0x14004ebb8]
xor edx, edx
mov qword [rsp + 0x28], rax
lea r9, [0x14004eb50]
lea r8, [0x140001f70]
mov dword [rsp + 0x20], esi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x14004ebb0], rax
jmp 0x140004122
mov eax, dword [0x14004da50]
lea rcx, str.In_case_SERVICE_STOP_PENDING__n
mov dword [0x14004eb64], eax
inc eax
mov dword [0x14004da50], eax
mov dword [0x14004eb58], esi
call fcn.14000db40
jmp 0x140004122
mov eax, dword [0x14004da50]
lea rcx, str.In_case_SERVICE_START_PENDING__n
mov dword [0x14004eb64], eax
inc eax
mov dword [0x14004da50], eax
mov dword [0x14004eb58], esi
call fcn.14000db40
jmp 0x140004122
or dword [0x14004eb58], 4
lea rcx, str.In_case_SERVICE_STOPPED__n
call fcn.14000db40
call fcn.1400022d0
mov r8d, edi
lea rdx, str.ReportSvcStatus_dwCurrentState___x__n
mov ecx, 2
call fcn.140019630
mov edx, edi
lea rcx, str.ReportSvcStatus_dwCurrentState___x__n
call fcn.14000db40
mov rcx, qword [0x14004eb70]
lea rdx, [0x14004eb50]
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
test eax, eax
jne 0x14000418a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str._SetServiceStatus__error_code___x_n
mov ecx, 1
mov r8d, eax
call fcn.140019630
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._SetServiceStatus__error_code___x_n
call fcn.14000db40
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret