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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x4af480]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push eax
push edx
push str._s_shell_scommand
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x22c], ebx
mov edi, ecx
mov dword [ebp - 0x218], 0
push 0x104
push eax
mov dword [ebp - 0x228], edi
mov dword [ebp - 0x21c], 0
call fcn.00401040
add esp, 0x14
lea eax, [ebp - 0x220]
push eax
push 1
push 0
lea eax, [ebp - 0x20c]
push eax
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x41f999
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x21c]
push eax
push 0
push 0
push 0
push 0
push dword [ebp - 0x220]
call esi
mov eax, dword [ebp - 0x21c]
test eax, eax
je 0x41f6b1
push eax
call fcn.0047d547
add esp, 4
mov dword [ebp - 0x218], eax
lea ecx, [ebp - 0x21c]
push ecx
push eax
push 0
push 0
push 0
push dword [ebp - 0x220]
call esi
mov esi, eax
jmp 0x41f6b6
mov esi, 2
push dword [ebp - 0x220]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x218]
test eax, eax
je 0x41f999
test esi, esi
jne 0x41f999
push esi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x41f999
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0047d547
add esp, 4
mov dword [ebp - 0x214], eax
push esi
push eax
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov eax, dword [ebp - 0x214]
cmp word [eax], 0
je 0x41f99b
mov ecx, eax
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41f730
sub ecx, edx
mov edx, ebx
sar ecx, 1
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x41f744
sub edx, esi
sar edx, 1
lea edi, [edx + ecx]
xor ecx, ecx
lea eax, [edi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0047d547
mov edx, eax
mov dword [ebp - 0x224], 0
mov eax, dword [ebp - 0x228]
add esp, 4
mov dword [ebp - 0x210], edx
lea edi, [edx + edi*2]
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x214]
mov esi, eax
movzx ecx, word [eax]
mov eax, ecx
cmp word [ebp - 0x224], cx
jae 0x41f7ba
cmp ax, 0x20
ja 0x41f7ba
movzx eax, word [esi + 2]
add esi, 2
xor ecx, ecx
cmp cx, ax
jb 0x41f7a6
cmp word [esi], 0
je 0x41f8fd
cmp edx, edi
jae 0x41f8fd
movzx eax, word [esi]
mov ecx, eax
cmp eax, 0x22
jne 0x41f866
cmp word [esi + 2], 0x25
jne 0x41f8e4
cmp word [esi + 4], 0x4c
jne 0x41f821
cmp word [esi + 6], ax
jne 0x41f821
push ebx
push str.__s_
push 0
push 0
lea eax, [ebp - 0x210]
push eax
mov eax, edi
sub eax, edx
sar eax, 1
push eax
push edx
call fcn.00401c00
mov edx, dword [ebp - 0x210]
add esp, 0x1c
add esi, 8
jmp 0x41f8f3
cmp word [esi + 4], 0x31
jne 0x41f8e4
cmp word [esi + 6], 0x22
jne 0x41f8e4
push ebx
push str.__s_
push 0
push 0
lea eax, [ebp - 0x210]
push eax
mov eax, edi
sub eax, edx
sar eax, 1
push eax
push edx
call fcn.00401c00
mov edx, dword [ebp - 0x210]
add esp, 0x1c
add esi, 8
jmp 0x41f8f3
cmp ecx, 0x25
jne 0x41f8e4
movzx eax, word [esi + 2]
mov ebx, eax
mov dword [ebp - 0x224], ebx
mov ebx, dword [ebp - 0x22c]
cmp eax, 0x4c
jne 0x41f8ae
push ebx
push str.__s_
push 0
push 0
lea eax, [ebp - 0x210]
push eax
mov eax, edi
sub eax, edx
sar eax, 1
push eax
push edx
call fcn.00401c00
mov edx, dword [ebp - 0x210]
add esp, 0x1c
add esi, 4
jmp 0x41f8f3
cmp word [ebp - 0x224], 0x31
jne 0x41f8e4
push ebx
push str.__s_
push 0
push 0
lea eax, [ebp - 0x210]
push eax
mov eax, edi
sub eax, edx
sar eax, 1
push eax
push edx
call fcn.00401c00
mov edx, dword [ebp - 0x210]
add esp, 0x1c
add esi, 4
jmp 0x41f8f3
mov word [edx], cx
add edx, 2
mov dword [ebp - 0x210], edx
add esi, 2
cmp word [esi], 0
jne 0x41f7c4
mov edi, dword [ebp - 0x228]
xor eax, eax
mov word [edx], ax
mov esi, dword [edi + 4]
cmp word [esi], 0x22
jne 0x41f949
add esi, 2
mov ecx, esi
movzx eax, word [ecx]
mov edx, eax
test ax, ax
je 0x41f932
cmp ax, 0x22
je 0x41f932
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x41f920
xor eax, eax
cmp ecx, esi
jbe 0x41f93f
push ecx
push esi
call fcn.0047cff0
mov dword [edi], eax
mov eax, dword [ebp - 0x214]
jmp 0x41f99b
push str..exe
push esi
call fcn.0047e8dc
add esp, 8
test eax, eax
je 0x41f960
lea ecx, [eax + 8]
jmp 0x41f932
movzx eax, word [esi + 2]
mov ecx, esi
add esi, 2
mov edx, eax
test ax, ax
je 0x41f982
cmp ax, 0x20
je 0x41f982
movzx eax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x41f970
xor eax, eax
cmp esi, ecx
jbe 0x41f93f
push esi
push ecx
call fcn.0047cff0
mov dword [edi], eax
mov eax, dword [ebp - 0x214]
jmp 0x41f99b
xor eax, eax
push eax
call fcn.00457d30
push dword [ebp - 0x218]
call fcn.00457d30
add esp, 8
cmp dword [edi], 0
je 0x41f9d5
cmp dword [edi + 4], 0
je 0x41f9d5
cmp dword [edi + 0xc], 0
je 0x41f9d5
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047d2db
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0047d2db
mov esp, ebp
pop ebp
ret 0xc