joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140074fd8
Capabilities:
Get hostname
Initialize winsock library
Resolve dns

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x2c0
mov rdi, rdx
movsxd rbx, ecx
lea rdx, [rsp + 0x120]
mov ecx, 0x101
call qword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
jne 0x1400750b6
lea rcx, [rsp + 0x20]
mov edx, 0x100
call qword [sym.imp.WSOCK32.dll_gethostname]
lea rcx, [rsp + 0x20]
call qword [sym.imp.WSOCK32.dll_gethostbyname]
test rax, rax
je 0x1400750b6
mov r9, qword [rax + 0x18]
xor ecx, ecx
cmp qword [r9], rcx
je 0x140075044
mov rax, r9
lea rax, [rax + 8]
inc ecx
cmp qword [rax], 0
jne 0x140075038
cmp ebx, ecx
jle 0x140075059
lea rdx, str.0.0.0.0
mov rcx, rdi
call fcn.140027168
jmp 0x1400750ae
mov rdx, qword [r9 + rbx*8 - 8]
lea rcx, [rsp + 0x2e0]
mov r8d, 4
call fcn.140026930
mov ecx, dword [rsp + 0x2e0]
call qword [sym.imp.WSOCK32.dll_inet_ntoa]
lea rcx, [rsp + 0x20]
mov rdx, rax
call fcn.140028bd0
lea rcx, [rsp + 0x20]
or edx, 0xffffffff
call fcn.1400760a8
mov rcx, rdi
mov rdx, rax
mov rbx, rax
call fcn.140027168
mov rcx, rbx
call fcn.140026914
call qword [sym.imp.WSOCK32.dll_WSACleanup]
jmp 0x1400750c5
lea rdx, [0x1400ac2e8]
mov rcx, rdi
call fcn.140027168
mov rbx, qword [rsp + 0x2d0]
add rsp, 0x2c0
pop rdi
ret

Function at 0x1400750d8
Capabilities:
Get common file path

Disassembly:
push rbx
sub rsp, 0x240
lea rax, [rsp + 0x30]
mov rbx, rdx
mov edx, ecx
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov qword [rsp + 0x20], rax
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.14001efd8
add rsp, 0x240
pop rbx
ret

Function at 0x140075360
Capabilities:
Get token membership

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
mov rbp, rsp
sub rsp, 0x60
xor ebx, ebx
lea rax, [rbp + 0x20]
lea rcx, [rbp + 0x18]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], ebx
mov dword [rsp + 0x40], ebx
mov dword [rsp + 0x38], ebx
mov dword [rsp + 0x30], ebx
lea r8d, [rbx + 0x20]
mov r9d, 0x220
mov dl, 2
mov dword [rsp + 0x28], ebx
mov dword [rbp + 0x18], ebx
mov word [rbp + 0x1c], 0x500
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [rbp + 0x10], eax
test eax, eax
je 0x1400753da
mov rdx, qword [rbp + 0x20]
lea r8, [rbp + 0x10]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
neg eax
sbb ecx, ecx
and dword [rbp + 0x10], ecx
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [rbp + 0x10]
mov rbx, qword [rsp + 0x88]
cmp eax, 1
sete al
add rsp, 0x60
pop rbp
ret

Function at 0x140075484
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14007549b
test al, 0x10
je 0x14007549b
mov al, 1
jmp 0x14007549d
xor al, al
add rsp, 0x28
ret
Function at 0x140075518
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x40
mov ebx, dword [rsp + 0x80]
xor edi, edi
mov esi, r9d
mov rbp, r8
mov r14, rdx
mov r15, rcx
mov byte [0x1400e351f], dil
test ebx, ebx
je 0x14007558e
mov byte [0x1400e3520], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea r9, [rsp + 0x30]
mov dword [rsp + 0x30], eax
lea rax, [rsp + 0x80]
lea r8, [0x140075a54]
mov qword [rsp + 0x28], rax
and dword [rsp + 0x20], edi
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x34], ebx
call fcn.140028508
mov rdi, rax
mov r9d, esi
mov r8, rbp
mov rdx, r14
mov rcx, r15
call qword [sym.imp.USER32.dll_MessageBoxW]
mov ebx, eax
test rdi, rdi
je 0x1400755c3
or edx, 0xffffffff
mov rcx, rdi
mov byte [0x1400e3520], 0
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
or eax, 0xffffffff
cmp byte [0x1400e351f], 1
cmove ebx, eax
mov eax, ebx
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret
Function at 0x1400757a0
Capabilities:
Move file

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
lea rbp, [rax - 0x203d8]
mov eax, 0x204d0
call fcn.140038f70
sub rsp, rax
mov dil, r8b
mov rbx, rdx
mov esi, 0x7fff
lea r8, [rbp + 0x103d0]
mov edx, esi
call fcn.140074f74
lea r8, [rbp + 0x3d0]
mov edx, esi
mov rcx, rbx
call fcn.140074f74
lea rcx, [rbp + 0x103d0]
call fcn.140075484
xor esi, esi
test al, al
jne 0x140075807
xor al, al
jmp 0x1400759e1
lea rcx, [rbp + 0x3d0]
call fcn.140075484
test al, al
je 0x1400758ca
test dil, dil
je 0x140075800
lea rdx, [rbp + 0x3d0]
lea rcx, [rbp + 0x103d0]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
lea rcx, [rbp + 0x103d0]
test eax, eax
jne 0x140075874
lea rdx, [rbp + 0x3d0]
call fcn.140027bd4
test eax, eax
je 0x14007586d
lea rdx, [rbp + 0x3d0]
lea rcx, [rbp + 0x103d0]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
setne al
jmp 0x1400759e1
mov al, 1
jmp 0x1400759e1
lea rax, [rbp - 0x50]
lea r9, [rbp + 0x1c0]
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rax
call fcn.140028800
lea rdx, [0x1400ac49c]
lea rcx, [rbp + 0x3d0]
call fcn.14002713c
lea rdx, [rbp + 0x1c0]
lea rcx, [rbp + 0x3d0]
call fcn.14002713c
cmp word [rbp - 0x50], si
je 0x1400758ca
lea rdx, [rbp - 0x50]
lea rcx, [rbp + 0x3d0]
call fcn.14002713c
lea rdx, [rbp + 0x3d0]
lea rcx, [rsp + 0x30]
call fcn.14001f29c
lea rdx, [rbp + 0x103d0]
lea rcx, [rbp - 0x78]
call fcn.14001f29c
lea rdx, [rsp + 0x30]
lea rcx, [rbp - 0x78]
call fcn.1400753f0
lea rcx, [rbp - 0x78]
mov bl, al
call fcn.14001c5f8
lea rcx, [rsp + 0x30]
call fcn.14001c5f8
lea rdx, [rbp + 0x3d0]
lea rcx, [rbp + 0x103d0]
test bl, bl
je 0x140075960
mov r8b, 1
call fcn.140073a5c
test al, al
je 0x140075800
lea rdx, [rbp + 0x103d0]
lea rcx, [rsp + 0x30]
call fcn.14001f29c
lea rcx, [rsp + 0x30]
mov dl, 1
call fcn.140075c38
lea rcx, [rsp + 0x30]
test al, al
sete bl
call fcn.14001c5f8
test bl, bl
jmp 0x1400759de
call fcn.140027bd4
test eax, eax
je 0x140075800
lea rcx, [rbp + 0x103d0]
call fcn.140026f78
lea rcx, [rbp + 0x3d0]
mov word [rbp + rax*2 + 0x103d2], si
call fcn.140026f78
lea rcx, [rsp + 0x50]
xorps xmm0, xmm0
mov word [rbp + rax*2 + 0x3d2], si
lea rax, [rbp + 0x103d0]
movdqu xmmword [rsp + 0x78], xmm0
mov qword [rsp + 0x60], rax
lea rax, [rbp + 0x3d0]
mov dword [rsp + 0x74], esi
mov qword [rsp + 0x68], rax
mov eax, 0x614
mov qword [rsp + 0x50], rsi
mov word [rsp + 0x70], ax
mov dword [rsp + 0x58], 1
call qword [sym.imp.SHELL32.dll_SHFileOperationW]
test eax, eax
sete al
lea r11, [rsp + 0x204d0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret
Function at 0x140075c38
Capabilities:
Delete directory
Delete file

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdi
push rbp
lea rbp, [rsp - 0xff60]
mov eax, 0x10060
call fcn.140038f70
sub rsp, rax
mov rcx, qword [rcx]
mov bl, dl
lea r8, [rsp + 0x60]
mov edx, 0x7fff
call fcn.140074f74
lea rcx, [rsp + 0x60]
call fcn.140075484
xor edi, edi
test al, al
je 0x140075cdf
lea rcx, [rsp + 0x60]
test bl, bl
jne 0x140075c92
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
setne al
jmp 0x140075cdf
call fcn.140026f78
xorps xmm0, xmm0
lea rcx, [rsp + 0x20]
mov word [rsp + rax*2 + 0x62], di
lea rax, [rsp + 0x60]
mov qword [rsp + 0x38], rdi
movdqu xmmword [rsp + 0x48], xmm0
mov qword [rsp + 0x30], rax
mov eax, 0x614
mov dword [rsp + 0x44], edi
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x28], 3
mov word [rsp + 0x40], ax
call qword [sym.imp.SHELL32.dll_SHFileOperationW]
test eax, eax
sete al
lea r11, [rsp + 0x10060]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x18]
mov rsp, r11
pop rbp
ret

Function at 0x140075cf4
Capabilities:
Shutdown system

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x50
mov esi, edx
mov edi, ecx
lea rdx, str.SeShutdownPrivilege
lea rcx, [rsp + 0x30]
call fcn.140073930
lea rcx, [rsp + 0x30]
call fcn.140066d9c
xor ebx, ebx
test al, al
je 0x140075d83
cmp edi, 0x20
je 0x140075d72
cmp edi, 0x40
je 0x140075d77
test dil, 0xb
jne 0x140075d44
xor edx, edx
mov ecx, edi
call qword [sym.imp.USER32.dll_ExitWindowsEx]
jmp 0x140075d81
test dil, 0x14
mov r9d, ebx
mov eax, 1
cmovne r9d, eax
test dil, 2
mov dword [rsp + 0x28], esi
cmovne ebx, eax
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_InitiateSystemShutdownExW]
jmp 0x140075d81
mov ebx, 1
xor edx, edx
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetSystemPowerState]
mov ebx, eax
lea rcx, [rsp + 0x30]
call fcn.1400664a8
mov rsi, qword [rsp + 0x68]
mov eax, ebx
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rdi
ret

Function at 0x140075da0
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
test ecx, ecx
js 0x140075e21
push rbx
sub rsp, 0x20
mov ebx, ecx
test ecx, ecx
je 0x140075e16
cmp ecx, 0xf
jae 0x140075e14
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x140075e14
lea rcx, [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x38]
xorps xmm1, xmm1
xorps xmm0, xmm0
sub rax, qword [rsp + 0x40]
cvtsi2sd xmm0, qword [rsp + 0x48]
cvtsi2sd xmm1, rax
divsd xmm1, xmm0
mulsd xmm1, qword [0x1400bb048]
cvttsd2si rax, xmm1
cmp eax, ebx
jb 0x140075dce
jmp 0x140075e1c
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_Sleep]
add rsp, 0x20
pop rbx
ret
Function at 0x140075fc4
Capabilities:
Terminate process

Disassembly:
push rbx
sub rsp, 0x40
xor r9d, r9d
xor r8d, r8d
mov rbx, rcx
lea edx, [r9 + 0x10]
call qword [sym.imp.USER32.dll_PostMessageW]
xor r9d, r9d
lea rax, [rsp + 0x60]
mov qword [rsp + 0x30], rax
lea edx, [r9 + 0x10]
xor r8d, r8d
mov rcx, rbx
mov dword [rsp + 0x28], 0x1f4
mov dword [rsp + 0x20], 2
call qword [sym.imp.USER32.dll_SendMessageTimeoutW]
test rax, rax
jne 0x140076046
lea rdx, [rsp + 0x58]
mov rcx, rbx
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov r8d, dword [rsp + 0x58]
xor edx, edx
mov ecx, 0x1f0fff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
xor edx, edx
mov rcx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rsp, 0x40
pop rbx
ret

Function at 0x140077fd8
Capabilities:
Create pipe

Disassembly:
push rbx
sub rsp, 0x60
mov eax, dword [rcx]
and dword [rsp + 0x50], 0
and qword [rsp + 0x48], 0
mov rbx, r9
mov dword [rsp + 0x40], reloc.OLEAUT32.dll_SafeArrayGetElement
test al, 0x10
je 0x140078026
mov ecx, r8d
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [rbx], rax
cmp rax, 0xffffffffffffffff
je 0x1400780b3
mov r8d, 1
mov rdx, rbx
mov rcx, rax
call fcn.140077df4
jmp 0x1400780dc
test edx, eax
je 0x14007805c
mov rax, qword [r9]
test rax, rax
jne 0x1400780df
mov rcx, qword [rsp + 0x90]
lea r8, [rsp + 0x40]
xor r9d, r9d
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x1400780b9
or rax, 0xffffffffffffffff
jmp 0x1400780df
mov ecx, r8d
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [rbx], rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
jbe 0x140078010
and qword [rsp + 0x30], 0
lea r9, [rsp + 0x40]
lea rcx, [0x1400cf9e0]
mov edx, 0x40000000
mov r8d, 2
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbx], rax
inc rax
test rax, 0xfffffffffffffffe
jne 0x1400780b9
and qword [rbx], 0
jmp 0x1400780dc
mov rcx, qword [rbx]
lea rdx, [rsp + 0x70]
mov r8d, 1
call fcn.140077df4
mov rcx, rbx
call fcn.140077da4
mov rax, qword [rsp + 0x70]
mov qword [rbx], rax
mov rax, qword [rbx]
add rsp, 0x60
pop rbx
ret
Function at 0x1400780e8
Capabilities:
Create pipe

Disassembly:
push rbx
sub rsp, 0x60
mov eax, dword [rcx]
and dword [rsp + 0x50], 0
and qword [rsp + 0x48], 0
mov rbx, r9
mov dword [rsp + 0x40], reloc.OLEAUT32.dll_SafeArrayGetElement
test al, 0x10
je 0x140078138
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [rbx], rax
cmp rax, 0xffffffffffffffff
je 0x1400781c7
mov r8d, 1
mov rdx, rbx
mov rcx, rax
call fcn.140077df4
jmp 0x1400781f0
test al, 1
je 0x14007816e
mov rax, qword [r9]
test rax, rax
jne 0x1400781f3
mov rdx, qword [rsp + 0x90]
lea r8, [rsp + 0x40]
xor r9d, r9d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x1400781cd
or rax, 0xffffffffffffffff
jmp 0x1400781f3
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov r8d, 1
lea rcx, [rax - 1]
mov qword [rbx], rax
cmp rcx, 0xfffffffffffffffd
jbe 0x140078128
and qword [rsp + 0x30], 0
lea r9, [rsp + 0x40]
lea rcx, [0x1400cf9e0]
mov edx, 0x80000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbx], rax
inc rax
test rax, 0xfffffffffffffffe
jne 0x1400781cd
and qword [rbx], 0
jmp 0x1400781f0
mov rcx, qword [rbx]
lea rdx, [rsp + 0x70]
mov r8d, 1
call fcn.140077df4
mov rcx, rbx
call fcn.140077da4
mov rax, qword [rsp + 0x70]
mov qword [rbx], rax
mov rax, qword [rbx]
add rsp, 0x60
pop rbx
ret

Function at 0x1400782f8
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x30
and dword [rsp + 0x58], 0
call fcn.140078360
test al, al
je 0x14007833a
test rdx, rdx
je 0x14007833a
test r8, r8
je 0x14007833a
and qword [rsp + 0x20], 0
lea rbx, [rcx + 0x28]
lea r9, [rsp + 0x58]
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14007833a
mov rcx, rbx
call fcn.140077da4
mov eax, dword [rsp + 0x58]
add rsp, 0x30
pop rbx
ret

Function at 0x1400785bc
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0x30
cmp qword [rcx + 0x58], 0
mov rbx, rcx
jne 0x1400785f3
lea rax, [rsp + 0x40]
mov r9, rcx
lea r8, [0x1400785ac]
mov qword [rsp + 0x28], rax
and dword [rsp + 0x20], 0
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbx + 0x58], rax
add rsp, 0x30
pop rbx
ret

Function at 0x1400785fc
Capabilities:
Terminate thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
lea rsi, [rcx + 0x58]
mov rdi, rcx
cmp qword [rsi], 0
je 0x140078664
mov eax, dword [rcx + 0x60]
mov ebp, 0x1f6
xchg dword [rcx + 0x60], eax
cmp eax, ebp
je 0x140078664
add rcx, 0x28
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [rsi]
mov edx, ebp
call qword [sym.imp.KERNEL32.dll_TerminateThread]
mov rcx, qword [rsi]
mov edx, 0x3e8
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rsi
call fcn.140077da4
xchg dword [rdi + 0x60], ebp
lea rcx, [rdi + 0x28]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140079eec
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
sub rsp, 0x28
dec dword [reloc.WSOCK32.dll_accept]
jne 0x140079efd
call fcn.140079fe8
mov rax, qword [0x1400e6180]
mov ecx, dword [rax]
add rax, 4
mov qword [0x1400e6180], rax
mov eax, ecx
shr eax, 0xb
xor ecx, eax
mov eax, ecx
and eax, 0xff3a58ad
shl eax, 7
xor ecx, eax
mov eax, ecx
and eax, 0xffffdf8c
shl eax, 0xf
xor ecx, eax
mov eax, ecx
shr eax, 0x12
xor eax, ecx
shr eax, 1
add rsp, 0x28
ret

Function at 0x140079f40
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
sub rsp, 0x28
dec dword [reloc.WSOCK32.dll_accept]
jne 0x140079f51
call fcn.140079fe8
mov rax, qword [0x1400e6180]
xorps xmm0, xmm0
mov ecx, dword [rax]
add rax, 4
mov qword [0x1400e6180], rax
mov eax, ecx
shr eax, 0xb
xor ecx, eax
mov eax, ecx
and eax, 0xff3a58ad
shl eax, 7
xor ecx, eax
mov eax, ecx
and eax, 0xffffdf8c
shl eax, 0xf
xor ecx, eax
mov eax, ecx
shr eax, 0x12
xor eax, ecx
cvtsi2sd xmm0, rax
mulsd xmm0, qword [0x1400d1218]
add rsp, 0x28
ret

Function at 0x140079fa0
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov r8d, 1
mov dword [0x1400e57c0], ecx
lea rdx, [0x1400e57c4]
mov ecx, r8d
mov eax, dword [rdx - 4]
shr eax, 0x1e
xor eax, dword [rdx - 4]
imul eax, eax, 0x6c078965
add eax, ecx
add ecx, r8d
mov dword [rdx], eax
lea rdx, [rdx + 4]
cmp ecx, 0x270
jl 0x140079fb6
mov dword [reloc.WSOCK32.dll_accept], r8d
mov dword [0x1400e57a8], r8d
ret

Function at 0x140079fe8
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push rbx
sub rsp, 0x20
cmp dword [0x1400e57a8], 0
lea rbx, [0x1400e57c0]
jne 0x14007a00d
xor ecx, ecx
call fcn.14002af14
mov rcx, rax
call fcn.140079fa0
mov dword [reloc.WSOCK32.dll_accept], 0x270
mov qword [0x1400e6180], rbx
mov r9d, 0xe3
mov r10d, 0x9908b0df
mov r11d, 0x7ffffffe
mov edx, dword [rbx + 4]
mov al, dl
and al, 1
neg al
sbb ecx, ecx
xor edx, dword [rbx]
and edx, r11d
and ecx, r10d
xor edx, dword [rbx]
shr edx, 1
xor edx, dword [rbx + 0x634]
xor edx, ecx
mov dword [rbx], edx
add rbx, 4
dec r9d
jne 0x14007a030
mov r9d, 0x18c
lea r8, [rbx + 4]
mov edx, dword [r8]
mov al, dl
and al, 1
neg al
sbb ecx, ecx
xor edx, dword [rbx]
and edx, r11d
and ecx, r10d
xor edx, dword [rbx]
shr edx, 1
xor edx, dword [rbx - 0x38c]
xor edx, ecx
mov dword [rbx], edx
lea rbx, [r8]
dec r9d
jne 0x14007a060
mov ecx, dword [0x1400e57c0]
mov al, cl
and al, 1
neg al
mov eax, dword [r8]
sbb edx, edx
xor eax, ecx
and eax, r11d
and edx, r10d
xor eax, dword [r8]
shr eax, 1
xor eax, dword [r8 - 0x38c]
xor eax, edx
mov dword [r8], eax
add rsp, 0x20
pop rbx
ret
Function at 0x14007a450
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x20
mov edi, dword [rcx + 0x18]
mov rbx, rcx
cmp dword [rcx + 0x450], edi
jae 0x14007a577
mov r14d, 0x1ffff
mov edx, 1
mov rcx, rbx
call fcn.14007a1a8
mov rcx, rbx
cmp eax, 1
jne 0x14007a4b6
lea edx, [rax + 7]
call fcn.14007a1a8
mov edx, dword [rbx + 0x450]
mov rcx, qword [rbx + 0x448]
and rdx, r14
mov byte [rdx + rcx], al
inc dword [rbx + 0x450]
inc dword [rbx + 0x454]
jmp 0x14007a510
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x38]
call fcn.14007a264
mov r8d, dword [rbx + 0x450]
mov r9d, dword [rsp + 0x30]
sub r8d, dword [rsp + 0x38]
test r9d, r9d
je 0x14007a510
mov ecx, dword [rbx + 0x450]
mov rdx, qword [rbx + 0x448]
mov eax, r8d
and rax, r14
and rcx, r14
inc r8d
mov al, byte [rax + rdx]
mov byte [rcx + rdx], al
inc dword [rbx + 0x450]
inc dword [rbx + 0x454]
dec r9d
jne 0x14007a4db
mov dword [rsp + 0x30], r9d
mov rcx, rbx
call fcn.14007a694
mov eax, dword [0x1400e6190]
cmp eax, 0x1000
jbe 0x14007a55a
mov r9, qword [rbx + 0x468]
and dword [0x1400e6190], 0
test r9, r9
je 0x14007a562
imul eax, dword [rbx + 0x10], 0x64
mov ecx, dword [rbx + 0x14]
xor edx, edx
div dword [rbx + 0x18]
mov edx, dword [rbx + 0x10]
mov r8d, eax
call r9
test eax, eax
jne 0x14007a562
mov byte [rbx + 0x45c], 1
jmp 0x14007a562
inc eax
mov dword [0x1400e6190], eax
cmp byte [rbx + 0x45c], 0
jne 0x14007a5b4
cmp dword [rbx + 0x450], edi
jb 0x14007a478
movsxd rax, dword [rbx + 0x480]
test eax, eax
je 0x14007a5a1
mov r9, qword [rbx + 0x30]
mov rcx, qword [rbx + 0x470]
mov r8, rax
mov edx, 1
call fcn.1400290f0
and dword [rbx + 0x480], 0
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret
mov eax, 4
jmp 0x14007a5a3

Function at 0x14007a600
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x20
mov rdi, rdx
mov edx, 1
mov rbx, rcx
lea r8d, [rdx + 7]
cmp dword [rcx + 0x1c], edx
jne 0x14007a631
mov edx, dword [rcx + 0x14]
add rdx, qword [rcx + 8]
lea rcx, [rsp + 0x30]
call fcn.140026930
jmp 0x14007a63f
mov r9, qword [rcx + 0x28]
lea rcx, [rsp + 0x30]
call fcn.14002b364
movzx ecx, byte [rsp + 0x34]
movzx eax, byte [rsp + 0x35]
add dword [rbx + 0x14], 8
shl ecx, 8
lea rdx, str.EA06
xor ebx, ebx
or ecx, eax
movzx eax, byte [rsp + 0x36]
mov byte [rsp + 0x34], bl
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x37]
shl ecx, 8
or ecx, eax
mov dword [rdi], ecx
lea rcx, [rsp + 0x30]
call fcn.14002b440
test eax, eax
setne bl
mov eax, ebx
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x14007a694
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x20
cmp dword [rcx + 0x20], 1
mov eax, dword [rcx + 0x450]
mov rbx, rcx
jne 0x14007a6f0
cmp dword [rcx + 0x458], eax
jae 0x14007a76d
mov r8d, dword [rbx + 0x458]
mov rax, qword [rbx + 0x448]
mov edx, dword [rbx + 0x10]
mov rcx, qword [rbx]
and r8d, 0x1ffff
mov al, byte [r8 + rax]
mov byte [rdx + rcx], al
inc dword [rbx + 0x458]
mov eax, dword [rbx + 0x458]
inc dword [rbx + 0x10]
cmp eax, dword [rbx + 0x450]
jb 0x14007a6b5
jmp 0x14007a76d
cmp dword [rcx + 0x458], eax
jae 0x14007a76d
mov r8d, dword [rbx + 0x458]
mov rax, qword [rbx + 0x448]
movsxd rdx, dword [rbx + 0x480]
mov rcx, qword [rbx + 0x470]
and r8d, 0x1ffff
mov al, byte [r8 + rax]
mov byte [rdx + rcx], al
inc dword [rbx + 0x480]
cmp dword [rbx + 0x480], 0x10000
jne 0x14007a756
mov r9, qword [rbx + 0x30]
mov rcx, qword [rbx + 0x470]
mov edx, 1
mov r8d, 0x10000
call fcn.1400290f0
and dword [rbx + 0x480], 0
inc dword [rbx + 0x458]
mov eax, dword [rbx + 0x458]
inc dword [rbx + 0x10]
cmp eax, dword [rbx + 0x450]
jb 0x14007a6f8
and dword [rbx + 0x454], 0
add rsp, 0x20
pop rbx
ret

Function at 0x14007a77c
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x20
test dword [rcx + 0x484], 0xfffeffff
mov rbx, rcx
jne 0x14007a7b3
mov r9, qword [rcx + 0x28]
mov rcx, qword [rcx + 0x478]
mov edx, 1
mov r8d, 0x10000
call fcn.14002b364
and dword [rbx + 0x484], 0
movsxd rdx, dword [rbx + 0x484]
mov rax, qword [rbx + 0x478]
mov al, byte [rdx + rax]
lea ecx, [rdx + 1]
mov dword [rbx + 0x484], ecx
add rsp, 0x20
pop rbx
ret

Function at 0x14007a9dc
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x100
lea rcx, [rsp + 0x20]
mov ebx, r9d
mov esi, r8d
mov rdi, rdx
call fcn.14007a7d4
lea rcx, [rsp + 0x20]
mov edx, ebx
call fcn.14007a830
test esi, esi
je 0x14007aa27
mov ebx, esi
lea rcx, [rsp + 0x20]
call fcn.14007a9a4
xor byte [rdi], al
inc rdi
dec rbx
jne 0x14007aa13
lea r11, [rsp + 0x100]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret
Function at 0x14007b410
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x20
lea r14, [rcx + 0x18]
mov rbx, rcx
mov edx, 1
mov r8, r14
xor ecx, ecx
call qword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
js 0x14007b4cf
mov rcx, qword [rbx + 0x10]
xor r9d, r9d
lea r8, str.SCRIPT
lea edx, [r9 + 0xa]
call qword [sym.imp.KERNEL32.dll_FindResourceExW]
mov rdi, rax
test rax, rax
je 0x14007b4cf
mov rcx, qword [rbx + 0x10]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rsi, rax
test rax, rax
je 0x14007b4cf
mov rcx, qword [rbx + 0x10]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test eax, eax
je 0x14007b4cf
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LockResource]
test rax, rax
je 0x14007b4cf
mov rcx, qword [r14]
xor r9d, r9d
mov r8d, edi
mov r10, qword [rcx]
mov rdx, rax
call qword [r10 + reloc.OLEAUT32.dll_RegisterActiveObject]
mov rcx, qword [r14]
and dword [rsp + 0x30], 0
and dword [rsp + 0x34], 0
mov rax, qword [rcx]
mov rdx, qword [rsp + 0x30]
xor r9d, r9d
xor r8d, r8d
call qword [rax + SafeArrayCreateEx]
mov byte [rbx + 0x20], 1
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret