joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001820
Capabilities:
Allocate or change rwx memory

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
movsxd rsi, dword [0x1400070b4]
mov rbx, rcx
test esi, esi
jle 0x140001950
mov rax, qword [0x1400070b8]
xor r9d, r9d
add rax, 0x18
nop dword [rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000186b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x1400018f3
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001850
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140001972
mov rax, qword [0x1400070b8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400070b8]
lea rdx, [rbp - 0x30]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001957
mov eax, dword [rbp - 0xc]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x1400018ec
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140001900
add dword [0x1400070b4], 1
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp eax, 2
mov rcx, qword [rbp - 0x30]
mov rdx, qword [rbp - 0x18]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x1400070b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400018ec
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop word [rax + rax]
xor esi, esi
jmp 0x140001878
mov rax, qword [0x1400070b8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140001f00
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rbp, [rsp + 0x20]
lea r13, [0x140007120]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140007100]
test rbx, rbx
je 0x140001f65
mov r12, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ecx, dword [rbx]
call r12
mov rsi, rax
call rdi
test rsi, rsi
je 0x140001f5c
test eax, eax
jne 0x140001f5c
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140001f40
mov rcx, r13
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x1400021a0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x1400021b8
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x1400021c0
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret
Function at 0x1400021d0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x14000221d
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x140002214
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14000221f
add rax, 0x28
cmp rax, r9
jne 0x140002200
xor eax, eax
ret

Function at 0x140002220
Capabilities:
Parse pe header

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rbp, [rsp + 0x20]
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x1400022b8
mov rdx, qword [0x1400043e0]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x1400022a6
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x1400022a6
cmp word [rax + 0x18], 0x20b
jne 0x1400022a6
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x1400022b8
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x140002291
add rbx, 0x28
cmp rbx, rdi
je 0x1400022b8
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x140002288
mov rax, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret

Function at 0x1400022d0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400043e0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400022f0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400022f8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400022f0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000234d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140002344
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400022f0
add rax, 0x28
cmp rax, r9
jne 0x140002330
xor eax, eax
ret

Function at 0x140002350
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400043e0]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14000236f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140002378
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14000236f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x140002390
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x1400043e0]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x1400023b0
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x1400023b8
ret
cmp word [rdx + 0x18], 0x20b
jne 0x1400023b0
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140002400
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x1400023f7
test rcx, rcx
je 0x1400023b0
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x1400023e8
xor eax, eax
ret
Function at 0x140002410
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400043e0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000242f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140002438
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

Function at 0x140002450
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400043e0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002470
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002478
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002470
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x140002470
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x1400024c4
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x1400024d0
add rdx, 0x28
cmp rdx, r9
jne 0x1400024b0
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

Function at 0x1400024e0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov r11, qword [0x1400043e0]
xor r8d, r8d
cmp word [r11], 0x5a4d
mov r10d, ecx
jne 0x140002504
movsxd rcx, dword [r11 + 0x3c]
add rcx, r11
cmp dword [rcx], 0x4550
je 0x140002510
mov rax, r8
ret
cmp word [rcx + 0x18], 0x20b
jne 0x140002504
mov eax, dword [rcx + 0x90]
test eax, eax
je 0x140002504
movzx edx, word [rcx + 0x14]
movzx r9d, word [rcx + 6]
lea rdx, [rcx + rdx + 0x18]
test r9w, r9w
je 0x140002504
lea ecx, [r9 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rdx + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rdx + 0xc]
mov rcx, r8
cmp rax, r8
jb 0x14000255c
add ecx, dword [rdx + 8]
cmp rax, rcx
jb 0x140002570
add rdx, 0x28
cmp r9, rdx
jne 0x140002548
xor r8d, r8d
mov rax, r8
ret
add rax, r11
jmp 0x140002580
sub r10d, 1
add rax, 0x14
mov ecx, dword [rax + 4]
test ecx, ecx
jne 0x14000258e
mov edx, dword [rax + 0xc]
test edx, edx
je 0x140002565
test r10d, r10d
jg 0x140002578
mov r8d, dword [rax + 0xc]
add r8, r11
mov rax, r8
ret
Function at 0x140d4baa0
Capabilities:
Terminate process

Disassembly:
cld
pop r11
jmp 0x140d4baad
inc rsi
mov byte [rdi], dl
inc rdi
mov dl, byte [rsi]
add ebx, ebx
jne 0x140d4babd
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jb 0x140d4baa5
lea eax, [rcx + 1]
jmp 0x140d4bacb
dec eax
call r11
adc eax, eax
call r11
adc eax, eax
add ebx, ebx
jne 0x140d4bade
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
mov dl, byte [rsi]
jae 0x140d4bac4
sub eax, 3
jb 0x140d4bafe
shl eax, 8
movzx edx, dl
or eax, edx
inc rsi
xor eax, 0xffffffff
je 0x140d4bb4d
sar eax, 1
movsxd rbp, eax
jb 0x140d4bb34
jmp 0x140d4bb0c
add ebx, ebx
jne 0x140d4bb0a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x140d4bb34
inc ecx
add ebx, ebx
jne 0x140d4bb1a
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jb 0x140d4bb34
call r11
adc ecx, ecx
add ebx, ebx
jne 0x140d4bb2d
mov ebx, dword [rsi]
sub rsi, 0xfffffffffffffffc
adc ebx, ebx
jae 0x140d4bb1c
add ecx, 2
jmp 0x140d4bb39
call r11
adc ecx, ecx
cmp rbp, 0xfffffffffffffb00
adc ecx, 2
call fcn.140d4ba62
jmp 0x140d4baad
pop rsi
pop rdi
pop rax
mov dword [rdi], eax
sub rsp, 0x28
lea rdi, [rsi + 0xd3c000]
mov eax, dword [rdi]
or eax, eax
je 0x140d4bbad
mov ebx, dword [rdi + 4]
lea rcx, [rax + rsi + 0xd4b000]
add rbx, rsi
add rdi, 8
call qword [sym.imp.KERNEL32.DLL_LoadLibraryA]
xchg rbp, rax
mov al, byte [rdi]
inc rdi
or al, al
je 0x140d4bb5d
mov rcx, rdi
mov rdx, rdi
dec eax
repne scasb al, byte [rdi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.DLL_GetProcAddress]
or rax, rax
je 0x140d4bba7
mov qword [rbx], rax
add rbx, 8
jmp 0x140d4bb7d
jmp qword [sym.imp.KERNEL32.DLL_ExitProcess]
add rsp, 0x28
add rdi, 4
lea rbx, [rsi - 4]
xor eax, eax
mov al, byte [rdi]
inc rdi
or eax, eax
je 0x140d4bbf1
cmp al, 0xef
ja 0x140d4bbd9
add rbx, rax
mov rax, qword [rbx]
bswap rax
add rax, rsi
mov qword [rbx], rax
jmp 0x140d4bbb9
and al, 0xf
shl eax, 0x10
mov ax, word [rdi]
add rdi, 2
or eax, eax
jne 0x140d4bbc8
mov eax, dword [rdi]
add rdi, 4
jmp 0x140d4bbc8
mov rbp, qword [sym.imp.KERNEL32.DLL_VirtualProtect]
lea rdi, [rsi - 0x1000]
mov ebx, 0x1000
push rax
mov r9, rsp
mov r8d, 4
mov rdx, rbx
mov rcx, rdi
sub rsp, 0x20
call rbp
lea rax, [rdi + 0x1af]
and byte [rax], 0x7f
and byte [rax + 0x28], 0x7f
lea r9, [rsp + 0x20]
mov r8, qword [r9]
mov rdx, rbx
mov rcx, rdi
call rbp
add rsp, 0x28
mov byte [fcn.140d4bc70], 0xfc
lea rcx, [rsi - 0x1000]
push 1
pop rdx
xor r8, r8
push rax
call fcn.140d4bc70
pop rax
pop rbp
pop rdi
pop rsi
pop rbx
lea rax, [rsp - 0x80]
push 0
cmp rsp, rax
jne 0x140d4bc60
sub rsp, 0xffffffffffffff80
jmp 0x1400014d0
Function at 0x140004a4c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140004a96
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140004a96
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140004a96
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140004a96
cmp dword [rcx + 0x84], 0xe
jbe 0x140004a96
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140004a98
xor al, al
add rsp, 0x28
ret
Function at 0x140011f50
Capabilities:
Hash data using crc32b

Disassembly:
xor r9d, r9d
lea r10, [0x14015df50]
nop word [rax + rax]
xor eax, eax
test r9b, 1
je 0x140011f6c
bts eax, 7
mov ecx, r9d
shr ecx, 1
test cl, 1
je 0x140011f7a
bts eax, 6
shr ecx, 1
test cl, 1
je 0x140011f85
bts eax, 5
shr ecx, 1
test cl, 1
je 0x140011f90
bts eax, 4
shr ecx, 1
test cl, 1
je 0x140011f9b
bts eax, 3
shr ecx, 1
test cl, 1
je 0x140011fa6
bts eax, 2
shr ecx, 1
test cl, 1
je 0x140011fb1
bts eax, 1
test cl, 2
je 0x140011fba
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
mov edx, 0x1e
cmovns r8d, eax
xor ecx, ecx
test r8b, 1
je 0x140012053
lea eax, [rdx + 1]
bts ecx, eax
sar r8d, 1
test r8b, 1
je 0x14001205f
bts ecx, edx
sar r8d, 1
sub edx, 2
cmp edx, 0xfffffffe
jg 0x140012047
mov dword [r10], ecx
inc r9d
add r10, 4
cmp r9d, 0x100
jl 0x140011f60
mov dword [0x14015df40], 1
ret
Function at 0x140014ea0
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 0x140014ecf
xor eax, eax
jmp 0x140015087
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 0x140015048
mov ecx, dword [rdi + 0x1c]
call qword [sym.imp.WS2_32.dll_ntohl]
cmp eax, dword [rbx + 0xa4]
jne 0x140015048
mov ecx, dword [rdi + 0x20]
call qword [sym.imp.WS2_32.dll_ntohl]
cmp eax, dword [rbx + 0x9c]
jne 0x140015048
mov ecx, dword [rdi + 0x24]
call qword [sym.imp.WS2_32.dll_ntohl]
cmp eax, dword [rbx + 0xa0]
jne 0x140015048
mov eax, dword [rbx + 0x1c]
cmp dword [rdi + 0x28], eax
jne 0x140015048
mov edx, 1
mov r8b, 0xff
mov rcx, rbx
call fcn.1400150a0
cmp rsi, qword [rbx + 0x48]
jae 0x140014f55
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 0x140014f8f
cmp eax, esi
mov ecx, eax
cmova ecx, esi
cmp ecx, dword [rbx + 0xd0]
jae 0x140014f9d
mov dword [rbx + 0xd0], ecx
mov ecx, dword [rdi + 0xc]
call qword [sym.imp.WS2_32.dll_ntohl]
cmp eax, esi
jb 0x140014fb6
mov ecx, 0x10000
mov esi, eax
cmp eax, ecx
cmova esi, ecx
cmp esi, dword [rbx + 0xd4]
jae 0x140014fc4
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 0x140015010
call fcn.1400125c0
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 0x140015082
xor edi, edi
cmp dword [rbx + 0x38], 1
sete dil
add edi, 3
call fcn.1400125f0
cmp dword [rbx + 0x140], 0
mov dword [rbx + 0x38], edi
jne 0x140015044
lea rcx, [rbp + 0x48]
mov rdx, rbx
call fcn.140011d70
mov dword [rbx + 0x140], 1
xor eax, eax
jmp 0x140015082
xor edi, edi
mov rcx, rbx
mov dword [rbx + 0x1c8], edi
call fcn.1400125f0
mov dword [rbx + 0x38], 9
cmp dword [rbx + 0x140], edi
jne 0x14001507d
lea rcx, [rbp + 0x48]
mov rdx, rbx
call fcn.140011d70
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 0x140015f80
Capabilities:
Resolve dns

Disassembly:
push rbx
push r14
sub rsp, 0x58
mov rax, qword [0x14015ad80]
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 0x140015fc5
cmp word [rax + 0x10], 2
jne 0x140015fc5
mov rax, qword [rax + 0x18]
mov rcx, qword [rax]
mov eax, dword [rcx]
mov dword [r14], eax
xor eax, eax
jmp 0x140016079
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 r15d, 0x2e
mov dword [rsp + 0x28], 0
lea rdx, [rbx + 1]
mov qword [rsp + 0x20], rdx
cmp byte [rbx], 0x30
je 0x140016033
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 0x14001605b
mov rdx, qword [rsp + 0x20]
cmp rdx, rbx
je 0x14001605b
mov rcx, rdx
sub rcx, rbx
cmp rcx, 3
jg 0x14001605b
mov byte [rsp + rdi + 0x28], al
movsx eax, byte [rdx]
cmp ebp, 3
mov ecx, esi
cmovl ecx, r15d
cmp eax, ecx
jne 0x14001605b
inc ebp
lea rbx, [rdx + 1]
inc rdi
cmp rdi, 4
jl 0x140015ff0
mov eax, dword [rsp + 0x28]
mov dword [r14], eax
jmp 0x140016060
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.1400e6d00
add rsp, 0x58
pop r14
pop rbx
ret

Function at 0x1400160c0
Capabilities:
Initialize winsock library

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

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

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

Disassembly:
push rbx
sub rsp, 0x80
mov rax, qword [0x14015ad80]
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 0x14001632e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
je 0x14001632a
cmp eax, 0x13
jne 0x140016338
xor eax, eax
jmp 0x14001635d
test dword [rsp + 0x50], 0x8000
je 0x14001633f
mov eax, 0xffffffff
jmp 0x14001635d
test rbx, rbx
je 0x140016359
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.1400e6d00
add rsp, 0x80
pop rbx
ret

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

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

Disassembly:
sub rsp, 0x58
mov rax, qword [0x14015ad80]
xor rax, rsp
mov qword [rsp + 0x40], rax
dec edx
mov dword [rsp + 0x30], r8d
mov r9d, 0xffffffff
cmp edx, 8
ja case.0x14001648e.8
movsxd rax, edx
lea r10, [0x140000000]
mov edx, dword [r10 + rax*4 + 0x16534]
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 0x140016513
mov edx, 0xffff
mov r8d, 0x20
jmp 0x140016500
mov edx, 0xffff
mov r8d, 4
jmp 0x140016500
mov edx, 0xffff
mov r8d, 0x1002
jmp 0x140016500
mov edx, 0xffff
mov r8d, 0x1001
jmp 0x140016500
mov edx, 0xffff
mov r8d, 0x1006
jmp 0x140016500
mov edx, 0xffff
mov r8d, 0x1005
jmp 0x140016500
mov edx, 6
mov r8d, 1
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.1400e6d00
add rsp, 0x58
ret

Function at 0x140016560
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x470
mov rax, qword [0x14015ad80]
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 0x1400165ce
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0x40], 1
test al, 2
je 0x1400165e5
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 0x140016612
mov eax, 0xffffffff
jmp 0x140016649
mov dword [rbx], 0
test eax, eax
je 0x140016647
lea rdx, [rsp + 0x40]
mov rcx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140016630
or dword [rbx], 1
lea rdx, [rsp + 0x250]
mov rcx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140016647
or dword [rbx], 2
xor eax, eax
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.1400e6d00
mov rbx, qword [rsp + 0x498]
add rsp, 0x470
pop rdi
ret

Function at 0x140016690
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x40
mov rdi, r9
mov rsi, r8
mov rbp, rdx
mov rbx, rcx
mov ecx, reloc.WS2_32.dll_recv
call fcn.1400e6bb0
mov r9, rax
test rax, rax
je 0x1400166d3
mov eax, dword [rdi]
mov dword [r9], eax
mov eax, dword [rsi]
mov dword [r9 + 4], eax
mov qword [r9 + 8], rbp
jmp 0x1400166d6
xor r9d, r9d
mov qword [rsp + 0x30], r9
lea rdi, [rbx + 8]
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], 0
lea r8, [0x14001c240]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [rbx], rax
test rax, rax
je 0x14001671d
mov rax, rbx
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
mov dword [rdi], 0
mov ecx, 6
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
int3