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

Disassembly:
mov eax, 0x1050
call fcn.005322e0
push ebx
push ebp
push esi
push edi
mov ebp, ecx
push 0x2580
call fcn.00493e00
mov ecx, eax
call fcn.00490510
mov edi, dword [esp + 0x1064]
mov ebx, dword [sym.imp.MSVCRT.dll_fopen]
push 0x585938
push edi
mov dword [esp + 0x18], eax
call ebx
mov esi, eax
add esp, 8
test esi, esi
jne 0x4c7807
push 0x58593c
push edi
call ebx
mov esi, eax
add esp, 8
test esi, esi
je 0x4c7951
lea ecx, [esp + 0x50]
call fcn.0047ff60
lea ecx, [esp + 0x28]
call fcn.0047ff80
mov eax, dword [0x67a8d8]
mov dword [esp + 0x1c], 0xf800
cmp eax, 0x18
mov dword [esp + 0x20], 0x7e0
mov dword [esp + 0x24], 0x1f
jl 0x4c77a5
mov eax, 0x18
movsx ecx, word [ebp]
mov word [esp + 0x36], ax
mov dword [esp + 0x38], 3
movsx eax, word [ebp + 4]
sub eax, ecx
mov ecx, dword [esp + 0x10]
inc eax
mov dword [esp + 0x2c], ecx
cmp ecx, eax
jg 0x4c77cd
mov dword [esp + 0x2c], eax
mov edi, dword [esp + 0x5a]
mov ebx, dword [sym.imp.MSVCRT.dll_fwrite]
push esi
push 0xe
lea edx, [esp + 0x58]
add edi, 0xc
push 1
push edx
mov dword [esp + 0x6a], edi
call ebx
push esi
push 0x28
lea eax, [esp + 0x40]
push 1
push eax
call ebx
push esi
push 0xc
lea ecx, [esp + 0x44]
push 1
push ecx
call ebx
add esp, 0x30
jmp 0x4c780d
mov ebx, dword [sym.imp.MSVCRT.dll_fwrite]
lea ecx, [esp + 0x28]
call fcn.0047ff80
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 0
push 0xe
push esi
call edi
push esi
push 0x28
lea edx, [esp + 0x3c]
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fread]
movsx eax, word [ebp + 6]
movsx ecx, word [ebp + 2]
mov edx, dword [esp + 0x4c]
sub eax, ecx
add esp, 0x1c
lea ecx, [edx + eax + 1]
mov eax, dword [0x67a8d8]
cmp eax, 0x18
mov dword [esp + 0x30], ecx
jl 0x4c785b
mov eax, 0x18
imul eax, dword [esp + 0x2c]
add eax, 0x1f
push 0
sar eax, 3
and al, 0xfc
push 0xe
mov dword [esp + 0x18], eax
imul eax, ecx
push esi
mov dword [esp + 0x48], eax
call edi
push esi
push 0x28
lea eax, [esp + 0x3c]
push 1
push eax
call ebx
push 2
push 0
push esi
call edi
mov eax, dword [0x67a8d8]
add esp, 0x28
cmp eax, 0x18
jl 0x4c789f
mov eax, 0x18
movsx ebx, word [ebp + 4]
movsx ecx, word [ebp]
sub ebx, ecx
mov ecx, 0x400
inc ebx
lea edi, [esp + 0x60]
imul ebx, eax
add ebx, 0x1f
or eax, 0xffffffff
sar ebx, 3
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
mov edi, dword [ebp + 8]
and ebx, 0xfffffffc
cmp ebx, eax
mov dword [esp + 0x14], ebx
jl 0x4c78d7
mov dword [esp + 0x14], eax
movsx edx, word [ebp + 6]
movsx ecx, word [ebp + 2]
sub edx, ecx
mov dword [esp + 0x10], 0
inc edx
test edx, edx
jle 0x4c7935
sub eax, dword [esp + 0x14]
mov dword [esp + 0x18], eax
mov edx, dword [esp + 0x14]
push esi
push edx
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fwrite]
mov eax, dword [esp + 0x28]
push esi
push eax
lea ecx, [esp + 0x78]
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
movsx edx, word [ebp + 6]
movsx ecx, word [ebp + 2]
mov eax, dword [esp + 0x30]
add esp, 0x20
add edi, ebx
sub edx, ecx
inc eax
inc edx
cmp eax, edx
mov dword [esp + 0x10], eax
jl 0x4c78f6
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1050
ret 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1050
ret 4