Function at 0x140098b60
Capabilities:
Terminate thread

Disassembly:
push rbx
sub rsp, 0x30
mov rax, qword [0x140164030]
xor rax, rsp
mov qword [rsp + 0x28], rax
cmp byte [rcx + 1], 1
mov rbx, rcx
jne 0x140098f57
mov byte [rcx + 1], 0
lea rcx, str._Aws_WiFiDirectHandler__Stop_Begin_n
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x58], rdi
call fcn.140095ab0
mov rcx, qword [rbx + 0x18]
cmp rcx, 0xffffffffffffffff
je 0x140098bc3
mov edx, 0xffffffff
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rbx + 0x18], 0xffffffffffffffff
mov rdi, qword [rbx + 0x148]
xor ebp, ebp
test rdi, rdi
je 0x140098d4e
cmp byte [rdi + 0x38], bpl
je 0x140098bdf
mov byte [rdi + 0x38], bpl
mov rcx, qword [rdi + 0x30]
cmp rcx, 0xffffffffffffffff
je 0x140098bef
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
mov rdi, qword [rdi + 0x18]
test rdi, rdi
je 0x140098c28
cmp byte [rdi], bpl
je 0x140098c00
mov byte [rdi], bpl
mov rcx, qword [rdi + 0x10]
cmp rcx, 0xffffffffffffffff
je 0x140098c10
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
mov rcx, qword [rdi + 8]
cmp rcx, 0xffffffffffffffff
je 0x140098c28
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rdi + 8], 0xffffffffffffffff
mov rdi, qword [rbx + 0x148]
test rdi, rdi
je 0x140098d47
mov qword [rsp + 0x50], rsi
cmp byte [rdi + 0x38], bpl
je 0x140098c47
mov byte [rdi + 0x38], bpl
mov rcx, qword [rdi + 0x30]
cmp rcx, 0xffffffffffffffff
je 0x140098c57
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
mov rsi, qword [rdi + 0x18]
test rsi, rsi
je 0x140098c90
cmp byte [rsi], bpl
je 0x140098c68
mov byte [rsi], bpl
mov rcx, qword [rsi + 0x10]
cmp rcx, 0xffffffffffffffff
je 0x140098c78
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
mov rcx, qword [rsi + 8]
cmp rcx, 0xffffffffffffffff
je 0x140098c90
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rsi + 8], 0xffffffffffffffff
mov rcx, qword [rdi]
mov rsi, qword [rsp + 0x50]
cmp rcx, 0xffffffffffffffff
je 0x140098cb9
mov edx, 0xffffffff
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
mov rcx, qword [rdi]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rdi], 0xffffffffffffffff
mov rcx, qword [rdi + 8]
cmp rcx, 0xffffffffffffffff
je 0x140098ce0
mov edx, 0xffffffff
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
mov rcx, qword [rdi + 8]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rdi + 8], 0xffffffffffffffff
mov rcx, qword [rdi + 0x10]
cmp rcx, 0xffffffffffffffff
je 0x140098cf8
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rdi + 0x10], 0xffffffffffffffff
mov rcx, qword [rdi + 0x30]
cmp rcx, 0xffffffffffffffff
je 0x140098d10
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rdi + 0x30], 0xffffffffffffffff
mov rcx, qword [rdi + 0x28]
cmp rcx, 0xffffffffffffffff
je 0x140098d28
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rdi + 0x28], 0xffffffffffffffff
mov rcx, qword [rdi + 0x18]
test rcx, rcx
je 0x140098d3a
call fcn.14008ed20
mov qword [rdi + 0x18], rbp
mov edx, 0x48
mov rcx, rdi
call fcn.1400c2470
mov qword [rbx + 0x148], rbp
cmp byte [rbx + 0x1d5], bpl
je 0x140098d6a
cmp dword [rbx + 0x158], 1
jne 0x140098d6a
xor edx, edx
mov rcx, rbx
call fcn.140099200
mov rdi, qword [rbx + 0x140]
test rdi, rdi
je 0x140098e9a
cmp byte [rdi + 0x18], 1
jne 0x140098db8
mov rcx, qword [rdi + 8]
mov byte [rdi + 0x18], bpl
cmp rcx, 0xffffffffffffffff
je 0x140098d94
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
mov rcx, qword [rdi]
cmp rcx, 0xffffffffffffffff
je 0x140098db8
mov edx, 0xffffffff
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
mov rcx, qword [rdi]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rdi], 0xffffffffffffffff
mov rdi, qword [rbx + 0x140]
test rdi, rdi
je 0x140098e93
cmp byte [rdi + 0x18], 1
jne 0x140098e06
mov rcx, qword [rdi + 8]
mov byte [rdi + 0x18], bpl
cmp rcx, 0xffffffffffffffff
je 0x140098de2
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
mov rcx, qword [rdi]
cmp rcx, 0xffffffffffffffff
je 0x140098e06
mov edx, 0xffffffff
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
mov rcx, qword [rdi]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rdi], 0xffffffffffffffff
mov rcx, qword [rdi + 8]
cmp rcx, 0xffffffffffffffff
je 0x140098e1e
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rdi + 8], 0xffffffffffffffff
mov rcx, qword [rdi + 0x10]
cmp rcx, 0xffffffffffffffff
je 0x140098e36
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rdi + 0x10], 0xffffffffffffffff
mov rdx, qword [rdi + 0x40]
cmp rdx, 8
jb 0x140098e76
mov rcx, qword [rdi + 0x28]
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
jb 0x140098e71
mov r8, qword [rcx - 8]
add rdx, 0x27
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140098f6a
mov rcx, r8
call fcn.1400c2470
mov edx, 0x50
mov qword [rdi + 0x38], rbp
mov rcx, rdi
mov qword [rdi + 0x40], 7
mov word [rdi + 0x28], bp
call fcn.1400c2470
mov qword [rbx + 0x140], rbp
mov rcx, qword [rbx + 0x10]
cmp rcx, 0xffffffffffffffff
je 0x140098f41
mov rax, qword [rbx + 8]
cmp rax, 0xffffffffffffffff
je 0x140098ebf
mov rcx, rax
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_SetEvent]
mov rcx, qword [rbx + 0x10]
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], ebp
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetExitCodeThread]
test eax, eax
je 0x140098f1b
mov edx, dword [rsp + 0x20]
cmp edx, 0x103
jne 0x140098f12
mov rcx, qword [rbx + 0x10]
mov edx, 0x3e8
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x140098f2f
cmp byte [rbx + 0x20], bpl
jne 0x140098f2f
lea rcx, str._Aws_WiFiDirectHandler__WiFiDirectHandler___wait_thread_STILL_ACTIVE_terminate_it_n
call fcn.140095ab0
mov rcx, qword [rbx + 0x10]
xor edx, edx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TerminateThread]
jmp 0x140098f2f
lea rcx, str._Aws_WiFiDirectHandler__WiFiDirectHandler___wait_thread_code:_d_n
jmp 0x140098f2a
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str._Aws_WiFiDirectHandler__WiFiDirectHandler___wait_thread_fail_:_d_n
call fcn.140095ab0
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rbx + 0x10], 0xffffffffffffffff
lea rcx, str._Aws_WiFiDirectHandler__Stop_End_n
call fcn.140095ab0
mov rbp, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.1400c2450
add rsp, 0x30
pop rbx
ret
call fcn.1400c8b64
int3