Function at 0x407230
Capabilities:
Check if file exists
Clear file content
Create directory
Get file attributes
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43a43b
mov eax, dword fs:[0]
push eax
sub esp, 0x148
mov eax, dword [0x44f008]
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 ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
push ecx
push eax
push ebx
push str.Creating_file__s_of_size__I64u._n
push dword [ebp + 0x18]
mov byte [ebp - 0x145], 0
call fcn.00402e60
add esp, 0x14
mov edx, str.WARNING:
mov ecx, str.SeManageVolumePrivilege
call fcn.00402d00
test al, al
jne 0x4072af
call dword [sym.imp.KERNEL32.dll_GetLastError]
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.00402e20
add esp, 8
mov byte [ebp - 0x145], 1
cmp byte [ebx], 0
je 0x407345
cmp byte [ebx + 1], 0x3a
jne 0x407345
push ebx
lea eax, [ebp - 0x11c]
push 0x104
push eax
call fcn.0042b026
add esp, 0xc
test eax, eax
je 0x4072f6
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, 0x6f
push eax
push str.WARNING:_Could_not_create_intermediate_directory__error_code:__u__n
call fcn.00402e20
add esp, 8
jmp 0x40734b
mov al, byte [ebp - 0x11c]
lea esi, [ebp - 0x11c]
test al, al
je 0x407345
xor edi, edi
cmp al, 0x5c
jne 0x40733c
cmp edi, 3
jl 0x40733c
lea eax, [ebp - 0x11c]
mov byte [esi], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x407339
push 0
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x407386
mov byte [esi], 0x5c
mov al, byte [esi + 1]
inc esi
inc edi
test al, al
jne 0x407308
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [ebp - 0x14c], ebx
cmp ebx, 0xffffffff
jne 0x4073a7
call edi
push eax
push str.Could_not_create_the_file__error_code:__u__n
call fcn.00402e20
add esp, 8
jmp 0x4076ce
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
je 0x40734b
cmp eax, 0x32
je 0x40734b
push eax
push str.WARNING:_Could_not_create_intermediate_directory__error_code:__u__n
call fcn.00402e20
add esp, 8
jmp 0x40734b
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
test eax, eax
jne 0x4073b9
test esi, esi
je 0x407612
push 0
lea ecx, [ebp - 0x134]
push ecx
push eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push ebx
call esi
test eax, eax
jne 0x4073e6
call edi
push eax
push str.Could_not_set_file_pointer_during_file_creation_when_extending_file__error_code:__u__n
call fcn.00402e20
add esp, 8
jmp 0x4076c7
mov eax, dword [ebp + 8]
cmp dword [ebp - 0x134], eax
jne 0x4076ba
mov ecx, dword [ebp + 0xc]
cmp dword [ebp - 0x130], ecx
jne 0x4076ba
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x407424
call edi
push eax
push str.Error_setting_end_of_file__error_code:__u__n
call fcn.00402e20
add esp, 8
jmp 0x4076c7
cmp byte [ebp - 0x145], 0
jne 0x40745b
mov edi, dword [ebp + 0xc]
push edi
push dword [ebp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileValidData]
test eax, eax
jne 0x407659
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
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.00402e20
add esp, 8
jmp 0x407461
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
lea eax, [ebp - 0x134]
push eax
push 0
push 0
push ebx
call esi
test eax, eax
jne 0x40748a
call edi
push eax
push str.Could_not_set_file_pointer_during_file_creation__error_code:__u__n
call fcn.00402e20
add esp, 8
jmp 0x4076c7
mov eax, dword [ebp - 0x134]
or eax, dword [ebp - 0x130]
je 0x4074a2
push str.File_pointer_improperly_moved_during_file_creation_n
jmp 0x4076bf
cmp dword [ebp + 0xc], 0
mov esi, 0x100000
ja 0x4074b8
mov eax, dword [ebp + 8]
jb 0x4074b6
cmp eax, esi
jae 0x4074b8
mov esi, eax
xor eax, eax
xor edi, edi
xor edx, edx
mov dword [ebp - 0x128], edi
mov dword [ebp - 0x124], eax
mov dword [ebp - 0x120], eax
test esi, esi
je 0x407542
cmp esi, 0x7fffffff
ja 0x4076ee
cmp esi, 0x1000
jb 0x40750e
lea eax, [esi + 0x23]
cmp eax, esi
ja 0x4074f2
or eax, 0xffffffff
push eax
call fcn.00423f21
add esp, 4
test eax, eax
je 0x4076f3
lea edi, [eax + 0x23]
and edi, 0xffffffe0
mov dword [edi - 4], eax
jmp 0x407519
push esi
call fcn.00423f21
add esp, 4
mov edi, eax
push esi
lea eax, [edi + esi]
mov dword [ebp - 0x128], edi
push 0
push edi
mov dword [ebp - 0x120], eax
call fcn.00425140
mov eax, dword [ebp - 0x120]
add esp, 0xc
mov dword [ebp - 0x124], eax
mov edx, edi
xor ecx, ecx
mov dword [ebp - 4], 0
test esi, esi
je 0x407569
mov bl, byte [ebp + 0x14]
test bl, bl
setne al
dec al
and al, cl
mov byte [edx + ecx], al
inc ecx
cmp ecx, esi
jb 0x407552
mov ebx, dword [ebp - 0x14c]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x150], eax
mov dword [ebp - 0x14c], ecx
jmp 0x407580
xor edx, edx
cmp edx, ecx
jb 0x40758e
ja 0x40758c
cmp esi, eax
jbe 0x40758e
mov esi, eax
push 0
lea eax, [ebp - 0x138]
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40766d
cmp dword [ebp - 0x138], esi
jne 0x40765e
mov eax, dword [ebp - 0x150]
mov ecx, dword [ebp - 0x14c]
sub eax, esi
mov dword [ebp - 0x150], eax
sbb ecx, 0
mov dword [ebp - 0x14c], ecx
test ecx, ecx
ja 0x407580
jb 0x4075db
test eax, eax
jne 0x407580
test edi, edi
je 0x40760f
mov ecx, dword [ebp - 0x120]
mov eax, edi
sub ecx, edi
cmp ecx, 0x1000
jb 0x407605
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4076f3
push ecx
push edi
call fcn.00423c9a
add esp, 8
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0x144]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x40764e
cmp dword [ebp - 0x144], esi
jne 0x407637
cmp dword [ebp - 0x140], edi
je 0x40764e
push 0x7c4
push str.C:DriveProjectsdiskspd2_0_21aIORequestGeneratorIORequestGenerator.cpp
push str.li.QuadPart___LONGLONG_ullFileSize
call fcn.0042c860
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x4076d0
mov esi, dword [ebp + 8]
jmp 0x407615
push str.Improperly_written_data_during_file_creation_n
call fcn.00402e20
add esp, 4
jmp 0x407681
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_while_writng_during_file_creation__error_code:__u__n
call fcn.00402e20
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x4076ce
mov ecx, dword [ebp - 0x120]
mov eax, edi
sub ecx, edi
cmp ecx, 0x1000
jb 0x4076ae
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4076f8
push ecx
push edi
call fcn.00423c9a
add esp, 8
jmp 0x4076ce
push str.File_pointer_improperly_moved_during_file_creation_when_extending_file_n
call fcn.00402e20
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 - 0x14]
xor ecx, ebp
call fcn.00423c89
mov esp, ebp
pop ebp
ret 0x14
call fcn.0040df00
call fcn.0042aea7
call fcn.0042aea7
int3