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

Disassembly:
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
ret 0x8df2
fidiv dword [eax - 0x3831c47b]
rol dword [edx], 0x80
inc ebp
int 0xf2
push 0x9d9858
add byte [eax + ecx + 0x24], dh
wait
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