Function at 0x4ad049ab
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
cmp ax, cx
je 0x4ad13f9c
cmp ax, 0x72
je 0x4ad0528f
cmp ax, word [0x4ad34b7c]
je 0x4ad13ca8
cmp ax, word [0x4ad34b80]
je 0x4ad13cb4
cmp ax, word [0x4ad34b84]
jne 0x4ad13cc0
mov byte [0x4ad2fa64], 1
lea eax, [esi + 4]
test eax, eax
je 0x4ad03fce
push eax
push esi
call edi
pop ecx
pop ecx
xor eax, eax
mov ax, word [0x4ad33b88]
push eax
push esi
call fcn.4ad01323
mov esi, eax
test esi, esi
je 0x4ad053a3
jmp 0x4ad0524b
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.4ad02273
cmp byte [0x4ad3485c], 0
mov dword [ebp - 0x1c], 0x80000002
mov dword [ebp - 0x18], 0x80000001
je 0x4ad049d8
mov byte [0x4ad2fa64], 1
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push esi
lea esi, [ebp - 0x1c]
sub esi, eax
push edi
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], 2
mov edi, 0x1000
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0xc]
push 0x4ad04cf0
push dword [esi + eax]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x4ad04bef
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x101c]
push eax
lea eax, [ebp + 8]
push eax
xor esi, esi
push esi
push 0x4ad04cd0
push dword [ebp - 8]
mov dword [ebp + 8], esi
mov dword [ebp - 4], edi
call ebx
test eax, eax
je 0x4ad13ad0
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x101c]
push eax
lea eax, [ebp + 8]
push eax
push esi
push 0x4ad04cac
push dword [ebp - 8]
mov dword [ebp - 4], edi
call ebx
test eax, eax
jne 0x4ad04a7b
cmp dword [ebp + 8], 4
jne 0x4ad051bc
cmp dword [ebp - 0x101c], esi
setne al
mov byte [0x4ad2fa64], al
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x101c]
push eax
lea eax, [ebp + 8]
push eax
push esi
push 0x4ad04c88
push dword [ebp - 8]
mov dword [ebp - 4], edi
call ebx
test eax, eax
je 0x4ad13b24
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x101c]
push eax
lea eax, [ebp + 8]
push eax
push esi
push 0x4ad04c6c
push dword [ebp - 8]
mov dword [ebp - 4], edi
call ebx
test eax, eax
jne 0x4ad04ad8
cmp dword [ebp + 8], 4
jne 0x4ad051cb
mov ax, word [ebp - 0x101c]
mov word [0x4ad2fa88], ax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x101c]
push eax
lea eax, [ebp + 8]
push eax
push esi
push 0x4ad04c4c
push dword [ebp - 8]
mov dword [ebp - 4], edi
call ebx
test eax, eax
jne 0x4ad04b2a
cmp dword [ebp + 8], 4
jne 0x4ad13b75
mov ax, word [ebp - 0x101c]
mov word [0x4ad2fa58], ax
cmp ax, si
je 0x4ad04b21
cmp ax, 0xd
je 0x4ad04b21
cmp ax, 0x20
jbe 0x4ad04b2a
mov word [0x4ad2fa58], 0x20
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x101c]
push eax
lea eax, [ebp + 8]
push eax
push esi
push 0x4ad04c24
push dword [ebp - 8]
mov dword [ebp - 4], edi
call ebx
test eax, eax
jne 0x4ad051b1
cmp dword [ebp + 8], 4
jne 0x4ad13b9d
mov ax, word [ebp - 0x101c]
mov word [0x4ad2fa5c], ax
cmp ax, si
je 0x4ad04b77
cmp ax, 0xd
je 0x4ad04b77
cmp ax, 0x20
jbe 0x4ad04b81
mov ax, 0x20
mov word [0x4ad2fa5c], ax
mov cx, word [0x4ad2fa58]
push 0x20
pop edx
cmp cx, dx
jne 0x4ad051da
cmp ax, dx
jb 0x4ad13bc5
jne 0x4ad04bab
cmp cx, dx
jae 0x4ad04bab
mov word [0x4ad2fa5c], cx
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x101c]
push eax
lea eax, [ebp + 8]
push eax
push esi
push 0x4ad04c14
push dword [ebp - 8]
mov dword [ebp - 4], edi
call ebx
test eax, eax
jne 0x4ad04be3
cmp dword [ebp + 8], 2
je 0x4ad13bd0
cmp word [ebp - 0x101c], si
jne 0x4ad13c17
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 0x14]
add dword [ebp - 0xc], 4
dec dword [ebp - 0x10]
jne 0x4ad049fb
push 0
call dword [sym.imp.msvcrt.dll_time]
push eax
call dword [sym.imp.msvcrt.dll_srand]
pop ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret 4
rol byte [ecx - 0x56a18830], 1
enter 0xffffffffffffa50f, 0xffffffffffffffd3
sal edi, cl
rol ebx, cl
jg 0x4ad05231
add ch, ah
aam 0xd2
imul ecx, ebp, 0x74
add byte [eax], al
cmp ax, dx
jmp 0x4ad04b9d
inc dword [eax]
push eax
push edx
call fcn.4ad01323
mov esi, eax
test esi, esi
je 0x4ad053a4
mov edi, dword [sym.imp.msvcrt.dll_wcscpy]
push ebx
xor eax, eax
lea ebx, [esi + 2]
mov ax, word [ebx]
push eax
call dword [sym.imp.msvcrt.dll_towlower]
test ax, ax
pop ecx
je 0x4ad053a3
cmp ax, 0x3f
je 0x4ad13ef8
cmp ax, word [0x4ad34b78]
je 0x4ad13c99
cmp ax, word [0x4ad34b74]
mov cx, word [str.kcquax]
jne 0x4ad03f80
cmp ax, cx
je 0x4ad13f9c
mov dword [0x4ad2fabc], 1
lea ebx, [esi + 4]
test ebx, ebx
je 0x4ad0b7a9
push ebx
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
lea eax, [eax + eax + 4]
push eax
call fcn.4ad01725
test eax, eax
mov dword [ebp - 0x4014], eax
je 0x4ad13fab
test ebx, ebx
je 0x4ad052dc
push ebx
push dword [ebp - 0x4014]
call edi
pop ecx
pop ecx
push dword [ebp - 0x4014]
and word [esi], 0
call fcn.4ad0293a
cmp byte [ebp - 0x400d], 0
mov esi, eax
jne 0x4ad05354
cmp word [esi], 0x22
jne 0x4ad05384
mov ebx, 0x4000
push ebx
call fcn.4ad01725
push ebx
mov dword [ebp - 0x401c], eax
call fcn.4ad01725
cmp dword [ebp - 0x401c], 0
mov dword [ebp - 0x4020], eax
je 0x4ad0b7be
test eax, eax
je 0x4ad0b7be
push 0x22
lea eax, [esi + 2]
push eax
call fcn.4ad01323
test eax, eax
je 0x4ad05354
lea ebx, [eax + 2]
push 0x22
push ebx
call fcn.4ad01323
test eax, eax
je 0x4ad060cd
cmp word [esi], 0x22
jne 0x4ad05384
inc esi
push 0x22
inc esi
push esi
call fcn.4ad01a67
test eax, eax
je 0x4ad05384
and word [eax], 0
inc eax
inc eax
test esi, esi
je 0x4ad0b7c9
test eax, eax
je 0x4ad05384
push eax
push esi
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
test esi, esi
je 0x4ad0b7c9
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov word [esi + eax*2], 0xa
mov eax, dword [ebp - 0x4024]
mov dword [eax + 8], esi
pop ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
call fcn.4ad01305
leave
ret 8
mov edi, str.PATHEXT
push edi
call fcn.4ad01b84
test eax, eax
je 0x4ad13ff2
mov edi, str.PROMPT
push edi
call fcn.4ad01b84
test eax, eax
je 0x4ad0a78e
mov edi, 0x4ad348b8
push edi
call fcn.4ad01b84
test eax, eax
je 0x4ad14003
push str.KEYS
call fcn.4ad01b84
test eax, eax
jne 0x4ad14063
push 0x4ad34400
call fcn.4ad04531
call fcn.4ad04549
test eax, eax
mov dword [0x4ad2fa7c], eax
je 0x4ad0549a
mov esi, eax
mov eax, 0x4ad348d0
mov edi, eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [0x4ad2fa7c], eax
pop edi
pop esi
pop ebx
leave
ret
mov ax, word [ebx]
and word [ebx], 0
push 0x26
push esi
mov word [ebp - 0x4014], ax
call fcn.4ad01323
test eax, eax
jne 0x4ad06176
push 0x3c
push esi
call fcn.4ad01323
test eax, eax
jne 0x4ad06176
push 0x3e
push esi
call fcn.4ad01323
test eax, eax
jne 0x4ad06176
push 0x28
push esi
call fcn.4ad01323
test eax, eax
jne 0x4ad06176
push 0x29
push esi
call fcn.4ad01323
test eax, eax
jne 0x4ad06176
push 0x40
push esi
call fcn.4ad01323
test eax, eax
jne 0x4ad06176
push 0x5e
push esi
call fcn.4ad01323
test eax, eax
jne 0x4ad06176
push 0x7c
push esi
call fcn.4ad01323
test eax, eax
jne 0x4ad06176
cmp word [esi], ax
mov dword [ebp - 0x4018], esi
je 0x4ad06176
mov eax, dword [ebp - 0x4018]
movzx eax, word [eax]
push eax
call dword [sym.imp.msvcrt.dll_iswspace]
test eax, eax
pop ecx
jne 0x4ad0b719
add dword [ebp - 0x4018], 2
mov eax, dword [ebp - 0x4018]
cmp word [eax], 0
jne 0x4ad0614a
mov ax, word [ebp - 0x4014]
mov word [ebx], ax
jmp 0x4ad05354
push esi
push 0x4ad0a7a0
push edi
call fcn.4ad01594
jmp 0x4ad0544c
mov eax, dword [ebp - 0x401c]
and dword [ebp - 0x406c], 0
and dword [ebp - 0x4038], 0
mov dword [ebp - 0x4034], eax
mov eax, dword [ebp - 0x4020]
push esi
mov dword [ebp - 0x4030], eax
call dword [sym.imp.msvcrt.dll_wcslen]
cmp eax, 0x2000
pop ecx
jae 0x4ad13fb0
push esi
push dword [ebp - 0x401c]
call edi
push 0x4ad05d98
push dword [ebp - 0x4020]
call edi
mov ax, word [ebp - 0x4014]
mov word [ebx], ax
add esp, 0x10
lea eax, [ebp - 0x400c]
push eax
lea eax, [ebp - 0x406c]
push eax
call fcn.4ad03357
push dword [ebp - 0x401c]
mov edi, eax
call fcn.4ad05fcd
push dword [ebp - 0x4020]
call fcn.4ad05fcd
test edi, edi
jne 0x4ad0b7b0
jmp 0x4ad05354
xor eax, eax
jmp 0x4ad052b5
cmp edi, 3
jne 0x4ad05384
jmp 0x4ad05354
push dword [0x4ad2ba04]
jmp 0x4ad13fc0
xor eax, eax
jmp 0x4ad05394
cmp dword [ebp + 8], 4
jne 0x4ad13ae1
cmp dword [ebp - 0x101c], esi
setne al
jmp 0x4ad13b00
cmp dword [ebp + 8], 1
jne 0x4ad04a42
lea eax, [ebp - 0x101c]
push eax
call dword [sym.imp.msvcrt.dll__wtol]
dec eax
neg eax
sbb al, al
pop ecx
inc al
mov byte [0x4ad3d9fc], al
jmp 0x4ad04a42
cmp dword [ebp + 8], 4
jne 0x4ad13b35
cmp dword [ebp - 0x101c], esi
setne al
jmp 0x4ad13b54
cmp dword [ebp + 8], 1
jne 0x4ad04aa0
lea eax, [ebp - 0x101c]
push eax
call dword [sym.imp.msvcrt.dll__wtol]
dec eax
neg eax
sbb al, al
pop ecx
inc al
mov byte [0x4ad33b7c], al
jmp 0x4ad04aa0
cmp dword [ebp + 8], 1
jne 0x4ad13b92
push esi
lea eax, [ebp - 0x101c]
push esi
push eax
call dword [sym.imp.msvcrt.dll_wcstol]
add esp, 0xc
jmp 0x4ad04b0a
mov ax, word [0x4ad2fa58]
jmp 0x4ad04b10
cmp dword [ebp + 8], 1
jne 0x4ad13bba
push esi
lea eax, [ebp - 0x101c]
push esi
push eax
call dword [sym.imp.msvcrt.dll_wcstol]
add esp, 0xc
jmp 0x4ad04b60
mov ax, word [0x4ad2fa5c]
jmp 0x4ad04b66
mov word [0x4ad2fa58], ax
jmp 0x4ad04bab
mov eax, dword [ebp - 4]
mov ecx, edi
sub ecx, dword [ebp - 4]
shr eax, 1
shr ecx, 1
lea esi, [ebp + eax*2 - 0x1018]
push ecx
push esi
lea eax, [ebp - 0x101c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x4ad13c08
lea eax, [ebp - 0x101c]
push esi
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
jmp 0x4ad13c10
and word [ebp - 0x101c], 0
xor esi, esi
jmp 0x4ad04bd6
mov esi, dword [sym.imp.msvcrt.dll_wcslen]
lea eax, [ebp - 0x101c]
push eax
call esi
pop ecx
lea eax, [eax + eax + 2]
push eax
call fcn.4ad01725
test eax, eax
je 0x4ad13c55
lea eax, [ebp - 0x101c]
push eax
push eax
call esi
pop ecx
lea eax, [eax + eax + 2]
push eax
call fcn.4ad01725
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
jmp 0x4ad13c57
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword [ecx], eax
jmp 0x4ad04be3
mov dword [0x4ad3cbb8], 1
jmp 0x4ad03fc1
mov byte [0x4ad3484c], 1
jmp 0x4ad03fc1
mov byte [0x4ad3484c], 0
jmp 0x4ad03fc1
cmp ax, word [0x4ad3d94c]
jne 0x4ad13cd5
mov byte [0x4ad2fa64], 0
jmp 0x4ad03fc1
cmp ax, 0x65
jne 0x4ad13d19
lea eax, [esi + 4]
test eax, eax
je 0x4ad13ce8
push eax
push esi
call edi
pop ecx
pop ecx
cmp word [esi], 0x3a
jne 0x4ad13d0d
push 3
push 0x4ad192bc
push ebx
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x4ad13d0d
mov byte [0x4ad2fa64], al
jmp 0x4ad13dc7
mov byte [0x4ad2fa64], 1
jmp 0x4ad13dd6
cmp ax, 0x64
jne 0x4ad13d3e
lea eax, [esi + 4]
test eax, eax
je 0x4ad13d2c
push eax
push esi
call edi
pop ecx
pop ecx
mov eax, dword [ebp - 0x4024]
and dword [eax], 0
and dword [eax + 4], 0
jmp 0x4ad03fce
cmp ax, 0x66
jne 0x4ad13d94
lea eax, [esi + 4]
test eax, eax
je 0x4ad13d51
push eax
push esi
call edi
pop ecx
pop ecx
cmp word [esi], 0x3a
jne 0x4ad13d80
push 3
push 0x4ad192bc
push ebx
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x4ad13d80
mov word [0x4ad2fa58], 0x20
mov word [0x4ad2fa5c], 0x20
jmp 0x4ad13dc7
mov word [0x4ad2fa58], 6
mov word [0x4ad2fa5c], 4
jmp 0x4ad13dd6
cmp ax, 0x76
jne 0x4ad13df7
lea eax, [esi + 4]
test eax, eax
je 0x4ad13da7
push eax
push esi
call edi
pop ecx
pop ecx
cmp word [esi], 0x3a
jne 0x4ad13dcf
push 3
push 0x4ad192bc
push ebx
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x4ad13dcf
mov byte [0x4ad33b7c], al
lea eax, [esi + 8]
jmp 0x4ad03fc4
mov byte [0x4ad33b7c], 1
push 3
push 0x4ad13fc8
push esi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x4ad03fce
lea eax, [esi + 6]
jmp 0x4ad03fc4
cmp byte [0x4ad2fa64], 0
je 0x4ad13ee2
cmp ax, 0x74
jne 0x4ad13ee2
cmp word [esi + 4], 0x3a
jne 0x4ad03fc1
mov ebx, dword [sym.imp.msvcrt.dll_iswxdigit]
xor eax, eax
mov ax, word [esi + 6]
push eax
call ebx
test eax, eax
pop ecx
je 0x4ad03fc1
xor eax, eax
mov ax, word [esi + 8]
push eax
call ebx
test eax, eax
pop ecx
je 0x4ad03fc1
xor eax, eax
mov ax, word [esi + 0xa]
push eax
call ebx
test eax, eax
pop ecx
jne 0x4ad03fc1
mov ax, word [esi + 6]
mov ebx, dword [sym.imp.msvcrt.dll_iswdigit]
push eax
call ebx
test eax, eax
pop ecx
je 0x4ad13e71
mov ax, word [esi + 6]
sub ax, 0x30
jmp 0x4ad13e82
xor eax, eax
mov ax, word [esi + 6]
push eax
call dword [sym.imp.msvcrt.dll_towlower]
pop ecx
sub eax, 0x57
shl ax, 4
mov word [0x4ad2fa88], ax
xor eax, eax
mov ax, word [esi + 8]
push eax
call ebx
test eax, eax
pop ecx
je 0x4ad13ea3
movzx eax, word [esi + 8]
sub eax, 0x30
jmp 0x4ad13eb7
xor eax, eax
mov ax, word [esi + 8]
push eax
call dword [sym.imp.msvcrt.dll_towlower]
movzx eax, ax
pop ecx
sub eax, 0x57
or word [0x4ad2fa88], ax
lea eax, [esi + 4]
test eax, eax
je 0x4ad03fc1
lea eax, [esi + 0xa]
test eax, eax
je 0x4ad03fc1
push eax
lea eax, [esi + 4]
push eax
call edi
pop ecx
pop ecx
jmp 0x4ad03fc1
cmp ax, 0x73
jne 0x4ad03fc1
mov byte [ebp - 0x400d], 1
jmp 0x4ad03fc1
call fcn.4ad1dfee
xor esi, esi
cmp dword [0x4ad2b9e8], esi
jne 0x4ad13f93
push esi
push 0x2399
call fcn.4ad069f4
cmp dword [0x4ad2b9e8], esi
pop ecx
pop ecx
jne 0x4ad13f93
push esi
push 0x239a
call fcn.4ad069f4
cmp byte [ebp - 0x400e], 0
pop ecx
pop ecx
jne 0x4ad13f3f
cmp byte [0x4ad2fa64], 0
je 0x4ad13f93
cmp dword [0x4ad2b9e8], esi
jne 0x4ad13f93
push esi
push 0x239b
call fcn.4ad069f4
cmp dword [0x4ad2b9e8], esi
pop ecx
pop ecx
jne 0x4ad13f93
push esi
push 0x239c
call fcn.4ad069f4
cmp dword [0x4ad2b9e8], esi
pop ecx
pop ecx
jne 0x4ad13f93
push esi
push 0x239d
call fcn.4ad069f4
cmp dword [0x4ad2b9e8], esi
pop ecx
pop ecx
jne 0x4ad13f93
push esi
push 0x239e
call fcn.4ad069f4
pop ecx
pop ecx
call fcn.4ad1e04d
push 1
jmp 0x4ad13fc0
mov dword [0x4ad33b68], 1
jmp 0x4ad052a2
push eax
push 8
jmp 0x4ad13fb7
push 0
push 0x233f
call fcn.4ad0606f
pop ecx
pop ecx
jmp 0x4ad13f98
call fcn.4ad040f7
nop
nop
nop
cmp al, byte [eax]
dec edi
add byte [esi], cl
add byte [eax], al
push eax
push 8
call fcn.4ad0606f
pop ecx
pop ecx
push 1
call fcn.4ad040f7
push esi
push 0x4ad02a6c
push edi
call fcn.4ad01594
jmp 0x4ad05426
push esi
push str..COM_.EXE_.BAT_.CMD_.VBS_.JS_.WS
push edi
call fcn.4ad01594
jmp 0x4ad05439
push 0x2e
push ebx
call fcn.4ad01323
test eax, eax
jne 0x4ad14056
push dword [0x4ad3d97c]
call dword [sym.imp.msvcrt.dll__wcsupr]
push ebx
call dword [sym.imp.msvcrt.dll_wcslen]
mov dword [ebp - 4], eax
xor eax, eax
mov ax, word [0x4ad33b8c]
pop ecx
pop ecx
push eax
push ebx
call fcn.4ad01a67
mov ecx, dword [ebp - 4]
lea ecx, [ebx + ecx*2 - 2]
cmp ecx, eax
je 0x4ad14048
push str.CMD.EXE
jmp 0x4ad1404d
push 0x4ad3d982
push ebx
call dword [sym.imp.msvcrt.dll_wcscat]
pop ecx
pop ecx
push esi
push ebx
push edi
call fcn.4ad01594
jmp 0x4ad0545f
push 0x4ad192c4
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
jne 0x4ad05471
mov dword [0x4ad3cbd0], 1
jmp 0x4ad05471