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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c9fc8
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push esi
push edi
mov eax, dword [0x504c94]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor edi, edi
mov dword [ebp - 4], 1
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
cmp dword [ebp + 0x1c], edi
je 0x467819
call fcn.0046a120
test eax, eax
mov eax, 0x20119
jne 0x46781e
mov eax, 0x20019
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x14]
push ecx
push eax
mov eax, dword [ebp + 8]
push edi
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x467a51
mov eax, dword [ebp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea ecx, [ebp + 0x1c]
push ecx
mov ecx, dword [ebp - 0x14]
push edi
lea edx, [ebp - 0x10]
push edx
push edi
push eax
push ecx
mov dword [ebp - 0x10], edi
mov dword [ebp + 0x1c], edi
call esi
mov edx, dword [ebp + 0x1c]
cmp edx, edi
jbe 0x467a2a
mov eax, dword [ebx]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, edx
or eax, ecx
jge 0x467883
push edx
mov ecx, ebx
call fcn.0042151d
mov eax, dword [ebx]
mov ecx, dword [ebp + 0x10]
lea edx, [ebp + 0x1c]
push edx
mov edx, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
push edi
push ecx
push edx
call esi
test eax, eax
jne 0x4679fb
mov eax, dword [ebp - 0x10]
cmp eax, 1
je 0x4678b2
cmp eax, 2
jne 0x4679fb
mov eax, dword [ebx]
mov ecx, dword [eax - 8]
cmp eax, edi
jne 0x4678bf
xor eax, eax
jmp 0x4678d1
push ecx
push eax
call fcn.004ab8cb
add esp, 8
cmp eax, edi
jl 0x4679f1
mov ecx, dword [ebx]
cmp eax, dword [ecx - 8]
jg 0x4679f1
mov dword [ecx - 0xc], eax
mov ecx, dword [ebx]
xor edx, edx
mov word [ecx + eax*2], dx
cmp dword [ebp - 0x10], 2
mov dword [ebp - 0x18], 1
jne 0x467a47
cmp dword [ebp + 0x14], edi
je 0x467a47
lea ecx, [ebp - 0x1c]
call fcn.0042148a
mov byte [ebp - 4], 2
mov edx, dword [ebp + 0x1c]
mov esi, dword [ebp - 0x1c]
add edx, 0x208
mov dword [ebp + 0x1c], edx
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x46793c
push edx
lea ecx, [ebp - 0x1c]
call fcn.0042151d
mov edx, dword [ebp + 0x1c]
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebx]
push edx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor ecx, ecx
cmp ecx, eax
mov eax, dword [esi - 8]
sbb edi, edi
push eax
neg edi
push esi
mov dword [ebp - 0x18], edi
call fcn.004ab8cb
add esp, 8
test eax, eax
jl 0x4679f1
cmp eax, dword [esi - 8]
jg 0x4679f1
xor edx, edx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], dx
test edi, edi
je 0x4679cf
mov edi, dword [ebx]
lea eax, [esi - 0x10]
sub edi, 0x10
cmp eax, edi
je 0x4679cf
cmp dword [edi + 0xc], edx
jl 0x4679c3
mov ecx, dword [eax]
cmp ecx, dword [edi]
jne 0x4679c3
push eax
call fcn.00423f84
mov dword [ebp - 0x20], eax
add esp, 4
lea eax, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [eax], edx
dec edx
test edx, edx
jg 0x4679b9
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov eax, dword [ebp - 0x20]
add eax, 0x10
mov dword [ebx], eax
jmp 0x4679cf
mov eax, dword [esi - 0xc]
push eax
push esi
mov ecx, ebx
call fcn.00423f13
add esi, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x467a47
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
jmp 0x467a47
push 0x80070057
call fcn.00421000
mov eax, dword [ebx]
mov ecx, dword [eax - 8]
cmp eax, edi
jne 0x467a08
xor eax, eax
jmp 0x467a16
push ecx
push eax
call fcn.004ab8cb
add esp, 8
cmp eax, edi
jl 0x4679f1
mov ecx, dword [ebx]
cmp eax, dword [ecx - 8]
jg 0x4679f1
mov dword [ecx - 0xc], eax
mov ecx, dword [ebx]
xor edx, edx
mov word [ecx + eax*2], dx
jmp 0x467a47
cmp dword [ebp + 0x18], edi
je 0x467a47
cmp eax, edi
jne 0x467a47
mov eax, dword [ebp - 0x10]
cmp eax, 1
je 0x467a40
cmp eax, 2
jne 0x467a47
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 0
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x467a74
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x467a9a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret