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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49d458
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
mov eax, dword [0x4c3c64]
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 0x453438
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 0x453411
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 0x45326c
push edx
mov ecx, edi
call fcn.0042051d
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 0x4533e2
lea ebx, [eax + 2]
mov eax, dword [ebp - 0x14]
cmp eax, 1
je 0x45329d
cmp eax, ebx
jne 0x4533e0
mov eax, dword [edi]
mov ecx, dword [eax - 8]
test eax, eax
je 0x4532b8
push ecx
push eax
call fcn.00485e03
add esp, 8
test eax, eax
jl 0x4533d6
mov ecx, dword [edi]
cmp eax, dword [ecx - 8]
jg 0x4533d6
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 0x45342e
cmp dword [ebp + 0x10], ecx
je 0x45342e
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 0x453321
push edx
lea ecx, [ebp - 0x20]
call fcn.0042051d
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.00485e03
add esp, 8
test eax, eax
jl 0x4533d6
cmp eax, dword [esi - 8]
jg 0x4533d6
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
test ebx, ebx
je 0x4533b4
mov ebx, dword [edi]
lea eax, [esi - 0x10]
sub ebx, 0x10
cmp eax, ebx
je 0x4533b4
cmp dword [ebx + 0xc], ecx
jl 0x4533a8
mov edx, dword [eax]
cmp edx, dword [ebx]
jne 0x4533a8
push eax
call fcn.0042152d
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 0x45339e
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 0x4533b4
mov eax, dword [esi - 0xc]
push eax
push esi
mov ecx, edi
call fcn.004214bc
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 0x45342e
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
jmp 0x45342e
push 0x80070057
call fcn.00420000
xor ebx, ebx
mov eax, dword [edi]
mov ecx, dword [eax - 8]
cmp eax, ebx
jne 0x4533ef
xor eax, eax
jmp 0x4533fd
push ecx
push eax
call fcn.00485e03
add esp, 8
cmp eax, ebx
jl 0x4533d6
mov ecx, dword [edi]
cmp eax, dword [ecx - 8]
jg 0x4533d6
mov dword [ecx - 0xc], eax
mov ecx, dword [edi]
xor edx, edx
mov word [ecx + eax*2], dx
jmp 0x45342e
cmp dword [ebp + 0x14], ebx
je 0x45342e
cmp eax, ebx
jne 0x45342e
mov eax, dword [ebp - 0x14]
cmp eax, 1
je 0x453427
cmp eax, 2
jne 0x45342e
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 0x45345b
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 0x453481
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