Function at 0x420970
Capabilities:
Check if file exists
Get file attributes
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
mov ecx, 5
push 0
push 0
dec ecx
jne 0x420978
push ebx
push esi
push edi
mov byte [ebp - 9], al
xor eax, eax
push ebp
push 0x420cc8
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
lea eax, [ebp - 4]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x4c]
call sub.rtl250.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
push 1
mov esi, dword [0x4cd41c]
mov esi, dword [esi]
mov ecx, 0x7fffffff
mov edx, dword [ebp - 4]
mov eax, 0x420ce4
call esi
mov edx, eax
lea eax, [ebp - 4]
mov ecx, 0x7fffffff
call sub.rtl250.bpl__System__UStrDelete_qqrr20System_UnicodeStringii
lea eax, [ebp - 0x14]
mov ecx, 0x420cf4
mov edx, dword [ebp - 4]
call sub.rtl250.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x14]
call sub.rtl250.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x420be6
cmp byte [ebp - 9], 0
jne 0x420be6
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x40]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
sub eax, dword [edx + 0x38]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov dword [edx + 0x48c], eax
test eax, eax
jne 0x420bc7
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov dword [eax + 0x48c], 0x1000
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
jne 0x420a68
push 0
push 0
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x4c]
call sub.rtl250.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_CreateFileW
mov ebx, eax
jmp 0x420a9d
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea eax, [ebp - 0x18]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x4c]
mov ecx, 0
call sub.rtl250.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov eax, dword [ebp - 0x18]
call sub.rtl250.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
call sub.kernel32.dll_CreateFileA
mov ebx, eax
cmp ebx, 0xffffffff
je 0x420bc7
push 0
push 0
push 0
push 2
push 0
push ebx
call sub.kernel32.dll_CreateFileMappingA
mov esi, eax
test esi, esi
je 0x420bc1
push 0
push 0
push 0
push 4
push esi
call sub.kernel32.dll_MapViewOfFile
mov edi, eax
test edi, edi
je 0x420bbb
mov eax, edi
call fcn.0040e324
test eax, eax
je 0x420bb5
movzx edx, word [eax + 0x18]
cmp dx, 0x20b
jne 0x420aff
mov ecx, eax
add ecx, 0x108
mov dword [ebp - 0x10], ecx
jmp 0x420b0a
mov ecx, eax
add ecx, 0xf8
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x10]
test byte [ecx + 0x24], 0x20
je 0x420b58
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov dword [edx + 0x48c], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov dword [edx + 0x44], eax
add dword [ebp - 0x10], 0x28
mov eax, dword [ebp - 0x10]
test byte [eax + 0x24], 0x20
je 0x420bb5
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
mov edx, dword [ebp - 0x10]
add eax, dword [edx + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov dword [edx + 0x44], eax
jmp 0x420bb5
cmp dx, 0x20b
jne 0x420b8e
lea edx, [eax + 0x18]
mov edx, dword [edx + 0x14]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 4]
mov dword [ecx + 0x48c], edx
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x48c]
add eax, 0x18
add edx, dword [eax + 4]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov dword [eax + 0x44], edx
jmp 0x420bb5
mov edx, dword [eax + 0x2c]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 4]
mov dword [ecx + 0x48c], edx
mov edx, dword [ebp + 8]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x48c]
add edx, dword [eax + 0x1c]
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
mov dword [eax + 0x44], edx
push edi
call sub.kernel32.dll_UnmapViewOfFile
push esi
call sub.kernel32.dll_CloseHandle
push ebx
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp + 8]
push eax
lea eax, [ebp - 0x1c]
mov ecx, 0x420cf4
mov edx, dword [ebp - 4]
call sub.rtl250.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x1c]
call fcn.0041f894
pop ecx
mov ebx, eax
test bl, bl
jne 0x420c8d
cmp byte [ebp - 9], 0
jne 0x420c24
lea eax, [ebp - 0x20]
mov ecx, 0x420d0c
mov edx, dword [ebp - 4]
call sub.rtl250.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 8]
call fcn.0041d164
test al, al
je 0x420c24
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 8]
call fcn.0041e8d8
pop ecx
mov bl, 1
jmp 0x420c8d
lea eax, [ebp - 0x24]
mov ecx, 0x420d24
mov edx, dword [ebp - 4]
call sub.rtl250.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 8]
call fcn.0041d164
test al, al
je 0x420c54
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 8]
call fcn.0041dd78
pop ecx
test al, al
jne 0x420c58
xor ebx, ebx
jmp 0x420c5a
mov bl, 1
test bl, bl
jne 0x420c89
cmp byte [ebp - 9], 0
jne 0x420c85
mov eax, dword [ebp + 8]
push eax
lea eax, [ebp - 0x28]
mov ecx, 0x420d3c
mov edx, dword [ebp - 4]
call sub.rtl250.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x28]
call fcn.0041f120
pop ecx
test al, al
jne 0x420c89
xor eax, eax
jmp 0x420c8b
mov al, 1
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x420ccf
lea eax, [ebp - 0x28]
mov edx, 4
call sub.rtl250.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x18]
call sub.rtl250.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x14]
call sub.rtl250.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 8]
call sub.rtl250.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 4]
call sub.rtl250.bpl__System__UStrClr_qqrpv
ret