joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1402273a4
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.1401fda0c
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14022742e
cmp byte [rbp - 0x21], r15b
je 0x140227429
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140227464
call fcn.140218430
test eax, eax
jne 0x140227450
cmp byte [rbp - 0x21], r15b
je 0x140227448
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140227464
cmp byte [rbp - 0x21], r15b
je 0x140227461
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.140200a58
test eax, eax
jne 0x140227504
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.1401fda0c
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1402274a3
cmp byte [rbp - 0x21], r15b
je 0x1402274d8
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1402274d8
call fcn.140218430
test eax, eax
jne 0x1402274c4
cmp byte [rbp - 0x21], r15b
je 0x1402274bd
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1402274d8
cmp byte [rbp - 0x21], r15b
je 0x1402274d5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.140200a58
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140227504
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140227507
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140227515
mov rcx, rdi
call fcn.140216ea4
cmp byte [rbp + 0x3f], r15b
je 0x140227524
mov rcx, qword [rbp + 0x27]
call fcn.140216ea4
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret

Function at 0x14022ae30
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14022ae58
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14022ae58
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x18007d084
Capabilities:
Read file on windows

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
mov rbp, r8
mov r14, rdx
mov rdi, rcx
test r8, r8
jg 0x18007d0b2
xor eax, eax
jmp 0x18007d198
cmp qword [rcx + 0x68], 0
je 0x18007d0c3
call fcn.18007c788
jmp 0x18007d198
mov rax, qword [rcx + 0x38]
mov rsi, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x18007d0da
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x18007d0dc
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x18007d10e
cmp rax, rbp
mov rbx, rbp
mov rcx, r14
cmovb rbx, rax
mov r8, rbx
call fcn.180080480
mov rax, qword [rdi + 0x50]
add r14, rbx
sub rsi, rbx
sub dword [rax], ebx
mov rcx, qword [rdi + 0x38]
movsxd rax, ebx
add qword [rcx], rax
cmp qword [rdi + 0x80], 0
je 0x18007d192
mov r8, qword [rdi + 0x18]
lea rax, [rdi + 0x70]
cmp qword [r8], rax
jne 0x18007d145
mov rcx, qword [rdi + 0x88]
mov rdx, qword [rdi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rdi + 0x38]
mov qword [rax], rcx
mov rax, qword [rdi + 0x50]
mov dword [rax], edx
mov ebx, 0xfff
jmp 0x18007d16e
mov r9, qword [rdi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call fcn.180083ab0
add r14, rax
sub rsi, rax
cmp rax, rbx
jne 0x18007d192
cmp rsi, rbx
ja 0x18007d14c
test rsi, rsi
je 0x18007d192
mov r9, qword [rdi + 0x80]
mov r8, rsi
mov edx, 1
mov rcx, r14
call fcn.180083ab0
sub rsi, rax
sub rbp, rsi
mov rax, rbp
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
ret

Function at 0x18007d1b4
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r15, rdx
mov rdi, rcx
je 0x18007d1e3
call fcn.18007c84c
jmp 0x18007d25a
mov rax, qword [rcx + 0x40]
mov rsi, rbx
mov r9, qword [rax]
test r9, r9
je 0x18007d1fa
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x18007d1fc
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x18007d254
test ecx, ecx
jle 0x18007d235
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call fcn.180080480
mov rax, qword [rdi + 0x58]
add r15, rbp
sub rbx, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x18007d254
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x18007d254
mov r8, rbx
mov edx, 1
mov rcx, r15
call fcn.180083d7c
sub rbx, rax
sub rsi, rbx
mov rax, rsi
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret

Function at 0x180087030
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x180087058
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x180087058
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x14026b0f0
Capabilities:
Terminate process

Disassembly:
shl byte [rax], 0x83
add eax, 0x6416ff05
sub byte [rbp + rax - 0x38ecfa01], al
mov ds, word [0xe097a5ec]
lahf
xchg esi, eax
invalid
cld
pop r11
jmp 0x14026b0fd
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x14026b10d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x14026b0f5
lea eax, [rcx + 1]
jmp 0x14026b11b
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x14026b12e
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x14026b114
sub eax, 3
jb 0x14026b14e
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x14026b19d
sar eax, 1
movsxd rbp, eax
jb 0x14026b184
jmp 0x14026b15c
add ebx, ebx
jne 0x14026b15a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x14026b184
inc ecx
add ebx, ebx
jne 0x14026b16a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x14026b184
call r11
adc ecx, ecx
add ebx, ebx
jne 0x14026b17d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x14026b16c
add ecx, 2
jmp 0x14026b189
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.14026b0b2
jmp 0x14026b0fd
pop rsi
pop rdi
pop rax
mov dword [rdi], eax
sub rsp, 0x28
lea rdi, [rsi + 0x268000]
mov eax, dword [rdi]
or eax, eax
je 0x14026b209
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0x26b1e4]
add rbx, rsi
add rdi, 8
call qword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xchg rbp, rax
mov al, byte [rdi]
inc rdi
or al, al
je 0x14026b1ad
jns 0x14026b1e2
movzx rdx, word [rdi]
add rdi, 2
jmp 0x14026b1ec
mov rcx, rdi
mov rdx, rdi
dec eax
repne scasb al, byte [rdi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
or rax, rax
je 0x14026b203
mov qword [rbx], rax
add rbx, 8
jmp 0x14026b1cd
jmp qword [sym.imp.KERNEL32.DLL_ExitProcess]
add rsp, 0x28
add rdi, 4
lea rbx, [rsi - 4]
xor eax, eax
mov al, byte [rdi]
inc rdi
or eax, eax
je 0x14026b24d
cmp al, 0xef
ja 0x14026b235
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0x14026b215
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
or eax, eax
jne 0x14026b224
mov eax, dword [rdi]
add rdi, 4
jmp 0x14026b224
mov rbp, qword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea rdi, [rsi - 0x1000]
mov ebx, 0x1000
push rax
mov r9, rsp
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
sub rsp, 0x20
call rbp
lea rax, [rdi + 0x25f]
and byte [rax], 0x7f
and byte [rax + 0x28], 0x7f
lea r9, [rsp + 0x20]
mov r8, qword [r9]
mov rdx, rbx
mov rcx, rdi
call rbp
add rsp, 0x28
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x14026b2a1
sub rsp, 0xffffffffffffff80
jmp 0x1401ffb9c
Function at 0x140006130
Capabilities:
Resolve dns

Disassembly:
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov rdi, qword [rsp + 0x68]
movzx ebp, r9w
mov r12, qword [rsp + 0x60]
mov r14d, r8d
mov r15d, edx
mov qword [rdi], 0
mov byte [r12], 0
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov rsi, rax
test rax, rax
je 0x140006208
cmp word [rax + 0x10], 2
mov qword [rsp + 0x40], rbx
jne 0x1400061cb
cmp word [rax + 0x12], 4
jne 0x1400061cb
mov rbx, qword [rax + 0x18]
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400061cb
nop word [rax + rax]
mov r9d, dword [rcx]
movzx r8d, bp
mov ecx, r15d
mov edx, r14d
call fcn.140006090
mov qword [rdi], rax
test rax, rax
je 0x140006201
mov rcx, qword [rbx + 8]
lea rdi, [rax + 0x28]
add rbx, 8
test rcx, rcx
jne 0x1400061a0
mov r8, qword [rsi]
mov r9d, 0x400
mov rcx, r12
lea edx, [r9 + 1]
call fcn.140080278
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
mov eax, 8
jmp 0x1400061e2
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2af9
je 0x140006222
sub eax, 1
je 0x140006230
sub eax, 1
je 0x140006229
cmp eax, 1
mov eax, 0x2af9
jmp 0x1400061e7
mov eax, 0x2afb
jmp 0x1400061e7
mov eax, 0x2afa
jmp 0x1400061e7
Function at 0x140006b10
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
sub rsp, 0x280
mov rax, qword [0x1400ca008]
xor rax, rsp
mov qword [rsp + 0x270], rax
cmp dword [0x1400d5068], 0
lea rax, [0x140006540]
mov qword [rsp + 0x28], rax
lea rbx, str.getaddrinfo
lea rax, str.getnameinfo
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x30], rax
movzx ebp, cx
lea rax, [0x1400068b0]
mov qword [rsp + 0x38], rax
lea rax, str.freeaddrinfo
mov qword [rsp + 0x40], rax
lea rax, [fcn.1400064f0]
mov qword [rsp + 0x48], rax
jne 0x140006cdc
mov edx, 0x104
lea rcx, [rsp + 0x160]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x140006cd2
lea r8, [rsp + 0x160]
mov qword [rsp + 0x290], rsi
mov edx, 0x10c
lea rcx, [rsp + 0x50]
call fcn.140080734
lea r8, str.ws2_32
mov edx, 0x10c
lea rcx, [rsp + 0x50]
call fcn.140081030
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rsi, rax
test rax, rax
je 0x140006c04
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
jne 0x140006c64
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea r8, [rsp + 0x160]
mov edx, 0x10c
lea rcx, [rsp + 0x50]
call fcn.140080734
lea r8, str.wship6
mov edx, 0x10c
lea rcx, [rsp + 0x50]
call fcn.140081030
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rsi, rax
test rax, rax
je 0x140006cca
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
jne 0x140006c64
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x140006cca
mov qword [rsp + 0x298], rdi
lea rbx, [rsp + 0x28]
xor edi, edi
mov rdx, qword [rbx - 8]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbx], rax
test rax, rax
je 0x140006cb9
inc edi
add rbx, 0x10
cmp edi, 3
jl 0x140006c73
mov rax, qword [rsp + 0x28]
mov qword [0x1400cf5f8], rax
mov rax, qword [rsp + 0x38]
mov qword [0x1400cf608], rax
mov rax, qword [rsp + 0x48]
mov qword [fcn.1400064f0], rax
jmp 0x140006cc2
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rdi, qword [rsp + 0x298]
mov rsi, qword [rsp + 0x290]
mov dword [0x1400d5068], 1
movzx eax, bp
lea rcx, str.getaddrinfo
add rax, rax
mov rax, qword [rcx + rax*8 + 8]
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.140073c20
mov rbx, qword [rsp + 0x2a0]
add rsp, 0x280
pop rbp
ret
Function at 0x14000ea90
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x130
mov rax, qword [0x1400ca008]
xor rax, rsp
mov qword [rsp + 0x120], rax
mov esi, ecx
lea rbx, [0x1400d7460]
lea rcx, str._windir__system32driversetc_ntp.conf
mov rdi, rdx
mov rdx, rbx
mov qword [0x1400d7d90], rcx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x14000ecad
mov qword [0x1400d8030], rbx
lea rcx, str._windir__ntp.conf
lea rbx, [0x1400d7da0]
mov qword [0x1400d7d90], rcx
mov rdx, rbx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x14000ecc9
lea r9, str.ntpd_4.2.8p15_1.3985_o_Aug_25_17:39:14.47__UTC_00:00__2023___12_
mov qword [0x1400d8018], rbx
lea r8, str.daemon_version__s_
mov edx, 0x100
lea rcx, [rsp + 0x20]
call fcn.14005e600
lea rcx, [rsp + 0x20]
or rax, 0xffffffffffffffff
mov ebx, 1
nop word [rax + rax]
cmp byte [rcx + rax + 1], 0
lea rax, [rax + 1]
jne 0x14000eb50
lea r8d, [rax + 1]
movzx r9d, bx
lea rdx, [rsp + 0x20]
lea rcx, [0x1400d0920]
call fcn.1400166a0
mov rdx, rdi
mov ecx, esi
call fcn.140004f20
xor edx, edx
lea rcx, [0x1400d7ec0]
mov r8d, 0x150
call fcn.1400753f0
cmp qword [0x1400d0a00], 0
mov dword [0x1400d8008], 5
jne 0x14000ebdd
mov r8, qword [0x1400d8030]
test r8, r8
je 0x14000ebe4
lea rdx, [0x1400ae8ac]
mov rcx, r8
call fcn.14003b130
xor ecx, ecx
mov qword [0x1400d0a00], rax
test rax, rax
setne cl
test ecx, ecx
je 0x14000ebdd
mov rcx, qword [0x1400d8030]
jmp 0x14000ec34
mov r8, qword [0x1400d8030]
lea rdx, str.getconfig:_Couldnt_open___s_:__m
mov ecx, 6
call fcn.14005c0d0
cmp qword [0x1400d0a00], 0
jne 0x14000ec6b
mov r8, qword [0x1400d8018]
test r8, r8
je 0x14000ec72
lea rdx, [0x1400ae8ac]
mov rcx, r8
call fcn.14003b130
xor ecx, ecx
mov qword [0x1400d0a00], rax
test rax, rax
setne cl
test ecx, ecx
je 0x14000ec6b
mov rcx, qword [0x1400d8018]
call fcn.14005e6e0
mov qword [0x1400d7ee0], rax
call fcn.140025430
call fcn.14003b330
xor ecx, ecx
mov dword [0x1400d7ed0], 0
call fcn.140080c84
mov ecx, ebx
mov qword [0x1400d7ee8], rax
call fcn.14000ecf0
jmp 0x14000ec88
mov r8, qword [0x1400d8018]
lea rdx, str.getconfig:_Couldnt_open___s_:__m
mov ecx, 6
call fcn.14005c0d0
call fcn.14001e830
mov rcx, qword [rsp + 0x120]
xor rcx, rsp
call fcn.140073c20
lea r11, [rsp + 0x130]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret
lea rdx, str.ExpandEnvironmentStrings_CONFIG_FILE_failed:__m
mov ecx, 3
call fcn.14005c0d0
mov ecx, 1
call fcn.1400786ac
int3
lea rdx, str.ExpandEnvironmentStrings_ALT_CONFIG_FILE_failed:__m
mov ecx, 3
call fcn.14005c0d0
mov ecx, 1
call fcn.1400786ac
int3
Function at 0x140020580
Capabilities:
Set socket configuration

Disassembly:
push rdi
sub rsp, 0x30
lea r9, [rsp + 0x48]
mov dword [rsp + 0x48], 1
mov edx, 0xffff
mov dword [rsp + 0x20], 4
mov r8d, 0xfffffffb
mov rdi, rcx
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x1400205f2
mov qword [rsp + 0x40], rbx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.14006c7d0
test eax, eax
jns 0x1400205d1
cmp ebx, 0x2726
je 0x1400205ed
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r8d, edi
lea rdx, str.setsockopt__d__SO_EXCLUSIVEADDRUSE__on_:__m
mov ecx, 3
call fcn.14005c0d0
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret

Function at 0x140020600
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x30
mov rbx, rcx
mov dword [rsp + 0x40], 1
mov ecx, 2
mov rdi, r8
mov rax, rdx
cmp cx, word [r8]
jne 0x140020665
lea r8d, [rcx + 0x1e]
mov dword [rsp + 0x20], 4
mov rcx, rax
lea r9, [rsp + 0x40]
mov edx, 0xffff
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x140020665
mov rcx, rdi
call fcn.14006b9c0
mov r8, rax
lea rdx, str.setsockopt_SO_BROADCAST__enable_failure_on_address__s:__m
mov ecx, 3
call fcn.14005c0d0
or dword [rbx + 0xa4], 0x400
mov eax, 1
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret

Function at 0x1400206b0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
xor eax, eax
mov rbx, rdx
mov dword [rsp + 0x48], eax
mov rdi, rcx
mov dword [rsp + 0x40], eax
movzx eax, word [rcx + 0x2c]
cmp word [rdx], ax
jne 0x14002078e
movzx eax, ax
cmp eax, 2
je 0x14002072c
cmp eax, 0x17
jne 0x14002077e
mov rcx, qword [rcx + 0x18]
lea r9, [rsp + 0x40]
lea edx, [rax + 0x12]
mov dword [rsp + 0x20], 4
lea r8d, [rax - 0xc]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x14002077e
mov rcx, rbx
call fcn.14006b9c0
lea rcx, [rdi + 0x2c]
mov rbx, rax
call fcn.14006b9c0
lea rdx, str.setsockopt_IPV6_MULTICAST_LOOP_failed:__m_on_socket__d__addr__s_for_multicast_address__s
jmp 0x140020768
mov rcx, qword [rcx + 0x18]
lea r9, [rsp + 0x48]
xor edx, edx
mov dword [rsp + 0x20], 4
lea r8d, [rdx + 0xb]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x14002077e
mov rcx, rbx
call fcn.14006b9c0
lea rcx, [rdi + 0x2c]
mov rbx, rax
call fcn.14006b9c0
lea rdx, str.setsockopt_IP_MULTICAST_LOOP_failed:__m_on_socket__d__addr__s_for_multicast_address__s
mov r8, qword [rdi + 0x18]
mov r9, rax
mov ecx, 3
mov qword [rsp + 0x20], rbx
call fcn.14005c0d0
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret
lea r9, str.__maddr___sa.sa_family_____iface__sin___sa.sa_family_
xor r8d, r8d
mov edx, 0x95c
lea rcx, str........._ntpd_ntp_io.c
call qword [0x1400cf0f0]
call fcn.14008013c
int3
Function at 0x1400207b0
Capabilities:
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x1400ca008]
xor rax, rsp
mov qword [rsp + 0x50], rax
movzx eax, word [rdx]
mov rbx, rcx
cmp eax, 2
je 0x1400207fc
cmp eax, 0x17
jne 0x14002084a
movups xmm0, xmmword [rdx + 8]
mov eax, dword [rcx + 0xc4]
lea r9, [rsp + 0x38]
mov dword [rsp + 0x48], eax
mov edx, 0x29
movups xmmword [rsp + 0x38], xmm0
mov dword [rsp + 0x20], setsockopt
jmp 0x140020821
xor eax, eax
mov dword [rsp + 0x20], 8
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x30]
mov eax, dword [rdx + 4]
xor edx, edx
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x34], 0
mov rcx, qword [rcx + 0x18]
mov r8d, reloc.WS2_32.dll_inet_ntoa
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x14002084a
xor eax, eax
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140073c20
add rsp, 0x60
pop rbx
ret
or dword [rbx + 0xa4], 0x40
mov eax, 1
inc dword [rbx + 0xb0]
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140073c20
add rsp, 0x60
pop rbx
ret
Function at 0x140020870
Capabilities:
Set socket configuration

Disassembly:
push r14
push r15
sub rsp, 0x88
mov rax, qword [0x1400ca008]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov r14, rcx
xor eax, eax
mov rcx, rdx
mov qword [rsp + 0x40], rax
mov r15, rdx
call fcn.140022230
test rax, rax
jne 0x1400208ae
mov eax, 1
jmp 0x140020a50
movzx eax, word [r15]
mov qword [rsp + 0xb0], rbx
cmp eax, 2
je 0x14002094c
cmp eax, 0x17
jne 0x140020a31
movups xmm0, xmmword [r15 + 8]
mov eax, dword [r14 + 0xc4]
lea r9, [rsp + 0x48]
mov rcx, qword [r14 + 0x18]
mov edx, 0x29
movups xmmword [rsp + 0x48], xmm0
mov dword [rsp + 0x58], eax
mov dword [rsp + 0x20], setsockopt
lea r8d, [rdx - 0x1c]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x140020a31
mov rcx, r15
call fcn.14006b9c0
lea rcx, [r14 + 0x2c]
mov rbx, rax
call fcn.14006b9c0
mov r8, qword [r14 + 0x18]
lea rdx, str.setsockopt_IPV6_LEAVE_GROUP_failure:__m_on_socket__d__addr__s_for__d___s_
mov r9, rax
mov qword [rsp + 0x28], rbx
mov eax, dword [r14 + 0xc4]
mov ecx, 3
mov dword [rsp + 0x20], eax
call fcn.14005c0d0
xor eax, eax
jmp 0x140020a48
mov eax, dword [r15 + 4]
lea r9, [rsp + 0x40]
mov rcx, qword [r14 + 0x18]
xor edx, edx
mov dword [rsp + 0x40], eax
mov eax, dword [r14 + 0x30]
mov dword [rsp + 0x44], eax
lea r8d, [rdx + 0xd]
mov dword [rsp + 0x20], 8
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x140020a31
mov ebx, dword [r14 + 0x30]
mov rcx, r15
mov qword [rsp + 0x80], rbp
mov qword [rsp + 0x78], rsi
mov qword [rsp + 0x70], rdi
mov edi, dword [r15 + 4]
call fcn.14006b9c0
mov ecx, ebx
mov ebp, ebx
shr ebx, 8
mov rsi, rax
movzx eax, byte [r14 + 0x33]
and ebx, 0xff00
shl ebp, 0x10
and ecx, 0xff00
or ebp, ecx
lea rcx, [r14 + 0x2c]
shl ebp, 8
or ebp, ebx
mov ebx, edi
or ebp, eax
shl ebx, 0x10
mov eax, edi
shr edi, 8
and eax, 0xff00
and edi, 0xff00
or ebx, eax
movzx eax, byte [r15 + 7]
shl ebx, 8
or ebx, edi
or ebx, eax
call fcn.14006b9c0
mov r8, qword [r14 + 0x18]
lea rdx, str.setsockopt_IP_DROP_MEMBERSHIP_failed:__m_on_socket__d__addr__s_for__x____x___s_
mov qword [rsp + 0x30], rsi
mov r9, rax
mov dword [rsp + 0x28], ebp
mov ecx, 3
mov dword [rsp + 0x20], ebx
call fcn.14005c0d0
mov rdi, qword [rsp + 0x70]
xor eax, eax
mov rsi, qword [rsp + 0x78]
mov rbp, qword [rsp + 0x80]
jmp 0x140020a48
sub dword [r14 + 0xb0], 1
jne 0x140020a43
and dword [r14 + 0xa4], 0xffffffbf
mov eax, 1
mov rbx, qword [rsp + 0xb0]
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140073c20
add rsp, 0x88
pop r15
pop r14
ret
Function at 0x1400217c0
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push r14
sub rsp, 0x60
mov rax, qword [0x1400ca008]
xor rax, rsp
mov qword [rsp + 0x58], rax
movzx eax, word [rcx]
xor r14d, r14d
mov esi, r8d
mov ebp, edx
mov rbx, rcx
cmp r14w, ax
jne 0x1400217f7
xor eax, eax
jmp 0x14002196c
mov qword [rsp + 0x88], rdi
xor r8d, r8d
mov qword [rsp + 0x90], r15
mov r15d, 2
mov edx, r15d
movzx ecx, ax
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x14002185e
test esi, esi
je 0x140021865
lea r9, [rsp + 0x30]
mov dword [rsp + 0x30], 1
mov edx, 0xffff
mov dword [rsp + 0x20], 4
lea r8d, [r15 + 0x1e]
mov rcx, rax
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x140021865
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x14002195c
cmp r15w, word [rbx]
mov eax, 0x10
mov r8d, 0x1c
mov rdx, rbx
cmove r8d, eax
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_connect]
mov rcx, rdi
cmp eax, 0xffffffff
je 0x140021858
lea r8, [rsp + 0x34]
mov dword [rsp + 0x34], 0x1c
lea rdx, [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_getsockname]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.WS2_32.dll_closesocket]
cmp ebx, 0xffffffff
je 0x14002185e
mov rcx, qword [0x1400d7230]
test rcx, rcx
je 0x14002192c
mov edx, dword [rsp + 0x50]
mov r8, qword [rsp + 0x48]
mov r9, qword [rsp + 0x40]
mov r11d, dword [rsp + 0x3c]
movzx r10d, word [rsp + 0x38]
nop dword [rax]
movzx eax, word [rcx + 8]
cmp ax, r10w
jne 0x140021924
cmp r15w, ax
jne 0x140021913
cmp dword [rcx + 0xc], r11d
mov eax, r14d
sete al
test eax, eax
je 0x140021924
mov rax, qword [rcx + 0x28]
test rax, rax
je 0x14002193d
test dword [rax + 0xa4], ebp
cmovne rax, r14
jmp 0x14002192f
cmp qword [rcx + 0x18], r8
jne 0x140021924
cmp qword [rcx + 0x10], r9
jne 0x140021924
cmp dword [rcx + 0x20], edx
je 0x1400218fe
mov rcx, qword [rcx]
test rcx, rcx
jne 0x1400218e0
mov rax, r14
test rax, rax
je 0x14002193d
cmp dword [rax + 0xc8], r14d
je 0x14002194c
or ebp, 4
lea rcx, [rsp + 0x38]
mov edx, ebp
call fcn.140021990
test rax, rax
je 0x14002195c
cmp dword [rax + 0xc8], r14d
cmovne rax, r14
mov rdi, qword [rsp + 0x88]
mov r15, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140073c20
mov rbx, qword [rsp + 0x98]
add rsp, 0x60
pop r14
pop rsi
pop rbp
ret