Function at 0x462caf
Capabilities:
Clear file content
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10028
call fcn.0046ce60
mov eax, dword [0x49c00c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov dword [ebp - 0x10008], eax
mov eax, dword [ebp + 0x1c]
push edi
mov dword [ebp - 0x10028], eax
xor edi, edi
lea eax, [ebp - 0x10020]
mov dword [ebp - 0x10024], ecx
push eax
push ecx
mov dword [ebp - 0x10014], edi
mov dword [ebp - 0x10010], edi
mov dword [ebp - 0x1000c], edi
mov dword [ebp - 0x10020], edi
mov dword [ebp - 0x1001c], edi
call fcn.00463b82
mov esi, eax
test esi, esi
jns 0x462d33
push str.Failed_to_get_size_of_source.
push esi
push 0x13
push 5
push 0x383
push str.d:_awixwix_srclibsdutilwixtoolset.dutil_fileutil.cpp
jmp 0x462ffe
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
cmp ecx, edi
jb 0x462d6d
ja 0x462d43
cmp eax, edi
jbe 0x462d6d
mov edx, dword [ebp - 0x1001c]
mov dword [ebp - 0x10018], edx
cmp ecx, edx
ja 0x462d65
jb 0x462d5f
mov edi, dword [ebp - 0x10020]
cmp eax, edi
jae 0x462d7f
mov edi, eax
mov edx, ecx
jmp 0x462d79
mov edi, dword [ebp - 0x10020]
jmp 0x462d7f
mov edx, dword [ebp - 0x1001c]
mov edi, dword [ebp - 0x10020]
mov dword [ebp - 0x10018], edx
test ebx, ebx
je 0x462dbd
push dword [ebp - 0x10028]
xor eax, eax
mov ecx, ebx
push dword [ebp - 0x10008]
push dword [ebp - 0x10024]
push 1
push eax
push eax
push eax
push eax
push eax
push eax
push eax
push edx
push edi
call dword [0x46e3f8]
call ebx
sub eax, 1
je 0x462e1e
sub eax, 1
je 0x462e1e
sub eax, 1
jne 0x462dbd
xor ebx, ebx
push 0
push 0
push dword [ebp - 0x10018]
push edi
push dword [ebp - 0x10008]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push dword [ebp - 0x10008]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x462e28
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x462dfb
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x462e02
mov esi, 0x80004005
push esi
mov ebx, 0x3a3
mov edi, str.d:_awixwix_srclibsdutilwixtoolset.dutil_fileutil.cpp
push ebx
push edi
call fcn.00401225
push str.Failed_to_set_end_of_target_file.
jmp 0x462ff7
mov esi, 0x800704d3
jmp 0x463006
xor eax, eax
push eax
push eax
push eax
push eax
push dword [ebp - 0x10008]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x462e78
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x462e55
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x462e5c
mov esi, 0x80004005
push esi
mov ebx, 0x3a8
mov edi, str.d:_awixwix_srclibsdutilwixtoolset.dutil_fileutil.cpp
push ebx
push edi
call fcn.00401225
push str.Failed_to_reset_target_file_pointer.
jmp 0x462ff7
mov edx, dword [ebp - 0x10010]
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x462e91
cmp dword [ebp + 0x14], eax
jne 0x462e91
mov eax, 0x10000
jmp 0x462ed2
cmp edx, dword [ebp + 0x14]
ja 0x463006
mov ecx, dword [ebp - 0x10014]
jb 0x462eaa
cmp ecx, eax
jae 0x463006
sub eax, ecx
mov ecx, dword [ebp + 0x14]
sbb ecx, edx
test ecx, ecx
jb 0x462ecc
ja 0x462ebe
cmp eax, 0x10000
jbe 0x462ecc
and dword [ebp - 0x1001c], 0
mov eax, 0x10000
jmp 0x462ed2
mov dword [ebp - 0x1001c], ecx
push 0
lea ecx, [ebp - 0x1000c]
mov dword [ebp - 0x1000c], eax
push ecx
push eax
lea eax, [ebp - 0x10004]
push eax
push dword [ebp - 0x10024]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x462fc2
cmp dword [ebp - 0x1000c], 0
je 0x463006
push dword [ebp - 0x1000c]
lea eax, [ebp - 0x10004]
push eax
push dword [ebp - 0x10008]
call fcn.00463f8f
mov esi, eax
test esi, esi
js 0x462fae
mov eax, dword [ebp - 0x10014]
add eax, dword [ebp - 0x1000c]
mov edx, dword [ebp - 0x10010]
adc edx, 0
mov dword [ebp - 0x10014], eax
mov dword [ebp - 0x10010], edx
test ebx, ebx
je 0x462e7e
push dword [ebp - 0x10028]
mov ecx, ebx
push dword [ebp - 0x10008]
push dword [ebp - 0x10024]
push 0
push 0
push 0
push 0
push 0
push 0
push edx
push eax
push dword [ebp - 0x10018]
push edi
call dword [0x46e3f8]
call ebx
sub eax, 1
je 0x462e1e
sub eax, 1
je 0x462e1e
mov edx, dword [ebp - 0x10010]
sub eax, 1
jne 0x462e7e
xor ebx, ebx
jmp 0x462e78
push str.Failed_to_write_to_target.
push esi
push 0x13
push 5
push 0x3b7
jmp 0x462d29
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x462fd9
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x462fe0
mov esi, 0x80004005
push esi
mov ebx, 0x3b1
mov edi, str.d:_awixwix_srclibsdutilwixtoolset.dutil_fileutil.cpp
push ebx
push edi
call fcn.00401225
push str.Failed_to_read_from_source.
push esi
push 0x13
push 5
push ebx
push edi
call fcn.00401228
add esp, 0x18
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00446806
leave
ret 0x18