Function at 0x140140790
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, 0xa8
movapd xmmword [rsp + 0x90], xmm6
mov rsi, rcx
mov rax, qword [0x140287028]
xor rax, rsp
mov qword [rsp + 0x88], rax
test byte [0x140289010], 0x19
jne 0x140140c7a
call fcn.140172a88
mov ebp, dword [rax]
call fcn.140172a88
mov dword [rax], 0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rbx, qword [0x1402a1970]
cmp rbx, 1
jbe 0x140140aaf
mov r14, qword [rsi + 8]
mov ecx, dword [0x140288f70]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
and rax, 0xfffffffffffffffc
je 0x140140af6
mov rcx, qword [rbx]
shl rcx, 4
mov qword [rax + rcx], r14
mov ecx, dword [rbx + 8]
mov rdx, qword [rbx]
shl rdx, 4
mov dword [rax + rdx + 8], ecx
mov r14, qword [rsi]
test r14, r14
jne 0x140140926
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.140172a88
mov dword [rax], ebp
cmp byte [rsi + 0x38], 0
je 0x140140866
mov rbx, qword [rsi + 0x48]
test rbx, rbx
jne 0x140140999
mov byte [rsi + 0x38], 0
mov rax, qword [rsi + 0x18]
test rax, rax
jne 0x140140d03
mov rdi, qword [rsi + 0x28]
mov qword [rsi + 0x28], 0
test rdi, rdi
jne 0x140140d62
mov rax, qword [rsi + 0x18]
test rax, rax
jne 0x140140d77
xor ecx, ecx
mov rax, qword [0x14028a5a0]
and rax, rcx
cmp rax, qword [0x14028a588]
je 0x140140d90
mov qword [rsi + 0x18], 0
mov rcx, qword [rsi + 8]
mov rax, qword [0x14028a5a0]
and rax, rcx
cmp rax, qword [0x14028a588]
je 0x140140d9a
mov qword [rsi + 8], 0
mov rcx, qword [rsi]
mov rax, qword [0x14028a5a0]
and rax, rcx
cmp rax, qword [0x14028a588]
je 0x140140a4b
mov qword [rsi], 0
mov rcx, qword [rsp + 0x88]
xor rcx, rsp
call fcn.1401756e0
movaps xmm6, xmmword [rsp + 0x90]
add rsp, 0xa8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp qword [rsi + 8], 0
jne 0x140140840
mov rbx, qword [r14 + 0x28]
add rbx, 0x28
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x140140a6f
mov qword [r14 + 0x20], 0
cmp byte [r14 + 0x3a], 0
jne 0x140140984
cmp byte [r14 + 0x38], 0
mov rax, qword [r14 + 0x28]
jne 0x140140a7c
dec dword [rax + 0x120]
cmp byte [r14 + 0x18], 0
je 0x140140da4
cmp byte [r14 + 0x19], 0
je 0x140140a55
mov word [r14 + 0x38], 0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x140140840
mov rax, qword [fcn.140158d50]
lea rcx, [0x140171950]
cmp rax, rcx
jne 0x140140c64
lea rdi, [rsp + 0x38]
mov qword [rdi], 0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rdi]
movabs rcx, 0x8637bd05af6
cmp rax, rcx
jg 0x140140da6
imul rax, rax, 0xf4240
cqo
idiv qword [0x14029b670]
mov qword [rsp + 0x60], rax
mov r15, qword [rsi + 0x40]
xor ecx, ecx
cmp rax, r15
setns cl
movabs r12, 0x7fffffffffffffff
add rcx, r12
mov r14, rax
sub r14, r15
cmovo r14, rcx
cmp r14, 0xf4240
jge 0x140140b09
mov rdi, qword [rsi + 0x48]
test rdi, rdi
je 0x140140862
lock dec dword [rdi]
jne 0x140140862
mov rcx, rdi
call fcn.140067cd0
mov rcx, rdi
call fcn.140172a44
jmp 0x140140862
call fcn.1400ebe70
jmp 0x1401408f3
cmp byte [r14 + 0x39], 0
mov rcx, qword [r14 + 0x28]
jne 0x140140dcd
dec dword [rcx + 0x124]
jmp 0x140140984
mov rcx, rbx
call fcn.1400ec2e0
jmp 0x14014094a
mov rcx, qword [rax + 0x40]
mov rdx, qword [rax + 0x100]
dec rdx
mov qword [rax + 0x100], rdx
cmp rcx, qword [rax + 0x48]
je 0x140140aa4
cmp qword [rax + 0x110], rdx
jae 0x140140c57
mov word [rax + 0x78], 0
jmp 0x14014096e
lea rcx, [0x1402a1970]
call fcn.140007880
test al, al
je 0x140140dde
mov qword [0x1402a1980], 0
lea rbx, [0x1402a1978]
mov qword [0x1402a1978], 0xffffffffffffffff
mov rcx, rbx
xor edx, edx
call fcn.140002400
mov qword [0x1402a1970], rbx
jmp 0x140140801
test r14, r14
je 0x140140834
call fcn.14003bc30
jmp 0x14014081b
mov rcx, qword [rbx + 0x1f0]
mov edx, 0x3938700
lea r8, [rdx + rcx]
sar r8, 0x3f
btc r8, 0x3f
add rdx, rcx
cmovo rdx, r8
cmp rdx, rax
jle 0x140140dea
mov rax, qword [rbx + 0x1f0]
xor ecx, ecx
cmp r15, rax
setns cl
add rcx, r12
sub r15, rax
movabs rdi, 0x8000000000000001
cmovo r15, rcx
lea rax, [r15 + rdi]
cmp rax, 2
jb 0x140140e24
cvtsi2sd xmm0, r15
divsd xmm0, qword [0x140265f20]
call fcn.1401ae8e8
movsd xmm6, qword [0x14024e9f0]
ucomisd xmm6, xmm0
jb 0x140140e3a
maxsd xmm0, qword [0x14024ea08]
cvttsd2si ebp, xmm0
add rdi, r14
cmp rdi, 2
jb 0x140140bae
xorps xmm0, xmm0
cvtsi2sd xmm0, r14
divsd xmm0, qword [0x140265f20]
jmp 0x140140bb6
movsd xmm0, qword [0x140265f28]
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jb 0x140140e51
addsd xmm0, qword [0x14024e590]
call fcn.1401ae8e8
ucomisd xmm6, xmm0
jb 0x140140e63
maxsd xmm0, qword [0x14024ea08]
cvttsd2si r14d, xmm0
mov r15, qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov r12, qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
add r14d, ebp
cmp r14d, 0x3c
mov r13d, 0x3c
cmovl r13d, r14d
lea rdi, [rbx + 8]
mov rcx, rdi
call r15
test al, al
je 0x140140e7c
cmp ebp, r13d
jge 0x140140c31
movsxd rax, ebp
movsxd rcx, r13d
inc qword [rbx + rax*8 + 0x10]
inc rax
cmp rcx, rax
jne 0x140140c24
mov rcx, rdi
call r12
cmp r14d, 0x3d
jl 0x140140a20
mov rbx, qword [rbx + 0x1f8]
sub r14d, r13d
xor ebp, ebp
test rbx, rbx
jne 0x140140bf6
jmp 0x140140a20
movzx ecx, word [rcx + 0x10]
mov word [rax + 0x78], cx
jmp 0x14014096e
lea rdi, [rsp + 0x60]
mov rcx, rdi
call qword [case.0x1401d7990.0]
mov rax, qword [rdi]
jmp 0x1401409f0
movapd xmm0, xmmword [0x140261350]
lea rdi, [rsp + 0x60]
movapd xmmword [rdi + 0x10], xmm0
movapd xmmword [rdi], xmm0
xorpd xmm0, xmm0
movupd xmmword [rsp + 0x20], xmm0
mov byte [rsp + 0x30], 0
lea r8, [0x140289010]
lea r9, [0x140262d25]
mov rcx, rdi
mov dl, 0x45
call fcn.1400f8a80
mov rbx, qword [rdi]
test rbx, rbx
je 0x140140cf4
mov bpl, byte [rsp + 0x78]
mov r14, qword [rsp + 0x68]
lea rdi, [rsp + 0x38]
mov rcx, rdi
xor edx, edx
call fcn.140170670
mov qword [rdi + 8], rbx
mov qword [rdi + 0x10], r14
mov qword [rdi + 0x18], 0
mov byte [rdi + 0x20], bpl
mov rcx, rdi
call fcn.1400f8a90
lea rcx, [rsp + 0x60]
call fcn.1400e5cf0
jmp 0x1401407ce
mov ecx, dword [rsi + 0x20]
cmp dword [rax + 0x18], ecx
jbe 0x140140873
mov rax, qword [rax + 0x10]
shl rcx, 7
cmp dword [rax + rcx + 0x68], 0
je 0x140140873
mov rbx, qword [0x140299b10]
lea rdi, [rbx + 0xc8]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x140140e89
mov rcx, qword [rsi + 0x18]
sub rbx, 0xffffffffffffff80
mov edx, dword [rsi + 0x20]
mov r8, rbx
call fcn.1401d05b0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x140140873
mov rcx, rdi
call fcn.1401cfbc0
mov rcx, rdi
call fcn.140172a44
jmp 0x140140888
mov rcx, qword [rax + 8]
lock dec dword [rcx + 0x38]
mov rax, qword [rax + 8]
lock inc dword [rax + 0x3c]
mov rcx, qword [rsi + 0x18]
jmp 0x140140897
call fcn.1400ebe70
jmp 0x1401408ae
call fcn.1400ebe70
jmp 0x1401408d1
ud2
mov rcx, qword [0x14029b670]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x1401409eb
dec qword [rcx + 0x108]
call fcn.1401f4c10
jmp 0x140140984
mov rbx, qword [0x1402a1970]
jmp 0x140140801
lea rdi, [rsp + 0x38]
mov rcx, rdi
mov rdx, rax
call fcn.1400bc7d0
mov rdi, qword [rdi]
test rdi, rdi
je 0x140140b32
lock dec dword [rdi]
jne 0x140140b32
mov rcx, rdi
call fcn.140067cd0
mov rcx, rdi
call fcn.140172a44
jmp 0x140140b32
shr r15, 0x3f
lea rax, [0x140265f10]
movsd xmm0, qword [rax + r15*8]
jmp 0x140140b68
xor eax, eax
ucomisd xmm0, qword [0x14024ea08]
mov ebp, 0x7fffffff
cmovb ebp, eax
jmp 0x140140b93
addsd xmm0, qword [0x14024e9f8]
call fcn.1401ae4ec
jmp 0x140140bd1
xor eax, eax
ucomisd xmm0, qword [0x14024ea08]
mov r14d, 0x7fffffff
cmovb r14d, eax
jmp 0x140140be8
mov rcx, rdi
call fcn.1400ec2e0
jmp 0x140140c19
mov rcx, rdi
call fcn.1400ec2e0
jmp 0x140140d41