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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58cdf4
mov eax, dword fs:[0]
push eax
sub esp, 0x4ac
mov eax, dword [0x5ebfc4]
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 - 0x464], ebx
mov eax, dword fs:[0x2c]
mov edx, dword [eax]
mov eax, dword [0x5f4e68]
cmp eax, dword [edx + 4]
jg 0x565c40
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.0053dbee
add esp, 8
test eax, eax
je 0x56530d
xor ecx, ecx
mov word [eax], cx
push 0x118
lea eax, [ebp - 0x334]
mov dword [0x5f4d10], 0
push 0
push eax
call fcn.0053eae0
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea eax, [ebp - 0x338]
add esp, 0xc
mov dword [ebp - 0x338], 0x11c
push eax
call esi
test eax, eax
jne 0x56535d
lea eax, [ebp - 0x338]
mov dword [ebp - 0x338], 0x114
push eax
call esi
mov eax, dword [ebp - 0x334]
cmp eax, 5
jbe 0x565382
cmp eax, 6
jne 0x565376
cmp dword [ebp - 0x330], 1
jbe 0x565382
mov eax, 0x5c2dec
mov ecx, str.CdmResourcediskspddiskspd32.exe
jmp 0x56538c
mov eax, 0x5c2e40
mov ecx, str.CdmResourcediskspddiskspd32L.exe
push ecx
lea ecx, [ebp - 0x218]
push ecx
push eax
push 0x5f4d30
call fcn.00404950
push 0x5c9250
push dword [0x5f4d30]
lea eax, [ebp - 0x484]
push eax
call fcn.00543a4b
add esp, 0x1c
test eax, eax
jne 0x565c09
mov eax, dword [ebp - 0x484]
test eax, eax
je 0x565c09
push eax
call fcn.00543e2c
mov eax, dword [ebx + 0x500]
add esp, 4
inc eax
mov dword [0x5f4e24], eax
mov eax, dword [ebx + 0x4e4]
sub eax, 0x10
push eax
call fcn.00401f10
add esp, 4
lea esi, [eax + 0x10]
mov dword [ebp - 0x474], esi
mov dword [ebp - 4], 0
cmp dword [esi - 0xc], 0
jl 0x565433
push 0x5c2e4c
push esi
call fcn.0053dc90
add esp, 8
test eax, eax
je 0x565433
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x565433
push esi
call fcn.00545198
add esp, 4
cdq
jmp 0x565444
push esi
call fcn.00545198
cdq
add esp, 4
shld edx, eax, 0xa
shl eax, 0xa
mov dword [0x5f4e28], eax
mov eax, dword [ebx + 0x510]
mov dword [0x5f4e30], eax
mov eax, dword [ebx + 0x51c]
mov dword [0x5f4e34], eax
mov eax, dword [ebx + 0x528]
mov dword [0x5f4e38], eax
mov eax, dword [ebx + 0x534]
mov dword [0x5f4e3c], eax
mov eax, dword [ebx + 0x554]
mov dword [0x5f4e40], eax
mov eax, dword [ebx + 0x568]
mov dword [0x5f4e44], eax
mov eax, dword [ebx + 0x56c]
mov dword [0x5f4e2c], edx
mov dword [0x5f4e48], eax
call fcn.00407271
mov ecx, eax
test ecx, ecx
je 0x565caf
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x5940e4
jne 0x565cb9
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
add eax, 0x10
mov dword [ebp - 0x460], eax
mov byte [ebp - 4], 1
mov eax, dword [ebx + 0x4f8]
cmp eax, dword [ebx + 0x508]
je 0x5657b7
mov eax, dword [ebx + 0x4e8]
cmp dword [eax - 0xc], 0
jl 0x565cc0
movzx edi, word [eax]
push edi
push 0x5c2e50
push 0x5f4e6c
call fcn.00404950
add esp, 0xc
lea eax, [ebp - 0x480]
push eax
lea eax, [ebp - 0x470]
push eax
lea eax, [ebp - 0x4a8]
push eax
push dword [0x5f4e6c]
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov edx, dword [ebp - 0x46c]
mov esi, dword [ebp - 0x470]
cmp edx, 2
ja 0x565614
jb 0x565547
test esi, esi
jae 0x565614
sub esi, dword [ebp - 0x480]
mov dword [ebp - 0x458], esi
sbb edx, dword [ebp - 0x47c]
mov eax, edx
mov dword [ebp - 0x45c], 0x5c2e58
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 0x5656dc
sub esi, dword [ebp - 0x480]
mov dword [ebp - 0x458], esi
sbb edx, dword [ebp - 0x47c]
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 [0x5cd2f0]
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 + 0x4ec]
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 [0x5cd3a8]
fstp qword [esp]
push edi
push dword [ebp - 0x45c]
push eax
call fcn.00404950
add esp, 0x24
lea eax, [ebp - 0x460]
push edi
push str._c:_
push eax
call fcn.00404950
mov esi, dword [ebp - 0x474]
add esp, 0xc
jmp 0x5657db
lea eax, [ebx + 0x4f0]
push eax
lea ecx, [ebp - 0x460]
call fcn.00401f80
push 1
push 0x5c2ed4
lea ecx, [ebp - 0x460]
call fcn.004052d0
call dword [sym.imp.WINMM.dll_timeGetTime]
mov edi, dword [ebp - 0x460]
push eax
push edi
push 0x5c2ed8
push 0x5f4d2c
mov dword [ebp - 0x454], edi
call fcn.00404950
add esp, 0x10
push 0
push dword [0x5f4d2c]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ebx, dword [0x5f4d2c]
call dword [sym.imp.WINMM.dll_timeGetTime]
push eax
push ebx
push str._sCrystalDiskMark_08X.tmp
push 0x5f4d28
call fcn.00404950
add esp, 0x10
lea eax, [ebp - 0x49c]
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 - 0x498]
push eax
lea eax, [ebp - 0x4b0]
push eax
lea eax, [ebp - 0x4b8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
mov ecx, dword [ebp - 0x498]
mov eax, dword [ebp - 0x494]
shrd ecx, eax, 0x14
shr eax, 0x14
cmp dword [0x5f4e2c], eax
jb 0x5658d2
ja 0x5658a1
cmp dword [0x5f4e28], ecx
jbe 0x5658d2
mov ebx, dword [ebp - 0x464]
push 0
push 0
push dword [ebx + 0x574]
call fcn.00412c49
mov dword [ebx + 0x414], 0
or ebx, 0xffffffff
mov dword [ebp - 0x45c], 0
jmp 0x565b6a
call fcn.00407271
mov ecx, eax
test ecx, ecx
je 0x565cca
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x5940e4
jne 0x565cd4
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
add eax, 0x10
mov dword [ebp - 0x478], eax
lea eax, [ebp - 0x478]
mov byte [ebp - 4], 2
push str.Preparing..._Create_Test_File
push eax
call fcn.00404950
mov ebx, dword [ebp - 0x464]
lea eax, [ebp - 0x478]
add esp, 8
push 0
push eax
push 0x402
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 [0x5f4d28]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x5f4e20], eax
push 0
cmp eax, 0xffffffff
jne 0x565972
push 0
push dword [ebx + 0x584]
call fcn.00412c49
jmp 0x565b51
lea ecx, [ebp - 0x488]
mov dword [ebp - 0x48c], 0
push ecx
push 0
push 0
push 2
lea ecx, [ebp - 0x48c]
mov dword [ebp - 0x488], 0
push ecx
push 0x9c040
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov eax, dword [0x5f4e28]
push 4
push 0x3000
push 0x100000
push 0
mov dword [ebp - 0x468], eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x45c], eax
test eax, eax
jne 0x5659e0
push eax
push eax
push str.Failed_VirtualAlloc__.
call fcn.00412c49
jmp 0x565b51
cmp dword [ebx + 0x55c], 1
jne 0x5659fb
push 0x100000
push 0
push eax
call fcn.0053eae0
add esp, 0xc
jmp 0x565a2e
mov edi, dword [ebp - 0x45c]
xor ebx, ebx
call fcn.005451e2
and eax, 0x800000ff
jns 0x565a16
dec eax
or eax, 0xffffff00
inc eax
mov byte [ebx + edi], al
inc ebx
cmp ebx, 0x100000
jl 0x565a03
mov edi, dword [ebp - 0x454]
mov ebx, dword [ebp - 0x464]
cmp dword [ebp - 0x468], 0
mov dword [ebp - 0x464], 0
jle 0x565a95
mov esi, dword [ebp - 0x45c]
mov edi, dword [ebp - 0x468]
lea ecx, [ecx]
cmp dword [ebx + 0x414], 0
je 0x565b2b
push 0
lea eax, [ebp - 0x4a0]
push eax
push 0x100000
push esi
push dword [0x5f4e20]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x464]
inc eax
mov dword [ebp - 0x464], eax
cmp eax, edi
jl 0x565a50
mov esi, dword [ebp - 0x474]
mov edi, dword [ebp - 0x460]
push 0x8000
push 0
push dword [ebp - 0x45c]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push dword [0x5f4e20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x45c], 1
mov byte [ebp - 4], 1
or ebx, 0xffffffff
mov ecx, dword [ebp - 0x478]
mov eax, ebx
add ecx, 0xfffffff0
mov dword [ebp - 0x454], ecx
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x565b6a
mov edx, dword [ecx]
mov eax, dword [edx]
mov edx, dword [eax + 4]
mov dword [ebp - 0x468], edx
mov edx, dword [ecx]
cmp eax, 0x5940e4
jne 0x565ce8
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x468], ecx
mov ecx, dword [ebp - 0x454]
push ecx
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x565cdb
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x565b6a
push dword [0x5f4e20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov esi, dword [ebp - 0x474]
mov edi, dword [ebp - 0x460]
mov dword [ebx + 0x414], 0
mov dword [ebp - 0x45c], 0
jmp 0x565abe
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x565bb2
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, 0x5940e4
jne 0x565cf6
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x565cf6
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [ecx + 4]
call edi
jmp 0x565bb8
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x565c01
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, 0x5940e4
jne 0x565cfd
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x565cfd
push 0
push dword [ecx + 4]
call edi
mov eax, dword [ebp - 0x45c]
jmp 0x565c24
mov eax, dword [ebp - 0x45c]
jmp 0x565c24
push 0
push 0
push dword [ebx + 0x588]
call fcn.00412c49
mov dword [ebx + 0x414], 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.0053c0f2
mov esp, ebp
pop ebp
ret
push 0x5f4e68
call fcn.0053c212
add esp, 4
cmp dword [0x5f4e68], 0xffffffff
jne 0x5652df
call fcn.00407271
mov ecx, eax
test ecx, ecx
jne 0x565c6f
push 0x80004005
call fcn.00402ab0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x5940e4
jne 0x565c84
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x565c88
call edx
jmp 0x565c88
add eax, 0x10
push 0x58ea20
mov dword [0x5f4e6c], eax
call fcn.0053c524
add esp, 4
push 0x5f4e68
call fcn.0053c1c8
add esp, 4
jmp 0x5652df
push 0x80004005
call fcn.00402ab0
call edx
jmp 0x5654c2
push 0x80070057
call fcn.00402ab0
push 0x80004005
call fcn.00402ab0
call edx
jmp 0x5658f8
mov ecx, edx
call dword [ebp - 0x468]
jmp 0x565b6a
push ecx
mov ecx, edx
call dword [ebp - 0x468]
jmp 0x565b6a
call edx
jmp 0x565bb2
call edx
jmp 0x565c01