joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14001f1f0
Capabilities:
Get common file path

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rax - 0x288]
sub rsp, 0x360
mov qword [rbp - 0x30], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rsi, r9
mov r14d, r8d
mov rbx, rdx
mov rdi, rcx
mov edx, 0x104
lea rcx, [rbp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov qword [rsp + 0x68], 7
xor r15d, r15d
mov qword [rsp + 0x60], r15
mov word [rsp + 0x50], r15w
cmp word [rbp + 0x50], r15w
jne 0x14001f25a
mov r8d, r15d
jmp 0x14001f26c
lea rax, [rbp + 0x50]
or r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], r15w
jne 0x14001f262
lea rdx, [rbp + 0x50]
lea rcx, [rsp + 0x50]
call fcn.14000e0d0
nop
lea r8, [0x14003f71c]
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x70]
call fcn.14000eb50
nop
mov r8, rdi
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.14000ebf0
nop
cmp qword [rbp - 0x78], 8
jb 0x14001f2b4
mov rcx, qword [rsp + 0x70]
call fcn.140020a7c
mov qword [rbp - 0x78], 7
mov qword [rbp - 0x80], r15
mov word [rsp + 0x70], r15w
cmp qword [rsp + 0x68], 8
jb 0x14001f2d8
mov rcx, qword [rsp + 0x50]
call fcn.140020a7c
mov qword [rsp + 0x68], 7
mov qword [rsp + 0x60], r15
mov word [rsp + 0x50], r15w
lea rax, [rbp - 0x70]
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x58], 7
mov qword [rbp - 0x60], r15
mov word [rbp - 0x70], r15w
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rbx
lea rcx, [rbp - 0x70]
call fcn.14000d990
nop
mov qword [rbp - 0x38], 7
mov qword [rbp - 0x40], r15
mov word [rbp - 0x50], r15w
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0x30]
lea rcx, [rbp - 0x50]
call fcn.14000d990
nop
mov dword [rsp + 0x20], r15d
mov r9d, 0x440
lea r8, [rbp - 0x70]
lea rdx, [rbp - 0x50]
lea rcx, [rbp - 0x20]
call fcn.14001f590
test eax, eax
je 0x14001f3ee
test r14d, r14d
je 0x14001f393
or edx, 0xffffffff
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test rsi, rsi
je 0x14001f388
mov rdx, rsi
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp qword [rsp + 0x48], 8
jb 0x14001f3a5
mov rcx, qword [rsp + 0x30]
call fcn.140020a7c
mov qword [rsp + 0x48], 7
mov qword [rsp + 0x40], r15
mov word [rsp + 0x30], r15w
cmp qword [rdi + 0x18], 8
jb 0x14001f3c8
mov rcx, qword [rdi]
call fcn.140020a7c
mov qword [rdi + 0x18], 7
mov qword [rdi + 0x10], r15
mov word [rdi], r15w
cmp qword [rbx + 0x18], 8
jb 0x14001f3e7
mov rcx, qword [rbx]
call fcn.140020a7c
mov eax, 1
jmp 0x14001f444
cmp qword [rsp + 0x48], 8
jb 0x14001f400
mov rcx, qword [rsp + 0x30]
call fcn.140020a7c
mov qword [rsp + 0x48], 7
mov qword [rsp + 0x40], r15
mov word [rsp + 0x30], r15w
cmp qword [rdi + 0x18], 8
jb 0x14001f423
mov rcx, qword [rdi]
call fcn.140020a7c
mov qword [rdi + 0x18], 7
mov qword [rdi + 0x10], r15
mov word [rdi], r15w
cmp qword [rbx + 0x18], 8
jb 0x14001f442
mov rcx, qword [rbx]
call fcn.140020a7c
xor eax, eax
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], r15
mov word [rbx], r15w
mov rbx, qword [rsp + 0x3a0]
add rsp, 0x360
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x14001f590
Capabilities:
Check if file exists
Create process on windows
Get file attributes

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x20
cmp qword [rdx + 0x18], 8
mov esi, r9d
mov rdi, r8
mov rbx, rdx
mov r14, rcx
jb 0x14001f5bd
mov rcx, qword [rdx]
jmp 0x14001f5c0
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x14001f601
cmp qword [rbx + 0x18], 8
jb 0x14001f5da
mov rcx, qword [rbx]
call fcn.140020a7c
xor esi, esi
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], rsi
mov word [rbx], si
cmp qword [rdi + 0x18], 8
jb 0x14001f5fa
mov rcx, qword [rdi]
call fcn.140020a7c
xor eax, eax
jmp 0x14001f6a7
xor edx, edx
mov rcx, r14
mov qword [rsp + 0x30], rbp
lea r8d, [rdx + 0x70]
call fcn.140023b30
mov dword [r14 + 4], esi
xor esi, esi
lea rax, str.open
mov dword [r14], 0x70
mov qword [r14 + 8], rsi
mov qword [r14 + 0x10], rax
cmp qword [rbx + 0x18], 8
jb 0x14001f63c
mov rax, qword [rbx]
jmp 0x14001f63f
mov rax, rbx
mov qword [r14 + 0x18], rax
cmp qword [rdi + 0x18], 8
jb 0x14001f64f
mov rax, qword [rdi]
jmp 0x14001f652
mov rax, rdi
cmp dword [rsp + 0x50], 1
mov qword [r14 + 0x20], rax
mov eax, esi
sete al
mov rcx, r14
mov qword [r14 + 0x28], rsi
mov dword [r14 + 0x30], eax
call qword [sym.imp.SHELL32.dll_ShellExecuteExW]
cmp qword [rbx + 0x18], 8
mov ebp, eax
jb 0x14001f682
mov rcx, qword [rbx]
call fcn.140020a7c
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], rsi
mov word [rbx], si
cmp qword [rdi + 0x18], 8
jb 0x14001f6a0
mov rcx, qword [rdi]
call fcn.140020a7c
mov eax, ebp
mov rbp, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x38]
mov qword [rdi + 0x10], rsi
mov qword [rdi + 0x18], 7
mov word [rdi], si
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret

Function at 0x14001ff70
Capabilities:
Delete registry value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x50
cmp qword [rcx + 0x10], 0xffffffff80000002
mov rdi, r8
mov rsi, rdx
mov rbx, rcx
jne 0x14001ffb1
cmp dword [rcx + 0x18], 0
jne 0x14001ffb1
lea rdx, str.RegistryEx.cpp
lea rcx, str.m_hKey___HKEY_LOCAL_MACHINE__m_bWriteHKLM
mov r8d, 0x2e9
call fcn.1400015d0
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x14002003e
test rsi, rsi
je 0x14002003e
xor ebx, ebx
mov qword [rsp + 0x78], rcx
test rdi, rdi
je 0x14002000c
lea rax, [rsp + 0x60]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x78]
mov rdx, rdi
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x14002003e
mov rcx, qword [rsp + 0x78]
mov rdx, rsi
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov esi, eax
test rdi, rdi
je 0x140020027
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
sete bl
mov eax, ebx
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
xor eax, eax
add rsp, 0x50
pop rdi
ret
Function at 0x140020050
Capabilities:
Query or enumerate registry key

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
cmp qword [rcx + 0x10], 0
mov esi, r8d
mov rdi, rdx
mov rbx, rcx
je 0x140020074
test rdx, rdx
jne 0x14002008d
lea rdx, str.RegistryEx.cpp
lea rcx, str.m_hKey__pszSubKeyNameBuf
mov r8d, 0x2d3
call fcn.1400015d0
mov edx, dword [rbx + 0x20]
mov rcx, qword [rbx + 0x10]
mov r9d, esi
lea eax, [rdx + 1]
mov r8, rdi
mov dword [rbx + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
xor ecx, ecx
test eax, eax
sete cl
mov eax, ecx
add rsp, 0x20
pop rdi
ret

Function at 0x1400200c0
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x40
xor ebx, ebx
mov rdi, r9
mov rsi, r8
mov r15, rdx
mov r14d, ebx
test r9, r9
je 0x1400200e9
mov r14d, dword [r9]
test rdx, rdx
je 0x1400201b3
test r8, r8
je 0x1400201b3
mov rcx, qword [rcx + 0x10]
test rcx, rcx
je 0x1400201a4
mov qword [rsp + 0x30], rcx
cmp qword [rsp + 0x80], rbx
je 0x140020141
mov rdx, qword [rsp + 0x80]
lea rax, [rsp + 0x30]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400201a4
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x68]
lea r9, [rsp + 0x78]
xor r8d, r8d
mov qword [rsp + 0x28], rax
mov rdx, r15
mov dword [rsp + 0x68], 4
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov r15d, eax
cmp qword [rsp + 0x80], rbx
je 0x140020181
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test r15d, r15d
jne 0x1400201a4
mov eax, dword [rsp + 0x78]
cmp eax, 4
je 0x14002019b
cmp eax, 3
jne 0x1400201a0
cmp dword [rsp + 0x68], 4
jne 0x1400201a0
mov ebx, 1
mov eax, ebx
jmp 0x1400201b5
test rdi, rdi
je 0x1400201b3
mov dword [rsi], r14d
mov eax, 1
jmp 0x1400201b5
xor eax, eax
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x70]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret
Function at 0x1400201d0
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x30
mov rbx, qword [rsp + 0x80]
mov r12, r9
mov rsi, r8
mov r15, rdx
mov rdi, rcx
cmp r8, rbx
jne 0x140020218
lea rdx, str.RegistryEx.cpp
lea rcx, str.pszValue___pszDefaultValue
mov r8d, 0x126
call fcn.1400015d0
xor ebp, ebp
mov r13d, ebp
test r15, r15
je 0x1400203b0
test rsi, rsi
je 0x1400203b0
test r12, r12
je 0x1400203b0
mov rcx, qword [rdi + 0x10]
or rdi, 0xffffffffffffffff
mov qword [rsp + 0x60], r14
test rcx, rcx
je 0x140020365
mov r14, qword [rsp + 0x88]
mov r13d, dword [r12]
mov qword [rsp + 0x68], rcx
test r14, r14
je 0x14002028d
lea rax, [rsp + 0x68]
mov r9d, 0x20019
xor r8d, r8d
mov rdx, r14
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140020365
mov rcx, qword [rsp + 0x68]
lea r9, [rsp + 0x80]
xor r8d, r8d
mov rdx, r15
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov r15d, eax
test r14, r14
je 0x1400202be
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [rsp + 0x80]
cmp ecx, 2
jne 0x140020330
mov eax, 2
mul r13
cmovo rax, rdi
mov rcx, rax
call fcn.1400216fc
mov r14, rax
test rax, rax
je 0x140020329
mov r8d, r13d
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rdx, rsi
mov rcx, r14
sub rdx, r14
nop
movzx eax, word [rcx]
lea rcx, [rcx + 2]
mov word [rdx + rcx - 2], ax
test ax, ax
jne 0x140020300
mov rax, rdi
inc rax
cmp word [rsi + rax*2], bp
jne 0x140020314
mov rcx, r14
mov dword [r12], eax
call fcn.140021ff8
mov ecx, dword [rsp + 0x80]
test r15d, r15d
jne 0x140020365
lea eax, [rcx - 1]
cmp eax, 1
jbe 0x140020342
cmp ecx, 7
jne 0x140020347
mov ebp, 1
mov eax, ebp
mov r14, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
add rsp, 0x30
pop r15
pop r13
pop r12
pop rdi
pop rsi
ret
test rbx, rbx
je 0x1400203ac
nop word [rax + rax]
cmp word [rbx + rdi*2 + 2], bp
lea rdi, [rdi + 1]
jne 0x140020370
lea ecx, [rdi*2 + 2]
cmp ecx, r13d
ja 0x1400203ac
sub rsi, rbx
nop word [rax + rax]
movzx eax, word [rbx]
lea rbx, [rbx + 2]
mov word [rsi + rbx - 2], ax
test ax, ax
jne 0x140020390
mov dword [r12], ecx
mov eax, 1
jmp 0x140020349
xor eax, eax
jmp 0x140020349
xor eax, eax
jmp 0x14002034e
Function at 0x1400205e0
Capabilities:
Set registry value

Disassembly:
mov r11, rsp
mov qword [r11 + 0x18], rbp
mov qword [r11 + 0x20], rsi
push r14
sub rsp, 0x60
mov rcx, qword [rcx + 0x10]
mov rsi, r9
mov r14d, r8d
mov rbp, rdx
test rcx, rcx
je 0x1400206c3
test rdx, rdx
je 0x1400206c3
test r9, r9
je 0x1400206c3
mov qword [r11 + 0x10], rbx
xor ebx, ebx
mov qword [r11 - 0x18], rcx
cmp qword [rsp + 0x98], rbx
je 0x140020684
mov rdx, qword [rsp + 0x98]
lea rax, [r11 + 8]
xor r9d, r9d
mov qword [r11 - 0x28], rax
lea rax, [r11 - 0x18]
xor r8d, r8d
mov qword [r11 - 0x30], rax
mov qword [r11 - 0x38], rbx
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x14002067f
xor eax, eax
mov rbx, qword [rsp + 0x78]
lea r11, [rsp + 0x60]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret
mov rcx, qword [rsp + 0x50]
mov eax, dword [rsp + 0x90]
mov r9d, r14d
xor r8d, r8d
mov dword [rsp + 0x28], eax
mov rdx, rbp
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
cmp qword [rsp + 0x98], rbx
je 0x1400206ba
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
sete bl
mov eax, ebx
jmp 0x140020667
lea r11, [rsp + 0x60]
xor eax, eax
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret

Function at 0x1400233ac
Capabilities:
Delete file

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1400233c2
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1400233c4
xor eax, eax
test eax, eax
je 0x1400233d4
mov ecx, eax
call fcn.140024180
or eax, 0xffffffff
jmp 0x1400233d6
xor eax, eax
add rsp, 0x28
ret

Function at 0x14002439c
Capabilities:
Terminate process

Disassembly:
xor r8d, r8d
lea edx, [r8 + 1]
jmp fcn.1400244a8

Function at 0x140024640
Capabilities:
Terminate process

Disassembly:
xor r8d, r8d
xor edx, edx
jmp fcn.1400244a8
Function at 0x140010f20
Capabilities:
Hash data using crc32b

Disassembly:
xor r9d, r9d
lea r10, [0x14012cd50]
nop word [rax + rax]
xor eax, eax
test r9b, 1
je 0x140010f3c
bts eax, 7
mov ecx, r9d
shr ecx, 1
test cl, 1
je 0x140010f4a
bts eax, 6
shr ecx, 1
test cl, 1
je 0x140010f55
bts eax, 5
shr ecx, 1
test cl, 1
je 0x140010f60
bts eax, 4
shr ecx, 1
test cl, 1
je 0x140010f6b
bts eax, 3
shr ecx, 1
test cl, 1
je 0x140010f76
bts eax, 2
shr ecx, 1
test cl, 1
je 0x140010f81
bts eax, 1
test cl, 2
je 0x140010f8a
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 0x140011021
lea eax, [rdx + 1]
bts ecx, eax
sar r8d, 1
test r8b, 1
je 0x14001102d
bts ecx, edx
sar r8d, 1
sub edx, 2
cmp edx, 0xfffffffe
jg 0x140011015
mov dword [r10], ecx
inc r9d
add r10, 4
cmp r9d, 0x100
jl 0x140010f30
mov dword [0x14012cd40], 1
ret
Function at 0x140013e90
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 0x140013ebf
xor eax, eax
jmp 0x140014077
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 0x140014038
mov ecx, dword [rdi + 0x1c]
call qword [sym.imp.WS2_32.dll_ntohl]
cmp eax, dword [rbx + 0xa4]
jne 0x140014038
mov ecx, dword [rdi + 0x20]
call qword [sym.imp.WS2_32.dll_ntohl]
cmp eax, dword [rbx + 0x9c]
jne 0x140014038
mov ecx, dword [rdi + 0x24]
call qword [sym.imp.WS2_32.dll_ntohl]
cmp eax, dword [rbx + 0xa0]
jne 0x140014038
mov eax, dword [rbx + 0x1c]
cmp dword [rdi + 0x28], eax
jne 0x140014038
mov edx, 1
mov r8b, 0xff
mov rcx, rbx
call fcn.140014090
cmp rsi, qword [rbx + 0x48]
jae 0x140013f45
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 0x140013f7f
cmp eax, esi
mov ecx, eax
cmova ecx, esi
cmp ecx, dword [rbx + 0xd0]
jae 0x140013f8d
mov dword [rbx + 0xd0], ecx
mov ecx, dword [rdi + 0xc]
call qword [sym.imp.WS2_32.dll_ntohl]
cmp eax, esi
jb 0x140013fa6
mov ecx, 0x10000
mov esi, eax
cmp eax, ecx
cmova esi, ecx
cmp esi, dword [rbx + 0xd4]
jae 0x140013fb4
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 0x140014000
call fcn.140011590
mov dword [rbx + 0x38], 5
mov dword [r14], 1
mov qword [r14 + 8], rbx
mov eax, dword [rbx + 0x1cc]
mov dword [r14 + 0x14], eax
xor eax, eax
jmp 0x140014072
xor edi, edi
cmp dword [rbx + 0x38], 1
sete dil
add edi, 3
call fcn.1400115c0
cmp dword [rbx + 0x140], 0
mov dword [rbx + 0x38], edi
jne 0x140014034
lea rcx, [rbp + 0x48]
mov rdx, rbx
call fcn.140010d40
mov dword [rbx + 0x140], 1
xor eax, eax
jmp 0x140014072
xor edi, edi
mov rcx, rbx
mov dword [rbx + 0x1cc], edi
call fcn.1400115c0
mov dword [rbx + 0x38], 9
cmp dword [rbx + 0x140], edi
jne 0x14001406d
lea rcx, [rbp + 0x48]
mov rdx, rbx
call fcn.140010d40
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 0x140014fb0
Capabilities:
Resolve dns

Disassembly:
push rbx
push r14
sub rsp, 0x58
mov rax, qword [0x140129bc8]
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 0x140014ff5
cmp word [rax + 0x10], 2
jne 0x140014ff5
mov rax, qword [rax + 0x18]
mov rcx, qword [rax]
mov eax, dword [rcx]
mov dword [r14], eax
xor eax, eax
jmp 0x1400150a9
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 0x140015063
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 0x14001508b
mov rdx, qword [rsp + 0x20]
cmp rdx, rbx
je 0x14001508b
mov rcx, rdx
sub rcx, rbx
cmp rcx, 3
jg 0x14001508b
mov byte [rsp + rdi + 0x28], al
movsx eax, byte [rdx]
cmp ebp, 3
mov ecx, esi
cmovl ecx, r15d
cmp eax, ecx
jne 0x14001508b
inc ebp
lea rbx, [rdx + 1]
inc rdi
cmp rdi, 4
jl 0x140015020
mov eax, dword [rsp + 0x28]
mov dword [r14], eax
jmp 0x140015090
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.1400d2da0
add rsp, 0x58
pop r14
pop rbx
ret

Function at 0x1400150d0
Capabilities:
Initialize winsock library

Disassembly:
sub rsp, 0x1d8
mov rax, qword [0x140129bc8]
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 0x140015139
movzx eax, word [rsp + 0x20]
cmp al, 1
jne 0x140015133
shr ax, 8
cmp al, 1
jne 0x140015133
mov ecx, 1
call qword [sym.imp.WINMM.dll_timeBeginPeriod]
xor eax, eax
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.1400d2da0
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.1400d2da0
add rsp, 0x1d8
ret

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

Disassembly:
push rbx
sub rsp, 0x40
mov rax, qword [0x140129bc8]
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 0x140015278
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1400d2da0
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.1400d2da0
add rsp, 0x40
pop rbx
ret
Function at 0x1400152b0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
sub rsp, 0x80
mov rax, qword [0x140129bc8]
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 0x14001533e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
je 0x14001533a
cmp eax, 0x13
jne 0x140015348
xor eax, eax
jmp 0x14001536d
test dword [rsp + 0x50], 0x8000
je 0x14001534f
mov eax, 0xffffffff
jmp 0x14001536d
test rbx, rbx
je 0x140015369
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.1400d2da0
add rsp, 0x80
pop rbx
ret

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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x70
mov rax, qword [0x140129bc8]
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 0x1400153e2
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 0x14001543e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
jmp 0x140015442
mov eax, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.1400d2da0
add rsp, 0x70
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140015460
Capabilities:
Set socket configuration

Disassembly:
sub rsp, 0x58
mov rax, qword [0x140129bc8]
xor rax, rsp
mov qword [rsp + 0x40], rax
dec edx
mov dword [rsp + 0x30], r8d
mov r9d, 0xffffffff
cmp edx, 8
ja case.0x14001549e.8
movsxd rax, edx
lea r10, [0x140000000]
mov edx, dword [r10 + rax*4 + 0x15544]
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 0x140015521
mov edx, 0xffff
mov r8d, 0x20
jmp 0x14001550e
mov edx, 0xffff
mov r8d, 4
jmp 0x14001550e
mov edx, 0xffff
mov r8d, 0x1002
jmp 0x14001550e
mov edx, 0xffff
mov r8d, 0x1001
jmp 0x14001550e
mov edx, 0xffff
mov r8d, 0x1006
jmp 0x14001550e
mov edx, 0xffff
mov r8d, 0x1005
jmp 0x14001550e
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.1400d2da0
add rsp, 0x58
ret

Function at 0x140015570
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x470
mov rax, qword [0x140129bc8]
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 0x1400155de
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0x40], 1
test al, 2
je 0x1400155f5
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 0x140015622
mov eax, 0xffffffff
jmp 0x140015659
mov dword [rbx], 0
test eax, eax
je 0x140015657
lea rdx, [rsp + 0x40]
mov rcx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140015640
or dword [rbx], 1
lea rdx, [rsp + 0x250]
mov rcx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140015657
or dword [rbx], 2
xor eax, eax
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.1400d2da0
mov rbx, qword [rsp + 0x498]
add rsp, 0x470
pop rdi
ret