joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1800a0f70
Capabilities:
Send data
Send data on socket

Disassembly:
cmp edx, 0x1f
jne 0x1800a1118
push rbp
push rdi
push r14
sub rsp, 0x20
mov rbp, qword [rcx]
mov r14, rcx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], r15
mov rdi, qword [rbp + 0x1e0]
lea rsi, [rdi + 0x1cb8]
lea rbx, [rdi + 0x1eb8]
mov qword [rbx], rsi
cmp rsi, rbx
jae 0x1800a0fd5
lea rax, [rsi + 1]
mov byte [rsi], 0xff
mov qword [rbx], rax
cmp rax, rbx
jae 0x1800a0fd5
mov byte [rax], 0xfa
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x1800a0fd5
mov byte [rax], dl
inc qword [rbx]
movzx ecx, word [rdi + 0x1ca8]
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rdi + 0x1caa]
movzx r15d, ax
mov word [rsp + 0x48], ax
call qword [sym.imp.WS2_32.dll_htons]
mov r9, qword [rbx]
movzx ecx, ax
cmp r9, rbx
jae 0x1800a100c
mov byte [r9], r15b
inc qword [rbx]
mov r9, qword [rbx]
mov r15, qword [rsp + 0x58]
cmp r9, rbx
jae 0x1800a1062
movzx eax, byte [rsp + 0x49]
mov byte [r9], al
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x1800a1062
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x1800a1062
shr cx, 8
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x1800a1062
mov byte [r9], 0xff
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x1800a1062
mov byte [r9], 0xf0
mov r9, qword [rbx]
inc r9
mov qword [rdi + 0x1ec0], r9
lea r8, [rdi + 0x1cba]
sub r9, rsi
mov qword [rbx], rsi
sub r9, 2
mov edx, 0x3e
mov rcx, rbp
call fcn.1800a0a20
mov rcx, qword [r14 + 0x4c0]
xor r9d, r9d
mov rdx, rsi
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x40]
test eax, eax
jns 0x1800a10c4
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.18007cdd0
lea rdx, [rdi + 0x1cbb]
mov r8d, 4
mov rcx, r14
call fcn.1800a0df0
mov rcx, qword [r14 + 0x4c0]
lea rdx, [rdi + 0x1cbf]
xor r9d, r9d
lea r8d, [r9 + 2]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x1800a1110
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.18007cdd0
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
Function at 0x1800a2880
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
push rdi
push r14
sub rsp, 0xd0
mov rax, qword [0x1800e9080]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov rbx, qword [rcx + 0xa00]
lea rax, [rsp + 0x30]
mov rdi, qword [rcx]
mov r14, rcx
mov dword [rsp + 0x30], 0x80
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov r8d, dword [rbx + 0x15c]
mov rdx, qword [rbx + 0x168]
add r8d, 4
mov rcx, qword [rbx + 0x18]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [rbx + 0x150], 0
mov dword [rbx + 0x154], eax
jne 0x1800a2915
movsxd r8, dword [rsp + 0x30]
lea rcx, [rbx + 0xd0]
lea rdx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x30]
mov dword [rbx + 0x150], eax
mov r8d, dword [rbx + 0x154]
mov qword [rsp + 0xf8], rbp
mov qword [rsp + 0x100], rsi
cmp r8d, 4
jge 0x1800a2976
lea rdx, str.Received_too_short_packet
mov rcx, rdi
call fcn.18007cdd0
mov dword [rbx + 0xc], 7
xor eax, eax
mov rsi, qword [rsp + 0x100]
mov rbp, qword [rsp + 0xf8]
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.1800b64b0
add rsp, 0xd0
pop r14
pop rdi
pop rbx
ret
mov rdx, qword [rbx + 0x168]
movzx eax, byte [rdx]
movzx ecx, byte [rdx + 1]
shl eax, 8
or ecx, eax
mov dword [rbx + 0xc], ecx
sub ecx, 3
je 0x1800a2a31
sub ecx, 1
je 0x1800a2aa4
sub ecx, 1
je 0x1800a29e0
cmp ecx, 1
je 0x1800a29c3
lea r8, str.Internal_error:_Unexpected_packet
mov rcx, rdi
lea rdx, [0x1800ce740]
call fcn.18007cdd0
jmp 0x1800a2aa4
add r8d, 0xfffffffe
add rdx, 2
mov rcx, rbx
call fcn.1800a25b0
test eax, eax
je 0x1800a2aa4
jmp 0x1800a294a
movzx ecx, byte [rdx + 2]
lea eax, [r8 - 4]
movsxd rbp, eax
lea rsi, [rdx + 4]
movzx eax, byte [rdx + 3]
mov r8, rbp
shl ecx, 8
xor edx, edx
or ecx, eax
mov dword [rbx + 8], ecx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memchr
test rax, rax
je 0x1800a2aa4
sub rax, rsi
cmp rax, rbp
jae 0x1800a2aa4
mov r8, rsi
lea rdx, str.TFTP_error:__s_n
mov rcx, rdi
call fcn.18007cf50
jmp 0x1800a2aa4
cmp r8d, 4
jle 0x1800a2aa4
movzx eax, byte [rdx + 3]
movzx ecx, byte [rdx + 2]
shl ecx, 8
or ecx, eax
movzx eax, word [rbx + 0x48]
inc eax
movzx eax, ax
cmp eax, ecx
jne 0x1800a2aa4
lea eax, [r8 - 4]
mov rcx, r14
lea r8, [rdx + 4]
movsxd r9, eax
mov edx, 1
call fcn.18007ccf0
mov esi, eax
test eax, eax
je 0x1800a2a83
mov edx, 5
mov rcx, rbx
call fcn.1800a3570
mov eax, esi
jmp 0x1800a294a
mov eax, dword [rbx + 0x154]
mov rcx, rdi
sub eax, 4
cdqe
add qword [rdi + 0xf8], rax
mov rdx, qword [rdi + 0xf8]
call fcn.18008b7d0
mov rcx, r14
call fcn.18008bab0
test eax, eax
je 0x1800a2948
mov edx, 5
mov rcx, rbx
call fcn.1800a3570
mov eax, Ordinal_45
jmp 0x1800a294a
Function at 0x1800b5840
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rdi
push r14
sub rsp, 0x20
mov eax, dword [rcx + 0x18]
mov rbx, rcx
mov ebp, r8d
mov r14, rdx
lea ecx, [rax + rax]
mov eax, dword [rbx + 0x20]
add rax, 0x18
add rcx, rax
call qword [0x1800e9020]
mov rdi, rax
test rax, rax
jne 0x1800b5882
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
lea rcx, [rax + 0x18]
mov qword [rax], rbx
mov qword [rax + 8], rcx
mov eax, dword [rbx + 0x18]
add rax, rcx
mov qword [rsp + 0x48], rsi
mov qword [rdi + 0x10], rax
cmp ebp, dword [rbx + 0x1c]
jbe 0x1800b58c9
call qword [rbx]
mov rcx, qword [rdi + 8]
mov r8d, ebp
mov rdx, r14
call qword [rbx + reloc.WS2_32.dll_htonl]
mov r14d, dword [rbx + 0x18]
add r14, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
mov rcx, r14
call qword [rbx + reloc.WS2_32.dll_recv]
mov rcx, qword [rdi + 8]
mov ebp, dword [rbx + 0x20]
call qword [rbx]
mov rcx, qword [rdi + 0x10]
call qword [rbx]
xor esi, esi
test rbp, rbp
je 0x1800b5922
mov rsi, rbp
nop dword [rax + rax]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x36
mov r8d, 1
mov byte [rsp + 0x40], al
mov rcx, qword [rdi + 8]
call qword [rbx + reloc.WS2_32.dll_htonl]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x5c
lea r14, [r14 + 1]
mov byte [rsp + 0x40], al
mov r8d, 1
mov rcx, qword [rdi + 0x10]
call qword [rbx + reloc.WS2_32.dll_htonl]
sub rbp, 1
jne 0x1800b58e0
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x1800b5963
nop word [rax + rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x1800c94fa]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x1800c94fb]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x1800b5930
mov rsi, qword [rsp + 0x48]
mov rax, rdi
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret

Function at 0x18055b717
Capabilities:
Encode data using xor

Disassembly:
lea rsp, [rsp + 0x10]
je 0x18055b76e
lea r8, [0x1805365c8]
push 0xffffffff9b90242e
rol byte [rsp + 2], 0xa5
push 0x19b53504
movzx ecx, byte [rsi]
setae byte [rsp + 2]
xor ecx, edx
and ecx, 0xff
ror qword [rsp + 8], 0x90
mov ecx, dword [r8 + rcx*4]
shr edx, 8
xor edx, ecx
inc rsi
xor edx, 0xb3a6680b
dec r11
lea rsp, [rsp + 0x10]
jne 0x18055b729
call fcn.1805460fe
Function at 0x1400011a0
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
sub rsp, 0x870
mov rax, qword [0x1400690b8]
xor rax, rsp
mov qword [rsp + 0x860], rax
mov r13, qword [rsp + 0x8c8]
mov r14, rcx
mov dword [rsp + 0x24], r8d
xor r12d, r12d
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 ebp, r12d
call fcn.14002b060
xor edx, edx
lea rcx, [rsp + 0x450]
mov r8d, 0x401
call fcn.14002b060
lea rbx, [rsp + 0x40]
mov qword [rsp + 0x30], rbx
lea rdi, [rsp + 0x450]
lfence
mov r9d, 0x400
lea rcx, [rsp + 0x40]
mov r8, r14
lea edx, [r9 + 1]
call fcn.14003e7a4
mov byte [rsp + 0x440], bpl
lea r15, [r12 - 1]
nop word [rax + rax]
mov rcx, r14
mov qword [r13], r12
mov rsi, r13
mov byte [rdi], r12b
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov r14, rax
test rax, rax
je 0x1400013e8
cmp word [rax + 0x10], 2
jne 0x1400012d7
cmp word [rax + 0x12], 4
jne 0x1400012d7
mov rbx, qword [rax + 0x18]
mov rax, qword [rbx]
test rax, rax
je 0x1400012d2
nop dword [rax]
mov r9d, dword [rax]
movzx r8d, word [rsp + 0x20]
mov edx, dword [rsp + 0x24]
mov ecx, dword [rsp + 0x28]
call fcn.140001100
mov qword [rsi], rax
test rax, rax
je 0x1400013e0
add rbx, 8
lea rsi, [rax + 0x28]
mov rax, qword [rbx]
test rax, rax
jne 0x1400012a0
mov rbx, qword [rsp + 0x30]
lfence
mov r8, qword [r14]
mov r9d, 0x400
mov rcx, rdi
lea edx, [r9 + 1]
call fcn.14003e7a4
mov byte [rdi + 0x400], r12b
cmp qword [r13], r12
jne 0x14000135e
mov rax, r15
nop
inc rax
cmp byte [rdi + rax], r12b
jne 0x140001300
test rax, rax
je 0x140001402
mov r8, rdi
mov rax, rbx
sub r8, rbx
nop dword [rax + rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x140001333
inc rax
test ecx, ecx
jne 0x140001320
test edx, edx
je 0x140001402
inc ebp
cmp ebp, 0x10
je 0x140001402
mov r14, qword [rsp + 0x38]
mov rax, rbx
mov rbx, rdi
mov rdi, rax
mov qword [rsp + 0x30], rbx
jmp 0x140001260
cmp dword [rsp + 0x8c0], r12d
je 0x140001418
mov rbx, r15
nop
inc rbx
cmp byte [rdi + rbx], r12b
jne 0x140001370
lea rbp, [rbx + 1]
mov ecx, 1
mov rdx, rbp
call fcn.14002f410
mov rsi, rax
test rax, rax
jne 0x140001397
mov rsi, r12
jmp 0x1400013ce
test rbp, rbp
je 0x1400013ce
nop dword [rax]
inc r15
cmp byte [rdi + r15], r12b
jne 0x1400013a0
lfence
mov r8, rdi
mov rdx, rbp
mov rcx, rsi
cmp r15, rbp
jae 0x1400013c1
call fcn.14003e744
jmp 0x1400013ce
mov r9, rbx
call fcn.14003e7a4
mov byte [rsi + rbp - 1], r12b
mov rax, qword [r13]
mov qword [rax + 0x18], rsi
mov rax, qword [r13]
cmp qword [rax + 0x18], r12
jne 0x140001418
mov r12d, 8
jmp 0x140001418
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
sub ecx, 0x2af9
je 0x140001412
sub ecx, 1
je 0x14000140a
sub ecx, 1
jne 0x140001412
mov r12d, 0x2afb
jmp 0x140001418
mov r12d, 0x2afa
jmp 0x140001418
mov r12d, 0x2af9
mov eax, r12d
mov rcx, qword [rsp + 0x860]
xor rcx, rsp
call fcn.140028cd0
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
Function at 0x1400021a0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x100
mov rax, qword [0x1400690b8]
xor rax, rsp
mov qword [rsp + 0xf0], rax
mov rsi, r8
mov rdi, rdx
mov rbp, rcx
test r8, r8
je 0x140002334
test rdx, rdx
je 0x140002330
lea rcx, str._Weve_all_heard_that_a_million_monkeys_banging_on_a_million_typewriters_will_eventually_reproduce_the_entire_works_of_Shakespeare._Now__thanks_to_the_Internet__we_know_this_is_not_true._____Robert_Wilensky
movups xmm0, xmmword [rcx]
lea rdx, [rsp + 0x20]
movups xmm1, xmmword [rcx + 0x10]
lea rcx, [rcx + 0x80]
mov rax, qword [rcx + 0x40]
movups xmmword [rdx], xmm0
movups xmm0, xmmword [rcx - 0x60]
movups xmmword [rdx + 0x10], xmm1
movups xmm1, xmmword [rcx - 0x50]
movups xmmword [rdx + 0x20], xmm0
movups xmm0, xmmword [rcx - 0x40]
movups xmmword [rdx + 0x30], xmm1
movups xmm1, xmmword [rcx - 0x30]
movups xmmword [rdx + 0x40], xmm0
movups xmm0, xmmword [rcx - 0x20]
movups xmmword [rdx + 0x50], xmm1
movups xmm1, xmmword [rcx]
movups xmmword [rdx + 0x60], xmm0
lea rdx, [rdx + 0x80]
movups xmm0, xmmword [rcx - 0x10]
movups xmmword [rdx - 0x10], xmm0
movups xmm0, xmmword [rcx + 0x10]
movups xmmword [rdx], xmm1
movups xmm1, xmmword [rcx + 0x20]
movups xmmword [rdx + 0x10], xmm0
movups xmm0, xmmword [rcx + 0x30]
movups xmmword [rdx + 0x20], xmm1
movups xmmword [rdx + 0x30], xmm0
mov qword [rdx + 0x40], rax
mov eax, dword [rcx + 0x48]
mov dword [rdx + 0x48], eax
movzx eax, word [rcx + 0x4c]
mov word [rdx + 0x4c], ax
movzx eax, byte [rcx + 0x4e]
mov rcx, 0xffffffffffffffff
mov byte [rdx + 0x4e], al
lea rax, [rsp + 0x20]
inc rcx
cmp byte [rax + rcx], 0
jne 0x140002277
test r9d, r9d
je 0x14000231e
test rsi, rsi
je 0x14000231e
cmp dword [rsp + 0x148], 0
je 0x1400022d5
mov r10, qword [rsp + 0x140]
mov r8, rdi
sub r10, rdi
mov r9, rsi
nop dword [rax]
lea rax, [r10 + r8]
xor edx, edx
div rcx
movzx eax, byte [r8]
lea r8, [r8 + 1]
xor al, 0xa5
add al, 0x54
xor al, byte [rsp + rdx + 0x20]
mov byte [r8 - 1], al
sub r9, 1
jne 0x1400022b0
jmp 0x14000231e
mov qword [rsp + 0x138], rbx
mov r9, rdi
mov rbx, qword [rsp + 0x140]
mov r11, rsi
sub rbx, rdi
nop
movzx r10d, byte [r9]
lea rax, [r9 + rbx]
xor edx, edx
div rcx
movzx eax, byte [rsp + rdx + 0x20]
cmp r10b, al
je 0x14000230d
xor al, r10b
mov byte [r9], al
inc r9
sub r11, 1
jne 0x1400022f0
mov rbx, qword [rsp + 0x138]
mov r8, rsi
mov rdx, rdi
mov rcx, rbp
call fcn.1400174a0
test eax, eax
je 0x140002334
xor eax, eax
jmp 0x140002339
mov eax, 1
mov rcx, qword [rsp + 0xf0]
xor rcx, rsp
call fcn.140028cd0
add rsp, 0x100
pop rdi
pop rsi
pop rbp
ret
Function at 0x14000e2b0
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov qword [r9], 0
mov rdi, r9
mov r10d, dword [rcx + 0x18]
mov rbx, rcx
mov rcx, qword [rcx + 0x10]
mov eax, r10d
and eax, 1
mov r9d, eax
or r9d, 2
and r10b, 2
cmove r9d, eax
call qword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x14000e32c
cdqe
cmp rax, 0xffffffffffffffff
je 0x14000e32c
test rax, rax
jne 0x14000e31c
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 0x18]
call qword [0x1400533a8]
mov eax, 0x4e34
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov qword [rdi], rax
xor eax, eax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
call fcn.140018d50
cmp eax, 0x10
jne 0x14000e346
mov eax, 0x4e35
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 0x18]
call qword [0x1400533a8]
mov rbx, qword [rsp + 0x30]
mov eax, 0x4e2a
add rsp, 0x20
pop rdi
ret

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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
xor ebx, ebx
mov rsi, r9
mov qword [r9], rbx
mov r10, rdx
cmp dword [rcx + 0x1080], 1
mov rdi, rcx
jne 0x14000e69b
mov eax, 0x4e3b
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
cmp byte [rsp + 0x60], bl
je 0x14000e6d9
mov eax, dword [rcx + 0x1c]
mov r9d, dword [rcx + 0x18]
mov rcx, qword [rcx + 0x10]
mov dword [rsp + 0x20], eax
call fcn.1400187c0
cmp rax, 0xffffffffffffffff
je 0x14000e756
test rax, rax
je 0x14000e70e
mov qword [rsi], rax
mov eax, ebx
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
mov edx, dword [rcx + 0x18]
mov eax, edx
mov rcx, qword [rcx + 0x10]
and eax, 1
mov r9d, eax
or r9d, 2
and dl, 2
mov rdx, r10
cmove r9d, eax
call qword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x14000e735
cdqe
cmp rax, 0xffffffffffffffff
je 0x14000e735
test rax, rax
jne 0x14000e6c4
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x18]
call qword [0x1400533a8]
mov ebx, 0x4e34
mov eax, ebx
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
call fcn.140018d50
cmp eax, 0x10
jne 0x14000e756
mov ebx, 0x4e35
mov eax, ebx
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x18]
call qword [0x1400533a8]
mov rsi, qword [rsp + 0x48]
mov ebx, 0x4e2a
mov eax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
Function at 0x140017ec0
Capabilities:
Set socket configuration

Disassembly:
sub rsp, 0x48
test r8, r8
je case.0x140017ef5.9
mov r8d, dword [r8]
lea eax, [rdx - 1]
mov dword [rsp + 0x38], r8d
cmp eax, 0xe
ja case.0x140017ef5.4
lea r9, [0x140000000]
cdqe
mov edx, dword [r9 + rax*4 + 0x1807c]
add rdx, r9
jmp rdx
lea r8, [rsp + 0x38]
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
lea eax, [rcx - 1]
add rsp, 0x48
ret
mov dword [rsp + 0x30], r8d
lea r9, [rsp + 0x30]
mov r8d, 4
movsxd rcx, ecx
mov edx, 0xffff
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
neg eax
sbb eax, eax
add rsp, 0x48
ret
mov dword [rsp + 0x30], r8d
lea r9, [rsp + 0x30]
mov r8d, 0xfffffffb
movsxd rcx, ecx
mov edx, 0xffff
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
neg eax
sbb eax, eax
add rsp, 0x48
ret
mov edx, 0x29
mov dword [rsp + 0x30], r8d
movsxd rcx, ecx
lea r9, [rsp + 0x30]
mov dword [rsp + 0x20], 4
lea r8d, [rdx - 0xe]
call qword [sym.imp.WS2_32.dll_setsockopt]
neg eax
sbb eax, eax
add rsp, 0x48
ret
xor edx, edx
mov dword [rsp + 0x30], r8d
mov r8d, 9
movsxd rcx, ecx
lea r9, [rsp + 0x30]
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
neg eax
sbb eax, eax
add rsp, 0x48
ret
xor edx, edx
mov dword [rsp + 0x30], r8d
movsxd rcx, ecx
lea r9, [rsp + 0x30]
mov dword [rsp + 0x20], 4
lea r8d, [rdx + 0xa]
call qword [sym.imp.WS2_32.dll_setsockopt]
neg eax
sbb eax, eax
add rsp, 0x48
ret
xor edx, edx
mov dword [rsp + 0x30], r8d
movsxd rcx, ecx
lea r9, [rsp + 0x30]
mov dword [rsp + 0x20], 4
lea r8d, [rdx + 0xb]
call qword [sym.imp.WS2_32.dll_setsockopt]
neg eax
sbb eax, eax
add rsp, 0x48
ret
mov edx, 0x29
jmp 0x140017fa4
mov edx, 0x29
mov dword [rsp + 0x30], r8d
lea r8d, [rdx - 0x1f]
jmp 0x140017faf
mov edx, 0x29
mov dword [rsp + 0x30], r8d
lea r8d, [rdx - 0x1e]
jmp 0x140017faf
mov edx, 6
mov dword [rsp + 0x30], r8d
lea r8d, [rdx - 5]
jmp 0x140017faf
mov ecx, 0xa
call int.140019020
mov eax, 0xffffffff
add rsp, 0x48
ret
Function at 0x1400185b0
Capabilities:
Connect socket
Get socket status

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x690
mov rax, qword [0x1400690b8]
xor rax, rsp
mov qword [rsp + 0x670], rax
mov esi, r8d
mov rbx, rdx
mov rdi, rcx
cmp rcx, 0xffffffffffffffff
jne 0x1400185eb
lea ecx, [rdi + 0xb]
call int.140019020
mov eax, edi
jmp 0x14001878a
mov qword [rsp + 0x6c0], rbp
lea r8, [rsp + 0x30]
mov qword [rsp + 0x688], r14
mov edx, 1
mov qword [rsp + 0x680], r15
mov dword [rsp + 0x30], 1
call fcn.140017ec0
test eax, eax
jne 0x14001876d
mov r8d, dword [rbx + 8]
mov rdx, qword [rbx]
movsxd rbp, edi
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x1400187a9
call fcn.140018d50
cmp eax, 0x10
jne 0x14001876d
xor eax, eax
mov dword [rsp + 0x50], 0xffffffff
mov r8, rdi
mov word [rsp + 0x54], ax
lea rcx, [rsp + 0x50]
mov byte [rsp + 0x56], al
lea edx, [rax + 1]
call fcn.140018520
mov r8, rdi
lea rcx, [rsp + 0x50]
mov edx, 2
call fcn.140018520
xor r14d, r14d
lea r15d, [r14 + 0x64]
mov rax, r14
test esi, esi
js 0x1400186c3
movzx eax, byte [0x14006b6d8]
mov ecx, esi
test al, al
nop
mov eax, 0x10624dd3
cmovne ecx, r15d
mul ecx
shr edx, 6
imul eax, edx, 0x3e8
mov dword [rsp + 0x38], edx
sub ecx, eax
imul eax, ecx, 0x3e8
mov dword [rsp + 0x3c], eax
lea rax, [rsp + 0x38]
cmp byte [rsp + 0x56], r14b
lea r9, [rsp + 0x468]
lea r8, [rsp + 0x260]
mov qword [rsp + 0x20], rax
cmove r9, r14
lea rdx, [rsp + 0x58]
cmp byte [rsp + 0x55], r14b
cmove r8, r14
cmp byte [rsp + 0x54], r14b
cmove rdx, r14
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x14001876d
test eax, eax
je 0x1400187ad
cmp eax, 1
jl 0x14001876d
lea rax, [rsp + 0x30]
mov dword [rsp + 0x30], 4
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov r8d, 0x1007
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x14001876d
call fcn.140018d50
mov ebx, eax
cmp byte [rsp + 0x55], r14b
je 0x140018764
lea rdx, [rsp + 0x260]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
jne 0x1400187a5
cmp ebx, 0x10
je 0x140018687
mov eax, 0xffffffff
mov r14, qword [rsp + 0x688]
mov rbp, qword [rsp + 0x6c0]
mov r15, qword [rsp + 0x680]
mov rcx, qword [rsp + 0x670]
xor rcx, rsp
call fcn.140028cd0
add rsp, 0x690
pop rdi
pop rsi
pop rbx
ret
test ebx, ebx
jne 0x14001876d
xor eax, eax
jmp 0x140018772
mov ecx, reloc.WS2_32.dll_ntohs
call int.140019020
jmp 0x14001876d
Function at 0x140019360
Capabilities:
Get file size

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x90
mov rax, qword [0x1400690b8]
xor rax, rsp
mov qword [rsp + 0x80], rax
xor ebx, ebx
mov r14, r9
mov qword [rsp + 0x30], rbx
xor r9d, r9d
mov dword [rsp + 0x28], 0x2200080
mov edx, 0x100080
mov rbp, rcx
mov dword [rsp + 0x20], 3
lea r8d, [rbx + 7]
mov edi, ebx
call qword [0x140069020]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x14001942a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x1400193d1
cmp eax, 2
jne 0x140019420
test edi, edi
jle 0x140019420
mov ecx, 0xc8
cmp edi, ecx
cmovl ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
xor r9d, r9d
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x2200080
mov edx, 0x100080
mov rcx, rbp
mov dword [rsp + 0x20], 3
sub edi, 0xc8
lea r8d, [r9 + 7]
call qword [0x140069020]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x1400193c1
jmp 0x14001942a
cmp rsi, 0xffffffffffffffff
je 0x140019599
test rsi, rsi
je 0x140019599
lea rdx, [rsp + 0x48]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je 0x14001954c
mov ecx, dword [rsp + 0x48]
call fcn.1400192c0
mov edi, eax
test r14, r14
je 0x140019486
lea rdx, [rsp + 0x44]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x40], eax
cmp eax, 0xffffffff
jne 0x14001947e
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x14001954c
mov rax, qword [rsp + 0x40]
mov qword [r14], rax
mov rcx, rsi
call qword [0x140069018]
test dil, 0x10
je 0x140019595
xor r9d, r9d
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x2000080
mov edx, 0x100080
mov rcx, rbp
mov dword [rsp + 0x20], 3
mov edi, ebx
lea r8d, [r9 + 7]
call qword [0x140069020]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140019535
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x1400194e0
cmp eax, 2
jne 0x14001952f
test edi, edi
jle 0x14001952f
mov ecx, 0xc8
cmp edi, ecx
cmovl ecx, edi
call qword [sym.imp.KERNEL32.dll_Sleep]
xor r9d, r9d
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x2000080
mov edx, 0x100080
mov rcx, rbp
mov dword [rsp + 0x20], 3
sub edi, 0xc8
lea r8d, [r9 + 7]
call qword [0x140069020]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x1400194d0
jmp 0x140019535
cmp rsi, 0xffffffffffffffff
je 0x140019599
test rsi, rsi
je 0x140019599
lea rdx, [rsp + 0x48]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x14001955e
mov rcx, rsi
mov ebx, 0xffffffff
call qword [0x140069018]
mov eax, ebx
jmp 0x14001959e
test r14, r14
je 0x14001958c
lea rdx, [rsp + 0x44]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x40], eax
cmp eax, 0xffffffff
jne 0x140019584
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x14001954c
mov rcx, qword [rsp + 0x40]
mov qword [r14], rcx
mov rcx, rsi
call qword [0x140069018]
mov eax, ebx
jmp 0x14001959e
mov eax, 0xffffffff
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140028cd0
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret