Function at 0x51dc70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8b0
push ebx
push ebp
push esi
mov ebp, ecx
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp + 0x18]
lea ecx, [esp + 0x30]
push eax
push 0x5965b8
push str._shistory_s_ticks.raw
push 0xff
push ecx
mov dword [ebp + 0xa7c], 0
call dword [sym.imp.MSVCRT.dll__snprintf]
lea edx, [esp + 0x44]
push 0x581660
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
add esp, 0x1c
test ebx, ebx
je 0x51ddd8
mov eax, dword [ebx + 0x10]
push eax
call dword [sym.imp.MSVCRT.dll__filelength]
mov ecx, eax
mov eax, 0xcccccccd
mul ecx
mov edi, edx
add esp, 4
shr edi, 5
test edi, edi
jle 0x51ddce
mov eax, dword [ebp + 0xa78]
test eax, eax
je 0x51dd10
cmp edi, 0x4650
jle 0x51dd6d
test eax, eax
je 0x51dd10
push eax
call fcn.004c2eb0
add esp, 4
lea eax, [edi + 0x400]
cmp eax, 0x4718
jge 0x51dd22
mov eax, 0x4718
lea edx, [eax + eax*4]
shl edx, 3
push edx
call fcn.004c2e90
add esp, 4
mov dword [ebp + 0xa78], eax
test eax, eax
jne 0x51dd6d
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x515
push str.SymbolsBase:_not_enough_memory_for_ticks___d_
push 1
push 0x596558
call fcn.004aa400
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xa78]
lea esi, [edi + edi*4]
shl esi, 3
push ebx
push 1
push esi
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
je 0x51dd98
mov dword [ebp + 0xa84], 1
jmp 0x51ddce
mov ecx, dword [ebp + 0xa78]
mov dword [ebp + 0xa7c], edi
mov esi, dword [esi + ecx - 8]
cmp esi, 0x3b9aca00
mov dword [ebp + 0xa80], esi
jle 0x51ddc6
xor eax, eax
mov dword [ebp + 0xa80], eax
mov dword [ebp + 0xa7c], eax
jmp 0x51ddc8
xor eax, eax
mov dword [ebp + 0xa84], eax
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, dword [ebp + 0xa7c]
xor esi, esi
cmp eax, esi
jle 0x51df92
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
lea edx, [esp + 0x130]
test edx, edx
je 0x51df92
mov eax, dword [ebp + 0x58]
test eax, eax
je 0x51df92
test esi, esi
jl 0x51df92
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 0x5c]
cmp eax, ecx
jge 0x51df92
push ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [ebp + 0x58]
mov ecx, 0x1e4
add esi, edx
lea edi, [esp + 0x130]
rep movsd dword es:[edi], dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebx, dword [ebp + 0xa7c]
mov dword [esp + 0x20], 0
dec ebx
mov dword [esp + 0x24], 0
mov dword [esp + 0x14], 0xffffffff
js 0x51df75
lea edi, [ebx + ebx*4]
shl edi, 3
mov ecx, dword [ebp + 0xa78]
lea esi, [esp + 0x130]
lea eax, [edi + ecx]
mov dword [esp + 0x2c], eax
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x51dea5
test cl, cl
je 0x51dea1
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x51dea5
add eax, 2
add esi, 2
test cl, cl
jne 0x51de81
xor eax, eax
jmp 0x51deaa
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x51df69
fld qword [esp + 0x20]
fcomp qword [0x565ac0]
fnstsw ax
test ah, 0x40
je 0x51deda
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0x14]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
jmp 0x51df69
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x198]
sub esp, 8
fld qword [eax + 0x10]
fsub qword [esp + 0x28]
fabs
fstp qword [esp]
call fcn.00429ac0
fld qword [esp + 0x820]
fmul qword [0x57b2a0]
fcompp
fnstsw ax
test ah, 1
je 0x51df15
mov dword [esp + 0x14], ebx
jmp 0x51df1b
cmp ebx, dword [esp + 0x14]
jg 0x51df5b
mov edx, dword [ebp + 0xa7c]
mov ecx, dword [ebp + 0xa78]
lea eax, [edi + 0x28]
lea edx, [edx + edx*4]
shl edx, 3
sub edx, eax
add eax, ecx
push edx
push eax
lea eax, [edi + ecx]
push eax
call dword [sym.imp.MSVCRT.dll_memmove]
mov ecx, dword [ebp + 0xa7c]
mov eax, dword [esp + 0x20]
add esp, 0xc
dec ecx
dec eax
mov dword [ebp + 0xa7c], ecx
mov dword [esp + 0x14], eax
jmp 0x51df69
mov ecx, dword [ebp + 0xa78]
fld qword [edi + ecx + 0x10]
fstp qword [esp + 0x20]
dec ebx
sub edi, 0x28
test ebx, ebx
jge 0x51de6d
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
inc ecx
add eax, 0x790
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
mov esi, eax
jmp 0x51ddf0
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret