Function at 0x100050f2c
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r14
sub rsp, 0x30
mov rsi, qword [0x100088818]
or r14, 0xffffffffffffffff
xor eax, eax
mov rdi, r8
mov rcx, r14
lea r12, [rsi + 0x70]
repne scasw ax, word [rdi]
xor ebx, ebx
mov rbp, r8
not rcx
mov qword [rsi + 0x18], rdx
mov qword [0x1000888e8], rdx
mov rdi, rcx
cmp dword [r12], ebx
jne 0x100050fe2
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rsi + 0x68], rax
cmp rax, rbx
je 0x100050fe2
lea r8, [0x10005073c]
mov r9, rsi
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], ebx
call qword [sym.imp.msvcrt.dll__beginthreadex]
mov qword [rsi + 0x10], rax
cmp rax, rbx
je 0x100050fcf
mov rcx, qword [rsi + 0x68]
mov edx, 0x32
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x100050fb9
mov rcx, qword [rsi + 0x68]
cmp rcx, rbx
je 0x100050fe2
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x68], rbx
mov rcx, qword [rsi + 0x58]
cmp rcx, rbx
je 0x100050ff4
call sub.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_
mov qword [rsi + 0x58], rbx
mov eax, 2
mul rdi
cmovo rax, r14
mov rcx, rax
call sub.msvcrt.dll_void____ptr64___cdecl_operator_new___unsigned_long_long_unsigned___int64__
mov qword [rsi + 0x58], rax
cmp rax, rbx
jne 0x10005101b
mov eax, 0x8007000e
jmp 0x10005120d
mov r8, rbp
mov rdx, rdi
mov rcx, rax
call fcn.100039df8
mov rdi, qword [rsi + 0x88]
cmp rdi, rbx
je 0x10005104c
mov rcx, rdi
call fcn.10006557c
mov rcx, rdi
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
mov qword [rsi + 0x88], rbx
mov ecx, 0x78
call sub.msvcrt.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
cmp rax, rbx
je 0x1000510a2
mov qword [rax], rbx
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rbx
mov qword [rax + 0x28], rbx
mov qword [rax + 0x30], rbx
mov qword [rax + 0x38], rbx
mov qword [rax + 0x40], rbx
mov dword [rax + 0x48], ebx
mov qword [rax + 0x50], rbx
mov qword [rax + 0x58], rbx
mov dword [rax + 0x60], ebx
mov dword [rax + 0x64], ebx
mov dword [rax + 0x68], 1
mov dword [rax + 0x6c], ebx
mov dword [rax + 0x70], 1
jmp 0x1000510a5
mov rax, rbx
mov qword [rsi + 0x88], rax
cmp rax, rbx
je 0x100051011
mov rdi, qword [rsi]
cmp rdi, rbx
je 0x1000510d0
mov rcx, rdi
call fcn.10005d488
mov rcx, rdi
call sub.msvcrt.dll_void___cdecl_operator_delete_void____ptr64_
mov qword [rsi], rbx
mov ecx, 0x2a8
call sub.msvcrt.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
cmp rax, rbx
je 0x1000510ee
mov edx, 1
mov rcx, rax
call fcn.10005d3a0
jmp 0x1000510f1
mov rax, rbx
mov qword [rsi], rax
cmp rax, rbx
je 0x100051011
mov rcx, qword [rsi + 8]
cmp rcx, rbx
je 0x100051114
mov edx, 1
call fcn.10004fcc4
mov qword [rsi + 8], rbx
mov ecx, 0x68
call sub.msvcrt.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov rdi, rax
cmp rax, rbx
je 0x100051171
lea rcx, [0x1000291f0]
mov dword [rax], ebx
mov dword [rax + 4], 1
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rbx
mov qword [rax + 0x28], rbx
mov qword [rax + 0x30], rbx
mov qword [rax + 0x38], rbx
mov qword [rax + 0x40], rbx
mov dword [rax + 0x48], ebx
mov qword [rax + 0x50], rbx
mov qword [rax + 0x58], rbx
mov qword [rax + 0x60], rbx
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [rdi + 0x50], rax
jmp 0x100051174
mov rdi, rbx
mov qword [rsi + 8], rdi
cmp rdi, rbx
je 0x100051011
mov rcx, qword [rsi]
mov rax, qword [rsi + 0x18]
xor r9d, r9d
mov qword [rcx + 0x288], rax
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov rdi, rax
cmp rax, rbx
jne 0x1000511c9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x57
cmp eax, ebx
cmove eax, ecx
movzx ecx, ax
or ecx, 0x80070000
cmp eax, ebx
cmovle ecx, eax
mov ebx, ecx
jmp 0x10005120b
mov ecx, dword [r12]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x5cc
call qword [sym.imp.USER32.dll_PostThreadMessageW]
cmp eax, ebx
jne 0x100051202
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x57
cmp eax, ebx
cmove eax, ecx
movzx ecx, ax
or ecx, 0x80070000
cmp eax, ebx
cmovle ecx, eax
mov ebx, ecx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x30
pop r14
pop r12
pop rdi
ret