Function at 0x4053c0
Capabilities:
Clear file content
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42fe98
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x443004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 8]
push eax
push esi
push str.Creating_file__s_of_size__I64u._n
push dword [ebp + 0x18]
mov byte [ebp - 0x31], 0
call fcn.00402860
add esp, 0x14
mov ecx, str.SeManageVolumePrivilege
call fcn.004024a0
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test al, al
jne 0x405433
call edi
push eax
push str.WARNING:_Could_not_set_privileges_for_setting_valid_file_size__will_use_a_slower_method_of_preparing_the_file_n
call fcn.00402820
add esp, 8
mov byte [ebp - 0x31], 1
push esi
call fcn.004052d0
test eax, eax
je 0x405450
cmp eax, 0x32
je 0x405450
push eax
push str.WARNING:_Could_not_create_intermediate_directory__error_code:__u__n
call fcn.00402820
add esp, 8
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [ebp - 0x38], ebx
cmp ebx, 0xffffffff
jne 0x405488
call edi
push eax
push str.Could_not_create_the_file__error_code:__u__n
call fcn.00402820
add esp, 8
jmp 0x40571c
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
test eax, eax
jne 0x40549a
test esi, esi
je 0x405652
push 0
lea ecx, [ebp - 0x18]
push ecx
push eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push ebx
call esi
test eax, eax
jne 0x4054c4
call edi
push eax
push str.Could_not_set_file_pointer_during_file_creation_when_extending_file__error_code:__u__n
call fcn.00402820
add esp, 8
jmp 0x405715
mov eax, dword [ebp + 8]
cmp dword [ebp - 0x18], eax
jne 0x405708
mov eax, dword [ebp + 0xc]
cmp dword [ebp - 0x14], eax
jne 0x405708
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4054fc
call edi
push eax
push str.Error_setting_end_of_file__error_code:__u__n
call fcn.00402820
add esp, 8
jmp 0x405715
cmp byte [ebp - 0x31], 0
jne 0x405527
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileValidData]
test eax, eax
jne 0x40564f
call edi
push eax
push str.WARNING:_Could_not_set_valid_file_size__error_code:__u___trying_a_slower_method_of_filling_the_file__this_does_not_affect_performance__just_makes_the_test_preparation_longer__n
call fcn.00402820
add esp, 8
push 0
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push ebx
call esi
test eax, eax
jne 0x40554d
call edi
push eax
push str.Could_not_set_file_pointer_during_file_creation__error_code:__u__n
call fcn.00402820
add esp, 8
jmp 0x405715
mov eax, dword [ebp - 0x18]
or eax, dword [ebp - 0x14]
je 0x40555f
push str.File_pointer_improperly_moved_during_file_creation_n
jmp 0x40570d
cmp dword [ebp + 0xc], 0
mov esi, 0x100000
mov edi, dword [ebp + 8]
ja 0x405575
jb 0x405573
cmp edi, esi
jae 0x405575
mov esi, edi
xor eax, eax
lea ecx, [ebp - 0x24]
push esi
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
call fcn.004075c0
xor eax, eax
mov dword [ebp - 4], 0
mov ebx, dword [ebp - 0x24]
test esi, esi
je 0x4055b3
mov dl, byte [ebp + 0x14]
lea esp, [esp]
test dl, dl
je 0x4055a8
xor ecx, ecx
jmp 0x4055ab
movzx ecx, al
mov byte [ebx + eax], cl
inc eax
cmp eax, esi
jb 0x4055a0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x3c], eax
lea esp, [esp]
xor ecx, ecx
cmp ecx, eax
jb 0x4055ce
ja 0x4055cc
cmp esi, edi
jbe 0x4055ce
mov esi, edi
push 0
lea eax, [ebp - 0x28]
push eax
push esi
push ebx
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4056a2
cmp dword [ebp - 0x28], esi
jne 0x405693
mov eax, dword [ebp - 0x3c]
sub edi, esi
sbb eax, 0
mov dword [ebp - 0x3c], eax
test eax, eax
ja 0x4055c0
jb 0x405605
test edi, edi
jne 0x4055c0
test ebx, ebx
je 0x40564c
mov eax, dword [ebp - 0x1c]
sub eax, ebx
cmp eax, 0x1000
jb 0x405643
test bl, 0x1f
je 0x40561f
call fcn.00420913
mov eax, dword [ebx - 4]
cmp eax, ebx
jb 0x40562b
call fcn.00420913
sub ebx, eax
cmp ebx, 4
jae 0x405637
call fcn.00420913
cmp ebx, 0x23
jbe 0x405641
call fcn.00420913
mov ebx, eax
push ebx
call fcn.0041a013
add esp, 4
mov ebx, dword [ebp - 0x38]
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x30]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x405685
cmp dword [ebp - 0x30], esi
jne 0x40566e
mov eax, dword [ebp + 0xc]
cmp dword [ebp - 0x2c], eax
je 0x405685
push 0x7b4
push str.....IORequestGeneratorIORequestGenerator.cpp
push str.li.QuadPart___LONGLONG_ullFileSize
call fcn.0042231d
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x40571e
push str.Improperly_written_data_during_file_creation_n
call fcn.00402820
add esp, 4
jmp 0x4056b6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_while_writng_during_file_creation__error_code:__u__n
call fcn.00402820
add esp, 8
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x40571c
mov eax, dword [ebp - 0x1c]
sub eax, ebx
cmp eax, 0x1000
jb 0x4056fd
test bl, 0x1f
je 0x4056d9
call fcn.00420913
mov eax, dword [ebx - 4]
cmp eax, ebx
jb 0x4056e5
call fcn.00420913
sub ebx, eax
cmp ebx, 4
jae 0x4056f1
call fcn.00420913
cmp ebx, 0x23
jbe 0x4056fb
call fcn.00420913
mov ebx, eax
push ebx
call fcn.0041a013
add esp, 4
jmp 0x40571c
push str.File_pointer_improperly_moved_during_file_creation_when_extending_file_n
call fcn.00402820
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041a002
mov esp, ebp
pop ebp
ret 0x14