Function at 0x51b470
Capabilities:
Get disk information

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x59a392
push eax
mov eax, 0x3544
mov dword fs:[0], esp
call fcn.00413cb0
push ebx
push ebp
mov dword [esp + 0x28], ecx
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov ebx, eax
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebx
jne 0x51b4ae
xor eax, eax
jmp 0x51bb65
mov ax, word [0x5d6bf8]
mov cl, byte [0x5d6bfa]
push esi
push edi
mov word [esp + 0x24], ax
mov byte [esp + 0x26], cl
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x1cd]
mov byte [esp + 0x1cc], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x3c]
stosb byte es:[edi], al
call fcn.00577ee6
lea ecx, [esp + 0x50]
mov dword [esp + 0x355c], ebp
call fcn.00579215
mov edx, dword [0x5d66d0]
mov edi, dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
xor ecx, ecx
mov byte [esp + 0x355c], 1
mov dword [esp + 0x34], edx
mov eax, 1
mov dword [esp + 0x14], ecx
jmp 0x51b526
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x18]
mov esi, eax
shl eax, 1
test ebx, esi
mov dword [esp + 0x20], eax
je 0x51b5a4
mov bl, cl
lea eax, [esp + 0x34]
add bl, 0x41
push eax
mov byte [esp + 0x38], bl
call edi
cmp eax, 2
je 0x51b55f
cmp eax, 3
je 0x51b55f
cmp eax, 5
je 0x51b55f
mov eax, dword [esp + 0x18]
mov ecx, esi
not ecx
and eax, ecx
mov dword [esp + 0x18], eax
lea edx, [esp + 0x1cc]
push 0x104
lea eax, [esp + 0x28]
push edx
push eax
mov byte [esp + 0x30], bl
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
test eax, eax
je 0x51b5a4
mov ecx, dword [esp + 0x58]
push esi
push ecx
lea ecx, [esp + 0x58]
call fcn.00579439
mov eax, dword [esp + 0x44]
lea edx, [esp + 0x1cc]
push edx
push eax
lea ecx, [esp + 0x44]
call fcn.0057818f
mov ecx, dword [esp + 0x14]
inc ecx
cmp ecx, 0x1a
mov dword [esp + 0x14], ecx
jl 0x51b51e
mov ecx, 0x1d
xor eax, eax
lea edi, [esp + 0x158]
mov dword [esp + 0x154], ebp
rep stosd dword es:[edi], eax
mov ecx, 0x1d
lea edi, [esp + 0x68]
mov dword [esp + 0x64], ebp
mov dword [esp + 0xdc], ebp
rep stosd dword es:[edi], eax
mov ecx, 0x1d
lea edi, [esp + 0xe0]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x44]
xor ebx, ebx
cmp eax, ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x2c], eax
mov dword [esp + 0x14], ebx
jle 0x51b780
mov dword [esp + 0x1c], ebp
jmp 0x51b613
xor ebp, ebp
mov edi, 0x5e5b24
mov ecx, dword [edi]
mov edx, dword [esp + 0x40]
push ecx
lea ecx, [edx + ebx*4]
call fcn.00576cb5
mov esi, eax
cmp esi, 0xffffffff
jne 0x51b63f
add edi, 4
inc ebp
cmp edi, 0x5e5b28
jl 0x51b618
jmp 0x51b75a
cmp ebp, 1
jge 0x51b75a
mov eax, dword [esp + 0x40]
mov edi, dword [ebp*4 + 0x5e5b24]
mov ecx, dword [eax + ebx*4]
lea ebx, [eax + ebx*4]
xor eax, eax
mov edx, dword [ecx - 8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
sub edx, esi
sub edx, ecx
mov ecx, ebx
push edx
lea edx, [esp + 0x14]
push edx
call fcn.00576b49
push 0x5d418c
lea ecx, [esp + 0x14]
mov byte [esp + 0x3560], 2
call fcn.00576cb5
push eax
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x18]
call fcn.00576bc5
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x3560], 3
call fcn.00579d57
lea ecx, [esp + 0x20]
mov byte [esp + 0x355c], 2
call fcn.00579c1e
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00417a7e
add esp, 4
test ebp, ebp
jne 0x51b745
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x54]
xor ecx, ecx
test edx, edx
jbe 0x51b70d
cmp dword [esp + ecx*4 + 0x154], eax
jne 0x51b6f1
cmp dword [esp + ecx*4 + 0xdc], 3
je 0x51b6fc
mov edi, dword [esp + 0x18]
inc ecx
cmp ecx, edi
jb 0x51b6de
jmp 0x51b70d
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + ecx*4 + 0x64]
mov edi, dword [esi + edi*4]
or ebx, edi
mov dword [esp + ecx*4 + 0x64], ebx
mov edi, dword [esp + 0x18]
cmp ecx, edi
jne 0x51b745
cmp edx, 0x78
jae 0x51b76d
mov dword [esp + edx + 0x154], eax
mov eax, dword [esp + 0x14]
mov dword [esp + edx + 0xdc], 3
mov ecx, dword [esi + eax*4]
mov dword [esp + edx + 0x64], ecx
mov ecx, edi
inc ecx
add edx, 4
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
lea ecx, [esp + 0x10]
mov byte [esp + 0x355c], 1
call fcn.00579c1e
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x2c]
inc ebx
cmp ebx, eax
mov dword [esp + 0x14], ebx
jl 0x51b611
jmp 0x51b77e
lea ecx, [esp + 0x10]
mov byte [esp + 0x355c], 1
call fcn.00579c1e
xor ebp, ebp
mov ecx, 0xbf3
xor eax, eax
lea edi, [esp + 0x588]
mov dword [esp + 0x584], ebp
rep stosd dword es:[edi], eax
mov ecx, 0xac
lea edi, [esp + 0x2d4]
mov dword [esp + 0x2d0], ebp
xor edx, edx
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], edx
cmp eax, ebp
mov ebp, dword [esp + 0x3564]
jle 0x51bb28
lea esi, [esp + 0x584]
mov dword [esp + 0x20], esi
mov ecx, 0xad
xor eax, eax
lea edi, [esp + 0x2d0]
rep stosd dword es:[edi], eax
mov eax, dword [esp + edx*4 + 0xdc]
mov ecx, dword [esp + edx*4 + 0x64]
mov dword [esp + 0x2d8], ecx
mov dword [esp + 0x2d4], eax
lea ecx, [eax - 1]
cmp ecx, 4
ja case.default.0x51b805
jmp dword [ecx*4 + 0x51bb80]
mov edx, dword [esp + edx*4 + 0x154]
lea ecx, [esp + 0x2d0]
push ecx
mov ecx, dword [esp + 0x34]
push edx
push eax
mov dword [esi], 3
call fcn.0051d120
lea eax, [esp + 0x2dc]
lea ecx, [esp + 0x10]
push eax
call fcn.00579c8c
push 0x5de3ec
lea ecx, [esp + 0x14]
mov byte [esp + 0x3560], 4
call fcn.00577247
push 0x5de3ec
lea ecx, [esp + 0x14]
call fcn.00577166
push 0x5de3ec
lea ecx, [esp + 0x14]
call fcn.00576cb5
cmp eax, 0xffffffff
je 0x51b8e3
inc eax
lea ecx, [esp + 0x10]
push eax
push 0x5de3ec
call fcn.00576cc3
cmp eax, 0xffffffff
je 0x51b8e3
lea ecx, [esp + 0x2c]
push eax
push ecx
lea ecx, [esp + 0x18]
call fcn.00576bc5
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x3560], 5
call fcn.00579d57
lea ecx, [esp + 0x2c]
mov byte [esp + 0x355c], 4
call fcn.00579c1e
mov edi, dword [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x2dc]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
mov byte [esp + 0x355c], 1
call fcn.00579c1e
jmp 0x51b914
mov dword [esi], 2
jmp 0x51b914
mov dword [esi], 1
jmp 0x51b914
mov dword [esi], 5
jmp 0x51b914
mov dword [esi], 4
mov ecx, dword [ebp + 8]
mov esi, ecx
mov dword [esp + 0x28], esi
lea ebx, [esi + 1]
test ebx, ebx
jne 0x51b948
mov eax, dword [ebp + 4]
test eax, eax
je 0x51b93b
push eax
mov dword [esp + 0x2c], ecx
call fcn.00579886
add esp, 4
mov dword [ebp + 4], ebx
xor eax, eax
mov dword [ebp + 0xc], eax
mov dword [ebp + 8], eax
jmp 0x51badf
mov edi, dword [ebp + 4]
test edi, edi
jne 0x51b991
lea eax, [ebx*8]
sub eax, ebx
lea ecx, [eax + eax*2]
lea edx, [ebx + ecx*2]
lea edi, [ebx + edx*4]
shl edi, 2
push edi
call fcn.0057985d
mov edx, eax
mov ecx, edi
mov dword [ebp + 4], edx
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov dword [ebp + 0xc], ebx
mov dword [ebp + 8], ebx
jmp 0x51badf
cmp ebx, dword [ebp + 0xc]
jg 0x51b9f0
cmp ecx, ebx
jge 0x51b9e0
lea edx, [ecx*8]
mov eax, ebx
sub edx, ecx
sub eax, ecx
lea edx, [edx + edx*2]
lea edx, [ecx + edx*2]
lea ecx, [ecx + edx*4]
lea edi, [edi + ecx*4]
lea ecx, [eax*8]
sub ecx, eax
lea edx, [ecx + ecx*2]
lea ecx, [eax + edx*2]
lea ecx, [eax + ecx*4]
xor eax, eax
shl ecx, 2
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov dword [ebp + 8], ebx
jmp 0x51badf
jle 0x51b9e8
sub ecx, ebx
mov dword [esp + 0x28], ecx
mov dword [ebp + 8], ebx
jmp 0x51badf
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x51ba1a
mov eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp eax, 4
jge 0x51ba0e
mov eax, 4
jmp 0x51ba1a
cmp eax, 0x400
jle 0x51ba1a
mov eax, 0x400
mov ecx, dword [ebp + 0xc]
add eax, ecx
cmp ebx, eax
jge 0x51ba2b
mov ecx, eax
mov dword [esp + 0x1c], ecx
jmp 0x51ba31
mov dword [esp + 0x1c], ebx
mov ecx, ebx
lea eax, [ecx*8]
sub eax, ecx
lea eax, [eax + eax*2]
lea edx, [ecx + eax*2]
lea eax, [ecx + edx*4]
shl eax, 2
push eax
call fcn.0057985d
mov edx, eax
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 4]
mov edi, edx
lea ecx, [eax*8]
mov dword [esp + 0x3c], edx
sub ecx, eax
lea ecx, [ecx + ecx*2]
lea ecx, [eax + ecx*2]
lea ecx, [eax + ecx*4]
shl ecx, 2
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 8]
sub eax, ecx
lea esi, [ecx*8]
sub esi, ecx
lea esi, [esi + esi*2]
lea esi, [ecx + esi*2]
lea ecx, [ecx + esi*4]
lea edi, [edx + ecx*4]
lea ecx, [eax*8]
sub ecx, eax
lea edx, [ecx + ecx*2]
lea ecx, [eax + edx*2]
lea ecx, [eax + ecx*4]
xor eax, eax
shl ecx, 2
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 4]
push eax
call fcn.00579886
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x30]
add esp, 8
mov dword [ebp + 4], eax
mov dword [ebp + 8], ebx
mov dword [ebp + 0xc], ecx
lea eax, [esi*8]
sub eax, esi
lea edx, [eax + eax*2]
lea eax, [esi + edx*2]
mov edx, dword [ebp + 4]
lea ecx, [esi + eax*4]
lea esi, [esp + 0x2d0]
lea edi, [edx + ecx*4]
mov edx, dword [esp + 0x14]
mov ecx, 0xad
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
inc edx
add esi, 0x198
cmp edx, eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x20], esi
jl 0x51b7d0
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x584]
push eax
push ebp
call fcn.0051bba0
lea ecx, [esp + 0x50]
mov esi, eax
mov byte [esp + 0x355c], 0
call fcn.00579248
lea ecx, [esp + 0x3c]
mov dword [esp + 0x355c], 0xffffffff
call fcn.00577f19
mov eax, esi
pop edi
pop esi
mov ecx, dword [esp + 0x354c]
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x3550
ret 4