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

Disassembly:
mov rcx, qword gs:[0x28]
mov rcx, qword [rcx]
cmp rsp, qword [rcx + 0x10]
jbe 0x52241c
sub rsp, 0x78
mov qword [rsp + 0x70], rbp
lea rbp, [rsp + 0x70]
mov rax, qword [rsp + 0x80]
mov rcx, qword [rax]
cmp rcx, 2
jl 0x522412
mov rcx, qword [rax + 0xa0070]
test rcx, rcx
jne 0x5223c9
mov rcx, qword [rax + 0xa0090]
test rcx, rcx
jne 0x5223c9
mov rcx, qword [rsp + 0x90]
cmp rcx, 0x8000
jle 0x5223bc
lea rdx, [rcx - 0x8000]
cmp rdx, rcx
ja 0x5223b5
sub rcx, rdx
mov rbx, qword [rsp + 0x98]
sub rbx, rdx
dec rbx
sar rbx, 0x3f
xor rbx, 0xffffffffffffffff
and rdx, rbx
mov rbx, qword [rsp + 0x88]
add rdx, rbx
mov rbx, qword [rax + 0xa0078]
mov rsi, qword [rax + 0xa0080]
cmp rsi, rcx
jle 0x5223ad
mov qword [rsp + 0x40], rcx
mov qword [rsp], rbx
mov qword [rsp + 8], rdx
mov qword [rsp + 0x10], rcx
call fcn.00455480
mov rax, qword [rsp + 0x40]
lea rcx, [rax + 0xfc]
sar rcx, 0x3f
shr rcx, 0x38
lea rcx, [rax + rcx + 0xfc]
sar rcx, 8
mov qword [rsp + 0x30], rcx
xor edx, edx
mov qword [rsp + 0x38], rdx
cmp rdx, rcx
jge 0x5222a7
mov rbx, rdx
shl rdx, 8
mov qword [rsp + 0x50], rdx
lea rsi, [rdx + 0x103]
cmp rsi, rax
jle 0x5223a0
mov rsi, rax
mov rdi, qword [rsp + 0x80]
mov r8, qword [rdi + 0xa0088]
mov r9, qword [rdi + 0xa0078]
cmp rdx, rax
ja 0x522399
cmp rax, r8
ja 0x522399
sub rax, rdx
sub r8, rdx
lea r10, [r8 - 1]
sar r10, 0x3f
xor r10, 0xffffffffffffffff
and r10, rdx
add r9, r10
lea r10, [rax - 3]
mov qword [rsp + 0x48], r10
test r10, r10
jg 0x5222c7
lea rdx, [rbx + 1]
mov rax, rsi
mov qword [rsp + 0x38], rdx
cmp rdx, rcx
jl 0x522229
mov rcx, qword [rsp + 0x80]
mov qword [rcx + 0xa0090], rax
mov qword [rcx + 0xa0070], rax
mov rbp, qword [rsp + 0x70]
add rsp, 0x78
ret
lea r11, [rdi + 0xa00f0]
mov qword [rsp + 0x58], r11
test byte [r11], al
cmp r10, 0x101
ja 0x522392
mov r12, qword [rdi + 0x38]
mov qword [rsp], r9
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], r8
mov qword [rsp + 0x18], r11
mov qword [rsp + 0x20], r10
mov qword [rsp + 0x28], 0x101
mov rax, qword [r12]
mov rdx, r12
call rax
mov rax, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
xor edx, edx
xor edi, edi
cmp rdx, rcx
jge 0x522375
mov edi, dword [rsi]
lea r8, [rbx + rdx]
mov r9d, edi
and edi, 0x1ffff
mov r10d, dword [rax + rdi*4 + 0x68]
mov r11, r8
and r8, 0x7fff
mov dword [rax + r8*4 + 0x80068], r10d
mov r8, qword [rax + 0xa0068]
add r8, r11
mov dword [rax + rdi*4 + 0x68], r8d
add rsi, 4
inc rdx
mov edi, r9d
cmp rdx, rcx
jl 0x522331
mov dword [rax + 0xa00d0], edi
mov rcx, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, rax
jmp 0x522296
call fcn.00429450
ud2
call fcn.00429450
ud2
mov rax, rsi
mov rsi, qword [rsp + 0x40]
jmp 0x522248
mov rcx, rsi
jmp 0x5221e0
call fcn.00429450
ud2
mov rdx, qword [rsp + 0x88]
jmp 0x5221c9
lea rax, [0x006dcc7f]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], 0x31
lea rax, [0x0066fb00]
mov qword [rsp], rax
lea rax, [rsp + 0x60]
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
mov rbp, qword [rsp + 0x70]
add rsp, 0x78
ret
call fcn.00452210
jmp fcn.00522120