Function at 0x140046984
Capabilities:
Create thread

Disassembly:
push rdi
push r12
push r13
sub rsp, 0x40
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x70], rsi
mov rbx, rcx
lea rdx, str.CRecTaskInfo::Init__
mov r13d, 8
mov ecx, r13d
call fcn.140001110
lea r12d, [r13 - 7]
cmp qword [rbx + 0x20], 0
jne 0x1400469f7
xor r9d, r9d
xor r8d, r8d
mov edx, r12d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbx + 0x20], rax
test rax, rax
jne 0x1400469f7
lea rdx, str.CRecTaskInfo::Init_____Failed_to_create__hThreadAcknowledge.
mov ecx, r12d
call fcn.140001110
mov eax, 0x80004005
jmp 0x140046bc5
cmp qword [rbx + 0x28], 0
jne 0x140046a31
xor r9d, r9d
xor r8d, r8d
mov edx, r12d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbx + 0x28], rax
test rax, rax
jne 0x140046a31
lea rdx, str.CRecTaskInfo::Init___Failed_to_create__hThreadStop
mov ecx, r12d
call fcn.140001110
mov eax, 0x8007000e
jmp 0x140046bc5
cmp qword [rbx + 0x40], 0
jne 0x140046aea
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8d, 0x158
mov edx, r13d
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x60], rax
test rax, rax
je 0x140046a6d
xor edx, edx
mov rcx, rax
call fcn.14004a1cc
mov rcx, rax
jmp 0x140046a6f
xor ecx, ecx
mov qword [rbx + 0x40], rcx
test rcx, rcx
jne 0x140046a91
lea rdx, str.CRecTaskInfo::Init___Failed_to_create__pFrequencyScanner
mov ecx, r12d
call fcn.140001110
mov eax, 0x8007000e
jmp 0x140046bc5
mov rax, qword [rcx]
call qword [rax + 8]
mov rcx, qword [rbx + 0x40]
mov rax, qword [rcx]
call qword [rax + 0x28]
mov edi, eax
test eax, eax
jns 0x140046acf
mov r8d, eax
lea rdx, str.CRecTaskInfo::Init_____Error:_CFrequencyScanner__FinalConstruct__0x_X_.
mov ecx, r12d
call fcn.140001110
mov rcx, qword [rbx + 0x40]
mov rdx, qword [rcx]
call qword [rdx + 0x10]
and qword [rbx + 0x40], 0
mov eax, edi
jmp 0x140046bc5
mov rax, qword [rbx + 0x40]
mov r8, qword [rax + 0x30]
mov qword [rbx + 0x18], r8
lea rdx, str.CRecTaskInfo::Init______hExhausiveScanEvent___d_.
mov ecx, r12d
call fcn.140001110
cmp qword [rbx + 0x10], 0
jne 0x140046b38
lea rax, [rbx + 8]
mov qword [rsp + 0x28], rax
and dword [rsp + 0x20], 0
mov r9, rbx
lea r8, [0x140046be0]
mov edx, 0x10000
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbx + 0x10], rax
test rax, rax
jne 0x140046b38
lea rdx, str.CRecTaskInfo::Init_____Failed_to_create_ScannerThreadProc.
mov ecx, r12d
call fcn.140001110
mov eax, 0x80004005
jmp 0x140046bc5
lea rdx, str.CRecTaskInfo::Init___Waiting_for__hThreadAcknowledge.
mov ecx, r13d
call fcn.140001110
and dword [rsp + 0x20], 0
or r9d, 0xffffffff
mov r8d, r12d
lea rdx, [rbx + 0x20]
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjectsEx]
test eax, eax
jne 0x140046b77
xor edi, edi
lea rdx, str.CRecTaskInfo::Init___Received__hThreadAcknowledge_signal.
mov ecx, r13d
call fcn.140001110
jmp 0x140046b8b
mov edi, 0x8000ffff
lea rdx, str.CRecTaskInfo::Init___Worker_thread_never_reported_initialization_status.
mov ecx, r12d
call fcn.140001110
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
lea rdx, str.CRecTaskInfo::Init___Reset__hThreadAcknowledge
mov ecx, r13d
call fcn.140001110
mov rcx, qword [rbx + 0x40]
test rcx, rcx
je 0x140046bc3
mov r8d, 2
mov dword [rbx + 0x34], r8d
mov dword [rbx + 0x3c], r12d
mov edx, dword [rbx + 0x38]
call fcn.140032938
mov eax, edi
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x40
pop r13
pop r12
pop rdi
ret