Function at 0x409060
Capabilities:
Check os version
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421aa0
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x42c00c]
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, edx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 4], 0
call fcn.00407950
mov edi, eax
test edi, edi
je case.0x4094e2.0
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x42227c]
mov ecx, edi
call esi
add eax, 0x10
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 1
xorps xmm0, xmm0
xor esi, esi
movq qword [ebp - 0x24], xmm0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x28], esi
call dword [sym.imp.KERNEL32.dll_GetVersion]
push dword [ebp - 0x40]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x14]
push str..PhysicalDrive_u
push eax
call fcn.0040bd90
mov edi, dword [ebp - 0x14]
add esp, 0xc
push esi
push esi
push 3
push esi
push 3
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x40], eax
cmp eax, 0xffffffff
jne 0x40911f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x409513
push 0x1001
call fcn.00415b3d
mov esi, eax
add esp, 4
mov dword [ebp - 0x34], esi
test esi, esi
jne 0x40913d
lea ebx, [eax + 8]
jmp 0x40950a
push 0x1001
push 0
push esi
call fcn.00410b20
add esp, 0xc
mov dword [ebp - 0x24], 0
lea eax, [ebp - 0x28]
mov dword [ebp - 0x20], 0
push 0
push eax
push 0x1000
push esi
push 0xc
lea eax, [ebp - 0x24]
push eax
push 0x2d1400
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40918c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x40950a
mov ecx, dword [esi + 0x18]
test ecx, ecx
je 0x409565
cmp ecx, dword [ebp - 0x28]
jae 0x409565
mov eax, dword [ebp - 0x3c]
cmp al, 6
ja 0x40936e
jne 0x4091b8
shr eax, 8
cmp al, 2
jae 0x40936e
mov byte [ebp - 4], 2
call fcn.00407950
mov ebx, eax
test ebx, ebx
je 0x409576
mov eax, dword [ebx]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x42227c]
mov ecx, ebx
call esi
lea esi, [eax + 0x10]
mov dword [ebp - 0x18], esi
mov ebx, dword [ebp - 0x34]
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x28]
mov ebx, dword [ebx + 0x18]
sub edx, ebx
js case.0x4094e2.21
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x40921c
push edx
lea ecx, [ebp - 0x18]
call fcn.0040b980
mov eax, dword [ebp - 0x34]
mov esi, dword [ebp - 0x18]
mov ebx, dword [eax + 0x18]
jmp 0x40921f
mov eax, dword [ebp - 0x34]
lea ecx, [ebx + eax]
push esi
call fcn.00408b00
add esp, 4
lea ebx, [esi - 0x10]
mov dword [ebp - 0x3c], ebx
test esi, esi
jne 0x409239
xor eax, eax
jmp 0x40924d
push dword [ebx + 8]
push esi
call fcn.004138d5
add esp, 8
test eax, eax
js case.0x4094e2.21
cmp eax, dword [ebx + 8]
jg case.0x4094e2.21
mov ecx, dword [ebp - 0x2c]
mov dword [ebx + 4], eax
mov byte [eax + esi], 0
mov edx, dword [ecx]
sub edx, 0x10
mov dword [ebp - 0x38], edx
cmp ebx, edx
je 0x40933e
lea eax, [edx + 0xc]
mov dword [ebp - 0x44], eax
mov eax, dword [eax]
shr eax, 0x1f
test al, al
jne 0x409335
mov eax, dword [ebx]
mov dword [ebp - 0x30], eax
cmp eax, dword [edx]
jne 0x409335
mov eax, dword [eax]
mov esi, dword [eax + 0x10]
mov ecx, esi
call dword [0x42227c]
mov ecx, dword [ebp - 0x30]
call esi
mov ecx, dword [ebx + 0xc]
lea edx, [ebx + 0xc]
shr ecx, 0x1f
mov dword [ebp - 0x30], eax
test cl, cl
jne 0x4092be
cmp eax, dword [ebx]
jne 0x4092be
mov dword [ebp - 0x30], ebx
lock inc dword [edx]
jmp 0x4092fb
mov eax, dword [eax]
push 1
push dword [ebx + 4]
mov esi, dword [eax]
mov ecx, esi
call dword [0x42227c]
mov ecx, dword [ebp - 0x30]
call esi
mov esi, eax
mov dword [ebp - 0x30], esi
test esi, esi
je 0x40958a
mov eax, dword [ebx + 4]
lea ecx, [esi + 0x10]
mov dword [esi + 4], eax
lea eax, [ebx + 0x10]
mov edx, dword [ebx + 4]
inc edx
push edx
push eax
call fcn.004076d0
add esp, 8
mov ecx, dword [ebp - 0x44]
or eax, 0xffffffff
mov byte [ebp - 4], 4
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x409328
mov ecx, dword [ebp - 0x38]
push ecx
mov ebx, dword [ecx]
mov eax, dword [ebx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x42227c]
mov ecx, ebx
call esi
mov ebx, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
add eax, 0x10
mov dword [ecx], eax
jmp 0x40933e
push dword [ebx + 4]
push esi
call fcn.0040b9e0
mov byte [ebp - 4], 5
or eax, 0xffffffff
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x409365
mov ebx, dword [ebx]
push dword [ebp - 0x3c]
mov eax, dword [ebx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x42227c]
mov ecx, ebx
call esi
mov ebx, dword [ebp - 0x2c]
mov byte [ebp - 4], 1
jmp 0x409392
lea edx, [ecx + esi]
test edx, edx
jne 0x409379
xor ecx, ecx
jmp 0x409389
mov ecx, edx
lea esi, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409380
sub ecx, esi
push ecx
push edx
mov ecx, ebx
call fcn.0040b9e0
mov ebx, dword [ebx]
xor esi, esi
mov al, byte [ebx]
test al, al
je 0x40940e
nop dword [eax]
movsx eax, al
push eax
call fcn.0041559f
add esp, 4
test eax, eax
je 0x4093bb
test esi, esi
mov eax, ebx
cmovne eax, esi
mov esi, eax
jmp 0x4093bd
xor esi, esi
push ebx
call fcn.00413ba7
mov ebx, eax
add esp, 4
mov al, byte [ebx]
test al, al
jne 0x4093a0
mov ebx, dword [ebp - 0x2c]
test esi, esi
je 0x409411
mov edx, dword [ebx]
sub esi, edx
js 0x40958f
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x4093fa
push esi
mov ecx, ebx
call fcn.0040b980
mov edx, dword [ebx]
cmp esi, dword [edx - 8]
jg case.0x4094e2.21
mov dword [edx - 0xc], esi
mov eax, dword [ebx]
mov byte [esi + eax], 0
jmp 0x409411
mov ebx, dword [ebp - 0x2c]
mov esi, dword [ebx]
movsx eax, byte [esi]
push eax
call fcn.0041559f
add esp, 4
test eax, eax
je 0x40943e
push esi
call fcn.00413ba7
mov esi, eax
add esp, 4
movsx ecx, byte [esi]
push ecx
call fcn.0041559f
add esp, 4
test eax, eax
jne 0x409423
mov ecx, dword [ebx]
cmp esi, ecx
je 0x409505
mov edx, dword [ecx - 0xc]
sub esi, ecx
test edx, edx
js 0x409599
mov eax, 1
sub eax, dword [ecx - 4]
mov dword [ebp - 0x38], eax
mov eax, dword [ecx - 8]
sub eax, edx
or eax, dword [ebp - 0x38]
jge 0x409474
push edx
mov ecx, ebx
call fcn.0040b980
mov ecx, dword [ebx]
mov edx, dword [ecx - 0xc]
lea eax, [esi + ecx]
sub edx, esi
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x2c], edx
lea esi, [edx + 1]
test esi, esi
je 0x4094d9
test eax, eax
jne 0x4094a7
call fcn.00415b0d
mov dword [eax], 0x16
call fcn.00412f78
mov edx, dword [ebp - 0x2c]
mov eax, 0x16
jmp 0x4094db
mov eax, dword [ecx - 0xc]
inc eax
cmp eax, esi
jae 0x4094c9
call fcn.00415b0d
mov dword [eax], 0x22
call fcn.00412f78
mov edx, dword [ebp - 0x2c]
mov eax, 0x22
jmp 0x4094db
push esi
push dword [ebp - 0x38]
push ecx
call fcn.00410d70
mov edx, dword [ebp - 0x2c]
add esp, 0xc
xor eax, eax
movzx eax, byte [eax + 0x4095c0]
jmp dword [eax*4 + 0x4095b0]
test edx, edx
js case.0x4094e2.21
mov eax, dword [ebx]
cmp edx, dword [eax - 8]
jg case.0x4094e2.21
mov dword [eax - 0xc], edx
mov eax, dword [ebx]
mov byte [edx + eax], 0
mov esi, dword [ebp - 0x34]
xor ebx, ebx
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.00415b20
add esp, 4
lea ecx, [edi - 0x10]
mov dword [ebp - 4], 6
or eax, 0xffffffff
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x409547
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x42227c]
mov ecx, edi
call esi
mov eax, ebx
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.0040f2ed
mov esp, ebp
pop ebp
ret
mov ebx, 0xd
jmp 0x40950a
push 0x80004005
call fcn.00407790
push 0x80004005
call fcn.00407790
push 0x80070057
call fcn.00407790
call fcn.0040bc50
push 0x80070057
call fcn.00407790
push 0x80070057
call fcn.00407790
push 0x8007000e
call fcn.00407790
nop dword [eax]
jmp 0xa340d649