Function at 0x408050
Capabilities:
Get disk information

Disassembly:
push 0xffffffffffffffff
push 0x42f75a
mov eax, dword fs:[0]
push eax
mov eax, 0x1844
call fcn.0041c220
mov eax, dword [0x43cc00]
xor eax, esp
mov dword [esp + 0x1840], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43cc00]
xor eax, esp
push eax
lea eax, [esp + 0x1858]
mov dword fs:[0], eax
mov esi, ecx
push 0x4349fc
lea ecx, [esp + 0x1c]
mov dword [esp + 0x20], esi
call fcn.00402520
lea eax, [esp + 0x54]
push eax
push 0x400
mov dword [esp + 0x1868], 0
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
cmp word [esp + 0x54], 0
lea ebp, [esp + 0x54]
je 0x4081e2
mov edi, edi
test ebp, ebp
jne 0x4080d8
xor eax, eax
jmp 0x4080ef
mov eax, ebp
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4080e0
sub eax, edx
sar eax, 1
push eax
push ebp
lea ecx, [esp + 0x20]
call fcn.004019b0
mov esi, dword [esp + 0x18]
push ecx
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
add esi, 0xfffffff0
mov dword [esp + 0x24], esp
mov ebx, esp
call eax
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x40812c
cmp eax, dword [esi]
jne 0x40812c
mov edi, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x408167
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x408288
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
add esi, 0x10
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.00417f28
add esp, 0x10
add edi, 0x10
lea esi, [esp + 0x18]
mov dword [ebx], edi
call fcn.00408ae0
mov byte [esp + 0x1860], 1
mov ecx, dword [esp + 0x14]
push str.SYSTEM_RESERVED
push ecx
call fcn.00417e97
add esp, 8
test eax, eax
je 0x408200
mov byte [esp + 0x1860], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4081bb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebp
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4081c0
sub eax, edx
sar eax, 1
cmp word [ebp + eax*2 + 2], cx
lea ebp, [ebp + eax*2 + 2]
jne 0x4080d0
mov esi, dword [esp + 0x1c]
cmp dword [esi + 4], 0
mov dword [esp + 0x48], 0
jl 0x40830b
add esi, 0x1c
mov dword [esp + 0x40], esi
jmp 0x408364
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push 0x4349fc
call fcn.00402520
push ecx
mov ecx, esp
mov dword [esp + 0x40], esp
push str._1_AssignLetterToSYS
mov byte [esp + 0x186c], 2
call fcn.00402520
mov ebx, dword [esp + 0x24]
mov ecx, dword [ebx + 0x11a50]
push ecx
mov byte [esp + 0x186c], 1
call fcn.004029e0
mov esi, dword [esp + 0x14]
push ecx
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
add esi, 0xfffffff0
mov dword [esp + 0x24], esp
mov ebp, esp
call eax
cmp dword [esi + 0xc], 0
lea edx, [esi + 0xc]
jl 0x408274
cmp eax, dword [esi]
jne 0x408274
mov edi, esi
mov ecx, 1
lock xadd dword [edx], ecx
jmp 0x4082b0
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
jne 0x40828d
jmp fcn.004017f0
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
add esi, 0x10
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.00417f28
add esp, 0x10
add edi, 0x10
mov dword [ebp], edi
push ecx
mov ecx, esp
mov dword [esp + 0x40], esp
push str._1_No_need_to_mount_SYS
mov byte [esp + 0x186c], 3
call fcn.00402520
mov ecx, dword [ebx + 0x11a50]
push ecx
mov byte [esp + 0x186c], 1
call fcn.004029e0
mov byte [esp + 0x1860], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40830b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x1860], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408336
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x1858]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1840]
xor ecx, esp
call fcn.00417ffe
add esp, 0x1850
ret
mov esi, dword [esp + 0x40]
mov ebp, dword [esi]
mov ecx, dword [esi - 4]
add ebp, 1
mov dword [esp + 0x44], ecx
mov dword [esp + 0x38], ebp
call fcn.0040c0d4
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40892c
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x44]
push ebp
push ecx
lea edx, [esp + 0x3c]
push str.Disks__d_:_Partitions__d
push edx
mov byte [esp + 0x1870], 4
call fcn.004028d0
add esp, 0xc
mov ecx, esp
mov dword [esp + 0x34], esp
push 0x4349fc
call fcn.00402520
mov byte [esp + 0x1864], 5
mov ebx, dword [esp + 0x38]
push ecx
mov ecx, dword [ebx - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
add ebx, 0xfffffff0
mov dword [esp + 0x28], esp
mov edi, esp
mov dword [esp + 0x28], ebx
call edx
cmp dword [ebx + 0xc], 0
lea edx, [ebx + 0xc]
jl 0x408406
cmp eax, dword [ebx]
jne 0x408406
mov esi, ebx
mov eax, 1
lock xadd dword [edx], eax
jmp 0x408441
mov ecx, dword [ebx + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov esi, eax
test esi, esi
je 0x408288
mov eax, dword [ebx + 4]
mov dword [esi + 4], eax
mov eax, dword [ebx + 4]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [ebx + 0x10]
push edx
lea eax, [eax + eax + 2]
push eax
lea ecx, [esi + 0x10]
push ecx
call fcn.00417f28
add esp, 0x10
mov edx, dword [esp + 0x24]
add esi, 0x10
mov dword [edi], esi
mov eax, dword [edx + 0x11a50]
push eax
mov byte [esp + 0x186c], 4
call fcn.004029e0
cmp ebp, 1
mov dword [esp + 0x2c], 1
jl 0x4088e9
call fcn.0040c0d4
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40892c
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x28], eax
mov byte [esp + 0x1860], 6
call fcn.0040c0d4
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40892c
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x14], ebx
mov byte [esp + 0x1860], 7
call fcn.0040c0d4
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40892c
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x30], eax
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x44]
push ecx
push edx
lea eax, [esp + 0x30]
push str.DeviceHarddisk_dPartition_d
push eax
mov byte [esp + 0x1870], 8
call fcn.004028d0
add esp, 0x10
lea ecx, [esp + 0x50]
push ecx
call fcn.00408c80
mov byte [esp + 0x1860], 9
mov eax, dword [eax]
lea esi, [eax - 0x10]
lea edi, [ebx - 0x10]
cmp esi, edi
je 0x4085d1
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x4085bf
mov ecx, dword [esi]
cmp ecx, dword [edi]
jne 0x4085bf
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x408565
cmp eax, dword [esi]
jne 0x408565
mov ebp, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x4085a0
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov ebp, eax
test ebp, ebp
je 0x408288
mov eax, dword [esi + 4]
mov dword [ebp + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
add esi, 0x10
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [ebp + 0x10]
push eax
call fcn.00417f28
add esp, 0x10
or ecx, 0xffffffff
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x4085b6
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
add ebp, 0x10
mov dword [esp + 0x14], ebp
jmp 0x4085cd
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.004019b0
mov ebx, dword [esp + 0x14]
mov byte [esp + 0x1860], 8
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4085f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [ebx - 0xc], 0
je 0x40885c
mov esi, dword [esp + 0x28]
push ecx
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
add esi, 0xfffffff0
mov dword [esp + 0x50], esp
mov ebp, esp
call eax
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x408635
cmp eax, dword [esi]
jne 0x408635
mov edi, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x408670
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x408288
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
add esi, 0x10
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.00417f28
add esp, 0x10
add edi, 0x10
mov dword [ebp], edi
mov byte [esp + 0x1864], 0xa
push ecx
mov ecx, dword [ebx - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
lea edi, [ebx - 0x10]
mov dword [esp + 0x44], esp
mov ebp, esp
call eax
cmp dword [edi + 0xc], 0
lea edx, [edi + 0xc]
jl 0x4086ac
cmp eax, dword [edi]
jne 0x4086ac
mov esi, edi
mov ecx, 1
lock xadd dword [edx], ecx
jmp 0x4086e7
mov ecx, dword [edi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov esi, eax
test esi, esi
je 0x408288
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov eax, dword [edi + 4]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [edi + 0x10]
push edx
lea eax, [eax + eax + 2]
push eax
lea ecx, [esi + 0x10]
push ecx
call fcn.00417f28
add esp, 0x10
add esi, 0x10
mov dword [ebp], esi
mov byte [esp + 0x1868], 8
call fcn.00402020
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
add esp, 4
mov dword [esp + 0x40], esp
mov ebp, esp
call eax
cmp dword [edi + 0xc], 0
lea ecx, [edi + 0xc]
jl 0x408726
cmp eax, dword [edi]
jne 0x408726
mov esi, edi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x408761
mov ecx, dword [edi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov esi, eax
test esi, esi
je 0x408288
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov eax, dword [edi + 4]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [edi + 0x10]
push edx
lea eax, [eax + eax + 2]
push eax
lea ecx, [esi + 0x10]
push ecx
call fcn.00417f28
add esp, 0x10
add esi, 0x10
mov dword [ebp], esi
lea esi, [esp + 0x28]
call fcn.00408ae0
mov byte [esp + 0x1860], 0xb
mov edx, dword [esp + 0x24]
push str.SYSTEM_RESERVED
push edx
call fcn.00417e97
add esp, 8
test eax, eax
je 0x408936
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
call edx
cmp dword [edi + 0xc], 0
lea ecx, [edi + 0xc]
jl 0x4087b5
cmp eax, dword [edi]
jne 0x4087b5
mov esi, edi
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x4087f0
mov ecx, dword [edi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov esi, eax
test esi, esi
je 0x408288
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov eax, dword [edi + 4]
lea ecx, [eax + eax + 2]
push ecx
add edi, 0x10
lea edx, [eax + eax + 2]
push edi
push edx
lea eax, [esi + 0x10]
push eax
call fcn.00417f28
add esp, 0x10
push 0x800
lea ecx, [esp + 0x858]
push ecx
add esi, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
lea edx, [esp + 0x854]
push edx
push esi
push 7
call dword [sym.imp.KERNEL32.dll_DefineDosDeviceW]
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408834
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x1860], 8
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40885c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x1860], 7
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408884
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [esp + 0x1860], 6
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4088a8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x1860], 4
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4088d0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
add eax, 1
cmp eax, dword [esp + 0x38]
mov dword [esp + 0x2c], eax
jle 0x40846f
mov ebx, dword [esp + 0x20]
mov byte [esp + 0x1860], 0
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40890a
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x1c]
add dword [esp + 0x40], 0x18
add eax, 1
cmp eax, dword [ecx + 4]
mov dword [esp + 0x48], eax
jle 0x408360
jmp 0x40830b
push 0x80004005
call fcn.004016a0
push ecx
mov ecx, esp
mov dword [esp + 0x40], esp
push 0x4349fc
call fcn.00402520
push ecx
mov byte [esp + 0x1868], 0xc
mov ecx, esp
mov dword [esp + 0x54], esp
push str._2_AssignLetterToSYS
call fcn.00402520
mov ebx, dword [esp + 0x24]
mov edx, dword [ebx + 0x11a50]
push edx
mov byte [esp + 0x186c], 0xb
call fcn.004029e0
mov esi, dword [esp + 0x24]
push ecx
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
add esi, 0xfffffff0
mov dword [esp + 0x40], esp
mov ebp, esp
call edx
cmp dword [esi + 0xc], 0
lea edx, [esi + 0xc]
jl 0x4089aa
cmp eax, dword [esi]
jne 0x4089aa
mov edi, esi
mov eax, 1
lock xadd dword [edx], eax
jmp 0x4089e6
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
jne 0x4089c3
jmp fcn.004017f0
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
add esi, 0x10
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.00417f28
add esp, 0x10
add edi, 0x10
mov dword [ebp], edi
push ecx
mov byte [esp + 0x1868], 0xd
mov ecx, esp
mov dword [esp + 0x54], esp
push str._2_Need_to_mount_SYS
call fcn.00402520
mov ecx, dword [ebx + 0x11a50]
push ecx
mov byte [esp + 0x186c], 0xb
call fcn.004029e0
mov byte [esp + 0x1860], 8
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x408a41
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x1860], 7
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408a69
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x1860], 6
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408a91
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x1860], 4
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408ab9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x1860], 0
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x4082ff