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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x652570
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x7496c8]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x5c], esi
mov eax, dword [ebp + 8]
mov dword [ebp - 0x3c], eax
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x28], ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x24]
call fcn.00402500
mov byte [ebp - 4], 1
push ebx
push ebx
push 3
push ebx
push 1
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x2c], eax
cmp eax, 0xffffffff
jne 0x54eec3
push edi
lea ecx, [ebp - 0x28]
call fcn.00417fb0
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, dword [ebp - 0x28]
push edx
push str.Error_opening_file__s__errcode___ld._n
lea eax, [ebp - 0x24]
push eax
call fcn.00402f80
add esp, 0x10
mov ecx, dword [ebp - 0x24]
push ecx
mov ecx, esi
call fcn.0054b1b0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.00402570
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x24]
call fcn.00402570
mov eax, 0x7535
jmp 0x54f45d
lea edx, [ebp - 0x60]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], ebx
cmp eax, 0xffffffff
jne 0x54ef39
test ebx, ebx
jne 0x54ef39
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x54ef39
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push str.Error_during_GetFileSize____errcode___d._n
lea eax, [ebp - 0x24]
push eax
call fcn.00402f80
add esp, 0xc
mov ecx, dword [ebp - 0x24]
push ecx
mov ecx, esi
call fcn.0054b1b0
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x74f818]
push eax
mov ecx, dword [esi + 0xd4]
call fcn.00560a60
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x24]
call fcn.00402570
mov eax, edi
jmp 0x54f45d
push 1
push 0
push 0
mov ecx, dword [ebp - 0x60]
push ecx
call fcn.00617ef0
add dword [ebp - 0x34], eax
adc ebx, edx
mov dword [ebp - 0x30], ebx
push edi
lea ecx, [ebp - 0x38]
call fcn.00417fb0
mov byte [ebp - 4], 3
push ebx
mov edi, dword [ebp - 0x34]
push edi
mov edx, dword [ebp - 0x38]
push edx
push str.Size_of__s_is__I64d_n
lea eax, [ebp - 0x24]
push eax
call fcn.00402f80
add esp, 0x14
mov ecx, dword [ebp - 0x24]
push ecx
mov ecx, esi
call fcn.0054b1b0
mov edx, edi
or edx, ebx
jne 0x54efc0
push str.fSize0_n
mov ecx, esi
call fcn.0054b1b0
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x38]
call fcn.00402570
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x24]
call fcn.00402570
mov eax, 0x757c
jmp 0x54f45d
xor eax, eax
cmp eax, ebx
jl 0x54efdf
jg 0x54efcd
cmp dword [ebp + 0x14], edi
jb 0x54efdf
push str.startPos___fSize_n
mov ecx, esi
call fcn.0054b1b0
mov ecx, dword [ebp - 0x2c]
push ecx
jmp 0x54ef98
mov edx, dword [ebp - 0x28]
test edx, edx
je 0x54f0ca
mov eax, edx
lea ecx, [eax + 2]
mov dword [ebp - 0x28], ecx
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x54eff2
sub eax, dword [ebp - 0x28]
sar eax, 1
je 0x54f0ca
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], eax
mov word [ebp - 0x1c], ax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x20]
push ecx
push edx
push ebx
push edi
mov ecx, esi
call fcn.0054c2d0
test eax, eax
je 0x54f0be
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x54f038
lea eax, [ebp - 0x1c]
push 0
push eax
lea edx, [ebp - 0x28]
push edx
call fcn.00402a70
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [0x74f9b8]
push ecx
lea edx, [ebp - 0x24]
push edx
call fcn.00402f80
add esp, 0x18
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [esi + 0xd4]
call fcn.00560a60
push str.Disk_is_full._Cannot_add_next_chunks._n
mov ecx, esi
call fcn.0054b1b0
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x28]
call fcn.00402570
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x20]
call fcn.004011f0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x38]
call fcn.00402570
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x24]
call fcn.00402570
mov eax, 0x755f
jmp 0x54f45d
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x20]
call fcn.004011f0
xor eax, eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
cmp ebx, eax
jg 0x54f0e0
jl 0x54f0e5
cmp edi, 0x600000
jb 0x54f0e5
mov edi, 0x600000
mov dword [ebp - 0x50], edi
push edi
call fcn.0061586f
add esp, 4
mov ebx, eax
test ebx, ebx
jne 0x54f199
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.VirtualAlloc_malloc_failed__error__d_n
lea edx, [ebp - 0x24]
push edx
call fcn.00402f80
add esp, 0xc
mov eax, dword [ebp - 0x24]
push eax
mov ecx, esi
call fcn.0054b1b0
mov eax, 0xaaaaaaab
mul edi
shr edx, 1
mov eax, edx
mov dword [ebp - 0x50], eax
push eax
call fcn.0061586f
add esp, 4
test eax, eax
jne 0x54f199
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.VirtualAlloc_malloc_failed__error__d_n
lea ecx, [ebp - 0x24]
push ecx
call fcn.00402f80
add esp, 0xc
mov edx, dword [ebp - 0x24]
push edx
mov ecx, esi
call fcn.0054b1b0
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x74f81c]
push ecx
mov ecx, dword [esi + 0xd4]
call fcn.00560a60
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x38]
call fcn.00402570
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x24]
call fcn.00402570
mov eax, 0x7564
jmp 0x54f45d
mov edi, dword [ebp + 0x14]
test edi, edi
jbe 0x54f1b7
push 0
push 0
push edi
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x44], edi
xor eax, eax
mov dword [ebp - 0x40], eax
mov eax, dword [esi + 0x18]
xor ecx, ecx
cmp eax, ecx
je 0x54f1cf
cmp byte [eax + 0xc], cl
jne 0x54f1cf
mov byte [esi + 0x65], 1
mov dword [esi + 0x60], ecx
mov byte [esi + 0x66], cl
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x48], ecx
push 0
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [ebp - 0x50]
push ecx
push ebx
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x54f3e1
mov ecx, dword [ebp - 0x48]
test ecx, ecx
je 0x54f3e1
xor edi, edi
mov dword [ebp - 0x28], edi
mov eax, dword [esi + 0x18]
test eax, eax
je 0x54f242
cmp dword [eax + 0x54], edi
jne 0x54f242
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x4c]
push edx
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [ebp - 0x40]
push ecx
mov edx, dword [ebp - 0x44]
push edx
mov eax, dword [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
push ebx
mov edx, dword [ebp - 0x3c]
push edx
mov ecx, esi
call fcn.0054b9f0
mov edi, dword [ebp - 0x28]
jmp 0x54f254
push 0
lea eax, [ebp - 0x4c]
push eax
push ecx
push ebx
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x54f32c
mov ecx, dword [ebp - 0x4c]
cmp dword [ebp - 0x48], ecx
jne 0x54f32c
xor eax, eax
add dword [ebp - 0x44], ecx
adc dword [ebp - 0x40], eax
add dword [esi + 0x100], ecx
adc dword [esi + 0x104], eax
cmp dword [esi + 0x18], eax
je 0x54f2ac
test edi, edi
je 0x54f2ac
mov ecx, dword [ebp - 0x58]
mov edx, ecx
mov eax, dword [ebp - 0x54]
or edx, eax
je 0x54f2a5
cmp eax, dword [ebp - 0x30]
jg 0x54f2a5
jl 0x54f29d
cmp ecx, dword [ebp - 0x34]
jae 0x54f2a5
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], eax
jmp 0x54f2ac
sub dword [ebp - 0x34], edi
sbb dword [ebp - 0x30], 0
mov eax, dword [esi + 0xd8]
cmp dword [eax], 0
je 0x54f2e0
mov ecx, dword [esi + 0x100]
mov dword [ebp - 0x68], ecx
mov edx, dword [esi + 0x104]
mov dword [ebp - 0x64], edx
lea ecx, [ebp - 0x68]
push ecx
push 0x147b
push 0x111
mov edx, dword [eax]
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [ebp - 0x30]
cmp dword [ebp - 0x40], eax
jl 0x54f1d8
jg 0x54f2fa
mov ecx, dword [ebp - 0x44]
cmp ecx, dword [ebp - 0x34]
jb 0x54f1d8
push ebx
call fcn.0061477c
add esp, 4
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x38]
call fcn.00402570
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x24]
call fcn.00402570
xor eax, eax
jmp 0x54f45d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push str.Fatal_Write_Error__d_n
lea eax, [ebp - 0x24]
push eax
call fcn.00402f80
add esp, 0xc
mov ecx, dword [ebp - 0x24]
push ecx
mov ecx, esi
call fcn.0054b1b0
push ebx
call fcn.0061477c
add esp, 4
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x28]
call fcn.00402500
mov byte [ebp - 4], 6
push 0
push 0
lea eax, [ebp - 0x3c]
push eax
push 0x400
push edi
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov ecx, dword [ebp - 0x3c]
push ecx
push 0x66ae98
lea edx, [ebp - 0x28]
push edx
call fcn.00402f80
add esp, 0xc
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x28]
push ecx
mov ecx, dword [esi + 0xd4]
call fcn.00560a60
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x28]
call fcn.00402570
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x38]
call fcn.00402570
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x24]
call fcn.00402570
mov eax, edi
jmp 0x54f45d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push str.Fatal_Read_Error__d_n
lea edx, [ebp - 0x24]
push edx
call fcn.00402f80
add esp, 0xc
mov eax, dword [ebp - 0x24]
push eax
mov ecx, esi
call fcn.0054b1b0
push ebx
call fcn.0061477c
add esp, 4
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x74f824]
push edx
mov ecx, dword [esi + 0xd4]
call fcn.00560a60
jmp 0x54f3c5
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00613241
mov esp, ebp
pop ebp
ret 0x10