Function at 0x1401021a0
Capabilities:
Encode data using base64
Get thread local storage value

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov rsi, rcx
mov rax, qword [0x14029a038]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov ecx, dword [0x14029bf80]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x1401021f6
mov rcx, qword [rsi + 0x320]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [rsi + 0x328]
jne 0x1401021f6
cmp qword [rax + rcx], 0
jne 0x1401022f9
mov eax, dword [0x1402a44f8]
mov ecx, dword [0x14029dfe4]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140102318
mov ecx, dword [0x14029bf80]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x1401022f9
mov rcx, qword [0x1402a44e8]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x1402a44f0]
jne 0x1401022f9
cmp qword [rax + rcx], 0
je 0x1401022f9
mov eax, dword [0x1402a4570]
mov ecx, dword [0x14029dfe4]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140102366
mov ecx, dword [0x14029bf80]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x1401022f9
mov rcx, qword [0x1402a4560]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x1402a4568]
jne 0x1401022f9
cmp qword [rax + rcx], 0
je 0x1401022f9
mov ecx, dword [0x14029bf80]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x1401023c4
mov rcx, qword [rsi + 0x310]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [rsi + 0x318]
jne 0x1401023c4
mov rdi, qword [rax + rcx]
test rdi, rdi
je 0x1401023c4
mov eax, dword [rsi + 0x39c]
cmp eax, dword [rdi + 0x28]
jne 0x1401023b4
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14017e7b0
nop
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [0x1402a44f8]
call fcn.14017b2bc
cmp dword [0x1402a44f8], 0xffffffff
jne 0x14010221b
mov qword [0x1402a44f0], 0
lea rcx, [0x1402a44e8]
mov qword [0x1402a44e8], 0xffffffffffffffff
xor edx, edx
call fcn.140002850
lea rcx, [0x1402a44f8]
call fcn.14017b25c
jmp 0x14010221b
lea rcx, [0x1402a4570]
call fcn.14017b2bc
cmp dword [0x1402a4570], 0xffffffff
jne 0x14010227c
mov qword [0x1402a4568], 0
lea rcx, [0x1402a4560]
mov qword [0x1402a4560], 0xffffffffffffffff
xor edx, edx
call fcn.140002850
lea rcx, [0x1402a4570]
call fcn.14017b25c
jmp 0x14010227c
mov rcx, rdi
call fcn.140060110
mov rcx, rdi
call fcn.14017b254
mov ecx, 0x30
call fcn.14017b1d8
mov rdi, rax
lea rax, [0x14026d080]
mov qword [rdi], rax
lea rax, [0x14026e0f0]
mov qword [rdi + 8], rax
mov qword [rdi + 0x10], rsi
xorps xmm0, xmm0
movups xmmword [rdi + 0x18], xmm0
mov eax, dword [rsi + 0x39c]
mov dword [rdi + 0x28], eax
mov eax, dword [0x1402a44f8]
mov ecx, dword [0x14029dfe4]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140102a90
mov ecx, dword [0x14029bf80]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140102b9d
mov rcx, qword [0x1402a44e8]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x1402a44f0]
jne 0x140102b9d
mov rcx, qword [rax + rcx]
add rcx, 0x468
mov rdx, rdi
call fcn.140014310
call fcn.140003150
mov rbx, rax
mov eax, dword [0x1402a4570]
mov ecx, dword [0x14029dfe4]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140102ade
mov ecx, dword [0x14029bf80]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140102b97
mov rcx, qword [0x1402a4560]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x1402a4568]
jne 0x140102b97
mov rax, qword [rax + rcx]
test rax, rax
je 0x140102b97
lea rdx, [rdi + 8]
mov r9, qword [rax]
test r9, r9
je 0x1401024df
lock inc dword [r9 + 8]
lea rax, [rsp + 0x38]
mov byte [rax], 1
mov qword [rsp + 0x20], rax
lea r8, str.ThreadLocalEventBuffer
mov rcx, rbx
call fcn.140151290
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebp, eax
lea r13, [rsi + 8]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x140102a83
mov eax, dword [0x1402a4570]
mov ecx, dword [0x14029dfe4]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140102b2c
mov ecx, dword [0x14029bf80]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140102b9a
mov rcx, qword [0x1402a4560]
shl rcx, 4
mov edx, dword [rax + rcx + 8]
cmp edx, dword [0x1402a4568]
jne 0x140102b9a
mov rax, qword [rax + rcx]
test rax, rax
je 0x140102b9a
mov r8, qword [rax]
test r8, r8
je 0x140102588
lock inc dword [r8 + 8]
mov r14d, ebp
mov rbx, qword [rsi + 0x348]
test rbx, rbx
mov qword [rsp + 0x30], r8
jne 0x14010280b
movabs r12, 0xaaaaaaaaaaaaaaaa
mov ecx, 0x20
call fcn.14017b1d8
mov r15, rax
mov dword [rax + 0x10], ebp
xor eax, eax
mov qword [r15 + 0x18], rax
mov qword [r15 + 8], r14
mov qword [r15], rax
mov rax, qword [rsi + 0x358]
inc rax
js 0x1401025da
cvtsi2ss xmm0, rax
jmp 0x1401025ef
mov rcx, rax
shr rcx, 1
and eax, 1
or rax, rcx
cvtsi2ss xmm0, rax
addss xmm0, xmm0
mov rcx, rbx
shr rcx, 1
mov eax, ebx
and eax, 1
or rax, rcx
test rbx, rbx
js 0x140102609
cvtsi2ss xmm1, rbx
jmp 0x140102612
cvtsi2ss xmm1, rax
addss xmm1, xmm1
movss xmm2, dword [rsi + 0x360]
je 0x140102629
mulss xmm1, xmm2
ucomiss xmm0, xmm1
jbe 0x140102712
mov rbp, r13
divss xmm0, xmm2
call fcn.14019b6a8
cvttss2si rcx, xmm0
mov rdx, rcx
subss xmm0, dword [0x14025dc48]
sar rdx, 0x3f
cvttss2si rax, xmm0
and rax, rdx
or rax, rcx
lea rdx, [rbx + rbx]
mov ecx, 1
cmp rbx, 3
jae 0x140102ba4
or rcx, rdx
cmp rcx, rax
cmovbe rcx, rax
mov r13d, 2
cmp rcx, 1
jne 0x1401028d9
cmp r13, rbx
jbe 0x140102bb5
mov r12, r13
mov rax, r12
shr rax, 0x3d
jne 0x140102bd1
lea rcx, [r12*8]
call fcn.14017b1d8
mov rcx, qword [rsi + 0x340]
mov qword [rsi + 0x340], rax
test rcx, rcx
jne 0x140102913
mov qword [rsi + 0x348], r12
xor eax, eax
mov rcx, qword [rsi + 0x340]
mov qword [rcx + rax*8], 0
inc rax
cmp r12, rax
jne 0x1401026c7
mov r8, qword [rsi + 0x350]
test r8, r8
jne 0x14010291d
mov rbx, qword [rsi + 0x348]
lea rax, [rbx - 1]
test rbx, rax
jne 0x1401028fa
mov eax, 0xffffffff
add eax, ebx
and r14d, eax
mov r12, r14
mov r13, rbp
mov rcx, qword [rsi + 0x340]
mov rax, qword [rcx + r12*8]
test rax, rax
jne 0x1401028cb
lea rax, [rsi + 0x350]
mov rdx, qword [rsi + 0x350]
mov qword [r15], rdx
mov qword [rsi + 0x350], r15
mov qword [rcx + r12*8], rax
mov rax, qword [r15]
test rax, rax
jne 0x1401029fa
inc qword [rsi + 0x358]
mov r14, qword [r15 + 0x18]
mov rax, qword [rsp + 0x30]
mov qword [r15 + 0x18], rax
test r14, r14
je 0x1401027c3
lock dec dword [r14 + 8]
jne 0x1401027c3
mov rcx, qword [r14]
mov rax, qword [rcx + 8]
lea rdx, [0x1401e6bb0]
cmp qword [rcx + 0x10], rdx
jne 0x140102a70
lea rcx, [0x140203760]
cmp rax, rcx
jne 0x140102a70
mov rcx, qword [r14 + 0x18]
test rcx, rcx
je 0x1401027a8
lock dec dword [rcx]
je 0x140102b8d
mov r15, qword [r14 + 0x10]
test r15, r15
je 0x1401027bb
lock dec dword [r15]
je 0x140102a3e
mov rcx, r14
call fcn.14017b254
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov ecx, dword [0x14029bf80]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140102b7a
mov rcx, qword [rsi + 0x310]
shl rcx, 4
mov qword [rax + rcx], rdi
mov ecx, dword [rsi + 0x318]
mov rdx, qword [rsi + 0x310]
shl rdx, 4
mov dword [rax + rdx + 8], ecx
jmp 0x1401022f9
mov rax, rbx
shr rax, 1
movabs rcx, 0x5555555555555555
and rcx, rax
mov rax, rbx
sub rax, rcx
movabs rcx, 0x3333333333333333
mov rdx, rax
and rdx, rcx
shr rax, 2
and rax, rcx
add rax, rdx
mov rcx, rax
shr rcx, 4
add rcx, rax
movabs rax, 0xf0f0f0f0f0f0f0f
and rax, rcx
movabs rcx, 0x101010101010101
imul rcx, rax
shr rcx, 0x38
cmp rcx, 1
ja 0x140102a54
mov eax, 0xffffffff
add eax, ebx
mov r12d, r14d
and r12d, eax
mov rax, qword [rsi + 0x340]
mov r15, qword [rax + r12*8]
test r15, r15
je 0x1401025aa
lea r8, [rbx - 1]
mov r15, qword [r15]
test r15, r15
je 0x1401025aa
mov rax, qword [r15 + 8]
cmp rax, r14
je 0x1401028c0
cmp ecx, 1
ja 0x140102a28
and rax, r8
cmp rax, r12
jne 0x1401025aa
cmp dword [r15 + 0x10], ebp
jne 0x140102896
jmp 0x140102755
mov rcx, qword [rax]
mov qword [r15], rcx
mov qword [rax], r15
jmp 0x14010274e
lea rax, [rcx - 1]
test rcx, rax
je 0x140102cf5
call fcn.14011dd70
mov r13, rax
mov rbx, qword [rsi + 0x348]
jmp 0x140102681
cmp rbx, r14
ja 0x14010270c
mov rax, r14
xor edx, edx
div rbx
mov r12, rdx
jmp 0x14010270f
call fcn.14017b254
jmp 0x1401026be
lea r10, [rsi + 0x350]
mov rcx, qword [r8 + 8]
mov rax, r12
shr rax, 1
movabs rdx, 0x5555555555555555
and rdx, rax
mov rax, r12
sub rax, rdx
movabs rdx, 0x3333333333333333
mov r9, rax
and r9, rdx
shr rax, 2
and rax, rdx
add rax, r9
mov rdx, rax
shr rdx, 4
add rdx, rax
movabs rax, 0xf0f0f0f0f0f0f0f
and rax, rdx
movabs r9, 0x101010101010101
imul r9, rax
shr r9, 0x38
cmp r9, 1
jbe 0x140102cfd
cmp rcx, r12
jb 0x14010299e
mov rax, rcx
xor edx, edx
div r12
mov rcx, rdx
mov rax, qword [rsi + 0x340]
mov qword [rax + rcx*8], r10
mov r10, qword [r8]
test r10, r10
je 0x1401026ee
mov rax, qword [r10 + 8]
cmp r9d, 1
jbe 0x140102d0a
cmp rax, r12
jb 0x1401029d0
xor edx, edx
div r12
mov rax, rdx
cmp rax, rcx
je 0x140102d3f
mov rdx, qword [rsi + 0x340]
cmp qword [rdx + rax*8], 0
jne 0x140102d17
mov qword [rdx + rax*8], r8
mov r8, r10
mov r10, qword [r10]
mov rcx, rax
jmp 0x1401029ac
mov rax, qword [rax + 8]
lea rcx, [rbx - 1]
test rbx, rcx
je 0x140102d47
cmp rax, rbx
jb 0x140102a18
xor edx, edx
div rbx
mov rax, rdx
shl rax, 3
add rax, qword [rsi + 0x340]
jmp 0x1401028d1
cmp rax, rbx
jb 0x1401028b7
xor edx, edx
div rbx
mov rax, rdx
jmp 0x1401028b7
lea rcx, [r15 + 8]
call fcn.1400091b0
mov rcx, r15
call fcn.14017b254
jmp 0x1401027bb
mov r12, r14
cmp rbx, r14
ja 0x14010287e
mov rax, r14
xor edx, edx
div rbx
mov r12, rdx
jmp 0x14010287e
mov rcx, r14
mov edx, 1
call qword [case.0x1401e7f70.0]
jmp 0x1401027c3
mov rcx, r13
call fcn.1400fdfc0
jmp 0x140102518
lea rcx, [0x1402a44f8]
call fcn.14017b2bc
cmp dword [0x1402a44f8], 0xffffffff
jne 0x14010241f
mov qword [0x1402a44f0], 0
lea rcx, [0x1402a44e8]
mov qword [0x1402a44e8], 0xffffffffffffffff
xor edx, edx
call fcn.140002850
lea rcx, [0x1402a44f8]
call fcn.14017b25c
jmp 0x14010241f
lea rcx, [0x1402a4570]
call fcn.14017b2bc
cmp dword [0x1402a4570], 0xffffffff
jne 0x140102490
mov qword [0x1402a4568], 0
lea rcx, [0x1402a4560]
mov qword [0x1402a4560], 0xffffffffffffffff
xor edx, edx
call fcn.140002850
lea rcx, [0x1402a4570]
call fcn.14017b25c
jmp 0x140102490
lea rcx, [0x1402a4570]
call fcn.14017b2bc
cmp dword [0x1402a4570], 0xffffffff
jne 0x14010253d
mov qword [0x1402a4568], 0
lea rcx, [0x1402a4560]
mov qword [0x1402a4560], 0xffffffffffffffff
xor edx, edx
call fcn.140002850
lea rcx, [0x1402a4570]
call fcn.14017b25c
jmp 0x14010253d
test rdi, rdi
je 0x1401022f9
call fcn.140002990
jmp 0x1401027e2
call fcn.14017b254
jmp 0x1401027a8
int3
int3
xor ecx, ecx
jmp 0x140102454
lea r8, [rbx - 1]
xor ecx, ecx
test rbx, r8
setne cl
jmp 0x140102667
jae 0x1401026ee
mov rax, qword [rsi + 0x358]
test rax, rax
js 0x140102bd6
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
jmp 0x140102bee
call fcn.1401be9c0
mov rcx, rax
shr rcx, 1
and eax, 1
or rax, rcx
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
addss xmm0, xmm0
divss xmm0, dword [rsi + 0x360]
call fcn.14019b6a8
cvttss2si rcx, xmm0
mov rdx, rcx
subss xmm0, dword [0x14025dc48]
cvttss2si rax, xmm0
sar rdx, 0x3f
and rax, rdx
or rax, rcx
cmp rbx, 3
jb 0x140102ca5
mov rcx, rbx
shr rcx, 1
movabs rdx, 0x5555555555555555
and rdx, rcx
mov rcx, rbx
sub rcx, rdx
movabs rdx, 0x3333333333333333
mov r8, rcx
shr r8, 2
and rcx, rdx
and r8, rdx
add r8, rcx
mov rcx, r8
shr rcx, 4
add rcx, r8
movabs rdx, 0xf0f0f0f0f0f0f0f
and rdx, rcx
movabs rcx, 0x101010101010101
imul rcx, rdx
shr rcx, 0x38
cmp ecx, 1
ja 0x140102ca5
lea rcx, [rax - 1]
bsr rcx, rcx
xor ecx, 0x3f
neg cl
mov r12d, 1
shl r12, cl
cmp rax, 2
cmovb r12, rax
jmp 0x140102cb0
mov rcx, rax
call fcn.14011dd70
mov r12, rax
cmp r13, r12
cmova r12, r13
cmp r12, rbx
jae 0x1401026ee
test r12, r12
jne 0x14010268d
mov rcx, qword [rsi + 0x340]
mov qword [rsi + 0x340], 0
test rcx, rcx
je 0x140102ce5
call fcn.14017b254
mov qword [rsi + 0x348], 0
jmp 0x1401026ee
mov r13, rcx
jmp 0x140102681
lea rax, [r12 - 1]
and rcx, rax
jmp 0x14010299e
lea rdx, [r12 - 1]
and rax, rdx
jmp 0x1401029d0
mov rdx, qword [r10]
mov qword [r8], rdx
mov rdx, qword [rsi + 0x340]
mov rdx, qword [rdx + rax*8]
mov rdx, qword [rdx]
mov qword [r10], rdx
mov rdx, qword [rsi + 0x340]
mov rax, qword [rdx + rax*8]
mov qword [rax], r10
mov r10, r8
mov rax, rcx
jmp 0x1401029ef
and rax, rcx
jmp 0x140102a18