Function at 0x509830
Capabilities:
Get disk information

Disassembly:
push 0xffffffffffffffff
push 0x754612
mov eax, dword fs:[0]
push eax
sub esp, 0x2d8
mov eax, dword [0x81f390]
xor eax, esp
mov dword [esp + 0x2d4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x81f390]
xor eax, esp
push eax
lea eax, [esp + 0x2ec]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 0x20]
mov byte [esp + 0x17], 0
cmp dword [eax + 4], 0
jne 0x509882
xor al, al
jmp 0x509ac4
push dword [edi + 0x1c]
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebp, eax
test ebp, ebp
je 0x50987b
mov ecx, dword [edi + 0x20]
call fcn.004f85c0
test al, al
mov eax, dword [edi + 0x20]
je 0x509912
lea ecx, [esp + 0x54]
mov dword [esp + 0x54], 0x104
mov eax, dword [eax + 0x34]
push ecx
lea ecx, [esp + 0xe4]
push ecx
push 0
push ebp
call eax
test eax, eax
jne 0x5098cf
xor bl, bl
jmp 0x509abb
lea eax, [esp + 0xe0]
mov bl, 1
push eax
lea ecx, [esp + 0x1c]
call fcn.00503eb0
lea eax, [esp + 0x18]
mov dword [esp + 0x2f4], 0
push eax
mov ecx, edi
call fcn.00503f80
lea ecx, [esp + 0x18]
mov dword [esp + 0x2f4], 0xffffffff
call fcn.0061b700
jmp 0x509abb
mov eax, dword [eax + 0x30]
lea ecx, [esp + 0xe0]
push 0x104
push ecx
push ebp
call eax
test eax, eax
je 0x509ab7
lea eax, [esp + 0xe0]
push eax
lea ecx, [esp + 0x78]
call fcn.00406a00
lea eax, [esp + 0x90]
mov dword [esp + 0x2f4], 1
push eax
push 0x4f
mov byte [esp + 0x5a], 0
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
cmp byte [esp + 0x90], 0
lea esi, [esp + 0x90]
je 0x5099ff
mov ebx, dword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
lea esp, [esp]
push 2
push esi
lea eax, [esp + 0x58]
push 3
push eax
call fcn.006c46b0
add esp, 0x10
lea eax, [esp + 0x1e4]
push 0x104
push eax
lea eax, [esp + 0x58]
push eax
call ebx
test eax, eax
je 0x5099ee
lea eax, [esp + 0x1e4]
push eax
lea ecx, [esp + 0x5c]
call fcn.00406a00
push 0
lea eax, [esp + 0x1e8]
mov byte [esp + 0x2f8], 2
push eax
lea ecx, [esp + 0x80]
call fcn.00491360
test eax, eax
je 0x509a4c
lea ecx, [esp + 0x58]
mov byte [esp + 0x2f4], 1
call fcn.0061b700
cmp byte [esi], 0
je 0x5099f9
inc esi
cmp byte [esi], 0
jne 0x5099f3
inc esi
cmp byte [esi], 0
jne 0x509980
mov bl, byte [esp + 0x17]
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0x5c]
call fcn.00503e70
lea eax, [esp + 0x58]
mov byte [esp + 0x2f4], 5
push eax
mov ecx, edi
call fcn.00503f80
lea ecx, [esp + 0x58]
mov byte [esp + 0x2f4], 1
call fcn.0061b700
lea ecx, [esp + 0x74]
mov dword [esp + 0x2f4], 0xffffffff
call fcn.0061b700
jmp 0x509abb
lea eax, [esp + 0x50]
mov bl, 1
push eax
lea ecx, [esp + 0x38]
call fcn.00406a00
lea eax, [esp + 0x1e4]
mov byte [esp + 0x2f4], 3
push eax
lea ecx, [esp + 0x1c]
call fcn.00406a00
lea eax, [esp + 0x34]
mov byte [esp + 0x2f4], 4
push eax
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x7c]
call fcn.00409000
lea ecx, [esp + 0x18]
call fcn.0061b700
lea ecx, [esp + 0x34]
call fcn.0061b700
lea ecx, [esp + 0x58]
mov byte [esp + 0x2f4], bl
call fcn.0061b700
jmp 0x509a03
mov bl, byte [esp + 0x17]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, bl
mov ecx, dword [esp + 0x2ec]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2d4]
xor ecx, esp
call fcn.006f7ca4
add esp, 0x2e4
ret