joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400a8a40
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1050
call fcn.140053900
sub rsp, rax
mov rax, qword [0x1400ea0c0]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.1400a6a5c
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x1400a8a8f
mov rax, rbp
jmp 0x1400a8b97
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x140000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0xee100]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.1400aa788
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0xee100]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x1400a8b93
mov rcx, qword [rcx + r12*8 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400a8b93
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.1400aa788
test rax, rax
js 0x1400a8b93
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x1400a8b93
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x1400a8b85
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x1400a8b85
cmp byte [rcx], 0xd
jne 0x1400a8b6b
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x1400a8b7a
cmp byte [rcx + 1], 0xa
jne 0x1400a8b7a
inc rcx
jmp 0x1400a8b7a
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0xea520]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x1400a8b4d
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x1400a8b97
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.1400535e0
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1050
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret

Function at 0x1400a9250
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x1400a9266
mov al, 1
jmp 0x1400a92c6
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1400a9277
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x1400a92c4
mov ecx, dword [rcx + 0x18]
nop
call fcn.1400b2e64
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400a92c4
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1400a92c4
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1400a92c4
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x1400a92c6
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x1400a95e0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x1400ee100]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x1400a9637
cmp word [rdx], r13w
jne 0x1400a9637
or byte [rax + rdi*8 + 0x38], cl
jmp 0x1400a963c
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x1400a9761
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x1400a9782
lea r9, [rdx + 2]
cmp cx, r11w
je 0x1400a9675
mov rdx, r9
mov word [rbx], cx
jmp 0x1400a969c
cmp r9, r8
jae 0x1400a96ac
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x1400a9656
jmp 0x1400a9761
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400a9756
cmp dword [rsp + 0x80], esi
je 0x1400a9756
lea r8, [0x1400ee100]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x1400a972e
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x1400a96fe
mov word [rbx], r13w
jmp 0x1400a975e
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x1400a970b
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x1400a975e
cmp word [rsp + 0x70], r13w
jne 0x1400a973b
cmp rbx, r14
je 0x1400a96f8
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.1400aa790
cmp word [rsp + 0x70], r13w
je 0x1400a9761
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x1400ee100]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x1400a975b
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x1400a9761
Function at 0x1400b1c7c
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x1400b1cac
xor eax, eax
jmp 0x1400b1d6f
mov rbp, rbx
cmp word [rax], si
je 0x1400b1cd1
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x1400b1cb8
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x1400b1cb4
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.1400ad900
movsxd r14, eax
test eax, eax
jne 0x1400b1d0f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1400b1ca5
mov rcx, r14
call fcn.1400a4eb0
mov rdi, rax
test rax, rax
jne 0x1400b1d28
xor ecx, ecx
call fcn.1400a0b00
jmp 0x1400b1d04
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.1400ad900
test eax, eax
jne 0x1400b1d59
mov rcx, rdi
call fcn.1400a0b00
jmp 0x1400b1d63
xor ecx, ecx
call fcn.1400a0b00
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret

Function at 0x1400b1d8c
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x1400b1e13
mov rsi, rbx
cmp word [rax], bp
je 0x1400b1dd2
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x1400b1dbc
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x1400b1db8
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.1400a4eb0
mov rdi, rax
test rax, rax
je 0x1400b1e00
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.1400c2b00
mov rbp, rdi
xor ecx, ecx
call fcn.1400a0b00
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x1400b591c
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.1400a0758
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x1400b59bd
cmp ebx, dword [rsp + 0x30]
je 0x1400b59b6
test esi, esi
je 0x1400b59b6
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x1400b5991
sub r8w, 0x61
cmp r8w, 0x19
ja 0x1400b599e
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x1400b597b
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x1400b59a2
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x1400b59bf
mov eax, 1
jmp 0x1400b59bf
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x1400bfd5c
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.14006d93c
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x1400bfde6
cmp byte [rbp - 0x21], r15b
je 0x1400bfde1
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x1400bfe1c
call fcn.1400a3604
test eax, eax
jne 0x1400bfe08
cmp byte [rbp - 0x21], r15b
je 0x1400bfe00
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x1400bfe1c
cmp byte [rbp - 0x21], r15b
je 0x1400bfe19
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.1400953e8
test eax, eax
jne 0x1400bfebc
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.14006d93c
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1400bfe5b
cmp byte [rbp - 0x21], r15b
je 0x1400bfe90
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1400bfe90
call fcn.1400a3604
test eax, eax
jne 0x1400bfe7c
cmp byte [rbp - 0x21], r15b
je 0x1400bfe75
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1400bfe90
cmp byte [rbp - 0x21], r15b
je 0x1400bfe8d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.1400953e8
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x1400bfebc
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x1400bfebf
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x1400bfecd
mov rcx, rdi
call fcn.1400a0b00
cmp byte [rbp + 0x3f], r15b
je 0x1400bfedc
mov rcx, qword [rbp + 0x27]
call fcn.1400a0b00
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret

Function at 0x1400c25f0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400c2618
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1400c2618
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x180003200
Capabilities:
Initialize winsock library

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x1d0
mov rax, qword [0x180033250]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
xor edi, edi
lea rax, [0x18002b1a0]
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, [0x18002b050]
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.1800135e0
mov rbx, qword [rsp + 0x1e8]
add rsp, 0x1d0
pop rdi
ret

Function at 0x180003a30
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 0x180003ac1
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 0x180003aa4
inc ebx
cmp ebx, 0xf
jl 0x180003a80
cmp ebx, 0xf
je 0x180003b22
sub ebp, 0x40000
add r12d, eax
add rsi, 0x40000
cmp ebp, 0x40000
jge 0x180003a70
test ebp, ebp
jle 0x180003af9
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 0x180003af1
inc edi
cmp edi, 0xf
jl 0x180003ad0
cmp edi, 0xf
je 0x180003b22
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 0x180003b03
Function at 0x180003f10
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 0x180003f3f
mov dword [rcx + 0x23c], 0x598
jmp 0x180003f5e
cmp eax, 0x598
jbe 0x180003f58
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
xor r8d, r8d
mov dword [rcx + 0x8c], esi
xor ecx, ecx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateWaitableTimerW]
lea rcx, [rdi + 0xb8]
mov dword [rdi + 0xd8], 0x598
mov qword [rdi + 0x258], rax
mov eax, dword [rdi + 0x70]
mov dword [rdi + 0xdc], eax
mov eax, dword [rdi + 0x74]
mov dword [rdi + 0xe0], eax
call fcn.180001370
mov dword [rdi + 0x48], 1
mov qword [rdi + 0x4c], 5
mov dword [rdi + 0x54], 1
mov eax, 1
lock xadd qword [0x18003d550], rax
inc rax
mov qword [rdi + 0x68], rax
jne 0x180003fe9
mov eax, 1
lock xadd qword [0x18003d550], 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.1800041c0
test eax, eax
je 0x18000409e
lea rax, [rdi + 0x80]
lea r8, [0x1800043d0]
mov r9, rdi
mov qword [rsp + 0x28], rax
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], esi
call fcn.180014010
mov qword [rdi + 0x78], rax
test rax, rax
je 0x18000408d
mov rcx, qword [rdi + 0x40]
mov esi, 1
call qword [sym.imp.KERNEL32.dll_ResetEvent]
jmp 0x1800040e0
mov dword [rdi + 0x84], 8
mov ecx, 0x65f
jmp 0x1800040b0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rdi + 0x84], 0xb
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.180004d20
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 0x1800041c0
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 [0x180033250]
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 0x180004212
xor eax, eax
jmp 0x1800043a5
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.1800135b8
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.1800135c0
mov rdi, qword [rsp + 0x70]
test rbx, rbx
jne 0x180004333
xor eax, eax
jmp 0x1800043a0
movzx ecx, r12w
mov word [rsp + 0x58], r14w
call qword [sym.imp.WS2_32.dll_htons]
mov rdx, qword [rbp + 0x60]
mov r8d, 0x30
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 0x18000439e
mov rcx, qword [rbp + 0x58]
lea rdx, [rsp + 0x58]
mov r8d, 0x10
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x180004399
cmp eax, 0xffffffff
jne 0x18000439e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x18000439e
mov esi, 1
mov eax, esi
mov rbx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.1800135e0
add rsp, 0x80
pop r14
pop r13
pop r12
pop rsi
pop rbp
ret
Function at 0x1800047f0
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 0x180004820
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 0x18000485f
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.180005d30
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 0x1800048ba
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
cmove eax, edi
mov edi, eax
mov rcx, qword [rbx + 0x68]
call fcn.1800031e0
test edi, edi
mov rdi, qword [rsp + 0x30]
je 0x1800048d7
mov ecx, 0x80004005
call fcn.180001220
int3
mov eax, 1
add rsp, 0x20
pop rbx
ret

Function at 0x1800048f0
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, [0x18002b0b0]
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 0x1800049a9
cmp eax, 0x10
jne 0x18000495c
mov rax, qword [rbx + 0xa0]
mov rdx, qword [rax]
cmp rdx, qword [rbp]
jne 0x180004953
mov rdx, qword [rax + 8]
cmp rdx, qword [rbp + 8]
jne 0x180004953
xor eax, eax
jmp 0x180004958
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x1800049db
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 0x180004994
mov r9, qword [rbx + 0x250]
mov r8d, edi
mov dword [rsp + 0x20], r11d
call fcn.180006380
jmp 0x18000499e
cmp edi, 0xc
jne 0x180004a03
call fcn.1800061f0
cmp eax, 2
jne 0x180004910
jmp 0x180004a0e
cmp eax, 0xffffffff
jne 0x180004910
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x180004a51
cmp eax, 0x2744
je 0x180004910
cmp eax, 0x2746
je 0x180004910
jmp 0x180004a27
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, 0xd
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, qword [rbx + 0x68]
call fcn.1800031e0
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
Function at 0x180004d20
Capabilities:
Send data
Send data on socket

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rcx, rbx
mov edi, eax
call fcn.180004100
test eax, eax
jne 0x180004d4c
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov edx, edi
mov rcx, rbx
call fcn.180004f40
mov eax, dword [rbx + 0x88]
xor edi, edi
test eax, eax
je 0x180004d85
cmp dword [rbx + 0x54], edi
je 0x180004d7f
mov rcx, qword [rbx + 0x58]
lea r8d, [rdi + 0x10]
lea rdx, [0x18002b0b0]
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_send]
mov dword [rbx + 0x88], edi
cmp dword [rbx + 0x48], edi
je 0x180004da2
mov rcx, qword [rbx + 0x68]
call fcn.1800031e0
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, edi
xchg dword [rbx + 0x20], eax
mov rcx, qword [rbx + 0x60]
test rcx, rcx
je 0x180004db5
call qword [sym.imp.WS2_32.dll_WSACloseEvent]
mov qword [rbx + 0x60], rdi
mov rcx, qword [rbx + 0x58]
cmp rcx, 0xffffffffffffffff
je 0x180004ddc
mov edx, 1
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rbx + 0x58]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rbx + 0x58], 0xffffffffffffffff
mov rcx, rbx
call fcn.180004e00
mov rbx, qword [rsp + 0x30]
mov eax, 1
add rsp, 0x20
pop rdi
ret