Function at 0x140029dd0
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
sub rsp, 0x40
cmp byte [0x140119a60], 0
mov edi, dword [0x140119a5c]
mov rsi, rdx
mov rbx, rcx
je 0x140029e00
cmp edi, 0x1388
jne 0x140029e00
lea edi, [rdi*4]
mov byte [0x140119a60], 0
mov rcx, qword [rcx + 0x28]
xor ebp, ebp
test rcx, rcx
je 0x140029e8a
lea rdx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x140029e39
cmp dword [rsp + 0x60], 0x103
jne 0x140029e39
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x140029e47
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x28], rbp
cmp qword [rbx + 0x28], rbp
jne 0x140029f1c
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x140029e64
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x10], rbp
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x140029e77
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x18], rbp
mov rcx, qword [rbx + 0x20]
test rcx, rcx
je 0x140029e8a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x20], rbp
cmp qword [rbx + 0x28], rbp
jne 0x140029f1c
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbx + 0x10], rax
test rax, rax
jne 0x140029ebf
mov eax, 0x80004005
mov rbx, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbx + 0x18], rax
test rax, rax
je 0x140029ead
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbx + 0x20], rax
test rax, rax
je 0x140029ead
lea rax, [rsp + 0x70]
lea r8, [0x14002c070]
mov r9, rbx
mov qword [rsp + 0x28], rax
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], ebp
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbx + 0x28], rax
test rax, rax
je 0x140029ead
mov rax, qword [rbx + 0x28]
xor r8d, r8d
lea rdx, [rsp + 0x30]
mov qword [rsp + 0x30], rax
mov rax, qword [rbx + 0x10]
lea ecx, [r8 + 2]
or r9d, 0xffffffff
mov qword [rsp + 0x38], rax
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x140029f62
mov eax, dword [rbx + 0xc]
mov ecx, 0x80004005
test eax, eax
cmovns eax, ecx
mov rbx, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret
cmp eax, 1
jne 0x140029ead
mov rax, qword [rbx + 0x18]
xor r8d, r8d
lea rdx, [rsp + 0x30]
lea ecx, [r8 + 2]
mov r9d, edi
mov qword [rsp + 0x38], rax
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 1
je 0x140029fc4
cmp eax, 0xffffffff
jne 0x140029fb2
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x140029fe3
movzx eax, ax
or eax, 0x80070000
mov rbx, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret
mov eax, 0x80070102
mov rbx, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret
mov rcx, qword [rbx + 0x30]
lea rdx, [0x1400d9400]
mov r8, rsi
call qword [sym.imp.ole32.dll_CoGetInterfaceAndReleaseStream]
mov dword [rbx + 0xc], eax
test eax, eax
js 0x140029fe3
mov qword [rbx + 0x30], rbp
mov rbx, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret