Function at 0x46c240
Capabilities:
Set registry value

Disassembly:
mov eax, 0x2000c
call fcn.00493810
mov eax, dword [esp + 0x20014]
push ebx
push ebp
push esi
push edi
mov esi, ecx
mov ebx, edx
test eax, eax
je 0x46c48b
test ebx, ebx
je 0x46c48b
cmp ebx, 0xfffffffe
je 0x46c48b
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x2002c]
lea edx, [esp + 0x14]
push edx
push 0
push 0x20006
push 0
push 0x4a59a4
push 0
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, eax
test edi, edi
jne 0x46c490
lea eax, [ebx - 1]
cmp eax, 6
ja case.0x46c2b1.5
jmp dword [eax*4 + 0x46c4c8]
mov eax, esi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x46c2c0
sub eax, edx
sar eax, 1
lea edx, [eax + eax + 2]
push edx
push esi
push 1
mov eax, dword [esp + 0x20038]
mov ecx, dword [esp + 0x1c]
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [esp + 0x10]
push edx
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x46c490
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x46c303
sub eax, edx
sar eax, 1
lea edx, [eax + eax + 2]
push edx
push esi
push 2
jmp 0x46c2d7
push 0xfffd
lea edx, [esp + 0x20]
push esi
push edx
call fcn.0048ad94
add esp, 0xc
xor eax, eax
mov word [esp + 0x20016], ax
lea eax, [esp + 0x1c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x46c340
sub eax, edx
sar eax, 1
xor ecx, ecx
mov word [esp + eax*2 + 0x1e], cx
test eax, eax
je 0x46c36a
cmp word [esp + eax*2 + 0x1a], 0xa
jne 0x46c36a
dec eax
xor edx, edx
mov word [esp + eax*2 + 0x1c], dx
cmp word [esp + 0x1c], 0
lea ecx, [esp + 0x1c]
je 0x46c38a
cmp word [ecx], 0xa
jne 0x46c381
xor edx, edx
mov word [ecx], dx
add ecx, 2
cmp word [ecx], 0
jne 0x46c376
test eax, eax
je 0x46c393
add eax, 2
jmp 0x46c395
xor eax, eax
mov edx, dword [esp + 0x2002c]
add eax, eax
push eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x20]
push ecx
push 7
push 0
push edx
push eax
jmp 0x46c2e6
cmp word [esi], 0
je 0x46c3c4
call fcn.00412710
mov dword [esp + 0x14], eax
jmp 0x46c3cc
mov dword [esp + 0x14], 0
mov edx, dword [esp + 0x2002c]
mov eax, dword [esp + 0x10]
push 4
lea ecx, [esp + 0x18]
push ecx
push 4
push 0
push edx
push eax
jmp 0x46c2e6
mov eax, esi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x46c3f0
sub eax, edx
sar eax, 1
mov ebp, eax
mov ecx, ebp
and ecx, 0x80000001
jns 0x46c410
dec ecx
or ecx, 0xfffffffe
inc ecx
jne case.0x46c2b1.5
xor ebx, ebx
xor edi, edi
test ebp, ebp
jle 0x46c473
cmp ebx, 0x1fffe
jae 0x46c473
xor edx, edx
lea ecx, [edx + 0x10]
jmp 0x46c430
movzx eax, word [esi + edi*2]
cmp eax, 0x30
jb 0x46c443
cmp eax, 0x39
ja 0x46c443
add eax, 0xffffffd0
jmp 0x46c45f
cmp eax, 0x41
jb 0x46c452
cmp eax, 0x46
ja 0x46c452
add eax, 0xffffffc9
jmp 0x46c45f
cmp eax, 0x61
jb 0x46c480
cmp eax, 0x66
ja 0x46c480
add eax, 0xffffffa9
imul eax, ecx
add edx, eax
inc edi
sub ecx, 0xf
jns 0x46c430
mov byte [esp + ebx + 0x1c], dl
inc ebx
cmp edi, ebp
jl 0x46c41e
push ebx
lea edx, [esp + 0x20]
push edx
push 3
jmp 0x46c2d7
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, 0x57
mov edx, dword [esp + 0x20020]
test edi, edi
setne al
movzx ecx, al
push edi
push ecx
push edx
call fcn.0042eda0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2000c
ret 0x10
mov edx, dword [esp + 0x10]
push edx
mov edi, 0x57
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x46c490