Function at 0x40cd30
Capabilities:
Get disk information

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51af7d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x30
mov eax, dword [0x55f904]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x40], ecx
mov edi, dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
push 0
push 0
call edi
xor ecx, ecx
mov esi, eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004ee515
add esp, 4
mov dword [ebp - 0x3c], eax
push eax
push esi
call edi
mov eax, dword [ebp - 0x3c]
mov edi, eax
cmp word [eax], 0
je 0x40d015
nop
push edi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
test eax, eax
je 0x40cff9
cmp eax, 1
je 0x40cff9
cmp eax, 2
je 0x40cff9
cmp eax, 4
je 0x40cff9
cmp eax, 5
je 0x40cff9
cmp eax, 6
je 0x40cff9
push 4
push 0x54b3e4
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
call fcn.00403460
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
push 0
cmovae eax, dword [ebp - 0x2c]
push 0
push 3
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40ce79
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x40ce72
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ce68
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d03e
push edx
push ecx
call fcn.004ee3ca
add esp, 8
xor al, al
jmp 0x40cf3d
push 0
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0
push eax
push 8
lea eax, [ebp - 0x38]
xorps xmm0, xmm0
push eax
push 0
push 0
push 0x2d0c14
push esi
movlpd qword [ebp - 0x38], xmm0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40cf01
cmp byte [ebp - 0x34], 0
jne 0x40cf01
cmp byte [ebp - 0x32], 0
jne 0x40cf01
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x40ce72
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40cef3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d03e
push edx
push ecx
call fcn.004ee3ca
add esp, 8
xor al, al
jmp 0x40cf3d
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x40cf3b
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40cf31
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d03e
push edx
push ecx
call fcn.004ee3ca
add esp, 8
mov al, 1
test al, al
jne 0x40cff9
mov ecx, edi
mov dword [ebp - 0x2c], 0
xor eax, eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40cf65
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x2c]
call fcn.00403460
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 4], 0
mov eax, dword [ecx + 4]
cmp eax, dword [ecx + 8]
je 0x40cfb2
movups xmm0, xmmword [ebp - 0x2c]
mov edx, 7
movups xmmword [eax], xmm0
movq xmm0, qword [ebp - 0x1c]
movq qword [eax + 0x10], xmm0
xor eax, eax
add dword [ecx + 4], 0x18
mov word [ebp - 0x2c], ax
jmp 0x40cfbf
lea edx, [ebp - 0x2c]
push edx
push eax
call fcn.0040f1d0
mov edx, dword [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
cmp edx, 8
jb 0x40cff9
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40cfef
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d03e
push edx
push ecx
call fcn.004ee3ca
add esp, 8
push 0
push edi
call fcn.004efd2f
add esp, 8
cmp word [eax + 2], 0
lea edi, [eax + 2]
jne 0x40cdb0
mov eax, dword [ebp - 0x3c]
push eax
call fcn.004ee510
add esp, 4
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004edf30
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.004f890c
int3