joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14016110c
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
mov rdi, r9
mov rbx, r8
mov rsi, rdx
mov rbp, rcx
test rdx, rdx
jne 0x140161137
call fcn.140067c74
int3
test rbx, rbx
jne 0x140161142
call fcn.140067c74
int3
test r9, r9
jne 0x14016114d
call fcn.140067c74
int3
and qword [r8], 0
and dword [r9], 0
mov rcx, qword [rcx + 8]
mov qword [rsp + 0x28], r9
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1401611d0
cmp dword [rsp + 0x48], 3
jne 0x1401611d0
test eax, eax
jne 0x1401611d0
cmp dword [rdi], eax
je 0x1401611d0
mov ecx, dword [rdi]
call fcn.14005ce38
lea r9, [rsp + 0x48]
xor r8d, r8d
mov qword [rbx], rax
mov rcx, qword [rbp + 8]
mov rdx, rsi
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1401611c4
cmp dword [rsp + 0x48], 3
jne 0x1401611c4
test eax, eax
jne 0x1401611c4
mov eax, 1
jmp 0x1401611d2
mov rcx, qword [rbx]
call fcn.14005ce7c
and qword [rbx], 0
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret

Function at 0x1401612dc
Capabilities:
Delete registry value

Disassembly:
sub rsp, 0x28
mov rcx, qword [rcx + 8]
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
xor ecx, ecx
test eax, eax
sete cl
mov eax, ecx
add rsp, 0x28
ret

Function at 0x1401a27a4
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
test byte [rdx + 4], 1
mov esi, r8d
mov rbx, rdx
mov rbp, rcx
je 0x1401a27cd
mov rdi, qword [rdx + 0x10]
jmp 0x1401a281e
mov rdx, qword [rdx + 0x10]
mov rcx, qword [rbx + 8]
mov r8d, 5
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rdi, rax
test rax, rax
jne 0x1401a27ee
call fcn.1400698e0
mov rcx, qword [rbx + 8]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rdi, rax
test rax, rax
jne 0x1401a2808
call fcn.1400698e0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rdi, rax
test rax, rax
jne 0x1401a281e
call fcn.1400698e0
call fcn.1400693b4
cmp qword [rax + 0x68], 0
je 0x1401a2838
mov rdx, rdi
mov rcx, rbp
call fcn.1401a0e64
mov rdi, rax
mov edx, esi
mov rcx, rdi
call fcn.1401a25e4
mov rcx, qword [rbp + 0xe8]
mov rsi, rax
test rcx, rcx
je 0x1401a285f
call qword [sym.imp.KERNEL32.dll_GlobalFree]
and qword [rbp + 0xe8], 0
test rsi, rsi
je 0x1401a286e
mov rdi, rsi
mov qword [rbp + 0xe8], rsi
or dword [rbx + 4], 1
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov qword [rbx + 0x10], rdi
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x1401c7c64
Capabilities:
Terminate process

Disassembly:
xor r8d, r8d
xor edx, edx
jmp fcn.1401c7ad4

Function at 0x1401c7c70
Capabilities:
Terminate process

Disassembly:
xor r8d, r8d
lea edx, [r8 + 1]
jmp fcn.1401c7ad4
Function at 0x1401cb117
Capabilities:
Terminate process

Disassembly:
cmp rcx, qword [0x1402f2208]
jne 0x1401c042a
rol rcx, 0x10
test cx, 0xffff
jne 0x1401c0426
repz ret
ror rcx, 0x10
jmp 0x1401cb070
mov qword [rsp + 8], rcx
sub rsp, 0x88
lea rcx, [0x140300740]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov rax, qword [0x140300838]
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 0x1401cb0f5
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, [0x140300740]
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 0x1401cb117
mov rax, qword [rsp + 0x88]
mov qword [0x140300838], rax
lea rax, [rsp + 0x88]
add rax, 8
mov qword [0x1403007d8], rax
mov rax, qword [0x140300838]
mov qword [0x1403006b0], rax
mov rax, qword [rsp + 0x90]
mov qword [0x1403007c0], rax
mov dword [0x1403006a0], 0xc0000409
mov dword [0x1403006a4], 1
mov rax, qword [0x1402f2208]
mov qword [rsp + 0x68], rax
mov rax, qword [0x1402f2210]
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x140300738], eax
mov ecx, 1
call fcn.1401dd5f8
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [0x14028a100]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x140300738], 0
jne 0x1401cb19e
mov ecx, 1
call fcn.1401dd5f8
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 0x1401d710c
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 [0x1402f2208]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov ebp, r8d
mov r14, rdx
mov r13, rcx
call fcn.1401ca95c
xor ebx, ebx
cmp qword [0x140300fa8], rbx
mov rdi, rax
jne 0x1401d721f
lea rcx, str.USER32.DLL
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rsi, rax
test rax, rax
je 0x1401d72f6
lea rdx, [0x14028a8b0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1401d72f6
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, [0x14028a8a0]
mov rcx, rsi
mov qword [0x140300fa8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
lea rdx, [0x14028a888]
mov rcx, rsi
mov qword [0x140300fb0], 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 [0x140300fb8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EncodePointer]
mov r11, rax
mov qword [0x140300fc8], rax
test rax, rax
je 0x1401d7216
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 [0x140300fc0], rax
jmp 0x1401d7226
mov rax, qword [0x140300fc0]
jmp 0x1401d722d
mov rax, qword [0x140300fc0]
mov r11, qword [0x140300fc8]
cmp rax, rdi
je 0x1401d7294
cmp r11, rdi
je 0x1401d7294
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DecodePointer]
mov rcx, qword [0x140300fc8]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_DecodePointer]
mov r12, rax
test rsi, rsi
je 0x1401d7294
test rax, rax
je 0x1401d7294
call rsi
test rax, rax
je 0x1401d728e
lea rcx, [rsp + 0x30]
mov r9d, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rcx
lea edx, [r9 - 0xb]
mov rcx, rax
call r12
test eax, eax
je 0x1401d728e
test byte [rsp + 0x40], 1
jne 0x1401d7294
bts ebp, 0x15
jmp 0x1401d72d4
mov rcx, qword [0x140300fb0]
cmp rcx, rdi
je 0x1401d72d4
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x1401d72d4
call rax
mov rbx, rax
test rax, rax
je 0x1401d72d4
mov rcx, qword [0x140300fb8]
cmp rcx, rdi
je 0x1401d72d4
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x1401d72d4
mov rcx, rbx
call rax
mov rbx, rax
mov rcx, qword [0x140300fa8]
call qword [sym.imp.KERNEL32.dll_DecodePointer]
test rax, rax
je 0x1401d72f6
mov r9d, ebp
mov r8, r14
mov rdx, r13
mov rcx, rbx
call rax
jmp 0x1401d72f8
xor eax, eax
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1401c0410
add rsp, 0x50
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x1401e59b0
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x20
mov rcx, qword [0x140301098]
test rcx, rcx
jne 0x1401e5907
mov rax, qword gs:[0x30]
mov rbx, qword [rax + 0x60]
mov rcx, qword [rbx + 0x40]
test rcx, rcx
jne 0x1401e5900
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor edx, edx
lea r8d, [rdx + 0x10]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x1401e5932
and qword [rax], 0
and qword [rax + 8], 0
xor eax, eax
lock cmpxchg qword [rbx + 0x40], rdi
je 0x1401e58fc
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rbx + 0x40]
mov qword [0x140301098], rcx
call qword [sym.imp.KERNEL32.dll_InterlockedPopEntrySList]
test rax, rax
jne 0x1401e59a5
mov edx, 0x1000
lea r9d, [rax + 0x40]
xor ecx, ecx
mov r8d, edx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbx, rax
test rax, rax
jne 0x1401e5955
xor edx, edx
lea r9, [rsp + 0x30]
mov ecx, 0xc0000017
lea r8d, [rdx + 1]
mov qword [rsp + 0x30], 0x20
call qword [sym.imp.KERNEL32.dll_RaiseException]
mov eax, dword [rax]
mov rcx, qword [0x140301098]
call qword [sym.imp.KERNEL32.dll_InterlockedPopEntrySList]
mov rdi, rax
test rax, rax
je 0x1401e5982
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rax, rdi
jmp 0x1401e59a5
lea rdi, [rbx + 0xfe0]
mov rcx, qword [0x140301098]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_InterlockedPushEntrySList]
add rbx, 0x20
cmp rbx, rdi
jb 0x1401e5989
mov rax, rbx
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
jmp 0x1401e588c
Function at 0x1402073d0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
cmp qword [rdx + 0x18], 8
mov rsi, r8
mov rdi, rcx
jb 0x1402073ea
mov rdx, qword [rdx]
mov rcx, rdx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov r11d, eax
cmp eax, 0xffffffff
jne 0x1402074be
mov qword [rsp + 0x40], rbx
call fcn.140207850
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
mov rcx, qword [rsp + 0x20]
mov qword [rsi], rcx
mov qword [rsi + 8], rbx
mov eax, dword [rsi]
mov rbx, qword [rsp + 0x40]
cmp eax, 2
je 0x140207495
cmp eax, 3
je 0x140207495
cmp eax, 0x7b
je 0x140207495
cmp eax, 0xf
je 0x140207495
cmp eax, 0x15
je 0x140207495
cmp eax, 0x57
je 0x140207495
cmp eax, 0xa1
je 0x140207495
cmp eax, 0x35
je 0x140207495
cmp eax, 0x20
jne 0x140207481
mov rax, qword [0x1403018e8]
mov dword [rdi], 9
mov qword [rsi], rax
mov rax, qword [0x1403018f0]
mov qword [rsi + 8], rax
mov rax, rdi
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
mov dword [rdi], 0
mov rax, rdi
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
mov rax, qword [0x1403018e8]
mov dword [rdi], 1
mov qword [rsi], rax
mov rax, qword [0x1403018f0]
mov qword [rsi + 8], rax
mov rax, rdi
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
mov rax, qword [0x1403018e8]
mov dword [rsp + 0x48], 3
mov qword [rsi], rax
mov rax, qword [0x1403018f0]
mov qword [rsi + 8], rax
lea rax, [rsp + 0x48]
test r11b, 0x10
jne 0x1402074ee
mov dword [rsp + 0x48], 2
mov eax, dword [rax]
mov rsi, qword [rsp + 0x50]
mov dword [rdi], eax
mov rax, rdi
add rsp, 0x30
pop rdi
ret

Function at 0x140207520
Capabilities:
Move file

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
cmp qword [r8 + 0x18], 8
mov rax, rdx
mov rdi, rcx
jb 0x14020753a
mov r8, qword [r8]
cmp qword [rdx + 0x18], 8
jb 0x140207544
mov rax, qword [rdx]
mov rdx, r8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x140207558
xor ebx, ebx
jmp 0x140207560
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.140207850
mov dword [rdi], ebx
mov rbx, qword [rsp + 0x30]
mov qword [rdi + 8], rax
mov rax, rdi
add rsp, 0x20
pop rdi
ret
Function at 0x140207580
Capabilities:
Delete directory
Delete file

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov rbx, rdx
mov rdi, rcx
mov dword [rsp + 0x20], 0
call fcn.140207850
lea r8, [rsp + 0x20]
lea rcx, [rsp + 0x50]
mov rdx, rbx
mov qword [rsp + 0x28], rax
call fcn.1402073d0
cmp dword [rsp + 0x20], 0
je 0x1402075da
mov rax, qword [rsp + 0x20]
mov qword [rdi], rax
mov rax, qword [rsp + 0x28]
mov qword [rdi + 8], rax
mov rax, rdi
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
mov eax, dword [rsp + 0x50]
cmp eax, 1
je 0x140207636
cmp eax, 3
jne 0x140207621
cmp qword [rbx + 0x18], 8
jb 0x1402075f2
mov rbx, qword [rbx]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x140207636
call fcn.140207850
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rdi + 8], rbx
mov dword [rdi], eax
mov rax, rdi
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
cmp qword [rbx + 0x18], 8
jb 0x14020762b
mov rbx, qword [rbx]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x1402075fb
mov rax, qword [0x1403018e8]
mov rbx, qword [rsp + 0x40]
mov qword [rdi], rax
mov rax, qword [0x1403018f0]
mov qword [rdi + 8], rax
mov rax, rdi
add rsp, 0x30
pop rdi
ret

Function at 0x140207680
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x40
mov rdi, rdx
mov rbx, rcx
mov dword [rsp + 0x30], 0
call fcn.140207850
mov dword [rsp + 0x20], 0
mov rsi, rax
call fcn.140207850
cmp qword [rdi + 0x18], 8
mov qword [rsp + 0x28], rax
jb 0x1402076c3
mov rcx, qword [rdi]
jmp 0x1402076c6
mov rcx, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x1402076d8
mov byte [rbx + 0x10], 1
jmp 0x14020773a
call fcn.140207850
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x30], eax
cmp eax, 0xb7
jne 0x140207736
lea r8, [rsp + 0x20]
lea rcx, [rsp + 0x58]
mov rdx, rdi
call fcn.1402073d0
cmp dword [rsp + 0x58], 3
jne 0x140207736
mov rax, qword [0x1403018e8]
mov byte [rbx + 0x10], 0
mov qword [rbx], rax
mov rax, qword [0x1403018f0]
mov qword [rbx + 8], rax
mov rax, rbx
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
ret
mov byte [rbx + 0x10], 0
mov rax, qword [rsp + 0x30]
mov qword [rbx], rax
mov qword [rbx + 8], rsi
mov rsi, qword [rsp + 0x60]
mov rax, rbx
mov rbx, qword [rsp + 0x50]
add rsp, 0x40
pop rdi
ret
Function at 0x14002a840
Capabilities:
Copy file

Disassembly:
xor r9d, r9d
xor r8d, r8d
jmp fcn.1400f8c80
Function at 0x140036630
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x60
mov rax, qword [0x1403aa6c8]
xor rax, rsp
mov qword [rbp - 8], rax
mov rdi, rcx
cmp qword [rcx + 0x68], 0
je 0x140036840
cmp byte [rcx + 0x71], 0
je 0x140036840
mov rax, qword [rcx]
mov edx, 0xffffffff
call qword [rax + 0x18]
cmp eax, 0xffffffff
jne 0x140036682
xor al, al
jmp 0x140036842
mov edx, send
mov qword [rbp - 0x10], rdx
xor ecx, ecx
mov qword [rbp - 0x28], rcx
mov qword [rbp - 0x18], 8
lea rax, [rbp - 0x28]
mov byte [rax + 8], cl
xor r14d, r14d
mov r9, qword [rbp - 0x10]
mov rcx, qword [rbp - 0x28]
nop dword [rax + rax]
lea rdx, [rbp - 0x28]
cmp r9, 0x10
cmovae rdx, rcx
lea r8, [rbp - 0x28]
cmovae r8, rcx
mov r9, qword [rbp - 0x18]
add r9, rdx
lea rax, [rbp - 0x30]
mov qword [rsp + 0x20], rax
lea rdx, [rdi + 0x74]
mov rcx, qword [rdi + 0x68]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140036703
sub eax, 1
je 0x140036707
mov r9, qword [rbp - 0x10]
mov rcx, qword [rbp - 0x28]
cmp eax, 2
je 0x1400367fd
xor bl, bl
jmp 0x1400367ff
mov byte [rdi + 0x71], r14b
lea rax, [rbp - 0x28]
mov rcx, qword [rbp - 0x28]
mov r9, qword [rbp - 0x10]
cmp r9, 0x10
cmovae rax, rcx
mov rbx, qword [rbp - 0x30]
sub rbx, rax
je 0x140036755
lea rax, [rbp - 0x28]
cmp r9, 0x10
cmovae rax, rcx
mov r9, qword [rdi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov r9, qword [rbp - 0x10]
mov rcx, qword [rbp - 0x28]
cmp rbx, rax
jne 0x1400366fc
cmp byte [rdi + 0x71], r14b
je 0x1400367fd
test rbx, rbx
jne 0x1400366b0
mov rax, 0xffffffffffffffff
mov r8, qword [rbp - 0x18]
sub rax, r8
cmp rax, 8
jbe 0x140036863
lea rbx, [r8 + 8]
cmp rbx, 0xfffffffffffffffe
ja 0x140036863
cmp r9, rbx
jae 0x1400367e0
mov rdx, rbx
lea rcx, [rbp - 0x28]
call fcn.140037cd0
mov r9, qword [rbp - 0x10]
mov rcx, qword [rbp - 0x28]
test rbx, rbx
je 0x1400366b0
lea rdx, [rbp - 0x28]
cmp r9, 0x10
cmovae rdx, rcx
mov rax, qword [rbp - 0x18]
xor ecx, ecx
mov qword [rax + rdx], rcx
mov qword [rbp - 0x18], rbx
lea rax, [rbp - 0x28]
cmp qword [rbp - 0x10], 0x10
cmovae rax, qword [rbp - 0x28]
mov byte [rax + rbx], cl
jmp 0x1400366a3
test rbx, rbx
jne 0x1400367b0
mov qword [rbp - 0x18], r14
lea rax, [rbp - 0x28]
cmp r9, 0x10
cmovae rax, rcx
mov byte [rax], r14b
jmp 0x1400366a3
mov bl, 1
cmp r9, 0x10
jb 0x14003683b
lea rax, [r9 + 1]
mov rdx, rcx
cmp rax, 0x1000
jb 0x140036836
test dl, 0x1f
jne 0x14003682f
mov rcx, qword [rcx - 8]
cmp rcx, rdx
jae 0x14003682f
sub rdx, rcx
sub rdx, 8
cmp rdx, 0x1f
jbe 0x140036836
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14022a0d0
movzx eax, bl
jmp 0x140036842
mov al, 1
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.140229810
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
lea rcx, [rbp - 0x28]
call fcn.1400371e0
int3
Function at 0x14003fea0
Capabilities:
Initialize winsock library

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x1f0
mov rax, qword [0x1403aa6c8]
xor rax, rsp
mov qword [rsp + 0x1e0], rax
mov rdi, rcx
mov qword [rsp + 0x30], rcx
mov eax, 1
lock xadd dword [0x1403db848], eax
inc eax
cmp eax, 1
jne 0x14003fef9
lea ecx, [rax + 1]
lea rdx, [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_WSAStartup]
xchg dword [0x1403db84c], eax
xor ebp, ebp
mov ebx, ebp
lock xadd dword [0x1403db84c], ebx
test ebx, ebx
jne 0x14003ffde
lea ecx, [rbp + 0x38]
call fcn.140229738
mov rsi, rax
mov qword [rsp + 0x38], rax
mov rcx, rax
call fcn.14003f380
mov ebx, eax
call fcn.1400f7cd0
mov dword [rsp + 0x20], ebx
mov qword [rsp + 0x28], rax
lea rcx, [fcn.140029a90]
test ebx, ebx
cmove rcx, rbp
test rcx, rcx
jne 0x14003ffcc
mov qword [rsi + 0x28], rdi
mov ecx, 0xa0
call fcn.140229738
mov qword [rsp + 0x20], rax
lea r8, [rbp - 1]
mov rdx, rdi
mov rcx, rax
call fcn.14003f6b0
nop
mov qword [rsi + 0x30], rax
lea rcx, vtable.type_info.0
mov qword [rsp + 0x20], rcx
mov qword [rsp + 0x28], rbp
movups xmm0, xmmword [rsp + 0x20]
movups xmmword [rax + 8], xmm0
mov rcx, qword [rsi + 0x30]
mov qword [rcx + 0x20], rbp
mov qword [rdi + 8], rsi
mov rcx, qword [rsi + 0x30]
mov qword [rdi + 0x10], rcx
mov rax, rdi
mov rcx, qword [rsp + 0x1e0]
xor rcx, rsp
call fcn.140229810
lea r11, [rsp + 0x1f0]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
lea rdx, str.mutex
lea rcx, [rsp + 0x20]
call fcn.14002b060
nop
call fcn.1400f7cd0
mov dword [rsp + 0x20], ebx
mov qword [rsp + 0x28], rax
lea rdx, str.winsock
lea rcx, [rsp + 0x20]
call fcn.14002b060
int3
Function at 0x140040140
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x40
xor r15d, r15d
mov rsi, r9
mov rbp, rdx
mov r14, rcx
mov edi, r15d
cmp rcx, 0xffffffffffffffff
je 0x140040276
test r8b, r8b
je 0x1400401c8
test byte [rdx], 8
je 0x1400401c8
mov dword [rsp + 0x60], r15d
call fcn.1400f7cd0
or byte [rbp], 8
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
lea r9, [rsp + 0x60]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 0x80
mov rcx, r14
call qword [sym.imp.WS2_32.dll_setsockopt]
mov ebx, eax
call fcn.1400f7cd0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test ebx, ebx
jne 0x1400401c8
call fcn.1400f7cd0
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
mov edi, eax
call fcn.1400f7cd0
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], eax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rsi], xmm0
test edi, edi
je 0x140040276
call fcn.1400f7cd0
cmp qword [rsi + 8], rax
jne 0x140040211
cmp dword [rsi], 0x2733
je 0x140040224
call fcn.1400f7cd0
cmp qword [rsi + 8], rax
jne 0x14004028d
cmp dword [rsi], 0x4d5
jne 0x14004028d
lea r8, [rsp + 0x60]
mov dword [rsp + 0x60], r15d
mov edx, 0x8004667e
mov rcx, r14
call qword [sym.imp.WS2_32.dll_ioctlsocket]
and byte [rbp], 0xfc
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_closesocket]
mov edi, eax
call fcn.1400f7cd0
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], eax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rsi], xmm0
test edi, edi
jne 0x14004028d
mov dword [rsp + 0x30], r15d
call fcn.1400f7cd0
mov qword [rsp + 0x38], rax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rsi], xmm0
mov rbx, qword [rsp + 0x68]
mov eax, edi
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret
Function at 0x1400402b0
Capabilities:
Connect socket
Get socket status

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x388]
sub rsp, 0x488
mov rax, qword [0x1403aa6c8]
xor rax, rsp
mov qword [rbp + 0x370], rax
xor r15d, r15d
mov rsi, r9
mov rdi, r8
mov rbx, rdx
mov r14, rcx
cmp rcx, 0xffffffffffffffff
jne 0x1400402f8
mov dword [rsp + 0x30], 0x2719
jmp 0x140040339
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov r8d, edi
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.WS2_32.dll_connect]
mov edi, eax
call fcn.1400f7cd0
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], eax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rsi], xmm0
test edi, edi
jne 0x14004034b
mov dword [rsp + 0x30], r15d
call fcn.1400f7cd0
mov qword [rsp + 0x38], rax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rsi], xmm0
call fcn.1400f7cd0
cmp qword [rsi + 8], rax
jne 0x14004035e
cmp dword [rsi], 0x2734
je 0x140040379
call fcn.1400f7cd0
cmp qword [rsi + 8], rax
jne 0x1400404a9
cmp dword [rsi], 0x2733
jne 0x1400404a9
cmp r14, 0xffffffffffffffff
jne 0x140040391
mov dword [rsp + 0x30], 0x2719
call fcn.1400f7cd0
jmp 0x14004049c
xor ecx, ecx
mov qword [rbp + 0x168], r14
mov dword [rbp + 0x160], 1
mov qword [rsp + 0x58], r14
mov dword [rsp + 0x50], 1
call qword [sym.imp.WS2_32.dll_WSASetLastError]
lea ecx, [r14 + 1]
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x50]
xor edx, edx
lea r8, [rbp + 0x160]
call qword [sym.imp.WS2_32.dll_select]
mov edi, eax
call fcn.1400f7cd0
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], eax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rsi], xmm0
test edi, edi
js 0x1400404a9
mov dword [rsp + 0x30], r15d
call fcn.1400f7cd0
mov qword [rsp + 0x38], rax
xor ecx, ecx
movups xmm0, xmmword [rsp + 0x30]
mov dword [rsp + 0x40], r15d
movups xmmword [rsi], xmm0
call qword [sym.imp.WS2_32.dll_WSASetLastError]
lea rax, [rsp + 0x44]
mov dword [rsp + 0x44], 4
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov r8d, 0x1007
mov rcx, r14
call qword [sym.imp.WS2_32.dll_getsockopt]
mov edi, eax
call fcn.1400f7cd0
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], eax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rsi], xmm0
test edi, edi
jne 0x14004048a
mov dword [rsp + 0x30], r15d
call fcn.1400f7cd0
mov qword [rsp + 0x38], rax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rsi], xmm0
jmp 0x14004048f
cmp edi, 0xffffffff
je 0x1400404a9
call fcn.1400f7cd0
mov ecx, dword [rsp + 0x40]
mov dword [rsp + 0x30], ecx
mov qword [rsp + 0x38], rax
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rsi], xmm0
mov rcx, qword [rbp + 0x370]
xor rcx, rsp
call fcn.140229810
add rsp, 0x488
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret