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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov eax, ecx
mov edi, edx
xor edx, edx
mov dword [ebp - 0x10], edi
lea ecx, [ebp - 4]
mov dword [ebp - 0xc], eax
push ecx
push edx
lea ecx, [ebp - 8]
mov esi, edx
push ecx
push edx
push dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, 0x80070057
test eax, eax
je 0x6460f9ea
cmp eax, 2
jne 0x6460f9e2
cmp dword [ebp + 0xc], esi
je 0x6460f9cf
mov ecx, dword [ebp + 0xc]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x6460f9b4
sub ecx, edx
sar ecx, 1
lea ecx, [ecx*2 + 2]
mov dword [ebp - 4], ecx
jmp 0x6460f9f6
push 2
push 0x64603560
call fcn.6460f585
pop ecx
pop ecx
jmp 0x6460fb2f
push eax
push 0x646035f0
jmp 0x6460f9d6
cmp dword [ebp - 8], edi
jne 0x6460fba2
mov ecx, dword [ebp - 4]
test ecx, ecx
jne 0x6460fa00
push 0x20
pop ecx
mov dword [ebp - 4], ecx
mov eax, ecx
lea edi, [ecx + 2]
and eax, 1
add edi, eax
mov ecx, edi
call fcn.6460d35d
mov esi, eax
test esi, esi
je 0x6460fb2f
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 8]
push eax
xor eax, eax
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
xor ecx, ecx
mov word [edi + esi - 2], cx
test byte [ebp - 4], 1
je 0x6460fa44
mov byte [edi + esi - 3], cl
test eax, eax
je 0x6460fabf
cmp eax, 2
jne 0x6460f9e2
cmp dword [ebp + 0xc], ecx
je 0x6460fab0
shr edi, 1
jne 0x6460fa65
mov eax, ebx
test edi, edi
je 0x6460fa77
xor eax, eax
mov word [esi], ax
mov eax, ebx
jmp 0x6460fa77
push ecx
push dword [ebp + 0xc]
mov edx, edi
push ecx
mov ecx, esi
call fcn.646052c7
test eax, eax
jns 0x6460fa82
push eax
push 0x64603630
jmp 0x6460f9d6
push dword [ebp - 4]
mov edi, dword [ebp - 0x10]
xor eax, eax
push esi
push edi
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x6460fac4
push eax
push dword [ebp + 8]
push 0x646036c8
call fcn.6460f585
add esp, 0xc
jmp 0x6460fb2f
push 0x64603670
call fcn.6460f585
jmp 0x6460f9dc
mov edi, dword [ebp - 0x10]
jmp 0x6460fac6
xor ecx, ecx
cmp edi, 2
jne 0x6460fb09
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
test edi, edi
je 0x6460fb2f
lea ecx, [edi*2 + 2]
mov dword [ebp - 4], ecx
call fcn.6460d35d
mov ebx, eax
test ebx, ebx
je 0x6460fb2a
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x6460fb10
cmp eax, edi
jg 0x6460fb10
mov ecx, esi
call fcn.6460d3c9
mov esi, ebx
mov eax, esi
jmp 0x6460fba4
mov ecx, ebx
call fcn.6460d3c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x64603710
call fcn.6460f585
pop ecx
pop ecx
mov ebx, 0x80070057
mov ecx, esi
call fcn.6460d3c9
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x6460fba2
mov ecx, edi
xor esi, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x6460fb44
sub ecx, edx
sar ecx, 1
lea ecx, [ecx*2 + 2]
mov dword [ebp - 4], ecx
call fcn.6460d35d
mov esi, eax
test esi, esi
je 0x6460fba2
mov edx, dword [ebp - 4]
shr edx, 1
jne 0x6460fb7a
test edx, edx
je 0x6460fb8e
xor eax, eax
mov word [esi], ax
jmp 0x6460fb8e
push ecx
push edi
push ecx
mov ecx, esi
call fcn.646052c7
mov ebx, eax
test ebx, ebx
jns 0x6460fb09
push ebx
push 0x64603764
call fcn.6460f585
pop ecx
pop ecx
mov ecx, esi
call fcn.6460d3c9
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0xc