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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a3fa8
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
mov eax, dword [0x4ccc64]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x18]
push eax
push 0x20219
xor ebx, ebx
mov dword [ebp - 4], 1
mov ecx, dword [ebp + 8]
push ebx
push ecx
push edx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x454d38
mov edx, dword [ebp + 0xc]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x18]
push ebx
lea ecx, [ebp - 0x14]
push ecx
push ebx
push edx
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
call esi
mov edx, dword [ebp - 0x10]
cmp edx, ebx
jbe 0x454d11
mov eax, dword [edi]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, edx
or eax, ecx
jge 0x454b6c
push edx
mov ecx, edi
call fcn.004204f5
mov eax, dword [edi]
lea ecx, [ebp - 0x10]
push ecx
mov ecx, dword [ebp - 0x18]
push eax
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x14]
push edx
push ebx
push eax
push ecx
call esi
test eax, eax
jne 0x454ce2
lea ebx, [eax + 2]
mov eax, dword [ebp - 0x14]
cmp eax, 1
je 0x454b9d
cmp eax, ebx
jne 0x454ce0
mov eax, dword [edi]
mov ecx, dword [eax - 8]
test eax, eax
je 0x454bb8
push ecx
push eax
call fcn.0048cad9
add esp, 8
test eax, eax
jl 0x454cd6
mov ecx, dword [edi]
cmp eax, dword [ecx - 8]
jg 0x454cd6
mov dword [ecx - 0xc], eax
mov edx, dword [edi]
xor ecx, ecx
mov word [edx + eax*2], cx
mov dword [ebp - 0x1c], 1
cmp dword [ebp - 0x14], ebx
jne 0x454d2e
cmp dword [ebp + 0x10], ecx
je 0x454d2e
lea ecx, [ebp - 0x20]
call fcn.0042048a
mov byte [ebp - 4], bl
mov edx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x20]
add edx, 0x208
mov dword [ebp - 0x10], edx
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x454c21
push edx
lea ecx, [ebp - 0x20]
call fcn.004204f5
mov edx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x20]
mov eax, dword [edi]
push edx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor edx, edx
cmp edx, eax
mov eax, dword [esi - 8]
sbb ebx, ebx
push eax
neg ebx
push esi
mov dword [ebp - 0x1c], ebx
call fcn.0048cad9
add esp, 8
test eax, eax
jl 0x454cd6
cmp eax, dword [esi - 8]
jg 0x454cd6
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
test ebx, ebx
je 0x454cb4
mov ebx, dword [edi]
lea eax, [esi - 0x10]
sub ebx, 0x10
cmp eax, ebx
je 0x454cb4
cmp dword [ebx + 0xc], ecx
jl 0x454ca8
mov edx, dword [eax]
cmp edx, dword [ebx]
jne 0x454ca8
push eax
call fcn.00421538
mov dword [ebp - 0x24], eax
add esp, 4
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x454c9e
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
mov ecx, dword [ebp - 0x24]
add ecx, 0x10
mov dword [edi], ecx
jmp 0x454cb4
mov eax, dword [esi - 0xc]
push eax
push esi
mov ecx, edi
call fcn.004214c7
add esi, 0xfffffff0
mov byte [ebp - 4], 1
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x454d2e
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
jmp 0x454d2e
push 0x80070057
call fcn.00420000
xor ebx, ebx
mov eax, dword [edi]
mov ecx, dword [eax - 8]
cmp eax, ebx
jne 0x454cef
xor eax, eax
jmp 0x454cfd
push ecx
push eax
call fcn.0048cad9
add esp, 8
cmp eax, ebx
jl 0x454cd6
mov ecx, dword [edi]
cmp eax, dword [ecx - 8]
jg 0x454cd6
mov dword [ecx - 0xc], eax
mov ecx, dword [edi]
xor edx, edx
mov word [ecx + eax*2], dx
jmp 0x454d2e
cmp dword [ebp + 0x14], ebx
je 0x454d2e
cmp eax, ebx
jne 0x454d2e
mov eax, dword [ebp - 0x14]
cmp eax, 1
je 0x454d27
cmp eax, 2
jne 0x454d2e
mov dword [ebp - 0x1c], 1
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 0
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x454d5b
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 + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x454d81
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret