joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140021ee0
Capabilities:
Print debug messages

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rcx
mov qword [r11 + 0x10], rdx
mov qword [r11 + 0x18], r8
mov qword [r11 + 0x20], r9
push rbx
push rdi
sub rsp, 0x468
mov rax, qword [0x14009a110]
xor rax, rsp
mov qword [rsp + 0x450], rax
mov rbx, rcx
lea rdi, [r11 + 0x10]
call fcn.1400010c0
mov qword [rsp + 0x28], rdi
lea rdx, [rsp + 0x50]
xor edi, edi
mov r9, rbx
mov r8d, 0x400
mov qword [rsp + 0x20], rdi
mov rcx, qword [rax]
or rcx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___stdio_common_vsprintf]
cmp byte [0x1400a1589], dil
je 0x140021f55
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp byte [0x1400a1588], dil
je 0x140021f68
lea rcx, [rsp + 0x50]
call fcn.1400010d0
mov edx, 0x3ff
mov qword [rsp + 0x48], 7
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x40], rdi
mov word [rsp + 0x30], di
call fcn.14001e940
lea r8, [rsp + 0x44f]
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x30]
call fcn.140022180
mov rcx, qword [0x1400a1590]
test rcx, rcx
je 0x140021fd7
cmp qword [rsp + 0x48], 8
lea r8, [rsp + 0x30]
lea rdx, [0x140086b1c]
cmovae r8, qword [rsp + 0x30]
call fcn.140021b90
mov rcx, qword [0x1400a1590]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
mov rax, qword [rsp + 0x48]
cmp rax, 8
jb 0x14002204e
mov rcx, qword [rsp + 0x30]
inc rax
movabs rdx, 0x7fffffffffffffff
cmp rax, rdx
jbe 0x140022000
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
add rax, rax
cmp rax, 0x1000
jb 0x140022049
test byte [rsp + 0x30], 0x1f
je 0x140022019
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x140022029
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
sub rcx, rax
cmp rcx, 8
jae 0x140022039
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
cmp rcx, 0x27
jbe 0x140022046
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rax
call fcn.14006f340
mov rcx, qword [rsp + 0x450]
xor rcx, rsp
call fcn.14006f2e0
add rsp, 0x468
pop rdi
pop rbx
ret
Function at 0x140022e60
Capabilities:
Hash data via bcrypt

Disassembly:
mov qword [rsp + 0x10], rdx
push rdi
sub rsp, 0x50
mov qword [rsp + 0x28], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov rbx, rdx
mov rdi, rcx
mov dword [rsp + 0x20], 0
mov rdx, qword [r8]
mov r8, qword [r8 + 8]
sub r8, rdx
xor r9d, r9d
mov rcx, qword [rcx + 8]
call qword [sym.imp.bcrypt.dll_BCryptHashData]
test eax, eax
jns 0x140022ece
xor eax, eax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x30]
call fcn.140022d50
lea rdx, [0x140096750]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
xor eax, eax
mov qword [rbx], rax
mov qword [rbx + 8], rax
mov qword [rbx + 0x10], rax
mov rdx, qword [rdi]
mov rcx, rbx
call fcn.140022f50
mov dword [rsp + 0x20], 1
xor r9d, r9d
mov r8d, dword [rdi]
mov rdx, qword [rbx]
mov rcx, qword [rdi + 8]
call qword [sym.imp.bcrypt.dll_BCryptFinishHash]
test eax, eax
jns 0x140022f32
xor eax, eax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x30]
call fcn.140022d50
lea rdx, [0x140096750]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
mov rax, rbx
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rdi
ret

Function at 0x1400299c0
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
xor edi, edi
mov rbx, rcx
mov esi, edi
test rcx, rcx
je 0x140029a9f
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov ebp, eax
mov rdx, 0xffffffffffffffff
inc rdx
cmp word [rbx + rdx*2], si
jne 0x1400299f7
lea ecx, [rax + 1]
add rdx, rcx
mov ecx, 0x40
add rdx, rdx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x140029aa2
mov edx, ebp
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov r8d, eax
lea ecx, [r8 - 1]
cmp word [rsi + rcx*2], 0x5c
je 0x140029a46
mov eax, 0x5c
mov word [rsi + r8*2], ax
inc r8d
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp word [rbx + rax*2], di
jne 0x140029a50
test rax, rax
je 0x140029a9f
mov rdx, rdi
nop dword [rax]
nop word [rax + rax]
movzx eax, word [rbx + rdx*2]
lea ecx, [rdi + r8]
inc edi
mov word [rsi + rcx*2], ax
mov edx, edi
mov rax, 0xffffffffffffffff
nop word [rax + rax]
inc rax
cmp word [rbx + rax*2], 0
jne 0x140029a90
cmp rdx, rax
jb 0x140029a70
mov rax, rsi
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14002b570
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
sub rsp, 0x30
mov rbx, rcx
xor ebp, ebp
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rbx, rbx
je 0x14002b79e
xor edx, edx
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp word [rbx + rax*2], dx
jne 0x14002b5a0
test rax, rax
je 0x14002b5d4
xor ecx, ecx
movzx r8d, word [rbx + rcx*2]
cmp r8w, 0x5c
je 0x14002b79e
cmp r8w, 0x2f
je 0x14002b79e
inc edx
mov ecx, edx
cmp rcx, rax
jb 0x14002b5b0
mov qword [rsp + 0x40], rsi
mov rcx, rbx
mov qword [rsp + 0x48], rdi
call fcn.14002b7c0
mov rsi, rax
test rax, rax
je 0x14002b6ce
mov qword [rsp + 0x50], r14
call fcn.14002c150
mov r14, rax
test rax, rax
je 0x14002b6bb
mov rcx, rsi
call fcn.140029970
test eax, eax
je 0x14002b6a4
lea rax, str.system32_
mov qword [rsp + 0x20], rax
lea rdi, [rsp + 0x20]
lea rax, str.SystemRoot_system32_
mov qword [rsp + 0x28], rax
nop word [rax + rax]
mov rdx, qword [rdi]
mov rbx, 0xffffffffffffffff
nop word [rax + rax]
inc rbx
cmp word [rdx + rbx*2], bp
jne 0x14002b650
mov r8, rbx
mov rcx, rsi
call sub.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp
test eax, eax
je 0x14002b678
add rdi, 8
lea rax, [rsp + 0x30]
cmp rdi, rax
jb 0x14002b640
jmp 0x14002b687
lea rdx, [rsi + rbx*2]
mov rcx, r14
call fcn.14002afe0
mov rbp, rax
lea rax, [rsp + 0x30]
cmp rdi, rax
jne 0x14002b6b2
mov rcx, rsi
call fcn.140029920
test eax, eax
je 0x14002b6b2
mov rbp, rsi
xor esi, esi
jmp 0x14002b6b2
mov rdx, rsi
mov rcx, r14
call fcn.14002afe0
mov rbp, rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r14, qword [rsp + 0x50]
jmp 0x14002b76a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7e
jne 0x14002b773
mov rcx, rbx
call fcn.140029830
mov rdi, rax
test rax, rax
je 0x14002b773
mov ecx, 0x37e4
call fcn.14002ab70
test eax, eax
je 0x14002b708
xor ecx, ecx
call fcn.14002be90
jmp 0x14002b70d
call fcn.14002c150
mov rbx, rax
test rax, rax
je 0x14002b761
mov rdx, rdi
mov rcx, rax
call fcn.14002afe0
mov rbp, rax
test rax, rax
je 0x14002b758
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14002b73a
test al, 0x50
je 0x14002b758
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x14002b74d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor ebp, ebp
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
test rbp, rbp
je 0x14002b773
xor ecx, ecx
jmp 0x14002b780
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x14002b786
lea ecx, [rax + 0x7e]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rdi, qword [rsp + 0x48]
mov rax, rbp
mov rsi, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rbp
ret
mov ecx, 0xa0
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rbx, qword [rsp + 0x58]
xor eax, eax
add rsp, 0x30
pop rbp
ret
Function at 0x14002c150
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edx, eax
mov ecx, 0x40
add rdx, rdx
mov edi, eax
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x14002c1b2
mov edx, edi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x14002c1a7
cmp edi, eax
jb 0x14002c1a7
mov rax, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x14002cb30
Capabilities:
Initialize winsock library

Disassembly:
sub rsp, 0x1d8
mov rax, qword [0x14009a110]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
mov ecx, 0x202
lea rdx, [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x14002cb91
movzx eax, word [rsp + 0x20]
cmp al, 2
jne 0x14002cb8b
shr ax, 8
cmp al, 2
jne 0x14002cb8b
call fcn.1400389e0
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.14006f2e0
add rsp, 0x1d8
ret
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.14006f2e0
add rsp, 0x1d8
ret
Function at 0x140034810
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
xor edi, edi
lea rax, [rcx + rdx]
mov rbp, rax
mov rbx, rcx
sub rbp, rcx
mov esi, 0x1505
cmp rcx, rax
cmova rbp, rdi
test rbp, rbp
je 0x1400344f3
movzx ecx, byte [rbx]
call fcn.140044aa0
imul rsi, rsi, 0x21
movsx rcx, al
lea rbx, [rbx + 1]
xor rsi, rcx
inc rdi
cmp rdi, rbp
jb 0x1400344d4
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
movzx eax, sil
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
push rbx
sub rsp, 0x20
mov rbx, rcx
test rcx, rcx
je 0x140034846
call fcn.140034c10
test al, al
jne 0x140034846
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.140034b60
mov rdx, qword [rsp + 0x30]
mov rcx, rax
add rsp, 0x20
pop rbx
jmp 0x1400344a0
xor eax, eax
add rsp, 0x20
pop rbx
ret

Function at 0x140035110
Capabilities:
Convert ip address from string

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x88
mov rax, qword [0x14009a110]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov r15, qword [rcx]
mov ebp, r8d
mov rsi, rcx
lea r8, [rsp + 0x20]
mov r13d, 2
xor ebx, ebx
mov ecx, r13d
mov r14, r9
mov r12, qword [r15 + 0x4e00]
mov rdi, rdx
mov dword [r9], ebx
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x14003517e
mov r9d, ebp
lea rdx, [rsp + 0x20]
mov r8, rdi
mov ecx, r13d
call fcn.14004ff80
jmp 0x14003525c
lea r8, [rsp + 0x58]
mov rdx, rdi
mov ecx, reloc.WS2_32.dll_socket
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x1400351af
mov r9d, ebp
lea rdx, [rsp + 0x58]
mov r8, rdi
mov ecx, reloc.WS2_32.dll_socket
call fcn.14004ff80
jmp 0x14003525c
mov ecx, dword [rsi + 0x400]
sub ecx, 1
je 0x1400351cf
cmp ecx, 1
jne 0x1400351c2
lea ebx, [rcx + 0x16]
call fcn.1400366f0
test al, al
cmove ebx, r13d
jmp 0x1400351d2
mov ebx, r13d
xor eax, eax
lea r8, [0x1400785e8]
mov qword [rsp + 0x28], rax
lea rcx, [rsp + 0x68]
mov qword [rsp + 0x30], rax
mov r9d, ebp
mov qword [rsp + 0x38], rax
mov edx, ntohs
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
mov eax, dword [rsi + 0xbc]
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x2c], ebx
call fcn.140043770
lea rcx, [rsp + 0x58]
call fcn.140035000
lea r9, [rsp + 0x28]
mov r8d, ebp
mov rdx, rdi
mov rcx, rsi
movups xmm0, xmmword [rax]
movups xmmword [r12], xmm0
call fcn.140035740
test al, al
je 0x14003524b
mov dword [r14], 1
jmp 0x14003525a
lea rdx, str.getaddrinfo___thread_failed_to_start_n
mov rcx, r15
call fcn.140040bd0
xor eax, eax
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.14006f2e0
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
jmp 0x140035110
Function at 0x140040ec0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, r9
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_recv]
movsxd rcx, eax
cmp rcx, 0xffffffffffffffff
jne 0x140040efb
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, gethostname
mov edx, 0x51
cmp eax, 0x2733
cmove ecx, edx
mov eax, ecx
add rsp, 0x20
pop rbx
ret
mov qword [rbx], rcx
xor eax, eax
add rsp, 0x20
pop rbx
ret

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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x20
movsxd rax, edx
mov rdi, r9
mov rsi, r8
mov r14, rcx
mov rbx, qword [rcx + rax*8 + 0x238]
call fcn.1400415f0
xor r9d, r9d
mov r8d, edi
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_send]
mov rsi, qword [rsp + 0x50]
movsxd rdi, eax
mov dword [rsi], 0
cmp rdi, 0xffffffffffffffff
jne 0x140041098
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0x2733
jne 0x14004106d
mov dword [rsi], 0x51
xor eax, eax
jmp 0x14004109b
mov edx, ebx
mov rcx, r14
call fcn.14002d4d0
mov rcx, qword [r14]
lea rdx, str.Send_failure:__s
mov r8, rax
call fcn.140040bd0
mov rcx, qword [r14]
mov dword [rcx + 0x4c9c], ebx
mov dword [rsi], gethostname
mov rax, rdi
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x40]
add rsp, 0x20
pop r14
ret

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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rsi, rcx
movsxd rcx, edx
mov rax, qword [rsi + 0x3f0]
lea rbx, [rcx + 0x14]
shl rbx, 5
add rbx, rsi
mov rdi, qword [rbx + 8]
sub rdi, qword [rbx + 0x10]
test byte [rax + 0x7c], 3
je 0x1400416e4
lea rax, [0x140040f40]
cmp qword [rsi + rcx*8 + 0x260], rax
jne 0x1400416e4
cmp qword [rbx], 0
je 0x14004164d
test rdi, rdi
je 0x1400416e4
mov rdx, 0xffffffffffffffff
mov qword [rsp + 0x30], rbp
mov rbp, qword [rsi + rcx*8 + 0x238]
xor r9d, r9d
mov rcx, rbp
mov r8, rdx
call fcn.1400406f0
cmp eax, 0xffffffff
je 0x1400416df
test al, 1
je 0x1400416df
mov rax, qword [rbx]
test rax, rax
jne 0x1400416b4
mov rax, qword [rsi]
mov ecx, dword [rax + 0x6f8]
add ecx, ecx
movsxd rcx, ecx
mov qword [rbx + 8], rcx
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, qword [rbx + 8]
mov qword [rbx], rax
mov qword [rbx + 0x10], 0
mov qword [rbx + 0x18], 0
test rax, rax
je 0x1400416d7
mov rdx, qword [rbx + 0x10]
xor r9d, r9d
add rdx, rax
mov r8d, edi
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_recv]
movsxd rcx, eax
test eax, eax
jle 0x1400416df
add qword [rbx + 0x10], rcx
jmp 0x1400416df
mov qword [rbx + 8], 0
mov rbp, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140041700
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
cmp qword [rcx + 0x2b8], 0
mov rsi, r9
mov rbp, r8
movsxd rbx, edx
mov rdi, rcx
je 0x14004175e
mov dl, 1
call fcn.1400307f0
mov rax, qword [rdi + 0x208]
mov r9, rsi
mov r8, rbp
mov qword [rsp + 0x20], rax
mov edx, ebx
mov rcx, rdi
call qword [rdi + 0x2b8]
xor edx, edx
mov rcx, rdi
mov ebx, eax
call fcn.1400307f0
mov eax, ebx
jmp 0x1400417a0
cmp ebx, 2
ja 0x14004179e
mov r9, qword [rdi + 0x200]
lea rdx, [0x140079ae8]
lea rcx, [rbx + rbx*2]
add rcx, rdx
mov edx, 2
lea r8d, [rdx - 1]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov r9, qword [rdi + 0x200]
mov r8d, 1
mov rdx, rsi
mov rcx, rbp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret

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

Disassembly:
sub rsp, 0x28
cmp byte [rcx + 0x2c0], 0
je 0x1400418dd
call fcn.1400394f0
test eax, eax
jne 0x140041903
xor al, al
add rsp, 0x28
ret
mov rcx, qword [rcx + 0x238]
cmp rcx, 0xffffffffffffffff
je 0x1400418d6
mov r9d, 2
lea rdx, [rsp + 0x30]
lea r8d, [r9 - 1]
call qword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x1400418d6
mov al, 1
add rsp, 0x28
ret

Function at 0x1400422e0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x30
mov rbx, qword [rcx]
lea r9, [rsp + 0x40]
mov rax, rdx
mov dword [rsp + 0x40], 1
mov edx, 6
mov dword [rsp + 0x20], 4
mov rdi, rcx
mov rcx, rax
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x14004234b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rdi
call fcn.14002d4d0
mov r8, rax
lea rdx, str.Could_not_set_TCP_NODELAY:__s_n
mov rcx, rbx
call fcn.140040ce0
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
lea rdx, str.TCP_NODELAY_set_n
mov rcx, rbx
call fcn.140040ce0
mov rbx, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
Function at 0x140042480
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push rbx
push rbp
push rsi
sub rsp, 0x140
mov rax, qword [0x14009a110]
xor rax, rsp
mov qword [rsp + 0x130], rax
cmp dword [rcx + 0xbc], 2
mov rbx, rdx
mov rbp, qword [rcx]
mov rsi, rcx
je 0x140042667
cmp byte [rcx + 0x3aa], 0
mov qword [rsp + 0x170], rdi
jne 0x140042657
cmp byte [rcx + 0x3c6], 0
jne 0x140042657
lea r8, [rsp + 0x20]
mov dword [rsp + 0x20], 0x80
lea rdx, [rsp + 0xb0]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x140042523
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rsi
mov ebx, eax
call fcn.14002d4d0
mov r9, rax
lea rdx, str.getpeername___failed_with_errno__d:__s
mov r8d, ebx
mov rcx, rbp
call fcn.140040bd0
jmp 0x14004265f
xor edx, edx
mov dword [rsp + 0x20], 0x80
mov r8d, 0x80
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll_memset
lea r8, [rsp + 0x20]
mov rcx, rbx
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x140042580
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov rcx, rsi
mov ebx, eax
call fcn.14002d4d0
mov r9, rax
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r8d, ebx
mov rcx, rbp
call fcn.140040bd0
jmp 0x14004265f
lea rbx, [rsi + 0x186]
mov rdx, rbx
lea r8, [rsi + 0x1b4]
lea rcx, [rsp + 0xb0]
call fcn.140041ab0
test al, al
jne 0x1400425d5
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov ebx, dword [rax]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov edx, ebx
mov rcx, rsi
mov rdi, rax
call fcn.14002d4d0
mov r8d, dword [rdi]
lea rdx, str.ssrem_inet_ntop___failed_with_errno__d:__s
mov r9, rax
mov rcx, rbp
call fcn.140040bd0
jmp 0x14004265f
movups xmm0, xmmword [rbx]
mov eax, dword [rbx + 0x28]
lea r8, [rsi + 0x1e8]
movups xmm1, xmmword [rbx + 0x10]
lea rdx, [rsi + 0x1b8]
movups xmmword [rsi + 0x88], xmm0
lea rcx, [rsp + 0x30]
movsd xmm0, qword [rbx + 0x20]
movups xmmword [rsi + 0x98], xmm1
movsd qword [rsi + 0xa8], xmm0
mov dword [rsi + 0xb0], eax
movzx eax, word [rbx + 0x2c]
mov word [rsi + 0xb4], ax
call fcn.140041ab0
test al, al
jne 0x140042657
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov ebx, dword [rax]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov edx, ebx
mov rcx, rsi
mov rdi, rax
call fcn.14002d4d0
mov r8d, dword [rdi]
lea rdx, str.ssloc_inet_ntop___failed_with_errno__d:__s
mov r9, rax
mov rcx, rbp
call fcn.140040bd0
jmp 0x14004265f
mov rcx, rsi
call fcn.140042040
mov rdi, qword [rsp + 0x170]
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.14006f2e0
add rsp, 0x140
pop rsi
pop rbp
pop rbx
ret
Function at 0x140042e60
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x70
mov rax, qword [0x14009a110]
xor rax, rsp
mov qword [rsp + 0x68], rax
xor esi, esi
mov dword [rsp + 0x20], 4
mov eax, esi
lea r9, [rsp + 0x50]
cmp byte [rcx + 0x99c], al
mov rdi, rdx
mov rbx, rcx
mov edx, 0xffff
setne al
lea r8d, [rsi + 8]
mov rcx, rdi
mov dword [rsp + 0x50], eax
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x140042ecf
mov r8, rdi
lea rdx, str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
mov rcx, rbx
call fcn.140040ce0
jmp 0x140042f5e
mov ecx, dword [rbx + 0x9a0]
mov dword [rsp + 0x58], 1
call fcn.1400431a0
imul ecx, eax, 0x3e8
mov dword [rsp + 0x50], ecx
mov dword [rsp + 0x5c], ecx
mov ecx, dword [rbx + 0x9a4]
call fcn.1400431a0
imul ecx, eax, 0x3e8
lea r8, [rsp + 0x58]
mov qword [rsp + 0x40], rsi
lea rax, [rsp + 0x54]
mov qword [rsp + 0x38], rsi
mov r9d, ntohs
mov qword [rsp + 0x30], rax
mov edx, 0x98000004
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x50], ecx
mov dword [rsp + 0x60], ecx
mov rcx, rdi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x140042f5e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, edi
lea rdx, str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
mov r9d, eax
mov rcx, rbx
call fcn.140040ce0
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.14006f2e0
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret

Function at 0x140043130
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov edi, ecx
mov rbx, rdx
mov rcx, r8
call fcn.140043170
mov r8d, eax
mov rdx, rbx
mov ecx, edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll__read
mov rbx, qword [rsp + 0x30]
cdqe
add rsp, 0x20
pop rdi
ret
Function at 0x140045ae0
Capabilities:
Convert ip address from string

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x88
mov rax, qword [0x14009a110]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov r15, qword [rcx]
mov ebp, r8d
mov rsi, rcx
lea r8, [rsp + 0x20]
mov r13d, 2
xor ebx, ebx
mov ecx, r13d
mov r14, r9
mov r12, qword [r15 + 0x4e00]
mov rdi, rdx
mov dword [r9], ebx
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x14003517e
mov r9d, ebp
lea rdx, [rsp + 0x20]
mov r8, rdi
mov ecx, r13d
call fcn.14004ff80
jmp 0x14003525c
lea r8, [rsp + 0x58]
mov rdx, rdi
mov ecx, reloc.WS2_32.dll_socket
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x1400351af
mov r9d, ebp
lea rdx, [rsp + 0x58]
mov r8, rdi
mov ecx, reloc.WS2_32.dll_socket
call fcn.14004ff80
jmp 0x14003525c
mov ecx, dword [rsi + 0x400]
sub ecx, 1
je 0x1400351cf
cmp ecx, 1
jne 0x1400351c2
lea ebx, [rcx + 0x16]
call fcn.1400366f0
test al, al
cmove ebx, r13d
jmp 0x1400351d2
mov ebx, r13d
xor eax, eax
lea r8, [0x1400785e8]
mov qword [rsp + 0x28], rax
lea rcx, [rsp + 0x68]
mov qword [rsp + 0x30], rax
mov r9d, ebp
mov qword [rsp + 0x38], rax
mov edx, ntohs
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
mov eax, dword [rsi + 0xbc]
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x2c], ebx
call fcn.140043770
lea rcx, [rsp + 0x58]
call fcn.140035000
lea r9, [rsp + 0x28]
mov r8d, ebp
mov rdx, rdi
mov rcx, rsi
movups xmm0, xmmword [rax]
movups xmmword [r12], xmm0
call fcn.140035740
test al, al
je 0x14003524b
mov dword [r14], 1
jmp 0x14003525a
lea rdx, str.getaddrinfo___thread_failed_to_start_n
mov rcx, r15
call fcn.140040bd0
xor eax, eax
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.14006f2e0
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
jmp 0x140035110