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

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, ecx
mov ecx, dword [esp + 0x20]
xor bl, bl
call fcn.300735b0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0xc]
push eax
push ecx
push edx
lea ecx, [esp + 0x18]
call fcn.30027c70
mov eax, dword [esp + 0xc]
xor ebp, ebp
cmp eax, ebp
je 0x30028b9d
mov eax, dword [esi + 0xc]
cmp eax, ebp
push edi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ebp
je 0x30028ab8
cmp dword [eax + 0x1c], ebp
je 0x30028ab8
mov edi, dword [esp + 0x20]
cmp edi, ebp
je 0x300289e4
mov ecx, edi
call fcn.30073410
jmp 0x300289e6
xor eax, eax
mov ecx, dword [esi + 0xc]
lea edx, [esp + 0x1c]
push edx
push ebp
lea edx, [esp + 0x20]
push edx
push ebp
push eax
mov eax, dword [esp + 0x24]
push eax
call dword [ecx + 0x1c]
test eax, eax
jne 0x30028b8d
mov ecx, dword [esp + 0x1c]
shr ecx, 1
lea edx, [ecx + ecx + 2]
push edx
call fcn.3007a1f0
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x30028b8d
test edi, edi
je 0x30028a30
mov ecx, edi
call fcn.30073410
jmp 0x30028a32
xor eax, eax
mov ecx, dword [esi + 0xc]
lea edx, [esp + 0x1c]
push edx
push ebp
push 0
push 0
push eax
mov eax, dword [esp + 0x24]
push eax
call dword [ecx + 0x1c]
test eax, eax
jne 0x30028b84
mov eax, dword [esp + 0x18]
cmp eax, 1
jne 0x30028a6a
mov ecx, dword [esp + 0x24]
push ebp
call fcn.30073390
mov bl, 1
jmp 0x30028b84
cmp eax, 2
jne 0x30028b84
mov esi, dword [esp + 0x1c]
shr esi, 1
add esi, 0x100
lea ecx, [esi + esi]
push ecx
call fcn.3007a1f0
mov edi, eax
add esp, 4
test edi, edi
je 0x30028b84
push esi
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jbe 0x30028ab2
cmp eax, esi
ja 0x30028ab2
mov ecx, dword [esp + 0x24]
push edi
call fcn.30073390
mov bl, 1
push edi
jmp 0x30028b7c
mov esi, dword [esp + 0x20]
cmp esi, ebp
je 0x30028ac9
mov ecx, esi
call fcn.30073710
jmp 0x30028acb
xor eax, eax
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x14]
push ebp
lea ecx, [esp + 0x20]
push ecx
push ebp
push eax
push edx
call edi
test eax, eax
jne 0x30028b8d
mov eax, dword [esp + 0x1c]
push eax
call fcn.3007a1f0
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x30028b8d
test esi, esi
je 0x30028b11
mov ecx, esi
call fcn.30073710
jmp 0x30028b13
xor eax, eax
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push ecx
push ebp
push 0
push 0
push eax
push edx
call edi
test eax, eax
jne 0x30028b84
mov eax, dword [esp + 0x18]
cmp eax, 1
jne 0x30028b40
mov ecx, dword [esp + 0x24]
push ebp
call fcn.300732f0
mov bl, 1
jmp 0x30028b84
cmp eax, 2
jne 0x30028b84
mov edi, dword [esp + 0x1c]
add edi, 0x100
push edi
call fcn.3007a1f0
mov esi, eax
add esp, 4
test esi, esi
je 0x30028b84
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
jbe 0x30028b7b
cmp eax, edi
ja 0x30028b7b
mov ecx, dword [esp + 0x24]
push esi
call fcn.300732f0
mov bl, 1
push esi
call fcn.30208320
add esp, 4
push ebp
call fcn.30208320
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
pop edi
je 0x30028b9d
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebp
mov al, bl
pop ebx
pop ecx
ret 0x10