joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140208b30
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push r14
sub rsp, 0x20
mov rsi, r8
mov r14, rdx
mov rbp, rcx
test r8, r8
jg 0x140208b61
xor eax, eax
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
cmp qword [rcx + 0x68], 0
je 0x140208b7f
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
mov qword [rsp + 0x30], rbx
mov rbx, rsi
mov qword [rsp + 0x38], rdi
call qword [sym.imp.MSVCP140.dll_protected:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Gnavail_void_const___ptr64]
test rax, rax
je 0x140208bc9
cmp rax, rsi
mov rdi, rsi
mov rcx, rbp
cmovb rdi, rax
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::gptr_void_const___ptr64]
mov r8, rdi
mov rcx, r14
mov rdx, rax
call sub.VCRUNTIME140.dll_memcpy
mov edx, edi
mov rcx, rbp
add r14, rdi
sub rbx, rdi
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::gbump_int____ptr64]
cmp qword [rbp + 0x80], 0
mov rdi, rbx
je 0x140208c41
mov rcx, rbp
call fcn.140162f00
cmp rbx, 0xfff
jbe 0x140208c21
nop word [rax + rax]
mov r9, qword [rbp + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbx, rax
add r14, rax
mov rdi, rbx
cmp rax, 0xfff
jne 0x140208c62
cmp rbx, rax
ja 0x140208bf0
test rdi, rdi
je 0x140208c41
mov r9, qword [rbp + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rdi, rax
sub rsi, rdi
mov rbx, qword [rsp + 0x30]
mov rax, rsi
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
add rsp, 0x20
pop r14
ret
sub rsi, rbx
jmp 0x140208c44
Function at 0x140208c70
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r14
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r14, rdx
mov rdi, rcx
je 0x140208c98
add rsp, 0x20
pop r14
pop rdi
pop rbx
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov rsi, rbx
call qword [sym.imp.MSVCP140.dll_protected:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Pnavail_void_const___ptr64]
mov rbp, rax
test rbx, rbx
jle 0x140208d0c
test rax, rax
jle 0x140208cec
cmp rbx, rax
mov rcx, rdi
cmovl rbp, rbx
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const___ptr64]
mov r8, rbp
mov rdx, r14
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov edx, ebp
mov rcx, rdi
add r14, rbp
sub rbx, rbp
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::pbump_int____ptr64]
test rbx, rbx
jle 0x140208d0c
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140208d0c
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov rbp, qword [rsp + 0x40]
sub rsi, rbx
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
pop rdi
pop rbx
ret
Function at 0x14020b290
Capabilities:
Hash data using fnv

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x40
mov rbp, r8
mov r14, rdx
mov rsi, rcx
cmp rdx, r8
je 0x14020b38e
mov rdx, qword [rcx + 0x18]
movabs r8, 0x100000001b3
mov qword [rsp + 0x60], rbx
movabs rax, 0xcbf29ce484222325
mov qword [rsp + 0x38], rdi
mov rbx, r14
mov qword [rsp + 0x30], r12
mov r12, qword [rcx + 8]
movzx ecx, byte [r14 + 0x10]
xor rcx, rax
mov qword [rsp + 0x28], r13
movzx eax, byte [r14 + 0x11]
mov r13, qword [r14 + 8]
imul rcx, r8
mov qword [rsp + 0x20], r15
mov r15, qword [rsi + 0x30]
xor rcx, rax
movzx eax, byte [r14 + 0x12]
imul rcx, r8
mov qword [rsp + 0x78], rdx
xor rcx, rax
movzx eax, byte [r14 + 0x13]
imul rcx, r8
xor rcx, rax
imul rcx, r8
and r15, rcx
shl r15, 4
add r15, rdx
mov rax, qword [r15]
mov qword [rsp + 0x68], rax
mov rax, qword [r15 + 8]
mov qword [rsp + 0x70], rax
nop dword [rax + rax]
mov rcx, rbx
mov rdi, rbx
mov rbx, qword [rbx]
mov edx, Ordinal_26
call fcn.140487b8c
dec qword [rsi + 0x10]
cmp rdi, qword [rsp + 0x70]
je 0x14020b39a
cmp rbx, rbp
jne 0x14020b340
cmp qword [rsp + 0x68], r14
jne 0x14020b36d
mov qword [r15], rbx
mov r12, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x38]
mov r15, qword [rsp + 0x20]
mov qword [r13], rbx
mov qword [rbx + 8], r13
mov r13, qword [rsp + 0x28]
mov rbx, qword [rsp + 0x60]
mov rax, rbp
add rsp, 0x40
pop r14
pop rsi
pop rbp
ret
cmp qword [rsp + 0x68], r14
jne 0x14020b3a9
mov qword [r15], r12
mov rax, r12
jmp 0x14020b3ac
mov rax, r13
mov qword [r15 + 8], rax
cmp rbx, rbp
je 0x14020b36d
nop word [rax + rax]
movzx ecx, byte [rbx + 0x10]
movabs rdx, 0x100000001b3
mov r15, qword [rsi + 0x30]
movabs rax, 0xcbf29ce484222325
xor rcx, rax
movzx eax, byte [rbx + 0x11]
imul rcx, rdx
xor rcx, rax
movzx eax, byte [rbx + 0x12]
imul rcx, rdx
xor rcx, rax
movzx eax, byte [rbx + 0x13]
imul rcx, rdx
xor rcx, rax
imul rcx, rdx
and r15, rcx
shl r15, 4
add r15, qword [rsp + 0x78]
mov r14, qword [r15 + 8]
nop dword [rax]
nop dword [rax + rax]
mov rcx, rbx
mov rdi, rbx
mov rbx, qword [rbx]
mov edx, Ordinal_26
call fcn.140487b8c
dec qword [rsi + 0x10]
cmp rdi, r14
je 0x14020b446
cmp rbx, rbp
jne 0x14020b420
jmp 0x14020b36a
mov qword [r15], r12
mov qword [r15 + 8], r12
cmp rbx, rbp
jne 0x14020b3c0
jmp 0x14020b36d
push rdi
sub rsp, 0x20
mov rdi, rcx
mov rcx, qword [rcx + 0x10]
test rcx, rcx
je 0x14020b9ec
mov rax, qword [rdi + 0x38]
shr rax, 3
cmp rax, rcx
jbe 0x14020b97a
mov rdx, qword [rdi + 8]
mov rcx, rdi
mov r8, rdx
mov rdx, qword [rdx]
add rsp, 0x20
pop rdi
jmp 0x14020b290
mov rcx, qword [rdi + 8]
mov rax, qword [rcx + 8]
mov qword [rax], 0
mov rcx, qword [rcx]
test rcx, rcx
je 0x14020b9ba
mov qword [rsp + 0x38], rbx
nop word [rax + rax]
mov rbx, qword [rcx]
mov edx, Ordinal_26
call fcn.140487b8c
mov rcx, rbx
test rbx, rbx
jne 0x14020b9a0
mov rbx, qword [rsp + 0x38]
mov rax, qword [rdi + 8]
lea r8, [rsp + 0x30]
mov qword [rax], rax
mov rax, qword [rdi + 8]
mov qword [rax + 8], rax
mov qword [rdi + 0x10], 0
mov rax, qword [rdi + 8]
mov rdx, qword [rdi + 0x20]
mov rcx, qword [rdi + 0x18]
mov qword [rsp + 0x30], rax
call fcn.140140d40
add rsp, 0x20
pop rdi
ret
Function at 0x14020b940
Capabilities:
Hash data using fnv

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x40
mov rbp, r8
mov r14, rdx
mov rsi, rcx
cmp rdx, r8
je 0x14020b38e
mov rdx, qword [rcx + 0x18]
movabs r8, 0x100000001b3
mov qword [rsp + 0x60], rbx
movabs rax, 0xcbf29ce484222325
mov qword [rsp + 0x38], rdi
mov rbx, r14
mov qword [rsp + 0x30], r12
mov r12, qword [rcx + 8]
movzx ecx, byte [r14 + 0x10]
xor rcx, rax
mov qword [rsp + 0x28], r13
movzx eax, byte [r14 + 0x11]
mov r13, qword [r14 + 8]
imul rcx, r8
mov qword [rsp + 0x20], r15
mov r15, qword [rsi + 0x30]
xor rcx, rax
movzx eax, byte [r14 + 0x12]
imul rcx, r8
mov qword [rsp + 0x78], rdx
xor rcx, rax
movzx eax, byte [r14 + 0x13]
imul rcx, r8
xor rcx, rax
imul rcx, r8
and r15, rcx
shl r15, 4
add r15, rdx
mov rax, qword [r15]
mov qword [rsp + 0x68], rax
mov rax, qword [r15 + 8]
mov qword [rsp + 0x70], rax
nop dword [rax + rax]
mov rcx, rbx
mov rdi, rbx
mov rbx, qword [rbx]
mov edx, Ordinal_26
call fcn.140487b8c
dec qword [rsi + 0x10]
cmp rdi, qword [rsp + 0x70]
je 0x14020b39a
cmp rbx, rbp
jne 0x14020b340
cmp qword [rsp + 0x68], r14
jne 0x14020b36d
mov qword [r15], rbx
mov r12, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x38]
mov r15, qword [rsp + 0x20]
mov qword [r13], rbx
mov qword [rbx + 8], r13
mov r13, qword [rsp + 0x28]
mov rbx, qword [rsp + 0x60]
mov rax, rbp
add rsp, 0x40
pop r14
pop rsi
pop rbp
ret
cmp qword [rsp + 0x68], r14
jne 0x14020b3a9
mov qword [r15], r12
mov rax, r12
jmp 0x14020b3ac
mov rax, r13
mov qword [r15 + 8], rax
cmp rbx, rbp
je 0x14020b36d
nop word [rax + rax]
movzx ecx, byte [rbx + 0x10]
movabs rdx, 0x100000001b3
mov r15, qword [rsi + 0x30]
movabs rax, 0xcbf29ce484222325
xor rcx, rax
movzx eax, byte [rbx + 0x11]
imul rcx, rdx
xor rcx, rax
movzx eax, byte [rbx + 0x12]
imul rcx, rdx
xor rcx, rax
movzx eax, byte [rbx + 0x13]
imul rcx, rdx
xor rcx, rax
imul rcx, rdx
and r15, rcx
shl r15, 4
add r15, qword [rsp + 0x78]
mov r14, qword [r15 + 8]
nop dword [rax]
nop dword [rax + rax]
mov rcx, rbx
mov rdi, rbx
mov rbx, qword [rbx]
mov edx, Ordinal_26
call fcn.140487b8c
dec qword [rsi + 0x10]
cmp rdi, r14
je 0x14020b446
cmp rbx, rbp
jne 0x14020b420
jmp 0x14020b36a
mov qword [r15], r12
mov qword [r15 + 8], r12
cmp rbx, rbp
jne 0x14020b3c0
jmp 0x14020b36d
push rdi
sub rsp, 0x20
mov rdi, rcx
mov rcx, qword [rcx + 0x10]
test rcx, rcx
je 0x14020b9ec
mov rax, qword [rdi + 0x38]
shr rax, 3
cmp rax, rcx
jbe 0x14020b97a
mov rdx, qword [rdi + 8]
mov rcx, rdi
mov r8, rdx
mov rdx, qword [rdx]
add rsp, 0x20
pop rdi
jmp 0x14020b290
mov rcx, qword [rdi + 8]
mov rax, qword [rcx + 8]
mov qword [rax], 0
mov rcx, qword [rcx]
test rcx, rcx
je 0x14020b9ba
mov qword [rsp + 0x38], rbx
nop word [rax + rax]
mov rbx, qword [rcx]
mov edx, Ordinal_26
call fcn.140487b8c
mov rcx, rbx
test rbx, rbx
jne 0x14020b9a0
mov rbx, qword [rsp + 0x38]
mov rax, qword [rdi + 8]
lea r8, [rsp + 0x30]
mov qword [rax], rax
mov rax, qword [rdi + 8]
mov qword [rax + 8], rax
mov qword [rdi + 0x10], 0
mov rax, qword [rdi + 8]
mov rdx, qword [rdi + 0x20]
mov rcx, qword [rdi + 0x18]
mov qword [rsp + 0x30], rax
call fcn.140140d40
add rsp, 0x20
pop rdi
ret
Function at 0x140210130
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
sub rsp, 8
mov r9, qword [rcx]
mov r10d, 0x270
mov ecx, dword [r9]
cmp ecx, r10d
jne 0x140210191
lea r8, [r9 + 8]
nop dword [rax]
mov edx, dword [r8 - 4]
xor edx, dword [r8]
lea r8, [r8 + 4]
btr edx, 0x1f
xor edx, dword [r8 - 8]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 + 0x62c]
xor ecx, edx
mov dword [r8 + 0x9b8], ecx
sub r10, 1
jne 0x140210150
mov ecx, dword [r9]
jmp 0x14021027b
cmp ecx, 0x4e0
jb 0x14021027b
lea r10, [r9 + 0x9c4]
mov qword [rsp], rbx
mov r11d, dword [r10]
mov ebx, 0xe3
mov eax, r11d
mov r8, r10
mov r11d, dword [r10 + 4]
mov edx, eax
xor edx, r11d
add r10, 4
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 + 0x634]
xor ecx, edx
mov dword [r8 - 0x9c0], ecx
sub rbx, 1
jne 0x1402101b0
lea r10, [r9 + 0xd50]
mov ebx, 0x18c
mov r11d, dword [r10]
nop
mov eax, r11d
mov r8, r10
mov r11d, dword [r10 + 4]
mov edx, eax
xor edx, r11d
add r10, 4
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 - 0xd4c]
xor ecx, edx
mov dword [r8 - 0x9c0], ecx
sub rbx, 1
jne 0x140210200
mov eax, dword [r9 + 0x1380]
mov edx, eax
xor edx, dword [r9 + 4]
mov rbx, qword [rsp]
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r9 + 0x634]
xor ecx, edx
mov dword [r9 + 0x9c0], ecx
xor ecx, ecx
mov dword [r9], ecx
mov eax, ecx
mov edx, dword [r9 + rax*4 + 4]
lea eax, [rcx + 1]
mov dword [r9], eax
mov ecx, edx
mov eax, dword [r9 + 0x1384]
shr ecx, 0xb
and eax, ecx
xor edx, eax
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and eax, 0xffffdf8c
shl eax, 0xf
xor edx, eax
mov eax, edx
shr eax, 0x12
xor eax, edx
add rsp, 8
ret
Function at 0x1402108a0
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
sub rsp, 0x20
cmp byte [0x1405ecadc], 0
lea rsi, [0x1405d9820]
mov qword [rsp + 0x40], r14
mov edi, edx
mov r14d, ecx
jne 0x1402109a9
mov byte [0x1405ecadc], 1
call sub.MSVCP140.dll__Query_perf_frequency
mov rbx, rax
call sub.MSVCP140.dll__Query_perf_counter
mov r9, rax
cmp rbx, 0x989680
jne 0x1402108f0
imul rax, r9, 0x64
jmp 0x14021096d
cmp rbx, 0x16e3600
jne 0x14021094f
movabs r10, 0xb2f4fc0794908cf3
mov rax, r10
imul r9
mov rax, r10
lea r8, [r9 + rdx]
sar r8, 0x18
mov rcx, r8
shr rcx, 0x3f
add r8, rcx
imul rcx, r8, 0x16e3600
sub r9, rcx
imul rcx, r9, 0x3b9aca00
imul rcx
add rdx, rcx
sar rdx, 0x18
mov rax, rdx
shr rax, 0x3f
add rdx, rax
imul rax, r8, 0x3b9aca00
add rax, rdx
jmp 0x14021096d
cqo
idiv rbx
mov rcx, rax
imul rax, rdx, 0x3b9aca00
imul rcx, rcx, 0x3b9aca00
cqo
idiv rbx
add rax, rcx
mov rcx, rax
mov dword [0x1405d9824], eax
mov edx, 1
nop dword [rax + rax]
mov eax, ecx
shr eax, 0x1e
xor eax, ecx
imul ecx, eax, 0x6c078965
add ecx, edx
mov dword [rsi + rdx*4 + 4], ecx
inc rdx
cmp rdx, 0x270
jb 0x140210980
mov dword [0x1405d9820], 0x270
mov ebp, 0x80000000
mov qword [rsp + 0x50], rsi
cmp r14d, ebp
lea eax, [r14 - 0x80000000]
lea esi, [r14 + rbp]
mov r14, qword [rsp + 0x40]
cmovae esi, eax
lea ecx, [rdi + rbp]
cmp edi, ebp
lea eax, [rdi - 0x80000000]
cmovae ecx, eax
sub ecx, esi
cmp ecx, 0xffffffff
jne 0x1402109ec
lea rcx, [rsp + 0x50]
call fcn.140210130
mov ecx, eax
jmp 0x140210a2b
lea edi, [rcx + 1]
lea rcx, [rsp + 0x50]
mov ebx, edi
call fcn.140210130
mov ecx, eax
imul rcx, rbx
cmp ecx, edi
jae 0x140210a27
mov eax, edi
xor edx, edx
neg eax
div edi
mov edi, edx
cmp ecx, edx
jae 0x140210a27
lea rcx, [rsp + 0x50]
call fcn.140210130
mov ecx, eax
imul rcx, rbx
cmp ecx, edi
jb 0x140210a13
shr rcx, 0x20
mov rbx, qword [rsp + 0x48]
lea edx, [rsi + rcx]
cmp edx, ebp
lea ecx, [rdx - 0x80000000]
lea eax, [rdx + rbp]
cmovae eax, ecx
add rsp, 0x20
pop rdi
pop rsi
pop rbp
ret

Function at 0x14021aff0
Capabilities:
Set thread local storage value

Disassembly:
mov eax, Ordinal_41
call fcn.1404881b0
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 0x14021b1e0
Capabilities:
Allocate thread local storage

Disassembly:
push rbx
push rdi
push r13
mov eax, gethostbyaddr
call fcn.1404881b0
sub rsp, rax
mov eax, dword [0x1405ecb2c]
mov r13d, ecx
mov ebx, 1
cmp eax, 2
je 0x14021b253
nop word [rax + rax]
xor eax, eax
lock cmpxchg dword [0x1405ecb2c], ebx
je 0x14021b22d
cmp eax, ebx
je 0x14021b210
mov eax, dword [0x1405ecb2c]
cmp eax, 2
jne 0x14021b271
jmp 0x14021b253
call qword [sym.imp.KERNEL32.DLL_TlsAlloc]
lea r8, [0x14021b100]
xor edx, edx
xor ecx, ecx
mov dword [0x1405ecb28], eax
call fcn.140250a90
mov dword [0x1405ecb2c], 2
mov r8d, reloc.WS2_32.dll___WSAFDIsSet
lea rdx, str.crypto_threads_win.c
lea ecx, [r8 - 0x3f]
call fcn.14021a820
mov rdi, rax
test rax, rax
jne 0x14021b27c
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.140251030
mov qword [rdi + 0x30], rax
call fcn.140250c30
mov qword [rdi + 0x40], rax
call fcn.140250c30
mov qword [rdi + 0x50], rax
call fcn.140251030
mov qword [rdi + 0x38], rax
call fcn.140251030
mov qword [rdi + 0x48], rax
call fcn.140251030
cmp r13d, ebx
mov qword [rdi + 0x30], 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.14021a820
mov qword [rdi + 0x18], rbx
mov qword [rdi + 0x10], rax
test rax, rax
je 0x14021b321
cmp qword [rdi + 0x40], 0
je 0x14021b321
cmp qword [rdi + 0x50], 0
je 0x14021b321
cmp qword [rdi + 0x30], 0
je 0x14021b321
cmp qword [rdi + 0x38], 0
je 0x14021b321
cmp qword [rdi + 0x48], 0
jne 0x14021b37a
mov r8d, 0xa9
lea rdx, str.crypto_threads_win.c
mov rcx, rax
call fcn.14021a590
lea rcx, [rdi + 0x40]
call fcn.140250b90
lea rcx, [rdi + 0x50]
call fcn.140250b90
lea rcx, [rdi + 0x38]
call fcn.140250fc0
lea rcx, [rdi + 0x48]
call fcn.140250fc0
lea rcx, [rdi + 0x30]
call fcn.140250fc0
mov r8d, 0xaf
lea rdx, str.crypto_threads_win.c
mov rcx, rdi
call fcn.14021a590
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 0x14021b3a0
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, reloc.WLDAP32.dll_Ordinal_32
call fcn.1404881b0
sub rsp, rax
mov rbx, rcx
lea esi, [rax - 0x21]
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, dword [0x1405ecb28]
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 0x14021b42e
mov r8d, 0xde
lea rdx, str.crypto_threads_win.c
lea ecx, [r8 + 0x12]
call fcn.14021a820
mov r14, rax
test rax, rax
jne 0x14021b41f
mov r8d, 0xdf
lea rdx, str.crypto_threads_win.c
lea rcx, str.assertion_failed:_data___NULL
call fcn.14021f780
mov ecx, dword [0x1405ecb28]
mov rdx, r14
call qword [sym.imp.KERNEL32.DLL_TlsSetValue]
xor ecx, ecx
mov rax, r14
cmp qword [rax], 0
jne 0x14021b43f
cmp esi, 0xffffffff
cmove esi, ecx
cmp qword [rax + 0x10], rbx
je 0x14021b503
inc ecx
add rax, 0x18
cmp ecx, 0xa
jl 0x14021b433
prefetchw byte [rbx + 0x24]
mov eax, dword [rbx + 0x24]
nop dword [rax + rax]
mov ecx, eax
lock cmpxchg dword [rbx + 0x24], ecx
jne 0x14021b460
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 0x14021b484
cmp r8d, eax
je 0x14021b4e2
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 0x14021b4b0
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 0x14021b4d4
cmp r8d, eax
jne 0x14021b4a0
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 0x14021b520
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
mov eax, reloc.WLDAP32.dll_Ordinal_32
call fcn.1404881b0
sub rsp, rax
mov rdi, rcx
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, dword [0x1405ecb28]
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 0x14021b589
inc r9d
inc r8
add rdx, 0x18
cmp r8, 0xa
jl 0x14021b564
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 0x14021b5d8
mov rax, qword [rbx]
mov rcx, 0xffffffffffffffff
lock xadd qword [rax], rcx
cmp rcx, 1
jns 0x14021b5c9
mov r8d, 0x10c
lea rdx, str.crypto_threads_win.c
lea rcx, str.assertion_failed:_ret___0
call fcn.14021f780
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 0x14021c400
Capabilities:
Initialize winsock library

Disassembly:
mov eax, Ordinal_41
call fcn.1404881b0
sub rsp, rax
cmp dword [0x1405ecb30], 0
jne 0x14021c4ba
xor edx, edx
mov dword [0x1405ecb30], 1
mov r8d, 0x198
lea rcx, [0x1405ecb40]
call sub.VCRUNTIME140.dll_memset
mov ecx, 0x202
lea rdx, [0x1405ecb40]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x14021c4ba
call fcn.14021a860
lea r8, str.BIO_sock_init
mov edx, 0x99
lea rcx, str.crypto_bio_bio_sock.c
call fcn.14021a980
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea r8, str.calling_wsastartup__
mov ecx, 2
mov edx, eax
call fcn.14021aae0
call fcn.14021a860
lea r8, str.BIO_sock_init
mov edx, 0x9b
lea rcx, str.crypto_bio_bio_sock.c
call fcn.14021a980
xor r8d, r8d
lea edx, [r8 + 0x7a]
lea ecx, [rdx - 0x5a]
call fcn.14021aae0
mov eax, 0xffffffff
add rsp, 0x28
ret
mov eax, 1
add rsp, 0x28
ret

Function at 0x14021c4d0
Capabilities:
Set socket configuration

Disassembly:
push rbx
mov eax, reloc.WLDAP32.dll_Ordinal_32
call fcn.1404881b0
sub rsp, rax
mov dword [rsp + 0x30], edx
lea r8, [rsp + 0x30]
mov edx, 0x8004667e
movsxd rcx, ecx
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov ebx, eax
test eax, eax
jns 0x14021c532
call fcn.14021a860
lea r8, str.BIO_socket_ioctl
mov edx, 0xf7
lea rcx, str.crypto_bio_bio_sock.c
call fcn.14021a980
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea r8, str.calling_ioctlsocket__
mov ecx, 2
mov edx, eax
call fcn.14021aae0
xor eax, eax
test ebx, ebx
sete al
add rsp, 0x20
pop rbx
ret
Function at 0x14021c540
Capabilities:
Get socket status

Disassembly:
push rbx
push rsi
push rdi
mov eax, 0x260
call fcn.1404881b0
sub rsp, rax
mov rax, qword [0x1405e3440]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov edi, ecx
mov rbx, r8
mov esi, edx
cmp ecx, 0x3f
ja 0x14021c5d2
test rbx, rbx
jne 0x14021c57a
lea eax, [r8 + 1]
jmp 0x14021c5d7
xor ecx, ecx
call sub.api_ms_win_crt_time_l1_1_0.dll__time64
mov rcx, rax
cmp rbx, rax
jge 0x14021c58d
xor eax, eax
jmp 0x14021c5d7
xor eax, eax
mov qword [rsp + 0x48], rdi
sub ebx, ecx
mov dword [rsp + 0x34], eax
test esi, esi
mov dword [rsp + 0x40], 1
lea r8, [rsp + 0x40]
mov dword [rsp + 0x30], ebx
cmovne r8, rax
lea rdx, [rsp + 0x40]
cmove rdx, rax
lea ecx, [rdi + 1]
lea rax, [rsp + 0x30]
xor r9d, r9d
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
jmp 0x14021c5d7
mov eax, 0xffffffff
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.140487ca0
add rsp, 0x260
pop rdi
pop rsi
pop rbx
ret