Function at 0x4c45a0
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x558b68
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x268
push ebx
push esi
mov ebx, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x10], esp
push 0
push 0
push 3
push 0
push 1
mov esi, ecx
push 0x80000000
push ebx
mov dword [ebp - 0x28], esi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
jne 0x4c4633
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
lea eax, [ebp - 0x174]
push str.Error_opening_file__s__errcode___ld._n
push eax
call fcn.0051d0e8
add esp, 0x10
lea ecx, [ebp - 0x174]
push ecx
mov ecx, esi
call fcn.004c2cc0
mov eax, 0x7535
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
lea edx, [ebp - 0x2c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x20], eax
jne 0x4c46b0
test eax, eax
jne 0x4c46b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4c46b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea eax, [ebp - 0x174]
push ebx
push str.Error_during_GetFileSize____errcode___d._n
push eax
call fcn.0051d0e8
add esp, 0xc
lea ecx, [ebp - 0x174]
push ecx
mov ecx, esi
call fcn.004c2cc0
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x5bb6f8]
mov ecx, dword [esi + 0x4c]
push eax
call fcn.004c9920
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp - 0x2c]
push 1
push 0
push 0
push ecx
call fcn.0051ec30
add edi, eax
mov eax, dword [ebp - 0x20]
adc eax, edx
lea edx, [ebp - 0x174]
push eax
push edi
push ebx
push str.Size_of__s_is__I64d_n
push edx
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], eax
call fcn.0051d0e8
add esp, 0x14
lea eax, [ebp - 0x174]
mov ecx, esi
push eax
call fcn.004c2cc0
mov ebx, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x20]
push ebx
push ecx
push edi
mov ecx, esi
call fcn.004c62c0
xor ecx, ecx
cmp eax, ecx
je 0x4c475b
mov edx, dword [0x5bb558]
push ebx
lea eax, [ebp - 0x274]
push edx
push eax
call fcn.0051d0e8
add esp, 0xc
lea ecx, [ebp - 0x274]
push ecx
mov ecx, dword [esi + 0x4c]
call fcn.004c9920
push str.Disk_is_full._Cannot_add_next_chunks._n
mov ecx, esi
call fcn.004c2cc0
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x755f
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
cmp eax, ecx
mov dword [ebp - 0x18], ecx
jg 0x4c4772
jl 0x4c4777
cmp edi, 0x600000
jb 0x4c4777
mov edi, 0x600000
push edi
call fcn.0051cfae
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4c4825
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x174]
push str.VirtualAlloc_malloc_failed__error__d_n
push eax
call fcn.0051d0e8
add esp, 0xc
lea ecx, [ebp - 0x174]
push ecx
mov ecx, esi
call fcn.004c2cc0
mov eax, 0xaaaaaaab
mul edi
shr edx, 1
mov edi, edx
push edi
call fcn.0051cfae
add esp, 4
test eax, eax
jne 0x4c4825
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [ebp - 0x174]
push str.VirtualAlloc_malloc_failed__error__d_n
push edx
call fcn.0051d0e8
add esp, 0xc
lea eax, [ebp - 0x174]
mov ecx, esi
push eax
call fcn.004c2cc0
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x5bb6f4]
mov ecx, dword [esi + 0x4c]
push edx
call fcn.004c9920
mov eax, 0x7564
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x14]
push 0
push eax
push edi
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4c49ac
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4c49ac
lea edx, [ebp - 0x30]
push 0
push edx
push eax
mov eax, dword [ebp + 8]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4c48fa
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x14]
cmp eax, edx
jne 0x4c48fa
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
add eax, edx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
adc eax, ecx
add dword [esi + 0x78], edx
mov edx, dword [esi + 0x7c]
mov dword [ebp - 0x18], eax
lea eax, [esi + 0x78]
adc edx, ecx
mov ecx, dword [esi + 0x50]
mov dword [eax + 4], edx
mov ecx, dword [ecx]
test ecx, ecx
je 0x4c48b4
push eax
push 0x1393
push 0x111
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
cmp eax, edx
jl 0x4c482c
jg 0x4c48d2
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x1c]
cmp ecx, eax
jb 0x4c482c
push ebx
call fcn.0051cec5
mov ecx, dword [ebp + 0xc]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea edx, [ebp - 0x174]
push edi
push str.Fatal_Write_Error__d_n
push edx
call fcn.0051d0e8
add esp, 0xc
lea eax, [ebp - 0x174]
mov ecx, esi
push eax
call fcn.004c2cc0
push ebx
call fcn.0051cec5
mov ecx, dword [ebp + 0xc]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x5b5ecc]
mov dword [ebp + 0x10], edx
push 0
lea eax, [ebp + 8]
push 0
push eax
push 0x400
push edi
push 0
push 0x1100
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov ecx, dword [ebp + 8]
lea edx, [ebp + 0x10]
push ecx
push 0x597ddc
push edx
call fcn.0053091a
mov eax, dword [ebp + 8]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp + 0x10]
push ecx
mov ecx, dword [esi + 0x4c]
call fcn.004c9920
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 0
call fcn.00537b04
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea edx, [ebp - 0x174]
push edi
push str.Fatal_Read_Error__d_n
push edx
call fcn.0051d0e8
add esp, 0xc
lea eax, [ebp - 0x174]
mov ecx, esi
push eax
call fcn.004c2cc0
push ebx
call fcn.0051cec5
mov ecx, dword [ebp + 0xc]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x5bb6ec]
mov ecx, dword [esi + 0x4c]
push edx
call fcn.004c9920
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc