Function at 0x581e30
Capabilities:
Get storage device properties

Disassembly:
sub esp, 0x52c
mov eax, dword [0x81f390]
xor eax, esp
mov dword [esp + 0x528], eax
mov eax, dword [esp + 0x530]
push ebx
push ebp
xor ebp, ebp
mov byte [esp + 0xb], 0
push ebp
push ebp
push 3
push ebp
push 1
push ebp
push eax
xor bh, bh
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0xc], eax
test eax, eax
je 0x5821dc
cmp eax, 0xffffffff
je 0x5821dc
push esi
push edi
push 0x400
lea eax, [esp + 0x13c]
mov dword [esp + 0x28], ebp
xorps xmm0, xmm0
push ebp
push eax
movq qword [esp + 0x28], xmm0
call fcn.006f87a0
add esp, 0xc
mov dword [esp + 0x18], ebp
lea eax, [esp + 0x18]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
push ebp
push eax
push 0x400
lea eax, [esp + 0x144]
push eax
push 0xc
lea eax, [esp + 0x30]
push eax
push 0x2d1400
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x5821aa
mov ecx, dword [esp + 0x148]
test ecx, ecx
je 0x581f1c
lea eax, [esp + 0x138]
add eax, ecx
cmp byte [eax], bh
je 0x581f1c
push str.CmCard_CF
push eax
call fcn.006f8b20
add esp, 8
test eax, eax
je 0x581f15
mov byte [esp + 0x13], 1
mov ebp, 6
jmp 0x5821a8
mov ecx, dword [esp + 0x148]
mov edx, dword [esp + 0x144]
xor esi, esi
test edx, edx
je 0x5821aa
cmp byte [esp + edx + 0x138], 0
je 0x5821aa
lea edi, [esp + 0x38]
sub edi, edx
cmp edx, dword [esp + 0x18]
jge 0x581f5d
mov al, byte [esp + edx + 0x138]
inc esi
mov byte [edi + edx], al
inc edx
cmp byte [esp + edx + 0x138], 0
jne 0x581f41
cmp esi, 0x100
jae 0x5821f6
mov byte [esp + esi + 0x38], 0
lea eax, [esp + 0x38]
mov edx, str.WIBU__
mov bl, byte [eax]
cmp bl, byte [edx]
jne 0x581f97
test bl, bl
je 0x581f93
mov bl, byte [eax + 1]
cmp bl, byte [edx + 1]
jne 0x581f97
add eax, 2
add edx, 2
test bl, bl
jne 0x581f77
xor eax, eax
jmp 0x581f9c
sbb eax, eax
or eax, 1
test eax, eax
jne 0x5821aa
xor edx, edx
mov byte [esp + 0x13], 1
test ecx, ecx
je 0x582024
cmp byte [esp + ecx + 0x138], dl
je 0x582024
mov edi, dword [esp + 0x18]
lea esi, [esp + 0x38]
sub esi, ecx
cmp ecx, edi
jge 0x581fdc
mov al, byte [esp + ecx + 0x138]
inc edx
mov byte [esi + ecx], al
inc ecx
cmp byte [esp + ecx + 0x138], 0
jne 0x581fc2
cmp edx, 0x100
jae 0x5821f6
mov byte [esp + edx + 0x38], 0
lea eax, [esp + 0x38]
mov ecx, str.CodeMeter_StickM
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x582016
test dl, dl
je 0x582012
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x582016
add eax, 2
add ecx, 2
test dl, dl
jne 0x581ff6
xor eax, eax
jmp 0x58201b
sbb eax, eax
or eax, 1
test eax, eax
jne 0x582087
mov bh, 1
lea ebp, [eax + 2]
mov eax, dword [esp + 0x544]
test eax, eax
je 0x5821aa
push eax
push str._010u
push 0x10
lea eax, [esp + 0x34]
push 0x10
push eax
call fcn.006f8d83
push 6
lea eax, [esp + 0x50]
push str.CMM_0_
push eax
call fcn.00700d70
add esp, 0x20
test eax, eax
jne 0x58210b
push 0xa
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x46]
push eax
call fcn.00700d70
add esp, 0xc
test eax, eax
jne 0x58210b
lea ebp, [eax + 2]
jmp 0x5821a8
push 6
lea eax, [esp + 0x3c]
push str.CMM_0_
push eax
call fcn.00700d70
add esp, 0xc
test eax, eax
jne 0x5820a9
mov bh, 1
lea ebp, [eax + 7]
jmp 0x582024
mov ecx, str.CodeMeter_Stick
lea eax, [esp + 0x38]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x5820d2
test dl, dl
je 0x5820ce
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x5820d2
add eax, 2
add ecx, 2
test dl, dl
jne 0x5820b2
xor eax, eax
jmp 0x5820d7
sbb eax, eax
or eax, 1
test eax, eax
jne 0x5820e5
mov bh, 1
lea ebp, [eax + 1]
jmp 0x582024
push 9
lea eax, [esp + 0x3c]
push str.CmCard_CF
push eax
call fcn.00700d70
add esp, 0xc
test eax, eax
jne 0x582024
mov bh, 1
lea ebp, [eax + 6]
jmp 0x582024
push 6
lea eax, [esp + 0x3c]
push str.CMM_1_
push eax
call fcn.00700d70
add esp, 0xc
test eax, eax
jne 0x582140
push 0xa
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x46]
push eax
call fcn.00700d70
add esp, 0xc
test eax, eax
jne 0x582140
lea ebp, [eax + 3]
jmp 0x5821a8
push 6
lea eax, [esp + 0x3c]
push str.CMM_2_
push eax
call fcn.00700d70
add esp, 0xc
test eax, eax
jne 0x582175
push 0xa
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x46]
push eax
call fcn.00700d70
add esp, 0xc
test eax, eax
jne 0x582175
lea ebp, [eax + 4]
jmp 0x5821a8
push 6
lea eax, [esp + 0x3c]
push str.CMM_3_
push eax
call fcn.00700d70
add esp, 0xc
test eax, eax
jne 0x5821aa
push 0xa
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x46]
push eax
call fcn.00700d70
add esp, 0xc
test eax, eax
jne 0x5821aa
lea ebp, [eax + 5]
mov bh, 1
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [esp + 0x13], 0
je 0x5821bf
test bh, bh
jne 0x5821c1
xor ebp, ebp
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
mov ecx, dword [esp + 0x528]
xor ecx, esp
call fcn.006f7ca4
add esp, 0x52c
ret
mov ecx, dword [esp + 0x530]
or eax, 0xffffffff
pop ebp
pop ebx
xor ecx, esp
call fcn.006f7ca4
add esp, 0x52c
ret
call fcn.006f97f3
int3