joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140046f10
Capabilities:
Convert ip address from string

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x160
lea rdi, [rsp + 0xa0]
mov ecx, 0x30
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x170]
mov rax, qword [0x14013be00]
xor rax, rsp
mov qword [rsp + 0x150], rax
lea rax, [0x14013bff9]
mov qword [rsp + 0xd8], rax
lea rax, [0x14013bffa]
mov qword [rsp + 0xe0], rax
lea rax, [0x14013bffb]
mov qword [rsp + 0xe8], rax
lea rax, [0x14013bffc]
mov qword [rsp + 0xf0], rax
lea rdx, [rsp + 0xa8]
mov rax, qword [rsp + 0x170]
mov rcx, qword [rax + 0x20]
call fcn.140069e00
mov dword [rsp + 0xf8], eax
cmp dword [rsp + 0xf8], 0
je 0x140046fc7
mov eax, dword [rsp + 0xf8]
jmp 0x1400471c6
lea r8, [rsp + 0x108]
mov rax, qword [rsp + 0x170]
mov rdx, qword [rax + 0x10]
mov ecx, reloc.WS2_32.dll_socket
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x140047009
lea rax, str.____
mov qword [rsp + 0xd8], rax
lea rax, [0x1401135bc]
mov qword [rsp + 0xe0], rax
lea r8, [rsp + 0x108]
mov rax, qword [rsp + 0x170]
mov rdx, qword [rax]
mov ecx, reloc.WS2_32.dll_socket
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x14004704a
lea rax, [0x1401135c0]
mov qword [rsp + 0xe8], rax
lea rax, [0x1401135c4]
mov qword [rsp + 0xf0], rax
mov rax, qword [rsp + 0x170]
movzx eax, byte [rax + 0x28]
mov dword [rsp + 0x130], eax
mov ecx, dword [rsp + 0xb8]
inc ecx
mov dword [rsp + 0x134], ecx
mov edx, dword [rsp + 0xbc]
add edx, 0x76c
mov dword [rsp + 0x138], edx
mov r8, qword [rsp + 0x170]
movzx r8d, word [r8 + 0x18]
mov dword [rsp + 0x13c], r8d
mov r9, qword [rsp + 0x170]
mov ecx, dword [r9 + 0x1c]
call fcn.140045860
mov qword [rsp + 0x140], rax
mov rcx, qword [rsp + 0x170]
movzx ecx, word [rcx + 8]
mov dword [rsp + 0x148], ecx
mov rdx, qword [rsp + 0x170]
mov ecx, dword [rdx + 0xc]
call fcn.140045860
mov rcx, qword [rsp + 0x170]
mov ecx, dword [rcx + 0x2c]
mov dword [rsp + 0x98], ecx
mov ecx, dword [rsp + 0x130]
mov dword [rsp + 0x90], ecx
mov ecx, dword [rsp + 0xa8]
mov dword [rsp + 0x88], ecx
mov ecx, dword [rsp + 0xac]
mov dword [rsp + 0x80], ecx
mov ecx, dword [rsp + 0xb0]
mov dword [rsp + 0x78], ecx
mov ecx, dword [rsp + 0xb4]
mov dword [rsp + 0x70], ecx
mov ecx, dword [rsp + 0x134]
mov dword [rsp + 0x68], ecx
mov ecx, dword [rsp + 0x138]
mov dword [rsp + 0x60], ecx
mov ecx, dword [rsp + 0x13c]
mov dword [rsp + 0x58], ecx
mov rcx, qword [rsp + 0xe0]
mov qword [rsp + 0x50], rcx
mov rcx, qword [rsp + 0x170]
mov rcx, qword [rcx + 0x10]
mov qword [rsp + 0x48], rcx
mov rcx, qword [rsp + 0xd8]
mov qword [rsp + 0x40], rcx
mov rcx, qword [rsp + 0x140]
mov qword [rsp + 0x38], rcx
mov ecx, dword [rsp + 0x148]
mov dword [rsp + 0x30], ecx
mov rcx, qword [rsp + 0xf0]
mov qword [rsp + 0x28], rcx
mov rcx, qword [rsp + 0x170]
mov rcx, qword [rcx]
mov qword [rsp + 0x20], rcx
mov r9, qword [rsp + 0xe8]
mov r8, rax
lea rdx, [0x1401135c8]
mov rcx, qword [rsp + 0x178]
call fcn.1400159c0
xor eax, eax
mov rdi, rax
mov rcx, rsp
lea rdx, reloc.WS2_32.dll_bind
call fcn.1400d050c
mov rax, rdi
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.1400d0280
add rsp, 0x160
pop rdi
ret
Function at 0x1400474b0
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x30
lea rcx, [0x140113958]
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x1400474f0
mov r8d, 0xa
xor edx, edx
mov rcx, qword [rsp + 0x20]
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtol
mov dword [rsp + 0x28], eax
movsxd rax, dword [rsp + 0x28]
jmp 0x1400474f7
xor ecx, ecx
call fcn.140045840
add rsp, 0x30
pop rdi
ret

Function at 0x140048200
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x50
lea rdi, [rsp + 0x20]
mov ecx, ntohl
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x60]
lea rcx, str.CURL_TIME
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x14004826e
lea r9, [rsp + 0x38]
mov r8d, 0xa
xor edx, edx
mov rcx, qword [rsp + 0x20]
call fcn.1400699c0
mov rax, qword [0x14013c6d0]
mov rcx, qword [rsp + 0x38]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
jmp 0x140048275
xor ecx, ecx
call fcn.1400475f0
mov rdi, rax
mov rcx, rsp
lea rdx, reloc.WS2_32.dll_accept
call fcn.1400d050c
mov rax, rdi
add rsp, 0x50
pop rdi
ret

Function at 0x140049540
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push rdi
sub rsp, 0x50
lea rdi, [rsp + 0x20]
mov ecx, ntohl
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x60]
cmp qword [0x14013c008], 0
jne 0x14004957e
jmp 0x14004960c
mov ecx, 0x400
call qword [section..data]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140049598
jmp 0x14004960c
lea rax, [rsp + 0x68]
mov qword [rsp + 0x38], rax
mov r9, qword [rsp + 0x38]
mov r8, qword [rsp + 0x60]
mov edx, 0x400
mov rcx, qword [rsp + 0x20]
call fcn.140015c40
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x38], 0
cmp dword [rsp + 0x28], 0x3ff
jle 0x1400495da
mov dword [rsp + 0x28], 0x3ff
cmp dword [rsp + 0x28], 0
jle 0x140049600
movsxd rax, dword [rsp + 0x28]
mov r9, qword [0x14013c008]
mov r8, rax
mov edx, 1
mov rcx, qword [rsp + 0x20]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
nop
mov rcx, qword [rsp + 0x20]
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov rcx, rsp
lea rdx, reloc.WS2_32.dll_accept
call fcn.1400d050c
add rsp, 0x50
pop rdi
ret
Function at 0x140049800
Capabilities:
Send data
Send data on socket

Disassembly:
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x40
mov r8, qword [rsp + 0x78]
mov edx, dword [rsp + 0x70]
lea rcx, str.send
call fcn.140049b20
movzx eax, al
test eax, eax
je 0x14004983c
mov eax, 0xffffffff
jmp 0x14004988a
mov r9d, dword [rsp + 0x68]
mov r8d, dword [rsp + 0x60]
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_send]
mov dword [rsp + 0x30], eax
cmp qword [rsp + 0x78], 0
je 0x140049886
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x60]
mov r8d, dword [rsp + 0x70]
mov rdx, qword [rsp + 0x78]
lea rcx, str.SEND__s:_d_send__lu____ld_n
call fcn.140049540
nop
mov eax, dword [rsp + 0x30]
add rsp, 0x40
pop rdi
ret

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

Disassembly:
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x40
mov r8, qword [rsp + 0x78]
mov edx, dword [rsp + 0x70]
lea rcx, str.recv
call fcn.140049b20
movzx eax, al
test eax, eax
je 0x1400498dc
mov eax, 0xffffffff
jmp 0x14004992a
mov r9d, dword [rsp + 0x68]
mov r8d, dword [rsp + 0x60]
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_recv]
mov dword [rsp + 0x30], eax
cmp qword [rsp + 0x78], 0
je 0x140049926
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x60]
mov r8d, dword [rsp + 0x70]
mov rdx, qword [rsp + 0x78]
lea rcx, str.RECV__s:_d_recv__lu____ld_n
call fcn.140049540
nop
mov eax, dword [rsp + 0x30]
add rsp, 0x40
pop rdi
ret

Function at 0x14004a5f0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x90
lea rdi, [rsp + 0x30]
mov ecx, 0x18
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0xa0]
mov dword [rsp + 0x34], 0x4020
mov dword [rsp + 0x54], 0
mov dword [rsp + 0x74], 4
cmp dword [0x14013c018], 0
jne 0x14004a671
mov dword [rsp + 0x20], 3
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov ecx, 6
call fcn.1400b1080
movzx eax, al
test eax, eax
je 0x14004a667
mov dword [0x14013c018], 2
jmp 0x14004a671
mov dword [0x14013c018], 1
cmp dword [0x14013c018], 2
jne 0x14004a67c
jmp 0x14004a6db
lea rax, [rsp + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x54]
mov r8d, 0x1001
mov edx, 0xffff
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x14004a6b4
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 0x54], eax
jle 0x14004a6b4
jmp 0x14004a6db
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x34]
mov r8d, 0x1001
mov edx, 0xffff
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.WS2_32.dll_setsockopt]
nop
mov rcx, rsp
lea rdx, reloc.WS2_32.dll_closesocket
call fcn.1400d050c
add rsp, 0x90
pop rdi
ret
Function at 0x14004b130
Capabilities:
Set socket configuration

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x30
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x48]
mov r8d, 0x1b
mov edx, 0x29
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_setsockopt]
nop
add rsp, 0x30
pop rdi
ret

Function at 0x14004b170
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x180
lea rdi, [rsp + 0x30]
mov ecx, 0x54
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x190]
mov rax, qword [0x14013be00]
xor rax, rsp
mov qword [rsp + 0x170], rax
mov dword [rsp + 0x34], 1
mov dword [rsp + 0x44], 6
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x34]
mov r8d, 1
mov edx, dword [rsp + 0x44]
mov rcx, qword [rsp + 0x198]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x14004b216
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, pe_nt_image_headers64
lea rdx, [rsp + 0x60]
mov ecx, eax
call fcn.1400684f0
mov r8, rax
lea rdx, str.Could_not_set_TCP_NODELAY:__s
mov rcx, qword [rsp + 0x190]
call fcn.14003d050
nop
mov rcx, rsp
lea rdx, reloc.WS2_32.dll_bind
call fcn.1400d050c
mov rcx, qword [rsp + 0x170]
xor rcx, rsp
call fcn.1400d0280
add rsp, 0x180
pop rdi
ret
Function at 0x14004b250
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x50
lea rdi, [rsp + 0x30]
mov ecx, 8
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x60]
movzx eax, byte [rax + 0xa69]
test eax, eax
je 0x14004b28f
mov dword [rsp + 0x44], 1
jmp 0x14004b297
mov dword [rsp + 0x44], 0
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x34], eax
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x34]
mov r8d, 8
mov edx, 0xffff
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x14004b2eb
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r9d, eax
mov r8, qword [rsp + 0x68]
lea rdx, str.Failed_to_set_SO_KEEPALIVE_on_fd__qd:_errno__d
mov rcx, qword [rsp + 0x60]
call fcn.14003d050
nop
jmp 0x14004b414
mov rax, qword [rsp + 0x60]
mov ecx, dword [rax + 0x9d4]
call fcn.140044a70
mov dword [rsp + 0x34], eax
imul eax, dword [rsp + 0x34], 0x3e8
mov dword [rsp + 0x34], eax
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x34]
mov r8d, 3
mov edx, 6
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x14004b352
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r9d, eax
mov r8, qword [rsp + 0x68]
lea rdx, str.Failed_to_set_TCP_KEEPIDLE_on_fd__qd:_errno__d
mov rcx, qword [rsp + 0x60]
call fcn.14003d050
nop
mov rax, qword [rsp + 0x60]
mov ecx, dword [rax + 0x9d8]
call fcn.140044a70
mov dword [rsp + 0x34], eax
imul eax, dword [rsp + 0x34], 0x3e8
mov dword [rsp + 0x34], eax
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x34]
mov r8d, reloc.WS2_32.dll_recvfrom
mov edx, 6
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x14004b3b9
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r9d, eax
mov r8, qword [rsp + 0x68]
lea rdx, str.Failed_to_set_TCP_KEEPINTVL_on_fd__qd:_errno__d
mov rcx, qword [rsp + 0x60]
call fcn.14003d050
nop
mov rax, qword [rsp + 0x60]
mov ecx, dword [rax + 0x9dc]
call fcn.140044a70
mov dword [rsp + 0x34], eax
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x34]
mov r8d, reloc.WS2_32.dll_recv
mov edx, 6
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x14004b414
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r9d, eax
mov r8, qword [rsp + 0x68]
lea rdx, str.Failed_to_set_TCP_KEEPCNT_on_fd__qd:_errno__d
mov rcx, qword [rsp + 0x60]
call fcn.14003d050
nop
mov rcx, rsp
lea rdx, reloc.WS2_32.dll_accept
call fcn.1400d050c
add rsp, 0x50
pop rdi
ret
Function at 0x14004c150
Capabilities:
Query environment variable

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x40
mov r8d, 0x170
xor edx, edx
mov rcx, qword [rsp + 0x50]
call sub.VCRUNTIME140.dll_memset
mov rax, qword [rsp + 0x50]
mov qword [rax + 0x98], 0xffffffffffffffff
mov rax, qword [rsp + 0x50]
mov ecx, dword [rsp + 0x60]
mov dword [rax], ecx
mov rax, qword [rsp + 0x50]
add rax, 8
mov r8d, dword [rsp + 0x60]
mov rdx, qword [rsp + 0x58]
mov rcx, rax
call fcn.14004a700
nop
lea rcx, str.CURL_DBG_SOCK_WBLOCK
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x14004c1f9
mov r8d, 0xa
xor edx, edx
mov rcx, qword [rsp + 0x20]
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtol
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0
jl 0x14004c1f9
cmp dword [rsp + 0x28], 0x64
jg 0x14004c1f9
mov rax, qword [rsp + 0x50]
mov ecx, dword [rsp + 0x28]
mov dword [rax + 0x150], ecx
lea rcx, str.CURL_DBG_SOCK_WPARTIAL
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x14004c245
mov r8d, 0xa
xor edx, edx
mov rcx, qword [rsp + 0x20]
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtol
mov dword [rsp + 0x2c], eax
cmp dword [rsp + 0x2c], 0
jl 0x14004c245
cmp dword [rsp + 0x2c], 0x64
jg 0x14004c245
mov rax, qword [rsp + 0x50]
mov ecx, dword [rsp + 0x2c]
mov dword [rax + 0x154], ecx
lea rcx, str.CURL_DBG_SOCK_RBLOCK
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x14004c291
mov r8d, 0xa
xor edx, edx
mov rcx, qword [rsp + 0x20]
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtol
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0
jl 0x14004c291
cmp dword [rsp + 0x30], 0x64
jg 0x14004c291
mov rax, qword [rsp + 0x50]
mov ecx, dword [rsp + 0x30]
mov dword [rax + 0x158], ecx
lea rcx, str.CURL_DBG_SOCK_RMAX
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x14004c2d8
mov r8d, 0xa
xor edx, edx
mov rcx, qword [rsp + 0x20]
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtol
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0
jl 0x14004c2d8
movsxd rax, dword [rsp + 0x34]
mov rcx, qword [rsp + 0x50]
mov qword [rcx + 0x160], rax
add rsp, 0x40
pop rdi
ret
Function at 0x14004c630
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x220
lea rdi, [rsp + 0x20]
mov ecx, 0x80
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x230]
mov rax, qword [0x14013be00]
xor rax, rsp
mov qword [rsp + 0x218], rax
mov rax, qword [rsp + 0x230]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
cmp qword [rax + 0x98], 0xffffffffffffffff
je 0x14004c7cf
mov rax, qword [rsp + 0x238]
mov rax, qword [rax + 0x20]
mov rax, qword [rax + 0x3c8]
mov eax, dword [rax + 0x8c]
and eax, 0x800
test eax, eax
jne 0x14004c7cf
mov dword [rsp + 0x1f4], 0x80
mov r8d, 0x80
xor edx, edx
lea rcx, [rsp + 0x160]
call sub.VCRUNTIME140.dll_memset
lea r8, [rsp + 0x1f4]
lea rdx, [rsp + 0x160]
mov rax, qword [rsp + 0x20]
mov rcx, qword [rax + 0x98]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x14004c74a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsp + 0x204], eax
mov r8d, pe_nt_image_headers64
lea rdx, [rsp + 0x40]
mov ecx, dword [rsp + 0x204]
call fcn.1400684f0
mov r9, rax
mov r8d, dword [rsp + 0x204]
lea rdx, str.getsockname___failed_with_errno__d:__s
mov rcx, qword [rsp + 0x238]
call fcn.14003ce90
mov eax, 2
jmp 0x14004c7d1
mov rax, qword [rsp + 0x20]
add rax, 0x100
mov rcx, qword [rsp + 0x20]
add rcx, 0xce
mov r9, rax
mov r8, rcx
mov edx, dword [rsp + 0x1f4]
lea rcx, [rsp + 0x160]
call fcn.140041420
movzx eax, al
test eax, eax
jne 0x14004c7cf
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov r8d, pe_nt_image_headers64
lea rdx, [rsp + 0x40]
mov ecx, dword [rax]
call fcn.1400684f0
mov qword [rsp + 0x210], rax
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov rcx, qword [rsp + 0x210]
mov r9, rcx
mov r8d, dword [rax]
lea rdx, str.ssloc_inet_ntop___failed_with_errno__d:__s
mov rcx, qword [rsp + 0x238]
call fcn.14003ce90
mov eax, 2
jmp 0x14004c7d1
xor eax, eax
mov rdi, rax
mov rcx, rsp
lea rdx, reloc.WS2_32.dll_closesocket
call fcn.1400d050c
mov rax, rdi
mov rcx, qword [rsp + 0x218]
xor rcx, rsp
call fcn.1400d0280
add rsp, 0x220
pop rdi
ret

Function at 0x14004cde0
Capabilities:
Connect socket

Disassembly:
mov byte [rsp + 0x18], r8b
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x30
mov rax, qword [rsp + 0x40]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 0xffffffff
movzx eax, byte [rsp + 0x50]
test eax, eax
je 0x14004ce15
jmp 0x14004ce40
mov rax, qword [rsp + 0x20]
add rax, 0x18
mov rcx, qword [rsp + 0x20]
mov r8d, dword [rcx + 0x14]
mov rdx, rax
mov rax, qword [rsp + 0x20]
mov rcx, qword [rax + 0x98]
call qword [sym.imp.WS2_32.dll_connect]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x28]
add rsp, 0x30
pop rdi
ret
Function at 0x14004d4c0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x108
lea rdi, [rsp + 0x50]
mov ecx, 0x2e
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x120]
mov rax, qword [0x14013be00]
xor rax, rsp
mov qword [rsp + 0xf0], rax
lea rcx, [rsp + 0xc0]
call fcn.14001c520
lea rcx, [rsp + 0x98]
mov rdi, rcx
mov rsi, rax
mov ecx, reloc.WS2_32.dll_recv
rep movsb byte [rdi], byte [rsi]
lea rax, [rsp + 0xe0]
mov rcx, qword [rsp + 0x120]
mov rdi, rax
lea rsi, [rcx + 0x138]
mov ecx, reloc.WS2_32.dll_recv
rep movsb byte [rdi], byte [rsi]
lea rax, [rsp + 0xd0]
lea rcx, [rsp + 0x98]
mov rdi, rax
mov rsi, rcx
mov ecx, reloc.WS2_32.dll_recv
rep movsb byte [rdi], byte [rsi]
lea rdx, [rsp + 0xe0]
lea rcx, [rsp + 0xd0]
call fcn.14001c630
cmp rax, 0x3e8
jle 0x14004d644
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x74]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x54]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x4004747b
mov rax, qword [rsp + 0x120]
mov rcx, qword [rax + 0x98]
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
jne 0x14004d623
mov rax, qword [rsp + 0x120]
mov eax, dword [rax + 0x148]
cmp dword [rsp + 0x54], eax
je 0x14004d623
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x54]
mov r8d, 0x1001
mov edx, 0xffff
mov rax, qword [rsp + 0x120]
mov rcx, qword [rax + 0x98]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x14004d623
mov rax, qword [rsp + 0x120]
mov ecx, dword [rsp + 0x54]
mov dword [rax + 0x148], ecx
mov rax, qword [rsp + 0x120]
lea rcx, [rsp + 0x98]
lea rdi, [rax + 0x138]
mov rsi, rcx
mov ecx, reloc.WS2_32.dll_recv
rep movsb byte [rdi], byte [rsi]
mov rcx, rsp
lea rdx, reloc.WS2_32.dll_closesocket
call fcn.1400d050c
mov rcx, qword [rsp + 0xf0]
xor rcx, rsp
call fcn.1400d0280
add rsp, 0x108
pop rdi
pop rsi
ret
Function at 0x14004e310
Capabilities:
Connect socket

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x70
mov rax, qword [rsp + 0x80]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x5c], 1
mov rax, qword [rsp + 0x50]
cmp qword [rax + 0x98], 0xffffffffffffffff
jne 0x14004e362
mov r8d, 0x6fb
lea rdx, [0x140115dd0]
lea rcx, str.ctx__sock____SOCKET__0_
call sub.api_ms_win_crt_runtime_l1_1_0.dll__wassert
xor eax, eax
mov rax, qword [rsp + 0x50]
add rax, 0x18
mov rcx, qword [rsp + 0x50]
mov r8d, dword [rcx + 0x14]
mov rdx, rax
mov rax, qword [rsp + 0x50]
mov rcx, qword [rax + 0x98]
call qword [sym.imp.WS2_32.dll_connect]
mov dword [rsp + 0x58], eax
cmp dword [rsp + 0x58], 0xffffffff
jne 0x14004e3be
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rsp + 0x50]
add rcx, 0xa0
mov r8d, eax
mov rdx, rcx
mov rcx, qword [rsp + 0x88]
call fcn.14004c050
jmp 0x14004e482
mov rax, qword [rsp + 0x50]
mov byte [rax + 0x16a], 1
mov rdx, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x80]
call fcn.14004c630
mov rax, qword [rsp + 0x50]
cmp dword [rax], 5
jne 0x14004e3f7
lea rax, str.QUIC
mov qword [rsp + 0x60], rax
jmp 0x14004e403
lea rax, [0x140115ea4]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x50]
add rax, 0xa0
mov rcx, qword [rsp + 0x50]
add rcx, 0xce
mov rdx, qword [rsp + 0x50]
mov edx, dword [rdx + 0xfc]
mov dword [rsp + 0x40], edx
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x100]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], rcx
mov rax, qword [rsp + 0x50]
mov rax, qword [rax + 0x98]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x60]
lea r8, str._s_socket__qd_connected:___s:_d_______s:_d_
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x88]
call fcn.14003d140
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 8]
mov dword [rsp + 0x68], eax
xor eax, eax
add rsp, 0x70
pop rdi
ret

Function at 0x140055380
Capabilities:
Convert ip address from string

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x80
lea rdi, [rsp + 0x20]
mov ecx, 0x18
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x90]
mov rax, qword [0x14013be00]
xor rax, rsp
mov qword [rsp + 0x70], rax
lea r8, [rsp + 0x24]
mov rdx, qword [rsp + 0x90]
mov ecx, 2
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jg 0x1400553ed
lea r8, [rsp + 0x48]
mov rdx, qword [rsp + 0x90]
mov ecx, reloc.WS2_32.dll_socket
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x1400553f1
mov al, 1
jmp 0x1400553f3
xor al, al
mov rdi, rax
mov rcx, rsp
lea rdx, reloc.WS2_32.dll_bind
call fcn.1400d050c
mov rax, rdi
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.1400d0280
add rsp, 0x80
pop rdi
ret