Function at 0x5013f0
Capabilities:
Get disk information

Disassembly:
sub esp, 0x620
push ebx
mov bl, byte [esp + 0x628]
xor edx, edx
xor eax, eax
test bl, bl
setne al
push ebp
inc eax
push esi
mov esi, eax
mov eax, dword [esp + 0x634]
push edi
cmp esi, eax
mov dword [esp + 0x10], edx
mov byte [0x51f804], dl
mov dword [0x51f808], edx
mov byte [0x51f806], 1
mov byte [0x51f805], 1
jge 0x50150b
mov edi, dword [esp + 0x63c]
lea ebx, [esi + 1]
lea ebp, [edi + esi*4]
lea edi, [edi + ebx*4]
jmp 0x501450
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp]
xor eax, eax
mov ax, word [ecx]
sub eax, 0x2d
je 0x501470
sub eax, 2
je 0x501470
test edx, edx
jne 0x501526
mov dword [esp + 0x10], esi
jmp 0x5014e3
mov ax, word [ecx + 2]
test ax, ax
je 0x5014e3
and eax, 0xffff
push eax
call fcn.00503e76
add eax, 0xffffffbf
add esp, 4
cmp eax, 0x12
ja case.0x50149b.70
xor ecx, ecx
mov cl, byte [eax + 0x50171c]
jmp dword [ecx*4 + 0x501704]
mov byte [0x51f804], 1
jmp 0x5014e3
mov byte [0x51f806], 0
jmp 0x5014e3
cmp ebx, dword [esp + 0x638]
jg 0x50158e
mov edx, dword [edi]
inc esi
add ebp, 4
add edi, 4
mov dword [0x51f80c], edx
inc ebx
jmp 0x5014e3
mov byte [0x51f807], 1
jmp 0x5014e3
mov byte [0x51f805], 0
mov eax, dword [esp + 0x638]
inc esi
add ebp, 4
add edi, 4
inc ebx
cmp esi, eax
jl 0x50144c
mov edx, dword [esp + 0x10]
test edx, edx
jne 0x50151d
mov al, byte [0x51f806]
test al, al
je 0x50151d
mov al, byte [0x51f807]
test al, al
jne 0x50151d
mov al, byte [0x51f805]
test al, al
jne 0x501560
mov al, byte [0x51f804]
test al, al
jne 0x50158a
mov eax, dword [esp + 0x63c]
mov ecx, dword [eax]
push ecx
call fcn.005013b0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x620
ret
mov ecx, dword [esp + 0x63c]
mov edx, dword [ecx]
push edx
call fcn.005013b0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x620
ret
mov al, byte [0x51f804]
test al, al
je 0x5016f6
mov edx, dword [esp + 0x63c]
mov eax, dword [edx]
push eax
call fcn.005013b0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x620
ret
test edx, edx
jne 0x5015ab
mov edx, dword [esp + 0x63c]
mov eax, dword [edx]
push eax
call fcn.005013b0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x620
ret
mov al, byte [esp + 0x634]
test al, al
je 0x50161c
mov ecx, dword [esp + 0x63c]
push 0x519ad0
mov edx, dword [ecx + edx*4]
push edx
call fcn.00504198
add esp, 8
cmp eax, 0xffffffff
mov dword [0x51f808], eax
jne 0x5016f6
mov eax, dword [esp + 0x63c]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + ecx*4]
lea eax, [esp + 0x220]
push edx
push str.Error_opening__s
push eax
call fcn.00503dff
lea ecx, [esp + 0x22c]
push ecx
push 0
call fcn.004fcec0
add esp, 0x14
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x620
ret
mov ecx, dword [esp + 0x63c]
lea eax, [esp + 0x14]
push eax
push 0x51f824
mov edx, dword [ecx + edx*4]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
jne 0x501680
mov eax, dword [esp + 0x63c]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + ecx*4]
lea eax, [esp + 0x220]
push edx
push str.Error_accessing__s
push eax
call fcn.00503dff
lea ecx, [esp + 0x22c]
push ecx
push 0
call fcn.004fcec0
add esp, 0x14
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x620
ret
lea edx, [esp + 0x18]
push 0x51f824
push edx
call fcn.0050420b
add esp, 8
lea eax, [esp + 0x18]
mov word [esp + 0x1e], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
je 0x5016e4
cmp eax, 2
je 0x5016e4
push 0x51f824
lea ecx, [esp + 0x224]
push 0x51a698
push ecx
call fcn.00503dff
lea edx, [esp + 0x22c]
push edx
push 0
call fcn.004fcec0
add esp, 0x14
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x620
ret
mov eax, dword [esp + 0x63c]
mov ecx, dword [esp + 0x10]
mov dword [eax + ecx*4], 0x51f824
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x620
ret