joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40de40
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00419900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004198e0]
test rbx, rbx
je 0x40de94
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x40de8b
test r12, r12
je 0x40de8b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x40de70
lea rcx, [0x00419900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x40e1d0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r10, qword [0x00416300]
xor r8d, r8d
cmp word [r10], 0x5a4d
mov r9, rcx
jne 0x40e249
mov rcx, r10
call fcn.0040e0a0
test eax, eax
je 0x40e249
movsxd rax, dword [r10 + 0x3c]
mov rcx, r9
sub rcx, r10
add r10, rax
movzx eax, word [r10 + 0x14]
lea r8, [r10 + rax + 0x18]
movzx eax, word [r10 + 6]
test eax, eax
je 0x40e246
sub eax, 1
lea rax, [rax + rax*4]
lea r9, [r8 + rax*8 + 0x28]
nop dword [rax]
mov edx, dword [r8 + 0xc]
mov rax, rdx
cmp rcx, rdx
jb 0x40e23d
add eax, dword [r8 + 8]
cmp rcx, rax
jb 0x40e249
add r8, 0x28
cmp r8, r9
jne 0x40e228
xor r8d, r8d
mov rax, r8
add rsp, 0x28
ret

Function at 0x40e540
Capabilities:
Allocate thread local storage

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov eax, dword [0x004198e8]
mov edi, ecx
mov rsi, rdx
test eax, eax
jne 0x40ded0
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
mov edx, 0x18
mov ecx, 1
call sub.msvcrt.dll_calloc
mov rbx, rax
test rax, rax
je 0x40df23
mov dword [rax], edi
lea rcx, [0x00419900]
mov qword [rax + 8], rsi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [0x004198e0]
lea rcx, [0x00419900]
mov qword [0x004198e0], rbx
mov qword [rbx + 0x10], rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
or eax, 0xffffffff
jmp 0x40dec6
push r12
push rbx
sub rsp, 0x28
mov rbx, rcx
mov r12, rdx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov ecx, eax
cmp eax, 0xffffffff
je 0x40e570
mov rdx, r12
mov dword [rbx], eax
add rsp, 0x28
pop rbx
pop r12
jmp 0x40f250
add rsp, 0x28
pop rbx
pop r12
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
test rdx, rdx
jne 0x40f260
xor eax, eax
ret
jmp 0x40deb0

Function at 0x40e5b0
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
sub rsp, 0x28
mov r12d, ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, r12d
mov r13d, eax
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, r13d
mov r12, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, r12
add rsp, 0x28
pop r12
pop r13
ret

Function at 0x40e5f0
Capabilities:
Set thread local storage value

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40e608
xor eax, eax
add rsp, 0x28
ret
add rsp, 0x28
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
Function at 0x140002be4
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140002c2e
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140002c2e
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140002c2e
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140002c2e
cmp dword [rcx + 0x84], 0xe
jbe 0x140002c2e
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140002c30
xor al, al
add rsp, 0x28
ret
Function at 0x1800013d4
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push rbp
push rbx
push rdi
push rsi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 8
sub rsp, 0x20
mov rbx, rcx
xor rax, rax
mov rcx, rbp
sub rcx, rsp
mov rdi, rsp
rep stosb byte [rdi], al
mov rcx, rbx
mov qword [rbp - 8], rcx
mov qword [rbp - 0x10], rdx
mov qword [rbp - 0x18], r8
mov qword [rbp - 0x20], r9
mov rbx, qword gs:[0x60]
mov rbx, qword [rbx + 0x18]
mov rbx, qword [rbx + 0x20]
mov r12, rbx
mov rax, qword [rbx + 0x40]
cmp byte [rax + 0x28], 0x4b
je 0x1800013fd
cmp byte [rax + 0x28], 0x6b
je 0x1800013fd
jmp 0x180001443
cmp byte [rax + 0x30], 0x45
je 0x18000140b
cmp byte [rax + 0x30], 0x65
je 0x18000140b
jmp 0x180001443
cmp byte [rax + 0x32], 0x4c
je 0x180001419
cmp byte [rax + 0x32], 0x6c
je 0x180001419
jmp 0x180001443
cmp byte [rax + 0x36], 0x32
je 0x180001421
jmp 0x180001443
cmp byte [rax + 0x3c], 0x4c
je 0x18000142f
cmp byte [rax + 0x3c], 0x6c
je 0x18000142f
jmp 0x180001443
cmp byte [rax + 0x3e], 0x4c
je 0x18000143d
cmp byte [rax + 0x3c], 0x6c
je 0x18000143d
jmp 0x180001443
mov rbx, qword [rbx + 0x20]
jmp 0x18000144b
mov rbx, qword [rbx]
cmp r12, rbx
jne 0x1800013eb
mov r15, rbx
xor r8, r8
mov r8d, dword [rbx + 0x3c]
mov rdx, r8
add rdx, rbx
mov r8d, dword [rdx + 0x88]
add r8, rbx
xor rsi, rsi
mov esi, dword [r8 + 0x20]
add rsi, rbx
xor rcx, rcx
movabs r9, 0x41636f7250746546
inc r9
inc rcx
xor rax, rax
mov eax, dword [rsi + rcx*4]
add rax, rbx
cmp qword [rax], r9
jne 0x18000147f
xor rsi, rsi
mov esi, dword [r8 + 0x24]
add rsi, rbx
mov cx, word [rsi + rcx*2]
xor rsi, rsi
mov esi, dword [r8 + 0x1c]
add rsi, rbx
xor rdx, rdx
mov edx, dword [rsi + rcx*4]
add rdx, rbx
mov r14, rdx
mov rax, r15
mov r8, r14
mov rsp, rbp
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rdi
pop rbx
pop rbp
ret

Function at 0x180002574
Capabilities:
Timestomp file

Disassembly:
push rbx
sub rsp, 0x30
mov rbx, rdx
lea r9, [rsp + 0x50]
lea rdx, [rsp + 0x20]
lea r8, [rsp + 0x58]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileTime]
nop dword [rax + rax]
test eax, eax
je 0x1800025c3
lea r9, [rsp + 0x50]
mov rcx, rbx
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0x20]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFileTime]
nop dword [rax + rax]
test eax, eax
mov eax, 1
jne 0x1800025c8
mov eax, 0xffffffff
add rsp, 0x30
pop rbx
ret
Function at 0x1800027bc
Capabilities:
Delete file
Get file size
Get thread local storage value

Disassembly:
push rbx
push rbp
push rsi
sub rsp, 0x190
mov rax, qword [0x180006008]
xor rax, rsp
mov qword [rsp + 0x180], rax
mov rsi, r9
lea r8, [0x1800045b0]
mov r9, rdx
mov rbp, rcx
mov edx, 0x104
lea rcx, [rsp + 0x70]
call fcn.180002fc0
mov ecx, dword [0x180006020]
cmp ecx, 0xffffffff
je 0x1800029da
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
nop dword [rax + rax]
test rax, rax
je 0x1800029da
mov ecx, dword [0x180006020]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
nop dword [rax + rax]
cmp qword [rax + 8], 0
je 0x1800029da
mov ecx, dword [0x180006020]
mov qword [rsp + 0x1c0], rdi
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
nop dword [rax + rax]
mov ebx, 1
xor r8d, r8d
xor edx, edx
mov rcx, rbp
mov dword [rax], ebx
call fcn.180002de0
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x180002897
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileSize]
nop dword [rax + rax]
mov dword [rsi + 0x40], eax
cmp eax, 0xffffffff
jne 0x1800028c0
mov ecx, edi
call qword [sym.imp.KERNEL32.dll__lclose]
nop dword [rax + rax]
mov eax, 0xffffffff
mov rdi, qword [rsp + 0x1c0]
mov rcx, qword [rsp + 0x180]
xor rcx, rsp
call fcn.180001630
add rsp, 0x190
pop rsi
pop rbp
pop rbx
ret
mov ecx, dword [0x180006020]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x48], rbp
mov dword [rsp + 0x58], 0
mov qword [rsp + 0x60], rsi
cmp ecx, 0xffffffff
je 0x180002915
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
nop dword [rax + rax]
test rax, rax
je 0x180002915
mov ecx, dword [0x180006020]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
nop dword [rax + rax]
mov rcx, qword [rax + 8]
jmp 0x180002917
xor ecx, ecx
lea rax, [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x30], rax
lea r8, [0x180004608]
lea rax, [0x1800025e0]
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], rax
mov rdx, rbp
mov rax, qword [0x180006678]
call qword [0x180004450]
test eax, eax
jne 0x1800029c5
mov ecx, dword [0x180006020]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
nop dword [rax + rax]
mov ecx, dword [rax + 0x10]
add ecx, 0xfffffffd
cmp ecx, 8
ja case.0x180002985.7
movsxd rax, ecx
lea rdx, [0x180000000]
mov ecx, dword [rdx + rax*4 + 0x29e4]
add rcx, rdx
jmp rcx
mov ebx, 0xfffffffd
jmp 0x1800029b4
mov ebx, 0xfffffffb
jmp 0x1800029b4
mov ecx, dword [0x180006020]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
nop dword [rax + rax]
mov ebx, dword [rax]
jmp 0x1800029b4
mov ebx, 0xfffffff9
lea rcx, [rsp + 0x70]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_DeleteFileA]
nop dword [rax + rax]
mov ecx, edi
call qword [sym.imp.KERNEL32.dll__lclose]
nop dword [rax + rax]
mov eax, ebx
jmp 0x18000289c
mov eax, 0xfffffff9
jmp 0x1800028a4
Function at 0x180002c88
Capabilities:
Get thread local storage value

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x40
mov rax, qword [0x180006008]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rbx, rcx
mov ecx, dword [0x180006020]
cmp ecx, 0xffffffff
je 0x180002d56
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
nop dword [rax + rax]
test rax, rax
je 0x180002d56
mov ecx, dword [0x180006020]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
nop dword [rax + rax]
cmp qword [rax + 8], 0
je 0x180002d56
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call fcn.180002de0
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x180002d56
mov ecx, dword [0x180006020]
cmp ecx, 0xffffffff
je 0x180002d2b
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
nop dword [rax + rax]
test rax, rax
je 0x180002d2b
mov ecx, dword [0x180006020]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
nop dword [rax + rax]
mov rcx, qword [rax + 8]
jmp 0x180002d2d
xor ecx, ecx
mov rax, qword [0x180006680]
lea r8, [rsp + 0x20]
mov rdx, rdi
call qword [0x180004450]
mov ecx, edi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll__lclose]
nop dword [rax + rax]
mov eax, ebx
jmp 0x180002d58
xor eax, eax
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.180001630
mov rbx, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret

Function at 0x180002de0
Capabilities:
Get thread local storage value

Disassembly:
sub rsp, 0x28
test dl, 1
je 0x180002df0
mov edx, 0x21
jmp 0x180002df9
movzx edx, dl
and edx, 2
or edx, 0x20
call qword [sym.imp.KERNEL32.dll__lopen]
nop dword [rax + rax]
cmp eax, 0xffffffff
jne 0x180002e2b
mov ecx, dword [0x180006020]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
nop dword [rax + rax]
mov dword [rax], 0xffffffff
mov rax, 0xffffffffffffffff
jmp 0x180002e2d
cdqe
add rsp, 0x28
ret
Function at 0x1800031e0
Capabilities:
Get file version info

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rsi, rcx
mov edi, 0x800
mov edx, edi
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalAlloc]
nop dword [rax + rax]
mov rbx, rax
test rax, rax
je 0x180003272
movzx r8d, di
mov r9, rbx
xor edx, edx
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_version_l1_1_1.dll_GetFileVersionInfoW]
nop dword [rax + rax]
test eax, eax
je 0x180003263
movzx eax, word [rbx]
cmp di, ax
jae 0x18000325e
mov rcx, rbx
mov edi, eax
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
mov edx, edi
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalAlloc]
nop dword [rax + rax]
mov rbx, rax
test rax, rax
jne 0x18000320f
jmp 0x180003272
mov rax, rbx
jmp 0x180003274
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x140003b70
Capabilities:
Encode data using base64

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov rdi, rdx
mov rbx, rcx
mov qword [rsp + 0x28], rcx
xor ebp, ebp
mov dword [rsp + 0x20], ebp
xorps xmm0, xmm0
movups xmmword [rcx], xmm0
mov qword [rcx + 0x10], rbp
mov qword [rcx + 0x18], reloc.WS2_32.dll_ntohs
mov byte [rcx], bpl
mov dword [rsp + 0x20], 1
lea rsi, [rdx + 0x10]
mov rdx, qword [rsi]
cmp rdx, 0xf
jbe 0x140003bc8
call fcn.140026070
mov qword [rbx + 0x10], rbp
mov r15d, 0xfffffffa
cmp qword [rdi + 0x18], 0x10
jb 0x140003be0
mov r14, qword [rdi]
mov rcx, r14
mov rdi, r14
jmp 0x140003be6
mov r14, rdi
mov rcx, rdi
mov r13, qword [rsi]
add r13, rcx
cmp rdi, r13
je 0x140003cef
lea r8, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
nop dword [rax]
shl ebp, 8
movzx eax, byte [r14]
add ebp, eax
add r15d, 8
js 0x140003c8d
movsxd r12, ebp
movsxd rdi, r15d
lea ecx, [r15 + 6]
mov eax, 0xaaaaaaab
mul ecx
shr edx, 2
mov esi, edx
imul eax, edx, 0xfffffffa
add r15d, eax
nop dword [rax + rax]
mov rax, r12
mov rcx, rdi
sar rax, cl
and eax, 0x3f
movzx r9d, byte [rax + r8]
mov rcx, qword [rbx + 0x10]
mov rdx, qword [rbx + 0x18]
cmp rcx, rdx
jae 0x140003c6d
lea rax, [rcx + 1]
mov qword [rbx + 0x10], rax
mov rax, rbx
cmp rdx, 0x10
jb 0x140003c62
mov rax, qword [rbx]
mov byte [rax + rcx], r9b
mov byte [rax + rcx + 1], 0
jmp 0x140003c83
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, rbx
call fcn.1400261c0
lea r8, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
sub rdi, 6
sub rsi, 1
jne 0x140003c30
inc r14
cmp r14, r13
jne 0x140003c00
cmp r15d, 0xfffffffa
jle 0x140003cef
lea ecx, [r15 + 8]
shl ebp, 8
movsxd rax, ebp
sar rax, cl
and eax, 0x3f
movzx r9d, byte [rax + r8]
mov rcx, qword [rbx + 0x10]
mov rdx, qword [rbx + 0x18]
cmp rcx, rdx
jae 0x140003ce0
lea rax, [rcx + 1]
mov qword [rbx + 0x10], rax
mov rax, rbx
cmp rdx, 0x10
jb 0x140003cd5
mov rax, qword [rbx]
mov byte [rax + rcx], r9b
mov byte [rax + rcx + 1], 0
jmp 0x140003cef
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, rbx
call fcn.1400261c0
mov rcx, qword [rbx + 0x10]
test cl, 3
je 0x140003d40
nop dword [rax + rax]
mov rdx, qword [rbx + 0x18]
cmp rcx, rdx
jae 0x140003d25
lea rax, [rcx + 1]
mov qword [rbx + 0x10], rax
mov rax, rbx
cmp rdx, 0x10
jb 0x140003d1d
mov rax, qword [rbx]
mov word [rax + rcx], 0x3d
jmp 0x140003d37
mov r9b, 0x3d
xor r8d, r8d
lea edx, [r8 + 1]
mov rcx, rbx
call fcn.1400261c0
mov rcx, qword [rbx + 0x10]
test cl, 3
jne 0x140003d00
mov rax, rbx
mov rbx, qword [rsp + 0x80]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x140004b80
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x260
mov rax, qword [0x140078010]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov rdi, rcx
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0x40], 1
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x34], r8d
nop dword [rax + rax]
lea rax, [rsp + 0x30]
xor r9d, r9d
lea ecx, [rdi + 1]
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_select]
movsxd rbx, eax
test eax, eax
jns 0x140004bef
call fcn.140042150
cmp dword [rax], 4
je 0x140004bc0
mov rax, rbx
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.1400336c0
mov rbx, qword [rsp + 0x270]
add rsp, 0x260
pop rdi
ret

Function at 0x140004c20
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x260
mov rax, qword [0x140078010]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov rdi, rcx
mov qword [rsp + 0x48], rcx
mov dword [rsp + 0x40], 1
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x34], r8d
nop dword [rax + rax]
lea rax, [rsp + 0x30]
xor r9d, r9d
lea ecx, [rdi + 1]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x40]
xor edx, edx
call qword [sym.imp.WS2_32.dll_select]
movsxd rbx, eax
test eax, eax
jns 0x140004c8e
call fcn.140042150
cmp dword [rax], 4
je 0x140004c60
mov rax, rbx
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.1400336c0
mov rbx, qword [rsp + 0x270]
add rsp, 0x260
pop rdi
ret

Function at 0x140004cc0
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x260
mov rax, qword [0x140078010]
xor rax, rsp
mov qword [rsp + 0x250], rax
xor eax, eax
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x38], rax
mov rdi, rcx
mov dword [rsp + 0x40], 1
nop word [rax + rax]
lea rax, [rsp + 0x38]
xor r9d, r9d
lea ecx, [rdi + 1]
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_select]
mov ebx, eax
test eax, eax
jns 0x140004d2e
call fcn.140042150
cmp dword [rax], 4
je 0x140004d00
test ebx, ebx
jne 0x140004d36
mov al, 1
jmp 0x140004d93
jns 0x140004d46
call fcn.140042150
cmp dword [rax], 9
jne 0x140004d46
xor al, al
jmp 0x140004d93
mov qword [rsp + 0x270], rsi
lea rsi, [rsp + 0x30]
nop dword [rax]
nop word [rax + rax]
mov r9d, 2
mov rdx, rsi
mov rcx, rdi
lea r8d, [r9 - 1]
call qword [sym.imp.WS2_32.dll_recv]
mov ebx, eax
test eax, eax
jns 0x140004d86
call fcn.140042150
cmp dword [rax], 4
je 0x140004d60
mov rsi, qword [rsp + 0x270]
test ebx, ebx
setg al
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.1400336c0
mov rbx, qword [rsp + 0x278]
add rsp, 0x260
pop rdi
ret
Function at 0x1400053d0
Capabilities:
Resolve dns

Disassembly:
push rsi
push rdi
sub rsp, 0x4f8
mov rax, qword [0x140078010]
xor rax, rsp
mov qword [rsp + 0x4e0], rax
mov rsi, r8
mov dword [rsp + 0x40], 0x80
mov rdi, rdx
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
jne 0x1400054c2
movzx eax, word [rsp + 0x50]
mov qword [rsp + 0x4f0], rbx
mov ebx, dword [rsp + 0x40]
cmp ax, 2
je 0x140005433
cmp ax, 0x17
jne 0x1400054ba
movzx ecx, word [rsp + 0x52]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
xor edx, edx
lea rcx, [rsp + 0xd0]
mov dword [rsi], eax
mov r8d, 0x401
call fcn.140037a90
xor eax, eax
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], eax
lea r8, [rsp + 0xd0]
mov r9d, 0x401
mov qword [rsp + 0x20], rax
mov edx, ebx
lea rcx, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_getnameinfo]
test eax, eax
jne 0x1400054ba
lea rax, [rsp + 0xd0]
mov r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [rax + r8], 0
jne 0x1400054a0
lea rdx, [rsp + 0xd0]
mov rcx, rdi
call fcn.14001eaf0
mov rbx, qword [rsp + 0x4f0]
mov rcx, qword [rsp + 0x4e0]
xor rcx, rsp
call fcn.1400336c0
add rsp, 0x4f8
pop rdi
pop rsi
ret
mov rcx, qword [rcx + 8]
jmp 0x1400053d0

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

Disassembly:
push rbx
push rsi
push rdi
push r14
sub rsp, 0x28
mov rsi, qword [rcx + 0x50]
mov eax, 0x7fffffff
cmp r8, rax
mov rdi, r8
mov r14, rdx
mov rbx, rcx
cmova rdi, rax
mov rax, qword [rcx + 0x48]
cmp rax, rsi
jae 0x1400097a1
mov rcx, qword [rcx + 0x30]
sub rsi, rax
lea rdx, [rax + rcx]
mov rcx, r14
cmp rdi, rsi
ja 0x140009788
mov r8, rdi
call fcn.140037e50
add qword [rbx + 0x48], rdi
mov rax, rdi
add rsp, 0x28
pop r14
pop rdi
pop rsi
pop rbx
ret
mov r8, rsi
call fcn.140037e50
add qword [rbx + 0x48], rsi
mov rax, rsi
add rsp, 0x28
pop r14
pop rdi
pop rsi
pop rbx
ret
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
test al, al
jne 0x1400097bc
mov rax, 0xffffffffffffffff
add rsp, 0x28
pop r14
pop rdi
pop rsi
pop rbx
ret
xor eax, eax
mov qword [rsp + 0x68], rbp
mov rbp, qword [rbx + 8]
mov qword [rbx + 0x48], rax
mov qword [rbx + 0x50], rax
cmp rdi, 0x1000
jae 0x140009870
mov qword [rsp + 0x20], r15
mov r15, qword [rbx + 0x30]
nop word [rax + rax]
xor r9d, r9d
mov r8d, 0x1000
mov rdx, r15
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_recv]
movsxd rsi, eax
test eax, eax
jns 0x140009816
call fcn.140042150
cmp dword [rax], 4
je 0x1400097f0
mov r15, qword [rsp + 0x20]
test rsi, rsi
jle 0x140009834
mov rdx, qword [rbx + 0x30]
mov rcx, r14
cmp rsi, rdi
jg 0x140009846
mov r8, rsi
call fcn.140037e50
mov rbp, qword [rsp + 0x68]
mov rax, rsi
add rsp, 0x28
pop r14
pop rdi
pop rsi
pop rbx
ret
mov r8, rdi
call fcn.140037e50
mov rbp, qword [rsp + 0x68]
mov rax, rdi
mov qword [rbx + 0x48], rdi
mov qword [rbx + 0x50], rsi
add rsp, 0x28
pop r14
pop rdi
pop rsi
pop rbx
ret
xor r9d, r9d
mov r8d, edi
mov rdx, r14
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_recv]
movsxd rbx, eax
test eax, eax
jns 0x140009893
call fcn.140042150
cmp dword [rax], 4
je 0x140009870
mov rbp, qword [rsp + 0x68]
mov rax, rbx
add rsp, 0x28
pop r14
pop rdi
pop rsi
pop rbx
ret
Function at 0x1400098b0
Capabilities:
Send data
Send data on socket

Disassembly:
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x20
mov rax, qword [rcx]
mov rsi, r8
mov rbp, rdx
mov rdi, rcx
call qword [rax + reloc.WS2_32.dll_recv]
test al, al
jne 0x1400098e9
mov rax, 0xffffffffffffffff
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
mov rdi, qword [rdi + 8]
mov qword [rsp + 0x38], rbx
xor r9d, r9d
mov r8d, esi
mov rdx, rbp
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_send]
movsxd rbx, eax
test eax, eax
jns 0x140009915
call fcn.140042150
cmp dword [rax], 4
je 0x1400098f2
mov rbp, qword [rsp + 0x40]
mov rax, rbx
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret

Function at 0x140009930
Capabilities:
Resolve dns

Disassembly:
push rsi
push rdi
sub rsp, 0x4f8
mov rax, qword [0x140078010]
xor rax, rsp
mov qword [rsp + 0x4e0], rax
mov rsi, r8
mov dword [rsp + 0x40], 0x80
mov rdi, rdx
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
jne 0x1400054c2
movzx eax, word [rsp + 0x50]
mov qword [rsp + 0x4f0], rbx
mov ebx, dword [rsp + 0x40]
cmp ax, 2
je 0x140005433
cmp ax, 0x17
jne 0x1400054ba
movzx ecx, word [rsp + 0x52]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
xor edx, edx
lea rcx, [rsp + 0xd0]
mov dword [rsi], eax
mov r8d, 0x401
call fcn.140037a90
xor eax, eax
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], eax
lea r8, [rsp + 0xd0]
mov r9d, 0x401
mov qword [rsp + 0x20], rax
mov edx, ebx
lea rcx, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_getnameinfo]
test eax, eax
jne 0x1400054ba
lea rax, [rsp + 0xd0]
mov r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [rax + r8], 0
jne 0x1400054a0
lea rdx, [rsp + 0xd0]
mov rcx, rdi
call fcn.14001eaf0
mov rbx, qword [rsp + 0x4f0]
mov rcx, qword [rsp + 0x4e0]
xor rcx, rsp
call fcn.1400336c0
add rsp, 0x4f8
pop rdi
pop rsi
ret
mov rcx, qword [rcx + 8]
jmp 0x1400053d0