Function at 0x409678
Capabilities:
Get file size
Read file on windows

Disassembly:
push 0xe8
mov eax, 0x4e314d
call fcn.004c2a93
mov ebx, dword [ebp + 8]
and dword [ebp - 4], 0
mov esi, dword [ebp + 0xc]
and dword [ebp - 0xdc], 0
push 0x5401f0
mov ecx, ebx
mov dword [ebp - 0xcc], ebx
mov dword [ebp - 0xf4], ebx
call fcn.00401718
xor eax, eax
inc eax
mov ecx, eax
mov dword [ebp - 0xe0], eax
mov eax, dword [0x541ad4]
mov dword [ebp - 0xdc], ecx
mov ecx, eax
imul ecx, eax
imul eax, ecx
push 0xd
cdq
pop ecx
idiv ecx
and dword [ebp - 4], 0
push 4
pop eax
cmp edx, eax
jne 0x4096ec
lea eax, [ebp - 0xbc]
push eax
call dword [sym.imp.KERNEL32.dll_GetTimeZoneInformation]
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
je 0x409735
push 0x4fa988
mov ecx, esi
call fcn.00403865
test eax, eax
je 0x409735
lea eax, [ebp - 0xc4]
push eax
call fcn.0040bb7f
pop ecx
push 3
pop ecx
push dword [eax]
mov dword [ebp - 0xdc], ecx
mov ecx, esi
mov dword [ebp - 4], 1
call fcn.00403865
test eax, eax
je 0x409735
mov byte [ebp - 0xe0], 0
mov eax, dword [ebp - 0xdc]
and dword [ebp - 4], 0
test al, 2
je 0x40975a
mov ecx, dword [ebp - 0xc4]
and eax, 0xfffffffd
lea ecx, [ecx - 0x10]
mov dword [ebp - 0xdc], eax
call fcn.00404fef
cmp byte [ebp - 0xe0], 0
je 0x409792
lea eax, [ebp - 0xc4]
push eax
call fcn.0040bb7f
pop ecx
mov dword [ebp - 4], 2
push eax
mov ecx, ebx
call fcn.00401ced
mov ecx, dword [ebp - 0xc4]
lea ecx, [ecx - 0x10]
call fcn.00404fef
jmp 0x409b1a
push 0
push 0
push 3
push 0
push 0
push SysReAllocStringLen
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0xc4], edi
cmp edi, 0xffffffff
jne 0x4097cc
lea eax, [ebp - 0xc4]
push eax
call fcn.0040bb7f
pop ecx
mov dword [ebp - 4], 3
jmp 0x409777
push 8
lea eax, [ebp - 0xe8]
push 0
push eax
call fcn.004c3990
add esp, 0xc
lea eax, [ebp - 0xe8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x40981f
lea eax, [ebp - 0xc4]
push eax
call fcn.0040bb7f
pop ecx
push 4
pop ecx
mov dword [ebp - 4], ecx
push eax
mov ecx, ebx
call fcn.00401ced
mov ecx, dword [ebp - 0xc4]
lea ecx, [ecx - 0x10]
call fcn.00404fef
jmp 0x409b13
cmp dword [ebp - 0xe4], 0
je 0x40983e
lea eax, [ebp - 0xc4]
push eax
call fcn.0040bb7f
pop ecx
mov dword [ebp - 4], 5
jmp 0x409804
cmp dword [ebp - 0xe8], 0
je 0x409b13
xor eax, eax
mov dword [ebp - 0xd8], eax
mov dword [ebp - 0xd4], eax
mov dword [ebp - 0xd0], eax
push dword [ebp - 0xe8]
lea ecx, [ebp - 0xd8]
mov dword [ebp - 4], 6
call fcn.0040fb4f
mov esi, dword [ebp - 0xd8]
and dword [ebp - 0xf0], 0
push 0
lea eax, [ebp - 0xf0]
push eax
push dword [ebp - 0xe8]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4098af
lea ecx, [ebp - 0xd8]
call fcn.0040f54f
jmp 0x409b13
xor eax, eax
mov byte [ebp - 0xbd], al
mov byte [ebp - 0xc5], al
mov dword [ebp - 0xec], eax
lea eax, [ebp - 0xec]
push eax
lea eax, [ebp - 0xc5]
push eax
lea eax, [ebp - 0xbd]
push eax
push esi
call fcn.0040b97a
mov eax, dword [ebp - 0xec]
add esp, 0x10
test eax, eax
jle 0x409907
add eax, esi
push eax
push esi
lea eax, [ebp - 0xe0]
push eax
lea ecx, [ebp - 0xd8]
call fcn.0040f6b3
mov esi, dword [ebp - 0xd8]
cmp byte [ebp - 0xc5], 0
mov edi, dword [ebp - 0xd4]
je 0x409958
mov edx, dword [0x541ad4]
push 0x14
lea ecx, [edx + 2]
lea eax, [edx + 1]
imul eax, ecx
imul eax, edx
cdq
pop ecx
idiv ecx
cmp edx, 0xb
jne 0x40993b
push 0
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov ecx, esi
cmp esi, edi
je 0x409958
mov dl, byte [ecx]
mov bl, byte [ecx + 1]
mov byte [ecx + 1], dl
mov byte [ecx], bl
add ecx, 2
cmp ecx, edi
jne 0x409941
mov ebx, dword [ebp - 0xcc]
sub edi, esi
cmp byte [esi + edi - 1], 0
je 0x409a7a
mov ecx, dword [0x541ad4]
mov eax, ecx
imul eax, ecx
imul eax, ecx
push 0xe
pop esi
cdq
idiv esi
push 0x64
pop esi
cmp edx, 3
jne 0x4099a8
mov eax, ecx
cdq
idiv esi
xor ecx, ecx
push 4
lea eax, [edx + 0x141]
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004c0e30
push eax
call fcn.004c1c8e
pop ecx
pop ecx
inc edi
push edi
lea ecx, [ebp - 0xd8]
call fcn.0040fb4f
mov ecx, dword [0x541ad4]
mov eax, ecx
imul eax, ecx
imul eax, ecx
push 0x12
cdq
pop esi
idiv esi
cmp edx, 6
jne 0x409a19
movsd xmm3, qword [0x4f6bd0]
movd xmm4, ecx
xorps xmm2, xmm2
cvtdq2pd xmm4, xmm4
addsd xmm2, xmm3
movapd xmm0, xmm2
mulsd xmm0, xmm2
comisd xmm0, xmm4
jbe 0x4099ff
subsd xmm2, xmm3
divsd xmm3, qword [0x4f6bd8]
movapd xmm1, xmm2
mulsd xmm1, xmm2
movapd xmm0, xmm4
subsd xmm0, xmm1
comisd xmm0, xmmword [0x4f6bc8]
ja 0x4099e1
mov esi, dword [ebp - 0xd8]
mov byte [esi + edi - 1], 0
cmp byte [ebp - 0xbd], 0
je 0x409a45
inc edi
push edi
lea ecx, [ebp - 0xd8]
call fcn.0040fb4f
mov esi, dword [ebp - 0xd8]
mov byte [esi + edi - 1], 0
call fcn.00409d6d
test al, al
jne 0x409a9e
mov eax, dword [0x541ad4]
push 0x64
cdq
pop ecx
idiv ecx
xor ecx, ecx
push 4
lea eax, [edx + 0x63]
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004c0e30
push eax
call fcn.004c1c8e
pop ecx
pop ecx
jmp 0x409a9e
cmp byte [ebp - 0xbd], 0
je 0x409acf
lea eax, [edi + 2]
push eax
lea ecx, [ebp - 0xd8]
call fcn.0040fb4f
mov esi, dword [ebp - 0xd8]
mov word [esi + edi], 0
cmp byte [ebp - 0xbd], 0
je 0x409acf
push esi
lea ecx, [ebp - 0xcc]
call fcn.00401824
push eax
mov ecx, ebx
mov byte [ebp - 4], 7
call fcn.00401ced
mov ecx, dword [ebp - 0xcc]
lea ecx, [ecx - 0x10]
call fcn.00404fef
jmp 0x409b02
push esi
lea ecx, [ebp - 0xcc]
call fcn.00408f7d
push eax
mov ecx, ebx
mov byte [ebp - 4], 8
call fcn.00401ced
mov ecx, dword [ebp - 0xcc]
mov byte [ebp - 4], 6
lea ecx, [ecx - 0x10]
call fcn.00404fef
push ebx
push ebx
call fcn.0040aa3c
pop ecx
pop ecx
lea ecx, [ebp - 0xd8]
call fcn.0040f54f
mov edi, dword [ebp - 0xc4]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
call fcn.004c2a42
ret