Function at 0x5381b0
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54201b
mov eax, dword fs:[0]
push eax
sub esp, 0x90c
mov eax, dword [0x59c388]
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
cmp byte [0x5a1cf0], 0
jne 0x538420
lea eax, [ebp - 0x8ec]
mov byte [0x5a1cf0], 1
push eax
push 0x800
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
mov dword [ebp - 0x918], eax
test eax, eax
jle 0x538420
xor ebx, ebx
lea ecx, [ebp - 0x8ec]
lea ecx, [ecx + ebx*2]
lea edx, [ebp - 0x24]
sub edx, ecx
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x538222
lea ecx, [ebp - 0x24]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x538240
sub ecx, edx
inc ebx
sar ecx, 1
add ebx, ecx
mov dword [ebp - 0x914], ebx
lea ecx, [ecx*2 - 2]
cmp ecx, 0x14
jae 0x53843c
xor eax, eax
mov word [ebp + ecx - 0x24], ax
lea eax, [ebp - 0xec]
push 0xc8
push eax
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
test eax, eax
je 0x538420
xor eax, eax
mov dword [ebp - 0x8f4], 0
lea ecx, [ebp - 0xec]
mov dword [ebp - 0x8f0], 0
mov dword [ebp - 0x8f4], 0
lea edx, [ecx + 2]
mov dword [ebp - 0x8f0], 7
mov word [ebp - 0x904], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5382c7
sub ecx, edx
lea eax, [ebp - 0xec]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x904]
call fcn.00408a30
mov dword [ebp - 4], 0
mov ebx, dword [0x5a1cf4]
mov esi, ebx
mov edi, dword [esi + 4]
cmp byte [edi + 0xd], 0
jne 0x538346
lea eax, [ebp - 0x904]
mov ecx, 0x5a1cf4
push eax
lea eax, [edi + 0x10]
push eax
call fcn.00538130
test al, al
je 0x53831f
mov edi, dword [edi + 8]
jmp 0x538323
mov esi, edi
mov edi, dword [edi]
cmp byte [edi + 0xd], 0
je 0x538301
cmp esi, ebx
je 0x538346
lea eax, [esi + 0x10]
mov ecx, 0x5a1cf4
push eax
lea eax, [ebp - 0x904]
push eax
call fcn.00538130
test al, al
je 0x53838c
lea eax, [ebp - 0x904]
mov ecx, 0x5a1cf4
mov dword [ebp - 0x90c], eax
lea eax, [ebp - 0x905]
push eax
lea eax, [ebp - 0x90c]
push eax
push 0x56be34
call fcn.00537ac0
push eax
add eax, 0x10
mov ecx, 0x5a1cf4
push eax
push esi
lea eax, [ebp - 0x910]
push eax
call fcn.00537cb0
mov esi, dword [ebp - 0x910]
lea edx, [ebp - 0x24]
lea ecx, [esi + 0x28]
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x538395
sub edx, esi
lea eax, [ebp - 0x24]
sar edx, 1
push edx
push eax
call fcn.00408a30
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x8f0]
cmp edx, 8
jb 0x5383f1
mov ecx, dword [ebp - 0x904]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x5383e7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x538441
push edx
push ecx
call fcn.004f3ad4
add esp, 8
mov ebx, dword [ebp - 0x914]
xor eax, eax
mov dword [ebp - 0x8f4], 0
mov dword [ebp - 0x8f0], 7
mov word [ebp - 0x904], ax
cmp ebx, dword [ebp - 0x918]
jl 0x538214
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.004f3d68
mov esp, ebp
pop ebp
ret
call fcn.004f418e
call fcn.0050f89c
int3