2022-10-16 23:00:24 +02:00
; AMDtemp - s / sd0 / 4 / data / temp / log . grf - d " /sd0/4/data/<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> com <20> <> <EFBFBD> <EFBFBD> /sensors.sys "
parse_cmd :
2022-08-14 00:02:44 +02:00
mov edi , PATH
mov ecx , 512
. still :
mov al , ' '
repz scasb
test ecx , ecx
jz . end_parser
dec edi
2022-10-16 23:00:24 +02:00
or word [ edi ], 0x2020 ; <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2022-08-14 00:02:44 +02:00
2022-10-16 23:00:24 +02:00
cmp word [ edi ], '-s'
2022-08-14 00:02:44 +02:00
jnz @ f
2022-10-16 23:00:24 +02:00
add edi , 2
sub ecx , 2
call . get_str
mov [ save_ptr ], eax
jmp . still
2022-08-14 00:02:44 +02:00
@@:
2022-10-16 23:00:24 +02:00
cmp word [ edi ], '-d'
2022-08-14 00:02:44 +02:00
jnz @ f
2022-10-16 23:00:24 +02:00
2022-08-14 00:02:44 +02:00
add edi , 2
2022-10-16 23:00:24 +02:00
sub ecx , 2
call . get_str
mov [ drv_ptr ], eax
jmp . still
@@:
cmp byte [ edi ], 0
jnz @ f
. end_parser :
ret
2022-08-14 00:02:44 +02:00
@@:
2022-10-16 23:00:24 +02:00
inc edi
2022-08-14 00:02:44 +02:00
jmp . still
2022-10-16 23:00:24 +02:00
. get_str :
push edi
inc dword [ esp ]
2022-08-14 00:02:44 +02:00
mov al , '"'
2022-10-16 23:00:24 +02:00
cmp byte [ edi ], al
jz @ f
dec dword [ esp ]
mov al , ' '
dec edi
@@:
inc edi
repne scasb
and byte [ edi - 1 ], 0
pop eax
ret