Function at 0x180042d20
Capabilities:
Resume thread

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x70
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov r12, rcx
cmp byte [rcx + 8], 0
je 0x180042d48
mov al, 1
jmp 0x180043106
xor r13d, r13d
mov rbp, r13
lea rbx, [rcx + 0x50]
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x180042e29
mov rax, qword [rbx + 0x10]
sub rax, rcx
sar rax, 3
cmp rbp, rax
jae 0x180042e29
test rcx, rcx
je 0x180042d88
mov rax, qword [rbx + 0x10]
sub rax, rcx
sar rax, 3
cmp rbp, rax
jb 0x180042d8d
call fcn.1800a2200
mov rax, qword [rbx + 8]
mov rdi, qword [rax + rbp*8]
test rdi, rdi
je 0x180042e20
mov rax, qword [rdi]
test rax, rax
je 0x180042de5
mov rcx, qword [rax + 0x18]
cmp rcx, 0xffffffffffffffff
je 0x180042de5
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x180042de5
mov rsi, qword [rdi]
test rsi, rsi
je 0x180042de5
mov rcx, qword [rsi + 0x18]
cmp rcx, 0xffffffffffffffff
je 0x180042ddd
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x18], 0xffffffffffffffff
mov byte [rsi + 0x10], r13b
mov dword [rsi + 0x14], r13d
mov rsi, qword [rdi]
test rsi, rsi
je 0x180042e18
mov rcx, qword [rsi + 0x18]
cmp rcx, 0xffffffffffffffff
je 0x180042e05
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x18], 0xffffffffffffffff
mov byte [rsi + 0x10], r13b
mov dword [rsi + 0x14], r13d
mov rcx, qword [rdi]
call fcn.1800a2030
mov qword [rdi], r13
mov rcx, rdi
call fcn.1800a2030
add rbp, 1
jmp 0x180042d52
mov rsi, qword [rbx + 0x10]
cmp rcx, rsi
jbe 0x180042e37
call fcn.1800a2200
mov rdi, qword [rbx + 8]
cmp rdi, qword [rbx + 0x10]
jbe 0x180042e46
call fcn.1800a2200
cmp rdi, rsi
je 0x180042e82
mov rax, qword [rbx + 0x10]
xor ecx, ecx
mov byte [rsp + 0xb0], cl
sub rax, rsi
sar rax, 3
lea rdx, [rax*8]
lea rbp, [rdx + rdi]
test rax, rax
jle 0x180042e7e
mov r9, rdx
mov r8, rsi
mov rcx, rdi
call fcn.1800a1d10
mov qword [rbx + 0x10], rbp
mov qword [r12 + 0x48], r13
mov rcx, qword [r12 + 0x10]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
jne 0x180042e9c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, r13d
cmp dword [r12 + 0x70], r13d
jbe 0x1800430c1
lea r14, [0x1800432f0]
mov ecx, 8
call fcn.1800a2300
mov rdi, rax
mov qword [rsp + 0x40], rax
test rax, rax
je 0x180042f0b
mov ecx, 0x28
call fcn.1800a2300
test rax, rax
je 0x180042ef4
mov qword [rax], r13
mov qword [rax + 8], r13
mov qword [rax + 0x18], 0xffffffffffffffff
mov byte [rax + 0x10], 0
mov dword [rax + 0x20], r13d
mov dword [rax + 0x14], r13d
jmp 0x180042ef7
mov rax, r13
mov qword [rdi], rax
test rax, rax
je 0x180042f0e
mov qword [rax], r12
mov rax, qword [rdi]
mov qword [rax + 8], r14
jmp 0x180042f0e
mov rdi, r13
mov qword [rsp + 0x30], rdi
mov r9, qword [rdi]
test r9, r9
je 0x1800430b3
cmp qword [r9 + 8], 0
je 0x1800430b3
lea rax, [r9 + 0x14]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 4
lea r8, [0x1800063b0]
xor edx, edx
xor ecx, ecx
call fcn.1800a4c20
mov rcx, qword [rdi]
mov qword [rcx + 0x18], rax
mov rax, qword [rdi]
cmp qword [rax + 0x18], 0
jne 0x180042f8c
mov qword [rax + 0x18], 0xffffffffffffffff
mov rdi, qword [rdi]
mov rcx, qword [rdi + 0x18]
cmp rcx, 0xffffffffffffffff
je 0x180042f7f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x18], 0xffffffffffffffff
mov byte [rdi + 0x10], 0
mov dword [rdi + 0x14], r13d
jmp 0x1800430b3
mov byte [rax + 0x10], 1
mov rcx, qword [rdi]
mov rcx, qword [rcx + 0x18]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x180042fcc
mov rsi, qword [rdi]
mov rcx, qword [rsi + 0x18]
cmp rcx, 0xffffffffffffffff
je 0x180042fbd
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x18], 0xffffffffffffffff
mov byte [rsi + 0x10], 0
mov dword [rsi + 0x14], r13d
mov rax, qword [rdi]
mov byte [rax + 0x10], 0
mov rcx, qword [rbx + 8]
test rcx, rcx
jne 0x180042fda
mov rdx, r13
jmp 0x180042fe5
mov rdx, qword [rbx + 0x10]
sub rdx, rcx
sar rdx, 3
test rcx, rcx
je 0x180043025
mov rax, qword [rbx + 0x18]
sub rax, rcx
sar rax, 3
cmp rdx, rax
jae 0x180043025
mov rax, qword [rbx + 0x10]
xor ecx, ecx
mov byte [rsp + 0xb8], cl
mov byte [rsp + 0xc0], cl
mov byte [rsp + 0xc8], cl
mov qword [rax], rdi
add rax, 8
mov qword [rbx + 0x10], rax
jmp 0x1800430b3
mov rdi, qword [rbx + 0x10]
cmp rcx, rdi
jbe 0x180043033
call fcn.1800a2200
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rdi
mov rsi, qword [rbx + 8]
test rsi, rsi
je 0x180043069
mov rcx, qword [rbx + 0x10]
mov rax, rcx
sub rax, rsi
sar rax, 3
je 0x180043069
cmp rsi, rcx
jbe 0x180043060
call fcn.1800a2200
sub rdi, rsi
sar rdi, 3
jmp 0x18004306c
mov rdi, r13
movaps xmm0, xmmword [rsp + 0x50]
movdqa xmmword [rsp + 0x60], xmm0
lea r9, [rsp + 0x30]
mov r8d, 1
lea rdx, [rsp + 0x60]
mov rcx, rbx
call fcn.180045c30
mov rsi, qword [rbx + 8]
cmp rsi, qword [rbx + 0x10]
jbe 0x18004309e
call fcn.1800a2200
lea rax, [rsi + rdi*8]
cmp rax, qword [rbx + 0x10]
ja 0x1800430ae
cmp rax, qword [rbx + 8]
jae 0x1800430b3
call fcn.1800a2200
add ebp, 1
cmp ebp, dword [r12 + 0x70]
jb 0x180042eb1
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x180043104
mov rax, qword [rbx + 0x10]
sub rax, rcx
sar rax, 3
je 0x180043104
test rcx, rcx
je 0x1800430e9
mov rax, qword [rbx + 0x10]
sub rax, rcx
sar rax, 3
jne 0x1800430ee
call fcn.1800a2200
mov rax, qword [rbx + 8]
mov rcx, qword [rax]
mov qword [r12 + 0x48], rcx
mov byte [r12 + 8], 1
mov al, 1
jmp 0x180043106
xor al, al
add rsp, 0x70
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret