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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1010cfed
mov eax, dword fs:[0]
push eax
sub esp, 0x428
mov eax, dword [0x10158f9c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov dword [ebp - 0x428], edi
lea edx, [ebp - 0x42c]
mov dword [ebp - 4], 0
cmp dword [ebp + 0x20], 8
lea eax, [ebp + 0xc]
push edx
cmovae eax, dword [ebp + 0xc]
lea edx, [ebp - 0x218]
push edx
lea edx, [ebp - 0x430]
mov dword [ebp - 0x42c], 0x208
push edx
push 0
push eax
push dword [ecx + 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1004eed3
mov eax, dword [ebp - 0x430]
cmp eax, 4
jne 0x1004ec3d
push 0xa
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x218]
call fcn.100daab8
mov ebx, eax
mov dword [edi], 0
add esp, 0xc
mov dword [ebp - 0x428], ebx
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov esi, ebx
mov dword [edi + 0x10], 0
xor eax, eax
mov dword [edi + 0x14], 7
mov word [edi], ax
mov byte [ebp - 4], al
lea ecx, [esi + 2]
nop dword [eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x1004eb00
sub esi, ecx
sar esi, 1
cmp esi, 7
ja 0x1004eb2f
mov dword [edi + 0x10], esi
add esi, esi
push esi
push ebx
push edi
call fcn.100c9030
add esp, 0xc
xor eax, eax
mov word [esi + edi], ax
jmp 0x1004ebe3
cmp esi, 0x7ffffffe
ja 0x1004eeff
mov ebx, esi
or ebx, 7
cmp ebx, 0x7ffffffe
jbe 0x1004eb4f
mov ebx, 0x7ffffffe
jmp 0x1004eb59
mov eax, 0xa
cmp ebx, eax
cmovb ebx, eax
xor ecx, ecx
mov eax, ebx
add eax, 1
setb cl
neg ecx
or ecx, eax
cmp ecx, 0x7fffffff
ja 0x1004ef04
add ecx, ecx
cmp ecx, 0x1000
jb 0x1004eba6
lea eax, [ecx + 0x23]
cmp eax, ecx
jbe 0x1004ef04
push eax
call fcn.100c742f
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x1004ef0e
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x1004ebb7
test ecx, ecx
je 0x1004ebb5
push ecx
call fcn.100c742f
add esp, 4
jmp 0x1004ebb7
xor eax, eax
mov dword [edi + 0x10], esi
add esi, esi
push esi
push dword [ebp - 0x428]
mov dword [ebp - 0x424], eax
mov dword [edi + 0x14], ebx
push eax
call fcn.100c9030
mov eax, dword [ebp - 0x424]
add esp, 0xc
xor ecx, ecx
mov word [esi + eax], cx
mov dword [edi], eax
mov ecx, dword [ebp + 0x20]
cmp ecx, 8
jb 0x1004ec1d
mov edx, dword [ebp + 0xc]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x1004ec13
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1004ef0e
push ecx
push edx
call fcn.100c7421
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100c7413
mov esp, ebp
pop ebp
ret 0x1c
cmp eax, 1
jne 0x1004ed58
mov dword [edi], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
xor eax, eax
mov dword [edi + 0x10], 0
lea esi, [ebp - 0x218]
mov dword [edi + 0x14], 7
mov word [edi], ax
lea ecx, [esi + 2]
mov byte [ebp - 4], al
nop dword [eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x1004ec80
sub esi, ecx
sar esi, 1
cmp esi, 7
ja 0x1004ecb5
mov dword [edi + 0x10], esi
lea eax, [ebp - 0x218]
add esi, esi
push esi
push eax
push edi
call fcn.100c9030
add esp, 0xc
xor eax, eax
mov word [esi + edi], ax
jmp 0x1004ebe3
cmp esi, 0x7ffffffe
ja 0x1004eeff
mov ebx, esi
or ebx, 7
cmp ebx, 0x7ffffffe
jbe 0x1004ecd5
mov ebx, 0x7ffffffe
jmp 0x1004ecdf
mov eax, 0xa
cmp ebx, eax
cmovb ebx, eax
xor ecx, ecx
mov eax, ebx
add eax, 1
setb cl
neg ecx
or ecx, eax
cmp ecx, 0x7fffffff
ja 0x1004ef04
add ecx, ecx
cmp ecx, 0x1000
jb 0x1004ed2c
lea eax, [ecx + 0x23]
cmp eax, ecx
jbe 0x1004ef04
push eax
call fcn.100c742f
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x1004ef0e
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x1004ed3d
test ecx, ecx
je 0x1004ed3b
push ecx
call fcn.100c742f
add esp, 4
jmp 0x1004ed3d
xor eax, eax
mov dword [edi + 0x10], esi
lea ecx, [ebp - 0x218]
add esi, esi
mov dword [ebp - 0x424], eax
push esi
mov dword [edi + 0x14], ebx
push ecx
jmp 0x1004ebcc
cmp eax, 2
jne 0x1004eed3
push 0x104
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [edi], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
xor eax, eax
mov dword [edi + 0x10], 0
lea esi, [ebp - 0x420]
mov dword [edi + 0x14], 7
mov word [edi], ax
lea ecx, [esi + 2]
mov byte [ebp - 4], al
nop dword [eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x1004edb0
sub esi, ecx
sar esi, 1
cmp esi, 7
ja 0x1004ede5
mov dword [edi + 0x10], esi
lea eax, [ebp - 0x420]
add esi, esi
push esi
push eax
push edi
call fcn.100c9030
add esp, 0xc
xor eax, eax
mov word [esi + edi], ax
jmp 0x1004ee9a
cmp esi, 0x7ffffffe
ja 0x1004ef09
mov ebx, esi
or ebx, 7
cmp ebx, 0x7ffffffe
jbe 0x1004ee05
mov ebx, 0x7ffffffe
jmp 0x1004ee0f
mov eax, 0xa
cmp ebx, eax
cmovb ebx, eax
xor ecx, ecx
mov eax, ebx
add eax, 1
setb cl
neg ecx
or ecx, eax
cmp ecx, 0x7fffffff
ja 0x1004ef04
add ecx, ecx
cmp ecx, 0x1000
jb 0x1004ee5c
lea eax, [ecx + 0x23]
cmp eax, ecx
jbe 0x1004ef04
push eax
call fcn.100c742f
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x1004ef0e
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x1004ee6d
test ecx, ecx
je 0x1004ee6b
push ecx
call fcn.100c742f
add esp, 4
jmp 0x1004ee6d
xor eax, eax
mov dword [edi + 0x10], esi
lea ecx, [ebp - 0x420]
add esi, esi
mov dword [ebp - 0x424], eax
push esi
push ecx
push eax
mov dword [edi + 0x14], ebx
call fcn.100c9030
mov eax, dword [ebp - 0x424]
add esp, 0xc
xor ecx, ecx
mov word [eax + esi], cx
mov dword [edi], eax
mov ecx, dword [ebp + 0x20]
cmp ecx, 8
jb 0x1004ec1d
mov edx, dword [ebp + 0xc]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x1004ec13
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1004ef0e
jmp 0x1004ec13
mov dword [edi], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
xor eax, eax
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], eax
mov word [edi], ax
jmp 0x1004ee9a
call fcn.10001cdc
call fcn.10001dde
call fcn.10001cdc
call fcn.100ccb4f
int3