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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x478
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x40], 0xffffffff
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x4c], 1
mov eax, dword [0x41a124]
neg eax
sbb eax, eax
and eax, 0x18
add eax, 8
mov dword [ebp - 8], eax
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
mov ecx, dword [ebp + 8]
push ecx
call fcn.00404f10
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0xffffffff
jne 0x4086db
jmp 0x408e0e
push 0
mov edx, dword [ebp - 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
sub eax, dword [ebp - 8]
mov dword [ebp - 4], eax
push 0
push 0
push 0
push 2
push 0
mov eax, dword [ebp - 0x40]
push eax
call fcn.004053b0
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x408713
jmp 0x408e0e
push 0
push 0
push 0
push 4
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x40874c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 8
jne 0x408742
mov dword [ebp - 0x60], 1
jmp 0x40874c
jmp 0x408e0e
cmp dword [ebp - 0x60], 0
je 0x408770
mov edx, dword [ebp - 8]
push edx
push 0
push 0
push 4
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x4c], 0
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 4]
mov dword [0x41a138], ecx
cmp dword [0x41a124], 0
je 0x4087ba
mov edx, dword [ebp - 0x24]
mov eax, dword [edx + 8]
mov dword [ebp - 0x48], eax
mov ecx, dword [edx + 0xc]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x24]
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x30], eax
mov ecx, dword [edx + 0x14]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x24]
mov eax, dword [edx + 0x18]
mov dword [ebp - 0x38], eax
mov ecx, dword [edx + 0x1c]
mov dword [ebp - 0x34], ecx
cmp dword [ebp - 0x60], 0
jne 0x4087f6
mov edx, dword [ebp - 0xc]
add edx, 0x20
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x4087f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 8
jne 0x4087ec
mov dword [ebp - 0x60], 1
jmp 0x4087f6
jmp 0x408e0e
cmp dword [0x41a130], 0
je 0x408823
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x24]
add ecx, 8
push ecx
call fcn.0040310a
add esp, 0x14
jmp 0x4089d6
mov edx, dword [0x41a138]
and edx, 1
je 0x408856
cmp dword [ebp - 0x60], 0
jne 0x408856
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x24]
add ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x20]
push edx
call fcn.00409920
add esp, 0xc
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x1c], eax
jmp 0x4089d6
mov ecx, dword [0x41a138]
and ecx, 1
je 0x40887c
cmp dword [ebp - 0x60], 0
je 0x40887c
mov edx, dword [ebp - 0xc]
add edx, dword [ebp - 8]
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x3c], 1
jmp 0x4089d6
cmp dword [ebp - 0x60], 0
jne 0x4088e7
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x24]
add ecx, dword [ebp - 8]
push ecx
call fcn.004021ea
add esp, 0x14
mov edx, dword [ebp - 0x1c]
cmp edx, dword [ebp - 0xc]
jb 0x4088b1
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 4]
jne 0x4088e2
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0xc]
jne 0x4088d8
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x24]
add eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.00409920
add esp, 0xc
mov edx, dword [ebp - 4]
mov dword [ebp - 0x1c], edx
jmp 0x4088e2
jmp 0x408e0e
jmp 0x4089d6
push 0
call fcn.00406b30
add esp, 4
push eax
push 0x416c10
lea eax, [ebp - 0x460]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0
push 0x4000000
push 2
push 0
push 3
push 0xc0000000
lea ecx, [ebp - 0x460]
push ecx
call fcn.00404f10
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x408938
jmp 0x408e0e
push 0
mov edx, dword [ebp - 0xc]
push edx
push 0
push 4
push 0
mov eax, dword [ebp - 0x18]
push eax
call fcn.004053b0
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
jne 0x408960
jmp 0x408e0e
cmp dword [ebp - 0x24], 0
je 0x40898f
cmp dword [ebp - 0x4c], 0
je 0x40898f
push 0
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x5c]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x24]
add edx, dword [ebp - 8]
push edx
call fcn.0040280b
add esp, 0x18
jmp 0x4089ad
mov eax, dword [ebp - 0x10]
push eax
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x5c]
push eax
mov ecx, dword [ebp - 4]
push ecx
push 0
call fcn.0040280b
add esp, 0x18
mov edx, dword [ebp - 0x1c]
cmp edx, dword [ebp - 0xc]
jae 0x4089d6
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0xc]
jne 0x4089cc
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x3c], 1
jmp 0x4089d6
jmp 0x408e0e
cmp dword [ebp - 0x24], 0
je 0x4089ed
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 0x24], 0
cmp dword [ebp - 0x10], 0
je 0x408a04
mov eax, dword [ebp - 0x10]
push eax
call dword [0x41a178]
mov dword [ebp - 0x10], 0
cmp dword [ebp - 0x40], 0xffffffff
je 0x408a1b
mov ecx, dword [ebp - 0x40]
push ecx
call dword [0x41a178]
mov dword [ebp - 0x40], 0xffffffff
xor edx, edx
cmp dword [ebp - 0x3c], 0
setne dl
add edx, 2
mov dword [ebp - 0x28], edx
push 0
push 0x80
mov eax, dword [ebp - 0x28]
push eax
push 0
push 0
push 0xc0000000
mov ecx, dword [ebp + 8]
push ecx
call fcn.00404f10
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0xffffffff
jne 0x408a5a
jmp 0x408e0e
push 0
mov edx, dword [ebp - 0x1c]
push edx
push 0
push 4
push 0
mov eax, dword [ebp - 0x40]
push eax
call fcn.004053b0
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x408a82
jmp 0x408e0e
cmp dword [ebp - 0x60], 0
jne 0x408adb
push 0
push 0
push 0
push 2
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x408ac1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 8
jne 0x408ab7
mov dword [ebp - 0x60], 1
jmp 0x408ac1
jmp 0x408e0e
cmp dword [ebp - 0x60], 0
jne 0x408adb
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.00409920
add esp, 0xc
cmp dword [ebp - 0x60], 0
je 0x408e07
mov dword [ebp - 0x468], 0
cmp dword [ebp - 0x20], 0
je 0x408bb6
mov edx, dword [ebp - 0x1c]
sub edx, dword [ebp - 0x468]
je 0x408bb1
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x468]
cmp eax, 0x2000000
ja 0x408b29
mov ecx, dword [ebp - 0x1c]
sub ecx, dword [ebp - 0x468]
mov dword [ebp - 0x464], ecx
jmp 0x408b33
mov dword [ebp - 0x464], 0x2000000
cmp dword [ebp - 0x24], 0
je 0x408b43
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x464]
push eax
mov ecx, dword [ebp - 0x468]
push ecx
push 0
push 2
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x408b72
jmp 0x408e0e
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x468]
je 0x408b9a
mov ecx, dword [ebp - 0x464]
push ecx
mov edx, dword [ebp - 0x20]
add edx, dword [ebp - 0x468]
push edx
mov eax, dword [ebp - 0x24]
push eax
call fcn.00409920
add esp, 0xc
mov ecx, dword [ebp - 0x468]
add ecx, dword [ebp - 0x464]
mov dword [ebp - 0x468], ecx
jmp 0x408af9
jmp 0x408e07
cmp dword [ebp - 0x3c], 0
jne 0x408cab
mov edx, dword [ebp - 0x1c]
sub edx, dword [ebp - 0x468]
je 0x408ca6
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x468]
cmp eax, 0x2000000
ja 0x408bf0
mov ecx, dword [ebp - 0x1c]
sub ecx, dword [ebp - 0x468]
mov dword [ebp - 0x464], ecx
jmp 0x408bfa
mov dword [ebp - 0x464], 0x2000000
cmp dword [ebp - 0x24], 0
je 0x408c0a
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x464]
push eax
mov ecx, dword [ebp - 0x468]
push ecx
push 0
push 2
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x408c39
jmp 0x408e0e
cmp dword [ebp - 0x14], 0
je 0x408c49
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [ebp - 0x464]
push ecx
mov edx, dword [ebp - 0x468]
push edx
push 0
push 2
mov eax, dword [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x408c78
jmp 0x408e0e
mov ecx, dword [ebp - 0x464]
push ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x24]
push eax
call fcn.00409920
add esp, 0xc
mov ecx, dword [ebp - 0x468]
add ecx, dword [ebp - 0x464]
mov dword [ebp - 0x468], ecx
jmp 0x408bc0
jmp 0x408e07
mov dword [ebp - 0x470], 0
mov dword [ebp - 0x474], 0
mov dword [ebp - 0x46c], 0
jmp 0x408cdd
mov edx, dword [ebp - 0x46c]
add edx, dword [ebp - 0x470]
mov dword [ebp - 0x46c], edx
mov eax, dword [ebp - 0x46c]
cmp eax, dword [ebp - 0xc]
jae 0x408dbd
mov ecx, dword [ebp - 0x474]
add ecx, 0x2000000
cmp ecx, dword [ebp - 0xc]
jae 0x408d09
mov dword [ebp - 0x478], 0x2000000
jmp 0x408d18
mov edx, dword [ebp - 0xc]
sub edx, dword [ebp - 0x474]
mov dword [ebp - 0x478], edx
mov eax, dword [ebp - 0x478]
mov dword [ebp - 0x470], eax
cmp dword [ebp - 0x24], 0
je 0x408d3b
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 0x24], 0
mov edx, dword [ebp - 0x470]
add edx, 8
push edx
mov eax, dword [ebp - 0x46c]
push eax
push 0
push 2
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x408d6d
jmp 0x408e0e
mov edx, dword [ebp - 0x470]
push edx
mov eax, dword [ebp - 0x46c]
xor edx, edx
mov ecx, 0x2000000
div ecx
mov eax, dword [ebp - 0x24]
lea ecx, [eax + edx + 8]
push ecx
mov eax, dword [ebp - 0x46c]
xor edx, edx
mov ecx, 0x2000000
div ecx
add edx, dword [ebp - 0x24]
push edx
call fcn.00409fd0
add esp, 0xc
mov edx, dword [ebp - 0x474]
add edx, dword [ebp - 0x470]
mov dword [ebp - 0x474], edx
jmp 0x408ccb
cmp dword [ebp - 0x24], 0
je 0x408dd4
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 0x24], 0
cmp dword [ebp - 0x10], 0
je 0x408deb
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x10], 0
push 0
push 0
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov dword [ebp - 0x54], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x20], 0
je 0x408e27
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x24], 0
je 0x408e37
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x10], 0
je 0x408e47
mov ecx, dword [ebp - 0x10]
push ecx
call dword [0x41a178]
cmp dword [ebp - 0x40], 0xffffffff
je 0x408e7c
cmp dword [ebp - 0x54], 0
je 0x408e72
cmp dword [0x41a124], 0
je 0x408e72
lea edx, [ebp - 0x38]
push edx
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x48]
push ecx
mov edx, dword [ebp - 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov eax, dword [ebp - 0x40]
push eax
call dword [0x41a178]
cmp dword [ebp - 0x14], 0
je 0x408e8c
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x5c], 0
je 0x408e9c
mov edx, dword [ebp - 0x5c]
push edx
call dword [0x41a178]
cmp dword [ebp - 0x18], 0xffffffff
je 0x408eac
mov eax, dword [ebp - 0x18]
push eax
call dword [0x41a178]
mov eax, dword [ebp - 0x54]
mov esp, ebp
pop ebp
ret