Function at 0x422040
Capabilities:
Get storage device properties

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffff004
push eax
add esp, 0xffffff34
mov esi, edx
lea edi, [esp]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, ecx
mov esi, eax
xor ebx, ebx
lea eax, [esp + 0xc]
xor ecx, ecx
mov edx, 0x1030
call fcn.00402b54
mov dword [esp + 0x14], 3
mov dword [esp + 0x24], 0x28
mov dword [esp + 0x28], 0x1000
mov dword [esp + 0xc], 0x32
xor eax, eax
mov dword [esp + 0x10], eax
cmp byte [esp + 6], 0xec
jne 0x422107
mov dword [esp + 0x18], 1
mov al, byte [esp + 1]
xor edx, edx
mov dl, al
mov dword [esp + 0x1c], edx
test al, al
je 0x4220ba
mov dword [esp + 0xc], 0x31
xor eax, eax
mov al, byte [esp + 2]
mov dword [esp + 0x20], eax
push 0
lea eax, [esp + 0xc]
push eax
push 0x1030
lea eax, [esp + 0x18]
push eax
push 0x1030
lea eax, [esp + 0x20]
push eax
push 0x2d1400
mov eax, dword [esi + 0x28]
push eax
call sub.kernel32.dll_DeviceIoControl
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
je 0x422107
mov edx, edi
lea eax, [esp + 0x3c]
mov ecx, 0x1000
call fcn.004029dc
cmp byte [esp + 6], 0xb0
jne 0x4221a3
mov al, byte [esp]
cmp al, 0xd0
je 0x422121
cmp al, 0xd5
jne 0x4221a3
mov dword [esp + 0x18], 2
cmp byte [esp], 0xd0
jne 0x422139
mov dword [esp + 0x1c], 2
jmp 0x422143
xor eax, eax
mov al, byte [esp + 2]
mov dword [esp + 0x1c], eax
push 0
lea eax, [esp + 0xc]
push eax
push 0x1030
lea eax, [esp + 0x18]
push eax
push 0x1030
lea eax, [esp + 0x20]
push eax
push 0x2d1400
mov eax, dword [esi + 0x28]
push eax
call sub.kernel32.dll_DeviceIoControl
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
je 0x4221a3
cmp byte [esp], 0xd0
jne 0x42218c
mov edx, edi
lea eax, [esp + 0x3c]
mov ecx, 0x200
call fcn.004029dc
cmp byte [esp + 2], 6
jne 0x4221a3
mov edx, edi
lea eax, [esp + 0x3c]
mov ecx, 0x234
call fcn.004029dc
cmp byte [esp + 6], 0xef
jne 0x422210
mov dword [esp + 0x18], 3
xor eax, eax
mov al, byte [esp]
mov dword [esp + 0x1c], eax
push 0
lea eax, [esp + 0xc]
push eax
push 0x1030
lea eax, [esp + 0x18]
push eax
push 0x1030
lea eax, [esp + 0x20]
push eax
push 0x2d1400
mov eax, dword [esi + 0x28]
push eax
call sub.kernel32.dll_DeviceIoControl
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
je 0x422210
mov edx, edi
lea eax, [esp + 0x2c]
mov ecx, 4
call fcn.004029dc
cmp byte [esp], 0xd
jne 0x422210
lea eax, [esp + 0x3c]
mov eax, dword [eax]
mov dword [esi + 0x2724], eax
cmp byte [esp + 6], 0xb0
jne 0x42230b
cmp byte [esp], 0xd4
jne 0x42230b
lea eax, [esp + 0x103c]
xor ecx, ecx
mov edx, 0x90
call fcn.00402b54
mov dword [esp + 0x103c], 1
mov dword [esp + 0x1040], 0x54
mov dword [esp + 0x1044], 3
mov dword [esp + 0x1048], 0x80000000
mov dword [esp + 0x1054], 0x40
mov dword [esp + 0x1064], 0x3c
mov dword [esp + 0x1074], 1
mov dword [esp + 0x108c], 0x14
mov dword [esp + 0x1090], 0xffffffff
xor eax, eax
mov al, byte [esp + 2]
mov dword [esp + 0x10b4], eax
push 0
lea eax, [esp + 0xc]
push eax
push 0x90
lea eax, [esp + 0x1048]
push eax
push 0x90
lea eax, [esp + 0x1050]
push eax
push 0x2dd3c0
mov eax, dword [esi + 0x28]
push eax
call sub.kernel32.dll_DeviceIoControl
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
je 0x4222f4
cmp dword [esp + 0x104c], 8
jne 0x4222f4
mov byte [0x447c04], 1
jmp 0x4222fb
mov byte [0x447c04], 0
test bl, bl
je 0x42230b
cmp dword [esp + 0x104c], 1
je 0x42230b
xor ebx, ebx
mov eax, ebx
add esp, 0x10cc
pop edi
pop esi
pop ebx
ret