joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140005480
Capabilities:
Check if file exists

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140149e68]
xor rax, rsp
mov qword [rsp + 0x70], rax
mov eax, dword [0x14010a7c0]
xor edi, edi
movups xmm0, xmmword [str._pipediscord_ipc_0]
mov dword [rsp + 0x68], eax
mov rbx, rcx
movzx eax, word [0x14010a7c4]
lea rcx, [rsp + 0x40]
movups xmm1, xmmword [0x14010a7a8]
mov word [rsp + 0x6c], ax
mov eax, gethostbyname
movups xmmword [rsp + 0x40], xmm0
xor r9d, r9d
mov qword [rsp + 0x30], rdi
movsd xmm0, qword [0x14010a7b8]
xor r8d, r8d
mov dword [rsp + 0x28], edi
mov edx, 0xc0000000
movsd qword [rsp + 0x60], xmm0
mov word [rsp + 0x6a], ax
movups xmmword [rsp + 0x50], xmm1
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbx + 8], rax
cmp rax, 0xffffffffffffffff
jne 0x140005584
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x140005538
movzx eax, word [rsp + 0x6a]
cmp ax, 0x39
jae 0x1400055a7
inc ax
mov word [rsp + 0x6a], ax
jmp 0x140005553
cmp eax, 0xe7
jne 0x1400055a7
mov edx, 0x2710
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
je 0x1400055a7
mov qword [rsp + 0x30], rdi
lea rcx, [rsp + 0x40]
mov dword [rsp + 0x28], edi
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbx + 8], rax
cmp rax, 0xffffffffffffffff
je 0x140005518
mov byte [rbx], 1
mov al, 1
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.1400f81d0
mov rbx, qword [rsp + 0x98]
add rsp, 0x80
pop rdi
ret
xor al, al
jmp 0x140005589

Function at 0x1400055b0
Capabilities:
Read file on windows
Read pipe

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
sub rsp, 0x40
mov rax, qword [0x140149e68]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rdi, r8
mov rsi, rdx
mov rbx, rcx
test rdx, rdx
je 0x140005660
test rcx, rcx
je 0x140005660
mov rcx, qword [rcx + 8]
cmp rcx, 0xffffffffffffffff
je 0x140005660
xor ebp, ebp
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rbp
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor edx, edx
mov dword [rsp + 0x30], ebp
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x14000564b
mov eax, dword [rsp + 0x30]
cmp rax, rdi
jb 0x140005660
mov rcx, qword [rbx + 8]
lea r9, [rsp + 0x34]
mov r8d, edi
mov dword [rsp + 0x34], ebp
mov rdx, rsi
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, 1
jne 0x140005641
jmp 0x140005662
mov rcx, rbx
call fcn.140005430
jmp 0x140005660
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 8], 0xffffffffffffffff
mov byte [rbx], bpl
xor al, al
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1400f81d0
mov rbx, qword [rsp + 0x78]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret
Function at 0x140005680
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x40
mov rax, qword [0x140149e68]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rbx, r8
test r8, r8
jne 0x1400056b2
mov al, 1
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1400f81d0
add rsp, 0x40
pop rbx
ret
test rcx, rcx
je 0x1400056e7
mov rcx, qword [rcx + 8]
cmp rcx, 0xffffffffffffffff
je 0x1400056e7
test rdx, rdx
je 0x1400056e7
xor eax, eax
lea r9, [rsp + 0x30]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
jne 0x1400056e7
cmp dword [rsp + 0x30], ebx
je 0x14000569d
xor al, al
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1400f81d0
add rsp, 0x40
pop rbx
ret
Function at 0x140005bd0
Capabilities:
Query or enumerate registry value

Disassembly:
push rbx
sub rsp, 0xae0
mov rax, qword [0x140149e68]
xor rax, rsp
mov qword [rsp + 0xad0], rax
mov rbx, rdx
mov dword [rsp + 0x28], reloc.WLDAP32.dll_Ordinal_32
lea rax, [rsp + 0x80]
mov r8, rcx
xor edx, edx
mov qword [rsp + 0x20], rax
mov ecx, 0xfde9
mov r9d, 0xffffffff
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea rax, [rsp + 0x40]
mov dword [rsp + 0x28], reloc.WLDAP32.dll_Ordinal_32
mov r9d, 0xffffffff
mov qword [rsp + 0x20], rax
mov r8, rbx
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea rax, [rsp + 0x30]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SoftwareValveSteam
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140005c83
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.Error_opening_Steam_key_n
jmp 0x140005d49
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rdx, str.SteamExe
lea rax, [rsp + 0xc0]
mov dword [rsp + 0x38], 0x208
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x30]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x140005d37
mov ecx, dword [rsp + 0x38]
cmp ecx, 1
jb 0x140005d37
shr ecx, 1
je 0x140005cf5
lea rax, [rsp + 0xc0]
cmp word [rax], 0x2f
jne 0x140005ceb
mov word [rax], 0x5c
add rax, 2
sub rcx, 1
jne 0x140005ce0
lea rax, [rsp + 0x40]
mov edx, 0x800
lea r9, [rsp + 0xc0]
mov qword [rsp + 0x20], rax
lea r8, str.__s__steam:__rungameid__s
lea rcx, [rsp + 0x2d0]
call fcn.140005a60
lea rdx, [rsp + 0x2d0]
lea rcx, [rsp + 0x80]
call fcn.140005700
jmp 0x140005d51
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str.Error_reading_SteamExe_key_n
mov rcx, rax
call fcn.140005d80
mov rcx, qword [rsp + 0xad0]
xor rcx, rsp
call fcn.1400f81d0
add rsp, 0xae0
pop rbx
ret
Function at 0x140005f80
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
sub rsp, 8
mov edx, dword [rcx]
mov r9d, pe_nt_image_headers64
mov r10, rcx
xorps xmm1, xmm1
cmp edx, r9d
jne 0x140005fea
lea r8, [rcx + 0x10]
movabs r11, 0xb5026f5aa96619e9
mov rdx, qword [r8]
xor rdx, qword [r8 - 8]
lea r8, [r8 + 8]
and rdx, 0xffffffff80000000
xor rdx, qword [r8 - 8]
movzx eax, dl
and al, 1
neg al
sbb rcx, rcx
shr rdx, 1
and rcx, r11
xor rcx, qword [r8 + 0x4d0]
xor rcx, rdx
mov qword [r8 + 0x9b0], rcx
sub r9, 1
jne 0x140005fa5
mov edx, dword [r10]
jmp 0x1400060f5
cmp edx, 0x270
jb 0x1400060f5
mov qword [rsp + 0x10], rbx
movabs r11, 0xb5026f5aa96619e9
lea rbx, [rcx + 0x9c8]
mov qword [rsp], rdi
mov r9, qword [rbx]
mov edi, 0x9c
nop dword [rax + rax]
mov r8, qword [rbx + 8]
lea rbx, [rbx + 8]
xor r9, r8
and r9, 0xffffffff80000000
xor r9, r8
movzx eax, r9b
and al, 1
neg al
sbb rcx, rcx
shr r9, 1
and rcx, r11
xor rcx, qword [rbx + 0x4d8]
xor rcx, r9
mov r9, r8
mov qword [rbx - 0x9c8], rcx
sub rdi, 1
jne 0x140006020
lea rbx, [r10 + 0xea8]
mov edi, 0x9b
mov r9, qword [rbx]
nop
mov r8, qword [rbx + 8]
lea rbx, [rbx + 8]
xor r9, r8
and r9, 0xffffffff80000000
xor r9, r8
movzx eax, r9b
and al, 1
neg al
sbb rcx, rcx
shr r9, 1
and rcx, r11
xor rcx, qword [rbx - 0xea8]
xor rcx, r9
mov r9, r8
mov qword [rbx - 0x9c8], rcx
sub rdi, 1
jne 0x140006070
mov rdx, qword [r10 + 8]
xor rdx, qword [r10 + 0x1380]
mov rdi, qword [rsp]
and rdx, 0xffffffff80000000
xor rdx, qword [r10 + 8]
mov rbx, qword [rsp + 0x10]
movzx eax, dl
and al, 1
neg al
sbb rcx, rcx
shr rdx, 1
and rcx, r11
xor rcx, qword [r10 + 0x4e0]
xor rcx, rdx
xor edx, edx
mov qword [r10 + 0x9c0], rcx
mov dword [r10], edx
mov eax, edx
xorps xmm0, xmm0
mov rcx, qword [r10 + rax*8 + 8]
lea eax, [rdx + 1]
mov dword [r10], eax
movabs rdx, 0x38eb3ffff6d3
mov rax, rcx
shr rax, 0x1d
and rax, qword [r10 + 0x1388]
xor rcx, rax
mov rax, rcx
and rax, rdx
shl rax, 0x11
xor rcx, rax
mov rax, rcx
and rax, 0xffffffffffffbf77
shl rax, 0x25
xor rcx, rax
mov rdx, rcx
shr rdx, 0x2b
xor rdx, rcx
js 0x140006150
cvtsi2sd xmm0, rdx
jmp 0x140006165
mov rax, rdx
and edx, 1
shr rax, 1
or rax, rdx
cvtsi2sd xmm0, rax
addsd xmm0, xmm0
subsd xmm0, xmm1
addsd xmm0, xmm1
mulsd xmm0, qword [0x14010aa80]
add rsp, 8
ret
Function at 0x140007720
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0xa0
mov rbx, rdx
mov rbp, rcx
lea rdx, [0x14012789d]
mov ecx, 0xb0
mov rdi, r9
mov r14d, r8d
call fcn.1400f846c
mov rsi, rax
test rax, rax
je 0x140007919
lea rcx, [rax + 1]
xor edx, edx
mov r8d, 0xaf
call sub.VCRUNTIME140.dll_memset
lea rcx, [rsi + 8]
mov byte [rsi], 1
mov edx, 2
call sub.MSVCP140.dll__Mtx_init_in_situ
lea rcx, [rsi + 0x58]
call sub.MSVCP140.dll__Cnd_init_in_situ
mov qword [0x140173128], rsi
xorps xmm0, xmm0
movups xmmword [rsi + 0xa0], xmm0
test r14d, r14d
je 0x1400077c0
test rdi, rdi
je 0x1400077b6
cmp byte [rdi], 0
je 0x1400077b6
mov rdx, rdi
mov rcx, rbp
call fcn.140005bd0
jmp 0x1400077c0
xor edx, edx
mov rcx, rbp
call fcn.140005b30
call sub.KERNEL32.dll_GetCurrentProcessId
lea rcx, [0x140151ca0]
mov dword [0x140173124], eax
call sub.MSVCP140.dll__Mtx_lock
test eax, eax
jne 0x140007949
cmp dword [0x140151cec], 0x7fffffff
je 0x140007954
test rbx, rbx
je 0x14000780f
movups xmm0, xmmword [rbx]
movups xmmword [0x140172db8], xmm0
movups xmm1, xmmword [rbx + 0x10]
movups xmmword [0x140172dc8], xmm1
movups xmm0, xmmword [rbx + 0x20]
jmp 0x14000782f
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
movups xmmword [rsp + 0x50], xmm0
movups xmmword [rsp + 0x60], xmm0
movups xmmword [0x140172db8], xmm0
movups xmmword [0x140172dc8], xmm0
movups xmmword [0x140172dd8], xmm0
lea rcx, [0x140151ca0]
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rsp + 0x80], xmm0
movups xmmword [rsp + 0x90], xmm0
movups xmmword [0x140172de8], xmm0
movups xmmword [0x140172df8], xmm0
movups xmmword [0x140172e08], xmm0
call sub.MSVCP140.dll__Mtx_unlock
cmp qword [0x140172db0], 0
jne 0x140007922
mov rcx, rbp
call fcn.140008ef0
mov qword [0x140172db0], rax
lea rcx, [0x140005dd0]
mov qword [rax + 0x10], rcx
lea rcx, [0x140005de0]
mov rax, qword [0x140172db0]
mov qword [rax + 0x18], rcx
mov eax, 1
mov rdi, qword [0x140173128]
mov ecx, 8
xchg byte [rdi], al
call fcn.1400f807c
xor ebx, ebx
test rax, rax
je 0x1400078cd
mov qword [rax], rdi
jmp 0x1400078d0
mov rax, rbx
lea rcx, [rsp + 0x38]
mov r9, rax
mov qword [rsp + 0x28], rcx
lea r8, [0x140005e30]
xor ecx, ecx
mov dword [rsp + 0x20], ebx
xor edx, edx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [rsp + 0x30], rax
test rax, rax
je 0x14000793a
cmp dword [rdi + 0xa8], ebx
jne 0x140007912
movaps xmm1, xmmword [rsp + 0x30]
movups xmmword [rdi + 0xa0], xmm1
jmp 0x140007922
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_terminate]
int3
xor ebx, ebx
mov qword [0x140173128], rbx
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
mov ecx, 6
mov dword [rsp + 0x38], ebx
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
int3
mov ecx, 5
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
int3
mov ecx, 6
mov dword [0x140151cec], 0x7ffffffe
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
int3
Function at 0x14000e6e0
Capabilities:
Hash data using crc32b

Disassembly:
xor r9d, r9d
lea r10, [0x1401875c0]
nop word [rax + rax]
xor eax, eax
test r9b, 1
je 0x14000e6fc
bts eax, 7
mov ecx, r9d
shr ecx, 1
test cl, 1
je 0x14000e70a
bts eax, 6
shr ecx, 1
test cl, 1
je 0x14000e715
bts eax, 5
shr ecx, 1
test cl, 1
je 0x14000e720
bts eax, 4
shr ecx, 1
test cl, 1
je 0x14000e72b
bts eax, 3
shr ecx, 1
test cl, 1
je 0x14000e736
bts eax, 2
shr ecx, 1
test cl, 1
je 0x14000e741
bts eax, 1
test cl, 2
je 0x14000e74a
bts eax, 0
shl eax, 0x18
lea ecx, [rax + rax]
mov edx, ecx
xor edx, 0x4c11db7
test eax, eax
cmovns edx, ecx
lea eax, [rdx + rdx]
mov ecx, eax
xor ecx, 0x4c11db7
test edx, edx
cmovns ecx, eax
lea eax, [rcx + rcx]
mov edx, eax
xor edx, 0x4c11db7
test ecx, ecx
cmovns edx, eax
lea eax, [rdx + rdx]
mov ecx, eax
xor ecx, 0x4c11db7
test edx, edx
cmovns ecx, eax
lea eax, [rcx + rcx]
mov edx, eax
xor edx, 0x4c11db7
test ecx, ecx
cmovns edx, eax
lea eax, [rdx + rdx]
mov ecx, eax
xor ecx, 0x4c11db7
test edx, edx
cmovns ecx, eax
lea eax, [rcx + rcx]
mov edx, eax
xor edx, 0x4c11db7
test ecx, ecx
cmovns edx, eax
lea eax, [rdx + rdx]
mov r8d, eax
xor r8d, 0x4c11db7
test edx, edx
cmovns r8d, eax
xor ecx, ecx
lea edx, [rcx + 0x1e]
test r8b, 1
je 0x14000e7e1
lea eax, [rdx + 1]
bts ecx, eax
sar r8d, 1
test r8b, 1
je 0x14000e7ed
bts ecx, edx
sar r8d, 1
sub edx, 2
cmp edx, 0xfffffffe
jg 0x14000e7d5
mov dword [r10], ecx
inc r9d
add r10, 4
cmp r9d, 0x100
jl 0x14000e6f0
mov dword [0x1401875b0], 1
ret
Function at 0x140011650
Capabilities:
Enumerate pe sections

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x20
cmp dword [r8 + 0x38], 1
mov rdi, r9
mov rbx, r8
mov r14, rdx
mov rbp, rcx
je 0x14001167f
xor eax, eax
jmp 0x140011837
mov ecx, dword [r9 + 0x10]
mov qword [rsp + 0x30], rsi
call qword [sym.imp.WS2_32.dll_ntohl]
mov esi, eax
lea rax, [rsi - 1]
cmp rax, 0xfe
ja 0x1400117f8
mov ecx, dword [rdi + 0x1c]
call qword [sym.imp.WS2_32.dll_ntohl]
cmp eax, dword [rbx + 0xa4]
jne 0x1400117f8
mov ecx, dword [rdi + 0x20]
call qword [sym.imp.WS2_32.dll_ntohl]
cmp eax, dword [rbx + 0x9c]
jne 0x1400117f8
mov ecx, dword [rdi + 0x24]
call qword [sym.imp.WS2_32.dll_ntohl]
cmp eax, dword [rbx + 0xa0]
jne 0x1400117f8
mov eax, dword [rbx + 0x1c]
cmp dword [rdi + 0x28], eax
jne 0x1400117f8
mov edx, 1
mov r8b, 0xff
mov rcx, rbx
call fcn.140011850
cmp rsi, qword [rbx + 0x48]
jae 0x140011705
mov qword [rbx + 0x48], rsi
movzx ecx, word [rdi + 4]
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rbx + 0x18], ax
movzx eax, byte [rdi + 6]
mov byte [rbx + 0x21], al
movzx eax, byte [rdi + 7]
mov byte [rbx + 0x20], al
mov ecx, dword [rdi + 8]
call qword [sym.imp.WS2_32.dll_ntohl]
mov ecx, 0x240
mov esi, 0x1000
cmp eax, ecx
jb 0x14001173f
cmp eax, esi
mov ecx, eax
cmova ecx, esi
cmp ecx, dword [rbx + 0xd0]
jae 0x14001174d
mov dword [rbx + 0xd0], ecx
mov ecx, dword [rdi + 0xc]
call qword [sym.imp.WS2_32.dll_ntohl]
cmp eax, esi
jb 0x140011766
mov ecx, 0x10000
mov esi, eax
cmp eax, ecx
cmova esi, ecx
cmp esi, dword [rbx + 0xd4]
jae 0x140011774
mov dword [rbx + 0xd4], esi
mov ecx, dword [rdi + 0x14]
call qword [sym.imp.WS2_32.dll_ntohl]
mov dword [rbx + 0x50], eax
mov ecx, dword [rdi + 0x18]
call qword [sym.imp.WS2_32.dll_ntohl]
mov dword [rbx + 0x54], eax
mov rcx, rbx
mov dword [rbp + 0x24], 1
test r14, r14
je 0x1400117c0
call fcn.14000ed50
mov dword [rbx + 0x38], 5
mov dword [r14], 1
mov qword [r14 + 8], rbx
mov eax, dword [rbx + 0x1c8]
mov dword [r14 + 0x14], eax
xor eax, eax
jmp 0x140011832
xor edi, edi
cmp dword [rbx + 0x38], 1
sete dil
add edi, 3
call fcn.14000ed80
cmp dword [rbx + 0x140], 0
mov dword [rbx + 0x38], edi
jne 0x1400117f4
lea rcx, [rbp + 0x48]
mov rdx, rbx
call fcn.14000e500
mov dword [rbx + 0x140], 1
xor eax, eax
jmp 0x140011832
xor edi, edi
mov rcx, rbx
mov dword [rbx + 0x1c8], edi
call fcn.14000ed80
mov dword [rbx + 0x38], 9
cmp dword [rbx + 0x140], edi
jne 0x14001182d
lea rcx, [rbp + 0x48]
mov rdx, rbx
call fcn.14000e500
mov dword [rbx + 0x140], 1
mov eax, 0xffffffff
mov rsi, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
Function at 0x140012710
Capabilities:
Resolve dns

Disassembly:
push rbx
push r14
sub rsp, 0x58
mov rax, qword [0x140149e68]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov r14, rcx
mov rbx, rdx
mov rcx, rdx
call qword [sym.imp.WS2_32.dll_gethostbyname]
test rax, rax
je 0x140012755
cmp word [rax + 0x10], 2
jne 0x140012755
mov rax, qword [rax + 0x18]
mov rcx, qword [rax]
mov eax, dword [rcx]
mov dword [r14], eax
xor eax, eax
jmp 0x140012809
mov qword [rsp + 0x80], rbp
mov qword [rsp + 0x50], rsi
xor esi, esi
mov qword [rsp + 0x48], rdi
mov ebp, esi
mov qword [rsp + 0x40], r15
mov edi, esi
mov dword [rsp + 0x28], 0
lea r15d, [rsi + 0x2e]
nop
lea rdx, [rbx + 1]
mov qword [rsp + 0x20], rdx
cmp byte [rbx], 0x30
je 0x1400127c3
mov r8d, 0xa
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtol]
cmp eax, 0xff
ja 0x1400127eb
mov rdx, qword [rsp + 0x20]
cmp rdx, rbx
je 0x1400127eb
mov rcx, rdx
sub rcx, rbx
cmp rcx, 3
jg 0x1400127eb
mov byte [rsp + rdi + 0x28], al
movsx eax, byte [rdx]
cmp ebp, 3
mov ecx, esi
cmovl ecx, r15d
cmp eax, ecx
jne 0x1400127eb
inc ebp
lea rbx, [rdx + 1]
inc rdi
cmp rdi, 4
jl 0x140012780
mov eax, dword [rsp + 0x28]
mov dword [r14], eax
jmp 0x1400127f0
mov esi, 0xffffffff
mov r15, qword [rsp + 0x40]
mov eax, esi
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.1400f81d0
add rsp, 0x58
pop r14
pop rbx
ret

Function at 0x140012830
Capabilities:
Initialize winsock library

Disassembly:
sub rsp, 0x1d8
mov rax, qword [0x140149e68]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
mov ecx, 0x101
lea rdx, [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x140012899
movzx eax, word [rsp + 0x20]
cmp al, 1
jne 0x140012893
shr ax, 8
cmp al, 1
jne 0x140012893
mov ecx, 1
call qword [sym.imp.WINMM.dll_timeBeginPeriod]
xor eax, eax
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.1400f81d0
add rsp, 0x1d8
ret
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 0xffffffff
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.1400f81d0
add rsp, 0x1d8
ret

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

Disassembly:
push rbx
sub rsp, 0x40
mov rax, qword [0x140149e68]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rbx, rdx
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x28]
lea r8, [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x1400129d8
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1400f81d0
add rsp, 0x40
pop rbx
ret
mov eax, dword [rsp + 0x2c]
movzx ecx, word [rsp + 0x2a]
mov dword [rbx], eax
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rbx + 4], ax
xor eax, eax
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1400f81d0
add rsp, 0x40
pop rbx
ret
Function at 0x140012a10
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
sub rsp, 0x80
mov rax, qword [0x140149e68]
xor rax, rsp
mov qword [rsp + 0x70], rax
mov r11, r9
mov dword [rsp + 0x54], reloc.WS2_32.dll_recv
mov rbx, rdx
lea r9, [rsp + 0x54]
xor edx, edx
lea rax, [rsp + 0x60]
mov qword [rsp + 0x40], rdx
mov r10, r8
mov qword [rsp + 0x38], rdx
test rbx, rbx
mov dword [rsp + 0x50], edx
mov r8d, r11d
cmove r9, rdx
cmove rax, rdx
mov qword [rsp + 0x30], r9
mov rdx, r10
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x58]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_WSARecvFrom]
cmp eax, 0xffffffff
jne 0x140012a9e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
je 0x140012a9a
cmp eax, 0x13
jne 0x140012aa8
xor eax, eax
jmp 0x140012acd
test dword [rsp + 0x50], 0x8000
je 0x140012aaf
mov eax, 0xffffffff
jmp 0x140012acd
test rbx, rbx
je 0x140012ac9
mov eax, dword [rsp + 0x64]
movzx ecx, word [rsp + 0x62]
mov dword [rbx], eax
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rbx + 4], ax
mov eax, dword [rsp + 0x58]
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.1400f81d0
add rsp, 0x80
pop rbx
ret

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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x70
mov rax, qword [0x140149e68]
xor rax, rsp
mov qword [rsp + 0x68], rax
xor r14d, r14d
mov rbp, r9
mov rsi, r8
mov rbx, rdx
mov rdi, rcx
test rdx, rdx
je 0x140012b42
movzx ecx, word [rdx + 4]
mov eax, 2
mov word [rsp + 0x58], ax
mov qword [rsp + 0x60], r14
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x5a], ax
mov eax, dword [rbx]
mov dword [rsp + 0x5c], eax
mov qword [rsp + 0x40], r14
mov rax, rbx
neg rax
mov qword [rsp + 0x38], r14
lea rax, [rsp + 0x58]
mov r8d, ebp
sbb r9d, r9d
mov rdx, rsi
and r9d, 0x10
mov rcx, rdi
mov dword [rsp + 0x30], r9d
test rbx, rbx
lea r9, [rsp + 0x50]
cmove rax, r14
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r14d
call qword [sym.imp.WS2_32.dll_WSASendTo]
cmp eax, 0xffffffff
jne 0x140012b9e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
jmp 0x140012ba2
mov eax, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.1400f81d0
add rsp, 0x70
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140012bc0
Capabilities:
Set socket configuration

Disassembly:
sub rsp, 0x58
mov rax, qword [0x140149e68]
xor rax, rsp
mov qword [rsp + 0x40], rax
dec edx
mov dword [rsp + 0x30], r8d
mov r9d, 0xffffffff
cmp edx, 8
ja case.0x140012bfe.8
movsxd rax, edx
lea r10, [0x140000000]
mov edx, dword [r10 + rax*4 + 0x12ca4]
add rdx, r10
jmp rdx
mov dword [rsp + 0x38], r8d
mov edx, 0x8004667e
lea r8, [rsp + 0x38]
call qword [sym.imp.WS2_32.dll_ioctlsocket]
jmp 0x140012c81
mov edx, 0xffff
mov r8d, reloc.WLDAP32.dll_Ordinal_32
jmp 0x140012c6e
mov edx, 0xffff
mov r8d, 4
jmp 0x140012c6e
mov edx, 0xffff
mov r8d, 0x1002
jmp 0x140012c6e
mov edx, 0xffff
mov r8d, 0x1001
jmp 0x140012c6e
mov edx, 0xffff
mov r8d, 0x1006
jmp 0x140012c6e
mov edx, 0xffff
mov r8d, 0x1005
jmp 0x140012c6e
mov edx, 6
lea r8d, [rdx - 5]
lea r9, [rsp + 0x30]
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov r9d, eax
xor eax, eax
cmp r9d, 0xffffffff
setne al
dec eax
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400f81d0
add rsp, 0x58
ret

Function at 0x140012cd0
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x470
mov rax, qword [0x140149e68]
xor rax, rsp
mov qword [rsp + 0x460], rax
mov rbx, rdx
mov dword [rsp + 0x250], 0
mov eax, 0x10624dd3
mov dword [rsp + 0x40], 0
mul r8d
mov rdi, rcx
shr edx, 6
imul eax, edx, 0x3e8
mov dword [rsp + 0x30], edx
sub r8d, eax
imul eax, r8d, 0x3e8
mov dword [rsp + 0x34], eax
mov eax, dword [rbx]
test al, 1
je 0x140012d3e
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0x40], 1
test al, 2
je 0x140012d55
mov qword [rsp + 0x258], rdi
mov dword [rsp + 0x250], 1
lea rax, [rsp + 0x30]
inc ecx
xor r9d, r9d
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x250]
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
jns 0x140012d82
mov eax, 0xffffffff
jmp 0x140012db9
mov dword [rbx], 0
test eax, eax
je 0x140012db7
lea rdx, [rsp + 0x40]
mov rcx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140012da0
or dword [rbx], 1
lea rdx, [rsp + 0x250]
mov rcx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140012db7
or dword [rbx], 2
xor eax, eax
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.1400f81d0
mov rbx, qword [rsp + 0x498]
add rsp, 0x470
pop rdi
ret