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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x40b020]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 0x22c], ecx
mov dword [ebp - 0x21c], 0
mov dword [ebp - 0x218], 0xffffffff
mov eax, dword [ebp + 8]
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x228], 0
mov ecx, dword [ebp - 0x22c]
cmp dword [ecx + 0x468], 0
jne 0x4018d3
mov edx, dword [ebp - 0x22c]
mov eax, dword [edx + 0x480]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 0x22c]
mov eax, dword [ecx + 0x480]
jmp 0x401adf
mov edx, dword [ebp - 0x22c]
cmp dword [edx + 4], 0
je 0x401903
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x22c]
add ecx, 0x152
push ecx
lea edx, [ebp - 0x210]
push edx
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
mov dword [ebp - 0x220], eax
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
mov eax, dword [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x218], eax
cmp dword [ebp - 0x218], 0xffffffff
jne 0x401947
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x228], eax
jmp 0x401a7f
push 0
mov ecx, dword [ebp - 0x218]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0xffffffff
jne 0x40197b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x228], eax
jmp 0x401a7f
push 0
mov edx, dword [ebp - 0x214]
push edx
push 0
push 2
push 0
mov eax, dword [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x21c], eax
cmp dword [ebp - 0x21c], 0
jne 0x4019bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x228], eax
jmp 0x401a7f
mov ecx, dword [ebp - 0x214]
push ecx
push 0
push 0
push 4
mov edx, dword [ebp - 0x21c]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, dword [ebp - 0x22c]
mov dword [ecx + 0x470], eax
mov edx, dword [ebp - 0x214]
sub edx, 4
push edx
mov eax, dword [ebp - 0x22c]
mov ecx, dword [eax + 0x470]
push ecx
call fcn.00401290
add esp, 8
mov dword [ebp - 0x224], eax
mov edx, dword [ebp - 0x22c]
mov eax, dword [edx + 0x470]
mov ecx, dword [ebp - 0x214]
mov edx, dword [eax + ecx - 4]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 0x224]
cmp eax, dword [ebp - 4]
je 0x401a37
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x401a7f
mov ecx, dword [ebp - 0x22c]
call fcn.00402010
test eax, eax
jne 0x401a56
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x228], eax
jmp 0x401a7f
mov ecx, dword [ebp - 0x22c]
call fcn.00401b10
test eax, eax
jne 0x401a75
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x228], eax
jmp 0x401a7f
mov dword [ebp - 0x228], 0
mov ecx, dword [ebp - 0x22c]
cmp dword [ecx + 0x470], 0
je 0x401ab1
mov edx, dword [ebp - 0x22c]
mov eax, dword [edx + 0x470]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [ebp - 0x22c]
mov dword [ecx + 0x470], 0
cmp dword [ebp - 0x21c], 0
je 0x401ac7
mov edx, dword [ebp - 0x21c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x218], 0xffffffff
je 0x401add
mov eax, dword [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00404b30
mov esp, ebp
pop ebp
ret 4