Function at 0x14017e320
Capabilities:
Resolve function by parsing pe exports

Disassembly:
endbr64
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
mov rdi, qword [0x140485900]
lea rsi, [rcx + 0x48]
lea r13, [rcx + 0x30]
mov rbx, rcx
mov r12, rdx
mov rax, qword [rdi]
mov qword [rsp + 0x88], rax
xor eax, eax
mov rcx, r13
mov rdx, rsi
call method.void_boost::detail::lock_impl_boost::recursive_mutex__boost.mutex__boost::recursive_mutex__boost::mutex__boost::detail::is_mutex_type_wrapper_true____clone_.isra.0_
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x88]
mov rax, qword [rbx + 0x2b0]
cmp rax, qword [rbx + 0x2b8]
je 0x14017e383
mov qword [rbx + 0x2b8], rax
mov rax, qword [rbx + 0x2c8]
cmp rax, qword [rbx + 0x2d0]
je 0x14017e39a
mov qword [rbx + 0x2d0], rax
mov byte [rbx + 0x2a8], 1
mov rcx, rbx
mov r8d, 0xffff
call method.hw::ledger::device_ledger.reset_buffer__
xor eax, eax
mov edx, 0x9000
mov rcx, rbx
mov word [rbx + 0x94], ax
mov rax, qword [0x1403b1b78]
mov dword [rbx + 0x88], 0xa
mov qword [rbx + 0x8c], rax
call method.hw::ledger::device_ledger.exchange_unsigned_int__unsigned_int_
lea rbp, [rsp + 0x2c]
mov rdx, r12
mov rcx, rbx
mov dword [rsp + 0x2c], 0x20
mov r8, rbp
call method.hw::ledger::device_ledger.receive_secret_unsigned_char__int_
lea r12, [rsp + 0x60]
mov r8, rbp
mov rcx, rbx
mov rdx, r12
call method.hw::ledger::device_ledger.receive_secret_unsigned_char__int_
mov r8, rbp
mov rdx, r12
mov rcx, rbx
call method.hw::ledger::device_ledger.receive_secret_unsigned_char__int_
mov eax, 0x80000000
lock xadd dword [rsi], eax
test eax, 0x40000000
jne 0x14017e430
cmp eax, 0x80000000
jne 0x14017e468
mov eax, dword [rbx + 0x30]
sub eax, 1
mov dword [rbx + 0x30], eax
je 0x14017e4b0
mov rax, qword [rsp + 0x88]
sub rax, qword [rdi]
jne 0x14017e51d
mov eax, 1
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov edx, dword [rbx + 0x48]
nop dword [rax + rax]
mov ecx, edx
mov eax, edx
or ecx, 0x40000000
lock cmpxchg dword [rsi], ecx
mov ecx, edx
mov edx, eax
cmp ecx, eax
jne 0x14017e470
and edx, 0x40000000
jne 0x14017e430
mov rsi, qword [rbx + 0x50]
lea rbp, [rbx + 0x50]
test rsi, rsi
je 0x14017e4c8
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x14017e430
xchg dword [rbx + 0x34], eax
lea rcx, [rbx + 0x38]
call method.boost::detail::basic_timed_mutex.unlock__
jmp 0x14017e43b
xor ecx, ecx
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rcx, rax
test rax, rax
je 0x14017e522
mov rax, rsi
lock cmpxchg qword [rbp], rcx
mov rsi, rax
test rax, rax
je 0x14017e49e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14017e49b
call dbg.__stack_chk_fail
lea rbx, [rsp + 0x30]
lea r8, [0x1403b051a]
mov edx, 0xb
mov rcx, rbx
call method.boost::thread_exception.thread_exception_int__char_const_
lea rax, method.boost::thread_resource_error.thread_resource_error__
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x88]
sub rax, qword [rdi]
jne 0x14017e51d
mov rcx, rbx
call method.void_boost::throw_exception_boost.thread_resource_error__boost::thread_resource_error_const_
endbr64
lea rax, method.boost::system::system_error.system_error__
mov rcx, rbx
mov qword [rsp + 0x30], rax
call sym.std::runtime_error::runtime_error__
call sym.std::terminate__
mov rcx, rbx
call sym._Unwind_Resume
nop
nop word cs:[rax + rax]
nop dword [rax]