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

Disassembly:
cmp rsp, qword [r14 + 0x10]
jbe 0x40d32a
sub rsp, 0x70
mov qword [rsp + 0x68], rbp
lea rbp, [rsp + 0x68]
cmp dword [0x00a7c730], 2
nop
je 0x40d318
test rax, rax
je 0x40d28b
cmp byte [0x00a7cda0], 0
je 0x40cae3
cmp dword [0x00a7cdac], 0
je 0x40cac3
test rbx, rbx
je 0x40caa5
test rax, 7
jne 0x40ca80
mov edx, 8
jmp 0x40caaa
test rax, 3
jne 0x40ca8f
mov edx, 4
jmp 0x40caaa
test rax, 1
mov edx, 1
mov esi, 2
cmove rdx, rsi
jmp 0x40caaa
mov edx, 0x10
mov rbx, rdx
lea rcx, [0x00a81080]
call fcn.0040d780
mov rbp, qword [rsp + 0x68]
add rsp, 0x70
ret
cmp byte [0x00a7cb60], 0
je 0x40cae3
mov rdx, qword [0x00a7cb68]
cmp qword [r14 + 0x98], rdx
jne 0x40cae3
inc qword [0x00a7cb70]
mov byte [rsp + 0x88], cl
mov qword [rsp + 0x80], rbx
mov qword [rsp + 0x78], rax
cmp dword [0x00a7c728], 0
nop
je 0x40cb5b
mov rdx, qword [r14 + 0x30]
mov rdx, qword [rdx + 0x90]
test rdx, rdx
jne 0x40cb1c
mov qword [rsp + 0x58], r14
mov rdx, qword [rsp + 0x58]
mov rsi, qword [rdx + 0x180]
sub rsi, rax
mov qword [rdx + 0x180], rsi
test rsi, rsi
jge 0x40cb5d
mov qword [rsp + 0x60], rdx
mov rax, rdx
call fcn.0041cc20
mov rax, qword [rsp + 0x78]
movzx ecx, byte [rsp + 0x88]
mov rdx, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x80]
jmp 0x40cb5d
xor edx, edx
mov rsi, qword [r14 + 0x30]
nop
inc dword [rsi + 0xd8]
mov rsi, qword [r14 + 0x30]
mov r8, r14
test byte [r8], al
cmp dword [rsi + 0xc0], 0
jne 0x40d307
mov r8, r14
cmp qword [rsi + 0x50], r8
je 0x40d2f6
mov dword [rsi + 0xc0], 1
mov r8, qword [rsi + 0xa0]
nop dword [rax]
test r8, r8
je 0x40cbab
mov r8, qword [r8 + 0x40]
jmp 0x40cbb2
mov r8, qword [0x00a7c888]
test r8, r8
je 0x40d2e5
nop dword [rax + rax]
test rbx, rbx
je 0x40cbd0
cmp qword [rbx + 8], 0
sete r9b
jmp 0x40cbd6
mov r9d, 1
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x38], r8
mov byte [rsp + 0x26], r9b
mov qword [rsp + 0x58], rdx
cmp rax, 0x8000
ja 0x40cfb3
test r9b, r9b
je 0x40cda7
nop
cmp rax, 0x10
jae 0x40cda7
mov r10, qword [r8 + 0x18]
test rax, 7
jne 0x40cc22
add r10, 7
and r10, 0xfffffffffffffff8
nop
jmp 0x40cc42
test rax, 3
jne 0x40cc34
add r10, 3
and r10, 0xfffffffffffffffc
jmp 0x40cc42
bt eax, 0
jb 0x40cc42
nop
inc r10
and r10, 0xfffffffffffffffe
lea r11, [rax + r10]
cmp r11, 0x10
ja 0x40cca1
mov r12, qword [r8 + 0x10]
test r12, r12
je 0x40cca1
lea rax, [r12 + r10]
mov qword [r8 + 0x18], r11
inc qword [r8 + 0x20]
mov dword [rsi + 0xc0], 0
nop
mov ecx, dword [rsi + 0xd8]
lea edx, [rcx - 1]
mov dword [rsi + 0xd8], edx
nop dword [rax + rax]
cmp ecx, 1
jne 0x40cc97
cmp byte [r14 + 0xb1], 0
je 0x40cc97
mov qword [r14 + 0x10], 0xfffffffffffffade
mov rbp, qword [rsp + 0x68]
add rsp, 0x70
ret
mov r10, qword [r8 + 0x50]
mov r11, qword [r10 + 0x40]
bsf r12, r11
mov r13d, 0x40
cmove r12, r13
cmp r12, 0x40
jge 0x40cd2f
mov r13, qword [r10 + 0x30]
lea r15, [r13 + r12]
mov rcx, rdx
mov rdx, qword [r10 + 0x38]
cmp rdx, r15
jbe 0x40cd32
lea r13, [r13 + r12]
lea r13, [r13 + 1]
nop dword [rax + rax]
test r13, 0x3f
jne 0x40ccf5
cmp rdx, r13
je 0x40ccf5
mov rdi, rcx
xor edx, edx
jmp 0x40cd37
lea rdx, [r12 + 1]
cmp rdx, 0x40
sbb r12, r12
mov rdi, rcx
mov rcx, rdx
shr r11, cl
and r11, r12
mov qword [r10 + 0x40], r11
mov qword [r10 + 0x30], r13
movzx edx, word [r10 + 0x60]
inc edx
mov word [r10 + 0x60], dx
mov rdx, qword [r10 + 0x68]
imul rdx, r15
add rdx, qword [r10 + 0x18]
jmp 0x40cd37
mov rcx, rdx
mov rdi, rcx
xor edx, edx
test rdx, rdx
je 0x40cd42
xor ecx, ecx
nop
jmp 0x40cd77
mov rax, r8
mov ebx, 5
call fcn.0040c800
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x58]
mov r8, qword [rsp + 0x38]
movzx r9d, byte [rsp + 0x26]
mov rdx, rax
mov r10, rbx
mov rax, qword [rsp + 0x78]
mov rbx, qword [rsp + 0x80]
movups xmmword [rdx], xmm15
nop dword [rax + rax]
cmp qword [r8 + 0x18], rax
ja 0x40cd8d
cmp qword [r8 + 0x10], 0
jne 0x40cd9a
mov r11, rdx
mov qword [r8 + 0x10], rdx
mov qword [r8 + 0x18], rax
jmp 0x40cd9d
mov r11, rdx
mov edx, 0x10
jmp 0x40cfab
cmp rax, 0x3f8
ja 0x40cddb
lea r10, [rax + 7]
shr r10, 3
nop word [rax + rax]
cmp r10, 0x81
jae 0x40d2d4
lea r11, [0x00989200]
movzx r10d, byte [r10 + r11]
jmp 0x40ce00
lea r10, [rax - 0x381]
shr r10, 7
cmp r10, 0xf9
jae 0x40d2c7
lea r11, [0x0098a500]
movzx r10d, byte [r10 + r11]
nop
cmp r10, 0x44
jae 0x40d2ba
lea r11, [0x00989340]
movzx r11d, word [r11 + r10*2]
nop
shl r10d, 1
movzx r12d, r9b
or r10d, r12d
movzx r12d, r10b
cmp r12, 0x88
jae 0x40d2ad
mov r12, qword [r8 + r12*8 + 0x28]
mov r13, qword [r12 + 0x40]
bsf r15, r13
mov rdi, rdx
mov edx, 0x40
cmove r15, rdx
cmp r15, 0x40
jge 0x40cee5
mov rdx, qword [r12 + 0x30]
lea rsi, [rdx + r15]
mov r8, qword [r12 + 0x38]
cmp r8, rsi
jbe 0x40cedb
lea rdx, [rdx + r15]
lea rdx, [rdx + 1]
test rdx, 0x3f
jne 0x40ce8d
cmp r8, rdx
je 0x40ce8d
mov rsi, qword [rsp + 0x48]
mov r8, qword [rsp + 0x38]
xor edx, edx
jmp 0x40cee7
lea r8, [r15 + 1]
cmp r8, 0x40
sbb r15, r15
mov rcx, r8
shr r13, cl
and r13, r15
mov qword [r12 + 0x40], r13
mov qword [r12 + 0x30], rdx
movzx edx, word [r12 + 0x60]
inc edx
mov word [r12 + 0x60], dx
mov rdx, qword [r12 + 0x68]
imul rdx, rsi
add rdx, qword [r12 + 0x18]
movzx ecx, byte [rsp + 0x88]
mov rsi, qword [rsp + 0x48]
mov r8, qword [rsp + 0x38]
jmp 0x40cee7
mov rsi, qword [rsp + 0x48]
mov r8, qword [rsp + 0x38]
xor edx, edx
mov qword [rsp + 0x40], r11
test rdx, rdx
je 0x40cef6
xor r10d, r10d
jmp 0x40cf40
mov rax, r8
mov ebx, r10d
nop dword [rax]
call fcn.0040c800
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x58]
mov r8, qword [rsp + 0x38]
movzx r9d, byte [rsp + 0x26]
mov r11, qword [rsp + 0x40]
mov rdx, rax
mov r12, rbx
mov r10d, ecx
mov rax, qword [rsp + 0x78]
movzx ecx, byte [rsp + 0x88]
mov rbx, qword [rsp + 0x80]
nop dword [rax]
test cl, cl
je 0x40cf9d
cmp byte [r12 + 0x64], 0
je 0x40cf9d
mov qword [rsp + 0x50], rdx
mov byte [rsp + 0x25], r10b
mov qword [rsp + 0x28], r12
mov rax, rdx
mov rbx, r11
call fcn.004625e0
mov rax, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x80]
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x58]
mov r8, qword [rsp + 0x38]
movzx r9d, byte [rsp + 0x26]
movzx r10d, byte [rsp + 0x25]
mov r11, qword [rsp + 0x40]
mov r12, qword [rsp + 0x28]
mov ecx, r10d
mov r11, rdx
mov r10, r12
mov rdx, qword [rsp + 0x40]
xor r12d, r12d
jmp 0x40d05e
mov rbx, rax
mov ecx, r9d
mov rax, r8
nop dword [rax]
call fcn.004164e0
mov qword [rax + 0x30], 1
mov word [rax + 0x60], 1
mov rbx, qword [rax + 0x68]
mov rdx, qword [rax + 0x18]
movzx esi, byte [rsp + 0x88]
test sil, sil
je 0x40d027
cmp byte [rax + 0x64], 0
je 0x40d027
movzx esi, byte [rsp + 0x26]
test sil, sil
jne 0x40d023
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x50], rdx
mov rax, rdx
call fcn.004625e0
mov rax, qword [rsp + 0x28]
mov rdx, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x40]
movzx esi, byte [rsp + 0x26]
mov ecx, esi
jmp 0x40d02e
movzx ecx, byte [rsp + 0x26]
xor esi, esi
mov rdi, qword [rsp + 0x58]
mov r8, qword [rsp + 0x38]
mov r9d, ecx
mov r10, rax
mov r12d, esi
mov ecx, 1
mov r11, rdx
mov rax, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x48]
mov rdx, rbx
mov rbx, qword [rsp + 0x80]
mov qword [rsp + 0x50], r11
mov qword [rsp + 0x40], rdx
mov byte [rsp + 0x25], cl
mov byte [rsp + 0x27], r12b
mov qword [rsp + 0x28], r10
test r9b, r9b
je 0x40d082
xor r13d, r13d
nop
jmp 0x40d0d7
mov rcx, rax
mov rdi, rbx
mov rax, r11
mov rbx, rdx
call fcn.004147c0
mov rdx, qword [rsp + 0x80]
mov rsi, qword [rdx]
mov r8, qword [rsp + 0x78]
cmp r8, rsi
jbe 0x40d0c4
mov rax, qword [rdx + 8]
mov rcx, r8
sub r8, rsi
lea rbx, [r8 + rax]
test rax, rax
mov eax, 0
cmovne rax, rbx
jmp 0x40d0cb
mov rax, qword [rdx + 8]
mov rcx, r8
mov rbx, qword [rsp + 0x38]
add qword [rbx + 8], rax
mov r13, rax
mov qword [rsp + 0x30], r13
nop dword [rax]
call fcn.00461660
xorps xmm15, xmm15
mov r14, qword gs:[0x28]
mov r14, qword [r14]
cmp dword [0x00a7c730], 0
je 0x40d11b
mov rbx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x30]
call fcn.0041f4c0
mov rdx, qword [0x00a7c7d0]
test rdx, rdx
jle 0x40d162
cmp rdx, 1
je 0x40d147
mov rdx, qword [rsp + 0x38]
mov rsi, qword [rdx]
mov rcx, qword [rsp + 0x40]
cmp rcx, rsi
jae 0x40d14c
sub rsi, rcx
mov qword [rdx], rsi
jmp 0x40d167
mov rcx, qword [rsp + 0x40]
mov rax, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
call fcn.0040d540
mov rcx, qword [rsp + 0x40]
jmp 0x40d167
mov rcx, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x48]
mov dword [rdx + 0xc0], 0
nop
mov esi, dword [rdx + 0xd8]
lea edi, [rsi - 1]
mov dword [rdx + 0xd8], edi
cmp esi, 1
jne 0x40d19d
cmp byte [r14 + 0xb1], 0
je 0x40d19d
mov qword [r14 + 0x10], 0xfffffffffffffade
movzx edx, byte [rsp + 0x27]
test dl, dl
je 0x40d1ca
movzx edx, byte [rsp + 0x26]
test dl, dl
je 0x40d29c
mov rax, rcx
mov rbx, qword [rsp + 0x50]
nop dword [rax + rax]
call fcn.0040d360
mov rcx, qword [rsp + 0x40]
cmp byte [0x00a7cda0], 0
je 0x40d216
cmp dword [0x00a7cda4], 0
je 0x40d1f6
mov rax, qword [rsp + 0x50]
mov rbx, rcx
mov rcx, qword [rsp + 0x80]
call fcn.0042cae0
mov rcx, qword [rsp + 0x40]
cmp byte [0x00a7cb60], 0
je 0x40d216
mov rdx, qword [0x00a7cb68]
cmp qword [r14 + 0x98], rdx
jne 0x40d216
add qword [0x00a7cb78], rcx
mov rdx, qword [rsp + 0x58]
nop dword [rax + rax]
test rdx, rdx
je 0x40d234
mov rsi, qword [rsp + 0x78]
sub rcx, rsi
sub qword [rdx + 0x180], rcx
movzx edx, byte [rsp + 0x25]
test dl, dl
je 0x40d27c
cmp byte [0x00a820a8], 0
je 0x40d26b
cmp dword [0x00a7c74c], 0
jne 0x40d26b
cmp dword [0x00a7c730], 0
jne 0x40d26b
mov rdx, qword [0x00a7d698]
cmp qword [0x00a7d638], rdx
setbe dl
jmp 0x40d26d
xor edx, edx
test dl, dl
je 0x40d27c
xor eax, eax
xor ebx, ebx
xor ecx, ecx
call fcn.00418f80
mov rax, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x68]
add rsp, 0x70
ret
lea rax, [0x00a7c950]
mov rbp, qword [rsp + 0x68]
add rsp, 0x70
ret
lea rax, [0x0076c232]
mov ebx, 0x31
call fcn.00435800
mov rax, r12
mov ecx, 0x88
call fcn.00461f40
mov eax, r10d
mov ecx, 0x44
call fcn.00461f40
mov rax, r10
mov ecx, 0xf9
call fcn.00461f60
mov rax, r10
mov ecx, 0x81
nop dword [rax]
call fcn.00461f60
lea rax, [0x0076cf13]
mov ebx, 0x34
call fcn.00435800
lea rax, [0x0075db44]
mov ebx, 0x14
call fcn.00435800
lea rax, [0x0075a956]
mov ebx, 0xf
call fcn.00435800
lea rax, [0x0076c9e8]
mov ebx, 0x32
call fcn.00435800
nop
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov byte [rsp + 0x18], cl
call fcn.0045f860
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
movzx ecx, byte [rsp + 0x18]
jmp fcn.0040ca20