Function at 0x4979e1
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
push esi
push edi
mov dword [ebp - 8], 0
push 0x5ef310
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x497a17
mov dword [ebp - 8], 1
jmp 0x497c9c
push 2
push 0
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 4
cmp eax, 0x55b
jne 0x497c88
push 0
push 0xf5
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x497c88
mov ecx, dword [ebp - 4]
push ecx
push 1
push 8
lea edx, [ebp - 0x20]
push edx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x497c88
push 4
lea eax, [ebp - 0x20]
push eax
call fcn.00497ca5
add esp, 8
cmp dword [ebp - 0x1c], eax
jne 0x497c88
push 0
push 0x1f6
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x497c88
mov edx, dword [ebp - 4]
push edx
push 1
push 0x10
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x497c88
lea ecx, [ebp + 0xc]
push ecx
call dword [sym.imp.MSVCRT.dll_gmtime]
add esp, 4
mov esi, eax
mov ecx, 9
lea edi, [ebp - 0x54]
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp - 0x48]
sub edx, 1
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], 0
push 0xc
lea edx, [ebp - 0x18]
push edx
call fcn.00497ca5
add esp, 8
cmp dword [ebp - 0xc], eax
jne 0x497bad
push 0
push 0x335
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x497ba1
mov ecx, dword [ebp - 4]
push ecx
push 1
push 0x10
lea edx, [ebp - 0x64]
push edx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x497ba1
push 0xc
lea eax, [ebp - 0x64]
push eax
call fcn.00497ca5
add esp, 8
cmp dword [ebp - 0x58], eax
jne 0x497ba1
lea ecx, [ebp - 0x30]
push ecx
lea edx, [ebp - 0x64]
push edx
call fcn.00497cf5
add esp, 8
cmp eax, 1
jne 0x497b7a
mov dword [ebp - 8], 3
jmp 0x497b9f
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x30]
push ecx
call fcn.00497cf5
add esp, 8
cmp eax, 1
jne 0x497b98
mov dword [ebp - 8], 5
jmp 0x497b9f
mov dword [ebp - 8], 7
jmp 0x497ba8
mov dword [ebp - 8], 2
jmp 0x497c30
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 0x20]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x68]
cdq
mov ecx, 0xc
idiv ecx
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x68]
cdq
mov ecx, 0xc
idiv ecx
mov edx, dword [ebp - 0x10]
add edx, eax
mov dword [ebp - 0x10], edx
push 0xc
lea eax, [ebp - 0x18]
push eax
call fcn.00497ca5
add esp, 8
mov dword [ebp - 0xc], eax
push 0
push 0x1f6
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov edx, dword [ebp - 4]
push edx
push 1
push 0x10
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
mov dword [ebp - 8], 6
push 0xc
lea ecx, [ebp - 0x30]
push ecx
call fcn.00497ca5
add esp, 8
mov dword [ebp - 0x24], eax
cmp dword [ebp - 8], 7
je 0x497c4d
cmp dword [ebp - 8], 6
jne 0x497c86
push 0
push 0x335
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x497c7f
mov eax, dword [ebp - 4]
push eax
push 1
push 0x10
lea ecx, [ebp - 0x30]
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 1
je 0x497c86
mov dword [ebp - 8], 4
jmp 0x497c8f
mov dword [ebp - 8], 2
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, dword [ebp - 8]
pop edi
pop esi
mov esp, ebp
pop ebp
ret