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

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140084010]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14005ab6d
xor eax, eax
jmp 0x14005acc2
mov rdx, qword [rcx + 0x40]
mov rax, qword [rdx]
test rax, rax
je 0x14005ab98
mov rdx, qword [rcx + 0x58]
movsxd r8, dword [rdx]
add r8, rax
cmp rax, r8
jae 0x14005ab98
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void____ptr64]
mov byte [rax], dil
mov eax, edi
jmp 0x14005acc2
cmp qword [rcx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x14005acb5
mov r8, qword [rcx + 0x18]
lea rax, [rcx + 0x70]
cmp qword [r8], rax
jne 0x14005abdb
mov rdx, qword [rcx + 0x90]
mov rcx, qword [rcx + 0x88]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x14005ac06
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x14005acba
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x14005ac75
sub eax, 1
je 0x14005ac75
cmp eax, 2
jne 0x14005acb5
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x14005acba
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x14005aca3
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x14005acb5
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov eax, edi
jne 0x14005acba
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.14006bdb0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x14005ba00
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x140084010]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x14005bad3
cmp byte [rcx + 0x71], 0
je 0x14005bad3
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x14005bacf
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x14005ba94
sub eax, 1
je 0x14005ba98
cmp eax, 2
jne 0x14005bacf
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14006bdb0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x14005bac6
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x14005bacf
cmp byte [rbx + 0x71], 0
sete al
jmp 0x14005ba7c
xor al, al
jmp 0x14005ba7c
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14006bdb0
add rsp, 0x60
pop rbx
ret
Function at 0x1400011d0
Capabilities:
Create device object

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x70
mov dword [rsp + 0x40], 0xc0000001
lea rax, [rsp + 0x60]
mov rdi, rax
xor eax, eax
mov ecx, 0x10
rep stosb byte [rdi], al
lea rax, [rsp + 0x50]
mov rdi, rax
xor eax, eax
mov ecx, 0x10
rep stosb byte [rdi], al
mov qword [rsp + 0x48], 0
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x80]
lea rdx, section..text
mov qword [rcx + rax + 0x70], rdx
mov eax, 8
imul rax, rax, 2
mov rcx, qword [rsp + 0x80]
lea rdx, section..text
mov qword [rcx + rax + 0x70], rdx
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x80]
lea rdx, [0x140001040]
mov qword [rcx + rax + 0x70], rdx
lea rdx, [0x140003b00]
lea rcx, [rsp + 0x50]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0x22
lea r8, [rsp + 0x50]
xor edx, edx
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.ntoskrnl.exe_IoCreateDevice]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
jge 0x1400012c1
mov eax, dword [rsp + 0x40]
jmp 0x140001348
lea rdx, [0x140003b40]
lea rcx, [rsp + 0x60]
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x60]
call qword [sym.imp.ntoskrnl.exe_IoCreateSymbolicLink]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
jge 0x1400012ff
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ntoskrnl.exe_IoDeleteDevice]
mov eax, dword [rsp + 0x40]
jmp 0x140001348
mov rcx, qword [rsp + 0x80]
call fcn.1400019b8
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
jge 0x14000131d
mov eax, dword [rsp + 0x40]
jmp 0x140001348
mov rax, qword [rsp + 0x80]
mov rax, qword [rax + 0x28]
add rax, 0x48
mov rcx, rax
call fcn.140003808
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
jge 0x140001346
mov eax, dword [rsp + 0x40]
jmp 0x140001348
xor eax, eax
add rsp, 0x70
pop rdi
ret
Function at 0x140003808
Capabilities:
Delete file

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0xe8
mov dword [rsp + 0x80], 0
mov qword [rsp + 0x90], 0
mov qword [rsp + 0x88], 0
mov dword [rsp + 0xa8], 0x30
mov qword [rsp + 0xb0], 0
mov dword [rsp + 0xc0], 0x240
mov rax, qword [rsp + 0xf0]
mov qword [rsp + 0xb8], rax
mov qword [rsp + 0xc8], 0
mov qword [rsp + 0xd0], 0
mov qword [rsp + 0x70], 0
mov dword [rsp + 0x68], 0x100
mov qword [rsp + 0x60], 0
mov dword [rsp + 0x58], 0
mov dword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x40], 0x60
mov dword [rsp + 0x38], 1
mov dword [rsp + 0x30], 4
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x98]
lea r8, [rsp + 0xa8]
mov edx, 0x110000
lea rcx, [rsp + 0x90]
call qword [sym.imp.ntoskrnl.exe_IoCreateFileEx]
mov dword [rsp + 0x80], eax
cmp dword [rsp + 0x80], 0
jl 0x1400039c6
mov qword [rsp + 0x30], 0
lea rax, [rsp + 0x88]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x454c4946
xor r9d, r9d
mov rax, qword [sym.imp.ntoskrnl.exe_IoFileObjectType]
mov r8, qword [rax]
mov edx, 0x110000
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.ntoskrnl.exe_ObReferenceObjectByHandleWithTag]
mov dword [rsp + 0x80], eax
cmp dword [rsp + 0x80], 0
jl 0x1400039b6
mov rax, qword [rsp + 0x88]
mov rax, qword [rax + 0x28]
mov qword [rax + 0x10], 0
xor edx, edx
mov rax, qword [rsp + 0x88]
mov rcx, qword [rax + 0x28]
call qword [sym.imp.ntoskrnl.exe_MmFlushImageSection]
movzx eax, al
test eax, eax
je 0x1400039a8
lea rcx, [rsp + 0xa8]
call qword [sym.imp.ntoskrnl.exe_ZwDeleteFile]
mov dword [rsp + 0x80], eax
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
xor edx, edx
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.ntoskrnl.exe_ObCloseHandle]
mov eax, dword [rsp + 0x80]
add rsp, 0xe8
ret
Function at 0x140011217
Capabilities:
Terminate process

Disassembly:
jmp 0x140013920
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

Function at 0x14001127b
Capabilities:
Acquire debug privileges

Disassembly:
jmp 0x140011850
push rbp
push rdi
sub rsp, 0x188
lea rbp, [rsp + 0x30]
lea rdi, [rsp + 0x30]
mov ecx, 0x26
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rax, qword [0x14001e008]
xor rax, rbp
mov qword [rbp + 0x148], rax
lea rcx, [0x1400240ae]
call fcn.1400113bb
mov dword [rbp + 4], 0
mov qword [rbp + 0x28], 0
lea rax, [rbp + 0x48]
mov rdi, rax
xor eax, eax
mov ecx, 8
rep stosb byte [rdi], al
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rbp + 0x28]
mov edx, 0x20
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140011944
lea r8, [rbp + 0x48]
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x140011944
lea rax, [rbp + 0x68]
mov rdi, rax
xor eax, eax
mov ecx, 0x10
rep stosb byte [rdi], al
mov dword [rbp + 0x68], 1
mov eax, 0xc
imul rax, rax, 0
mov rcx, qword [rbp + 0x48]
mov qword [rbp + rax + 0x6c], rcx
mov eax, 0xc
imul rax, rax, 0
mov dword [rbp + rax + 0x74], 2
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0x10
lea r8, [rbp + 0x68]
xor edx, edx
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov dword [rbp + 4], eax
mov eax, dword [rbp + 4]
mov edi, eax
lea rcx, [rbp - 0x30]
lea rdx, [0x14001aeb0]
call fcn.140011343
mov eax, edi
mov rcx, qword [rbp + 0x148]
xor rcx, rbp
call fcn.1400111c2
lea rsp, [rbp + 0x158]
pop rdi
pop rbp
ret
Function at 0x1400112b2
Capabilities:
Parse pe header

Disassembly:
jmp 0x140014c70
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140014c90
xor al, al
jmp 0x140014d11
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140014ca3
xor al, al
jmp 0x140014d11
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x140014ccd
xor al, al
jmp 0x140014d11
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x140014ce1
xor al, al
jmp 0x140014d11
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x140014cf3
xor al, al
jmp 0x140014d11
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x140014d0f
xor al, al
jmp 0x140014d11
mov al, 1
add rsp, 0x38
ret
Function at 0x140011352
Capabilities:
Enumerate processes

Disassembly:
jmp 0x140011ce0
push rbp
push rdi
sub rsp, 0x4d8
lea rbp, [rsp + 0x30]
lea rdi, [rsp + 0x30]
mov ecx, 0xca
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rax, qword [0x14001e008]
xor rax, rbp
mov qword [rbp + 0x498], rax
lea rcx, [0x1400240ae]
call fcn.1400113bb
xor edx, edx
mov ecx, 2
call fcn.1400111ae
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0xffffffffffffffff
jne 0x140011d3b
xor eax, eax
jmp 0x140011ec6
mov dword [rbp + 0x30], 0x238
lea rdx, [rbp + 0x30]
mov rcx, qword [rbp + 8]
call fcn.14001124e
test eax, eax
jne 0x140011d64
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140011ec6
mov r8d, dword [rbp + 0x38]
xor edx, edx
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rbp + 0x288], rax
cmp qword [rbp + 0x288], 0
je 0x140011ea7
lea r8, [rbp + 0x2a8]
mov edx, 8
mov rcx, qword [rbp + 0x288]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140011e9a
mov qword [rbp + 0x2c8], 0
mov dword [rbp + 0x2e4], 0
lea rax, [rbp + 0x2e4]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 1
mov rcx, qword [rbp + 0x2a8]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov eax, dword [rbp + 0x2e4]
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rbp + 0x2c8], rax
cmp qword [rbp + 0x2c8], 0
je 0x140011e8d
lea rax, [rbp + 0x2e4]
mov qword [rsp + 0x20], rax
mov r9d, dword [rbp + 0x2e4]
mov r8, qword [rbp + 0x2c8]
mov edx, 1
mov rcx, qword [rbp + 0x2a8]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x140011e80
lea rdx, [rbp + 0x308]
mov rax, qword [rbp + 0x2c8]
mov rcx, qword [rax]
call fcn.140011172
test eax, eax
je 0x140011e80
lea rdx, str.S_1_5_18
mov rcx, qword [rbp + 0x308]
call qword [sym.imp.ucrtbased.dll_wcscmp]
test eax, eax
jne 0x140011e73
mov eax, dword [rbp + 0x38]
jmp 0x140011ec6
mov rcx, qword [rbp + 0x308]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp + 0x2c8]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp + 0x2a8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x288]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rbp + 0x30]
mov rcx, qword [rbp + 8]
call fcn.140011370
test eax, eax
jne 0x140011d64
mov rcx, qword [rbp + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdi, rax
lea rcx, [rbp - 0x30]
lea rdx, [0x14001ad70]
call fcn.140011343
mov rax, rdi
mov rcx, qword [rbp + 0x498]
xor rcx, rbp
call fcn.1400111c2
lea rsp, [rbp + 0x4a8]
pop rdi
pop rbp
ret
Function at 0x1406c1058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.1406c11df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x1406c1089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1406c106f
add dl, dl
jne 0x1406c1096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1406c10f6
xor eax, eax
add dl, dl
jne 0x1406c10a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1406c11ad
add dl, dl
jne 0x1406c10b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406c10c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406c10d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406c10dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1406c10ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1406c107e
mov eax, 1
add dl, dl
jne 0x1406c1106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406c1113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1406c10fb
sub eax, ebx
mov ebx, 1
jne 0x1406c114c
mov ecx, 1
add dl, dl
jne 0x1406c112e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1406c113b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1406c1123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1406c107e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1406c1168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1406c1175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1406c115d
cmp eax, 0x7d00
jae 0x1406c119b
cmp eax, 0x500
jb 0x1406c1196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1406c107e
cmp eax, 0x7f
ja 0x1406c119e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1406c107e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1406c11d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x1406c107e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x6d8c2210
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x6d8e35e4]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x6d8c2398
mov rax, qword [0x6d8e35e8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x6d8c225c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x6d8c22e5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x6d8c2240
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x6d8c23cd
mov rax, qword [0x6d8e35e8]
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 [0x6d8e35e8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x6d8c23b0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x6d8c22de
sub eax, 0x40
and eax, 0xffffffbf
jne 0x6d8c2340
add dword [0x6d8e35e4], 1
cmp edi, 8
jae 0x6d8c2313
test dil, 4
jne 0x6d8c2384
test edi, edi
je 0x6d8c2308
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x6d8c239f
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 0x6d8c2308
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 0x6d8c232c
jmp 0x6d8c2308
add rsi, qword [0x6d8e35e8]
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 0x6d8c22de
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 0x6d8c2308
xor esi, esi
jmp 0x6d8c2267
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x6d8c2308
mov rax, qword [0x6d8e35e8]
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 0x6d8c2b20
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x6d8e38c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x6d8e38a0]
test rbx, rbx
je 0x6d8c2b74
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 0x6d8c2b6b
test rsi, rsi
je 0x6d8c2b6b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x6d8c2b50
lea rcx, [0x6d8e38c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x6d8c2db0
Capabilities:
Parse pe header

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

Function at 0x6d8c2dd0
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 0x6d8c2e11
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 0x6d8c2e08
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x6d8c2e13
add rax, 0x28
cmp rax, r9
jne 0x6d8c2df4
xor eax, eax
ret

Function at 0x6d8c2eb0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6d8e01f0]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x6d8c2f1d
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d8c2f1d
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 0x6d8c2f1d
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 0x6d8c2f14
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6d8c2f1f
add rax, 0x28
cmp rax, r9
jne 0x6d8c2f00
xor eax, eax
add rsp, 0x28
ret

Function at 0x6d8c3020
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6d8e01f0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x6d8c3040
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d8c3038
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 0x6d8c309d
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 0x6d8c3094
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6d8c30a4
add rax, 0x28
cmp rax, r9
jne 0x6d8c3080
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x6d8c30c0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x6d8e01f0]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x6d8c312e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d8c312e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x6d8c312e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x6d8c312e
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 0x6d8c3125
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x6d8c3135
add rcx, 0x28
cmp rcx, rax
jne 0x6d8c3110
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x6d8c3148
jmp 0x6d8c312e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x6d8c3156
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x6d8c312e
test r9d, r9d
jg 0x6d8c3140
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x6d8c34c0
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