Function at 0x51ae80
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 0x7a8010
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x8cf144]
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.005072a0
add esp, 8
push 0x8b5798
test al, al
je 0x51aee2
mov ecx, esi
call fcn.004026c0
jmp 0x51b122
push edi
call fcn.0051a200
add esp, 8
test al, al
je 0x51af13
cmp dword [edi + 0x14], 8
jb 0x51aef9
mov eax, dword [edi]
jmp 0x51aefb
mov eax, edi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x51af13
push edi
mov ecx, esi
call fcn.00404290
jmp 0x51b122
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.00402a50
mov dword [ebp - 4], 0
call fcn.0073bfe6
push eax
xorps xmm0, xmm0
lea eax, [ebp - 0x40]
push 0x7b7810
push eax
movups xmmword [ebp - 0x40], xmm0
movups xmmword [ebp - 0x30], xmm0
movq qword [ebp - 0x20], xmm0
call fcn.00407f20
add esp, 0xc
lea eax, [ebp - 0x40]
lea ecx, [ebp - 0x58]
push eax
call fcn.00404180
push str..ico
lea ecx, [ebp - 0x58]
call fcn.00404180
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 0x51afc2
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
cmp dword [esi + 0x14], 8
jb 0x51afab
mov eax, dword [esi]
jmp 0x51afad
mov eax, esi
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x58]
push eax
mov ecx, esi
call fcn.00404400
jmp 0x51b11a
push edi
lea ecx, [ebp - 0x70]
call fcn.00404290
push str.icon.ico
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 1
call fcn.00404180
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 0x51b08b
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea ecx, [edi + 0xa]
push ecx
call fcn.006e619d
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.0073be83
push eax
xor ecx, ecx
mov byte [ebp - 0x18], 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x17], ecx
push 0x812e38
push eax
mov word [ebp - 0x13], cx
mov byte [ebp - 0x11], cl
call fcn.0040abd0
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 0x51b107
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 0x51b107
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 0x51b10a
lea eax, [ebp - 0x70]
push eax
mov ecx, esi
call fcn.00404840
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.006e615c
mov esp, ebp
pop ebp
ret 4