joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14019c340
Capabilities:
Create process on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0xa0
mov rax, qword [0x14064a080]
xor rax, rsp
mov qword [rsp + 0x98], rax
mov rdx, rcx
xor esi, esi
cmp qword [rcx + 0x18], 0xf
jbe 0x14019c37c
mov r8, qword [rcx]
add r8, qword [rcx + 0x10]
mov rdx, qword [rcx]
jmp 0x14019c383
mov r8, qword [rcx + 0x10]
add r8, rcx
lea rcx, [rsp + 0x78]
call fcn.1401b49f0
nop
mov edx, 0x7e
lea rcx, [rsp + 0x38]
call fcn.140135d20
mov rbx, rax
mov r8, rax
cmp qword [rax + 0x18], 0xf
jbe 0x14019c3ad
mov r8, qword [rax]
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rsi
xor edx, edx
mov ecx, 0xfde9
mov r9d, 0xffffffff
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rdi, eax
xorps xmm0, xmm0
movups xmmword [rsp + 0x58], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x68], xmm1
mov r8, rdi
xor edx, edx
lea rcx, [rsp + 0x58]
call fcn.1401b57a0
lea rdx, [rsp + 0x58]
cmp qword [rsp + 0x70], 7
cmova rdx, qword [rsp + 0x58]
cmp qword [rbx + 0x18], 0xf
jbe 0x14019c407
mov rbx, qword [rbx]
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rdx
mov r9d, 0xffffffff
mov r8, rbx
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
nop
lea rcx, [rsp + 0x38]
call fcn.14012de60
lea r8, [rsp + 0x78]
cmp qword [rsp + 0x90], 7
cmova r8, qword [rsp + 0x78]
lea rdx, [rsp + 0x58]
cmp qword [rsp + 0x70], 7
cmova rdx, qword [rsp + 0x58]
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], rsi
xor r9d, r9d
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteW]
lea rcx, [rsp + 0x58]
call fcn.1401ad120
nop
lea rcx, [rsp + 0x78]
call fcn.1401ad120
mov rcx, qword [rsp + 0x98]
xor rcx, rsp
call fcn.1404a5b80
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret
Function at 0x1401a6760
Capabilities:
Initialize winsock library

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x200
mov rax, qword [0x14064a080]
xor rax, rsp
mov qword [rsp + 0x1f0], rax
movzx ebx, dl
mov rdi, rcx
mov eax, 1
lock xadd dword [0x1406563f0], eax
inc eax
cmp eax, 1
jne 0x1401a67af
mov ecx, 0x202
lea rdx, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_WSAStartup]
xchg dword [0x1406563f4], eax
test bl, bl
je 0x1401a6853
xor ebx, ebx
lock xadd dword [0x1406563f4], ebx
test ebx, ebx
je 0x1401a6853
movabs rcx, 0x4d54ee85da812030
mov qword [rsp + 0x210], rsi
add rcx, qword [0x14064af88]
lea rsi, [0x14064af80]
mov dword [rsp + 0x3c], 0
cmp rcx, 1
jbe 0x1401a6808
mov rax, qword [0x14064af80]
mov edx, ebx
mov rcx, rsi
call qword [rax + 0x30]
jmp 0x1401a680a
mov al, 1
lea rcx, str.C:_vcpkginstalledx64_windows_staticinclude_boost_asiodetailimplwinsock_init.ipp
movzx eax, al
add rax, 2
mov qword [rsp + 0x20], rcx
mov qword [rsp + 0x40], rsi
lea rcx, str.void___cdecl_boost::asio::detail::winsock_init_base::throw_on_error_struct_boost::asio::detail::winsock_init_base::data__
mov rsi, qword [rsp + 0x210]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x38], ebx
mov dword [rsp + 0x30], 0x48
mov dword [rsp + 0x34], 0x1a
test al, 1
jne 0x1401a6877
mov rax, rdi
mov rcx, qword [rsp + 0x1f0]
xor rcx, rsp
call fcn.1404a5b80
mov rbx, qword [rsp + 0x218]
add rsp, 0x200
pop rdi
ret
lea r8, [rsp + 0x20]
lea rdx, str.winsock
lea rcx, [rsp + 0x38]
call fcn.140173b10
int3
Function at 0x1401da790
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x40
cmp byte [rcx + 0x19], 0
mov r12, r9
mov rdi, r8
mov r10, rdx
mov rbp, rcx
jge 0x1401da800
mov rax, qword [rcx + 0x80]
xor ecx, ecx
mov rdx, qword [rax + 0x10]
mov dword [rsp + 0x20], edx
test r8, r8
je 0x1401da7ee
nop word [rax + rax]
mov rax, rcx
and eax, 3
movzx eax, byte [rsp + rax + 0x20]
xor byte [r10 + rcx], al
inc rcx
cmp rcx, rdi
jb 0x1401da7d0
mov rax, qword [rbp + 0x80]
mov rcx, rdi
and ecx, 3
je 0x1401da7fc
shl cl, 3
ror rdx, cl
mov qword [rax + 0x10], rdx
mov rax, qword [rbp + 0x80]
mov rdx, r10
mov rbx, qword [rax]
add rbx, 0x50
mov r15, qword [rbx + 0x10]
lea r14, [rbx + 0x10]
mov rcx, rbx
call fcn.1401a8510
mov r10, qword [rbp + 0x80]
mov rax, qword [r10]
cmp dword [rax + 0x70], 1
jne 0x1401da8ba
cmp qword [rbx + 0x18], 0xf
jbe 0x1401da847
mov rdx, qword [rbx]
mov rbx, rdx
add rdx, qword [r14]
jmp 0x1401da84d
mov rdx, qword [r14]
add rdx, rbx
lea rax, [r15 + rbx]
cmp rax, rdx
je 0x1401da8ba
lea rbx, [0x1405e9690]
nop dword [rax]
cmp dword [r10 + 0x18], 0
movzx r8d, byte [rax]
mov r9d, r8d
movzx r11d, byte [r8 + rbx]
je 0x1401da883
mov ecx, dword [r10 + 0x1c]
and r9d, 0x3f
shl ecx, 6
or r9d, ecx
jmp 0x1401da892
mov r8d, 0xff
mov ecx, r11d
sar r8d, cl
and r9d, r8d
mov dword [r10 + 0x1c], r9d
mov ecx, dword [r10 + 0x18]
add ecx, 0x10
shl ecx, 4
add ecx, r11d
movzx r8d, byte [rcx + rbx]
mov dword [r10 + 0x18], r8d
cmp r8d, 1
je 0x1401da8d0
inc rax
cmp rax, rdx
jne 0x1401da860
sub qword [rbp + 0x30], rdi
mov rax, rdi
add rsp, 0x40
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov dword [rsp + 0x28], reloc.WS2_32.dll_recv
call fcn.14017dde0
mov qword [rsp + 0x30], rax
xor eax, eax
movups xmm0, xmmword [rsp + 0x28]
movups xmmword [r12], xmm0
add rsp, 0x40
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x1401fbfe0
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x50
mov rdi, r8
mov rax, rdx
mov rbx, rcx
test r8, r8
je 0x1401fc019
xorps xmm0, xmm0
mov qword [rsp + 0x30], 0
movups xmmword [r8], xmm0
movsd xmm0, qword [rsp + 0x30]
movsd qword [r8 + 0x10], xmm0
test rax, rax
je 0x1401fc043
mov rdx, rbx
cmp qword [rcx + 0x18], 7
jbe 0x1401fc02b
mov rdx, qword [rcx]
cmp qword [rax + 0x18], 7
jbe 0x1401fc035
mov rax, qword [rax]
xor r8d, r8d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateDirectoryExW]
jmp 0x1401fc055
cmp qword [rcx + 0x18], 7
jbe 0x1401fc04d
mov rcx, qword [rcx]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x1401fc06b
mov al, 1
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
xorps xmm0, xmm0
mov qword [rsp + 0x48], 0
movups xmmword [rsp + 0x20], xmm0
movsd xmm0, qword [rsp + 0x48]
movsd qword [rsp + 0x30], xmm0
lea r8, [rsp + 0x20]
mov rdx, rbx
lea rcx, [rsp + 0x68]
call fcn.1401fe070
nop
cmp dword [rsp + 0x68], 3
je 0x1401fc0be
lea r9, str.boost::filesystem::create_directory
mov r8, rdi
mov rdx, rbx
mov ecx, esi
call fcn.140200cf0
xor al, al
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
Function at 0x1401fd980
Capabilities:
Delete directory
Delete file
Set file attributes

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x20
mov esi, edx
movzx r14d, dl
shr esi, 4
mov r15, r8
and sil, 1
mov ebp, edx
mov rbx, rcx
and r14b, 1
je 0x1401fda1f
and edx, 0xfffffffe
cmp qword [rcx + 0x18], 7
jbe 0x1401fd9c0
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x1401fda1f
call qword [sym.imp.KERNEL32.dll_GetLastError]
movsxd r10, eax
cmp r10d, 0x35
ja 0x1401fd9ed
movabs rax, 0x2000000020800c
bt rax, r10
jb 0x1401fdabb
lea eax, [r10 - 0x43]
cmp eax, 0x38
ja 0x1401fda0a
movabs rcx, 0x100000000100001
bt rcx, rax
jb 0x1401fdabb
cmp r10d, 0xa1
je 0x1401fdabb
mov ecx, r10d
jmp 0x1401fdaa9
mov rax, qword [rbx + 0x18]
mov rcx, rbx
test sil, sil
jne 0x1401fda3c
cmp rax, 7
jbe 0x1401fda34
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x1401fda4b
cmp rax, 7
jbe 0x1401fda45
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x1401fdabf
call qword [sym.imp.KERNEL32.dll_GetLastError]
movsxd rdi, eax
cmp edi, 0x35
ja 0x1401fda6d
movabs rax, 0x2000000020800c
bt rax, rdi
jb 0x1401fdabb
lea eax, [rdi - 0x43]
cmp eax, 0x38
ja 0x1401fda85
movabs rcx, 0x100000000100001
bt rcx, rax
jb 0x1401fdabb
cmp edi, 0xa1
je 0x1401fdabb
test r14b, r14b
je 0x1401fdaa7
cmp qword [rbx + 0x18], 7
mov rcx, rbx
jbe 0x1401fda9f
mov rcx, qword [rbx]
mov edx, ebp
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, edi
lea r9, str.boost::filesystem::remove
mov r8, r15
mov rdx, rbx
call fcn.140200cf0
xor al, al
jmp 0x1401fdac1
mov al, 1
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret
Function at 0x1401fe210
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x70
mov rax, qword [0x14064a080]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov r15, r8
mov rsi, rdx
mov r14, rcx
cmp qword [rdx + 0x18], 7
jbe 0x1401fe242
mov rdx, qword [rdx]
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x58], xmm1
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp word [rdx + r8*2], 0
jne 0x1401fe260
lea rcx, [rsp + 0x48]
call fcn.1401b58d0
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 7
cmova rcx, qword [rsp + 0x48]
xor edi, edi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x2200000
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x88
mov r8d, 7
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
mov qword [rsp + 0x40], rax
mov rdx, qword [rsp + 0x60]
cmp rdx, 7
jbe 0x1401fe2fb
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1401fe2f6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1401fe3c6
call fcn.1404a5eec
movdqa xmm0, xmmword [0x1405faf00]
movdqu xmmword [rsp + 0x58], xmm0
mov word [rsp + 0x48], di
cmp rbx, 0xffffffffffffffff
je 0x1401fe32d
test rbx, rbx
je 0x1401fe32d
mov r9, r15
mov r8, rsi
mov rdx, rbx
mov rcx, r14
call fcn.1401fdd40
nop
jmp 0x1401fe399
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
cmp eax, 5
jne 0x1401fe37e
mov rcx, rsi
cmp qword [rsi + 0x18], 7
jbe 0x1401fe347
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
cmp eax, 0xffffffff
je 0x1401fe376
bt eax, 0xa
jb 0x1401fe37e
mov edx, eax
mov rcx, rsi
call fcn.1401fc620
and edi, 0x10
or edi, 0x20
shr edi, 4
mov dword [r14], edi
mov dword [r14 + 4], eax
jmp 0x1401fe38f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov r9, r15
mov r8, rsi
mov edx, ebp
mov rcx, r14
call fcn.1401fc900
nop
lea rax, [rbx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1401fe3a2
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, r14
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.1404a5b80
mov rbx, qword [rsp + 0xb8]
add rsp, 0x70
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
call fcn.1404acd84
nop
int3
Function at 0x1402033d0
Capabilities:
Generate random numbers via winapi

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, qword [rcx]
lea r8, [rsp + 0x30]
mov edx, 4
mov rcx, qword [rbx]
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x1402033fa
mov eax, dword [rsp + 0x30]
add rsp, 0x20
pop rbx
ret
lea rdx, str.error_while_reading
mov rcx, rbx
call fcn.140203410
int3

Function at 0x140215af0
Capabilities:
Set thread local storage value

Disassembly:
mov eax, 0x28
call fcn.1404a6760
sub rsp, rax
mov ecx, dword [rcx]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
xor ecx, ecx
test eax, eax
setne cl
mov eax, ecx
add rsp, 0x28
ret

Function at 0x140215ce0
Capabilities:
Allocate thread local storage

Disassembly:
push rbx
push rdi
push r13
mov eax, gethostbyaddr
call fcn.1404a6760
sub rsp, rax
mov eax, dword [0x1406522a8]
mov r13d, ecx
mov ebx, 1
cmp eax, 2
je 0x140215d53
nop word [rax + rax]
xor eax, eax
lock cmpxchg dword [0x1406522a8], ebx
je 0x140215d2d
cmp eax, ebx
je 0x140215d10
mov eax, dword [0x1406522a8]
cmp eax, 2
jne 0x140215d72
jmp 0x140215d53
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
lea r8, [0x140215c00]
xor edx, edx
xor ecx, ecx
mov dword [0x1406522a4], eax
call fcn.140258dd0
mov dword [0x1406522a8], 2
mov r8d, reloc.WS2_32.dll___WSAFDIsSet
lea rdx, str.crypto_threads_win.c
mov ecx, 0x58
call fcn.140217220
mov rdi, rax
test rax, rax
jne 0x140215d7d
xor eax, eax
add rsp, 0x30
pop r13
pop rdi
pop rbx
ret
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r15
call fcn.140265fc0
mov qword [rdi + 0x30], rax
call fcn.140265be0
mov qword [rdi + 0x40], rax
call fcn.140265be0
mov qword [rdi + 0x50], rax
call fcn.140265fc0
mov qword [rdi + 0x38], rax
call fcn.140265fc0
cmp r13d, ebx
mov qword [rdi + 0x48], rax
mov r8d, 0x85
lea rdx, str.crypto_threads_win.c
cmovge ebx, r13d
inc ebx
movsxd rbx, ebx
lea rcx, [rbx*8]
call fcn.140217220
mov qword [rdi + 0x18], rbx
mov qword [rdi + 0x10], rax
test rax, rax
je 0x140215e19
cmp qword [rdi + 0x40], 0
je 0x140215e19
cmp qword [rdi + 0x50], 0
je 0x140215e19
cmp qword [rdi + 0x30], 0
je 0x140215e19
cmp qword [rdi + 0x38], 0
je 0x140215e19
cmp qword [rdi + 0x48], 0
jne 0x140215e72
mov r8d, 0xa8
lea rdx, str.crypto_threads_win.c
mov rcx, rax
call fcn.140216f90
lea rcx, [rdi + 0x40]
call fcn.140265b40
lea rcx, [rdi + 0x50]
call fcn.140265b40
lea rcx, [rdi + 0x38]
call fcn.140265f50
lea rcx, [rdi + 0x48]
call fcn.140265f50
lea rcx, [rdi + 0x30]
call fcn.140265f50
mov r8d, 0xae
lea rdx, str.crypto_threads_win.c
mov rcx, rdi
call fcn.140216f90
xor edi, edi
mov r15, qword [rsp + 0x20]
mov rax, rdi
mov r14, qword [rsp + 0x28]
mov r12, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x50]
add rsp, 0x30
pop r13
pop rdi
pop rbx
ret
Function at 0x140215ea0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
mov eax, 0x20
call fcn.1404a6760
sub rsp, rax
mov rbx, rcx
mov esi, 0xffffffff
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x1406522a4]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, edi
mov r14, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test r14, r14
jne 0x140215f31
mov r8d, 0xdd
lea rdx, str.crypto_threads_win.c
mov ecx, 0xf0
call fcn.140217220
mov r14, rax
test rax, rax
jne 0x140215f22
mov r8d, 0xde
lea rdx, str.crypto_threads_win.c
lea rcx, str.assertion_failed:_data___NULL
call fcn.1402563f0
mov ecx, dword [0x1406522a4]
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
xor ecx, ecx
mov rax, r14
cmp qword [rax], 0
jne 0x140215f42
cmp esi, 0xffffffff
cmove esi, ecx
cmp qword [rax + 0x10], rbx
je 0x140216003
inc ecx
add rax, 0x18
cmp ecx, 0xa
jl 0x140215f36
prefetchw byte [rbx + 0x24]
mov eax, dword [rbx + 0x24]
nop
mov ecx, eax
lock cmpxchg dword [rbx + 0x24], ecx
jne 0x140215f60
mov rcx, qword [rbx + 0x10]
mov r8d, eax
lea rdx, [r8*8]
lock inc qword [rdx + rcx]
prefetchw byte [rbx + 0x24]
mov eax, dword [rbx + 0x24]
mov ecx, eax
lock cmpxchg dword [rbx + 0x24], ecx
jne 0x140215f84
cmp r8d, eax
je 0x140215fe2
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rbx + 0x10]
lock dec qword [rdx + rax]
prefetchw byte [rbx + 0x24]
mov eax, dword [rbx + 0x24]
mov ecx, eax
lock cmpxchg dword [rbx + 0x24], ecx
jne 0x140215fb0
mov r8d, eax
mov rax, qword [rbx + 0x10]
lea rdx, [r8*8]
lock inc qword [rdx + rax]
prefetchw byte [rbx + 0x24]
mov eax, dword [rbx + 0x24]
mov ecx, eax
lock cmpxchg dword [rbx + 0x24], ecx
jne 0x140215fd4
cmp r8d, eax
jne 0x140215fa0
movsxd rax, esi
lea rcx, [rax + rax*2]
mov rax, qword [rbx + 0x10]
lea rdx, [r14 + rcx*8]
mov dword [rdx + 8], 1
mov qword [rdx + 0x10], rbx
lea rcx, [rax + r8*8]
mov qword [rdx], rcx
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x40]
add rsp, 0x20
pop r14
ret
Function at 0x140216020
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
mov eax, 0x20
call fcn.1404a6760
sub rsp, rax
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x1406522a4]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, ebx
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor r9d, r9d
lea rdx, [rsi + 0x10]
xor r8d, r8d
cmp qword [rdx], rdi
je 0x140216089
inc r9d
inc r8
add rdx, 0x18
cmp r8, 0xa
jl 0x140216064
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
movsxd rax, r9d
lea rcx, [rax + rax*2]
add dword [rsi + rcx*8 + 8], 0xffffffff
lea rbx, [rsi + rcx*8]
jne 0x1402160d8
mov rax, qword [rbx]
mov rcx, 0xffffffffffffffff
lock xadd qword [rax], rcx
cmp rcx, 1
jns 0x1402160c9
mov r8d, 0x10b
lea rdx, str.crypto_threads_win.c
lea rcx, str.assertion_failed:_ret___0
call fcn.1402563f0
mov qword [rbx], 0
mov qword [rbx + 0x10], 0
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x140217670
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
lea rsi, [rcx - 1]
movsxd rdi, r9d
not rcx
shr rsi, 0x3f
shr rcx, 0x3f
mov r11, rdx
and rsi, rcx
mov r10, r8
mov ecx, dword [rdx + 8]
dec rsi
xor ecx, dword [r8 + 8]
and ecx, esi
xor dword [rdx + 8], ecx
xor dword [r8 + 8], ecx
movq xmm4, rsi
mov ecx, dword [rdx + 0x10]
xor ecx, dword [r8 + 0x10]
and ecx, esi
punpcklqdq xmm4, xmm4
xor dword [rdx + 0x10], ecx
xor dword [r8 + 0x10], ecx
mov edx, dword [rdx + 0x14]
mov ecx, edx
mov eax, dword [r8 + 0x14]
xor rcx, rax
and ecx, 4
and rcx, rsi
mov eax, ecx
xor eax, edx
mov dword [r11 + 0x14], eax
xor dword [r8 + 0x14], ecx
xor ecx, ecx
mov edx, ecx
test r9d, r9d
jle 0x140217789
cmp edi, 2
jb 0x140217789
mov r9, qword [r8]
lea rax, [rdi - 1]
mov r8, qword [r11]
lea rbx, [rdi - 1]
lea rbx, [r9 + rbx*8]
lea rax, [r8 + rax*8]
cmp r9, rax
ja 0x14021771a
cmp rbx, r8
jae 0x140217789
cmp r9, r10
ja 0x140217724
cmp rbx, r10
jae 0x140217789
cmp r9, r11
ja 0x14021772e
cmp rbx, r11
jae 0x140217789
cmp r8, r10
ja 0x140217738
cmp rax, r10
jae 0x140217789
cmp r8, r11
ja 0x140217742
cmp rax, r11
jae 0x140217789
mov eax, edi
and eax, 0xfffffffe
nop word [rax + rax]
movdqu xmm2, xmmword [rcx + r9]
add edx, 2
movdqu xmm1, xmmword [r8 + rcx]
lea rcx, [rcx + 0x10]
movdqa xmm3, xmm2
xorps xmm3, xmm1
andps xmm3, xmm4
movdqa xmm0, xmm3
xorps xmm3, xmm2
xorps xmm0, xmm1
movdqu xmmword [r8 + rcx - 0x10], xmm0
movdqu xmmword [rcx + r9 - 0x10], xmm3
cmp edx, eax
jl 0x140217750
movsxd rax, edx
cmp rax, rdi
jge 0x1402177be
mov rcx, qword [r11]
mov rdx, qword [rcx + rax*8]
lea r8, [rcx + rax*8]
mov rcx, qword [r10]
mov r9, rdx
xor r9, qword [rcx + rax*8]
and r9, rsi
xor rdx, r9
mov qword [r8], rdx
mov rcx, qword [r10]
xor qword [rcx + rax*8], r9
inc rax
cmp rax, rdi
jl 0x140217791
mov rbx, qword [rsp + 8]
mov rsi, qword [rsp + 0x10]
mov rdi, qword [rsp + 0x18]
ret
Function at 0x140218040
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], rbx
push rsi
test byte [rcx + 0x14], 4
lea rax, [rcx + 8]
mov r11, qword [rcx]
lea rsi, [rdx + 8]
mov rbx, qword [rdx]
je 0x14021813d
mov ecx, dword [rsi]
cmp dword [rax], ecx
jne 0x14021813d
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rdi
xor edi, edi
mov ebp, edi
test ecx, ecx
jle 0x14021812a
sub r11, rbx
nop dword [rax]
nop word [rax + rax]
mov r8, qword [rbx + r11]
inc ebp
mov rdx, qword [rbx]
lea rbx, [rbx + 8]
mov rcx, r8
shr rdx, 0x3f
sub r8, qword [rbx - 8]
shr r8, 0x3f
xor r8d, edx
shr rcx, 0x3f
xor edx, ecx
or r8d, edx
xor r8d, ecx
neg r8d
mov dword [rsp + 0x10], r8d
not r8d
mov r10d, dword [rsp + 0x10]
mov dword [rsp + 0x10], r8d
mov r9d, dword [rsp + 0x10]
and edi, r9d
mov r8, qword [rbx - 8]
or edi, r10d
mov rdx, qword [rbx + r11 - 8]
mov rcx, r8
sub r8, qword [rbx + r11 - 8]
shr r8, 0x3f
shr rdx, 0x3f
xor r8d, edx
shr rcx, 0x3f
xor edx, ecx
or r8d, edx
xor r8d, ecx
neg r8d
mov dword [rsp + 0x10], r8d
not r8d
mov edx, dword [rsp + 0x10]
and edx, 1
mov dword [rsp + 0x10], r8d
mov ecx, dword [rsp + 0x10]
and edi, ecx
or edi, edx
cmp ebp, dword [rsi]
jl 0x140218090
mov rbp, qword [rsp + 0x18]
mov eax, edi
mov rdi, qword [rsp + 0x20]
mov rbx, qword [rsp + 0x28]
pop rsi
ret
mov ecx, dword [rax]
mov eax, ecx
sub eax, dword [rsi]
jne 0x14021816b
lea eax, [rcx - 1]
movsxd rcx, eax
test eax, eax
js 0x140218169
lea rax, [rbx + rcx*8]
sub r11, rbx
mov rdx, qword [rax + r11]
cmp rdx, qword [rax]
jne 0x140218172
sub rax, 8
sub rcx, 1
jns 0x140218156
xor eax, eax
mov rbx, qword [rsp + 0x28]
pop rsi
ret
mov rbx, qword [rsp + 0x28]
mov eax, 0xffffffff
mov ecx, 1
cmova eax, ecx
pop rsi
ret
Function at 0x140218470
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x40
call fcn.1404a6760
sub rsp, rax
xor r13d, r13d
mov r12d, r9d
mov r15d, r13d
mov edi, r13d
mov ebp, r13d
mov ebx, r8d
mov r14, rdx
mov rsi, rcx
call fcn.140217bd0
mov r8d, eax
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp dword [rsp + 0x90], r13d
jne 0x1402184ef
mov edi, dword [rsi + 0x10]
mov ecx, edi
neg ecx
lea ecx, [rax*8]
sbb r15d, r15d
movzx r15d, r15b
cmp ecx, r8d
jne 0x1402184ed
test edi, edi
sete bpl
jmp 0x1402184ef
mov ebp, edi
add eax, ebp
cmp ebx, 0xffffffff
jne 0x140218523
mov ebx, eax
mov eax, dword [rsi + 0xc]
shl eax, 3
movsxd rdx, eax
test eax, eax
jne 0x14021859e
test ebx, ebx
je 0x140218635
movsxd r8, ebx
xor edx, edx
mov rcx, r14
call fcn.1404dea80
jmp 0x140218635
cmp ebx, eax
jge 0x1402184f8
movups xmm2, xmmword [rsi]
movsxd rax, dword [rsi + 8]
movsd xmm0, qword [rsi + 0x10]
movsd qword [rsp + 0x30], xmm0
movups xmmword [rsp + 0x20], xmm2
test eax, eax
jle 0x140218564
movq rcx, xmm2
lea r8, [rcx + rax*8]
nop dword [rax + rax]
cmp qword [r8 - 8], r13
lea r8, [r8 - 8]
jne 0x140218560
dec eax
test eax, eax
jg 0x140218550
mov dword [rsp + 0x28], eax
mov ecx, dword [rsp + 0x30]
test eax, eax
cmove ecx, r13d
mov dword [rsp + 0x30], ecx
lea rcx, [rsp + 0x20]
call fcn.140217bd0
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
add eax, ebp
cmp ebx, eax
jge 0x1402184f8
mov rax, 0xffffffffffffffff
jmp 0x140218637
cmp r12d, 1
je 0x1402185ad
lea eax, [rbx - 1]
movsxd rcx, eax
add r14, rcx
mov r11d, 1
movsxd rbp, ebx
cmp r12d, r11d
mov rax, 0xffffffffffffffff
lea r12, [rdx - 1]
cmovne r11, rax
mov eax, dword [rsi + 8]
shl eax, 3
xor r9d, r9d
xor r10d, r10d
movsxd r13, eax
test ebx, ebx
je 0x140218635
nop dword [rax + rax]
mov rcx, qword [rsi]
movzx eax, r9b
and al, 7
mov rdx, r9
shl al, 3
shr rdx, 3
mov r8, qword [rcx + rdx*8]
movzx ecx, al
shr r8, cl
mov rax, r10
sub rax, r13
shr rax, 0x3f
neg al
and r8b, al
xor r8b, r15b
lea eax, [r8 + rdi]
cmp r8b, al
mov byte [r14], al
mov rax, r9
seta dil
sub rax, r12
shr rax, 0x3f
add r14, r11
add r9, rax
inc r10
cmp r10, rbp
jb 0x1402185e0
mov eax, ebx
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
ret