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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c4
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x1c], 0xffffffff
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x85c], 0xffffffff
mov dword [ebp - 0x40], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x14], 8
mov dword [ebp - 0x454], 0x100000
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x30], 0
push 0x400
push 0
lea eax, [ebp - 0x858]
push eax
call fcn.004098a0
add esp, 0xc
cmp dword [ebp + 8], 0
je 0x407df5
cmp dword [ebp + 0xc], 0
jne 0x407dff
jmp 0x4084ed
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 - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
jne 0x407e2d
jmp 0x4084ed
push 0
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x20], eax
push 0
push 0
push 0
push 2
push 0
mov eax, dword [ebp - 0x1c]
push eax
call fcn.004053b0
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x407e62
jmp 0x4084ed
mov dword [ebp - 0x48], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x458], 0
push 0
push 1
call fcn.00409110
add esp, 8
test eax, eax
jne 0x4084d5
mov ecx, dword [ebp - 0x458]
cmp ecx, dword [ebp - 0x20]
jae 0x4084d5
mov eax, dword [ebp - 0x48]
xor edx, edx
div dword [ebp - 0x454]
add edx, dword [ebp - 0xc]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x48]
xor edx, edx
div dword [ebp - 0x454]
imul eax, dword [ebp - 0x454]
mov dword [ebp - 0x48], eax
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
add eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x48]
push ecx
push 0
push 4
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x407ef5
jmp 0x4084ed
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x44]
add ecx, dword [ebp - 0xc]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x44]
mov eax, dword [edx]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x44]
add ecx, 4
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x44]
mov eax, dword [edx]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 0x24], 0
mov edx, dword [ebp - 0x2c]
add edx, dword [ebp - 0x18]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x14]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x18]
add ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x48]
push edx
push 0
push 4
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x407f6c
jmp 0x4084ed
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x44]
add edx, dword [ebp - 0xc]
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x44]
push ecx
lea edx, [ebp - 0x450]
push edx
call fcn.00409920
add esp, 0xc
mov eax, dword [ebp - 0x18]
mov byte [ebp + eax - 0x450], 0
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 0x24], 0
lea edx, [ebp - 0x450]
push edx
mov eax, dword [ebp + 0xc]
push eax
push str._s_s
lea ecx, [ebp - 0x858]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [ebp - 0x858]
push edx
call fcn.00408570
add esp, 4
cmp dword [ebp - 0x28], 0
jne 0x40812e
lea eax, [ebp - 0x858]
push eax
call fcn.004045e0
cmp eax, 0xffffffff
je 0x40812e
lea ecx, [ebp - 0x858]
push ecx
push 0x408fe0
push 0
push 0x68
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.USER32.dll_DialogBoxParamW]
mov dword [ebp - 0x860], eax
cmp dword [ebp - 0x860], 2
je 0x408124
cmp dword [ebp - 0x860], 7
je 0x408054
cmp dword [ebp - 0x860], 0x3eb
je 0x408048
jmp 0x40812e
mov dword [ebp - 0x28], 1
jmp 0x40812e
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp - 0x454]
jbe 0x408080
mov edx, dword [ebp - 0xc]
sub edx, dword [ebp - 0x454]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x48]
add eax, dword [ebp - 0x454]
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x458]
add ecx, dword [ebp - 0x10]
mov dword [ebp - 0x458], ecx
mov edx, dword [ebp - 0x10]
sub edx, dword [ebp - 0x2c]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x48]
add eax, dword [ebp - 0x10]
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x458]
mov dword [ebp - 0x868], ecx
mov dword [ebp - 0x864], 0
fild qword [ebp - 0x868]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x870], edx
mov dword [ebp - 0x86c], 0
fild qword [ebp - 0x870]
fdivp st(1)
fmul qword [0x416c08]
fadd qword [0x416c00]
fnstcw word [ebp - 0x872]
movzx eax, word [ebp - 0x872]
or eax, 0xc00
mov dword [ebp - 0x878], eax
fldcw word [ebp - 0x878]
fistp qword [ebp - 0x880]
fldcw word [ebp - 0x872]
mov eax, dword [ebp - 0x880]
push eax
push 2
call fcn.00409130
add esp, 8
jmp 0x407e7a
jmp 0x4084ed
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
lea ecx, [ebp - 0x858]
push ecx
call fcn.00404f10
mov dword [ebp - 0x85c], eax
cmp dword [ebp - 0x85c], 0xffffffff
jne 0x408165
jmp 0x4084ed
mov edx, dword [ebp - 0x10]
sub edx, dword [ebp - 0x2c]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
sub eax, 8
jne 0x4081d7
mov ecx, dword [ebp - 0x10]
sub ecx, 8
jmp 0x408188
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0x10]
add edx, dword [ebp - 0xc]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x454]
jbe 0x4081b7
mov ecx, dword [ebp - 0xc]
sub ecx, dword [ebp - 0x454]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0x48]
add edx, dword [ebp - 0x454]
mov dword [ebp - 0x48], edx
mov eax, dword [ebp - 0x2c]
add eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x458]
mov dword [ebp - 0x458], eax
mov ecx, dword [ebp - 0x30]
add ecx, 1
mov dword [ebp - 0x30], ecx
jmp 0x407e7a
push 0
mov edx, dword [ebp - 0x10]
push edx
push 0
push 4
push 0
mov eax, dword [ebp - 0x85c]
push eax
call fcn.004053b0
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x408202
jmp 0x4084ed
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 0x18]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebp - 0x454]
jbe 0x408235
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x454]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x48]
add ecx, dword [ebp - 0x454]
mov dword [ebp - 0x48], ecx
push 0
push 1
call fcn.00409110
add esp, 8
test eax, eax
jne 0x4083ba
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x10]
jae 0x4083ba
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x454]
jae 0x408271
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp - 4]
mov dword [ebp - 0x884], ecx
jmp 0x40827d
mov edx, dword [ebp - 0x454]
mov dword [ebp - 0x884], edx
mov eax, dword [ebp - 0x884]
mov dword [ebp - 0x4c], eax
mov ecx, dword [ebp - 0x4c]
add ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x48]
push edx
push 0
push 4
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x4082b2
jmp 0x4084ed
mov ecx, dword [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 4]
push edx
push 0
push 2
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4082db
jmp 0x4084ed
mov ecx, dword [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 0x24]
add edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 8]
push eax
call fcn.00409920
add esp, 0xc
mov ecx, dword [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x4c]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x48]
add ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 8], 0
mov ecx, dword [ebp - 0x458]
add ecx, dword [ebp - 4]
mov dword [ebp - 0x88c], ecx
mov dword [ebp - 0x888], 0
fild qword [ebp - 0x88c]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x894], edx
mov dword [ebp - 0x890], 0
fild qword [ebp - 0x894]
fdivp st(1)
fmul qword [0x416c08]
fadd qword [0x416c00]
fnstcw word [ebp - 0x896]
movzx eax, word [ebp - 0x896]
or eax, 0xc00
mov dword [ebp - 0x89c], eax
fldcw word [ebp - 0x89c]
fistp qword [ebp - 0x8a4]
fldcw word [ebp - 0x896]
mov eax, dword [ebp - 0x8a4]
push eax
push 2
call fcn.00409130
add esp, 8
jmp 0x408235
cmp dword [ebp - 8], 0
je 0x4083d1
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 8], 0
cmp dword [ebp - 0x40], 0
je 0x4083e8
mov edx, dword [ebp - 0x40]
push edx
call dword [0x41a178]
mov dword [ebp - 0x40], 0
cmp dword [ebp - 0x85c], 0xffffffff
je 0x408408
mov eax, dword [ebp - 0x85c]
push eax
call dword [0x41a178]
mov dword [ebp - 0x85c], 0xffffffff
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x10]
je 0x40841a
jmp 0x4084ed
lea edx, [ebp - 0x858]
push edx
call fcn.00408630
add esp, 4
test eax, eax
jne 0x408437
jmp 0x4084ed
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x2c]
add eax, dword [ebp - 0x458]
mov dword [ebp - 0x458], eax
mov ecx, dword [ebp - 0x30]
add ecx, 1
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x458]
mov dword [ebp - 0x8ac], edx
mov dword [ebp - 0x8a8], 0
fild qword [ebp - 0x8ac]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x8b4], eax
mov dword [ebp - 0x8b0], 0
fild qword [ebp - 0x8b4]
fdivp st(1)
fmul qword [0x416c08]
fadd qword [0x416c00]
fnstcw word [ebp - 0x8b6]
movzx eax, word [ebp - 0x8b6]
or eax, 0xc00
mov dword [ebp - 0x8bc], eax
fldcw word [ebp - 0x8bc]
fistp qword [ebp - 0x8c4]
fldcw word [ebp - 0x8b6]
mov ecx, dword [ebp - 0x8c4]
push ecx
push 2
call fcn.00409130
add esp, 8
jmp 0x407e7a
mov edx, dword [ebp - 0x458]
cmp edx, dword [ebp - 0x20]
jne 0x4084ed
cmp dword [ebp - 0x30], 0
je 0x4084ed
mov dword [ebp - 0x34], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 8], 0
je 0x408506
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x40], 0
je 0x408516
mov ecx, dword [ebp - 0x40]
push ecx
call dword [0x41a178]
cmp dword [ebp - 0x85c], 0xffffffff
je 0x40852c
mov edx, dword [ebp - 0x85c]
push edx
call dword [0x41a178]
cmp dword [ebp - 0x24], 0
je 0x40853c
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x38], 0
je 0x40854c
mov ecx, dword [ebp - 0x38]
push ecx
call dword [0x41a178]
cmp dword [ebp - 0x1c], 0xffffffff
je 0x40855c
mov edx, dword [ebp - 0x1c]
push edx
call dword [0x41a178]
mov eax, dword [ebp - 0x34]
mov esp, ebp
pop ebp
ret