Function at 0x5241c0
Capabilities:
Check if file exists
Delete file
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x7a6ab0
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x8ca144]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x74], eax
mov esi, dword [ebp + 8]
lea edi, [eax + 0x18]
push str.GameIconNull
push edi
mov dword [ebp - 0x84], 0
call fcn.005106b0
add esp, 8
push 0x8b08c8
test al, al
je 0x524222
mov ecx, esi
call fcn.004026c0
jmp 0x524479
push edi
call fcn.00523500
add esp, 8
test al, al
je 0x524253
cmp dword [edi + 0x14], 8
jb 0x524239
mov eax, dword [edi]
jmp 0x52423b
mov eax, edi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x524253
push edi
mov ecx, esi
call fcn.004042e0
jmp 0x524479
mov edi, dword [ebp - 0x74]
lea ecx, [ebp - 0x58]
xor eax, eax
mov dword [ebp - 0x44], 7
push 0xffffffffffffffff
push eax
push edi
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
call fcn.00402aa0
mov dword [ebp - 4], 0
call fcn.0073a8b6
push eax
xorps xmm0, xmm0
lea eax, [ebp - 0x40]
push 0x7b6800
push eax
movups xmmword [ebp - 0x40], xmm0
movups xmmword [ebp - 0x30], xmm0
movq qword [ebp - 0x20], xmm0
call fcn.00408370
add esp, 0xc
lea eax, [ebp - 0x40]
lea ecx, [ebp - 0x58]
push eax
call fcn.004041d0
push str..ico
lea ecx, [ebp - 0x58]
call fcn.004041d0
cmp dword [ebp - 0x44], 8
lea eax, [ebp - 0x58]
cmovae eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x524302
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
cmp dword [esi + 0x14], 8
jb 0x5242eb
mov eax, dword [esi]
jmp 0x5242ed
mov eax, esi
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x58]
push eax
mov ecx, esi
call fcn.00404450
jmp 0x524471
xor eax, eax
mov dword [ebp - 0x5c], 7
push 0xffffffffffffffff
push eax
push edi
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x60], 0
mov word [ebp - 0x70], ax
call fcn.00402aa0
push str.icon.ico
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 1
call fcn.004041d0
cmp dword [ebp - 0x5c], 8
lea eax, [ebp - 0x70]
push 0
cmovae eax, dword [ebp - 0x70]
push 0x80
push 4
push 0
push 0
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
xor edi, edi
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x78], edi
cmp eax, 0xffffffff
je 0x5243e2
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea ecx, [edi + 0xa]
push ecx
call fcn.006e70fd
add esp, 4
mov dword [ebp - 0x78], eax
lea ecx, [ebp - 0x7c]
mov dword [ebp - 0x7c], 0
push 0
push ecx
push edi
push eax
push dword [ebp - 0x74]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x74]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x895440
push 0xf4240
call fcn.0073a6e6
push eax
xor ecx, ecx
mov byte [ebp - 0x18], 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x17], ecx
push 0x813848
push eax
mov word [ebp - 0x13], cx
mov byte [ebp - 0x11], cl
call fcn.0040ad50
mov ecx, dword [ebp - 0x78]
add esp, 0x14
mov eax, dword [ebp - 0x18]
mov dword [ecx + edi], eax
mov eax, dword [ebp - 0x14]
mov dword [ecx + edi + 4], eax
add edi, 8
cmp dword [ebp - 0x44], 8
lea eax, [ebp - 0x58]
cmovae eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x78], 0
je 0x52445e
cmp dword [ebp - 0x44], 8
lea eax, [ebp - 0x58]
push 0
cmovae eax, dword [ebp - 0x58]
push 0x80
push 1
push 0
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x74], eax
cmp eax, 0xffffffff
je 0x52445e
push 0
lea ecx, [ebp - 0x80]
mov dword [ebp - 0x80], 0
push ecx
push edi
push dword [ebp - 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x74]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x5c], 8
lea eax, [ebp - 0x70]
cmovae eax, dword [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x58]
jmp 0x524461
lea eax, [ebp - 0x70]
push eax
mov ecx, esi
call fcn.00404890
lea ecx, [ebp - 0x70]
call fcn.00402680
lea ecx, [ebp - 0x58]
call fcn.00402680
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.006e70bb
mov esp, ebp
pop ebp
ret 4