Function at 0x140043630
Capabilities:
Create thread

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x58]
sub rsp, 0x158
mov rax, qword [0x140178010]
xor rax, rsp
mov qword [rbp + 0x40], rax
mov r12, qword [rbp + 0xc0]
xor esi, esi
mov r13b, sil
mov byte [rsp + 0x31], sil
mov r14d, esi
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], rsi
mov rdi, r8
mov qword [rsp + 0x48], rsi
mov rbx, rdx
mov qword [rsp + 0x50], r9
mov r15, rcx
mov rcx, qword [0x1401782b0]
lea rax, [0x1401782b0]
cmp rcx, rax
je 0x1400436c3
test byte [rcx + 0x1c], 1
je 0x1400436c3
cmp byte [rcx + 0x19], 4
jb 0x1400436c3
mov rcx, qword [rcx + 0x10]
lea r8, [0x140152588]
mov edx, 0xf3
call fcn.140004c6c
mov rcx, qword [0x1401782b0]
test r12, r12
jne 0x1400436d2
mov esi, 0x80004003
jmp 0x1400439d4
lea rcx, [0x140179190]
mov qword [r12], rsi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r13b, 1
mov byte [rsp + 0x30], r13b
cmp qword [r15 + 0x10], rsi
jne 0x1400436fb
mov esi, 0x8078000a
jmp 0x1400439cd
test rdi, rdi
cmove rdi, qword [r15 + 0x10]
cmp byte [r15 + 0x18], sil
je 0x14004375a
mov rcx, qword [0x1401782b0]
lea r12, [0x1401782b0]
cmp rcx, r12
je 0x140043750
test byte [rcx + 0x1c], 1
je 0x140043750
cmp byte [rcx + 0x19], 2
jb 0x140043750
mov eax, dword [r15 + 8]
lea r8, [0x140152588]
mov r9d, dword [r15 + 0x38]
mov edx, 0xf4
mov rcx, qword [rcx + 0x10]
mov dword [rsp + 0x20], eax
call fcn.1400103bc
mov rcx, qword [0x1401782b0]
mov esi, 0x80780017
jmp 0x1400439db
xor edx, edx
lea rcx, [rsp + 0x70]
mov r8d, 0xd0
call sub.msvcrt.dll_memset
movups xmm0, xmmword [rbx]
mov rax, qword [rdi]
movdqu xmmword [rsp + 0x60], xmm0
mov rbx, qword [rax + 0x58]
mov rcx, rbx
call qword [0x14014cce0]
mov r9b, 1
lea r8, [rsp + 0x70]
lea rdx, [rsp + 0x60]
mov rcx, rdi
call rbx
mov esi, eax
test eax, eax
js 0x1400439cd
lea rcx, [rsp + 0x40]
mov byte [rsp + 0x31], 1
call fcn.140050a64
mov esi, eax
test eax, eax
jns 0x140043808
mov rcx, qword [0x1401782b0]
lea r12, [0x1401782b0]
cmp rcx, r12
je 0x1400437fe
test byte [rcx + 0x1c], 1
je 0x1400437fe
cmp byte [rcx + 0x19], 2
jb 0x1400437fe
mov rcx, qword [rcx + 0x10]
lea r8, [0x140152588]
mov edx, 0xf5
mov r9d, eax
call fcn.140004c90
mov rcx, qword [0x1401782b0]
mov r14, qword [rsp + 0x40]
jmp 0x1400439db
mov r14, qword [rsp + 0x40]
jmp 0x1400439db
mov r14, qword [rsp + 0x40]
mov rax, qword [r14]
mov rbx, qword [rax + 8]
mov rcx, rbx
call qword [0x14014cce0]
mov rcx, r14
call rbx
lea r13, [r14 + 8]
mov rdx, rdi
mov rcx, r13
call fcn.140005b20
mov rdx, qword [rsp + 0x50]
mov rcx, r13
call fcn.140005708
xor edi, edi
mov esi, eax
test eax, eax
js 0x1400439c8
mov rax, qword [r14]
mov rbx, qword [rax]
mov rcx, rbx
call qword [0x14014cce0]
lea r8, [rsp + 0x38]
mov rcx, r14
lea rdx, [0x140162078]
call rbx
mov esi, eax
test eax, eax
jns 0x1400438b8
mov rcx, qword [0x1401782b0]
lea r12, [0x1401782b0]
cmp rcx, r12
je 0x1400438ae
test byte [rcx + 0x1c], 1
je 0x1400438ae
cmp byte [rcx + 0x19], 2
jb 0x1400438ae
mov rcx, qword [rcx + 0x10]
lea r8, [0x140152588]
mov edx, 0xf6
mov r9d, eax
call fcn.140004c90
mov rcx, qword [0x1401782b0]
mov r13b, byte [rsp + 0x30]
jmp 0x1400439db
lea r8, [rsp + 0x70]
mov rdx, r15
mov rcx, r14
call fcn.14005cce4
mov esi, eax
test eax, eax
js 0x1400439c8
mov qword [rsp + 0x28], rdi
lea r8, [0x14005df40]
mov r9, r14
mov dword [rsp + 0x20], edi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rsp + 0x48], rax
test rax, rax
jne 0x140043952
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x1401782b0]
lea r12, [0x1401782b0]
cmp rcx, r12
je 0x14004393f
test byte [rcx + 0x1c], 1
je 0x14004393f
cmp byte [rcx + 0x19], 2
jb 0x14004393f
mov rcx, qword [rcx + 0x10]
lea r8, [0x140152588]
mov edx, 0xf7
mov r9d, eax
call fcn.140004c90
mov rcx, qword [0x1401782b0]
movzx esi, bx
or esi, 0x80070000
test ebx, ebx
cmovle esi, ebx
jmp 0x1400438ae
mov byte [r15 + 0x18], 1
cmp qword [r15 + 0x28], rdi
jne 0x140043963
cmp qword [r15 + 0x30], rdi
je 0x14004397b
lea r8, str.m_pAsyncHelper__NULL__m_pAsyncRef__NULL
mov edx, 0x13cb
lea rcx, str.base_stor_blbengine_serviceengine.cpp
call fcn.14008624c
mov qword [r15 + 0x28], r13
mov r14, rdi
mov rdi, qword [rsp + 0x38]
mov qword [r15 + 0x30], rdi
mov rax, qword [rdi]
mov rbx, qword [rax + 8]
mov rcx, rbx
call qword [0x14014cce0]
mov rcx, rdi
call rbx
mov rax, qword [rsp + 0x38]
lea rcx, [0x140179190]
and qword [rsp + 0x38], r14
xor r13b, r13b
mov dword [r15 + 0x38], 3
mov qword [r12], rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1400439cd
mov r13b, byte [rsp + 0x30]
mov rcx, qword [0x1401782b0]
lea r12, [0x1401782b0]
mov rdi, qword [rsp + 0x38]
test rdi, rdi
je 0x140043a01
mov rax, qword [rdi]
mov rbx, qword [rax + 0x10]
mov rcx, rbx
call qword [0x14014cce0]
mov rcx, rdi
call rbx
mov rcx, qword [0x1401782b0]
mov rax, qword [rsp + 0x48]
test rax, rax
je 0x140043a1b
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1401782b0]
test r14, r14
je 0x140043a3c
mov rax, qword [r14]
mov rbx, qword [rax + 0x10]
mov rcx, rbx
call qword [0x14014cce0]
mov rcx, r14
call rbx
mov rcx, qword [0x1401782b0]
cmp byte [rsp + 0x31], 0
je 0x140043a54
lea rcx, [rsp + 0x70]
call fcn.140097a9c
mov rcx, qword [0x1401782b0]
test esi, esi
jns 0x140043a88
cmp rcx, r12
je 0x140043aae
test byte [rcx + 0x1c], 1
je 0x140043a88
cmp byte [rcx + 0x19], 2
jb 0x140043a88
mov rcx, qword [rcx + 0x10]
lea r8, [0x140152588]
mov edx, pe_nt_image_headers64
mov r9d, esi
call fcn.140004c90
mov rcx, qword [0x1401782b0]
cmp rcx, r12
je 0x140043aae
test byte [rcx + 0x1c], 1
je 0x140043aae
cmp byte [rcx + 0x19], 4
jb 0x140043aae
mov rcx, qword [rcx + 0x10]
lea r8, [0x140152588]
mov edx, 0xf9
call fcn.140004c6c
test r13b, r13b
je 0x140043ac0
lea rcx, [0x140179190]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
mov rcx, qword [rbp + 0x40]
xor rcx, rsp
call fcn.1401474d0
add rsp, 0x158
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret