Function at 0x406f50
Capabilities:
Check os version
Clear file content
Create directory
Get disk information
Get disk size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x465956
mov eax, dword fs:[0]
push eax
sub esp, 0x4b4
mov eax, dword [0x486540]
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 - 0x460], ebx
mov eax, dword fs:[0x2c]
mov edx, dword [eax]
mov eax, dword [0x48ad08]
cmp eax, dword [edx + 4]
jle 0x406fe7
push 0x48ad08
call fcn.0044b47b
add esp, 4
cmp dword [0x48ad08], 0xffffffff
jne 0x406fe7
call fcn.00430fae
mov ecx, eax
test ecx, ecx
je 0x407a87
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
push 0x469a80
mov dword [0x48ad0c], eax
call fcn.0044b78d
add esp, 4
push 0x48ad08
call fcn.0044b431
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.0044c9e1
add esp, 8
test eax, eax
je 0x407015
xor ecx, ecx
mov word [eax], cx
mov eax, dword [0x486f88]
mov dword [0x48ab40], 0
cmp eax, 0xffffffff
jne 0x407124
push 0x118
lea eax, [ebp - 0x334]
mov dword [0x486f88], 0
push 0
push eax
call fcn.0044d4e0
add esp, 0xc
mov dword [ebp - 0x338], 0x11c
lea eax, [ebp - 0x338]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [ebp - 0x334]
cmp eax, 5
jbe 0x40708e
cmp eax, 6
jne 0x40707d
cmp dword [ebp - 0x330], 1
jbe 0x40708e
mov dword [0x486f88], 1
mov eax, str.CdmResourcediskspddiskspd32.exe
jmp 0x40709d
mov dword [0x486f88], 0
mov eax, str.CdmResourcediskspddiskspd32L.exe
push eax
lea eax, [ebp - 0x218]
push eax
push str._s_s
push 0x48ab80
call fcn.00408310
push 0x4793d4
push dword [0x48ab80]
lea eax, [ebp - 0x48c]
push eax
call fcn.004561c9
add esp, 0x1c
test eax, eax
jne 0x407a50
mov eax, dword [ebp - 0x48c]
test eax, eax
je 0x407a50
push eax
call fcn.004565e9
mov eax, dword [ebx + 0x40c]
add esp, 4
inc eax
mov dword [0x48ac54], eax
mov eax, dword [ebx + 0x3f0]
mov ecx, dword [eax - 0x10]
lea esi, [eax - 0x10]
mov dword [ebp - 0x474], eax
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
mov ecx, eax
lea eax, [esi + 0xc]
jl 0x407136
cmp ecx, dword [esi]
jne 0x407136
lock inc dword [eax]
jmp 0x407167
test eax, eax
je 0x407098
mov eax, str.CdmResourcediskspddiskspd32.exe
jmp 0x40709d
mov eax, dword [ecx]
lea edi, [esi + 4]
push 2
push dword [edi]
call dword [eax]
mov esi, eax
test esi, esi
je 0x407a91
mov eax, dword [edi]
mov dword [esi + 4], eax
mov eax, dword [edi]
inc eax
push eax
push dword [ebp - 0x474]
push eax
lea eax, [esi + 0x10]
push eax
call fcn.00402a10
add esp, 0x10
add esi, 0x10
mov dword [ebp - 0x478], esi
mov dword [ebp - 4], 0
cmp dword [esi - 0xc], 0
jl 0x4071a4
push 0x473a84
push esi
call fcn.0044ca85
add esp, 8
test eax, eax
je 0x4071a4
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x4071a4
push esi
call fcn.00451daa
add esp, 4
cdq
jmp 0x4071b5
push esi
call fcn.00451daa
cdq
add esp, 4
shld edx, eax, 0xa
shl eax, 0xa
mov dword [0x48ac58], eax
mov eax, dword [ebx + 0x41c]
mov dword [0x48ac60], eax
mov eax, dword [ebx + 0x440]
mov dword [0x48ac84], eax
mov eax, dword [ebx + 0x464]
mov dword [0x48aca8], eax
mov eax, dword [ebx + 0x488]
mov dword [0x48accc], eax
mov eax, dword [ebx + 0x420]
mov dword [0x48ac64], eax
mov eax, dword [ebx + 0x444]
mov dword [0x48ac88], eax
mov eax, dword [ebx + 0x468]
mov dword [0x48acac], eax
mov eax, dword [ebx + 0x48c]
mov dword [0x48acd0], eax
mov eax, dword [ebx + 0x424]
mov dword [0x48ac68], eax
mov eax, dword [ebx + 0x448]
mov dword [0x48ac8c], eax
mov eax, dword [ebx + 0x46c]
mov dword [0x48acb0], eax
mov eax, dword [ebx + 0x490]
mov dword [0x48acd4], eax
mov eax, dword [ebx + 0x428]
mov dword [0x48ac6c], eax
mov eax, dword [ebx + 0x44c]
mov dword [0x48ac90], eax
mov eax, dword [ebx + 0x470]
mov dword [0x48acb4], eax
mov eax, dword [ebx + 0x494]
mov dword [0x48acd8], eax
mov eax, dword [ebx + 0x42c]
mov dword [0x48ac70], eax
mov eax, dword [ebx + 0x450]
mov dword [0x48ac94], eax
mov eax, dword [ebx + 0x474]
mov dword [0x48acb8], eax
mov eax, dword [ebx + 0x498]
mov dword [0x48acdc], eax
mov eax, dword [ebx + 0x430]
mov dword [0x48ac74], eax
mov eax, dword [ebx + 0x454]
mov dword [0x48ac98], eax
mov eax, dword [ebx + 0x478]
mov dword [0x48acbc], eax
mov eax, dword [ebx + 0x49c]
mov dword [0x48ace0], eax
mov eax, dword [ebx + 0x434]
mov dword [0x48ac78], eax
mov eax, dword [ebx + 0x458]
mov dword [0x48ac9c], eax
mov eax, dword [ebx + 0x47c]
mov dword [0x48acc0], eax
mov eax, dword [ebx + 0x4a0]
mov dword [0x48ace4], eax
mov eax, dword [ebx + 0x438]
mov dword [0x48ac7c], eax
mov eax, dword [ebx + 0x45c]
mov dword [0x48aca0], eax
mov eax, dword [ebx + 0x480]
mov dword [0x48acc4], eax
mov eax, dword [ebx + 0x4a4]
mov dword [0x48ace8], eax
mov eax, dword [ebx + 0x43c]
mov dword [0x48ac80], eax
mov eax, dword [ebx + 0x460]
mov dword [0x48aca4], eax
mov eax, dword [ebx + 0x484]
mov dword [0x48acc8], eax
mov eax, dword [ebx + 0x4a8]
mov dword [0x48acec], eax
mov eax, dword [ebx + 0x504]
mov dword [0x48acf0], eax
mov eax, dword [ebx + 0x508]
mov dword [0x48ac5c], edx
mov dword [0x48acf4], eax
call fcn.00430fae
mov ecx, eax
test ecx, ecx
je 0x407a96
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x464], eax
mov byte [ebp - 4], 1
mov eax, dword [ebx + 0x404]
cmp eax, dword [ebx + 0x414]
je 0x40766b
mov eax, dword [ebx + 0x3f4]
cmp dword [eax - 0xc], 0
jl 0x407aa0
movzx edi, word [eax]
push edi
push 0x473670
push 0x48ad0c
call fcn.00408310
add esp, 0xc
lea eax, [ebp - 0x488]
push eax
lea eax, [ebp - 0x470]
push eax
lea eax, [ebp - 0x4b0]
push eax
push dword [0x48ad0c]
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov edx, dword [ebp - 0x46c]
mov esi, dword [ebp - 0x470]
cmp edx, 2
ja 0x4074c8
jb 0x4073fb
test esi, esi
jae 0x4074c8
sub esi, dword [ebp - 0x488]
mov dword [ebp - 0x458], esi
sbb edx, dword [ebp - 0x484]
mov eax, edx
mov dword [ebp - 0x45c], str._C:__.1f_____.1f__.1f_MiB_
mov ecx, eax
and eax, 0x7fffffff
mov dword [ebp - 0x454], eax
and ecx, 0x80000000
fild qword [ebp - 0x458]
mov dword [ebp - 0x454], ecx
mov dword [ebp - 0x458], 0
fild qword [ebp - 0x458]
shrd esi, edx, 0xa
fchs
faddp st(1)
shr edx, 0xa
fstp qword [ebp - 0x458]
fld qword [ebp - 0x458]
mov eax, dword [ebp - 0x470]
mov ecx, dword [ebp - 0x46c]
mov dword [ebp - 0x458], eax
mov eax, ecx
and ecx, 0x7fffffff
and eax, 0x80000000
mov dword [ebp - 0x454], ecx
fild qword [ebp - 0x458]
mov dword [ebp - 0x454], eax
mov dword [ebp - 0x458], 0
fild qword [ebp - 0x458]
fchs
faddp st(1)
fstp qword [ebp - 0x458]
fdiv qword [ebp - 0x458]
mov eax, dword [ebp - 0x470]
mov ecx, dword [ebp - 0x46c]
shrd eax, ecx, 0xa
shr ecx, 0xa
jmp 0x407590
sub esi, dword [ebp - 0x488]
mov dword [ebp - 0x458], esi
sbb edx, dword [ebp - 0x484]
mov eax, edx
mov dword [ebp - 0x45c], str._C:__.1f_____.1f__.1f_GiB_
mov ecx, eax
and eax, 0x7fffffff
mov dword [ebp - 0x454], eax
and ecx, 0x80000000
fild qword [ebp - 0x458]
mov dword [ebp - 0x454], ecx
mov dword [ebp - 0x458], 0
fild qword [ebp - 0x458]
shrd esi, edx, 0x14
fchs
faddp st(1)
shr edx, 0x14
fstp qword [ebp - 0x458]
fld qword [ebp - 0x458]
mov eax, dword [ebp - 0x470]
mov ecx, dword [ebp - 0x46c]
mov dword [ebp - 0x458], eax
mov eax, ecx
and ecx, 0x7fffffff
and eax, 0x80000000
mov dword [ebp - 0x454], ecx
fild qword [ebp - 0x458]
mov dword [ebp - 0x454], eax
mov dword [ebp - 0x458], 0
fild qword [ebp - 0x458]
fchs
faddp st(1)
fstp qword [ebp - 0x458]
fdiv qword [ebp - 0x458]
mov eax, dword [ebp - 0x470]
mov ecx, dword [ebp - 0x46c]
shrd eax, ecx, 0x14
shr ecx, 0x14
mov dword [ebp - 0x458], eax
sub esp, 0x18
mov eax, ecx
and ecx, 0x7fffffff
mov dword [ebp - 0x454], ecx
and eax, 0x80000000
fild qword [ebp - 0x458]
mov dword [ebp - 0x454], eax
mov eax, edx
mov dword [ebp - 0x458], 0
and edx, 0x7fffffff
and eax, 0x80000000
fild qword [ebp - 0x458]
fchs
faddp st(1)
fstp qword [ebp - 0x458]
fld qword [ebp - 0x458]
fld qword [0x47ba98]
fmul st(1), st(0)
fxch st(1)
mov dword [ebp - 0x454], edx
mov dword [ebp - 0x458], esi
fstp qword [esp + 0x10]
fild qword [ebp - 0x458]
mov dword [ebp - 0x454], eax
lea eax, [ebx + 0x3f8]
mov dword [ebp - 0x458], 0
fild qword [ebp - 0x458]
fchs
faddp st(1)
fstp qword [ebp - 0x458]
fmul qword [ebp - 0x458]
fstp qword [esp + 8]
fmul qword [0x47bae0]
fstp qword [esp]
push edi
push dword [ebp - 0x45c]
push eax
call fcn.00408310
add esp, 0x24
lea eax, [ebp - 0x464]
push edi
push str._c:_
push eax
call fcn.00408310
mov esi, dword [ebp - 0x478]
add esp, 0xc
jmp 0x40768f
lea eax, [ebx + 0x3fc]
push eax
lea ecx, [ebp - 0x464]
call fcn.00402400
push 1
push 0x473a80
lea ecx, [ebp - 0x464]
call fcn.004081a0
mov ebx, dword [sym.imp.WINMM.dll_timeGetTime]
call ebx
mov edi, dword [ebp - 0x464]
push eax
push edi
push str._sCrystalDiskMark_08X
push 0x48ab7c
mov dword [ebp - 0x454], edi
call fcn.00408310
add esp, 0x10
push 0
push dword [0x48ab7c]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
call ebx
push eax
push dword [0x48ab7c]
push str._sCrystalDiskMark_08X.tmp
push 0x48ab78
call fcn.00408310
add esp, 0x10
lea eax, [ebp - 0x4a4]
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 - 0x450]
mov dword [ebp - 0x450], 0x114
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea eax, [ebp - 0x4a0]
push eax
lea eax, [ebp - 0x4b8]
push eax
lea eax, [ebp - 0x4c0]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov ecx, dword [ebp - 0x4a0]
mov eax, dword [ebp - 0x49c]
shrd ecx, eax, 0x14
shr eax, 0x14
cmp dword [0x48ac5c], eax
jb 0x407783
ja 0x407752
cmp dword [0x48ac58], ecx
jbe 0x407783
mov ebx, dword [ebp - 0x460]
push 0
push 0
push dword [ebx + 0x50c]
call fcn.00438ebf
mov dword [ebx + 0x234], 0
or ebx, 0xffffffff
mov dword [ebp - 0x45c], 0
jmp 0x4079d2
call fcn.00430fae
mov ecx, eax
test ecx, ecx
je 0x407aaa
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x47c], eax
lea eax, [ebp - 0x47c]
mov byte [ebp - 4], 2
push str.Preparing..._Create_Test_File
push eax
call fcn.00408310
mov ebx, dword [ebp - 0x460]
lea eax, [ebp - 0x47c]
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 [0x48ab78]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edx, eax
mov dword [0x48ab84], edx
push 0
push 0
cmp edx, 0xffffffff
jne 0x407814
push dword [ebx + 0x51c]
call fcn.00438ebf
jmp 0x407a37
mov ecx, dword [0x48ac58]
mov eax, dword [0x48ac5c]
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 [0x48ab84]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push 0
push 0
push 0
push 0
push dword [0x48ab84]
call ebx
push 0
lea eax, [ebp - 0x490]
mov dword [ebp - 0x494], 0
push eax
push 0
push 0
push 2
lea eax, [ebp - 0x494]
mov dword [ebp - 0x490], 0
push eax
push 0x9c040
push dword [0x48ab84]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov eax, dword [0x48ac58]
push 4
push 0x3000
push 0x100000
push 0
mov dword [ebp - 0x474], eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x45c], eax
test eax, eax
jne 0x4078c8
push eax
push eax
push str.Failed_VirtualAlloc__.
call fcn.00438ebf
mov ebx, dword [ebp - 0x460]
jmp 0x407a37
mov ebx, dword [ebp - 0x460]
cmp dword [ebx + 0x4b4], 1
jne 0x4078e9
push 0x100000
push 0
push eax
call fcn.0044d4e0
add esp, 0xc
jmp 0x40791c
mov edi, dword [ebp - 0x45c]
xor ebx, ebx
call fcn.00451de9
and eax, 0x800000ff
jns 0x407904
dec eax
or eax, 0xffffff00
inc eax
mov byte [ebx + edi], al
inc ebx
cmp ebx, 0x100000
jl 0x4078f1
mov edi, dword [ebp - 0x454]
mov ebx, dword [ebp - 0x460]
cmp dword [ebp - 0x474], 0
mov dword [ebp - 0x460], 0
jle 0x407985
mov esi, dword [ebp - 0x45c]
mov edi, dword [ebp - 0x474]
jmp 0x407940
cmp dword [ebx + 0x234], 0
je 0x407a11
push 0
lea eax, [ebp - 0x4a8]
push eax
push 0x100000
push esi
push dword [0x48ab84]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x460]
inc eax
mov dword [ebp - 0x460], eax
cmp eax, edi
jl 0x407940
mov esi, dword [ebp - 0x478]
mov edi, dword [ebp - 0x464]
push 0x8000
push 0
push dword [ebp - 0x45c]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push dword [0x48ab84]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x45c], 1
mov byte [ebp - 4], 1
or ebx, 0xffffffff
mov edx, dword [ebp - 0x47c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4079d2
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 0x4079ed
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 0x407a09
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x45c]
jmp 0x407a6b
push dword [0x48ab84]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov esi, dword [ebp - 0x478]
mov edi, dword [ebp - 0x464]
mov dword [ebx + 0x234], 0
mov dword [ebp - 0x45c], 0
jmp 0x4079ae
push 0
push 0
push dword [ebx + 0x520]
call fcn.00438ebf
mov dword [ebx + 0x234], 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.0044b35e
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00402d40
call fcn.00402b20
push 0x80004005
call fcn.00402d40
push 0x80070057
call fcn.00402d40
push 0x80004005
call fcn.00402d40
int3