Function at 0x10058510
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov dword [ebp - 8], 0
mov eax, dword [ebp + 0x10]
push eax
push str._s.XXXXXX
call sym.glib_2.0.dll_g_strdup_printf
add esp, 8
mov dword [ebp - 0x14], eax
call dword [sym.imp.MSVCR90.dll__errno]
mov dword [eax], 0
push 0x1b6
push 0x8002
mov ecx, dword [ebp - 0x14]
push ecx
call sym.glib_2.0.dll_g_mkstemp_full
add esp, 0xc
mov dword [ebp - 0x18], eax
call dword [sym.imp.MSVCR90.dll__errno]
mov edx, dword [eax]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x14]
push eax
call sym.glib_2.0.dll_g_filename_display_name
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x100585b9
mov ecx, dword [ebp - 0x10]
push ecx
call sym.glib_2.0.dll_g_strerror
add esp, 4
push eax
mov edx, dword [ebp - 4]
push edx
push 0x100f23b8
call sym.glib_2.0.dll_glib_gettext
add esp, 4
push eax
mov eax, dword [ebp - 0x10]
push eax
call sym.glib_2.0.dll_g_file_error_from_errno
add esp, 4
push eax
call sym.glib_2.0.dll_g_file_error_quark
push eax
mov ecx, dword [ebp + 0x14]
push ecx
call sym.glib_2.0.dll_g_set_error
add esp, 0x18
jmp 0x100587e1
call dword [sym.imp.MSVCR90.dll__errno]
mov dword [eax], 0
push 0x100f23d8
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.MSVCR90.dll__fdopen]
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x10058647
call dword [sym.imp.MSVCR90.dll__errno]
mov eax, dword [eax]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
push ecx
call sym.glib_2.0.dll_g_strerror
add esp, 4
push eax
mov edx, dword [ebp - 4]
push edx
push str.Failed_to_open_file__s_for_writing:_fdopen___failed:__s
call sym.glib_2.0.dll_glib_gettext
add esp, 4
push eax
mov eax, dword [ebp - 0x10]
push eax
call sym.glib_2.0.dll_g_file_error_from_errno
add esp, 4
push eax
call sym.glib_2.0.dll_g_file_error_quark
push eax
mov ecx, dword [ebp + 0x14]
push ecx
call sym.glib_2.0.dll_g_set_error
add esp, 0x18
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.MSVCR90.dll__close]
add esp, 4
mov eax, dword [ebp - 0x14]
push eax
call sym.glib_2.0.dll_g_unlink
add esp, 4
jmp 0x100587e1
cmp dword [ebp + 0xc], 0
jle 0x100586e6
call dword [sym.imp.MSVCR90.dll__errno]
mov dword [eax], 0
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp + 0xc]
push edx
push 1
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp + 0xc]
jae 0x100586e6
call dword [sym.imp.MSVCR90.dll__errno]
mov edx, dword [eax]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
push eax
call sym.glib_2.0.dll_g_strerror
add esp, 4
push eax
mov ecx, dword [ebp - 4]
push ecx
push str.Failed_to_write_file__s:_fwrite___failed:__s
call sym.glib_2.0.dll_glib_gettext
add esp, 4
push eax
mov edx, dword [ebp - 0x10]
push edx
call sym.glib_2.0.dll_g_file_error_from_errno
add esp, 4
push eax
call sym.glib_2.0.dll_g_file_error_quark
push eax
mov eax, dword [ebp + 0x14]
push eax
call sym.glib_2.0.dll_g_set_error
add esp, 0x18
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
mov edx, dword [ebp - 0x14]
push edx
call sym.glib_2.0.dll_g_unlink
add esp, 4
jmp 0x100587e1
call dword [sym.imp.MSVCR90.dll__errno]
mov dword [eax], 0
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.MSVCR90.dll_fflush]
add esp, 4
test eax, eax
je 0x1005875d
call dword [sym.imp.MSVCR90.dll__errno]
mov ecx, dword [eax]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
push edx
call sym.glib_2.0.dll_g_strerror
add esp, 4
push eax
mov eax, dword [ebp - 4]
push eax
push str.Failed_to_write_file__s:_fflush___failed:__s
call sym.glib_2.0.dll_glib_gettext
add esp, 4
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call sym.glib_2.0.dll_g_file_error_from_errno
add esp, 4
push eax
call sym.glib_2.0.dll_g_file_error_quark
push eax
mov edx, dword [ebp + 0x14]
push edx
call sym.glib_2.0.dll_g_set_error
add esp, 0x18
mov eax, dword [ebp - 0x14]
push eax
call sym.glib_2.0.dll_g_unlink
add esp, 4
jmp 0x100587e1
call dword [sym.imp.MSVCR90.dll__errno]
mov dword [eax], 0
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
cmp eax, 0xffffffff
jne 0x100587d2
call dword [sym.imp.MSVCR90.dll__errno]
mov edx, dword [eax]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
push eax
call sym.glib_2.0.dll_g_strerror
add esp, 4
push eax
mov ecx, dword [ebp - 4]
push ecx
push str.Failed_to_close_file__s:_fclose___failed:__s
call sym.glib_2.0.dll_glib_gettext
add esp, 4
push eax
mov edx, dword [ebp - 0x10]
push edx
call sym.glib_2.0.dll_g_file_error_from_errno
add esp, 4
push eax
call sym.glib_2.0.dll_g_file_error_quark
push eax
mov eax, dword [ebp + 0x14]
push eax
call sym.glib_2.0.dll_g_set_error
add esp, 0x18
mov ecx, dword [ebp - 0x14]
push ecx
call sym.glib_2.0.dll_g_unlink
add esp, 4
jmp 0x100587e1
mov edx, dword [ebp - 0x14]
push edx
call sym.glib_2.0.dll_g_strdup
add esp, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x14]
push eax
call sym.glib_2.0.dll_g_free
add esp, 4
mov ecx, dword [ebp - 4]
push ecx
call sym.glib_2.0.dll_g_free
add esp, 4
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret