joyce8/EMBER2024-capa huggingface dataset:
Function at 0x417350
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov rcx, qword [rcx]
lea rax, [rcx + 8]
mov r9, r8
mov r8, rdx
mov rdx, rax
jmp method.main.lambda_httplib::Request_const__httplib::Response_17::operator___httplib::Request_const__httplib::Response__const__clone_.isra.3298_

Function at 0x41ce50
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp rcx, rdx
mov rsi, rcx
mov rbp, rdx
je 0x41cf41
lea rbx, [rsi + 1]
mov rdi, rdx
mov r8d, 0x3f
sub rdi, rcx
bsr rax, rdi
xor rax, 0x3f
cdqe
sub r8, rax
add r8, r8
call fcn.0041c960
cmp rdi, 0x10
jle 0x41cf50
lea rdi, [rsi + 0x10]
mov r13d, 1
jmp 0x41cec8
mov r8, rbx
sub r8, rsi
jne 0x41cfc3
add rbx, 1
mov byte [rsi], r12b
cmp rdi, rbx
je 0x41cf02
movzx r12d, byte [rbx]
cmp r12b, byte [rsi]
jl 0x41ceb0
movzx edx, byte [rbx - 1]
lea rax, [rbx - 1]
cmp r12b, dl
jl 0x41cee6
jmp 0x41d005
mov rax, rcx
mov byte [rax + 1], dl
movzx edx, byte [rax - 1]
lea rcx, [rax - 1]
cmp r12b, dl
jl 0x41cee3
add rbx, 1
mov byte [rax], r12b
cmp rdi, rbx
jne 0x41cec8
cmp rbp, rdi
je 0x41cf41
nop word [rax + rax]
movzx ecx, byte [rdi]
lea rax, [rdi - 1]
movzx edx, byte [rdi - 1]
cmp cl, dl
jl 0x41cf27
jmp 0x41cfe0
mov rax, r8
mov byte [rax + 1], dl
movzx edx, byte [rax - 1]
lea r8, [rax - 1]
cmp cl, dl
jl 0x41cf24
add rdi, 1
mov byte [rax], cl
cmp rbp, rdi
jne 0x41cf10
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
cmp rbp, rbx
mov r12d, 1
jne 0x41cf74
jmp 0x41cf41
mov r8, rbx
sub r8, rsi
jne 0x41cfb0
mov byte [rsi], dil
add rbx, 1
cmp rbp, rbx
je 0x41cf41
movzx edi, byte [rbx]
cmp dil, byte [rsi]
jl 0x41cf60
movzx edx, byte [rbx - 1]
lea rax, [rbx - 1]
cmp dil, dl
jl 0x41cf93
jmp 0x41d000
mov rax, rcx
mov byte [rax + 1], dl
movzx edx, byte [rax - 1]
lea rcx, [rax - 1]
cmp dil, dl
jl 0x41cf90
mov byte [rax], dil
jmp 0x41cf6b
mov rcx, r12
mov rdx, rsi
sub rcx, r8
add rcx, rbx
call sym.memmove
jmp 0x41cf68
mov rcx, r13
mov rdx, rsi
sub rcx, r8
add rcx, rbx
call sym.memmove
jmp 0x41cebc
mov rax, rdi
add rdi, 1
cmp rbp, rdi
mov byte [rax], cl
jne 0x41cf10
jmp 0x41cf41
mov rax, rbx
jmp 0x41cfa3
mov rax, rbx
jmp 0x41cef6
Function at 0x4356e0
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0xa10
cmp edx, 0xffffffff
mov rbx, rcx
je 0x43573a
mov dword [rbx + 0x198], edx
mov ecx, 1
nop dword [rax]
mov eax, edx
shr eax, 0x1e
xor eax, edx
imul eax, eax, 0x6c078965
lea edx, [rax + rcx]
mov dword [rbx + rcx*4 + 0x198], edx
add rcx, 1
cmp rcx, 0x270
jne 0x435700
mov qword [rbx + 0xb58], 0x270
add rsp, 0xa10
pop rbx
pop rsi
pop rdi
ret
lea rsi, [rsp + 0x20]
mov dword [rsp + 0x30], 0x3931746d
lea rax, [rsi + 0x10]
mov byte [rsi + 0x16], 0x37
mov rdx, rsi
mov qword [rsp + 0x20], rax
lea rdi, [rsp + 0x40]
mov eax, 0x3339
mov word [rsi + 0x14], ax
mov rcx, rdi
mov qword [rsp + 0x28], 7
mov byte [rsp + 0x37], 0
call sym.std::random_device::_M_init_pretr1_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const_
mov rcx, rdi
call sym.std::random_device::_M_getval_pretr1__
mov rcx, qword [rsp + 0x20]
add rsi, 0x10
mov edx, eax
cmp rcx, rsi
je 0x4356f2
mov dword [rsp + 0xa38], eax
call sym.operator_delete_void_
mov edx, dword [rsp + 0xa38]
jmp 0x4356f2
Function at 0x435a90
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x490
pxor xmm0, xmm0
lea r8, str._trepeat_last_n___d__repeat_penalty___.3f__frequency_penalty___.3f__presence_penalty___.3f_n_ttop_k___d__tfs_z___.3f__top_p___.3f__min_p___.3f__typical_p___.3f__temp___.3f_n_tmirostat___d__mirostat_lr___.3f__mirostat_ent___.3f
cvtss2sd xmm0, dword [rdx + 0x40]
movsd qword [rsp + 0x78], xmm0
pxor xmm0, xmm0
mov rsi, rcx
cvtss2sd xmm0, dword [rdx + 0x44]
movsd qword [rsp + 0x70], xmm0
mov eax, dword [rdx + 0x3c]
pxor xmm0, xmm0
lea rdi, [rsp + 0x90]
mov rcx, rdi
mov rbx, rdi
mov dword [rsp + 0x68], eax
cvtss2sd xmm0, dword [rdx + 0x20]
movsd qword [rsp + 0x60], xmm0
pxor xmm0, xmm0
cvtss2sd xmm0, dword [rdx + 0x1c]
movsd qword [rsp + 0x58], xmm0
pxor xmm0, xmm0
cvtss2sd xmm0, dword [rdx + 0x14]
movsd qword [rsp + 0x50], xmm0
pxor xmm0, xmm0
cvtss2sd xmm0, dword [rdx + 0x10]
movsd qword [rsp + 0x48], xmm0
pxor xmm0, xmm0
cvtss2sd xmm0, dword [rdx + 0x18]
movsd qword [rsp + 0x40], xmm0
mov eax, dword [rdx + 0xc]
pxor xmm0, xmm0
mov dword [rsp + 0x38], eax
cvtss2sd xmm0, dword [rdx + 0x38]
movsd qword [rsp + 0x30], xmm0
pxor xmm0, xmm0
cvtss2sd xmm0, dword [rdx + 0x34]
movsd qword [rsp + 0x28], xmm0
pxor xmm0, xmm0
cvtss2sd xmm0, dword [rdx + 0x30]
movsd qword [rsp + 0x20], xmm0
mov r9d, dword [rdx + 0x2c]
mov edx, 0x400
call sym.snprintf_char__unsigned_long_long__char_const__::_
lea rax, [rsi + 0x10]
mov qword [rsi], rax
mov r8d, dword [rbx]
add rbx, 4
lea edx, [r8 - 0x1010101]
not r8d
and edx, r8d
and edx, 0x80808080
je 0x435b6b
mov ecx, edx
shr ecx, 0x10
test edx, 0x8080
cmove edx, ecx
lea rcx, [rbx + 2]
cmove rbx, rcx
mov ecx, edx
add cl, dl
sbb rbx, 3
sub rbx, rdi
cmp rbx, 0xf
mov qword [rsp + 0x88], rbx
ja 0x435bf0
cmp rbx, 1
jne 0x435be0
movzx edx, byte [rsp + 0x90]
mov byte [rsi + 0x10], dl
mov qword [rsi + 8], rbx
mov byte [rax + rbx], 0
mov rax, rsi
add rsp, 0x490
pop rbx
pop rsi
pop rdi
ret
test rbx, rbx
je 0x435bc7
jmp 0x435c12
lea rdx, [rsp + 0x88]
xor r8d, r8d
mov rcx, rsi
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::_M_create_unsigned_long_long__unsigned_long_long_
mov rdx, qword [rsp + 0x88]
mov qword [rsi], rax
mov qword [rsi + 0x10], rdx
mov r8, rbx
mov rdx, rdi
mov rcx, rax
call sym.memcpy
mov rbx, qword [rsp + 0x88]
mov rax, qword [rsi]
jmp 0x435bc7
Function at 0x43f4f0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp rcx, rdx
mov rsi, rcx
mov rbp, rdx
je 0x43f5e1
lea rbx, [rsi + 1]
mov rdi, rdx
mov r8d, 0x3f
sub rdi, rcx
bsr rax, rdi
xor rax, 0x3f
cdqe
sub r8, rax
add r8, r8
call method.void_std::__introsort_loop___gnu_cxx::__normal_iterator_char__std::vector_char__std::allocator_char_______long_long____gnu_cxx::__ops._Iter_less_iter____gnu_cxx::__normal_iterator_char__std::vector_char__std::allocator_char_________gnu_cxx::__nor
cmp rdi, 0x10
jle 0x43f5f0
lea rdi, [rsi + 0x10]
mov r13d, 1
jmp 0x43f568
mov r8, rbx
sub r8, rsi
jne 0x43f663
add rbx, 1
mov byte [rsi], r12b
cmp rdi, rbx
je 0x43f5a2
movzx r12d, byte [rbx]
cmp r12b, byte [rsi]
jl 0x43f550
movzx edx, byte [rbx - 1]
lea rax, [rbx - 1]
cmp r12b, dl
jl 0x43f586
jmp 0x43f6a5
mov rax, rcx
mov byte [rax + 1], dl
movzx edx, byte [rax - 1]
lea rcx, [rax - 1]
cmp r12b, dl
jl 0x43f583
add rbx, 1
mov byte [rax], r12b
cmp rdi, rbx
jne 0x43f568
cmp rbp, rdi
je 0x43f5e1
nop word [rax + rax]
movzx ecx, byte [rdi]
lea rax, [rdi - 1]
movzx edx, byte [rdi - 1]
cmp cl, dl
jl 0x43f5c7
jmp 0x43f680
mov rax, r8
mov byte [rax + 1], dl
movzx edx, byte [rax - 1]
lea r8, [rax - 1]
cmp cl, dl
jl 0x43f5c4
add rdi, 1
mov byte [rax], cl
cmp rbp, rdi
jne 0x43f5b0
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
cmp rbp, rbx
mov r12d, 1
jne 0x43f614
jmp 0x43f5e1
mov r8, rbx
sub r8, rsi
jne 0x43f650
mov byte [rsi], dil
add rbx, 1
cmp rbp, rbx
je 0x43f5e1
movzx edi, byte [rbx]
cmp dil, byte [rsi]
jl 0x43f600
movzx edx, byte [rbx - 1]
lea rax, [rbx - 1]
cmp dil, dl
jl 0x43f633
jmp 0x43f6a0
mov rax, rcx
mov byte [rax + 1], dl
movzx edx, byte [rax - 1]
lea rcx, [rax - 1]
cmp dil, dl
jl 0x43f630
mov byte [rax], dil
jmp 0x43f60b
mov rcx, r12
mov rdx, rsi
sub rcx, r8
add rcx, rbx
call sym.memmove
jmp 0x43f608
mov rcx, r13
mov rdx, rsi
sub rcx, r8
add rcx, rbx
call sym.memmove
jmp 0x43f55c
mov rax, rdi
add rdi, 1
cmp rbp, rdi
mov byte [rax], cl
jne 0x43f5b0
jmp 0x43f5e1
mov rax, rbx
jmp 0x43f643
mov rax, rbx
jmp 0x43f596
Function at 0x444460
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x0053f964]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x4445e8
mov rax, qword [0x0053f968]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x4444ac
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x444535
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x444490
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x44461d
mov rax, qword [0x0053f968]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x0053f968]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x444600
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x44452e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x444590
add dword [0x0053f964], 1
cmp edi, 8
jae 0x444563
test dil, 4
jne 0x4445d4
test edi, edi
je 0x444558
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x4445ef
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x444558
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x44457c
jmp 0x444558
add rsi, qword [0x0053f968]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x44452e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x444558
xor esi, esi
jmp 0x4444b7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x444558
mov rax, qword [0x0053f968]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop dword [rax]

Function at 0x444d70
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x0053fc40]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0053fc20]
test rbx, rbx
je 0x444dc4
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x444dbb
test rsi, rsi
je 0x444dbb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x444da0
lea rcx, [0x0053fc40]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x445000
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
je 0x445010
xor eax, eax
ret
jmp sym._ValidateImageBase.part.0

Function at 0x445020
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x445061
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x445058
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x445063
add rax, 0x28
cmp rax, r9
jne 0x445044
xor eax, eax
ret

Function at 0x445100
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00525080]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x44516d
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x44516d
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x44516d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x445164
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x44516f
add rax, 0x28
cmp rax, r9
jne 0x445150
xor eax, eax
add rsp, 0x28
ret

Function at 0x445270
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00525080]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x445290
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x445288
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x4452ed
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x4452e4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x4452f4
add rax, 0x28
cmp rax, r9
jne 0x4452d0
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x445310
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00525080]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x44537e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x44537e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x44537e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x44537e
sub eax, 1
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8 + 0x28]
mov r10d, dword [rcx + 0xc]
cmp rdx, r10
mov r8, r10
jb 0x445375
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x445385
add rcx, 0x28
cmp rcx, rax
jne 0x445360
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x445398
jmp 0x44537e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x4453a6
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x44537e
test r9d, r9d
jg 0x445390
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x470640
Capabilities:
Set socket configuration

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x40
mov rbx, qword [sym.imp.WS2_32.dll_setsockopt]
mov r8d, 4
mov edx, 0xffff
lea rdi, [rsp + 0x3c]
mov rsi, rcx
mov dword [rsp + 0x3c], 1
mov r9, rdi
mov dword [rsp + 0x20], 4
call rbx
mov dword [rsp + 0x20], 4
mov r9, rdi
mov rcx, rsi
mov r8d, 0xfffffffb
mov edx, 0xffff
call rbx
nop
add rsp, 0x40
pop rbx
pop rsi
pop rdi
ret

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

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x108
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
mov r12, rdx
mov rbx, rcx
mov esi, r8d
lea rdx, [method.httplib::Server.is_valid___const]
mov r13d, r9d
cmp rax, rdx
jne 0x470890
mov qword [rsp + 0x50], 0
mov rax, qword [rbx + 0x2d0]
test rax, rax
je 0x470880
lea rdi, [rsp + 0x40]
mov r8d, 2
lea rdx, [rbx + 0x2c0]
mov rcx, rdi
call rax
mov rdx, qword [rbx + 0x2d8]
mov rax, qword [rbx + 0x2d0]
mov r9, qword [rsp + 0x40]
lea rdi, [rsp + 0x60]
mov r8d, esi
mov rcx, r12
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x98]
lea rbp, [rsp + 0x80]
movdqa xmm0, xmmword [rsp + 0x80]
mov byte [rsp + 0x70], 0
mov r10, qword [rsp + 0x48]
mov qword [rsp + 0x98], rdx
lea rdx, [rdi + 0x10]
mov qword [rsp + 0x80], r9
mov qword [rsp + 0x58], rax
movzx eax, byte [rbx + 0x2bc]
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x20], r13d
mov qword [rsp + 0x60], rdx
mov rdx, rdi
mov dword [rsp + 0x28], eax
mov r9d, dword [rbx + 0x2b8]
movaps xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x88], r10
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x68], 0
call sym._ZN7httplib6detail13create_socketIZNKS_6Server20create_server_socketERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiiS
mov rcx, qword [rsp + 0x60]
mov r12, rax
lea rax, [rdi + 0x10]
cmp rcx, rax
je 0x4707c2
call sym.operator_delete_void_
mov rax, qword [rsp + 0x90]
test rax, rax
je 0x4707dd
mov r8d, 3
mov rdx, rbp
mov rcx, rbp
call rax
mov qword [rbx + 0x28], r12
mfence
mov rax, qword [rsp + 0x50]
test rax, rax
je 0x4707fe
lea rcx, [rsp + 0x40]
mov r8d, 3
mov rdx, rcx
call rax
mov rax, qword [rbx + 0x28]
cmp rax, 0xffffffffffffffff
je 0x47089a
test esi, esi
mov eax, esi
je 0x470822
add rsp, 0x108
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov dword [rsp + 0x60], pe_nt_image_headers64
mov r8, rdi
mov rdx, rbp
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x470812
movzx edx, word [rsp + 0x80]
cmp dx, 2
je 0x470858
cmp dx, 0x17
mov eax, 0xffffffff
jne 0x470812
movzx ecx, word [rsp + 0x82]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
add rsp, 0x108
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rdx, qword [rsp + 0x58]
jmp 0x470710
call rax
test al, al
jne 0x4706d2
mov eax, 0xffffffff
jmp 0x470812
Function at 0x477380
Capabilities:
Get socket status

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x258
mov qword [rsp + 0x48], rcx
lea esi, [rcx + 1]
mov dword [rsp + 0x40], 1
lea rbp, [rsp + 0x40]
mov dword [rsp + 0x38], edx
lea rdi, [rsp + 0x38]
mov dword [rsp + 0x3c], r8d
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rdi
mov rdx, rbp
mov ecx, esi
call qword [sym.imp.WS2_32.dll_select]
movsxd rbx, eax
test rbx, rbx
jns 0x4773d7
call qword [sym.imp.msvcrt.dll__errno]
cmp dword [rax], 4
je 0x4773ae
mov rax, rbx
add rsp, 0x258
pop rbx
pop rsi
pop rdi
pop rbp
ret

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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov esi, 0x7fffffff
mov rbx, qword [rcx + 0x50]
mov rbp, rdx
mov rdx, qword [rcx + 0x48]
mov r12, rcx
mov rdi, r8
cmp r8, 0x7fffffff
cmovbe rsi, r8
cmp rdx, rbx
jae 0x4775f5
sub rbx, rdx
add rdx, qword [rcx + 0x30]
cmp rbx, rsi
jae 0x4775e0
mov r8, rbx
mov rcx, rbp
call sym.memcpy
add qword [r12 + 0x48], rbx
mov rax, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r8, rsi
mov rcx, rbp
mov rbx, rsi
call sym.memcpy
add qword [r12 + 0x48], rsi
jmp 0x4775c2
mov rdx, qword [rcx + 0x10]
mov r8, qword [r12 + 0x18]
mov rcx, qword [rcx + 8]
call method.httplib::detail.select_read_unsigned_long_long__long_long__long_long_
test rax, rax
jle 0x4776e7
cmp rdi, 0xfff
pxor xmm0, xmm0
mov r13, qword [r12 + 8]
movups xmmword [r12 + 0x48], xmm0
ja 0x477662
mov r14, qword [r12 + 0x30]
mov rdi, qword [sym.imp.WS2_32.dll_recv]
mov r15, qword [sym.imp.msvcrt.dll__errno]
xor r9d, r9d
mov r8d, 0x1000
mov rdx, r14
mov rcx, r13
call rdi
movsxd rbx, eax
test rbx, rbx
jns 0x4776a0
call r15
cmp dword [rax], 4
jne 0x4775c2
jmp 0x47763b
mov rdi, qword [sym.imp.WS2_32.dll_recv]
mov r12, qword [sym.imp.msvcrt.dll__errno]
xor r9d, r9d
mov r8d, esi
mov rdx, rbp
mov rcx, r13
call rdi
movsxd rbx, eax
test rbx, rbx
jns 0x4775c2
call r12
cmp dword [rax], 4
jne 0x4775c2
jmp 0x477670
je 0x4775c2
cmp rsi, rbx
mov rdx, qword [r12 + 0x30]
jl 0x4776c0
mov r8, rbx
mov rcx, rbp
call sym.memcpy
jmp 0x4775c2
mov r8, rsi
mov rcx, rbp
call sym.memcpy
movq xmm1, rbx
movq xmm0, rsi
mov rbx, rsi
punpcklqdq xmm0, xmm1
movups xmmword [r12 + 0x48], xmm0
jmp 0x4775c2
mov rbx, 0xffffffffffffffff
jmp 0x4775c2
Function at 0x477700
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
mov rbx, rcx
mov rdi, rdx
mov rsi, r8
mov rdx, qword [rcx + 0x20]
mov r8, qword [rbx + 0x28]
mov rcx, qword [rcx + 8]
call method.httplib::detail.select_write_unsigned_long_long__long_long__long_long_
test rax, rax
jg 0x477750
mov rbx, 0xffffffffffffffff
mov rax, rbx
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov rbp, qword [rbx + 8]
xor edx, edx
mov rcx, rbp
call method.httplib::detail.select_read_unsigned_long_long__long_long__long_long___clone_.constprop.3624_
test rax, rax
je 0x4777a2
js 0x4777e0
mov r12, qword [sym.imp.WS2_32.dll_recv]
lea r13, [rsp + 0x2f]
mov r14, qword [sym.imp.msvcrt.dll__errno]
mov r9d, 2
mov r8d, 1
mov rdx, r13
mov rcx, rbp
call r12
cdqe
test rax, rax
jns 0x4777a0
call r14
cmp dword [rax], 4
jne 0x47772d
jmp 0x477778
je 0x47772d
mov r12, qword [rbx + 8]
mov r13, qword [sym.imp.WS2_32.dll_send]
mov rbp, qword [sym.imp.msvcrt.dll__errno]
xor r9d, r9d
mov r8d, esi
mov rdx, rdi
mov rcx, r12
call r13
movsxd rbx, eax
test rbx, rbx
jns 0x477734
call rbp
cmp dword [rax], 4
jne 0x477734
jmp 0x4777b4
call qword [sym.imp.msvcrt.dll__errno]
cmp dword [rax], 9
jne 0x477765
jmp 0x47772d

Function at 0x477c70
Capabilities:
Get socket status

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x258
mov qword [rsp + 0x48], rcx
lea esi, [rcx + 1]
mov dword [rsp + 0x40], 1
lea rbp, [rsp + 0x40]
mov dword [rsp + 0x38], edx
lea rdi, [rsp + 0x38]
mov dword [rsp + 0x3c], r8d
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x20], rdi
mov r8, rbp
mov ecx, esi
call qword [sym.imp.WS2_32.dll_select]
movsxd rbx, eax
test rbx, rbx
jns 0x477cc6
call qword [sym.imp.msvcrt.dll__errno]
cmp dword [rax], 4
je 0x477c9e
mov rax, rbx
add rsp, 0x258
pop rbx
pop rsi
pop rdi
pop rbp
ret
Function at 0x477ce0
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
xor eax, eax
cmp qword [rdx + 8], 0
mov rbp, qword [rsp + 0x110]
movzx r12d, byte [rsp + 0x108]
lea rbx, [rsp + 0x60]
mov r10, rcx
mov ecx, 6
mov rdi, rbx
rep stosq qword [rdi], rax
mov dword [rsp + 0x68], 1
je 0x477f02
mov rsi, qword [rdx]
mov dword [rsp + 0x60], 4
lea r15, [rsp + 0x40]
mov dword [rsp + 0x20], r8d
mov r8d, 0x10
lea r9, [0x0051238d]
mov rcx, r15
lea rdx, [sym.vsnprintf_char__unsigned_long_long__char_const__char_]
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char______gnu_cxx::__to_xstring_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____char__int____char__unsigned_long_long__char_const__char___unsigned_long_long__char_const__::___clone_constprop3681_
lea r9, [rsp + 0x30]
mov r8, rbx
mov rcx, rsi
mov rdx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x477e71
mov rbx, qword [rsp + 0x30]
test rbx, rbx
je 0x477e68
mov rdi, qword [sym.imp.WS2_32.dll_WSASocketW]
mov r13, qword [sym.imp.WS2_32.dll_bind]
mov r14, qword [sym.imp.WS2_32.dll_closesocket]
nop
mov r8d, dword [rbx + 0xc]
xor r9d, r9d
mov edx, dword [rbx + 8]
mov ecx, dword [rbx + 4]
mov dword [rsp + 0x28], 0x81
mov dword [rsp + 0x20], 0
call rdi
cmp rax, 0xffffffffffffffff
mov rsi, rax
je 0x477ee0
test r12b, r12b
jne 0x477eb0
cmp qword [rbp + 0x10], 0
je 0x477dec
mov qword [rsp + 0x38], rsi
lea rdx, [rsp + 0x38]
mov rcx, rbp
call qword [rbp + 0x18]
cmp dword [rbx + 4], 0x17
je 0x477e80
mov rdx, qword [rbx + 0x20]
mov rcx, rsi
mov r8d, dword [rbx + 0x10]
call r13
test eax, eax
jne 0x477e50
mov edx, 5
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
jne 0x477e50
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov rcx, qword [rsp + 0x40]
add r15, 0x10
cmp rcx, r15
je 0x477e38
call sym.operator_delete_void_
mov rax, rsi
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, rsi
call r14
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x477da0
mov rbx, qword [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov rsi, 0xffffffffffffffff
jmp 0x477e25
mov dword [rsp + 0x38], 0
lea r9, [rsp + 0x38]
mov r8d, 0x1b
mov rcx, rsi
mov dword [rsp + 0x20], 4
mov edx, 0x29
call qword [sym.imp.WS2_32.dll_setsockopt]
jmp 0x477df6
mov dword [rsp + 0x38], 1
lea r9, [rsp + 0x38]
mov r8d, 1
mov rcx, rsi
mov dword [rsp + 0x20], 4
mov edx, 6
call qword [sym.imp.WS2_32.dll_setsockopt]
jmp 0x477dd5
mov edx, dword [rbx + 8]
mov ecx, dword [rbx + 4]
mov r8d, dword [rbx + 0xc]
call qword [sym.imp.WS2_32.dll_socket]
cmp rax, 0xffffffffffffffff
mov rsi, rax
je 0x477e56
jmp 0x477dcc
xor esi, esi
cmp qword [r10 + 8], 0
je 0x477f0e
mov rsi, qword [r10]
mov eax, dword [rsp + 0x100]
mov dword [rsp + 0x64], r9d
mov dword [rsp + 0x60], eax
jmp 0x477d37