Function at 0x40be60
Capabilities:
Check if file exists
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4297c6
mov eax, dword fs:[0]
push eax
sub esp, 0x268
mov eax, dword [0x438040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x24c], ecx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40bead
mov ecx, dword [ebp - 0x24c]
cmp dword [ecx + 0xc], 0
jne 0x40beb4
xor eax, eax
jmp 0x40c1e3
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
mov ecx, dword [ebp - 0x24c]
add ecx, 0x580
call fcn.00401fe0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x25c], eax
cmp dword [ebp - 0x25c], 0xffffffff
jne 0x40bef4
xor eax, eax
jmp 0x40c1e3
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x254], 0
mov dword [ebp - 0x260], 1
mov dword [ebp - 0x250], 0
push 0
mov edx, dword [ebp - 0x25c]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x264], eax
mov ecx, 0xb
mov esi, str.IIME_STCODETABLE_READ
lea edi, [ebp - 0x218]
rep movsd dword es:[edi], dword [esi]
push 0x1dc
push 0
lea eax, [ebp - 0x1ec]
push eax
call fcn.0041de40
add esp, 0xc
lea ecx, [ebp - 0x218]
push ecx
mov ecx, dword [ebp - 0x24c]
add ecx, 0x580
call fcn.00401fe0
push eax
call fcn.00418b70
add esp, 8
lea edx, [ebp - 0x218]
push edx
mov eax, dword [ebp - 0x264]
push eax
push 0
push 2
push 0
mov ecx, dword [ebp - 0x25c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x258], eax
cmp dword [ebp - 0x258], 0
jne 0x40bfb9
mov dword [ebp - 0x260], 0
jmp 0x40c17d
push 0
push 0
push 0
push 4
mov edx, dword [ebp - 0x258]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x254], eax
cmp dword [ebp - 0x254], 0
jne 0x40bfec
mov dword [ebp - 0x260], 0
jmp 0x40c17d
mov edi, dword [ebp - 0x24c]
add edi, 0x10
mov ecx, 0x159
mov esi, dword [ebp - 0x254]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x24c]
mov dword [eax + 0x57c], 0
mov ecx, dword [ebp - 0x24c]
call fcn.0040c200
mov ecx, dword [ebp - 0x24c]
mov dword [ecx], eax
mov edx, dword [ebp - 0x24c]
cmp dword [edx], 0
jne 0x40c03f
mov dword [ebp - 0x260], 0
jmp 0x40c17d
mov eax, dword [ebp - 0x24c]
mov ecx, dword [eax + 0xcc]
mov dword [ebp - 0x250], ecx
mov edx, dword [ebp - 0x250]
cmp edx, dword [ebp - 0x264]
jae 0x40c17d
mov eax, dword [ebp - 0x254]
add eax, dword [ebp - 0x250]
push eax
lea ecx, [ebp - 0x248]
call fcn.00402080
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x248]
call fcn.00401fd0
mov ecx, dword [ebp - 0x250]
lea edx, [ecx + eax*2 + 2]
mov dword [ebp - 0x250], edx
mov eax, dword [ebp - 0x254]
add eax, dword [ebp - 0x250]
push eax
lea ecx, [ebp - 0x230]
call fcn.00402080
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x230]
call fcn.00401fd0
mov ecx, dword [ebp - 0x250]
lea edx, [ecx + eax*2 + 2]
mov dword [ebp - 0x250], edx
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x26c], esp
lea eax, [ebp - 0x230]
push eax
call fcn.00402160
mov dword [ebp - 0x270], eax
mov byte [ebp - 4], 2
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x274], esp
lea edx, [ebp - 0x248]
push edx
call fcn.00402160
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x24c]
call fcn.0040c360
mov dword [ebp - 0x268], eax
cmp dword [ebp - 0x268], 0
jne 0x40c157
mov dword [ebp - 0x260], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x230]
call fcn.00402020
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x248]
call fcn.00402020
jmp 0x40c17d
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x230]
call fcn.00402020
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x248]
call fcn.00402020
jmp 0x40c051
cmp dword [ebp - 0x254], 0
je 0x40c19d
mov eax, dword [ebp - 0x254]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 0x254], 0
cmp dword [ebp - 0x258], 0
je 0x40c1bd
mov ecx, dword [ebp - 0x258]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x258], 0
cmp dword [ebp - 0x25c], 0xffffffff
je 0x40c1dd
mov edx, dword [ebp - 0x25c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x25c], 0
mov eax, dword [ebp - 0x260]
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.0041c52e
mov esp, ebp
pop ebp
ret 4