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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
sub rsp, 0x60
mov rsi, qword [rcx + 8]
mov ebx, r9d
mov r12d, r8d
mov r13, rdx
mov rdi, rcx
test rsi, rsi
je 0x180058e3b
cmp qword [rcx + 0x10], 0
je 0x180058e3b
mov edx, ebx
call fcn.180058c00
test eax, eax
je 0x180058e43
mov rcx, qword [rdi + 0x10]
xor eax, eax
mov qword [rsp + 0x88], rbp
xor ebp, ebp
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov r11, qword [rdi + 0x10]
lea rax, [rsp + 0x38]
lea r9, [rsp + 0x80]
mov r8d, r12d
mov rdx, r13
mov rcx, rsi
mov qword [rsp + 0x50], r11
mov dword [rsp + 0x80], ebp
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r12d, eax
test eax, eax
je 0x180058d94
cmp dword [rsp + 0x80], ebp
je 0x180058d94
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [rsp + 0x80]
jmp 0x180058dbb
call qword [sym.imp.KERNEL32.dll_GetLastError]
test r12d, r12d
jne 0x180058dd9
test eax, eax
je 0x180058dd9
cmp eax, 0x3e5
je 0x180058dd9
cmp eax, 0x217
je 0x180058dd9
mov eax, 0xf0000001
mov dword [rdi + 0x24], eax
xor eax, eax
mov rbp, qword [rsp + 0x88]
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r13
pop r12
pop rdi
ret
mov rcx, qword [rsp + 0x50]
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rsi
mov ebx, eax
test eax, eax
je 0x180058e0a
call qword [sym.imp.KERNEL32.dll_CancelIo]
mov eax, 0xf0000001
mov ecx, 0xf0000003
cmp ebx, 0x102
cmove eax, ecx
jmp 0x180058db6
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x38]
xor r9d, r9d
mov dword [rsp + 0x30], ebp
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov rcx, qword [rdi + 0x10]
mov ebx, eax
mov dword [rdi + 0x24], ebp
call qword [sym.imp.KERNEL32.dll_ResetEvent]
test ebx, ebx
cmovne ebp, dword [rsp + 0x30]
mov eax, ebp
jmp 0x180058dbb
mov eax, 0xf0000001
mov dword [rcx + 0x24], eax
xor eax, eax
jmp 0x180058dc3
Function at 0x180058e50
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
sub rsp, 0x60
mov rsi, qword [rcx + 8]
mov ebx, r9d
mov r12d, r8d
mov r13, rdx
mov rdi, rcx
test rsi, rsi
je 0x180058fbb
cmp qword [rcx + 0x18], 0
je 0x180058fbb
mov edx, ebx
call fcn.180058c00
test eax, eax
je 0x180058fc3
mov rcx, qword [rdi + 0x18]
xor eax, eax
mov qword [rsp + 0x88], rbp
xor ebp, ebp
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov r11, qword [rdi + 0x18]
lea rax, [rsp + 0x38]
lea r9, [rsp + 0x80]
mov r8d, r12d
mov rdx, r13
mov rcx, rsi
mov qword [rsp + 0x50], r11
mov dword [rsp + 0x80], ebp
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r12d, eax
test eax, eax
je 0x180058f14
cmp dword [rsp + 0x80], ebp
jbe 0x180058f14
mov rcx, qword [rdi + 0x18]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [rsp + 0x80]
jmp 0x180058f3b
call qword [sym.imp.KERNEL32.dll_GetLastError]
test r12d, r12d
jne 0x180058f59
test eax, eax
je 0x180058f59
cmp eax, 0x3e5
je 0x180058f59
cmp eax, 0x217
je 0x180058f59
mov eax, 0xf0000001
mov dword [rdi + 0x24], eax
xor eax, eax
mov rbp, qword [rsp + 0x88]
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r13
pop r12
pop rdi
ret
mov rcx, qword [rsp + 0x50]
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rsi
mov ebx, eax
test eax, eax
je 0x180058f8a
call qword [sym.imp.KERNEL32.dll_CancelIo]
mov eax, 0xf0000001
mov ecx, 0xf0000003
cmp ebx, 0x102
cmove eax, ecx
jmp 0x180058f36
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x38]
xor r9d, r9d
mov dword [rsp + 0x30], ebp
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov rcx, qword [rdi + 0x18]
mov ebx, eax
mov dword [rdi + 0x24], ebp
call qword [sym.imp.KERNEL32.dll_ResetEvent]
test ebx, ebx
cmovne ebp, dword [rsp + 0x30]
mov eax, ebp
jmp 0x180058f3b
mov eax, 0xf0000001
mov dword [rcx + 0x24], eax
xor eax, eax
jmp 0x180058f43

Function at 0x180059290
Capabilities:
Write file on windows

Disassembly:
cmp dword [rcx + 0x1c], 6
mov rax, rcx
je 0x18005929d
or eax, 0xffffffff
ret
test r8d, r8d
jg 0x1800592a5
xor eax, eax
ret
mov r9d, dword [rax + 8]
add rcx, 0x70
jmp fcn.180058e50

Function at 0x1800592c0
Capabilities:
Read file on windows

Disassembly:
cmp dword [rcx + 0x1c], 6
mov rax, rcx
je 0x1800592cd
or eax, 0xffffffff
ret
test r8d, r8d
jne 0x1800592d5
xor eax, eax
ret
mov r9d, dword [rax + 0xc]
add rcx, 0x70
jmp fcn.180058cd0
Function at 0x1800596c0
Capabilities:
Connect pipe
Create pipe

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
sub rsp, 0x280
mov rax, qword [0x18008f100]
xor rax, rsp
mov qword [rsp + 0x270], rax
mov ebp, r8d
mov rsi, rdx
mov rdi, rcx
call fcn.180058b90
call fcn.180058a40
mov rbx, rax
test rax, rax
je 0x18005985d
mov qword [rsp + 0x2b0], r12
lea rcx, [rsp + 0x42]
xor r12d, r12d
xor edx, edx
mov r8d, 0x22e
mov word [rsp + 0x40], r12w
call fcn.180015150
lea rcx, [rsp + 0x40]
sub rcx, rbx
nop dword [rax + rax]
movzx eax, word [rbx]
add rbx, 2
mov word [rcx + rbx - 2], ax
test ax, ax
jne 0x180059730
test rsi, rsi
je 0x180059759
lea rcx, [rsp + 0x40]
mov r8d, 0x104
mov rdx, rsi
call fcn.18003f2f8
call fcn.180028570
mov edx, 0x40000003
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], r12d
test ebp, ebp
jne 0x18005978f
mov dword [rsp + 0x28], 0x8000
lea r9d, [rbp + 1]
xor r8d, r8d
mov dword [rsp + 0x20], 0x8000
jmp 0x1800597ab
mov dword [rsp + 0x28], 0x1000
mov r9d, 0xff
mov r8d, 6
mov dword [rsp + 0x20], 0x1000
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov qword [rdi + 8], rax
cmp rax, 0xffffffffffffffff
jne 0x1800597c4
mov qword [rdi + 8], r12
jmp 0x180059853
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
mov dword [rdi + 0x28], ebp
call qword [sym.imp.KERNEL32.dll_CreateEventW]
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
mov qword [rdi + 0x10], rax
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rdi + 0x18], rax
cmp qword [rdi + 0x10], r12
je 0x18005984b
test rax, rax
je 0x18005984b
xor eax, eax
lea rdx, [rdi + 0x30]
mov qword [rdx], rax
mov qword [rdx + 8], rax
mov qword [rdx + 0x10], rax
mov qword [rdx + 0x18], rax
mov rax, qword [rdi + 0x10]
mov rcx, qword [rdi + 8]
mov qword [rdi + 0x48], rax
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x18005983d
cmp eax, 0x3e5
je 0x18005983d
cmp eax, 0x217
jne 0x180059853
mov dword [rdi + 0x20], 1
mov eax, 1
jmp 0x180059855
mov rcx, rdi
call fcn.180058b90
xor eax, eax
mov r12, qword [rsp + 0x2b0]
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.180013880
mov rbx, qword [rsp + 0x2b8]
add rsp, 0x280
pop rdi
pop rsi
pop rbp
ret

Function at 0x180059fa0
Capabilities:
Initialize winsock library

Disassembly:
push rbx
sub rsp, 0x1d0
mov rax, qword [0x18008f100]
xor rax, rsp
mov qword [rsp + 0x1c0], rax
mov rbx, rcx
lea rdx, [rsp + 0x20]
mov cx, 2
call qword [sym.imp.WS2_32.dll_WSAStartup]
xor ecx, ecx
test eax, eax
mov rax, rbx
sete cl
mov dword [rbx], ecx
mov rcx, qword [rsp + 0x1c0]
xor rcx, rsp
call fcn.180013880
add rsp, 0x1d0
pop rbx
ret
Function at 0x18005a060
Capabilities:
Set socket configuration

Disassembly:
push rdi
sub rsp, 0x60
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rsp + 0x78], rbx
mov rax, qword [0x18008f100]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov rdi, rcx
cmp qword [rcx + 0x10], 0xffffffffffffffff
je 0x18005a0e4
mov ecx, 0x28
call fcn.180013c3c
mov qword [rsp + 0x40], rax
test rax, rax
je 0x18005a0ae
mov rcx, rax
call fcn.18005a020
mov rbx, rax
jmp 0x18005a0b0
xor ebx, ebx
test rbx, rbx
je 0x18005a0e4
mov dword [rsp + 0x30], reloc.WS2_32.dll_recv
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x48]
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.WS2_32.dll_accept]
cmp rax, 0xffffffffffffffff
jne 0x18005a0e8
mov rax, qword [rbx]
mov edx, 1
mov rcx, rbx
call qword [rax]
xor eax, eax
jmp 0x18005a117
mov qword [rbx + 0x10], rax
mov dword [rsp + 0x34], 1
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x34]
mov edx, 6
lea r8d, [rdx - 5]
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rax, rbx
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.180013880
mov rbx, qword [rsp + 0x78]
add rsp, 0x60
pop rdi
ret

Function at 0x18005a130
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x50
mov rax, qword [0x18008f100]
xor rax, rsp
mov qword [rsp + 0x48], rax
cmp qword [rcx + 0x10], 0xffffffffffffffff
mov edi, r8d
mov rbx, rcx
jne 0x18005a15d
xor eax, eax
jmp 0x18005a212
lea eax, [r8 + 0x20000000]
cmp eax, 0xfffffff
ja 0x18005a178
mov dword [rcx + 0x1c], 1
mov dword [rcx + 0x20], r8d
xor edi, edi
mov eax, 2
movzx ecx, dx
mov word [rsp + 0x38], ax
call qword [sym.imp.WS2_32.dll_htons]
mov ecx, edi
mov word [rsp + 0x3a], ax
call qword [sym.imp.WS2_32.dll_htonl]
mov rcx, qword [rbx + 0x10]
lea rdx, [rsp + 0x38]
mov r8d, reloc.WS2_32.dll_recv
mov dword [rsp + 0x3c], eax
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x18005a156
cmp dword [rbx + 0x1c], 0
je 0x18005a20d
mov ecx, dword [rbx + 0x20]
xor eax, eax
mov byte [rsp + 0x30], 0
mov dword [rsp + 0x31], eax
mov word [rsp + 0x35], ax
mov byte [rsp + 0x37], al
call qword [sym.imp.WS2_32.dll_htonl]
xor ecx, ecx
mov dword [rsp + 0x30], eax
call qword [sym.imp.WS2_32.dll_htonl]
mov rcx, qword [rbx + 0x10]
xor edx, edx
lea r9, [rsp + 0x30]
mov dword [rsp + 0x34], eax
lea r8d, [rdx + 0xc]
mov dword [rsp + 0x20], 8
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x18005a156
mov eax, 1
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.180013880
mov rbx, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
ret
Function at 0x18005a230
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x50
cmp qword [rcx + 0x10], 0xffffffffffffffff
mov ebx, edx
mov rdi, rcx
je 0x18005a24c
mov rax, qword [rcx]
call qword [rax + 0x28]
dec ebx
je 0x18005a2be
dec ebx
jne 0x18005a2d8
mov edx, 2
xor r8d, r8d
mov ecx, edx
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rdi + 0x10], rax
cmp rax, 0xffffffffffffffff
je 0x18005a2d8
xor edx, edx
lea rcx, [rsp + 0x68]
lea r9d, [rbx + 4]
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], edx
mov dword [rsp + 0x68], edx
mov dword [rsp + 0x60], edx
mov qword [rsp + 0x20], rdx
lea r8, [rsp + 0x60]
mov rcx, rax
mov edx, 0x9800000c
call qword [sym.imp.WS2_32.dll_WSAIoctl]
lea eax, [rbx + 1]
mov rbx, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
xor r8d, r8d
lea edx, [r8 + 1]
lea ecx, [rdx + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rdi + 0x10], rax
cmp rax, 0xffffffffffffffff
jne 0x18005a2e5
xor eax, eax
mov rbx, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret
lea r9, [rsp + 0x68]
mov edx, 0xffff
mov r8d, 4
mov rcx, rax
mov dword [rsp + 0x68], 1
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rdi + 0x10]
mov edx, 6
lea r9, [rsp + 0x68]
lea r8d, [rdx - 5]
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rbx, qword [rsp + 0x70]
mov eax, 1
add rsp, 0x50
pop rdi
ret

Function at 0x18005a340
Capabilities:
Connect socket

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x40
mov rax, qword [0x18008f100]
xor rax, rsp
mov qword [rsp + 0x30], rax
xor eax, eax
mov rdi, rcx
mov ecx, edx
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rax
mov eax, 2
mov word [rsp + 0x20], ax
movzx ebx, r8w
call qword [sym.imp.WS2_32.dll_htonl]
movzx ecx, bx
mov dword [rsp + 0x24], eax
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [rdi + 0x10]
lea rdx, [rsp + 0x20]
mov r8d, reloc.WS2_32.dll_recv
mov word [rsp + 0x22], ax
call qword [sym.imp.WS2_32.dll_connect]
xor ecx, ecx
test eax, eax
sete cl
mov eax, ecx
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.180013880
mov rbx, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
Function at 0x18005a3d0
Capabilities:
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x30
cmp qword [rcx + 0x10], 0xffffffffffffffff
mov rbx, rcx
je 0x18005a46a
cmp dword [rcx + 0x1c], 0
je 0x18005a440
mov ecx, dword [rcx + 0x20]
xor eax, eax
mov byte [rsp + 0x40], 0
mov dword [rsp + 0x41], eax
mov word [rsp + 0x45], ax
mov byte [rsp + 0x47], al
call qword [sym.imp.WS2_32.dll_htonl]
xor ecx, ecx
mov dword [rsp + 0x40], eax
call qword [sym.imp.WS2_32.dll_htonl]
mov rcx, qword [rbx + 0x10]
xor edx, edx
lea r9, [rsp + 0x40]
mov dword [rsp + 0x44], eax
lea r8d, [rdx + 0xd]
mov dword [rsp + 0x20], 8
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x18005a440
xor eax, eax
add rsp, 0x30
pop rbx
ret
mov rcx, qword [rbx + 0x10]
mov edx, 1
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.WS2_32.dll_closesocket]
xor ecx, ecx
mov qword [rbx + 0x10], 0xffffffffffffffff
mov qword [rbx + 0x18], rcx
mov dword [rbx + 0x20], ecx
mov eax, 1
add rsp, 0x30
pop rbx
ret

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

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x40
mov rax, qword [0x18008f100]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rcx, qword [rcx + 0x10]
mov rdi, r8
mov rbx, rdx
lea r8, [rsp + 0x20]
lea rdx, [rsp + 0x28]
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x18005a573
xor eax, eax
jmp 0x18005a592
mov ecx, dword [rsp + 0x2c]
call qword [sym.imp.WS2_32.dll_ntohl]
movzx ecx, word [rsp + 0x2a]
mov dword [rbx], eax
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rdi], ax
mov eax, 1
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.180013880
mov rbx, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret

Function at 0x18005a5f0
Capabilities:
Set socket configuration

Disassembly:
sub rsp, 0x38
mov rcx, qword [rcx + 0x10]
mov dword [rsp + 0x20], r9d
mov r9, r8
mov r8d, edx
mov edx, dword [rsp + 0x60]
call qword [sym.imp.WS2_32.dll_setsockopt]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
add rsp, 0x38
ret

Function at 0x18005a640
Capabilities:
Send data
Send data on socket
Set socket configuration

Disassembly:
push rbx
push rbp
push rsi
push r12
sub rsp, 0x58
mov rax, qword [0x18008f100]
xor rax, rsp
mov qword [rsp + 0x40], rax
cmp byte [rsp + 0xa0], 0xff
movzx r12d, r9w
mov ebp, r8d
mov rsi, rdx
mov rbx, rcx
jne 0x18005a69e
cmp dword [rcx + 0x18], 0
lea r9, [rcx + 0x18]
jne 0x18005a69e
mov rcx, qword [rcx + 0x10]
mov edx, 0xffff
mov r8d, 0x20
mov dword [r9], 1
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov eax, 2
movzx ecx, r12w
mov word [rsp + 0x30], ax
call qword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [rsp + 0xa0]
mov word [rsp + 0x32], ax
call qword [sym.imp.WS2_32.dll_htonl]
mov rcx, qword [rbx + 0x10]
mov dword [rsp + 0x34], eax
lea rax, [rsp + 0x30]
xor r9d, r9d
mov r8d, ebp
mov rdx, rsi
mov dword [rsp + 0x28], reloc.WS2_32.dll_recv
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_sendto]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.180013880
add rsp, 0x58
pop r12
pop rsi
pop rbp
pop rbx
ret
Function at 0x18005a710
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x58
mov rax, qword [0x18008f100]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov r13, qword [rsp + 0xb0]
mov r12, r9
mov ebp, r8d
mov rsi, rdx
mov rdi, rcx
mov rcx, qword [rdi + 0x10]
lea rax, [rsp + 0x30]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x38]
mov r8d, ebp
mov rdx, rsi
mov dword [rsp + 0x30], reloc.WS2_32.dll_recv
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_recvfrom]
mov ebx, eax
test eax, eax
je 0x18005a7aa
jns 0x18005a784
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2746
jne 0x18005a7aa
test ebx, ebx
jle 0x18005a740
mov ecx, dword [rsp + 0x3c]
call qword [sym.imp.WS2_32.dll_ntohl]
movzx ecx, word [rsp + 0x3a]
mov dword [r12], eax
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [r13], ax
mov eax, ebx
jmp 0x18005a7ac
xor eax, eax
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.180013880
add rsp, 0x58
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret

Function at 0x18005a7d0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x30
xor eax, eax
mov ebx, r8d
mov rdi, rcx
test edx, edx
jne 0x18005a7f0
mov dword [rsp + 0x48], 1
jmp 0x18005a7fd
cmp edx, 0x7fffffff
cmova edx, eax
mov dword [rsp + 0x48], edx
mov rcx, qword [rcx + 0x10]
mov dword [rsp + 0x40], eax
lea rax, [rsp + 0x58]
lea r9, [rsp + 0x40]
mov edx, 0xffff
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x58], 4
call qword [sym.imp.WS2_32.dll_getsockopt]
cmp eax, 0xffffffff
jne 0x18005a839
xor eax, eax
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x48], eax
je 0x18005a867
mov rcx, qword [rdi + 0x10]
lea r9, [rsp + 0x48]
mov r8d, ebx
mov edx, 0xffff
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x18005a82c
mov eax, 1
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
mov r8d, 0x1005
mov dword [rcx + 8], edx
jmp 0x18005a7d0

Function at 0x18005a8b0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x30
xor eax, eax
mov ebx, r8d
mov rdi, rcx
test edx, edx
jne 0x18005a7f0
mov dword [rsp + 0x48], 1
jmp 0x18005a7fd
cmp edx, 0x7fffffff
cmova edx, eax
mov dword [rsp + 0x48], edx
mov rcx, qword [rcx + 0x10]
mov dword [rsp + 0x40], eax
lea rax, [rsp + 0x58]
lea r9, [rsp + 0x40]
mov edx, 0xffff
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x58], 4
call qword [sym.imp.WS2_32.dll_getsockopt]
cmp eax, 0xffffffff
jne 0x18005a839
xor eax, eax
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x48], eax
je 0x18005a867
mov rcx, qword [rdi + 0x10]
lea r9, [rsp + 0x48]
mov r8d, ebx
mov edx, 0xffff
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x18005a82c
mov eax, 1
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
mov r8d, 0x1005
mov dword [rcx + 8], edx
jmp 0x18005a7d0

Function at 0x18005a8c0
Capabilities:
Set socket configuration

Disassembly:
mov r8d, 0x1006
mov dword [rcx + 0xc], edx
jmp 0x18005a7d0
Function at 0x140493578
Capabilities:
Encode data using xor

Disassembly:
mov r9d, 0x4d911fa9
lea r9, [0x140476728]
lea rsp, [rsp + 8]
mov ecx, 0x1cb4bcaf
push rcx
shl dword [rsp + rcx - 0x1cb4bcae], cl
movzx ecx, byte [r11 + rcx*2 - 0x3969795e]
xor ecx, eax
and ecx, 0xff
mov ecx, dword [r9 + rcx*4]
sub dword [rsp], 0x30e248e
shr eax, 8
xor eax, ecx
inc r11
xor eax, 0x7b39a382
dec rsi
lea rsp, [rsp + 8]
jne 0x14049358a
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x140004420]
mov dword [rax], 1
mov rax, qword [0x140004430]
mov dword [rax], 1
mov rax, qword [0x140004440]
mov dword [rax], 1
mov rax, qword [0x1400043d0]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x1400019c0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sym.__acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sym.fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sym.__acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sym.vfprintf
call sym.abort
nop

Function at 0x140002692
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x140007108]
test eax, eax
je 0x14000272a
lea rax, [0x1400070e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x140007110]
mov qword [rbp - 8], rax
jmp 0x14000270e
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x140002702
cmp qword [rbp - 0x10], 0
je 0x140002702
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x1400026c8
lea rax, [0x1400070e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14000272b
nop
add rsp, 0x30
pop rbp
ret
Function at 0x14000cbb0
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0x98
movabs rax, 0x6c6320726f727245
movabs rdx, 0x7520676e696e6165
mov qword [rsp + 0x20], rax
movabs rax, 0x6b5f6e6970732070
mov qword [rsp + 0x28], rdx
movabs rdx, 0x20726f6620737965
mov qword [rsp + 0x30], rax
movabs rax, 0x20646165726874
mov qword [rsp + 0x38], rdx
xor edx, edx
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x7b], 0
mov qword [rsp + 0x83], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x47]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x14000ccb2
mov eax, 0x28
lea rcx, [rsp + 0x20]
jmp 0x14000cc8a
add rax, 1
cmp rax, 0x6b
je 0x14000cca7
cmp byte [rcx + rax], 0
jne 0x14000cc80
movsxd rdx, eax
cmp eax, 0x6a
je 0x14000cca7
add eax, 1
cdqe
mov byte [rsp + rdx + 0x20], 0xa
mov byte [rsp + rax + 0x20], 0
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.msvcrt.dll_abort
mov eax, 0x28
mov edx, 0x27
lea rcx, [rsp + 0x20]
jmp 0x14000cc9b

Function at 0x14000d050
Capabilities:
Allocate thread local storage

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
cmp dword [0x140468100], 1
je 0x14000d0c8
lea rdi, [0x140468100]
mov rcx, rdi
call fcn.14000c930
lea rbp, [rax + 8]
mov rbx, rax
mov rcx, rbp
call fcn.14000f770
mov esi, dword [0x140468100]
test esi, esi
jne 0x14000d0d8
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1402b0038], eax
cmp eax, 0xffffffff
je 0x1402ab606
mov dword [0x140468100], 1
mov rcx, rbp
call fcn.14000fa60
test rbx, rbx
je 0x14000d0c8
mov rcx, rbx
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp fcn.14000ccd0
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp esi, 1
je 0x14000d0a8
mov ecx, 2
call qword [fcn.140197860]
mov r9d, esi
mov r8, rdi
lea rdx, str._once__p_is__d_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x14000d0a8
call sub.msvcrt.dll_abort
nop