Function at 0x10004aa04
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 0x10004aaa6
test byte [rcx + 0x1c], 1
je 0x10004aaa6
cmp byte [rcx + 0x19], 4
jb 0x10004aaa6
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cf8]
mov edx, 0xd9
call fcn.10001c7b8
mov rcx, qword [0x1001653b8]
cmp r12, rbx
jne 0x10004aabe
mov ebx, 0x80004003
mov r14, rsi
mov dil, sil
mov bpl, sil
jmp 0x10004ae5c
movdqu xmm0, xmmword [0x100001fe0]
movdqu xmmword [r12], xmm0
cmp r13, rbx
jne 0x10004aae4
mov ebx, 0x80004003
mov r14, rsi
mov dil, sil
mov bpl, sil
jmp 0x10004ae55
lea rcx, [0x1001665a0]
mov qword [r13], rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, rdi
mov byte [rsp + 0x40], 1
call fcn.1000540ec
mov ebx, eax
test eax, eax
js 0x10004ae46
cmp byte [rdi + 0x18], sil
je 0x10004ab6d
mov rcx, qword [0x1001653b8]
lea r12, [0x1001653b8]
cmp rcx, r12
je 0x10004ab58
test byte [rcx + 0x1c], 1
je 0x10004ab58
cmp byte [rcx + 0x19], 2
jb 0x10004ab58
mov eax, dword [rdi + 8]
mov r9d, dword [rdi + 0x38]
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cf8]
mov edx, 0xda
mov dword [rsp + 0x20], eax
call fcn.10001e8b4
mov rcx, qword [0x1001653b8]
mov ebx, 0x80780017
mov dil, byte [rsp + 0x40]
mov r14, rsi
mov bpl, sil
jmp 0x10004ae63
cmp byte [rdi + 0x20], sil
je 0x10004abb9
mov rcx, qword [0x1001653b8]
lea r12, [0x1001653b8]
cmp rcx, r12
je 0x10004abb2
test byte [rcx + 0x1c], 1
je 0x10004abb2
cmp byte [rcx + 0x19], 2
jb 0x10004abb2
mov r9d, dword [rdi + 8]
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cf8]
mov edx, 0xdb
call fcn.10001c7dc
mov rcx, qword [0x1001653b8]
mov ebx, 0x8078011c
jmp 0x10004ab5d
lea rcx, [rsp + 0x90]
xor edx, edx
mov r8d, 0x90
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 0x10004ae46
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.100057534
mov ebx, eax
test eax, eax
jns 0x10004ac72
mov rcx, qword [0x1001653b8]
lea r12, [0x1001653b8]
cmp rcx, r12
je 0x10004ac5e
test byte [rcx + 0x1c], bpl
je 0x10004ac5e
cmp byte [rcx + 0x19], 2
jb 0x10004ac5e
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cf8]
mov edx, 0xdc
mov r9d, eax
call fcn.10001c7dc
mov rcx, qword [0x1001653b8]
mov rsi, qword [rsp + 0x58]
mov r14, qword [rsp + 0x48]
mov dil, byte [rsp + 0x40]
jmp 0x10004ae63
mov rsi, qword [rsp + 0x58]
mov rcx, rsi
mov rax, qword [rsi]
call qword [rax + 8]
mov rdx, qword [rdi + 0x10]
lea rbp, [rsi + 0x18]
mov rcx, rbp
call fcn.10001d55c
mov rdx, r14
mov rcx, rbp
call fcn.10001d10c
mov ebx, eax
test eax, eax
js 0x10004ae46
mov rax, qword [rsi]
lea r8, [rsp + 0x50]
lea rdx, [0x100002c60]
mov rcx, rsi
call qword [rax]
mov ebx, eax
test eax, eax
jns 0x10004ad0f
mov rcx, qword [0x1001653b8]
lea r12, [0x1001653b8]
cmp rcx, r12
je 0x10004acfd
test byte [rcx + 0x1c], 1
je 0x10004acfd
cmp byte [rcx + 0x19], 2
jb 0x10004acfd
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cf8]
mov edx, 0xdd
mov r9d, eax
call fcn.10001c7dc
mov rcx, qword [0x1001653b8]
mov r14, qword [rsp + 0x48]
mov dil, byte [rsp + 0x40]
mov bpl, dil
jmp 0x10004ae63
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.1000226bc
xor r15d, r15d
cmp eax, r15d
mov ebx, eax
jl 0x10004ae46
lea r8, [0x10003ea48]
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 0x10004add2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x1001653b8]
lea r12, [0x1001653b8]
cmp rcx, r12
je 0x10004adbe
test byte [rcx + 0x1c], 1
je 0x10004adbe
cmp byte [rcx + 0x19], 2
jb 0x10004adbe
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cf8]
mov edx, 0xde
mov r9d, eax
call fcn.10001c7dc
mov rcx, qword [0x1001653b8]
movzx ebx, di
or ebx, 0x80070000
cmp edi, r15d
cmovle ebx, edi
jmp 0x10004ad02
mov byte [rdi + 0x18], 1
cmp qword [rdi + 0x28], r15
jne 0x10004ade2
cmp qword [rdi + 0x30], r15
je 0x10004adfa
lea r8, [0x100005fe8]
lea rcx, [0x100005eb0]
mov edx, 0x1219
call fcn.100099ad8
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 + 8]
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 0x10004ae50
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 0x10004ae7d
mov rax, qword [rdx]
mov rcx, rdx
call qword [rax + 0x10]
mov rcx, qword [0x1001653b8]
test r14, r14
je 0x10004ae92
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1001653b8]
test rsi, rsi
je 0x10004aea7
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x10]
mov rcx, qword [0x1001653b8]
test bpl, bpl
je 0x10004aec0
lea rcx, [rsp + 0x90]
call fcn.1000b50e0
mov rcx, qword [0x1001653b8]
test ebx, ebx
jns 0x10004aef4
cmp rcx, r12
je 0x10004af1a
test byte [rcx + 0x1c], 1
je 0x10004aef4
cmp byte [rcx + 0x19], 2
jb 0x10004aef4
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cf8]
mov edx, 0xdf
mov r9d, ebx
call fcn.10001c7dc
mov rcx, qword [0x1001653b8]
cmp rcx, r12
je 0x10004af1a
test byte [rcx + 0x1c], 1
je 0x10004af1a
cmp byte [rcx + 0x19], 4
jb 0x10004af1a
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cf8]
mov edx, 0xe0
call fcn.10001c7b8
test dil, dil
je 0x10004af2c
lea rcx, [0x1001665a0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
mov rcx, qword [rsp + 0x120]
xor rcx, rsp
call fcn.10014e480
add rsp, 0x138
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret