Function at 0x10004afb4
Capabilities:
Create thread

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x148
mov rax, qword [0x100165138]
xor rax, rsp
mov qword [rsp + 0x130], rax
mov r13, qword [rsp + 0x1b0]
xor esi, esi
xor r12b, r12b
and qword [rsp + 0x38], rsi
mov r14, r9
mov rbp, r8
xor r15d, r15d
mov rbx, rdx
mov rdi, rcx
mov byte [rsp + 0x31], r12b
mov qword [rsp + 0x40], rsi
mov rcx, qword [0x1001653b8]
lea rax, [0x1001653b8]
cmp rcx, rax
je 0x10004b040
test byte [rcx + 0x1c], 1
je 0x10004b040
cmp byte [rcx + 0x19], 4
jb 0x10004b040
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cb8]
mov edx, 0xe1
call fcn.10001c854
mov rcx, qword [0x1001653b8]
test r13, r13
jne 0x10004b04f
mov ebx, 0x80004003
jmp 0x10004b316
and qword [r13], rsi
lea rcx, [0x1001665a0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r12b, 1
mov byte [rsp + 0x30], r12b
cmp qword [rdi + 0x10], rsi
jne 0x10004b078
mov ebx, 0x8078000a
jmp 0x10004b30f
test rbp, rbp
cmove rbp, qword [rdi + 0x10]
cmp byte [rdi + 0x18], sil
je 0x10004b0d6
mov rcx, qword [0x1001653b8]
lea r13, [0x1001653b8]
cmp rcx, r13
je 0x10004b0cc
test byte [rcx + 0x1c], 1
je 0x10004b0cc
cmp byte [rcx + 0x19], 2
jb 0x10004b0cc
mov eax, dword [rdi + 8]
mov r9d, dword [rdi + 0x38]
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cb8]
mov edx, 0xe2
mov dword [rsp + 0x20], eax
call fcn.10001d914
mov rcx, qword [0x1001653b8]
mov ebx, 0x80780017
jmp 0x10004b31d
lea rcx, [rsp + 0x60]
xor edx, edx
mov r8d, 0xd0
call sub.msvcrt.dll_memset
mov rax, qword [rbp]
lea r8, [rsp + 0x60]
movdqu xmm5, xmmword [rbx]
movdqu xmmword [rsp + 0x50], xmm5
lea rdx, [rsp + 0x50]
mov rcx, rbp
call qword [rax + 0x58]
mov ebx, eax
test eax, eax
js 0x10004b30f
lea rcx, [rsp + 0x40]
mov byte [rsp + 0x31], 1
call fcn.1000577fc
mov ebx, eax
test eax, eax
jns 0x10004b177
mov rcx, qword [0x1001653b8]
lea r13, [0x1001653b8]
cmp rcx, r13
je 0x10004b16d
test byte [rcx + 0x1c], 1
je 0x10004b16d
cmp byte [rcx + 0x19], 2
jb 0x10004b16d
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cb8]
mov edx, 0xe3
mov r9d, eax
call fcn.10001c878
mov rsi, qword [rsp + 0x40]
mov rcx, qword [0x1001653b8]
jmp 0x10004b31d
mov rsi, qword [rsp + 0x40]
jmp 0x10004b31d
mov rsi, qword [rsp + 0x40]
mov rcx, rsi
mov rax, qword [rsi]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea r12, [rsi + 8]
mov rdx, rbp
mov rcx, r12
call fcn.10001d5f8
mov rdx, r14
mov rcx, r12
call fcn.10001d1a8
xor ebp, ebp
cmp eax, ebp
mov ebx, eax
jl 0x10004b30a
mov rax, qword [rsi]
lea r8, [rsp + 0x38]
lea rdx, [0x100002c30]
mov rcx, rsi
call qword [rax]
cmp eax, ebp
mov ebx, eax
jge 0x10004b20d
mov rcx, qword [0x1001653b8]
lea r13, [0x1001653b8]
cmp rcx, r13
je 0x10004b203
test byte [rcx + 0x1c], 1
je 0x10004b203
cmp byte [rcx + 0x19], 2
jb 0x10004b203
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cb8]
mov edx, 0xe4
mov r9d, eax
call fcn.10001c878
mov rcx, qword [0x1001653b8]
mov r12b, byte [rsp + 0x30]
jmp 0x10004b31d
lea r8, [rsp + 0x60]
mov rdx, rdi
mov rcx, rsi
call fcn.1000632dc
cmp eax, ebp
mov ebx, eax
jl 0x10004b30a
lea r8, [0x1000645b4]
mov r9, rsi
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], rbp
mov dword [rsp + 0x20], ebp
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov r15, rax
cmp rax, rbp
jne 0x10004b2a5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x1001653b8]
lea r13, [0x1001653b8]
cmp rcx, r13
je 0x10004b292
test byte [rcx + 0x1c], 1
je 0x10004b292
cmp byte [rcx + 0x19], 2
jb 0x10004b292
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cb8]
mov edx, 0xe5
mov r9d, eax
call fcn.10001c878
mov rcx, qword [0x1001653b8]
movzx ebx, di
or ebx, 0x80070000
cmp edi, ebp
cmovle ebx, edi
jmp 0x10004b203
mov byte [rdi + 0x18], 1
cmp qword [rdi + 0x28], rbp
jne 0x10004b2b5
cmp qword [rdi + 0x30], rbp
je 0x10004b2cd
lea r8, [0x100005f78]
lea rcx, [0x100005e40]
mov edx, 0x12fe
call fcn.10009a050
mov rcx, qword [rsp + 0x38]
mov qword [rdi + 0x28], r12
mov rsi, rbp
mov qword [rdi + 0x30], rcx
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rsp + 0x38]
mov dword [rdi + 0x38], 3
lea rcx, [0x1001665a0]
mov qword [r13], rax
mov qword [rsp + 0x38], rbp
mov r12b, bpl
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x10004b30f
mov r12b, byte [rsp + 0x30]
mov rcx, qword [0x1001653b8]
lea r13, [0x1001653b8]
mov rdx, qword [rsp + 0x38]
test rdx, rdx
je 0x10004b337
mov rax, qword [rdx]
mov rcx, rdx
call qword [rax + 0x10]
mov rcx, qword [0x1001653b8]
test r15, r15
je 0x10004b34c
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1001653b8]
test rsi, rsi
je 0x10004b361
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x10]
mov rcx, qword [0x1001653b8]
cmp byte [rsp + 0x31], 0
je 0x10004b379
lea rcx, [rsp + 0x60]
call fcn.1000a94fc
mov rcx, qword [0x1001653b8]
test ebx, ebx
jns 0x10004b3ad
cmp rcx, r13
je 0x10004b3d3
test byte [rcx + 0x1c], 1
je 0x10004b3ad
cmp byte [rcx + 0x19], 2
jb 0x10004b3ad
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cb8]
mov edx, 0xe6
mov r9d, ebx
call fcn.10001c878
mov rcx, qword [0x1001653b8]
cmp rcx, r13
je 0x10004b3d3
test byte [rcx + 0x1c], 1
je 0x10004b3d3
cmp byte [rcx + 0x19], 4
jb 0x10004b3d3
mov rcx, qword [rcx + 0x10]
lea r8, [0x100003cb8]
mov edx, 0xe7
call fcn.10001c854
test r12b, r12b
je 0x10004b3e5
lea rcx, [0x1001665a0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.10014e600
add rsp, 0x148
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret