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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x64f808
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x44
mov eax, dword [0x6f7b78]
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x30], esi
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], eax
mov edi, dword [ebp + 0xc]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push edi
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
jne 0x56224e
push edi
lea ecx, [ebp + 8]
call fcn.00622e4a
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 8]
push eax
push ecx
lea edx, [ebp - 0x14]
push str.Error_opening_file__s__errcode___ld._n
push edx
call fcn.0061fae1
mov eax, dword [ebp - 0x14]
add esp, 0x10
mov ecx, esi
push eax
call fcn.0055c480
lea ecx, [ebp + 8]
mov byte [ebp - 4], 1
call fcn.00622d8a
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.00622d8a
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 0x10
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x2c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
xor ebx, ebx
cmp eax, 0xffffffff
mov dword [ebp - 0x38], eax
jne 0x5622b9
test ebx, ebx
jne 0x5622b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x5622b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea eax, [ebp - 0x14]
push edi
push str.Error_during_GetFileSize____errcode___d._n
push eax
call fcn.0061fae1
mov ecx, dword [ebp - 0x14]
add esp, 0xc
push ecx
mov ecx, esi
call fcn.0055c480
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x6fdf08]
mov ecx, dword [esi + 0xd4]
push eax
call fcn.00570270
jmp 0x5627e2
mov ecx, dword [ebp - 0x2c]
push 1
push 0
push 0
push ecx
call fcn.0060c730
mov ecx, dword [ebp - 0x38]
push edi
add ecx, eax
mov dword [ebp - 0x38], ecx
lea ecx, [ebp - 0x18]
adc ebx, edx
call fcn.00622e4a
mov edi, dword [ebp - 0x38]
mov edx, dword [ebp - 0x18]
push ebx
push edi
push edx
lea eax, [ebp - 0x14]
push str.Size_of__s_is__I64d_n
push eax
mov byte [ebp - 4], 3
call fcn.0061fae1
mov ecx, dword [ebp - 0x14]
add esp, 0x14
push ecx
mov ecx, esi
call fcn.0055c480
or edi, ebx
jne 0x56231a
push str.fSize0_n
mov ecx, esi
call fcn.0055c480
mov edx, dword [ebp + 0xc]
push edx
jmp 0x56233a
mov edi, dword [ebp + 0x14]
xor eax, eax
cmp eax, ebx
jl 0x562370
jg 0x56232a
cmp edi, dword [ebp - 0x38]
jb 0x562370
push str.startPos___fSize_n
mov ecx, esi
call fcn.0055c480
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.00622d8a
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.00622d8a
mov eax, 0x757c
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [ebp + 0x10]
lea edx, [ebp - 0x1c]
push ecx
push edx
call fcn.00402850
add esp, 8
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x38]
push eax
push ebx
push ecx
mov ecx, esi
mov byte [ebp - 4], 4
call fcn.00566090
xor ecx, ecx
cmp eax, ecx
je 0x562411
mov edx, dword [ebp - 0x1c]
mov eax, dword [0x6fdd68]
push edx
lea ecx, [ebp - 0x14]
push eax
push ecx
call fcn.0061fae1
mov edx, dword [ebp - 0x14]
mov ecx, dword [esi + 0xd4]
add esp, 0xc
push edx
call fcn.00570270
push str.Disk_is_full._Cannot_add_next_chunks._n
mov ecx, esi
call fcn.0055c480
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.00622d8a
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.00622d8a
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.00622d8a
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 0x10
cmp ebx, ecx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], ecx
jg 0x56242e
jl 0x562426
cmp dword [ebp - 0x38], 0x600000
jae 0x56242e
mov ecx, dword [ebp - 0x38]
mov dword [ebp + 0x10], ecx
jmp 0x562435
mov dword [ebp + 0x10], 0x600000
mov edx, dword [ebp + 0x10]
push edx
call fcn.0060a459
add esp, 4
mov dword [ebp + 0x14], eax
test eax, eax
jne 0x562506
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x14]
push str.VirtualAlloc_malloc_failed__error__d_n
push eax
call fcn.0061fae1
mov ecx, dword [ebp - 0x14]
add esp, 0xc
push ecx
mov ecx, esi
call fcn.0055c480
mov eax, 0xaaaaaaab
mul dword [ebp + 0x10]
shr edx, 1
mov eax, edx
push eax
mov dword [ebp + 0x10], eax
call fcn.0060a459
add esp, 4
test eax, eax
jne 0x562506
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [ebp - 0x14]
push str.VirtualAlloc_malloc_failed__error__d_n
push edx
call fcn.0061fae1
mov eax, dword [ebp - 0x14]
add esp, 0xc
mov ecx, esi
push eax
call fcn.0055c480
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x6fdf04]
mov ecx, dword [esi + 0xd4]
push edx
call fcn.00570270
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.00622d8a
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.00622d8a
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.00622d8a
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 0x10
xor ecx, ecx
cmp edi, ecx
jbe 0x562523
mov eax, dword [ebp + 0xc]
push ecx
push ecx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor eax, eax
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], eax
xor ecx, ecx
mov eax, dword [esi + 0x18]
cmp eax, ecx
je 0x56253c
mov dl, byte [eax + 0xc]
test dl, dl
jne 0x56253c
mov byte [esi + 0x65], 1
mov dword [esi + 0x60], ecx
mov byte [esi + 0x66], 0
mov edi, dword [ebp - 0x38]
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 0x20]
push 0
push ecx
mov ecx, dword [ebp + 0xc]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x56277d
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x56277d
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x28], 0
test eax, eax
je 0x5625b3
mov edx, dword [eax + 0x3c]
test edx, edx
jne 0x5625b3
lea edx, [ebp - 0x48]
lea eax, [ebp - 0x28]
push edx
lea ecx, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x3c]
lea edx, [ebp - 0x20]
push ecx
mov ecx, dword [ebp - 0x40]
push edx
mov edx, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 8]
push ecx
push ebx
push edi
push edx
push eax
mov ecx, esi
call fcn.00561bf0
jmp 0x5625c8
mov eax, dword [ebp + 0x14]
lea edx, [ebp - 0x24]
push 0
push edx
push ecx
mov ecx, dword [ebp + 8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5626de
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
cmp eax, ecx
jne 0x5626de
mov edx, dword [ebp - 0x40]
xor eax, eax
add edx, ecx
mov dword [ebp - 0x40], edx
mov edx, dword [ebp - 0x3c]
adc edx, eax
mov dword [ebp - 0x3c], edx
mov edx, dword [esi + 0x100]
add edx, ecx
mov dword [esi + 0x100], edx
mov ecx, dword [esi + 0x104]
adc ecx, eax
mov eax, dword [esi + 0x18]
test eax, eax
mov dword [esi + 0x104], ecx
je 0x562647
mov edx, dword [ebp - 0x28]
test edx, edx
je 0x562647
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x44]
mov edi, eax
or edi, ecx
je 0x56263c
cmp ecx, ebx
jg 0x56263c
jl 0x562633
mov edi, dword [ebp - 0x38]
cmp eax, edi
jae 0x56263f
mov edi, eax
mov ebx, ecx
mov dword [ebp - 0x38], edi
jmp 0x562647
mov edi, dword [ebp - 0x38]
sub edi, edx
mov dword [ebp - 0x38], edi
sbb ebx, 0
mov eax, dword [esi + 0xd8]
cmp dword [eax], 0
je 0x56267b
mov edx, dword [esi + 0x100]
mov ecx, dword [esi + 0x104]
mov dword [ebp - 0x50], edx
lea edx, [ebp - 0x50]
mov dword [ebp - 0x4c], ecx
mov eax, dword [eax]
push edx
push 0x147b
push 0x111
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
cmp dword [ebp - 0x3c], ebx
jl 0x562548
jg 0x56268f
cmp dword [ebp - 0x40], edi
jb 0x562548
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.00609aba
mov edx, dword [ebp + 0xc]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.00622d8a
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.00622d8a
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.00622d8a
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 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea eax, [ebp - 0x14]
push edi
push str.Fatal_Write_Error__d_n
push eax
call fcn.0061fae1
mov ecx, dword [ebp - 0x14]
add esp, 0xc
push ecx
mov ecx, esi
call fcn.0055c480
mov edx, dword [ebp + 0x14]
push edx
call fcn.00609aba
mov eax, dword [ebp + 0xc]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x6f7b78]
mov dword [ebp + 8], ecx
push 0
lea edx, [ebp + 0x10]
push 0
push edx
push 0x400
push edi
push 0
push 0x1100
mov byte [ebp - 4], 5
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov eax, dword [ebp + 0x10]
lea ecx, [ebp + 8]
push eax
push 0x6c910c
push ecx
call fcn.0061fae1
mov edx, dword [ebp + 0x10]
add esp, 0xc
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp + 8]
mov ecx, dword [esi + 0xd4]
push eax
call fcn.00570270
lea ecx, [ebp + 8]
mov byte [ebp - 4], 4
call fcn.00622d8a
jmp 0x5627ca
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea ecx, [ebp - 0x14]
push edi
push str.Fatal_Read_Error__d_n
push ecx
call fcn.0061fae1
mov edx, dword [ebp - 0x14]
add esp, 0xc
mov ecx, esi
push edx
call fcn.0055c480
mov eax, dword [ebp + 0x14]
push eax
call fcn.00609aba
mov ecx, dword [ebp + 0xc]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x6fdefc]
mov ecx, dword [esi + 0xd4]
push edx
call fcn.00570270
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.00622d8a
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.00622d8a
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.00622d8a
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 0x10