Function at 0x140005220
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x3c0]
sub rsp, 0x4c0
mov rax, qword [0x140019010]
xor rax, rsp
mov qword [rbp + 0x3b0], rax
mov rsi, rcx
call qword [sym.imp.WINMM.dll_timeGetTime]
mov dword [rbp - 0x70], eax
mov r9, 0xffffffffffffffff
lea r8, str.at_engine::bdatengine::Run
mov edx, 0x102
lea rcx, [rbp - 0x6c]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
lea r8, [0x140013078]
mov edx, 0x104
lea rcx, [rbp - 0x6c]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
mov r9, 0xffffffffffffffff
lea r8, str.at_engine::bdatengine::Run
mov edx, 0x104
lea rcx, [rbp + 0x19c]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov ecx, dword [0x140019e38]
mov eax, dword [0x140019e34]
xor r15d, r15d
lea r12d, [r15 + 1]
add ecx, eax
je 0x14000536c
mov dword [rsp + 0x48], r15d
call fcn.14000e7d0
mov qword [rsp + 0x40], rax
lock inc dword [rsp + 0x48]
mov rax, qword [rsp + 0x40]
test rax, rax
jne 0x1400052f9
call fcn.14000e7d0
mov qword [rsp + 0x40], rax
lock inc dword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
mov dword [rsp + 0x50], 0x20
lea rax, [rbp - 0x6c]
mov qword [rsp + 0x30], rax
lea rax, str.____s
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x19c]
mov qword [rsp + 0x20], rax
lea r9, [0x140000000]
lea r8, [rsp + 0x50]
movsx edx, r12w
call fcn.14000e4b0
nop
mov qword [rsp + 0x40], r15
mov eax, 0xffffffff
lock xadd dword [rsp + 0x48], eax
cmp eax, 1
js 0x140005367
call fcn.14000e920
mov eax, 0xffffffff
lock xadd dword [rsp + 0x48], eax
cmp eax, 1
jns 0x140005352
lock inc dword [rsp + 0x48]
lea r14, [rsi + 8]
test rsi, rsi
cmove r14, r15
mov qword [rsp + 0x58], r15
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9d, 0x101
xor r8d, r8d
lea rdx, str..DEFAULTSoftwareSetID_bd.update.configure
mov rcx, 0xffffffff80000003
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov rcx, qword [rsp + 0x58]
test eax, eax
jne 0x1400053b6
test rcx, rcx
je 0x1400053b6
mov dil, 1
jmp 0x1400053b9
xor dil, dil
test rcx, rcx
je 0x1400053c4
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [rsi + 0x30], dil
cmp qword [rsi + 0x20], 0
je 0x1400053f6
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, 0xffffffff
mov rcx, qword [rsi + 0x20]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsi + 0x20]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x20], r15
mov rcx, qword [rsi + 0x28]
test rcx, rcx
je 0x140005409
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x28], r15
mov qword [rsi + 0x18], r14
test r14, r14
je 0x140005453
xor r9d, r9d
xor r8d, r8d
mov edx, r12d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rsi + 0x28], rax
test rax, rax
je 0x140005453
lea rax, [rbp - 0x80]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r15d
lea r9, [rsi + 0x18]
lea r8, [0x14000cbe0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rsi + 0x20], rax
mov qword [rsp + 0x58], r15
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9d, 0x101
xor r8d, r8d
lea rdx, str..DEFAULTSoftwareSetID_bd.update.configure
mov rcx, 0xffffffff80000003
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov rcx, qword [rsp + 0x58]
test eax, eax
jne 0x140005492
test rcx, rcx
je 0x140005492
mov dil, 1
jmp 0x140005495
xor dil, dil
test rcx, rcx
je 0x1400054a0
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
movzx edx, dil
call fcn.140005620
test dil, dil
jne 0x1400054b6
mov rcx, rsi
call fcn.140005a70
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], 0xf
mov byte [rsp + 0x60], 0
lea rcx, [rsp + 0x60]
call fcn.14000ed50
test eax, eax
jne 0x140005559
lea rdx, [rsp + 0x60]
cmp qword [rsp + 0x78], 0x10
cmovae rdx, qword [rsp + 0x60]
mov rcx, rsi
call fcn.140005880
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 0x10
jb 0x140005533
inc rdx
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000552e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000558d
call fcn.14000f82c
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], 0xf
mov byte [rsp + 0x60], 0
lea rcx, [rsp + 0x60]
call fcn.14000ed50
test eax, eax
je 0x1400054e0
mov rdx, qword [rsp + 0x78]
cmp rdx, 0x10
jb 0x140005599
inc rdx
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140005594
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140005594
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000f82c
mov rcx, rsi
call fcn.140006880
cmp qword [rsi + 0x20], 0
je 0x1400055cf
mov rcx, qword [rsi + 0x28]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, 0xffffffff
mov rcx, qword [rsi + 0x20]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsi + 0x20]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x20], r15
mov rcx, qword [rsi + 0x28]
test rcx, rcx
je 0x1400055e2
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x28], r15
mov qword [rsi + 0x18], r15
lea rcx, [rbp - 0x70]
call fcn.14000e3c0
xor eax, eax
mov rcx, qword [rbp + 0x3b0]
xor rcx, rsp
call fcn.14000f7e0
lea r11, [rsp + 0x4c0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret