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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x40b640
push 0x40801d
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
push ebx
push esi
push edi
mov eax, dword [0x40d018]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 4], ebx
push esi
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
call edi
test eax, eax
je 0x404b1c
mov eax, dword [ebp + 8]
push eax
call edi
test eax, eax
je 0x404b1c
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push esi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
call edi
mov esi, eax
mov dword [ebp - 0x28], esi
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
mov ecx, dword [ebp + 8]
push ecx
call edi
mov edi, eax
mov dword [ebp - 0x34], edi
test esi, esi
je 0x404b1c
test edi, edi
je 0x404b1c
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x40], eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp dword [ebp - 0x40], eax
je 0x40489e
or edi, 0xffffffff
mov dword [ebp - 0x20], edi
mov dword [ebp - 4], 0xfffffffe
jmp 0x404b40
push 0
push 0
push 0
push 0x8000002
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov esi, eax
mov dword [ebp - 0x24], esi
push 0
push 0
push 0
push 0x8000002
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov edi, eax
mov dword [ebp - 0x30], edi
test esi, esi
je 0x404b1c
test edi, edi
je 0x404b1c
push 0
push 0
push 0
push 4
push esi
mov esi, dword [sym.imp.KERNEL32.dll_MapViewOfFile]
call esi
mov ebx, eax
mov dword [ebp - 0x38], ebx
push 0
push 0
push 0
push 4
push edi
call esi
mov dword [ebp - 0x2c], eax
test ebx, ebx
je 0x404b1c
test eax, eax
je 0x404b1c
mov esi, dword [ebx + 0x3c]
add esi, ebx
mov edi, dword [eax + 0x3c]
add edi, eax
push 0xf8
push esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x404ac5
push 0xf8
push edi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x404ac5
cmp dword [esi], 0x4550
jne 0x404a6c
cmp dword [edi], 0x4550
jne 0x404a6c
mov eax, dword [esi + 8]
cdq
add eax, 0xb6109100
adc edx, 2
push 0
push 0x989680
push edx
push eax
call fcn.004085d0
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x5c], eax
mov eax, edx
sar eax, 0x1f
mov dword [ebp - 0x58], edx
lea ecx, [ebp - 0x54]
push ecx
lea edx, [ebp - 0x5c]
push edx
mov esi, dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
call esi
lea eax, [ebp - 0x7c]
push eax
lea ecx, [ebp - 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
xor eax, eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov eax, dword [edi + 8]
cdq
add eax, 0xb6109100
adc edx, 2
push 0
push 0x989680
push edx
push eax
call fcn.004085d0
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x4c], eax
mov eax, edx
sar eax, 0x1f
mov dword [ebp - 0x48], edx
lea ecx, [ebp - 0x54]
push ecx
lea edx, [ebp - 0x4c]
push edx
call esi
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
mov eax, 0x10
lea ecx, [ebp - 0x6c]
lea edx, [ebp - 0x7c]
lea ecx, [ecx]
cmp eax, 4
jb 0x404a59
mov esi, dword [edx]
cmp esi, dword [ecx]
jne 0x404a16
sub eax, 4
add ecx, 4
add edx, 4
jmp 0x404a00
movzx eax, byte [edx]
movzx esi, byte [ecx]
sub eax, esi
jne 0x404a42
movzx eax, byte [edx + 1]
movzx esi, byte [ecx + 1]
sub eax, esi
jne 0x404a42
movzx eax, byte [edx + 2]
movzx esi, byte [ecx + 2]
sub eax, esi
jne 0x404a42
movzx eax, byte [edx + 3]
movzx edx, byte [ecx + 3]
sub eax, edx
sar eax, 0x1f
or eax, 1
mov edi, eax
mov dword [ebp - 0x20], edi
mov dword [ebp - 4], 0xfffffffe
jmp 0x404b40
xor eax, eax
mov edi, eax
mov dword [ebp - 0x20], edi
mov dword [ebp - 4], 0xfffffffe
jmp 0x404b40
push 0
push ebx
mov esi, dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
call esi
push 0
mov edi, dword [ebp - 0x2c]
push edi
call esi
push ebx
mov esi, dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
call esi
push edi
call esi
mov eax, dword [ebp - 0x24]
push eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov ecx, dword [ebp - 0x30]
push ecx
call esi
mov edx, dword [ebp - 0x28]
push edx
call esi
mov eax, dword [ebp - 0x34]
push eax
call esi
mov dword [ebp - 4], 0xfffffffe
or eax, 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push ebx
mov esi, dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
call esi
push 0
mov edi, dword [ebp - 0x2c]
push edi
call esi
push ebx
mov esi, dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
call esi
push edi
call esi
mov ecx, dword [ebp - 0x24]
push ecx
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov edx, dword [ebp - 0x30]
push edx
call esi
mov eax, dword [ebp - 0x28]
push eax
call esi
mov ecx, dword [ebp - 0x34]
push ecx
call esi
mov eax, 0xfffffffe
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, 0xfffffffe
mov dword [ebp - 0x20], edi
mov dword [ebp - 4], edi
jmp 0x404b40
test ebx, ebx
je 0x404b54
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x24]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x404b64
push eax
call ebx
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x404b6e
push eax
call ebx
mov esi, dword [ebp - 0x2c]
test esi, esi
je 0x404b85
push 0
push esi
call dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x404b8f
push eax
call ebx
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x404b99
push eax
call ebx
mov eax, edi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret