Function at 0x407960
Capabilities:
Clear file content
Create directory
Get disk information
Get disk size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x466cc6
mov eax, dword fs:[0]
push eax
sub esp, 0x38c
mov eax, dword [0x488540]
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 ebx, ecx
mov dword [ebp - 0x340], ebx
mov eax, dword fs:[0x2c]
mov edx, dword [eax]
mov eax, dword [0x48cd5c]
cmp eax, dword [edx + 4]
jle 0x4079f7
push 0x48cd5c
call fcn.0044c439
add esp, 4
cmp dword [0x48cd5c], 0xffffffff
jne 0x4079f7
call fcn.00431d31
mov ecx, eax
test ecx, ecx
je 0x408447
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
push 0x46afb0
mov dword [0x48cd60], eax
call fcn.0044c6d9
add esp, 4
push 0x48cd5c
call fcn.0044c3e8
add esp, 4
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x218]
push 0x5c
push eax
call fcn.0044dafe
add esp, 8
test eax, eax
je 0x407a25
xor ecx, ecx
mov word [eax], cx
mov eax, dword [0x488fc8]
mov dword [0x48cb90], 0
cmp eax, 0xffffffff
jne 0x407a53
push ecx
lea edx, [eax + 3]
lea ecx, [eax + 7]
call fcn.00427dd0
add esp, 4
neg eax
sbb eax, eax
neg eax
mov dword [0x488fc8], eax
test eax, eax
mov eax, str.CdmResourcediskspddiskspd32.exe
jne 0x407a61
mov eax, str.CdmResourcediskspddiskspd32L.exe
push eax
lea eax, [ebp - 0x218]
push eax
push str._s_s
push 0x48cbd0
call fcn.00408d30
push 0x47b594
push dword [0x48cbd0]
lea eax, [ebp - 0x360]
mov dword [ebp - 0x360], 0
push eax
call fcn.0045738c
add esp, 0x1c
test eax, eax
jne 0x408410
mov eax, dword [ebp - 0x360]
test eax, eax
je 0x408410
push eax
call fcn.004577a8
mov eax, dword [ebx + 0x414]
add esp, 4
inc eax
mov dword [0x48cca4], eax
mov eax, dword [ebx + 0x3f8]
sub eax, 0x10
push eax
call fcn.00402510
add esp, 4
lea esi, [eax + 0x10]
mov dword [ebp - 0x358], esi
mov dword [ebp - 4], 0
cmp dword [esi - 0xc], 0
jl 0x407b16
push 0x475abc
push esi
call fcn.0044dba1
add esp, 8
test eax, eax
je 0x407b16
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x407b16
push esi
call fcn.00452ece
add esp, 4
cdq
jmp 0x407b27
push esi
call fcn.00452ece
cdq
add esp, 4
shld edx, eax, 0xa
shl eax, 0xa
mov dword [0x48cca8], eax
mov eax, dword [ebx + 0x424]
mov dword [0x48ccb0], eax
mov eax, dword [ebx + 0x448]
mov dword [0x48ccd4], eax
mov eax, dword [ebx + 0x46c]
mov dword [0x48ccf8], eax
mov eax, dword [ebx + 0x490]
mov dword [0x48cd1c], eax
mov eax, dword [ebx + 0x428]
mov dword [0x48ccb4], eax
mov eax, dword [ebx + 0x44c]
mov dword [0x48ccd8], eax
mov eax, dword [ebx + 0x470]
mov dword [0x48ccfc], eax
mov eax, dword [ebx + 0x494]
mov dword [0x48cd20], eax
mov eax, dword [ebx + 0x42c]
mov dword [0x48ccb8], eax
mov eax, dword [ebx + 0x450]
mov dword [0x48ccdc], eax
mov eax, dword [ebx + 0x474]
mov dword [0x48cd00], eax
mov eax, dword [ebx + 0x498]
mov dword [0x48cd24], eax
mov eax, dword [ebx + 0x430]
mov dword [0x48ccbc], eax
mov eax, dword [ebx + 0x454]
mov dword [0x48cce0], eax
mov eax, dword [ebx + 0x478]
mov dword [0x48cd04], eax
mov eax, dword [ebx + 0x49c]
mov dword [0x48cd28], eax
mov eax, dword [ebx + 0x434]
mov dword [0x48ccc0], eax
mov eax, dword [ebx + 0x458]
mov dword [0x48cce4], eax
mov eax, dword [ebx + 0x47c]
mov dword [0x48cd08], eax
mov eax, dword [ebx + 0x4a0]
mov dword [0x48cd2c], eax
mov eax, dword [ebx + 0x438]
mov dword [0x48ccc4], eax
mov eax, dword [ebx + 0x45c]
mov dword [0x48cce8], eax
mov eax, dword [ebx + 0x480]
mov dword [0x48cd0c], eax
mov eax, dword [ebx + 0x4a4]
mov dword [0x48cd30], eax
mov eax, dword [ebx + 0x43c]
mov dword [0x48ccc8], eax
mov eax, dword [ebx + 0x460]
mov dword [0x48ccec], eax
mov eax, dword [ebx + 0x484]
mov dword [0x48cd10], eax
mov eax, dword [ebx + 0x4a8]
mov dword [0x48cd34], eax
mov eax, dword [ebx + 0x440]
mov dword [0x48cccc], eax
mov eax, dword [ebx + 0x464]
mov dword [0x48ccf0], eax
mov eax, dword [ebx + 0x488]
mov dword [0x48cd14], eax
mov eax, dword [ebx + 0x4ac]
mov dword [0x48cd38], eax
mov eax, dword [ebx + 0x444]
mov dword [0x48ccd0], eax
mov eax, dword [ebx + 0x468]
mov dword [0x48ccf4], eax
mov eax, dword [ebx + 0x48c]
mov dword [0x48cd18], eax
mov eax, dword [ebx + 0x4b0]
mov dword [0x48cd3c], eax
mov eax, dword [ebx + 0x50c]
mov dword [0x48cd40], eax
mov eax, dword [ebx + 0x510]
mov dword [0x48ccac], edx
mov dword [0x48cd44], eax
call fcn.00431d31
mov ecx, eax
test ecx, ecx
je 0x408451
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x344], edi
mov byte [ebp - 4], 1
mov eax, dword [ebx + 0x40c]
cmp eax, dword [ebx + 0x41c]
je 0x407fdd
mov eax, dword [ebx + 0x3fc]
cmp dword [eax - 0xc], 0
jl 0x40845b
movzx edi, word [eax]
push edi
push 0x4756a8
push 0x48cd60
call fcn.00408d30
add esp, 0xc
lea eax, [ebp - 0x368]
push eax
lea eax, [ebp - 0x350]
push eax
lea eax, [ebp - 0x388]
push eax
push dword [0x48cd60]
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov edx, dword [ebp - 0x34c]
mov esi, dword [ebp - 0x350]
cmp edx, 2
ja 0x407e3a
jb 0x407d6d
test esi, esi
jae 0x407e3a
sub esi, dword [ebp - 0x368]
mov dword [ebp - 0x338], esi
sbb edx, dword [ebp - 0x364]
mov eax, edx
mov dword [ebp - 0x33c], str._C:__.1f_____.1f__.1f_MiB_
mov ecx, eax
and eax, 0x7fffffff
mov dword [ebp - 0x334], eax
and ecx, 0x80000000
fild qword [ebp - 0x338]
mov dword [ebp - 0x334], ecx
mov dword [ebp - 0x338], 0
fild qword [ebp - 0x338]
shrd esi, edx, 0xa
fchs
faddp st(1)
shr edx, 0xa
fstp qword [ebp - 0x338]
fld qword [ebp - 0x338]
mov eax, dword [ebp - 0x350]
mov ecx, dword [ebp - 0x34c]
mov dword [ebp - 0x338], eax
mov eax, ecx
and ecx, 0x7fffffff
and eax, 0x80000000
mov dword [ebp - 0x334], ecx
fild qword [ebp - 0x338]
mov dword [ebp - 0x334], eax
mov dword [ebp - 0x338], 0
fild qword [ebp - 0x338]
fchs
faddp st(1)
fstp qword [ebp - 0x338]
fdiv qword [ebp - 0x338]
mov eax, dword [ebp - 0x350]
mov ecx, dword [ebp - 0x34c]
shrd eax, ecx, 0xa
shr ecx, 0xa
jmp 0x407f02
sub esi, dword [ebp - 0x368]
mov dword [ebp - 0x338], esi
sbb edx, dword [ebp - 0x364]
mov eax, edx
mov dword [ebp - 0x33c], str._C:__.1f_____.1f__.1f_GiB_
mov ecx, eax
and eax, 0x7fffffff
mov dword [ebp - 0x334], eax
and ecx, 0x80000000
fild qword [ebp - 0x338]
mov dword [ebp - 0x334], ecx
mov dword [ebp - 0x338], 0
fild qword [ebp - 0x338]
shrd esi, edx, 0x14
fchs
faddp st(1)
shr edx, 0x14
fstp qword [ebp - 0x338]
fld qword [ebp - 0x338]
mov eax, dword [ebp - 0x350]
mov ecx, dword [ebp - 0x34c]
mov dword [ebp - 0x338], eax
mov eax, ecx
and ecx, 0x7fffffff
and eax, 0x80000000
mov dword [ebp - 0x334], ecx
fild qword [ebp - 0x338]
mov dword [ebp - 0x334], eax
mov dword [ebp - 0x338], 0
fild qword [ebp - 0x338]
fchs
faddp st(1)
fstp qword [ebp - 0x338]
fdiv qword [ebp - 0x338]
mov eax, dword [ebp - 0x350]
mov ecx, dword [ebp - 0x34c]
shrd eax, ecx, 0x14
shr ecx, 0x14
mov dword [ebp - 0x338], eax
sub esp, 0x18
mov eax, ecx
and ecx, 0x7fffffff
mov dword [ebp - 0x334], ecx
and eax, 0x80000000
fild qword [ebp - 0x338]
mov dword [ebp - 0x334], eax
mov eax, edx
mov dword [ebp - 0x338], 0
and edx, 0x7fffffff
and eax, 0x80000000
fild qword [ebp - 0x338]
fchs
faddp st(1)
fstp qword [ebp - 0x338]
fld qword [ebp - 0x338]
fld qword [0x47dc70]
fmul st(1), st(0)
fxch st(1)
mov dword [ebp - 0x334], edx
mov dword [ebp - 0x338], esi
fstp qword [esp + 0x10]
fild qword [ebp - 0x338]
mov dword [ebp - 0x334], eax
lea eax, [ebx + 0x400]
mov dword [ebp - 0x338], 0
fild qword [ebp - 0x338]
fchs
faddp st(1)
fstp qword [ebp - 0x338]
fmul qword [ebp - 0x338]
fstp qword [esp + 8]
fmul qword [0x47dcc0]
fstp qword [esp]
push edi
push dword [ebp - 0x33c]
push eax
call fcn.00408d30
add esp, 0x24
lea eax, [ebp - 0x344]
push edi
push str._c:_
push eax
call fcn.00408d30
mov esi, dword [ebp - 0x358]
add esp, 0xc
jmp 0x408051
mov ecx, dword [ebx + 0x404]
add edi, 0xfffffff0
lea edx, [ecx - 0x10]
cmp edx, edi
je 0x40803f
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x408030
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x408030
push edx
call fcn.00402510
add esp, 4
mov dword [ebp - 0x354], eax
or ecx, 0xffffffff
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x408025
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x354]
add eax, 0x10
mov dword [ebp - 0x344], eax
jmp 0x40803f
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x344]
call fcn.004029e0
push 1
push 0x475ab8
lea ecx, [ebp - 0x344]
call fcn.00408b90
call dword [sym.imp.WINMM.dll_timeGetTime]
mov edi, dword [ebp - 0x344]
push eax
push edi
push str._sCrystalDiskMark_08X
push 0x48cbcc
mov dword [ebp - 0x334], edi
call fcn.00408d30
add esp, 0x10
push 0
push dword [0x48cbcc]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ebx, dword [0x48cbcc]
call dword [sym.imp.WINMM.dll_timeGetTime]
push eax
push ebx
push str._sCrystalDiskMark_08X.tmp
push 0x48cbc8
call fcn.00408d30
add esp, 0x10
lea eax, [ebp - 0x37c]
push 0
push 0
push eax
push 0
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
lea eax, [ebp - 0x330]
mov dword [ebp - 0x330], 0x114
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea eax, [ebp - 0x378]
push eax
lea eax, [ebp - 0x390]
push eax
lea eax, [ebp - 0x398]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov ecx, dword [ebp - 0x378]
mov eax, dword [ebp - 0x374]
shrd ecx, eax, 0x14
shr eax, 0x14
cmp dword [0x48ccac], eax
jb 0x408148
ja 0x408117
cmp dword [0x48cca8], ecx
jbe 0x408148
mov ebx, dword [ebp - 0x340]
push 0
push 0
push dword [ebx + 0x514]
call fcn.00439d22
mov dword [ebx + 0x23c], 0
or ebx, 0xffffffff
mov dword [ebp - 0x33c], 0
jmp 0x408392
call fcn.00431d31
mov ecx, eax
test ecx, ecx
je 0x408465
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x35c], eax
lea eax, [ebp - 0x35c]
mov byte [ebp - 4], 2
push str.Preparing..._Create_Test_File
push eax
call fcn.00408d30
mov ebx, dword [ebp - 0x340]
lea eax, [ebp - 0x35c]
add esp, 8
push 0
push eax
push 0x9002
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_PostMessageW]
push 0
push 0x28000080
push 2
push 0
push 0
push 0xc0000000
push dword [0x48cbc8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edx, eax
mov dword [0x48cbd4], edx
push 0
push 0
cmp edx, 0xffffffff
jne 0x4081d9
push dword [ebx + 0x524]
call fcn.00439d22
jmp 0x4083f7
mov ecx, dword [0x48cca8]
mov eax, dword [0x48ccac]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
shld eax, ecx, 0x14
push eax
shl ecx, 0x14
push ecx
push edx
call ebx
push dword [0x48cbd4]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push 0
push 0
push 0
push 0
push dword [0x48cbd4]
call ebx
push 0
lea eax, [ebp - 0x36c]
mov dword [ebp - 0x370], 0
push eax
push 0
push 0
push 2
lea eax, [ebp - 0x370]
mov dword [ebp - 0x36c], 0
push eax
push 0x9c040
push dword [0x48cbd4]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov eax, dword [0x48cca8]
push 4
push 0x3000
push 0x100000
push 0
mov dword [ebp - 0x354], eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x33c], eax
test eax, eax
jne 0x40828d
push eax
push eax
push str.Failed_VirtualAlloc__.
call fcn.00439d22
mov ebx, dword [ebp - 0x340]
jmp 0x4083f7
mov ebx, dword [ebp - 0x340]
cmp dword [ebx + 0x4bc], 1
jne 0x4082ae
push 0x100000
push 0
push eax
call fcn.0044e5d0
add esp, 0xc
jmp 0x4082e1
mov edi, dword [ebp - 0x33c]
xor ebx, ebx
call fcn.00452f0d
and eax, 0x800000ff
jns 0x4082c9
dec eax
or eax, 0xffffff00
inc eax
mov byte [ebx + edi], al
inc ebx
cmp ebx, 0x100000
jl 0x4082b6
mov edi, dword [ebp - 0x334]
mov ebx, dword [ebp - 0x340]
cmp dword [ebp - 0x354], 0
mov dword [ebp - 0x340], 0
jle 0x408345
mov esi, dword [ebp - 0x33c]
mov edi, dword [ebp - 0x354]
cmp dword [ebx + 0x23c], 0
je 0x4083d1
push 0
lea eax, [ebp - 0x380]
push eax
push 0x100000
push esi
push dword [0x48cbd4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x340]
inc eax
mov dword [ebp - 0x340], eax
cmp eax, edi
jl 0x408300
mov esi, dword [ebp - 0x358]
mov edi, dword [ebp - 0x344]
push 0x8000
push 0
push dword [ebp - 0x33c]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push dword [0x48cbd4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x33c], 1
mov byte [ebp - 4], 1
or ebx, 0xffffffff
mov edx, dword [ebp - 0x35c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x408392
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4083ad
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4083c9
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x33c]
jmp 0x40842b
push dword [0x48cbd4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov esi, dword [ebp - 0x358]
mov edi, dword [ebp - 0x344]
mov dword [ebx + 0x23c], 0
mov dword [ebp - 0x33c], 0
jmp 0x40836e
push 0
push 0
push dword [ebx + 0x528]
call fcn.00439d22
mov dword [ebx + 0x23c], 0
xor eax, eax
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.0044c3da
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00402eb0
push 0x80004005
call fcn.00402eb0
push 0x80070057
call fcn.00402eb0
push 0x80004005
call fcn.00402eb0
int3