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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x458
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x28], 0xffffffff
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], 0xffffffff
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x3c], 0
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
mov eax, dword [ebp + 8]
push eax
call dword [0x417138]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0xffffffff
jne 0x405c13
jmp 0x4062f2
push 0
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
sub eax, 8
mov dword [ebp - 4], eax
push 0
push 0
push 0
push 2
push 0
mov edx, dword [ebp - 0x28]
push edx
call dword [0x417140]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x405c4c
jmp 0x4062f2
push 0
push 0
push 0
push 4
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x405c85
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 8
jne 0x405c7b
mov dword [ebp - 0x3c], 1
jmp 0x405c85
jmp 0x4062f2
cmp dword [ebp - 0x3c], 0
je 0x405ca0
push 8
push 0
push 0
push 4
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x20]
mov eax, dword [edx]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 4]
mov dword [0x417134], edx
cmp dword [ebp - 0x3c], 0
jne 0x405cf0
mov eax, dword [ebp - 8]
add eax, 0x20
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x405cf0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 8
jne 0x405ce6
mov dword [ebp - 0x3c], 1
jmp 0x405cf0
jmp 0x4062f2
cmp dword [0x41712c], 0
je 0x405d1d
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x20]
add edx, 8
push edx
call fcn.0040310a
add esp, 0x14
jmp 0x405ec8
mov eax, dword [0x417134]
and eax, 1
je 0x405d4f
cmp dword [ebp - 0x3c], 0
jne 0x405d4f
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x20]
add edx, 8
push edx
mov eax, dword [ebp - 0x1c]
push eax
call fcn.004070f0
add esp, 0xc
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x18], ecx
jmp 0x405ec8
mov edx, dword [0x417134]
and edx, 1
je 0x405d72
cmp dword [ebp - 0x3c], 0
je 0x405d72
mov eax, dword [ebp - 8]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x24], 1
jmp 0x405ec8
cmp dword [ebp - 0x3c], 0
jne 0x405ddd
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x20]
add edx, 8
push edx
call fcn.004021ea
add esp, 0x14
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 8]
jb 0x405da7
mov ecx, dword [ebp - 0x18]
cmp ecx, dword [ebp - 4]
jne 0x405dd8
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 8]
jne 0x405dce
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x20]
add ecx, 8
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call fcn.004070f0
add esp, 0xc
mov eax, dword [ebp - 4]
mov dword [ebp - 0x18], eax
jmp 0x405dd8
jmp 0x4062f2
jmp 0x405ec8
push 0
call fcn.004042b0
add esp, 4
push eax
push 0x413cc8
lea ecx, [ebp - 0x440]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0
push 0x4000000
push 2
push 0
push 3
push 0xc0000000
lea edx, [ebp - 0x440]
push edx
call dword [0x417138]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x405e2f
jmp 0x4062f2
push 0
mov eax, dword [ebp - 8]
push eax
push 0
push 4
push 0
mov ecx, dword [ebp - 0x14]
push ecx
call dword [0x417140]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x405e58
jmp 0x4062f2
cmp dword [ebp - 0x20], 0
je 0x405e81
push 0
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x20]
add eax, 8
push eax
call fcn.0040280b
add esp, 0x18
jmp 0x405e9f
mov ecx, dword [ebp - 0xc]
push ecx
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
mov edx, dword [ebp - 4]
push edx
push 0
call fcn.0040280b
add esp, 0x18
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 8]
jae 0x405ec8
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 8]
jne 0x405ebe
mov edx, dword [ebp - 8]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x24], 1
jmp 0x405ec8
jmp 0x4062f2
cmp dword [ebp - 0x20], 0
je 0x405edf
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 0x20], 0
cmp dword [ebp - 0xc], 0
je 0x405ef6
mov ecx, dword [ebp - 0xc]
push ecx
call dword [0x41713c]
mov dword [ebp - 0xc], 0
cmp dword [ebp - 0x28], 0xffffffff
je 0x405f0d
mov edx, dword [ebp - 0x28]
push edx
call dword [0x41713c]
mov dword [ebp - 0x28], 0xffffffff
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
mov eax, dword [ebp + 8]
push eax
call dword [0x417138]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0xffffffff
jne 0x405f3c
jmp 0x4062f2
push 0
mov ecx, dword [ebp - 0x18]
push ecx
push 0
push 4
push 0
mov edx, dword [ebp - 0x28]
push edx
call dword [0x417140]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x405f65
jmp 0x4062f2
cmp dword [ebp - 0x3c], 0
jne 0x405fbe
push 0
push 0
push 0
push 2
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x405fa4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 8
jne 0x405f9a
mov dword [ebp - 0x3c], 1
jmp 0x405fa4
jmp 0x4062f2
cmp dword [ebp - 0x3c], 0
jne 0x405fbe
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x20]
push eax
call fcn.004070f0
add esp, 0xc
cmp dword [ebp - 0x3c], 0
je 0x4062eb
mov dword [ebp - 0x448], 0
cmp dword [ebp - 0x1c], 0
je 0x40609a
mov ecx, dword [ebp - 0x18]
sub ecx, dword [ebp - 0x448]
je 0x406095
mov edx, dword [ebp - 0x18]
sub edx, dword [ebp - 0x448]
cmp edx, 0x2000000
ja 0x40600d
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x448]
mov dword [ebp - 0x444], eax
jmp 0x406017
mov dword [ebp - 0x444], 0x2000000
cmp dword [ebp - 0x20], 0
je 0x406027
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edx, dword [ebp - 0x444]
push edx
mov eax, dword [ebp - 0x448]
push eax
push 0
push 2
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x406056
jmp 0x4062f2
mov edx, dword [ebp - 0x1c]
add edx, dword [ebp - 0x448]
je 0x40607e
mov eax, dword [ebp - 0x444]
push eax
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x448]
push ecx
mov edx, dword [ebp - 0x20]
push edx
call fcn.004070f0
add esp, 0xc
mov eax, dword [ebp - 0x448]
add eax, dword [ebp - 0x444]
mov dword [ebp - 0x448], eax
jmp 0x405fdc
jmp 0x4062eb
cmp dword [ebp - 0x24], 0
jne 0x406190
mov ecx, dword [ebp - 0x18]
sub ecx, dword [ebp - 0x448]
je 0x40618b
mov edx, dword [ebp - 0x18]
sub edx, dword [ebp - 0x448]
cmp edx, 0x2000000
ja 0x4060d5
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x448]
mov dword [ebp - 0x444], eax
jmp 0x4060df
mov dword [ebp - 0x444], 0x2000000
cmp dword [ebp - 0x20], 0
je 0x4060ef
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edx, dword [ebp - 0x444]
push edx
mov eax, dword [ebp - 0x448]
push eax
push 0
push 2
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x40611e
jmp 0x4062f2
cmp dword [ebp - 0x10], 0
je 0x40612e
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x444]
push eax
mov ecx, dword [ebp - 0x448]
push ecx
push 0
push 2
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40615d
jmp 0x4062f2
mov eax, dword [ebp - 0x444]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x20]
push edx
call fcn.004070f0
add esp, 0xc
mov eax, dword [ebp - 0x448]
add eax, dword [ebp - 0x444]
mov dword [ebp - 0x448], eax
jmp 0x4060a4
jmp 0x4062eb
mov dword [ebp - 0x450], 0
mov dword [ebp - 0x454], 0
mov dword [ebp - 0x44c], 0
jmp 0x4061c2
mov ecx, dword [ebp - 0x44c]
add ecx, dword [ebp - 0x450]
mov dword [ebp - 0x44c], ecx
mov edx, dword [ebp - 0x44c]
cmp edx, dword [ebp - 8]
jae 0x4062a1
mov eax, dword [ebp - 0x454]
add eax, 0x2000000
cmp eax, dword [ebp - 8]
jae 0x4061ed
mov dword [ebp - 0x458], 0x2000000
jmp 0x4061fc
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp - 0x454]
mov dword [ebp - 0x458], ecx
mov edx, dword [ebp - 0x458]
mov dword [ebp - 0x450], edx
cmp dword [ebp - 0x20], 0
je 0x40621f
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 0x20], 0
mov ecx, dword [ebp - 0x450]
add ecx, 8
push ecx
mov edx, dword [ebp - 0x44c]
push edx
push 0
push 2
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x406251
jmp 0x4062f2
mov ecx, dword [ebp - 0x450]
push ecx
mov eax, dword [ebp - 0x44c]
xor edx, edx
mov ecx, 0x2000000
div ecx
mov eax, dword [ebp - 0x20]
lea ecx, [eax + edx + 8]
push ecx
mov eax, dword [ebp - 0x44c]
xor edx, edx
mov ecx, 0x2000000
div ecx
add edx, dword [ebp - 0x20]
push edx
call fcn.00407710
add esp, 0xc
mov edx, dword [ebp - 0x454]
add edx, dword [ebp - 0x450]
mov dword [ebp - 0x454], edx
jmp 0x4061b0
cmp dword [ebp - 0x20], 0
je 0x4062b8
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 0x20], 0
cmp dword [ebp - 0xc], 0
je 0x4062cf
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0xc], 0
push 0
push 0
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov dword [ebp - 0x30], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x1c], 0
je 0x40630b
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x20], 0
je 0x40631b
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0xc], 0
je 0x40632b
mov ecx, dword [ebp - 0xc]
push ecx
call dword [0x41713c]
cmp dword [ebp - 0x28], 0xffffffff
je 0x40633b
mov edx, dword [ebp - 0x28]
push edx
call dword [0x41713c]
cmp dword [ebp - 0x10], 0
je 0x40634b
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x38], 0
je 0x40635b
mov ecx, dword [ebp - 0x38]
push ecx
call dword [0x41713c]
cmp dword [ebp - 0x14], 0xffffffff
je 0x40636b
mov edx, dword [ebp - 0x14]
push edx
call dword [0x41713c]
mov eax, dword [ebp - 0x30]
mov esp, ebp
pop ebp
ret