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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d8117
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x198
mov eax, dword [0x52600c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x188], esi
mov edx, dword [ebx + 8]
lea ecx, [ebp - 0x164]
mov edi, dword [ebx + 0xc]
mov dword [ebp - 0x18c], edi
call fcn.004afb70
mov dword [ebp - 4], 0
test edi, edi
jne 0x489fa4
mov edi, dword [esi + 0x10]
mov dword [ebp - 0x18c], edi
mov eax, dword [esi + 0x14]
add esi, 0x14
mov ecx, esi
mov dword [ebp - 0x168], esi
call dword [eax + 4]
xorps xmm0, xmm0
movups xmmword [ebp - 0x134], xmm0
mov dword [ebp - method.CDirect3DSprite.virtual_4], vtable.CFile.0
mov dword [ebp - 0x130], 0
mov dword [ebp - 0x12c], 0
mov dword [ebp - 0x128], 0
mov byte [ebp - 4], 2
lea eax, [ebp - 0x164]
cmp dword [ebp - 0x150], 0x10
lea ecx, [ebp - 0x134]
cmovae eax, dword [ebp - 0x164]
push eax
call fcn.00475600
test eax, eax
jne 0x48a158
push eax
push eax
lea eax, [ebp - 0x184]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov dword [ebp - 0x13c], 0
mov dword [ebp - 0x138], 0xf
mov byte [ebp - 0x14c], 0
push 0x105
lea eax, [ebp - 0x120]
mov byte [ebp - 4], 3
push 0
push eax
call fcn.004bf140
add esp, 0xc
lea eax, [ebp - 0x120]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push dword [ebp - 0x184]
cmp dword [ebp - 0x150], 0x10
lea eax, [ebp - 0x164]
cmovae eax, dword [ebp - 0x164]
push eax
push 0x511208
lea eax, [ebp - 0x1a4]
push eax
lea eax, [ebp - 0x14c]
push eax
call fcn.004a9b80
add esp, 0x14
lea ecx, [ebp - 0x1a4]
call fcn.00428650
cmp dword [ebp - 0x138], 0x10
lea eax, [ebp - 0x14c]
mov ecx, dword [ebp - 0x188]
cmovae eax, dword [ebp - 0x14c]
push eax
lea eax, [ebp - 0x180]
mov ecx, dword [ecx + 4]
push eax
call fcn.0049ae20
mov byte [ebp - 4], 4
lea eax, [ebp - 0x180]
cmp dword [ebp - 0x16c], 0x10
mov ecx, 0x565cc0
push 0
cmovae eax, dword [ebp - 0x180]
push eax
mov eax, dword [0x565cc0]
call dword [eax + 4]
push dword [ebp - 0x184]
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea ecx, [ebp - 0x180]
call fcn.00428650
lea ecx, [ebp - 0x14c]
call fcn.00428650
lea eax, [ebp - 0x130]
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp - 0x134]
mov dword [ebp - method.CDirect3DSprite.virtual_4], vtable.CFile.0
call fcn.00475690
xor edi, edi
jmp 0x48a30c
mov eax, dword [ebp - 0x130]
push 0x105
mov dword [ebp - 0x188], eax
lea eax, [ebp - 0x120]
push 0
push eax
call fcn.004bf140
add esp, 0xc
mov eax, edi
cmp dword [edi + 0x14], 0x10
jb 0x48a184
mov eax, dword [edi]
push eax
lea eax, [ebp - 0x120]
push 0x105
push eax
call fcn.004c26c7
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x124]
add esp, 0xc
push 0
push eax
push 0x104
lea eax, [ebp - 0x120]
push eax
push dword [ebp - 0x188]
call edi
mov ecx, dword [ebp - 0x18c]
push dword [ebp - 0x188]
add ecx, 0x3c
call fcn.00482230
mov ecx, dword [ebp - 0x18c]
push 0
mov eax, dword [ecx + 0x1c]
sub eax, dword [ecx + 0x18]
mov dword [ebp - 0x184], eax
lea eax, [ebp - 0x124]
push eax
push 4
lea eax, [ebp - 0x184]
push eax
push dword [ebp - 0x188]
call edi
mov eax, dword [ebp - 0x18c]
lea edx, [ebp - 0x124]
push 0
push edx
mov ecx, dword [eax + 0x18]
mov eax, dword [eax + 0x1c]
sub eax, ecx
push eax
push ecx
push dword [ebp - 0x188]
call edi
mov ecx, dword [ebp - 0x18c]
push 0
mov eax, dword [ecx + 0x28]
sub eax, dword [ecx + 0x24]
sar eax, 1
mov dword [ebp - 0x184], eax
lea eax, [ebp - 0x124]
push eax
push 4
lea eax, [ebp - 0x184]
push eax
push dword [ebp - 0x188]
call edi
mov eax, dword [ebp - 0x18c]
lea edx, [ebp - 0x124]
push 0
push edx
mov ecx, dword [eax + 0x24]
mov eax, dword [eax + 0x28]
sub eax, ecx
sar eax, 1
add eax, eax
push eax
push ecx
push dword [ebp - 0x188]
call edi
mov ecx, dword [ebp - 0x18c]
push dword [ebp - 0x188]
add ecx, 0x48
call fcn.00482230
mov ecx, dword [ebp - 0x18c]
push 0
mov eax, dword [ecx + 0x34]
sub eax, dword [ecx + 0x30]
mov dword [ebp - 0x184], eax
lea eax, [ebp - 0x124]
push eax
push 4
lea eax, [ebp - 0x184]
push eax
push dword [ebp - 0x188]
call edi
mov eax, dword [ebp - 0x18c]
lea edx, [ebp - 0x124]
push 0
push edx
mov ecx, dword [eax + 0x30]
mov eax, dword [eax + 0x34]
sub eax, ecx
push eax
push ecx
push dword [ebp - 0x188]
call edi
lea eax, [ebp - 0x130]
push eax
mov eax, dword [ebp - 0x134]
lea ecx, [ebp - 0x134]
call dword [eax + 0xc]
lea eax, [ebp - 0x130]
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp - 0x134]
mov dword [ebp - method.CDirect3DSprite.virtual_4], vtable.CFile.0
call fcn.00475690
mov edi, 1
mov byte [ebp - 4], 8
mov ecx, esi
mov edx, dword [esi]
call dword [edx + 8]
lea ecx, [ebp - 0x164]
call fcn.00428650
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004bcfcc
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8