joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14001c320
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
lea rbp, [0x1400bc178]
mov rsi, rcx
mov rcx, rbp
mov rdi, rdx
call sym.pthread_mutex_lock
mov rcx, rsi
call sym.__pthread_get_pointer
mov rbx, rax
test rax, rax
je 0x14001c440
mov rcx, qword [rax + 0x28]
test rcx, rcx
je 0x14001c440
lea rdx, [rsp + 0x2c]
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x14001c440
test byte [rbx + 0x44], 4
jne 0x14001c460
call sym._pthread_once_raw.constprop.0.isra.0
mov ecx, dword [0x1400bc188]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
test rax, rax
je 0x14001c4a0
mov rdx, qword [rax + 0x1d8]
cmp rsi, rdx
je 0x14001c4e0
mov edx, dword [rbx + 0xbc]
mov rcx, qword [rbx + 0x28]
test edx, edx
jne 0x14001c3c7
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x14001c480
mov rcx, qword [rbx + 0x28]
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rsi
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14001c3db
call rsi
mov qword [rbx + 0x30], 0
test rdi, rdi
je 0x14001c4b8
mov rax, qword [rbx + 8]
lea rcx, [rbx + 0x38]
mov qword [rdi], rax
call sym.pthread_mutex_destroy
lea rcx, [rbx + 0x68]
call sym.pthread_spin_destroy
cmp eax, 1
je 0x14001c4f2
cmp qword [rbx + 0x1d0], 0
mov qword [rbx + 0x68], 0xffffffffffffffff
je 0x14001c4d0
mov rcx, rbp
call sym.pthread_mutex_unlock
xor eax, eax
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rcx, rbp
call sym.pthread_mutex_unlock
mov eax, 3
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rcx, rbp
call sym.pthread_mutex_unlock
mov eax, 0x16
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov eax, dword [rbx + 0xbc]
test eax, eax
jne 0x14001c3c3
mov rcx, rbp
call sym.pthread_mutex_unlock
mov eax, 0x10
jmp 0x14001c42e
call sym.__pthread_self_lite.part.0
xor edx, edx
test rax, rax
jne 0x14001c395
jmp 0x14001c39c
lea rcx, [rbx + 0x38]
call sym.pthread_mutex_destroy
lea rcx, [rbx + 0x68]
jmp 0x14001c400
mov rcx, rbx
call sym.push_pthread_mem.part.0
jmp 0x14001c424
mov rcx, rbp
call sym.pthread_mutex_unlock
mov eax, 0x24
jmp 0x14001c42e
call sym.replace_spin_keys.part.0
nop
nop dword [rax + rax]

Function at 0x14001f6c0
Capabilities:
Read file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov r9, qword [rcx + 0x40]
mov rsi, rdx
mov rbx, rcx
mov edx, 1
mov rcx, rsi
call sym.fread
mov edx, 0xffffffff
test rax, rax
jle 0x14001f6ec
movzx edx, byte [rsi + rax - 1]
mov dword [rbx + 0x48], edx
add rsp, 0x28
pop rbx
pop rsi
ret
Function at 0x140020310
Capabilities:
Write file on windows

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
cmp byte [0x1400beef0], 0
jne 0x140020413
mov byte [0x1400beef0], 1
call sym.__cxa_current_exception_type
test rax, rax
je 0x1400203e8
mov rbx, qword [rax + 8]
xor eax, eax
lea r9, [rsp + 0x2c]
cmp byte [rbx], 0x2a
mov dword [rsp + 0x2c], 0xffffffff
sete al
xor r8d, r8d
xor edx, edx
add rbx, rax
mov rcx, rbx
call sym.__cxa_demangle
mov ecx, 2
mov rsi, qword [sym.__acrt_iob_func]
mov rdi, rax
call rsi
mov edx, 1
lea rcx, str.terminate_called_after_throwing_an_instance_of_
mov r8d, 0x30
mov r9, rax
call sym.fwrite
mov edx, dword [rsp + 0x2c]
mov ecx, 2
test edx, edx
je 0x1400203d9
call rsi
mov rcx, rbx
mov rdx, rax
call sym.fputs
mov ecx, 2
call rsi
mov r8d, 2
mov edx, 1
lea rcx, [0x1400bf311]
mov r9, rax
call sym.fwrite
mov eax, dword [rsp + 0x2c]
test eax, eax
jne 0x1400b97b7
jmp 0x1400b97af
call rsi
mov rcx, rdi
mov rdx, rax
call sym.fputs
jmp 0x1400203a7
mov ecx, 2
call qword [sym.__acrt_iob_func]
mov r8d, 0x2d
mov edx, 1
lea rcx, str.terminate_called_without_an_active_exception_n
mov r9, rax
call sym.fwrite
nop
jmp 0x1400b97aa
mov ecx, 2
call qword [sym.__acrt_iob_func]
mov r8d, 0x1d
mov edx, 1
lea rcx, str.terminate_called_recursively_n
mov r9, rax
call sym.fwrite
call sym.abort
nop
nop
nop

Function at 0x14007f6f0
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12, qword [sym.imp.msvcrt.dll__errno]
mov rdi, rcx
mov rsi, rdx
mov ebx, r8d
mov rcx, qword [rdi]
call sym.fileno
mov ecx, eax
mov r8d, ebx
mov rdx, rsi
call sym.read
movsxd rbp, eax
cmp eax, 0xffffffff
je 0x14007f738
mov rax, rbp
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call r12
cmp dword [rax], 4
je 0x14007f70a
mov rax, rbp
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x140092060
Capabilities:
Read file on windows

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rax, qword [rcx + 8]
mov rdi, rcx
test rax, rax
je 0x140092088
mov rcx, qword [rcx]
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax
mov rbp, qword [sym.imp.msvcrt.dll__errno]
mov ebx, 4
lea rsi, [rsp + 0x2c]
nop dword [rax]
mov ecx, dword [rdi + 0x10]
mov r8d, ebx
mov rdx, rsi
call sym.read
test eax, eax
jle 0x1400920d0
cdqe
add rsi, rax
sub rbx, rax
jne 0x1400920a0
mov eax, dword [rsp + 0x2c]
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp eax, 0xffffffff
jne 0x1400920dc
call rbp
cmp dword [rax], 4
je 0x1400920a0
lea rcx, str.random_device_could_not_be_read
call method.std.__throw_runtime_error_char_const_
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x1400b9410
Capabilities:
Query environment variable

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
xor edx, edx
lea rcx, [0x1400bc7a0]
movabs rdi, 0x2e78786362696c67
movabs r12, 0x6c6f6f705f68652e
call sym.pthread_mutex_init
pxor xmm0, xmm0
lea rcx, str.GLIBCXX_TUNABLES
mov qword [0x1400bc7b8], 0
movups xmmword [0x1400bc7a8], xmm0
call sym.getenv
mov dword [rsp + 0x40], 0
mov rbx, rax
lea rax, str.obj_size
mov qword [rsp + 0x30], 8
mov qword [rsp + 0x38], rax
lea rax, str.obj_count
mov qword [rsp + 0x48], 9
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x58], 0x100
test rbx, rbx
jne 0x1400b94c5
jmp 0x1400b956f
mov rcx, rbx
mov edx, 0x3a
call sym.strchr
mov rbx, rax
test rax, rax
je 0x1400b9520
xor eax, eax
cmp byte [rbx], 0x3a
sete al
add rbx, rax
cmp qword [rbx], rdi
jne 0x1400b94b0
cmp qword [rbx + 7], r12
jne 0x1400b94b0
cmp byte [rbx + 0xf], 0x2e
jne 0x1400b94b0
add rbx, 0x10
lea rbp, [rsp + 0x30]
lea r13, [rsp + 0x60]
mov rsi, qword [rbp]
mov rcx, qword [rbp + 8]
test rsi, rsi
je 0x1400b950b
mov r8, rsi
mov rdx, rbx
call sym.memcmp
test eax, eax
jne 0x1400b9515
cmp byte [rbx + rsi], 0x3d
je 0x1400b95a5
add rbp, 0x18
cmp rbp, r13
jne 0x1400b94ef
jmp 0x1400b94b0
mov eax, dword [rsp + 0x58]
mov edx, 0x1000
mov ecx, 6
cmp eax, edx
cmovle edx, eax
mov eax, dword [rsp + 0x40]
test eax, eax
cmove eax, ecx
movsxd rbx, eax
movsxd rax, edx
add rbx, 0x26
imul rbx, rax
shl rbx, 3
mov qword [0x1400bc7b8], rbx
jne 0x1400b957f
lea rcx, [sym.__tcf_0]
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp sym.atexit
mov qword [0x1400bc7b8], 0x16000
mov ebx, 0x16000
mov rcx, rbx
call sym.malloc
mov qword [0x1400bc7b0], rax
test rax, rax
je 0x1400b95dc
xor edx, edx
mov qword [0x1400bc7a8], rax
mov qword [rax], rbx
mov qword [rax + 8], rdx
jmp 0x1400b9557
lea rdx, [rsp + 0x28]
lea rcx, [rbx + rsi + 1]
xor r8d, r8d
call sym.strtoul
mov rbx, qword [rsp + 0x28]
movzx edx, byte [rbx]
cmp dl, 0x3a
je 0x1400b95cc
test dl, dl
jne 0x1400b94b0
test eax, eax
js 0x1400b94b0
mov dword [rbp + 0x10], eax
jmp 0x1400b94b0
xor ecx, ecx
mov qword [0x1400bc7b8], rcx
jmp 0x1400b9557

Function at 0x1400b9740
Capabilities:
Write file on windows

Disassembly:
nop
mov rcx, rax
mov rax, rdx
sub rax, 1
jne 0x1400b97bc
call sym.__cxa_begin_catch
mov rcx, rax
mov rax, qword [rax]
call qword [rax + 0x10]
mov ecx, 2
mov rbx, rax
call rsi
mov r9, rax
mov r8d, 0xb
mov edx, 1
lea rcx, str.__what__:
call sym.fwrite
mov ecx, 2
call rsi
mov rdx, rax
mov rcx, rbx
call sym.fputs
mov ecx, 2
call rsi
mov rdx, rax
mov ecx, 0xa
call sym.fputc
call sym.__cxa_end_catch
call sym.abort
mov rcx, rdi
call sym.free
call sym.__cxa_rethrow
call sym.__cxa_begin_catch
call sym.__cxa_end_catch
jmp 0x1400b97aa
Function at 0x140001e44
Capabilities:
Hash data using fnv

Disassembly:
mov r9, qword [rcx + 8]
mov r8d, 0x811c9dc5
jmp 0x140001e60
inc r9
movsx eax, byte [r9]
imul ecx, eax, 0x1000193
xor r8d, ecx
cmp byte [r9], 0
jne 0x140001e50
mov dword [rdx], r8d
mov rax, rdx
ret

Function at 0x14000227c
Capabilities:
Accept command line arguments

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rcx, rax
lea rdx, [0x14001d084]
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
movsxd rcx, dword [0x14001d084]
mov rdi, rax
shl rcx, 3
call qword [sym.imp.msvcrt.dll_malloc]
xor r14d, r14d
mov qword [0x14001d088], rax
cmp dword [0x14001d084], r14d
mov ebp, r14d
jle 0x140002322
mov rsi, rdi
mov rax, qword [rsi]
or rbx, 0xffffffffffffffff
inc rbx
cmp word [rax + rbx*2], r14w
jne 0x1400022df
lea rcx, [rbx + 1]
call qword [sym.imp.msvcrt.dll_malloc]
mov rcx, qword [0x14001d088]
lea r8, [rbx + 1]
mov rdx, rsi
sub rdx, rdi
mov qword [rdx + rcx], rax
mov rcx, rax
mov rdx, qword [rsi]
call qword [sym.imp.msvcrt.dll_wcstombs]
inc ebp
add rsi, 8
cmp ebp, dword [0x14001d084]
jl 0x1400022d8
mov rcx, rdi
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
jmp qword [sym.imp.KERNEL32.dll_LocalFree]

Function at 0x14000237c
Capabilities:
Encode data using base64 via winapi

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rcx
push rdi
sub rsp, 0x40
mov qword [r11 - 0x10], 0xfffffffffffffffe
mov qword [r11 + 0x18], rbx
mov rbx, rdx
mov rdi, rcx
xor eax, eax
mov dword [rsp + 0x30], eax
mov qword [rcx + 8], rax
mov qword [rcx + 0x10], rax
mov qword [rcx + 0x18], rax
mov dword [rsp + 0x30], 1
mov qword [r11 + 0x10], rax
mov edx, dword [rdx + 8]
sub edx, dword [rbx]
lea rax, [r11 + 0x10]
mov qword [r11 - 0x28], rax
xor r9d, r9d
mov r8d, 0x4000000c
mov rcx, qword [rbx]
call qword [sym.imp.CRYPT32.dll_CryptBinaryToStringA]
mov rdx, qword [rsp + 0x58]
dec rdx
mov rcx, rdi
call fcn.140001bd0
mov r9, qword [rdi + 8]
mov rdx, qword [rbx + 8]
sub rdx, qword [rbx]
mov rax, r9
neg rax
sbb r10, r10
and qword [rsp + 0x58], r10
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r8d, 0x4000000c
mov rcx, qword [rbx]
call qword [sym.imp.CRYPT32.dll_CryptBinaryToStringA]
mov rax, rdi
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
ret
Function at 0x1400024a8
Capabilities:
Decode data using base64 via winapi

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rdi
sub rsp, 0x50
mov qword [rax - 0x10], 0xfffffffffffffffe
mov qword [rax + 0x20], rbx
mov rbx, rdx
mov rdi, rcx
and dword [rax - 0x18], 0
and qword [rcx + 8], 0
and qword [rcx + 0x10], 0
and qword [rcx + 0x18], 0
mov dword [rax - 0x18], 1
and qword [rax + 0x18], 0
mov edx, dword [rdx + 8]
sub edx, dword [rbx]
and qword [rax - 0x28], 0
and qword [rax - 0x30], 0
lea rax, [rax + 0x18]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8d, [r9 + 6]
mov rcx, qword [rbx]
call qword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
mov byte [rsp + 0x68], 0
lea r8, [rsp + 0x68]
mov rdx, qword [rsp + 0x70]
mov rcx, rdi
call fcn.140002428
mov r9, qword [rdi + 8]
mov rdx, qword [rbx + 8]
sub rdx, qword [rbx]
mov rax, r9
neg rax
sbb r10, r10
and qword [rsp + 0x70], r10
and qword [rsp + 0x30], 0
and qword [rsp + 0x28], 0
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov r8d, 6
mov rcx, qword [rbx]
call qword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
mov rax, rdi
mov rbx, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
ret

Function at 0x140002574
Capabilities:
Generate random numbers via winapi

Disassembly:
mov qword [rsp + 0x10], rdx
push rbx
sub rsp, 0x30
mov qword [rsp + 0x28], 0xfffffffffffffffe
mov rbx, rdx
and dword [rsp + 0x20], 0
mov rdx, r8
mov rcx, rbx
call fcn.1400025c4
mov dword [rsp + 0x20], 1
mov r8, qword [rbx + 8]
mov rdx, qword [rbx + 0x10]
sub edx, r8d
mov rcx, qword [0x14001d0c0]
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
mov rax, rbx
add rsp, 0x30
pop rbx
ret
Function at 0x1400027b0
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x38
xorps xmm0, xmm0
lea rcx, [0x140013740]
xorps xmm1, xmm1
movdqa xmmword [0x14001d100], xmm0
xor r8d, r8d
movdqa xmmword [0x14001d110], xmm1
xor edx, edx
movdqa xmmword [0x14001d120], xmm0
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x1400027f5
lea rcx, [0x140013750]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
xor r9d, r9d
lea rdx, [0x140013760]
xor r8d, r8d
lea rcx, [0x14001d0d0]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
mov rcx, qword [0x14001d0d0]
lea r8, [0x140013768]
and dword [rsp + 0x20], 0
lea rdx, [0x140013788]
mov r9d, 0x20
call qword [sym.imp.bcrypt.dll_BCryptSetProperty]
xor r9d, r9d
lea rdx, [0x140013760]
xor r8d, r8d
lea rcx, [0x14001d0d8]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
mov rcx, qword [0x14001d0d8]
lea r8, [0x1400137a8]
and dword [rsp + 0x20], 0
lea rdx, [0x140013788]
mov r9d, 0x20
call qword [sym.imp.bcrypt.dll_BCryptSetProperty]
mov rax, qword [0x14001d0d8]
lea rdx, [0x1400137c8]
and qword [0x14001d0f0], 0
lea rcx, [0x14001d100]
xorps xmm0, xmm0
mov qword [0x14001d0f8], rax
xor r9d, r9d
movdqa xmmword [0x14001d0e0], xmm0
xor r8d, r8d
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
xor r9d, r9d
lea rdx, [0x1400137d0]
xor r8d, r8d
lea rcx, [0x14001d108]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
xor r9d, r9d
lea rdx, [0x1400137d8]
xor r8d, r8d
lea rcx, [0x14001d110]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
mov rcx, qword [0x14001d110]
lea r8, [0x1400137e8]
and dword [rsp + 0x20], 0
lea rdx, [0x140013800]
mov r9d, socket
call qword [sym.imp.bcrypt.dll_BCryptSetProperty]
xor r9d, r9d
lea rdx, [0x140013820]
xor r8d, r8d
lea rcx, [0x14001d118]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
xor r9d, r9d
lea rdx, [0x140013828]
xor r8d, r8d
lea rcx, [0x14001d120]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
mov r9d, 8
lea rdx, [0x140013838]
xor r8d, r8d
lea rcx, [0x14001d128]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
lea rax, [0x14001d0d0]
add rsp, 0x38
ret

Function at 0x140002968
Capabilities:
Generate random numbers via winapi

Disassembly:
mov qword [rsp + 0x10], rdx
push rbx
sub rsp, 0x30
mov qword [rsp + 0x28], 0xfffffffffffffffe
mov rbx, rdx
and dword [rsp + 0x20], 0
mov edx, 0x80
mov rcx, rbx
call fcn.1400025c4
mov dword [rsp + 0x20], 1
mov rdx, qword [rbx + 8]
mov r8, qword [rbx + 0x10]
sub r8d, edx
xor r9d, r9d
mov rcx, qword [0x14001d118]
call qword [sym.imp.bcrypt.dll_BCryptGenRandom]
mov rax, rbx
add rsp, 0x30
pop rbx
ret
Function at 0x140003038
Capabilities:
Get file size

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rbp
lea rbp, [rax - 0x5f]
sub rsp, 0x90
mov qword [rbp - 1], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov rbx, rcx
and dword [rbp - 9], 0
movups xmm0, xmmword [rdx]
movdqu xmmword [rbp + 7], xmm0
mov r8d, 0x80000000
lea rdx, [rbp + 7]
lea rcx, [rbp + 0x17]
call fcn.140002d48
nop
and qword [rbx + 8], 0
and qword [rbx + 0x10], 0
and qword [rbx + 0x18], 0
mov dword [rbp - 9], 1
xor edx, edx
mov rcx, qword [rbp + 0x1f]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, eax
mov rcx, rbx
call fcn.140001bd0
xor edx, edx
mov rcx, qword [rbp + 0x1f]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r8d, eax
mov rax, qword [rbp + 0x17]
mov rdx, qword [rbx + 8]
lea rcx, [rbp + 0x17]
call qword [rax + 0x68]
nop
lea rax, [0x140013850]
mov qword [rbp + 0x17], rax
mov rcx, qword [rbp + 0x1f]
cmp rcx, 0xffffffffffffffff
je 0x1400030e5
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or qword [rbp + 0x1f], 0xffffffffffffffff
lea rcx, [rbp + 0x27]
call fcn.140001bac
nop
lea rax, [0x1400138c8]
mov qword [rbp + 0x17], rax
mov rax, rbx
mov rbx, qword [rsp + 0xa8]
add rsp, 0x90
pop rbp
ret
Function at 0x140003880
Capabilities:
Reference http user-agent string

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0xfc0]
mov eax, 0x10c0
call fcn.14000ffe0
sub rsp, rax
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rsp + 0x10f8], rbx
mov qword [rsp + 0x1100], rsi
mov rdi, r9
mov rbx, rdx
mov rsi, rcx
xor r14d, r14d
mov dword [rsp + 0x30], r14d
or r15, 0xffffffffffffffff
mov r8, r15
lea rdx, [0x140013975]
lea rcx, [rbp - 0x68]
call fcn.140001b78
nop
mov r8, r15
lea rdx, [0x140013980]
lea rcx, [rbp - 0x68]
call fcn.140001d28
lea rax, [0x1400139d8]
mov qword [rsp + 0x40], rax
lea rax, [0x1400139f7]
mov qword [rsp + 0x48], rax
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x50], xmm0
mov rax, qword [rbp - 0x60]
mov qword [rsp + 0x20], rax
mov r9, qword [rbx]
mov r8, qword [rdi]
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x78]
call fcn.140001dbc
nop
mov rdi, qword [rbp + 0x1010]
mov rax, qword [rdi]
mov r8, qword [rax + 0x38]
mov rax, qword [rbp - 0x80]
mov qword [rsp + 0x40], rax
mov rax, qword [rbp - 0x78]
mov qword [rsp + 0x48], rax
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x50], xmm0
lea rdx, [rsp + 0x50]
mov rcx, rdi
call r8
nop
mov qword [rsi + 8], r14
mov qword [rsi + 0x10], r14
mov qword [rsi + 0x18], r14
lea ebx, [r14 + 2]
mov dword [rsp + 0x30], ebx
mov rax, qword [rdi]
mov r8d, 0x1000
lea rdx, [rbp - 0x40]
mov rcx, rdi
call qword [rax + 0x30]
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x1400039b2
mov r8, rax
lea rdx, [rbp - 0x40]
mov rcx, rsi
call fcn.140001d28
jmp 0x140003984
and ebx, 0xfffffffd
mov dword [rsp + 0x30], ebx
or ebx, 1
mov dword [rsp + 0x30], ebx
lea rax, [0x1400139f8]
mov qword [rsp + 0x50], rax
lea rax, [0x1400139fc]
mov qword [rsp + 0x58], rax
mov r14, qword [rsi + 8]
mov rdi, qword [rsi + 0x10]
sub rdi, r14
lea r12, [rdi - 1]
mov rax, rdi
lea rdx, [rdi - 1]
neg rax
sbb rcx, rcx
and rcx, rdx
lea rax, [rcx + r14]
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x48], rax
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
movaps xmm1, xmmword [rsp + 0x50]
movdqa xmmword [rsp + 0x50], xmm1
xor r8d, r8d
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x40]
call fcn.1400017b4
mov r9, rax
cmp rax, r15
je 0x140003ab3
add r9, 4
neg rdi
sbb rcx, rcx
and rcx, r12
mov rdx, rcx
sub rdx, r9
cmp rdx, r15
cmovb r15, rdx
lea r8, [r14 + r15]
add r8, r9
lea rdx, [r14 + r9]
sub r8, rdx
lea rcx, [rsp + 0x50]
call fcn.140001b78
mov r8, rax
or ebx, 4
mov dword [rsp + 0x30], ebx
mov rdx, qword [rsi + 8]
mov rcx, qword [rax + 8]
mov qword [rsi + 8], rcx
mov qword [rax + 8], rdx
mov rdx, qword [rsi + 0x10]
mov rcx, qword [rax + 0x10]
mov qword [rsi + 0x10], rcx
mov qword [rax + 0x10], rdx
mov rcx, qword [rsi + 0x18]
mov rax, qword [rax + 0x18]
mov qword [rsi + 0x18], rax
mov qword [r8 + 0x18], rcx
and ebx, 0xfffffffb
mov dword [rsp + 0x30], ebx
lea rcx, [rsp + 0x50]
call fcn.140001bac
nop
lea rcx, [rsp + 0x78]
call fcn.140001bac
nop
lea rcx, [rbp - 0x68]
call fcn.140001bac
mov rax, rsi
lea r11, [rsp + 0x10c0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
Function at 0x140004160
Capabilities:
Initialize winsock library

Disassembly:
mov qword [rsp + 8], rcx
push rbx
sub rsp, 0x30
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov rbx, rcx
lea rax, [0x1400138c8]
mov qword [rcx], rax
lea rax, [0x140013bb0]
mov qword [rcx], rax
lea rax, [rcx + 8]
mov qword [rsp + 0x48], rax
xor ecx, ecx
mov qword [rax + 8], rcx
mov qword [rax + 0x10], rcx
mov qword [rax + 0x18], rcx
mov dword [rbx + 0x28], ecx
or qword [rbx + 0x30], 0xffffffffffffffff
mov word [rbx + 0x38], cx
cmp word [0x14001d2c0], cx
jne 0x1400041d6
mov ecx, 0x202
lea rdx, [0x14001d2c0]
call qword [sym.imp.WS2_32.dll_WSAStartup]
lea rcx, [0x140004144]
call qword [sym.imp.msvcrt.dll_atexit]
nop
mov rax, rbx
add rsp, 0x30
pop rbx
ret

Function at 0x140004288
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x40
mov rbx, rcx
movzx esi, r8w
mov rcx, qword [rdx]
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov rdi, rax
test rax, rax
je 0x1400043d3
mov ebp, 2
movzx ecx, si
mov word [rsp + 0x30], bp
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x32], ax
lea rcx, [rsp + 0x34]
mov rdx, qword [rdi + 0x18]
movsx r8, word [rdi + 0x12]
mov rdx, qword [rdx]
call sub.msvcrt.dll_memcpy
mov eax, dword [rsp + 0x34]
lea edx, [rbp - 1]
lea r8d, [rbp + 4]
mov dword [rbx + 0x28], eax
mov ecx, ebp
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbx + 0x30], rax
cmp rax, 0xffffffffffffffff
je 0x1400043d3
mov ebp, 0x7530
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x58]
mov dword [rsp + 0x58], ebp
mov edx, 0xffff
mov r8d, 0x1006
mov rcx, rax
call qword [sym.imp.WS2_32.dll_setsockopt]
mov edi, 3
lea rsi, [0x14001d010]
test eax, eax
je 0x140004358
mov r9d, eax
lea r8, [0x140013af0]
mov edx, edi
mov rcx, rsi
call fcn.140001720
mov rcx, qword [rbx + 0x30]
lea r9, [rsp + 0x58]
mov edx, 0xffff
mov dword [rsp + 0x58], ebp
mov r8d, 0x1005
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x140004396
mov r9d, eax
lea r8, [0x140013b28]
mov edx, edi
mov rcx, rsi
call fcn.140001720
mov rcx, qword [rbx + 0x30]
lea rdx, [rsp + 0x30]
mov r8d, reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1400043ea
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea r8, [0x140013b60]
mov edx, edi
mov r9d, eax
mov rcx, rsi
call fcn.140001720
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + htons]
xor al, al
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
mov al, 1
jmp 0x1400043d5

Function at 0x140004518
Capabilities:
Terminate thread

Disassembly:
push rbx
sub rsp, 0x30
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov rbx, rcx
lea rax, [0x140013c28]
mov qword [rcx], rax
mov rcx, qword [rcx + 8]
test rcx, rcx
je 0x14000455e
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateThread]
nop
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
and qword [rbx + 8], 0
and dword [rbx + 0x10], 0
mov byte [rbx + 0x14], 1
add rsp, 0x30
pop rbx
ret