Function at 0x140059d64
Capabilities:
Create thread

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x48]
sub rsp, 0x148
mov rax, qword [0x14017d140]
xor rax, rsp
mov qword [rbp + 0x30], rax
mov r12, qword [rbp + 0xb0]
xor edi, edi
xor r15b, r15b
and qword [rsp + 0x40], rdi
and qword [rsp + 0x38], rdi
mov r13, r9
mov r14, r8
mov rbx, rdx
mov rsi, rcx
mov byte [rsp + 0x31], r15b
mov qword [rsp + 0x48], rdi
mov rcx, qword [0x14017d3a8]
lea rax, [0x14017d3a8]
cmp rcx, rax
je 0x140059df2
test byte [rcx + 0x1c], 1
je 0x140059df2
cmp byte [rcx + 0x19], 4
jb 0x140059df2
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400068c8]
mov edx, 0xf3
call fcn.14001dd24
mov rcx, qword [0x14017d3a8]
test r12, r12
jne 0x140059e01
mov ebx, 0x80004003
jmp 0x14005a0de
and qword [r12], rdi
lea rcx, [0x14017e4d8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r15b, 1
mov byte [rsp + 0x30], r15b
cmp qword [rsi + 0x10], rdi
jne 0x140059e2a
mov ebx, 0x8078000a
jmp 0x14005a0d7
test r14, r14
cmove r14, qword [rsi + 0x10]
cmp byte [rsi + 0x18], dil
je 0x140059e88
mov rcx, qword [0x14017d3a8]
lea r12, [0x14017d3a8]
cmp rcx, r12
je 0x140059e7e
test byte [rcx + 0x1c], 1
je 0x140059e7e
cmp byte [rcx + 0x19], 2
jb 0x140059e7e
mov eax, dword [rsi + 8]
mov r9d, dword [rsi + 0x38]
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400068c8]
mov edx, 0xf4
mov dword [rsp + 0x20], eax
call fcn.1400285b4
mov rcx, qword [0x14017d3a8]
mov ebx, 0x80780017
jmp 0x14005a0e5
lea rcx, [rsp + 0x60]
xor edx, edx
mov r8d, 0xd0
call sub.msvcrt.dll_memset
mov rax, qword [r14]
lea r8, [rsp + 0x60]
movups xmm5, xmmword [rbx]
lea rdx, [rsp + 0x50]
mov r9b, 1
mov rcx, r14
movdqu xmmword [rsp + 0x50], xmm5
call qword [rax + 0x58]
mov ebx, eax
test eax, eax
js 0x14005a0d7
lea rcx, [rsp + 0x48]
mov byte [rsp + 0x31], 1
call fcn.140066b38
mov ebx, eax
test eax, eax
jns 0x140059f2a
mov rcx, qword [0x14017d3a8]
lea r12, [0x14017d3a8]
cmp rcx, r12
je 0x140059f20
test byte [rcx + 0x1c], 1
je 0x140059f20
cmp byte [rcx + 0x19], 2
jb 0x140059f20
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400068c8]
mov edx, 0xf5
mov r9d, eax
call fcn.14001de24
mov rdi, qword [rsp + 0x48]
mov rcx, qword [0x14017d3a8]
jmp 0x14005a0e5
mov rdi, qword [rsp + 0x48]
jmp 0x14005a0e5
mov rdi, qword [rsp + 0x48]
mov rcx, rdi
mov rax, qword [rdi]
call qword [rax + reloc.ole32.dll_CoTaskMemAlloc]
lea r15, [rdi + 8]
mov rdx, r14
mov rcx, r15
call fcn.14001eb1c
mov rdx, r13
mov rcx, r15
call fcn.14001e718
xor r13d, r13d
mov ebx, eax
test eax, eax
js 0x14005a0d2
mov rax, qword [rdi]
lea r8, [rsp + 0x40]
lea rdx, [0x140002f10]
mov rcx, rdi
call qword [rax]
mov ebx, eax
test eax, eax
jns 0x140059fc1
mov rcx, qword [0x14017d3a8]
lea r12, [0x14017d3a8]
cmp rcx, r12
je 0x140059fb7
test byte [rcx + 0x1c], 1
je 0x140059fb7
cmp byte [rcx + 0x19], 2
jb 0x140059fb7
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400068c8]
mov edx, 0xf6
mov r9d, eax
call fcn.14001de24
mov rcx, qword [0x14017d3a8]
mov r15b, byte [rsp + 0x30]
jmp 0x14005a0e5
lea r8, [rsp + 0x60]
mov rdx, rsi
mov rcx, rdi
call fcn.140072a38
mov ebx, eax
test eax, eax
js 0x14005a0d2
lea r8, [0x140073c7c]
mov r9, rdi
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], r13
mov dword [rsp + 0x20], r13d
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov r14, rax
test rax, rax
jne 0x14005a05f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, qword [0x14017d3a8]
lea r12, [0x14017d3a8]
cmp rcx, r12
je 0x14005a047
test byte [rcx + 0x1c], 1
je 0x14005a047
cmp byte [rcx + 0x19], 2
jb 0x14005a047
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400068c8]
mov edx, 0xf7
mov r9d, eax
call fcn.14001de24
mov rcx, qword [0x14017d3a8]
mov r15b, byte [rsp + 0x30]
movzx ebx, si
or ebx, 0x80070000
test esi, esi
cmovle ebx, esi
jmp 0x14005a0ea
mov byte [rsi + 0x18], 1
cmp qword [rsi + 0x28], r13
jne 0x14005a06f
cmp qword [rsi + 0x30], r13
je 0x14005a087
lea r8, [0x140005878]
lea rcx, [0x140005730]
mov edx, 0x13cb
call fcn.1400a8be8
mov rcx, qword [rsp + 0x40]
mov qword [rsi + 0x28], r15
mov rdi, r13
mov qword [rsi + 0x30], rcx
mov rax, qword [rcx]
call qword [rax + reloc.ole32.dll_CoTaskMemAlloc]
mov rax, qword [rsp + 0x40]
mov dword [rsi + 0x38], 3
lea rcx, [0x14017e4d8]
mov qword [r12], rax
mov qword [rsp + 0x40], r13
mov r15b, r13b
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [0x14017d3a8]
lea r12, [0x14017d3a8]
jmp 0x14005a0ea
mov r15b, byte [rsp + 0x30]
mov rcx, qword [0x14017d3a8]
lea r12, [0x14017d3a8]
mov r14, qword [rsp + 0x38]
mov rdx, qword [rsp + 0x40]
test rdx, rdx
je 0x14005a104
mov rax, qword [rdx]
mov rcx, rdx
call qword [rax + CoRevokeClassObject]
mov rcx, qword [0x14017d3a8]
test r14, r14
je 0x14005a119
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x14017d3a8]
test rdi, rdi
je 0x14005a12e
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + CoRevokeClassObject]
mov rcx, qword [0x14017d3a8]
cmp byte [rsp + 0x31], 0
je 0x14005a146
lea rcx, [rsp + 0x60]
call fcn.1400ba630
mov rcx, qword [0x14017d3a8]
test ebx, ebx
jns 0x14005a17a
cmp rcx, r12
je 0x14005a1a0
test byte [rcx + 0x1c], 1
je 0x14005a17a
cmp byte [rcx + 0x19], 2
jb 0x14005a17a
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400068c8]
mov edx, 0xf8
mov r9d, ebx
call fcn.14001de24
mov rcx, qword [0x14017d3a8]
cmp rcx, r12
je 0x14005a1a0
test byte [rcx + 0x1c], 1
je 0x14005a1a0
cmp byte [rcx + 0x19], 4
jb 0x14005a1a0
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400068c8]
mov edx, 0xf9
call fcn.14001dd24
test r15b, r15b
je 0x14005a1b2
lea rcx, [0x14017e4d8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
mov rcx, qword [rbp + 0x30]
xor rcx, rsp
call fcn.140168920
add rsp, 0x148
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret