joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180167840
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x30
mov rbp, qword [rcx + 0x18]
xor edi, edi
mov dword [rsp + 0x50], 0
mov rsi, rcx
lea rcx, str.CURL_SMALLSENDS
mov rbx, r9
mov r14, r8
cmp rdx, qword [rbp + 0x1f0]
sete dil
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
test rax, rax
je 0x1801678a4
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 0xa]
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtoul
mov eax, eax
test rax, rax
je 0x1801678a4
cmp rbx, rax
cmovb rax, rbx
mov rbx, rax
lea rcx, [rsp + 0x50]
mov eax, edi
mov qword [rsp + 0x20], rcx
mov r9, rbx
mov rcx, rsi
mov r8, r14
mov edx, edi
call qword [rbp + rax*8 + 0x220]
mov rcx, qword [rsp + 0x70]
mov qword [rcx], rax
test rax, rax
jns 0x1801678e3
mov eax, dword [rsp + 0x50]
test eax, eax
je 0x1801678e7
cmp eax, 0x51
jne 0x1801678ec
mov qword [rcx], 0
xor eax, eax
jmp 0x1801678ec
mov eax, gethostname
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
add rsp, 0x30
pop r14
pop rdi
pop rsi
ret

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

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x1c0
mov rax, qword [0x180255300]
xor rax, rsp
mov qword [rsp + 0x1b0], rax
xorps xmm0, xmm0
mov dword [rsp + 0x20], 0x80
mov rax, rdx
mov rbx, r8
mov rsi, rcx
lea r8, [rsp + 0x20]
mov rcx, rax
lea rdx, [rsp + 0x30]
mov rdi, r9
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
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x180168063
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0xb0]
mov ecx, eax
mov ebx, eax
call fcn.18017ceb0
mov r9, rax
lea rdx, str.getsockname___failed_with_errno__d:__s
mov r8d, ebx
mov rcx, rsi
call fcn.1801671c0
jmp 0x18016812b
movzx ecx, word [rsp + 0x30]
mov edx, ecx
sub edx, 1
je 0x180168100
sub edx, 1
je 0x1801680aa
cmp edx, 0x15
jne 0x1801680b1
lea rdx, [rsp + 0x38]
mov r8, rbx
mov r9d, 0x2e
call fcn.180199570
test rax, rax
je 0x1801680b1
movzx ecx, word [rsp + 0x32]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [rdi], eax
jmp 0x18016812b
lea rdx, [rsp + 0x34]
jmp 0x180168082
mov byte [rbx], 0
mov dword [rdi], 0
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov dword [rax], 0x273f
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov ebx, dword [rax]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov r8d, 0x100
lea rdx, [rsp + 0xb0]
mov ecx, ebx
mov rdi, rax
call fcn.18017ceb0
mov r8d, dword [rdi]
lea rdx, str.ssloc_inet_ntop___failed_with_errno__d:__s
mov r9, rax
mov rcx, rsi
call fcn.1801671c0
jmp 0x18016812b
cmp dword [rsp + 0x20], 2
jle 0x180168122
lea r9, [rsp + 0x32]
mov edx, 0x2e
lea r8, [0x1801f58a0]
mov rcx, rbx
call fcn.18017b290
jmp 0x180168125
mov byte [rbx], 0
mov dword [rdi], 0
mov rcx, qword [rsp + 0x1b0]
xor rcx, rsp
call fcn.1801adea0
add rsp, 0x1c0
pop rdi
pop rsi
pop rbx
ret
Function at 0x180168970
Capabilities:
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x30
mov eax, dword [0x18025fde0]
mov rbx, rcx
mov dword [rsp + 0x50], 0x4020
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x58], 4
test eax, eax
jne 0x1801689d4
lea r9d, [rax + 2]
mov dword [rsp + 0x20], 3
xor r8d, r8d
lea ecx, [rax + 6]
xor edx, edx
call fcn.180199ae0
test al, al
je 0x1801689c8
mov dword [0x18025fde0], 2
add rsp, 0x30
pop rbx
ret
mov dword [0x18025fde0], 1
jmp 0x1801689d9
cmp eax, 2
je 0x180168a2b
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 0x180168a0a
mov eax, dword [rsp + 0x50]
cmp dword [rsp + 0x48], eax
jg 0x180168a2b
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 0x180169e10
Capabilities:
Read file on windows

Disassembly:
sub rsp, 0x28
call sub.api_ms_win_crt_stdio_l1_1_0.dll__read
cdqe
add rsp, 0x28
ret
Function at 0x18016c920
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
cmp byte [0x18025fe01], 0
mov esi, r8d
mov rdi, qword [rsp + 0x68]
je 0x18016c9d9
test rdi, rdi
je 0x18016c9d9
mov eax, dword [0x18025fe04]
test eax, eax
jne 0x18016c9c7
mov r8d, dword [rsp + 0x60]
lea rsi, str.recv
mov r9, rsi
lea rcx, str.LIMIT__s:_d__s_reached_memlimit_n
mov rdx, rdi
call fcn.18016c640
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r9d, dword [rsp + 0x60]
lea rdx, str.LIMIT__s:_d__s_reached_memlimit_n
mov rcx, rax
mov qword [rsp + 0x20], rsi
mov r8, rdi
call fcn.18017b260
mov rcx, qword [0x18025fdf8]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fflush
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov dword [rax], recv
mov eax, 0xffffffff
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
dec eax
mov dword [0x18025fe04], eax
call qword [sym.imp.WS2_32.dll_recv]
mov ebx, eax
jmp 0x18016c9e6
call qword [sym.imp.WS2_32.dll_recv]
mov ebx, eax
test rdi, rdi
je 0x18016ca01
mov r8d, dword [rsp + 0x60]
lea rcx, str.RECV__s:_d_recv__lu____ld_n
mov r9d, esi
mov dword [rsp + 0x20], ebx
mov rdx, rdi
call fcn.18016c640
mov rsi, qword [rsp + 0x48]
mov eax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret

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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
cmp byte [0x18025fe01], 0
mov esi, r8d
mov rdi, qword [rsp + 0x68]
je 0x18016cb39
test rdi, rdi
je 0x18016cb39
mov eax, dword [0x18025fe04]
test eax, eax
jne 0x18016cb27
mov r8d, dword [rsp + 0x60]
lea rsi, str.send
mov r9, rsi
lea rcx, str.LIMIT__s:_d__s_reached_memlimit_n
mov rdx, rdi
call fcn.18016c640
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r9d, dword [rsp + 0x60]
lea rdx, str.LIMIT__s:_d__s_reached_memlimit_n
mov rcx, rax
mov qword [rsp + 0x20], rsi
mov r8, rdi
call fcn.18017b260
mov rcx, qword [0x18025fdf8]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fflush
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov dword [rax], recv
mov eax, 0xffffffff
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
dec eax
mov dword [0x18025fe04], eax
call qword [sym.imp.WS2_32.dll_send]
mov ebx, eax
jmp 0x18016cb46
call qword [sym.imp.WS2_32.dll_send]
mov ebx, eax
test rdi, rdi
je 0x18016cb61
mov r8d, dword [rsp + 0x60]
lea rcx, str.SEND__s:_d_send__lu____ld_n
mov r9d, esi
mov dword [rsp + 0x20], ebx
mov rdx, rdi
call fcn.18016c640
mov rsi, qword [rsp + 0x48]
mov eax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
Function at 0x180172b30
Capabilities:
Convert ip address from string

Disassembly:
cmp qword [rsp + 0x28], 0
mov qword [r9], 0
jge 0x180172b45
mov eax, 0xfffffffe
ret
mov qword [rsp + 0x28], r9
mov r9b, 1
jmp fcn.180172680
Function at 0x18017e400
Capabilities:
Query environment variable

Disassembly:
mov r11, rsp
push rsi
push r12
push r14
push r15
sub rsp, 0xf8
mov rax, qword [0x180255300]
xor rax, rsp
mov qword [rsp + 0xd0], rax
mov rax, r8
lea r15, [rsp + 0x50]
and rax, 0xfffffffffffffffe
mov r14, r8
mov rsi, rdx
mov r12, rcx
cmp rax, 0x100
jae 0x18017e64f
test r14b, 1
je 0x18017e64f
mov qword [r11 + 0x18], rbx
dec r14
mov qword [r11 - 0x28], rbp
mov ecx, 0x2b
mov qword [r11 - 0x30], rdi
mov rbp, r14
shr rbp, 1
lea rdi, [rsp + 0x50]
mov qword [r11 - 0x38], r13
je 0x18017e5cd
xor r13d, r13d
nop word [rax + rax]
mov ebx, 4
lea rcx, str.CURL_ENTROPY
cmp rbp, rbx
cmovb rbx, rbp
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
test rax, rax
je 0x18017e504
cmp byte [0x18025fe0c], r13b
jne 0x18017e4f1
mov dword [rsp + 0x24], r13d
mov rcx, 0xffffffffffffffff
inc rcx
cmp byte [rax + rcx], r13b
jne 0x18017e4b2
mov r8d, 4
mov rdx, rax
cmp rcx, r8
cmovb r8, rcx
lea rcx, [rsp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [rsp + 0x24]
call qword [sym.imp.WS2_32.dll_ntohl]
mov dword [0x18025fe08], eax
mov byte [0x18025fe0c], 1
jmp 0x18017e5a3
mov eax, dword [0x18025fe08]
inc eax
mov dword [0x18025fe08], eax
jmp 0x18017e5a3
mov r8d, 4
lea rdx, [rsp + 0x20]
mov rcx, r12
call fcn.180160db0
mov ecx, eax
cmp eax, 4
je 0x18017e52c
test eax, eax
jne 0x18017e5d1
mov eax, dword [rsp + 0x20]
jmp 0x18017e5aa
cmp byte [0x18025fe0c], r13b
jne 0x18017e589
lea rcx, [rsp + 0x38]
call fcn.18015a9d0
lea rdx, str.WARNING:_Using_weak_random_seed
mov rcx, r12
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x28], xmm0
call fcn.180167330
movups xmm0, xmmword [rsp + 0x28]
mov edx, dword [0x18025fe08]
mov byte [0x18025fe0c], 1
movq rcx, xmm0
psrldq xmm0, 8
add edx, ecx
movd eax, xmm0
mov ecx, 0xa70427df
add edx, eax
imul eax, edx, 0x7f82434b
sub ecx, eax
jmp 0x18017e58f
mov ecx, dword [0x18025fe08]
imul eax, ecx, 0x41c64e6d
add eax, 0x3039
mov dword [0x18025fe08], eax
rol eax, 0x10
mov ecx, r13d
mov dword [rsp + 0x20], eax
test rbx, rbx
je 0x18017e5c4
sub rbp, rbx
mov byte [rdi], al
inc rdi
shr eax, 8
sub rbx, 1
jne 0x18017e5b2
mov dword [rsp + 0x20], eax
test rbp, rbp
jne 0x18017e480
test ecx, ecx
je 0x18017e612
mov eax, ecx
mov rdi, qword [rsp + 0xe8]
mov rbp, qword [rsp + 0xf0]
mov rbx, qword [rsp + 0x130]
mov r13, qword [rsp + 0xe0]
mov rcx, qword [rsp + 0xd0]
xor rcx, rsp
call fcn.1801adea0
add rsp, 0xf8
pop r15
pop r14
pop r12
pop rsi
ret
test r14, r14
je 0x18017e648
lea rdx, str.0123456789abcdef
nop
movzx ecx, byte [r15]
lea r15, [r15 + 1]
mov eax, ecx
and ecx, 0xf
shr rax, 4
movzx eax, byte [rax + rdx]
mov byte [rsi], al
movzx eax, byte [rcx + rdx]
mov byte [rsi + 1], al
add rsi, 2
sub r14, 2
jne 0x18017e620
mov byte [rsi], 0
xor eax, eax
jmp 0x18017e5d3
mov eax, 0x2b
jmp 0x18017e5f3
Function at 0x18017e660
Capabilities:
Move file

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x60
mov rbx, rcx
movaps xmmword [rsp + 0x50], xmm6
lea rcx, [rsp + 0x30]
mov rdi, rdx
call fcn.18015a9d0
mov rcx, rbx
movups xmm6, xmmword [rax]
call sub.api_ms_win_crt_string_l1_1_0.dll__strdup
mov rcx, rdi
mov rsi, rax
call sub.api_ms_win_crt_string_l1_1_0.dll__strdup
mov r8d, 1
mov rdx, rax
mov rcx, rsi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x18017e710
nop dword [rax]
nop word [rax + rax]
lea rcx, [rsp + 0x40]
movdqa xmmword [rsp + 0x20], xmm6
call fcn.18015a9d0
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x30]
movups xmm0, xmmword [rax]
movaps xmmword [rsp + 0x30], xmm0
call fcn.18015aa60
cmp rax, 0x3e8
ja 0x18017e741
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
mov r8d, 1
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
je 0x18017e6c0
test rsi, rsi
je 0x18017e71d
mov rcx, rsi
call fcn.1801af4ad
test rbx, rbx
je 0x18017e72a
mov rcx, rbx
call fcn.1801af4ad
xor eax, eax
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
movaps xmm6, xmmword [rsp + 0x50]
add rsp, 0x60
pop rdi
ret
test rsi, rsi
je 0x18017e74e
mov rcx, rsi
call fcn.1801af4ad
test rbx, rbx
je 0x18017e75b
mov rcx, rbx
call fcn.1801af4ad
mov eax, 1
jmp 0x18017e72c
Function at 0x18017f140
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0x30
xor ebx, ebx
mov r9, rdx
mov r8, rcx
mov qword [rsp + 0x28], rbx
xor edx, edx
mov dword [rsp + 0x20], ebx
xor ecx, ecx
call sub.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex
test rax, rax
je 0x18017f176
cmp rax, 0xffffffffffffffff
cmovne rbx, rax
mov rax, rbx
add rsp, 0x30
pop rbx
ret
add rsp, 0x30
pop rbx
ret
Function at 0x180182650
Capabilities:
Query environment variable

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, 0x20
mov r14, rcx
lea r9, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlibgetenv.c
xor ebp, ebp
mov ebx, 1
mov edx, ebx
xor ecx, ecx
lea r8d, [rbp + 0x2d]
call fcn.18016c7e0
mov rdi, rax
test rax, rax
je 0x1801826d9
mov r8d, ebx
mov rdx, rdi
mov rcx, r14
mov rbp, rdi
mov esi, ebx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov ebx, eax
test eax, eax
je 0x18018270f
cmp ebx, esi
je 0x18018270f
cmp ebx, 0x8000
ja 0x18018270f
cmp ebx, esi
jb 0x18018270a
mov edx, ebx
lea r9, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlibgetenv.c
mov r8d, 0x2d
mov rcx, rdi
call fcn.18016c7e0
mov rdi, rax
test rax, rax
jne 0x180182690
mov edx, 0x2f
mov rcx, rbp
lea r8, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlibgetenv.c
call fcn.18016c5e0
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
mov rax, rdi
jmp 0x1801826ef
mov edx, 0x3a
mov rcx, rdi
jmp 0x1801826e1
Function at 0x180185890
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0xd0
mov rax, qword [0x180255300]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov rax, qword [rcx + 0x18]
mov rsi, rcx
xor r9d, r9d
mov rdi, qword [rax + 0x700]
lea rax, [rsp + 0x30]
mov dword [rsp + 0x30], 0x80
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r8d, dword [rdi + 0x144]
mov rdx, qword [rdi + 0x150]
add r8d, 4
mov rcx, qword [rdi + 0x18]
call qword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [rdi + 0x138], 0
mov dword [rdi + 0x13c], eax
jne 0x180185927
movsxd r8, dword [rsp + 0x30]
lea rcx, [rdi + 0xb8]
lea rdx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x30]
mov dword [rdi + 0x138], eax
mov r8d, dword [rdi + 0x13c]
mov qword [rsp + 0xe8], rbx
mov qword [rsp + 0xf0], rbp
cmp r8d, 4
jge 0x18018598d
lea rdx, str.Received_too_short_packet
mov rcx, rsi
call fcn.1801671c0
mov dword [rdi + 0xc], 7
xor eax, eax
mov rbp, qword [rsp + 0xf0]
mov rbx, qword [rsp + 0xe8]
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.1801adea0
mov rsi, qword [rsp + 0xf8]
add rsp, 0xd0
pop rdi
ret
mov rdx, qword [rdi + 0x150]
movzx eax, byte [rdx]
movzx ecx, byte [rdx + 1]
shl eax, 8
or ecx, eax
mov dword [rdi + 0xc], ecx
dec ecx
cmp ecx, 5
ja case.0x1801859c3.1
movsxd rax, ecx
lea r9, [0x180000000]
mov ecx, dword [r9 + rax*4 + 0x185adc]
add rcx, r9
jmp rcx
cmp r8d, 4
jle case.0x1801859c3.4
movzx eax, byte [rdx + 3]
movzx ecx, byte [rdx + 2]
shl ecx, 8
or ecx, eax
movzx eax, word [rdi + 0x14c]
inc eax
movzx eax, ax
cmp eax, ecx
jne case.0x1801859c3.4
lea eax, [r8 - 4]
mov rcx, rsi
lea r8, [rdx + 4]
movsxd r9, eax
mov edx, 1
call fcn.1801670e0
mov ebx, eax
test eax, eax
je 0x180185a22
mov edx, 5
mov rcx, rdi
call fcn.180186530
mov eax, ebx
jmp 0x18018595c
mov eax, dword [rdi + 0x13c]
mov rcx, rsi
sub eax, 4
cdqe
add qword [rsi + 0xf8], rax
mov rdx, qword [rsi + 0xf8]
call fcn.180178ea0
jmp case.0x1801859c3.4
movzx ecx, byte [rdx + 2]
lea eax, [r8 - 4]
movsxd rbx, eax
lea rbp, [rdx + 4]
movzx eax, byte [rdx + 3]
mov rdx, rbx
shl ecx, 8
or ecx, eax
mov dword [rdi + 8], ecx
mov rcx, rbp
call fcn.1801865a0
cmp rax, rbx
jae case.0x1801859c3.4
mov r8, rbp
lea rdx, str.TFTP_error:__s
mov rcx, rsi
call fcn.180167330
jmp case.0x1801859c3.4
add r8d, 0xfffffffe
add rdx, 2
mov rcx, rdi
call fcn.1801855c0
test eax, eax
je case.0x1801859c3.4
jmp 0x18018595c
lea r8, str.Internal_error:_Unexpected_packet
mov rcx, rsi
lea rdx, [0x1801f58a0]
call fcn.1801671c0
mov rcx, rsi
call fcn.1801791e0
test eax, eax
je 0x18018595a
mov edx, 5
mov rcx, rdi
call fcn.180186530
mov eax, 0x2a
jmp 0x18018595c
Function at 0x18018d340
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, 0xd0
mov rax, qword [0x180255300]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov rsi, qword [rcx + 0x18]
lea r8, [rsp + 0x30]
mov rdi, rcx
lea rdx, [rsp + 0x40]
mov rbx, 0xffffffffffffffff
mov rbp, qword [rsi + 0x1f0]
mov rcx, rbp
mov dword [rsp + 0x30], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x18018d3cc
lea rax, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlib_ftp.c
mov dword [rsp + 0x30], 0x80
mov r9d, 0x11c
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x30]
mov rcx, rbp
lea rdx, [rsp + 0x40]
call fcn.18016c3c0
mov rbx, rax
mov r8, rbp
mov rdx, rsi
mov rcx, rdi
call fcn.180167be0
mov rcx, rdi
cmp rbx, 0xffffffffffffffff
jne 0x18018d3f4
lea rdx, str.Error_accept__ing_server_connect
call fcn.1801671c0
lea eax, [rbx + 0x1f]
jmp 0x18018d470
lea rdx, str.Connection_accepted_from_server
call fcn.180167330
mov edx, 1
mov byte [rsi + 0x3da], 0
mov rcx, rbx
mov qword [rsi + 0x1f0], rbx
call fcn.180199540
mov byte [rsi + 0x3ed], 1
cmp qword [rdi + 0x288], 0
je 0x18018d46e
mov dl, 1
mov rcx, rdi
call fcn.180154ce0
mov rcx, qword [rdi + 0x290]
mov r8d, 1
mov rdx, rbx
call qword [rdi + 0x288]
xor edx, edx
mov rcx, rdi
mov ebx, eax
call fcn.180154ce0
test ebx, ebx
je 0x18018d46e
mov rdx, rsi
mov rcx, rdi
call fcn.18018d970
mov eax, 0x2a
jmp 0x18018d470
xor eax, eax
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.1801adea0
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

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

Disassembly:
push rbx
sub rsp, 0x20
mov rax, qword [rcx + 0x1b0]
mov rbx, rcx
mov rdx, qword [rcx + 0x18]
cmp dword [rax + 0x10], 0
je 0x18018f096
mov dword [rdx + 0x7d0], 0xd
mov r8d, reloc.WS2_32.dll_listen
mov dl, 1
add rsp, 0x20
pop rbx
jmp fcn.18018f180
cmp byte [rcx + 0xb26], 0
je 0x18018f0ab
xor edx, edx
add rsp, 0x20
pop rbx
jmp fcn.18018fc20
cmp byte [rcx + 0xb29], 0
je 0x18018f12c
mov r9, qword [rdx + 0x790]
test r9, r9
jne 0x18018f0ee
mov r9, qword [rcx + 0x7c8]
test r9, r9
jne 0x18018f0e5
cmp byte [rbx + 0x12fa], 0
lea rcx, str.NLST
lea r9, str.LIST
cmovne r9, rcx
lea r8, str.PRET__s
jmp 0x18018f105
cmp byte [rcx + 0xb35], 0
lea r8, str.PRET_STOR__s
jne 0x18018f105
lea r8, str.PRET_RETR__s
add rdx, 0x700
mov rcx, rbx
call fcn.1801a4650
test eax, eax
jne 0x18018f136
mov rcx, qword [rbx + 0x18]
mov dword [rcx + 0x7d0], 0x1d
add rsp, 0x20
pop rbx
ret
add rsp, 0x20
pop rbx
jmp fcn.18018fb70
add rsp, 0x20
pop rbx
ret
Function at 0x18018f450
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push rbx
sub rsp, 0x20
mov rax, qword [rcx + 0x1b0]
add rdx, 0x700
mov rbx, rcx
cmp dword [rax + 0x10], 0
je 0x18018f49e
cmp qword [rdx + 0x90], 0
je 0x18018f49e
xor r9d, r9d
lea r8, str.REST__d
call fcn.1801a4650
test eax, eax
jne 0x18018f4a8
mov rcx, qword [rbx + 0x18]
mov dword [rcx + 0x7d0], 0x1a
add rsp, 0x20
pop rbx
ret
add rsp, 0x20
pop rbx
jmp fcn.18018f060
add rsp, 0x20
pop rbx
ret

Function at 0x18018f770
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
mov esi, r8d
mov rbx, rcx
cmp eax, 0x64
jb 0x18018f7af
lea rdx, str.Couldnt_set_desired_mode
call fcn.1801671c0
lea eax, [rdi + 0x11]
jmp 0x18018f93c
cmp edx, 0xc8
je 0x18018f7c6
mov r8d, edx
lea rdx, str.Got_a__03d_response_code_instead_of_the_assumed_200
call fcn.180167330
cmp esi, 0x13
jne 0x18018f7db
mov rdx, rbp
mov rcx, rbx
call fcn.18018f670
jmp 0x18018f938
cmp esi, 0x14
jne 0x18018f91a
cmp dword [rbx + 0x760], 2
mov rbp, qword [rbx + 0x18]
jne 0x18018f869
mov rax, qword [rbx + 0x1b0]
mov rdx, qword [rax]
test rdx, rdx
je 0x18018f869
mov dword [rsp + 0x28], 3
lea r9, [rsp + 0x40]
xor r8d, r8d
mov qword [rsp + 0x20], rdi
mov rcx, rbx
mov qword [rsp + 0x40], rdi
call fcn.180198820
test eax, eax
jne 0x18018f938
mov rcx, qword [rsp + 0x40]
lea edx, [rsi + 0x1b]
call sub.VCRUNTIME140.dll_strrchr
test rax, rax
je 0x18018f853
mov rdi, qword [rsp + 0x40]
mov ecx, 1
sub rax, rdi
cmovne rcx, rax
mov byte [rcx + rdi], 0
jmp 0x18018f869
mov rcx, qword [rsp + 0x40]
lea r8, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlib_ftp.c
mov edx, 0x5c7
call fcn.18016c5e0
mov rdx, qword [rbx + 0x7c8]
test rdx, rdx
jne 0x18018f88e
cmp byte [rbx + 0x12fa], 0
lea rax, str.NLST
lea rdx, str.LIST
cmovne rdx, rax
lea r8, [0x1801f536e]
test rdi, rdi
mov r9, r8
lea rax, [0x1801ff3f0]
cmovne r9, rdi
lea rcx, [0x1801c7a54]
cmovne r8, rax
call fcn.18017b1b0
lea r8, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlib_ftp.c
mov edx, 0x5d0
mov rcx, rdi
mov rsi, rax
call fcn.18016c5e0
test rsi, rsi
jne 0x18018f8d7
lea edi, [rsi + 0x1b]
jmp 0x18018f93a
lea rdx, [rbp + 0x700]
mov r9, rsi
lea r8, [0x1801f58a0]
mov rcx, rbx
call fcn.1801a4650
lea r8, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanlib_ftp.c
mov edx, 0x5d6
mov rcx, rsi
mov edi, eax
call fcn.18016c5e0
test edi, edi
jne 0x18018f93a
mov rcx, qword [rbx + 0x18]
mov dword [rcx + 0x7d0], 0x1f
jmp 0x18018f93a
cmp esi, 0x15
jne 0x18018f925
lea r8d, [rsi - 8]
jmp 0x18018f92e
cmp esi, 0x16
jne 0x18018f93a
lea r8d, [rsi - 8]
mov dl, 1
mov rcx, rbx
call fcn.18018f180
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 0x180196c80
Capabilities:
Convert ip address from string

Disassembly:
push rbx
push rsi
push rdi
push r15
sub rsp, 0x88
mov rax, qword [0x180255300]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov rsi, 0xffffffffffffffff
mov qword [rsp + 0x20], rcx
mov rbx, rsi
mov rdi, rdx
nop
inc rbx
cmp byte [rdx + rbx], 0
jne 0x180196cb0
mov qword [rsp + 0xc0], rbp
xor r15d, r15d
cmp byte [rdx], 0x5b
mov qword [rsp + 0x80], r12
mov qword [rsp + 0x78], r13
mov qword [rsp + 0x70], r14
jne 0x180196eab
cmp rbx, 4
jb 0x180196ea4
inc rdi
sub rbx, 2
cmp byte [rdi + rbx], 0x5d
jne 0x180196ea4
lea rdx, str.0123456789abcdefABCDEF:.
mov rcx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_strspn
cmp rbx, rax
je 0x180196ddf
cmp byte [rdi + rax], 0x25
lea r12, [rdi + rax]
mov rbx, rax
jne 0x180196ea4
lea r8d, [r15 + 2]
mov ebp, r15d
lea rdx, [0x1801d225c]
lea rcx, [r12 + 1]
lea r14, [r12 + 1]
call sub.api_ms_win_crt_string_l1_1_0.dll_strncmp
test eax, eax
jne 0x180196d59
movzx eax, byte [r12 + 3]
lea rcx, [r12 + 3]
test al, al
je 0x180196d59
cmp al, 0x5d
cmovne r14, rcx
movzx eax, byte [r14]
test al, al
je 0x180196e9d
mov rcx, r15
cmp al, 0x5d
je 0x180196d86
cmp rcx, 0xf
jge 0x180196d86
inc r14
mov byte [rsp + rcx + 0x28], al
inc ebp
inc rcx
movzx eax, byte [r14]
test al, al
jne 0x180196d68
test ebp, ebp
je 0x180196e9d
cmp byte [r14], 0x5d
jne 0x180196e9d
movsxd rax, ebp
cmp rax, 0x10
jae 0x180196ec6
lea r8, str.C:Dev_vcpkg_buildtreescurl_srcurl_7_81_0_459d17a9d2.cleanliburlapi.c
mov byte [rsp + rax + 0x28], r15b
mov edx, 0x295
lea rcx, [rsp + 0x28]
call fcn.18016cc80
mov rcx, qword [rsp + 0x20]
mov qword [rcx + 0x28], rax
test rax, rax
jne 0x180196dd8
mov eax, 7
jmp 0x180196e69
mov word [r12], 0x5d
lea r8, [rsp + 0x28]
mov byte [rdi + rbx], r15b
mov rdx, rdi
mov ecx, reloc.WS2_32.dll_socket
call qword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jne 0x180196ea4
lea r9d, [rax + 0x2d]
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0x28]
lea ecx, [rax + 0x16]
call fcn.180199570
test rax, rax
je 0x180196e56
lea rax, [rsp + 0x38]
nop
inc rsi
cmp byte [rax + rsi], r15b
jne 0x180196e20
cmp rsi, rbx
jae 0x180196e56
lea rax, [rsp + 0x38]
mov rdx, rdi
sub rdx, rax
lea rcx, [rsp + 0x38]
nop
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x180196e40
mov rbx, rsi
mov byte [rdi + rsi + 1], r15b
mov byte [rdi + rbx], 0x5d
cmp byte [rdi], r15b
mov eax, reloc.WS2_32.dll_ntohl
cmove r15d, eax
mov eax, r15d
mov r14, qword [rsp + 0x70]
mov r13, qword [rsp + 0x78]
mov r12, qword [rsp + 0x80]
mov rbp, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.1801adea0
add rsp, 0x88
pop r15
pop rdi
pop rsi
pop rbx
ret
mov eax, 3
jmp 0x180196e69
mov eax, socket
jmp 0x180196e69
lea rdx, [0x1801d2260]
mov rcx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcspn
cmp rbx, rax
je 0x180196e5a
mov eax, reloc.WS2_32.dll_setsockopt
jmp 0x180196e69
call fcn.1801ae230
int3