Function at 0x4ce610
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x563eab
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x54
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [ebp - 0x1c], esi
mov eax, dword [esi + 0x6c]
mov dword [ebp - 0x10], esp
cmp eax, ebx
mov dword [ebp - 4], ebx
je 0x4ce7e9
cmp eax, dword [ebp + 0xc]
jne 0x4ce7e9
mov eax, dword [esi + 0x14]
or ecx, 0xffffffff
mov edi, dword [eax + 0x10]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 9
push ecx
call fcn.0054276d
mov edi, eax
add esp, 4
cmp edi, ebx
mov dword [ebp + 0xc], edi
jne 0x4ce692
push str.Not_enough_memory_during_call_to_CheckLast___n
mov ecx, esi
call fcn.004cb260
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 0x6c]
push ecx
mov eax, dword [edx + 0x10]
push eax
push str._s_d
push edi
call fcn.00527718
add esp, 0x10
push ebx
push ebx
push 3
push ebx
push 3
push connect
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x18], eax
jne 0x4ce6f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x60]
push str.Error_reading_saved_last_part__errcode___d._n
push ecx
call fcn.00527718
add esp, 0xc
lea edx, [ebp - 0x60]
mov ecx, esi
push edx
call fcn.004cb260
mov ebx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
jmp 0x4ce74f
lea ecx, [ebp - 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4ce732
test ebx, ebx
jne 0x4ce732
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4ce732
push eax
lea edx, [ebp - 0x60]
push str.Error_during_GetFileSize____errcode___d._n
push edx
call fcn.00527718
add esp, 0xc
lea eax, [ebp - 0x60]
mov ecx, esi
push eax
call fcn.004cb260
xor edi, edi
jmp 0x4ce745
mov ecx, dword [ebp - 0x14]
push 1
push 0
push 0
push ecx
call fcn.005291e0
add edi, eax
adc ebx, edx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x70]
mov ecx, dword [esi + 0x74]
mov edx, dword [esi + 0x30]
add eax, edi
adc ecx, ebx
cmp eax, edx
jne 0x4ce845
cmp ecx, dword [esi + 0x34]
jne 0x4ce845
push 0x30
call fcn.0054276d
mov ecx, eax
add esp, 4
mov dword [ebp - 0x18], ecx
test ecx, ecx
mov byte [ebp - 4], 1
je 0x4ce78d
call fcn.004cf3d0
mov edi, eax
jmp 0x4ce78f
xor edi, edi
test edi, edi
mov byte [ebp - 4], 0
jne 0x4ce7a9
push str.Not_enough_memory_during_call_to_CheckLast___n
mov ecx, esi
call fcn.004cb260
mov eax, dword [ebp + 0xc]
push eax
jmp 0x4ce7e1
mov ecx, dword [esi + 0x4c]
mov ebx, dword [ebp + 0xc]
mov dword [edi + 0x28], ecx
mov edx, dword [esi + 0x54]
push ebx
mov ecx, edi
mov dword [edi + 0x2c], edx
call fcn.004cf460
test eax, eax
je 0x4ce7fc
mov ecx, edi
call fcn.004cf3f0
push edi
call fcn.00542796
add esp, 4
mov ecx, esi
push str.Error_setting_filename_during_call_to_CheckLast___n
call fcn.004cb260
push ebx
call fcn.00542796
add esp, 4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esi + 0x6c]
mov ecx, dword [esi + 0x68]
cmp eax, ecx
mov dword [esi + 0x44], 0
jg 0x4ce80f
mov eax, ecx
push str.The_last_chunk_is_full._n
mov ecx, esi
mov dword [esi + 0x20], eax
call fcn.004cb260
mov eax, dword [esi + 0x18]
mov ecx, dword [eax + 0x1c]
mov dword [edi + 0x1c], ecx
mov edx, dword [esi + 0x18]
mov dword [edx + 0x1c], edi
mov dword [esi + 0x18], edi
mov dword [edi + 0x14], 1
mov dword [edi], 0
mov eax, dword [esi + 0x6c]
mov dword [edi + 0x24], eax
jmp 0x4ce7e0
mov ebx, dword [ebp + 0xc]
jmp 0x4ce7e0