Function at 0x140045230
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov r8d, 2
cmp qword [rcx + 0x7f0], 0
mov ebp, edx
mov r13, rcx
mov edx, 2
je 0x14004531b
call sym.Curl_share_lock
mov rax, qword [r13 + 0x7f0]
mov rsi, qword [r13 + 0xa50]
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x20], rax
mov rdi, rax
test rsi, rsi
je 0x140045320
mov rcx, rsi
call sym.remove_expired
cmp byte [rdi], 0x2d
jne 0x1400453e6
cmp byte [rdi + 1], 0
jne 0x1400453e6
mov ecx, 1
call qword [dbg.__acrt_iob_func]
mov r8d, 0x83
mov edx, 1
lea rcx, str._Netscape_HTTP_Cookie_File_n_https:__curl.se_docs_http_cookies.html_n_This_file_was_generated_by_libcurl__Edit_at_your_own_risk._n_n
mov r9, rax
mov qword [rsp + 0x30], rax
call sym.fwrite
movsxd rax, dword [rsi + 0x7e8]
test eax, eax
je 0x140045570
lea rdx, [rax*8]
mov rax, qword [0x140171860]
mov ecx, 1
call qword [rax]
mov rdi, qword [0x1401718c0]
mov rbx, rax
test rax, rax
je 0x1400455eb
mov byte [rsp + 0x2f], 1
jmp 0x140045461
call sym.Curl_share_lock
test bpl, bpl
je 0x1400453c9
mov rax, qword [r13 + 0xf8]
mov r14, qword [r13 + 0xa50]
test rax, rax
je 0x140045349
cmp qword [rax + 0xf8], r14
je 0x1400453c9
test r14, r14
je 0x1400453be
mov rsi, r14
lea rdi, [r14 + 0x7e0]
nop dword [rax + rax]
mov rcx, rsi
call sym.Curl_llist_head
mov rbx, rax
test rax, rax
je 0x14004539e
mov rcx, rbx
mov r15, rbx
call sym.Curl_node_elem
mov rcx, rbx
mov r12, rax
call sym.Curl_node_next
mov rcx, r15
mov rbx, rax
call sym.Curl_node_remove
mov rcx, r12
call sym.freecookie
test rbx, rbx
jne 0x140045370
add rsi, 0x20
cmp rdi, rsi
jne 0x140045360
mov rax, qword [0x1401718c0]
mov rcx, r14
mov dword [r14 + 0x7e8], 0
call qword [rax]
mov qword [r13 + 0xa50], 0
mov edx, 2
mov rcx, r13
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.Curl_share_unlock
mov rdx, qword [rsp + 0x20]
lea r9, [rsp + 0x38]
lea r8, [rsp + 0x30]
mov rcx, r13
call sym.Curl_fopen
mov r12d, eax
test eax, eax
jne 0x140045583
mov r9, qword [rsp + 0x30]
mov r8d, 0x83
mov edx, 1
lea rcx, str._Netscape_HTTP_Cookie_File_n_https:__curl.se_docs_http_cookies.html_n_This_file_was_generated_by_libcurl__Edit_at_your_own_risk._n_n
call sym.fwrite
movsxd rax, dword [rsi + 0x7e8]
mov rdi, qword [0x1401718c0]
test eax, eax
je 0x14004560f
lea rdx, [rax*8]
mov rax, qword [0x140171860]
mov ecx, 1
call qword [rax]
mov byte [rsp + 0x2f], 0
mov rbx, rax
test rax, rax
je 0x140045665
lea rdi, [rsi + 0x7e0]
xor r15d, r15d
nop dword [rax + rax]
mov rcx, rsi
call sym.Curl_llist_head
mov r12, rax
test rax, rax
jne 0x1400454a3
jmp 0x1400454cb
mov qword [rbx + r15*8], rax
mov rcx, r12
lea r14, [r15 + 1]
call sym.Curl_node_next
mov r12, rax
test rax, rax
je 0x1400454c8
mov r15, r14
mov rcx, r12
call sym.Curl_node_elem
cmp qword [rax + 0x60], 0
jne 0x140045488
mov rcx, r12
mov r14, r15
call sym.Curl_node_next
mov r12, rax
test rax, rax
jne 0x1400454a0
nop dword [rax]
mov r15, r14
add rsi, 0x20
cmp rdi, rsi
jne 0x140045470
lea r9, [sym.cookie_sort_ct]
mov r8d, 8
mov rdx, r15
mov rcx, rbx
call sym.qsort
test r15, r15
je 0x1400455f3
mov rdi, qword [0x1401718c0]
xor esi, esi
xor eax, eax
lea r12, [0x140161484]
jmp 0x140045534
mov rcx, qword [rsp + 0x30]
mov r8, rax
mov rdx, r12
call sym.curl_mfprintf
mov rcx, r14
call qword [rdi]
lea eax, [rsi + 1]
mov rsi, rax
cmp rax, r15
jae 0x1400455fa
mov rcx, qword [rbx + rax*8]
call sym.get_netscape_format
mov r14, rax
test rax, rax
jne 0x140045510
mov rcx, rbx
call qword [rdi]
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x1400455eb
cmp byte [rsp + 0x2f], 0
jne 0x1400455eb
mov r12d, 0x1b
jmp 0x140045594
mov rcx, qword [rsp + 0x38]
mov rdi, qword [0x1401718c0]
call qword [rdi]
jmp 0x140045320
mov rcx, qword [rsp + 0x30]
mov rdi, qword [0x1401718c0]
test rcx, rcx
je 0x140045599
call sym.fclose
mov rcx, qword [rsp + 0x38]
call qword [rdi]
test byte [r13 + 0xa47], 0x10
je 0x140045320
mov rax, qword [r13 + 0x1270]
test rax, rax
je 0x1400455c5
mov eax, dword [rax + 8]
test eax, eax
jle 0x140045320
mov ecx, r12d
call sym.curl_easy_strerror
mov r8, qword [r13 + 0x7f0]
lea rdx, str.WARNING:_failed_to_save_cookies_in__s:__s
mov rcx, r13
mov r9, rax
call sym.Curl_infof
jmp 0x140045320
mov r12d, 0x1b
jmp 0x140045599
mov rdi, qword [0x1401718c0]
mov rcx, rbx
call qword [rdi]
cmp byte [rsp + 0x2f], 0
mov rcx, qword [rsp + 0x38]
jne 0x14004557c
mov rcx, qword [rsp + 0x30]
call sym.fclose
mov rcx, qword [rsp + 0x38]
mov qword [rsp + 0x30], 0
test rcx, rcx
je 0x14004557c
mov rdx, qword [rsp + 0x20]
call sym.Curl_rename
mov rcx, qword [rsp + 0x38]
test eax, eax
je 0x14004557c
call sym.unlink
mov rcx, qword [rsp + 0x30]
mov r12d, 0x17
test rcx, rcx
jne 0x140045594
jmp 0x140045599
mov rdi, qword [0x1401718c0]
jmp 0x14004554a