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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10084488
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov esi, ecx
mov dword [ebp - 4], 1
xor ebx, ebx
mov dword [ebp - 0x18], 0
cmp dword [ebp + 0x18], ebx
je 0x1003b11f
call fcn.1003c5a0
test eax, eax
mov eax, 0x20119
jne 0x1003b124
mov eax, 0x20019
lea ecx, [ebp - 0x18]
push ecx
push eax
push 0
push dword [ebp + 8]
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1003b2aa
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp + 0x18]
push eax
push 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], ebx
push eax
push 0
push dword [ebp + 0xc]
mov dword [ebp + 0x18], ebx
push dword [ebp - 0x18]
call esi
mov edx, dword [ebp + 0x18]
test edx, edx
je 0x1003b286
jns 0x1003b174
push 0x80070057
call fcn.10021340
mov eax, dword [edi]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, edx
or eax, ecx
jge 0x1003b18f
push edx
mov ecx, edi
call fcn.10023670
lea eax, [ebp + 0x18]
push eax
push dword [edi]
lea eax, [ebp - 0x10]
push eax
push 0
push dword [ebp + 0xc]
push dword [ebp - 0x18]
call esi
test eax, eax
jne 0x1003b27c
mov eax, dword [ebp - 0x10]
cmp eax, 1
je 0x1003b1bc
cmp eax, 2
jne 0x1003b27c
push ecx
mov ecx, edi
call fcn.100230b0
cmp dword [ebp - 0x10], 2
mov ebx, 1
jne 0x1003b2a1
cmp dword [ebp + 0x10], 0
je 0x1003b2a1
lea ecx, [ebp - 0x14]
call fcn.10022b60
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x14]
mov eax, dword [ebp + 0x18]
mov esi, dword [edi]
add eax, 0x208
push eax
push eax
mov dword [ebp + 0x18], eax
call fcn.10023070
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor ecx, ecx
cmp ecx, eax
push ecx
lea ecx, [ebp - 0x14]
sbb ebx, ebx
call fcn.100230b0
neg ebx
je 0x1003b272
mov eax, dword [ebp - 0x14]
mov esi, dword [edi]
sub esi, 0x10
lea ecx, [eax - 0x10]
cmp ecx, esi
je 0x1003b272
cmp dword [esi + 0xc], 0
jl 0x1003b267
mov edx, dword [ecx]
cmp edx, dword [esi]
jne 0x1003b267
call fcn.100236e0
mov dword [ebp - 0x1c], eax
lea ecx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x1003b255
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x14]
add eax, 0x10
mov dword [edi], eax
call fcn.10022680
jmp 0x1003b2a1
push dword [eax - 0xc]
mov ecx, edi
push eax
call fcn.10023530
lea ecx, [ebp - 0x14]
call fcn.10022680
jmp 0x1003b2a1
push ecx
mov ecx, edi
call fcn.100230b0
jmp 0x1003b2a1
cmp dword [ebp + 0x14], ebx
je 0x1003b2a1
test eax, eax
jne 0x1003b2a1
mov eax, dword [ebp - 0x10]
cmp eax, 1
je 0x1003b29c
cmp eax, 2
jne 0x1003b2a1
mov ebx, 1
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 0
or edi, 0xffffffff
mov edx, dword [ebp + 8]
mov ecx, edi
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1003b2cd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp + 0xc]
add esi, 0xfffffff0
lea eax, [esi + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x1003b2ee
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret