joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1401806c0
Capabilities:
Resolve dns

Disassembly:
push rbp
push rsi
push r12
push r13
push r14
sub rsp, 0x20
xor r14d, r14d
mov r13, r9
mov qword [r9], r14
lea r9, [rsp + 0x68]
mov esi, r14d
mov r12d, r14d
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov ebp, eax
test eax, eax
jne 0x14018084e
mov qword [rsp + 0x50], rbx
mov rbx, qword [rsp + 0x68]
test rbx, rbx
je 0x140180836
mov qword [rsp + 0x58], rdi
nop dword [rax]
cmp dword [rbx + 4], 2
jne 0x1401807cd
cmp qword [rbx + 0x20], r14
je 0x1401807cd
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x1401807cd
cmp rax, 0x10
jb 0x1401807cd
mov ecx, Ordinal_50
call qword [fcn.140153b50]
mov rdi, rax
test rax, rax
je 0x140180806
mov ecx, dword [rbx]
mov dword [rax], ecx
mov ecx, dword [rbx + 4]
mov dword [rax + 4], ecx
mov ecx, dword [rbx + 8]
mov dword [rax + 8], ecx
mov ecx, dword [rbx + 0xc]
mov dword [rax + reloc.WS2_32.dll_recv], 0x10
mov dword [rax + 0xc], ecx
mov ecx, reloc.WS2_32.dll_recv
mov qword [rax + 0x20], r14
mov qword [rax + 0x18], r14
mov qword [rax + 0x28], r14
call qword [fcn.140153b50]
mov qword [rdi + 0x20], rax
test rax, rax
je 0x1401807f6
mov rdx, qword [rbx + 0x20]
mov rcx, qword [rdx]
mov qword [rax], rcx
mov rcx, qword [rdx + 8]
mov qword [rax + 8], rcx
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x1401807b9
call qword [fcn.1401573a8]
mov qword [rdi + 0x18], rax
test rax, rax
je 0x1401807dc
test rsi, rsi
cmove rsi, rdi
test r12, r12
je 0x1401807ca
mov qword [r12 + 0x28], rdi
mov r12, rdi
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x140180710
jmp 0x14018080b
mov rcx, qword [rdi + 0x20]
mov ebp, 8
call qword [fcn.140153b10]
mov rcx, rdi
call qword [fcn.140153b10]
jmp 0x14018080b
mov rcx, rdi
mov ebp, 8
call qword [fcn.140153b10]
jmp 0x14018080b
mov ebp, 8
mov rcx, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x58]
test rcx, rcx
je 0x140180820
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
test ebp, ebp
je 0x140180831
mov rcx, rsi
call fcn.140180670
mov rsi, r14
jmp 0x140180843
test rsi, rsi
jne 0x140180843
mov ebp, 0x2af9
mov ecx, ebp
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rbx, qword [rsp + 0x50]
mov qword [r13], rsi
mov eax, ebp
add rsp, 0x20
pop r14
pop r13
pop r12
pop rsi
pop rbp
ret

Function at 0x1401820c0
Capabilities:
Create thread

Disassembly:
sub rsp, 0x38
xor eax, eax
mov r9, rdx
mov r8, rcx
mov qword [rsp + 0x28], rax
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], eax
call fcn.140157684
test rax, rax
je 0x1401820e9
cmp rax, 0xffffffffffffffff
jne 0x1401820eb
xor eax, eax
add rsp, 0x38
ret
Function at 0x140184ff0
Capabilities:
Generate random numbers via winapi

Disassembly:
mov rcx, rdx
mov rdx, r8
jmp 0x140184ff0
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov rdi, rcx
mov rbx, rdx
lea rcx, [rsp + 0x50]
mov r9d, 1
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x50], 0
mov dword [rsp + 0x20], 0xf0000040
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x14018504c
mov rcx, qword [rsp + 0x50]
mov r8, rdi
mov edx, ebx
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
mov rcx, qword [rsp + 0x50]
xor edx, edx
test eax, eax
jne 0x14018505c
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, 2
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rbx, qword [rsp + 0x40]
xor eax, eax
add rsp, 0x30
pop rdi
ret
Function at 0x14018f720
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0xd0
mov rax, qword [0x140256080]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov rbx, qword [rcx + 0x940]
mov rdi, qword [rcx]
mov dword [rsp + 0x30], 0x80
mov r8d, dword [rbx + 0x15c]
mov rdx, qword [rbx + 0x168]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov rbp, rcx
mov rcx, qword [rbx + 0x18]
lea rax, [rsp + 0x40]
add r8d, 4
xor r9d, r9d
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [rbx + 0x150], 0
mov dword [rbx + 0x154], eax
jne 0x14018f7c2
movsxd r8, dword [rsp + 0x30]
lea rcx, [rbx + 0xd0]
lea rdx, [rsp + 0x40]
call fcn.1401540c0
mov r11d, dword [rsp + 0x30]
mov dword [rbx + 0x150], r11d
mov r9d, dword [rbx + 0x154]
cmp r9d, 4
jge 0x14018f810
lea rdx, str.Received_too_short_packet
mov rcx, rdi
call fcn.14017c0c0
mov dword [rbx + 0xc], 7
xor eax, eax
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.140153af0
lea r11, [rsp + 0xd0]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
lea rcx, [rbx + 0x168]
call fcn.14018e380
movzx r8d, ax
mov dword [rbx + 0xc], r8d
sub r8d, 3
je 0x14018f8b0
dec r8d
je 0x14018f927
dec r8d
je 0x14018f880
dec r8d
je 0x14018f85c
lea r8, str.Internal_error:_Unexpected_packet
lea rdx, [0x1401c5898]
mov rcx, rdi
call fcn.14017c0c0
jmp 0x14018f927
mov rdx, qword [rbx + 0x168]
lea r8d, [r9 - 2]
mov rcx, rbx
add rdx, 2
call fcn.14018e480
test eax, eax
je 0x14018f927
jmp 0x14018f7e7
lea rcx, [rbx + 0x168]
call fcn.14018e390
lea rdx, [0x14020f1b4]
mov rcx, rdi
movzx r8d, ax
mov dword [rbx + 8], r8d
mov r8, qword [rbx + 0x168]
add r8, 4
call fcn.14017c010
jmp 0x14018f927
cmp r9d, 4
jle 0x14018f927
lea rcx, [rbx + 0x168]
call fcn.14018e390
movzx ecx, word [rbx + 0x48]
inc ecx
cmp cx, ax
jne 0x14018f927
mov r8, qword [rbx + 0x168]
lea eax, [r9 - 4]
mov edx, 1
add r8, 4
movsxd r9, eax
mov rcx, rbp
call fcn.14017c520
mov esi, eax
test eax, eax
je 0x14018f906
mov edx, 5
mov rcx, rbx
call fcn.14018f6a0
mov eax, esi
jmp 0x14018f7e7
mov eax, dword [rbx + 0x154]
mov rcx, rdi
sub eax, 4
cdqe
add qword [rdi + 0xb0], rax
mov rdx, qword [rdi + 0xb0]
call fcn.140185ae0
mov rcx, rbp
call fcn.140185c20
test eax, eax
je 0x14018f7e5
mov edx, 5
mov rcx, rbx
call fcn.14018f6a0
mov eax, Ordinal_46
jmp 0x14018f7e7

Function at 0x1401914a0
Capabilities:
Initialize winsock library

Disassembly:
push rbx
sub rsp, 0x1d0
mov rax, qword [0x140256080]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
mov rbx, rcx
lea rdx, [rsp + 0x20]
mov ecx, 2
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x1401914e6
lea rdx, str.WSAStartup_failed___d_
mov r8d, eax
mov rcx, rbx
call fcn.14017c0c0
jmp 0x140191515
call qword [sym.imp.WS2_32.dll_WSACleanup]
movzx r11d, word [rsp + 0x20]
cmp r11b, 2
jne 0x140191506
shr r11w, 8
test r11b, r11b
jne 0x140191506
xor eax, eax
jmp 0x14019151a
lea rdx, str.insufficient_winsock_version_to_support_telnet
mov rcx, rbx
call fcn.14017c0c0
mov eax, 2
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.140153af0
add rsp, 0x1d0
pop rbx
ret
Function at 0x140191720
Capabilities:
Send data
Send data on socket

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x20
mov rbp, qword [rcx]
xor r9d, r9d
mov rbx, rcx
mov rcx, qword [rcx + 0x210]
mov edi, r8d
mov esi, edx
mov byte [rax + 0x11], dl
mov byte [rax + 0x12], r8b
lea r8d, [r9 + 3]
lea rdx, [rax + 0x10]
mov byte [rax + 0x10], 0xff
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x14019177e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.14017c0c0
mov rcx, qword [rbx]
lea rdx, str.SENT
mov r9d, edi
mov r8d, esi
call fcn.1401915e0
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret

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

Disassembly:
push rbx
sub rsp, 0x20
mov rax, qword [rcx]
movsxd r11, edx
mov rbx, rcx
mov r9, qword [rax + 0x1a8]
cmp r8d, 1
jne 0x140191823
mov r10d, dword [r9 + r11*4 + 0xc08]
test r10d, r10d
je 0x140191805
sub r10d, 2
je 0x140191837
dec r10d
jne 0x14019186d
cmp dword [r9 + r11*4 + 0x1008], 0
jne 0x14019186d
mov dword [r9 + r11*4 + 0x1008], 1
add rsp, 0x20
pop rbx
ret
mov edx, 0xfd
mov r8d, r11d
mov dword [r9 + r11*4 + 0xc08], 2
add rsp, 0x20
pop rbx
jmp fcn.140191720
mov ecx, dword [r9 + r11*4 + 0xc08]
dec ecx
je 0x140191851
dec ecx
je 0x1401917e8
dec ecx
jne 0x14019186d
mov ecx, dword [r9 + r11*4 + 0x1008]
dec ecx
jne 0x14019186d
mov dword [r9 + r11*4 + 0x1008], ecx
add rsp, 0x20
pop rbx
ret
mov edx, 0xfe
mov rcx, rbx
mov r8d, r11d
mov dword [r9 + r11*4 + 0xc08], 3
call fcn.140191720
add rsp, 0x20
pop rbx
ret

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

Disassembly:
sub rsp, 0x28
mov rax, qword [rcx]
movsxd r9, edx
mov r11, rcx
mov r8, qword [rax + 0x1a8]
mov r10d, dword [r8 + r9*4 + 0xc08]
test r10d, r10d
je 0x140191934
sub r10d, 2
je 0x1401918ea
dec r10d
jne 0x14019191e
mov ecx, dword [r8 + r9*4 + 0x1008]
test ecx, ecx
je 0x1401918d9
dec ecx
jne 0x14019191e
mov dword [r8 + r9*4 + 0xc08], 1
mov dword [r8 + r9*4 + 0x1008], ecx
add rsp, 0x28
ret
mov dword [r8 + r9*4 + 0xc08], 0
add rsp, 0x28
ret
mov ecx, dword [r8 + r9*4 + 0x1008]
test ecx, ecx
je 0x140191923
dec ecx
jne 0x14019191e
mov dword [r8 + r9*4 + 0x1008], ecx
mov dword [r8 + r9*4 + 0xc08], 3
mov rcx, r11
mov r8d, edx
mov edx, 0xfe
call fcn.140191720
add rsp, 0x28
ret
mov dword [r8 + r9*4 + 0xc08], 1
add rsp, 0x28
ret
cmp dword [r8 + r9*4 + 0x1408], 1
jne 0x140191911
mov dword [r8 + r9*4 + 0xc08], 1
mov r8d, edx
mov edx, 0xfd
add rsp, 0x28
jmp fcn.140191720
Function at 0x140191960
Capabilities:
Send data
Send data on socket

Disassembly:
sub rsp, 0x28
mov rax, qword [rcx]
movsxd r9, edx
mov r11, rcx
mov r8, qword [rax + 0x1a8]
mov r10d, dword [r8 + r9*4 + 0xc08]
dec r10d
je 0x1401919ff
dec r10d
je 0x1401919d8
dec r10d
jne 0x140191a16
mov ecx, dword [r8 + r9*4 + 0x1008]
test ecx, ecx
je 0x1401919c9
dec ecx
jne 0x140191a16
xor eax, eax
mov dword [r8 + r9*4 + 0xc08], 2
mov rcx, r11
mov dword [r8 + r9*4 + 0x1008], eax
mov r8d, edx
mov edx, 0xfd
add rsp, 0x28
jmp fcn.140191720
xor eax, eax
mov dword [r8 + r9*4 + 0xc08], eax
add rsp, 0x28
ret
mov ecx, dword [r8 + r9*4 + 0x1008]
test ecx, ecx
je 0x1401919c9
dec ecx
jne 0x140191a16
xor eax, eax
mov dword [r8 + r9*4 + 0xc08], eax
mov dword [r8 + r9*4 + 0x1008], eax
add rsp, 0x28
ret
xor eax, eax
mov dword [r8 + r9*4 + 0xc08], eax
mov r8d, edx
mov edx, 0xfe
call fcn.140191720
add rsp, 0x28
ret

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

Disassembly:
push rbx
sub rsp, 0x20
mov rax, qword [rcx]
movsxd r11, edx
mov rbx, rcx
mov r9, qword [rax + 0x1a8]
cmp r8d, 1
jne 0x140191a89
mov r10d, dword [r9 + r11*4 + 8]
test r10d, r10d
je 0x140191a6e
sub r10d, 2
je 0x140191a9a
dec r10d
jne 0x140191acd
cmp dword [r9 + r11*4 + 0x408], 0
jne 0x140191acd
mov dword [r9 + r11*4 + 0x408], 1
add rsp, 0x20
pop rbx
ret
mov edx, 0xfb
mov r8d, r11d
mov dword [r9 + r11*4 + 8], 2
add rsp, 0x20
pop rbx
jmp fcn.140191720
mov ecx, dword [r9 + r11*4 + 8]
dec ecx
je 0x140191ab4
dec ecx
je 0x140191a51
dec ecx
jne 0x140191acd
mov ecx, dword [r9 + r11*4 + 0x408]
dec ecx
jne 0x140191acd
mov dword [r9 + r11*4 + 0x408], ecx
add rsp, 0x20
pop rbx
ret
mov edx, 0xfc
mov rcx, rbx
mov r8d, r11d
mov dword [r9 + r11*4 + 8], 3
call fcn.140191720
add rsp, 0x20
pop rbx
ret

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

Disassembly:
sub rsp, 0x28
mov rax, qword [rcx]
movsxd r9, edx
mov r11, rcx
mov r8, qword [rax + 0x1a8]
mov r10d, dword [r8 + r9*4 + 8]
dec r10d
je 0x140191b6f
dec r10d
je 0x140191b4b
dec r10d
jne 0x140191b83
mov ecx, dword [r8 + r9*4 + 0x408]
test ecx, ecx
je 0x140191b3f
dec ecx
jne 0x140191b83
xor eax, eax
mov dword [r8 + r9*4 + 8], 2
mov rcx, r11
mov dword [r8 + r9*4 + 0x408], eax
mov r8d, edx
mov edx, 0xfb
add rsp, 0x28
jmp fcn.140191720
xor eax, eax
mov dword [r8 + r9*4 + 8], eax
add rsp, 0x28
ret
mov ecx, dword [r8 + r9*4 + 0x408]
test ecx, ecx
je 0x140191b3f
dec ecx
jne 0x140191b83
xor eax, eax
mov dword [r8 + r9*4 + 8], eax
mov dword [r8 + r9*4 + 0x408], eax
add rsp, 0x28
ret
xor eax, eax
mov dword [r8 + r9*4 + 8], eax
mov r8d, edx
mov edx, 0xfc
call fcn.140191720
add rsp, 0x28
ret
Function at 0x140192720
Capabilities:
Send data
Send data on socket

Disassembly:
cmp edx, 0x1f
jne 0x1401928ce
push rbp
push rdi
push r13
sub rsp, 0x30
mov rbp, qword [rcx]
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x28], rsi
mov rdi, qword [rbp + 0x1a8]
mov r13, rcx
mov qword [rsp + 0x20], r12
lea rsi, [rdi + 0x1cb8]
lea rbx, [rdi + 0x1eb8]
mov qword [rbx], rsi
cmp rsi, rbx
jae 0x140192769
mov byte [rsi], 0xff
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x140192777
mov byte [rax], 0xfa
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x140192785
mov byte [rax], Ordinal_33
inc qword [rbx]
movzx ecx, word [rdi + 0x1ca8]
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rdi + 0x1caa]
movzx r12d, ax
mov word [rsp + 0x58], ax
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [rbx]
movzx r11d, ax
mov word [rsp + 0x50], ax
cmp rcx, rbx
jae 0x1401927bf
mov byte [rcx], r12b
inc qword [rbx]
mov rdx, qword [rbx]
mov r12, qword [rsp + 0x20]
cmp rdx, rbx
jae 0x1401927d6
movzx ecx, byte [rsp + 0x59]
mov byte [rdx], cl
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x1401927e4
mov byte [rax], r11b
inc qword [rbx]
mov rcx, qword [rbx]
cmp rcx, rbx
jae 0x1401927f6
movzx eax, byte [rsp + 0x51]
mov byte [rcx], al
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x140192804
mov byte [rax], 0xff
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x140192812
mov byte [rax], 0xf0
inc qword [rbx]
mov rax, qword [rbx]
lea r8, [rdi + 0x1cba]
mov edx, 0x3e
mov r9, rax
mov rcx, rbp
mov qword [rbx], rsi
sub r9, rsi
mov qword [rdi + 0x1ec0], rax
sub r9, 2
call fcn.140191b90
mov rcx, qword [r13 + 0x210]
xor r9d, r9d
lea r8d, [r9 + 3]
mov rdx, rsi
call qword [sym.imp.WS2_32.dll_send]
mov rsi, qword [rsp + 0x28]
mov rbx, qword [rsp + 0x60]
test eax, eax
jns 0x14019287a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.14017c0c0
lea rdx, [rdi + 0x1cbb]
mov r8d, 4
mov rcx, r13
call fcn.140192530
mov rcx, qword [r13 + 0x210]
xor r9d, r9d
lea r8d, [r9 + 2]
lea rdx, [rdi + 0x1cbf]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x1401928c6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.14017c0c0
add rsp, 0x30
pop r13
pop rdi
pop rbp
repz ret
Function at 0x1401934f0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x40
mov rax, qword [0x140256080]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rbp, qword [rcx + 0x218]
mov rsi, qword [rcx]
mov rbx, rcx
lea r8, [rsp + 0x20]
lea rdx, [rsp + 0x28]
mov rcx, rbp
or rdi, 0xffffffffffffffff
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x140193561
lea r8, [rsp + 0x20]
lea rdx, [rsp + 0x28]
mov rcx, rbp
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_accept]
mov rdi, rax
mov rdx, rbp
mov rcx, rbx
call fcn.14017f7e0
mov rcx, rsi
cmp rdi, 0xffffffffffffffff
jne 0x140193586
lea rdx, str.Error_accept__ing_server_connect
call fcn.14017c0c0
lea eax, [rdi + 0x1f]
jmp 0x1401935ed
lea rdx, str.Connection_accepted_from_server_n
call fcn.14017c010
mov edx, 1
mov rcx, rdi
mov dword [rbx + 0x568], 0
mov qword [rbx + 0x218], rdi
call fcn.1401a28c0
mov dword [rbx + 0x234], 1
mov rax, qword [rsi + 0x278]
test rax, rax
je 0x1401935eb
mov rcx, qword [rsi + 0x280]
mov r8d, 1
mov rdx, rdi
call rax
test eax, eax
je 0x1401935eb
mov rcx, rbx
call fcn.1401933c0
mov eax, Ordinal_46
jmp 0x1401935ed
xor eax, eax
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.140153af0
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
Function at 0x1401970e0
Capabilities:
Check http status code

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov eax, 0x51eb851f
mov edi, r8d
mov r8d, edx
xor ebx, ebx
mov rsi, rcx
mov rcx, qword [rcx]
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, 2
je 0x140197132
lea rdx, str.Couldnt_set_desired_mode
call fcn.14017c0c0
lea eax, [rbx + 0x11]
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
cmp r8d, 0xc8
je 0x140197147
lea rdx, str.Got_a__03d_response_code_instead_of_the_assumed_200_n
call fcn.14017c010
cmp edi, 0x13
jne 0x140197156
mov rcx, rsi
call fcn.140197060
jmp 0x140197181
cmp edi, 0x14
jne 0x140197165
mov rcx, rsi
call fcn.140194050
jmp 0x140197181
cmp edi, 0x15
jne 0x140197174
mov rcx, rsi
call fcn.1401970c0
jmp 0x140197181
cmp edi, 0x16
jne 0x140197183
mov rcx, rsi
call fcn.1401970d0
mov ebx, eax
mov rsi, qword [rsp + 0x38]
mov eax, ebx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x140197870
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rsi, qword [rcx]
mov ebx, dword [rcx + 0x9ec]
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov rdi, rcx
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, 2
je 0x1401978fc
test ebx, ebx
jne 0x1401978ba
lea rdx, str.disabling_EPRT_usage_n
mov rcx, rsi
call fcn.14017c010
mov dword [rdi + 0x58c], ebx
inc ebx
cmp ebx, 2
jne 0x1401978e3
lea rdx, str.Failed_to_do_PORT
mov rcx, rsi
call fcn.14017c0c0
lea eax, [rbx + 0x1c]
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov edx, ebx
mov rcx, rdi
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp 0x140193860
lea rdx, str.Connect_data_stream_actively_n
mov rcx, rsi
call fcn.14017c010
xor edx, edx
mov rcx, rdi
call fcn.140193710
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp fcn.1401976d0
Function at 0x14019eb10
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x148
mov rax, qword [0x140256080]
xor rax, rsp
mov qword [rsp + 0x130], rax
call fcn.14016b858
mov byte [rsp + 0x20], 0
test rax, rax
je 0x14019eb76
lea rdx, [rsp + 0x20]
mov r8d, 0x104
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [rsp + 0x20], 0
je 0x14019eb76
lea rcx, [rsp + 0x20]
call qword [fcn.1401573a8]
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.140153af0
add rsp, 0x148
ret
xor eax, eax
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.140153af0
add rsp, 0x148
ret
jmp 0x14019eb10

Function at 0x14019eb90
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x148
mov rax, qword [0x140256080]
xor rax, rsp
mov qword [rsp + 0x130], rax
call fcn.14016b858
mov byte [rsp + 0x20], 0
test rax, rax
je 0x14019eb76
lea rdx, [rsp + 0x20]
mov r8d, 0x104
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [rsp + 0x20], 0
je 0x14019eb76
lea rcx, [rsp + 0x20]
call qword [fcn.1401573a8]
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.140153af0
add rsp, 0x148
ret
xor eax, eax
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.140153af0
add rsp, 0x148
ret
jmp 0x14019eb10

Function at 0x1401a28c0
Capabilities:
Set socket configuration

Disassembly:
sub rsp, 0x28
xor eax, eax
test edx, edx
lea r8, [rsp + 0x38]
setne al
mov edx, 0x8004667e
mov dword [rsp + 0x38], eax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
add rsp, 0x28
ret

Function at 0x1401a55b0
Capabilities:
Get hostname

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
movsxd rbx, edx
mov rdi, rcx
mov byte [rcx], 0
mov edx, ebx
call qword [sym.imp.WS2_32.dll_gethostname]
mov byte [rbx + rdi - 1], 0
test eax, eax
jne 0x1401a55e9
lea edx, [rax + 0x2e]
mov rcx, rdi
call fcn.140165688
test rax, rax
je 0x1401a55e7
mov byte [rax], 0
xor eax, eax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x1401a56c0
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using des via winapi
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x80
mov rax, qword [0x140256080]
xor rax, rsp
mov qword [rsp + 0x70], rax
mov rdi, rcx
mov rsi, r8
mov rbx, rdx
lea rcx, [rsp + 0x48]
mov r9d, 1
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x40], 8
mov dword [rsp + 0x20], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x1401a5791
xor eax, eax
lea rdx, [rsp + 0x64]
mov rcx, rsi
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], rax
mov word [rsp + 0x58], 0x208
mov dword [rsp + 0x5c], 0x6601
mov dword [rsp + 0x60], 8
mov dword [rsp + 0x68], eax
call fcn.1401a5620
lea rcx, [rsp + 0x64]
mov edx, 8
call fcn.1401aac80
mov rcx, qword [rsp + 0x48]
xor r9d, r9d
lea r11, [rsp + 0x50]
lea r8d, [r9 + 0x14]
lea rdx, [rsp + 0x58]
mov qword [rsp + 0x28], r11
mov dword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x1401a5795
mov rcx, qword [rsp + 0x48]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor eax, eax
jmp 0x1401a57e2
mov ecx, dword [rsp + 0x40]
mov rax, qword [rdi]
xor r9d, r9d
mov dword [rsp + 0x30], ecx
lea rcx, [rsp + 0x40]
xor r8d, r8d
mov qword [rsp + 0x28], rcx
mov rcx, qword [rsp + 0x50]
xor edx, edx
mov qword [rbx], rax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov rcx, qword [rsp + 0x48]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, 1
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.140153af0
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret

Function at 0x1401a5810
Capabilities:
Encrypt data using des via winapi
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rdi, r8
mov rsi, rdx
mov rbx, rcx
mov r8, rcx
mov rdx, rdi
mov rcx, rsi
call fcn.1401a56c0
lea r8, [rbx + 7]
lea rdx, [rdi + 8]
mov rcx, rsi
call fcn.1401a56c0
lea r8, [rbx + 0xe]
lea rdx, [rdi + 0x10]
mov rcx, rsi
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp fcn.1401a56c0