Function at 0x521509
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x4b
push 0
push 0
dec ecx
jne 0x52134d
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov byte [ebp - 9], cl
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
call fcn.00405254
lea eax, [ebp - 0x16c]
mov edx, dword [0x4088b8]
call fcn.004057ec
xor eax, eax
push ebp
push 0x521de0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x539418]
mov eax, dword [eax]
call fcn.0046cf94
lea ecx, [ebp - 0x16c]
mov edx, 0x3f
mov eax, dword [ebp - 8]
call fcn.0040a244
xor edx, edx
push ebp
push 0x521c89
push dword fs:[edx]
mov dword fs:[edx], esp
test eax, eax
jne 0x521c3b
mov eax, dword [0x539418]
mov eax, dword [eax]
call fcn.0046cf94
mov eax, dword [ebp - 4]
cmp byte [eax + 0xc51], 0
je 0x5213e1
call fcn.0040483c
jmp 0x521c90
mov eax, dword [ebp - 0x160]
mov edx, 0x521dfc
call fcn.004051b0
je 0x521c1c
mov eax, dword [ebp - 0x160]
mov edx, 0x521e08
call fcn.004051b0
je 0x521c1c
cmp byte [ebp - 9], 0x15
jne 0x52141d
call fcn.0040483c
jmp 0x521c90
lea edx, [ebp - 0x180]
mov eax, dword [ebp - 8]
call fcn.0040a424
lea eax, [ebp - 0x180]
mov edx, dword [ebp - 0x160]
call fcn.00405074
mov eax, dword [ebp - 0x180]
call fcn.00409fe4
test al, al
je 0x521c1c
mov byte [ebp - 0xa], 0
xor eax, eax
mov al, byte [ebp - 9]
add eax, 0xfffffffb
cmp eax, 0xf
ja case.0x521464.6
jmp dword [eax*4 + 0x52146b]
mov eax, dword [ebp - 0x16c]
call fcn.0040a6f4
fstp qword [ebp - 0x188]
wait
call fcn.004974ec
fsub dword [0x521e0c]
fcomp qword [ebp - 0x188]
fnstsw ax
sahf
seta byte [ebp - 0xa]
jmp 0x521bad
mov eax, dword [ebp - 0x16c]
call fcn.0040a6f4
fstp qword [ebp - 0x188]
wait
call fcn.004974ec
fsub dword [0x521e10]
fcomp qword [ebp - 0x188]
fnstsw ax
sahf
seta byte [ebp - 0xa]
jmp 0x521bad
lea edx, [ebp - 0x18c]
mov eax, dword [ebp - 8]
call fcn.0040a424
lea eax, [ebp - 0x18c]
mov edx, dword [ebp - 0x160]
call fcn.00405074
mov edx, dword [ebp - 0x18c]
xor ecx, ecx
mov eax, dword [ebp - 4]
call fcn.0052ac74
jmp 0x521bad
lea edx, [ebp - 0x190]
mov eax, dword [ebp - 0x160]
call fcn.00409544
mov eax, dword [ebp - 0x190]
mov edx, 0x521e1c
call fcn.004051b0
setne byte [ebp - 0xa]
jmp 0x521bad
lea eax, [ebp - 0x194]
push eax
lea eax, [ebp - 0x198]
push eax
lea edx, [ebp - 0x1a0]
mov eax, dword [ebp - 8]
call fcn.0040a424
lea eax, [ebp - 0x1a0]
push eax
lea eax, [ebp - 0x1a4]
lea edx, [ebp - 0x24]
mov ecx, 0xe
call fcn.0040501c
mov edx, dword [ebp - 0x1a4]
pop eax
call fcn.00405074
mov edx, dword [ebp - 0x1a0]
lea eax, [ebp - 0x19c]
call fcn.0040562c
mov eax, dword [ebp - 0x19c]
push eax
lea edx, [ebp - 0x1ac]
mov eax, dword [ebp - 8]
call fcn.0040a424
lea eax, [ebp - 0x1ac]
mov edx, dword [ebp - 0x160]
call fcn.00405074
mov edx, dword [ebp - 0x1ac]
lea eax, [ebp - 0x1a8]
call fcn.0040562c
mov edx, dword [ebp - 0x1a8]
mov eax, dword [ebp - 4]
pop ecx
call fcn.0051d7b4
mov eax, dword [ebp - 0x198]
mov ecx, 3
mov edx, 1
call fcn.004052c4
mov eax, dword [ebp - 0x194]
call fcn.00405264
push eax
call sub.kernel32.dll_GetDriveTypeA
cmp eax, 3
jne 0x521775
lea eax, [ebp - 0x1b0]
push eax
lea edx, [ebp - 0x1b8]
mov eax, dword [ebp - 8]
call fcn.0040a424
lea eax, [ebp - 0x1b8]
push eax
lea eax, [ebp - 0x1bc]
lea edx, [ebp - 0x24]
mov ecx, 0xe
call fcn.0040501c
mov edx, dword [ebp - 0x1bc]
pop eax
call fcn.00405074
mov edx, dword [ebp - 0x1b8]
lea eax, [ebp - 0x1b4]
call fcn.0040562c
mov eax, dword [ebp - 0x1b4]
push eax
lea edx, [ebp - 0x1c4]
mov eax, dword [ebp - 8]
call fcn.0040a424
lea eax, [ebp - 0x1c4]
mov edx, dword [ebp - 0x160]
call fcn.00405074
mov edx, dword [ebp - 0x1c4]
lea eax, [ebp - 0x1c0]
call fcn.0040562c
mov edx, dword [ebp - 0x1c0]
mov eax, dword [ebp - 4]
pop ecx
call fcn.0051d7b4
mov eax, dword [ebp - 0x1b0]
call fcn.00409fe4
test al, al
jne 0x521775
lea eax, [ebp - 0x1c8]
push eax
lea edx, [ebp - 0x1d0]
mov eax, dword [ebp - 8]
call fcn.0040a424
lea eax, [ebp - 0x1d0]
push eax
lea eax, [ebp - 0x1d4]
lea edx, [ebp - 0x24]
mov ecx, 0xe
call fcn.0040501c
mov edx, dword [ebp - 0x1d4]
pop eax
call fcn.00405074
mov edx, dword [ebp - 0x1d0]
lea eax, [ebp - 0x1cc]
call fcn.0040562c
mov eax, dword [ebp - 0x1cc]
push eax
lea edx, [ebp - 0x1dc]
mov eax, dword [ebp - 8]
call fcn.0040a424
lea eax, [ebp - 0x1dc]
mov edx, dword [ebp - 0x160]
call fcn.00405074
mov edx, dword [ebp - 0x1dc]
lea eax, [ebp - 0x1d8]
call fcn.0040562c
mov edx, dword [ebp - 0x1d8]
mov eax, dword [ebp - 4]
pop ecx
call fcn.0051d7b4
mov eax, dword [ebp - 0x1c8]
call fcn.004ccc5c
test al, al
je 0x521779
xor eax, eax
jmp 0x52177b
mov al, 1
mov byte [ebp - 0xa], al
jmp 0x521bad
lea eax, [ebp - 0x1e0]
push eax
lea eax, [ebp - 0x1e8]
push eax
lea edx, [ebp - 0x1f0]
mov eax, dword [ebp - 8]
call fcn.0040a424
lea eax, [ebp - 0x1f0]
push eax
lea eax, [ebp - 0x1f4]
lea edx, [ebp - 0x24]
mov ecx, 0xe
call fcn.0040501c
mov edx, dword [ebp - 0x1f4]
pop eax
call fcn.00405074
mov edx, dword [ebp - 0x1f0]
lea eax, [ebp - 0x1ec]
call fcn.0040562c
mov eax, dword [ebp - 0x1ec]
push eax
lea edx, [ebp - 0x1fc]
mov eax, dword [ebp - 8]
call fcn.0040a424
lea eax, [ebp - 0x1fc]
mov edx, dword [ebp - 0x160]
call fcn.00405074
mov edx, dword [ebp - 0x1fc]
lea eax, [ebp - 0x1f8]
call fcn.0040562c
mov edx, dword [ebp - 0x1f8]
mov eax, dword [ebp - 4]
pop ecx
call fcn.0051d7b4
mov eax, dword [ebp - 0x1e8]
lea edx, [ebp - 0x1e4]
call fcn.00409544
mov eax, dword [ebp - 0x1e4]
mov ecx, 4
mov edx, 1
call fcn.004052c4
mov eax, dword [ebp - 0x1e0]
mov edx, 0x521e30
call fcn.004051b0
sete byte [ebp - 0xa]
jmp 0x521bad
lea eax, [ebp - 0x200]
push eax
lea eax, [ebp - 0x204]
push eax
lea edx, [ebp - 0x20c]
mov eax, dword [ebp - 8]
call fcn.0040a424
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x210]
lea edx, [ebp - 0x24]
mov ecx, 0xe
call fcn.0040501c
mov edx, dword [ebp - 0x210]
pop eax
call fcn.00405074
mov edx, dword [ebp - 0x20c]
lea eax, [ebp - 0x208]
call fcn.0040562c
mov eax, dword [ebp - 0x208]
push eax
lea edx, [ebp - 0x218]
mov eax, dword [ebp - 8]
call fcn.0040a424
lea eax, [ebp - 0x218]
mov edx, dword [ebp - 0x160]
call fcn.00405074
mov edx, dword [ebp - 0x218]
lea eax, [ebp - 0x214]
call fcn.0040562c
mov edx, dword [ebp - 0x214]
mov eax, dword [ebp - 4]
pop ecx
call fcn.0051d7b4
mov eax, dword [ebp - 0x204]
mov ecx, 3
mov edx, 1
call fcn.004052c4
mov eax, dword [ebp - 0x200]
call fcn.00405264
push eax
call sub.kernel32.dll_GetDriveTypeA
cmp eax, 5
sete byte [ebp - 0xa]
jmp 0x521bad
mov eax, dword [ebp - 4]
cmp byte [eax + 0xc7d], 0
jne 0x5219b9
cmp dword [ebp - 0x168], 0
jne 0x521bad
lea edx, [ebp - 0x220]
mov eax, dword [ebp - 0x160]
call fcn.0040a598
mov eax, dword [ebp - 0x220]
lea edx, [ebp - 0x21c]
call fcn.00409544
mov eax, dword [ebp - 0x21c]
mov edx, 0x521e40
call fcn.004051b0
je 0x5219af
lea edx, [ebp - 0x228]
mov eax, dword [ebp - 0x160]
call fcn.0040a598
mov eax, dword [ebp - 0x228]
lea edx, [ebp - 0x224]
call fcn.00409544
mov eax, dword [ebp - 0x224]
mov edx, 0x521e50
call fcn.004051b0
je 0x5219af
xor eax, eax
jmp 0x5219b1
mov al, 1
mov byte [ebp - 0xa], al
jmp 0x521bad
cmp dword [ebp - 0x168], 0
jne 0x521a9a
lea edx, [ebp - 0x230]
mov eax, dword [ebp - 0x160]
call fcn.0040a598
mov eax, dword [ebp - 0x230]
lea edx, [ebp - 0x22c]
call fcn.00409544
mov eax, dword [ebp - 0x22c]
mov edx, 0x521e60
call fcn.004051b0
je 0x521a9a
lea edx, [ebp - 0x238]
mov eax, dword [ebp - 0x160]
call fcn.0040a598
mov eax, dword [ebp - 0x238]
lea edx, [ebp - 0x234]
call fcn.00409544
mov eax, dword [ebp - 0x234]
mov edx, 0x521e74
call fcn.004051b0
je 0x521a9a
lea edx, [ebp - 0x240]
mov eax, dword [ebp - 0x160]
call fcn.0040a598
mov eax, dword [ebp - 0x240]
lea edx, [ebp - 0x23c]
call fcn.00409544
mov eax, dword [ebp - 0x23c]
mov edx, 0x521e88
call fcn.004051b0
je 0x521a9a
lea edx, [ebp - 0x248]
mov eax, dword [ebp - 0x160]
call fcn.0040a598
mov eax, dword [ebp - 0x248]
lea edx, [ebp - 0x244]
call fcn.00409544
mov eax, dword [ebp - 0x244]
mov edx, 0x521ea0
call fcn.004051b0
jne 0x521a9e
xor eax, eax
jmp 0x521aa0
mov al, 1
mov byte [ebp - 0xa], al
jmp 0x521bad
xor eax, eax
push ebp
push 0x521b71
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x148]
push eax
call sub.kernel32.dll_FileTimeToLocalFileTime
lea eax, [ebp - 0x17c]
push eax
lea eax, [ebp - 0x14]
push eax
call sub.kernel32.dll_FileTimeToSystemTime
lea eax, [ebp - 0x17c]
call fcn.0040c194
fcomp dword [0x521ea8]
fnstsw ax
sahf
je 0x521b67
mov al, byte [ebp - 9]
sub al, 7
je 0x521b01
dec al
je 0x521b1b
dec al
je 0x521b35
dec al
je 0x521b4f
jmp 0x521b67
lea eax, [ebp - 0x17c]
call fcn.0040c194
fcomp dword [0x521eac]
fnstsw ax
sahf
setb byte [ebp - 0xa]
jmp 0x521b67
lea eax, [ebp - 0x17c]
call fcn.0040c194
fcomp dword [0x521eb0]
fnstsw ax
sahf
setb byte [ebp - 0xa]
jmp 0x521b67
lea eax, [ebp - 0x17c]
call fcn.0040c194
fcomp dword [0x521eb4]
fnstsw ax
sahf
setb byte [ebp - 0xa]
jmp 0x521b67
lea eax, [ebp - 0x17c]
call fcn.0040c194
fcomp dword [0x521eb8]
fnstsw ax
sahf
setb byte [ebp - 0xa]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x521bad
lea edx, [ebp - 0x24c]
mov eax, dword [ebp - 8]
call fcn.0040a424
lea eax, [ebp - 0x24c]
mov edx, dword [ebp - 0x160]
call fcn.00405074
mov eax, dword [ebp - 0x24c]
mov edx, dword [ebp - 8]
call fcn.00500af8
mov byte [ebp - 0xa], al
cmp byte [ebp - 0xa], 0
je 0x521c1c
lea edx, [ebp - 0x250]
mov eax, dword [ebp - 8]
call fcn.0040a424
lea eax, [ebp - 0x250]
push eax
lea eax, [ebp - 0x254]
lea edx, [ebp - 0x24]
mov ecx, 0xe
call fcn.0040501c
mov edx, dword [ebp - 0x254]
pop eax
call fcn.00405074
mov eax, dword [ebp - 0x250]
push eax
lea edx, [ebp - 0x258]
mov eax, dword [ebp - 8]
call fcn.0040a424
lea eax, [ebp - 0x258]
mov edx, dword [ebp - 0x160]
call fcn.00405074
mov edx, dword [ebp - 0x258]
mov eax, dword [ebp - 4]
pop ecx
call fcn.005170d0
mov eax, dword [0x539418]
mov eax, dword [eax]
call fcn.0046cf94
lea eax, [ebp - 0x16c]
call fcn.0040a294
test eax, eax
je 0x5213bf
cmp byte [ebp - 9], 0x15
jne 0x521c70
lea eax, [ebp - 0x25c]
push eax
mov eax, dword [ebp - 8]
call fcn.0040506c
mov ecx, eax
dec ecx
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.004052c4
mov edx, dword [ebp - 0x25c]
xor ecx, ecx
mov eax, dword [ebp - 4]
call fcn.005170d0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x521c90
lea eax, [ebp - 0x16c]
call fcn.0040a2b8
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x521dea
lea eax, [ebp - 0x25c]
mov edx, 0x12
call fcn.00404dd8
lea eax, [ebp - 0x214]
call fcn.004054d8
lea eax, [ebp - 0x210]
mov edx, 2
call fcn.00404dd8
lea eax, [ebp - 0x208]
call fcn.004054d8
lea eax, [ebp - 0x204]
mov edx, 3
call fcn.00404dd8
lea eax, [ebp - 0x1f8]
call fcn.004054d8
lea eax, [ebp - 0x1f4]
mov edx, 2
call fcn.00404dd8
lea eax, [ebp - 0x1ec]
call fcn.004054d8
lea eax, [ebp - 0x1e8]
mov edx, 4
call fcn.00404dd8
lea eax, [ebp - 0x1d8]
call fcn.004054d8
lea eax, [ebp - 0x1d4]
mov edx, 2
call fcn.00404dd8
lea eax, [ebp - 0x1cc]
call fcn.004054d8
lea eax, [ebp - 0x1c8]
mov edx, 2
call fcn.00404dd8
lea eax, [ebp - 0x1c0]
call fcn.004054d8
lea eax, [ebp - 0x1bc]
mov edx, 2
call fcn.00404dd8
lea eax, [ebp - 0x1b4]
call fcn.004054d8
lea eax, [ebp - 0x1b0]
mov edx, 2
call fcn.00404dd8
lea eax, [ebp - 0x1a8]
call fcn.004054d8
lea eax, [ebp - 0x1a4]
mov edx, 2
call fcn.00404dd8
lea eax, [ebp - 0x19c]
call fcn.004054d8
lea eax, [ebp - 0x198]
mov edx, 4
call fcn.00404dd8
lea eax, [ebp - 0x180]
call fcn.00404db4
lea eax, [ebp - 0x16c]
mov edx, dword [0x4088b8]
call fcn.004058bc
lea eax, [ebp - 8]
call fcn.00404db4
ret