Function at 0x512a07
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x268
mov eax, dword [0x5af1b4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x260], esi
cmp esi, ebx
jne 0x512a55
call fcn.00510ee3
mov dword [eax], ebx
call fcn.00510ed0
push ebx
push ebx
push ebx
push ebx
push ebx
mov dword [eax], 0x16
call fcn.0050dd32
add esp, 0x14
jmp 0x512e34
cmp edi, ebx
je 0x512a31
push 0x5555cc
push esi
call fcn.005226ca
pop ecx
pop ecx
test eax, eax
je 0x512a80
call fcn.00510ed0
push 2
pop esi
mov dword [eax], esi
call fcn.00510ee3
mov dword [eax], esi
jmp 0x512e34
cmp byte [esi + 1], 0x3a
jne 0x512aa0
mov al, byte [esi]
cmp al, bl
je 0x512a91
cmp byte [esi + 2], bl
je 0x512a6a
movsx eax, al
push eax
call fcn.005225ea
pop ecx
sub eax, 0x60
jmp 0x512aa5
call fcn.0052247b
mov dword [ebp - 0x268], eax
lea eax, [ebp - 0x248]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x24c], eax
cmp eax, 0xffffffff
jne 0x512ba8
push 0x5555c8
push esi
mov dword [ebp - 0x24c], ebx
call fcn.005226ca
pop ecx
pop ecx
test eax, eax
je 0x512a6a
lea eax, [ebp - 0x24c]
push eax
push 0x104
lea eax, [ebp - 0x108]
push esi
push eax
call fcn.005129a7
mov esi, eax
add esp, 0x10
cmp esi, ebx
je 0x512b8b
push esi
call fcn.00513ac0
pop ecx
cmp eax, 3
je 0x512b1a
call fcn.0051292d
test eax, eax
je 0x512b8b
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 1
jbe 0x512b8b
cmp dword [ebp - 0x24c], ebx
je 0x512b3a
push dword [ebp - 0x24c]
call fcn.0050f521
pop ecx
push 0xffffffffffffffff
push ebx
push ebx
push ebx
push 1
push 1
push 0x7bc
mov dword [ebp - 0x248], 0x10
mov dword [ebp - 0x22c], ebx
mov dword [ebp - 0x228], ebx
mov byte [ebp - 0x21c], bl
call fcn.00522210
mov esi, dword [ebp - 0x260]
mov ecx, edx
add esp, 0x1c
mov dword [edi + 0x20], eax
mov dword [edi + 0x24], edx
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], ecx
mov dword [edi + 0x28], eax
mov dword [edi + 0x2c], ecx
jmp 0x512ddb
cmp dword [ebp - 0x24c], ebx
je 0x512a6a
push dword [ebp - 0x24c]
call fcn.0050f521
pop ecx
jmp 0x512a6a
test dword [ebp - 0x248], 0x400
je 0x512c13
cmp dword [ebp - 0x224], 0xa000000c
jne 0x512c13
or dword [ebp - 0x24c], 0xffffffff
push ebx
push 0x40
push ebx
lea eax, [ebp - 0x24c]
push esi
push eax
call fcn.005221f0
add esp, 0x14
test eax, eax
jne 0x512a6a
cmp dword [ebp - 0x24c], 0xffffffff
je 0x512a6a
push edi
push dword [ebp - 0x24c]
call fcn.005216ae
push dword [ebp - 0x24c]
mov esi, eax
call fcn.0051a407
add esp, 0xc
mov eax, esi
jmp 0x512e37
cmp dword [ebp - 0x234], ebx
jne 0x512c2b
cmp dword [ebp - 0x230], ebx
jne 0x512c2b
mov dword [edi + 0x20], ebx
mov dword [edi + 0x24], ebx
jmp 0x512ca3
lea eax, [ebp - 0x264]
push eax
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
test eax, eax
je 0x512e1b
lea eax, [ebp - 0x25c]
push eax
lea eax, [ebp - 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x512e1b
movzx eax, word [ebp - 0x250]
push 0xffffffffffffffff
push eax
movzx eax, word [ebp - 0x252]
push eax
movzx eax, word [ebp - 0x254]
push eax
movzx eax, word [ebp - 0x256]
push eax
movzx eax, word [ebp - 0x25a]
push eax
movzx eax, word [ebp - 0x25c]
push eax
call fcn.00522210
add esp, 0x1c
mov dword [edi + 0x20], eax
mov dword [edi + 0x24], edx
cmp dword [ebp - 0x23c], ebx
jne 0x512cc1
cmp dword [ebp - 0x238], ebx
jne 0x512cc1
mov eax, dword [edi + 0x20]
mov dword [edi + 0x18], eax
mov eax, dword [edi + 0x24]
mov dword [edi + 0x1c], eax
jmp 0x512d39
lea eax, [ebp - 0x264]
push eax
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
test eax, eax
je 0x512e1b
lea eax, [ebp - 0x25c]
push eax
lea eax, [ebp - 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x512e1b
movzx eax, word [ebp - 0x250]
push 0xffffffffffffffff
push eax
movzx eax, word [ebp - 0x252]
push eax
movzx eax, word [ebp - 0x254]
push eax
movzx eax, word [ebp - 0x256]
push eax
movzx eax, word [ebp - 0x25a]
push eax
movzx eax, word [ebp - 0x25c]
push eax
call fcn.00522210
add esp, 0x1c
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], edx
cmp dword [ebp - 0x244], ebx
jne 0x512d57
cmp dword [ebp - 0x240], ebx
jne 0x512d57
mov eax, dword [edi + 0x20]
mov dword [edi + 0x28], eax
mov eax, dword [edi + 0x24]
mov dword [edi + 0x2c], eax
jmp 0x512dcf
lea eax, [ebp - 0x264]
push eax
lea eax, [ebp - 0x244]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
test eax, eax
je 0x512e1b
lea eax, [ebp - 0x25c]
push eax
lea eax, [ebp - 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x512e1b
movzx eax, word [ebp - 0x250]
push 0xffffffffffffffff
push eax
movzx eax, word [ebp - 0x252]
push eax
movzx eax, word [ebp - 0x254]
push eax
movzx eax, word [ebp - 0x256]
push eax
movzx eax, word [ebp - 0x25a]
push eax
movzx eax, word [ebp - 0x25c]
push eax
call fcn.00522210
add esp, 0x1c
mov dword [edi + 0x28], eax
mov dword [edi + 0x2c], edx
push dword [ebp - 0x24c]
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
push dword [ebp - 0x248]
call fcn.005215f1
mov word [edi + 6], ax
xor eax, eax
inc eax
mov word [edi + 8], ax
mov eax, dword [ebp - 0x228]
mov dword [edi + 0x14], eax
xor eax, eax
mov word [edi + 4], ax
mov word [edi + 0xc], ax
mov word [edi + 0xa], ax
mov eax, dword [ebp - 0x268]
dec eax
pop ecx
mov dword [edi], eax
mov dword [edi + 0x10], eax
pop ecx
xor eax, eax
jmp 0x512e37
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00510ef6
pop ecx
push dword [ebp - 0x24c]
call dword [sym.imp.KERNEL32.dll_FindClose]
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00511c1b
leave
ret