Function at 0x4aefd4
Capabilities:
Set registry value

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], r9
mov qword [rax + 0x18], r8
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x2160
call fcn.006e5e00
sub rsp, rax
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov r15, r8
mov r12, rdx
mov r14, rcx
xor ebx, ebx
mov word [rsp + 0x30], bx
lea rdx, [rsp + 0x160]
call fcn.004af6b4
cmp eax, ebx
jl 0x4af45c
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x160]
call fcn.004aeeac
cmp eax, ebx
jne 0x4af04d
mov eax, 0x80020009
jmp 0x4af45c
mov esi, reloc.WS2_32.dll_listen
mov rcx, qword [r14]
movzx eax, word [rcx]
cmp eax, 9
jl 0x4af076
cmp eax, 0xa
jle 0x4af06b
cmp eax, esi
je 0x4af06b
cmp eax, 0x20
jne 0x4af076
call qword [sym.imp.USER32.dll_CharNextW]
mov qword [r14], rax
jmp 0x4af052
lea rdx, [rsp + 0x160]
mov rcx, r14
call fcn.004af6b4
cmp eax, ebx
jl 0x4af45c
movzx eax, word [rsp + 0x30]
cmp eax, 8
je 0x4af3fd
cmp eax, 0x11
je 0x4af270
cmp eax, 0x13
je 0x4af21f
cmp eax, 0x4008
jne 0x4af445
lea rcx, [rsp + 0x160]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 2
mov qword [rsp + 0x50], rbx
movsxd rcx, eax
cmp rcx, rbx
je 0x4af10e
xor edx, edx
or rax, 0xffffffffffffffff
div rcx
cmp rax, 2
jb 0x4af104
lea rdx, [rcx + rcx]
cmp rdx, 0x100
jbe 0x4af10e
lea rcx, [rsp + 0x50]
call fcn.00444f84
mov rdi, qword [rsp + 0x50]
jmp 0x4af118
mov ecx, 0x80070057
call fcn.00401c88
lea rdi, [rsp + 0x58]
mov qword [rsp + 0x50], rdi
jmp 0x4af134
cmp rdi, rbx
je 0x4af1fd
lea r12, [rsp + 0x160]
cmp word [rsp + 0x160], bx
je 0x4af196
mov r13d, gethostbyname
mov rcx, r12
call qword [sym.imp.USER32.dll_CharNextW]
movzx ecx, word [r12]
cmp cx, 0x5c
jne 0x4af184
cmp word [rax], r13w
jne 0x4af184
mov word [rdi], bx
add rdi, 2
mov rcx, rax
call qword [sym.imp.USER32.dll_CharNextW]
mov r12, rax
jmp 0x4af18f
mov word [rdi], cx
add rdi, 2
add r12, 2
cmp word [r12], bx
jne 0x4af155
mov word [rdi], bx
mov word [rdi + 2], bx
mov rdi, qword [rsp + 0x50]
mov eax, ebx
cmp rdi, rbx
setne al
cmp eax, ebx
je 0x4af202
mov r12d, ebx
mov rsi, rdi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea r11d, [rax + 1]
lea rsi, [rsi + r11*2]
lea r12d, [r12 + r11*2]
cmp r11d, 1
jne 0x4af1b4
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], rdi
lea r9d, [r11 + 6]
xor r8d, r8d
mov rdx, r15
mov rcx, qword [rsp + 0x21a8]
mov rcx, qword [rcx]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
mov rdi, qword [rsp + 0x50]
jmp 0x4af202
mov esi, reloc.WS2_32.dll_ntohl
lea rax, [rsp + 0x58]
cmp rdi, rax
je 0x4af438
lea rcx, [rsp + 0x50]
call fcn.004aefcc
jmp 0x4af438
lea r9, [rsp + 0x30]
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x160]
call qword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov r11d, dword [rsp + 0x30]
mov dword [rsp + 0x38], r11d
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
mov rdx, r15
mov rcx, qword [r12]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
jmp 0x4af438
lea rcx, [rsp + 0x160]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
mov dword [rsp + 0x38], eax
test al, 1
je 0x4af292
mov eax, 0x80004005
jmp 0x4af45c
cdq
sub eax, edx
sar eax, 1
movsxd rsi, eax
mov dword [rsp + 0x30], esi
mov qword [rsp + 0x50], rbx
mov rcx, rsi
cmp rsi, rbx
je 0x4af2e1
xor edx, edx
or rax, 0xffffffffffffffff
div rcx
cmp rax, 1
jae 0x4af2c4
mov ecx, 0x80070057
call fcn.00401c88
cmp rcx, 0x100
jbe 0x4af2e1
mov rdx, rcx
lea rcx, [rsp + 0x50]
call fcn.00444f84
mov rcx, qword [rsp + 0x50]
jmp 0x4af2eb
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x50], rcx
jmp 0x4af314
cmp rcx, rbx
jne 0x4af337
lea rax, [rsp + 0x58]
cmp rax, rbx
je 0x4af32d
lea rcx, [rsp + 0x50]
call fcn.004aefcc
mov eax, 0x80004005
jmp 0x4af45c
movsxd r8, esi
xor edx, edx
call fcn.006aba40
mov r11d, ebx
mov r8, rbx
movsxd r9, edi
cmp r9, rbx
jle 0x4af3bf
mov r13d, gethostbyname
mov eax, r11d
cdq
sub eax, edx
sar eax, 1
movsxd r10, eax
add r10, qword [rsp + 0x50]
movzx edx, word [rsp + r8*2 + 0x160]
mov eax, edx
cmp edx, r13d
jl 0x4af39b
cmp eax, 0x39
jle 0x4af396
cmp eax, 0x40
jle 0x4af39b
cmp eax, 0x46
jle 0x4af391
add eax, 0xffffff9f
cmp eax, 5
ja 0x4af39b
sub dl, 0x57
jmp 0x4af39d
sub dl, 0x37
jmp 0x4af39d
sub dl, r13b
jmp 0x4af39d
mov dl, bl
mov ecx, r11d
and ecx, 1
shl ecx, 2
mov eax, 4
sub eax, ecx
mov cl, al
shl dl, cl
or byte [r10], dl
inc r11d
inc r8
cmp r8, r9
jl 0x4af355
mov dword [rsp + 0x28], esi
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 3
xor r8d, r8d
mov rdx, r15
mov rcx, qword [r12]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
lea rax, [rsp + 0x58]
cmp qword [rsp + 0x50], rax
je 0x4af438
lea rcx, [rsp + 0x50]
call fcn.004aefcc
jmp 0x4af438
lea rcx, [rsp + 0x160]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [rax + rax + 2]
mov dword [rsp + 0x28], eax
lea rax, [rsp + 0x160]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
mov rdx, r15
mov rcx, qword [r12]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
cmp esi, ebx
je 0x4af445
mov ecx, esi
call fcn.004af6a4
jmp 0x4af45c
mov rdx, qword [rsp + 0x21b8]
mov rcx, r14
call fcn.004af6b4
cmp eax, ebx
cmovl ebx, eax
mov eax, ebx
add rsp, 0x2160
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret