Function at 0x497c10
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov dword [ebp - 0x3c], ecx
cmp dword [ebp + 8], 0
je 0x497c62
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.00420250
add esp, 8
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x3c]
add edx, 4
push edx
call fcn.00518400
add esp, 8
cmp dword [ebp - 4], 0
je 0x497c62
mov eax, dword [ebp - 4]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.005124eb
add esp, 4
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x3c]
mov dword [edx + 0x20c], 0
mov eax, dword [ebp - 0x3c]
add eax, 4
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x497d91
mov ecx, dword [ebp - 0x3c]
cmp dword [ecx + 0x22c], 0
je 0x497d67
mov dword [ebp - 0xc], 0
push 0
push 0
push 3
push 0
push 7
push SysReAllocString
mov edx, dword [ebp - 0x3c]
add edx, 4
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
je 0x497d5d
mov dword [ebp - 0x18], 0
xor eax, eax
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [ebp - 0x18]
push eax
call fcn.004c8580
add esp, 4
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x10]
call fcn.0048b9f0
mov edx, dword [ebp - 0x18]
push edx
push 0
lea ecx, [ebp - 0x10]
call fcn.0048ba50
push eax
call fcn.00512af0
add esp, 0xc
mov dword [ebp - 0x1c], 0
push 0
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x10]
call fcn.0048ba50
push eax
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
mov ecx, dword [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x10]
call fcn.0048ba50
push eax
mov ecx, dword [ebp - 0x3c]
call fcn.00497e50
lea ecx, [ebp - 0x10]
call fcn.0048ba10
mov eax, dword [ebp - 0xc]
jmp 0x497e40
push 3
mov edx, dword [ebp - 0x3c]
add edx, 4
push edx
mov eax, dword [ebp - 0x3c]
mov ecx, dword [eax + 0x210]
call fcn.004122d0
movzx ecx, al
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 0x20]
jmp 0x497e40
push 0x98
call fcn.00512067
add esp, 4
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x497dc3
push 0x564654
push str.UTF_16
push 0x564648
mov ecx, dword [ebp - 0x34]
call fcn.00413140
mov dword [ebp - 0x40], eax
jmp 0x497dca
mov dword [ebp - 0x40], 0
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x3c]
mov ecx, dword [ecx + 0x210]
call fcn.00410e60
push 0x98
call fcn.00512067
add esp, 4
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x497e0f
mov edx, dword [ebp - 0x3c]
add edx, 0x108
push edx
mov ecx, dword [ebp - 0x38]
call fcn.004116d0
mov dword [ebp - 0x44], eax
jmp 0x497e16
mov dword [ebp - 0x44], 0
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x3c]
mov ecx, dword [edx + 0x210]
call fcn.00410e60
mov eax, dword [ebp - 0x3c]
mov ecx, dword [eax + 0x210]
mov byte [ecx + 0x75], 1
mov eax, 1
mov esp, ebp
pop ebp
ret 4