joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140035a40
Capabilities:
Write file on windows

Disassembly:
push r13
push r12
sub rsp, 0x28
xor r8d, r8d
mov r13, rcx
mov r12, rdx
test rdx, rdx
je 0x140035a61
mov rcx, rdx
call sub.msvcrt.dll_strlen
mov r8, rax
mov rcx, r12
mov r9, r13
mov edx, 1
call sub.msvcrt.dll_fwrite
mov rcx, r13
add rsp, 0x28
pop r12
pop r13
jmp sub.msvcrt.dll_fflush

Function at 0x14003b3e0
Capabilities:
Write file on windows

Disassembly:
push r13
push r12
push rbx
sub rsp, 0x30
cmp qword [0x1400c0590], 0
mov r12, rcx
mov rbx, rdx
je 0x14003b440
lea r13, [rsp + 0x20]
mov rdx, rcx
mov rcx, r13
call fcn.14003b380
mov r12, qword [rsp + 0x28]
mov rcx, r13
call qword [0x1400c0590]
test r12, r12
je 0x14003b424
test byte [r12 + 7], 0x40
je 0x14003b478
lea rcx, [0x1400a44c0]
call fcn.14009c8c0
cmp byte [rax], 0
jne 0x14003b488
add rsp, 0x30
pop rbx
pop r12
pop r13
ret
mov ecx, 2
call qword [fcn.1400a3640]
mov rcx, r12
mov r8, rbx
mov edx, 1
mov r13, rax
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rcx, r13
add rsp, 0x30
pop rbx
pop r12
pop r13
jmp sub.msvcrt.dll_fflush
mov rcx, r12
call sub.msvcrt.dll_free
jmp 0x14003b424
mov byte [rax], 0
lea rcx, [0x1400a43c0]
call fcn.14009c8c0
xor r8d, r8d
mov rcx, rax
mov rax, qword [rax]
mov rdx, qword [rax + 0x38]
add rsp, 0x30
pop rbx
pop r12
pop r13
jmp fcn.140036e30
Function at 0x14003e0a0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
lea rax, str.echoBinSafe
lea rdi, [0x1400a8df8]
mov rsi, rcx
mov rbx, rdx
xor edx, edx
mov qword [rsp + 0x38], rax
lea rcx, [0x1400a4460]
mov word [rsp + 0x50], dx
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], 0
call fcn.14009c8c0
mov rdx, qword [rax]
mov rbp, rax
test rdx, rdx
je 0x14003e1f8
movzx eax, word [rdx + 0x22]
mov qword [rsp + 0x30], rdx
lea rdx, [rsp + 0x30]
mov qword [rbp], rdx
add eax, 1
mov word [rsp + 0x52], ax
cmp ax, 0x7d0
je 0x14003e1e8
lea rcx, [0x1400c0560]
xor r14d, r14d
mov qword [rsp + 0x40], 0xac5
lea r13, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea r12, [0x1400a44c0]
jmp 0x14003e16d
mov r9, r14
lea rax, [0x1400a91e0]
mov qword [rsp + 0x40], 0x10
add r9, 1
mov qword [rsp + 0x48], rax
mov r14, r9
jo 0x14003e2a8
cmp r14, rbx
jge 0x14003e220
mov qword [rsp + 0x40], 0xac6
mov qword [rsp + 0x48], rdi
test r14, r14
js 0x14003e290
mov rdx, r14
mov ecx, 1
shl rdx, 4
lea r15, [rsi + rdx]
call qword [fcn.1400a3640]
movdqu xmm0, xmmword [r15]
xor r8d, r8d
mov rdx, r13
mov rcx, rax
movaps xmmword [rsp + 0x20], xmm0
call fcn.14003de50
mov rcx, r12
call fcn.14009c8c0
cmp byte [rax], 0
je 0x14003e148
mov rax, qword [rbp]
mov rax, qword [rax]
mov qword [rbp], rax
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
call fcn.140035d70
jmp 0x14003e11d
mov qword [rsp + 0x30], 0
xor eax, eax
mov word [rsp + 0x52], ax
lea rax, [rsp + 0x30]
mov qword [rbp], rax
jmp 0x14003e11d
mov rbx, qword [fcn.1400a3640]
mov qword [rsp + 0x48], rdi
mov ecx, 1
mov qword [rsp + 0x40], 0xae1
call rbx
mov r8d, 1
mov edx, 1
lea rcx, [0x1400a8de9]
mov r9, rax
call sub.msvcrt.dll_fwrite
mov ecx, 1
mov qword [rsp + 0x40], 0xae2
call rbx
mov rcx, rax
call sub.msvcrt.dll_fflush
lea rcx, [0x1400c0560]
mov qword [rsp + 0x40], 0xae6
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x14003e1c8
lea rdx, [rbx - 1]
mov rcx, r14
call fcn.14003bf80
jmp 0x14003e1c8
call fcn.140037560
jmp 0x14003e1c8
Function at 0x14006dae0
Capabilities:
Read file on windows

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, rcx
mov rcx, rdx
movsxd rdx, r8d
mov rsi, qword [rbx + 0x40]
test rsi, rsi
je 0x14006db80
lea rax, [rsi + rdx]
cmp qword [rbx + 0x50], rax
jae 0x14006db20
mov dword [rbx + 0x98], 1
xor eax, eax
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
cmp r8d, 8
jae 0x14006db50
test r8b, 4
jne 0x14006dba0
test r8d, r8d
je 0x14006db3c
movzx eax, byte [rsi]
mov byte [rcx], al
test r8b, 2
jne 0x14006dbb3
add qword [rbx + 0x40], rdx
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
mov rax, qword [rsi]
lea rdi, [rcx + 8]
and rdi, 0xfffffffffffffff8
mov qword [rcx], rax
mov eax, r8d
mov r9, qword [rsi + rax - 8]
mov qword [rcx + rax - 8], r9
sub rcx, rdi
sub rsi, rcx
add ecx, r8d
shr ecx, 3
rep movsq qword [rdi], qword [rsi]
jmp 0x14006db3c
mov r9, qword [rbx + 0x30]
mov r8d, 1
call sub.msvcrt.dll_fread
cmp rax, 1
jne 0x14006db07
jmp 0x14006db13
mov eax, dword [rsi]
mov dword [rcx], eax
mov eax, r8d
mov r8d, dword [rsi + rax - 4]
mov dword [rcx + rax - 4], r8d
jmp 0x14006db3c
mov eax, r8d
movzx r8d, word [rsi + rax - 2]
mov word [rcx + rax - 2], r8w
jmp 0x14006db3c

Function at 0x14006dcf0
Capabilities:
Read file on windows

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x140
cmp byte [rcx + 0x5c], 0
mov rax, qword [rcx + 0x40]
mov r12, rcx
mov rbx, rdx
jne 0x14006dd60
test rax, rax
je 0x14006ddc0
mov rdx, rax
sub rdx, qword [rcx + 0x48]
mov dword [rbx], edx
lea rdx, [rax + 0x1b]
cmp rdx, qword [r12 + 0x50]
jbe 0x14006dd90
mov dword [r12 + 0x98], 1
xor eax, eax
cmp byte [rsp + 0x20], 0x4f
jne 0x14006dd4f
cmp byte [rsp + 0x21], 0x67
jne 0x14006dd4f
cmp byte [rsp + 0x22], 0x67
je 0x14006dde0
add rsp, 0x140
pop rbx
pop rsi
pop r12
ret
xor edx, edx
mov dword [rbx], edx
test rax, rax
jne 0x14006dd1d
mov r9, qword [r12 + 0x30]
lea rcx, [rsp + 0x20]
mov r8d, 1
mov edx, 0x1b
call sub.msvcrt.dll_fread
cmp rax, 1
jne 0x14006dd28
jmp 0x14006dd34
movdqu xmm0, xmmword [rax]
movaps xmmword [rsp + 0x20], xmm0
mov rcx, qword [rax + 0x10]
mov qword [rsp + 0x30], rcx
movzx ecx, word [rax + 0x18]
mov word [rsp + 0x38], cx
movzx eax, byte [rax + 0x1a]
mov qword [r12 + 0x40], rdx
mov byte [rsp + 0x3a], al
jmp 0x14006dd34
mov rcx, qword [rcx + 0x30]
call sub.msvcrt.dll_ftell
sub eax, dword [r12 + 0x38]
mov edx, eax
mov rax, qword [r12 + 0x40]
jmp 0x14006dd62
cmp byte [rsp + 0x23], 0x53
jne 0x14006dd4f
movzx r8d, byte [rsp + 0x3a]
lea rsi, [rsp + 0x40]
mov rcx, r12
mov rdx, rsi
call fcn.14006dae0
movzx edx, byte [rsp + 0x3a]
test dl, dl
je 0x14006de77
movzx r9d, dl
mov rax, rsi
lea edx, [r9 - 1]
lea r8, [rsp + rdx + 0x41]
xor edx, edx
nop dword [rax]
movzx ecx, byte [rax]
add rax, 1
add edx, ecx
cmp r8, rax
jne 0x14006de20
mov r8d, dword [rbx]
movzx ecx, byte [rsp + 0x26]
lea eax, [r8 + r9 + 0x1b]
add edx, eax
movzx eax, byte [rsp + 0x28]
mov dword [rbx + 4], edx
movzx edx, byte [rsp + 0x27]
shl eax, 0x10
shl edx, 8
add ecx, edx
lea edx, [rcx + rax]
movzx eax, byte [rsp + 0x29]
mov rcx, r12
shl eax, 0x18
add eax, edx
mov edx, r8d
mov dword [rbx + 8], eax
call fcn.14006dc30
mov eax, 1
jmp 0x14006dd4f
xor edx, edx
xor r9d, r9d
jmp 0x14006de2e
Function at 0x140093270
Capabilities:
Allocate thread local storage

Disassembly:
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [0x1400b3e40]
mov rax, qword [rsi]
test rax, rax
je 0x140093300
cmp qword [rax + 0x30], 0
jne 0x140093320
lea rbx, [0x1400a46e8]
mov qword [rax + 0x30], rbx
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [rbx], eax
mov rax, qword [rsi]
test rax, rax
je 0x1400932d0
cmp qword [rax + 0x30], 0
jne 0x1400932f0
lea rdx, [0x1400a46e8]
mov qword [rax + 0x30], rdx
mov rax, rdx
cmp dword [rax], 0xffffffff
je 0x1400a3a00
add rsp, 0x28
pop rbx
pop rsi
ret
call fcn.140098170
mov r8, rax
mov rax, qword [rsi]
cmp qword [r8 + 0x30], 0
je 0x1400932b2
test rax, rax
jne 0x1400932f0
call fcn.140098170
nop dword [rax]
mov rax, qword [rax + 0x30]
jmp 0x1400932c0
call fcn.140098170
cmp qword [rax + 0x30], 0
mov rax, qword [rsi]
je 0x140093290
test rax, rax
jne 0x140093320
call fcn.140098170
nop dword [rax]
mov rbx, qword [rax + 0x30]
jmp 0x14009329b
call sub.msvcrt.dll_abort
nop
call sub.msvcrt.dll_abort
nop
mov rax, qword [pe_dos_header]
ud2

Function at 0x140093330
Capabilities:
Print debug messages

Disassembly:
sub rsp, 0x98
movabs rax, 0x6c6320726f727245
movabs rdx, 0x7520676e696e6165
mov qword [rsp + 0x20], rax
movabs rax, 0x6b5f6e6970732070
mov qword [rsp + 0x28], rdx
movabs rdx, 0x20726f6620737965
mov qword [rsp + 0x30], rax
movabs rax, 0x20646165726874
mov qword [rsp + 0x38], rdx
xor edx, edx
mov qword [rsp + 0x40], rax
xor eax, eax
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x80], 0
mov word [rsp + 0x88], ax
mov byte [rsp + 0x8a], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, [rsp + 0x47]
mov r8d, 0xa
mov ecx, eax
call qword [sym.imp.msvcrt.dll__ultoa]
cmp byte [rsp + 0x47], 0
je 0x140093442
mov eax, 0x28
lea rcx, [rsp + 0x20]
jmp 0x14009341a
add rax, 1
cmp rax, 0x6b
je 0x140093437
cmp byte [rcx + rax], 0
movsxd rdx, eax
jne 0x140093410
cmp edx, 0x6a
je 0x140093437
lea eax, [rdx + 1]
cdqe
mov byte [rsp + rdx + 0x20], 0xa
mov byte [rsp + rax + 0x20], 0
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call sub.msvcrt.dll_abort
mov eax, 0x28
mov edx, 0x27
lea rcx, [rsp + 0x20]
jmp 0x14009342b
Function at 0x140093e50
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov rsi, qword [0x1400b3e40]
mov rax, qword [rsi]
test rax, rax
je 0x140094040
cmp qword [rax + 0x28], 0
jne 0x140094028
lea rcx, [0x140111fc8]
cmp dword [rcx], 1
mov qword [rax + 0x28], rcx
je 0x140094035
call fcn.140093460
mov rax, qword [rsi]
test rax, rax
je 0x140093ed0
cmp qword [rax + 0x30], 0
jne 0x140093ef0
lea rdx, [0x1400a46e8]
mov qword [rax + 0x30], rdx
mov rax, rdx
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
je 0x140093f04
mov rax, r12
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call fcn.140098170
cmp qword [rax + 0x30], 0
mov rax, qword [rsi]
je 0x140093ea0
test rax, rax
jne 0x140093ef0
call fcn.140098170
nop dword [rax]
mov rax, qword [rax + 0x30]
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r12, rax
test rax, rax
jne 0x140093ebe
call fcn.140092fa0
cmp qword [0x140115050], 0
mov rbx, rax
je 0x140093ebe
test rax, rax
je 0x140093ebe
mov dword [rax + 0x44], 1
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor ecx, ecx
xor r9d, r9d
xor r8d, r8d
mov dword [rbx + 0x70], eax
mov edx, 1
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rbx + 0x38], 0xffffffffffffffff
lea rcx, [rbx + 0x68]
mov qword [rbx + 0x30], rax
call fcn.14009a010
cmp eax, 1
je 0x1400940ad
mov rbp, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rbx + 0x68], 0xffffffffffffffff
mov dword [rbx + 0xb8], 0
mov qword [rbx + 0x28], 0
call rbp
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov r12, rax
call rbp
mov dword [rsp + 0x30], 2
mov r8, rdi
mov rdx, r12
mov dword [rsp + 0x28], 0
mov rcx, rax
lea r9, [rbx + 0x28]
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x1400a3a06
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [rbx + 0xbc], 0
mov dword [rbx + 0xc0], eax
movzx eax, byte [rbx + 0x40]
and eax, 0xffffffcf
or eax, 0x10
mov byte [rbx + 0x40], al
mov rax, qword [rsi]
test rax, rax
je 0x140094088
cmp qword [rax + 0x30], 0
je 0x140094070
mov rax, qword [rax + 0x30]
mov ecx, dword [rax]
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x1400a3a06
mov r12, rbx
mov rax, r12
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, qword [rax + 0x28]
cmp dword [rcx], 1
jne 0x140093e8c
mov rax, qword [rsi]
jmp 0x140093e99
call fcn.140098170
cmp qword [rax + 0x28], 0
mov rax, qword [rsi]
je 0x140093e78
test rax, rax
jne 0x140094028
call fcn.140098170
mov rcx, qword [rax + 0x28]
cmp dword [rcx], 1
jne 0x140093e8c
jmp 0x140093e91
lea rdx, [0x1400a46e8]
mov qword [rax + 0x30], rdx
mov rax, rdx
jmp 0x140093ffe
call fcn.140098170
mov r8, rax
mov rax, qword [rsi]
cmp qword [r8 + 0x30], 0
je 0x140094070
test rax, rax
jne 0x140093ffa
call fcn.140098170
jmp 0x140093ffa
call fcn.140093330
nop word cs:[rax + rax]
nop dword [rax]
mov rax, qword [0x1400b3e40]
mov rdx, qword [rax]
lea rax, [0x140111fd8]
mov qword [rdx + 0x10], rax
ret
Function at 0x140097ff0
Capabilities:
Print debug messages

Disassembly:
push r12
push rbx
sub rsp, 0x58
mov r12, rcx
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140098010
add rsp, 0x58
pop rbx
pop r12
ret
lea rdx, [rsp + 0x48]
mov r9d, 0x400
mov r8d, eax
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x20], rdx
mov ecx, 0x1100
xor edx, edx
mov dword [rsp + 0x28], 0
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
test eax, eax
jne 0x140098058
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x140098004
int3
mov rcx, qword [rsp + 0x48]
mov rbx, qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call rbx
mov rcx, r12
call rbx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140098045
Function at 0x140098170
Capabilities:
Check mutex on windows

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x30
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rdx, [0x1401120c0]
mov dword [rsp + 0x2c], eax
lea rcx, [rsp + 0x2c]
lea r9, [rsp + 0x30]
movzx eax, byte [rcx]
add rcx, 1
add rdx, 2
mov r8d, eax
and eax, 0xf
shr r8b, 4
add eax, 0x61
add r8d, 0x41
mov byte [rdx - 1], al
mov byte [rdx - 2], r8b
cmp rcx, r9
jne 0x140098193
lea rax, [0x1401120c8]
mov ecx, 0x5f
lea rdx, str.__shmem3_winpthreads_tdm_
lea r8, [rax + 0x1a]
jmp 0x1400981db
movzx ecx, byte [rdx]
add rax, 1
add rdx, 1
mov byte [rax - 1], cl
cmp rax, r8
jne 0x1400981d8
lea rax, [0x140112100]
mov ecx, 0x5f
lea rdx, str.__shmem3_winpthreads_tdm_
lea r8, [rax + 0x19]
jmp 0x14009820b
movzx ecx, byte [rdx]
add rax, 1
add rdx, 1
mov byte [rax - 1], cl
cmp rax, r8
jne 0x140098208
xor ecx, ecx
mov byte [0x140112119], 0x2d
movabs rax, 0x6161616161616161
movabs rdx, 0x6161616161616161
mov qword [0x140112122], rdx
lea r8, [0x1401120c0]
lea rbx, [0x14011211a]
mov qword [0x140112132], rdx
mov qword [0x140112142], rdx
mov qword [0x140112152], rdx
xor edx, edx
mov qword [0x14011211a], rax
mov qword [0x14011212a], rax
mov qword [0x14011213a], rax
mov qword [0x14011214a], rax
mov byte [0x14011215a], 0
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edx, 0xffffffff
mov r12, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1400983e6
lea rcx, [0x140112100]
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
jne 0x140098331
lea rsi, [0x140112000]
lea r8, [0x14011215a]
mov rax, rbx
lea ecx, [rbx + 0x40]
nop dword [rax]
mov edx, ecx
sub edx, eax
bt rsi, rdx
jae 0x1400982dd
mov byte [rax], 0x41
add rax, 1
cmp r8, rax
jne 0x1400982d0
lea rcx, [0x140112100]
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
je 0x1400983d3
lea rcx, [0x140098080]
mov qword [0x140112000], rsi
call sub.msvcrt.dll__onexit
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x140112000]
add rsp, 0x30
pop rbx
pop rsi
pop r12
ret
mov r8d, 0x5b
lea rdx, [0x140112100]
movzx ecx, ax
call qword [sym.imp.KERNEL32.dll_GetAtomNameA]
lea r8, [0x14011215a]
xor edx, edx
lea r10d, [rbx + 0x40]
mov r11d, eax
mov r9d, 1
mov rax, rbx
test r11d, r11d
je 0x140098406
nop dword [rax]
cmp byte [rax], 0x41
jne 0x140098383
mov ecx, r10d
mov rbx, r9
sub ecx, eax
shl rbx, cl
or rdx, rbx
add rax, 1
cmp r8, rax
jne 0x140098370
mov rax, rdx
mov qword [0x140112000], rax
lea rsi, [0x140112000]
jmp 0x1400983a9
cmp rdx, rsi
je 0x14009830f
mov rdx, rax
mov rax, qword [rax + 8]
test rax, rax
jne 0x1400983a0
cmp rdx, rsi
je 0x14009830f
mov qword [rdx + 8], rsi
lea rcx, [0x140098080]
call sub.msvcrt.dll__onexit
jmp 0x14009830f
lea rcx, str.failed_to_add_string_to_atom_table_n
call fcn.140097ff0
xor eax, eax
jmp 0x140098328
lea rcx, str.failed_to_to_lock_creation_mutex_n
call fcn.140097ff0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add rsp, 0x30
pop rbx
pop rsi
pop r12
ret
lea rcx, str.failed_to_get_string_from_atom_n
call fcn.140097ff0
xor eax, eax
jmp 0x14009838f
Function at 0x14009bac0
Capabilities:
Write file on windows

Disassembly:
push r12
push rbx
sub rsp, 0x38
mov r12, rcx
lea rax, [rsp + 0x58]
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.1400a3640
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call fcn.1400a3640
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]

Function at 0x14009bb30
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x1401121f4]
mov r12, rcx
test ebx, ebx
jle 0x14009bc60
mov rax, qword [0x1401121f8]
xor ecx, ecx
add rax, 0x18
nop word [rax + rax]
mov rdx, qword [rax]
cmp rdx, r12
ja 0x14009bb7c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x14009bc03
add ecx, 1
add rax, 0x28
cmp ecx, ebx
jne 0x14009bb60
mov rcx, r12
call fcn.14009c4d0
mov rsi, rax
test rax, rax
je 0x14009bc82
mov rax, qword [0x1401121f8]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call fcn.14009c600
mov ecx, dword [rsi + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x1401121f8]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14009bc67
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x14009bbfc
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x14009bc10
add dword [0x1401121f4], 1
add rsp, 0x50
pop rbx
pop rsi
pop r12
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 4
mov eax, 0x40
cmovne r8d, eax
add rbx, qword [0x1401121f8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14009bbfc
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.14009bac0
nop dword [rax]
xor ebx, ebx
jmp 0x14009bb87
mov rax, qword [0x1401121f8]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.14009bac0
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.14009bac0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x14009c140
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x140112260]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140112240]
test rbx, rbx
je 0x14009c194
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x14009c18b
test r12, r12
je 0x14009c18b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14009c170
lea rcx, [0x140112260]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x14009c4d0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400b3dc0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x14009c4f0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x14009c4f8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x14009c4f0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x14009c545
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x14009c53c
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x14009c4f0
add rax, 0x28
cmp rax, r9
jne 0x14009c528
xor eax, eax
ret

Function at 0x14009c550
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400b3dc0]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x14009c570
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x14009c578
mov eax, r8d
ret
cmp word [rax + 0x18], 0x20b
jne 0x14009c570
movzx r8d, word [rax + 6]
mov eax, r8d
ret

Function at 0x14009c600
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400b3dc0]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x14009c620
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x14009c628
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret
Function at 0x140001000
Capabilities:
Find process by pid

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov rax, qword [rsp + 0x40]
cmp dword [rax], 0
jne 0x14000101a
mov eax, 0xc0000001
jmp 0x140001085
mov qword [rsp + 0x20], 0
mov rax, qword [rsp + 0x40]
movsxd rax, dword [rax]
lea rdx, [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
nop
cmp qword [rsp + 0x20], 0
jne 0x140001049
mov eax, 0xc0000001
jmp 0x140001085
mov rcx, qword [rsp + 0x20]
call sub.ntoskrnl.exe_PsGetProcessSectionBaseAddress
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
jne 0x140001067
mov eax, 0xc0000001
jmp 0x140001085
mov rax, qword [rsp + 0x40]
mov rax, qword [rax + 8]
mov rcx, qword [rsp + 0x28]
mov qword [rax], rcx
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
xor eax, eax
add rsp, 0x38
ret

Function at 0x140001090
Capabilities:
Find process by pid

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov qword [rsp + 0x20], 0
mov rax, qword [rsp + 0x40]
mov eax, dword [rax]
lea rdx, [rsp + 0x20]
mov ecx, eax
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
test eax, eax
je 0x1400010c1
mov eax, 0xc0000001
jmp 0x1400010f6
mov rcx, qword [rsp + 0x20]
call sub.ntoskrnl.exe_PsGetProcessSectionBaseAddress
mov rcx, rax
call fcn.140001600
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x40]
mov rax, qword [rax + 8]
mov rcx, qword [rsp + 0x28]
mov qword [rax], rcx
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
xor eax, eax
add rsp, 0x38
ret

Function at 0x140001150
Capabilities:
Find process by pid

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x58
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x20], 0xc0000001
mov qword [rsp + 0x30], 0
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x10]
lea rdx, [rsp + 0x30]
mov ecx, eax
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
test eax, eax
jge 0x140001196
mov eax, 0xc0000001
jmp 0x14000122b
mov rax, qword [rsp + 0x60]
mov rdx, qword [rax + 8]
mov rax, qword [rsp + 0x60]
mov rcx, qword [rax]
call fcn.140001290
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
jne 0x1400011c0
mov eax, 0xc0000001
jmp 0x14000122b
mov rax, qword [rsp + 0x28]
and rax, 0xfff
mov ecx, 0x1000
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x60]
mov rdx, qword [rcx + 0x20]
mov ecx, eax
call fcn.140001100
mov qword [rsp + 0x40], rax
lea r9, [rsp + 0x38]
mov r8, qword [rsp + 0x40]
mov rax, qword [rsp + 0x60]
mov rdx, qword [rax + 0x18]
mov rcx, qword [rsp + 0x28]
call fcn.140001230
test eax, eax
jge 0x14000121e
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov eax, 0xc0000001
jmp 0x14000122b
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
xor eax, eax
add rsp, 0x58
ret