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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x30083fbc]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x10]
push edi
mov edi, ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x30], eax
mov eax, dword [edi]
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0x18], ecx
jne 0x3001c71b
lea ecx, [ebp - 0x11]
call fcn.3001bfa6
mov al, byte [eax]
mov byte [ebp - 0x12], al
push 0x30073fa4
lea eax, [ebp - 0x12]
push eax
call fcn.3005658e
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [ebp - 0x34]
push edx
push ebx
lea edx, [ebp - 0x24]
push edx
push ebx
push ecx
push eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x34], ebx
call esi
cmp eax, ebx
je 0x3001c751
push eax
lea ecx, [ebp - 0x2c]
call fcn.300136a1
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
push 0x30072a3c
lea eax, [ebp - 0x18]
jmp 0x3001c715
cmp dword [ebp - 0x24], ebx
jbe 0x3001c8e4
cmp dword [ebp - 0x24], 2
jbe 0x3001c76a
cmp dword [ebp - 0x24], 4
jne 0x3001c8e4
push dword [ebp - 0x34]
call fcn.300566c7
cmp eax, ebx
pop ecx
mov dword [ebp - 0x1c], eax
jne 0x3001c78e
lea ecx, [ebp - 0x11]
call fcn.3001352d
mov al, byte [eax]
mov byte [ebp - 0x12], al
push 0x30072bbc
jmp 0x3001c712
lea ecx, [ebp - 0x34]
push ecx
push eax
lea eax, [ebp - 0x24]
push eax
push ebx
push dword [ebp - 0x18]
push dword [edi]
call esi
cmp eax, ebx
jne 0x3001c739
mov eax, dword [ebp - 0x24]
dec eax
je 0x3001c8b6
dec eax
je 0x3001c7f9
dec eax
dec eax
je 0x3001c7cb
lea ecx, [ebp - 0x35]
call fcn.300145e1
mov al, byte [eax]
mov byte [ebp - 0x12], al
push 0x300730ac
jmp 0x3001c712
mov eax, dword [ebp - 0x1c]
push dword [eax]
lea eax, [ebp - 0x10]
push 0x30002614
push 0xb
push eax
call fcn.300135f1
mov ecx, dword [ebp - 0x28]
add esp, 0x10
lea eax, [ebp - 0x10]
push eax
call fcn.30012713
mov eax, dword [ebp - 0x30]
mov dword [eax], ebx
jmp 0x3001c8ca
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push ebx
push ebx
push dword [ebp - 0x1c]
call esi
mov edi, eax
cmp edi, ebx
jne 0x3001c836
push dword [ebp - 0x1c]
call fcn.30056928
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x40]
call fcn.300136a1
mov eax, dword [eax]
mov dword [ebp - 0x3c], eax
push 0x30072a3c
lea eax, [ebp - 0x3c]
jmp 0x3001c715
push edi
call fcn.300566c7
cmp eax, ebx
pop ecx
mov dword [ebp - 0x18], eax
jne 0x3001c85e
lea ecx, [ebp - 0x1d]
call fcn.3001352d
mov al, byte [eax]
mov byte [ebp - 0x11], al
push 0x30072bbc
lea eax, [ebp - 0x11]
jmp 0x3001c715
push edi
push eax
push dword [ebp - 0x1c]
call esi
cmp eax, ebx
je 0x3001c88c
cmp eax, edi
ja 0x3001c88c
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x28]
call fcn.30012713
mov eax, dword [ebp - 0x30]
push dword [ebp - 0x18]
mov dword [eax], 2
call fcn.30056928
pop ecx
jmp 0x3001c8ca
push dword [ebp - 0x1c]
call fcn.30056928
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x44]
call fcn.300136a1
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
push 0x30072a3c
lea eax, [ebp - 0x2c]
jmp 0x3001c715
push dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x28]
call fcn.30012713
mov eax, dword [ebp - 0x30]
mov dword [eax], 1
push dword [ebp - 0x1c]
call fcn.30056928
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.30057132
leave
ret 0xc
lea ecx, [ebp - 0x1d]
call fcn.300145e1
mov al, byte [eax]
mov byte [ebp - 0x11], al
push 0x300730ac
jmp 0x3001c856