Function at 0x140003ea0
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.1400194a0
mov edx, edi
lea rcx, str.ReportSvcStatus_start___dwCurrentState___x___n
call fcn.14000db70
xor esi, esi
mov dword [0x140053b64], edi
mov eax, edi
mov dword [0x140053b6c], esi
mov dword [0x140053b78], ebx
mov dword [0x140053b74], esi
sub eax, 1
je 0x1400040fa
sub eax, 1
je 0x1400040d2
sub eax, 1
je 0x1400040aa
cmp eax, 1
je 0x140003f37
lea rcx, str.In_default__n
call fcn.14000db70
mov eax, dword [0x140052a60]
mov dword [0x140053b74], eax
inc eax
mov dword [0x140052a60], eax
jmp 0x140004112
or dword [0x140053b68], 1
lea rcx, str.In_case_SERVICE_RUNNING__n
call fcn.14000db70
lea rcx, str.Enter_Function_StartCustomThread____n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp qword [0x140053ba8], rsi
je 0x140003f72
lea rcx, str.Enter_condition_pSvc__hWorkEvent___NULL__n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x140004112
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 [0x140053ba8], rax
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x140053bb8], rax
xor r9d, r9d
lea r8, [0x14000f230]
xor edx, edx
lea rax, [0x140053bb0]
xor ecx, ecx
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x140053ba0], rax
test rax, rax
je 0x140003fe8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov qword [0x140053ba0], rsi
mov ecx, dword [0x140053bb0]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x5e5b
call qword [sym.imp.USER32.dll_PostThreadMessageW]
mov rcx, qword [0x140053ba8]
mov edx, 0x64
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x14000405e
nop word [rax + rax]
lea rdx, str.Create_Thread_fails__n
mov ecx, 1
call fcn.1400194a0
mov ecx, dword [0x140053bb0]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x5e5b
call qword [sym.imp.USER32.dll_PostThreadMessageW]
mov rcx, qword [0x140053ba8]
mov edx, 0x64
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x140004020
call fcn.140009f30
cmp eax, 0x14
jl 0x140004112
cmp qword [0x140053bc0], rsi
jne 0x140004112
lea rax, [0x140053bc8]
xor edx, edx
mov qword [rsp + 0x28], rax
lea r9, [0x140053b60]
lea r8, [0x140001f60]
mov dword [rsp + 0x20], esi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x140053bc0], rax
jmp 0x140004112
mov eax, dword [0x140052a60]
lea rcx, str.In_case_SERVICE_STOP_PENDING__n
mov dword [0x140053b74], eax
inc eax
mov dword [0x140052a60], eax
mov dword [0x140053b68], esi
call fcn.14000db70
jmp 0x140004112
mov eax, dword [0x140052a60]
lea rcx, str.In_case_SERVICE_START_PENDING__n
mov dword [0x140053b74], eax
inc eax
mov dword [0x140052a60], eax
mov dword [0x140053b68], esi
call fcn.14000db70
jmp 0x140004112
or dword [0x140053b68], 4
lea rcx, str.In_case_SERVICE_STOPPED__n
call fcn.14000db70
call fcn.1400022c0
mov r8d, edi
lea rdx, str.ReportSvcStatus_dwCurrentState___x__n
mov ecx, 2
call fcn.1400194a0
mov edx, edi
lea rcx, str.ReportSvcStatus_dwCurrentState___x__n
call fcn.14000db70
mov rcx, qword [0x140053b80]
lea rdx, [0x140053b60]
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
test eax, eax
jne 0x14000417a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str._SetServiceStatus__error_code___x_n
mov ecx, 1
mov r8d, eax
call fcn.1400194a0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._SetServiceStatus__error_code___x_n
call fcn.14000db70
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret