joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14006db20
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rdi
push r14
sub rsp, 0x20
mov eax, dword [rcx + 0x18]
mov rbx, rcx
mov ebp, r8d
mov r14, rdx
lea ecx, [rax + rax]
mov eax, dword [rbx + 0x20]
add rax, 0x18
add rcx, rax
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x14006db62
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
lea rcx, [rax + 0x18]
mov qword [rax], rbx
mov qword [rax + 8], rcx
mov eax, dword [rbx + 0x18]
add rax, rcx
mov qword [rsp + 0x48], rsi
mov qword [rdi + 0x10], rax
cmp ebp, dword [rbx + 0x1c]
jbe 0x14006dba9
call qword [rbx]
mov rcx, qword [rdi + 8]
mov r8d, ebp
mov rdx, r14
call qword [rbx + reloc.WS2_32.dll_htonl]
mov r14d, dword [rbx + 0x18]
add r14, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
mov rcx, r14
call qword [rbx + reloc.WS2_32.dll_recv]
mov rcx, qword [rdi + 8]
mov ebp, dword [rbx + 0x20]
call qword [rbx]
mov rcx, qword [rdi + 0x10]
call qword [rbx]
xor esi, esi
test rbp, rbp
je 0x14006dc02
mov rsi, rbp
nop dword [rax + rax]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x36
mov r8d, 1
mov byte [rsp + 0x40], al
mov rcx, qword [rdi + 8]
call qword [rbx + reloc.WS2_32.dll_htonl]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x5c
lea r14, [r14 + 1]
mov byte [rsp + 0x40], al
mov r8d, 1
mov rcx, qword [rdi + 0x10]
call qword [rbx + reloc.WS2_32.dll_htonl]
sub rbp, 1
jne 0x14006dbc0
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x14006dc43
nop word [rax + rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x1400801aa]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x1400801ab]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x14006dc10
mov rsi, qword [rsp + 0x48]
mov rax, rdi
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret

Function at 0x14006dc5c
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rbx, rdx
lea r8, [rsp + 0x60]
mov edi, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
jne 0x14006dc96
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x14006dc9b
mov r9d, dword [rsp + 0x60]
and qword [rsp + 0x30], 0
mov r8d, edi
and dword [rsp + 0x28], 0
xor edx, edx
mov ecx, 0x1300
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x14006dce4
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, reloc.WS2_32.dll_accept
cmp byte [rcx + rax], 0
je 0x14006dce4
dec r8
sub rdx, 1
jne 0x14006dcca
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret
Function at 0x14006efec
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14006f036
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14006f036
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14006f036
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14006f036
cmp dword [rcx + 0x84], 0xe
jbe 0x14006f036
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x14006f038
xor al, al
add rsp, 0x28
ret
Function at 0x180018db8
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x50
mov qword [0x180048720], rcx
mov ebx, 0x800
mov ecx, ebx
call fcn.18001a7dc
mov r8d, ebx
xor edx, edx
mov rcx, rax
mov qword [0x180048728], rax
call fcn.18001aa90
mov rcx, qword [0x180048728]
xor r14d, r14d
lea r9d, [r14 + 1]
mov edx, ebx
mov qword [rsp + 0x20], r14
mov r8d, r9d
call fcn.18001a1b4
mov eax, r14d
lea rbp, str.._._._..._._._.._._...
xor byte [rax + rbp], 0x2e
inc rax
cmp rax, 0x1000
jl 0x180018e1f
lea rcx, [rsp + 0x30]
mov r8d, 0x1000
mov rdx, rbp
call fcn.180014284
jmp 0x180018f16
lea rcx, [rsp + 0x30]
call fcn.18001432c
lea rcx, [rsp + 0x30]
movsx ebx, ax
call fcn.18001432c
mov rcx, qword [0x180048728]
movsx rdi, di
mov edx, ebx
movzx esi, ax
shl rdi, 4
mov word [rdi + rcx], bx
dec edx
je 0x180018f00
dec edx
je 0x180018ee9
dec edx
jne 0x180018f16
movsx rbx, ax
mov rcx, rbx
call fcn.18001a7dc
mov r8, qword [0x180048728]
lea rcx, [rsp + 0x30]
movsx edx, si
mov qword [rdi + r8 + 8], rax
call fcn.1800142c8
mov rcx, qword [0x180048728]
mov r8, rbx
mov rcx, qword [rdi + rcx + 8]
mov rdx, rax
call fcn.18001ae80
mov rcx, qword [0x180048728]
mov r9d, 1
mov rcx, qword [rdi + rcx + 8]
mov r8d, r9d
mov rdx, rbx
mov qword [rsp + 0x20], r14
call fcn.18001a1b4
jmp 0x180018f16
lea rcx, [rsp + 0x30]
call fcn.180014294
mov rcx, qword [0x180048728]
mov dword [rdi + rcx + 8], eax
jmp 0x180018f16
lea rcx, [rsp + 0x30]
call fcn.18001432c
mov rdx, qword [0x180048728]
mov word [rdi + rdx + 8], ax
lea rcx, [rsp + 0x30]
call fcn.18001432c
movzx edi, ax
test ax, ax
jg 0x180018e46
xor edx, edx
mov r8d, 0x1000
mov rcx, rbp
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x78]
add rsp, 0x50
pop r14
jmp fcn.18001aa90

Function at 0x180019818
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x30
or rsi, 0xffffffffffffffff
mov rdi, rdx
mov rbx, rcx
lea edx, [rsi + 0x19]
lea r9d, [rsi + 5]
xor ecx, ecx
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r14, rax
mov qword [rax], rbx
mov qword [rax + 8], rdi
mov rax, qword [sym.imp.KERNEL32.dll_VirtualFree]
mov qword [r14 + 0x10], rax
call fcn.18001999c
mov r8, qword [0x180044438]
test r8, r8
je 0x18001988d
and qword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
mov r9, r14
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rsi, rax
mov rbx, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x50]
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop r14
ret
Function at 0x140018a94
Capabilities:
Terminate process

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_IsDebuggerPresent]
mov ecx, 1
mov dword [0x1400258e0], eax
call fcn.140019344
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetUnhandledExceptionFilter]
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_UnhandledExceptionFilter]
cmp dword [0x1400258e0], 0
jne case.default.0x140018aea
mov ecx, 1
call fcn.140019344
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xc0000409
add rsp, 0x20
pop rbx
jmp qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TerminateProcess]
lahf
invalid
Function at 0x140128780
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x50
mov rax, qword [0x140363e40]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov r12, r9
mov r14, r8
mov r15, rdx
mov rdi, rcx
mov qword [rsp + 0x38], rcx
xor esi, esi
mov dword [rsp + 0x30], esi
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rcx], xmm0
mov qword [rcx + 0x10], rax
mov rbp, qword [rdx + 8]
sub rbp, qword [rdx]
mov qword [rcx], rsi
mov qword [rcx + 8], rsi
mov qword [rcx + 0x10], rsi
add rbp, 0x10
je 0x140128849
movabs rax, 0x7fffffffffffffff
cmp rbp, rax
ja 0x140128989
cmp rbp, 0x1000
jb 0x140128821
lea rcx, [rbp + 0x27]
cmp rcx, rbp
jbe 0x14012897d
call fcn.1402a7030
test rax, rax
je 0x14012881a
lea rcx, [rax + 0x27]
and rcx, 0xffffffffffffffe0
mov qword [rcx - 8], rax
jmp 0x14012882c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rbp
call fcn.1402a7030
mov rcx, rax
mov qword [rdi], rcx
lea rax, [rcx + rbp]
mov qword [rdi + 0x10], rax
lea rbx, [rcx + rbp]
mov r8, rbp
xor edx, edx
call sub.VCRUNTIME140.dll_memset
mov qword [rdi + 8], rbx
mov dword [rsp + 0x30], 1
call fcn.14012a200
mov rbx, rax
test rax, rax
je 0x140128983
call fcn.1401314f0
mov rdx, rax
mov qword [rsp + 0x20], r12
mov r9, r14
xor r8d, r8d
mov rcx, rbx
call fcn.14012b560
cmp eax, 1
jne 0x140128983
mov r9, qword [r15]
mov rax, qword [r15 + 8]
sub rax, r9
mov dword [rsp + 0x20], eax
lea r8, [rsp + 0x40]
mov rdx, qword [rdi]
mov rcx, rbx
call fcn.14012b5e0
cmp eax, 1
jne 0x140128983
movsxd rbp, dword [rsp + 0x40]
mov rdx, rbp
add rdx, qword [rdi]
lea r8, [rsp + 0x40]
mov rcx, rbx
call fcn.14012b310
cmp eax, 1
jne 0x140128983
add ebp, dword [rsp + 0x40]
mov rcx, rbx
call fcn.14012a180
movsxd rbx, ebp
mov rbp, qword [rdi + 8]
mov rdx, qword [rdi]
mov rcx, rbp
sub rcx, rdx
cmp rbx, rcx
jae 0x1401288f5
lea rax, [rdx + rbx]
jmp 0x140128924
jbe 0x140128928
mov rax, qword [rdi + 0x10]
sub rax, rdx
cmp rbx, rax
jbe 0x140128910
mov rdx, rbx
mov rcx, rdi
call fcn.140129440
jmp 0x140128928
sub rbx, rcx
mov r8, rbx
xor edx, edx
mov rcx, rbp
call sub.VCRUNTIME140.dll_memset
lea rax, [rbx + rbp]
mov qword [rdi + 8], rax
mov rdx, qword [rdi]
cmp qword [rdi + 8], rdx
je 0x14012895e
mov rax, rsi
and eax, 0xf
movzx eax, byte [rax + r14]
xor byte [rdx + rsi], al
mov rax, qword [rdi]
movzx ecx, byte [rax + rsi]
ror cl, 5
mov byte [rax + rsi], cl
inc rsi
mov rdx, qword [rdi]
mov rcx, qword [rdi + 8]
sub rcx, rdx
cmp rsi, rcx
jb 0x140128931
mov rax, rdi
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1402a7010
add rsp, 0x50
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
call fcn.1401286d0
int3
call fcn.140128770
int3
call fcn.140129420
int3
Function at 0x140128990
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x50
mov rax, qword [0x140363e40]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov r12, r9
mov r15, r8
mov r14, rdx
mov rdi, rcx
mov qword [rsp + 0x38], rcx
xor esi, esi
mov dword [rsp + 0x30], esi
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rcx], xmm0
mov qword [rcx + 0x10], rax
mov rbp, qword [rdx + 8]
sub rbp, qword [rdx]
mov qword [rcx], rsi
mov qword [rcx + 8], rsi
mov qword [rcx + 0x10], rsi
je 0x140128a55
movabs rax, 0x7fffffffffffffff
cmp rbp, rax
ja 0x140128ba6
cmp rbp, 0x1000
jb 0x140128a2d
lea rcx, [rbp + 0x27]
cmp rcx, rbp
jbe 0x140128b9a
call fcn.1402a7030
test rax, rax
je 0x140128a26
lea rcx, [rax + 0x27]
and rcx, 0xffffffffffffffe0
mov qword [rcx - 8], rax
jmp 0x140128a38
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rbp
call fcn.1402a7030
mov rcx, rax
mov qword [rdi], rcx
lea rax, [rcx + rbp]
mov qword [rdi + 0x10], rax
lea rbx, [rcx + rbp]
mov r8, rbp
xor edx, edx
call sub.VCRUNTIME140.dll_memset
mov qword [rdi + 8], rbx
mov dword [rsp + 0x30], 1
mov rcx, qword [r14]
cmp qword [r14 + 8], rcx
je 0x140128aa0
nop word [rax + rax]
movzx ecx, byte [rcx + rsi]
ror cl, 3
mov rax, qword [rdi]
mov byte [rsi + rax], cl
mov rcx, qword [rdi]
mov rax, rsi
and eax, 0xf
movzx eax, byte [rax + r15]
xor byte [rcx + rsi], al
inc rsi
mov rcx, qword [r14]
mov rax, qword [r14 + 8]
sub rax, rcx
cmp rsi, rax
jb 0x140128a70
call fcn.14012a200
mov rbx, rax
test rax, rax
je 0x140128ba0
call fcn.1401314f0
mov rdx, rax
mov qword [rsp + 0x20], r12
mov r9, r15
xor r8d, r8d
mov rcx, rbx
call fcn.14012ae60
cmp eax, 1
jne 0x140128ba0
mov rdx, qword [rdi]
mov rax, qword [rdi + 8]
sub rax, rdx
mov dword [rsp + 0x20], eax
mov r9, rdx
lea r8, [rsp + 0x40]
mov rcx, rbx
call fcn.14012ae90
cmp eax, 1
jne 0x140128ba0
movsxd rsi, dword [rsp + 0x40]
mov rdx, rsi
add rdx, qword [rdi]
lea r8, [rsp + 0x40]
mov rcx, rbx
call fcn.14012aac0
cmp eax, 1
jne 0x140128ba0
add esi, dword [rsp + 0x40]
mov rcx, rbx
call fcn.14012a180
movsxd rbx, esi
mov rsi, qword [rdi + 8]
mov rdx, qword [rdi]
mov rcx, rsi
sub rcx, rdx
cmp rbx, rcx
jae 0x140128b48
lea rax, [rdx + rbx]
mov qword [rdi + 8], rax
jmp 0x140128b7b
jbe 0x140128b7b
mov rax, qword [rdi + 0x10]
sub rax, rdx
cmp rbx, rax
jbe 0x140128b63
mov rdx, rbx
mov rcx, rdi
call fcn.140129440
jmp 0x140128b7b
sub rbx, rcx
mov r8, rbx
xor edx, edx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memset
lea rcx, [rbx + rsi]
mov qword [rdi + 8], rcx
mov rax, rdi
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1402a7010
add rsp, 0x50
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
call fcn.1401286d0
int3
call fcn.140128770
int3
call fcn.140129420
int3
Function at 0x14013e310
Capabilities:
Set thread local storage value

Disassembly:
mov eax, 0x28
call fcn.1402a73a0
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 0x14013e510
Capabilities:
Allocate thread local storage

Disassembly:
push rbx
push rdi
push r13
mov eax, gethostbyname
call fcn.1402a73a0
sub rsp, rax
mov eax, dword [0x140546fe4]
mov r13d, ecx
mov ebx, 1
cmp eax, 2
je 0x14013e583
nop word [rax + rax]
xor eax, eax
lock cmpxchg dword [0x140546fe4], ebx
je 0x14013e55d
cmp eax, ebx
je 0x14013e540
mov eax, dword [0x140546fe4]
cmp eax, 2
jne 0x14013e5a1
jmp 0x14013e583
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
lea r8, [0x14013e420]
xor edx, edx
xor ecx, ecx
mov dword [0x140546fe0], eax
call fcn.140142ce0
mov dword [0x140546fe4], 2
mov r8d, 0x97
lea rdx, str.crypto_threads_win.c
lea ecx, [r8 - 0x3f]
call fcn.140131ea0
mov rdi, rax
test rax, rax
jne 0x14013e5ac
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.140163a60
mov qword [rdi + 0x30], rax
call fcn.140163660
mov qword [rdi + 0x40], rax
call fcn.140163660
mov qword [rdi + 0x50], rax
call fcn.140163a60
mov qword [rdi + 0x38], rax
call fcn.140163a60
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.140131ea0
mov qword [rdi + 0x18], rbx
mov qword [rdi + 0x10], rax
test rax, rax
je 0x14013e648
cmp qword [rdi + 0x40], 0
je 0x14013e648
cmp qword [rdi + 0x50], 0
je 0x14013e648
cmp qword [rdi + 0x30], 0
je 0x14013e648
cmp qword [rdi + 0x38], 0
je 0x14013e648
cmp qword [rdi + 0x48], 0
jne 0x14013e6a1
mov r8d, 0xa8
lea rdx, str.crypto_threads_win.c
mov rcx, rax
call fcn.140131c10
lea rcx, [rdi + 0x40]
call fcn.1401635c0
lea rcx, [rdi + 0x50]
call fcn.1401635c0
lea rcx, [rdi + 0x38]
call fcn.1401639f0
lea rcx, [rdi + 0x48]
call fcn.1401639f0
lea rcx, [rdi + 0x30]
call fcn.1401639f0
mov r8d, 0xae
lea rdx, str.crypto_threads_win.c
mov rcx, rdi
call fcn.140131c10
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 0x14013e6d0
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.1402a73a0
sub rsp, rax
mov rbx, rcx
lea esi, [rax - 0x21]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x140546fe0]
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 0x14013e75e
mov r8d, 0xdd
lea rdx, str.crypto_threads_win.c
lea ecx, [r8 + 0x13]
call fcn.140131ea0
mov r14, rax
test rax, rax
jne 0x14013e74f
mov r8d, 0xde
lea rdx, str.crypto_threads_win.c
lea rcx, str.assertion_failed:_data___NULL
call fcn.140131ee0
mov ecx, dword [0x140546fe0]
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
xor ecx, ecx
mov rax, r14
cmp qword [rax], 0
jne 0x14013e76f
cmp esi, 0xffffffff
cmove esi, ecx
cmp qword [rax + 0x10], rbx
je 0x14013e833
inc ecx
add rax, 0x18
cmp ecx, 0xa
jl 0x14013e763
prefetchw byte [rbx + 0x24]
mov eax, dword [rbx + 0x24]
nop dword [rax + rax]
mov ecx, eax
lock cmpxchg dword [rbx + 0x24], ecx
jne 0x14013e790
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 0x14013e7b4
cmp r8d, eax
je 0x14013e812
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 0x14013e7e0
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 0x14013e804
cmp r8d, eax
jne 0x14013e7d0
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 0x14013e850
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
mov eax, 0x20
call fcn.1402a73a0
sub rsp, rax
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x140546fe0]
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 0x14013e8b9
inc r9d
inc r8
add rdx, 0x18
cmp r8, 0xa
jl 0x14013e894
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 0x14013e908
mov rax, qword [rbx]
mov rcx, 0xffffffffffffffff
lock xadd qword [rax], rcx
cmp rcx, 1
jns 0x14013e8f9
mov r8d, 0x10b
lea rdx, str.crypto_threads_win.c
lea rcx, str.assertion_failed:_ret___0
call fcn.140131ee0
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 0x140142310
Capabilities:
Generate random numbers via winapi

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
mov eax, gethostbyname
call fcn.1402a73a0
sub rsp, rax
lea edx, [rax - 0x2f]
mov rbx, rcx
call fcn.140141ee0
mov rdx, rax
mov rcx, rbx
mov rbp, rax
call fcn.140141dc0
xor edi, edi
mov r14, rax
test rax, rax
je 0x1401423b7
lea r9d, [rdi + 1]
mov dword [rsp + 0x20], 0xf0000040
xor r8d, r8d
lea rcx, [rsp + 0x58]
xor edx, edx
mov esi, edi
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140142393
mov rcx, qword [rsp + 0x58]
mov r8, r14
mov edx, ebp
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
mov rcx, qword [rsp + 0x58]
test eax, eax
cmovne rsi, rbp
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea r8, [rsi*8]
mov rdx, rsi
mov rcx, rbx
call fcn.140141e70
mov rcx, rbx
call fcn.140142030
test rax, rax
jne 0x14014244b
mov edx, 1
mov rcx, rbx
call fcn.140141ee0
mov rdx, rax
mov rcx, rbx
mov rsi, rax
call fcn.140141dc0
mov rbp, rax
test rax, rax
je 0x140142443
mov r9d, reloc.WS2_32.dll_shutdown
mov dword [rsp + 0x20], 0xf0000040
lea r8, str.Intel_Hardware_Cryptographic_Service_Provider
xor edx, edx
lea rcx, [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140142423
mov rcx, qword [rsp + 0x58]
mov r8, rbp
mov edx, esi
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
mov rcx, qword [rsp + 0x58]
test eax, eax
cmovne rdi, rsi
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea r8, [rdi*8]
mov rdx, rdi
mov rcx, rbx
call fcn.140141e70
mov rcx, rbx
call fcn.140142030
test rax, rax
jne 0x14014244b
mov rcx, rbx
call fcn.140142030
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret
Function at 0x140146310
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], r9
push rbx
push rbp
push rsi
push rdi
push r12
push r14
mov eax, 0x28
call fcn.1402a73a0
sub rsp, rax
mov r14, qword [rsp + 0x90]
mov r10, r9
mov r12, qword [rsp + 0x88]
mov rdi, r8
mov rsi, rdx
mov rbp, rcx
mov ebx, dword [r14]
test ebx, ebx
je 0x140146371
nop dword [rax]
test rdi, rdi
je 0x140146371
mov eax, ebx
dec rdi
movzx ecx, byte [rax + r12]
xor cl, byte [rbp]
inc rbp
mov byte [rsi], cl
inc rsi
inc ebx
and ebx, 0xf
jne 0x140146350
mov r9, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x80]
cmp rdi, 0x10
jb 0x14014643e
mov qword [rsp + 0x60], r13
xor ebx, ebx
mov r13, rdi
mov qword [rsp + 0x20], r15
shr r13, 4
mov r14, rsi
imul rax, r13, 0xfffffffffffffff0
mov r15, rbp
mov dword [rsp + 0x70], ebx
mov rbx, qword [rsp + 0x78]
add rdi, rax
mov rax, r13
sub r14, r12
shl rax, 4
sub r15, r12
add rsi, rax
add rbp, rax
mov r8, rbx
mov rdx, r12
call r9
mov rcx, qword [rsp + 0x80]
call fcn.1401466a0
mov edx, 2
mov rcx, r12
nop word [rax + rax]
mov rax, qword [r15 + rcx]
xor rax, qword [rcx]
mov qword [r14 + rcx], rax
lea rcx, [rcx + 8]
sub rdx, 1
jne 0x1401463f0
mov rcx, qword [rsp + 0x80]
add r14, 0x10
mov r9, qword [rsp + 0x98]
add r15, 0x10
sub r13, 1
jne 0x1401463c7
mov r15, qword [rsp + 0x20]
mov r13, qword [rsp + 0x60]
mov ebx, dword [rsp + 0x70]
mov r14, qword [rsp + 0x90]
mov r10, qword [rsp + 0x78]
test rdi, rdi
je 0x140146475
mov r8, r10
mov rdx, r12
call r9
mov rcx, qword [rsp + 0x80]
call fcn.1401466a0
nop dword [rax]
mov ecx, ebx
inc ebx
movzx eax, byte [r12 + rcx]
xor al, byte [rcx + rbp]
mov byte [rsi + rcx], al
sub rdi, 1
jne 0x140146460
mov dword [r14], ebx
add rsp, 0x28
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140146490
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], r9
push rbx
push rbp
push rsi
push rdi
push r13
push r14
push r15
mov eax, 0x40
call fcn.1402a73a0
sub rsp, rax
mov rbx, r8
mov r14, rdx
mov r8, qword [rsp + 0xb0]
mov rbp, rcx
mov edi, dword [r8]
mov dword [rsp + 0x30], edi
test edi, edi
je 0x1401464f5
mov rdx, qword [rsp + 0xa8]
test rbx, rbx
je 0x1401464f1
mov eax, edi
dec rbx
movzx ecx, byte [rax + rdx]
xor cl, byte [rbp]
inc rbp
mov byte [r14], cl
inc r14
inc edi
and edi, 0xf
jne 0x1401464d0
mov dword [rsp + 0x30], edi
mov rax, qword [rsp + 0xa0]
mov esi, 1
mov ecx, dword [rax + 0xc]
lea r15, [rax + 0xc]
mov r10, qword [rsp + 0xb8]
mov qword [rsp + 0x80], r12
lea r13d, [rsi + 0xb]
bswap ecx
mov dword [rsp + 0x90], ecx
cmp rbx, 0x10
jb 0x140146603
mov rdi, qword [rsp + 0xa0]
mov eax, 0x10000000
nop dword [rax]
mov rdx, rbx
mov qword [rsp + 0x20], rdi
shr rdx, 4
cmp rdx, rax
cmova rdx, rax
add ecx, edx
mov r12, rdx
mov eax, ecx
sub r12, rax
cmp rax, rdx
cmovae r12, rdx
xor r8d, r8d
cmp rax, rdx
mov rdx, r14
cmovae r8d, ecx
mov rcx, rbp
mov dword [rsp + 0x90], r8d
mov r8, r12
call r10
mov ecx, dword [rsp + 0x90]
mov eax, ecx
bswap eax
mov dword [r15], eax
test ecx, ecx
jne 0x1401465bc
mov r8d, r13d
mov eax, esi
mov rdx, r15
nop dword [rax]
movzx ecx, byte [rdx - 1]
lea rdx, [rdx - 1]
add eax, ecx
mov byte [rdx], al
shr eax, 8
add r8d, 0xffffffff
jne 0x1401465a0
mov ecx, dword [rsp + 0x90]
mov r10, qword [rsp + 0xb8]
mov eax, 0x10000000
mov r9, qword [rsp + 0x98]
shl r12, 4
sub rbx, r12
add r14, r12
add rbp, r12
cmp rbx, 0x10
jae 0x140146540
mov edi, dword [rsp + 0x30]
mov r8, qword [rsp + 0xb0]
mov rax, qword [rsp + 0xa0]
mov dword [rsp + 0x90], ecx
test rbx, rbx
je 0x140146682
mov r12, qword [rsp + 0xa8]
xorps xmm0, xmm0
mov r8, rsi
mov qword [rsp + 0x20], rax
mov rdx, r12
mov rcx, r12
movups xmmword [r12], xmm0
call r10
mov r8d, dword [rsp + 0x90]
add r8d, esi
bswap r8d
mov dword [r15], r8d
jne 0x140146660
nop dword [rax]
movzx eax, byte [r15 - 1]
lea r15, [r15 - 1]
add esi, eax
mov byte [r15], sil
shr esi, 8
add r13d, 0xffffffff
jne 0x140146640
nop word [rax + rax]
mov ecx, edi
inc edi
movzx eax, byte [rcx + rbp]
xor al, byte [rcx + r12]
mov byte [r14 + rcx], al
sub rbx, 1
jne 0x140146660
mov rax, qword [rsp + 0xb0]
mov dword [rax], edi
jmp 0x140146685
mov dword [r8], edi
mov r12, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret