Function at 0x140007dc0
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x280
mov edi, 0x80004005
lea rcx, [rsp + 0x30]
call fcn.140002ff0
nop
xor esi, esi
mov ebx, esi
cmp qword [rsp + 0x30], rbx
je 0x140007e4e
mov ecx, 0xd0
call fcn.14001fbc4
mov qword [rsp + 0x290], rax
test rax, rax
je 0x140007e11
mov rcx, rax
call fcn.1400073e0
mov rbx, rax
jmp 0x140007e14
mov rbx, rsi
test rbx, rbx
je 0x140007e4e
mov rcx, rbx
call fcn.140007a20
mov edi, eax
test eax, eax
js 0x140007e4e
lfence
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], esi
mov r9, rbx
lea r8, [0x140008040]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbx + 0xb8], rax
xorps xmm0, xmm0
movdqa xmmword [rsp + 0x40], xmm0
mov rax, qword [rsp + 0x38]
test rax, rax
je 0x140007e65
lock inc dword [rax + 8]
movaps xmm0, xmmword [rsp + 0x30]
movdqa xmmword [rsp + 0x40], xmm0
lea rcx, [rsp + 0x40]
call fcn.140003160
test edi, edi
jns 0x140007fd6
test rbx, rbx
je 0x140007fd6
mov dword [rbx], 1
cmp qword [rbx + 8], 0
je 0x140007ea5
lfence
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_SetEvent]
cmp qword [rbx + 0xb8], 0
je 0x140007ec6
lfence
mov rcx, qword [rbx + 0xb8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0xb8], rsi
cmp qword [rbx + 0x28], 0
je 0x140007f70
lfence
xor eax, eax
mov qword [rsp + 0x54], rax
mov dword [rsp + 0x6c], eax
xor edx, edx
mov r8d, 0x1fb
lea rcx, [rsp + 0x84]
call fcn.14003e9d0
mov dword [rsp + 0x50], 7
mov dword [rsp + 0x5c], esi
mov rax, qword [rbx + 8]
mov qword [rsp + 0x60], rax
mov dword [rsp + 0x68], 0x3000
mov rax, qword [rbx + 0x10]
mov qword [rsp + 0x70], rax
mov rax, qword [rbx + 0x38]
mov qword [rsp + 0x78], rax
mov dword [rsp + 0x80], 0x1000
mov dword [rsp + 0x28], reloc.OLEAUT32.dll_SafeArrayAccessData
mov dword [rsp + 0x20], esi
xor r9d, r9d
mov r8d, 0x22f
lea rdx, [rsp + 0x50]
mov rcx, qword [rbx + 0x28]
call fcn.140003570
mov qword [rbx + 0x18], rsi
mov qword [rbx + 0x40], rsi
cmp qword [rbx + 0x20], 0
je 0x140007f70
lfence
mov rcx, qword [rbx + 0x20]
call fcn.140043a54
mov qword [rbx + 0x20], rsi
cmp qword [rbx + 0x10], 0
je 0x140007f88
lfence
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x10], rsi
cmp qword [rbx + 8], 0
je 0x140007fa0
lfence
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 8], rsi
cmp qword [rbx + 0x38], 0
je 0x140007fb8
lfence
mov rcx, qword [rbx + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x38], rsi
lfence
mov rcx, rbx
call fcn.140007610
lfence
mov edx, 0xd0
mov rcx, rbx
call fcn.14001fc00
mov rbx, rsi
mov rdi, qword [rsp + 0x38]
test rdi, rdi
je 0x14000801a
mov esi, 0xffffffff
mov eax, esi
lock xadd dword [rdi + 8], eax
cmp eax, 1
jne 0x14000801a
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax]
call qword [case.0x1400290d6.0]
lock xadd dword [rdi + 0xc], esi
cmp esi, 1
jne 0x14000801a
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 8]
call qword [case.0x1400290d6.0]
mov rax, rbx
lea r11, [rsp + 0x280]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret