Function at 0x402ff0
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41aa08
push 0x40518c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov edi, ecx
mov dword [ebp - 0x34], edi
mov esi, dword [ebp + 8]
test esi, esi
jle 0x403284
cmp esi, 0x7fff
jg 0x403284
call fcn.00402cc0
mov dword [ebp - 0x30], eax
test eax, eax
jl 0x403284
cmp dword [edi], 0
je 0x403284
cmp eax, esi
jne 0x403067
mov eax, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x4228b0]
test eax, eax
jne 0x4030ba
push str.imagehlp.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x4228b0], eax
test eax, eax
je 0x403284
push str.CheckSumMappedFile
push eax
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call esi
mov dword [0x4228ac], eax
push str.ImageNtHeader
mov eax, dword [0x4228b0]
push eax
call esi
mov dword [0x4228a8], eax
mov eax, dword [0x4228b0]
test eax, eax
je 0x403284
mov eax, dword [0x4228ac]
test eax, eax
je 0x403284
mov eax, dword [0x4228a8]
test eax, eax
je 0x403284
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
lea ecx, [edi + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
test esi, esi
je 0x403284
cmp esi, 0xffffffff
je 0x403284
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x40], eax
cmp eax, 0xffffffff
je 0x40327d
mov edx, dword [edi]
add edx, 4
cmp eax, edx
jbe 0x40327d
push 0
push 0
push 0
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov edi, eax
mov dword [ebp - 0x2c], edi
push esi
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
test edi, edi
je 0x403284
cmp edi, 0xffffffff
je 0x403284
push 0
push 0
push 0
push 6
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
mov dword [ebp - 0x28], esi
test esi, esi
je 0x40318b
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x34]
mov edx, dword [ecx]
lea eax, [edx + esi]
lea ecx, [ebp - 0x38]
mov edx, dword [eax]
cmp edx, dword [ecx]
je 0x403193
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push edi
call ebx
jmp 0x403284
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x3c], ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
push 4
lea edx, [ebp - 0x3c]
push edx
push eax
call fcn.00404b20
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
mov byte [ebp - 0x1c], 0x50
mov byte [ebp - 0x1b], 0x45
mov byte [ebp - 0x1a], bl
mov byte [ebp - 0x19], bl
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x40]
push edx
push esi
call dword [0x4228ac]
push esi
call dword [0x4228a8]
test eax, eax
je 0x40320e
mov ecx, dword [eax + 0x58]
cmp ecx, dword [ebp - 0x20]
jne 0x40320e
lea edx, [ebp - 0x1c]
mov ecx, dword [eax]
cmp ecx, dword [edx]
jne 0x40320e
mov ebx, 1
mov dword [ebp - 4], ebx
mov edx, dword [ebp - 0x24]
mov dword [eax + 0x58], edx
mov dword [ebp - 4], 0xffffffff
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4