Function at 0x415310
Capabilities:
Delete file
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x268]
push ebx
sub esp, 0x280
mov dword [esp], eax
call sub.gdiplus.dll_GdipNewPrivateFontCollection
sub esp, 4
mov ebx, eax
call fcn.0049bde0
mov dword [eax], 0x4a4396
mov dword [eax + 4], 0x5e
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
lea ebx, [ebp - 0x214]
mov dword [esp + 4], str.GdipNewPrivateFontCollection_failed:__d_n
mov dword [esp], eax
call fcn.0040efb0
mov dword [esp + 4], ebx
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetTempPathW]
mov edx, ebx
sub esp, 8
cmp word [ebp - 0x214], 0
je 0x415391
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x415388
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [eax + str.wine_longname.ttf]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x415398
mov eax, dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], ebx
mov dword [ebp - 0x26c], eax
call eax
sub esp, 0x1c
mov esi, eax
call fcn.0049bde0
mov dword [eax], 0x4a4396
mov dword [eax + 4], 0x43
mov eax, ebx
mov edi, dword fs:[0x18]
mov edx, dword [edi + 0x34]
mov dword [ebp - 0x270], edx
call fcn.0040e590
mov edx, dword [ebp - 0x270]
mov dword [esp + 4], 0x4a4b90
mov dword [esp + 8], eax
xor eax, eax
cmp esi, 0xffffffff
setne al
mov dword [esp + 0xc], edx
mov dword [esp], eax
call fcn.0040efb0
lea ecx, [ebp - 0x258]
mov edx, 1
mov eax, 0x45
mov dword [esp], ecx
lea ecx, [ebp - 0x254]
call fcn.0040f410
mov edx, dword [ebp - 0x258]
lea ecx, [ebp - 0x25c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov eax, dword [ebp - 0x254]
mov dword [ebp - 0x270], edx
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
call fcn.0049bde0
mov dword [eax], 0x4a4396
mov dword [eax + 4], 0x47
xor eax, eax
mov dword [esp + 4], str.couldnt_write_resource_n
mov edx, dword [ebp - 0x270]
cmp dword [ebp - 0x25c], edx
sete al
mov dword [esp], eax
call fcn.0040efb0
mov edx, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], esi
mov dword [ebp - 0x270], edx
call edx
sub esp, 4
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], ebx
mov eax, dword [ebp - 0x26c]
call eax
sub esp, 0x1c
mov esi, eax
call fcn.0049bde0
mov dword [eax], 0x4a4396
mov dword [eax + 4], 0x63
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.CreateFileW_failed:__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp esi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0040efb0
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x268]
mov dword [esp], eax
call sub.gdiplus.dll_GdipPrivateAddFontFile
sub esp, 8
mov edi, eax
call fcn.0049bde0
mov dword [eax], 0x4a4396
mov dword [eax + 4], 0x66
xor eax, eax
test edi, edi
sete al
mov dword [esp + 8], edi
mov dword [esp + 4], str.GdipPrivateAddFontFile_failed_with_open_file_handle:__d_n
mov dword [esp], eax
call fcn.0040efb0
mov dword [esp], esi
mov edx, dword [ebp - 0x270]
call edx
sub esp, 4
test edi, edi
jne 0x415918
lea esi, [ebp - 0x264]
mov dword [esp + 4], esi
mov eax, dword [ebp - 0x268]
mov dword [esp], eax
call sub.gdiplus.dll_GdipGetFontCollectionFamilyCount
sub esp, 8
mov edi, eax
call fcn.0049bde0
mov dword [eax], 0x4a4396
mov dword [eax + 4], 0x71
xor eax, eax
test edi, edi
sete al
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], str.GdipGetFontCollectionFamilyCount_failed:__d_n
call fcn.0040efb0
call fcn.0049bde0
mov dword [eax], 0x4a4396
mov dword [eax + 4], 0x73
mov eax, dword [ebp - 0x264]
mov dword [esp + 4], str.expected_num_families_to_be_1__got__d_n
cmp eax, 1
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0040efb0
lea eax, [ebp - 0x260]
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x264]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x268]
mov dword [esp], eax
call sub.gdiplus.dll_GdipGetFontCollectionFamilyList
sub esp, 0x10
mov esi, eax
call fcn.0049bde0
mov dword [eax], 0x4a4396
mov dword [eax + 4], 0x76
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.GdipGetFontCollectionFamilyList_failed:__d_n
call fcn.0040efb0
lea eax, [ebp - 0x254]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x260]
mov dword [esp], eax
call sub.gdiplus.dll_GdipGetFamilyName
sub esp, 0xc
mov esi, eax
call fcn.0049bde0
mov dword [eax], 0x4a4396
mov dword [eax + 4], 0x79
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.GdipGetFamilyName_failed:__d_n
call fcn.0040efb0
lea eax, [ebp - 0x258]
mov dword [esp + 0xc], 2
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x43800000
mov eax, dword [ebp - 0x260]
mov dword [esp], eax
call sub.gdiplus.dll_GdipCreateFont
sub esp, 0x14
mov esi, eax
call fcn.0049bde0
mov dword [eax], 0x4a4396
mov dword [eax + 4], 0x7c
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.GdipCreateFont_failed:__d_n
call fcn.0040efb0
lea eax, [ebp - 0x25c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x260]
mov dword [esp], eax
call sub.gdiplus.dll_GdipCloneFontFamily
sub esp, 8
mov esi, eax
call fcn.0049bde0
mov dword [eax], 0x4a4396
mov dword [eax + 4], 0x7f
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.GdipCloneFontFamily_failed:__d_n
call fcn.0040efb0
call fcn.0049bde0
mov dword [eax], 0x4a4396
mov dword [eax + 4], pe_nt_image_headers32
mov dword [esp + 4], str.GdipCloneFontFamily_returned_new_object_n
mov eax, dword [ebp - 0x25c]
cmp dword [ebp - 0x260], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0040efb0
mov eax, dword [ebp - 0x258]
mov dword [esp], eax
call sub.gdiplus.dll_GdipDeleteFont
sub esp, 4
mov esi, eax
call fcn.0049bde0
mov dword [eax], 0x4a4396
mov dword [eax + 4], 0x85
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.GdipDeleteFont_failed:__d_n
call fcn.0040efb0
lea eax, [ebp - 0x268]
mov dword [esp], eax
call sub.gdiplus.dll_GdipDeletePrivateFontCollection
sub esp, 4
mov esi, eax
call fcn.0049bde0
mov dword [eax], 0x4a4396
mov dword [eax + 4], 0x88
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.GdipDeletePrivateFontCollection_failed:__d_n
call fcn.0040efb0
lea eax, [ebp - 0x254]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x25c]
mov dword [esp], eax
call sub.gdiplus.dll_GdipGetFamilyName
sub esp, 0xc
mov esi, eax
call fcn.0049bde0
mov dword [eax], 0x4a4396
mov dword [eax + 4], 0x8c
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.GdipGetFamilyName_failed:__d_n
call fcn.0040efb0
mov eax, dword [ebp - 0x25c]
mov dword [esp], eax
call sub.gdiplus.dll_GdipDeleteFontFamily
sub esp, 4
mov esi, eax
call fcn.0049bde0
mov dword [eax], 0x4a4396
mov dword [eax + 4], 0x8f
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp + 4], str.GdipDeleteFontFamily_failed:__d_n
mov dword [esp], eax
call fcn.0040efb0
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_DeleteFileW]
sub esp, 4
mov esi, eax
call fcn.0049bde0
mov dword [eax], 0x4a4396
mov dword [eax + 4], 0x91
mov eax, dword fs:[0x18]
mov edi, dword [eax + 0x34]
mov eax, ebx
call fcn.0040e590
mov dword [esp], esi
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_delete_file__s__error__ld_n
call fcn.0040efb0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x268]
mov dword [esp], eax
call sub.gdiplus.dll_GdipPrivateAddFontFile
sub esp, 8
mov esi, eax
call fcn.0049bde0
mov dword [eax], 0x4a4396
mov dword [eax + 4], 0x6d
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp + 4], str.GdipPrivateAddFontFile_failed:__d_n
mov dword [esp], eax
call fcn.0040efb0
jmp 0x4155a7