Function at 0x526114
Capabilities:
Get disk information
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdc8
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 4], ecx
mov edi, edx
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x526359
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, 8
call fcn.00404280
mov ebx, eax
mov eax, 8
call fcn.00404280
mov esi, eax
mov eax, 8
call fcn.00404280
mov dword [ebp - 0xc], eax
lea eax, [ebp - 4]
push eax
mov dword [ebp - 0x238], edi
mov byte [ebp - 0x234], 0xa
lea edx, [ebp - 0x238]
xor ecx, ecx
mov eax, 0x526378
call fcn.00416588
mov eax, dword [ebp - 4]
call fcn.0040785c
mov edx, eax
mov eax, ebx
call fcn.00415f40
lea eax, [ebp - 4]
push eax
mov dword [ebp - 0x238], edi
mov byte [ebp - 0x234], 0xa
lea edx, [ebp - 0x238]
xor ecx, ecx
mov eax, 0x526390
call fcn.00416588
mov eax, dword [ebp - 4]
call fcn.0040785c
mov edx, eax
mov eax, esi
call fcn.00415f40
lea eax, [ebp - 4]
push eax
mov dword [ebp - 0x238], edi
mov byte [ebp - 0x234], 0xa
lea edx, [ebp - 0x238]
xor ecx, ecx
mov eax, 0x5263a4
call fcn.00416588
mov eax, dword [ebp - 4]
call fcn.0040785c
mov edx, eax
mov eax, dword [ebp - 0xc]
call fcn.00415f40
mov dword [ebp - 0x10], 0xffffffff
push 0
push 0
push 3
push 0
push 3
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CreateFileW_1
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x526226
xor ebx, ebx
jmp 0x526343
lea eax, [ebp - 0x30]
xor ecx, ecx
mov edx, 0xc
call fcn.00404d7c
xor eax, eax
mov dword [ebp - 0x18], eax
push 0
lea eax, [ebp - 0x18]
push eax
push 0xc
lea eax, [ebp - 0x30]
push eax
push 0
push 0
push 0x2d1080
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_DeviceIoControl
test eax, eax
je 0x526262
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_CloseHandle_1
cmp dword [ebp - 0x10], 0xffffffff
jne 0x526278
xor ebx, ebx
jmp 0x526343
push ebx
call sub.kernel32.dll_GetDriveTypeW
mov dword [ebp - 0x1c], eax
mov eax, 0x104
call fcn.00404280
mov edi, eax
push 0x104
push edi
push esi
call sub.kernel32.dll_QueryDosDeviceW
neg al
sbb eax, eax
test eax, eax
jne 0x5262a8
xor ebx, ebx
jmp 0x526343
push edi
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
call fcn.005263b4
mov edi, eax
mov eax, ebx
call fcn.004042b4
mov eax, esi
call fcn.004042b4
mov eax, dword [ebp - 0xc]
call fcn.004042b4
test edi, edi
jne 0x5262d7
xor ebx, ebx
jmp 0x526343
xor eax, eax
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x230]
xor ecx, ecx
mov edx, pe_nt_image_headers32
call fcn.00404d7c
xor eax, eax
mov dword [ebp - 0x24], eax
push 0
push edi
lea eax, [ebp - 0x24]
push eax
call sub.setupapi.dll_CM_Get_Parent
push 0
push 0x104
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.setupapi.dll_CM_Request_Device_EjectA
test eax, eax
sete al
test al, al
je 0x52632e
cmp dword [ebp - 0x20], 0
sete al
test al, al
jne 0x526332
xor eax, eax
jmp 0x526334
mov al, 1
neg al
sbb eax, eax
test eax, eax
jne 0x526340
xor ebx, ebx
jmp 0x526343
or ebx, 0xffffffff
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x526360
lea eax, [ebp - 4]
call fcn.004077c0
ret