Function at 0x405570
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.00404c10
add esp, 4
push eax
call dword [0x417140]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0xffffffff
jne 0x405667
jmp 0x405ab2
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 dword [0x417148]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x40569d
jmp 0x405ab2
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x48], 0
push 0
push 1
call fcn.00407130
add esp, 8
test eax, eax
jne 0x405892
mov ecx, dword [ebp - 0x58]
add ecx, dword [ebp - 0x24]
cmp ecx, dword [ebp - 0x38]
jae 0x405892
cmp dword [ebp - 0x48], 0
jne 0x405892
mov edx, dword [ebp - 0x38]
sub edx, dword [ebp - 0x58]
cmp edx, dword [ebp - 0x60]
jae 0x4056ee
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x58]
mov dword [ebp - 0x78], eax
jmp 0x4056f4
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 0x405723
jmp 0x405ab2
mov dword [ebp - 0x18], 0
jmp 0x405735
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 0x40587a
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 0x405875
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
movzx edx, byte [ecx + eax]
mov dword [0x417134], edx
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
movzx edx, byte [ecx + eax + 1]
mov dword [0x417130], edx
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
movzx edx, byte [ecx + eax + 2]
mov dword [0x417124], 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 [0x417134], 0
je 0x4057e7
mov eax, dword [ebp - 0x30]
mov dword [0x417120], eax
mov ecx, dword [ebp - 0x30]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [0x417128], 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 [0x417128]
push eax
call fcn.00407940
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 0x40583f
mov eax, dword [ebp - 4]
add eax, 1
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [0x417158], 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 [0x417158]
push ecx
call fcn.00407940
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 0x40587a
jmp 0x40572c
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 0x4056ab
cmp dword [ebp - 0x48], 0
jne 0x4058a2
jmp 0x405ab2
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.00404b30
add esp, 4
push eax
call dword [0x417140]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0xffffffff
jne 0x4058e1
jmp 0x405ab2
push 0
mov eax, dword [ebp - 0x5c]
push eax
push 0
push 4
push 0
mov ecx, dword [ebp - 0x44]
push ecx
call dword [0x417148]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x40590a
jmp 0x405ab2
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 0x405945
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.00407130
add esp, 8
test eax, eax
jne 0x405aa3
mov edx, dword [ebp - 0x58]
cmp edx, dword [ebp - 0x5c]
jae 0x405aa3
mov eax, dword [ebp - 0x5c]
sub eax, dword [ebp - 0x58]
cmp eax, dword [ebp - 0x2c]
jae 0x40597b
mov ecx, dword [ebp - 0x5c]
sub ecx, dword [ebp - 0x58]
mov dword [ebp - 0x7c], ecx
jmp 0x405981
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 0x4059b3
jmp 0x405ab2
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 0x4059dc
jmp 0x405ab2
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.00407940
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 [0x413b48]
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.00407150
add esp, 8
jmp 0x405945
mov eax, dword [ebp - 0x58]
cmp eax, dword [ebp - 0x5c]
jne 0x405ab2
mov dword [ebp - 0x3c], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 8], 0
je 0x405acb
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x4c], 0
je 0x405adb
mov edx, dword [ebp - 0x4c]
push edx
call dword [0x417144]
cmp dword [ebp - 0x44], 0xffffffff
je 0x405aeb
mov eax, dword [ebp - 0x44]
push eax
call dword [0x417144]
cmp dword [ebp - 0x20], 0
je 0x405afb
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x14], 0
je 0x405b0b
mov edx, dword [ebp - 0x14]
push edx
call dword [0x417144]
cmp dword [ebp - 0x28], 0xffffffff
je 0x405b1b
mov eax, dword [ebp - 0x28]
push eax
call dword [0x417144]
mov eax, dword [ebp - 0x3c]
pop edi
pop esi
mov esp, ebp
pop ebp
ret