Skip to content

Instantly share code, notes, and snippets.

@donnaken15
Created January 19, 2021 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donnaken15/4294ce55e1b4ef42b197bcc2352d9e02 to your computer and use it in GitHub Desktop.
Save donnaken15/4294ce55e1b4ef42b197bcc2352d9e02 to your computer and use it in GitHub Desktop.
I HATE COMPUTERS@Q#TVH*&T@$EY(WIOQV%T (NM@#QV%EJTN%CJR(YKN*TEQWTY(N%$R
; STILL NOT FINISHED YET
invoke GetCommandLineA
cmp BYTE PTR eax, '"'
je spacedpath
jne unspacedpath
spacedpath:
inc eax
cmp BYTE PTR EAX, '"'
jne spacedpath
inc eax
jmp cmdlinesCanGoDie
unspacedpath:
inc eax
cmp BYTE PTR EAX, ' '
jne unspacedpath
cmdlinesCanGoDie:
inc eax
cmp BYTE PTR EAX, ' '
je cmdlinesCanGoDie
argStart:
cmp BYTE PTR EAX, '"'
jne @f
;quotedArg:
inc eax
mov dh, 1
@@:
mov ecx, tmpstr
argCopy:
mov dl, BYTE PTR eax
mov BYTE PTR ecx, dl
inc eax
inc ecx
cmp dh, 1
je quotedArg
cmp BYTE PTR EAX, ' '
jne argCopy
je argEnd
quotedArg:
cmp BYTE PTR EAX, '"'
jne argCopy
je argEnd
invoke
argEnd:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment