joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1800049b0
Capabilities:
Send data
Send data on socket

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
sub rsp, 0x80
mov rbp, rcx
mov rcx, qword [0x180008918]
mov rdi, rdx
or edx, 0xffffffff
mov ebx, r8d
mov esi, 1
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call qword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [rsp + 0x40], ebx
mov r12, rax
mov qword [rsp + 0x50], rax
xor eax, eax
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x78], r12
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x48], rdi
xor ebx, ebx
nop word [rax + rax]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x30], rbx
lea r9, [rsp + 0xb0]
mov qword [rsp + 0x28], rax
lea rdx, [rsp + 0x40]
mov r8d, esi
mov rcx, rbp
mov dword [rsp + 0x20], ebx
call qword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x180004a5e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
jne 0x180004ac7
lea rdx, [rsp + 0x50]
or r9d, 0xffffffff
xor r8d, r8d
mov ecx, esi
mov dword [rsp + 0x20], ebx
call qword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
cmp eax, 0xffffffff
je 0x180004ac7
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_WSAResetEvent]
lea r11, [rsp + 0xa8]
lea r8, [rsp + 0xb0]
lea rdx, [rsp + 0x60]
xor r9d, r9d
mov rcx, rbp
mov qword [rsp + 0x20], r11
call qword [sym.imp.WS2_32.dll_WSAGetOverlappedResult]
test eax, eax
je 0x180004ac7
mov eax, dword [rsp + 0xb0]
sub dword [rsp + 0x40], eax
je 0x180004ac9
add qword [rsp + 0x48], rax
jmp 0x180004a20
mov esi, ebx
mov rcx, r12
call qword [sym.imp.WS2_32.dll_WSACloseEvent]
mov rcx, qword [0x180008918]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea r11, [rsp + 0x80]
mov eax, esi
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r12
pop rdi
pop rsi
ret
Function at 0x18000502b
Capabilities:
Terminate process

Disassembly:
cmp rcx, qword [section..data]
jne 0x180004b4a
rol rcx, 0x10
test cx, 0xffff
jne 0x180004b46
repz ret
ror rcx, 0x10
jmp 0x180004f84
mov qword [rsp + 8], rcx
sub rsp, 0x88
lea rcx, [0x180008300]
call qword [sym.imp.KERNEL32.dll_RtlCaptureContext]
mov r11, qword [0x1800083f8]
mov qword [rsp + 0x58], r11
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
call sub.KERNEL32.dll_RtlLookupFunctionEntry
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x180005009
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [0x180008300]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
xor ecx, ecx
call sub.KERNEL32.dll_RtlVirtualUnwind
jmp 0x18000502b
mov rax, qword [rsp + 0x88]
mov qword [0x1800083f8], rax
lea rax, [rsp + 0x88]
add rax, 8
mov qword [0x180008398], rax
mov rax, qword [0x1800083f8]
mov qword [0x180008270], rax
mov rax, qword [rsp + 0x90]
mov qword [0x180008380], rax
mov dword [0x180008260], 0xc0000409
mov dword [0x180008264], 1
mov rax, qword [section..data]
mov qword [rsp + 0x68], rax
mov rax, qword [0x180008008]
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x1800082f8], eax
mov ecx, 1
call sub.MSVCR90.dll___crt_debugger_hook
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [0x180006328]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x1800082f8], 0
jne 0x1800050b2
mov ecx, 1
call sub.MSVCR90.dll___crt_debugger_hook
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x88
ret
Function at 0x180003b70
Capabilities:
Log keystrokes
Log keystrokes via polling

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0xc0
mov rax, qword [0x180011010]
xor rax, rsp
mov qword [rsp + 0xb0], rax
movzx edi, dl
mov rbx, rcx
mov qword [rsp + 0x28], rcx
xor edx, edx
mov ecx, edi
xor ebp, ebp
call qword [sym.imp.USER32.dll_MapVirtualKeyW]
mov r9d, eax
cmp dil, 1
jne 0x180003bcf
xorps xmm0, xmm0
lea r8d, [rbp + 6]
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], rbp
lea rdx, str.MOUSE0
mov qword [rbx + 0x18], rbp
jmp 0x180003cd0
cmp dil, 2
jne 0x180003bf5
xorps xmm0, xmm0
lea rdx, str.MOUSE1
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], rbp
mov r8d, 6
mov qword [rbx + 0x18], rbp
jmp 0x180003cd0
cmp dil, 4
jne 0x180003c1b
xorps xmm0, xmm0
lea rdx, str.MBUTTON
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], rbp
mov r8d, 7
mov qword [rbx + 0x18], rbp
jmp 0x180003cd0
cmp dil, 5
jne 0x180003c41
xorps xmm0, xmm0
lea rdx, str.XBUTTON1
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], rbp
mov r8d, 8
mov qword [rbx + 0x18], rbp
jmp 0x180003cd0
cmp dil, 6
jne 0x180003c64
xorps xmm0, xmm0
lea rdx, str.XBUTTON2
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], rbp
mov r8d, 8
mov qword [rbx + 0x18], rbp
jmp 0x180003cd0
lea eax, [rdi - 0x21]
cmp eax, 0x84
ja case.0x180003c89.41
lea rdx, [0x180000000]
cdqe
movzx eax, byte [rdx + rax + 0x3d08]
mov ecx, dword [rdx + rax*4 + 0x3d00]
add rcx, rdx
jmp rcx
bts r9d, 8
shl r9d, 0x10
lea rdx, [rsp + 0x30]
mov ecx, r9d
mov r8d, 0x80
call qword [sym.imp.USER32.dll_GetKeyNameTextA]
xorps xmm0, xmm0
lea rax, [rsp + 0x30]
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], rbp
mov r8, 0xffffffffffffffff
mov qword [rbx + 0x18], rbp
inc r8
cmp byte [rax + r8], bpl
jne 0x180003cc2
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.18000b300
mov rax, rbx
mov rcx, qword [rsp + 0xb0]
xor rcx, rsp
call fcn.18000b470
mov rbx, qword [rsp + 0xf0]
add rsp, 0xc0
pop rdi
pop rsi
pop rbp
ret
Function at 0x140001c18
Capabilities:
Parse pe header

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

Function at 0x1400083d0
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x1400081cc
Function at 0x14000e4f0
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x14000e520
xor eax, eax
jmp 0x14000e5e3
mov rbp, rbx
cmp word [rax], si
je 0x14000e545
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14000e52c
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14000e528
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.14000e410
movsxd r14, eax
test eax, eax
jne 0x14000e583
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14000e519
mov rcx, r14
call fcn.14000a280
mov rdi, rax
test rax, rax
jne 0x14000e59c
xor ecx, ecx
call fcn.140009244
jmp 0x14000e578
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.14000e410
test eax, eax
jne 0x14000e5cd
mov rcx, rdi
call fcn.140009244
jmp 0x14000e5d7
xor ecx, ecx
call fcn.140009244
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x14001325c
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x140013272
mov al, 1
jmp 0x1400132d2
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x140013283
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x1400132d0
mov ecx, dword [rcx + 0x18]
nop
call fcn.14000ee10
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400132d0
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1400132d0
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1400132d0
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x1400132d2
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x1400141f8
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.14000a0f4
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x140014282
cmp byte [rbp - 0x21], r15b
je 0x14001427d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x1400142b8
call fcn.14000a4f4
test eax, eax
jne 0x1400142a4
cmp byte [rbp - 0x21], r15b
je 0x14001429c
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x1400142b8
cmp byte [rbp - 0x21], r15b
je 0x1400142b5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.140009f78
test eax, eax
jne 0x140014358
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.14000a0f4
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1400142f7
cmp byte [rbp - 0x21], r15b
je 0x14001432c
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x14001432c
call fcn.14000a4f4
test eax, eax
jne 0x140014318
cmp byte [rbp - 0x21], r15b
je 0x140014311
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x14001432c
cmp byte [rbp - 0x21], r15b
je 0x140014329
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.140009f78
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140014358
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x14001435b
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140014369
mov rcx, rdi
call fcn.140009244
cmp byte [rbp + 0x3f], r15b
je 0x140014378
mov rcx, qword [rbp + 0x27]
call fcn.140009244
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret

Function at 0x1400168f0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140016918
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140016918
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140003920
Capabilities:
Parse pe header

Disassembly:
push rbx
sub rsp, 0x40
mov qword [rsp + 0x58], rdx
mov rbx, r8
xor edx, edx
test rcx, rcx
je 0x140003954
cmp word [rcx], 0x5a4d
jne 0x140003954
movsxd rax, dword [rcx + 0x3c]
cmp eax, 0x400
jg 0x140003954
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140003954
mov edx, dword [rcx + 0x28]
add rdx, qword [rsp + 0x58]
mov rcx, rbx
call fcn.140003860
test eax, eax
jne 0x140003970
xor eax, eax
add rsp, 0x40
pop rbx
ret
mov rcx, rbx
call fcn.1400038d0
test rax, rax
je 0x140003965
lea rdx, [rax + 0x10]
lea rax, [rsp + 0x38]
mov rcx, qword [rbx]
mov r9d, 8
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x58]
mov qword [rsp + 0x38], 0
call fcn.140004119
not eax
shr eax, 0x1f
add rsp, 0x40
pop rbx
ret

Function at 0x140004020
Capabilities:
Execute syscall

Disassembly:
pop rax
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov rcx, r10
call fcn.140003fc0
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
syscall
ret

Function at 0x140004484
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rax, qword [0x14000eab8]
xor ebx, ebx
add rax, 0x18
mov r12, rcx
mov ecx, dword [0x14000eab4]
mov rsi, rdx
mov rdi, r8
cmp ebx, ecx
jge 0x1400044d2
mov rdx, qword [rax]
cmp r12, rdx
jb 0x1400044ca
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x1400045b9
inc ebx
add rax, 0x28
jmp 0x1400044aa
mov rcx, r12
call fcn.140004cb1
mov rbp, rax
test rax, rax
jne 0x1400044f1
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.140004420
movsxd rbx, ebx
mov rax, qword [0x14000eab8]
xor edx, edx
imul rbx, rbx, 0x28
add rax, rbx
mov dword [rax], edx
mov qword [rax + 0x20], rbp
call fcn.140004d5f
mov edx, dword [rbp + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14000eab8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
jne 0x140004553
mov rax, qword [0x14000eab8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.140004420
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x1400045b3
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400045b3
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x14000eab8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400045b3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.140004420
inc dword [0x14000eab4]
mov ecx, edi
mov rdi, r12
rep movsb byte [rdi], byte [rsi]
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
Function at 0x140002fcf
Capabilities:
Write file on windows

Disassembly:
push r12
sub rsp, 0x20
mov rax, qword [0x140031200]
test rax, rax
je 0x140002fe3
call rax
mov ecx, 2
call qword [fcn.140021440]
mov r8d, 0xe
mov edx, 1
lea rcx, str.out_of_memory_n
mov r12, rax
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rcx, r12
call sub.msvcrt.dll_fflush
mov ecx, 1
call sub.msvcrt.dll_exit
nop

Function at 0x140006d80
Capabilities:
Allocate or change rwx memory
Execute shellcode via windows callback function

Disassembly:
sub rsp, 0x38
movaps xmm0, xmmword [0x140027490]
lea rcx, [rsp + 0x20]
movaps xmmword [rsp + 0x20], xmm0
call fcn.140006a52
nop
add rsp, 0x38
ret
push r13
push r12
push rbx
sub rsp, 0x20
mov r9d, 0x40
mov r8d, 0x1000
mov rbx, rdx
mov r13, rcx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8, rbx
mov rdx, r13
mov rcx, rax
mov r12, rax
call sub.msvcrt.dll_memmove
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, eax
call qword [sym.imp.USER32.dll_GetThreadDesktop]
xor r8d, r8d
mov rdx, r12
mov rcx, rax
call qword [sym.imp.USER32.dll_EnumDesktopWindows]
nop
sub rsp, 0x28
call fcn.140002e80
nop
add rsp, 0x28
jmp 0x140006d5b
Function at 0x1400106c0
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.140021440
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.140021440
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 0x140010730
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x1400312c4]
mov r12, rcx
test ebx, ebx
jle 0x140010860
mov rax, qword [0x1400312c8]
xor ecx, ecx
add rax, 0x18
nop word [rax + rax]
mov rdx, qword [rax]
cmp rdx, r12
ja 0x14001077c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x140010803
add ecx, 1
add rax, 0x28
cmp ecx, ebx
jne 0x140010760
mov rcx, r12
call fcn.1400110d0
mov rsi, rax
test rax, rax
je 0x140010882
mov rax, qword [0x1400312c8]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call fcn.140011200
mov ecx, dword [rsi + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x1400312c8]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140010867
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400107fc
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140010810
add dword [0x1400312c4], 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 [0x1400312c8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400107fc
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.1400106c0
nop dword [rax]
xor ebx, ebx
jmp 0x140010787
mov rax, qword [0x1400312c8]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.1400106c0
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.1400106c0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x140010d40
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x140031320]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140031300]
test rbx, rbx
je 0x140010d94
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 0x140010d8b
test r12, r12
je 0x140010d8b
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140010d70
lea rcx, [0x140031320]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x1400110d0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x14002a6e0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400110f0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400110f8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400110f0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x140011145
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 0x14001113c
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400110f0
add rax, 0x28
cmp rax, r9
jne 0x140011128
xor eax, eax
ret

Function at 0x140011150
Capabilities:
Parse pe header

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

Function at 0x140011200
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14002a6e0]
xor r8d, r8d
cmp word [rax], 0x5a4d
jne 0x140011220
movsxd rdx, dword [rax + 0x3c]
add rdx, rax
cmp dword [rdx], 0x4550
je 0x140011228
mov rax, r8
ret
cmp word [rdx + 0x18], 0x20b
cmove r8, rax
mov rax, r8
ret

Function at 0x1400113d0
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 0x1400113f0
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 0x140011438
call qword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x1400113e4
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 0x140011425
Function at 0x140011550
Capabilities:
Check mutex on windows

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x30
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rdx, [0x140031430]
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 0x140011573
lea rax, [0x140031438]
mov ecx, 0x5f
lea rdx, str.__eh_shmem3_gcc_tdm_
lea r8, [rax + 0x15]
jmp 0x1400115bb
movzx ecx, byte [rdx]
add rax, 1
add rdx, 1
mov byte [rax - 1], cl
cmp rax, r8
jne 0x1400115b8
lea rax, [0x140031460]
mov ecx, 0x5f
lea rdx, str.__eh_shmem3_gcc_tdm_
lea r8, [rax + 0x14]
jmp 0x1400115eb
movzx ecx, byte [rdx]
add rax, 1
add rdx, 1
mov byte [rax - 1], cl
cmp rax, r8
jne 0x1400115e8
xor ecx, ecx
mov byte [0x140031474], 0x2d
movabs rax, 0x6161616161616161
movabs rdx, 0x6161616161616161
mov qword [0x14003147d], rdx
lea r8, [0x140031430]
lea rbx, [0x140031475]
mov qword [0x14003148d], rdx
mov qword [0x14003149d], rdx
mov qword [0x1400314ad], rdx
xor edx, edx
mov qword [0x140031475], rax
mov qword [0x140031485], rax
mov qword [0x140031495], rax
mov qword [0x1400314a5], rax
mov byte [0x1400314b5], 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 0x1400117c6
lea rcx, [0x140031460]
call qword [sym.imp.KERNEL32.dll_FindAtomA]
test ax, ax
jne 0x140011711
lea rsi, [0x1400313a0]
lea r8, [0x1400314b5]
mov rax, rbx
lea ecx, [rbx + 0x40]
nop dword [rax]
mov edx, ecx
sub edx, eax
bt rsi, rdx
jae 0x1400116bd
mov byte [rax], 0x41
add rax, 1
cmp r8, rax
jne 0x1400116b0
lea rcx, [0x140031460]
call qword [sym.imp.KERNEL32.dll_AddAtomA]
test ax, ax
je 0x1400117b3
lea rcx, [0x140011460]
mov qword [0x1400313a0], 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 [0x1400313a0]
add rsp, 0x30
pop rbx
pop rsi
pop r12
ret
mov r8d, 0x56
lea rdx, [0x140031460]
movzx ecx, ax
call qword [sym.imp.KERNEL32.dll_GetAtomNameA]
lea r8, [0x1400314b5]
xor edx, edx
lea r10d, [rbx + 0x40]
mov r11d, eax
mov r9d, 1
mov rax, rbx
test r11d, r11d
je 0x1400117e6
nop dword [rax]
cmp byte [rax], 0x41
jne 0x140011763
mov ecx, r10d
mov rbx, r9
sub ecx, eax
shl rbx, cl
or rdx, rbx
add rax, 1
cmp r8, rax
jne 0x140011750
mov rax, rdx
mov qword [0x1400313a0], rax
lea rsi, [0x1400313a0]
jmp 0x140011789
cmp rdx, rsi
je 0x1400116ef
mov rdx, rax
mov rax, qword [rax + 8]
test rax, rax
jne 0x140011780
cmp rdx, rsi
je 0x1400116ef
mov qword [rdx + 8], rsi
lea rcx, [0x140011460]
call sub.msvcrt.dll__onexit
jmp 0x1400116ef
lea rcx, [0x140029f40]
call fcn.1400113d0
xor eax, eax
jmp 0x140011708
lea rcx, [0x140029f18]
call fcn.1400113d0
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, [0x140029f68]
call fcn.1400113d0
xor eax, eax
jmp 0x14001176f