joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140005600
Capabilities:
Create thread
Enumerate processes

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x2a0
mov rax, qword [0x140077020]
xor rax, rsp
mov qword [rsp + 0x298], rax
mov qword [rsp + 0x30], 0
xor edx, edx
mov ecx, 6
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0xffffffffffffffff
je 0x140005701
mov dword [rsp + 0x50], 0x238
lea rax, [rsp + 0x54]
mov rdi, rax
xor eax, eax
mov ecx, 0x234
rep stosb byte [rdi], al
lea rdx, [rsp + 0x50]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x1400056e2
lea rdx, str.CymulateEDRScenarioGenerator.exe
lea rcx, [rsp + 0x7c]
call fcn.140034ea4
test eax, eax
je 0x14000569d
lea rdx, str.CymulateEDRScenarioExecutor.exe
lea rcx, [rsp + 0x7c]
call fcn.140034ea4
test eax, eax
jne 0x1400056ce
mov r8d, dword [rsp + 0x58]
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x1400056ce
mov edx, 0xffffffff
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x1400056e2
lea rdx, [rsp + 0x50]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x140005673
cmp qword [rsp + 0x30], 0
je 0x1400056f5
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
jmp 0x140005703
mov rax, qword [rsp + 0x2b0]
cmp qword [rax + 0x88], 0
je 0x14000578b
mov rax, qword [rsp + 0x2b0]
mov r9, qword [rax + 0x88]
lea r8, [0x140065c30]
xor edx, edx
xor ecx, ecx
call fcn.1400043c0
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x40]
inc eax
cdqe
mov rcx, rax
call fcn.14001f190
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x2b0]
mov rcx, qword [rsp + 0x48]
mov qword [rax + 0x98], rcx
mov rax, qword [rsp + 0x2b0]
mov r8, qword [rax + 0x88]
lea rdx, str..pipe_s_p
mov rax, qword [rsp + 0x2b0]
mov rcx, qword [rax + 0x98]
call fcn.140004370
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9, qword [rsp + 0x2b0]
lea r8, [0x140004710]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rcx, qword [rsp + 0x2b0]
mov qword [rcx + 0x58], rax
mov rcx, qword [rsp + 0x298]
xor rcx, rsp
call fcn.14001ec40
add rsp, 0x2a0
pop rdi
ret
Function at 0x1400057e0
Capabilities:
Enumerate processes

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x280
mov rax, qword [0x140077020]
xor rax, rsp
mov qword [rsp + 0x278], rax
xor edx, edx
mov ecx, 6
call qword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0xffffffffffffffff
je 0x140005889
mov dword [rsp + 0x30], 0x238
lea rax, [rsp + 0x34]
mov rdi, rax
xor eax, eax
mov ecx, 0x234
rep stosb byte [rdi], al
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x14000587e
lea rdx, str.CymulateEDR.exe
lea rcx, [rsp + 0x5c]
call fcn.140034ea4
test eax, eax
jne 0x14000586a
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x1400058b7
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x140005846
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x290]
mov r8, qword [rax + 0x80]
lea rdx, str.Log:isEDRProcessRunning:false:_s__n
mov rcx, qword [rsp + 0x290]
call fcn.140004980
xor al, al
jmp 0x1400058b7
mov rcx, qword [rsp + 0x278]
xor rcx, rsp
call fcn.14001ec40
add rsp, 0x280
pop rdi
ret
Function at 0x14000eb60
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x58
mov dword [rsp + 0x40], 0
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x44], 0
mov eax, dword [rsp + 0x80]
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x30], 0
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, 1
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x14000ebeb
cmp qword [rsp + 0x60], 0
je 0x14000ebe4
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xor al, al
jmp 0x14000ece1
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0x40]
mov ecx, eax
call fcn.14003a28c
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
jne 0x14000ec25
cmp qword [rsp + 0x60], 0
je 0x14000ec1e
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xor al, al
jmp 0x14000ece1
mov eax, dword [rsp + 0x40]
mov edx, eax
mov rcx, qword [rsp + 0x48]
call fcn.14000e6b0
mov eax, dword [rsp + 0x80]
mov ecx, dword [rsp + 0x40]
mov r9d, eax
mov r8, qword [rsp + 0x78]
mov edx, ecx
mov rcx, qword [rsp + 0x48]
call fcn.14000e570
mov eax, dword [rsp + 0x80]
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x30], eax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 1
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x14000ecc7
cmp qword [rsp + 0x48], 0
je 0x14000ecb0
mov rcx, qword [rsp + 0x48]
call fcn.1400398b4
mov qword [rsp + 0x48], 0
cmp qword [rsp + 0x60], 0
je 0x14000ecc3
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xor al, al
jmp 0x14000ece1
mov rax, qword [rsp + 0x70]
mov ecx, dword [rsp + 0x40]
mov dword [rax], ecx
mov rax, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x48]
mov qword [rax], rcx
mov al, 1
add rsp, 0x58
ret
Function at 0x14000ecf0
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x48
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x34], 0
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x30], eax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, 1
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x14000ed70
cmp qword [rsp + 0x50], 0
je 0x14000ed69
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xor al, al
jmp 0x14000ee58
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x30]
mov ecx, eax
call fcn.14003a28c
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
jne 0x14000edaa
cmp qword [rsp + 0x50], 0
je 0x14000eda3
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xor al, al
jmp 0x14000ee58
mov eax, dword [rsp + 0x30]
mov edx, eax
mov rcx, qword [rsp + 0x38]
call fcn.14000e6b0
mov eax, dword [rsp + 0x70]
mov ecx, dword [rsp + 0x30]
mov r9d, eax
mov r8, qword [rsp + 0x68]
mov edx, ecx
mov rcx, qword [rsp + 0x38]
call fcn.14000e570
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x30], eax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 1
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x14000ee3e
cmp qword [rsp + 0x38], 0
je 0x14000ee27
mov rcx, qword [rsp + 0x38]
call fcn.1400398b4
mov qword [rsp + 0x38], 0
cmp qword [rsp + 0x50], 0
je 0x14000ee3a
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
xor al, al
jmp 0x14000ee58
mov rax, qword [rsp + 0x60]
mov ecx, dword [rsp + 0x30]
mov dword [rax], ecx
mov rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x38]
mov qword [rax], rcx
mov al, 1
add rsp, 0x48
ret
Function at 0x14000f970
Capabilities:
Get hostname

Disassembly:
sub rsp, 0x58
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x20], 0
lea r8, [rsp + 0x20]
xor edx, edx
mov ecx, 5
call qword [sym.imp.KERNEL32.dll_GetComputerNameExW]
test eax, eax
jne 0x14000fa29
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x14000fa29
cmp dword [rsp + 0x20], 1
jbe 0x14000fa29
mov eax, dword [rsp + 0x20]
mov qword [rsp + 0x38], rax
mov eax, 2
mov rcx, qword [rsp + 0x38]
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.14001f190
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x20]
mov rdx, qword [rsp + 0x28]
mov ecx, 5
call qword [sym.imp.KERNEL32.dll_GetComputerNameExW]
test eax, eax
je 0x14000fa10
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x30], rax
jmp 0x14000fa29
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x48], rax
mov edx, 2
mov rcx, qword [rsp + 0x48]
call fcn.14001ec60
mov rax, qword [rsp + 0x30]
add rsp, 0x58
ret

Function at 0x14000fa40
Capabilities:
Resolve dns

Disassembly:
sub rsp, 0x58
mov qword [rsp + 0x48], 0
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x14000fac7
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x40]
mov rcx, qword [rcx + 0x18]
mov rax, qword [rax + rcx]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx eax, byte [rax + 3]
mov rcx, qword [rsp + 0x38]
movzx ecx, byte [rcx + 2]
mov rdx, qword [rsp + 0x38]
movzx edx, byte [rdx + 1]
mov r8, qword [rsp + 0x38]
movzx r8d, byte [r8]
mov dword [rsp + 0x30], r8d
mov dword [rsp + 0x20], eax
mov r9d, ecx
mov r8d, edx
mov eax, dword [rsp + 0x30]
mov edx, eax
lea rcx, [0x140066708]
call fcn.140001b20
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
add rsp, 0x58
ret

Function at 0x14000fae0
Capabilities:
Resolve dns

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov qword [rsp + 0x38], 0
lea r9, [rsp + 0x30]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.WS2_32.dll_GetAddrInfoW]
cmp qword [rsp + 0x30], 0
je 0x14000fbc8
mov ecx, 0x18
call fcn.14001ef04
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x14000fb3b
mov rcx, qword [rsp + 0x40]
call fcn.14000fd10
mov qword [rsp + 0x48], rax
jmp 0x14000fb44
mov qword [rsp + 0x48], 0
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x28], rax
jmp 0x14000fb68
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 0x28]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x14000fbbd
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 0x20]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x14000fbbb
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 4]
bswap eax
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0
je 0x14000fbbb
cmp dword [rsp + 0x20], 0xffffffff
je 0x14000fbbb
cmp dword [rsp + 0x20], 0x7f000001
je 0x14000fbbb
lea rdx, [rsp + 0x20]
mov rcx, qword [rsp + 0x38]
call fcn.14000fcc0
jmp 0x14000fb5a
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_FreeAddrInfoW]
mov rax, qword [rsp + 0x38]
add rsp, 0x68
ret
Function at 0x1400163f0
Capabilities:
Create tcp socket
Set socket configuration

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x58
mov qword [rsp + 0x48], 0xffffffffffffffff
mov r8d, 6
mov edx, 1
mov ecx, 2
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0xffffffffffffffff
je 0x1400164fb
mov dword [rsp + 0x34], 1
mov dword [rsp + 0x38], 1
mov byte [rsp + 0x30], 1
mov dword [rsp + 0x3c], 1
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x34]
mov r8d, 0xffffff7f
mov edx, 0xffff
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x1400164e0
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x38]
mov r8d, 8
mov edx, 0xffff
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x1400164e0
mov dword [rsp + 0x20], 1
lea r9, [rsp + 0x30]
mov r8d, 1
mov edx, 6
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x1400164e0
lea r8, [rsp + 0x3c]
mov edx, 0x8004667e
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x1400164e0
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x48], rax
jmp 0x1400164fb
mov edx, 2
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, qword [rsp + 0x48]
add rsp, 0x58
ret

Function at 0x140016590
Capabilities:
Connect socket
Get socket status

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x270
mov rax, qword [0x140077020]
xor rax, rsp
mov qword [rsp + 0x260], rax
lea rax, [rsp + 0x38]
mov rdi, rax
xor eax, eax
mov ecx, reloc.WS2_32.dll_recv
rep stosb byte [rdi], al
mov eax, 2
mov word [rsp + 0x38], ax
mov rax, qword [rsp + 0x280]
mov eax, dword [rax + 0x50]
bswap eax
mov dword [rsp + 0x3c], eax
mov cx, 0x1bd
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x3a], ax
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x38]
mov rcx, qword [rsp + 0x288]
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x14001661d
mov al, 1
jmp 0x1400166c5
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x1400166c3
lea rax, [rsp + 0x50]
mov rdi, rax
xor eax, eax
mov ecx, 0x208
rep stosb byte [rdi], al
mov dword [rsp + 0x50], 1
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x288]
mov qword [rsp + rax + 0x58], rcx
lea rax, [rsp + 0x30]
mov rdi, rax
xor eax, eax
mov ecx, 8
rep stosb byte [rdi], al
xor edx, edx
mov eax, dword [rsp + 0x290]
mov ecx, 0x3e8
div ecx
mov dword [rsp + 0x30], eax
xor edx, edx
mov eax, dword [rsp + 0x290]
mov ecx, 0x3e8
div ecx
mov eax, edx
imul eax, eax, 0x3e8
mov dword [rsp + 0x34], eax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8, [rsp + 0x50]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 1
jne 0x1400166c3
mov al, 1
jmp 0x1400166c5
xor al, al
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.14001ec40
add rsp, 0x270
pop rdi
ret
Function at 0x140016710
Capabilities:
Check for time delay via gettickcount
Send data
Send data on socket

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x20]
cmp dword [rsp + 0x58], eax
je 0x1400167d9
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [rsp + 0x2c]
cmp eax, 0x7530
jae 0x1400167bf
mov eax, dword [rsp + 0x20]
mov ecx, dword [rsp + 0x58]
sub ecx, eax
mov eax, ecx
mov ecx, dword [rsp + 0x20]
mov rdx, qword [rsp + 0x50]
add rdx, rcx
mov rcx, rdx
xor r9d, r9d
mov r8d, eax
mov rdx, rcx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.WS2_32.dll_send]
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 0xffffffff
je 0x1400167a5
mov eax, dword [rsp + 0x24]
mov ecx, dword [rsp + 0x20]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x20], eax
jmp 0x1400167bd
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x1400167bd
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1400167d4
lea rdx, str.Log:SmbClient::SendPacket___Operation_timed_out._r_n
mov rcx, qword [0x140079cc8]
call fcn.140004bb0
jmp 0x1400167d9
jmp 0x14001673a
mov eax, dword [rsp + 0x20]
cmp dword [rsp + 0x58], eax
jne 0x1400167ed
mov dword [rsp + 0x28], 1
jmp 0x1400167f5
mov dword [rsp + 0x28], 0
movzx eax, byte [rsp + 0x28]
add rsp, 0x38
ret

Function at 0x140016800
Capabilities:
Check for time delay via gettickcount
Receive data
Receive data on socket

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x48
mov dword [rsp + 0x24], 0
mov byte [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x24]
cmp dword [rsp + 0x68], eax
je 0x1400168ce
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [rsp + 0x30]
cmp eax, 0x7530
jae 0x1400168b4
mov eax, dword [rsp + 0x24]
mov ecx, dword [rsp + 0x68]
sub ecx, eax
mov eax, ecx
mov ecx, dword [rsp + 0x24]
mov rdx, qword [rsp + 0x60]
add rdx, rcx
mov rcx, rdx
xor r9d, r9d
mov r8d, eax
mov rdx, rcx
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.WS2_32.dll_recv]
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0xffffffff
je 0x14001689a
mov eax, dword [rsp + 0x28]
mov ecx, dword [rsp + 0x24]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x24], eax
jmp 0x1400168b2
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x1400168b2
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1400168c9
lea rdx, str.Log:SmbClient::ReceivePacket___Operation_timeout._r_n
mov rcx, qword [0x140079cc8]
call fcn.140004bb0
jmp 0x1400168ce
jmp 0x14001682f
mov eax, dword [rsp + 0x24]
cmp dword [rsp + 0x68], eax
jne 0x1400168e2
mov dword [rsp + 0x2c], 1
jmp 0x1400168ea
mov dword [rsp + 0x2c], 0
movzx eax, byte [rsp + 0x2c]
add rsp, 0x48
ret
Function at 0x140019370
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rdi
sub rsp, 0x70
mov rax, qword [0x140077020]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x48], 0
mov edx, 8
lea rcx, [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_SystemFunction036]
lea rax, [rsp + 0x50]
mov rdi, rax
xor eax, eax
mov ecx, reloc.WS2_32.dll_recv
rep stosb byte [rdi], al
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [rsp + 0x5c]
movzx ecx, word [rsp + 0x5a]
movzx edx, word [rsp + 0x58]
movzx edi, word [rsp + 0x56]
movzx r8d, word [rsp + 0x52]
movzx r9d, word [rsp + 0x50]
mov dword [rsp + 0x40], r9d
mov r10, qword [rsp + 0x48]
mov qword [rsp + 0x38], r10
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], edx
mov r9d, edi
mov eax, dword [rsp + 0x40]
mov edx, eax
lea rcx, str._04u_02u_02u_02u_02u_02u_llu
call fcn.140001b20
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.14001ec40
add rsp, 0x70
pop rdi
ret

Function at 0x14001a8b0
Capabilities:
Connect network resource

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x60
lea rax, [rsp + 0x30]
mov rdi, rax
xor eax, eax
mov ecx, gethostbyname
rep stosb byte [rdi], al
mov dword [rsp + 0x20], 0xffffffff
mov dword [rsp + 0x34], 0
mov r8, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x70]
lea rcx, str._ls_ls
call fcn.140001b20
mov qword [rsp + 0x48], rax
xor r9d, r9d
mov r8, qword [rsp + 0x80]
mov rdx, qword [rsp + 0x88]
lea rcx, [rsp + 0x30]
call qword [sym.imp.MPR.dll_WNetAddConnection2W]
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0
jne 0x14001a935
mov rax, qword [rsp + 0x48]
jmp 0x14001a950
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov edx, 2
mov rcx, qword [rsp + 0x28]
call fcn.14001ec60
xor eax, eax
add rsp, 0x60
pop rdi
ret
Function at 0x14001f924
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14001f96e
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14001f96e
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14001f96e
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14001f96e
cmp dword [rcx + 0x84], 0xe
jbe 0x14001f96e
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x14001f970
xor al, al
add rsp, 0x28
ret

Function at 0x1400209e0
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x680
mov rax, qword [0x140077020]
xor rax, rsp
mov qword [rsp + 0x670], rax
cmp dword [rdx], 0
mov r14, rdx
mov rsi, rcx
jne 0x140020b5b
xor r15d, r15d
nop
mov rcx, rsi
call fcn.140022330
xor edx, edx
lea rcx, [rsp + 0x250]
mov r8d, 0x208
mov rdi, rax
call fcn.140030e60
xor edx, edx
mov dword [rsp + 0x250], 1
mov r8d, 0x208
mov qword [rsp + 0x258], rdi
lea rcx, [rsp + 0x40]
call fcn.140030e60
xor edx, edx
mov dword [rsp + 0x40], 1
mov r8d, 0x208
mov qword [rsp + 0x48], rdi
lea rcx, [rsp + 0x460]
call fcn.140030e60
mov qword [rsp + 0x30], r15
mov rcx, rsi
mov dword [rsp + 0x460], 1
mov qword [rsp + 0x468], rdi
mov dword [rsp + 0x30], 2
call fcn.140023c40
test al, 0x10
lea r8, [rsp + 0x250]
mov ebp, eax
lea rdx, [rsp + 0x40]
cmove r8, r15
lea r9, [rsp + 0x460]
mov ebx, eax
and ebp, 0x300
lea rax, [rsp + 0x30]
cmove rdx, r15
mov qword [rsp + 0x20], rax
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
js 0x140020bab
test ebp, ebp
je 0x140020b07
lea rdx, [rsp + 0x40]
mov rcx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x140020b0d
and ebx, 0xfffffcff
test bl, 0x10
je 0x140020b26
lea rdx, [rsp + 0x250]
mov rcx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x140020b29
and ebx, 0xffffffef
lea rdx, [rsp + 0x460]
mov rcx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x140020b40
or ebx, 1
test ebx, ebx
je 0x140020b52
mov edx, ebx
mov rcx, rsi
call fcn.140023a40
test eax, eax
js 0x140020b8a
cmp dword [r14], r15d
je 0x140020a20
xor eax, eax
mov rcx, qword [rsp + 0x670]
xor rcx, rsp
call fcn.14001ec40
lea r11, [rsp + 0x680]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rdi
ret
mov rcx, rsi
call fcn.14001fd10
mov r8, rax
lea rdx, str.smb2_service_failed_with_:__s_n
mov rcx, rsi
call fcn.14001fe40
mov eax, 0xffffffff
jmp 0x140020b5d
lea rdx, str.Select_failed
mov rcx, rsi
call fcn.14001fe40
mov eax, 0xffffffff
jmp 0x140020b5d
Function at 0x140022870
Capabilities:
Enumerate pe sections

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rax, qword [rcx + 0x88]
mov rdi, rdx
mov qword [r8 + 0x18], rax
mov rdx, rcx
mov rcx, qword [rcx + 0x88]
mov rbx, r8
inc rcx
mov qword [rdx + 0x88], rcx
movzx eax, word [r8 + 6]
cmp ax, 1
jbe 0x1400228ba
movzx eax, ax
dec rcx
add rcx, rax
mov qword [rdx + 0x88], rcx
mov rcx, qword [rdi]
mov edx, 4
mov eax, dword [r8]
mov dword [rcx], eax
mov rcx, rdi
movzx r8d, word [r8 + 4]
call fcn.140022fa0
movzx r8d, word [rbx + 6]
mov edx, 6
mov rcx, rdi
call fcn.140022fa0
mov r8d, dword [rbx + 8]
mov edx, 8
mov rcx, rdi
call fcn.140022fc0
movzx r8d, word [rbx + 0xc]
mov edx, reloc.WS2_32.dll_inet_ntoa
mov rcx, rdi
call fcn.140022fa0
movzx r8d, word [rbx + 0xe]
mov edx, recv
mov rcx, rdi
call fcn.140022fa0
mov r8d, dword [rbx + 0x10]
mov edx, reloc.WS2_32.dll_recv
mov rcx, rdi
call fcn.140022fc0
mov r8d, dword [rbx + 0x14]
mov edx, shutdown
mov rcx, rdi
call fcn.140022fc0
mov r8, qword [rbx + 0x18]
mov edx, 0x18
mov rcx, rdi
call fcn.140022fe0
test byte [rbx + 0x10], 2
mov edx, 0x20
mov rcx, rdi
je 0x140022967
mov r8, qword [rbx + 0x20]
call fcn.140022fe0
jmp 0x140022981
mov r8d, dword [rbx + 0x20]
call fcn.140022fc0
mov r8d, dword [rbx + 0x24]
mov edx, 0x24
mov rcx, rdi
call fcn.140022fc0
mov r8, qword [rbx + 0x28]
mov edx, 0x28
mov rcx, rdi
call fcn.140022fe0
movups xmm0, xmmword [rbx + 0x30]
mov rax, qword [rdi]
mov rbx, qword [rsp + 0x30]
movups xmmword [rax + 0x30], xmm0
add rsp, 0x20
pop rdi
ret

Function at 0x140023020
Capabilities:
Set socket configuration

Disassembly:
sub rsp, 0x28
lea r8, [rsp + 0x38]
mov dword [rsp + 0x38], 1
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
add rsp, 0x28
ret

Function at 0x140023050
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
mov dword [rsp + 0x18], r8d
push rdi
sub rsp, 0x30
mov rdi, rcx
mov ebx, edx
lea rcx, [0x140059184]
call qword [sym.imp.WS2_32.dll_getprotobyname]
test rax, rax
je 0x14002309e
movsx edx, word [rax + 0x10]
lea r9, [rsp + 0x50]
mov r8d, ebx
mov dword [rsp + 0x20], 4
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
mov rbx, qword [rsp + 0x40]
mov eax, 0xffffffff
add rsp, 0x30
pop rdi
ret