Function at 0x46ade8
Capabilities:
Set registry value

Disassembly:
push ebx
mov edx, 0xf
sub esp, 4
mov dword [esp], 0
dec edx
jne 0x46adee
mov edx, dword [esp + 0x44]
lea ecx, [esp]
call fcn.004010f0
mov edx, dword [esp + 0x48]
lea ecx, [esp + 4]
call fcn.004010f0
mov edx, dword [esp + 0x4c]
lea ecx, [esp + 8]
call fcn.004010f0
push dword [esp]
call fcn.0046a32a
mov dword [esp + 0x10], eax
push dword [0x465e94]
push dword [esp + 4]
call fcn.0046a280
lea eax, [esp + 0x18]
push eax
call fcn.0040c7c0
mov ebx, dword [esp + 0x54]
cmp ebx, 0x20
jne 0x46ae59
mov dword [esp + 0x54], 0x200
jmp 0x46ae6a
mov ebx, dword [esp + 0x54]
cmp ebx, 0x40
jne 0x46ae6a
mov dword [esp + 0x54], 0x100
push 0
lea eax, [esp + 0x10]
push eax
push 0
mov ebx, dword [esp + 0x60]
or ebx, 0x20006
push ebx
push 0
push 0
push 0
push dword [esp + 0x30]
push dword [esp + 0x30]
call sub.ADVAPI32.dll_RegCreateKeyExW
mov ebx, eax
and ebx, ebx
jne 0x46b13c
push dword [esp + 0x50]
mov ebx, 1
cmp ebx, dword [esp]
je 0x46aec2
mov ebx, 2
cmp ebx, dword [esp]
jne 0x46aeec
push dword [esp + 0xc]
call fcn.0040bfc0
push eax
mov eax, dword [esp + 0x10]
push eax
push dword [esp + 0x5c]
push 0
push dword [esp + 0x18]
push dword [esp + 0x24]
call sub.ADVAPI32.dll_RegSetValueExW
jmp 0x46b132
mov ebx, 4
cmp ebx, dword [esp]
jne 0x46af28
push dword [esp + 0xc]
call fcn.0040c1f0
mov dword [esp + 0x1c], eax
push 4
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x5c]
push 0
push dword [esp + 0x18]
push dword [esp + 0x24]
call sub.ADVAPI32.dll_RegSetValueExW
jmp 0x46b132
mov ebx, 0xb
cmp ebx, dword [esp]
jne 0x46af64
push dword [esp + 0xc]
call fcn.0040c1f0
mov dword [esp + 0x1c], eax
push 8
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x5c]
push 0
push dword [esp + 0x18]
push dword [esp + 0x24]
call sub.ADVAPI32.dll_RegSetValueExW
jmp 0x46b132
mov ebx, 3
cmp ebx, dword [esp]
jne 0x46b03e
push dword [esp + 0xc]
call fcn.0040b780
mov ebx, eax
mov eax, ebx
mov ecx, 2
cdq
idiv ecx
mov ebx, eax
mov dword [esp + 0x20], ebx
push dword [esp + 0x20]
call fcn.0040c340
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], 0
jmp 0x46afa4
mov ebx, dword [esp + 0x20]
dec ebx
cmp ebx, dword [esp + 0x30]
jl 0x46b012
push dword [0x465e94]
mov edx, 0x45f25c
push edx
call fcn.0040c820
push dword [0x465e94]
push dword [0x465e94]
push 2
mov ebx, dword [esp + 0x40]
add ebx, ebx
inc ebx
push ebx
push dword [esp + 0x20]
call fcn.0040b7b0
pop eax
lea eax, [esp + 0x2c]
push eax
call fcn.0040c7c0
push dword [esp + 0x28]
call fcn.0040c1f0
mov dword [esp + 0x2c], eax
push dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
add ebx, dword [esp + 0x34]
push ebx
call fcn.0040c580
inc dword [esp + 0x30]
jno 0x46afa4
push dword [esp + 0x20]
push dword [esp + 0x28]
push dword [esp + 0x5c]
push 0
push dword [esp + 0x18]
push dword [esp + 0x24]
call sub.ADVAPI32.dll_RegSetValueExW
push dword [esp + 0x24]
call fcn.0040c430
jmp 0x46b132
mov ebx, 7
cmp ebx, dword [esp]
jne 0x46b132
push dword [esp + 0xc]
call fcn.0040bfc0
mov ebx, eax
add ebx, 2
mov dword [esp + 0x20], ebx
push dword [esp + 0x20]
call fcn.0040c340
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0xc]
push eax
pop eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], 0
jmp 0x46b07f
mov ebx, dword [esp + 0x20]
add ebx, 0xfffffffe
cmp ebx, dword [esp + 0x30]
jl 0x46b0f8
mov ebx, dword [esp + 0x34]
add ebx, dword [esp + 0x30]
push ebx
call fcn.0040c490
push eax
pop eax
mov word [esp + 0x38], ax
movzx ebx, word [esp + 0x38]
mov eax, 0xa
cmp ebx, eax
je 0x46b0f1
movzx ebx, word [esp + 0x38]
mov eax, 0xd
cmp ebx, eax
jne 0x46b0d2
push 0
mov ebx, dword [esp + 0x28]
add ebx, dword [esp + 0x40]
push ebx
call fcn.0040c590
jmp 0x46b0e6
movzx eax, word [esp + 0x38]
push eax
mov ebx, dword [esp + 0x28]
add ebx, dword [esp + 0x40]
push ebx
call fcn.0040c590
mov ebx, dword [esp + 0x3c]
add ebx, 2
mov dword [esp + 0x3c], ebx
add dword [esp + 0x30], 2
jno 0x46b07f
push 0
mov ebx, dword [esp + 0x28]
add ebx, dword [esp + 0x40]
push ebx
call fcn.0040c590
push dword [esp + 0x3c]
push dword [esp + 0x28]
push dword [esp + 0x5c]
push 0
push dword [esp + 0x18]
push dword [esp + 0x24]
call sub.ADVAPI32.dll_RegSetValueExW
push dword [esp + 0x24]
call fcn.0040c430
pop eax
push dword [esp + 0xc]
call sub.ADVAPI32.dll_RegCloseKey
xor eax, eax
push dword [esp + 0x24]
call fcn.0040c870
push dword [esp + 4]
call fcn.0040c870
push dword [esp + 0x14]
call fcn.0040c870
push dword [esp]
call fcn.0040c870
push dword [esp + 8]
call fcn.0040c870
add esp, 0x3c
pop ebx
ret 0x14