Function at 0x140003850
Capabilities:
Create thread
Resume thread

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xb8
mov rax, qword [0x1400b1010]
xor rax, rsp
mov qword [rsp + 0xa8], rax
mov r12, r9
mov rbx, r8
mov r15, rdx
mov rdi, rcx
mov qword [rsp + 0x48], rcx
mov rdx, qword [rdx]
mov qword [rcx], rdx
test rdx, rdx
je 0x1400038a7
mov rax, qword [rdx + 8]
movsxd rcx, dword [rax + 4]
add rdx, 8
add rcx, rdx
mov rax, qword [rcx]
call qword [rax]
nop
lea rcx, [rdi + 8]
xor r13d, r13d
mov qword [rcx], r13
mov qword [rcx + 0x10], r13
mov qword [rcx + 0x18], 7
mov word [rcx], r13w
mov r14, 0xffffffffffffffff
mov r8, r14
nop dword [rax + rax]
inc r8
cmp word [rbx + r8*2], 0
jne 0x1400038d0
mov rdx, rbx
call fcn.14001eee0
nop
mov qword [rdi + 0x28], r13
mov qword [rdi + 0x38], r13
mov qword [rdi + 0x40], r13
mov dword [rdi + 0x48], 1
mov byte [rdi + 0x4c], 0
mov qword [rsp + 0x50], r13
mov ecx, 0x30
call fcn.14002bcc8
mov rbx, rax
mov qword [rsp + 0x40], rax
mov dword [rax + 0x28], 1
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
nop
mov rsi, qword [rdi + 0x40]
mov qword [rdi + 0x40], rbx
lock inc dword [rbx + 0x28]
test rsi, rsi
je 0x140003958
mov eax, r14d
lock xadd dword [rsi + 0x28], eax
cmp eax, 1
jne 0x140003958
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov edx, 0x30
mov rcx, rsi
call fcn.14002bcc0
nop
mov eax, r14d
lock xadd dword [rbx + 0x28], eax
cmp eax, 1
jne 0x14000397b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov edx, 0x30
mov rcx, rbx
call fcn.14002bcc0
xorps xmm0, xmm0
movups xmmword [rsp + 0x78], xmm0
movups xmmword [rsp + 0x88], xmm0
movups xmmword [rsp + 0x98], xmm0
mov rcx, qword [r15]
test rcx, rcx
je 0x1400039a2
mov rax, qword [rcx]
call qword [rax]
jmp 0x1400039a5
mov rax, r13
lea r8, [0x14009b5c0]
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.140021710
nop
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], r13d
lea r9, [rdi + 0x28]
mov r8, rbx
mov rdx, r12
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x140003a30
mov rcx, qword [r15]
test rcx, rcx
je 0x140003a30
mov rax, qword [rcx]
call qword [rax]
cmp byte [rax + 0x1e38], 0
je 0x140003a30
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [r15]
mov rax, qword [rcx]
call qword [rax]
mov r9d, ebx
mov r8d, 1
lea rdx, str.Failed_to_duplicate_RestartEvent_event_handle_with_error_code__i._n
mov rcx, rax
call fcn.140021110
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rdi + 0x30], rax
test rax, rax
jne 0x140003a89
mov rcx, qword [r15]
test rcx, rcx
je 0x140003a89
mov rax, qword [rcx]
call qword [rax]
cmp byte [rax + 0x1e38], 0
je 0x140003a89
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [r15]
mov rax, qword [rcx]
call qword [rax]
mov r9d, ebx
mov r8d, 1
lea rdx, str.Failed_to_create_ExitEvent_event_handle_with_error_code__i._n
mov rcx, rax
call fcn.140021110
xorps xmm0, xmm0
movups xmmword [rsp + 0x58], xmm0
movups xmmword [rsp + 0x68], xmm0
mov rsi, qword [rdi + 0x40]
mov rbp, qword [rdi]
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x60], rsi
lea rax, str.C:ProjectsSoundEdge_sedsplibcs.h
mov qword [rsp + 0x68], rax
mov dword [rsp + 0x70], 0x22
test rbp, rbp
je 0x140003ad4
mov rax, qword [rbp + 8]
movsxd rcx, dword [rax + 4]
add rcx, 8
add rcx, rbp
mov rax, qword [rcx]
call qword [rax]
lock inc dword [rsi + 0x28]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [rsp + 0x74], 1
mov qword [rsp + 0x28], r13
mov dword [rsp + 0x20], 4
mov r9, rdi
lea r8, [0x140003f70]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rdi + 0x38], rax
test rax, rax
je 0x140003b20
lock inc dword [rdi + 0x48]
mov rcx, qword [rdi + 0x38]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x140003b5f
mov rcx, qword [r15]
test rcx, rcx
je 0x140003b5f
mov rax, qword [rcx]
call qword [rax]
cmp byte [rax + 0x1e38], 0
je 0x140003b5f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [r15]
mov rax, qword [rcx]
call qword [rax]
mov r9d, ebx
mov r8d, 1
lea rdx, str.Failed_to_create_classification_thread_with_error_code__i._n
mov rcx, rax
call fcn.140021110
nop
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lock xadd dword [rsi + 0x28], r14d
cmp r14d, 1
jne 0x140003b8e
test rsi, rsi
je 0x140003b8e
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea edx, [r14 + 0x2f]
mov rcx, rsi
call fcn.14002bcc0
test rbp, rbp
je 0x140003ba9
mov rcx, qword [rbp + 8]
movsxd rdx, dword [rcx + 4]
lea rcx, [rbp + 8]
add rcx, rdx
mov rdx, qword [rcx]
call qword [rdx + reloc.OLEAUT32.dll_VariantClear]
nop
lea rcx, [rsp + 0x78]
call fcn.140021c20
nop
mov rax, rdi
mov rcx, qword [rsp + 0xa8]
xor rcx, rsp
call fcn.14002bca0
add rsp, 0xb8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret