Function at 0x140022820
Capabilities:
Create thread

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x58
mov rax, qword [0x1400de7a8]
xor rax, rsp
mov qword [rbp - 0x10], rax
test byte [0x1400dfdc1], 8
mov rbx, r9
mov r15, r8
mov esi, edx
mov r14d, ecx
je 0x140022868
mov r8d, ecx
lea rdx, [0x1400b5b38]
lea rcx, [0x1400dd9b0]
call fcn.14002e746
mov eax, r14d
sub eax, 1
je 0x140022b39
sub eax, 3
je 0x140022b2f
sub eax, 1
je 0x140022b39
sub eax, 6
je 0x140022af9
sub eax, 2
je 0x140022ae1
sub eax, 1
je 0x1400228bc
sub eax, 1
je 0x140022b39
cmp eax, 0x12
je 0x1400228bc
mov rcx, qword [0x1400dd9f8]
call fcn.14006dff4
jmp 0x140022bce
call fcn.14000eca4
xor ebx, ebx
test al, al
je 0x1400228e6
cmp esi, 5
jne 0x1400228d6
cmp r14d, 0x21
jne 0x140022bce
cmp esi, 6
jne 0x1400228e6
cmp r14d, 0xe
je 0x1400228f2
jmp 0x140022bce
lea eax, [rsi - 5]
cmp eax, 1
ja 0x140022bce
lea rdx, [0x1400b45f2]
mov ecx, SafeArrayPutElement
call fcn.140025308
mov rdi, rax
test rax, rax
je 0x140022bce
xor eax, eax
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
mov qword [rdi + 0x10], rax
or dword [rdi + 8], 0xffffffff
mov qword [rdi + 0x10], rbx
mov dword [rdi], r14d
mov dword [rdi + 4], esi
cmp r14d, 0xe
jne 0x140022a58
mov qword [rbp - 0x20], rbx
lea rcx, [0x1400dfcc8]
call fcn.140028254
test al, al
je 0x140022985
call fcn.14000eca4
test al, al
je 0x140022a70
mov rcx, qword [0x1400dd9f8]
mov rax, qword [rcx]
movabs r10, 0x8e851fd97451f170
mov edx, dword [r15 + 4]
mov rax, qword [rax + 0xb0]
call qword [case.0x140001f80.0]
mov ecx, dword [r15 + 4]
mov dword [rbp - 0x20], ecx
jmp 0x140022a63
mov r15d, dword [r15 + 4]
cmp esi, 5
jne 0x140022a2e
xor edx, edx
mov qword [rbp - 0x28], rbx
lea rcx, [rbp - 0x28]
call fcn.14001bf20
lea rdx, [rbp - 0x28]
mov ecx, r15d
call qword [sym.imp.ext_ms_win_session_wtsapi32_l1_1_0.dll_WTSQueryUserToken]
nop dword [rax + rax]
test eax, eax
je 0x1400229f9
mov rcx, qword [rbp - 0x28]
lea rdx, [rbp - 0x20]
call qword [sym.imp.ext_ms_win_session_usermgr_l1_1_0.dll_UMgrQueryUserContext]
nop dword [rax + rax]
mov edx, 0x80000000
lea ecx, [rax + rdx]
test edx, ecx
jne 0x140022a0e
cmp eax, 0x80070520
je 0x140022a0e
mov rcx, qword [rbp + 0x30]
lea r8, [0x1400b61e8]
mov r9d, eax
mov edx, 0x3a0
call fcn.14002061c
jmp 0x140022a0e
mov rcx, qword [rbp + 0x30]
lea r8, [0x1400b61e8]
mov edx, 0x3a4
call fcn.14005bd7c
mov rcx, qword [rbp - 0x28]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140022a28
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
mov rax, qword [rbp - 0x20]
jmp 0x140022a52
mov rcx, qword [0x1400dd9f8]
mov rax, qword [rcx]
movabs r10, 0x8e851fd97451f170
mov rax, qword [rax + 0xb0]
mov edx, r15d
call qword [case.0x140001f80.0]
mov dword [rbp - 0x20], r15d
jmp 0x140022a63
mov eax, dword [r15 + 4]
mov dword [rbp - 0x20], eax
mov rax, qword [r15 + 8]
mov qword [rbp - 0x18], rax
movups xmm0, xmmword [rbp - 0x20]
movdqu xmmword [rdi + 8], xmm0
cmp qword [rdi + 0x10], rbx
je 0x140022bce
call fcn.14000eca4
test al, al
je 0x140022a95
cmp esi, 6
jne 0x140022a95
mov rcx, rdi
call fcn.1400219f0
jmp 0x140022bce
mov qword [rsp + 0x28], rbx
lea r8, [fcn.1400219f0]
mov r9, rdi
mov dword [rsp + 0x20], ebx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_CreateThread]
nop dword [rax + rax]
test rax, rax
jne 0x140022acd
lea edx, [rax + 0x18]
mov rcx, rdi
call fcn.1400252b8
jmp 0x140022bce
mov rcx, rax
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
jmp 0x140022bce
cmp esi, 4
je 0x140022aef
cmp esi, 7
jne 0x140022bce
call fcn.140022c10
jmp 0x140022bce
mov rcx, qword [0x1400dd9f8]
mov rax, qword [rcx]
movabs r10, 0xf4048ea352da1a70
mov rax, qword [rax + 0xa0]
mov r9, r15
mov r8d, esi
mov qword [rsp + 0x20], rbx
mov edx, 0xb
call qword [case.0x140001f80.0]
jmp 0x140022bce
call fcn.14006f77c
jmp 0x140022bce
lea r8, str._UtilCommon__Service_Stopping_n
mov edx, 0x33e
lea rcx, str.onecoreuap_base_appmodel_searchcommondcomsvcdcomsvc.cxx
call fcn.14005fca4
test byte [0x1400dfdc2], 8
je 0x140022b7c
lea rax, [rbp - 0x20]
mov r9d, 1
lea rdx, [0x1400b5b48]
mov qword [rsp + 0x20], rax
lea rcx, [0x1400dd9b0]
call fcn.14002e6e8
xor ebx, ebx
lea rcx, [rbp - 0x28]
cmp r14d, 1
setne bl
inc ebx
mov dword [rbp - 0x28], ebx
call fcn.14005532c
mov rcx, qword [0x1400dd9f8]
cmp r14d, 5
je 0x140022ba6
cmp r14d, 0xf
jne 0x140022bad
mov byte [rcx + 0x128], 1
mov edx, 3
call fcn.14002f34c
mov rcx, qword [0x1400dd9f8]
mov rcx, qword [rcx + 0x58]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
nop dword [rax + rax]
test byte [0x1400dfdc1], 8
je 0x140022bed
mov r8d, r14d
lea rdx, [0x1400b5b28]
lea rcx, [0x1400dd9b0]
call fcn.14002e746
xor eax, eax
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.140024c10
add rsp, 0x58
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret