joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400241d6
Capabilities:
Hash data using sha512

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x1d0
mov rbx, r9
mov r14, r8
mov rsi, rcx
movups xmm0, xmmword [0x1400e85f8]
lea rdi, [rsp + 0x20]
movups xmmword [rdi + 0x38], xmm0
movups xmm0, xmmword [0x1400e85e8]
movups xmmword [rdi + 0x28], xmm0
movups xmm0, xmmword [0x1400e85d8]
movups xmmword [rdi + 0x18], xmm0
movups xmm0, xmmword [0x1400e85c8]
movups xmmword [rdi + 8], xmm0
lea rax, [0x1400e8598]
xorps xmm0, xmm0
movups xmmword [rdi + 0x50], xmm0
movups xmmword [rdi + 0x60], xmm0
movups xmmword [rdi + 0x70], xmm0
movups xmmword [rdi + 0x80], xmm0
movups xmmword [rdi + 0x90], xmm0
movups xmmword [rdi + 0xa0], xmm0
movups xmmword [rdi + 0xb0], xmm0
movups xmmword [rdi + 0xc0], xmm0
mov qword [rdi], rax
and qword [rdi + 0x48], 0
mov r15, qword [rsp + 0x220]
and qword [rdi + 0xd0], 0
mov r8d, 0x20
mov rcx, rdi
call fcn.140021845
mov r8d, 0x20
mov rcx, rdi
mov rdx, r14
call fcn.140021845
mov rcx, rdi
mov rdx, rbx
mov r8, r15
call fcn.140021845
lea rbx, [rsp + 0xf8]
mov r8d, 0xd8
mov rcx, rbx
mov rdx, rdi
call sub.msvcrt.dll_memcpy
mov rcx, rsi
mov rdx, rbx
call fcn.140021a12
nop
add rsp, 0x1d0
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret

Function at 0x1400273f5
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x28
mov esi, ecx
mov eax, 0x30
mov rax, qword gs:[eax]
mov rax, qword [rax + 0x60]
mov rdi, qword [rax + 0x18]
add rdi, 0x10
mov rdi, qword [rdi]
movzx edx, word [rdi + 0x58]
mov rcx, qword [rdi + 0x60]
call fcn.1400274e4
cmp eax, 0x1edab0ed
jne 0x14002741d
mov r14, qword [rdi + 0x30]
movsxd rax, dword [r14 + 0x3c]
mov eax, dword [rax + r14 + 0x88]
test rax, rax
je 0x1400274b5
mov edi, dword [rax + r14 + 0x18]
mov ecx, dword [rax + r14 + 0x1c]
add rcx, r14
mov qword [rsp + 0x20], rcx
mov r12d, dword [rax + r14 + 0x20]
add r12, r14
mov r13d, dword [rax + r14 + 0x24]
add r13, r14
xor ebx, ebx
xor r15d, r15d
cmp r15, rdi
je 0x1400274b7
mov rbp, r15
mov ecx, dword [r12 + r15*4]
add rcx, r14
mov rax, rcx
mov rdx, rax
inc rax
cmp byte [rdx], 0
jne 0x140027482
lea r15, [rbp + 1]
sub rdx, rcx
call fcn.1400274e4
cmp eax, esi
jne 0x140027470
movzx ecx, word [r13 + rbp*2]
cmp rdi, rcx
jbe 0x1400274d3
mov rax, qword [rsp + 0x20]
mov ebx, dword [rax + rcx*4]
add rbx, r14
jmp 0x1400274b7
xor ebx, ebx
movzx eax, word [rbx + 4]
add rbx, 0x12
mov rdx, rbx
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea r8, str.src_external_libraries_rust_syscalls_src_syscall_resolve.rs
mov rdx, rdi
call fcn.140008f30
ud2

Function at 0x1400274e4
Capabilities:
Hash data using djb2

Disassembly:
mov eax, 0x1505
xor r8d, r8d
cmp r8, rdx
jae 0x140027520
mov r9b, byte [rcx + r8]
test r9b, r9b
jne 0x1400274ff
inc r8
jmp 0x1400274ec
lea r10d, [r9 - 0x20]
cmp r9b, 0x61
movzx r9d, r9b
movzx r10d, r10b
cmovb r10d, r9d
imul r9d, eax, 0x21
movzx eax, r10b
add eax, r9d
jmp 0x1400274fa
ret
Function at 0x14002adc0
Capabilities:
Encode data using xor

Disassembly:
mov rax, rdx
sub rdx, rcx
cmp rdx, 0x20
jae fcn.1400093a0
cmp rax, rcx
je 0x14002ade5
cmp rdx, 4
jae 0x14002ade8
xor eax, eax
xor r8d, r8d
jmp 0x14002ae80
xor eax, eax
ret
mov r8, rdx
and r8, 0xfffffffffffffffc
pxor xmm0, xmm0
xor eax, eax
movdqa xmm2, xmmword [0x1400cc6d0]
movdqa xmm3, xmmword [0x1400cc6e0]
pxor xmm1, xmm1
nop dword [rax]
movzx r9d, word [rcx + rax]
movd xmm4, r9d
movzx r9d, word [rcx + rax + 2]
movd xmm5, r9d
pcmpgtb xmm4, xmm2
punpcklbw xmm4, xmm4
pshuflw xmm4, xmm4, 0xd4
pshufd xmm4, xmm4, 0xd4
pand xmm4, xmm3
paddq xmm0, xmm4
pcmpgtb xmm5, xmm2
punpcklbw xmm5, xmm5
pshuflw xmm4, xmm5, 0xd4
pshufd xmm4, xmm4, 0xd4
pand xmm4, xmm3
paddq xmm1, xmm4
add rax, 4
cmp r8, rax
jne 0x14002ae10
paddq xmm1, xmm0
pshufd xmm0, xmm1, 0xee
paddq xmm0, xmm1
movq rax, xmm0
cmp r8, rdx
je 0x14002ae97
nop dword [rax]
xor r9d, r9d
cmp byte [rcx + r8], 0xc0
setge r9b
add rax, r9
inc r8
cmp rdx, r8
jne 0x14002ae80
ret
Function at 0x14002be10
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x48
mov rsi, rcx
mov r8, qword [rcx]
test r8, r8
je 0x14002be6b
mov r10, qword [rsi + 8]
mov rcx, qword [rsi + 0x10]
cmp rcx, r10
jae 0x14002be6b
movzx eax, byte [r8 + rcx]
cmp eax, 0x49
je 0x14002be86
cmp eax, 0x42
jne 0x14002be6b
lea r11, [rcx + 1]
mov qword [rsi + 0x10], r11
cmp r11, r10
jae 0x14002bf36
cmp byte [r8 + r11], 0x5f
jne 0x14002bf36
lea rax, [rcx + 2]
mov qword [rsi + 0x10], rax
xor eax, eax
jmp 0x14002bf9e
mov rcx, rsi
xor edx, edx
call fcn.1400277d0
mov edi, eax
add dil, dil
mov eax, edi
add rsp, 0x48
pop rbx
pop rdi
pop rsi
pop r14
ret
inc rcx
mov qword [rsi + 0x10], rcx
mov rcx, rsi
xor edx, edx
call fcn.1400277d0
test al, al
jne 0x14002c031
mov rcx, qword [rsi + 0x20]
test rcx, rcx
je 0x14002bec2
lea rdx, [0x1400eaa4a]
mov r8d, 1
call fcn.140009890
test al, al
jne 0x14002c031
mov rax, qword [rsi]
mov dil, 1
test rax, rax
je 0x14002be7a
xor r14d, r14d
lea rbx, [0x1400eadb7]
nop word [rax + rax]
mov rcx, qword [rsi + 0x10]
cmp rcx, qword [rsi + 8]
jae 0x14002bef4
cmp byte [rax + rcx], 0x45
je 0x14002c053
sub r14, 1
jb 0x14002bf19
mov rcx, qword [rsi + 0x20]
test rcx, rcx
je 0x14002bf19
mov r8d, 2
mov rdx, rbx
call fcn.140009890
test al, al
jne 0x14002c031
mov rcx, rsi
call fcn.140029030
test al, al
jne 0x14002c031
mov rax, qword [rsi]
test rax, rax
jne 0x14002bee0
jmp 0x14002be7a
xor eax, eax
mov edi, 0x3e
nop dword [rax]
mov r9b, 1
cmp r11, r10
jae 0x14002bff8
movzx edx, byte [r8 + r11]
cmp dl, 0x5f
je 0x14002bf92
lea ebx, [rdx - 0x30]
cmp bl, 0xa
jb 0x14002bf7c
lea ebx, [rdx - 0x61]
cmp bl, 0x1a
jae 0x14002bf6b
add dl, 0xa9
jmp 0x14002bf7a
lea ebx, [rdx - 0x41]
cmp bl, 0x1a
jae 0x14002bff8
add dl, 0xe3
mov ebx, edx
inc r11
mov qword [rsi + 0x10], r11
mul rdi
jo 0x14002bff8
movzx edx, bl
add rax, rdx
jae 0x14002bf40
jmp 0x14002bff8
inc r11
mov qword [rsi + 0x10], r11
inc rax
je 0x14002bff8
cmp rax, rcx
jae 0x14002bff5
mov ecx, dword [rsi + 0x18]
inc ecx
cmp ecx, 0x1f4
ja 0x14002c04b
cmp qword [rsi + 0x20], 0
je 0x14002c044
movups xmm0, xmmword [rsi]
movups xmm1, xmmword [rsi + 0x10]
movaps xmmword [rsp + 0x30], xmm1
movaps xmmword [rsp + 0x20], xmm0
mov qword [rsi + 0x10], rax
mov dword [rsi + 0x18], ecx
mov rcx, rsi
call fcn.14002be10
movaps xmm0, xmmword [rsp + 0x20]
movaps xmm1, xmmword [rsp + 0x30]
movups xmmword [rsi], xmm0
movups xmmword [rsi + 0x10], xmm1
jmp 0x14002be7c
mov r9b, 1
xor edi, edi
mov rcx, qword [rsi + 0x20]
test rcx, rcx
je 0x14002c039
mov eax, r9d
xor al, 1
movzx eax, al
lea r8, [rax + rax*8]
add r8, 0x10
lea rax, str.invalid_syntaxrecursion_limit_reachedfor_____::closureshim_as_mut_const___dyn___unsafe_extern__
lea rdx, [0x1400ead98]
test r9b, r9b
cmovne rdx, rax
call fcn.140009890
test al, al
je 0x14002c039
mov dil, 2
jmp 0x14002be7a
mov qword [rsi], 0
mov byte [rsi + 8], dil
xor edi, edi
jmp 0x14002be7a
mov dil, 1
xor r9d, r9d
jmp 0x14002bffa
inc rcx
mov qword [rsi + 0x10], rcx
jmp 0x14002be7a
Function at 0x140056680
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x60
invalid
mov rsi, rcx
cmp qword [rcx], 0
je 0x140056705
mov dword [rsp + 0x2c], 0
lea rbx, [rsi + 0x10]
lea r8, [rsp + 0x2c]
mov rcx, rbx
xor edx, edx
xor r9d, r9d
call sub.KERNEL32.dll_InitOnceBeginInitialize
mov dword [rsp + 0x28], eax
cmp eax, 1
jne 0x140056746
cmp dword [rsp + 0x2c], 0
je 0x14005672a
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x14005676e
mov edi, eax
inc eax
mov dword [rsi + 0x18], eax
mov rax, qword [0x14016e188]
nop
mov qword [rsi + 8], rax
lock cmpxchg qword [0x14016e188], rsi
jne 0x1400566e0
mov byte [0x14016e180], 1
mov rcx, rbx
xor edx, edx
xor r8d, r8d
call sub.KERNEL32.dll_InitOnceComplete
jmp 0x14005673c
call sub.KERNEL32.dll_TlsAlloc
mov dword [rsp + 0x28], eax
cmp eax, 0xffffffff
je 0x1400567ba
mov ecx, eax
inc ecx
xor eax, eax
lock cmpxchg dword [rsi + 0x18], ecx
jne 0x14005672f
mov edi, dword [rsp + 0x28]
jmp 0x14005673c
mov edi, dword [rsi + 0x18]
jmp 0x14005673a
mov edi, eax
mov ecx, dword [rsp + 0x28]
and al, 0x28
mov qword [rsp + 0x30], 0
lea rdx, [0x1400f3d48]
lea r9, str.library_std_src_syswindows_thread_local_key.rs
invalid
or dword [rax], eax
lea rcx, [rsp + 0x28]
lea r8, [rsp + 0x30]
call fcn.140056da0
ud2
mov rcx, rbx
mov edx, 4
lea rax, str.out_of_TLS_indexes
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 1
lea rax, str.called__Option::unwrap____on_a__None__valuecalled__Result::unwrap____on_an__Err__value
mov qword [rsp + 0x40], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
lea rcx, [rsp + 0x28]
lea rdx, [rsp + 0x30]
call fcn.140056de0
ud2

Function at 0x140056c70
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov ecx, dword [0x1400cb080]
test ecx, ecx
je 0x140056d50
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x140056ca4
mov rdi, rax
cmp qword [rax + 8], 0
je 0x140056ca4
add rdi, 0x10
jmp 0x140056d46
mov ecx, dword [0x1400cb080]
test ecx, ecx
je 0x140056d63
dec ecx
lea rcx, case.0x14003a485.456
call fcn.140056680
mov ecx, eax
jmp 0x140056c86
lea rcx, case.0x14003a485.456
Function at 0x140057370
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
sub rsp, 0x20
mov ecx, dword [0x1400cb0a0]
test ecx, ecx
je 0x14005740f
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x140057399
mov rsi, rax
cmp byte [rax + 8], 0
jne 0x1400573fe
mov ecx, dword [0x1400cb0a0]
test ecx, ecx
je 0x140057422
invalid
lea rcx, [0x1400cb088]
call fcn.140056680
dec dword [rcx - 0x9c163f]
invalid
invalid
lea rcx, [0x1400cb088]
call fcn.140056680
mov ecx, eax
Function at 0x140076140
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov ecx, dword [0x1400cb0c0]
test ecx, ecx
je 0x140076220
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x140076174
mov rdi, rax
cmp qword [rax + 8], 0
je 0x140076174
add rdi, 0x10
jmp 0x140076216
mov ecx, dword [0x1400cb0c0]
test ecx, ecx
je 0x140076233
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x140076214
mov rsi, rax
test rax, rax
jne 0x1400761e3
movzx eax, byte [0x14016e1e9]
mov ecx, 0x18
mov edx, 8
call fcn.140007c00
test rax, rax
je 0x140076256
mov rsi, rax
lea rax, [0x1400cb0a8]
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x1400cb0c0]
test ecx, ecx
je 0x140076246
dec ecx
mov rdx, rsi
call sub.KERNEL32.dll_TlsSetValue
lea rdi, [rsi + 0x10]
mov rcx, qword [rsi + 0x10]
cmp qword [rsi + 8], 0
mov qword [rsi + 8], 1
mov qword [rsi + 0x10], 0
je 0x140076216
test rcx, rcx
je 0x140076216
lock dec qword [rcx]
jne 0x140076216
call fcn.140076270
jmp 0x140076216
xor edi, edi
mov rax, rdi
add rsp, 0x28
pop rdi
pop rsi
ret
lea rcx, [0x1400cb0a8]
call fcn.140056680
mov ecx, eax
jmp 0x140076156
lea rcx, [0x1400cb0a8]
call fcn.140056680
mov ecx, eax
jmp 0x140076184
lea rcx, [0x1400cb0a8]
call fcn.140056680
mov ecx, eax
jmp 0x1400761db
mov ecx, 8
mov edx, 0x18
call fcn.140008130
ud2

Function at 0x140076b50
Capabilities:
Resolve dns

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x88
mov ebx, r9d
mov rsi, rcx
lea rcx, [rsp + 0x30]
call fcn.1400082e0
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x140076baa
lea rax, str.file_name_contained_an_unexpected_NUL_byte
mov qword [rsi + 8], rax
mov qword [rsi], 1
cmp qword [rsp + 0x38], 0
je 0x140076c32
mov edx, 1
add rsp, 0x88
pop rbx
pop rdi
pop rsi
pop r14
jmp fcn.140007c90
mov rdi, qword [rsp + 0x38]
mov r14, qword [rsp + 0x40]
xorps xmm0, xmm0
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rsp + 0x60], xmm0
mov dword [rsp + 0x58], 1
mov qword [rsp + 0x28], 0
lea r8, [rsp + 0x50]
lea r9, [rsp + 0x28]
mov rcx, rdi
xor edx, edx
call sub.WS2_32.dll_getaddrinfo
test eax, eax
je 0x140076c07
call sub.WS2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov eax, 1
jmp 0x140076c1a
mov rax, qword [rsp + 0x28]
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], rax
mov word [rsi + 0x18], bx
xor eax, eax
mov qword [rsi], rax
mov byte [rdi], 0
test r14, r14
je 0x140076c32
mov edx, 1
mov rcx, rdi
call fcn.140007c90
nop
add rsp, 0x88
pop rbx
pop rdi
pop rsi
pop r14
ret
Function at 0x140077390
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push rsi
push rdi
sub rsp, 0x38
mov rsi, rcx
test dx, dx
mov eax, 2
mov edi, 0x17
cmove edi, eax
mov dword [rsp + 0x28], 0x81
mov dword [rsp + 0x20], 0
mov ecx, edi
mov edx, 1
xor r8d, r8d
xor r9d, r9d
call sub.WS2_32.dll_WSASocketW
cmp rax, 0xffffffffffffffff
je 0x1400773de
mov qword [rsi + 8], rax
mov qword [rsi], 0
jmp 0x14007744e
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2726
je 0x1400773f1
cmp eax, 0x2739
jne 0x14007743b
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0
mov ecx, edi
mov edx, 1
xor r8d, r8d
xor r9d, r9d
call sub.WS2_32.dll_WSASocketW
cmp rax, 0xffffffffffffffff
je 0x140077436
mov rdi, rax
mov rcx, rax
mov edx, 1
xor r8d, r8d
call sub.KERNEL32.dll_SetHandleInformation
test eax, eax
je 0x140077455
mov qword [rsi + 8], rdi
jmp 0x1400773d5
call sub.WS2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov qword [rsi], 1
add rsp, 0x38
pop rdi
pop rsi
ret
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov qword [rsi], 1
mov rcx, rdi
add rsp, 0x38
pop rdi
pop rsi
jmp fcn.1400bf82c

Function at 0x140077480
Capabilities:
Set socket configuration

Disassembly:
sub rsp, 0x38
xor r9d, r9d
cmp r8d, 0x3b9aca00
je 0x1400774de
mov r9d, 0x3e8
mov rax, rdx
mul r9
mov r9d, 0xffffffff
jo 0x1400774de
mov edx, r8d
imul rdx, rdx, 0x431bde83
shr rdx, 0x32
add rax, rdx
jb 0x1400774de
imul edx, edx, 0xf4240
xor r10d, r10d
sub r8d, edx
setne r10b
add rax, r10
jb 0x1400774de
mov r9d, 0xffffffff
cmp rax, r9
cmovb r9, rax
test r9, r9
je 0x14007751b
mov dword [rsp + 0x34], r9d
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x34]
mov edx, 0xffff
mov r8d, 0x1006
call sub.WS2_32.dll_setsockopt
cmp eax, 0xffffffff
je 0x140077509
xor eax, eax
jmp 0x140077516
call sub.WS2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
add rsp, 0x38
ret
lea rax, str.cannot_set_a_0_duration_timeout
jmp 0x140077516

Function at 0x140077530
Capabilities:
Set socket configuration

Disassembly:
sub rsp, 0x38
xor r9d, r9d
cmp r8d, 0x3b9aca00
je 0x14007758e
mov r9d, 0x3e8
mov rax, rdx
mul r9
mov r9d, 0xffffffff
jo 0x14007758e
mov edx, r8d
imul rdx, rdx, 0x431bde83
shr rdx, 0x32
add rax, rdx
jb 0x14007758e
imul edx, edx, 0xf4240
xor r10d, r10d
sub r8d, edx
setne r10b
add rax, r10
jb 0x14007758e
mov r9d, 0xffffffff
cmp rax, r9
cmovb r9, rax
test r9, r9
je 0x1400775cb
mov dword [rsp + 0x34], r9d
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x34]
mov edx, 0xffff
mov r8d, 0x1005
call sub.WS2_32.dll_setsockopt
cmp eax, 0xffffffff
je 0x1400775b9
xor eax, eax
jmp 0x1400775c6
call sub.WS2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
add rsp, 0x38
ret
lea rax, str.cannot_set_a_0_duration_timeout
jmp 0x1400775c6
Function at 0x1400775e0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rsi
push rdi
sub rsp, 0x28
mov rdi, rdx
mov rdx, qword [rdx + 8]
mov rsi, qword [rdi + 0x10]
mov rax, rdx
sub rax, rsi
jb 0x14007765a
mov rcx, qword [rcx]
cmp rax, 0x7fffffff
mov r8d, 0x7fffffff
cmovb r8, rax
mov rdx, qword [rdi]
add rdx, rsi
xor r9d, r9d
call sub.WS2_32.dll_recv
cmp eax, 0xffffffff
je 0x14007763b
cdqe
add rsi, rax
mov qword [rdi + 0x10], rsi
mov rax, qword [rdi + 0x18]
cmp rax, rsi
cmova rsi, rax
mov qword [rdi + 0x18], rsi
xor eax, eax
jmp 0x140077653
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x274a
jne 0x14007764b
xor eax, eax
jmp 0x140077653
shl rax, 0x20
or rax, 2
add rsp, 0x28
pop rdi
pop rsi
ret
lea r8, str._rustc_82e1608dfa6e0b5569232559e3d385fea5a93112librarycore_srcio_borrowed_buf.rs
mov rcx, rsi
call fcn.140008eb0
ud2

Function at 0x140077700
Capabilities:
Send data
Send data on socket

Disassembly:
push rsi
sub rsp, 0x40
mov rax, r8
mov rsi, rcx
mov rcx, qword [rdx]
mov r8d, 0xffffffff
cmp r9, r8
cmovb r8, r9
mov dword [rsp + 0x3c], 0
xorps xmm0, xmm0
movups xmmword [rsp + 0x28], xmm0
mov dword [rsp + 0x20], 0
lea r9, [rsp + 0x3c]
mov rdx, rax
call sub.WS2_32.dll_WSASend
cmp eax, 0xffffffff
je 0x140077751
mov eax, dword [rsp + 0x3c]
mov qword [rsi + 8], rax
xor eax, eax
jmp 0x140077767
call sub.WS2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov eax, 1
mov qword [rsi], rax
mov rax, rsi
add rsp, 0x40
pop rsi
ret

Function at 0x140077a20
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push rsi
sub rsp, 0xb0
mov rax, rdx
mov rsi, rcx
xorps xmm0, xmm0
movaps xmmword [rsp + 0xa0], xmm0
movaps xmmword [rsp + 0x90], xmm0
movaps xmmword [rsp + 0x80], xmm0
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rsp + 0x60], xmm0
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x40], xmm0
movaps xmmword [rsp + 0x30], xmm0
mov dword [rsp + 0x2c], pe_nt_image_headers64
lea rdx, [rsp + 0x30]
lea r8, [rsp + 0x2c]
mov rcx, rax
call sub.WS2_32.dll_getsockname
cmp eax, 0xffffffff
je 0x140077ac4
mov eax, dword [rsp + 0x2c]
movzx ecx, word [rsp + 0x30]
cmp ecx, 2
je 0x140077ad3
cmp ecx, 0x17
jne 0x140077af3
cmp eax, 0x1b
jbe 0x140077b0c
movzx eax, word [rsp + 0x32]
rol ax, 8
movups xmm0, xmmword [rsp + 0x38]
mov ecx, dword [rsp + 0x34]
mov edx, dword [rsp + 0x48]
mov word [rsi], 1
movups xmmword [rsi + 4], xmm0
mov dword [rsi + 0x14], ecx
mov dword [rsi + 0x18], edx
mov word [rsi + 0x1c], ax
jmp 0x140077b03
call sub.WS2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
jmp 0x140077afa
cmp eax, 0xf
jbe 0x140077b26
movzx eax, word [rsp + 0x32]
rol ax, 8
mov ecx, dword [rsp + 0x34]
mov word [rsi], 0
mov word [rsi + 6], ax
mov dword [rsi + 2], ecx
jmp 0x140077b03
lea rax, str.invalid_argument
mov qword [rsi + 8], rax
mov word [rsi], 2
add rsp, 0xb0
pop rsi
ret
lea rcx, str.assertion_failed:_len_as_usize___mem::size_of::_c::sockaddr_in6___
lea r8, [0x1400f4380]
mov edx, 0x43
call fcn.140009bb0
ud2
lea rcx, str.assertion_failed:_len_as_usize___mem::size_of::_c::sockaddr_in___library_std_src_sys_common_net.rs
lea r8, [0x1400f4320]
mov edx, 0x42
call fcn.140009bb0
ud2
Function at 0x140077b40
Capabilities:
Set socket configuration

Disassembly:
sub rsp, 0x28
movzx eax, dl
mov dword [rsp + 0x24], eax
lea r8, [rsp + 0x24]
mov edx, 0x8004667e
call sub.WS2_32.dll_ioctlsocket
cmp eax, 0xffffffff
je 0x140077b63
xor eax, eax
jmp 0x140077b70
call sub.WS2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
add rsp, 0x28
ret

Function at 0x140077b80
Capabilities:
Send data
Send data on socket

Disassembly:
push rsi
sub rsp, 0x20
mov rax, r8
mov rsi, rcx
mov rcx, qword [rdx]
cmp r9, 0x7fffffff
mov r8d, 0x7fffffff
cmovb r8, r9
mov rdx, rax
xor r9d, r9d
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
je 0x140077bb9
cdqe
mov qword [rsi + 8], rax
xor eax, eax
jmp 0x140077bcf
call sub.WS2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov eax, 1
mov qword [rsi], rax
mov rax, rsi
add rsp, 0x20
pop rsi
ret

Function at 0x140077be0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rsi
sub rsp, 0x20
mov rax, r8
mov rsi, rcx
mov rcx, qword [rdx]
cmp r9, 0x7fffffff
mov r8d, 0x7fffffff
cmovb r8, r9
mov rdx, rax
xor r9d, r9d
call sub.WS2_32.dll_recv
cmp eax, 0xffffffff
je 0x140077c13
cdqe
jmp 0x140077c21
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x274a
jne 0x140077c29
xor eax, eax
mov qword [rsi + 8], rax
xor eax, eax
jmp 0x140077c3a
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov eax, 1
mov qword [rsi], rax
mov rax, rsi
add rsp, 0x20
pop rsi
ret

Function at 0x140077f60
Capabilities:
Create thread

Disassembly:
push r14
push rsi
push rdi
push rbx
sub rsp, 0x38
mov rbx, r8
mov r14, rdx
mov rdi, rcx
movzx eax, byte [0x14016e1e9]
mov ecx, 0x10
mov edx, 8
call fcn.140007c00
test rax, rax
je 0x140078018
mov rsi, rax
mov qword [rax], r14
mov qword [rax + 8], rbx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x10000
lea r8, [0x140078070]
xor ebx, ebx
xor ecx, ecx
mov rdx, rdi
mov r9, rax
call sub.KERNEL32.dll_CreateThread
mov rdx, rax
test rax, rax
jne 0x14007800b
mov rbx, qword [rsi]
mov r14, qword [rsi + 8]
mov rcx, rbx
call qword [r14]
cmp qword [r14 + 8], 0
je 0x140077fea
mov rdx, qword [r14 + 0x10]
mov rcx, rbx
call fcn.140007c90
mov edx, 8
mov rcx, rsi
call fcn.140007c90
call sub.KERNEL32.dll_GetLastError
mov edx, eax
shl rdx, 0x20
or rdx, 2
mov ebx, 1
mov rax, rbx
add rsp, 0x38
pop rbx
pop rdi
pop rsi
pop r14
ret
mov ecx, 8
mov edx, 0x10
call fcn.140008130
ud2

Function at 0x140078140
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rsi
sub rsp, 0x80
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
lea rcx, [rsp + 0x30]
mov edx, 0x10
call sub.ADVAPI32.dll_SystemFunction036
test al, al
je 0x140078176
mov rax, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x38]
add rsp, 0x80
pop rsi
ret
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x28]
mov qword [rsp + 0x40], rax
lea rax, [fcn.140074f10]
mov qword [rsp + 0x48], rax
lea rax, str.fallback_RNG_broken:
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], 1
mov qword [rsp + 0x70], 0
lea rax, [rsp + 0x40]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], 1
lea rdx, str.library_std_src_syswindows_rand.rs
lea rcx, [rsp + 0x50]
call fcn.140008e70
ud2
Function at 0x14007cb10
Capabilities:
Connect socket

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x40
mov rbx, r8
mov rsi, rcx
test rdx, rdx
je 0x14007cb32
mov qword [rsi + 8], rbx
mov qword [rsi], 1
jmp 0x14007cbfe
mov rax, qword [0x14016e170]
cmp rax, 3
jne 0x14007cc07
movzx edx, word [rbx]
lea rcx, [rsp + 0x20]
call fcn.140077390
cmp qword [rsp + 0x20], 0
mov rdi, qword [rsp + 0x28]
je 0x14007cb6d
mov qword [rsi + 8], rdi
mov qword [rsi], 1
jmp 0x14007cbfe
cmp word [rbx], 0
je 0x14007cb8e
movups xmm0, xmmword [rbx + 4]
mov eax, dword [rbx + 0x14]
mov edx, dword [rbx + 0x18]
movzx ecx, word [rbx + 0x1c]
mov r8d, 0x1c
mov r9w, 0x17
jmp 0x14007cba3
mov eax, dword [rbx + 2]
movzx ecx, word [rbx + 6]
mov r8d, 0x10
mov r9w, 2
xorps xmm0, xmm0
rol cx, 8
mov word [rsp + 0x20], r9w
mov word [rsp + 0x22], cx
mov dword [rsp + 0x24], eax
movups xmmword [rsp + 0x28], xmm0
mov dword [rsp + 0x38], edx
lea rdx, [rsp + 0x20]
mov rcx, rdi
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
je 0x14007cbde
mov qword [rsi + 8], rdi
mov qword [rsi], 0
jmp 0x14007cbfe
call sub.WS2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov qword [rsi], 1
mov rcx, rdi
call fcn.1400bf82c
nop
add rsp, 0x40
pop rbx
pop rdi
pop rsi
ret
call fcn.140076af0
jmp 0x14007cb43

Function at 0x14007cc60
Capabilities:
Generate random numbers via winapi
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
sub rsp, 0x30
mov ecx, dword [0x1400cb0e0]
test ecx, ecx
je 0x14007cd59
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x14007cc90
cmp qword [rax + 8], 0
je 0x14007cc90
add rax, 0x10
jmp 0x14007cd53
mov ecx, dword [0x1400cb0e0]
test ecx, ecx
je 0x14007cd6c
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x14007cd33
mov rsi, rax
test rax, rax
jne 0x14007cd03
movzx eax, byte [0x14016e1e9]
mov ecx, 0x20
mov edx, 8
call fcn.140007c00
test rax, rax
je 0x14007cd92
mov rsi, rax
lea rax, [0x1400cb0c8]
mov qword [rsi], rax
mov qword [rsi + 8], 0
mov ecx, dword [0x1400cb0e0]
test ecx, ecx
je 0x14007cd7f
dec ecx
mov rdx, rsi
call sub.KERNEL32.dll_TlsSetValue
xorps xmm0, xmm0
movaps xmmword [rsp + 0x20], xmm0
lea rdx, [rsp + 0x20]
xor ecx, ecx
mov r8d, 0x10
mov r9d, 2
call sub.bcrypt.dll_BCryptGenRandom
test eax, eax
js 0x14007cd37
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x28]
jmp 0x14007cd3f
xor eax, eax
jmp 0x14007cd53
call fcn.140078140
mov rcx, rax
mov qword [rsi + 8], 1
lea rax, [rsi + 0x10]
mov qword [rsi + 0x10], rcx
mov qword [rsi + 0x18], rdx
add rsp, 0x30
pop rsi
ret
lea rcx, [0x1400cb0c8]
call fcn.140056680
mov ecx, eax
jmp 0x14007cc75
lea rcx, [0x1400cb0c8]
call fcn.140056680
mov ecx, eax
jmp 0x14007cca0
lea rcx, [0x1400cb0c8]
call fcn.140056680
mov ecx, eax
jmp 0x14007ccfb
mov ecx, 8
mov edx, 0x20
call fcn.140008130
ud2