Function at 0x4aeef0
Capabilities:
Reference http user-agent string

Disassembly:
mov rcx, qword gs:[0x28]
mov rcx, qword [rcx]
cmp rsp, qword [rcx + 0x10]
jbe 0x4af3fb
sub rsp, 0x50
mov qword [rsp + 0x48], rbp
lea rbp, [rsp + 0x48]
movzx ecx, byte [rsp + 0x70]
test cl, cl
je 0x4af3ef
mov rcx, qword [rsp + 0x60]
test rcx, rcx
setl dl
mov byte [rsp + 0x37], dl
test dl, dl
je 0x4aef3b
neg rcx
mov qword [rsp + 0x60], rcx
mov rbx, qword [rsp + 0x58]
lea rsi, [rbx + 0x28]
test byte [rsi], al
movzx edi, byte [rbx + 8]
test dil, dil
je 0x4af3cf
mov rdi, qword [rbx + 0x18]
mov r8, qword [rbx + 0x20]
lea rdi, [rdi + r8 + 3]
cmp rdi, 0x44
jg 0x4af392
mov rax, 0x44
mov rdi, 0x44
movzx r8d, byte [rbx + 9]
test r8b, r8b
je 0x4af344
mov r8, qword [rbx + 0x20]
test r8, r8
jne 0x4aef9d
test rcx, rcx
je 0x4af30f
mov r9, qword [rsp + 0x68]
cmp r9, 8
jg 0x4af25a
cmp r9, 2
jne 0x4af1d2
mov r10, rax
cmp rcx, 2
jb 0x4aefeb
lea r11, [rax - 1]
cmp r11, r10
jae 0x4af1cb
mov r12, rcx
and rcx, 1
lea r13, [rcx + 0x30]
mov byte [rsi + rax - 1], r13b
shr r12, 1
mov rcx, r12
mov rax, r11
cmp rcx, 2
jae 0x4aefbf
mov r11, qword [rsp + 0x80]
cmp rcx, r11
jae 0x4af1c4
lea r12, [rax - 1]
mov r13, qword [rsp + 0x78]
movzx ecx, byte [r13 + rcx]
cmp r12, r10
jae 0x4af1c4
mov byte [rsi + rax - 1], cl
test r12, r12
jle 0x4af047
mov rax, r10
sub r10, r12
cmp r8, r10
jle 0x4af04a
lea rcx, [r12 - 1]
cmp rcx, rax
jae 0x4af1bd
mov byte [rsi + r12 - 1], 0x30
mov r10, rax
mov r12, rcx
test r12, r12
jg 0x4af01d
mov rax, r10
movzx ecx, byte [rbx + 0xc]
test cl, cl
je 0x4af1b3
cmp r9, 8
jne 0x4af164
cmp r12, rax
jae 0x4af15d
movzx ecx, byte [rsi + r12]
cmp cl, 0x30
je 0x4af153
lea rcx, [r12 - 1]
cmp rcx, rax
jae 0x4af14c
mov byte [rsi + r12 - 1], 0x30
test dl, dl
je 0x4af103
lea rdx, [rcx - 1]
cmp rdx, rax
jae 0x4af0fc
mov byte [rsi + rcx - 1], 0x2d
movzx ecx, byte [rbx + 0xe]
mov byte [rsp + 0x36], cl
mov byte [rbx + 0xe], 0
cmp rdx, rax
ja 0x4af0f5
mov qword [rsp], rbx
sub rdi, rdx
lea r8, [rdi - 1]
sar r8, 0x3f
xor r8, 0xffffffffffffffff
and r8, rdx
add rsi, r8
mov qword [rsp + 8], rsi
sub rax, rdx
mov qword [rsp + 0x10], rax
mov qword [rsp + 0x18], rdi
call fcn.004ae300
movzx eax, byte [rsp + 0x36]
mov rcx, qword [rsp + 0x58]
mov byte [rcx + 0xe], al
mov rbp, qword [rsp + 0x48]
add rsp, 0x50
ret
call fcn.00429450
ud2
call fcn.004293e0
ud2
movzx edx, byte [rbx + 0xb]
test dl, dl
je 0x4af122
lea rdx, [rcx - 1]
cmp rdx, rax
jae 0x4af11b
mov byte [rsi + rcx - 1], 0x2b
jmp 0x4af09d
call fcn.004293e0
ud2
movzx edx, byte [rbx + 0xd]
test dl, dl
je 0x4af144
lea rdx, [rcx - 1]
cmp rdx, rax
jae 0x4af13d
mov byte [rsi + rcx - 1], 0x20
jmp 0x4af09d
call fcn.004293e0
ud2
mov rdx, rcx
jmp 0x4af09d
call fcn.004293e0
ud2
test dl, dl
mov rcx, r12
jmp 0x4af08d
call fcn.004293e0
ud2
cmp r9, 0x10
jne 0x4af1a9
cmp r11, 0x10
jbe 0x4af1a2
lea rcx, [r12 - 1]
movzx r8d, byte [r13 + 0x10]
cmp rcx, rax
jae 0x4af1a2
mov byte [rsi + r12 - 1], r8b
lea rcx, [r12 - 2]
cmp rcx, rax
jae 0x4af19b
mov byte [rsi + r12 - 2], 0x30
test dl, dl
jmp 0x4af08d
call fcn.004293e0
ud2
call fcn.004293e0
ud2
test dl, dl
mov rcx, r12
jmp 0x4af08d
test dl, dl
mov rcx, r12
jmp 0x4af08d
call fcn.004293e0
ud2
call fcn.004293e0
ud2
call fcn.004293e0
ud2
cmp r9, 8
jne 0x4af211
mov r10, rax
cmp rcx, 8
jb 0x4aefeb
lea r11, [rax - 1]
cmp r11, r10
jae 0x4af20a
mov r12, rcx
and rcx, 7
lea r13, [rcx + 0x30]
mov byte [rsi + rax - 1], r13b
shr r12, 3
mov rcx, r12
mov rax, r11
jmp 0x4af1db
call fcn.004293e0
ud2
lea rax, [0x006d85c4]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], 0x1f
lea rax, [0x0066fb00]
mov qword [rsp], rax
lea rax, [rsp + 0x38]
mov qword [rsp + 8], rax
call fcn.0040ccd0
mov rax, qword [rsp + 0x10]
mov rcx, qword [rsp + 0x18]
mov qword [rsp], rax
mov qword [rsp + 8], rcx
call fcn.0042a540
ud2
cmp r9, 0xa
jne 0x4af2b2
mov r10, rax
cmp rcx, 0xa
jb 0x4aefeb
lea r11, [rax - 1]
mov r12, rax
movabs rax, 0xcccccccccccccccd
mov r13d, edx
mul rcx
shr rdx, 3
lea r14, [rdx + rdx*4]
add rcx, 0x30
shl r14, 1
sub rcx, r14
cmp r11, r10
jae 0x4af2ab
mov byte [rsi + r12 - 1], cl
mov rcx, rdx
mov rax, r11
mov edx, r13d
jmp 0x4af263
call fcn.004293e0
ud2
cmp r9, 0x10
jne 0x4af211
mov r10, qword [rsp + 0x78]
mov r11, qword [rsp + 0x80]
mov r12, rax
cmp rcx, 0x10
jb 0x4af300
mov r13, rcx
and rcx, 0xf
cmp rcx, r11
jae 0x4af308
lea r14, [rax - 1]
movzx ecx, byte [r10 + rcx]
cmp r14, r12
jae 0x4af308
mov byte [rsi + rax - 1], cl
shr r13, 4
mov rcx, r13
mov rax, r14
cmp rcx, 0x10
jae 0x4af2d2
mov r10, r12
jmp 0x4aefeb
call fcn.004293e0
ud2
movzx eax, byte [rbx + 0xe]
mov byte [rsp + 0x35], al
mov byte [rbx + 0xe], 0
mov rcx, qword [rbx + 0x18]
mov qword [rsp + 8], rcx
mov qword [rsp], rbx
call fcn.004ae180
movzx eax, byte [rsp + 0x35]
mov rcx, qword [rsp + 0x58]
mov byte [rcx + 0xe], al
mov rbp, qword [rsp + 0x48]
add rsp, 0x50
ret
movzx r8d, byte [rbx + 0xe]
test r8b, r8b
je 0x4af38a
movzx r8d, byte [rbx + 8]
test r8b, r8b
je 0x4af382
mov r8, qword [rbx + 0x18]
test dl, dl
je 0x4af368
dec r8
jmp 0x4aef9d
movzx r9d, byte [rbx + 0xb]
test r9b, r9b
jne 0x4af360
movzx r9d, byte [rbx + 0xd]
test r9b, r9b
je 0x4aef9d
jmp 0x4af360
xor r8d, r8d
jmp 0x4aef9d
xor r8d, r8d
jmp 0x4aef9d
lea rax, [0x0066fcc0]
mov qword [rsp], rax
mov qword [rsp + 8], rdi
mov qword [rsp + 0x10], rdi
call fcn.0043e630
mov rax, qword [rsp + 0x20]
mov rdi, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x18]
mov rcx, qword [rsp + 0x60]
movzx edx, byte [rsp + 0x37]
mov rbx, qword [rsp + 0x58]
jmp 0x4aef7d
movzx edi, byte [rbx + 9]
test dil, dil
jne 0x4aef58
mov rdi, 0x44
mov rax, 0x44
jmp 0x4aef7d
mov rcx, qword [rsp + 0x60]
xor edx, edx
jmp 0x4aef30
call fcn.00452210
jmp fcn.004aeef0