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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10028
call fcn.00451870
mov eax, dword [0x4b1040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x10008], eax
xor edi, edi
mov eax, dword [ebp + 0x1c]
push 0x10000
mov dword [ebp - 0x10028], eax
lea eax, [ebp - 0x10004]
push edi
push eax
mov dword [ebp - 0x10024], esi
mov dword [ebp - 0x10014], edi
mov dword [ebp - 0x10010], edi
call fcn.00452250
add esp, 0xc
mov dword [ebp - 0x1000c], edi
lea eax, [ebp - 0x10020]
mov dword [ebp - 0x10020], edi
mov dword [ebp - 0x1001c], edi
push eax
push esi
call fcn.00405811
mov esi, eax
test esi, esi
jns 0x4049bc
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 0x404c87
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
cmp ecx, edi
jb 0x4049f6
ja 0x4049cc
cmp eax, edi
jbe 0x4049f6
mov edx, dword [ebp - 0x1001c]
mov dword [ebp - 0x10018], edx
cmp ecx, edx
ja 0x4049ee
jb 0x4049e8
mov edi, dword [ebp - 0x10020]
cmp eax, edi
jae 0x404a08
mov edi, eax
mov edx, ecx
jmp 0x404a02
mov edi, dword [ebp - 0x10020]
jmp 0x404a08
mov edx, dword [ebp - 0x1001c]
mov edi, dword [ebp - 0x10020]
mov dword [ebp - 0x10018], edx
test ebx, ebx
je 0x404a46
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 [0x4773f0]
call ebx
sub eax, 1
je 0x404aa7
sub eax, 1
je 0x404aa7
sub eax, 1
jne 0x404a46
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 0x404ab1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x404a84
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x404a8b
mov esi, 0x80004005
push esi
mov ebx, 0x3a3
mov edi, str.d:_awixwix_srclibsdutilwixtoolset.dutil_fileutil.cpp
push ebx
push edi
call fcn.0040129e
push str.Failed_to_set_end_of_target_file.
jmp 0x404c80
mov esi, 0x800704d3
jmp 0x404c8f
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 0x404b01
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x404ade
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x404ae5
mov esi, 0x80004005
push esi
mov ebx, 0x3a8
mov edi, str.d:_awixwix_srclibsdutilwixtoolset.dutil_fileutil.cpp
push ebx
push edi
call fcn.0040129e
push str.Failed_to_reset_target_file_pointer.
jmp 0x404c80
mov edx, dword [ebp - 0x10010]
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x404b1a
cmp dword [ebp + 0x14], eax
jne 0x404b1a
mov eax, 0x10000
jmp 0x404b5b
cmp edx, dword [ebp + 0x14]
ja 0x404c8f
mov ecx, dword [ebp - 0x10014]
jb 0x404b33
cmp ecx, eax
jae 0x404c8f
sub eax, ecx
mov ecx, dword [ebp + 0x14]
sbb ecx, edx
test ecx, ecx
jb 0x404b55
ja 0x404b47
cmp eax, 0x10000
jbe 0x404b55
and dword [ebp - 0x1001c], 0
mov eax, 0x10000
jmp 0x404b5b
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 0x404c4b
cmp dword [ebp - 0x1000c], 0
je 0x404c8f
push dword [ebp - 0x1000c]
lea eax, [ebp - 0x10004]
push eax
push dword [ebp - 0x10008]
call fcn.00405c1e
mov esi, eax
test esi, esi
js 0x404c37
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 0x404b07
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 [0x4773f0]
call ebx
sub eax, 1
je 0x404aa7
sub eax, 1
je 0x404aa7
mov edx, dword [ebp - 0x10010]
sub eax, 1
jne 0x404b07
xor ebx, ebx
jmp 0x404b01
push str.Failed_to_write_to_target.
push esi
push 0x13
push 5
push 0x3b7
jmp 0x4049b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x404c62
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x404c69
mov esi, 0x80004005
push esi
mov ebx, 0x3b1
mov edi, str.d:_awixwix_srclibsdutilwixtoolset.dutil_fileutil.cpp
push ebx
push edi
call fcn.0040129e
push str.Failed_to_read_from_source.
push esi
push 0x13
push 5
push ebx
push edi
call fcn.004012a1
add esp, 0x18
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00451586
leave
ret 0x18