Function at 0x4186c0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
cmp dword [ebp + 0xc], 1
jne 0x4186e6
push 0
push 0
push 3
push 0
push 3
push 0x80000000
push dword [ebp + 8]
call sub.kernel32.dll_CreateFileA
jmp 0x4186fd
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
push dword [ebp + 8]
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
jne 0x41870c
mov eax, 0
pop ebx
leave
ret 8
mov dword [ebp - 8], eax
mov dword [ebp - 0x24], 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 8]
call sub.kernel32.dll_GetFileSize
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x418743
cmp dword [ebp - 0x10], 0
jne 0x418743
push dword [ebp - 8]
call sub.kernel32.dll_CloseHandle
mov eax, 0
pop ebx
leave
ret 8
cmp dword [ebp + 0xc], 1
jne 0x41875d
push 0
push 0
push 0
push 2
push 0
push dword [ebp - 8]
call sub.kernel32.dll_CreateFileMappingA
jmp 0x41876f
push 0
push 0
push 0
push 4
push 0
push dword [ebp - 8]
call sub.kernel32.dll_CreateFileMappingA
or eax, eax
jne 0x418785
push dword [ebp - 8]
call sub.kernel32.dll_CloseHandle
mov eax, 0
pop ebx
leave
ret 8
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0xc], 0x20000000
ja 0x418797
cmp dword [ebp - 0x10], 0
jbe 0x4187d3
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push dword [ebp - 0x18]
push dword [ebp - 8]
call fcn.00418a32
or eax, eax
jne 0x41883c
push dword [ebp - 0x18]
call sub.kernel32.dll_CloseHandle
push dword [ebp - 8]
call sub.kernel32.dll_CloseHandle
mov eax, 0
pop ebx
leave
ret 8
cmp dword [ebp + 0xc], 1
jne 0x4187ed
push 0
push 0
push 0
push 0
push 4
push dword [ebp - 0x18]
call sub.kernel32.dll_MapViewOfFileEx
jmp 0x418802
push 0
push 0
push 0
push 0
push 0xf001f
push dword [ebp - 0x18]
call sub.kernel32.dll_MapViewOfFileEx
or eax, eax
jne 0x41883c
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push dword [ebp - 0x18]
push dword [ebp - 8]
call fcn.00418a32
or eax, eax
jne 0x41883c
push dword [ebp - 0x18]
call sub.kernel32.dll_CloseHandle
push dword [ebp - 8]
call sub.kernel32.dll_CloseHandle
mov eax, 0
pop ebx
leave
ret 8
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
call fcn.0041ab50
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x418877
push dword [ebp - 0x1c]
call sub.kernel32.dll_UnmapViewOfFile
push dword [ebp - 0x18]
call sub.kernel32.dll_CloseHandle
push dword [ebp - 8]
call sub.kernel32.dll_CloseHandle
mov eax, 0
pop ebx
leave
ret 8
cmp dword [ebp - 0x14], 1
je 0x418883
cmp dword [ebp - 0x14], 4
jne 0x418902
push dword [ebp - 0x24]
push dword [ebp + 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push dword [ebp + 8]
push dword [ebp - 0x1c]
call fcn.00418bc4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4188c5
push dword [ebp - 0x1c]
call sub.kernel32.dll_UnmapViewOfFile
push dword [ebp - 0x18]
call sub.kernel32.dll_CloseHandle
push dword [ebp - 8]
call sub.kernel32.dll_CloseHandle
mov eax, 0
pop ebx
leave
ret 8
cmp dword [ebp + 0xc], 0
jne 0x4188e8
push dword [ebp - 0x1c]
call sub.kernel32.dll_UnmapViewOfFile
push dword [ebp - 0x18]
call sub.kernel32.dll_CloseHandle
push dword [ebp - 8]
call sub.kernel32.dll_CloseHandle
jmp 0x418a1e
mov ebx, dword [ebp - 4]
mov eax, dword [ebp - 0x18]
mov dword [ebx + 0x138], eax
mov eax, dword [ebp - 8]
mov dword [ebx + 0x13c], eax
jmp 0x418a1e
cmp dword [ebp - 0x14], 2
jne 0x418994
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x1c]
call fcn.0041a240
or eax, eax
jne 0x41893e
push dword [ebp - 0x1c]
call sub.kernel32.dll_UnmapViewOfFile
push dword [ebp - 0x18]
call sub.kernel32.dll_CloseHandle
push dword [ebp - 8]
call sub.kernel32.dll_CloseHandle
mov eax, 0
pop ebx
leave
ret 8
mov dword [ebp - 0x20], eax
push dword [ebp - 0x1c]
call sub.kernel32.dll_UnmapViewOfFile
push dword [ebp - 0x18]
call sub.kernel32.dll_CloseHandle
push dword [ebp - 8]
call sub.kernel32.dll_CloseHandle
push dword [ebp - 0x24]
push dword [ebp + 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push dword [ebp + 8]
push dword [ebp - 0x20]
call fcn.00418bc4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x418a1e
push dword [ebp - 0x20]
call sub.kernel32.dll_GlobalFree
mov eax, 0
pop ebx
leave
ret 8
cmp dword [ebp - 0x14], 3
jne 0x418a1e
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x1c]
call fcn.0041a2d0
or eax, eax
jne 0x4189d0
push dword [ebp - 0x1c]
call sub.kernel32.dll_UnmapViewOfFile
push dword [ebp - 0x18]
call sub.kernel32.dll_CloseHandle
push dword [ebp - 8]
call sub.kernel32.dll_CloseHandle
mov eax, 0
pop ebx
leave
ret 8
mov dword [ebp - 0x20], eax
push dword [ebp - 0x1c]
call sub.kernel32.dll_UnmapViewOfFile
push dword [ebp - 0x18]
call sub.kernel32.dll_CloseHandle
push dword [ebp - 8]
call sub.kernel32.dll_CloseHandle
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push dword [ebp + 8]
push dword [ebp - 0x20]
call fcn.00418bc4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x418a1e
push dword [ebp - 0x20]
call sub.kernel32.dll_GlobalFree
mov eax, 0
pop ebx
leave
ret 8
mov ebx, dword [ebp - 4]
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0x110], eax
mov eax, dword [ebp - 4]
pop ebx
leave
ret 8