Function at 0x3001c745
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 0x3001c78f
lea ecx, [ebp - 0x11]
call fcn.3001c01a
mov al, byte [eax]
mov byte [ebp - 0x12], al
push 0x30074104
lea eax, [ebp - 0x12]
push eax
call fcn.300566f2
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 0x3001c7c5
push eax
lea ecx, [ebp - 0x2c]
call fcn.300136b6
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
push 0x30072b9c
lea eax, [ebp - 0x18]
jmp 0x3001c789
cmp dword [ebp - 0x24], ebx
jbe 0x3001c958
cmp dword [ebp - 0x24], 2
jbe 0x3001c7de
cmp dword [ebp - 0x24], 4
jne 0x3001c958
push dword [ebp - 0x34]
call fcn.3005682b
cmp eax, ebx
pop ecx
mov dword [ebp - 0x1c], eax
jne 0x3001c802
lea ecx, [ebp - 0x11]
call fcn.30013542
mov al, byte [eax]
mov byte [ebp - 0x12], al
push 0x30072d1c
jmp 0x3001c786
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 0x3001c7ad
mov eax, dword [ebp - 0x24]
dec eax
je 0x3001c92a
dec eax
je 0x3001c86d
dec eax
dec eax
je 0x3001c83f
lea ecx, [ebp - 0x35]
call fcn.300145f6
mov al, byte [eax]
mov byte [ebp - 0x12], al
push 0x3007320c
jmp 0x3001c786
mov eax, dword [ebp - 0x1c]
push dword [eax]
lea eax, [ebp - 0x10]
push 0x30002624
push 0xb
push eax
call fcn.30013606
mov ecx, dword [ebp - 0x28]
add esp, 0x10
lea eax, [ebp - 0x10]
push eax
call fcn.30012728
mov eax, dword [ebp - 0x30]
mov dword [eax], ebx
jmp 0x3001c93e
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 0x3001c8aa
push dword [ebp - 0x1c]
call fcn.30056a8c
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x40]
call fcn.300136b6
mov eax, dword [eax]
mov dword [ebp - 0x3c], eax
push 0x30072b9c
lea eax, [ebp - 0x3c]
jmp 0x3001c789
push edi
call fcn.3005682b
cmp eax, ebx
pop ecx
mov dword [ebp - 0x18], eax
jne 0x3001c8d2
lea ecx, [ebp - 0x1d]
call fcn.30013542
mov al, byte [eax]
mov byte [ebp - 0x11], al
push 0x30072d1c
lea eax, [ebp - 0x11]
jmp 0x3001c789
push edi
push eax
push dword [ebp - 0x1c]
call esi
cmp eax, ebx
je 0x3001c900
cmp eax, edi
ja 0x3001c900
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x28]
call fcn.30012728
mov eax, dword [ebp - 0x30]
push dword [ebp - 0x18]
mov dword [eax], 2
call fcn.30056a8c
pop ecx
jmp 0x3001c93e
push dword [ebp - 0x1c]
call fcn.30056a8c
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x44]
call fcn.300136b6
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
push 0x30072b9c
lea eax, [ebp - 0x2c]
jmp 0x3001c789
push dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x28]
call fcn.30012728
mov eax, dword [ebp - 0x30]
mov dword [eax], 1
push dword [ebp - 0x1c]
call fcn.30056a8c
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.30057296
leave
ret 0xc
lea ecx, [ebp - 0x1d]
call fcn.300145f6
mov al, byte [eax]
mov byte [ebp - 0x11], al
push 0x3007320c
jmp 0x3001c8ca