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

Disassembly:
push 0x74
mov eax, 0x5d1ede
call fcn.00492e9f
mov ebx, ecx
mov esi, dword [ebp + 8]
lea edi, [ebx + 0x18]
and dword [ebp - 0x80], 0
mov ecx, edi
push str.GameIconNull
call fcn.0042051f
push 0x640078
test eax, eax
jne 0x4361b2
mov ecx, esi
call fcn.00402120
jmp 0x4363d3
mov ecx, edi
call fcn.0042051f
test eax, eax
je 0x4361e1
cmp dword [edi + 0x14], 8
jb 0x4361c7
mov eax, dword [edi]
jmp 0x4361c9
mov eax, edi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4361e1
push edi
mov ecx, esi
call fcn.00404460
jmp 0x4363d3
push ebx
lea ecx, [ebp - 0x58]
call fcn.00404460
and dword [ebp - 4], 0
call fcn.0041d51a
push 0xa
mov edx, eax
lea edi, [ebp - 0x40]
pop ecx
xor eax, eax
push edx
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x40]
push 0x6412f4
push eax
call fcn.0042cdd3
add esp, 0xc
cmp word [ebp - 0x40], 0
jne 0x43621c
xor eax, eax
jmp 0x436226
lea eax, [ebp - 0x40]
push eax
call fcn.005abff2
pop ecx
push eax
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x58]
call fcn.00404690
mov edi, str..ico
push edi
call fcn.005abff2
pop ecx
push eax
push edi
lea ecx, [ebp - 0x58]
call fcn.00404690
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 0x43626f
lea eax, [ebp - 0x58]
mov ecx, esi
push eax
call fcn.00404a00
jmp 0x4363c7
push ebx
lea ecx, [ebp - 0x70]
call fcn.00404460
mov edi, str.icon.ico
mov byte [ebp - 4], 1
push edi
call fcn.005abff2
pop ecx
push eax
push edi
lea ecx, [ebp - 0x70]
call fcn.00404690
cmp dword [ebp - 0x5c], 8
lea eax, [ebp - 0x70]
cmovae eax, dword [ebp - 0x70]
xor ebx, ebx
push ebx
push 0x80
push 4
push ebx
push ebx
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], ebx
cmp eax, 0xffffffff
je 0x43633c
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [ebp - 0x74], edi
lea ecx, [edi + 0xa]
push ecx
call fcn.004929da
and dword [ebp - 0x7c], 0
mov ebx, eax
pop ecx
push 0
lea eax, [ebp - 0x7c]
push eax
push edi
mov edi, dword [ebp - 0x78]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x895440
push 0xf4240
call fcn.0041e109
push eax
xor eax, eax
mov byte [ebp - 0x18], 0
lea edi, [ebp - 0x17]
stosd dword es:[edi], eax
push 0x5d8b84
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x18]
push eax
call fcn.00420985
mov edi, dword [ebp - 0x74]
lea eax, [ebp - 0x18]
push 8
push eax
lea eax, [ebx + edi]
push eax
call fcn.005a8300
add esp, 0x20
add edi, 8
mov dword [ebp - 0x74], edi
cmp dword [ebp - 0x44], 8
lea eax, [ebp - 0x58]
cmovae eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test ebx, ebx
je 0x4363b0
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 edi, eax
cmp edi, 0xffffffff
je 0x4363b0
and dword [ebp - 0x78], 0
lea eax, [ebp - 0x78]
push 0
push eax
push dword [ebp - 0x74]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
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 0x4363b3
lea eax, [ebp - 0x70]
push eax
mov ecx, esi
call fcn.00404a00
push 0
push 1
lea ecx, [ebp - 0x70]
call fcn.00402230
push 0
push 1
lea ecx, [ebp - 0x58]
call fcn.00402230
mov eax, esi
call fcn.00492e49
ret 4