joyce8/EMBER2024-capa huggingface dataset:
Function at 0x528ef0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbx
sub rsp, 0x20
mov ebx, edx
test rcx, rcx
je 0x528f20
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x528f20
shr eax, 4
and eax, 1
test bl, bl
cmovne eax, ebx
add rsp, 0x20
pop rbx
ret
xor eax, eax
add rsp, 0x20
pop rbx
ret

Function at 0x528f30
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
cmp qword [rcx + 8], 0
mov rbx, rcx
je 0x529040
mov rcx, qword [rcx]
test rcx, rcx
je 0x528f68
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x528f65
test al, 0x10
jne 0x529058
mov rcx, qword [rbx]
lea rdi, [rsp + 0x30]
lea rdx, [0x008b6ffa]
mov byte [rsp + 0x30], 0
mov qword [rsp + 0x20], rdi
mov qword [rsp + 0x28], 0
call sym.strtok
mov r12, rax
test rax, rax
je 0x529070
mov rbp, qword [sym.imp.msvcrt.dll__mkdir]
lea rsi, [rsp + 0x20]
movabs rbx, 0x3fffffffffffffff
nop
mov rcx, r12
call sym.strlen
mov r8, rax
mov rax, rbx
sub rax, qword [rsp + 0x28]
cmp r8, rax
ja 0x529081
mov rdx, r12
mov rcx, rsi
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_append_char_const__unsigned_long_long_
cmp qword [rsp + 0x28], rbx
je 0x529075
mov r8d, 1
lea rdx, [0x008b6ffa]
mov rcx, rsi
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_append_char_const__unsigned_long_long_
mov rcx, qword [rsp + 0x20]
call rbp
lea rdx, [0x008b6ffa]
xor ecx, ecx
mov r13d, eax
call sym.strtok
mov r12, rax
test rax, rax
jne 0x528fb0
cmp r13d, 0xffffffff
setne r12b
mov rcx, qword [rsp + 0x20]
cmp rcx, rdi
je 0x52902e
call sym.operator_delete_void_
mov eax, r12d
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
xor r12d, r12d
mov eax, r12d
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov r12d, 1
mov eax, r12d
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
xor r12d, r12d
jmp 0x52901f
lea rcx, [0x008b6ffc]
call method.std.__throw_length_error_char_const_
lea rcx, [0x008b6ffc]
call method.std.__throw_length_error_char_const_
mov rcx, qword [rsp + 0x20]
mov r12, rax
cmp rcx, rdi
je 0x52909f
call sym.operator_delete_void_
mov rcx, r12
call sym._Unwind_Resume
nop
nop dword [rax + rax]

Function at 0x529bd0
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x28
mov r8d, 0x32
lea rdx, [0x009f6360]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov edx, 0
test eax, eax
lea rax, [0x009f6360]
cmove rax, rdx
add rsp, 0x28
ret
Function at 0x5315a0
Capabilities:
Query environment variable

Disassembly:
push r13
push r12
sub rsp, 0x28
mov r12, rcx
mov r13, r8
mov rcx, rdx
mov r8d, 0x32
lea rdx, [0x009f6360]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea rdx, [r12 + 0x10]
test eax, eax
je 0x5315d6
cmp byte [0x009f6360], 0
jne 0x531610
mov qword [r12], rdx
mov r8, 0xffffffffffffffff
test r13, r13
je 0x5315f3
mov rcx, r13
call sym.strlen
lea r8, [r13 + rax]
xor r9d, r9d
mov rdx, r13
mov rcx, r12
call method.void_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_construct_char_const__char_const__char_const__std::forward_iterator_tag_
mov rax, r12
add rsp, 0x28
pop r12
pop r13
ret
mov qword [r12], rdx
lea r8, [0x009f6360]
mov edx, dword [r8]
add r8, 4
lea eax, [rdx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x53161b
mov edx, eax
shr edx, 0x10
test eax, 0x8080
cmove eax, edx
lea rdx, [r8 + 2]
cmove r8, rdx
lea rdx, [0x009f6360]
mov ecx, eax
add cl, al
mov rcx, r12
sbb r8, 3
xor r9d, r9d
call method.void_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_construct_char_const__char_const__char_const__std::forward_iterator_tag_
mov rax, r12
add rsp, 0x28
pop r12
pop r13
ret
Function at 0x57f3b0
Capabilities:
Encode data using xor

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
mov rax, qword [rcx + 8]
mov rax, qword [rax + 0xc0]
mov rsi, rdx
lea rbp, [r9 + 1]
mov rdx, qword [rdx + 8]
test byte [rax + 0x60], 1
je 0x57f4c0
lea r9, [rbp + r8]
xor eax, eax
cmp r9, rdx
ja 0x57f4b2
movq xmm0, r8
mov rax, qword [rsi + 0x20]
sub rdx, r8
sub qword [rsi + 0x10], r8
movdqu xmm1, xmmword [rsi + 0x20]
punpcklqdq xmm0, xmm0
mov qword [rsi + 8], rdx
add rax, r8
paddq xmm0, xmm1
movups xmmword [rsi + 0x20], xmm0
jmp 0x57f4cb
mov ebp, 0x100
mov rdx, r11
mov r9, rbx
xor r8d, r8d
sub rdx, rbx
add rdx, qword [rsi + 0x20]
nop dword [rax]
movzx eax, byte [rdx + r9 - 1]
mov r12, r9
mov rcx, rbx
sub r9, 1
xor rcx, r8
xor r12, r8
add r8, 1
xor eax, edi
or rcx, r12
movzx eax, al
xor rcx, rbx
not rax
sar rcx, 0x3f
or rax, rcx
and r10, rax
cmp rbp, r8
ja 0x57f438
mov rax, r10
not rax
movzx eax, al
or r10, 0xffffffffffffff00
add rbx, 1
sub rax, 1
and r10, rax
sar r10, 0x3f
and rbx, r10
mov dword [rsp + 0x28], r10d
not r10d
mov eax, dword [rsp + 0x28]
sub r11, rbx
mov dword [rsp + 0x2c], r10d
mov edx, dword [rsp + 0x2c]
mov qword [rsi + 8], r11
and eax, 1
or eax, edx
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
xor eax, eax
cmp rbp, rdx
ja 0x57f4b2
mov rax, qword [rsi + 0x20]
mov rcx, qword [rcx + 0x438]
movzx ebx, byte [rax + rdx - 1]
call sym.EVP_CIPHER_CTX_cipher
mov rdi, rbx
mov rcx, rax
call sym.EVP_CIPHER_flags
test eax, 0x200000
jne 0x57f530
mov r11, qword [rsi + 8]
add rbp, rbx
mov rax, r11
sub rax, rbp
xor rax, rbp
xor rbp, r11
or rax, rbp
xor rax, r11
sar rax, 0x3f
mov r10, rax
not r10
cmp r11, 0xff
ja 0x57f420
mov rbp, r11
test r11, r11
jne 0x57f425
jmp 0x57f475
not rbx
add qword [rsi + 8], rbx
mov eax, 1
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x57ff80
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
mov eax, 0x40
mov r13, qword [rdx + 0x10]
cmp r13, 0x40
cmovbe rax, r13
mov rbx, r8
mov rsi, rcx
mov rbp, rdx
xor r8d, r8d
cmp rbx, rax
jbe 0x57ffd0
mov eax, r8d
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rax, [rsp + 0x20]
mov rdx, r13
mov r8, rbx
mov rdi, qword [rbp + 8]
mov r9, rax
sub rdx, rbx
mov r14d, 0
neg r9
lea rcx, [rdx - 0x100]
and r9d, 0x3f
add r9, rax
lea rax, [rbx + 0x100]
cmp r13, rax
cmova r14, rcx
mov rcx, r9
xor edx, edx
call sym.memset
mov r9, rax
cmp r13, r14
jbe 0x580120
mov rcx, r14
mov r14, qword [rbp + 0x20]
mov r12, rdi
mov r11, r13
sub r12, rbx
sub rcx, rdi
sub r11, rdi
xor eax, eax
add r14, rdi
xor edx, edx
xor r8d, r8d
mov rbp, r14
nop dword [rax + rax]
lea r14, [rdi + rcx]
mov r13, r12
mov r15, rdi
xor r13, r14
xor r15, rcx
mov r10, r13
sub r13, 1
not r10
and r13, r10
mov r10, r13
mov r13, rdi
xor r13, r14
sar r10, 0x3f
or r13, r15
or r8, r10
and r10, rdx
xor r13, r14
or rax, r10
lea r10, [rdx + 1]
sar r13, 0x3f
and r8, r13
movzx r13d, byte [rbp + rcx]
add rcx, 1
and r13d, r8d
or byte [r9 + rdx], r13b
mov rdx, r10
mov r13, rbx
sub rdx, rbx
xor r13, r10
xor rdx, rbx
or rdx, r13
xor rdx, r10
sar rdx, 0x3f
and rdx, r10
cmp r11, rcx
jne 0x580048
lea r8, [rsi + rbx]
test rbx, rbx
je 0x58010e
nop word [rax + rax]
mov rdx, rax
mov rcx, rbx
add rsi, 1
xor rdx, 0x20
add rdx, r9
movzx edx, byte [rdx]
lea rdx, [rax + 1]
movzx eax, byte [r9 + rax]
xor rcx, rdx
mov byte [rsi - 1], al
mov rax, rdx
sub rax, rbx
xor rax, rbx
or rax, rcx
xor rax, rdx
sar rax, 0x3f
and rax, rdx
cmp r8, rsi
jne 0x5800d0
mov r8d, 1
jmp 0x57ffb5
xor eax, eax
jmp 0x5800be

Function at 0x599ca0
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 0x599cb9
test r8b, 1
jne 0x599cd5
and r8d, 2
je 0x599cce
xor r8d, r8d
test edx, edx
jns 0x599cce
neg edx
mov r8d, 1
mov edx, edx
jmp sym.i2c_uint64_int
mov eax, 0xffffffff
ret

Function at 0x599ce0
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 0x599cfb
test r8b, 1
jne 0x599d17
and r8d, 2
je 0x599d12
xor r8d, r8d
test rdx, rdx
jns 0x599d12
neg rdx
mov r8d, 1
jmp sym.i2c_uint64_int
mov eax, 0xffffffff
ret

Function at 0x59a260
Capabilities:
Get thread local storage value

Disassembly:
lea rcx, [0x009f65a4]
jmp sym.CRYPTO_THREAD_get_local
Function at 0x59b130
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 0x59b338
cmp byte [rsp + 0x40], 0
jne 0x59b228
movzx eax, word [rbx]
cmp ax, 2
je 0x59b3a0
xor ecx, ecx
cmp ax, 0x17
je 0x59b3a0
call qword [sym.imp.WS2_32.dll_ntohs]
lea r8, [0x008caef4]
mov edx, 0x20
mov rcx, r13
movzx r9d, ax
call sym.BIO_snprintf
test rsi, rsi
je 0x59b278
mov r8d, 0xed
lea rdx, str.crypto_bio_b_addr.c
mov rcx, r14
call sym.CRYPTO_strdup
mov qword [rsi], rax
test rbp, rbp
jne 0x59b2e0
cmp qword [rsi], 0
je 0x59b380
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 0x59b258
mov rcx, r13
mov r8d, 0xef
lea rdx, str.crypto_bio_b_addr.c
call sym.CRYPTO_strdup
mov qword [rbp], rax
mov rcx, rax
test rax, rax
jne 0x59b258
mov r8d, 0x102
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], 0x105
lea r9, str.crypto_bio_b_addr.c
call sym.ERR_put_error
jmp 0x59b25e
mov r8d, 0xef
lea rdx, str.crypto_bio_b_addr.c
mov rcx, r13
call sym.CRYPTO_strdup
mov qword [rbp], rax
cmp qword [rsi], 0
je 0x59b3b0
cmp qword [rbp], 0
jne 0x59b258
mov rcx, qword [rsi]
mov r8d, 0xfe
lea rdx, str.crypto_bio_b_addr.c
call sym.CRYPTO_free
mov qword [rsi], 0
mov rcx, qword [rbp]
jmp 0x59b29e
mov r8d, 2
mov edx, 0x86
mov ecx, 0x20
mov dword [rsp + 0x20], 0xdb
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 0x59b25e
mov r8d, 0xfe
lea rdx, str.crypto_bio_b_addr.c
xor ecx, ecx
call sym.CRYPTO_free
mov qword [rsi], 0
jmp 0x59b2b8
movzx ecx, word [rbx + 2]
jmp 0x59b20a
xor ecx, ecx
mov r8d, 0xfe
lea rdx, str.crypto_bio_b_addr.c
call sym.CRYPTO_free
mov qword [rsi], 0
mov rcx, qword [rbp]
jmp 0x59b29e
Function at 0x59bb60
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 0x59bb90
mov eax, 1
mov ecx, r9d
shl rax, cl
test eax, 0x800005
jne 0x59bbc7
mov dword [rsp + 0x20], 0x297
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 0x59bbf0
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 0x59bc42
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 0x59bbb7
cmp eax, 8
jne 0x59bca0
mov dword [rsp + 0x20], 0x2cb
lea r9, str.crypto_bio_b_addr.c
mov r8d, 0x41
xor r12d, r12d
mov edx, 0x8f
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x59bbb7
mov dword [rsp + 0x20], 0x2da
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 0x59bbb7

Function at 0x59bcf0
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 0x59bd20
mov eax, 1
mov ecx, r9d
shl rax, cl
test eax, 0x800005
jne 0x59bd57
mov dword [rsp + 0x20], 0x297
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 0x59bd80
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 0x59bdd4
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 0x59bd47
cmp eax, 8
jne 0x59be30
mov dword [rsp + 0x20], 0x2cb
lea r9, str.crypto_bio_b_addr.c
mov r8d, 0x41
xor r12d, r12d
mov edx, 0x8f
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x59bd47
mov dword [rsp + 0x20], 0x2da
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 0x59bd47
Function at 0x59e3f0
Capabilities:
Initialize winsock library

Disassembly:
push r13
push r12
push rdi
push rbx
sub rsp, 0x48
mov r12d, dword [0x009f6758]
mov qword [rsp + 0x30], 0
mov rbx, rcx
mov r13, rdx
test r12d, r12d
je 0x59e4a0
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 0x59e520
mov rcx, qword [rsp + 0x30]
call sym.BIO_ADDRINFO_family
cmp eax, 2
je 0x59e548
mov dword [rsp + 0x20], 0x28
mov ecx, 0x20
mov edx, 0x6a
lea r9, [0x008cb460]
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, [0x009f65c0]
xor eax, eax
mov ecx, 0x33
mov dword [0x009f6758], 1
mov rdi, rdx
rep stosq qword [rdi], rax
mov ecx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x59e419
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 9
mov ecx, 2
mov dword [rsp + 0x20], 0x87
mov r8d, eax
lea r9, [0x008cb460]
call sym.ERR_put_error
mov r8d, 0x7a
mov edx, 0x70
mov dword [rsp + 0x20], 0x88
lea r9, [0x008cb460]
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x59e534
mov r8, rbx
lea rdx, [0x008cb474]
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 0x59e488
xor r12d, r12d
cmp qword [rsp + 0x38], 4
jne 0x59e488
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 0x59e488
Function at 0x59e5b0
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 0x59e718
mov r12d, dword [0x009f6758]
test r12d, r12d
je 0x59e668
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 0x59e6f0
mov rcx, qword [rsp + 0x38]
call sym.BIO_ADDRINFO_family
cmp eax, 2
je 0x59e750
mov dword [rsp + 0x20], 0x49
lea r9, [0x008cb460]
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, [0x009f65c0]
xor eax, eax
mov ecx, 0x33
mov dword [0x009f6758], 1
mov rdi, rdx
rep stosq qword [rdi], rax
mov ecx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x59e5e1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 9
mov ecx, 2
mov dword [rsp + 0x20], 0x87
mov r8d, eax
lea r9, [0x008cb460]
call sym.ERR_put_error
mov r8d, 0x7a
mov edx, 0x70
mov dword [rsp + 0x20], 0x88
lea r9, [0x008cb460]
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x59e704
mov r8, rbx
lea rdx, [0x008cb474]
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, [0x008cb460]
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 0x59e64b

Function at 0x59e7f0
Capabilities:
Initialize winsock library

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

Function at 0x59e8d0
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 0x59e8f0
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, [0x008cb460]
call sym.ERR_put_error
mov eax, r12d
add rsp, 0x30
pop r12
ret
Function at 0x59e930
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 0x59eb00
mov eax, dword [0x009f6758]
test eax, eax
je 0x59ea78
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 0x59ea00
mov r12d, 0xffffffff
mov rcx, qword [rsp + 0x48]
call sym.BIO_ADDRINFO_free
mov rcx, qword [rsp + 0x38]
mov r8d, 0xe5
lea rdx, [0x008cb460]
call sym.CRYPTO_free
mov rcx, qword [rsp + 0x40]
mov r8d, 0xe6
lea rdx, [0x008cb460]
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 0x59e9af
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 0x59e9b5
mov ecx, r12d
call sym.BIO_closesocket
jmp 0x59e9af
lea rdx, [0x009f65c0]
xor eax, eax
mov ecx, 0x33
mov dword [0x009f6758], 1
mov rdi, rdx
rep stosq qword [rdi], rax
mov ecx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x59e981
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 9
mov ecx, 2
mov dword [rsp + 0x20], 0x87
mov r8d, eax
lea r9, [0x008cb460]
mov r12d, 0xffffffff
call sym.ERR_put_error
mov r8d, 0x7a
mov edx, 0x70
mov dword [rsp + 0x20], 0x88
lea r9, [0x008cb460]
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x59e9ed
mov r12d, 0xffffffff
jmp 0x59e9ed

Function at 0x59ed30
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 0x59ed70
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 0x59eda0
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, [0x008cb460]
call sym.ERR_put_error
xor eax, eax
test ebx, ebx
sete al
add rsp, 0x40
pop rbx
ret
Function at 0x59ede0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push rbx
sub rsp, 0x40
mov ebx, ecx
test edx, edx
jne 0x59ee50
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 0x59ee80
cmp dword [rsp + 0x3c], 0x1c
mov eax, 1
jbe 0x59ee4a
mov r8d, 0x85
mov edx, 0x8d
mov ecx, 0x20
mov dword [rsp + 0x20], 0x165
lea r9, [0x008cb460]
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, [0x008cb460]
call sym.ERR_put_error
jmp 0x59ee48
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 0x10
mov ecx, 2
mov dword [rsp + 0x20], 0x160
mov r8d, eax
lea r9, [0x008cb460]
call sym.ERR_put_error
mov r8d, 0x84
mov edx, 0x8d
mov dword [rsp + 0x20], 0x161
lea r9, [0x008cb460]
mov ecx, 0x20
call sym.ERR_put_error
jmp 0x59ee48