joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14018dc40
Capabilities:
Check http status code

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
mov rbp, qword [rcx + 0x18]
lea eax, [rdx - 0xc8]
xor edi, edi
movzx esi, r8b
mov rbx, rcx
cmp eax, 0x64
jb 0x14018dc80
lea rdx, str.Couldnt_set_desired_mode
call fcn.140168830
lea eax, [rdi + 0x11]
jmp 0x14018dde5
cmp edx, 0xc8
je 0x14018dc97
mov r8d, edx
lea rdx, str.Got_a__03d_response_code_instead_of_the_assumed_200
call fcn.140168920
cmp sil, 0x13
jne 0x14018dcad
mov rdx, rbp
mov rcx, rbx
call fcn.14018db40
jmp 0x14018dde1
cmp sil, 0x14
jne 0x14018ddc3
cmp byte [rbx + 0x6f0], 2
mov rbp, qword [rbx + 0x18]
jne 0x14018dd2b
mov rax, qword [rbx + 0x1a0]
mov rcx, qword [rax]
test rcx, rcx
je 0x14018dd2b
xor r9d, r9d
mov qword [rsp + 0x40], rdi
lea r8, [rsp + 0x40]
mov dword [rsp + 0x20], 3
xor edx, edx
call fcn.1401965c0
test eax, eax
jne 0x14018dde1
mov rcx, qword [rsp + 0x40]
lea edx, [rax + 0x2f]
call fcn.140315dd4
test rax, rax
je 0x14018dd20
mov rdi, qword [rsp + 0x40]
mov ecx, 1
sub rax, rdi
cmovne rcx, rax
mov byte [rcx + rdi], 0
jmp 0x14018dd2b
mov rcx, qword [rsp + 0x40]
call qword [fcn.14031d060]
mov rdx, qword [rbx + 0x748]
test rdx, rdx
jne 0x14018dd50
cmp byte [rbx + 0x133f], 0
lea rax, str.NLST
lea rdx, str.LIST
cmovne rdx, rax
lea r8, [0x1404088d0]
test rdi, rdi
mov r9, r8
lea rax, [0x14034f820]
cmovne r9, rdi
lea rcx, [0x140351024]
cmovne r8, rax
call fcn.140179b90
mov rcx, rdi
mov rsi, rax
call qword [fcn.14031d060]
test rsi, rsi
jne 0x14018dd8e
lea edi, [rsi + 0x1b]
jmp 0x14018dde3
lea rdx, [rbp + 0x5d0]
mov r9, rsi
lea r8, [0x14034fa70]
mov rcx, rbx
call fcn.1401a7830
mov rcx, rsi
mov edi, eax
call qword [fcn.14031d060]
test edi, edi
jne 0x14018dde3
mov rcx, qword [rbx + 0x18]
mov byte [rcx + 0x6c6], 0x1f
jmp 0x14018dde3
cmp sil, 0x15
jne 0x14018ddce
mov r8b, reloc.WS2_32.dll_listen
jmp 0x14018ddd7
cmp sil, 0x16
jne 0x14018dde3
mov r8b, ntohs
mov dl, 1
mov rcx, rbx
call fcn.14018d6a0
mov edi, eax
mov eax, edi
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret
Function at 0x140194c70
Capabilities:
Convert ip address from string

Disassembly:
push rsi
push r13
push r14
sub rsp, 0x90
mov rax, qword [0x140432200]
xor rax, rsp
mov qword [rsp + 0x60], rax
movzx eax, byte [rdx]
mov rsi, r8
mov r14, rdx
mov r13, rcx
test al, al
jne 0x140194ca6
mov eax, select
jmp 0x140194db5
mov qword [rsp + 0x78], rdi
cmp al, 0x5b
jne 0x140194e6d
mov qword [rsp + 0x88], rbx
mov qword [rsp + 0x80], rbp
mov qword [rsp + 0x70], r15
cmp rsi, 4
jb 0x140194e63
inc r14
lea rdx, str.0123456789abcdefABCDEF:.
mov rcx, r14
sub rsi, 2
call fcn.140333310
cmp rsi, rax
je 0x140194dd5
cmp byte [r14 + rax], 0x25
lea r15, [r14 + rax]
mov rsi, rax
jne 0x140194e63
xor edi, edi
lea rdx, [0x14035a7a4]
lea rcx, [r15 + 1]
lea rbx, [r15 + 1]
lea r8d, [rdi + 2]
call fcn.14032dba0
test eax, eax
jne 0x140194d34
movzx eax, byte [r15 + 3]
lea rcx, [r15 + 3]
test al, al
je 0x140194d34
cmp al, 0x5d
cmovne rbx, rcx
movzx eax, byte [rbx]
test al, al
je 0x140194e63
mov rcx, rdi
cmp al, 0x5d
je 0x140194d5f
cmp rcx, 0xf
jge 0x140194d5f
inc rbx
mov byte [rsp + rcx + 0x20], al
inc edi
inc rcx
movzx eax, byte [rbx]
test al, al
jne 0x140194d42
test edi, edi
je 0x140194e63
cmp byte [rbx], 0x5d
jne 0x140194e63
movsxd rax, edi
cmp rax, 0x10
jae 0x140194e90
lea rcx, [rsp + 0x20]
mov byte [rsp + rax + 0x20], 0
call qword [case.0x140167b1f.2]
mov qword [r13 + 0x28], rax
test rax, rax
jne 0x140194dcf
mov eax, 7
mov rbx, qword [rsp + 0x88]
mov rbp, qword [rsp + 0x80]
mov r15, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140151860
add rsp, 0x90
pop r14
pop r13
pop rsi
ret
mov word [r15], 0x5d
lea r8, [rsp + 0x20]
mov byte [rsi + r14], 0
mov rdx, r14
mov ecx, reloc.WS2_32.dll_socket
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x140194e63
lea r9d, [rax + 0x2d]
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x20]
lea ecx, [rax + 0x16]
call sub.WS2_32.dll_inet_ntop
test rax, rax
je 0x140194e57
lea rax, [rsp + 0x30]
mov rdx, 0xffffffffffffffff
nop dword [rax]
inc rdx
cmp byte [rax + rdx], 0
jne 0x140194e20
cmp rdx, rsi
jae 0x140194e57
lea rax, [rsp + 0x30]
mov r8, r14
sub r8, rax
lea rcx, [rsp + 0x30]
nop
movzx eax, byte [rcx]
mov byte [r8 + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x140194e40
mov rsi, rdx
mov byte [rdx + r14 + 1], al
mov byte [rsi + r14], 0x5d
xor eax, eax
jmp 0x140194d9b
mov eax, reloc.WS2_32.dll_shutdown
jmp 0x140194d9b
lea rdx, str.__r_n_t_:_______________
mov rcx, r14
call fcn.140323910
xor edi, edi
mov ecx, reloc.WS2_32.dll_setsockopt
cmp rsi, rax
cmovne edi, ecx
mov eax, edi
jmp 0x140194db0
call fcn.140151df4
int3
Function at 0x140198b40
Capabilities:
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x30
mov eax, dword [0x14043a548]
mov rbx, rcx
mov dword [rsp + 0x50], 0x4020
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x58], 4
test eax, eax
jne 0x140198ba4
lea r9d, [rax + 2]
mov dword [rsp + 0x20], 3
xor r8d, r8d
lea ecx, [rax + 6]
xor edx, edx
call fcn.14019dfb0
test al, al
je 0x140198b98
mov dword [0x14043a548], 2
add rsp, 0x30
pop rbx
ret
mov dword [0x14043a548], 1
jmp 0x140198ba9
cmp eax, 2
je 0x140198bfb
lea rax, [rsp + 0x58]
mov edx, 0xffff
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov r8d, 0x1001
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x140198bda
mov eax, dword [rsp + 0x50]
cmp dword [rsp + 0x48], eax
jg 0x140198bfb
lea r9, [rsp + 0x50]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 0x1001
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_setsockopt]
add rsp, 0x30
pop rbx
ret
Function at 0x140199820
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov qword [rsp + 0x20], rbx
push rsi
sub rsp, 0x1c0
mov rax, qword [0x140432200]
xor rax, rsp
mov qword [rsp + 0x1b0], rax
mov rbx, qword [rcx + 0x10]
lea r8, [rsp + 0x20]
xorps xmm0, xmm0
mov dword [rsp + 0x20], 0x80
mov rsi, rdx
lea rdx, [rsp + 0x30]
movups xmmword [rsp + 0x30], xmm0
movups xmmword [rsp + 0x40], xmm0
movups xmmword [rsp + 0x50], xmm0
movups xmmword [rsp + 0x60], xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rsp + 0x80], xmm0
movups xmmword [rsp + 0x90], xmm0
movups xmmword [rsp + 0xa0], xmm0
mov rcx, qword [rbx + 0x98]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1401998d6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0xb0]
mov ecx, eax
mov ebx, eax
call fcn.14017bba0
mov r9, rax
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r8d, ebx
mov rcx, rsi
call fcn.140168830
mov eax, 2
jmp 0x140199948
mov edx, dword [rsp + 0x20]
lea r9, [rbx + 0x104]
lea r8, [rbx + 0xd4]
lea rcx, [rsp + 0x30]
call fcn.140169670
test al, al
jne 0x140199946
mov qword [rsp + 0x1e0], rdi
call fcn.14031bb7c
mov ebx, dword [rax]
call fcn.14031bb7c
mov r8d, 0x100
lea rdx, [rsp + 0xb0]
mov ecx, ebx
mov rdi, rax
call fcn.14017bba0
mov r8d, dword [rdi]
lea rdx, str.ssloc_inet_ntop___failed_with_errno__d:__s
mov r9, rax
mov rcx, rsi
call fcn.140168830
mov rdi, qword [rsp + 0x1e0]
mov eax, 2
jmp 0x140199948
xor eax, eax
mov rcx, qword [rsp + 0x1b0]
xor rcx, rsp
call fcn.140151860
mov rbx, qword [rsp + 0x1e8]
add rsp, 0x1c0
pop rsi
ret
Function at 0x14019b190
Capabilities:
Check http status code

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x30
mov r14, r8
mov rdi, rdx
mov r8d, reloc.WS2_32.dll_recvfrom
lea rdx, str.WWW_Authenticate:
mov rcx, r9
mov rbx, r9
call fcn.14016cda0
test eax, eax
je 0x14019b1da
mov ebp, dword [rdi + 0x148]
cmp ebp, 0x191
je 0x14019b201
mov r8d, reloc.WS2_32.dll_send
lea rdx, str.Proxy_authenticate:
mov rcx, rbx
call fcn.14016cda0
test eax, eax
je 0x14019b247
mov ebp, dword [rdi + 0x148]
cmp ebp, 0x197
jne 0x14019b247
mov rcx, rbx
call fcn.1401736c0
mov rbx, rax
test rax, rax
jne 0x14019b219
lea eax, [rbx + 0x1b]
jmp 0x14019b40a
cmp ebp, 0x197
mov r8, rbx
mov rcx, rdi
sete dl
call fcn.1401753a0
mov rcx, rbx
mov edi, eax
call qword [fcn.14031d060]
test edi, edi
je 0x14019b408
mov eax, edi
jmp 0x14019b40a
mov r8d, reloc.WS2_32.dll_ntohs
lea rdx, str.Content_Length:
mov rcx, rbx
call fcn.14016cda0
test eax, eax
je 0x14019b2a2
mov r8d, dword [rdi + 0x148]
lea eax, [r8 - 0xc8]
cmp eax, 0x64
jae 0x14019b287
lea rdx, str.Ignoring_Content_Length_in_CONNECT__03d_response
mov rcx, rdi
call fcn.140168920
jmp 0x14019b408
xor edx, edx
lea r9, [r14 + 0x298]
lea rcx, [rbx + 0xf]
lea r8d, [rdx + 0xa]
call fcn.14017c910
jmp 0x14019b408
lea r9, str.close
mov qword [rsp + 0x20], 5
mov r8d, reloc.WS2_32.dll_inet_addr
lea rdx, str.Connection:
mov rcx, rbx
call fcn.1401735f0
test al, al
jne 0x14019b400
mov r8d, reloc.WS2_32.dll_select
lea rdx, str.Transfer_Encoding:
mov rcx, rbx
call fcn.14016cda0
test eax, eax
je 0x14019b360
mov r8d, dword [rdi + 0x148]
lea eax, [r8 - 0xc8]
cmp eax, 0x64
jae 0x14019b30f
lea rdx, str.Ignoring_Transfer_Encoding_in_CONNECT__03d_response
mov rcx, rdi
call fcn.140168920
jmp 0x14019b408
lea r9, str.chunked
mov qword [rsp + 0x20], 7
mov r8d, reloc.WS2_32.dll_select
lea rdx, str.Transfer_Encoding:
mov rcx, rbx
call fcn.1401735f0
test al, al
je 0x14019b408
lea rdx, str.CONNECT_responded_chunked
mov rcx, rdi
call fcn.140168920
mov rcx, rdi
mov byte [r14 + 0x2a4], 1
call fcn.14019e510
jmp 0x14019b408
lea r9, str.close
mov qword [rsp + 0x20], 5
mov r8d, reloc.WS2_32.dll_recvfrom
lea rdx, str.Proxy_Connection:
mov rcx, rbx
call fcn.1401735f0
test al, al
jne 0x14019b400
mov r8d, 7
lea rdx, str.HTTP_1.
mov rcx, rbx
call fcn.14032dba0
test eax, eax
jne 0x14019b408
movzx eax, byte [rbx + 7]
sub al, 0x30
cmp al, 1
ja 0x14019b408
cmp byte [rbx + 8], 0x20
jne 0x14019b408
movsx ecx, byte [rbx + 9]
lea eax, [rcx - 0x30]
cmp al, 9
ja 0x14019b408
movsx edx, byte [rbx + 0xa]
lea eax, [rdx - 0x30]
cmp al, 9
ja 0x14019b408
movsx r8d, byte [rbx + 0xb]
lea eax, [r8 - 0x30]
cmp al, 9
ja 0x14019b408
movzx eax, byte [rbx + 0xc]
sub al, 0x30
cmp al, 9
jbe 0x14019b408
lea ecx, [rcx + rcx*4]
lea ecx, [rdx + rcx*2]
lea ecx, [rcx + rcx*4]
lea ecx, [rcx - 0xa68]
lea ecx, [r8 + rcx*2]
mov dword [rdi + 0x148], ecx
mov dword [rdi + 0x1354], ecx
jmp 0x14019b408
mov byte [r14 + 0x2a5], 1
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x30
pop r14
ret
Function at 0x1401a3430
Capabilities:
Get file size
Read file on windows

Disassembly:
push rbx
push rbp
push r12
push r13
push r15
sub rsp, 0x180
mov rax, qword [0x140432200]
xor rax, rsp
mov qword [rsp + 0x160], rax
mov qword [rsp + 0x50], rcx
mov r15, r8
mov rcx, rdx
mov r12, rdx
xor ebp, ebp
xor ebx, ebx
call fcn.14017b150
mov r13, rax
test rax, rax
jne 0x1401a34ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x60]
mov ecx, eax
call fcn.14017bcd0
mov r9, rax
lea rdx, str.schannel:_invalid_path_name_for_CA_file__s:__s
mov r8, r12
mov rcx, r15
call fcn.140168830
xor ecx, ecx
lea ebx, [rbp + 0x4d]
call qword [fcn.14031d060]
jmp 0x1401a3668
xor r9d, r9d
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x80
mov edx, 0x80000000
mov rcx, r13
mov qword [rsp + 0x170], r14
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x1401a3521
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x60]
mov ecx, eax
call fcn.14017bcd0
mov r9, rax
lea rdx, str.schannel:_failed_to_open_CA_file__s:__s
mov r8, r12
mov rcx, r15
call fcn.140168830
xor ecx, ecx
lea ebx, [r14 + 0x4e]
jmp 0x1401a3652
lea rdx, [rsp + 0x48]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1401a356a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x60]
mov ecx, eax
call fcn.14017bcd0
mov r9, rax
lea rdx, str.schannel:_failed_to_determine_size_of_CA_file__s:__s
mov r8, r12
mov rcx, r15
call fcn.140168830
mov ebx, 0x4d
jmp 0x1401a3646
mov qword [rsp + 0x178], rdi
mov rdi, qword [rsp + 0x48]
cmp rdi, 0x100000
jle 0x1401a359f
mov r8d, 0x100000
lea rdx, str.schannel:_CA_file_exceeds_max_size_of__u_bytes
mov rcx, r15
call fcn.140168830
mov ebx, 0x4d
jmp 0x1401a363e
lea rcx, [rdi + 1]
call qword [str.T2_]
mov rbp, rax
test rax, rax
jne 0x1401a35b9
lea ebx, [rax + 0x1b]
jmp 0x1401a363e
mov qword [rsp + 0x1c8], rsi
test rdi, rdi
je 0x1401a3618
nop word [rax + rax]
mov r8d, edi
mov dword [rsp + 0x40], 0
sub r8d, ebx
mov esi, ebx
lea rdx, [rbx + rbp]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1401a368a
mov eax, dword [rsp + 0x40]
test eax, eax
jne 0x1401a360f
mov edi, esi
jmp 0x1401a3611
add ebx, eax
mov eax, ebx
cmp rax, rdi
jb 0x1401a35d0
mov rcx, qword [rsp + 0x50]
mov r9, r12
mov r8, rdi
mov byte [rdi + rbp], 0
mov rdx, rbp
mov qword [rsp + 0x20], r15
call fcn.1401a31b0
mov ebx, eax
mov rsi, qword [rsp + 0x1c8]
mov rdi, qword [rsp + 0x178]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbp
call qword [fcn.14031d060]
mov rcx, r13
call fcn.14031d060
mov r14, qword [rsp + 0x170]
mov eax, ebx
mov rcx, qword [rsp + 0x160]
xor rcx, rsp
call fcn.140151860
add rsp, 0x180
pop r15
pop r13
pop r12
pop rbp
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x60]
mov ecx, eax
call fcn.14017bcd0
mov r9, rax
lea rdx, str.schannel:_failed_to_read_from_CA_file__s:__s
mov r8, r12
mov rcx, r15
call fcn.140168830
mov ebx, 0x4d
jmp 0x1401a3636
Function at 0x1401aa3a0
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push r15
sub rsp, 0x20
mov eax, dword [rcx + 0x18]
mov rbp, rcx
mov ecx, dword [rcx + 0x20]
mov rsi, rdx
add rcx, 0x18
mov r15d, r8d
lea r9d, [rax + rax]
add rcx, r9
call qword [str.T2_]
mov rbx, rax
test rax, rax
jne 0x1401aa3e3
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop rsi
pop rbp
ret
lea rcx, [rax + 0x18]
mov qword [rax], rbp
mov qword [rax + 8], rcx
mov eax, dword [rbp + 0x18]
add rax, rcx
mov qword [rsp + 0x48], rdi
mov qword [rbx + 0x10], rax
lea rdi, [rbp + 8]
mov qword [rsp + 0x50], r14
cmp r15d, dword [rbp + 0x1c]
jbe 0x1401aa430
call qword [rbp]
mov rcx, qword [rbx + 8]
mov r8d, r15d
mov rdx, rsi
call qword [rdi]
mov esi, dword [rbp + 0x18]
add rsi, qword [rbx + 0x10]
mov rdx, qword [rbx + 8]
mov rcx, rsi
call qword [rbp + reloc.WS2_32.dll_recv]
mov r15d, dword [rbp + 0x20]
mov rcx, qword [rbx + 8]
call qword [rbp]
mov rcx, qword [rbx + 0x10]
call qword [rbp]
xor r14d, r14d
test r15, r15
je 0x1401aa492
mov r14, r15
nop dword [rax]
movzx eax, byte [rsi]
lea rdx, [rsp + 0x40]
xor al, 0x36
mov r8d, 1
mov byte [rsp + 0x40], al
mov rcx, qword [rbx + 8]
call qword [rdi]
movzx eax, byte [rsi]
lea rdx, [rsp + 0x40]
xor al, 0x5c
lea rsi, [rsi + 1]
mov byte [rsp + 0x40], al
mov r8d, 1
mov rcx, qword [rbx + 0x10]
call qword [rdi]
sub r15, 1
jne 0x1401aa450
lea rdi, [rbp + 8]
mov eax, dword [rbp + 0x1c]
cmp r14, rax
jae 0x1401aa4d1
nop word [rax + rax]
mov rcx, qword [rbx + 8]
lea rdx, [0x14035de01]
mov r8d, 1
call qword [rdi]
mov rcx, qword [rbx + 0x10]
lea rdx, [0x14035de02]
mov r8d, 1
call qword [rdi]
mov eax, dword [rbp + 0x1c]
inc r14
cmp r14, rax
jb 0x1401aa4a0
mov r14, qword [rsp + 0x50]
mov rax, rbx
mov rbx, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rsi
pop rbp
ret

Function at 0x1401ab580
Capabilities:
Encode data using xor

Disassembly:
mov r10, rcx
test rdx, rdx
je 0x1401ab5e5
nop dword [rax + rax]
movzx r8d, byte [r10]
lea r10, [r10 + 1]
movzx eax, r8b
movzx r9d, r8b
shr r9b, 1
and al, 0xfe
not r9b
movzx eax, al
xor r9b, r8b
shr r9b, 1
xor r9b, r8b
shr r9b, 1
xor r9b, r8b
shr r9b, 1
xor r9b, r8b
shr r9b, 1
xor r9b, r8b
shr r9b, 1
xor r9b, r8b
or r8b, 1
test r9b, 2
movzx ecx, r8b
cmove ecx, eax
mov byte [r10 - 1], cl
sub rdx, 1
jne 0x1401ab590
ret

Function at 0x1401af6c0
Capabilities:
Set thread local storage value

Disassembly:
mov eax, 0x28
call fcn.140152430
sub rsp, rax
mov ecx, dword [rcx]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
xor ecx, ecx
test eax, eax
setne cl
mov eax, ecx
add rsp, 0x28
ret
Function at 0x1401b03c0
Capabilities:
Initialize winsock library

Disassembly:
mov eax, 0x28
call fcn.140152430
sub rsp, rax
cmp dword [0x14043a580], 0
jne 0x1401b047a
xor edx, edx
mov dword [0x14043a580], 1
mov r8d, 0x198
lea rcx, [0x14043a590]
call fcn.1403498f0
mov ecx, 0x202
lea rdx, [0x14043a590]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x1401b047a
call fcn.1401af090
lea r8, str.BIO_sock_init
mov edx, __WSAFDIsSet
lea rcx, str.crypto_bio_bio_sock.c
call fcn.1401af1b0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea r8, str.calling_wsastartup__
mov ecx, 2
mov edx, eax
call fcn.1401af2b0
call fcn.1401af090
lea r8, str.BIO_sock_init
mov edx, __WSAFDIsSet
lea rcx, str.crypto_bio_bio_sock.c
call fcn.1401af1b0
xor r8d, r8d
lea edx, [r8 + 0x7a]
lea ecx, [rdx - 0x5a]
call fcn.1401af2b0
mov eax, 0xffffffff
add rsp, 0x28
ret
mov eax, 1
add rsp, 0x28
ret

Function at 0x1401b0490
Capabilities:
Set socket configuration

Disassembly:
push rbx
mov eax, 0x20
call fcn.140152430
sub rsp, rax
mov dword [rsp + 0x30], edx
lea r8, [rsp + 0x30]
mov edx, 0x8004667e
movsxd rcx, ecx
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov ebx, eax
test eax, eax
jns 0x1401b04f2
call fcn.1401af090
lea r8, str.BIO_socket_ioctl
mov edx, 0xd1
lea rcx, str.crypto_bio_bio_sock.c
call fcn.1401af1b0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea r8, str.calling_ioctlsocket__
mov ecx, 2
mov edx, eax
call fcn.1401af2b0
xor eax, eax
test ebx, ebx
sete al
add rsp, 0x20
pop rbx
ret

Function at 0x1401b0500
Capabilities:
Get socket status

Disassembly:
push rbx
push rsi
push rdi
mov eax, 0x260
call fcn.140152430
sub rsp, rax
mov rax, qword [0x140432200]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov edi, ecx
mov rbx, r8
mov esi, edx
cmp ecx, 0x3f
ja 0x1401b0592
test rbx, rbx
jne 0x1401b053a
lea eax, [r8 + 1]
jmp 0x1401b0597
xor ecx, ecx
call fcn.14032e030
mov rcx, rax
cmp rbx, rax
jge 0x1401b054d
xor eax, eax
jmp 0x1401b0597
xor eax, eax
mov qword [rsp + 0x48], rdi
sub ebx, ecx
mov dword [rsp + 0x34], eax
test esi, esi
mov dword [rsp + 0x40], 1
lea r8, [rsp + 0x40]
mov dword [rsp + 0x30], ebx
cmovne r8, rax
lea rdx, [rsp + 0x40]
cmove rdx, rax
lea ecx, [rdi + 1]
lea rax, [rsp + 0x30]
xor r9d, r9d
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
jmp 0x1401b0597
mov eax, 0xffffffff
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.140151860
add rsp, 0x260
pop rdi
pop rsi
pop rbx
ret
Function at 0x1401b2820
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
mov eax, 0x280
call fcn.140152430
sub rsp, rax
mov rax, qword [0x140432200]
xor rax, rsp
mov qword [rsp + 0x270], rax
cmp dword [0x14043a868], 0
lea rax, [0x1401b21a0]
mov qword [rsp + 0x28], rax
lea rbx, [0x14035ec60]
lea rax, str.getnameinfo
movzx ebp, cx
mov qword [rsp + 0x30], rax
lea rax, [0x1401b25e0]
mov qword [rsp + 0x38], rax
lea rax, [0x14035ec80]
mov qword [rsp + 0x40], rax
lea rax, [0x1401b2140]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x20], rbx
jne 0x1401b29f9
mov edx, 0x104
lea rcx, [rsp + 0x160]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x1401b29ef
lea r8, [rsp + 0x160]
mov qword [rsp + 0x290], rsi
mov edx, 0x10c
lea rcx, [rsp + 0x50]
call fcn.140333728
lea r8, str.ws2_32
mov edx, 0x10c
lea rcx, [rsp + 0x50]
call fcn.140333788
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rsi, rax
test rax, rax
je 0x1401b291a
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
jne 0x1401b297a
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea r8, [rsp + 0x160]
mov edx, 0x10c
lea rcx, [rsp + 0x50]
call fcn.140333728
lea r8, str.wship6
mov edx, 0x10c
lea rcx, [rsp + 0x50]
call fcn.140333788
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rsi, rax
test rax, rax
je 0x1401b29e7
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
jne 0x1401b297a
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x1401b29e7
mov qword [rsp + 0x298], rdi
lea rbx, [rsp + 0x28]
xor edi, edi
nop dword [rax]
mov rdx, qword [rbx - 8]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbx], rax
test rax, rax
je 0x1401b29d6
inc edi
add rbx, 0x10
cmp edi, 3
jl 0x1401b2990
mov rax, qword [rsp + 0x28]
mov qword [0x140432da0], rax
mov rax, qword [rsp + 0x38]
mov qword [0x140432db0], rax
mov rax, qword [rsp + 0x48]
mov qword [0x140432dc0], rax
jmp 0x1401b29df
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rdi, qword [rsp + 0x298]
mov rsi, qword [rsp + 0x290]
mov dword [0x14043a868], 1
mov rax, rbp
lea rcx, [0x140432d98]
add rax, rax
mov rax, qword [rcx + rax*8 + 8]
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.140151860
mov rbx, qword [rsp + 0x2a0]
add rsp, 0x280
pop rbp
ret
Function at 0x1401b2a30
Capabilities:
Resolve dns

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x870
call fcn.140152430
sub rsp, rax
mov rax, qword [0x140432200]
xor rax, rsp
mov qword [rsp + 0x860], rax
mov r13, qword [rsp + 0x8c8]
mov r14, rcx
mov dword [rsp + 0x24], r8d
xor ebp, ebp
mov dword [rsp + 0x28], edx
mov r8d, 0x401
mov qword [rsp + 0x38], rcx
xor edx, edx
lea rcx, [rsp + 0x40]
mov word [rsp + 0x20], r9w
mov r12d, ebp
call fcn.1403498f0
xor edx, edx
lea rcx, [rsp + 0x450]
mov r8d, 0x401
call fcn.1403498f0
mov r9d, 0x400
lea rbx, [rsp + 0x40]
mov r8, r14
mov qword [rsp + 0x30], rbx
lea rcx, [rsp + 0x40]
lea rdi, [rsp + 0x450]
lea edx, [r9 + 1]
call fcn.1403337f4
lea r15, [rbp - 1]
nop
mov rcx, r14
mov qword [r13], rbp
mov rsi, r13
mov byte [rdi], bpl
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov r14, rax
test rax, rax
je 0x1401b2c2e
cmp word [rax + 0x10], 2
jne 0x1401b2b57
cmp word [rax + 0x12], 4
jne 0x1401b2b57
mov rbx, qword [rax + 0x18]
mov rax, qword [rbx]
test rax, rax
je 0x1401b2b52
nop dword [rax]
mov r9d, dword [rax]
movzx r8d, word [rsp + 0x20]
mov edx, dword [rsp + 0x24]
mov ecx, dword [rsp + 0x28]
call fcn.1401b2c90
mov qword [rsi], rax
test rax, rax
je 0x1401b2c27
add rbx, 8
lea rsi, [rax + 0x28]
mov rax, qword [rbx]
test rax, rax
jne 0x1401b2b20
mov rbx, qword [rsp + 0x30]
mov r8, qword [r14]
mov r9d, 0x400
mov rcx, rdi
lea edx, [r9 + 1]
call fcn.1403337f4
cmp qword [r13], rbp
jne 0x1401b2bd0
mov rax, r15
inc rax
cmp byte [rdi + rax], bpl
jne 0x1401b2b75
test rax, rax
je 0x1401b2c48
mov r8, rdi
mov rax, rbx
sub r8, rbx
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x1401b2ba3
inc rax
test ecx, ecx
jne 0x1401b2b90
test edx, edx
je 0x1401b2c48
inc r12d
cmp r12d, 0x10
je 0x1401b2c48
mov r14, qword [rsp + 0x38]
mov rax, rbx
mov rbx, rdi
mov rdi, rax
mov qword [rsp + 0x30], rbx
jmp 0x1401b2ae0
cmp dword [rsp + 0x8c0], ebp
je 0x1401b2c5b
nop dword [rax]
cmp byte [rdi + r15 + 1], bpl
lea r15, [r15 + 1]
jne 0x1401b2be0
lea rdx, [r15 + 1]
mov ecx, 1
call fcn.140323324
mov rbx, rax
test rax, rax
jne 0x1401b2c06
mov rbx, rbp
jmp 0x1401b2c15
mov r8, rdi
lea rdx, [r15 + 1]
mov rcx, rax
call fcn.140333728
mov rax, qword [r13]
mov qword [rax + 0x18], rbx
mov rax, qword [r13]
cmp qword [rax + 0x18], rbp
jne 0x1401b2c5b
mov ebp, 8
jmp 0x1401b2c5b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
sub ecx, 0x2af9
je 0x1401b2c56
sub ecx, 1
je 0x1401b2c4f
sub ecx, 1
jne 0x1401b2c56
mov ebp, 0x2afb
jmp 0x1401b2c5b
mov ebp, 0x2afa
jmp 0x1401b2c5b
mov ebp, 0x2af9
mov eax, ebp
mov rcx, qword [rsp + 0x860]
xor rcx, rsp
call fcn.140151860
lea r11, [rsp + 0x870]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret