Function at 0x531200
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x606a3b
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 + 0xf0]
mov dword [ebp - 0x10], esp
cmp eax, ebx
mov dword [ebp - 4], ebx
je 0x5313f5
cmp eax, dword [ebp + 0xc]
jne 0x5313f5
mov eax, dword [esi + 0x88]
mov ecx, dword [eax + 0x10]
push ecx
call fcn.005c2c42
lea edx, [eax + eax + 0x14]
push edx
call fcn.005db66d
mov edi, eax
add esp, 8
cmp edi, ebx
mov dword [ebp + 0xc], edi
jne 0x531286
push str.Not_enough_memory_during_call_to_CheckLast___n
mov ecx, esi
call fcn.00529460
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esi + 0x88]
mov eax, dword [esi + 0xf0]
push eax
mov edx, dword [ecx + 0x10]
push edx
push str._s_d
push edi
call fcn.005c3b7c
add esp, 0x10
push ebx
push ebx
push 3
push ebx
push 3
push connect
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x18], eax
jne 0x5312eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x60]
push str.Error_reading_saved_last_part__errcode___d._n
push eax
call fcn.005c3648
add esp, 0xc
lea ecx, [ebp - 0x60]
push ecx
mov ecx, esi
call fcn.00529460
mov ebx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
jmp 0x531349
lea edx, [ebp - 0x14]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x53132c
test ebx, ebx
jne 0x53132c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x53132c
push eax
lea eax, [ebp - 0x60]
push str.Error_during_GetFileSize____errcode___d._n
push eax
call fcn.005c3648
add esp, 0xc
lea ecx, [ebp - 0x60]
push ecx
mov ecx, esi
call fcn.00529460
xor edi, edi
jmp 0x53133f
mov edx, dword [ebp - 0x14]
push 1
push 0
push 0
push edx
call fcn.005c5530
add edi, eax
adc ebx, edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0xf8]
mov ecx, dword [esi + 0xfc]
mov edx, dword [esi + 0xa8]
add eax, edi
adc ecx, ebx
cmp eax, edx
jne 0x53147e
cmp ecx, dword [esi + 0xac]
jne 0x53147e
push 0x50
call fcn.005db66d
mov ecx, eax
add esp, 4
mov dword [ebp - 0x18], ecx
test ecx, ecx
mov byte [ebp - 4], 1
je 0x531393
call fcn.00532290
mov edi, eax
jmp 0x531395
xor edi, edi
test edi, edi
mov byte [ebp - 4], 0
jne 0x5313af
push str.Not_enough_memory_during_call_to_CheckLast___n
mov ecx, esi
call fcn.00529460
mov ecx, dword [ebp + 0xc]
push ecx
jmp 0x5313ed
mov edx, dword [esi + 0xd4]
mov ebx, dword [ebp + 0xc]
mov dword [edi + 0x44], edx
mov eax, dword [esi + 0xdc]
push ebx
mov ecx, edi
mov dword [edi + 0x48], eax
call fcn.00532360
test eax, eax
je 0x531408
mov ecx, edi
call fcn.005322d0
push edi
call fcn.005db696
add esp, 4
mov ecx, esi
push str.Error_setting_filename_during_call_to_CheckLast___n
call fcn.00529460
push ebx
call fcn.005db696
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 + 0xf0]
mov ecx, dword [esi + 0x98]
cmp eax, ecx
mov dword [esi + 0xcc], 0
jg 0x531424
mov eax, ecx
push str.The_last_chunk_is_full._n
mov ecx, esi
mov dword [esi + 0x94], eax
call fcn.00529460
mov ecx, dword [esi + 0x8c]
mov edx, dword [ecx + 0x38]
mov dword [edi + 0x38], edx
mov eax, dword [esi + 0x8c]
mov dword [eax + 0x38], edi
mov dword [esi + 0x8c], edi
mov dword [edi + 0x14], 1
mov dword [edi], 0
mov ecx, dword [esi + 0xf0]
mov dword [edi + 0x40], ecx
mov edx, dword [esi + 0xf8]
mov dword [edi + 8], edx
mov eax, dword [esi + 0xfc]
mov dword [edi + 0xc], eax
jmp 0x5313ec
mov ebx, dword [ebp + 0xc]
jmp 0x5313ec