joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400574c0
Capabilities:
Send data
Send data on socket

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
push r14
push r15
sub rsp, 0x50
mov rdi, 0xffffffffffffffff
mov r14, rdx
mov rbx, rdi
mov r15, rcx
nop
inc rbx
cmp byte [rdx + rbx], 0
jne 0x1400574e0
add rbx, 3
cmp rbx, 0xf4240
jae 0x14005767d
mov qword [rsp + 0x70], rbp
mov rdx, rbx
xor ebp, ebp
mov dword [rsp + 0x20], ebx
mov qword [rsp + 0x24], rbp
lea ecx, [rbp + 1]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov qword [rsp + 0x30], rax
mov rdx, rax
test rax, rax
je 0x140057686
movups xmm0, xmmword [rsp + 0x20]
mov qword [rsp + 0x78], rsi
mov rsi, rdi
movsd xmm1, qword [rsp + 0x30]
movups xmmword [rsp + 0x38], xmm0
movsd qword [rsp + 0x48], xmm1
inc rsi
cmp byte [r14 + rsi], bpl
jne 0x140057545
cmp esi, 0xf4240
jae 0x140057664
mov rcx, qword [rsp + 0x20]
shr rcx, 0x20
lea eax, [rcx + rsi]
cmp eax, ebx
jg 0x140057664
movsxd rcx, ecx
add rcx, rdx
je 0x140057664
movsxd rbx, esi
mov rdx, r14
mov r8, rbx
call sub.VCRUNTIME140.dll_memcpy
test esi, esi
js 0x14005768c
movsxd rcx, dword [rsp + 0x3c]
lea eax, [rcx + 3]
add eax, esi
cmp eax, dword [rsp + 0x38]
jg 0x14005768c
mov r14, qword [rsp + 0x48]
lea r8d, [rsi + 3]
lea rdx, [r14 + rcx]
lea rcx, [rbx + rdx]
test rcx, rcx
je 0x14005768c
movzx eax, word [0x140095d94]
test r8d, r8d
mov word [rcx], ax
mov r8, rdi
movzx eax, byte [0x140095d96]
cmovns rbp, rdx
mov byte [rcx + 2], al
nop dword [rax]
inc r8
cmp byte [r8 + rbp], 0
jne 0x1400575e0
xor r9d, r9d
mov rdx, rbp
mov rcx, r15
call qword [sym.imp.WS2_32.dll_send]
movsxd rcx, eax
nop dword [rax]
inc rdi
cmp byte [rdi + rbp], 0
jne 0x140057600
cmp rcx, rdi
je 0x14005763a
cmp dword [0x1400cfe94], 1
jb 0x140057636
mov ecx, 0x1000121
call fcn.14000e3d0
test al, al
je 0x140057636
lea rdx, str.send_line:_TCP_port_write_failed_on_send__
mov ecx, 0x1000121
call fcn.14000e000
xor bl, bl
jmp 0x14005763c
mov bl, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rsi, qword [rsp + 0x78]
movzx eax, bl
mov rbx, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x70]
add rsp, 0x50
pop r15
pop r14
pop rdi
ret
lea r8, str.buf_write_buf__src__strlen_src__
mov edx, 0xd7
lea rcx, str.C:Users_vagrant_buildopenvpn_srcopenvpnproxy.c
call fcn.14000e4c0
int3
mov rcx, rbx
call fcn.140002d70
int3
call fcn.14000e540
int3
lea r8, str.buf_write_buf____r_n___3_
mov edx, 0xd8
lea rcx, str.C:Users_vagrant_buildopenvpn_srcopenvpnproxy.c
call fcn.14000e4c0
int3
Function at 0x14005ec70
Capabilities:
Get routing table

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x10], rdx
push rsi
push rdi
push r14
sub rsp, 0x30
mov rsi, rcx
mov qword [rsp + 0x20], 0
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x28], 0
call fcn.14007d870
xor ebp, ebp
mov dword [rsp + 0x58], 0
lea rdx, [rsp + 0x58]
xor ecx, ecx
mov rbx, rax
lea r8d, [rbp + 1]
call qword [sym.imp.IPHLPAPI.DLL_GetIpForwardTable]
cmp eax, 0x7a
jne 0x14005ed57
mov ecx, dword [rsp + 0x58]
add rcx, 8
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
je 0x14005ee3e
lea rbp, [rax + 8]
mov r8d, 1
mov rax, qword [rsp + 0x20]
lea rdx, [rsp + 0x58]
mov rcx, rbp
mov qword [rdi], rax
mov qword [rsp + 0x20], rdi
call qword [sym.imp.IPHLPAPI.DLL_GetIpForwardTable]
mov r14d, eax
test eax, eax
je 0x14005ed5c
cmp dword [0x1400cfe94], 3
jb 0x14005ed53
mov ecx, 3
call fcn.14000e3d0
test al, al
je 0x14005ed53
lea rdx, [rsp + 0x20]
mov ecx, r14d
call fcn.14000ebf0
mov r8, rax
lea rdx, str.NOTE:_GetIpForwardTable_returned_error:__s__code_u_
mov r9d, r14d
mov ecx, 3
call fcn.14000e000
mov rdi, qword [rsp + 0x20]
xor ebp, ebp
jmp 0x14005ed5c
mov rdi, qword [rsp + 0x20]
mov rcx, rbp
call fcn.14005ebc0
xorps xmm0, xmm0
xor ecx, ecx
movups xmmword [rsi], xmm0
movups xmmword [rsi + 0x10], xmm0
movups xmmword [rsi + 0x20], xmm0
movups xmmword [rsi + 0x30], xmm0
movups xmmword [rsi + 0x40], xmm0
mov qword [rsi + 0x50], rcx
mov dword [rsi + 0x58], ecx
test rax, rax
je 0x14005ede9
mov ecx, dword [rax + 0xc]
call qword [sym.imp.WS2_32.dll_ntohl]
mov dword [rsi + 0x10], eax
test eax, eax
je 0x14005ede9
or dword [rsi], 1
lea r9, [rsi + 0x14]
xor r8d, r8d
mov edx, eax
mov rcx, rbx
call fcn.14007dd30
cmp eax, 0xffffffff
je 0x14005ede9
or dword [rsi], 0xa
mov dword [rsi + 4], eax
test rbx, rbx
je 0x14005ede9
nop dword [rax]
cmp dword [rbx + 0x1a0], eax
je 0x14005edd2
mov rbx, qword [rbx]
test rbx, rbx
jne 0x14005edc0
jmp 0x14005ede9
mov eax, dword [rbx + 0x198]
mov dword [rsi + 8], eax
movzx eax, word [rbx + 0x19c]
or dword [rsi], 4
mov word [rsi + 0xc], ax
test rdi, rdi
je 0x14005ee04
nop
mov rbx, qword [rdi]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, rbx
test rbx, rbx
jne 0x14005edf0
mov rdi, qword [rsp + 0x28]
test rdi, rdi
je 0x14005ee2b
nop
mov rcx, qword [rdi + 0x10]
mov rbx, qword [rdi]
call qword [rdi + reloc.WS2_32.dll_htonl]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, rbx
test rbx, rbx
jne 0x14005ee10
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret
call fcn.14000e540
int3
Function at 0x14005fcb0
Capabilities:
Convert ip address from string

Disassembly:
push rbp
push rbx
push rdi
lea rbp, [rsp - 0x80]
sub rsp, 0x180
mov rax, qword [0x1400c7008]
xor rax, rsp
mov qword [rbp + 0x70], rax
movups xmm0, xmmword [rdx + 0xc]
mov qword [rsp + 0x28], 0x148
movzx eax, cl
xorps xmm1, xmm1
mov dword [rsp + 0x30], 0
neg al
mov qword [rsp + 0x64], 0
mov eax, dword [rdx + 0x1c]
mov rbx, r8
movups xmmword [rsp + 0x3c], xmm0
sbb r8d, r8d
mov r9d, reloc.WS2_32.dll_socket
movups xmm0, xmmword [rdx + 0x20]
add r8d, 4
mov word [rsp + 0x38], r9w
test byte [rdx + 8], 4
movzx edi, cl
mov ecx, dword [rbx + 0x2b0]
movaps xmmword [rsp + 0x50], xmm0
xorps xmm0, xmm0
movdqa xmmword [rsp + 0x70], xmm0
movdqa xmmword [rbp - 0x70], xmm0
movdqa xmmword [rbp - 0x50], xmm0
movdqa xmmword [rbp - 0x30], xmm0
movdqa xmmword [rbp - 0x10], xmm0
movdqa xmmword [rbp + 0x10], xmm0
movdqa xmmword [rbp + 0x30], xmm0
movdqa xmmword [rbp + 0x50], xmm0
mov dword [rsp + 0x20], r8d
mov dword [rsp + 0x4c], eax
mov dword [rsp + 0x6c], 0
movdqa xmmword [rbp - 0x80], xmm1
movdqa xmmword [rbp - 0x60], xmm1
movdqa xmmword [rbp - 0x40], xmm1
movdqa xmmword [rbp - 0x20], xmm1
movdqa xmmword [rbp], xmm1
movdqa xmmword [rbp + 0x20], xmm1
movdqa xmmword [rbp + 0x40], xmm1
mov dword [rbp + 0x60], 0
je 0x14005fd99
mov eax, dword [rdx + 0x30]
mov dword [rbp + 0x64], eax
jmp 0x14005fda0
mov dword [rbp + 0x64], 0xffffffff
mov eax, dword [rdx + 0x34]
test eax, eax
mov edx, ecx
cmovne edx, eax
cmp dword [rbx], 2
mov dword [rsp + 0x60], edx
jne 0x14005fdd0
cmp edx, ecx
jne 0x14005fdd0
lea r8, [rsp + 0x50]
mov ecx, r9d
lea rdx, str.fe80::8
call qword [sym.imp.WS2_32.dll_inet_pton]
mov edx, dword [rsp + 0x60]
cmp edx, 0xffffffff
jne 0x14005fdf1
mov rdx, qword [rbx + 0x140]
lea rcx, [rsp + 0x64]
mov r8d, 0x100
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov byte [rbp + 0x63], 0
mov r9, qword [rbx + 0x18]
lea rdx, [rsp + 0x20]
movzx ecx, dil
call fcn.14005f9e0
cmp dword [0x1400cfe94], 3
movzx ebx, al
jb 0x14005fe5a
mov ecx, 3
call fcn.14000e3d0
test al, al
je 0x14005fe57
test bl, bl
lea rax, str.succeeded
lea r9, str.failed
mov ecx, 3
cmovne r9, rax
lea r8, str.deletion
test dil, dil
lea rax, str.addition
lea rdx, str.IPv6_route__s_via_service__s
cmovne r8, rax
call fcn.14000e000
movzx eax, bl
mov rcx, qword [rbp + 0x70]
xor rcx, rsp
call fcn.140088150
add rsp, 0x180
pop rdi
pop rbx
pop rbp
ret
Function at 0x140060230
Capabilities:
Get routing table

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], rbp
push rdi
push r14
push r15
sub rsp, 0x30
xor r15d, r15d
mov r14d, edx
mov rbp, rcx
mov qword [rsp + 0x20], r15
lea rdx, [rsp + 0x60]
mov qword [rsp + 0x28], r15
xor ecx, ecx
mov dword [rsp + 0x60], r15d
lea r8d, [r15 + 1]
mov ebx, r15d
call qword [sym.imp.IPHLPAPI.DLL_GetIpForwardTable]
cmp eax, 0x7a
jne 0x1400602ea
mov ecx, dword [rsp + 0x60]
add rcx, 8
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
test rax, rax
je 0x1400603df
lea rbx, [rax + 8]
mov qword [rax], r15
mov rcx, rbx
mov qword [rsp + 0x20], rax
lea r8d, [r15 + 1]
lea rdx, [rsp + 0x60]
call qword [sym.imp.IPHLPAPI.DLL_GetIpForwardTable]
mov edi, eax
test eax, eax
je 0x1400602ea
cmp dword [0x1400cfe94], 3
jb 0x1400602e7
lea ecx, [r15 + 3]
call fcn.14000e3d0
test al, al
je 0x1400602e7
lea rdx, [rsp + 0x20]
mov ecx, edi
call fcn.14000ebf0
mov r8, rax
lea rdx, str.NOTE:_GetIpForwardTable_returned_error:__s__code_u_
mov r9d, edi
lea ecx, [r15 + 3]
call fcn.14000e000
mov rbx, r15
mov rcx, rbx
mov qword [rsp + 0x50], rsi
call fcn.14005ebc0
mov rsi, rax
test rax, rax
je 0x14006037d
mov edi, dword [rax + 0x10]
lea rcx, [rsp + 0x20]
call fcn.14007d870
mov rbx, rax
test rax, rax
je 0x140060330
cmp edi, 0xffffffff
je 0x140060330
nop dword [rax]
cmp dword [rbx + 0x1a0], edi
je 0x140060333
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140060320
mov rbx, r15
mov ecx, dword [rsi + 0x10]
lea rdx, [rsp + 0x20]
call fcn.14007d990
mov rdi, rax
test r14b, 8
je 0x140060366
test rbx, rbx
je 0x140060366
cmp dword [rbx + 0x1a8], r15d
je 0x140060366
lea rdx, [rbx + 0x218]
mov rcx, rbp
call fcn.140060170
test r14b, 0x10
je 0x14006037d
test rdi, rdi
je 0x14006037d
lea rdx, [rdi + 0x10]
mov rcx, rbp
call fcn.140060170
mov rcx, qword [rsp + 0x20]
mov rsi, qword [rsp + 0x50]
test rcx, rcx
je 0x1400603a1
nop dword [rax]
mov rbx, qword [rcx]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbx
test rbx, rbx
jne 0x140060390
mov rdi, qword [rsp + 0x28]
test rdi, rdi
je 0x1400603cb
nop dword [rax + rax]
mov rcx, qword [rdi + 0x10]
mov rbx, qword [rdi]
call qword [rdi + reloc.WS2_32.dll_htonl]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, rbx
test rbx, rbx
jne 0x1400603b0
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret
call fcn.14000e540
int3
Function at 0x1400603f0
Capabilities:
Get routing table

Disassembly:
mov qword [rsp + 0x10], rdx
push rsi
push rdi
push r12
push r13
sub rsp, 0x38
mov r12d, ecx
lea rdx, [rsp + 0x68]
xor edi, edi
mov r13d, 1
mov r8d, r13d
mov qword [rsp + 0x28], rdi
xor ecx, ecx
mov dword [rsp + 0x68], edi
call qword [sym.imp.IPHLPAPI.DLL_GetIpForwardTable]
cmp eax, 0x7a
jne 0x140060560
mov ecx, dword [rsp + 0x68]
add rcx, 8
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
je 0x14006056e
mov qword [rsp + 0x60], rbx
lea rdx, [rsp + 0x68]
mov qword [rsp + 0x70], rbp
mov r8d, r13d
lea rbp, [rax + 8]
mov qword [rax], rdi
mov rcx, rbp
mov qword [rsp + 0x20], rax
call qword [sym.imp.IPHLPAPI.DLL_GetIpForwardTable]
mov ebx, eax
test eax, eax
je 0x1400604bd
cmp dword [0x1400cfe94], 3
jb 0x140060519
lea ecx, [rdi + 3]
call fcn.14000e3d0
test al, al
je 0x140060519
lea rdx, [rsp + 0x20]
mov ecx, ebx
call fcn.14000ebf0
mov r8, rax
lea rdx, str.NOTE:_GetIpForwardTable_returned_error:__s__code_u_
mov r9d, ebx
lea ecx, [rdi + 3]
call fcn.14000e000
mov rdi, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x20]
jmp 0x140060519
test rbp, rbp
je 0x140060519
mov ebx, edi
cmp dword [rbp], ebx
jbe 0x140060519
mov qword [rsp + 0x78], r14
lea r14, [rbp + 4]
mov qword [rsp + 0x30], r15
mov ecx, dword [r14]
call qword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [r14 + 4]
mov r15d, eax
call qword [sym.imp.WS2_32.dll_ntohl]
cmp eax, 0x80000000
jbe 0x1400604fc
and eax, r12d
cmp eax, r15d
je 0x140060509
inc ebx
add r14, 0x38
cmp ebx, dword [rbp]
jb 0x1400604d7
jmp 0x14006050f
mov r13d, 2
mov r14, qword [rsp + 0x78]
mov r15, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x70]
test rsi, rsi
je 0x140060537
mov rbx, qword [rsi]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rsi, rbx
test rbx, rbx
jne 0x140060523
test rdi, rdi
je 0x14006055b
nop dword [rax]
mov rcx, qword [rdi + 0x10]
mov rbx, qword [rdi]
call qword [rdi + reloc.WS2_32.dll_htonl]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, rbx
test rbx, rbx
jne 0x140060540
mov rbx, qword [rsp + 0x60]
mov eax, r13d
add rsp, 0x38
pop r13
pop r12
pop rdi
pop rsi
ret
call fcn.14000e540
int3
Function at 0x140061d80
Capabilities:
Convert ip address from string

Disassembly:
sub rsp, 0x48
mov rax, qword [0x1400c7008]
xor rax, rsp
mov qword [rsp + 0x30], rax
test rcx, rcx
je 0x140061dda
mov rax, 0xffffffffffffffff
nop
inc rax
cmp byte [rcx + rax], 0
jne 0x140061da0
cmp rax, 0x41
ja 0x140061dda
mov rdx, rcx
lea r8, [rsp + 0x20]
mov ecx, reloc.WS2_32.dll_socket
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
sete al
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.140088150
add rsp, 0x48
ret
xor al, al
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.140088150
add rsp, 0x48
ret
Function at 0x140061ed0
Capabilities:
Set socket configuration

Disassembly:
test rdx, rdx
je 0x1400620d6
push rbp
push rdi
mov rbp, rsp
sub rsp, 0x58
mov qword [rsp + 0x70], rbx
lea rax, [rbp + 0x20]
mov qword [rsp + 0x50], rsi
lea r9, [rbp + 0x28]
movsxd rsi, ecx
mov rdi, rdx
mov rcx, rsi
mov qword [rsp + 0x40], r15
mov edx, 0xffff
mov dword [rbp + 0x20], 4
mov r8d, 0x1001
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_getsockopt]
xor ebx, ebx
test eax, eax
jne 0x140061f2f
cmp dword [rbp + 0x20], 4
mov r15d, dword [rbp + 0x28]
je 0x140061f32
mov r15d, ebx
lea rax, [rbp + 0x20]
mov qword [rsp + 0x48], r14
lea r9, [rbp + 0x28]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov dword [rbp + 0x20], 4
mov r8d, 0x1002
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x140061f6d
cmp dword [rbp + 0x20], 4
mov r14d, dword [rbp + 0x28]
je 0x140061f70
mov r14d, ebx
mov eax, dword [rdi + 4]
test eax, eax
je 0x140061fc1
lea r9, [rbp + 0x20]
mov dword [rbp + 0x20], eax
mov edx, 0xffff
mov dword [rsp + 0x20], 4
mov r8d, 0x1001
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x140061fc1
mov ecx, 0x40
call fcn.14000e3d0
test al, al
je 0x140061fc1
mov r8d, dword [rbp + 0x20]
lea rdx, str.NOTE:_setsockopt_SO_SNDBUF_d_failed
mov ecx, 0x40
call fcn.14000e000
mov eax, dword [rdi]
test eax, eax
je 0x140062011
lea r9, [rbp + 0x20]
mov dword [rbp + 0x20], eax
mov edx, 0xffff
mov dword [rsp + 0x20], 4
mov r8d, 0x1002
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x140062011
mov ecx, 0x40
call fcn.14000e3d0
test al, al
je 0x140062011
mov r8d, dword [rbp + 0x20]
lea rdx, str.NOTE:_setsockopt_SO_RCVBUF_d_failed
mov ecx, 0x40
call fcn.14000e000
cmp dword [0x1400cfe94], 3
jb 0x1400620bc
mov ecx, 0x2b000003
call fcn.14000e3d0
test al, al
je 0x1400620bc
lea rax, [rbp + 0x20]
mov dword [rbp + 0x20], 4
lea r9, [rbp + 0x30]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov r8d, 0x1001
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x140062065
cmp dword [rbp + 0x20], 4
mov edi, dword [rbp + 0x30]
je 0x140062067
mov edi, ebx
lea rax, [rbp + 0x28]
mov dword [rbp + 0x28], 4
lea r9, [rbp - 0x28]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov r8d, 0x1002
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x14006209c
cmp dword [rbp + 0x28], 4
jne 0x14006209c
mov ebx, dword [rbp - 0x28]
mov dword [rsp + 0x28], edi
lea rdx, str.Socket_Buffers:_R__d___d__S__d___d_
mov r9d, ebx
mov dword [rsp + 0x20], r15d
mov r8d, r14d
mov ecx, 0x2b000003
call fcn.14000e000
mov r15, qword [rsp + 0x40]
mov r14, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x70]
add rsp, 0x58
pop rdi
pop rbp
ret
Function at 0x1400620e0
Capabilities:
Create udp socket

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x60
mov r8d, dword [rdx + 0xc]
mov rdi, rdx
mov rbx, rcx
cmp r8d, 0x11
je 0x140062131
mov eax, dword [rdx + 8]
cmp eax, 2
je 0x140062131
cmp eax, 1
je 0x14006211d
lea rcx, str.C:Users_vagrant_buildopenvpn_srcopenvpn_socket.c
cmp r8d, 6
je 0x1400621fe
jmp 0x1400621ec
mov ecx, dword [rdi + 4]
mov edx, 1
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbx + 0x30], rax
jmp 0x140062180
cmp dword [rdx + 8], 2
jne 0x140062210
mov ecx, dword [rdi + 4]
mov edx, 2
call qword [sym.imp.WS2_32.dll_socket]
or dword [rbx + 0x1c0], 0x10
cmp qword [rbx + 0x268], 0
mov qword [rbx + 0x30], rax
je 0x140062180
movups xmm0, xmmword [rdi]
mov edx, 1
movups xmmword [rsp + 0x30], xmm0
mov ecx, dword [rsp + 0x34]
lea r8d, [rdx + 5]
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbx + 0x38], rax
mov eax, dword [rbx + 0x30]
lea rdx, [rbx + 0x1b4]
mov ecx, eax
call fcn.140061ed0
cmp byte [rbx + 0x1a0], 0
movzx eax, word [rdi + 4]
je 0x1400621e1
cmp qword [rbx + 0x268], 0
je 0x1400621c0
cmp dword [rbx + 0x24], 1
jne 0x1400621c0
mov rcx, qword [rbx + 0x38]
lea r9, str.SOCKS
mov r8d, eax
mov byte [rsp + 0x20], 0
jmp 0x1400621d6
mov rcx, qword [rbx + 0x30]
lea r9, str.TCP_UDP
mov r8d, eax
movzx eax, byte [rbx + 0x2a]
mov byte [rsp + 0x20], al
mov rdx, qword [rbx]
mov rdx, qword [rdx]
call fcn.140062930
mov rbx, qword [rsp + 0x70]
add rsp, 0x60
pop rdi
ret
lea r8, [0x14008b3f4]
mov edx, 0x477
call fcn.14000e4c0
int3
lea r8, str.addrinfo__ai_socktype__SOCK_STREAM
mov edx, 0x3f7
call fcn.14000e4c0
int3
lea r8, str.addrinfo__ai_socktype__SOCK_DGRAM
mov edx, 0x417
lea rcx, str.C:Users_vagrant_buildopenvpn_srcopenvpn_socket.c
call fcn.14000e4c0
int3
Function at 0x140062230
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rsi
push rdi
push r14
sub rsp, 0x30
xor esi, esi
movzx r14d, r9b
mov qword [rsp + 0x20], rsi
mov ebx, esi
mov qword [rsp + 0x28], rbx
mov rdi, rdx
mov rbp, rcx
test r8b, r8b
je 0x1400622db
test rdx, rdx
je 0x14006237e
cmp dword [0x1400cfe94], 1
jb 0x1400622b2
lea ecx, [rsi + 1]
call fcn.14000e3d0
test al, al
je 0x1400622b2
mov rcx, qword [rdi + 0x20]
lea r9, [rsp + 0x20]
lea r8d, [rsi + 2]
lea rdx, [0x14009b168]
call fcn.140064eb0
mov r8, rax
lea rdx, str.Listening_for_incoming_TCP_connection_on__s
lea ecx, [rsi + 1]
call fcn.14000e000
mov rbx, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x20]
mov edx, 0x20
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1400622db
mov ecx, 0x110
call fcn.14000e3d0
test al, al
je 0x14006231e
lea rdx, str.TCP:_listen___failed
jmp 0x140062314
test r14b, r14b
je 0x14006232a
movsxd rcx, ebp
lea r8, [rsp + 0x60]
mov edx, 0x8004667e
mov dword [rsp + 0x60], 1
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x14006232a
mov ecx, 0x110
call fcn.14000e3d0
test al, al
je 0x14006231e
lea rdx, str.Set_socket_to_non_blocking_mode_failed
mov ecx, 0x110
call fcn.14000e000
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
int3
test rsi, rsi
je 0x140062344
nop
mov rdi, qword [rsi]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rsi, rdi
test rdi, rdi
jne 0x140062330
test rbx, rbx
je 0x14006236b
nop dword [rax]
mov rcx, qword [rbx + 0x10]
mov rdi, qword [rbx]
call qword [rbx + reloc.WS2_32.dll_htonl]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, rdi
test rdi, rdi
jne 0x140062350
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret
lea r8, str.local
mov edx, 0x4ad
lea rcx, str.C:Users_vagrant_buildopenvpn_srcopenvpn_socket.c
call fcn.14000e4c0
int3
Function at 0x140062930
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x40
xor eax, eax
mov r14, r9
mov qword [rsp + 0x30], rax
mov edi, r8d
mov qword [rsp + 0x38], rax
mov rsi, rdx
mov rbp, rcx
test rdx, rdx
je 0x140062a91
mov qword [rsp + 0x60], rbx
mov rbx, rdx
cmp dword [rbx + 4], edi
je 0x14006299a
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x140062966
lea ecx, [rbx + 0x10]
call fcn.14000e3d0
test al, al
je 0x140062a72
mov ecx, edi
call fcn.140065a50
lea rdx, str._s:_Socket_bind_failed:_Addr_to_bind_has_no__s_record
lea ecx, [rbx + 0x10]
jmp 0x140062a67
cmp edi, 0x17
jne 0x140062a1d
cmp byte [rsp + 0x80], al
setne al
cmp dword [0x1400cfe94], 1
mov dword [rsp + 0x68], eax
jb 0x1400629d6
lea ecx, [rdi - 0x16]
call fcn.14000e3d0
test al, al
je 0x1400629d6
mov r8d, dword [rsp + 0x68]
lea rdx, str.setsockopt_IPV6_V6ONLY_d_
lea ecx, [rdi - 0x16]
call fcn.14000e000
mov edx, 0x29
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x68]
mov rcx, rbp
lea r8d, [rdx - 0xe]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x140062a1d
mov ecx, pe_nt_image_headers64
call fcn.14000e3d0
test al, al
je 0x140062a1d
mov r8d, dword [rsp + 0x68]
lea rdx, str.Setting_IPV6_V6ONLY_d_failed
mov ecx, pe_nt_image_headers64
call fcn.14000e000
mov r8d, dword [rbx + 0x10]
mov rcx, rbp
mov rdx, qword [rbx + 0x20]
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x140062a7e
mov ecx, 0x110
call fcn.14000e3d0
test al, al
je 0x140062a72
mov rcx, qword [rsi + 0x20]
lea r9, [rsp + 0x30]
mov r8d, 2
lea rdx, [0x14009b168]
call fcn.140064eb0
lea rdx, str._s:_Socket_bind_failed_on_local_address__s
mov ecx, 0x110
mov r9, rax
mov r8, r14
call fcn.14000e000
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
int3
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x70]
add rsp, 0x40
pop r14
pop rdi
pop rsi
ret
lea r8, str.local
mov edx, 0x586
lea rcx, str.C:Users_vagrant_buildopenvpn_srcopenvpn_socket.c
call fcn.14000e4c0
int3
Function at 0x140062ab0
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
push rbx
push rsi
push rdi
push r14
push r15
sub rsp, 0x270
mov rax, qword [0x1400c7008]
xor rax, rsp
mov qword [rsp + 0x250], rax
movsxd r14, ecx
mov edi, r8d
mov rbx, rdx
mov dword [rsp + 0x30], 1
mov r15, rcx
lea r8, [rsp + 0x30]
mov rcx, r14
mov edx, 0x8004667e
mov rsi, r9
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x140062b2a
mov ecx, 0x110
call fcn.14000e3d0
test al, al
je 0x140062b1e
lea rdx, str.Set_socket_to_non_blocking_mode_failed
mov ecx, 0x110
call fcn.14000e000
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
int3
movzx eax, word [rbx]
mov qword [rsp + 0x260], r12
xor r12d, r12d
cmp ax, 2
je 0x140062b4e
cmp ax, 0x17
mov r8d, 0x1c
cmovne r8d, r12d
jmp 0x140062b54
mov r8d, reloc.WS2_32.dll_recv
mov rdx, rbx
mov rcx, r15
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x140062b6a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2733
jne 0x140062c48
mov qword [rsp + 0x268], rbp
nop dword [rax]
mov eax, r12d
mov qword [rsp + 0x48], r14
test edi, edi
mov dword [rsp + 0x40], 1
lea r8, [rsp + 0x40]
mov dword [rsp + 0x3c], r12d
setg al
lea ecx, [r15 + 1]
mov dword [rsp + 0x38], eax
xor r9d, r9d
lea rax, [rsp + 0x38]
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
mov ebx, eax
test rsi, rsi
je 0x140062bd0
call fcn.140084ad0
mov dword [rsi], eax
mov ecx, dword [rsi]
test ecx, ecx
jne 0x140062bed
test ebx, ebx
js 0x140062c3a
jg 0x140062bf9
sub edi, 1
js 0x140062bf2
cmp qword [0x1400cfe58], r12
je 0x140062b80
xor edx, edx
call fcn.140026d50
jmp 0x140062b80
mov eax, r12d
jmp 0x140062c40
mov eax, 0x274c
jmp 0x140062c40
lea rax, [rsp + 0x34]
mov dword [rsp + 0x30], r12d
lea r9, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov dword [rsp + 0x34], 4
mov r8d, 0x1007
mov rcx, r15
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x140062c3a
cmp dword [rsp + 0x34], 4
jne 0x140062c3a
mov eax, dword [rsp + 0x30]
jmp 0x140062c40
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rbp, qword [rsp + 0x268]
mov r12, qword [rsp + 0x260]
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.140088150
add rsp, 0x270
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret