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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421460
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.00407230
mov edi, eax
test edi, edi
je case.0x408dc2.0
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x422284]
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.0040b690
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 0x4089ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x408df3
push 0x1001
call fcn.0041556d
mov esi, eax
add esp, 4
mov dword [ebp - 0x34], esi
test esi, esi
jne 0x408a1d
lea ebx, [eax + 8]
jmp 0x408dea
push 0x1001
push 0
push esi
call fcn.00410550
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 0x408a6c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x408dea
mov ecx, dword [esi + 0x18]
test ecx, ecx
je 0x408e45
cmp ecx, dword [ebp - 0x28]
jae 0x408e45
mov eax, dword [ebp - 0x3c]
cmp al, 6
ja 0x408c4e
jne 0x408a98
shr eax, 8
cmp al, 2
jae 0x408c4e
mov byte [ebp - 4], 2
call fcn.00407230
mov ebx, eax
test ebx, ebx
je 0x408e56
mov eax, dword [ebx]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x422284]
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.0x408dc2.21
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x408afc
push edx
lea ecx, [ebp - 0x18]
call fcn.0040b280
mov eax, dword [ebp - 0x34]
mov esi, dword [ebp - 0x18]
mov ebx, dword [eax + 0x18]
jmp 0x408aff
mov eax, dword [ebp - 0x34]
push esi
lea ecx, [ebx + eax]
call fcn.004083e0
add esp, 4
lea ebx, [esi - 0x10]
mov dword [ebp - 0x3c], ebx
test esi, esi
jne 0x408b19
xor eax, eax
jmp 0x408b2d
push dword [ebx + 8]
push esi
call fcn.00413305
add esp, 8
test eax, eax
js case.0x408dc2.21
cmp eax, dword [ebx + 8]
jg case.0x408dc2.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 0x408c1e
lea eax, [edx + 0xc]
mov dword [ebp - 0x44], eax
mov eax, dword [eax]
shr eax, 0x1f
test al, al
jne 0x408c15
mov eax, dword [ebx]
mov dword [ebp - 0x30], eax
cmp eax, dword [edx]
jne 0x408c15
mov eax, dword [eax]
mov esi, dword [eax + 0x10]
mov ecx, esi
call dword [0x422284]
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 0x408b9e
cmp eax, dword [ebx]
jne 0x408b9e
mov dword [ebp - 0x30], ebx
lock inc dword [edx]
jmp 0x408bdb
mov eax, dword [eax]
push 1
push dword [ebx + 4]
mov esi, dword [eax]
mov ecx, esi
call dword [0x422284]
mov ecx, dword [ebp - 0x30]
call esi
mov ecx, eax
mov dword [ebp - 0x30], ecx
test ecx, ecx
je 0x408e6a
mov eax, dword [ebx + 4]
lea esi, [ebx + 0x10]
mov dword [ecx + 4], eax
add ecx, 0x10
mov edx, dword [ebx + 4]
inc edx
push edx
push esi
call fcn.00406fb0
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 0x408c08
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 [0x422284]
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 0x408c1e
push dword [ebx + 4]
push esi
call fcn.0040b2e0
mov byte [ebp - 4], 5
or eax, 0xffffffff
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x408c45
mov ebx, dword [ebx]
push dword [ebp - 0x3c]
mov eax, dword [ebx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x422284]
mov ecx, ebx
call esi
mov ebx, dword [ebp - 0x2c]
mov byte [ebp - 4], 1
jmp 0x408c72
lea edx, [ecx + esi]
test edx, edx
jne 0x408c59
xor ecx, ecx
jmp 0x408c69
mov ecx, edx
lea esi, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408c60
sub ecx, esi
push ecx
push edx
mov ecx, ebx
call fcn.0040b2e0
mov ebx, dword [ebx]
xor esi, esi
mov al, byte [ebx]
test al, al
je 0x408cee
nop dword [eax]
movsx eax, al
push eax
call fcn.00414fcf
add esp, 4
test eax, eax
je 0x408c9b
test esi, esi
mov eax, ebx
cmovne eax, esi
mov esi, eax
jmp 0x408c9d
xor esi, esi
push ebx
call fcn.004135d7
mov ebx, eax
add esp, 4
mov al, byte [ebx]
test al, al
jne 0x408c80
mov ebx, dword [ebp - 0x2c]
test esi, esi
je 0x408cf1
mov edx, dword [ebx]
sub esi, edx
js 0x408e6f
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x408cda
push esi
mov ecx, ebx
call fcn.0040b280
mov edx, dword [ebx]
cmp esi, dword [edx - 8]
jg case.0x408dc2.21
mov dword [edx - 0xc], esi
mov eax, dword [ebx]
mov byte [esi + eax], 0
jmp 0x408cf1
mov ebx, dword [ebp - 0x2c]
mov esi, dword [ebx]
movsx eax, byte [esi]
push eax
call fcn.00414fcf
add esp, 4
test eax, eax
je 0x408d1e
push esi
call fcn.004135d7
mov esi, eax
add esp, 4
movsx ecx, byte [esi]
push ecx
call fcn.00414fcf
add esp, 4
test eax, eax
jne 0x408d03
mov ecx, dword [ebx]
cmp esi, ecx
je 0x408de5
mov edx, dword [ecx - 0xc]
sub esi, ecx
test edx, edx
js 0x408e79
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 0x408d54
push edx
mov ecx, ebx
call fcn.0040b280
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 0x408db9
test eax, eax
jne 0x408d87
call fcn.0041553d
mov dword [eax], 0x16
call fcn.004131c8
mov edx, dword [ebp - 0x2c]
mov eax, 0x16
jmp 0x408dbb
mov eax, dword [ecx - 0xc]
inc eax
cmp eax, esi
jae 0x408da9
call fcn.0041553d
mov dword [eax], 0x22
call fcn.004131c8
mov edx, dword [ebp - 0x2c]
mov eax, 0x22
jmp 0x408dbb
push esi
push dword [ebp - 0x38]
push ecx
call fcn.004107a0
mov edx, dword [ebp - 0x2c]
add esp, 0xc
xor eax, eax
movzx eax, byte [eax + 0x408ea0]
jmp dword [eax*4 + 0x408e90]
test edx, edx
js case.0x408dc2.21
mov eax, dword [ebx]
cmp edx, dword [eax - 8]
jg case.0x408dc2.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.00415550
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 0x408e27
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x422284]
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.0040ed1d
mov esp, ebp
pop ebp
ret
mov ebx, 0xd
jmp 0x408dea
push 0x80004005
call fcn.00407070
push 0x80004005
call fcn.00407070
push 0x80070057
call fcn.00407070
call fcn.0040b550
push 0x80070057
call fcn.00407070
push 0x80070057
call fcn.00407070
push 0x8007000e
call fcn.00407070
nop dword [eax]
leave
lea eax, [eax]
or dword [esi - 0x719fffc0], 0x40
add byte [esi + ecx*4 + 64], cl
add byte [eax], al
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ecx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [edx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [edx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [eax]
int3