joyce8/EMBER2024-capa huggingface dataset:
Function at 0x3132e1690
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
movzx esi, byte [rcx + 0x40]
test sil, sil
mov rbx, rcx
je 0x3132e16c0
mov eax, esi
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov r12, qword [rcx + 0x48]
mov r8d, 0xa
movzx edx, word [rcx + 0x50]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FindResourceA]
test rax, rax
mov rdi, rax
je 0x3132e1768
mov rdx, rax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
mov rbp, rax
je 0x3132e1768
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
test rax, rax
mov r13, rax
je 0x3132e1768
mov rdx, rdi
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, eax
movsxd r12, eax
mov qword [rbx + 0x38], rdx
lea rcx, [r12 + 1]
call sub.msvcrt.dll_malloc
test rax, rax
mov rdi, rax
je 0x3132e174b
mov r8, r12
mov rdx, r13
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov esi, 1
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
mov qword [rbx + 0x30], rdi
mov byte [rbx + 0x40], sil
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
xor edi, edi
jmp 0x3132e174b

Function at 0x3132e1a20
Capabilities:
Access peb ldr_data

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x78
movzx edi, word [section..rdata]
mov rax, qword gs:[0x30]
mov rax, qword [rax + 0x60]
mov rax, qword [rax + 0x18]
mov rsi, r8
mov r8, r9
movq xmm1, rcx
mov rcx, rdx
mov rax, qword [rax + 0x20]
mov rbp, qword [rax]
mov rbx, qword [rbp - 0x10]
lea r9, [rbp - 0x10]
cmp rbp, rbx
je 0x3132e1aad
nop word [rax + rax]
mov rax, qword [r9 + 0x60]
lea r10, [rax + 2]
movzx eax, word [rax]
test ax, ax
je 0x3132e1aa2
mov edx, 0xe0e
nop dword [rax]
mov r11d, edx
add r10, 2
shl r11d, 6
add edx, r11d
add edx, eax
movzx eax, word [r10 - 2]
test ax, ax
jne 0x3132e1a80
cmp edx, 0x18cf5f14
je 0x3132e1b1d
mov r9, rbx
mov rbx, qword [r9]
cmp rbp, rbx
jne 0x3132e1a68
xor eax, eax
movq xmm0, rax
mov rdx, rsi
mov rax, qword [rsp + 0xe0]
mov qword [rsp + 0x60], 0
mov r9, qword [rsp + 0xc0]
punpcklqdq xmm0, xmm1
movaps xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0xd8]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0xd0]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0xc8]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
call fcn.3132e1bc0
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
ret
mov edx, dword [r9 + 0x40]
mov rax, qword [r9 + 0x30]
cmp edx, 2
je 0x3132e1aad
sub edx, 3
lea rdx, [rax + rdx + 1]
nop word [rax + rax]
cmp word [rax], di
je 0x3132e1aaf
add rax, 1
cmp rax, rdx
jne 0x3132e1b38
jmp 0x3132e1aad
Function at 0x3132e1f10
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push rdi
push rsi
push rbx
mov rax, rcx
lea rcx, [rcx + 0xf]
sub rcx, rdx
cmp rcx, 0x1e
jbe 0x3132e1ff4
movdqu xmm1, xmmword [rdx]
movups xmmword [rax], xmm1
movdqu xmm0, xmmword [rdx + 0x10]
movups xmmword [rax + 0x10], xmm0
movzx edi, byte [rax + 0x1f]
mov r10d, 8
movzx r9d, byte [rax + 0x1e]
lea r11, [0x3133ab140]
movzx r8d, byte [rax + 0x1d]
lea rbx, [0x3133ab020]
movzx edx, byte [rax + 0x1c]
jmp 0x3132e1fb9
movzx r8d, r8b
movzx edx, dl
movzx ecx, byte [r11 + r8]
movzx r8d, r9b
movzx r9d, dil
movzx edi, byte [r11 + rdx]
mov edx, r10d
shr edx, 3
movzx r8d, byte [r11 + r8]
xor cl, byte [rbx + rdx]
movzx r9d, byte [r11 + r9]
mov edx, ecx
xor dl, byte [rax]
add r10d, 1
add rax, 4
xor r8b, byte [rax - 3]
xor r9b, byte [rax - 2]
xor dil, byte [rax - 1]
mov byte [rax + 0x1c], dl
mov byte [rax + 0x1d], r8b
mov byte [rax + 0x1e], r9b
mov byte [rax + 0x1f], dil
cmp r10d, 0x3c
je 0x3132e1ff0
mov ecx, r10d
and ecx, 7
je 0x3132e1f60
cmp ecx, 4
jne 0x3132e1f8e
movzx edx, dl
movzx r8d, r8b
movzx esi, r9b
movzx ecx, dil
movzx edx, byte [r11 + rdx]
movzx r8d, byte [r11 + r8]
movzx r9d, byte [r11 + rsi]
movzx edi, byte [r11 + rcx]
jmp 0x3132e1f8e
pop rbx
pop rsi
pop rdi
ret
movzx ecx, byte [rdx]
mov byte [rax], cl
movzx ecx, byte [rdx + 1]
mov byte [rax + 1], cl
movzx ecx, byte [rdx + 2]
mov byte [rax + 2], cl
movzx ecx, byte [rdx + 3]
mov byte [rax + 3], cl
movzx ecx, byte [rdx + 4]
mov byte [rax + 4], cl
movzx ecx, byte [rdx + 5]
mov byte [rax + 5], cl
movzx ecx, byte [rdx + 6]
mov byte [rax + 6], cl
movzx ecx, byte [rdx + 7]
mov byte [rax + 7], cl
movzx ecx, byte [rdx + 8]
mov byte [rax + 8], cl
movzx ecx, byte [rdx + 9]
mov byte [rax + 9], cl
movzx ecx, byte [rdx + 0xa]
mov byte [rax + 0xa], cl
movzx ecx, byte [rdx + 0xb]
mov byte [rax + 0xb], cl
movzx ecx, byte [rdx + 0xc]
mov byte [rax + 0xc], cl
movzx ecx, byte [rdx + 0xd]
mov byte [rax + 0xd], cl
movzx ecx, byte [rdx + 0xe]
mov byte [rax + 0xe], cl
movzx ecx, byte [rdx + 0xf]
mov byte [rax + 0xf], cl
movzx ecx, byte [rdx + 0x10]
mov byte [rax + 0x10], cl
movzx ecx, byte [rdx + 0x11]
mov byte [rax + 0x11], cl
movzx ecx, byte [rdx + 0x12]
mov byte [rax + 0x12], cl
movzx ecx, byte [rdx + 0x13]
mov byte [rax + 0x13], cl
movzx ecx, byte [rdx + 0x14]
mov byte [rax + 0x14], cl
movzx ecx, byte [rdx + 0x15]
mov byte [rax + 0x15], cl
movzx ecx, byte [rdx + 0x16]
mov byte [rax + 0x16], cl
movzx ecx, byte [rdx + 0x17]
mov byte [rax + 0x17], cl
movzx ecx, byte [rdx + 0x18]
mov byte [rax + 0x18], cl
movzx ecx, byte [rdx + 0x19]
mov byte [rax + 0x19], cl
movzx ecx, byte [rdx + 0x1a]
mov byte [rax + 0x1a], cl
movzx ecx, byte [rdx + 0x1b]
mov byte [rax + 0x1b], cl
movzx ecx, byte [rdx + 0x1c]
mov byte [rax + 0x1c], cl
movzx ecx, byte [rdx + 0x1d]
mov byte [rax + 0x1d], cl
movzx ecx, byte [rdx + 0x1e]
mov byte [rax + 0x1e], cl
movzx edx, byte [rdx + 0x1f]
mov byte [rax + 0x1f], dl
jmp 0x3132e1f37
Function at 0x3132ece80
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov eax, ecx
cmp r8, 3
mov r9, rdx
not eax
jbe 0x3132ecf50
lea rdx, [r8 - 4]
lea r10, [0x3133aba60]
shr rdx, 2
lea rcx, [r9 + rdx*4 + 4]
nop dword [rax]
mov edx, eax
xor al, byte [r9]
add r9, 4
shr edx, 8
movzx eax, al
xor edx, dword [r10 + rax*4]
mov eax, edx
xor dl, byte [r9 - 3]
shr eax, 8
movzx edx, dl
xor eax, dword [r10 + rdx*4]
mov edx, eax
xor al, byte [r9 - 2]
shr edx, 8
movzx eax, al
xor edx, dword [r10 + rax*4]
mov eax, edx
xor dl, byte [r9 - 1]
shr eax, 8
movzx edx, dl
xor eax, dword [r10 + rdx*4]
cmp r9, rcx
jne 0x3132ecea8
and r8d, 3
test r8, r8
je 0x3132ecf44
lea rdx, [0x3133aba60]
mov r9d, eax
xor al, byte [rcx]
shr r9d, 8
movzx eax, al
xor r9d, dword [rdx + rax*4]
cmp r8, 1
mov eax, r9d
je 0x3132ecf44
xor al, byte [rcx + 1]
shr r9d, 8
movzx eax, al
xor r9d, dword [rdx + rax*4]
cmp r8, 2
mov eax, r9d
je 0x3132ecf44
xor al, byte [rcx + 2]
mov r8d, r9d
shr r8d, 8
movzx eax, al
xor r8d, dword [rdx + rax*4]
mov eax, r8d
not eax
ret
mov rcx, rdx
jmp 0x3132ecef4
Function at 0x313304710
Capabilities:
Write file on windows

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
xor r9d, r9d
mov rsi, rdx
mov rdi, r8
xor r8d, r8d
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
mov eax, 1
cmp rbx, 0xffffffffffffffff
je 0x31330477d
lea r9, [rsp + 0x4c]
mov r8d, edi
mov rdx, rsi
mov qword [rsp + 0x20], 0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
Function at 0x31330f0c0
Capabilities:
Get memory capacity
Set console window title
Set environment variable

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rsi
mov r8d, 0xff
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
mov rbx, rax
je 0x31330f110
mov dword [rax], 0x2bb
call rsi
mov r8, rbx
xor edx, edx
mov rcx, rax
add rsp, 0x28
pop rbx
pop rsi
jmp qword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [0], 0xb75
jle 0x31330f0f1
call qword [sym.imp.KERNEL32.dll_GetVersion]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetSystemTime]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FlushInstructionCache]
xor edx, edx
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
jmp 0x31330f0f1
Function at 0x313310420
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Execute shellcode via indirect call

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
movsxd rax, dword [r8 + 0x3c]
add rax, r8
mov r13, rdx
mov r14, rcx
movzx edx, word [rax + 6]
mov r12, r8
test dx, dx
je 0x31331053b
movzx ecx, word [rax + 0x14]
lea rsi, [rsp + 0x48]
mov r15d, dword [0x3133acdf0]
movzx edi, word [0x3133acdf4]
lea rbx, [rax + rcx + 0x18]
lea rax, [rdx + rdx*4]
lea rbp, [rbx + rax*8]
jmp 0x313310485
add rbx, 0x28
cmp rbp, rbx
je 0x31331053b
mov rdx, rsi
mov rcx, rbx
mov dword [rsp + 0x48], r15d
mov word [rsp + 0x4c], di
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x313310478
mov edi, dword [rbx + 0xc]
mov rdx, rsi
mov r9d, 0x40
mov rcx, r14
mov eax, dword [rbx + 8]
mov dword [rsp + 0x34], 0
lea r8, [rsp + 0x40]
mov qword [rsp + 0x38], 0
mov rbp, qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
add r13, rdi
mov qword [rsp + 0x48], r13
lea r13, [rsp + 0x34]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x20], r13
call rbp
mov edx, eax
mov eax, 0xa
test edx, edx
jne 0x313310540
mov r9d, dword [rbx + 8]
lea rbx, [rsp + 0x38]
mov rcx, r14
mov rdx, qword [rsp + 0x48]
mov qword [rsp + 0x20], rbx
lea r8, [r12 + rdi]
call qword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
mov edx, eax
mov eax, 0xc
test edx, edx
jne 0x313310540
mov qword [rsp + 0x20], r13
mov r8, rbx
mov rdx, rsi
mov rcx, r14
mov r9d, 0x20
call rbp
neg eax
sbb eax, eax
and eax, 0xb
jmp 0x313310540
mov eax, 0xd
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x313320750
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.31332aaf0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.31332aaf0
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]
Function at 0x3133207c0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x3133d2614]
test esi, esi
mov rbx, rcx
jle 0x3133208f0
mov rax, qword [0x3133d2618]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x31332080b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x313320895
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x3133207f0
mov rcx, rbx
call fcn.313321040
test rax, rax
mov rdi, rax
je 0x313320912
mov rax, qword [0x3133d2618]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.313321180
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x3133d2618]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x3133208f7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x31332088e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x3133208a0
add dword [0x3133d2614], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov r8d, 0x40
mov eax, 4
mov rcx, qword [rsp + 0x20]
cmove r8d, eax
mov rdx, qword [rsp + 0x38]
add rbx, qword [0x3133d2618]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x31332088e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.313320750
nop dword [rax]
xor esi, esi
jmp 0x313320818
mov rax, qword [0x3133d2618]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call fcn.313320750
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call fcn.313320750
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x313320c90
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x3133d2640]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x3133d2620]
test rbx, rbx
je 0x313320cec
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x313320ce3
test rsi, rsi
je 0x313320ce3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x313320cc8
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x313320f00
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.msvcrt.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.msvcrt.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x313320f38
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x313320f40
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret
Function at 0x313320f10
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.msvcrt.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.msvcrt.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x313320f38
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x313320f40
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x313320f20
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [sym.imp.msvcrt.dll_exit]
call qword [rax]
nop
nop
sub rsp, 0x28
mov rax, qword [sym.imp.msvcrt.dll__exit]
call qword [rax]
nop
nop
nop
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x313320f38
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x313320f40
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x313321040
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x3133b1da0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x313321060
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x313321068
ret
cmp word [r8 + 0x18], 0x20b
jne 0x313321060
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x3133210bd
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x3133210b4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x313321060
add rax, 0x28
cmp rax, r9
jne 0x3133210a0
xor eax, eax
ret

Function at 0x3133210c0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x3133b1da0]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x3133210df
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x3133210e8
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x3133210df
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x313321180
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x3133b1da0]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x31332119f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x3133211a8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x31338bce0
Capabilities:
Read file on windows

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rax, qword [rcx + 8]
test rax, rax
mov rdi, rcx
je 0x31338bd08
mov rcx, qword [rcx]
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
jmp rax
mov rbp, qword [sym.imp.msvcrt.dll__errno]
lea rsi, [rsp + 0x2c]
mov ebx, 4
nop dword [rax]
mov ecx, dword [rdi + 0x10]
mov r8d, ebx
mov rdx, rsi
call sub.msvcrt.dll__read
test eax, eax
jle 0x31338bd50
cdqe
add rsi, rax
sub rbx, rax
jne 0x31338bd20
mov eax, dword [rsp + 0x2c]
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
ret
cmp eax, 0xffffffff
jne 0x31338bd5c
call rbp
cmp dword [rax], 4
je 0x31338bd20
lea rcx, str.random_device_could_not_be_read
call fcn.3133a8650
nop
nop
nop
nop
nop
nop
nop
nop
mov rax, qword [0x3133b1a90]
add rax, 0x10
mov qword [rcx], rax
mov rax, qword [rdx + 8]
mov rdx, qword [0x3133b13f0]
mov qword [rcx + 8], rax
mov r8d, dword [rdx]
test r8d, r8d
jne 0x31338bda8
mov edx, dword [rax - 8]
test edx, edx
jle 0x31338bdb3
add edx, 1
mov dword [rax - 8], edx
ret
mov eax, dword [rax - 8]
test eax, eax
jg 0x31338bdc0
mov rax, qword [rcx + 8]
mov dword [rax - 8], 1
ret
mov edx, dword [rdx]
mov rax, qword [rcx + 8]
test edx, edx
je 0x31338bdd0
lock add dword [rax - 8], 1
ret
mov edx, dword [rax - 8]
jmp 0x31338bd9c
Function at 0x313392890
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
sub rsp, 0x28
movaps xmmword [rsp], xmm6
movaps xmmword [rsp + 0x10], xmm7
movdqa xmm3, xmmword [0x3133acd80]
pxor xmm7, xmm7
movdqa xmm4, xmmword [0x3133acd90]
movdqa xmm5, xmmword [0x3133acda0]
movdqa xmm6, xmmword [0x3133acdb0]
mov rdx, rcx
lea rcx, [rcx + 0x380]
mov rax, rdx
nop
movdqu xmm0, xmmword [rax]
add rax, 0x10
movdqu xmm1, xmmword [rax - 0xc]
movdqu xmm2, xmmword [rax + 0x624]
pand xmm0, xmm3
pand xmm1, xmm4
por xmm0, xmm1
movdqa xmm1, xmm0
pand xmm0, xmm5
psrld xmm1, 1
pxor xmm1, xmm2
movdqa xmm2, xmm7
psubd xmm2, xmm0
pand xmm2, xmm6
movdqa xmm0, xmm2
pxor xmm0, xmm1
movups xmmword [rax - 0x10], xmm0
cmp rcx, rax
jne 0x3133928d0
mov eax, dword [rdx + 0x388]
mov ecx, dword [rdx + 0x38c]
movq xmm0, qword [rdx + 0x380]
movq xmm1, qword [0x3133acd80]
movq xmm2, qword [0x3133acd90]
and eax, 0x80000000
pand xmm0, xmm1
and ecx, 0x7fffffff
movq xmm1, qword [rdx + 0x384]
or eax, ecx
pand xmm1, xmm2
por xmm0, xmm1
movdqa xmm2, xmm0
mov ecx, eax
movq xmm1, qword [rdx + 0x9b4]
psrld xmm2, 1
shr ecx, 1
and eax, 1
xor ecx, dword [rdx + 0x9bc]
neg eax
pxor xmm1, xmm2
and eax, 0x9908b0df
movq xmm2, qword [0x3133acda0]
pand xmm0, xmm2
pxor xmm2, xmm2
psubd xmm2, xmm0
movq xmm0, qword [0x3133acdb0]
xor eax, ecx
mov dword [rdx + 0x388], eax
lea rcx, [rdx + 0x9bc]
pand xmm0, xmm2
lea rax, [rdx + 0x38c]
pxor xmm1, xmm0
pxor xmm2, xmm2
movq qword [rdx + 0x380], xmm1
movdqu xmm0, xmmword [rax]
add rax, 0x10
movdqu xmm1, xmmword [rax - 0xc]
movdqu xmm7, xmmword [rax - 0x39c]
pand xmm0, xmm3
pand xmm1, xmm4
por xmm0, xmm1
movdqa xmm1, xmm0
pand xmm0, xmm5
psrld xmm1, 1
pxor xmm1, xmm7
movdqa xmm7, xmm2
psubd xmm7, xmm0
pand xmm7, xmm6
movdqa xmm0, xmm7
pxor xmm0, xmm1
movups xmmword [rax - 0x10], xmm0
cmp rcx, rax
jne 0x3133929d3
mov eax, dword [rdx + 0x9bc]
mov qword [rdx + 0x9c0], 0
mov ecx, dword [rdx]
movaps xmm6, xmmword [rsp]
movaps xmm7, xmmword [rsp + 0x10]
and eax, 0x80000000
and ecx, 0x7fffffff
or eax, ecx
mov ecx, eax
and eax, 1
shr ecx, 1
xor ecx, dword [rdx + 0x630]
neg eax
and eax, 0x9908b0df
xor eax, ecx
mov dword [rdx + 0x9bc], eax
add rsp, 0x28
ret
Function at 0x3133a7ae0
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
lea rcx, [0x3133aaf40]
jmp 0x313321eb0
Function at 0x1400110e1
Capabilities:
Write file on windows

Disassembly:
jmp 0x14001b970
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x128
lea rbp, [rsp + 0x20]
lea rcx, [0x140033066]
call fcn.1400118ac
mov rax, qword [rbp + 0x120]
cmp qword [rax + 0x68], 0
je 0x14001b9c7
mov r8, qword [rbp + 0x130]
mov rdx, qword [rbp + 0x128]
mov rcx, qword [rbp + 0x120]
call qword [sym.imp.MSVCP140D.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
jmp 0x14001bad3
mov rax, qword [rbp + 0x130]
mov qword [rbp + 8], rax
mov rcx, qword [rbp + 0x120]
call qword [sym.imp.MSVCP140D.dll_protected:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Pnavail_void_const___ptr64]
mov qword [rbp + 0x28], rax
cmp qword [rbp + 0x130], 0
jle 0x14001ba6c
cmp qword [rbp + 0x28], 0
jle 0x14001ba6c
mov rax, qword [rbp + 0x28]
cmp qword [rbp + 0x130], rax
jge 0x14001ba0c
mov rax, qword [rbp + 0x130]
mov qword [rbp + 0x28], rax
mov rcx, qword [rbp + 0x120]
call qword [sym.imp.MSVCP140D.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const___ptr64]
mov r8, qword [rbp + 0x28]
mov rdx, qword [rbp + 0x128]
mov rcx, rax
call fcn.14001182a
mov rax, qword [rbp + 0x28]
mov rcx, qword [rbp + 0x128]
add rcx, rax
mov rax, rcx
mov qword [rbp + 0x128], rax
mov rax, qword [rbp + 0x28]
mov rcx, qword [rbp + 0x130]
sub rcx, rax
mov rax, rcx
mov qword [rbp + 0x130], rax
mov edx, dword [rbp + 0x28]
mov rcx, qword [rbp + 0x120]
call qword [sym.imp.MSVCP140D.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::pbump_int____ptr64]
cmp qword [rbp + 0x130], 0
jle 0x14001bac2
mov rax, qword [rbp + 0x120]
cmp qword [rax + 0x80], 0
je 0x14001bac2
mov rax, qword [rbp + 0x120]
mov r9, qword [rax + 0x80]
mov r8, qword [rbp + 0x130]
mov edx, 1
mov rcx, qword [rbp + 0x128]
call qword [sym.imp.ucrtbased.dll_fwrite]
mov rcx, qword [rbp + 0x130]
sub rcx, rax
mov rax, rcx
mov qword [rbp + 0x130], rax
mov rax, qword [rbp + 0x130]
mov rcx, qword [rbp + 8]
sub rcx, rax
mov rax, rcx
lea rsp, [rbp + 0x108]
pop rdi
pop rbp
ret

Function at 0x1400114e7
Capabilities:
Terminate process

Disassembly:
jmp 0x14001e6b0
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x28
ret