Function at 0x5b9dc0
Capabilities:
Check os version
Get disk information

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x834
mov eax, dword [0x64e0a0]
xor eax, esp
mov dword [esp + 0x830], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, edx
push edi
mov dword [esp + 0x14], esi
mov edi, ecx
test ebx, ebx
je 0x5b9df1
xor eax, eax
mov word [esi], ax
lea edx, [esp + 0x20]
mov dword [esp + 0x20], 0xffffffff
call fcn.005b99b0
test al, al
je 0x5b9e30
mov edx, dword [esp + 0x20]
cmp edx, 0xffffffff
je 0x5b9e30
push ebx
push esi
mov ecx, edi
call fcn.005b98d0
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x830]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
push 8
push str.Device_
push edi
call fcn.005451c4
add esp, 0xc
test eax, eax
jne 0x5ba440
push 0xe
lea esi, [edi + 0x10]
push esi
push str.HarddiskVolume
mov dword [esp + 0x38], eax
call fcn.005451c4
add esp, 0xc
test eax, eax
jne 0x5b9edf
push 4
lea eax, [esp + 0x30]
push eax
lea eax, [edi + 0x2c]
push 0x616acc
push eax
call fcn.00544bc0
add esp, 0x10
cmp eax, 1
jne 0x5b9edf
mov ecx, dword [esp + 0x2c]
lea eax, [ecx - 1]
cmp eax, 0x17
ja 0x5b9edf
xor eax, eax
mov word [esp + 0x30], ax
lea eax, [ecx + 0x42]
push eax
push 0x616ad4
lea eax, [esp + 0x38]
push 3
push eax
call fcn.00543e4a
add esp, 0x10
cmp eax, 0xffffffff
je 0x5b9edf
mov ecx, dword [esp + 0x14]
push ebx
push ecx
lea edx, [esp + 0x38]
mov ecx, edi
call fcn.005b9a20
add esp, 8
test al, al
je 0x5b9edf
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x830]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
mov ecx, edi
call fcn.005b9850
test al, al
je 0x5b9f0f
mov edx, dword [esp + 0x14]
push ecx
push ebx
mov ecx, edi
call fcn.005b96c0
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x830]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov ebx, eax
test ebx, ebx
js 0x5ba3c9
cmp bl, 5
jb 0x5ba3c9
push 0x5c
push esi
call fcn.0054363c
push 8
push str.Harddisk
push esi
mov dword [esp + 0x2c], eax
call fcn.005451c4
add esp, 0x14
test eax, eax
jne 0x5b9fa4
cmp word [edi + 0x22], 0x5c
jne 0x5b9f63
lea eax, [edi + 0x24]
push 0x5c
push eax
call fcn.0054363c
add esp, 8
mov dword [esp + 0x18], eax
jmp 0x5b9fa8
push 9
lea eax, [edi + 0x20]
push str.DmVolumes
push eax
call fcn.005451c4
add esp, 0xc
test eax, eax
jne 0x5b9fa4
lea eax, [edi + 0x34]
push 0x5c
push eax
call fcn.0054363c
add esp, 8
test eax, eax
je 0x5ba440
add eax, 2
push 0x5c
push eax
call fcn.0054363c
add esp, 8
mov dword [esp + 0x18], eax
jmp 0x5b9fa8
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x5b9fc7
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5b9fb1
sub ecx, edx
sar ecx, 1
lea eax, [edi + ecx*2]
mov dword [esp + 0x18], eax
push 0
push 0x40
push 3
push 0
push 7
mov esi, eax
push 0x80
sub esi, edi
push str..MountPointManager
sar esi, 1
mov byte [esp + 0x2f], 0
call dword [0x649010]
mov dword [esp + 0x28], eax
cmp eax, 0xffffffff
je 0x5ba3b0
mov dword [esp + 0x20], 0
cmp bl, 5
ja 0x5ba258
jne 0x5ba018
shr ebx, 8
cmp bl, 1
jae 0x5ba258
lea eax, [esi*2 + 0x1a]
push eax
call fcn.005421d4
add esp, 4
mov dword [esp + 0x24], eax
push 0x200
call fcn.005421d4
add esp, 4
cmp dword [esp + 0x24], 0
mov ebx, eax
je 0x5ba246
test ebx, ebx
je 0x5ba246
push 0x200
push 0
push ebx
call fcn.00546fa0
add esp, 0xc
lea eax, [esi*2 + 0x1a]
push eax
push 0
push dword [esp + 0x2c]
call fcn.00546fa0
mov ecx, dword [esp + 0x30]
lea eax, [esi + esi]
add esp, 0xc
mov dword [ecx + 0x10], 0x18
mov word [ecx + 0x14], ax
push edi
lea edx, [esi + 1]
add ecx, 0x18
call fcn.005c1c20
add esp, 4
lea eax, [esp + 0x20]
push 0
push eax
push 0x200
push ebx
lea edi, [esi*2 + 0x18]
push edi
push dword [esp + 0x38]
push 0x6d0008
push dword [esp + 0x44]
call dword [0x649014]
test eax, eax
jne 0x5ba11d
cmp dword [ebx], eax
je 0x5ba246
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x5ba246
mov esi, dword [ebx]
push ebx
call fcn.00541b50
add esp, 4
push esi
call fcn.005421d4
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x5ba246
push 0
lea eax, [esp + 0x24]
push eax
push esi
push ebx
push edi
push dword [esp + 0x38]
push 0x6d0008
push dword [esp + 0x44]
call dword [0x649014]
test eax, eax
je 0x5ba246
xor eax, eax
xor esi, esi
xor edi, edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x30], esi
cmp dword [ebx + 4], eax
jbe 0x5ba246
lea eax, [edi + edi*2]
mov esi, dword [ebx + eax*8 + 8]
add esi, ebx
test edi, edi
jne 0x5ba14f
movzx ecx, word [ebx + 0xc]
shr ecx, 1
mov dword [esp + 0x1c], esi
mov dword [esp + 0x30], ecx
cmp word [ebx + eax*8 + 0xc], 0x1c
jne 0x5ba176
push 0xc
push str.DosDevices_
push esi
call fcn.005446eb
add esp, 0xc
test eax, eax
jne 0x5ba176
cmp word [esi + 0x1a], 0x3a
je 0x5ba21e
inc edi
cmp edi, dword [ebx + 4]
jb 0x5ba134
mov esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x5ba246
mov edi, dword [ebp + 8]
lea eax, [esi + 1]
cmp eax, edi
jbe 0x5ba199
lea esi, [edi - 1]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5ba1a0
sub ecx, edx
mov edx, dword [esp + 0x18]
sar ecx, 1
lea eax, [edx + 2]
mov dword [esp + 0x30], eax
lea ebx, [ebx]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x5ba1c0
sub edx, dword [esp + 0x30]
lea eax, [ecx + 1]
sar edx, 1
add eax, edx
cmp edi, eax
jb 0x5ba246
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
push eax
lea edx, [esi + 1]
call fcn.005c1c20
add esp, 4
cmp esi, 2
je 0x5ba22f
cmp edi, 2
jbe 0x5ba22f
push 4
push 0x616b4c
push dword [esp + 0x1c]
call fcn.005446eb
mov ecx, dword [esp + 0x20]
add esp, 0xc
test eax, eax
jne 0x5ba233
mov eax, 0x5c
mov word [ecx + 2], ax
jmp 0x5ba233
lea ecx, [esi + 0x18]
mov dword [esp + 0x1c], ecx
mov esi, 2
jmp 0x5ba184
mov ecx, dword [esp + 0x14]
push dword [esp + 0x18]
mov edx, edi
call fcn.005c1c80
add esp, 4
mov byte [esp + 0x13], 1
push ebx
call fcn.00541b50
add esp, 4
push dword [esp + 0x24]
jmp 0x5ba39e
lea eax, [esi*2 + 6]
push eax
call fcn.005421d4
add esp, 4
mov dword [esp + 0x1c], eax
push 0x200
call fcn.005421d4
mov ebx, eax
mov eax, dword [esp + 0x20]
add esp, 4
test eax, eax
je 0x5ba391
test ebx, ebx
je 0x5ba391
lea ecx, [esi + esi]
mov word [eax], cx
push edi
lea edx, [esi + 1]
lea ecx, [eax + 2]
call fcn.005c1c20
add esp, 4
lea ecx, [esp + 0x20]
push 0
push ecx
push 0x200
push ebx
lea eax, [esi*2 + 4]
mov esi, dword [esp + 0x2c]
push eax
push esi
push 0x6d0030
push dword [esp + 0x44]
mov dword [esp + 0x50], eax
call dword [0x649014]
test eax, eax
jne 0x5ba32d
cmp dword [ebx], eax
je 0x5ba391
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x5ba391
mov edi, dword [ebx]
push ebx
call fcn.00541b50
add esp, 4
push edi
call fcn.005421d4
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x5ba391
push 0
lea eax, [esp + 0x24]
push eax
push edi
push ebx
push dword [esp + 0x40]
push esi
push 0x6d0030
push dword [esp + 0x44]
call dword [0x649014]
test eax, eax
je 0x5ba391
lea edi, [ebx + 4]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5ba335
sub ecx, edx
mov edx, dword [esp + 0x18]
sar ecx, 1
lea esi, [edx + 2]
jmp 0x5ba350
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x5ba350
sub edx, esi
mov esi, dword [ebp + 8]
sar edx, 1
lea eax, [ecx + 1]
add eax, edx
cmp esi, eax
jb 0x5ba391
mov ecx, dword [esp + 0x14]
push edi
mov edx, esi
call fcn.005c1c20
mov ecx, dword [esp + 0x18]
add esp, 4
mov edx, esi
push dword [esp + 0x18]
call fcn.005c1c80
add esp, 4
mov byte [esp + 0x13], 1
push ebx
call fcn.00541b50
add esp, 4
push dword [esp + 0x1c]
call fcn.00541b50
add esp, 4
push dword [esp + 0x28]
call dword [0x649008]
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x830]
xor ecx, esp
call fcn.00541b41
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x38]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
test eax, eax
je 0x5ba440
cmp word [esp + 0x38], 0
lea esi, [esp + 0x38]
je 0x5ba440
mov ebx, dword [ebp + 8]
lea esp, [esp]
push 2
push esi
lea eax, [esp + 0x38]
push 3
push eax
call fcn.00543d6d
push ebx
push dword [esp + 0x28]
xor eax, eax
lea edx, [esp + 0x48]
mov ecx, edi
mov word [esp + 0x4c], ax
call fcn.005b9a20
add esp, 0x18
test al, al
jne 0x5b9ec8
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5ba426
sub ecx, edx
sar ecx, 1
lea esi, [esi + ecx*2]
add esi, 2
cmp word [esi], ax
jne 0x5ba3f0
mov ecx, dword [esp + 0x83c]
pop edi
pop esi
pop ebx
xor ecx, esp
xor al, al
call fcn.00541b41
mov esp, ebp
pop ebp
ret