joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4f5d30
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x10
mov r10d, 8
lea rax, [rsp + 0xf]
nop dword [rax]
mov byte [rax], dl
mov r11, r10
mov edi, edx
sub r10, 1
mov rbx, rdx
shr rdx, 8
mov r9, rax
mov rsi, rax
lea rax, [rax - 1]
jne 0x4f5d48
mov eax, 8
sub rax, r10
mov rbp, rax
je 0x4f5df0
test dil, dil
jns 0x4f5e10
test r8d, r8d
jne 0x4f5e30
mov edx, 9
xor edi, edi
sub rdx, r10
mov r12d, edx
test rcx, rcx
je 0x4f5dfe
sub r11, 9
mov eax, edi
mov r8d, 7
mov byte [rcx], dil
and eax, 1
sub r8, r10
lea r10, [rbp + r11]
add rdx, r11
movzx eax, al
add r9, r10
add rcx, rdx
nop dword [rax]
movzx edx, byte [r9 + r8]
xor edx, edi
movzx edx, dl
add eax, edx
mov byte [rcx + r8], al
sub r8, 1
shr eax, 8
cmp r8, 0xffffffffffffffff
jne 0x4f5dc0
mov eax, r12d
add rsp, 0x10
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
test rcx, rcx
je 0x4f5e1f
mov byte [rcx], 0
mov r12d, 1
mov eax, r12d
add rsp, 0x10
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
test r8d, r8d
jne 0x4f5e30
mov rdx, rbp
xor edi, edi
jmp 0x4f5d8f
mov r12d, 1
jmp 0x4f5dfe
cmp dil, 0x80
jbe 0x4f5e48
mov edx, 9
mov edi, 0xffffffff
sub rdx, r10
jmp 0x4f5d8f
mov rdx, rbp
mov edi, 0xffffffff
cmp rbx, 0x80
jne 0x4f5d8f
cmp rbp, 1
je 0x4f5e15
lea rax, [r9 + 1]
add rsi, rbp
xor edx, edx
nop dword [rax]
movzx r8d, byte [rax]
add rax, 1
or edx, r8d
cmp rsi, rax
jne 0x4f5e70
test edx, edx
setne dl
mov edi, edx
and edx, 1
neg edi
add rdx, rbp
jmp 0x4f5d8f

Function at 0x4f61e0
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x20
mov eax, 1
mov r9, rcx
mov ebx, r8d
mov rcx, rdx
test r9, r9
je 0x4f6210
movsxd r8, r8d
mov edx, 1
mov ebx, ebx
call sym.fwrite
cmp rbx, rax
sete al
movzx eax, al
add rsp, 0x20
pop rbx
ret
Function at 0x504570
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov r8, rcx
mov rcx, rdx
mov rax, qword [r8]
mov r8d, dword [r9 + 0x20]
mov edx, dword [rax]
test edx, edx
jne 0x504589
test r8b, 1
jne 0x5045a5
and r8d, 2
je 0x50459e
xor r8d, r8d
test edx, edx
jns 0x50459e
neg edx
mov r8d, 1
mov edx, edx
jmp sym.i2c_uint64_int
mov eax, 0xffffffff
ret

Function at 0x5045b0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov r8, rcx
mov rcx, rdx
mov rax, qword [r8]
mov r8d, dword [r9 + 0x20]
mov rdx, qword [rax]
test rdx, rdx
jne 0x5045cb
test r8b, 1
jne 0x5045e7
and r8d, 2
je 0x5045e2
xor r8d, r8d
test rdx, rdx
jns 0x5045e2
neg rdx
mov r8d, 1
jmp sym.i2c_uint64_int
mov eax, 0xffffffff
ret
Function at 0x505c10
Capabilities:
Encode data using xor
Encrypt data using blowfish
Encrypt data using rc4 prga

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rax, qword [0x005f29e0]
lea rsi, [0x005f29e0]
mov r11d, 0x48
mov qword [rcx], rax
mov rax, qword [0x005f3a20]
lea rdi, [rcx + 8]
mov rbp, rcx
and rdi, 0xfffffffffffffff8
mov r10, rbp
mov qword [rcx + 0x1040], rax
mov rax, rcx
sub rax, rdi
sub rsi, rax
add eax, 0x1048
shr eax, 3
cmp edx, 0x48
cmovle r11d, edx
mov ecx, eax
mov rax, r8
rep movsq qword [rdi], qword [rsi]
lea rdi, [rbp + 0x48]
movsxd r11, r11d
add r11, r8
nop dword [rax]
lea rcx, [rax + 1]
movzx eax, byte [rax]
cmp r11, rcx
cmovbe rcx, r8
shl eax, 8
movzx edx, byte [rcx]
lea r9, [rcx + 1]
or edx, eax
cmp r11, r9
cmovbe r9, r8
mov eax, edx
shl eax, 8
movzx edx, byte [r9]
lea rcx, [r9 + 1]
or edx, eax
cmp r11, rcx
cmovbe rcx, r8
shl edx, 8
lea rax, [rcx + 1]
movzx ecx, byte [rcx]
or edx, ecx
cmp r11, rax
cmovbe rax, r8
xor dword [r10], edx
add r10, 4
cmp rdi, r10
jne 0x505c78
mov qword [rsp + 0x28], 0
mov rbx, rbp
lea rsi, [rsp + 0x28]
nop
mov rdx, rbp
mov rcx, rsi
add rbx, 8
call sym.BF_encrypt
mov eax, dword [rsp + 0x28]
mov dword [rbx - 8], eax
mov eax, dword [rsp + 0x2c]
mov dword [rbx - 4], eax
cmp rbx, rdi
jne 0x505ce0
lea rdi, [rbp + 0x1048]
nop dword [rax]
mov rdx, rbp
mov rcx, rsi
add rbx, 8
call sym.BF_encrypt
mov eax, dword [rsp + 0x28]
mov dword [rbx - 8], eax
mov eax, dword [rsp + 0x2c]
mov dword [rbx - 4], eax
cmp rdi, rbx
jne 0x505d10
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
Function at 0x505d40
Capabilities:
Resolve dns

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x470
xor eax, eax
mov r10d, 0x10
mov rbx, rcx
lea rdi, [rsp + 0x70]
mov ecx, 0x7e
test edx, edx
rep stosq qword [rdi], rax
mov eax, 0xa
lea r14, [rsp + 0x60]
mov rsi, r8
cmovne edx, eax
cmp word [rbx], 2
mov eax, 0x1c
mov rbp, r9
cmovne r10d, eax
mov r8, r14
mov rcx, rbx
mov qword [rsp + 0x60], 0
lea r13, [rsp + 0x40]
mov r9d, 0x401
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x48], 0
mov byte [rdi], 0
mov qword [rsp + 0x50], 0
mov dword [rsp + 0x30], edx
mov edx, r10d
mov qword [rsp + 0x58], 0
mov dword [rsp + 0x28], 0x20
mov qword [rsp + 0x20], r13
call qword [sym.imp.WS2_32.dll_getnameinfo]
mov r12d, eax
test eax, eax
jne 0x505f48
cmp byte [rsp + 0x40], 0
jne 0x505e38
movzx eax, word [rbx]
cmp ax, 2
je 0x505fb0
xor ecx, ecx
cmp ax, 0x17
je 0x505fb0
call qword [sym.imp.WS2_32.dll_ntohs]
lea r8, [0x005f3a54]
mov edx, 0x20
mov rcx, r13
movzx r9d, ax
call sym.BIO_snprintf
test rsi, rsi
je 0x505e88
mov r8d, 0xe9
lea rdx, str.crypto_bio_b_addr.c
mov rcx, r14
call sym.CRYPTO_strdup
mov qword [rsi], rax
test rbp, rbp
jne 0x505ef0
cmp qword [rsi], 0
je 0x505f90
mov r12d, 1
mov eax, r12d
add rsp, 0x470
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
test rbp, rbp
je 0x505e68
mov rcx, r13
mov r8d, 0xeb
lea rdx, str.crypto_bio_b_addr.c
call sym.CRYPTO_strdup
mov qword [rbp], rax
mov rcx, rax
test rax, rax
jne 0x505e68
mov r8d, 0xfe
lea rdx, str.crypto_bio_b_addr.c
call sym.CRYPTO_free
mov qword [rbp], 0
mov r8d, 0x41
mov edx, 0x86
mov ecx, 0x20
mov dword [rsp + 0x20], 0x101
lea r9, str.crypto_bio_b_addr.c
call sym.ERR_put_error
jmp 0x505e6e
mov r8d, 0xeb
lea rdx, str.crypto_bio_b_addr.c
mov rcx, r13
call sym.CRYPTO_strdup
mov qword [rbp], rax
cmp qword [rsi], 0
je 0x505fc0
cmp qword [rbp], 0
jne 0x505e68
mov rcx, qword [rsi]
mov r8d, 0xfa
lea rdx, str.crypto_bio_b_addr.c
call sym.CRYPTO_free
mov qword [rsi], 0
mov rcx, qword [rbp]
jmp 0x505eae
mov r8d, 2
mov edx, 0x86
mov ecx, 0x20
mov dword [rsp + 0x20], 0xd7
lea r9, str.crypto_bio_b_addr.c
call sym.ERR_put_error
mov ecx, r12d
xor r12d, r12d
call dbg.gai_strerrorW
mov ecx, 1
mov rdx, rax
call sym.ERR_add_error_data
jmp 0x505e6e
mov r8d, 0xfa
lea rdx, str.crypto_bio_b_addr.c
xor ecx, ecx
call sym.CRYPTO_free
mov qword [rsi], 0
jmp 0x505ec8
movzx ecx, word [rbx + 2]
jmp 0x505e1a
xor ecx, ecx
mov r8d, 0xfa
lea rdx, str.crypto_bio_b_addr.c
call sym.CRYPTO_free
mov qword [rsi], 0
mov rcx, qword [rbp]
jmp 0x505eae
Function at 0x506770
Capabilities:
Resolve dns

Disassembly:
push r14
push r13
push r12
push rsi
push rbx
sub rsp, 0x60
mov r13, rcx
mov r14, rdx
mov esi, r8d
mov ebx, r9d
cmp r9d, 0x17
ja 0x5067a0
mov eax, 1
mov ecx, r9d
shl rax, cl
test eax, 0x800005
jne 0x5067d7
mov dword [rsp + 0x20], 0x293
lea r9, str.crypto_bio_b_addr.c
mov r8d, 0x83
xor r12d, r12d
mov edx, 0x8f
mov ecx, 0x20
call sym.ERR_put_error
mov eax, r12d
add rsp, 0x60
pop rbx
pop rsi
pop r12
pop r13
pop r14
ret
call sym.BIO_sock_init
mov r12d, eax
cmp eax, 1
je 0x506800
xor r12d, r12d
mov eax, r12d
add rsp, 0x60
pop rbx
pop rsi
pop r12
pop r13
pop r14
ret
mov qword [rsp + 0x30], 0
mov eax, dword [rsp + 0xb0]
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov dword [rsp + 0x34], ebx
mov dword [rsp + 0x38], eax
cmp esi, 1
jne 0x506852
mov dword [rsp + 0x30], 1
mov rcx, r13
mov r9, qword [rsp + 0xb8]
lea r8, [rsp + 0x30]
mov rdx, r14
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov r13d, eax
test eax, eax
je 0x5067c7
mov dword [rsp + 0x20], 0x2c0
lea r9, str.crypto_bio_b_addr.c
mov r8d, 2
xor r12d, r12d
mov edx, 0x8f
mov ecx, 0x20
call sym.ERR_put_error
mov ecx, r13d
call dbg.gai_strerrorW
mov ecx, 1
mov rdx, rax
call sym.ERR_add_error_data
jmp 0x5067c7

Function at 0x5068c0
Capabilities:
Resolve dns

Disassembly:
push r14
push r13
push r12
push rsi
push rbx
sub rsp, 0x60
mov r13, rcx
mov r14, rdx
mov esi, r8d
mov ebx, r9d
cmp r9d, 0x17
ja 0x5068f0
mov eax, 1
mov ecx, r9d
shl rax, cl
test eax, 0x800005
jne 0x506927
mov dword [rsp + 0x20], 0x293
lea r9, str.crypto_bio_b_addr.c
mov r8d, 0x83
xor r12d, r12d
mov edx, 0x8f
mov ecx, 0x20
call sym.ERR_put_error
mov eax, r12d
add rsp, 0x60
pop rbx
pop rsi
pop r12
pop r13
pop r14
ret
call sym.BIO_sock_init
mov r12d, eax
cmp eax, 1
je 0x506950
xor r12d, r12d
mov eax, r12d
add rsp, 0x60
pop rbx
pop rsi
pop r12
pop r13
pop r14
ret
mov qword [rsp + 0x30], 0
mov eax, dword [rsp + 0xb0]
mov qword [rsp + 0x40], 0
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0xb8]
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov dword [rsp + 0x34], ebx
mov dword [rsp + 0x3c], eax
cmp esi, 1
jne 0x5069a4
mov dword [rsp + 0x30], 1
mov rcx, r13
mov r9, qword [rsp + 0xc0]
lea r8, [rsp + 0x30]
mov rdx, r14
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov r13d, eax
test eax, eax
je 0x506917
mov dword [rsp + 0x20], 0x2c0
lea r9, str.crypto_bio_b_addr.c
mov r8d, 2
xor r12d, r12d
mov edx, 0x8f
mov ecx, 0x20
call sym.ERR_put_error
mov ecx, r13d
call dbg.gai_strerrorW
mov ecx, 1
mov rdx, rax
call sym.ERR_add_error_data
jmp 0x506917
Function at 0x506a10
Capabilities:
Initialize winsock library

Disassembly:
push r13
push r12
push rdi
push rbx
sub rsp, 0x48
mov r12d, dword [0x0063f258]
mov qword [rsp + 0x30], 0
mov rbx, rcx
mov r13, rdx
test r12d, r12d
je 0x506ac0
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 0x506b40
mov rcx, qword [rsp + 0x30]
call sym.BIO_ADDRINFO_family
cmp eax, 2
je 0x506b68
mov dword [rsp + 0x20], 0x28
mov ecx, 0x20
mov edx, 0x6a
lea r9, str.crypto_bio_b_sock.c
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, [0x0063f0c0]
xor eax, eax
mov ecx, 0x33
mov dword [0x0063f258], 1
mov rdi, rdx
rep stosq qword [rdi], rax
mov ecx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x506a39
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 9
mov ecx, 2
mov dword [rsp + 0x20], 0x87
mov r8d, eax
lea r9, str.crypto_bio_b_sock.c
call sym.ERR_put_error
mov r8d, 0x7a
mov edx, 0x70
mov dword [rsp + 0x20], 0x88
lea r9, str.crypto_bio_b_sock.c
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x506b54
mov r8, rbx
lea rdx, str.host
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 0x506aa8
xor r12d, r12d
cmp qword [rsp + 0x38], 4
jne 0x506aa8
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 0x506aa8
Function at 0x506bd0
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 0x506d38
mov r12d, dword [0x0063f258]
test r12d, r12d
je 0x506c88
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 0x506d10
mov rcx, qword [rsp + 0x38]
call sym.BIO_ADDRINFO_family
cmp eax, 2
je 0x506d70
mov dword [rsp + 0x20], 0x49
lea r9, str.crypto_bio_b_sock.c
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, [0x0063f0c0]
xor eax, eax
mov ecx, 0x33
mov dword [0x0063f258], 1
mov rdi, rdx
rep stosq qword [rdi], rax
mov ecx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x506c01
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 9
mov ecx, 2
mov dword [rsp + 0x20], 0x87
mov r8d, eax
lea r9, str.crypto_bio_b_sock.c
call sym.ERR_put_error
mov r8d, 0x7a
mov edx, 0x70
mov dword [rsp + 0x20], 0x88
lea r9, str.crypto_bio_b_sock.c
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x506d24
mov r8, rbx
lea rdx, str.host
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, str.crypto_bio_b_sock.c
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 0x506c6b

Function at 0x506e10
Capabilities:
Initialize winsock library

Disassembly:
push rdi
sub rsp, 0x30
mov eax, dword [0x0063f258]
test eax, eax
je 0x506e30
mov eax, 1
add rsp, 0x30
pop rdi
ret
lea rdx, [0x0063f0c0]
xor eax, eax
mov ecx, 0x33
mov dword [0x0063f258], 1
mov rdi, rdx
rep stosq qword [rdi], rax
mov ecx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x506e1f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 9
mov ecx, 2
mov dword [rsp + 0x20], 0x87
mov r8d, eax
lea r9, str.crypto_bio_b_sock.c
call sym.ERR_put_error
mov r8d, 0x7a
mov edx, 0x70
mov dword [rsp + 0x20], 0x88
lea r9, str.crypto_bio_b_sock.c
mov ecx, 0x20
call sym.ERR_put_error
mov eax, 0xffffffff
jmp 0x506e24

Function at 0x506ef0
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 0x506f10
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, str.crypto_bio_b_sock.c
call sym.ERR_put_error
mov eax, r12d
add rsp, 0x30
pop r12
ret
Function at 0x506f50
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 0x507120
mov eax, dword [0x0063f258]
test eax, eax
je 0x507098
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 0x507020
mov r12d, 0xffffffff
mov rcx, qword [rsp + 0x48]
call sym.BIO_ADDRINFO_free
mov rcx, qword [rsp + 0x38]
mov r8d, 0xe5
lea rdx, str.crypto_bio_b_sock.c
call sym.CRYPTO_free
mov rcx, qword [rsp + 0x40]
mov r8d, 0xe6
lea rdx, str.crypto_bio_b_sock.c
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 0x506fcf
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 0x506fd5
mov ecx, r12d
call sym.BIO_closesocket
jmp 0x506fcf
lea rdx, [0x0063f0c0]
xor eax, eax
mov ecx, 0x33
mov dword [0x0063f258], 1
mov rdi, rdx
rep stosq qword [rdi], rax
mov ecx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x506fa1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 9
mov ecx, 2
mov dword [rsp + 0x20], 0x87
mov r8d, eax
lea r9, str.crypto_bio_b_sock.c
mov r12d, 0xffffffff
call sym.ERR_put_error
mov r8d, 0x7a
mov edx, 0x70
mov dword [rsp + 0x20], 0x88
lea r9, str.crypto_bio_b_sock.c
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x50700d
mov r12d, 0xffffffff
jmp 0x50700d

Function at 0x507350
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 0x507390
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 0x5073c0
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, str.crypto_bio_b_sock.c
call sym.ERR_put_error
xor eax, eax
test ebx, ebx
sete al
add rsp, 0x40
pop rbx
ret
Function at 0x507400
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push rbx
sub rsp, 0x40
mov ebx, ecx
test edx, edx
jne 0x507470
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 0x5074a0
cmp dword [rsp + 0x3c], 0x1c
mov eax, 1
jbe 0x50746a
mov r8d, 0x85
mov edx, 0x8d
mov ecx, 0x20
mov dword [rsp + 0x20], 0x165
lea r9, str.crypto_bio_b_sock.c
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, str.crypto_bio_b_sock.c
call sym.ERR_put_error
jmp 0x507468
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 0x10
mov ecx, 2
mov dword [rsp + 0x20], 0x160
mov r8d, eax
lea r9, str.crypto_bio_b_sock.c
call sym.ERR_put_error
mov r8d, 0x84
mov edx, 0x8d
mov dword [rsp + 0x20], 0x161
lea r9, str.crypto_bio_b_sock.c
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x507468
Function at 0x507590
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 0x5076c8
mov edx, r8d
mov ecx, r12d
shr edx, 3
and edx, 1
call sym.BIO_socket_nbio
test eax, eax
je 0x5076b4
test sil, 4
jne 0x507640
and esi, 0x10
je 0x507602
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 0x507768
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 0x507700
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 0x5075d4
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 0x5076b4
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 0x507632
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 0x507632
Function at 0x508af0
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 0x508b09
test rdx, rdx
jne 0x508b20
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 0x508b0c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 0xb
mov ecx, 2
mov dword [rsp + 0x20], 0x98
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], 0x99
lea r9, str.crypto_bio_bss_file.c
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x508b0c

Function at 0x508ba0
Capabilities:
Write file on windows

Disassembly:
push r12
sub rsp, 0x20
cmp byte [rdx], 0
mov r8, rcx
mov rcx, rdx
je 0x508c18
mov rax, rdx
xor edx, edx
jmp 0x508bc8
cmp edx, 0x80000000
je 0x508c18
add rax, 1
add edx, 1
cmp byte [rax], 0
jne 0x508bc0
and edx, 0x7fffffff
mov r12d, edx
mov eax, dword [r8 + 0x20]
test eax, eax
jne 0x508bf8
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 0x508be5
mov eax, r12d
add rsp, 0x20
pop r12
ret
xor edx, edx
xor r12d, r12d
jmp 0x508bdd

Function at 0x508c20
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 0x508c37
test rdx, rdx
jne 0x508c40
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 0x508c37
add rsp, 0x20
pop rbx
ret

Function at 0x5090d0
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 0x509150
lea rcx, [0x005f48a0]
call sym.BIO_new
mov r12, rax
test rax, rax
je 0x5091e8
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], 0x48
mov r8d, eax
lea r9, str.crypto_bio_bss_file.c
call sym.ERR_put_error
lea rax, [0x005f47d2]
mov qword [rsp + 0x20], r12
mov r8, rsi
mov qword [rsp + 0x28], rax
lea r9, [0x005f47c6]
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 0x5091b8
call rbx
cmp dword [rax], 6
jne 0x5091f8
mov dword [rsp + 0x20], 0x4f
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 0x50913b
mov rcx, r13
call sym.fclose
jmp 0x50913b
mov dword [rsp + 0x20], 0x51
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 0x50913b