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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
push esi
push edi
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x28], 0xffffffff
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x44], 0xffffffff
mov dword [ebp - 0x4c], 0
mov dword [ebp - 8], 0
mov byte [ebp - 0x74], 4
mov byte [ebp - 0x73], 1
mov byte [ebp - 0x72], 7
mov byte [ebp - 0x71], 7
mov byte [ebp - 0x70], 9
mov byte [ebp - 0x6f], 8
mov byte [ebp - 0x6e], 1
mov byte [ebp - 0x6d], 7
mov byte [ebp - 0x6c], 4
mov byte [ebp - 0x6b], 1
mov byte [ebp - 0x6a], 4
mov byte [ebp - 0x69], 8
mov byte [ebp - 0x68], 4
mov byte [ebp - 0x67], 4
mov byte [ebp - 0x66], 5
mov byte [ebp - 0x65], 8
mov byte [ebp - 0x64], 1
mov byte [ebp - 0x63], 4
mov byte [ebp - 0x62], 5
mov byte [ebp - 0x61], 3
mov dword [ebp - 0x10], 0x14
mov eax, dword [ebp - 0x10]
add eax, 0xb
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x50], 0x100000
mov ecx, dword [ebp - 0x50]
add ecx, dword [ebp - 0x24]
mov dword [ebp - 0x60], ecx
mov dword [ebp - 0x2c], 0x100000
mov dword [ebp - 0x30], 0
mov dword [ebp - 4], 0
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push 0
call fcn.00406c10
add esp, 4
push eax
call fcn.00404f10
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0xffffffff
jne 0x407676
jmp 0x407abe
push 0
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x38], eax
push 0
push 0
push 0
push 2
push 0
mov eax, dword [ebp - 0x28]
push eax
call fcn.004053b0
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4076ab
jmp 0x407abe
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x48], 0
push 0
push 1
call fcn.00409110
add esp, 8
test eax, eax
jne 0x4078a0
mov ecx, dword [ebp - 0x58]
add ecx, dword [ebp - 0x24]
cmp ecx, dword [ebp - 0x38]
jae 0x4078a0
cmp dword [ebp - 0x48], 0
jne 0x4078a0
mov edx, dword [ebp - 0x38]
sub edx, dword [ebp - 0x58]
cmp edx, dword [ebp - 0x60]
jae 0x4076fc
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x58]
mov dword [ebp - 0x78], eax
jmp 0x407702
mov ecx, dword [ebp - 0x60]
mov dword [ebp - 0x78], ecx
mov edx, dword [ebp - 0x78]
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x54]
push eax
mov ecx, dword [ebp - 0x58]
push ecx
push 0
push 4
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x407731
jmp 0x407abe
mov dword [ebp - 0x18], 0
jmp 0x407743
mov eax, dword [ebp - 0x18]
add eax, 1
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x54]
sub ecx, dword [ebp - 0x24]
cmp dword [ebp - 0x18], ecx
ja 0x407888
mov ecx, dword [ebp - 0x10]
lea edi, [ebp - 0x74]
mov esi, dword [ebp - 0x20]
add esi, dword [ebp - 0x18]
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x407883
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
movzx edx, byte [ecx + eax]
mov dword [0x41a134], edx
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
movzx edx, byte [ecx + eax + 1]
mov dword [0x41a130], edx
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
movzx edx, byte [ecx + eax + 2]
mov dword [0x41a124], edx
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + eax + 7]
mov dword [ebp - 0x30], edx
cmp dword [0x41a134], 0
je 0x4077f5
mov eax, dword [ebp - 0x30]
mov dword [0x41a120], eax
mov ecx, dword [ebp - 0x30]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [0x41a128], eax
mov edx, dword [ebp - 0x30]
push edx
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
lea edx, [ecx + eax + 0xb]
push edx
mov eax, dword [0x41a128]
push eax
call fcn.00409920
add esp, 0xc
mov ecx, dword [ebp - 0x18]
add ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x30]
lea eax, [ecx + edx + 0xb]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + eax]
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0
je 0x40784d
mov eax, dword [ebp - 4]
add eax, 1
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [0x41a18c], eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x30]
lea ecx, [edx + eax + 0xb]
mov edx, dword [ebp - 0x20]
lea eax, [edx + ecx + 4]
push eax
mov ecx, dword [0x41a18c]
push ecx
call fcn.00409920
add esp, 0xc
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x30]
lea ecx, [edx + eax + 0xb]
add ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 4]
mov eax, dword [ecx + edx + 4]
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x58]
add ecx, dword [ebp - 0x18]
add ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x30]
lea eax, [ecx + edx + 4]
mov ecx, dword [ebp - 4]
lea edx, [eax + ecx + 4]
mov dword [ebp - 0x48], edx
jmp 0x407888
jmp 0x40773a
mov eax, dword [ebp - 0x58]
add eax, dword [ebp - 0x50]
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x4076b9
cmp dword [ebp - 0x48], 0
jne 0x4078b0
jmp 0x407abe
mov edx, dword [ebp - 0x5c]
sub edx, dword [ebp - 0x24]
mov dword [ebp - 0x5c], edx
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
push 0
call fcn.00406b30
add esp, 4
push eax
call fcn.00404f10
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0xffffffff
jne 0x4078ee
jmp 0x407abe
push 0
mov eax, dword [ebp - 0x5c]
push eax
push 0
push 4
push 0
mov ecx, dword [ebp - 0x44]
push ecx
call fcn.004053b0
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x407916
jmp 0x407abe
mov dword [ebp - 0x58], 0
mov eax, dword [ebp - 0x48]
xor edx, edx
div dword [ebp - 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x48]
xor edx, edx
div dword [ebp - 0x2c]
imul eax, dword [ebp - 0x2c]
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebp - 0x2c]
jbe 0x407951
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x2c]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x34]
add ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x34], ecx
push 0
push 1
call fcn.00409110
add esp, 8
test eax, eax
jne 0x407aaf
mov edx, dword [ebp - 0x58]
cmp edx, dword [ebp - 0x5c]
jae 0x407aaf
mov eax, dword [ebp - 0x5c]
sub eax, dword [ebp - 0x58]
cmp eax, dword [ebp - 0x2c]
jae 0x407987
mov ecx, dword [ebp - 0x5c]
sub ecx, dword [ebp - 0x58]
mov dword [ebp - 0x7c], ecx
jmp 0x40798d
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x7c], edx
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x58]
push edx
push 0
push 4
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x4079bf
jmp 0x407abe
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x58]
push edx
push 0
push 2
mov eax, dword [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4079e8
jmp 0x407abe
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x20]
add edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 8]
push eax
call fcn.00409920
add esp, 0xc
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
mov eax, dword [ebp - 0x58]
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 8], 0
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], 0
fild qword [ebp - 0x84]
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x8c], ecx
mov dword [ebp - 0x88], 0
fild qword [ebp - 0x8c]
fdivp st(1)
fmul qword [0x416bf0]
fnstcw word [ebp - 0x8e]
movzx eax, word [ebp - 0x8e]
or eax, 0xc00
mov dword [ebp - 0x94], eax
fldcw word [ebp - 0x94]
fistp qword [ebp - 0x9c]
fldcw word [ebp - 0x8e]
mov edx, dword [ebp - 0x9c]
push edx
push 2
call fcn.00409130
add esp, 8
jmp 0x407951
mov eax, dword [ebp - 0x58]
cmp eax, dword [ebp - 0x5c]
jne 0x407abe
mov dword [ebp - 0x3c], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 8], 0
je 0x407ad7
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x4c], 0
je 0x407ae7
mov edx, dword [ebp - 0x4c]
push edx
call dword [0x41a178]
cmp dword [ebp - 0x44], 0xffffffff
je 0x407af7
mov eax, dword [ebp - 0x44]
push eax
call dword [0x41a178]
cmp dword [ebp - 0x20], 0
je 0x407b07
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x14], 0
je 0x407b17
mov edx, dword [ebp - 0x14]
push edx
call dword [0x41a178]
cmp dword [ebp - 0x28], 0xffffffff
je 0x407b27
mov eax, dword [ebp - 0x28]
push eax
call dword [0x41a178]
mov eax, dword [ebp - 0x3c]
pop edi
pop esi
mov esp, ebp
pop ebp
ret