joyce8/EMBER2024-capa huggingface dataset:
Function at 0x6fd13700
Capabilities:
Encrypt data using openssl ecdsa
Encrypt data using openssl rsa

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov r9d, 9
mov rsi, qword [rcx + 8]
mov rbx, qword [rcx]
mov rdi, r8
mov r8, qword [sym.libSFTP.dll_SHA256_WITH_RSA_ENCRYPTION_OID]
mov rbp, rdx
mov rdx, rsi
mov rcx, rbx
call sym.libSFTP.dll_oidComp
test eax, eax
jne 0x6fd13750
mov rax, qword [sym.libSFTP.dll_sha256HashAlgo]
mov dword [rbp], 1
mov qword [rdi], rax
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov r8, qword [sym.libSFTP.dll_SHA384_WITH_RSA_ENCRYPTION_OID]
mov r9d, 9
mov rdx, rsi
mov rcx, rbx
call sym.libSFTP.dll_oidComp
test eax, eax
jne 0x6fd13790
mov rax, qword [sym.libSFTP.dll_sha384HashAlgo]
mov dword [rbp], 1
mov qword [rdi], rax
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov r8, qword [sym.libSFTP.dll_SHA512_WITH_RSA_ENCRYPTION_OID]
mov r9d, 9
mov rdx, rsi
mov rcx, rbx
call sym.libSFTP.dll_oidComp
test eax, eax
jne 0x6fd137c1
mov rax, qword [sym.libSFTP.dll_sha512HashAlgo]
mov dword [rbp], 1
mov qword [rdi], rax
xor eax, eax
jmp 0x6fd13744
mov r8, qword [sym.libSFTP.dll_ECDSA_WITH_SHA256_OID]
mov r9d, 8
mov rdx, rsi
mov rcx, rbx
call sym.libSFTP.dll_oidComp
test eax, eax
jne 0x6fd137f5
mov rax, qword [sym.libSFTP.dll_sha256HashAlgo]
mov dword [rbp], 4
mov qword [rdi], rax
xor eax, eax
jmp 0x6fd13744
mov r8, qword [sym.libSFTP.dll_ECDSA_WITH_SHA384_OID]
mov r9d, 8
mov rdx, rsi
mov rcx, rbx
call sym.libSFTP.dll_oidComp
test eax, eax
jne 0x6fd13829
mov rax, qword [sym.libSFTP.dll_sha384HashAlgo]
mov dword [rbp], 4
mov qword [rdi], rax
xor eax, eax
jmp 0x6fd13744
mov r8, qword [sym.libSFTP.dll_ECDSA_WITH_SHA512_OID]
mov rdx, rsi
mov r9d, 8
mov rcx, rbx
call sym.libSFTP.dll_oidComp
mov edx, eax
mov eax, 0x101
test edx, edx
jne 0x6fd13744
mov rax, qword [sym.libSFTP.dll_sha512HashAlgo]
mov dword [rbp], 4
mov qword [rdi], rax
xor eax, eax
jmp 0x6fd13744

Function at 0x6fd13870
Capabilities:
Encrypt data using openssl rsa

Disassembly:
push rsi
push rbx
sub rsp, 0x28
test rcx, rcx
mov rbx, rcx
mov rsi, rdx
je 0x6fd13960
test rdx, rdx
je 0x6fd13960
mov r8, qword [sym.libSFTP.dll_RSA_ENCRYPTION_OID]
mov r9d, 9
call sym.libSFTP.dll_oidComp
mov edx, 1
test eax, eax
je 0x6fd13962
mov r8, qword [sym.libSFTP.dll_RSASSA_PSS_OID]
mov rdx, rsi
mov r9d, 9
mov rcx, rbx
call sym.libSFTP.dll_oidComp
mov edx, 2
test eax, eax
je 0x6fd13962
mov r8, qword [sym.libSFTP.dll_DSA_OID]
mov rdx, rsi
mov r9d, 7
mov rcx, rbx
call sym.libSFTP.dll_oidComp
mov edx, 3
test eax, eax
je 0x6fd13962
mov r8, qword [sym.libSFTP.dll_EC_PUBLIC_KEY_OID]
mov rdx, rsi
mov r9d, 7
mov rcx, rbx
call sym.libSFTP.dll_oidComp
mov edx, 4
test eax, eax
je 0x6fd13962
mov r8, qword [sym.libSFTP.dll_X25519_OID]
mov rdx, rsi
mov r9d, 3
mov rcx, rbx
call sym.libSFTP.dll_oidComp
mov edx, 5
test eax, eax
je 0x6fd13962
mov r8, qword [sym.libSFTP.dll_ED25519_OID]
mov rdx, rsi
mov r9d, 3
mov rcx, rbx
call sym.libSFTP.dll_oidComp
mov edx, 6
test eax, eax
je 0x6fd13962
nop word cs:[rax + rax]
xor edx, edx
mov eax, edx
add rsp, 0x28
pop rbx
pop rsi
ret
Function at 0x6fd13f00
Capabilities:
Encrypt data using openssl rsa

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
lea rsi, [rsp + 0x20]
mov rdi, r8
mov rbp, r9
mov r8, rsi
call sym.libSFTP.dll_asn1ReadSequence
test eax, eax
mov ebx, eax
je 0x6fd13f40
mov eax, ebx
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rax, qword [rsp + 0x40]
mov r8, rsi
mov r12, qword [rsp + 0x30]
mov qword [rdi], rax
mov rdi, qword [rsp + 0x38]
mov rdx, r12
mov rcx, rdi
call sym.libSFTP.dll_asn1ReadOid
test eax, eax
mov ebx, eax
jne 0x6fd13f28
mov rax, qword [rsp + 0x38]
mov r8d, 9
mov rcx, rsi
mov rdx, qword [sym.libSFTP.dll_RSA_ENCRYPTION_OID]
mov r13, qword [rsp + 0x40]
mov qword [rbp + 0x10], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp + 0x18], rax
call sym.libSFTP.dll_asn1CheckOid
test eax, eax
je 0x6fd13f28
mov rdx, qword [sym.libSFTP.dll_RSASSA_PSS_OID]
mov r8d, 9
mov rcx, rsi
call sym.libSFTP.dll_asn1CheckOid
test eax, eax
je 0x6fd13f28
mov rdx, qword [sym.libSFTP.dll_DSA_OID]
mov rcx, rsi
add rdi, r13
sub r12, r13
mov r8d, 7
call sym.libSFTP.dll_asn1CheckOid
test eax, eax
je 0x6fd14022
mov rdx, qword [sym.libSFTP.dll_EC_PUBLIC_KEY_OID]
mov r8d, 7
mov rcx, rsi
call sym.libSFTP.dll_asn1CheckOid
test eax, eax
jne 0x6fd14038
lea r8, [rsp + 0x50]
mov rdx, r12
mov rcx, rdi
call sym.libSFTP.dll_asn1ReadOid
test eax, eax
mov ebx, eax
jne 0x6fd13f28
mov rax, qword [rsp + 0x68]
mov qword [rbp + 0x80], rax
mov rax, qword [rsp + 0x60]
mov qword [rbp + 0x88], rax
jmp 0x6fd13f28
lea r8, [rbp + 0x40]
mov rdx, r12
mov rcx, rdi
call sym.libSFTP.dll_x509ParseDsaParameters
mov ebx, eax
jmp 0x6fd13f28
mov rdx, qword [sym.libSFTP.dll_X25519_OID]
mov r8d, 3
mov rcx, rsi
call sym.libSFTP.dll_asn1CheckOid
test eax, eax
je 0x6fd13f28
mov rdx, qword [sym.libSFTP.dll_ED25519_OID]
mov r8d, 3
mov rcx, rsi
call sym.libSFTP.dll_asn1CheckOid
test eax, eax
mov eax, 0xd6
cmovne ebx, eax
jmp 0x6fd13f28
Function at 0x6fd14080
Capabilities:
Encrypt data using openssl rsa

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
xor eax, eax
mov rbp, rcx
mov rdi, r9
mov ecx, 0x14
rep stosq qword [rdi], rax
lea rdi, [rsp + 0x30]
mov r12, r8
mov rcx, rbp
mov r8, rdi
mov rsi, r9
call sym.libSFTP.dll_asn1ReadSequence
test eax, eax
mov ebx, eax
je 0x6fd140d0
mov eax, ebx
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rax, qword [rsp + 0x50]
lea r8, [rsp + 0x28]
mov r9, rsi
mov qword [r12], rax
mov r12, qword [rsp + 0x40]
mov qword [rsi], rbp
mov rbp, qword [rsp + 0x48]
mov qword [rsi + 8], rax
mov rdx, r12
mov rcx, rbp
call sym.libSFTP.dll_x509ParseAlgorithmIdentifier
test eax, eax
mov ebx, eax
jne 0x6fd140b8
mov rcx, qword [rsp + 0x28]
mov rdx, r12
mov r8, rdi
sub rdx, rcx
add rcx, rbp
call sym.libSFTP.dll_asn1ReadTag
test eax, eax
mov ebx, eax
jne 0x6fd140b8
xor r8d, r8d
xor edx, edx
mov r9d, 3
mov rcx, rdi
call sym.libSFTP.dll_asn1CheckTag
test eax, eax
mov ebx, eax
jne 0x6fd140b8
mov rdx, qword [rsp + 0x40]
test rdx, rdx
je 0x6fd1414c
mov rcx, qword [rsp + 0x48]
cmp byte [rcx], 0
je 0x6fd14156
mov ebx, 1
jmp 0x6fd140b8
mov r12, qword [rsi + 0x10]
lea rbp, [rcx + 1]
mov r9d, 9
mov r13, qword [rsi + 0x18]
lea rdi, [rdx - 1]
mov r8, qword [sym.libSFTP.dll_RSA_ENCRYPTION_OID]
mov rcx, r12
mov rdx, r13
call sym.libSFTP.dll_oidComp
test eax, eax
je 0x6fd1419e
mov r8, qword [sym.libSFTP.dll_RSASSA_PSS_OID]
mov r9d, 9
mov rdx, r13
mov rcx, r12
call sym.libSFTP.dll_oidComp
test eax, eax
jne 0x6fd141b4
lea r8, [rsi + 0x20]
mov rdx, rdi
mov rcx, rbp
call sym.libSFTP.dll_x509ParseRsaPublicKey
mov ebx, eax
jmp 0x6fd140b8
mov r8, qword [sym.libSFTP.dll_DSA_OID]
mov r9d, 7
mov rdx, r13
mov rcx, r12
call sym.libSFTP.dll_oidComp
test eax, eax
je 0x6fd14204
mov r8, qword [sym.libSFTP.dll_EC_PUBLIC_KEY_OID]
mov r9d, 7
mov rdx, r13
mov rcx, r12
call sym.libSFTP.dll_oidComp
test eax, eax
jne 0x6fd14224
test rdi, rdi
je 0x6fd1421a
mov qword [rsi + 0x90], rbp
mov qword [rsi + 0x98], rdi
jmp 0x6fd140b8
lea r8, [rsi + 0x70]
mov rdx, rdi
mov rcx, rbp
call sym.libSFTP.dll_x509ParseDsaPublicKey
mov ebx, eax
jmp 0x6fd140b8
mov ebx, 0x213
jmp 0x6fd140b8
mov r8, qword [sym.libSFTP.dll_X25519_OID]
mov r9d, 3
mov rdx, r13
mov rcx, r12
call sym.libSFTP.dll_oidComp
test eax, eax
je 0x6fd141ec
mov r8, qword [sym.libSFTP.dll_ED25519_OID]
mov r9d, 3
mov rdx, r13
mov rcx, r12
call sym.libSFTP.dll_oidComp
test eax, eax
je 0x6fd141ec
mov ebx, 0xd6
jmp 0x6fd140b8
Function at 0x6fd142c0
Capabilities:
Encrypt data using openssl rsa

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov r8, qword [sym.libSFTP.dll_RSA_ENCRYPTION_OID]
mov r9d, 9
mov rdi, qword [rcx + 0x18]
mov rsi, qword [rcx + 0x10]
mov rbx, rcx
mov rbp, rdx
mov rdx, rdi
mov rcx, rsi
call sym.libSFTP.dll_oidComp
test eax, eax
jne 0x6fd14330
mov rdx, qword [rbx + 0x20]
test rdx, rdx
je 0x6fd14321
cmp qword [rbx + 0x30], 0
je 0x6fd14321
mov r8d, dword [rbx + 0x28]
mov r9d, 1
mov rcx, rbp
call sym.libSFTP.dll_mpiImport
test eax, eax
je 0x6fd14360
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov eax, 0xe7
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov r8, qword [sym.libSFTP.dll_RSASSA_PSS_OID]
mov r9d, 9
mov rdx, rdi
mov rcx, rsi
call sym.libSFTP.dll_oidComp
test eax, eax
je 0x6fd142f2
mov eax, 0xd6
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov rdx, qword [rbx + 0x30]
lea rcx, [rbp + 0x10]
mov r9d, 1
mov r8d, dword [rbx + 0x38]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp sym.libSFTP.dll_mpiImport
Function at 0x6fd155f0
Capabilities:
Check for time delay via gettickcount

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
test rcx, rcx
mov r15, rcx
mov r12, rdx
mov rbx, r8
mov r14, r9
je 0x6fd15860
test rdx, rdx
jne 0x6fd15625
test rbx, rbx
mov r8d, 2
jne 0x6fd1566d
lea rax, [rsp + 0x48]
xor esi, esi
mov r13d, 0x8000
mov qword [rsp + 0x30], rax
lea rdi, [r15 + 0x4e5]
mov rbp, rbx
sub rbp, rsi
mov eax, dword [r15 + 4]
cmp eax, 2
je 0x6fd15681
cmp eax, 0xa
je 0x6fd156d5
cmp eax, 8
je 0x6fd15772
mov r8d, 0x1ff
test r14, r14
je 0x6fd1566d
mov qword [r14], rsi
mov eax, r8d
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp rbx, rsi
jbe 0x6fd15870
mov rax, rbx
mov r8, qword [r15 + 0x508]
mov rdx, rdi
mov rcx, r15
sub rax, rsi
mov r9, qword [r15 + 0x458]
cmp rax, 0x8000
cmova rax, r13
mov dword [rsp + 0x20], eax
mov qword [rsp + 0x48], rax
call sym.libSFTP.dll_sftpClientFormatFxpWrite
test eax, eax
mov r8d, eax
jne 0x6fd15665
mov edx, 0xa
mov rcx, r15
call sym.libSFTP.dll_sftpClientChangeState
jmp 0x6fd15644
mov rax, qword [r15 + 0x430]
mov r8, qword [r15 + 0x428]
cmp rax, r8
jb 0x6fd157a3
cmp qword [r15 + 0x450], rbp
mov r8, rbp
cmovbe r8, qword [r15 + 0x450]
test r8, r8
mov qword [rsp + 0x48], r8
je 0x6fd15760
mov r9, qword [rsp + 0x30]
lea rcx, [r15 + 0x2658]
mov rdx, r12
mov eax, dword [rsp + 0xc0]
mov dword [rsp + 0x20], eax
call sym.libSFTP.dll_sshWriteChannel
test eax, eax
mov r8d, eax
je 0x6fd15820
cmp eax, 0xdc
je 0x6fd15820
lea eax, [r8 - 0xdc]
cmp eax, 1
jbe 0x6fd15810
test r8d, r8d
je 0x6fd15637
jmp 0x6fd15665
mov edx, 8
mov rcx, r15
call sym.libSFTP.dll_sftpClientChangeState
jmp 0x6fd15644
mov rcx, r15
call sym.libSFTP.dll_sftpClientSendCommand
test eax, eax
mov r8d, eax
je 0x6fd1578a
cmp eax, 0x6b
jne 0x6fd15665
mov edx, 2
mov rcx, r15
mov dword [rsp + 0x3c], r8d
call sym.libSFTP.dll_sftpClientChangeState
mov r8d, dword [rsp + 0x3c]
jmp 0x6fd1574d
mov edi, dword [rsp + 0xc0]
lea rdx, [r15 + rax + 0x20]
sub r8, rax
mov r9, qword [rsp + 0x30]
lea rcx, [r15 + 0x2658]
mov dword [rsp + 0x20], edi
call sym.libSFTP.dll_sshWriteChannel
test eax, eax
mov r8d, eax
je 0x6fd157d9
cmp eax, 0xdc
jne 0x6fd1573d
mov rax, qword [rsp + 0x48]
test rax, rax
je 0x6fd1573d
add qword [r15 + 0x430], rax
mov dword [rsp + 0x3c], r8d
call sym.libSFTP.dll_osGetSystemTime
mov r8d, dword [rsp + 0x3c]
mov dword [r15 + 0x1c], eax
jmp 0x6fd1573d
mov rcx, r15
call sym.libSFTP.dll_sftpClientProcessEvents
mov r8d, eax
jmp 0x6fd1574d
mov rax, qword [rsp + 0x48]
test rax, rax
je 0x6fd1573d
sub qword [r15 + 0x450], rax
mov dword [rsp + 0x3c], r8d
add r12, rax
add rsi, rax
add qword [r15 + 0x458], rax
call sym.libSFTP.dll_osGetSystemTime
mov r8d, dword [rsp + 0x3c]
mov dword [r15 + 0x1c], eax
jmp 0x6fd1573d
mov r8d, 2
jmp 0x6fd1566d
xor r8d, r8d
jmp 0x6fd15665
Function at 0x6fd15dd0
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x28
movzx eax, byte [rdx + 4]
sub r8, 5
cmp al, 2
je 0x6fd15e20
cmp al, 0x65
je 0x6fd15e70
cmp al, 0x66
je 0x6fd15e80
sub r9, 5
cmp al, 0x67
je 0x6fd15e11
cmp al, 0x68
je 0x6fd15e90
cmp al, 0x69
jne 0x6fd15e30
add rdx, 5
add rsp, 0x28
jmp sym.libSFTP.dll_sftpClientParseFxpAttrs
add rdx, 5
add rsp, 0x28
jmp sym.libSFTP.dll_sftpClientParseFxpData
add rdx, 5
add rsp, 0x28
jmp sym.libSFTP.dll_sftpClientParseFxpVersion
call sym.libSFTP.dll_osSuspendAllTasks
mov ecx, 2
call qword [fcn.6fd28f30]
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Unknown_SFTP_packet_type__r_n
mov r9, rax
call sub.msvcrt.dll_fwrite
call sym.libSFTP.dll_osResumeAllTasks
mov eax, 0xf0
add rsp, 0x28
ret
add rdx, 5
add rsp, 0x28
jmp sym.libSFTP.dll_sftpClientParseFxpStatus
add rdx, 5
add rsp, 0x28
jmp sym.libSFTP.dll_sftpClientParseFxpHandle
add rdx, 5
add rsp, 0x28
jmp sym.libSFTP.dll_sftpClientParseFxpName

Function at 0x6fd16130
Capabilities:
Check for time delay via gettickcount

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
mov eax, dword [rcx + 0x768]
cmp eax, 0xf
mov rbx, rcx
jbe 0x6fd161b0
cmp eax, 0x10
jne 0x6fd161a0
mov eax, dword [rcx + 4]
cmp eax, 3
je 0x6fd161c1
cmp eax, 4
je 0x6fd16210
cmp eax, 5
je 0x6fd16243
cmp eax, 6
jne 0x6fd161a0
call sym.libSFTP.dll_sftpClientProcessEvents
test eax, eax
mov esi, eax
jne 0x6fd161a5
mov eax, dword [rbx + 0x265c]
cmp eax, 1
je 0x6fd16294
cmp eax, 2
je 0x6fd1629b
cmp eax, 3
jne 0x6fd161a0
mov esi, 0xc8
jmp 0x6fd161a5
mov esi, 0x1ff
mov eax, esi
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
call sym.libSFTP.dll_sftpClientProcessEvents
mov esi, eax
mov eax, esi
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
lea rcx, [rcx + 0x768]
call sym.libSFTP.dll_sshCreateChannel
test rax, rax
mov rdi, rax
je 0x6fd16191
xor edx, edx
mov rcx, rax
call sym.libSFTP.dll_sshSetChannelTimeout
test eax, eax
mov esi, eax
jne 0x6fd161a5
lea rdx, [0x6fd2d6ec]
xor r8d, r8d
mov rcx, rdi
call sym.libSFTP.dll_sshSendChannelOpen
test eax, eax
mov esi, eax
jne 0x6fd161a5
mov dword [rbx + 4], 4
call sym.libSFTP.dll_osGetSystemTime
mov dword [rbx + 0x1c], eax
jmp 0x6fd161a5
call sym.libSFTP.dll_sftpClientProcessEvents
test eax, eax
mov esi, eax
jne 0x6fd161a5
mov eax, dword [rbx + 0x2658]
cmp eax, 1
je 0x6fd16294
cmp eax, 2
jne 0x6fd1618c
mov dword [rbx + 4], 5
call sym.libSFTP.dll_osGetSystemTime
mov dword [rbx + 0x1c], eax
jmp 0x6fd161a5
lea rax, str.sftp
mov r9d, 1
mov qword [rsp + 0x28], 4
lea rcx, [rcx + 0x2658]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x20]
lea rdx, [0x6fd2d6f9]
call sym.libSFTP.dll_sshSendChannelRequest
test eax, eax
mov esi, eax
jne 0x6fd161a5
mov dword [rbx + 4], 6
call sym.libSFTP.dll_osGetSystemTime
mov dword [rbx + 0x1c], eax
jmp 0x6fd161a5
xor esi, esi
jmp 0x6fd161a5
mov dword [rbx + 4], 7
call sym.libSFTP.dll_osGetSystemTime
mov dword [rbx + 0x1c], eax
jmp 0x6fd161a5

Function at 0x6fd16510
Capabilities:
Write file on windows

Disassembly:
cmp r8, 4
jbe 0x6fd16520
cmp r8, r9
ja 0x6fd16520
jmp fcn.6fd15dd0
mov eax, 0xec
ret
Function at 0x6fd1f600
Capabilities:
Write file on windows

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rdi, rcx
call sym.libSFTP.dll_osSuspendAllTasks
mov ecx, 2
call qword [fcn.6fd28f30]
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Closing_SSH_connection..._r_n
mov r9, rax
call sub.msvcrt.dll_fwrite
call sym.libSFTP.dll_osResumeAllTasks
mov rsi, qword [rdi + 8]
lea rbp, [rsi + 0x198]
mov rcx, rbp
call sym.libSFTP.dll_osAcquireMutex
mov r9d, dword [rsi + 0x10]
test r9d, r9d
je 0x6fd1f6b0
xor ebx, ebx
jmp 0x6fd1f668
add ebx, 1
cmp dword [rsi + 0x10], ebx
jbe 0x6fd1f6b0
mov ecx, ebx
imul rcx, rcx, 0x20b8
add rcx, qword [rsi + 0x18]
mov r8d, dword [rcx]
test r8d, r8d
je 0x6fd1f660
cmp qword [rcx + 0x10], rdi
jne 0x6fd1f660
mov rax, qword [rdi + 8]
cmp dword [rax], 1
jne 0x6fd1f6f4
mov edx, dword [rcx + 0x20a8]
test edx, edx
jne 0x6fd1f6a0
mov eax, dword [rcx + 0x2098]
test eax, eax
jne 0x6fd1f6f4
add ebx, 1
cmp dword [rsi + 0x10], ebx
mov dword [rcx], 0
ja 0x6fd1f668
nop
mov rcx, qword [rdi + 0x10]
test rcx, rcx
je 0x6fd1f6c6
call sym.libSFTP.dll_socketClose
mov qword [rdi + 0x10], 0
lea rcx, [rdi + 0x548]
call sym.libSFTP.dll_dhFree
lea rcx, [rdi + 0x598]
call sym.libSFTP.dll_ecdhFree
mov rcx, rbp
mov dword [rdi], 0
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp sym.libSFTP.dll_osReleaseMutex
mov dword [rcx], 3
call sym.libSFTP.dll_sshUpdateChannelEvents
jmp 0x6fd1f660

Function at 0x6fd209c0
Capabilities:
Encode data using xor

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rdx
mov rdx, qword [rcx + 0x1f8]
mov rbx, rcx
mov rdi, r8
mov rcx, qword [rcx + 0x200]
lea r8, [rbx + 0x268]
mov r9, qword [rdx + 0x28]
call sym.libSFTP.dll_hmacInit
mov rcx, qword [rbx + 0x200]
lea rdx, [rbx + 0x2a8]
mov r8d, 4
call sym.libSFTP.dll_hmacUpdate
mov rcx, qword [rbx + 0x200]
mov rdx, rsi
mov r8, rdi
call sym.libSFTP.dll_hmacUpdate
mov rcx, qword [rbx + 0x200]
lea rdx, [rsi + rdi]
add rsp, 0x20
pop rbx
pop rsi
pop rdi
jmp sym.libSFTP.dll_hmacFinal

Function at 0x6fd20e70
Capabilities:
Encode data using xor

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x60
mov r12, rdx
mov rdx, qword [rcx + 0x1f8]
mov rsi, rcx
mov rbp, r8
mov rcx, qword [rcx + 0x200]
lea r8, [rsi + 0x268]
lea rdi, [rsp + 0x20]
mov rbx, qword [rdx + 0x28]
mov r9, rbx
call sym.libSFTP.dll_hmacInit
mov rcx, qword [rsi + 0x200]
lea rdx, [rsi + 0x2a8]
mov r8d, 4
call sym.libSFTP.dll_hmacUpdate
mov rcx, qword [rsi + 0x200]
mov r8, rbp
mov rdx, r12
call sym.libSFTP.dll_hmacUpdate
mov rcx, qword [rsi + 0x200]
mov rdx, rdi
call sym.libSFTP.dll_hmacFinal
test rbx, rbx
je 0x6fd20f20
lea r8, [r12 + rbp]
xor ecx, ecx
xor eax, eax
movzx edx, byte [r8 + rax]
xor dl, byte [rdi + rax]
add rax, 1
or ecx, edx
cmp rbx, rax
jne 0x6fd20ef0
cmp cl, 1
sbb eax, eax
not eax
and eax, 0x21a
add rsp, 0x60
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
xor eax, eax
add rsp, 0x60
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x6fd24860
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push rbx
sub rsp, 0x20
cmp ecx, 1
je 0x6fd248d0
cmp ecx, 2
jne 0x6fd24891
mov r8d, 0x11
mov edx, 2
mov ecx, 2
call qword [sym.imp.WS2_32.dll_socket]
cmp rax, 0xffffffffffffffff
je 0x6fd24891
add rsp, 0x20
pop rbx
ret
call sym.libSFTP.dll_osSuspendAllTasks
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, 2
mov ebx, eax
call qword [fcn.6fd28f30]
lea rdx, str.socket___error__ld_n
mov r8d, ebx
mov rcx, rax
call sub.msvcrt.dll_fprintf
call sym.libSFTP.dll_osResumeAllTasks
xor eax, eax
add rsp, 0x20
pop rbx
ret
mov r8d, 6
mov edx, 1
mov ecx, 2
call qword [sym.imp.WS2_32.dll_socket]
jmp 0x6fd24885

Function at 0x6fd248f0
Capabilities:
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x40
mov eax, 1
mov r8d, 0x1006
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x3c]
test edx, edx
cmove edx, eax
mov dword [rsp + 0x3c], edx
mov edx, 0xffff
call qword [sym.imp.WS2_32.dll_setsockopt]
xor edx, edx
cmp eax, 0xffffffff
je 0x6fd24930
mov eax, edx
add rsp, 0x40
pop rbx
ret
call sym.libSFTP.dll_osSuspendAllTasks
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, 2
mov ebx, eax
call qword [fcn.6fd28f30]
lea rdx, str.setsockopt___error__ld_n
mov r8d, ebx
mov rcx, rax
call sub.msvcrt.dll_fprintf
call sym.libSFTP.dll_osResumeAllTasks
mov edx, 1
mov eax, edx
add rsp, 0x40
pop rbx
ret

Function at 0x6fd24a70
Capabilities:
Connect socket

Disassembly:
push rbx
sub rsp, 0x30
mov rax, qword [rdx]
mov qword [rsp + 0x20], 0
cmp rax, 4
mov rbx, rcx
mov qword [rsp + 0x28], 0
je 0x6fd24ae0
cmp rax, 0x10
je 0x6fd24b30
mov eax, 2
mov word [rsp + 0x20], ax
movzx ecx, r8w
call qword [sym.imp.WS2_32.dll_htons]
lea rdx, [rsp + 0x20]
mov r8d, 0x10
mov rcx, rbx
mov word [rsp + 0x22], ax
call qword [sym.imp.WS2_32.dll_connect]
xor edx, edx
cmp eax, 0xffffffff
je 0x6fd24af3
mov eax, edx
add rsp, 0x30
pop rbx
ret
mov eax, dword [rdx + 8]
mov ecx, 2
mov word [rsp + 0x20], cx
mov dword [rsp + 0x24], eax
jmp 0x6fd24aa7
call sym.libSFTP.dll_osSuspendAllTasks
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, 2
mov ebx, eax
call qword [fcn.6fd28f30]
lea rdx, str.connect___error__ld_n
mov r8d, ebx
mov rcx, rax
call sub.msvcrt.dll_fprintf
call sym.libSFTP.dll_osResumeAllTasks
mov edx, 1
mov eax, edx
add rsp, 0x30
pop rbx
ret
mov edx, 2
mov eax, edx
add rsp, 0x30
pop rbx
ret

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

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, r9
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_send]
movsxd rdx, eax
test edx, edx
js 0x6fd24c70
xor eax, eax
test rbx, rbx
je 0x6fd24c62
mov qword [rbx], rdx
add rsp, 0x20
pop rbx
ret
call sym.libSFTP.dll_osSuspendAllTasks
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, 2
mov ebx, eax
call qword [fcn.6fd28f30]
lea rdx, str.send___error__ld_n
mov r8d, ebx
mov rcx, rax
call sub.msvcrt.dll_fprintf
call sym.libSFTP.dll_osResumeAllTasks
mov eax, 0x209
add rsp, 0x20
pop rbx
ret
Function at 0x6fd24cb0
Capabilities:
Send data
Send data on socket

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x40
mov eax, 2
cmp qword [rdx], 4
lea rdi, [rsp + 0x30]
mov rbx, rcx
mov rsi, r9
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x38], 0
je 0x6fd24cf0
add rsp, 0x40
pop rbx
pop rsi
pop rdi
ret
mov eax, 2
movzx ecx, r8w
mov word [rsp + 0x30], ax
mov eax, dword [rdx + 8]
mov dword [rsp + 0x34], eax
call qword [sym.imp.WS2_32.dll_htons]
xor r9d, r9d
mov rdx, rsi
mov qword [rsp + 0x20], rdi
mov word [rsp + 0x32], ax
mov r8d, dword [rsp + 0x80]
mov rcx, rbx
mov dword [rsp + 0x28], 0x10
call qword [sym.imp.WS2_32.dll_sendto]
movsxd rdx, eax
test edx, edx
js 0x6fd24d60
xor eax, eax
cmp qword [rsp + 0x88], 0
je 0x6fd24cdf
mov rsi, qword [rsp + 0x88]
mov qword [rsi], rdx
add rsp, 0x40
pop rbx
pop rsi
pop rdi
ret
call sym.libSFTP.dll_osSuspendAllTasks
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, 2
mov ebx, eax
call qword [fcn.6fd28f30]
lea rdx, str.sendto___error__ld_n
mov r8d, ebx
mov rcx, rax
call sub.msvcrt.dll_fprintf
call sym.libSFTP.dll_osResumeAllTasks
mov eax, 0x209
jmp 0x6fd24cdf

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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rdi, qword [sym.imp.WS2_32.dll_recv]
mov ebp, 1
mov r13d, dword [rsp + 0x90]
mov r15d, r13d
mov rsi, rdx
mov r12, rcx
mov qword [r9], 0
mov rbx, r8
mov r14, r9
xor edx, edx
and r15d, 0x1000
cmp rbx, rdx
jbe 0x6fd24e20
mov r8d, ebx
mov rcx, r12
sub r8d, edx
test r15d, r15d
cmovne r8d, ebp
add rdx, rsi
xor r9d, r9d
call rdi
cmp eax, 0
je 0x6fd24e40
jle 0x6fd24e50
movsxd rdx, eax
add rdx, qword [r14]
test r15d, r15d
mov qword [r14], rdx
je 0x6fd24e33
cmp byte [rsi + rdx - 1], 0xa
jne 0x6fd24de3
nop dword [rax]
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
test r13d, 0x800
jne 0x6fd24de3
jmp 0x6fd24e20
cmp qword [r14], 0
mov eax, 0x200
jne 0x6fd24e20
jmp 0x6fd24e22
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x6fd24e71
cmp eax, 0x274c
mov edx, 0xdc
mov eax, 0x20a
cmove eax, edx
jmp 0x6fd24e22
mov eax, 0xdd
jmp 0x6fd24e22

Function at 0x6fd24e80
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x28
call sym.libSFTP.dll_osSuspendAllTasks
mov ecx, 2
call qword [fcn.6fd28f30]
mov r8d, 0x24
mov edx, 1
lea rcx, str.socketGetLocalAddr_not_implemented_r_n
mov r9, rax
call sub.msvcrt.dll_fwrite
call sym.libSFTP.dll_osResumeAllTasks
jmp 0x6fd24eb3