Function at 0x54f240
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x654b33
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x74d890]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x20], esi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [esi + 0xf0]
cmp eax, ebx
je 0x54f435
cmp eax, dword [ebp + 0xc]
jne 0x54f435
mov eax, dword [esi + 0x88]
mov eax, dword [eax + 0x10]
lea edx, [eax + 2]
jmp 0x54f2a0
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x54f2a0
sub eax, edx
sar eax, 1
add eax, 0xa
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.005e9aa7
add esp, 4
mov edi, eax
mov dword [ebp - 0x14], edi
cmp edi, ebx
jne 0x54f2f4
push str.Not_enough_memory_during_call_to_CheckLast___n
mov ecx, esi
call fcn.0054c580
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea ecx, [ebp + 0xc]
call fcn.00402500
mov byte [ebp - 4], 1
mov eax, dword [esi + 0xf0]
push eax
mov ecx, dword [esi + 0x88]
mov edx, dword [ecx + 0x10]
push edx
push str._s_d
push edi
call fcn.0040f8d0
add esp, 0x10
push ebx
push ebx
push 3
push ebx
push 3
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x54f365
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_reading_saved_last_part__errcode___d._n
lea eax, [ebp + 0xc]
push eax
call fcn.00402f70
add esp, 0xc
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, esi
call fcn.0054c580
mov ebx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x24]
jmp 0x54f3c3
lea edx, [ebp - 0x18]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x54f3a6
test ebx, ebx
jne 0x54f3a6
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x54f3a6
push eax
push str.Error_during_GetFileSize____errcode___d._n
lea eax, [ebp + 0xc]
push eax
call fcn.00402f70
add esp, 0xc
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, esi
call fcn.0054c580
xor edi, edi
jmp 0x54f3b9
push 1
push 0
push 0
mov edx, dword [ebp - 0x18]
push edx
call fcn.0061a480
add edi, eax
adc ebx, edx
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add edi, dword [esi + 0xf8]
adc ebx, dword [esi + 0xfc]
cmp edi, dword [esi + 0xa8]
jne 0x54f4f5
cmp ebx, dword [esi + 0xac]
jne 0x54f4f5
push 0x70
call fcn.005e9a78
add esp, 4
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 2
test eax, eax
je 0x54f407
mov ecx, eax
call fcn.00558470
mov edi, eax
jmp 0x54f409
xor edi, edi
mov byte [ebp - 4], 1
test edi, edi
jne 0x54f449
push str.Not_enough_memory_during_call_to_CheckLast___n
mov ecx, esi
call fcn.0054c580
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.005e9ab2
add esp, 4
mov byte [ebp - 4], 0
lea ecx, [ebp + 0xc]
call fcn.00402570
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [esi + 0xd4]
mov dword [edi + 0x64], edx
mov eax, dword [esi + 0xdc]
mov dword [edi + 0x68], eax
mov ebx, dword [ebp - 0x14]
push ebx
mov ecx, edi
call fcn.00558180
test eax, eax
je 0x54f482
push 1
mov ecx, edi
call fcn.0054c530
push str.Error_setting_filename_during_call_to_CheckLast___n
mov ecx, esi
call fcn.0054c580
push ebx
jmp 0x54f421
mov dword [esi + 0xcc], 0
mov eax, dword [esi + 0xf0]
mov ecx, dword [esi + 0x98]
cmp eax, ecx
jg 0x54f49e
mov eax, ecx
mov dword [esi + 0x94], eax
push str.The_last_chunk_is_full._n
mov ecx, esi
call fcn.0054c580
mov ecx, dword [esi + 0x8c]
mov edx, dword [ecx + 0x58]
mov dword [edi + 0x58], edx
mov eax, dword [esi + 0x8c]
mov dword [eax + 0x58], edi
mov dword [esi + 0x8c], edi
mov dword [edi + 0x14], 1
mov dword [edi], 0
mov ecx, dword [esi + 0xf0]
mov dword [edi + 0x60], ecx
mov edx, dword [esi + 0xf8]
mov dword [edi + 8], edx
mov eax, dword [esi + 0xfc]
mov dword [edi + 0xc], eax
jmp 0x54f4f8
mov ebx, dword [ebp - 0x14]
push ebx
call fcn.005e9ab2
add esp, 4
mov byte [ebp - 4], 0
lea ecx, [ebp + 0xc]
call fcn.00402570
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8