Function at 0x685dbf40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov ecx, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x1c], 0
test ecx, ecx
je 0x685dbf94
mov edx, dword [ebp + 0x14]
test edx, edx
je 0x685dbfc0
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
test eax, eax
je 0x685dbfc0
mov esi, str.g_file_set_contents
mov edi, 0x6865c79c
mov dword [esp + 4], esi
xor esi, esi
mov dword [esp + 8], edi
mov dword [esp], 0x6865c605
call sym.libglib_2.0_0.dll_g_return_if_fail_warning
add esp, 0x4c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, str.g_file_set_contents
mov edx, 0x6865c62a
mov dword [esp + 4], eax
xor esi, esi
mov dword [esp + 8], edx
mov dword [esp], 0x6865c605
call sym.libglib_2.0_0.dll_g_return_if_fail_warning
add esp, 0x4c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
test edi, edi
je 0x685dbfcf
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x685dc120
cmp edi, 0xffffffff
jl 0x685dc145
jne 0x685dbfe7
mov ecx, dword [ebp + 0xc]
mov dword [esp], ecx
call sym._strlen
mov edi, eax
mov eax, dword [ebp + 8]
mov ebx, 0x1b6
mov dword [esp], str._s.XXXXXX
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_strdup_printf
mov esi, eax
call sym.__errno
mov ecx, 0x8002
mov dword [eax], 0
mov dword [esp + 4], ecx
mov dword [esp + 8], ebx
mov dword [esp], esi
call sym.libglib_2.0_0.dll_g_mkstemp_full
mov dword [ebp - 0x30], eax
call sym.__errno
mov ebx, dword [eax]
mov dword [esp], esi
call sym.libglib_2.0_0.dll_g_filename_display_name
cmp dword [ebp - 0x30], 0xffffffff
mov dword [ebp - 0x34], eax
je 0x685dc280
call sym.__errno
mov ecx, dword [ebp - 0x30]
mov edx, 0x6865c68b
mov dword [eax], 0
mov dword [esp + 4], edx
mov dword [esp], ecx
call sym._fdopen
test eax, eax
mov ebx, eax
je 0x685dc405
test edi, edi
jle 0x685dc09f
lea esi, [esi]
call sym.__errno
mov dword [eax], 0
mov eax, 1
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edi
mov dword [esp], eax
call sym._fwrite
cmp edi, eax
ja 0x685dc300
call sym.__errno
mov dword [eax], 0
mov dword [esp], ebx
call sym._fflush
test eax, eax
jne 0x685dc1f1
call sym.__errno
mov dword [eax], 0
mov dword [esp], ebx
call sym._fclose
inc eax
je 0x685dc2e0
mov dword [esp], esi
call sym.libglib_2.0_0.dll_g_strdup
mov dword [esp], esi
xor esi, esi
mov ebx, eax
call sym.libglib_2.0_0.dll_g_free
mov ecx, dword [ebp - 0x34]
mov dword [esp], ecx
call sym.libglib_2.0_0.dll_g_free
test ebx, ebx
je 0x685dc10d
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x1c]
mov eax, ebx
mov esi, 1
call sym._rename_file
test eax, eax
je 0x685dc170
mov dword [esp], ebx
call sym.libglib_2.0_0.dll_g_free
add esp, 0x4c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, str.g_file_set_contents
mov ebx, str.contents___NULL__length__0
mov dword [esp + 8], ebx
xor esi, esi
mov dword [esp + 4], ecx
mov dword [esp], 0x6865c605
call sym.libglib_2.0_0.dll_g_return_if_fail_warning
jmp 0x685dbf8a
mov edx, str.length____1
mov eax, str.g_file_set_contents
mov dword [esp + 8], edx
xor esi, esi
mov dword [esp + 4], eax
mov dword [esp], 0x6865c605
call sym.libglib_2.0_0.dll_g_return_if_fail_warning
jmp 0x685dbf8a
mov eax, dword [ebp + 8]
mov ecx, 0x10
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_file_test_utf8
test eax, eax
jne 0x685dc1b0
mov dword [esp], ebx
xor esi, esi
call sym.libglib_2.0_0.dll_g_unlink
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], eax
mov dword [esp], ecx
call sym.libglib_2.0_0.dll_g_propagate_error
jmp 0x685dc10d
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_error_free
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_unlink
inc eax
je 0x685dc380
mov ecx, dword [ebp + 0x14]
mov eax, ebx
mov edx, dword [ebp + 8]
call sym._rename_file
test eax, eax
jne 0x685dc10d
mov dword [esp], ebx
xor esi, esi
call sym.libglib_2.0_0.dll_g_unlink
jmp 0x685dc10d
call sym.__errno
mov ebx, dword [eax]
mov dword [esp], ebx
call sym.libglib_2.0_0.dll_g_strerror
mov dword [esp], str.Failed_to_write_file__s:_fflush___failed:__s
mov dword [ebp - 0x2c], eax
call sym.libglib_2.0_0.dll_glib_gettext
dec ebx
mov edi, 0x18
cmp ebx, 0x27
mov edx, eax
ja 0x685dc223
mov edi, dword [ebx*4 + 0x6865c9c0]
mov dword [ebp - 0x38], edx
call sym.libglib_2.0_0.dll_g_file_error_quark
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x38]
mov dword [esp + 8], edi
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp - 0x34]
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x10], ecx
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_set_error
mov dword [esp], esi
call sym.libglib_2.0_0.dll_g_unlink
mov dword [esp], esi
xor ebx, ebx
xor esi, esi
call sym.libglib_2.0_0.dll_g_free
mov ecx, dword [ebp - 0x34]
mov dword [esp], ecx
call sym.libglib_2.0_0.dll_g_free
jmp 0x685dc10d
mov dword [esp], ebx
dec ebx
mov edi, 0x18
call sym.libglib_2.0_0.dll_g_strerror
mov dword [esp], str.Failed_to_create_file__s:__s
mov dword [ebp - 0x2c], eax
call sym.libglib_2.0_0.dll_glib_gettext
cmp ebx, 0x27
mov edx, eax
ja 0x685dc2ab
mov edi, dword [ebx*4 + 0x6865c9c0]
mov dword [ebp - 0x38], edx
call sym.libglib_2.0_0.dll_g_file_error_quark
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x38]
mov dword [esp + 8], edi
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp - 0x34]
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x10], ecx
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_set_error
jmp 0x685dc25b
call sym.__errno
mov ebx, dword [eax]
mov dword [esp], ebx
call sym.libglib_2.0_0.dll_g_strerror
mov dword [esp], str.Failed_to_close_file__s:_fclose___failed:__s
mov dword [ebp - 0x2c], eax
jmp 0x685dc20a
call sym.__errno
mov edi, dword [eax]
mov dword [esp], edi
call sym.libglib_2.0_0.dll_g_strerror
mov dword [esp], str.Failed_to_write_file__s:_fwrite___failed:__s
mov dword [ebp - 0x2c], eax
call sym.libglib_2.0_0.dll_glib_gettext
mov edx, eax
lea eax, [edi - 1]
mov edi, 0x18
cmp eax, 0x27
ja 0x685dc334
mov edi, dword [eax*4 + 0x6865c9c0]
mov dword [ebp - 0x38], edx
call sym.libglib_2.0_0.dll_g_file_error_quark
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x38]
mov dword [esp + 8], edi
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp - 0x34]
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x10], ecx
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_set_error
mov dword [esp], ebx
call sym._fclose
mov dword [esp], esi
call sym.libglib_2.0_0.dll_g_unlink
jmp 0x685dc25b
mov ecx, dword [ebp + 8]
mov dword [esp], ecx
call sym.libglib_2.0_0.dll_g_filename_display_name
mov esi, eax
call sym.__errno
mov edi, dword [eax]
mov dword [esp], edi
call sym.libglib_2.0_0.dll_g_strerror
mov dword [esp], str.Existing_file__s_could_not_be_removed:_g_unlink___failed:__s
mov dword [ebp - 0x2c], eax
call sym.libglib_2.0_0.dll_glib_gettext
mov edx, eax
lea eax, [edi - 1]
mov edi, 0x18
cmp eax, 0x27
ja 0x685dc3c1
mov edi, dword [eax*4 + 0x6865c9c0]
mov dword [ebp - 0x38], edx
call sym.libglib_2.0_0.dll_g_file_error_quark
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x38]
mov dword [esp + 0x10], esi
mov dword [esp + 8], edi
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_set_error
mov dword [esp], esi
xor esi, esi
call sym.libglib_2.0_0.dll_g_free
mov dword [esp], ebx
call sym.libglib_2.0_0.dll_g_unlink
jmp 0x685dc10d
call sym.__errno
mov edi, 0x18
mov ebx, dword [eax]
mov dword [esp], ebx
dec ebx
call sym.libglib_2.0_0.dll_g_strerror
mov dword [esp], str.Failed_to_open_file__s_for_writing:_fdopen___failed:__s
mov dword [ebp - 0x2c], eax
call sym.libglib_2.0_0.dll_glib_gettext
cmp ebx, 0x27
mov edx, eax
ja 0x685dc437
mov edi, dword [ebx*4 + 0x6865c9c0]
mov dword [ebp - 0x38], edx
call sym.libglib_2.0_0.dll_g_file_error_quark
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x38]
mov dword [esp + 8], edi
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp - 0x34]
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x10], ecx
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_set_error
mov ecx, dword [ebp - 0x30]
mov dword [esp], ecx
call sym._close
mov dword [esp], esi
call sym.libglib_2.0_0.dll_g_unlink
jmp 0x685dc25b