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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47ca95
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x4b4200]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x38], ebx
cmp dword [ebx], 0
jne 0x401639
push 2
call fcn.0046a3df
add esp, 4
mov dword [ebx], eax
xor ecx, ecx
mov word [eax], cx
mov dword [ebx + 4], ecx
mov edi, dword [ebx]
push 0x20a
mov byte [ebx + 8], 1
mov dword [ebx + 4], 0
call fcn.0046a3df
xor ecx, ecx
mov dword [ebx], eax
add esp, 4
xor edx, edx
mov word [eax + 0x208], cx
test edi, edi
je 0x4016ae
cmp word [edi], cx
je 0x401677
nop dword [eax]
inc edx
cmp word [edi + edx*2], cx
jne 0x401670
xor esi, esi
cmp edx, 0x104
jle 0x40168b
mov edx, 0x104
mov dword [ebp - 0x34], edx
jmp 0x401692
mov dword [ebp - 0x34], edx
test edx, edx
jle 0x4016ae
mov ecx, dword [ebx]
mov ax, word [edi + esi*2]
mov word [ecx + esi*2], ax
inc esi
cmp esi, edx
jl 0x401692
mov eax, dword [ebx]
xor edx, edx
mov ecx, dword [ebp - 0x34]
mov word [eax + ecx*2], dx
jmp 0x4016ba
mov eax, dword [ebx]
xor ecx, ecx
mov word [eax + edx*2], cx
test edi, edi
je 0x4016c3
push edi
call fcn.00469dd3
add esp, 4
push 0
push dword [ebx]
call dword [sym.imp.SHLWAPI.dll_PathFindOnPathW]
test eax, eax
je 0x4016d8
mov al, 1
jmp 0x401bc6
mov eax, dword [ebx + 4]
test eax, eax
jne 0x4016fb
mov ecx, dword [ebx]
test ecx, ecx
je 0x4016f8
cmp word [ecx], ax
je 0x4016f8
nop word [eax + eax]
inc eax
cmp word [ecx + eax*2], 0
jne 0x4016f0
mov dword [ebx + 4], eax
cmp eax, 2
jl 0x401bc4
cmp dword [ebx], 0
mov ecx, 1
jne 0x401722
push 2
call fcn.0046a3df
add esp, 4
mov dword [ebx], eax
xor ecx, ecx
mov word [eax], cx
mov dword [ebx + 4], ecx
mov eax, dword [ebx]
cmp word [eax + ecx*2], 0x3a
je 0x401bc4
push 0
push 1
push 1
push 0
push 0x49eae8
mov ecx, ebx
call fcn.00406350
test eax, eax
jne 0x401bc4
xorps xmm0, xmm0
mov dword [ebp - 0x18], eax
movq qword [ebp - 0x20], xmm0
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
mov byte [ebp - 0x18], 1
mov dword [ebp - 4], eax
cmp dword [ebx], eax
jne 0x40177b
push 2
call fcn.0046a3df
add esp, 4
mov dword [ebx], eax
xor ecx, ecx
mov word [eax], cx
mov dword [ebx + 4], ecx
mov eax, dword [ebx]
xor esi, esi
mov byte [ebx + 8], 1
mov dword [ebp - 0x30], eax
mov byte [ebp - 0x18], 0
test eax, eax
je 0x40179b
cmp word [eax], si
je 0x40179b
inc esi
cmp word [eax + esi*2], 0
jne 0x401793
mov ecx, 2
mov dword [ebp - 0x1c], esi
lea eax, [esi + 1]
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0046a3df
add esp, 4
mov edi, eax
mov dword [ebp - 0x20], edi
test esi, esi
jle 0x4017ec
mov edx, dword [ebp - 0x30]
mov ecx, edi
sub edx, edi
mov ebx, esi
nop dword [eax + eax]
mov ax, word [edx + ecx]
lea ecx, [ecx + 2]
mov word [ecx - 2], ax
sub ebx, 1
jne 0x4017d0
xor eax, eax
mov byte [ebp - 0x18], 1
mov word [edi + esi*2], ax
jmp 0x401812
xor eax, eax
mov byte [ebp - 0x18], 1
mov word [edi + esi*2], ax
test esi, esi
jne 0x401812
cmp word [edi], ax
je 0x401807
nop
inc esi
cmp word [edi + esi*2], ax
jne 0x401800
mov dword [ebp - 0x1c], esi
test esi, esi
je 0x401898
push 0
push 1
push 0xffffffffffffffff
push 1
push 0x49eae8
lea ecx, [ebp - 0x20]
call fcn.00406350
push 0
push 1
push 0xffffffffffffffff
push 1
push 0x49eaec
lea ecx, [ebp - 0x20]
mov esi, eax
call fcn.00406350
test eax, eax
je 0x401892
cmp eax, esi
jl 0x401892
mov esi, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
test esi, esi
jne 0x40186b
xor esi, esi
test edi, edi
je 0x401868
cmp word [edi], si
je 0x401868
nop dword [eax + eax]
inc esi
cmp word [edi + esi*2], 0
jne 0x401860
mov dword [ebp - 0x1c], esi
cmp eax, esi
je 0x401898
lea ecx, [edi - 2]
lea ecx, [ecx + eax*2]
test ecx, ecx
je 0x401898
xor eax, eax
cmp word [ecx], ax
je 0x401898
inc eax
cmp word [ecx + eax*2], 0
jne 0x401880
test eax, eax
jne 0x40194f
jmp 0x401898
mov esi, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
mov byte [ebp - 0x18], 0
test esi, esi
jne 0x4018bb
test edi, edi
je 0x4018b8
cmp word [edi], si
je 0x4018b8
nop dword [eax]
inc esi
cmp word [edi + esi*2], 0
jne 0x4018b0
mov dword [ebp - 0x1c], esi
xor eax, eax
nop dword [eax]
inc eax
cmp word [eax*2 + str..exe], 0
jne 0x4018c0
add esi, eax
mov ecx, 2
lea eax, [esi + 1]
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0046a3df
add esp, 4
mov dword [ebp - 0x34], eax
mov edx, eax
test edi, edi
je 0x401917
movzx ecx, word [edi]
mov ebx, ecx
mov dword [ebp - 0x30], ebx
test cx, cx
je 0x401917
mov ebx, edi
movzx ecx, cx
sub ebx, eax
mov word [edx], cx
add edx, 2
movzx eax, word [edx + ebx]
mov ecx, eax
test ax, ax
jne 0x401906
mov ebx, str..exe
mov ecx, 0x2e
sub ebx, edx
mov word [edx], cx
lea edx, [edx + 2]
movzx eax, word [edx + ebx]
mov ecx, eax
test ax, ax
jne 0x401923
xor eax, eax
mov word [edx], ax
test edi, edi
je 0x401946
push edi
call fcn.00469dd3
add esp, 4
mov edi, dword [ebp - 0x34]
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], esi
mov byte [ebp - 0x18], 0
test esi, esi
jne 0x40196b
test edi, edi
je 0x401968
cmp word [edi], si
je 0x401968
inc esi
cmp word [edi + esi*2], 0
jne 0x401960
mov dword [ebp - 0x1c], esi
xor eax, eax
nop dword [eax]
inc eax
cmp word [eax*2 + str.HKLMSOFTWAREMicrosoftWindowsCurrentVersionApp_Paths_], 0
jne 0x401970
add eax, esi
mov ecx, 2
mov dword [ebp - 0x34], eax
inc eax
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0046a3df
mov ebx, str.HKLMSOFTWAREMicrosoftWindowsCurrentVersionApp_Paths_
mov dword [ebp - 0x30], eax
add esp, 4
mov edx, edi
mov ecx, eax
mov esi, 0x48
sub ebx, eax
nop dword [eax]
mov word [ecx], si
add ecx, 2
movzx eax, word [ebx + ecx]
mov esi, eax
test ax, ax
jne 0x4019b0
mov ebx, dword [ebp - 0x38]
test edi, edi
je 0x4019e6
movzx eax, word [edi]
mov esi, eax
test ax, ax
je 0x4019e6
movzx eax, ax
lea edx, [edx + 2]
mov word [ecx], ax
add ecx, 2
movzx eax, word [edx]
test ax, ax
jne 0x4019d2
xor eax, eax
mov word [ecx], ax
test edi, edi
je 0x4019f8
push edi
call fcn.00469dd3
add esp, 4
mov edi, dword [ebp - 0x30]
mov edx, 0x20019
mov eax, dword [ebp - 0x34]
push ecx
mov ecx, edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 1
call fcn.00409550
mov esi, eax
mov dword [ebp - 0x2c], esi
push edi
mov byte [ebp - 4], 2
call fcn.00469dd3
xor eax, eax
mov byte [ebp - 0x18], 1
add esp, 4
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
test esi, esi
je 0x401b9e
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
push 0
lea eax, [ebp - 0x28]
push eax
push 0
push 0x49eb08
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x401b9e
mov eax, dword [ebp - 0x28]
cmp eax, 1
je 0x401a7a
cmp eax, 2
je 0x401a7a
cmp eax, 7
jne 0x401b9e
mov eax, dword [ebp - 0x24]
mov ecx, 2
add eax, 4
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x24], eax
shr eax, 1
mov dword [ebp - 0x30], eax
inc eax
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0046a3df
mov edi, eax
mov byte [ebp - 0x18], 1
mov eax, dword [ebp - 0x30]
xor ecx, ecx
add esp, 4
mov dword [ebp - 0x34], edi
mov word [edi + eax*2], cx
mov word [edi], cx
mov dword [edi + eax*2 - 4], ecx
lea eax, [ebp - 0x24]
push eax
push edi
push ecx
push ecx
push 0x49eb08
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x401b9e
cmp dword [ebp - 0x28], 7
jne 0x401b11
mov ecx, dword [ebp - 0x30]
cmp ecx, 3
jbe 0x401b11
mov byte [ebp - 0x18], 1
add ecx, 0xffffffff
je 0x401b11
lea ebx, [eax + 0xa]
xor edx, edx
cmp dx, word [edi + eax*2]
jne 0x401b09
cmp word [edi + eax*2 + 2], dx
je 0x401b09
mov word [edi + eax*2], bx
inc eax
cmp eax, ecx
jb 0x401af6
mov ebx, dword [ebp - 0x38]
xor eax, eax
cmp word [edi], ax
je 0x401b20
inc eax
cmp word [edi + eax*2], 0
jne 0x401b18
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x401b9e
xor eax, eax
mov byte [ebp - 0x18], 1
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebx]
test eax, eax
je 0x401b45
push eax
call fcn.00469dd3
add esp, 4
mov dword [ebx], edi
mov dword [ebx + 4], 0
mov byte [ebx + 8], 1
test edi, edi
je 0x401b9a
push 0x2000
call fcn.0046a3df
add esp, 4
mov edi, eax
push 0x1000
push edi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [ebp - 0x30], eax
test eax, eax
jne 0x401b87
push edi
call fcn.00469dd3
add esp, 4
mov bl, 1
jmp 0x401ba4
push dword [ebx]
call fcn.00469dd3
mov eax, dword [ebp - 0x30]
add esp, 4
dec eax
mov dword [ebx], edi
mov dword [ebx + 4], eax
mov bl, 1
jmp 0x401ba4
xor bl, bl
test esi, esi
je 0x401bb0
cmp esi, 0xffffffff
je 0x401bb0
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x401bc0
push eax
call fcn.00469dd3
add esp, 4
mov al, bl
jmp 0x401bc6
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00469dc5
mov esp, ebp
pop ebp
ret 4