Function at 0x685deb80
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
test rcx, rcx
mov r12, rcx
mov qword [rsp + 0x98], rdx
mov rbp, r8
mov r13, r9
mov qword [rsp + 0x38], 0
je 0x685dedf0
test r9, r9
je 0x685debf0
cmp qword [r13], 0
je 0x685debf0
lea r8, [0x6866a750]
lea rdx, str.g_file_set_contents
lea rcx, [0x6866a474]
xor esi, esi
call sym.libglib_2.0_0.dll_g_return_if_fail_warning
mov eax, esi
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
test rbp, rbp
jne 0x685deda0
cmp rbp, 0xffffffffffffffff
jl 0x685ded31
jne 0x685dec15
mov rcx, qword [rsp + 0x98]
call sub.msvcrt.dll_strlen
mov rbp, rax
lea rcx, str._s.XXXXXX
mov rdx, r12
call sym.libglib_2.0_0.dll_g_strdup_printf
mov rsi, rax
mov rbx, qword [sym.imp.msvcrt.dll__errno]
call rbx
mov r8d, 0x1b6
mov edx, 0x8002
mov rcx, rsi
mov dword [rax], 0
call sym.libglib_2.0_0.dll_g_mkstemp_full
mov r14d, eax
call rbx
mov rcx, rsi
mov edi, dword [rax]
call sym.libglib_2.0_0.dll_g_filename_display_name
cmp r14d, 0xffffffff
mov r15, rax
je 0x685deea0
call rbx
lea rdx, [0x6866a63d]
mov dword [rax], 0
mov ecx, r14d
call sub.msvcrt.dll__fdopen
test rax, rax
mov rdi, rax
je 0x685defa6
test rbp, rbp
jle 0x685decb6
call rbx
mov rcx, qword [rsp + 0x98]
mov dword [rax], 0
mov r9, rdi
mov r8, rbp
mov edx, 1
call sub.msvcrt.dll_fwrite
cmp rbp, rax
ja 0x685def10
call rbx
mov rcx, rdi
mov dword [rax], 0
call sub.msvcrt.dll_fflush
test eax, eax
jne 0x685dee20
call rbx
mov rcx, rdi
mov dword [rax], 0
call sub.msvcrt.dll_fclose
cmp eax, 0xffffffff
je 0x685deef2
mov rcx, rsi
call sym.libglib_2.0_0.dll_g_strdup
mov rcx, rsi
mov rdi, rax
call sym.libglib_2.0_0.dll_g_free
mov rcx, r15
call sym.libglib_2.0_0.dll_g_free
test rdi, rdi
je 0x685dee11
lea r8, [rsp + 0x38]
mov rdx, r12
mov rcx, rdi
mov esi, 1
call fcn.685de610
test eax, eax
je 0x685ded52
mov rcx, rdi
call sym.libglib_2.0_0.dll_g_free
jmp 0x685debdb
lea r8, str.length____1
lea rdx, str.g_file_set_contents
lea rcx, [0x6866a474]
xor esi, esi
call sym.libglib_2.0_0.dll_g_return_if_fail_warning
jmp 0x685debdb
mov edx, 0x10
mov rcx, r12
call sym.libglib_2.0_0.dll_g_file_test_utf8
test eax, eax
je 0x685dedd0
mov rcx, qword [rsp + 0x38]
call sym.libglib_2.0_0.dll_g_error_free
mov rcx, r12
call sym.libglib_2.0_0.dll_g_unlink
cmp eax, 0xffffffff
je 0x685def30
mov r8, r13
mov rdx, r12
mov rcx, rdi
call fcn.685de610
test eax, eax
jne 0x685ded24
mov rcx, rdi
xor esi, esi
call sym.libglib_2.0_0.dll_g_unlink
jmp 0x685ded24
cmp qword [rsp + 0x98], 0
jne 0x685debf9
lea r8, str.contents___NULL__length__0
lea rdx, str.g_file_set_contents
lea rcx, [0x6866a474]
xor esi, esi
call sym.libglib_2.0_0.dll_g_return_if_fail_warning
jmp 0x685debdb
mov rcx, rdi
xor sil, sil
call sym.libglib_2.0_0.dll_g_unlink
mov rdx, qword [rsp + 0x38]
mov rcx, r13
call sym.libglib_2.0_0.dll_g_propagate_error
jmp 0x685ded24
lea r8, [0x6866a611]
lea rdx, str.g_file_set_contents
lea rcx, [0x6866a474]
xor esi, esi
call sym.libglib_2.0_0.dll_g_return_if_fail_warning
jmp 0x685debdb
xor esi, esi
jmp 0x685ded24
call rbx
mov ebx, dword [rax]
mov ecx, ebx
call sym.libglib_2.0_0.dll_g_strerror
lea rcx, str.Failed_to_write_file__s:_fflush___failed:__s
mov r12, rax
sub ebx, 1
mov ebp, 0x18
call sym.libglib_2.0_0.dll_glib_gettext
cmp ebx, 0x71
mov r14, rax
ja 0x685dee55
lea rax, [0x6866a7e0]
movzx ebp, byte [rax + rbx]
call sym.libglib_2.0_0.dll_g_file_error_quark
mov r9, r14
mov r8d, ebp
mov edx, eax
mov rcx, r13
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r15
call sym.libglib_2.0_0.dll_g_set_error
mov rcx, rdi
call sub.msvcrt.dll_fclose
mov rcx, rsi
call sym.libglib_2.0_0.dll_g_unlink
mov rcx, rsi
xor edi, edi
xor esi, esi
call sym.libglib_2.0_0.dll_g_free
mov rcx, r15
call sym.libglib_2.0_0.dll_g_free
jmp 0x685ded24
mov ecx, edi
sub edi, 1
mov ebx, 0x18
call sym.libglib_2.0_0.dll_g_strerror
lea rcx, str.Failed_to_create_file__s:__s
mov rbp, rax
call sym.libglib_2.0_0.dll_glib_gettext
cmp edi, 0x71
mov r12, rax
ja 0x685deed1
lea rax, [0x6866a7e0]
movzx ebx, byte [rax + rdi]
call sym.libglib_2.0_0.dll_g_file_error_quark
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], r15
mov r9, r12
mov r8d, ebx
mov edx, eax
mov rcx, r13
call sym.libglib_2.0_0.dll_g_set_error
jmp 0x685dee84
call rbx
mov ebx, dword [rax]
mov ecx, ebx
call sym.libglib_2.0_0.dll_g_strerror
lea rcx, str.Failed_to_close_file__s:_fclose___failed:__s
mov r12, rax
jmp 0x685dee35
call rbx
mov ebx, dword [rax]
mov ecx, ebx
call sym.libglib_2.0_0.dll_g_strerror
lea rcx, str.Failed_to_write_file__s:_fwrite___failed:__s
mov r12, rax
jmp 0x685dee35
mov rcx, r12
mov ebp, 0x18
call sym.libglib_2.0_0.dll_g_filename_display_name
mov rsi, rax
call rbx
mov ebx, dword [rax]
mov ecx, ebx
sub ebx, 1
call sym.libglib_2.0_0.dll_g_strerror
lea rcx, str.Existing_file__s_could_not_be_removed:_g_unlink___failed:__s
mov r12, rax
call sym.libglib_2.0_0.dll_glib_gettext
cmp ebx, 0x71
mov r14, rax
ja 0x685def70
lea rax, [0x6866a7e0]
movzx ebp, byte [rax + rbx]
call sym.libglib_2.0_0.dll_g_file_error_quark
mov r9, r14
mov r8d, ebp
mov edx, eax
mov qword [rsp + 0x20], rsi
mov rcx, r13
mov qword [rsp + 0x28], r12
call sym.libglib_2.0_0.dll_g_set_error
mov rcx, rsi
xor esi, esi
call sym.libglib_2.0_0.dll_g_free
mov rcx, rdi
call sym.libglib_2.0_0.dll_g_unlink
jmp 0x685ded24
call rbx
mov ebx, dword [rax]
mov dil, 0x18
mov ecx, ebx
sub ebx, 1
call sym.libglib_2.0_0.dll_g_strerror
lea rcx, str.Failed_to_open_file__s_for_writing:_fdopen___failed:__s
mov rbp, rax
call sym.libglib_2.0_0.dll_glib_gettext
cmp ebx, 0x71
mov r12, rax
ja 0x685defd9
lea rax, [0x6866a7e0]
movzx edi, byte [rax + rbx]
call sym.libglib_2.0_0.dll_g_file_error_quark
mov r9, r12
mov r8d, edi
mov edx, eax
mov rcx, r13
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], r15
call sym.libglib_2.0_0.dll_g_set_error
mov ecx, r14d
call sub.msvcrt.dll__close
mov rcx, rsi
call sym.libglib_2.0_0.dll_g_unlink
jmp 0x685dee84