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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push esi
mov ebx, ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [ebx + 0xaecc]
mov ecx, eax
rep movsw word es:[edi], word [esi]
cmp word [ebx + eax*2 + 0xaeca], 0x5c
je 0x40af37
mov word [ebx + eax*2 + 0xaecc], 0x5c
inc eax
mov ecx, 0x104
sub ecx, eax
push ecx
push dword [ebp + 0xc]
lea eax, [ebx + eax*2 + 0xaecc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0x10]
push dword [eax]
xor esi, esi
push esi
lea edi, [ebx + 0xaecc]
push edi
push 0x80000003
mov dword [ebp - 4], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, esi
jne 0x40b0d5
cmp dword [0x4177cc], 2
jne 0x40b0d2
push 0x403e3c
push dword [ebp + 8]
mov word [edi], si
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x40afb1
push 0x105
push edi
push 0x404428
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
jmp 0x40b0b8
mov eax, dword [ebp + 8]
cmp word [eax], si
je 0x40b0ce
mov esi, 0x403cf0
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, eax
rep movsw word es:[edi], word [esi]
cmp word [ebx + eax*2 + 0xaeca], 0x5c
je 0x40afe4
mov word [ebx + eax*2 + 0xaecc], 0x5c
inc eax
mov esi, dword [ebp + 8]
push dword [ebp + 8]
lea ecx, [eax + eax + 2]
lea edi, [ebx + eax*2 + 0xaecc]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
and dword [ebp + 0x10], 0
lea eax, [ebp + 0x10]
push eax
push 0xf003f
push 0
lea esi, [ebx + 0xaecc]
push esi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40b03c
push 0x1128
mov ecx, ebx
call fcn.0040a31d
jmp 0x40b0a9
lea eax, [ebp - 8]
push eax
lea edi, [ebx + 0xb0d6]
push edi
lea eax, [ebp - 0xc]
push eax
push 0
push 0x403dec
push dword [ebp + 0x10]
mov dword [ebp - 0xc], 1
mov dword [ebp - 8], 0x20a
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40b098
push esi
lea edi, [ebx + 0xb2e0]
push 0x4043d0
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0x42000
push edi
push dword [ebx + 0xa27c]
mov ecx, ebx
call fcn.00409cc1
jmp 0x40b0a9
and word [esi], 0
push 0x105
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp dword [ebp + 0x10], 0
je 0x40b0b8
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebx + 0xaecc]
push eax
push dword [ebp + 0xc]
mov ecx, ebx
push dword [ebp - 4]
call dword [ebp + 0x14]
mov esi, eax
jmp 0x40b116
xor eax, eax
jmp 0x40b127
push esi
jmp 0x40b0bf
cmp eax, 2
push dword [ebp + 0xc]
jne 0x40b0f7
push 0x404318
add ebx, 0xb2e0
push ebx
call dword [sym.imp.USER32.dll_wsprintfW]
xor esi, esi
add esp, 0xc
inc esi
jmp 0x40b116
lea esi, [ebx + 0xb2e0]
push 0x404394
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push esi
mov ecx, ebx
call fcn.0040a35f
xor esi, esi
cmp dword [ebp - 4], 0
je 0x40b125
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0x10