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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c4
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x1c], 0xffffffff
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x85c], 0xffffffff
mov dword [ebp - 0x40], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x14], 8
mov dword [ebp - 0x454], 0x100000
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x30], 0
push 0x400
push 0
lea eax, [ebp - 0x858]
push eax
call fcn.00407070
add esp, 0xc
cmp dword [ebp + 8], 0
je 0x405345
cmp dword [ebp + 0xc], 0
jne 0x40534f
jmp 0x405a42
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
mov ecx, dword [ebp + 8]
push ecx
call dword [0x417138]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
jne 0x40537e
jmp 0x405a42
push 0
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x20], eax
push 0
push 0
push 0
push 2
push 0
mov eax, dword [ebp - 0x1c]
push eax
call dword [0x417140]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x4053b4
jmp 0x405a42
mov dword [ebp - 0x48], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x458], 0
push 0
push 1
call fcn.004065e0
add esp, 8
test eax, eax
jne 0x405a2a
mov ecx, dword [ebp - 0x458]
cmp ecx, dword [ebp - 0x20]
jae 0x405a2a
mov eax, dword [ebp - 0x48]
xor edx, edx
div dword [ebp - 0x454]
add edx, dword [ebp - 0xc]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x48]
xor edx, edx
div dword [ebp - 0x454]
imul eax, dword [ebp - 0x454]
mov dword [ebp - 0x48], eax
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
add eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x48]
push ecx
push 0
push 4
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x405447
jmp 0x405a42
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x44]
add ecx, dword [ebp - 0xc]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x44]
mov eax, dword [edx]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x44]
add ecx, 4
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x44]
mov eax, dword [edx]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 0x24], 0
mov edx, dword [ebp - 0x2c]
add edx, dword [ebp - 0x18]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x14]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x18]
add ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x48]
push edx
push 0
push 4
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x4054be
jmp 0x405a42
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x44]
add edx, dword [ebp - 0xc]
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x44]
push ecx
lea edx, [ebp - 0x450]
push edx
call fcn.004070f0
add esp, 0xc
mov eax, dword [ebp - 0x18]
mov byte [ebp + eax - 0x450], 0
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 0x24], 0
lea edx, [ebp - 0x450]
push edx
mov eax, dword [ebp + 0xc]
push eax
push str._s_s
lea ecx, [ebp - 0x858]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [ebp - 0x858]
push edx
call fcn.00405ac0
add esp, 4
cmp dword [ebp - 0x28], 0
jne 0x405681
lea eax, [ebp - 0x858]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405681
lea ecx, [ebp - 0x858]
push ecx
push 0x4064a0
push 0
push 0x68
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.USER32.dll_DialogBoxParamA]
mov dword [ebp - 0x860], eax
cmp dword [ebp - 0x860], 2
je 0x405677
cmp dword [ebp - 0x860], 7
je 0x4055a7
cmp dword [ebp - 0x860], 0x3eb
je 0x40559b
jmp 0x405681
mov dword [ebp - 0x28], 1
jmp 0x405681
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp - 0x454]
jbe 0x4055d3
mov edx, dword [ebp - 0xc]
sub edx, dword [ebp - 0x454]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x48]
add eax, dword [ebp - 0x454]
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x458]
add ecx, dword [ebp - 0x10]
mov dword [ebp - 0x458], ecx
mov edx, dword [ebp - 0x10]
sub edx, dword [ebp - 0x2c]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x48]
add eax, dword [ebp - 0x10]
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x458]
mov dword [ebp - 0x868], ecx
mov dword [ebp - 0x864], 0
fild qword [ebp - 0x868]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x870], edx
mov dword [ebp - 0x86c], 0
fild qword [ebp - 0x870]
fdivp st(1)
fmul qword [0x413cc0]
fadd qword [0x413cb8]
fnstcw word [ebp - 0x872]
movzx eax, word [ebp - 0x872]
or eax, 0xc00
mov dword [ebp - 0x878], eax
fldcw word [ebp - 0x878]
fistp qword [ebp - 0x880]
fldcw word [ebp - 0x872]
mov eax, dword [ebp - 0x880]
push eax
push 2
call fcn.00406600
add esp, 8
jmp 0x4053cc
jmp 0x405a42
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
lea ecx, [ebp - 0x858]
push ecx
call dword [0x417138]
mov dword [ebp - 0x85c], eax
cmp dword [ebp - 0x85c], 0xffffffff
jne 0x4056b9
jmp 0x405a42
mov edx, dword [ebp - 0x10]
sub edx, dword [ebp - 0x2c]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
sub eax, 8
jne 0x40572b
mov ecx, dword [ebp - 0x10]
sub ecx, 8
jmp 0x4056dc
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0x10]
add edx, dword [ebp - 0xc]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x454]
jbe 0x40570b
mov ecx, dword [ebp - 0xc]
sub ecx, dword [ebp - 0x454]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0x48]
add edx, dword [ebp - 0x454]
mov dword [ebp - 0x48], edx
mov eax, dword [ebp - 0x2c]
add eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x458]
mov dword [ebp - 0x458], eax
mov ecx, dword [ebp - 0x30]
add ecx, 1
mov dword [ebp - 0x30], ecx
jmp 0x4053cc
push 0
mov edx, dword [ebp - 0x10]
push edx
push 0
push 4
push 0
mov eax, dword [ebp - 0x85c]
push eax
call dword [0x417140]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x405757
jmp 0x405a42
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 0x18]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebp - 0x454]
jbe 0x40578a
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x454]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x48]
add ecx, dword [ebp - 0x454]
mov dword [ebp - 0x48], ecx
push 0
push 1
call fcn.004065e0
add esp, 8
test eax, eax
jne 0x40590f
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x10]
jae 0x40590f
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x454]
jae 0x4057c6
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp - 4]
mov dword [ebp - 0x884], ecx
jmp 0x4057d2
mov edx, dword [ebp - 0x454]
mov dword [ebp - 0x884], edx
mov eax, dword [ebp - 0x884]
mov dword [ebp - 0x4c], eax
mov ecx, dword [ebp - 0x4c]
add ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x48]
push edx
push 0
push 4
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x405807
jmp 0x405a42
mov ecx, dword [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 4]
push edx
push 0
push 2
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x405830
jmp 0x405a42
mov ecx, dword [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 0x24]
add edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 8]
push eax
call fcn.004070f0
add esp, 0xc
mov ecx, dword [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x4c]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x48]
add ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 8], 0
mov ecx, dword [ebp - 0x458]
add ecx, dword [ebp - 4]
mov dword [ebp - 0x88c], ecx
mov dword [ebp - 0x888], 0
fild qword [ebp - 0x88c]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x894], edx
mov dword [ebp - 0x890], 0
fild qword [ebp - 0x894]
fdivp st(1)
fmul qword [0x413cc0]
fadd qword [0x413cb8]
fnstcw word [ebp - 0x896]
movzx eax, word [ebp - 0x896]
or eax, 0xc00
mov dword [ebp - 0x89c], eax
fldcw word [ebp - 0x89c]
fistp qword [ebp - 0x8a4]
fldcw word [ebp - 0x896]
mov eax, dword [ebp - 0x8a4]
push eax
push 2
call fcn.00406600
add esp, 8
jmp 0x40578a
cmp dword [ebp - 8], 0
je 0x405926
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 8], 0
cmp dword [ebp - 0x40], 0
je 0x40593d
mov edx, dword [ebp - 0x40]
push edx
call dword [0x41713c]
mov dword [ebp - 0x40], 0
cmp dword [ebp - 0x85c], 0xffffffff
je 0x40595d
mov eax, dword [ebp - 0x85c]
push eax
call dword [0x41713c]
mov dword [ebp - 0x85c], 0xffffffff
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x10]
je 0x40596f
jmp 0x405a42
lea edx, [ebp - 0x858]
push edx
call fcn.00405b80
add esp, 4
test eax, eax
jne 0x40598c
jmp 0x405a42
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x2c]
add eax, dword [ebp - 0x458]
mov dword [ebp - 0x458], eax
mov ecx, dword [ebp - 0x30]
add ecx, 1
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x458]
mov dword [ebp - 0x8ac], edx
mov dword [ebp - 0x8a8], 0
fild qword [ebp - 0x8ac]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x8b4], eax
mov dword [ebp - 0x8b0], 0
fild qword [ebp - 0x8b4]
fdivp st(1)
fmul qword [0x413cc0]
fadd qword [0x413cb8]
fnstcw word [ebp - 0x8b6]
movzx eax, word [ebp - 0x8b6]
or eax, 0xc00
mov dword [ebp - 0x8bc], eax
fldcw word [ebp - 0x8bc]
fistp qword [ebp - 0x8c4]
fldcw word [ebp - 0x8b6]
mov ecx, dword [ebp - 0x8c4]
push ecx
push 2
call fcn.00406600
add esp, 8
jmp 0x4053cc
mov edx, dword [ebp - 0x458]
cmp edx, dword [ebp - 0x20]
jne 0x405a42
cmp dword [ebp - 0x30], 0
je 0x405a42
mov dword [ebp - 0x34], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 8], 0
je 0x405a5b
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x40], 0
je 0x405a6b
mov ecx, dword [ebp - 0x40]
push ecx
call dword [0x41713c]
cmp dword [ebp - 0x85c], 0xffffffff
je 0x405a81
mov edx, dword [ebp - 0x85c]
push edx
call dword [0x41713c]
cmp dword [ebp - 0x24], 0
je 0x405a91
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x38], 0
je 0x405aa1
mov ecx, dword [ebp - 0x38]
push ecx
call dword [0x41713c]
cmp dword [ebp - 0x1c], 0xffffffff
je 0x405ab1
mov edx, dword [ebp - 0x1c]
push edx
call dword [0x41713c]
mov eax, dword [ebp - 0x34]
mov esp, ebp
pop ebp
ret