Function at 0x40d140
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 0x51b52d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x30
mov eax, dword [0x55e904]
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.004eea33
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 0x40d425
nop
push edi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
test eax, eax
je 0x40d409
cmp eax, 1
je 0x40d409
cmp eax, 2
je 0x40d409
cmp eax, 4
je 0x40d409
cmp eax, 5
je 0x40d409
cmp eax, 6
je 0x40d409
push 4
push 0x54b094
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
call fcn.004039a0
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 0x40d289
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x40d282
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40d278
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d44e
push edx
push ecx
call fcn.004ee8e8
add esp, 8
xor al, al
jmp 0x40d34d
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 0x40d311
cmp byte [ebp - 0x34], 0
jne 0x40d311
cmp byte [ebp - 0x32], 0
jne 0x40d311
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 0x40d282
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40d303
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d44e
push edx
push ecx
call fcn.004ee8e8
add esp, 8
xor al, al
jmp 0x40d34d
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x40d34b
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40d341
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d44e
push edx
push ecx
call fcn.004ee8e8
add esp, 8
mov al, 1
test al, al
jne 0x40d409
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 0x40d375
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x2c]
call fcn.004039a0
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 4], 0
mov eax, dword [ecx + 4]
cmp eax, dword [ecx + 8]
je 0x40d3c2
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 0x40d3cf
lea edx, [ebp - 0x2c]
push edx
push eax
call fcn.0040f5e0
mov edx, dword [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
cmp edx, 8
jb 0x40d409
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40d3ff
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d44e
push edx
push ecx
call fcn.004ee8e8
add esp, 8
push 0
push edi
call fcn.004f024f
add esp, 8
cmp word [eax + 2], 0
lea edi, [eax + 2]
jne 0x40d1c0
mov eax, dword [ebp - 0x3c]
push eax
call fcn.004eea2e
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.004ee450
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.004f8e2c
int3