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

Disassembly:
push rbp
push rsi
push rdi
push rbx
sub rsp, 0x78
lea rbp, [rsp + 0x70]
mov rdi, rdx
cmp qword [rdx], 0
jne 0x140049a5e
mov rsi, rcx
mov rbx, qword [rdi + 0x18]
mov rax, qword [rbx]
test rax, rax
jne 0x14004992d
mov rdx, qword [rbx + 0x10]
lea rax, [rdx + 0xf]
cmp rax, 0xf
jbe 0x140049a23
xor eax, eax
mov rdx, qword [rbx + 0x10]
cmp rax, rdx
je 0x140049a41
sub rax, rdx
add rdx, qword [rbx + 8]
mov r8, qword [rdi + 0x10]
mov ecx, 0xffffffff
cmp rax, rcx
cmovae rax, rcx
mov dword [rbp + 4], 0
mov rcx, qword [rdi + 0x20]
mov qword [rsp + 0x20], r8
lea r9, [rbp + 4]
mov r8d, eax
call sub.KERNEL32.dll_ReadFile
test eax, eax
je 0x14004998b
mov eax, dword [rbp + 4]
mov ecx, 2
test rax, rax
je 0x1400499cd
mov qword [rdi], rcx
mov qword [rdi + 8], rax
mov byte [rsi + 1], 1
jmp 0x1400499d1
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rbp - 0x40], rax
movabs rcx, 0xffffffff00000000
and rcx, rax
movabs rdx, 0x6d00000000
cmp rcx, rdx
je 0x1400499d5
movabs rdx, 0x3e500000000
cmp rcx, rdx
jne 0x1400499ff
lea rax, [rbp - 8]
jmp 0x1400499e1
mov byte [rsi + 1], 0
xor eax, eax
jmp 0x140049a05
mov qword [rbp - 8], 1
lea rax, [rbp - 0x10]
mov qword [rax], 0
lea rcx, [rbp - 0x40]
call dbg.drop_in_place<std::io::error::Error>
mov rcx, qword [rbp - 8]
mov rax, qword [rbp - 0x10]
cmp rcx, 2
jne 0x140049a10
mov qword [rsi + 8], rax
mov al, 1
mov byte [rsi], al
add rsp, 0x78
pop rbx
pop rdi
pop rsi
pop rbp
ret
test rcx, rcx
jne 0x140049974
mov ecx, 1
jmp 0x14004997e
mov r8d, 0x10
mov rcx, rbx
call sym.alloc::raw_vec::RawVec_T_A_::reserve::do_reserve_and_handle::h1265e2bf9b553796
mov rax, qword [rbx]
mov rdx, qword [rbx + 0x10]
cmp rax, rdx
jne 0x14004993a
mov r8d, 1
mov rcx, rbx
mov rdx, rax
call sym.alloc::raw_vec::RawVec_T_A_::reserve::do_reserve_and_handle::h1265e2bf9b553796
mov rax, qword [rbx]
mov rdx, qword [rbx + 0x10]
jmp 0x14004993a
mov qword [rbp - 0x40], 0
lea rdx, [rbp - 0x40]
mov rcx, rdi
call dbg.assert_failed<std::sys::pal::windows::pipe::State, std::sys::pal::windows::pipe::State>
int3
Function at 0x14004d9e0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbp
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x68
lea rbp, [rsp + 0x60]
mov rsi, rcx
movabs r14, 0x8000000000000000
lea rcx, [rbp - 0x28]
call sym.std::sys::pal::windows::to_u16s::inner::hd316060f2068e1ae
mov rcx, qword [rbp - 0x28]
mov rax, qword [rbp - 0x20]
cmp rcx, r14
jne 0x14004da1e
mov qword [rbp - 8], rax
mov qword [rbp - 0x10], r14
jmp 0x14004da44
mov rdx, qword [rbp - 0x18]
mov qword [rbp - 0x40], rcx
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x30], rdx
lea rcx, [rbp - 0x10]
lea rdx, [rbp - 0x40]
call dbg.from_wide_to_user_path
mov rdi, qword [rbp - 0x10]
cmp rdi, r14
jne 0x14004da5d
lea rcx, [rbp - 8]
call dbg.drop_in_place<std::io::error::Error>
mov qword [rsi], r14
add rsp, 0x68
pop rbx
pop rdi
pop rsi
pop r14
pop r15
pop rbp
ret
mov rbx, qword [rbp - 8]
mov r15, qword [rbp]
mov rcx, rbx
call sub.KERNEL32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x14004da7f
mov qword [rsi], rdi
mov qword [rsi + 8], rbx
mov qword [rsi + 0x10], r15
jmp 0x14004da50
mov qword [rsi], r14
test rdi, rdi
je 0x14004da50
add rdi, rdi
mov r8d, 2
mov rcx, rbx
mov rdx, rdi
add rsp, 0x68
pop rbx
pop rdi
pop rsi
pop r14
pop r15
pop rbp
jmp sym.__rust_dealloc
Function at 0x14004f770
Capabilities:
Create thread

Disassembly:
push rbp
push r14
push rsi
push rdi
push rbx
sub rsp, 0x30
lea rbp, [rsp + 0x30]
mov rbx, r8
mov r14, rdx
mov rdi, rcx
mov rax, qword [str.1p_r_]
movzx eax, byte [rax]
mov ecx, 0x10
mov edx, 8
call sym.__rust_alloc
test rax, rax
je 0x14004f83a
mov rsi, rax
mov qword [rax], r14
mov qword [rax + 8], rbx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x10000
lea r8, [dbg.thread_start]
xor ebx, ebx
xor ecx, ecx
mov rdx, rdi
mov r9, rax
call sub.KERNEL32.dll_CreateThread
mov rdx, rax
test rax, rax
jne 0x14004f82c
mov rbx, qword [rsi]
mov r14, qword [rsi + 8]
mov rcx, rbx
call qword [r14]
mov rdx, qword [r14 + 8]
test rdx, rdx
je 0x14004f805
mov r8, qword [r14 + 0x10]
mov rcx, rbx
call sym.__rust_dealloc
mov edx, 0x10
mov r8d, 8
mov rcx, rsi
call sym.__rust_dealloc
call sub.KERNEL32.dll_GetLastError
mov edx, eax
shl rdx, 0x20
or rdx, 2
mov ebx, 1
mov rax, rbx
add rsp, 0x30
pop rbx
pop rdi
pop rsi
pop r14
pop rbp
ret
mov ecx, 8
mov edx, 0x10
call dbg.handle_alloc_error
ud2

Function at 0x14004fa70
Capabilities:
Allocate thread local storage

Disassembly:
push rbp
push rsi
push rdi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
mov rsi, rcx
cmp qword [rcx], 0
je 0x14004fb05
mov rax, qword [dbg.on_tls_callback]
mov dword [rbp], 0
lea rbx, [rsi + 0x10]
mov r8, rbp
mov rcx, rbx
xor edx, edx
xor r9d, r9d
call sub.KERNEL32.dll_InitOnceBeginInitialize
mov dword [rbp + 4], eax
cmp eax, 1
jne 0x14004fb44
cmp dword [rbp], 0
je 0x14004fb28
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x14004fb67
mov edi, eax
mov rax, qword [0x1400d7158]
nop word cs:[rax + rax]
mov qword [rsi + 8], rax
lock cmpxchg qword [0x1400d7158], rsi
jne 0x14004fae0
mov eax, edi
inc eax
mov dword [rsi + 0x18], eax
mov rcx, rbx
xor edx, edx
xor r8d, r8d
call sub.KERNEL32.dll_InitOnceComplete
jmp 0x14004fb39
call sub.KERNEL32.dll_TlsAlloc
mov dword [rbp + 4], eax
cmp eax, 0xffffffff
je 0x14004fba9
mov ecx, eax
inc ecx
xor eax, eax
lock cmpxchg dword [rsi + 0x18], ecx
jne 0x14004fb2d
mov edi, dword [rbp + 4]
jmp 0x14004fb39
mov edi, dword [rsi + 0x18]
jmp 0x14004fb37
mov edi, eax
mov ecx, dword [rbp + 4]
call sub.KERNEL32.dll_TlsFree
dec edi
mov eax, edi
add rsp, 0x58
pop rbx
pop rdi
pop rsi
pop rbp
ret
mov qword [rbp - 0x30], 0
lea rdx, [0x1400a6518]
lea r9, str.library_std_src_syspalwindows_thread_local_key.rs
lea rcx, [rbp + 4]
lea r8, [rbp - 0x30]
call dbg.assert_failed<i32, i32>
mov rcx, rbx
mov edx, 4
xor r8d, r8d
call sub.KERNEL32.dll_InitOnceComplete
lea rax, str.out_of_TLS_indexes
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], 1
mov qword [rbp - 0x20], 8
xorps xmm0, xmm0
movups xmmword [rbp - 0x18], xmm0
lea rdx, str.library_std_src_syspalwindows_thread_local_key.rs
lea rcx, [rbp - 0x30]
call dbg.panic_fmt
lea rax, str.out_of_TLS_indexes
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], 1
mov qword [rbp - 0x20], 8
xorps xmm0, xmm0
movups xmmword [rbp - 0x18], xmm0
lea rcx, [rbp + 4]
lea rdx, [rbp - 0x30]
call dbg.assert_failed<u32, u32>
int3
Function at 0x14004fbe0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push r14
push rsi
push rdi
push rbx
sub rsp, 0x20
lea rbp, [rsp + 0x20]
cmp edx, 3
je 0x14004fbfc
test edx, edx
jne 0x14004fd65
mov bl, 1
mov rdi, qword [0x1400d7158]
nop word cs:[rax + rax]
test rdi, rdi
je 0x14004fc50
mov esi, dword [rdi + 0x18]
mov r14, qword [rdi]
test r14, r14
je 0x14004fdba
mov rdi, qword [rdi + 8]
test esi, esi
je 0x14004fc10
dec esi
mov ecx, esi
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x14004fc10
xor ebx, ebx
mov ecx, esi
xor edx, edx
mov rsi, rax
call fcn.14009ab84
mov rcx, rsi
call r14
jmp 0x14004fc10
test bl, 1
jne 0x14004fd65
mov bl, 1
mov rdi, qword [0x1400d7158]
nop word cs:[rax + rax]
test rdi, rdi
je 0x14004fcb0
mov esi, dword [rdi + 0x18]
mov r14, qword [rdi]
test r14, r14
je 0x14004fdba
mov rdi, qword [rdi + 8]
test esi, esi
je 0x14004fc70
dec esi
mov ecx, esi
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x14004fc70
xor ebx, ebx
mov ecx, esi
xor edx, edx
mov rsi, rax
call fcn.14009ab84
mov rcx, rsi
call r14
jmp 0x14004fc70
test bl, 1
jne 0x14004fd65
mov bl, 1
mov rdi, qword [0x1400d7158]
nop word cs:[rax + rax]
test rdi, rdi
je 0x14004fd10
mov esi, dword [rdi + 0x18]
mov r14, qword [rdi]
test r14, r14
je 0x14004fdba
mov rdi, qword [rdi + 8]
test esi, esi
je 0x14004fcd0
dec esi
mov ecx, esi
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x14004fcd0
xor ebx, ebx
mov ecx, esi
xor edx, edx
mov rsi, rax
call fcn.14009ab84
mov rcx, rsi
call r14
jmp 0x14004fcd0
test bl, 1
jne 0x14004fd65
mov bl, 1
mov rdi, qword [0x1400d7158]
nop
test rdi, rdi
je 0x14004fd60
mov esi, dword [rdi + 0x18]
mov r14, qword [rdi]
test r14, r14
je 0x14004fdba
mov rdi, qword [rdi + 8]
test esi, esi
je 0x14004fd20
dec esi
mov ecx, esi
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x14004fd20
xor ebx, ebx
mov ecx, esi
xor edx, edx
mov rsi, rax
call fcn.14009ab84
mov rcx, rsi
call r14
jmp 0x14004fd20
test bl, 1
je 0x14004fd70
add rsp, 0x20
pop rbx
pop rdi
pop rsi
pop r14
pop rbp
ret
mov rbx, qword [0x1400d7158]
nop word [rax + rax]
test rbx, rbx
je 0x14004fd65
mov esi, dword [rbx + 0x18]
mov r14, qword [rbx]
test r14, r14
je 0x14004fdba
mov rbx, qword [rbx + 8]
test esi, esi
je 0x14004fd80
dec esi
mov ecx, esi
call sub.KERNEL32.dll_TlsGetValue
test rax, rax
je 0x14004fd80
mov rdi, rax
mov ecx, esi
xor edx, edx
call fcn.14009ab84
mov rcx, rdi
call r14
jmp 0x14004fd80
lea rcx, str.8l_n_
call sym.core::option::unwrap_failed::h511674c62460528b
ud2

Function at 0x140053930
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x70
lea rbp, [rsp + 0x70]
mov rdi, rcx
mov rsi, qword [rcx]
mov ecx, dword [rsi + 0x18]
test ecx, ecx
je 0x14005394d
dec ecx
jmp 0x140053957
mov rcx, rsi
call dbg.init
mov ecx, eax
mov edx, 1
call fcn.14009ab84
mov edx, 0x10
mov r8d, 8
mov rcx, rdi
call sym.__rust_dealloc
mov ecx, dword [rsi + 0x18]
test ecx, ecx
je 0x14005397f
dec ecx
jmp 0x140053989
mov rcx, rsi
call dbg.init
mov ecx, eax
xor edx, edx
add rsp, 0x70
pop rdi
pop rsi
pop rbp
jmp fcn.14009ab84
Function at 0x140053a30
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x70
lea rbp, [rsp + 0x70]
mov qword [rbp - 0x18], rcx
mov rsi, qword [rcx]
mov ecx, dword [rsi + 0x18]
test ecx, ecx
je 0x140053a4e
dec ecx
jmp 0x140053a58
mov rcx, rsi
call dbg.init
mov ecx, eax
mov edx, 1
call fcn.14009ab84
mov rcx, qword [rbp - 0x18]
cmp qword [rcx + 8], 0
je 0x140053a8e
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x140053a8e
lock dec qword [rax]
jne 0x140053a8e
lea rax, [rcx + 0x10]
mov rdi, rcx
mov rcx, rax
call dbg.drop_slow<std::sync::mpmc::context::Inner, alloc::alloc::Global>
mov rcx, rdi
mov edx, 0x18
mov r8d, 8
call sym.__rust_dealloc
mov ecx, dword [rsi + 0x18]
test ecx, ecx
je 0x140053aa9
dec ecx
jmp 0x140053ab3
mov rcx, rsi
call dbg.init
mov ecx, eax
xor edx, edx
call fcn.14009ab84
nop
add rsp, 0x70
pop rdi
pop rsi
pop rbp
ret

Function at 0x140053b40
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x70
lea rbp, [rsp + 0x70]
mov qword [rbp - 0x18], rcx
mov rsi, qword [rcx]
mov ecx, dword [rsi + 0x18]
test ecx, ecx
je 0x140053b5e
dec ecx
jmp 0x140053b68
mov rcx, rsi
call dbg.init
mov ecx, eax
mov edx, 1
call fcn.14009ab84
mov rcx, qword [rbp - 0x18]
cmp qword [rcx + 8], 0
je 0x140053b9e
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x140053b9e
lock dec qword [rax]
jne 0x140053b9e
lea rax, [rcx + 0x10]
mov rdi, rcx
mov rcx, rax
call dbg.drop_slow<std::thread::Inner, alloc::alloc::Global>
mov rcx, rdi
mov edx, 0x18
mov r8d, 8
call sym.__rust_dealloc
mov ecx, dword [rsi + 0x18]
test ecx, ecx
je 0x140053bb9
dec ecx
jmp 0x140053bc3
mov rcx, rsi
call dbg.init
mov ecx, eax
xor edx, edx
call fcn.14009ab84
nop
add rsp, 0x70
pop rdi
pop rsi
pop rbp
ret

Function at 0x140053c50
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x70
lea rbp, [rsp + 0x70]
mov rdi, rcx
mov rsi, qword [rcx]
mov ecx, dword [rsi + 0x18]
test ecx, ecx
je 0x140053c6d
dec ecx
jmp 0x140053c77
mov rcx, rsi
call dbg.init
mov ecx, eax
mov edx, 1
call fcn.14009ab84
mov edx, 0x20
mov r8d, 8
mov rcx, rdi
call sym.__rust_dealloc
mov ecx, dword [rsi + 0x18]
test ecx, ecx
je 0x140053c9f
dec ecx
jmp 0x140053ca9
mov rcx, rsi
call dbg.init
mov ecx, eax
xor edx, edx
add rsp, 0x70
pop rdi
pop rsi
pop rbp
jmp fcn.14009ab84
Function at 0x140053d50
Capabilities:
Set thread local storage value

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x70
lea rbp, [rsp + 0x70]
mov qword [rbp - 0x18], rcx
mov rsi, qword [rcx]
mov ecx, dword [rsi + 0x18]
test ecx, ecx
je 0x140053d6e
dec ecx
jmp 0x140053d78
mov rcx, rsi
call dbg.init
mov ecx, eax
mov edx, 1
call fcn.14009ab84
mov rcx, qword [rbp - 0x18]
cmp qword [rcx + 8], 0
je 0x140053dae
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x140053dae
lock dec qword [rax]
jne 0x140053dae
lea rax, [rcx + 0x10]
mov rdi, rcx
mov rcx, rax
call dbg.drop_slow<std::sync::mutex::Mutex<alloc::vec::Vec<u8, alloc::alloc::Global>>, alloc::alloc::Global>
mov rcx, rdi
mov edx, 0x18
mov r8d, 8
call sym.__rust_dealloc
mov ecx, dword [rsi + 0x18]
test ecx, ecx
je 0x140053dc9
dec ecx
jmp 0x140053dd3
mov rcx, rsi
call dbg.init
mov ecx, eax
xor edx, edx
call fcn.14009ab84
nop
add rsp, 0x70
pop rdi
pop rsi
pop rbp
ret

Function at 0x1400540b0
Capabilities:
Resolve dns

Disassembly:
push rbp
push rsi
push rdi
push rbx
sub rsp, 0x208
lea rbp, [rsp + 0x80]
mov rax, rdx
mov rsi, rcx
mov rdx, qword [rdx]
mov rdi, qword [rax + 8]
movzx eax, word [rax + 0x10]
mov word [rbp + 0x186], ax
mov rax, qword [0x1400d7138]
cmp rax, 3
jne 0x1400541e0
lea rax, [rbp + 0x186]
mov qword [rbp + 0x170], rax
cmp rdi, 0x17f
ja 0x140054206
lea rbx, [rbp - 0x60]
mov rcx, rbx
mov r8, rdi
call sym.memcpy
mov byte [rbp + rdi - 0x60], 0
inc rdi
lea rcx, [rbp + 0x158]
mov rdx, rbx
mov r8, rdi
call dbg.from_bytes_with_nul
cmp qword [rbp + 0x158], 0
je 0x140054151
lea rax, str.xN_n_
mov qword [rsi + 8], rax
mov qword [rsi], 1
jmp 0x1400541d1
mov rcx, qword [rbp + 0x160]
xorps xmm0, xmm0
movaps xmmword [rbp + 0x120], xmm0
movaps xmmword [rbp + 0x140], xmm0
movaps xmmword [rbp + 0x130], xmm0
mov dword [rbp + 0x128], 1
mov qword [rbp + 0x178], 0
lea r8, [rbp + 0x120]
lea r9, [rbp + 0x178]
xor edx, edx
call sub.WS2_32.dll_getaddrinfo
test eax, eax
je 0x1400541b2
call sub.WS2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
mov ecx, 1
jmp 0x1400541ca
mov rax, qword [rbp + 0x178]
movzx ecx, word [rbp + 0x186]
mov qword [rsi + 0x10], rax
mov word [rsi + 0x18], cx
xor ecx, ecx
mov qword [rsi + 8], rax
mov qword [rsi], rcx
mov rax, rsi
add rsp, 0x208
pop rbx
pop rdi
pop rsi
pop rbp
ret
mov rbx, rdx
call dbg.initialize<unsafe extern "system" fn() -> i32, std::sync::once_lock::{impl#0}::get_or_init::{closure_env#0}<unsafe extern "system" fn() -> i32, std::sys::pal::windows::net::init::{closure_env#0}>, !>
mov rdx, rbx
lea rax, [rbp + 0x186]
mov qword [rbp + 0x170], rax
cmp rdi, 0x17f
jbe 0x140054107
lea r9, [rbp + 0x170]
mov rcx, rsi
mov r8, rdi
call dbg.run_with_cstr_allocating<std::sys_common::net::LookupHost>
jmp 0x1400541d1
Function at 0x140054220
Capabilities:
Connect socket

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x40
lea rbp, [rsp + 0x40]
mov eax, 1
test rcx, rcx
jne 0x1400542d2
mov rax, qword [0x1400d7138]
cmp rax, 3
jne 0x1400542f9
mov rsi, rdx
mov rcx, rdx
mov edx, 1
call sym.std::sys::pal::windows::net::Socket::new::h2d77d392e9ed8975
test rax, rax
je 0x140054267
mov eax, 1
jmp 0x1400542d2
cmp word [rsi], 0
je 0x140054289
movups xmm0, xmmword [rsi + 4]
mov eax, dword [rsi + 0x14]
mov r9d, dword [rsi + 0x18]
movzx ecx, word [rsi + 0x1c]
mov r8d, 0x1c
mov r10w, 0x17
jmp 0x14005429e
mov eax, dword [rsi + 2]
movzx ecx, word [rsi + 6]
xorps xmm0, xmm0
mov r8d, 0x10
mov r10w, 2
rol cx, 8
mov word [rbp - 0x1c], r10w
mov word [rbp - 0x1a], cx
mov dword [rbp - 0x18], eax
movups xmmword [rbp - 0x14], xmm0
mov dword [rbp - 4], r9d
lea rax, [rbp - 0x1c]
mov rsi, rdx
mov rcx, rdx
mov rdx, rax
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
je 0x1400542da
xor eax, eax
mov rdx, rsi
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret
call sub.WS2_32.dll_WSAGetLastError
mov edi, eax
shl rdi, 0x20
or rdi, 2
mov rcx, rsi
call sub.WS2_32.dll_closesocket
mov rdx, rdi
jmp 0x140054260
mov rsi, rdx
call dbg.initialize<unsafe extern "system" fn() -> i32, std::sync::once_lock::{impl#0}::get_or_init::{closure_env#0}<unsafe extern "system" fn() -> i32, std::sys::pal::windows::net::init::{closure_env#0}>, !>
mov rdx, rsi
jmp 0x14005424b
Function at 0x140054660
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push rbp
push rsi
sub rsp, 0xb8
lea rbp, [rsp + 0x80]
mov rax, rdx
mov rsi, rcx
xorps xmm0, xmm0
movaps xmmword [rbp + 0x10], xmm0
movaps xmmword [rbp], xmm0
movaps xmmword [rbp - 0x10], xmm0
movaps xmmword [rbp - 0x20], xmm0
movaps xmmword [rbp - 0x30], xmm0
movaps xmmword [rbp - 0x40], xmm0
movaps xmmword [rbp - 0x50], xmm0
movaps xmmword [rbp - 0x60], xmm0
mov dword [rbp + 0x34], pe_nt_image_headers64
lea rdx, [rbp - 0x60]
lea r8, [rbp + 0x34]
mov rcx, rax
call sub.WS2_32.dll_getsockname
cmp eax, 0xffffffff
je 0x140054709
mov eax, dword [rbp + 0x34]
movzx ecx, word [rbp - 0x60]
cmp ecx, 2
je 0x140054718
cmp ecx, 0x17
jne 0x140054736
cmp eax, 0x1b
jbe 0x140054750
movzx eax, word [rbp - 0x5e]
rol ax, 8
mov ecx, dword [rbp - 0x5c]
mov edx, dword [rbp - 0x48]
movups xmm0, xmmword [rbp - 0x58]
movups xmmword [rbp + 0x24], xmm0
mov word [rsi], 1
movups xmm0, xmmword [rbp + 0x22]
movups xmmword [rsi + 2], xmm0
movzx r8d, word [rbp + 0x32]
mov word [rsi + 0x12], r8w
mov dword [rsi + 0x14], ecx
mov dword [rsi + 0x18], edx
mov word [rsi + 0x1c], ax
jmp 0x140054746
call sub.WS2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
jmp 0x14005473d
cmp eax, 0xf
jbe 0x140054768
movzx eax, word [rbp - 0x5e]
rol ax, 8
mov ecx, dword [rbp - 0x5c]
mov word [rsi], 0
mov word [rsi + 6], ax
mov dword [rsi + 2], ecx
jmp 0x140054746
lea rax, str.invalid_argument
mov qword [rsi + 8], rax
mov word [rsi], 2
add rsp, 0xb8
pop rsi
pop rbp
ret
lea rcx, str.assertion_failed:_len___mem::size_of::_c::sockaddr_in6___
lea r8, str.library_std_src_sys_common_net.rsassertion_failed:_len___mem::size_of::_c::sockaddr_in___
mov edx, 0x3a
call dbg.panic
lea rcx, [0x1400a7231]
lea r8, str.library_std_src_sys_common_net.rsassertion_failed:_len___mem::size_of::_c::sockaddr_in___
mov edx, 0x39
call dbg.panic
int3

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

Disassembly:
push rbp
push rsi
sub rsp, 0x58
lea rbp, [rsp + 0x50]
mov rax, r8
cmp r8, 0x7fffffff
mov r8d, 0x7fffffff
cmovb r8, rax
cmp word [r9], 0
je 0x140054984
movups xmm0, xmmword [r9 + 4]
mov eax, dword [r9 + 0x14]
mov r11d, dword [r9 + 0x18]
movzx r10d, word [r9 + 0x1c]
mov r9d, 0x1c
mov si, 0x17
jmp 0x14005499a
mov eax, dword [r9 + 2]
movzx r10d, word [r9 + 6]
xorps xmm0, xmm0
mov r9d, 0x10
mov si, 2
rol r10w, 8
mov word [rbp - 0x14], si
mov word [rbp - 0x12], r10w
mov dword [rbp - 0x10], eax
movups xmmword [rbp - 0xc], xmm0
mov dword [rbp + 4], r11d
mov rcx, qword [rcx]
mov dword [rsp + 0x28], r9d
lea rax, [rbp - 0x14]
mov qword [rsp + 0x20], rax
xor r9d, r9d
call sub.WS2_32.dll_sendto
cmp eax, 0xffffffff
je 0x1400549d8
movsxd rdx, eax
xor eax, eax
jmp 0x1400549ec
call sub.WS2_32.dll_WSAGetLastError
mov edx, eax
shl rdx, 0x20
or rdx, 2
mov eax, 1
add rsp, 0x58
pop rsi
pop rbp
ret
Function at 0x140054a00
Capabilities:
Connect socket

Disassembly:
push rbp
sub rsp, 0x40
lea rbp, [rsp + 0x40]
mov rax, r8
test rdx, rdx
je 0x140054a18
add rsp, 0x40
pop rbp
ret
cmp word [rax], 0
je 0x140054a3a
movups xmm0, xmmword [rax + 4]
mov edx, dword [rax + 0x14]
mov r9d, dword [rax + 0x18]
movzx eax, word [rax + 0x1c]
mov r8d, 0x1c
mov r10w, 0x17
jmp 0x140054a4f
mov edx, dword [rax + 2]
movzx eax, word [rax + 6]
xorps xmm0, xmm0
mov r8d, 0x10
mov r10w, 2
rol ax, 8
mov word [rbp - 0x1c], r10w
mov word [rbp - 0x1a], ax
mov dword [rbp - 0x18], edx
movups xmmword [rbp - 0x14], xmm0
mov dword [rbp - 4], r9d
mov rcx, qword [rcx]
lea rdx, [rbp - 0x1c]
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
je 0x140054a80
xor eax, eax
add rsp, 0x40
pop rbp
ret
call sub.WS2_32.dll_WSAGetLastError
shl rax, 0x20
or rax, 2
add rsp, 0x40
pop rbp
ret
Function at 0x1400590e0
Capabilities:
Read file via mapping

Disassembly:
push rbp
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0xd0
lea rbp, [rsp + 0x80]
mov rax, r8
mov rsi, rcx
mov dword [rbp + 8], 0
xorps xmm0, xmm0
movups xmmword [rbp + 0x10], xmm0
mov dword [rbp + 0x20], 7
mov qword [rbp + 0x24], 0
mov word [rbp + 0x2c], 0
mov byte [rbp + 0x28], 1
lea r8, [rbp + 8]
mov rcx, rdx
mov rdx, rax
call dbg.open
mov rdi, rdx
test rax, rax
je 0x140059167
mov qword [rbp - 0x40], rax
lea rcx, [rbp - 0x38]
mov qword [rbp - 0x38], rdi
call dbg.drop_in_place<std::io::error::Error>
mov qword [rsi], 0
add rsp, 0xd0
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
pop rbp
ret
lea rcx, [rbp + 8]
mov rdx, rdi
call dbg.file_attr
cmp dword [rbp + 8], 2
jne 0x14005918b
mov rax, qword [rbp + 0x10]
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x40], 2
jmp 0x1400591ba
movups xmm0, xmmword [rbp + 8]
movups xmm1, xmmword [rbp + 0x18]
movups xmm2, xmmword [rbp + 0x28]
movups xmm3, xmmword [rbp + 0x38]
movaps xmmword [rbp - 0x40], xmm0
mov rax, qword [rbp + 0x48]
mov qword [rbp], rax
movaps xmmword [rbp - 0x10], xmm3
movaps xmmword [rbp - 0x20], xmm2
movaps xmmword [rbp - 0x30], xmm1
cmp qword [rbp - 0x40], 2
jne 0x1400591e3
lea rcx, [rbp - 0x38]
call dbg.drop_in_place<std::io::error::Error>
mov qword [rsi], 0
mov rcx, rdi
add rsp, 0xd0
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
pop rbp
jmp sub.KERNEL32.dll_CloseHandle
mov r12, qword [rbp - 8]
test rdi, rdi
je 0x140059231
mov qword [rbp - 0x40], 0
call sub.KERNEL32.dll_GetCurrentProcess
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
lea r9, [rbp - 0x40]
mov rcx, rax
mov rdx, rdi
mov r8, rax
call sub.KERNEL32.dll_DuplicateHandle
test eax, eax
je 0x1400592ad
mov rbx, qword [rbp - 0x40]
jmp 0x140059233
xor ebx, ebx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov rcx, rbx
xor edx, edx
mov r8d, 2
xor r9d, r9d
call sub.KERNEL32.dll_CreateFileMappingA
test rax, rax
je 0x14005929c
mov r14, rax
mov qword [rsp + 0x20], r12
mov rcx, rax
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call sub.KERNEL32.dll_MapViewOfFile
mov r15, rax
mov rcx, r14
call sub.KERNEL32.dll_CloseHandle
test r15, r15
je 0x14005929c
mov qword [rsi + 8], rbx
mov qword [rsi + 0x10], r15
mov qword [rsi + 0x18], r12
mov qword [rsi], 1
jmp 0x1400592d6
mov qword [rsi], 0
mov rcx, rbx
call sub.KERNEL32.dll_CloseHandle
jmp 0x1400592d6
call sub.KERNEL32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rbp + 8], 1
lea rcx, [rbp + 0x10]
mov qword [rbp + 0x10], rax
call dbg.drop_in_place<std::io::error::Error>
mov qword [rsi], 0
mov rcx, rdi
call sub.KERNEL32.dll_CloseHandle
jmp 0x140059155
Function at 0x14005b140
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x20
lea rbp, [rsp + 0x20]
mov rsi, rcx
mov ecx, dword [0x14009d070]
test ecx, ecx
je 0x14005b176
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jb 0x14005b18f
cmp qword [rax + 8], 0
je 0x14005b18f
add rax, 0x10
jmp 0x14005b25a
lea rcx, dbg.destroy_value_core::cell::Cell__usize__bool___
call dbg.init
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 2
jae 0x14005b166
mov ecx, dword [0x14009d070]
test ecx, ecx
je 0x14005b23b
dec ecx
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
je 0x14005b258
test rax, rax
jne 0x14005b201
mov rax, qword [str.1p_r_]
movzx eax, byte [rax]
mov ecx, 0x20
mov edx, 8
call sym.__rust_alloc
test rax, rax
je 0x14005b27b
lea rcx, dbg.destroy_value_core::cell::Cell__usize__bool___
mov qword [rax], rcx
mov qword [rax + 8], 0
mov ecx, dword [0x14009d070]
test ecx, ecx
je 0x14005b262
dec ecx
mov rdx, rax
mov rdi, rax
call fcn.14009ab84
mov rax, rdi
xor ecx, ecx
test rsi, rsi
je 0x14005b221
mov rdx, qword [rsi]
mov qword [rsi], 0
cmp rdx, 1
jne 0x14005b221
mov rdx, qword [rsi + 8]
mov ecx, dword [rsi + 0x10]
jmp 0x14005b223
xor edx, edx
mov qword [rax + 8], 1
lea r8, [rax + 0x10]
mov qword [rax + 0x10], rdx
mov byte [rax + 0x18], cl
mov rax, r8
jmp 0x14005b25a
lea rcx, dbg.destroy_value_core::cell::Cell__usize__bool___
call dbg.init
mov ecx, eax
call sub.KERNEL32.dll_TlsGetValue
cmp rax, 1
jne 0x14005b1ae
xor eax, eax
add rsp, 0x20
pop rdi
pop rsi
pop rbp
ret
lea rcx, dbg.destroy_value_core::cell::Cell__usize__bool___
mov rdi, rax
call dbg.init
mov ecx, eax
mov rax, rdi
jmp 0x14005b1f3
mov ecx, 8
mov edx, 0x20
call dbg.handle_alloc_error
int3