Function at 0x10004aa54
Capabilities:
Create thread

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x138
mov rax, qword [0x100165138]
xor rax, rsp
mov qword [rsp + 0x120], rax
mov rax, qword [rsp + 0x1a8]
mov r12, qword [rsp + 0x1b0]
mov r13, qword [rsp + 0x1b8]
xor ebx, ebx
mov qword [rsp + 0x60], rax
mov r15, r9
mov r14, r8
mov rbp, rdx
mov rdi, rcx
mov byte [rsp + 0x41], bl
mov rsi, rbx
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x50], rbx
mov rcx, qword [0x1001653b8]
lea rax, [0x1001653b8]
cmp rcx, rax
je 0x10004aaf6
test byte [rcx + 0x1c], 1
je 0x10004aaf6
cmp byte [rcx + 0x19], 4
jb 0x10004aaf6
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cb8]
mov edx, 0xd9
call fcn.10001c854
mov rcx, qword [0x1001653b8]
cmp r12, rbx
jne 0x10004ab0e
mov ebx, 0x80004003
mov r14, rsi
mov dil, sil
mov bpl, sil
jmp 0x10004aeac
movdqu xmm0, xmmword [0x10000f0f8]
movdqu xmmword [r12], xmm0
cmp r13, rbx
jne 0x10004ab34
mov ebx, 0x80004003
mov r14, rsi
mov dil, sil
mov bpl, sil
jmp 0x10004aea5
lea rcx, [0x1001665a0]
mov qword [r13], rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, rdi
mov byte [rsp + 0x40], 1
call fcn.10005413c
mov ebx, eax
test eax, eax
js 0x10004ae96
cmp byte [rdi + 0x18], sil
je 0x10004abbd
mov rcx, qword [0x1001653b8]
lea r12, [0x1001653b8]
cmp rcx, r12
je 0x10004aba8
test byte [rcx + 0x1c], 1
je 0x10004aba8
cmp byte [rcx + 0x19], 2
jb 0x10004aba8
mov eax, dword [rdi + 8]
mov r9d, dword [rdi + 0x38]
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cb8]
mov edx, 0xda
mov dword [rsp + 0x20], eax
call fcn.10001d914
mov rcx, qword [0x1001653b8]
mov ebx, 0x80780017
mov dil, byte [rsp + 0x40]
mov r14, rsi
mov bpl, sil
jmp 0x10004aeb3
cmp byte [rdi + 0x20], sil
je 0x10004ac09
mov rcx, qword [0x1001653b8]
lea r12, [0x1001653b8]
cmp rcx, r12
je 0x10004ac02
test byte [rcx + 0x1c], 1
je 0x10004ac02
cmp byte [rcx + 0x19], 2
jb 0x10004ac02
mov r9d, dword [rdi + 8]
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cb8]
mov edx, 0xdb
call fcn.10001c878
mov rcx, qword [0x1001653b8]
mov ebx, 0x8078011c
jmp 0x10004abad
lea rcx, [rsp + 0x90]
xor edx, edx
mov r8d, SysAllocStringByteLen
call sub.msvcrt.dll_memset
mov rcx, qword [rdi + 0x10]
lea r8, [rsp + 0x90]
movdqu xmm5, xmmword [rbp]
movdqu xmmword [rsp + 0x70], xmm5
mov rax, qword [rcx]
lea rdx, [rsp + 0x70]
call qword [rax + 0x18]
mov ebx, eax
test eax, eax
js 0x10004ae96
lea rcx, [rsp + 0x80]
mov bpl, 1
mov byte [rsp + 0x41], bpl
call qword [sym.imp.RPCRT4.dll_UuidCreate]
lea rcx, [rsp + 0x58]
call fcn.10005766c
mov ebx, eax
test eax, eax
jns 0x10004acc2
mov rcx, qword [0x1001653b8]
lea r12, [0x1001653b8]
cmp rcx, r12
je 0x10004acae
test byte [rcx + 0x1c], bpl
je 0x10004acae
cmp byte [rcx + 0x19], 2
jb 0x10004acae
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cb8]
mov edx, 0xdc
mov r9d, eax
call fcn.10001c878
mov rcx, qword [0x1001653b8]
mov rsi, qword [rsp + 0x58]
mov r14, qword [rsp + 0x48]
mov dil, byte [rsp + 0x40]
jmp 0x10004aeb3
mov rsi, qword [rsp + 0x58]
mov rcx, rsi
mov rax, qword [rsi]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, qword [rdi + 0x10]
lea rbp, [rsi + 0x18]
mov rcx, rbp
call fcn.10001d5f8
mov rdx, r14
mov rcx, rbp
call fcn.10001d1a8
mov ebx, eax
test eax, eax
js 0x10004ae96
mov rax, qword [rsi]
lea r8, [rsp + 0x50]
lea rdx, [0x100002c20]
mov rcx, rsi
call qword [rax]
mov ebx, eax
test eax, eax
jns 0x10004ad5f
mov rcx, qword [0x1001653b8]
lea r12, [0x1001653b8]
cmp rcx, r12
je 0x10004ad4d
test byte [rcx + 0x1c], 1
je 0x10004ad4d
cmp byte [rcx + 0x19], 2
jb 0x10004ad4d
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cb8]
mov edx, 0xdd
mov r9d, eax
call fcn.10001c878
mov rcx, qword [0x1001653b8]
mov r14, qword [rsp + 0x48]
mov dil, byte [rsp + 0x40]
mov bpl, dil
jmp 0x10004aeb3
mov eax, dword [rsp + 0x1a0]
mov r8, qword [rsp + 0x60]
lea r9, [rsp + 0x80]
mov dword [rsp + 0x30], eax
lea rax, [rsp + 0x90]
mov rdx, rdi
mov rcx, rsi
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], rax
call fcn.100022748
xor r15d, r15d
cmp eax, r15d
mov ebx, eax
jl 0x10004ae96
lea r8, [0x10003eb28]
mov r9, rsi
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], r15d
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov r14, rax
cmp rax, r15
jne 0x10004ae22
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x1001653b8]
lea r12, [0x1001653b8]
cmp rcx, r12
je 0x10004ae0e
test byte [rcx + 0x1c], 1
je 0x10004ae0e
cmp byte [rcx + 0x19], 2
jb 0x10004ae0e
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cb8]
mov edx, 0xde
mov r9d, eax
call fcn.10001c878
mov rcx, qword [0x1001653b8]
movzx ebx, di
or ebx, 0x80070000
cmp edi, r15d
cmovle ebx, edi
jmp 0x10004ad52
mov byte [rdi + 0x18], 1
cmp qword [rdi + 0x28], r15
jne 0x10004ae32
cmp qword [rdi + 0x30], r15
je 0x10004ae4a
lea r8, [0x100005f78]
lea rcx, [0x100005e40]
mov edx, 0x1219
call fcn.10009a050
mov rcx, qword [rsp + 0x50]
mov qword [rdi + 0x28], rbp
mov rsi, r15
mov qword [rdi + 0x30], rcx
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rsp + 0x50]
mov dword [rdi + 0x38], 1
movdqu xmm0, xmmword [rsp + 0x80]
movdqu xmmword [r12], xmm0
lea rcx, [0x1001665a0]
mov qword [rsp + 0x50], r15
mov dil, r15b
mov qword [r13], rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x10004aea0
mov r14, qword [rsp + 0x48]
mov dil, byte [rsp + 0x40]
mov bpl, byte [rsp + 0x41]
mov rcx, qword [0x1001653b8]
lea r12, [0x1001653b8]
mov rdx, qword [rsp + 0x50]
test rdx, rdx
je 0x10004aecd
mov rax, qword [rdx]
mov rcx, rdx
call qword [rax + 0x10]
mov rcx, qword [0x1001653b8]
test r14, r14
je 0x10004aee2
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1001653b8]
test rsi, rsi
je 0x10004aef7
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x10]
mov rcx, qword [0x1001653b8]
test bpl, bpl
je 0x10004af10
lea rcx, [rsp + 0x90]
call fcn.1000b51e8
mov rcx, qword [0x1001653b8]
test ebx, ebx
jns 0x10004af44
cmp rcx, r12
je 0x10004af6a
test byte [rcx + 0x1c], 1
je 0x10004af44
cmp byte [rcx + 0x19], 2
jb 0x10004af44
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cb8]
mov edx, 0xdf
mov r9d, ebx
call fcn.10001c878
mov rcx, qword [0x1001653b8]
cmp rcx, r12
je 0x10004af6a
test byte [rcx + 0x1c], 1
je 0x10004af6a
cmp byte [rcx + 0x19], 4
jb 0x10004af6a
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cb8]
mov edx, 0xe0
call fcn.10001c854
test dil, dil
je 0x10004af7c
lea rcx, [0x1001665a0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
mov rcx, qword [rsp + 0x120]
xor rcx, rsp
call fcn.10014e600
add rsp, 0x138
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret