joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140192670
Capabilities:
Write file on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x88
lea rbp, [rsp + 0xc0]
xor eax, eax
mov qword [rbp - 0x48], rax
mov qword [rbp + 0x10], rcx
mov rdi, rdx
mov ebx, r8d
mov rsi, r9
xor edx, edx
mov dword [rbp - 0x40], edx
lea rdx, [rbp - 0x40]
cmp dword [rcx], ecx
call fcn.14016ce20
mov rcx, qword [rbp + 0x10]
mov r14, qword [rcx + 8]
mov qword [rbp - 0x48], rsi
xor ecx, ecx
call sub.KERNEL32.dll_SetLastError
mov r15, qword [rbp + 0x30]
mov qword [rsp + 0x20], r15
mov rcx, r14
mov qword [rbp - 0x54], rcx
mov rdx, rdi
mov qword [rbp - 0x5c], rdx
mov r8d, ebx
mov dword [rbp - 0x4c], r8d
mov r9, rsi
mov qword [rbp - 0x64], r9
lea rcx, [rbp - 0x90]
call fcn.140005540
mov rcx, qword [rbp - 0x54]
mov rdx, qword [rbp - 0x5c]
mov r8d, dword [rbp - 0x4c]
mov r9, qword [rbp - 0x64]
call sub.KERNEL32.dll_WriteFile
mov esi, eax
lea rcx, [rbp - 0x90]
call fcn.140005590
call sub.KERNEL32.dll_GetLastError
mov edi, eax
xor ecx, ecx
mov qword [rbp - 0x48], rcx
cmp byte [rbp - 0x40], 0
je 0x140192733
mov rcx, qword [rbp + 0x10]
xor edx, edx
call fcn.14016ceb0
call fcn.140003207
mov dword [rax + 8], edi
mov eax, esi
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret

Function at 0x140192ed0
Capabilities:
Create thread

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x98
lea rbp, [rsp + 0xd0]
xor eax, eax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rax
mov rsi, rcx
mov rdi, rdx
mov rbx, r8
mov r14, r9
mov r15, qword [rbp + 0x38]
xor ecx, ecx
mov dword [rbp - 0x3c], ecx
mov qword [rbp - 0x48], rcx
lea rcx, [0x1402d66b8]
call fcn.140004550
xor ecx, ecx
mov qword [rax + 8], rcx
mov dword [rax + 0x10], 4
mov byte [rax + 0x14], 1
mov byte [rax + 0x15], 1
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], r15
mov rcx, rsi
mov rdx, rdi
mov r8, rbx
mov r9, r14
mov esi, dword [rbp + 0x30]
mov qword [rbp - 0x60], rcx
mov qword [rbp - 0x68], rdx
mov qword [rbp - 0x70], r8
mov qword [rbp - 0x78], r9
mov dword [rsp + 0x20], esi
mov qword [rsp + 0x28], r15
lea rcx, [rbp - 0xa0]
call fcn.140005540
mov rcx, qword [rbp - 0x60]
mov rdx, qword [rbp - 0x68]
mov r8, qword [rbp - 0x70]
mov r9, qword [rbp - 0x78]
call sub.KERNEL32.dll_CreateThread
mov rsi, rax
lea rcx, [rbp - 0xa0]
call fcn.140005590
mov qword [rbp - 0x48], rsi
xor eax, eax
mov qword [rbp - 0x50], rax
mov dword [rbp - 0x3c], 1
mov rax, qword [rbp - 0x48]
mov rdx, qword [rbp - 0x58]
mov qword [rdx + 8], rax
mov rax, rdx
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
Function at 0x140193020
Capabilities:
Resume thread

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x90]
mov qword [rbp + 0x10], rcx
xor edx, edx
mov dword [rbp - 0x40], edx
lea rdx, [rbp - 0x40]
cmp dword [rcx], ecx
call fcn.14016ce20
mov rcx, qword [rbp + 0x10]
mov rax, qword [rcx + 8]
mov rcx, rax
mov qword [rbp - 0x48], rcx
lea rcx, [rbp - 0x70]
call fcn.140005540
mov rcx, qword [rbp - 0x48]
call sub.KERNEL32.dll_ResumeThread
mov esi, eax
lea rcx, [rbp - 0x70]
call fcn.140005590
nop
cmp byte [rbp - 0x40], 0
je 0x14019308a
mov rcx, qword [rbp + 0x10]
xor edx, edx
call fcn.14016ceb0
mov eax, esi
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret

Function at 0x140193db0
Capabilities:
Query or enumerate registry key

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0xc8
lea rbp, [rsp + 0x100]
xorps xmm4, xmm4
movaps xmmword [rbp - 0x70], xmm4
movaps xmmword [rbp - 0x60], xmm4
movaps xmmword [rbp - 0x50], xmm4
mov qword [rbp + 0x10], rcx
mov ebx, edx
mov rdi, r8
mov rsi, r9
mov r14, qword [rbp + 0x30]
mov r15, qword [rbp + 0x38]
mov r12, qword [rbp + 0x40]
mov r13, qword [rbp + 0x48]
xor edx, edx
mov dword [rbp - 0x40], edx
lea rdx, [rbp - 0x40]
cmp dword [rcx], ecx
call fcn.14016ce20
mov rcx, qword [rbp + 0x10]
mov rdx, qword [rcx + 8]
test rdi, rdi
jne 0x140193e18
xor r8d, r8d
jmp 0x140193e1c
lea r8, [rdi + 0x10]
mov qword [rbp - 0x48], r8
mov qword [rbp - 0x50], rsi
mov r9, rsi
test r14, r14
jne 0x140193e30
xor eax, eax
jmp 0x140193e34
lea rax, [r14 + 0x10]
mov qword [rbp - 0x58], rax
test r15, r15
jne 0x140193e42
xor r10d, r10d
jmp 0x140193e46
lea r10, [r15 + 0x10]
mov qword [rbp - 0x60], r10
test r12, r12
jne 0x140193e54
xor r11d, r11d
jmp 0x140193e59
lea r11, [r12 + 0x10]
mov qword [rbp - 0x68], r11
test r13, r13
jne 0x140193e66
xor esi, esi
jmp 0x140193e6a
lea rsi, [r13 + 0x10]
mov qword [rbp - 0x70], rsi
mov rcx, rdx
mov qword [rbp - 0x7c], rcx
mov edx, ebx
mov dword [rbp - 0x74], edx
mov qword [rbp - 0x84], r8
mov qword [rbp - 0x8c], r9
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], r10
mov qword [rsp + 0x30], r11
mov qword [rsp + 0x38], rsi
lea rcx, [rbp - 0xb8]
call fcn.140005540
mov rcx, qword [rbp - 0x7c]
mov edx, dword [rbp - 0x74]
mov r8, qword [rbp - 0x84]
mov r9, qword [rbp - 0x8c]
call sub.ADVAPI32.dll_RegEnumKeyExW
mov esi, eax
lea rcx, [rbp - 0xb8]
call fcn.140005590
nop
xor ecx, ecx
mov qword [rbp - 0x70], rcx
xor ecx, ecx
mov qword [rbp - 0x68], rcx
xor ecx, ecx
mov qword [rbp - 0x60], rcx
xor ecx, ecx
mov qword [rbp - 0x58], rcx
xor ecx, ecx
mov qword [rbp - 0x50], rcx
xor ecx, ecx
mov qword [rbp - 0x48], rcx
cmp byte [rbp - 0x40], 0
je 0x140193f06
mov rcx, qword [rbp + 0x10]
xor edx, edx
call fcn.14016ceb0
mov eax, esi
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
Function at 0x140194440
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x88
lea rbp, [rsp + 0xc0]
xor eax, eax
mov qword [rbp - 0x48], rax
mov qword [rbp + 0x10], rcx
mov rsi, rdx
mov rdi, r8
mov rbx, r9
xor edx, edx
mov dword [rbp - 0x40], edx
lea rdx, [rbp - 0x40]
cmp dword [rcx], ecx
call fcn.14016ce20
mov rcx, qword [rbp + 0x10]
mov rdx, qword [rcx + 8]
test rsi, rsi
je 0x140194491
add rsi, 0xc
jmp 0x140194493
xor esi, esi
mov qword [rbp - 0x48], rsi
mov r14, qword [rbp + 0x30]
mov qword [rsp + 0x20], r14
mov r14, qword [rbp + 0x38]
mov qword [rsp + 0x28], r14
mov rcx, rdx
mov qword [rbp - 0x50], rcx
mov rdx, rsi
mov qword [rbp - 0x58], rdx
mov r8, rdi
mov qword [rbp - 0x60], r8
mov r9, rbx
mov qword [rbp - 0x68], r9
lea rcx, [rbp - 0x90]
call fcn.140005540
mov rcx, qword [rbp - 0x50]
mov rdx, qword [rbp - 0x58]
mov r8, qword [rbp - 0x60]
mov r9, qword [rbp - 0x68]
call sub.ADVAPI32.dll_RegQueryValueExW
mov esi, eax
lea rcx, [rbp - 0x90]
call fcn.140005590
nop
xor ecx, ecx
mov qword [rbp - 0x48], rcx
cmp byte [rbp - 0x40], 0
je 0x14019450c
mov rcx, qword [rbp + 0x10]
xor edx, edx
call fcn.14016ceb0
mov eax, esi
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
Function at 0x140129340
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x78
mov rax, qword [0x140364e40]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov r13, r9
mov r14, r8
mov r15, rdx
mov rdi, rcx
mov qword [rsp + 0x58], rcx
mov rax, qword [rsp + 0xe0]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0xe8]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0xf0]
mov qword [rsp + 0x48], rax
mov r12, qword [rsp + 0xf8]
mov rax, qword [rsp + 0x100]
mov qword [rsp + 0x50], rax
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 0x140129447
movabs rax, 0x7fffffffffffffff
cmp rbp, rax
ja 0x14012958a
cmp rbp, 0x1000
jb 0x14012941f
lea rcx, [rbp + 0x27]
cmp rcx, rbp
jbe 0x14012957e
call fcn.1402a7fa0
test rax, rax
je 0x140129418
lea rcx, [rax + 0x27]
and rcx, 0xffffffffffffffe0
mov qword [rcx - 8], rax
jmp 0x14012942a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rbp
call fcn.1402a7fa0
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 r12
mov rbx, rax
test rax, rax
je 0x140129584
call fcn.14012ed50
mov rdx, rax
mov qword [rsp + 0x20], r13
mov r9, r14
xor r8d, r8d
mov rcx, rbx
call qword [rsp + reloc.WS2_32.dll_getservbyport]
cmp eax, 1
jne 0x140129584
mov r9, qword [r15]
mov rax, qword [r15 + 8]
sub rax, r9
mov dword [rsp + 0x20], eax
lea r8, [rsp + 0x60]
mov rdx, qword [rdi]
mov rcx, rbx
call qword [rsp + 0x40]
cmp eax, 1
jne 0x140129584
movsxd rbp, dword [rsp + 0x60]
mov rdx, rbp
add rdx, qword [rdi]
lea r8, [rsp + 0x60]
mov rcx, rbx
call qword [rsp + 0x48]
cmp eax, 1
jne 0x140129584
add ebp, dword [rsp + 0x60]
mov rcx, rbx
call qword [rsp + 0x50]
movsxd rbx, ebp
mov rbp, qword [rdi + 8]
mov rdx, qword [rdi]
mov rcx, rbp
sub rcx, rdx
cmp rbx, rcx
jae 0x1401294ed
lea rax, [rdx + rbx]
jmp 0x14012951c
jbe 0x140129520
mov rax, qword [rdi + 0x10]
sub rax, rdx
cmp rbx, rax
jbe 0x140129508
mov rdx, rbx
mov rcx, rdi
call fcn.14012a3b0
jmp 0x140129520
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 0x14012955d
nop dword [rax]
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 0x140129530
mov rax, rdi
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.1402a7f80
add rsp, 0x78
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
call fcn.140129290
int3
call fcn.140129330
int3
call fcn.14012a390
int3
Function at 0x140129590
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x78
mov rax, qword [0x140364e40]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov r13, r9
mov r15, r8
mov r14, rdx
mov rdi, rcx
mov qword [rsp + 0x58], rcx
mov rax, qword [rsp + 0xe0]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0xe8]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0xf0]
mov qword [rsp + 0x48], rax
mov r12, qword [rsp + 0xf8]
mov rax, qword [rsp + 0x100]
mov qword [rsp + 0x50], rax
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 0x140129693
movabs rax, 0x7fffffffffffffff
cmp rbp, rax
ja 0x1401297e2
cmp rbp, 0x1000
jb 0x14012966b
lea rcx, [rbp + 0x27]
cmp rcx, rbp
jbe 0x1401297d6
call fcn.1402a7fa0
test rax, rax
je 0x140129664
lea rcx, [rax + 0x27]
and rcx, 0xffffffffffffffe0
mov qword [rcx - 8], rax
jmp 0x140129676
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rbp
call fcn.1402a7fa0
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 0x1401296e0
nop dword [rax]
nop dword [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 0x1401296b0
call r12
mov rbx, rax
test rax, rax
je 0x1401297dc
call fcn.14012ed50
mov rdx, rax
mov qword [rsp + 0x20], r13
mov r9, r15
xor r8d, r8d
mov rcx, rbx
call qword [rsp + reloc.WS2_32.dll_getservbyport]
cmp eax, 1
jne 0x1401297dc
mov rdx, qword [rdi]
mov rax, qword [rdi + 8]
sub rax, rdx
mov dword [rsp + 0x20], eax
mov r9, rdx
lea r8, [rsp + 0x60]
mov rcx, rbx
call qword [rsp + 0x40]
cmp eax, 1
jne 0x1401297dc
movsxd rsi, dword [rsp + 0x60]
mov rdx, rsi
add rdx, qword [rdi]
lea r8, [rsp + 0x60]
mov rcx, rbx
call qword [rsp + 0x48]
cmp eax, 1
jne 0x1401297dc
add esi, dword [rsp + 0x60]
mov rcx, rbx
call qword [rsp + 0x50]
movsxd rbx, esi
mov rsi, qword [rdi + 8]
mov rdx, qword [rdi]
mov rcx, rsi
sub rcx, rdx
cmp rbx, rcx
jae 0x140129782
lea rax, [rdx + rbx]
mov qword [rdi + 8], rax
jmp 0x1401297b5
jbe 0x1401297b5
mov rax, qword [rdi + 0x10]
sub rax, rdx
cmp rbx, rax
jbe 0x14012979d
mov rdx, rbx
mov rcx, rdi
call fcn.14012a3b0
jmp 0x1401297b5
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 + 0x68]
xor rcx, rsp
call fcn.1402a7f80
add rsp, 0x78
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
call fcn.140129290
int3
call fcn.140129330
int3
call fcn.14012a390
int3
Function at 0x1401302e0
Capabilities:
Set thread local storage value

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

Disassembly:
push rbx
push rdi
push r13
mov eax, gethostbyname
call fcn.1402a8310
sub rsp, rax
mov eax, dword [0x14069c990]
mov r13d, ecx
mov ebx, 1
cmp eax, 2
je 0x140130553
nop word [rax + rax]
xor eax, eax
lock cmpxchg dword [0x14069c990], ebx
je 0x14013052d
cmp eax, ebx
je 0x140130510
mov eax, dword [0x14069c990]
cmp eax, 2
jne 0x140130571
jmp 0x140130553
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
lea r8, [0x1401303f0]
xor edx, edx
xor ecx, ecx
mov dword [0x14069c98c], eax
call fcn.140138290
mov dword [0x14069c990], 2
mov r8d, 0x97
lea rdx, str.crypto_threads_win.c
lea ecx, [r8 - 0x3f]
call fcn.1401318c0
mov rdi, rax
test rax, rax
jne 0x14013057c
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.1401466a0
mov qword [rdi + 0x30], rax
call fcn.1401462a0
mov qword [rdi + 0x40], rax
call fcn.1401462a0
mov qword [rdi + 0x50], rax
call fcn.1401466a0
mov qword [rdi + 0x38], rax
call fcn.1401466a0
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.1401318c0
mov qword [rdi + 0x18], rbx
mov qword [rdi + 0x10], rax
test rax, rax
je 0x140130618
cmp qword [rdi + 0x40], 0
je 0x140130618
cmp qword [rdi + 0x50], 0
je 0x140130618
cmp qword [rdi + 0x30], 0
je 0x140130618
cmp qword [rdi + 0x38], 0
je 0x140130618
cmp qword [rdi + 0x48], 0
jne 0x140130671
mov r8d, 0xa8
lea rdx, str.crypto_threads_win.c
mov rcx, rax
call fcn.140131630
lea rcx, [rdi + 0x40]
call fcn.140146200
lea rcx, [rdi + 0x50]
call fcn.140146200
lea rcx, [rdi + 0x38]
call fcn.140146630
lea rcx, [rdi + 0x48]
call fcn.140146630
lea rcx, [rdi + 0x30]
call fcn.140146630
mov r8d, 0xae
lea rdx, str.crypto_threads_win.c
mov rcx, rdi
call fcn.140131630
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 0x1401306a0
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.1402a8310
sub rsp, rax
mov rbx, rcx
lea esi, [rax - 0x21]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x14069c98c]
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 0x14013072e
mov r8d, 0xdd
lea rdx, str.crypto_threads_win.c
lea ecx, [r8 + 0x13]
call fcn.1401318c0
mov r14, rax
test rax, rax
jne 0x14013071f
mov r8d, 0xde
lea rdx, str.crypto_threads_win.c
lea rcx, str.assertion_failed:_data___NULL
call fcn.140145bb0
mov ecx, dword [0x14069c98c]
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
xor ecx, ecx
mov rax, r14
cmp qword [rax], 0
jne 0x14013073f
cmp esi, 0xffffffff
cmove esi, ecx
cmp qword [rax + 0x10], rbx
je 0x140130803
inc ecx
add rax, 0x18
cmp ecx, 0xa
jl 0x140130733
prefetchw byte [rbx + 0x24]
mov eax, dword [rbx + 0x24]
nop dword [rax + rax]
mov ecx, eax
lock cmpxchg dword [rbx + 0x24], ecx
jne 0x140130760
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 0x140130784
cmp r8d, eax
je 0x1401307e2
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 0x1401307b0
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 0x1401307d4
cmp r8d, eax
jne 0x1401307a0
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 0x140130820
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
mov eax, 0x20
call fcn.1402a8310
sub rsp, rax
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x14069c98c]
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 0x140130889
inc r9d
inc r8
add rdx, 0x18
cmp r8, 0xa
jl 0x140130864
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 0x1401308d8
mov rax, qword [rbx]
mov rcx, 0xffffffffffffffff
lock xadd qword [rax], rcx
cmp rcx, 1
jns 0x1401308c9
mov r8d, 0x10b
lea rdx, str.crypto_threads_win.c
lea rcx, str.assertion_failed:_ret___0
call fcn.140145bb0
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 0x1401378c0
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.1402a8310
sub rsp, rax
lea edx, [rax - 0x2f]
mov rbx, rcx
call fcn.140137490
mov rdx, rax
mov rcx, rbx
mov rbp, rax
call fcn.140137370
xor edi, edi
mov r14, rax
test rax, rax
je 0x140137967
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 0x140137943
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.140137420
mov rcx, rbx
call fcn.1401375e0
test rax, rax
jne 0x1401379fb
mov edx, 1
mov rcx, rbx
call fcn.140137490
mov rdx, rax
mov rcx, rbx
mov rsi, rax
call fcn.140137370
mov rbp, rax
test rax, rax
je 0x1401379f3
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 0x1401379d3
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.140137420
mov rcx, rbx
call fcn.1401375e0
test rax, rax
jne 0x1401379fb
mov rcx, rbx
call fcn.1401375e0
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret
Function at 0x140140ce0
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.1402a8310
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 0x140140d41
nop dword [rax]
test rdi, rdi
je 0x140140d41
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 0x140140d20
mov r9, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x80]
cmp rdi, 0x10
jb 0x140140e0e
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.140141070
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 0x140140dc0
mov rcx, qword [rsp + 0x80]
add r14, 0x10
mov r9, qword [rsp + 0x98]
add r15, 0x10
sub r13, 1
jne 0x140140d97
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 0x140140e45
mov r8, r10
mov rdx, r12
call r9
mov rcx, qword [rsp + 0x80]
call fcn.140141070
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 0x140140e30
mov dword [r14], ebx
add rsp, 0x28
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret