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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c4
mov eax, dword [0x70e00c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0x10]
push esi
mov esi, edx
push edi
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x8b4], eax
cmp ecx, 1
je 0x42e24e
cmp ecx, 2
je 0x42e24e
cmp ecx, 3
je 0x42e24e
cmp ecx, 7
jne case.default.0x42e267
mov al, byte [esi]
test al, al
je case.default.0x42e267
mov edi, dword [ebx + 0x1c]
mov edx, dword [edi + 0xc]
cmp edx, 6
ja case.default.0x42e267
jmp dword [edx*4 + 0x42ea8c]
cmp ecx, 7
jne 0x42e2a7
mov ecx, dword [ebx + 0x18]
mov edx, dword [ebx + 0x20]
push ecx
push 1
lea eax, [ecx + 1]
mov ecx, ebx
push esi
mov dword [ebx + 0x18], eax
call fcn.0042dd30
mov ecx, esi
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x42e292
sub ecx, edx
inc esi
add esi, ecx
cmp byte [esi], al
jne 0x42e273
jmp 0x42ea61
push esi
call fcn.00628843
mov esi, eax
add esp, 4
test esi, esi
jne 0x42e2cc
mov eax, 0xfffffff4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004aa758
mov esp, ebp
pop ebp
ret
push 0x6e9d0c
push esi
call fcn.0061a85d
mov edx, eax
add esp, 8
test edx, edx
je 0x42e30f
mov ecx, dword [ebx + 0x18]
push ecx
push 1
push edx
mov edx, dword [ebx + 0x20]
lea eax, [ecx + 1]
mov ecx, ebx
mov dword [ebx + 0x18], eax
call fcn.0042dd30
add esp, 0xc
push 0x6e9d0c
push 0
call fcn.0061a85d
mov edx, eax
add esp, 8
test edx, edx
jne 0x42e2e0
push esi
call fcn.005fa0fb
add esp, 4
jmp 0x42ea61
mov ecx, dword [ebx + 0x18]
mov edx, dword [ebx + 0x20]
push ecx
push 0
lea eax, [ecx + 1]
mov ecx, ebx
push esi
mov dword [ebx + 0x18], eax
call fcn.0042dd30
jmp 0x42ea5e
push 0
push dword [edi + 0x10]
mov edx, esi
mov ecx, ebx
call fcn.0042df40
mov eax, dword [ebp - 0x8b4]
add esp, 8
mov dword [ebx + 0xc], eax
jmp 0x42ea61
xorps xmm0, xmm0
mov dword [ebp - 0x89c], 0x80
movlpd qword [ebp - 0x8a8], xmm0
mov edi, esi
movlpd qword [ebp - 0x8c0], xmm0
cmp al, 0x7b
je 0x42e383
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x42e377
push 0
lea edx, [ebp - 0x8a8]
mov ecx, str.HKCRCLSID
call fcn.00416da0
mov ecx, eax
add esp, 4
test ecx, ecx
mov ecx, dword [ebp - 0x8a8]
js 0x42e5bb
lea eax, [ebp - 0x8ac]
push eax
mov eax, dword [0x71701c]
or eax, 0xf003f
push eax
push 0
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, 5
jne 0x42e3ee
lea eax, [ebp - 0x8ac]
push eax
mov eax, dword [0x71701c]
or eax, 0x20019
push eax
push 0
push edi
push dword [ebp - 0x8a8]
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
call edi
jmp 0x42e3f4
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x42e5b4
mov ecx, dword [ebp - 0x8ac]
lea eax, [ebp - 0x898]
push eax
mov eax, dword [0x71701c]
or eax, 0xf003f
mov dword [ebp - 0x894], ecx
push eax
push 0
push str.InprocServer32
push ecx
call edi
cmp eax, 5
jne 0x42e44a
lea eax, [ebp - 0x898]
push eax
mov eax, dword [0x71701c]
or eax, 0x20019
push eax
push 0
push str.InprocServer32
push dword [ebp - 0x894]
call edi
test eax, eax
jne 0x42e460
mov eax, dword [ebp - 0x898]
mov dword [ebp - 0x898], 0
jmp 0x42e49d
push 0
push dword [ebp - 0x894]
lea edx, [ebp - 0x8c0]
mov ecx, str.Shellopencommand
call fcn.00416ec0
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x8bc]
mov dword [ebp - 0x8b0], ecx
mov dword [ebp - 0x898], eax
test ecx, ecx
js 0x42e5a6
mov eax, dword [ebp - 0x8c0]
lea ecx, [ebp + 0x14]
mov dword [ebp - 0x8b8], eax
push ecx
lea ecx, [ebp - 0x490]
mov dword [ebp + 0x14], 0x400
push ecx
push 0
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x42e58a
xor edi, edi
cmp dword [ebp + 0x14], edi
jle 0x42e531
lea esi, [ebp - 0x490]
cmp dword [ebx + 0x20], edi
jne 0x42e52f
lea eax, [ebp - 0x89c]
push eax
lea eax, [ebp - 0x88]
push eax
push edi
push edi
push edi
push dword [ebp - 0x894]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x42e52f
cmp dword [ebp - 0x89c], edi
jle 0x42e52f
cmp byte [ebp - 0x88], al
je 0x42e52f
mov eax, dword [ebx + 0x20]
test eax, eax
je 0x42e51d
push eax
call fcn.005fa0fb
add esp, 4
lea eax, [ebp - 0x88]
push eax
call fcn.00628843
add esp, 4
mov dword [ebx + 0x20], eax
xor edi, edi
mov ecx, dword [ebp - 0x8b8]
mov eax, ecx
or eax, dword [ebp - 0x898]
je 0x42e548
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x894]
mov eax, ecx
or eax, 0
je 0x42e55c
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x8a8]
mov eax, ecx
or eax, dword [ebp - 0x8a4]
je 0x42e573
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jns 0x42e5bf
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004aa758
mov esp, ebp
pop ebp
ret
cmp eax, 0xea
mov ecx, 0xfffffff2
mov edx, 0xffffffe4
cmove ecx, edx
mov dword [ebp - 0x8b0], ecx
mov edi, ecx
jmp 0x42e531
mov ecx, dword [ebp - 0x8c0]
mov edi, dword [ebp - 0x8b0]
jmp 0x42e537
mov edi, 0xfffffff2
jmp 0x42e55c
mov edi, eax
jmp 0x42e562
mov ecx, dword [ebx + 0x18]
push ecx
push 0
push esi
lea eax, [ecx + 1]
mov dword [ebx + 0x18], eax
jmp 0x42ea4b
push esi
call fcn.00628843
add esp, 4
mov dword [ebp - 0x89c], eax
test eax, eax
je 0x42e2b6
push 0x6e9d0c
push eax
mov dword [ebp - 0x898], 0x400
mov dword [ebp - 0x894], 0x80
call fcn.0061a85d
mov esi, eax
add esp, 8
test esi, esi
je 0x42e732
push esi
lea eax, [ebp - 0x890]
push str.HKLMSystemCurrentControlSetServices_sNetworkProvider
push eax
call fcn.00417690
add esp, 0xc
lea edx, [ebp - 0x8a8]
lea ecx, [ebp - 0x890]
push 0
call fcn.00416da0
add esp, 4
test eax, eax
js 0x42e705
mov edi, dword [ebp - 0x8a8]
lea eax, [ebp - 0x894]
push eax
lea eax, [ebp - 0x88]
xor edx, edx
push eax
push dword [ebp - 0x8a4]
mov ecx, str.Name
push edi
call fcn.004173f0
add esp, 0x10
test eax, eax
js 0x42e68d
cmp dword [ebp - 0x894], 0
jle 0x42e68d
cmp byte [ebp - 0x88], 0
lea edx, [ebp - 0x88]
jne 0x42e68f
mov edx, esi
mov ecx, ebx
call fcn.0042dca0
mov esi, dword [ebp - 0x8a4]
lea eax, [ebp - 0x898]
push eax
lea eax, [ebp - 0x890]
xor edx, edx
push eax
push esi
push edi
mov ecx, str.ProviderPath
call fcn.004173f0
add esp, 0x10
test eax, eax
js 0x42e6fe
cmp dword [ebp - 0x898], 0
jle 0x42e6fe
cmp byte [ebp - 0x890], 0
je 0x42e6fe
mov edx, dword [ebx + 0x20]
lea eax, [ebp - 0x890]
push 0
push 0
push eax
mov ecx, ebx
mov dword [ebx + 8], 1
mov dword [ebx], edi
mov dword [ebx + 4], esi
call fcn.0042dd30
mov eax, dword [ebp - 0x8b4]
add esp, 0xc
mov dword [ebx + 0xc], eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x6e9d0c
push 0
mov dword [ebp - 0x898], 0x400
mov dword [ebp - 0x894], 0x80
call fcn.0061a85d
mov esi, eax
add esp, 8
test esi, esi
jne 0x42e614
push dword [ebp - 0x89c]
call fcn.005fa0fb
add esp, 4
jmp 0x42ea61
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0x894]
mov esi, dword [ebp + 8]
xor edx, edx
push eax
lea eax, [ebp - 0x89c]
mov dword [ebp - 0x894], 4
push eax
push edi
push esi
mov ecx, str.Type
call fcn.004173f0
add esp, 0x10
test eax, eax
js case.default.0x42e267
cmp dword [ebp - 0x894], 0
jle case.default.0x42e267
test byte [ebp - 0x89c], 0xf
jne case.default.0x42e267
lea eax, [ebp - 0x894]
xor edx, edx
push eax
lea eax, [ebp - 0x8ac]
mov ecx, 0x6ea11c
push eax
push edi
push esi
call fcn.004173f0
add esp, 0x10
test eax, eax
js case.default.0x42e267
cmp dword [ebp - 0x894], 0
jle case.default.0x42e267
cmp dword [ebp - 0x8ac], 4
je case.default.0x42e267
push edi
push esi
lea edx, [ebp - 0x8a8]
mov ecx, str.Parameters
call fcn.00416ec0
add esp, 8
test eax, eax
js 0x42e841
mov esi, dword [ebp - 0x8a8]
lea eax, [ebp + 0x14]
push eax
lea eax, [ebp - 0x490]
mov dword [ebp + 0x14], 0x400
push eax
push dword [ebp - 0x8a4]
xor edx, edx
mov ecx, str.ServiceDll
push esi
call fcn.004173f0
add esp, 0x10
mov dword [ebp - 0x898], eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp + 0x14], 0
jle 0x42e83e
cmp dword [ebp - 0x898], 0
jge 0x42ea38
mov esi, dword [ebp + 8]
lea eax, [ebp + 0x14]
mov dword [ebp + 0x14], 0x400
push eax
lea eax, [ebp - 0x490]
xor edx, edx
push eax
push edi
push esi
mov ecx, 0x6ea140
call fcn.004173f0
add esp, 0x10
test eax, eax
js case.default.0x42e267
cmp dword [ebp + 0x14], 0
jg 0x42ea38
mov eax, 0xffffffea
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004aa758
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0x894]
push eax
lea eax, [ebp - 0x89c]
mov dword [ebp - 0x894], 4
push eax
push edi
push dword [ebp + 8]
xor edx, edx
mov ecx, str.Type
call fcn.004173f0
add esp, 0x10
test eax, eax
js case.default.0x42e267
cmp dword [ebp - 0x894], 0
jle case.default.0x42e267
test byte [ebp - 0x89c], 0xf
je case.default.0x42e267
lea eax, [ebp - 0x894]
xor edx, edx
push eax
lea eax, [ebp - 0x8ac]
mov ecx, 0x6ea11c
push eax
push edi
push dword [ebp + 8]
call fcn.004173f0
add esp, 0x10
test eax, eax
js case.default.0x42e267
cmp dword [ebp - 0x894], 0
jle case.default.0x42e267
cmp dword [ebp - 0x8ac], 4
je case.default.0x42e267
lea eax, [ebp + 0x14]
mov dword [ebp + 0x14], 0x400
push eax
lea eax, [ebp - 0x490]
xor edx, edx
push eax
push edi
push dword [ebp + 8]
mov ecx, 0x6ea140
call fcn.004173f0
add esp, 0x10
test eax, eax
js 0x42ea23
cmp dword [ebp + 0x14], 0
jle 0x42ea23
push 9
lea eax, [ebp - 0x490]
push str.system32_
push eax
call fcn.00627fab
add esp, 0xc
test eax, eax
jne 0x42e9d7
lea ecx, [ebp - 0x490]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x42e965
sub ecx, edx
mov eax, 0x3ff
sub eax, ecx
push eax
lea eax, [ebp - 0x890]
push eax
push str._SystemRoot__
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsA]
lea edx, [ebp - 0x490]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x42e990
lea edi, [ebp - 0x890]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x42e9a0
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor ecx, ecx
nop dword [eax + eax]
mov al, byte [ebp + ecx - 0x890]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x491], al
test al, al
jne 0x42e9c0
jmp 0x42ea38
xor ecx, ecx
nop dword [eax]
mov al, byte [ebp + ecx - 0x490]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x891], al
test al, al
jne 0x42e9e0
push 0x3ff
lea eax, [ebp - 0x490]
push eax
lea eax, [ebp - 0x890]
push eax
push 0
push 0
push 0
call fcn.00402d30
add esp, 0x18
test eax, eax
js 0x42ea38
mov byte [ebp - 0x91], 0
jmp 0x42ea38
push esi
lea eax, [ebp - 0x490]
push str.__SystemRoot__System32drivers_s.sys
push eax
call fcn.00417690
add esp, 0xc
mov ecx, dword [ebx + 0x18]
push ecx
push 0
lea eax, [ecx + 1]
mov dword [ebx + 0x18], eax
lea eax, [ebp - 0x490]
push eax
mov edx, dword [ebx + 0x20]
mov ecx, ebx
call fcn.0042dd30
mov eax, dword [ebp - 0x8b4]
mov dword [ebx + 0xc], eax
add esp, 0xc
mov eax, dword [ebx + 0x20]
test eax, eax
je 0x42ea78
push eax
call fcn.005fa0fb
add esp, 4
mov dword [ebx + 0x20], 0
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004aa758
mov esp, ebp
pop ebp
ret