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

Disassembly:
cmp ax, dx
jmp 0x4ad074a2
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.4ad03c97
cmp byte [0x4ad38880], 0
mov dword [ebp - 0x1c], 0x80000002
mov dword [ebp - 0x18], 0x80000001
je 0x4ad072dd
mov byte [0x4ad2fa24], 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 0x4ad075f8
push dword [esi + eax]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x4ad074f4
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x101c]
push eax
lea eax, [ebp + 8]
push eax
xor esi, esi
push esi
push 0x4ad075d8
push dword [ebp - 8]
mov dword [ebp + 8], esi
mov dword [ebp - 4], edi
call ebx
test eax, eax
je 0x4ad13fa6
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x101c]
push eax
lea eax, [ebp + 8]
push eax
push esi
push 0x4ad075b4
push dword [ebp - 8]
mov dword [ebp - 4], edi
call ebx
test eax, eax
jne 0x4ad07380
cmp dword [ebp + 8], 4
jne 0x4ad0764d
cmp dword [ebp - 0x101c], esi
setne al
mov byte [0x4ad2fa24], al
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x101c]
push eax
lea eax, [ebp + 8]
push eax
push esi
push 0x4ad07590
push dword [ebp - 8]
mov dword [ebp - 4], edi
call ebx
test eax, eax
je 0x4ad13ffa
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x101c]
push eax
lea eax, [ebp + 8]
push eax
push esi
push 0x4ad07574
push dword [ebp - 8]
mov dword [ebp - 4], edi
call ebx
test eax, eax
jne 0x4ad073dd
cmp dword [ebp + 8], 4
jne 0x4ad0765c
mov ax, word [ebp - 0x101c]
mov word [0x4ad2fa44], ax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x101c]
push eax
lea eax, [ebp + 8]
push eax
push esi
push 0x4ad07554
push dword [ebp - 8]
mov dword [ebp - 4], edi
call ebx
test eax, eax
jne 0x4ad0742f
cmp dword [ebp + 8], 4
jne 0x4ad1404b
mov ax, word [ebp - 0x101c]
mov word [0x4ad2fa18], ax
cmp ax, si
je 0x4ad07426
cmp ax, 0xd
je 0x4ad07426
cmp ax, 0x20
jbe 0x4ad0742f
mov word [0x4ad2fa18], 0x20
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x101c]
push eax
lea eax, [ebp + 8]
push eax
push esi
push 0x4ad0752c
push dword [ebp - 8]
mov dword [ebp - 4], edi
call ebx
test eax, eax
jne 0x4ad07642
cmp dword [ebp + 8], 4
jne 0x4ad14073
mov ax, word [ebp - 0x101c]
mov word [0x4ad2fa1c], ax
cmp ax, si
je 0x4ad0747c
cmp ax, 0xd
je 0x4ad0747c
cmp ax, 0x20
jbe 0x4ad07486
mov ax, 0x20
mov word [0x4ad2fa1c], ax
mov cx, word [0x4ad2fa18]
push 0x20
pop edx
cmp cx, dx
jne 0x4ad072a3
cmp ax, dx
jb 0x4ad1409b
jne 0x4ad074b0
cmp cx, dx
jae 0x4ad074b0
mov word [0x4ad2fa1c], cx
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x101c]
push eax
lea eax, [ebp + 8]
push eax
push esi
push 0x4ad0751c
push dword [ebp - 8]
mov dword [ebp - 4], edi
call ebx
test eax, eax
jne 0x4ad074e8
cmp dword [ebp + 8], 2
je 0x4ad140a6
cmp word [ebp - 0x101c], si
jne 0x4ad140ed
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 0x4ad07300
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
mov ax, word [0x4ad2fa1c]
jmp 0x4ad07486
cmp dword [ebp + 8], 1
je 0x4ad13fe0
jmp 0x4ad07380
cmp dword [ebp + 8], 1
je 0x4ad14034
jmp 0x4ad073dd
cmp dword [ebp + 8], 4
jne 0x4ad13fb7
cmp dword [ebp - 0x101c], esi
setne al
jmp 0x4ad13fd6
cmp dword [ebp + 8], 1
jne 0x4ad07347
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 [0x4ad3d2ec], al
jmp 0x4ad07347
lea eax, [ebp - 0x101c]
push eax
call dword [sym.imp.msvcrt.dll__wtol]
dec eax
neg eax
sbb al, al
pop ecx
inc al
jmp 0x4ad0737b
cmp dword [ebp + 8], 4
jne 0x4ad1400b
cmp dword [ebp - 0x101c], esi
setne al
jmp 0x4ad1402a
cmp dword [ebp + 8], 1
jne 0x4ad073a5
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 [0x4ad33b3c], al
jmp 0x4ad073a5
push esi
lea eax, [ebp - 0x101c]
push esi
push eax
call dword [sym.imp.msvcrt.dll_wcstol]
add esp, 0xc
jmp 0x4ad073d7
cmp dword [ebp + 8], 1
jne 0x4ad14068
push esi
lea eax, [ebp - 0x101c]
push esi
push eax
call dword [sym.imp.msvcrt.dll_wcstol]
add esp, 0xc
jmp 0x4ad0740f
mov ax, word [0x4ad2fa18]
jmp 0x4ad07415
cmp dword [ebp + 8], 1
jne 0x4ad14090
push esi
lea eax, [ebp - 0x101c]
push esi
push eax
call dword [sym.imp.msvcrt.dll_wcstol]
add esp, 0xc
jmp 0x4ad07465
mov ax, word [0x4ad2fa1c]
jmp 0x4ad0746b
mov word [0x4ad2fa18], ax
jmp 0x4ad074b0
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 0x4ad140de
lea eax, [ebp - 0x101c]
push esi
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
jmp 0x4ad140e6
and word [ebp - 0x101c], 0
xor esi, esi
jmp 0x4ad074db
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.4ad0206b
test eax, eax
je 0x4ad1412b
lea eax, [ebp - 0x101c]
push eax
push eax
call esi
pop ecx
lea eax, [eax + eax + 2]
push eax
call fcn.4ad0206b
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
jmp 0x4ad1412d
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword [ecx], eax
jmp 0x4ad074e8