Function at 0x4055c6
Capabilities:
Get disk information
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x362bc
call fcn.0040f7d0
push ebx
push esi
push edi
push 0x19
lea esi, [ebp - 0x362bc]
pop edi
mov ecx, esi
call fcn.0040527e
add esi, 0x2018
dec edi
jns 0x4055df
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
xor ecx, ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ecx
lea ebx, [ebp - 0x362ac]
mov esi, dword [ebp - 0x10]
xor eax, eax
inc eax
mov edx, eax
shl edx, cl
test esi, edx
je 0x4056a8
mov dword [ebx + 0x2000], eax
xor eax, eax
push eax
mov esi, str..X:
lea edi, [ebp - 0x4c]
movsd dword es:[edi], dword [esi]
push eax
movsd dword es:[edi], dword [esi]
push 3
push eax
movsd dword es:[edi], dword [esi]
push 3
push eax
lea eax, [ebp - 0x4c]
add ecx, 0x41
movsw word es:[edi], word [esi]
push eax
mov word [ebp - 0x44], cx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, eax
cmp ecx, 0xffffffff
je 0x4056a8
xor edx, edx
xor eax, eax
mov dword [ebp - 0x1c], edx
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
push edx
stosd dword es:[edi], eax
lea eax, [ebp - 0xc]
push eax
push 0xc
lea eax, [ebp - 0x1c]
push eax
push edx
push edx
push 0x2d1080
push ecx
mov dword [ebp - 0xc], edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4056a8
cmp dword [ebp - 0x1c], 7
jne 0x4056a8
and word [ebp - 0x34], 0
xor eax, eax
lea edi, [ebp - 0x32]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0xa
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x18]
call sub.msvcrt.dll__itow
lea eax, [ebp - 0x34]
push eax
mov esi, ebx
call fcn.0040e2c1
add esp, 0x10
mov ecx, dword [ebp - 4]
inc ecx
add ebx, 0x2018
cmp ecx, 0x1a
mov dword [ebp - 4], ecx
jb 0x405603
and dword [ebp - 8], 0
lea eax, [ebp - 8]
push eax
call fcn.004052ae
test eax, eax
jne 0x4057c4
and dword [ebp - 4], eax
lea ebx, [ebp - 0x362ac]
mov eax, dword [ebp - 4]
push 7
pop ecx
mov esi, str.DosDevicesA:
lea edi, [ebp - 0x3c]
rep movsd dword es:[edi], dword [esi]
add eax, 0x41
push 0x1fff
movsw word es:[edi], word [esi]
mov word [ebp - 0x24], ax
lea eax, [ebp - 0x204b]
push 0
push eax
mov byte [ebp - 0x204c], 0
call sub.msvcrt.dll_memset
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x204c]
push eax
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 8]
mov dword [ebp - 0xc], 0x2000
call fcn.0040e25d
add esp, 0x1c
test eax, eax
jne 0x4057a8
cmp byte [ebp - 0x204c], 0x5c
je 0x405746
cmp byte [ebp - 0x204c], 0x5f
jne 0x405792
cmp byte [ebp - 0x204a], 0x3f
jne 0x405792
cmp byte [ebp - 0x2048], 0x3f
jne 0x405792
lea eax, [ebp - 0x204c]
push 0x23
push eax
call sub.msvcrt.dll_wcsrchr
test eax, eax
pop ecx
pop ecx
je 0x405770
and word [eax], 0
push 0x5c
push 0x23
lea eax, [ebp - 0x204c]
call fcn.00405d73
cmp word [ebx], 0
pop ecx
pop ecx
jne 0x4057a8
lea eax, [ebp - 0x2044]
push eax
mov edi, ebx
jmp 0x40579d
push str.Disk_drive
lea edi, [ebx + 0x1000]
mov eax, 0x3ff
call fcn.00405bd7
pop ecx
inc dword [ebp - 4]
add ebx, 0x2018
cmp dword [ebp - 4], 0x1a
jb 0x4056dc
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
and dword [ebp - 4], 0
lea ebx, [ebp - 0x362bc]
xor esi, esi
cmp word [ebx + 0x10], si
jne 0x4057e3
cmp word [ebx + 0x1010], si
je 0x40588c
push 0x411198
push ebx
call sub.msvcrt.dll_wcscpy
mov eax, dword [ebp - 4]
add eax, 0x41
cmp word [ebx + 0x10], si
pop ecx
pop ecx
mov word [ebx], ax
mov dword [ebx + 0xc], 1
je 0x40580b
call fcn.004052cc
mov esi, 0x411034
lea edi, [ebp - 0x34]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
lea edi, [ebp - 0x2e]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ax, word [ebx]
mov word [ebp - 0x34], ax
push 0x3ff
lea eax, [ebx + 0x1810]
push eax
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
mov edi, dword [ebp + 8]
mov esi, dword [edi + 0xc]
test esi, esi
jl 0x40588c
cmp esi, 0xffffffff
mov eax, dword [edi + 8]
jne 0x405858
push dword [edi]
call sub.msvcrt.dll_free
jmp 0x405869
push eax
push 0x2018
lea eax, [edi + 4]
mov edx, esi
call fcn.00405c05
pop ecx
lea eax, [esi + 1]
cmp dword [edi + 0xc], eax
pop ecx
jge 0x405875
mov dword [edi + 0xc], eax
imul esi, esi, 0x2018
add esi, dword [edi]
push 0x2018
push ebx
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
inc dword [ebp - 4]
add ebx, 0x2018
cmp dword [ebp - 4], 0x1a
jb 0x4057ce
push dword [ebp + 8]
call fcn.004053f7
pop edi
pop esi
pop ebx
leave
ret 4