Function at 0x671480
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x258
mov dword [rsp + 0x30], ecx
mov qword [rsp + 0x38], rdx
call fcn.0058cf00
mov rax, qword [0x006d1040]
mov rsi, qword [rax]
mov qword [rsp + 0x248], rsi
xor esi, esi
call fcn.004319a0
call fcn.00431a20
test al, al
je 0x672106
lea r13, [rsp + 0x80]
lea rdx, [0x0068319f]
mov rcx, r13
call fcn.00401960
lea rbp, [rsp + 0xc0]
lea rdx, str.Usage:
mov rcx, rbp
call fcn.0059e9c0
lea rcx, [0x006828b0]
call fcn.006175e0
lea r9, [0x006828b0]
mov qword [rsp + 0x20], rax
xor r8d, r8d
xor edx, edx
mov rcx, rbp
call fcn.00640650
lea r12, [rsp + 0xe0]
lea rdx, [r12 + 0x10]
mov qword [rsp + 0xe0], rdx
mov rcx, qword [rax]
lea rdx, [rax + 0x10]
cmp rcx, rdx
je 0x671ae8
mov qword [rsp + 0xe0], rcx
mov rcx, qword [rax + 0x10]
mov qword [rsp + 0xf0], rcx
mov rcx, qword [rax + 8]
lea rsi, [rsp + 0x100]
lea r8, [0x006828b0]
mov byte [rax + 0x10], 0
mov qword [rsp + 0xe8], rcx
mov qword [rax], rdx
mov rcx, rsi
mov qword [rax + 8], 0
mov rdx, r12
call fcn.00663a40
lea r15, [rsp + 0x140]
lea r8, [0x006831b4]
mov rdx, rsi
mov rcx, r15
call fcn.00663a40
mov r8, qword [rsp + 0x88]
mov rdx, qword [rsp + 0x80]
mov rcx, r15
call fcn.006426e0
lea r14, [rsp + 0x180]
lea rdx, [r14 + 0x10]
mov qword [rsp + 0x180], rdx
mov rcx, qword [rax]
lea rdx, [rax + 0x10]
cmp rcx, rdx
je 0x671acb
mov qword [rsp + 0x180], rcx
mov rcx, qword [rax + 0x10]
mov qword [rsp + 0x190], rcx
mov rcx, qword [rax + 8]
lea rbx, [rsp + 0x1c0]
lea r8, str.__options_
mov qword [rsp + 0x188], rcx
mov qword [rax], rdx
mov rcx, rbx
mov qword [rax + 8], 0
mov byte [rax + 0x10], 0
mov rdx, r14
call fcn.00663a40
lea rdi, [rsp + 0xa0]
lea r8, [0x006828b0]
mov rdx, rbx
mov rcx, rdi
call fcn.00663a40
mov rcx, qword [rsp + 0x1c0]
lea rax, [rbx + 0x10]
cmp rcx, rax
je 0x671657
call fcn.00670500
mov rcx, qword [rsp + 0x180]
lea rax, [r14 + 0x10]
cmp rcx, rax
je 0x67166d
call fcn.00670500
mov rcx, qword [rsp + 0x140]
lea rax, [r15 + 0x10]
cmp rcx, rax
je 0x671683
call fcn.00670500
mov rcx, qword [rsp + 0x100]
lea rax, [rsi + 0x10]
cmp rcx, rax
je 0x671699
call fcn.00670500
mov rcx, qword [rsp + 0xe0]
add r12, 0x10
cmp rcx, r12
je 0x6716af
call fcn.00670500
mov rcx, qword [rsp + 0xc0]
add rbp, 0x10
cmp rcx, rbp
je 0x6716c5
call fcn.00670500
xor edx, edx
mov rcx, rbx
call fcn.005a7a10
mov r9, qword [rsp + 0x38]
mov r8d, dword [rsp + 0x30]
mov rdx, rbx
mov rcx, rdi
call fcn.00407af0
mov ebp, eax
mov rcx, rbx
add rdi, 0x10
call fcn.005a7430
cmp ebp, 0xffffffff
mov rcx, qword [rsp + 0xa0]
je 0x67174d
cmp rcx, rdi
je 0x671709
call fcn.00670500
mov rcx, qword [rsp + 0x80]
add r13, 0x10
cmp rcx, r13
je 0x67171f
call fcn.00670500
mov rsi, qword [0x006d1040]
mov eax, ebp
mov rbx, qword [rsp + 0x248]
xor rbx, qword [rsi]
jne 0x672131
add rsp, 0x258
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp rcx, rdi
je 0x671757
call fcn.00670500
mov rcx, qword [rsp + 0x80]
add r13, 0x10
cmp rcx, r13
je 0x67176d
call fcn.00670500
lea rdx, str._cpus
mov rcx, rbx
call fcn.00401960
mov edx, 1
mov rcx, rbx
call fcn.00432f30
mov rcx, qword [rsp + 0x1c0]
mov rbp, rax
lea rax, [rbx + 0x10]
cmp rcx, rax
je 0x6717a2
call fcn.00670500
mov qword [rsp + 0x110], 0
mov qword [rsp + 0x100], rsi
xor r9d, r9d
mov qword [rsp + 0x108], rsi
mov r8d, 0x7fffffff
xor edx, edx
xor ecx, ecx
mov rdi, qword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
call rdi
test rax, rax
je 0x672178
mov qword [rsp + 0x120], rax
xor r9d, r9d
mov r8d, 0x7fffffff
xor edx, edx
xor ecx, ecx
call rdi
test rax, rax
mov qword [rsp + 0x128], rax
je 0x6721e0
xor r9d, r9d
mov r8d, 0x7fffffff
xor edx, edx
xor ecx, ecx
call rdi
test rax, rax
mov qword [rsp + 0x130], rax
je 0x67225a
cmp ebp, 1
mov dword [rsp + 0x118], 0
jle 0x671ab7
lea eax, [rbp - 1]
mov rbp, qword [sym.imp.KERNEL32.dll_WaitForMultipleObjectsEx]
xor r13d, r13d
mov dword [rsp + 0x30], eax
mov rax, qword [0x006d09c0]
add rax, 0x10
mov qword [rsp + 0x38], rax
lea rdi, [rsi + 0x20]
nop
mov eax, dword [rsp + 0x118]
jmp 0x6718e9
add ecx, 1
movzx r8d, byte [rsp + 0x46]
and edx, 0x80ffffff
and ecx, 0x7f
mov r9d, ecx
shl r9d, 0x18
shr r8b, 6
or r9d, edx
and r8d, 1
mov edx, r9d
and r9d, 0x7f000000
je 0x671b05
mov r9d, 1
and r8d, 1
and edx, 0x80bfffff
and ecx, 0x7f
shl r8d, 0x16
shl ecx, 0x18
movzx r9d, r9b
or edx, r8d
shl r9d, 0x1f
or edx, ecx
and edx, 0x7fffffff
or edx, r9d
lock cmpxchg dword [rsp + 0x118], edx
mov edx, dword [rsp + 0x44]
mov dword [rsp + 0x50], eax
cmp edx, eax
je 0x671920
mov dword [rsp + 0x44], eax
movzx r9d, byte [rsp + 0x47]
mov edx, dword [rsp + 0x44]
mov ecx, r9d
mov eax, edx
and ecx, 0x7f
test edx, 0x4007ff
jne 0x671870
shr r9b, 7
mov r8d, 1
movzx ecx, cl
jmp 0x6718aa
and edx, 0x4007ff
je 0x67196d
mov dword [rsp + 0x20], 0
mov r9d, 0xffffffff
mov r8d, 1
mov rdx, rdi
mov ecx, 2
call rbp
cmp eax, 1
jbe 0x671860
lea rdx, str._home_ubuntu_build_bitcoin_depends_x86_64_w64_mingw32_share_.._include_boost_thread_win32_shared_mutex.hpp
lea rcx, str.winapi::WaitForMultipleObjectsEx_2_semaphores_wait_all_::boost::detail::win32::infinite_0__2
mov r8d, 0x1c7
call fcn.00590060
jmp 0x671860
mov ecx, 8
call fcn.00670540
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, 0xa0
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
mov rdi, rax
je 0x671bbc
mov rax, qword [rsp + 0x38]
mov dword [rdi + 8], 0
xor r9d, r9d
mov qword [rdi + 0x10], 0
mov qword [rdi + 0x18], 0
xor r8d, r8d
mov dword [rdi + 0x20], 0
mov qword [rdi + 0x28], 0
mov edx, 1
mov qword [rdi], rax
lea rax, [rdi + 0x30]
mov qword [rdi + 0x30], 0
mov qword [rdi + 0x38], 0
mov qword [rdi + 0x50], 0
xor ecx, ecx
mov qword [rdi + 0x40], rax
mov qword [rdi + 0x48], rax
mov qword [rdi + 0x58], 0
mov qword [rdi + 0x60], 0
mov qword [rdi + 0x68], 0
mov qword [rdi + 0x70], 0
mov qword [rdi + 0x78], 0
mov qword [rdi + 0x80], 0
call qword [sym.imp.KERNEL32.dll_CreateEventA]
test rax, rax
je 0x671d0e
mov qword [rdi + 0x88], rax
lea rax, [0x006dfcb0]
mov byte [rdi + 0x90], 1
mov qword [rdi], rax
lea rax, [0x004050c0]
mov qword [rdi + 0x98], rax
mov qword [r12], rdi
lock add dword [rdi + 8], 1
mov rcx, r12
call fcn.0048dfa0
test al, al
je 0x671daf
mov ecx, 0x18
call fcn.00670540
mov rcx, rax
mov qword [rax + 0x10], r12
mov rdx, rsi
call fcn.00659aa0
lea rcx, [rsi + 0x18]
add qword [rsp + 0x110], 1
add r13d, 1
call fcn.005aaf30
cmp r13d, dword [rsp + 0x30]
jne 0x67185a
call fcn.00401b90
mov ebp, eax
mov rcx, rsi
call fcn.005ab160
jmp 0x67171f
mov rcx, qword [rax + 0x10]
mov rbx, qword [rax + 0x18]
mov qword [rsp + 0x190], rcx
mov qword [rsp + 0x198], rbx
jmp 0x6715f2
mov rcx, qword [rax + 0x10]
mov rbx, qword [rax + 0x18]
mov qword [rsp + 0xf0], rcx
mov qword [rsp + 0xf8], rbx
jmp 0x671553
lea rdx, str.boost::lock_error
mov rcx, r15
call fcn.0062a170
lea rax, [0x006d1320]
mov rcx, r15
mov dword [rsp + 0x150], 0
mov byte [rsp + 0x154], 0
mov qword [rsp + 0x168], 0
mov qword [rsp + 0x158], rax
lea rax, [r15 + 0x30]
mov byte [rsp + 0x170], 0
mov qword [rsp + 0x160], rax
lea rax, [0x006dd460]
mov qword [rsp + 0x140], rax
call fcn.005aed30
mov rbx, rax
lea rax, [0x006dfb90]
mov rcx, r15
mov qword [rsp + 0x140], rax
call fcn.005b9d80
mov rcx, rsi
call fcn.005ab160
mov rcx, rbx
call fcn.0058e700
mov rbx, rax
jmp 0x671b87
lea rcx, [rsi + 0x18]
call fcn.005aaf30
jmp 0x671b87
mov edx, 8
mov rcx, r12
call fcn.00670510
jmp 0x671b9f
mov rax, qword [0x006d0ea0]
mov ecx, 0x38
lea rbp, [rsp + 0x50]
add rax, 0x10
mov qword [rsp + 0x48], rax
call fcn.00670680
mov rdi, rax
lea rax, fcn.005b6890
lea rdx, [rbp + 8]
lea rcx, [rdi + 8]
mov qword [rdi + 0x10], 0
mov qword [rdi + 0x18], 0
mov qword [rsp + 0x50], rax
add rax, 0x28
mov qword [rdi + 0x20], 0
mov qword [rsp + 0x58], rax
lea rax, [0x006d26c8]
mov dword [rdi + 0x28], 0xffffffff
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov qword [rdi], rax
lea rax, [0x006df4c0]
mov qword [rsp + 0x70], 0
mov dword [rsp + 0x78], 0xffffffff
mov qword [rdi + 8], rax
lea rax, [0x006d2718]
mov qword [rdi + 0x30], rax
call fcn.005b6950
lea rax, [0x006de018]
mov rcx, rbp
mov qword [rdi], rax
add rax, 0x38
mov qword [rdi + 8], rax
add rax, 0x38
mov qword [rdi + 0x30], rax
call fcn.005b6890
lea r8, [0x005aacb0]
lea rdx, [0x006d3520]
mov rcx, rdi
call fcn.00670ef0
mov rbx, rax
lea rcx, [rdi + 0x70]
call fcn.0063b9c0
mov rcx, qword [rdi + 0x58]
test rcx, rcx
je 0x671cb4
call fcn.00670500
mov rdx, qword [rdi + 0x38]
lea rcx, [rdi + 0x28]
call fcn.00658ee0
mov rcx, qword [rdi + 0x10]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x671ff9
mov rcx, rbx
call fcn.00670770
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
je 0x671fce
call fcn.00670ea0
mov rbx, rax
lea rcx, [rsp + 0x48]
call fcn.0065c6c0
jmp 0x671bad
lea rdx, [0x006831c9]
mov rcx, r14
call fcn.0062a170
lea rax, [0x006d1320]
mov rcx, r14
mov dword [rsp + 0x190], 0xb
mov byte [rsp + 0x194], 1
mov qword [rsp + 0x1a8], 0
mov qword [rsp + 0x198], rax
lea rax, [r14 + 0x30]
mov byte [rsp + 0x1b0], 0
mov qword [rsp + 0x1a0], rax
lea rax, [0x006dfbf0]
mov qword [rsp + 0x180], rax
call fcn.005b2080
mov rbx, rax
mov rcx, qword [r12]
test rcx, rcx
je 0x671bad
call fcn.005b8ff0
jmp 0x671bad
lea rdx, [0x006831c9]
mov rcx, rbx
call fcn.0062a170
lea rax, [0x006d1320]
mov rcx, rbx
mov dword [rsp + 0x1d0], 0xb
mov byte [rsp + 0x1d4], 1
mov qword [rsp + 0x1e8], 0
mov qword [rsp + 0x1d8], rax
lea rax, [rbx + 0x30]
mov byte [rsp + 0x1f0], 0
mov qword [rsp + 0x1e0], rax
lea rax, [0x006dfbf0]
mov qword [rsp + 0x1c0], rax
call fcn.005b2080
mov rcx, r12
mov rbx, rax
call fcn.0048e1b0
mov rdi, qword [r12]
test rdi, rdi
je 0x671bad
lock sub dword [rdi + 8], 1
jne 0x671bad
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor edx, edx
mov r8, rdi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
jne 0x671bad
lea rdx, str._home_ubuntu_build_bitcoin_depends_x86_64_w64_mingw32_share_.._include_boost_thread_win32_thread_heap_alloc.hpp
lea rcx, str.winapi::HeapFree_winapi::GetProcessHeap___0_heap_memory__0
mov r8d, 0x23
call fcn.00590060
jmp 0x671bad
call fcn.00670990
mov ebp, 1
jmp 0x67171f
mov rcx, rbx
call fcn.0058e700
call fcn.00670770
lea rdx, str.AppInitRPC__
xor ecx, ecx
call fcn.00434590
jmp 0x671f2e
lea rdx, str._home_ubuntu_build_bitcoin_depends_x86_64_w64_mingw32_share_.._include_boost_thread_win32_thread_heap_alloc.hpp
lea rcx, str.winapi::HeapFree_winapi::GetProcessHeap___0_heap_memory__0
mov r8d, 0x23
call fcn.00590060
jmp 0x671cf7
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x671cd3
lea rdx, str._home_ubuntu_build_bitcoin_depends_x86_64_w64_mingw32_share_.._include_boost_thread_win32_thread_primitives.hpp
lea rcx, str.::boost::winapi::CloseHandle_handle_to_manage_
mov r8d, 0xe7
call fcn.00590060
jmp 0x671cd3
call qword [sym.imp.msvcrt.dll___iob_func]
lea rcx, str.Error:_Initializing_networking_failed_n
lea r9, [rax + 0x60]
mov r8d, 0x26
mov edx, 1
call sub.msvcrt.dll_fwrite
mov ecx, 1
call sub.msvcrt.dll_exit
call fcn.00582f30
mov rcx, qword [rsp + 0x1c0]
add rbx, 0x10
mov rsi, rax
cmp rcx, rbx
je 0x67214f
call fcn.00670500
mov rcx, rsi
call fcn.0058e700
mov rbx, rax
mov rcx, qword [rsp + 0x100]
cmp rcx, rsi
je 0x671f74
mov rdi, qword [rcx]
call fcn.00670500
mov rcx, rdi
jmp 0x672162
lea rdx, [0x006831c9]
mov rcx, rbx
call fcn.0062a170
lea rax, [0x006d1320]
mov rcx, rbx
mov dword [rsp + 0x1d0], 0xb
mov byte [rsp + 0x1d4], 1
mov qword [rsp + 0x1e8], 0
mov qword [rsp + 0x1d8], rax
lea rax, [rbx + 0x30]
mov byte [rsp + 0x1f0], 0
mov qword [rsp + 0x1e0], rax
lea rax, [0x006dfbf0]
mov qword [rsp + 0x1c0], rax
call fcn.005b2080
mov rcx, qword [rsp + 0x120]
mov edx, 0x7fffffff
call fcn.005b9070
lea rdx, [0x006831c9]
mov rcx, r14
call fcn.0062a170
lea rax, [0x006d1320]
mov rcx, r14
mov dword [rsp + 0x190], 0xb
mov byte [rsp + 0x194], 1
mov qword [rsp + 0x1a8], 0
mov qword [rsp + 0x198], rax
lea rax, [r14 + 0x30]
mov byte [rsp + 0x1b0], 0
mov qword [rsp + 0x1a0], rax
lea rax, [0x006dfbf0]
mov qword [rsp + 0x180], rax
call fcn.005b2080
mov rcx, qword [rsp + 0x120]
mov edx, 0x7fffffff
call fcn.005b9070
mov rcx, qword [rsp + 0x128]
mov edx, 0x7fffffff
call fcn.005b9070
lea rdx, [0x006831c9]
mov rcx, r15
call fcn.0062a170
lea rax, [0x006d1320]
mov rcx, r15
mov dword [rsp + 0x150], 0xb
mov byte [rsp + 0x154], 1
mov qword [rsp + 0x168], 0
mov qword [rsp + 0x158], rax
lea rax, [r15 + 0x30]
mov byte [rsp + 0x170], 0
mov qword [rsp + 0x160], rax
lea rax, [0x006dfbf0]
mov qword [rsp + 0x140], rax
call fcn.005b2080
mov rdi, rax
lea rax, [0x006dfb90]
mov rcx, rbx
mov rbx, rdi
mov qword [rsp + 0x1c0], rax
call fcn.005b9d80
jmp 0x67215a