joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5955d0
Capabilities:
Initialize winsock library

Disassembly:
push r13
push r12
push rdi
push rbx
sub rsp, 0x48
mov r12d, dword [0x00a59738]
mov qword [rsp + 0x30], 0
mov rbx, rcx
mov r13, rdx
test r12d, r12d
je 0x595680
lea rax, [rsp + 0x30]
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x28], rax
mov rcx, rbx
mov dword [rsp + 0x20], 1
call sym.BIO_lookup
mov r12d, eax
test eax, eax
je 0x595700
mov rcx, qword [rsp + 0x30]
call sym.BIO_ADDRINFO_family
cmp eax, 2
je 0x595728
mov dword [rsp + 0x20], 0x28
mov ecx, 0x20
mov edx, 0x6a
lea r9, [0x0092fbc0]
mov r8d, 0x6b
xor r12d, r12d
call sym.ERR_put_error
mov rcx, qword [rsp + 0x30]
call sym.BIO_ADDRINFO_free
mov eax, r12d
add rsp, 0x48
pop rbx
pop rdi
pop r12
pop r13
ret
lea rdx, [0x00a595a0]
xor eax, eax
mov ecx, 0x33
mov dword [0x00a59738], 1
mov rdi, rdx
rep stosq qword [rdi], rax
mov ecx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x5955f9
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 9
mov ecx, 2
mov dword [rsp + 0x20], 0x87
mov r8d, eax
lea r9, [0x0092fbc0]
call sym.ERR_put_error
mov r8d, 0x7a
mov edx, 0x70
mov dword [rsp + 0x20], 0x88
lea r9, [0x0092fbc0]
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x595714
mov r8, rbx
lea rdx, [0x0092fbd4]
mov ecx, 2
call sym.ERR_add_error_data
mov eax, r12d
add rsp, 0x48
pop rbx
pop rdi
pop r12
pop r13
ret
mov rcx, qword [rsp + 0x30]
lea rbx, [rsp + 0x38]
call sym.BIO_ADDRINFO_address
mov r8, rbx
xor edx, edx
mov rcx, rax
call sym.BIO_ADDR_rawaddress
mov rcx, qword [rsp + 0x30]
mov r12d, eax
test eax, eax
je 0x595668
xor r12d, r12d
cmp qword [rsp + 0x38], 4
jne 0x595668
call sym.BIO_ADDRINFO_address
mov r8, rbx
mov rdx, r13
mov rcx, rax
call sym.BIO_ADDR_rawaddress
mov rcx, qword [rsp + 0x30]
mov r12d, eax
jmp 0x595668
Function at 0x595790
Capabilities:
Initialize winsock library

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x48
mov qword [rsp + 0x38], 0
mov rbx, rcx
mov rsi, rdx
test rcx, rcx
je 0x5958f8
mov r12d, dword [0x00a59738]
test r12d, r12d
je 0x595848
lea rax, [rsp + 0x38]
mov r9d, 2
xor r8d, r8d
xor ecx, ecx
mov qword [rsp + 0x28], rax
mov rdx, rbx
mov dword [rsp + 0x20], 1
call sym.BIO_lookup
mov r12d, eax
test eax, eax
je 0x5958d0
mov rcx, qword [rsp + 0x38]
call sym.BIO_ADDRINFO_family
cmp eax, 2
je 0x595930
mov dword [rsp + 0x20], 0x49
lea r9, [0x0092fbc0]
mov r8d, 0x8d
xor r12d, r12d
mov edx, 0x6b
mov ecx, 0x20
call sym.ERR_put_error
mov rcx, qword [rsp + 0x38]
call sym.BIO_ADDRINFO_free
mov eax, r12d
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop r12
ret
lea rdx, [0x00a595a0]
xor eax, eax
mov ecx, 0x33
mov dword [0x00a59738], 1
mov rdi, rdx
rep stosq qword [rdi], rax
mov ecx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x5957c1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 9
mov ecx, 2
mov dword [rsp + 0x20], 0x87
mov r8d, eax
lea r9, [0x0092fbc0]
call sym.ERR_put_error
mov r8d, 0x7a
mov edx, 0x70
mov dword [rsp + 0x20], 0x88
lea r9, [0x0092fbc0]
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x5958e4
mov r8, rbx
lea rdx, [0x0092fbd4]
mov ecx, 2
call sym.ERR_add_error_data
mov eax, r12d
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop r12
ret
mov dword [rsp + 0x20], 0x40
lea r9, [0x0092fbc0]
mov r8d, 0x71
xor r12d, r12d
mov edx, 0x6b
mov ecx, 0x20
call sym.ERR_put_error
mov eax, r12d
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop r12
ret
mov rcx, qword [rsp + 0x38]
mov r12d, 1
call sym.BIO_ADDRINFO_address
mov rcx, rax
call sym.BIO_ADDR_rawport
movzx ecx, ax
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rsi], ax
jmp 0x59582b

Function at 0x5959d0
Capabilities:
Initialize winsock library

Disassembly:
push rdi
sub rsp, 0x30
mov eax, dword [0x00a59738]
test eax, eax
je 0x5959f0
mov eax, 1
add rsp, 0x30
pop rdi
ret
lea rdx, [0x00a595a0]
xor eax, eax
mov ecx, 0x33
mov dword [0x00a59738], 1
mov rdi, rdx
rep stosq qword [rdi], rax
mov ecx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x5959df
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 9
mov ecx, 2
mov dword [rsp + 0x20], 0x87
mov r8d, eax
lea r9, [0x0092fbc0]
call sym.ERR_put_error
mov r8d, 0x7a
mov edx, 0x70
mov dword [rsp + 0x20], 0x88
lea r9, [0x0092fbc0]
mov ecx, 0x20
call sym.ERR_put_error
mov eax, 0xffffffff
jmp 0x5959e4

Function at 0x595ab0
Capabilities:
Set socket configuration

Disassembly:
push r12
sub rsp, 0x30
movsxd rcx, ecx
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov r12d, eax
test eax, eax
js 0x595ad0
mov eax, r12d
add rsp, 0x30
pop r12
ret
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 5
mov ecx, 2
mov dword [rsp + 0x20], 0xc3
mov r8d, eax
lea r9, [0x0092fbc0]
call sym.ERR_put_error
mov eax, r12d
add rsp, 0x30
pop r12
ret
Function at 0x595b10
Capabilities:
Initialize winsock library

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x58
mov r9d, 1
mov qword [rsp + 0x38], 0
mov ebx, edx
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x38]
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x48], 0
call sym.BIO_parse_hostserv
test eax, eax
je 0x595ce0
mov eax, dword [0x00a59738]
test eax, eax
je 0x595c58
lea rax, [rsp + 0x48]
mov dword [rsp + 0x20], 1
mov rdx, qword [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov rcx, qword [rsp + 0x38]
mov r8d, 1
call sym.BIO_lookup
test eax, eax
je 0x595be0
mov r12d, 0xffffffff
mov rcx, qword [rsp + 0x48]
call sym.BIO_ADDRINFO_free
mov rcx, qword [rsp + 0x38]
mov r8d, 0xe5
lea rdx, [0x0092fbc0]
call sym.CRYPTO_free
mov rcx, qword [rsp + 0x40]
mov r8d, 0xe6
lea rdx, [0x0092fbc0]
call sym.CRYPTO_free
mov eax, r12d
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop r12
ret
mov rcx, qword [rsp + 0x48]
call sym.BIO_ADDRINFO_protocol
mov rcx, qword [rsp + 0x48]
mov esi, eax
call sym.BIO_ADDRINFO_socktype
mov rcx, qword [rsp + 0x48]
mov r12d, eax
call sym.BIO_ADDRINFO_family
mov edx, r12d
xor r9d, r9d
mov r8d, esi
mov ecx, eax
call sym.BIO_socket
mov r12d, eax
cmp eax, 0xffffffff
je 0x595b8f
mov rcx, qword [rsp + 0x48]
call sym.BIO_ADDRINFO_address
xor r8d, r8d
test ebx, ebx
mov ecx, r12d
setne r8b
mov rdx, rax
call sym.BIO_listen
test eax, eax
jne 0x595b95
mov ecx, r12d
call sym.BIO_closesocket
jmp 0x595b8f
lea rdx, [0x00a595a0]
xor eax, eax
mov ecx, 0x33
mov dword [0x00a59738], 1
mov rdi, rdx
rep stosq qword [rdi], rax
mov ecx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x595b61
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 9
mov ecx, 2
mov dword [rsp + 0x20], 0x87
mov r8d, eax
lea r9, [0x0092fbc0]
mov r12d, 0xffffffff
call sym.ERR_put_error
mov r8d, 0x7a
mov edx, 0x70
mov dword [rsp + 0x20], 0x88
lea r9, [0x0092fbc0]
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x595bcd
mov r12d, 0xffffffff
jmp 0x595bcd

Function at 0x595f10
Capabilities:
Set socket configuration

Disassembly:
sub rsp, 0x38
mov r8d, 1
mov dword [rsp + 0x48], edx
movsxd rcx, ecx
lea r9, [rsp + 0x48]
mov edx, 6
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
sete al
movzx eax, al
add rsp, 0x38
ret

Function at 0x595f50
Capabilities:
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x40
mov dword [rsp + 0x3c], edx
movsxd rcx, ecx
lea r8, [rsp + 0x3c]
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov ebx, eax
test eax, eax
js 0x595f80
xor eax, eax
test ebx, ebx
sete al
add rsp, 0x40
pop rbx
ret
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 5
mov ecx, 2
mov dword [rsp + 0x20], 0xc3
mov r8d, eax
lea r9, [0x0092fbc0]
call sym.ERR_put_error
xor eax, eax
test ebx, ebx
sete al
add rsp, 0x40
pop rbx
ret
Function at 0x595fc0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push rbx
sub rsp, 0x40
mov ebx, ecx
test edx, edx
jne 0x596030
mov rcx, qword [r8]
mov dword [rsp + 0x3c], 0x1c
call sym.BIO_ADDR_sockaddr_noconst
movsxd rcx, ebx
lea r8, [rsp + 0x3c]
mov rdx, rax
call qword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x596060
cmp dword [rsp + 0x3c], 0x1c
mov eax, 1
jbe 0x59602a
mov r8d, 0x85
mov edx, 0x8d
mov ecx, 0x20
mov dword [rsp + 0x20], 0x165
lea r9, [0x0092fbc0]
call sym.ERR_put_error
nop dword [rax]
xor eax, eax
add rsp, 0x40
pop rbx
ret
mov r8d, 0x8c
mov edx, 0x8d
mov ecx, 0x20
mov dword [rsp + 0x20], 0x16b
lea r9, [0x0092fbc0]
call sym.ERR_put_error
jmp 0x596028
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 0x10
mov ecx, 2
mov dword [rsp + 0x20], 0x160
mov r8d, eax
lea r9, [0x0092fbc0]
call sym.ERR_put_error
mov r8d, 0x84
mov edx, 0x8d
mov dword [rsp + 0x20], 0x161
lea r9, [0x0092fbc0]
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x596028
Function at 0x596150
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push r13
push r12
push rsi
push rbx
sub rsp, 0x48
movsxd r12, ecx
mov dword [rsp + 0x3c], 1
mov r13, rdx
mov esi, r8d
cmp r12d, 0xffffffff
je 0x596288
mov edx, r8d
mov ecx, r12d
shr edx, 3
and edx, 1
call sym.BIO_socket_nbio
test eax, eax
je 0x596274
test sil, 4
jne 0x596200
and esi, 0x10
je 0x5961c2
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x3c]
mov edx, 6
mov rcx, r12
mov r8d, 1
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x596328
mov rcx, r13
call sym.BIO_ADDR_sockaddr_size
mov rcx, r13
mov ebx, eax
call sym.BIO_ADDR_sockaddr
mov rcx, r12
mov r8d, ebx
mov r12d, 1
mov rdx, rax
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x5962c0
mov eax, r12d
add rsp, 0x48
pop rbx
pop rsi
pop r12
pop r13
ret
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x3c]
mov edx, 0xffff
mov rcx, r12
mov r8d, 8
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x596194
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 0xe
mov ecx, 2
mov dword [rsp + 0x20], 0x5c
mov r8d, eax
lea r9, str.crypto_bio_b_sock2.c
call sym.ERR_put_error
mov r8d, 0x89
mov edx, 0x8a
mov dword [rsp + 0x20], 0x5d
lea r9, str.crypto_bio_b_sock2.c
mov ecx, 0x20
call sym.ERR_put_error
xor r12d, r12d
mov eax, r12d
add rsp, 0x48
pop rbx
pop rsi
pop r12
pop r13
ret
mov dword [rsp + 0x20], 0x52
lea r9, str.crypto_bio_b_sock2.c
mov r8d, 0x87
xor r12d, r12d
mov edx, 0x8a
mov ecx, 0x20
call sym.ERR_put_error
mov eax, r12d
add rsp, 0x48
pop rbx
pop rsi
pop r12
pop r13
ret
mov ecx, 0xffffffff
call sym.BIO_sock_should_retry
mov r12d, eax
test eax, eax
jne 0x596274
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 2
mov ecx, 2
mov dword [rsp + 0x20], 0x6e
mov r8d, eax
lea r9, str.crypto_bio_b_sock2.c
call sym.ERR_put_error
mov r8d, 0x67
mov edx, 0x8a
mov dword [rsp + 0x20], 0x6f
lea r9, str.crypto_bio_b_sock2.c
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x5961f2
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsp + 0x20], 0x65
mov edx, 0xe
xor r12d, r12d
mov r8d, eax
lea r9, str.crypto_bio_b_sock2.c
mov ecx, 2
call sym.ERR_put_error
mov r8d, 0x8a
mov edx, 0x8a
mov dword [rsp + 0x20], 0x66
lea r9, str.crypto_bio_b_sock2.c
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x5961f2
Function at 0x599fa0
Capabilities:
Read file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov rbx, rcx
mov rcx, rdx
mov eax, dword [rbx + 0x20]
test eax, eax
je 0x599fb9
test rdx, rdx
jne 0x599fd0
xor r12d, r12d
mov eax, r12d
add rsp, 0x38
pop rbx
pop r12
ret
mov r9, qword [rbx + 0x38]
movsxd r8, r8d
mov edx, 1
call sym.fread
mov rcx, qword [rbx + 0x38]
mov r12d, eax
call sym.ferror
test eax, eax
je 0x599fbc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 0xb
mov ecx, 2
mov dword [rsp + 0x20], 0x95
mov r8d, eax
lea r9, str.crypto_bio_bss_file.c
mov r12d, 0xffffffff
call sym.ERR_put_error
mov r8d, 2
mov edx, 0x82
mov dword [rsp + 0x20], 0x96
lea r9, str.crypto_bio_bss_file.c
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x599fbc

Function at 0x59a050
Capabilities:
Write file on windows

Disassembly:
push r12
sub rsp, 0x20
cmp byte [rdx], 0
mov r8, rcx
mov rcx, rdx
je 0x59a0c8
mov rax, rdx
xor edx, edx
jmp 0x59a078
cmp edx, 0x80000000
je 0x59a0c8
add rax, 1
add edx, 1
cmp byte [rax], 0
jne 0x59a070
and edx, 0x7fffffff
mov r12d, edx
mov eax, dword [r8 + 0x20]
test eax, eax
jne 0x59a0a8
xor r12d, r12d
mov eax, r12d
add rsp, 0x20
pop r12
ret
mov r9, qword [r8 + 0x38]
mov r8d, 1
call sym.fwrite
test eax, eax
je 0x59a095
mov eax, r12d
add rsp, 0x20
pop r12
ret
xor edx, edx
xor r12d, r12d
jmp 0x59a08d

Function at 0x59a0d0
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x20
mov eax, dword [rcx + 0x20]
mov r10, rdx
mov ebx, r8d
test eax, eax
je 0x59a0e7
test rdx, rdx
jne 0x59a0f0
xor eax, eax
add rsp, 0x20
pop rbx
ret
mov r9, qword [rcx + 0x38]
movsxd rdx, r8d
mov rcx, r10
mov r8d, 1
call sym.fwrite
mov r8, rax
mov eax, ebx
test r8d, r8d
je 0x59a0e7
add rsp, 0x20
pop rbx
ret

Function at 0x59a580
Capabilities:
Check if file exists

Disassembly:
push r13
push r12
push rsi
push rbx
sub rsp, 0x38
mov r12, rdx
mov rsi, rcx
call sym.openssl_fopen
mov edx, 0x62
mov rcx, r12
mov r13, rax
call sym.strchr
cmp rax, 1
sbb ebx, ebx
and ebx, 0x10
add ebx, 1
test r13, r13
je 0x59a600
lea rcx, [0x0092fe60]
call sym.BIO_new
mov r12, rax
test rax, rax
je 0x59a698
xor edx, edx
mov rcx, rax
call sym.BIO_clear_flags
mov r9, r13
mov r8d, ebx
mov edx, 0x6a
mov rcx, r12
call sym.BIO_ctrl
mov rax, r12
add rsp, 0x38
pop rbx
pop rsi
pop r12
pop r13
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 1
mov ecx, 2
mov dword [rsp + 0x20], 0x45
mov r8d, eax
lea r9, str.crypto_bio_bss_file.c
call sym.ERR_put_error
lea rax, [0x0092fd92]
mov qword [rsp + 0x20], r12
mov r8, rsi
mov qword [rsp + 0x28], rax
lea r9, [0x0092fd86]
mov ecx, 5
lea rdx, str.fopen_
call sym.ERR_add_error_data
mov rbx, qword [sym.imp.msvcrt.dll__errno]
call rbx
cmp dword [rax], 2
je 0x59a668
call rbx
cmp dword [rax], 6
jne 0x59a6a8
mov dword [rsp + 0x20], 0x4c
lea r9, str.crypto_bio_bss_file.c
mov r8d, pe_nt_image_headers64
xor r12d, r12d
mov edx, 0x6d
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x59a5eb
mov rcx, r13
call sym.fclose
jmp 0x59a5eb
mov dword [rsp + 0x20], 0x4e
lea r9, str.crypto_bio_bss_file.c
mov r8d, 2
xor r12d, r12d
mov edx, 0x6d
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x59a5eb
Function at 0x59b140
Capabilities:
Send data
Send data on socket

Disassembly:
push r13
push r12
push rbx
sub rsp, 0x20
cmp byte [rdx], 0
mov r12, rcx
mov r13, rdx
je 0x59b220
mov rax, rdx
xor r8d, r8d
jmp 0x59b16d
cmp r8d, 0x80000000
je 0x59b220
add rax, 1
add r8d, 1
cmp byte [rax], 0
jne 0x59b160
mov ebx, r8d
and ebx, 0x7fffffff
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rdx, r13
movsxd rcx, dword [r12 + 0x30]
xor r9d, r9d
mov r8d, ebx
call qword [sym.imp.WS2_32.dll_send]
mov edx, 0xf
mov rcx, r12
mov r13d, eax
call sym.BIO_clear_flags
test r13d, r13d
jle 0x59b1c8
mov eax, r13d
add rsp, 0x20
pop rbx
pop r12
pop r13
ret
lea eax, [r13 + 1]
cmp eax, 1
ja case.0x59b212.104
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x8c
jg 0x59b214
cmp eax, 0x66
jg 0x59b1fc
cmp eax, 4
je case.0x59b212.103
cmp eax, 0xb
jne case.0x59b212.104
mov edx, 0xa
mov rcx, r12
call sym.BIO_set_flags
jmp case.0x59b212.104
sub eax, 0x67
cmp eax, 0x25
ja case.0x59b212.104
lea rdx, [0x00930020]
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
cmp eax, 0x2733
jne case.0x59b212.104
jmp case.0x59b212.103
xor ebx, ebx
jmp 0x59b183

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

Disassembly:
push r13
push r12
push rbx
sub rsp, 0x20
mov r13, rcx
mov r12, rdx
mov ebx, r8d
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rdx, r12
movsxd rcx, dword [r13 + 0x30]
xor r9d, r9d
mov r8d, ebx
call qword [sym.imp.WS2_32.dll_send]
mov edx, 0xf
mov rcx, r13
mov r12d, eax
call sym.BIO_clear_flags
test r12d, r12d
jle 0x59b280
mov eax, r12d
add rsp, 0x20
pop rbx
pop r12
pop r13
ret
lea eax, [r12 + 1]
cmp eax, 1
ja case.0x59b2ce.104
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x8c
jg 0x59b2d0
cmp eax, 0x66
jg 0x59b2b8
cmp eax, 4
je case.0x59b2ce.103
cmp eax, 0xb
jne case.0x59b2ce.104
mov edx, 0xa
mov rcx, r13
call sym.BIO_set_flags
jmp case.0x59b2ce.104
sub eax, 0x67
cmp eax, 0x25
ja case.0x59b2ce.104
lea rdx, [0x009300b8]
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
cmp eax, 0x2733
jne case.0x59b2ce.104
jmp case.0x59b2ce.103
Function at 0x59b2e0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push r14
push r13
push r12
push rbx
sub rsp, 0x28
xor r12d, r12d
mov r14, rcx
mov r13, rdx
mov ebx, r8d
test rdx, rdx
je 0x59b32c
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
movsxd rcx, dword [r14 + 0x30]
xor r9d, r9d
mov rdx, r13
mov r8d, ebx
call qword [sym.imp.WS2_32.dll_recv]
mov edx, 0xf
mov rcx, r14
mov r12d, eax
call sym.BIO_clear_flags
test r12d, r12d
jle 0x59b340
mov eax, r12d
add rsp, 0x28
pop rbx
pop r12
pop r13
pop r14
ret
lea eax, [r12 + 1]
cmp eax, 1
jbe 0x59b370
test r12d, r12d
jne 0x59b32c
or dword [r14 + 0x28], 0x800
mov eax, r12d
add rsp, 0x28
pop rbx
pop r12
pop r13
pop r14
ret
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x8c
jg 0x59b3c0
cmp eax, 0x66
jg 0x59b3a0
cmp eax, 4
je case.0x59b3b6.103
cmp eax, 0xb
jne case.0x59b3b6.104
mov edx, 9
mov rcx, r14
call sym.BIO_set_flags
jmp 0x59b32c
sub eax, 0x67
cmp eax, 0x25
ja case.0x59b3b6.104
lea rdx, [0x00930150]
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
cmp eax, 0x2733
jne case.0x59b3b6.104
jmp case.0x59b3b6.103

Function at 0x59e2a0
Capabilities:
Encode data using xor

Disassembly:
push rbx
mov rax, rdx
cmp rdx, r8
je 0x59e3ba
mov r11, rcx
sub rcx, 1
not r11
and rcx, r11
shr rcx, 0x3f
lea r11, [rcx - 1]
mov ecx, dword [rdx + 8]
mov edx, dword [r8 + 8]
xor edx, ecx
movsxd rdx, edx
and rdx, r11
xor ecx, edx
mov dword [rax + 8], ecx
mov ecx, dword [rax + 0x10]
xor dword [r8 + 8], edx
mov edx, dword [r8 + 0x10]
xor edx, ecx
movsxd rdx, edx
and rdx, r11
xor ecx, edx
mov dword [rax + 0x10], ecx
mov ecx, dword [rax + 0x14]
xor dword [r8 + 0x10], edx
mov edx, dword [r8 + 0x14]
xor edx, ecx
and rdx, r11
and edx, 4
xor ecx, edx
mov dword [rax + 0x14], ecx
xor dword [r8 + 0x14], edx
test r9d, r9d
jle 0x59e3ba
mov r10, qword [rax]
mov rbx, qword [r8]
lea eax, [r9 - 1]
lea rdx, [r10 + 0xf]
sub rdx, rbx
cmp rdx, 0x1e
jbe 0x59e3c0
cmp eax, 1
jbe 0x59e3c0
mov eax, r9d
movq xmm2, r11
mov rcx, r10
mov rdx, rbx
shr eax, 1
punpcklqdq xmm2, xmm2
shl rax, 4
add rax, r10
nop word [rax + rax]
movdqu xmm3, xmmword [rcx]
movdqu xmm0, xmmword [rdx]
add rcx, 0x10
add rdx, 0x10
pxor xmm0, xmm3
movdqu xmm1, xmm3
pand xmm0, xmm2
pxor xmm1, xmm0
movups xmmword [rcx - 0x10], xmm1
movdqu xmm4, xmmword [rdx - 0x10]
pxor xmm0, xmm4
movups xmmword [rdx - 0x10], xmm0
cmp rcx, rax
jne 0x59e358
mov eax, r9d
and eax, 0xfffffffe
and r9d, 1
je 0x59e3ba
shl rax, 3
lea r8, [r10 + rax]
add rax, rbx
mov rcx, qword [r8]
mov rdx, qword [rax]
xor rdx, rcx
and rdx, r11
xor rcx, rdx
mov qword [r8], rcx
xor qword [rax], rdx
pop rbx
ret
mov r8d, eax
xor ecx, ecx
nop dword [rax]
mov rdx, qword [r10 + rcx*8]
mov rax, qword [rbx + rcx*8]
xor rax, rdx
and rax, r11
xor rdx, rax
mov qword [r10 + rcx*8], rdx
xor qword [rbx + rcx*8], rax
mov rax, rcx
add rcx, 1
cmp rax, r8
jne 0x59e3c8
pop rbx
ret
Function at 0x59e980
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xd8
movsxd rax, dword [r9 + 8]
mov rsi, rax
mov rdi, rdx
mov edx, eax
mov qword [rsp + 0x120], rcx
mov rbx, r8
mov qword [rsp + 0x28], rax
mov rbp, r9
call sym.bn_wexpand
test rax, rax
je 0x59eb81
lea rax, [rsp + 0x50]
cmp qword [rsp + 0x28], 0x10
mov qword [rsp + 0x30], rax
mov r12, rax
ja 0x59eb58
mov rax, qword [rbp]
mov r10, qword [rdi]
movsxd rcx, esi
mov r11, qword [rbx]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x120]
test r10, r10
cmove r10, r12
test r11, r11
mov rax, qword [rax]
cmove r11, r12
mov qword [rsp + 0x40], rax
test rcx, rcx
je 0x59eb90
movsxd r9, dword [rdi + 8]
movsxd rax, dword [rdi + 0xc]
xor r8d, r8d
movsxd rbp, dword [rbx + 8]
movsxd r15, dword [rbx + 0xc]
xor ebx, ebx
mov qword [rsp + 0x48], rax
mov rax, r9
sub rcx, r9
mov rdx, r9
lea rdi, [r9 + 1]
lea r13, [r12 + r9*8]
sub rax, rbp
sub r9, r15
mov r14, rcx
neg rdx
xor ecx, ecx
mov rbp, rax
sub rdi, qword [rsp + 0x48]
add r9, 1
nop word [rax + rax]
mov rax, qword [r10 + rcx*8]
mov r15, rdx
sar r15, 0x3f
and rax, r15
add rax, rbx
mov r15, rax
lea rax, [rbp + rdx]
setb bl
sar rax, 0x3f
and rax, qword [r11 + r8*8]
movzx ebx, bl
add rax, r15
mov qword [r13 + rdx*8], rax
lea rax, [rdi + rdx]
adc rbx, 0
shr rax, 0x3f
add rcx, rax
lea rax, [r9 + rdx]
add rdx, 1
shr rax, 0x3f
add r8, rax
cmp r14, rdx
jne 0x59ea60
mov rdi, qword [rsp + 0x40]
mov r8, qword [rsp + 0x38]
mov r9d, esi
mov rdx, r12
mov rcx, rdi
call sym.bn_sub_words
mov rdx, r12
mov rcx, rdi
sub rbx, rax
mov rax, qword [rsp + 0x28]
lea r9, [r12 + rax*8]
nop dword [rax]
mov r8, qword [rcx]
mov rax, qword [rdx]
add rdx, 8
add rcx, 8
xor rax, r8
and rax, rbx
xor rax, r8
mov qword [rcx - 8], rax
mov qword [rdx - 8], 0
cmp r9, rdx
jne 0x59eae0
mov rax, qword [rsp + 0x120]
mov r13d, 1
mov dword [rax + 8], esi
mov dword [rax + 0x10], 0
cmp r12, qword [rsp + 0x30]
je 0x59eb3c
mov r8d, 0x5a
lea rdx, str.crypto_bn_bn_mod.c
mov rcx, r12
call sym.CRYPTO_free
mov eax, r13d
add rsp, 0xd8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
movsxd rax, esi
mov r8d, 0x3c
lea rdx, str.crypto_bn_bn_mod.c
lea rcx, [rax*8]
call sym.CRYPTO_malloc
mov r12, rax
test rax, rax
jne 0x59e9d9
xor r13d, r13d
jmp 0x59eb3c
mov r8, qword [rsp + 0x38]
mov rcx, rax
xor r9d, r9d
mov rdx, r12
call sym.bn_sub_words
jmp 0x59eb08
Function at 0x5c45e0
Capabilities:
Encrypt data using curve25519

Disassembly:
push r15
push r14
push r13
push r12
sub rsp, 0x38
mov r8d, 0x46
mov rax, qword [rcx]
mov ecx, 0x48
mov r14d, dword [rax]
mov r15, rdx
lea rdx, str.crypto_ec_ecx_meth.c
call sym.CRYPTO_zalloc
mov r13, rax
test rax, rax
je 0x5c4830
cmp r14d, 0x40a
je 0x5c46d0
cmp r14d, 0x43f
je 0x5c46d0
cmp r14d, 0x40b
je 0x5c4760
mov r8d, 0x50
lea rdx, str.crypto_ec_ecx_meth.c
mov ecx, 0x39
call sym.CRYPTO_secure_malloc
mov qword [r13 + 0x40], rax
mov r12, rax
test rax, rax
je 0x5c4860
mov edx, 0x39
mov rcx, r12
call sym.RAND_priv_bytes
test eax, eax
jle 0x5c47d0
cmp r14d, 0x440
je 0x5c47b8
jg 0x5c46a8
cmp r14d, 0x43f
jne 0x5c4740
mov rdx, r12
mov rcx, r13
call sym.ED25519_public_from_private
nop word [rax + rax]
mov r8, r13
mov edx, r14d
mov rcx, r15
call sym.EVP_PKEY_assign
mov eax, 1
add rsp, 0x38
pop r12
pop r13
pop r14
pop r15
ret
mov r8d, 0x50
lea rdx, str.crypto_ec_ecx_meth.c
mov ecx, 0x20
call sym.CRYPTO_secure_malloc
mov qword [r13 + 0x40], rax
mov r12, rax
test rax, rax
je 0x5c4860
mov edx, 0x20
mov rcx, r12
call sym.RAND_priv_bytes
test eax, eax
jle 0x5c47d0
cmp r14d, 0x40a
jne 0x5c4818
movzx eax, byte [r12 + 0x1f]
and byte [r12], 0xf8
and eax, 0x7f
or eax, 0x40
mov byte [r12 + 0x1f], al
mov rdx, r12
mov rcx, r13
call sym.X25519_public_from_private
jmp 0x5c46a8
cmp r14d, 0x40a
je 0x5c472f
cmp r14d, 0x40b
jne 0x5c46a8
jmp 0x5c47a3
mov r8d, 0x50
lea rdx, str.crypto_ec_ecx_meth.c
mov ecx, 0x38
call sym.CRYPTO_secure_malloc
mov qword [r13 + 0x40], rax
mov r12, rax
test rax, rax
je 0x5c4860
mov edx, 0x38
mov rcx, r12
call sym.RAND_priv_bytes
test eax, eax
jle 0x5c47d0
and byte [r12], 0xfc
or byte [r12 + 0x37], 0x80
mov rdx, r12
mov rcx, r13
call sym.X448_public_from_private
jmp 0x5c46a8
mov rdx, r12
mov rcx, r13
call sym.ED448_public_from_private
jmp 0x5c46a8
mov r8d, 0x57
lea rdx, str.crypto_ec_ecx_meth.c
mov rcx, r12
call sym.CRYPTO_secure_free
mov qword [r13 + 0x40], 0
mov r8d, 0x79
lea rdx, str.crypto_ec_ecx_meth.c
mov rcx, r13
call sym.CRYPTO_free
xor eax, eax
add rsp, 0x38
pop r12
pop r13
pop r14
pop r15
ret
cmp r14d, 0x40b
jne 0x5c467b
jmp 0x5c4798
mov r8d, 0x41
mov edx, 0x10a
mov ecx, 0x10
mov dword [rsp + 0x20], 0x48
lea r9, str.crypto_ec_ecx_meth.c
call sym.ERR_put_error
xor eax, eax
jmp 0x5c46bb
mov r8d, 0x41
mov edx, 0x10a
mov ecx, 0x10
mov dword [rsp + 0x20], 0x52
lea r9, str.crypto_ec_ecx_meth.c
call sym.ERR_put_error
jmp 0x5c47ed

Function at 0x5c9490
Capabilities:
Set thread local storage value

Disassembly:
mov rdx, rcx
cmp rcx, 0xffffffffffffffff
je 0x5c94a8
lea rcx, [0x00a5c154]
jmp sym.CRYPTO_THREAD_set_local
ret