joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14002f430
Capabilities:
Accept command line arguments
Check if file exists
Copy file
Create process on windows
Delete file
Get file attributes
Set file attributes
Terminate process

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x200
mov rax, qword [0x140063848]
xor rax, rsp
mov qword [rsp + 0x1f0], rax
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_GetCommandLineA]
lea rdx, str._UPDATE:
mov rcx, rax
call fcn.1400160e0
test rax, rax
je 0x14002f5bf
or rcx, 0xffffffffffffffff
lea rsi, [rax + 9]
xor eax, eax
mov rdi, rsi
repne scasb al, byte [rdi]
not rcx
dec rcx
mov rdi, rcx
je 0x14002f5bf
cmp byte [rcx + rsi - 1], 1
jne 0x14002f5bf
cmp rcx, 0x104
ja 0x14002f5bf
lea r8d, [rax + 0x60]
lea rcx, [rsp + 0x78]
xor edx, edx
mov dword [rsp + 0x70], 0x68
call fcn.14003e820
lea rcx, [rsp + 0xe0]
mov r8d, 0x104
mov rdx, rsi
call fcn.140016120
lea rcx, [rsp + 0xe0]
mov edx, 0x80
mov byte [rsp + rdi + 0xdf], 0
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea rcx, [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x14002f540
nop word [rax + rax]
lea rcx, [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x14002f52d
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x14002f510
lea rdx, [rsp + 0xe0]
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CopyFileA]
xor edi, edi
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x48], rdx
lea rax, [rsp + 0x70]
lea rcx, [rsp + 0xe0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x14002f5b6
mov rcx, qword [rsp + 0x58]
mov qword [rsp + 0x58], rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x50]
mov qword [rsp + 0x50], rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
mov edx, 0x80
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x14002f606
nop dword [rax + rax]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x14002f5f8
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x14002f5e0
mov rcx, qword [rsp + 0x1f0]
xor rcx, rsp
call fcn.14003e7f0
lea r11, [rsp + 0x200]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x14003af40
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x20], r9
push rdi
push r13
push r14
push r15
sub rsp, 8
mov r10d, dword [r9]
xor r14d, r14d
mov edi, r8d
and r10d, 7
mov r13, rcx
mov r11d, r14d
cmp rdx, 5
jae 0x14003af77
xor eax, eax
add rsp, 8
pop r15
pop r14
pop r13
pop rdi
ret
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x40], rsi
mov qword [rsp], r12
mov r12d, dword [rsp + 0x50]
add edi, 5
or rsi, 0xffffffffffffffff
lea rbx, [rcx + rdx - 4]
lea r15, [0x140000000]
lea r8, [r11 + r13]
cmp r8, rbx
jae 0x14003afc2
nop dword [rax + rax]
movzx eax, byte [r8]
and al, 0xfe
cmp al, 0xe8
je 0x14003afc2
inc r8
cmp r8, rbx
jb 0x14003afb0
mov r11, r8
sub r11, r13
mov rax, r11
sub rax, rsi
cmp r8, rbx
jae 0x14003b0ef
cmp rax, 3
jbe 0x14003b000
mov r10d, r14d
movzx eax, byte [r8 + 4]
mov rsi, r11
test al, al
je 0x14003b047
cmp al, 0xff
je 0x14003b047
and r10d, 3
add r10d, r10d
or r10d, 1
inc r11
jmp 0x14003afa2
lea ecx, [rax - 1]
shl r10d, cl
and r10d, 7
je 0x14003afe0
movzx eax, byte [r10 + r15 + 0x568c8]
mov rcx, r8
sub rcx, rax
movzx eax, byte [rcx + 4]
cmp byte [r10 + r15 + 0x568c0], r14b
je 0x14003b031
test al, al
je 0x14003b031
cmp al, 0xff
jne 0x14003afe0
and r10d, 3
mov rsi, r11
add r10d, r10d
or r10d, 1
inc r11
jmp 0x14003afa2
movzx r9d, al
movzx eax, byte [r8 + 3]
movsxd rbp, r10d
shl r9d, 8
or r9d, eax
movzx eax, byte [r8 + 2]
shl r9d, 8
or r9d, eax
movzx eax, byte [r8 + 1]
shl r9d, 8
or r9d, eax
test r12d, r12d
je 0x14003b07f
lea edx, [r11 + r9]
add edx, edi
jmp 0x14003b087
mov edx, r9d
sub edx, r11d
sub edx, edi
test r10d, r10d
je 0x14003b0c1
movzx r9d, byte [r15 + rbp + 0x568c8]
mov eax, edx
shl r9d, 3
neg r9d
lea ecx, [r9 + 0x18]
shr eax, cl
test al, al
je 0x14003b0ac
cmp al, 0xff
jne 0x14003b0c1
lea ecx, [r9 + 0x20]
mov r9d, 1
shl r9d, cl
dec r9d
xor r9d, edx
jmp 0x14003b072
mov eax, edx
mov byte [r8 + 1], dl
shr eax, 0x18
and al, 1
dec al
not al
mov byte [r8 + 4], al
mov eax, edx
shr eax, 0x10
mov byte [r8 + 3], al
mov eax, edx
shr eax, 8
add r11, 5
mov byte [r8 + 2], al
jmp 0x14003afa2
mov r12, qword [rsp]
mov rsi, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x30]
cmp rax, 3
ja 0x14003b115
lea ecx, [rax - 1]
shl r10d, cl
and r10d, 7
mov r14d, r10d
mov r15, qword [rsp + 0x48]
mov rax, r11
mov dword [r15], r14d
add rsp, 8
pop r15
pop r14
pop r13
pop rdi
ret
Function at 0x14003d0a0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push rbx
sub rsp, 0x20
lea r10, [0x140066e80]
xor edx, edx
mov r8, r10
mov ecx, edx
mov eax, edx
inc edx
shr eax, 1
and ecx, 1
add r8, 4
dec ecx
not ecx
and ecx, 0xedb88320
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
dec eax
not eax
and eax, 0xedb88320
xor eax, ecx
mov ecx, eax
shr eax, 1
and ecx, 1
dec ecx
not ecx
and ecx, 0xedb88320
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
dec eax
not eax
and eax, 0xedb88320
xor eax, ecx
mov ecx, eax
shr eax, 1
and ecx, 1
dec ecx
not ecx
and ecx, 0xedb88320
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
dec eax
not eax
and eax, 0xedb88320
xor eax, ecx
mov ecx, eax
shr eax, 1
and ecx, 1
dec ecx
not ecx
and ecx, 0xedb88320
xor ecx, eax
mov eax, ecx
shr ecx, 1
and eax, 1
dec eax
not eax
and eax, 0xedb88320
xor eax, ecx
mov dword [r8 - 4], eax
cmp edx, 0x100
jb 0x14003d0b2
mov eax, 0x800
movsxd rcx, edx
cmp edx, eax
jae 0x14003d1a0
sub eax, edx
lea r8, [r10 + rcx*4]
mov r9d, eax
nop word [rax + rax]
mov edx, dword [r8 - 0x400]
add r8, 4
movzx ecx, dl
shr edx, 8
mov eax, dword [r10 + rcx*4]
xor eax, edx
dec r9
mov dword [r8 - 4], eax
jne 0x14003d180
lea rbx, [0x1400376e0]
call fcn.14003b130
lea rcx, [0x1400377d0]
test eax, eax
cmove rbx, rcx
mov qword [0x140065da8], rbx
add rsp, 0x20
pop rbx
ret

Function at 0x140042113
Capabilities:
Terminate process

Disassembly:
cmp rcx, qword [0x140063848]
jne 0x14003e80a
rol rcx, 0x10
test cx, 0xffff
jne 0x14003e806
repz ret
ror rcx, 0x10
jmp 0x14004206c
mov qword [rsp + 8], rcx
sub rsp, 0x88
lea rcx, [0x140065ea0]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov rax, qword [0x140065f98]
mov qword [rsp + 0x58], rax
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
call sub.KERNEL32.dll_RtlLookupFunctionEntry
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x1400420f1
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [0x140065ea0]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
xor ecx, ecx
call sub.KERNEL32.dll_RtlVirtualUnwind
jmp 0x140042113
mov rax, qword [rsp + 0x88]
mov qword [0x140065f98], rax
lea rax, [rsp + 0x88]
add rax, 8
mov qword [0x140065f38], rax
mov rax, qword [0x140065f98]
mov qword [0x140065e10], rax
mov rax, qword [rsp + 0x90]
mov qword [0x140065f20], rax
mov dword [0x140065e00], 0xc0000409
mov dword [0x140065e04], 1
mov rax, qword [0x140063848]
mov qword [rsp + 0x68], rax
mov rax, qword [0x140063850]
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x140065e98], eax
mov ecx, 1
call fcn.140048efc
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [0x140056f50]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x140065e98], 0
jne 0x14004219a
mov ecx, 1
call fcn.140048efc
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x88
ret
Function at 0x140042768
Capabilities:
Terminate process

Disassembly:
xor r8d, r8d
xor edx, edx
jmp fcn.1400425d8

Function at 0x1400495fc
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x50
mov rax, qword [0x140063848]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov ebp, r8d
mov r14, rdx
mov r13, rcx
call fcn.140042afc
xor ebx, ebx
cmp qword [0x140066e38], rbx
mov rdi, rax
jne 0x14004970f
lea rcx, str.USER32.DLL
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
test rax, rax
je 0x1400497e6
lea rdx, str.MessageBoxW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1400497e6
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetActiveWindow
mov rcx, rsi
mov qword [0x140066e38], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetLastActivePopup
mov rcx, rsi
mov qword [0x140066e40], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, str.GetUserObjectInformationW
mov rcx, rsi
mov qword [0x140066e48], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
mov r11, rax
mov qword [0x140066e58], rax
test rax, rax
je 0x140049706
lea rdx, str.GetProcessWindowStation
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
mov qword [0x140066e50], rax
jmp 0x140049716
mov rax, qword [0x140066e50]
jmp 0x14004971d
mov rax, qword [0x140066e50]
mov r11, qword [0x140066e58]
cmp rax, rdi
je 0x140049784
cmp r11, rdi
je 0x140049784
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DecodePointer]
mov rcx, qword [0x140066e58]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_DecodePointer]
mov r12, rax
test rsi, rsi
je 0x140049784
test rax, rax
je 0x140049784
call rsi
test rax, rax
je 0x14004977e
lea rcx, [rsp + 0x30]
mov r9d, InitCommonControls
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rcx
lea edx, [r9 - 0xb]
mov rcx, rax
call r12
test eax, eax
je 0x14004977e
test byte [rsp + 0x40], 1
jne 0x140049784
bts ebp, 0x15
jmp 0x1400497c4
mov rcx, qword [0x140066e40]
cmp rcx, rdi
je 0x1400497c4
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x1400497c4
call rax
mov rbx, rax
test rax, rax
je 0x1400497c4
mov rcx, qword [0x140066e48]
cmp rcx, rdi
je 0x1400497c4
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x1400497c4
mov rcx, rbx
call rax
mov rbx, rax
mov rcx, qword [0x140066e38]
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x1400497e6
mov r9d, ebp
mov r8, r14
mov rdx, r13
mov rcx, rbx
call rax
jmp 0x1400497e8
xor eax, eax
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.14003e7f0
add rsp, 0x50
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140001080
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
push rdi
push r15
sub rsp, 0x28
mov qword [rsp + 0x60], r13
xor r15d, r15d
mov qword [rsp + 0x20], r14
mov r13d, r9d
mov edi, r8d
mov r14, rdx
mov rbx, rcx
cmp qword [rcx + 8], r15
jne 0x1400010ae
mov eax, r15d
jmp 0x1400010b4
mov eax, dword [rcx + 0x10]
sub eax, dword [rcx + 8]
lea ecx, [rax + rdi]
mov qword [rsp + 0x50], rbp
cmp ecx, dword [rbx + 0x18]
jb 0x14000114d
pxor xmm0, xmm0
mov eax, ecx
mov qword [rsp + 0x58], r12
cvtsi2sd xmm0, rax
mulsd xmm0, qword [0x14001ac50]
call fcn.140011894
xor ecx, ecx
mov r8d, 0x1000
lea r9d, [rcx + 4]
cvttsd2si rbp, xmm0
shl ebp, 0xa
mov edx, ebp
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdx, qword [rbx + 8]
mov rsi, rax
test rdx, rdx
jne 0x14000110f
mov ecx, r15d
jmp 0x140001114
mov ecx, dword [rbx + 0x10]
sub ecx, edx
mov r12d, ecx
mov r8d, ecx
mov rcx, rax
call fcn.140008b10
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x140001139
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
lea rax, [r12 + rsi]
mov r12, qword [rsp + 0x58]
mov qword [rbx + 8], rsi
mov qword [rbx + 0x10], rax
mov dword [rbx + 0x18], ebp
mov rcx, qword [rbx + 0x10]
mov r8, rdi
mov rdx, r14
call fcn.140008b10
mov r14, qword [rsp + 0x20]
test r13d, r13d
mov r13, qword [rsp + 0x60]
je 0x1400011d0
mov r10d, r15d
mov r9, r15
mov r11, r15
test edi, edi
jle 0x1400011d0
mov rbp, qword [rsp + 0x70]
nop dword [rax]
movzx ecx, byte [r9 + rbp]
mov r8, qword [rbx + 0x10]
inc r9
mov eax, 0x8fb823ef
imul ecx
add edx, ecx
sar edx, 8
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0xcccccccd
imul edx, edx, 0x1c8
sub ecx, edx
mul r10d
add cl, 0x36
xor byte [r11 + r8], cl
shr edx, 3
lea ecx, [rdx + rdx*4]
add ecx, ecx
cmp r10d, ecx
cmove r9, r15
inc r10d
inc r11
cmp r10d, edi
jl 0x140001180
add qword [rbx + 0x10], rdi
mov rbp, qword [rsp + 0x50]
mov eax, edi
add rsp, 0x28
pop r15
pop rdi
pop rsi
pop rbx
ret
Function at 0x140003240
Capabilities:
Initialize winsock library

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x1d0
mov rax, qword [0x14001e1d8]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
xor edi, edi
lea rax, vtable.CTcpSocket.0
mov rbx, rcx
mov qword [rcx + 0x10], rdi
mov dword [rcx + 0x18], edi
mov qword [rcx], rax
mov dword [rcx + 0x58], edi
mov qword [rcx + 0x48], rdi
mov qword [rcx + 0x50], rdi
lea rax, vtable.CBuffer.0
lea rdx, [rsp + 0x20]
mov qword [rcx + 0x40], rax
mov qword [rcx + 0x60], rax
mov dword [rcx + 0x78], edi
mov qword [rcx + 0x68], rdi
mov qword [rcx + 0x70], rdi
mov qword [rcx + 0x80], rax
mov dword [rcx + 0x98], edi
mov qword [rcx + 0x88], rdi
mov qword [rcx + 0x90], rdi
mov ecx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
lea edx, [rdi + 1]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov ecx, edi
mov qword [rbx + 8], rax
xchg dword [rbx + 0x20], ecx
mov qword [rbx + 0xb0], 0xffffffffffffffff
mov qword [rbx + 0xa0], rdi
mov qword [rbx + 0xa8], rdi
mov dword [rbx + 0x1c], edi
mov rax, rbx
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.140008ae0
mov rbx, qword [rsp + 0x1e8]
add rsp, 0x1d0
pop rdi
ret

Function at 0x140003320
Capabilities:
Set socket configuration

Disassembly:
push rdi
sub rsp, 0x30
cmp dword [rcx + 0x20], 0
mov rdi, rcx
je 0x14000339a
mov rcx, qword [rcx + 0xb0]
lea r9, [rsp + 0x40]
mov edx, 0xffff
mov r8d, 0x80
mov qword [rsp + 0x48], rbx
mov dword [rsp + 0x40], 1
xor ebx, ebx
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rdi + 0xb0]
call qword [sym.imp.KERNEL32.dll_CancelIo]
xchg dword [rdi + 0x20], ebx
mov rcx, qword [rdi + 0xb0]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rbx, qword [rsp + 0x48]
mov qword [rdi + 0xb0], 0xffffffffffffffff
add rsp, 0x30
pop rdi
ret
Function at 0x140003b20
Capabilities:
Send data
Send data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r13
push r14
sub rsp, 0x20
xor edi, edi
mov r14d, r8d
mov rsi, rdx
mov r13, rcx
mov ebp, r8d
mov r12d, edi
cmp r8d, 0x40000
jl 0x140003bb1
nop dword [rax + rax]
mov ebx, edi
nop word [rax + rax]
mov rcx, qword [r13 + 0xb0]
xor r9d, r9d
mov r8d, 0x40000
mov rdx, rsi
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jg 0x140003b94
inc ebx
cmp ebx, 0xf
jl 0x140003b70
cmp ebx, 0xf
je 0x140003c12
sub ebp, 0x40000
add r12d, eax
add rsi, 0x40000
cmp ebp, 0x40000
jge 0x140003b60
test ebp, ebp
jle 0x140003be9
nop word [rax + rax]
mov rcx, qword [r13 + 0xb0]
xor r9d, r9d
mov r8d, ebp
mov rdx, rsi
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jg 0x140003be1
inc edi
cmp edi, 0xf
jl 0x140003bc0
cmp edi, 0xf
je 0x140003c12
add r12d, eax
or eax, 0xffffffff
cmp r12d, r14d
cmove eax, r12d
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x20
pop r14
pop r13
pop r12
ret
or eax, 0xffffffff
jmp 0x140003bf3
Function at 0x140003f10
Capabilities:
Create thread
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rdi
sub rsp, 0x30
mov eax, dword [rcx + 0x21c]
movzx ebx, r8w
mov rbp, rdx
mov rdi, rcx
test eax, eax
jne 0x140003f3f
mov dword [rcx + 0x23c], 0x598
jmp 0x140003f5e
cmp eax, 0x598
jbe 0x140003f58
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret
mov dword [rcx + 0x23c], eax
mov qword [rsp + 0x48], rsi
xor esi, esi
mov dword [rcx + 0x8c], esi
call fcn.1400040c0
mov dword [rdi + 0x48], 1
mov qword [rdi + 0x4c], 5
mov dword [rdi + 0x54], 1
mov eax, 1
lock xadd qword [0x140023500], rax
inc rax
mov qword [rdi + 0x68], rax
jne 0x140003fb2
mov eax, 1
lock xadd qword [0x140023500], rax
inc rax
mov qword [rdi + 0x68], rax
mov rcx, qword [rdi + 0x58]
lea r9, [rsp + 0x40]
mov edx, 0xffff
mov r8d, 0x1001
mov dword [rsp + 0x40], 0x40000
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rdi + 0x58]
lea r9, [rsp + 0x40]
mov edx, 0xffff
mov r8d, 0x1002
mov dword [rsp + 0x40], 0x40000
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
movzx r8d, bx
mov rdx, rbp
mov rcx, rdi
call fcn.140004240
test eax, eax
je 0x140004067
lea rax, [rdi + 0x80]
lea r8, [0x140004450]
mov r9, rdi
mov qword [rsp + 0x28], rax
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], esi
call fcn.1400094ec
mov qword [rdi + 0x78], rax
test rax, rax
je 0x140004056
mov rcx, qword [rdi + 0x40]
mov esi, 1
call qword [sym.imp.KERNEL32.dll_ResetEvent]
jmp 0x1400040a9
mov dword [rdi + 0x84], 8
mov ecx, 0x65f
jmp 0x140004079
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rdi + 0x84], select
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [rdi + 0x48], esi
mov qword [rdi + 0x4c], 5
mov dword [rdi + 0x54], 1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
mov ebx, eax
call fcn.140004da0
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov eax, esi
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
Function at 0x140004240
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Resolve dns
Set socket configuration

Disassembly:
push rbp
push rsi
push r12
push r13
push r14
sub rsp, 0x80
mov rax, qword [0x14001e1d8]
xor rax, rsp
mov qword [rsp + 0x68], rax
movzx r12d, r8w
mov r14d, 2
mov r13, rdx
mov rbp, rcx
xor esi, esi
mov edx, r14d
lea r8d, [rsi + 0x11]
mov ecx, r14d
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbp + 0x58], rax
cmp rax, 0xffffffffffffffff
jne 0x140004292
xor eax, eax
jmp 0x140004425
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], rsi
lea rcx, [rsp + 0x54]
mov qword [rsp + 0x30], rcx
lea r8, [rsp + 0x50]
mov r9d, 4
mov rcx, rax
mov edx, 0x9800000c
mov qword [rsp + 0x78], rbx
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x50], esi
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.WS2_32.dll_WSAIoctl]
mov rcx, qword [rbp + 0x58]
lea r9, [rsp + 0x50]
mov edx, 0xffff
mov r8d, 0xfffffffb
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rbp + 0x58]
lea r9, [rsp + 0x50]
mov edx, 0xffff
mov r8d, 4
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
call qword [sym.imp.WS2_32.dll_WSACreateEvent]
mov rcx, r13
mov qword [rbp + 0x60], rax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rsi
mov r8, r13
xor edx, edx
xor ecx, ecx
mov r9d, eax
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movsxd rbx, eax
lea eax, [rbx + 1]
movsxd rcx, eax
call fcn.140008abc
mov rcx, r13
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rsi
mov r8, r13
xor edx, edx
mov r9d, eax
xor ecx, ecx
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov rcx, rdi
mov byte [rbx + rdi], sil
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov rcx, rdi
mov rbx, rax
call fcn.140008ac4
mov rdi, qword [rsp + 0x70]
test rbx, rbx
jne 0x1400043b3
xor eax, eax
jmp 0x140004420
movzx ecx, r12w
mov word [rsp + 0x58], r14w
call qword [sym.imp.WS2_32.dll_htons]
mov rdx, qword [rbp + 0x60]
mov r8d, gethostbyname
mov word [rsp + 0x5a], ax
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov eax, dword [rcx]
mov rcx, qword [rbp + 0x58]
mov dword [rsp + 0x5c], eax
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x14000441e
mov rcx, qword [rbp + 0x58]
lea rdx, [rsp + 0x58]
mov r8d, reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x140004419
cmp eax, 0xffffffff
jne 0x14000441e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x14000441e
mov esi, 1
mov eax, esi
mov rbx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.140008ae0
add rsp, 0x80
pop r14
pop r13
pop r12
pop rsi
pop rbp
ret
Function at 0x140004870
Capabilities:
Send data
Send data on socket

Disassembly:
push rbx
sub rsp, 0x20
mov eax, dword [rdx + 0x14]
mov rbx, rcx
test eax, eax
je 0x1400048a0
mov dword [rcx + 0x50], eax
mov dword [rcx + 0x48], 1
mov dword [rcx + 0x4c], 2
xor eax, eax
mov dword [rcx + 0x54], 1
add rsp, 0x20
pop rbx
ret
mov rdx, qword [rcx + 0x60]
mov rcx, qword [rcx + 0x58]
mov r8d, 0x23
call qword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
jne 0x1400048df
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbx + 0x48], 1
mov dword [rbx + 0x4c], 2
mov dword [rbx + 0x50], eax
xor eax, eax
mov dword [rbx + 0x54], 1
add rsp, 0x20
pop rbx
ret
mov dword [rbx + 0x88], 1
lea r9, [rbx + 0x220]
lea rcx, [rbx + 0x268]
mov r8, rbx
mov rdx, rbx
mov qword [rsp + 0x30], rdi
mov dword [rbx + 0x8c], 1
call fcn.140005d90
mov rcx, qword [rbx + 0x58]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor edi, edi
call qword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x14000493a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
cmove eax, edi
mov edi, eax
mov rcx, qword [rbx + 0x68]
call fcn.140003220
test edi, edi
mov rdi, qword [rsp + 0x30]
je 0x140004957
mov ecx, 0x80004005
call fcn.1400012d0
int3
mov eax, 1
add rsp, 0x20
pop rbx
ret

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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rdi
sub rsp, 0x30
mov rbx, rcx
lea rbp, [0x14001a8b0]
nop dword [rax]
mov rdx, qword [rbx + 0xa0]
mov rcx, qword [rbx + 0x58]
xor r9d, r9d
mov r8d, 0x598
call qword [sym.imp.WS2_32.dll_recv]
mov edi, eax
test eax, eax
jle 0x140004a29
cmp eax, 0x10
jne 0x1400049dc
mov rax, qword [rbx + 0xa0]
mov rdx, qword [rax]
cmp rdx, qword [rbp]
jne 0x1400049d3
mov rdx, qword [rax + 8]
cmp rdx, qword [rbp + 8]
jne 0x1400049d3
xor eax, eax
jmp 0x1400049d8
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x140004a5b
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r11d, dword [rbx + 0x244]
mov rdx, qword [rbx + 0xa0]
lea rcx, [rbx + 0x268]
cmp edi, 0x18
jl 0x140004a14
mov r9, qword [rbx + 0x250]
mov r8d, edi
mov dword [rsp + 0x20], r11d
call fcn.1400063e0
jmp 0x140004a1e
cmp edi, 0xc
jne 0x140004a83
call fcn.140006250
cmp eax, 2
jne 0x140004990
jmp 0x140004a8e
cmp eax, 0xffffffff
jne 0x140004990
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x140004ad1
cmp eax, 0x2744
je 0x140004990
cmp eax, 0x2746
je 0x140004990
jmp 0x140004aa7
mov dword [rbx + 0x48], 1
mov qword [rbx + 0x4c], 5
mov dword [rbx + 0x54], 0
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
mov ecx, recv
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, qword [rbx + 0x68]
call fcn.140003220
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x4c7
test eax, eax
cmove eax, ecx
mov dword [rbx + 0x48], 1
mov dword [rbx + 0x4c], 4
mov dword [rbx + 0x50], eax
mov dword [rbx + 0x54], 1
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov eax, 1
add rsp, 0x30
pop rdi
ret