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

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rbx, rdx
mov rdi, rcx
call fcn.1800c6db0
xor r9d, r9d
mov qword [rsp + 0x30], 0
mov edx, 0x80000000
lea r8d, [r9 + 7]
mov rcx, rbx
mov dword [rsp + 0x28], 0x80
mov dword [rdi + 0x20], 1
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rdi + 8], rax
cmp rax, 0xffffffffffffffff
je 0x1800c70b1
test rax, rax
je 0x1800c70b1
lea rdx, [rdi + 0x14]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov rcx, qword [rdi + 8]
lea r9, [rdi + 0x43c]
lea rdx, [rdi + 0x3c]
mov r8d, 0x400
mov dword [rdi + 0x10], eax
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1800c70b9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rdi], eax
mov rax, rdi
mov rbx, qword [rsp + 0x50]
add rsp, 0x40
pop rdi
ret

Function at 0x1800c7190
Capabilities:
Read file on windows

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x30
mov rax, qword [rcx + 8]
mov esi, r8d
mov edi, edx
mov rbx, rcx
cmp rax, 0xffffffffffffffff
je 0x1800c72bb
test rax, rax
je 0x1800c72bb
mov qword [rsp + 0x60], r12
lea r9, [rsp + 0x50]
xor r12d, r12d
mov edx, edi
mov qword [rsp + 0x50], r12
call fcn.1800c6ed0
mov r10, qword [rsp + 0x50]
cmp r10, qword [rcx + 0x10]
jg 0x1800c724d
cmp dword [rsp + 0x54], r12d
jne 0x1800c7200
mov eax, dword [rcx + 0x43c]
cmp dword [rsp + 0x50], eax
ja 0x1800c7200
lea rax, [rdi + rcx + 0x3c]
mov r12, qword [rsp + 0x60]
add rsp, 0x30
pop rdi
pop rsi
pop rbx
ret
mov r11, qword [rbx + 0x28]
test r11, r11
je 0x1800c723e
mov edx, dword [rbx + 0x38]
mov r8d, dword [rbx + 0x34]
lea r9, [rsp + 0x50]
mov qword [rsp + 0x50], r12
call fcn.1800c6ed0
cmp edx, edi
ja 0x1800c723e
cmp r10, qword [rsp + 0x50]
jg 0x1800c723e
mov r12, qword [rsp + 0x60]
sub edi, edx
mov eax, edi
add rax, r11
add rsp, 0x30
pop rdi
pop rsi
pop rbx
ret
mov edx, esi
mov rcx, rbx
call fcn.1800c6e60
test rax, rax
jne 0x1800c725c
xor eax, eax
mov r12, qword [rsp + 0x60]
add rsp, 0x30
pop rdi
pop rsi
pop rbx
ret
mov edx, edi
mov rcx, rbx
mov qword [rsp + 0x58], rbp
call fcn.1800c6f00
test eax, eax
je 0x1800c72ab
mov rdx, qword [rbx + 0x28]
mov rcx, qword [rbx + 8]
lea r9, [rbx + 0x34]
mov r8d, esi
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1800c72ab
cmp dword [rbx + 0x34], esi
jne 0x1800c72ab
mov rax, qword [rbx + 0x28]
mov dword [rbx + 0x38], edi
mov rbp, qword [rsp + 0x58]
mov r12, qword [rsp + 0x60]
add rsp, 0x30
pop rdi
pop rsi
pop rbx
ret
mov qword [rbx + 0x34], r12
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx], eax
xor eax, eax
jmp 0x1800c7299
xor eax, eax
add rsp, 0x30
pop rdi
pop rsi
pop rbx
ret
Function at 0x1800c8ab0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov ebx, edx
shr edx, 4
mov rsi, r9
inc dx
movzx r9d, r8w
mov rdi, rcx
movzx r8d, dx
mov edx, 6
and ebx, 0xf
call qword [sym.imp.KERNEL32.dll_FindResourceExW]
test rax, rax
je 0x1800c8b13
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x1800c8b13
xor edx, edx
nop dword [rax + rax]
movzx ecx, word [rax]
cmp ebx, edx
je 0x1800c8b25
inc edx
lea rax, [rax + rcx*2 + 2]
cmp edx, 0x10
jl 0x1800c8b00
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
movsxd rbx, dword [rsp + 0x50]
lea rdx, [rax + 2]
mov rcx, rsi
mov r8, rbx
call fcn.1800c74c0
test eax, eax
jne 0x1800c8b43
mov byte [rbx + rsi - 1], al
mov eax, ebx
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
dec eax
add rsp, 0x20
pop rdi
ret

Function at 0x1800ca4c0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov ebx, edx
shr edx, 4
mov rsi, r9
inc dx
movzx r9d, r8w
mov rdi, rcx
movzx r8d, dx
mov edx, 6
and ebx, 0xf
call qword [sym.imp.KERNEL32.dll_FindResourceExW]
test rax, rax
je 0x1800ca52b
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rdx, rax
test rax, rax
je 0x1800ca52b
xor ebp, ebp
mov eax, ebp
movzx ecx, word [rdx]
add rdx, 2
cmp ebx, eax
je 0x1800ca542
inc eax
lea rdx, [rdx + rcx*2]
cmp eax, 0x10
jl 0x1800ca515
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov edi, dword [rsp + 0x50]
dec edi
cmp ecx, edi
cmovle edi, ecx
movsxd rcx, edi
lea rbx, [rcx + rcx]
mov rcx, rsi
mov r8, rbx
call fcn.18007e510
mov word [rbx + rsi], bp
mov eax, edi
jmp 0x1800ca52d
Function at 0x1800cfcd0
Capabilities:
Get common file path
Get file version info

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x470
mov rax, qword [0x1801903f8]
xor rax, rsp
mov qword [rsp + 0x460], rax
mov eax, dword [0x1801b09fc]
test eax, eax
jne 0x1800cfdf7
xor edi, edi
mov word [rsp + 0x250], di
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x252]
call fcn.18007ead0
mov edx, 0x104
lea rcx, [rsp + 0x250]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x1800cfdf1
mov word [rsp + 0x40], di
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x42]
call fcn.18007ead0
lea r9, [0x18012eef8]
lea r8, [rsp + 0x250]
lea rdx, [0x18012b288]
lea rcx, [rsp + 0x40]
call fcn.18007ebbc
mov dword [rsp + 0x20], edi
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x40]
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov dword [rsp + 0x24], eax
mov ecx, eax
call fcn.180030824
mov rbx, rax
mov qword [rsp + 0x30], rax
test rax, rax
je 0x1800cfdf1
mov r9, rax
mov r8d, dword [rsp + 0x24]
mov edx, dword [rsp + 0x20]
lea rcx, [rsp + 0x40]
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x1800cfde9
mov qword [rsp + 0x28], rdi
lea r9, [rsp + 0x24]
lea r8, [rsp + 0x28]
lea rdx, str.VarFileInfoTranslation
mov rcx, rbx
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x1800cfde9
mov rax, qword [rsp + 0x28]
mov ecx, dword [rax]
mov dword [0x1801b09fc], ecx
jmp 0x1800cfde9
mov rcx, rbx
call fcn.18003081c
mov eax, dword [0x1801b09fc]
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.18007e1e0
mov rbx, qword [rsp + 0x480]
add rsp, 0x470
pop rdi
ret

Function at 0x1800d06f0
Capabilities:
Check os version
Get system information on windows

Disassembly:
push rdi
sub rsp, 0x20
cmp dword [0x1801b0a00], 0
jne 0x1800d080f
lea rcx, [0x1801b0780]
mov edi, 1
mov dword [0x1801b0780], 0x114
mov dword [0x1801b0a00], edi
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
xor r11d, r11d
cmp dword [0x1801b0790], 2
sete r11b
mov dword [reloc.WS2_32.dll_accept], r11d
test r11d, r11d
je 0x1800d07ef
lea rcx, [0x1801b08a0]
mov qword [rsp + 0x30], rbx
mov dword [0x1801b08a0], 0x11c
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
lea rcx, [0x18012e9d0]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea rdx, str.GetNativeSystemInfo
mov rcx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.GetProductInfo
mov rcx, rbx
mov qword [0x1801b0778], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rbx, qword [rsp + 0x30]
mov qword [0x1801b09f0], rax
mov rax, qword [0x1801b0778]
lea rcx, [0x1801b09c0]
test rax, rax
je 0x1800d07b9
call rax
jmp 0x1800d07bf
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [0x1801b08a4]
cmp eax, 6
jae 0x1800d07d8
cmp eax, 5
jne 0x1800d07ef
cmp dword [0x1801b08a8], 2
jb 0x1800d07ef
mov ecx, dword [0x1801b0770]
cmp word [0x1801b09c0], 9
cmove ecx, edi
mov dword [0x1801b0770], ecx
lea rdx, [0x1801b0788]
lea rcx, [0x1801b0784]
call fcn.1800d01e0
call fcn.1800d03d0
mov eax, edi
add rsp, 0x20
pop rdi
ret
mov eax, 1
add rsp, 0x20
pop rdi
ret
Function at 0x1800d3440
Capabilities:
Check os version

Disassembly:
push rbx
sub rsp, 0x150
mov rax, qword [0x1801903f8]
xor rax, rsp
mov qword [rsp + 0x140], rax
cmp dword [0x1801b0a60], 0
mov ebx, ecx
jne 0x1800d34c3
lea rcx, [rsp + 0x24]
xor edx, edx
mov r8d, pe_nt_image_headers64
mov dword [0x1801b0a60], 1
call fcn.18007ead0
lea rcx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x114
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [rsp + 0x30], 2
jne 0x1800d34b3
cmp dword [rsp + 0x24], 5
jb 0x1800d34b3
mov rax, qword [str.GlobalOCULAR_]
mov qword [0x1801b0a58], rax
jmp 0x1800d34ca
mov rax, qword [str.OCULAR_]
mov qword [0x1801b0a58], rax
jmp 0x1800d34ca
mov rax, qword [0x1801b0a58]
test ebx, ebx
cmovne rax, qword [str.OCULAR_]
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.18007e1e0
add rsp, 0x150
pop rbx
ret
Function at 0x1800d5f70
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 0x1800d60db
cmp qword [rcx + 0x10], 0
je 0x1800d60db
mov edx, ebx
call fcn.1800d5ea0
test eax, eax
je 0x1800d60e3
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 0x1800d6034
cmp dword [rsp + 0x80], ebp
je 0x1800d6034
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [rsp + 0x80]
jmp 0x1800d605b
call qword [sym.imp.KERNEL32.dll_GetLastError]
test r12d, r12d
jne 0x1800d6079
test eax, eax
je 0x1800d6079
cmp eax, 0x3e5
je 0x1800d6079
cmp eax, 0x217
je 0x1800d6079
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 0x1800d60aa
call qword [sym.imp.KERNEL32.dll_CancelIo]
mov eax, 0xf0000001
mov ecx, 0xf0000003
cmp ebx, 0x102
cmove eax, ecx
jmp 0x1800d6056
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 0x1800d605b
mov eax, 0xf0000001
mov dword [rcx + 0x24], eax
xor eax, eax
jmp 0x1800d6063
Function at 0x1800d60f0
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 0x1800d625b
cmp qword [rcx + 0x18], 0
je 0x1800d625b
mov edx, ebx
call fcn.1800d5ea0
test eax, eax
je 0x1800d6263
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 0x1800d61b4
cmp dword [rsp + 0x80], ebp
jbe 0x1800d61b4
mov rcx, qword [rdi + 0x18]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [rsp + 0x80]
jmp 0x1800d61db
call qword [sym.imp.KERNEL32.dll_GetLastError]
test r12d, r12d
jne 0x1800d61f9
test eax, eax
je 0x1800d61f9
cmp eax, 0x3e5
je 0x1800d61f9
cmp eax, 0x217
je 0x1800d61f9
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 0x1800d622a
call qword [sym.imp.KERNEL32.dll_CancelIo]
mov eax, 0xf0000001
mov ecx, 0xf0000003
cmp ebx, 0x102
cmove eax, ecx
jmp 0x1800d61d6
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 0x1800d61db
mov eax, 0xf0000001
mov dword [rcx + 0x24], eax
xor eax, eax
jmp 0x1800d61e3

Function at 0x1800d6550
Capabilities:
Write file on windows

Disassembly:
cmp dword [rcx + 0x1c], 6
mov rax, rcx
je 0x1800d655d
or eax, 0xffffffff
ret
test r8d, r8d
jg 0x1800d6565
xor eax, eax
ret
mov r9d, dword [rax + 8]
add rcx, 0x70
jmp fcn.1800d60f0

Function at 0x1800d6580
Capabilities:
Read file on windows

Disassembly:
cmp dword [rcx + 0x1c], 6
mov rax, rcx
je 0x1800d658d
or eax, 0xffffffff
ret
test r8d, r8d
jne 0x1800d6595
xor eax, eax
ret
mov r9d, dword [rax + 0xc]
add rcx, 0x70
jmp fcn.1800d5f70
Function at 0x1800d6980
Capabilities:
Connect pipe
Create pipe

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
sub rsp, 0x280
mov rax, qword [0x1801903f8]
xor rax, rsp
mov qword [rsp + 0x270], rax
mov ebp, r8d
mov rsi, rdx
mov rdi, rcx
call fcn.1800d5e40
call fcn.1800d5cd0
mov rbx, rax
test rax, rax
je 0x1800d6b1d
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.18007ead0
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 0x1800d69f0
test rsi, rsi
je 0x1800d6a19
lea rcx, [rsp + 0x40]
mov r8d, 0x104
mov rdx, rsi
call fcn.180113594
call fcn.1800db4d0
mov edx, 0x40000003
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], r12d
test ebp, ebp
jne 0x1800d6a4f
mov dword [rsp + 0x28], 0x8000
lea r9d, [rbp + 1]
xor r8d, r8d
mov dword [rsp + 0x20], 0x8000
jmp 0x1800d6a6b
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 0x1800d6a84
mov qword [rdi + 8], r12
jmp 0x1800d6b13
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 0x1800d6b0b
test rax, rax
je 0x1800d6b0b
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 0x1800d6afd
cmp eax, 0x3e5
je 0x1800d6afd
cmp eax, 0x217
jne 0x1800d6b13
mov dword [rdi + 0x20], 1
mov eax, 1
jmp 0x1800d6b15
mov rcx, rdi
call fcn.1800d5e40
xor eax, eax
mov r12, qword [rsp + 0x2b0]
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.18007e1e0
mov rbx, qword [rsp + 0x2b8]
add rsp, 0x280
pop rdi
pop rsi
pop rbp
ret

Function at 0x1800d7350
Capabilities:
Initialize winsock library

Disassembly:
push rbx
sub rsp, 0x1d0
mov rax, qword [0x1801903f8]
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.18007e1e0
add rsp, 0x1d0
pop rbx
ret
Function at 0x1800d7410
Capabilities:
Set socket configuration

Disassembly:
push rdi
sub rsp, 0x60
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rsp + 0x78], rbx
mov rax, qword [0x1801903f8]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov rdi, rcx
cmp qword [rcx + 0x10], 0xffffffffffffffff
je 0x1800d7494
mov ecx, reloc.OLEAUT32.dll_SafeArrayAllocDescriptorEx
call fcn.1800307d8
mov qword [rsp + 0x40], rax
test rax, rax
je 0x1800d745e
mov rcx, rax
call fcn.1800d73d0
mov rbx, rax
jmp 0x1800d7460
xor ebx, ebx
test rbx, rbx
je 0x1800d7494
mov dword [rsp + 0x30], reloc.OLEAUT32.dll_SafeArrayGetDim
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 0x1800d7498
mov rax, qword [rbx]
mov edx, 1
mov rcx, rbx
call qword [rax]
xor eax, eax
jmp 0x1800d74c7
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.18007e1e0
mov rbx, qword [rsp + 0x78]
add rsp, 0x60
pop rdi
ret

Function at 0x1800d74e0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x50
mov rax, qword [0x1801903f8]
xor rax, rsp
mov qword [rsp + 0x48], rax
cmp qword [rcx + 0x10], 0xffffffffffffffff
mov edi, r8d
mov rbx, rcx
jne 0x1800d750d
xor eax, eax
jmp 0x1800d75c2
lea eax, [r8 + 0x20000000]
cmp eax, 0xfffffff
ja 0x1800d7528
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.OLEAUT32.dll_SafeArrayGetDim
mov dword [rsp + 0x3c], eax
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x1800d7506
cmp dword [rbx + 0x1c], 0
je 0x1800d75bd
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 0x1800d7506
mov eax, 1
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.18007e1e0
mov rbx, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
ret
Function at 0x1800d75e0
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 0x1800d75fc
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayAllocDescriptorEx]
dec ebx
je 0x1800d766e
dec ebx
jne 0x1800d7688
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 0x1800d7688
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 0x1800d7695
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 0x1800d76f0
Capabilities:
Connect socket

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x40
mov rax, qword [0x1801903f8]
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.OLEAUT32.dll_SafeArrayGetDim
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.18007e1e0
mov rbx, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
Function at 0x1800d7780
Capabilities:
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x30
cmp qword [rcx + 0x10], 0xffffffffffffffff
mov rbx, rcx
je 0x1800d781a
cmp dword [rcx + 0x1c], 0
je 0x1800d77f0
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 0x1800d77f0
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 0x1800d78e0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x40
mov rax, qword [0x1801903f8]
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.OLEAUT32.dll_SafeArrayGetDim
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x1800d7923
xor eax, eax
jmp 0x1800d7942
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.18007e1e0
mov rbx, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret

Function at 0x1800d79a0
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