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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x563e18
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 connect
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 0x4ccbd3
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.00527718
add esp, 0x10
lea ecx, [ebp - 0x174]
push ecx
mov ecx, esi
call fcn.004cb260
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 0x4ccc50
test eax, eax
jne 0x4ccc50
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4ccc50
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.00527718
add esp, 0xc
lea ecx, [ebp - 0x174]
push ecx
mov ecx, esi
call fcn.004cb260
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x5c8350]
mov ecx, dword [esi + 0x4c]
push eax
call fcn.004d1ef0
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.005291e0
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.00527718
add esp, 0x14
lea eax, [ebp - 0x174]
mov ecx, esi
push eax
call fcn.004cb260
mov ebx, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x20]
push ebx
push ecx
push edi
mov ecx, esi
call fcn.004ce860
xor ecx, ecx
cmp eax, ecx
je 0x4cccfb
mov edx, dword [0x5c81b0]
push ebx
lea eax, [ebp - 0x274]
push edx
push eax
call fcn.00527718
add esp, 0xc
lea ecx, [ebp - 0x274]
push ecx
mov ecx, dword [esi + 0x4c]
call fcn.004d1ef0
push str.Disk_is_full._Cannot_add_next_chunks._n
mov ecx, esi
call fcn.004cb260
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 0x4ccd12
jl 0x4ccd17
cmp edi, 0x600000
jb 0x4ccd17
mov edi, 0x600000
push edi
call fcn.005275de
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4ccdc5
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.00527718
add esp, 0xc
lea ecx, [ebp - 0x174]
push ecx
mov ecx, esi
call fcn.004cb260
mov eax, 0xaaaaaaab
mul edi
shr edx, 1
mov edi, edx
push edi
call fcn.005275de
add esp, 4
test eax, eax
jne 0x4ccdc5
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.00527718
add esp, 0xc
lea eax, [ebp - 0x174]
mov ecx, esi
push eax
call fcn.004cb260
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x5c834c]
mov ecx, dword [esi + 0x4c]
push edx
call fcn.004d1ef0
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 0x4ccf4c
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4ccf4c
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 0x4cce9a
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x14]
cmp eax, edx
jne 0x4cce9a
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 0x4cce54
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 0x4ccdcc
jg 0x4cce72
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x1c]
cmp ecx, eax
jb 0x4ccdcc
push ebx
call fcn.005274f5
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.00527718
add esp, 0xc
lea eax, [ebp - 0x174]
mov ecx, esi
push eax
call fcn.004cb260
push ebx
call fcn.005274f5
mov ecx, dword [ebp + 0xc]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x5c2a74]
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 0x5a3e24
push edx
call fcn.0053afda
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.004d1ef0
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 0
call fcn.005421be
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.00527718
add esp, 0xc
lea eax, [ebp - 0x174]
mov ecx, esi
push eax
call fcn.004cb260
push ebx
call fcn.005274f5
mov ecx, dword [ebp + 0xc]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x5c8344]
mov ecx, dword [esi + 0x4c]
push edx
call fcn.004d1ef0
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