Function at 0x140040d90
Capabilities:
Create thread

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x38]
sub rsp, 0x138
mov rax, qword [0x14017a608]
xor rax, rsp
mov qword [rbp + 0x20], rax
mov rax, qword [rbp + 0xa8]
xor ebx, ebx
mov r14, qword [rbp + 0xb0]
mov esi, ebx
mov r15, qword [rbp + 0xb8]
mov r13d, ebx
mov qword [rsp + 0x68], rax
mov r12, rdx
mov byte [rsp + 0x41], bl
mov rdi, rcx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x60], r9
mov qword [rsp + 0x58], r8
mov rcx, qword [0x14017a048]
lea rax, [0x14017a048]
cmp rcx, rax
je 0x140040e31
test byte [rcx + 0x1c], 1
je 0x140040e31
cmp byte [rcx + 0x19], 4
jb 0x140040e31
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015aeb8]
mov edx, 0xf1
call fcn.140006b98
mov rcx, qword [0x14017a048]
test r14, r14
jne 0x140040e46
mov ebx, 0x80004003
mov dil, sil
mov r12b, sil
jmp 0x14004121e
movups xmm0, xmmword [0x14015f068]
movdqu xmmword [r14], xmm0
test r15, r15
jne 0x140040e67
mov ebx, 0x80004003
mov dil, sil
mov r12b, sil
jmp 0x140041217
lea rcx, [0x14017b300]
mov qword [r15], rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop dword [rax + rax]
mov rcx, rdi
mov byte [rsp + 0x40], 1
call fcn.1400422bc
mov ebx, eax
test eax, eax
js 0x14004120d
cmp byte [rdi + 0x18], sil
je 0x140040ef2
mov rcx, qword [0x14017a048]
lea r14, [0x14017a048]
cmp rcx, r14
je 0x140040ee0
test byte [rcx + 0x1c], 1
je 0x140040ee0
cmp byte [rcx + 0x19], 2
jb 0x140040ee0
mov eax, dword [rdi + 8]
lea r8, [0x14015aeb8]
mov r9d, dword [rdi + 0x38]
mov edx, 0xf2
mov rcx, qword [rcx + 0x10]
mov dword [rsp + 0x20], eax
call fcn.14003dbf0
mov rcx, qword [0x14017a048]
mov ebx, 0x80780017
mov dil, byte [rsp + 0x40]
mov r12b, sil
jmp 0x140041225
cmp byte [rdi + 0x20], sil
je 0x140040f3e
mov rcx, qword [0x14017a048]
lea r14, [0x14017a048]
cmp rcx, r14
je 0x140040f37
test byte [rcx + 0x1c], 1
je 0x140040f37
cmp byte [rcx + 0x19], 2
jb 0x140040f37
mov r9d, dword [rdi + 8]
lea r8, [0x14015aeb8]
mov rcx, qword [rcx + 0x10]
mov edx, 0xf3
call fcn.140011750
mov rcx, qword [0x14017a048]
mov ebx, 0x8078011c
jmp 0x140040ee5
xor edx, edx
lea rcx, [rbp - 0x70]
mov r8d, SysAllocStringByteLen
call sub.msvcrt.dll_memset
mov rcx, qword [rdi + 0x10]
movups xmm0, xmmword [r12]
mov rax, qword [rcx]
movdqu xmmword [rsp + 0x70], xmm0
movabs r10, 0xc9751663545acb70
mov rax, qword [rax + 0x18]
lea r8, [rbp - 0x70]
lea rdx, [rsp + 0x70]
call qword [vtable.H_MA8HI.0]
mov ebx, eax
test eax, eax
js 0x14004120d
mov r12b, 1
lea rcx, [rbp - 0x80]
mov byte [rsp + 0x41], r12b
call qword [sym.imp.RPCRT4.dll_UuidCreate]
nop dword [rax + rax]
lea rcx, [rsp + 0x50]
call fcn.140043510
mov ebx, eax
test eax, eax
jns 0x140040ffb
mov rcx, qword [0x14017a048]
lea r14, [0x14017a048]
cmp rcx, r14
je 0x140040fee
test byte [rcx + 0x1c], r12b
je 0x140040fee
cmp byte [rcx + 0x19], 2
jb 0x140040fee
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015aeb8]
mov edx, 0xf4
mov r9d, eax
call fcn.140006bc4
mov rcx, qword [0x14017a048]
mov rsi, qword [rsp + 0x50]
mov dil, r12b
jmp 0x140041225
mov rsi, qword [rsp + 0x50]
mov rax, qword [rsi]
movabs r10, 0xfd41b67356dad870
mov rax, qword [rax + 8]
mov rcx, rsi
call qword [vtable.H_MA8HI.0]
mov rdx, qword [rdi + 0x10]
lea r12, [rsi + 0x18]
mov rcx, r12
call fcn.140006528
mov rdx, qword [rsp + 0x58]
mov rcx, r12
call fcn.140006588
mov ebx, eax
test eax, eax
js 0x14004120d
mov rax, qword [rsi]
movabs r10, 0xdee01e7974d59970
mov rax, qword [rax]
lea r8, [rsp + 0x48]
lea rdx, [0x14016a4e8]
mov rcx, rsi
call qword [vtable.H_MA8HI.0]
mov ebx, eax
test eax, eax
jns 0x1400410b7
mov rcx, qword [0x14017a048]
lea r14, [0x14017a048]
cmp rcx, r14
je 0x1400410aa
test byte [rcx + 0x1c], 1
je 0x1400410aa
cmp byte [rcx + 0x19], 2
jb 0x1400410aa
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015aeb8]
mov edx, 0xf5
mov r9d, eax
call fcn.140006bc4
mov rcx, qword [0x14017a048]
mov dil, byte [rsp + 0x40]
mov r12b, dil
jmp 0x140041225
mov eax, dword [rbp + 0xa0]
lea r9, [rbp - 0x80]
mov r8, qword [rsp + 0x68]
mov rdx, rdi
mov dword [rsp + 0x30], eax
mov rcx, rsi
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
call fcn.1400278fc
mov ebx, eax
test eax, eax
js 0x14004120d
and qword [rsp + 0x28], r13
lea r8, [0x140017680]
and dword [rsp + 0x20], r13d
mov r9, rsi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
nop dword [rax + rax]
mov r13, rax
test rax, rax
jne 0x140041188
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
mov rcx, qword [0x14017a048]
lea r14, [0x14017a048]
cmp rcx, r14
je 0x14004116a
test byte [rcx + 0x1c], 1
je 0x14004116a
cmp byte [rcx + 0x19], 2
jb 0x14004116a
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015aeb8]
mov edx, 0xf6
mov r9d, eax
call fcn.140006cec
mov rcx, qword [0x14017a048]
mov dil, byte [rsp + 0x40]
mov r12b, dil
test ebx, ebx
jle 0x140041225
movzx ebx, bx
or ebx, 0x80070000
jmp 0x140041225
cmp qword [rdi + 0x28], 0
mov byte [rdi + 0x18], 1
jne 0x14004119a
cmp qword [rdi + 0x30], 0
je 0x1400411b2
lea r8, str.m_pAsyncHelper__NULL__m_pAsyncRef__NULL
mov edx, 0x1318
lea rcx, str.base_stor_blbengine_serviceengine.cpp
call fcn.14008ac24
mov rcx, qword [rsp + 0x48]
xor esi, esi
mov qword [rdi + 0x28], r12
mov qword [rdi + 0x30], rcx
mov rax, qword [rcx]
movabs r10, 0xfd41b67356dad870
mov rax, qword [rax + 8]
call qword [vtable.H_MA8HI.0]
mov rax, qword [rsp + 0x48]
lea rcx, [0x14017b300]
movups xmm0, xmmword [rbp - 0x80]
and qword [rsp + 0x48], rsi
mov dword [rdi + 0x38], 1
xor dil, dil
movdqu xmmword [r14], xmm0
mov qword [r15], rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop dword [rax + rax]
jmp 0x140041212
mov dil, byte [rsp + 0x40]
mov r12b, byte [rsp + 0x41]
mov rcx, qword [0x14017a048]
lea r14, [0x14017a048]
mov rdx, qword [rsp + 0x48]
test rdx, rdx
je 0x140041250
mov rax, qword [rdx]
movabs r10, 0xbaac1f10365eb170
mov rax, qword [rax + 0x10]
mov rcx, rdx
call qword [vtable.H_MA8HI.0]
mov rcx, qword [0x14017a048]
test r13, r13
je 0x14004126b
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov rcx, qword [0x14017a048]
test rsi, rsi
je 0x140041291
mov rax, qword [rsi]
movabs r10, 0xbaac1f10365eb170
mov rax, qword [rax + 0x10]
mov rcx, rsi
call qword [vtable.H_MA8HI.0]
mov rcx, qword [0x14017a048]
test r12b, r12b
je 0x1400412a6
lea rcx, [rbp - 0x70]
call fcn.1400a466c
mov rcx, qword [0x14017a048]
test ebx, ebx
jns 0x1400412da
cmp rcx, r14
je 0x140041300
test byte [rcx + 0x1c], 1
je 0x1400412da
cmp byte [rcx + 0x19], 2
jb 0x1400412da
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015aeb8]
mov edx, 0xf7
mov r9d, ebx
call fcn.140006bc4
mov rcx, qword [0x14017a048]
cmp rcx, r14
je 0x140041300
test byte [rcx + 0x1c], 1
je 0x140041300
cmp byte [rcx + 0x19], 4
jb 0x140041300
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015aeb8]
mov edx, 0xf8
call fcn.140006b98
test dil, dil
je 0x140041318
lea rcx, [0x14017b300]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop dword [rax + rax]
mov eax, ebx
mov rcx, qword [rbp + 0x20]
xor rcx, rsp
call fcn.140001d90
add rsp, 0x138
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret