joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140002fa4
Capabilities:
Find process by pid

Disassembly:
push rbp
push rbx
push rdi
mov rbp, rsp
sub rsp, 0x40
mov ebx, dword [rcx]
lea rdx, [rbp + 0x28]
and qword [rbp + 0x20], 0
mov rdi, rcx
and qword [rbp + 0x30], 0
and ebx, 0x5fffffff
and qword [rbp + 0x28], 0
mov ecx, ebx
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
test eax, eax
js 0x140003011
lea rax, [rbp + 0x20]
mov r9d, 0x100000
mov qword [rsp + 0x30], rax
xor r8d, r8d
mov rax, qword [sym.imp.ntoskrnl.exe_PsProcessType]
xor edx, edx
mov byte [rsp + 0x28], 0
mov rcx, qword [rax]
mov qword [rsp + 0x20], rcx
mov rcx, qword [rbp + 0x28]
call qword [sym.imp.ntoskrnl.exe_ObOpenObjectByPointer]
mov rcx, qword [rbp + 0x28]
jmp 0x14000305d
lfence
lea rdx, [rbp + 0x30]
mov rcx, rbx
call qword [sym.imp.ntoskrnl.exe_PsLookupThreadByThreadId]
mov ebx, eax
test eax, eax
js 0x140003086
lea rax, [rbp + 0x20]
mov r9d, 0x100000
mov qword [rsp + 0x30], rax
xor r8d, r8d
mov rax, qword [sym.imp.ntoskrnl.exe_PsThreadType]
xor edx, edx
mov byte [rsp + 0x28], 0
mov rcx, qword [rax]
mov qword [rsp + 0x20], rcx
mov rcx, qword [rbp + 0x30]
call qword [sym.imp.ntoskrnl.exe_ObOpenObjectByPointer]
mov rcx, qword [rbp + 0x30]
mov ebx, eax
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
test ebx, ebx
js 0x140003086
mov r8, qword [rdi + 0x10]
mov dl, byte [rdi + 8]
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.ntoskrnl.exe_NtWaitForSingleObject]
mov rcx, qword [rbp + 0x20]
mov ebx, eax
call qword [sym.imp.ntoskrnl.exe_NtClose]
movsxd rax, ebx
add rsp, 0x40
pop rdi
pop rbx
pop rbp
ret

Function at 0x140003094
Capabilities:
Find process by pid

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x40
mov rdi, rcx
mov rcx, qword [rcx + 0x18]
mov rax, qword [rdi + 8]
lea rdx, [rax + rcx]
cmp rdx, rax
jb 0x1400031a0
mov rax, qword [rdi + 0x10]
lea r8, [rax + rcx]
cmp r8, rax
jb 0x1400031a0
mov rax, qword [sym.imp.ntoskrnl.exe_MmHighestUserAddress]
mov rcx, qword [rax]
cmp rdx, rcx
ja 0x1400031a0
cmp r8, rcx
ja 0x1400031a0
mov rcx, qword [rdi + 0x20]
test rcx, rcx
je 0x140003102
mov edx, 8
lea r8d, [rdx - 4]
call fcn.1400034e0
test eax, eax
je 0x1400031a0
mov ecx, dword [rdi]
lea rdx, [rsp + 0x50]
and qword [rsp + 0x50], 0
and ecx, 0x5fffffff
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov ebx, eax
test eax, eax
js 0x14000319b
cmp qword [rdi + 0x18], 0
je 0x140003190
and qword [rsp + 0x58], 0
call qword [sym.imp.ntoskrnl.exe_ExGetPreviousMode]
mov bl, al
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
mov r9, qword [rdi + 8]
mov rcx, rax
mov r8, qword [rsp + 0x50]
lea rax, [rsp + 0x58]
mov rdx, qword [rdi + 0x10]
mov qword [rsp + 0x30], rax
mov rax, qword [rdi + 0x18]
mov byte [rsp + 0x28], bl
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntoskrnl.exe_MmCopyVirtualMemory]
mov rcx, qword [rdi + 0x20]
mov ebx, eax
test rcx, rcx
je 0x140003190
mov r8d, 8
lea rdx, [rsp + 0x58]
call fcn.140003514
test eax, eax
mov rcx, 0xffffffffc0000005
cmove ebx, ecx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
movsxd rax, ebx
jmp 0x1400031a7
mov rax, 0xffffffffc0000005
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
ret
Function at 0x140003308
Capabilities:
Get system information on windows
Print debug messages

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x150
xor ebx, ebx
lea r9, [rax + 0x18]
mov r14, rdx
mov dword [rax + 0x18], ebx
mov r15, rcx
xor r8d, r8d
xor edx, edx
mov ebp, ebx
lea esi, [rbx + 0xb]
mov ecx, esi
call qword [sym.imp.ntoskrnl.exe_ZwQuerySystemInformation]
cmp eax, 0xc0000004
je 0x140003360
mov edx, eax
lea rcx, [0x140003a00]
call sub.ntoskrnl.exe_DbgPrint
xor eax, eax
jmp 0x14000348b
mov edx, dword [rsp + 0x180]
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov rdi, rax
test rax, rax
jne 0x140003387
mov edx, dword [rsp + 0x180]
lea rcx, [0x140003a40]
jmp 0x140003354
mov r8d, dword [rsp + 0x180]
xor r9d, r9d
mov rdx, rdi
mov ecx, esi
call qword [sym.imp.ntoskrnl.exe_ZwQuerySystemInformation]
lfence
test eax, eax
jns 0x1400033b7
mov edx, eax
lea rcx, [0x140003a80]
call sub.ntoskrnl.exe_DbgPrint
jmp 0x14000347d
mov esi, ebx
cmp dword [rdi], ebx
jbe 0x14000347a
mov eax, esi
mov edx, 2
imul rcx, rax, 0x128
lea rax, [rdi + 8]
add rax, rcx
lea rcx, [rsp + 0x20]
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
lea rax, [rax + 0x80]
movups xmmword [rcx], xmm0
movups xmm0, xmmword [rax - 0x60]
movups xmmword [rcx + 0x10], xmm1
movups xmm1, xmmword [rax - 0x50]
movups xmmword [rcx + 0x20], xmm0
movups xmm0, xmmword [rax - 0x40]
movups xmmword [rcx + 0x30], xmm1
movups xmm1, xmmword [rax - 0x30]
movups xmmword [rcx + 0x40], xmm0
movups xmm0, xmmword [rax - 0x20]
movups xmmword [rcx + 0x50], xmm1
movups xmm1, xmmword [rax - 0x10]
movups xmmword [rcx + 0x60], xmm0
lea rcx, [rcx + 0x80]
movups xmmword [rcx - 0x10], xmm1
sub rdx, 1
jne 0x1400033db
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
mov rax, qword [rax + 0x20]
movups xmmword [rcx], xmm0
movups xmmword [rcx + 0x10], xmm1
mov qword [rcx + 0x20], rax
lea rcx, [rsp + 0x48]
call fcn.1400034a8
mov rcx, rax
mov rdx, r15
call sub.ntoskrnl.exe_strstr
test rax, rax
jne 0x140003469
inc esi
cmp esi, dword [rdi]
jb 0x1400033c1
jmp 0x14000347a
mov rbp, qword [rsp + 0x30]
test r14, r14
je 0x14000347a
mov eax, dword [rsp + 0x38]
mov dword [r14], eax
mov rbx, rbp
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov rax, rbx
lea r11, [rsp + 0x150]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rdi
ret
Function at 0x6d8e4c10
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x6d9055e4]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x6d8e4d98
mov rax, qword [0x6d9055e8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x6d8e4c5c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x6d8e4ce5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x6d8e4c40
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x6d8e4dcd
mov rax, qword [0x6d9055e8]
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 [0x6d9055e8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x6d8e4db0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x6d8e4cde
sub eax, 0x40
and eax, 0xffffffbf
jne 0x6d8e4d40
add dword [0x6d9055e4], 1
cmp edi, 8
jae 0x6d8e4d13
test dil, 4
jne 0x6d8e4d84
test edi, edi
je 0x6d8e4d08
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x6d8e4d9f
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 0x6d8e4d08
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 0x6d8e4d2c
jmp 0x6d8e4d08
add rsi, qword [0x6d9055e8]
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 0x6d8e4cde
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 0x6d8e4d08
xor esi, esi
jmp 0x6d8e4c67
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x6d8e4d08
mov rax, qword [0x6d9055e8]
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 0x6d8e5520
Capabilities:
Get thread local storage value

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

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

Function at 0x6d8e57d0
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 0x6d8e5811
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 0x6d8e5808
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x6d8e5813
add rax, 0x28
cmp rax, r9
jne 0x6d8e57f4
xor eax, eax
ret

Function at 0x6d8e58b0
Capabilities:
Enumerate pe sections

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

Function at 0x6d8e5a20
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6d9021f0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x6d8e5a40
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d8e5a38
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 0x6d8e5a9d
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 0x6d8e5a94
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6d8e5aa4
add rax, 0x28
cmp rax, r9
jne 0x6d8e5a80
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x6d8e5ac0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x6d9021f0]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x6d8e5b2e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d8e5b2e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x6d8e5b2e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x6d8e5b2e
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 0x6d8e5b25
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x6d8e5b35
add rcx, 0x28
cmp rcx, rax
jne 0x6d8e5b10
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x6d8e5b48
jmp 0x6d8e5b2e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x6d8e5b56
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x6d8e5b2e
test r9d, r9d
jg 0x6d8e5b40
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x6d8e5ec0
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
Function at 0x14000b9ac
Capabilities:
Terminate process

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_IsDebuggerPresent]
mov ecx, 1
mov dword [0x140016950], eax
call fcn.14000b730
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetUnhandledExceptionFilter]
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_UnhandledExceptionFilter]
cmp dword [0x140016950], 0
jne case.default.0x14000ba02
mov ecx, 1
call fcn.14000b730
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xc0000409
add rsp, 0x20
pop rbx
jmp qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TerminateProcess]
and edx, dword [rdi]
in eax, 0x38
loope 0x1400232dc
invalid
movabs byte [0x37bdcb375820e6b2], al
or al, 0x92
cmp al, 0x2b
xchg edi, eax
xor bh, byte [rcx + riz]
and bl, byte [rbx]
mov bh, 0x38
pop rdi
invalid
Function at 0x141869108
Capabilities:
Decompress data using aplib

Disassembly:
call 0x14186928f
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 0x141869139
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14186911f
add dl, dl
jne 0x141869146
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1418691a6
xor eax, eax
add dl, dl
jne 0x141869155
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14186925d
add dl, dl
jne 0x141869166
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x141869173
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x141869180
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14186918d
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x14186919a
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14186912e
mov eax, 1
add dl, dl
jne 0x1418691b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1418691c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1418691ab
sub eax, ebx
mov ebx, 1
jne 0x1418691fc
mov ecx, 1
add dl, dl
jne 0x1418691de
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1418691eb
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1418691d3
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14186912e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x141869218
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x141869225
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14186920d
cmp eax, 0x7d00
jae 0x14186924b
cmp eax, 0x500
jb 0x141869246
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14186912e
cmp eax, 0x7f
ja 0x14186924e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14186912e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x141869282
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 0x14186912e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x6d88db10
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x6d8ae5e4]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x6d88dc98
mov rax, qword [0x6d8ae5e8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x6d88db5c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x6d88dbe5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x6d88db40
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x6d88dccd
mov rax, qword [0x6d8ae5e8]
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 [0x6d8ae5e8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x6d88dcb0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x6d88dbde
sub eax, 0x40
and eax, 0xffffffbf
jne 0x6d88dc40
add dword [0x6d8ae5e4], 1
cmp edi, 8
jae 0x6d88dc13
test dil, 4
jne 0x6d88dc84
test edi, edi
je 0x6d88dc08
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x6d88dc9f
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 0x6d88dc08
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 0x6d88dc2c
jmp 0x6d88dc08
add rsi, qword [0x6d8ae5e8]
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 0x6d88dbde
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 0x6d88dc08
xor esi, esi
jmp 0x6d88db67
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x6d88dc08
mov rax, qword [0x6d8ae5e8]
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 0x6d88e420
Capabilities:
Get thread local storage value

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

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

Function at 0x6d88e6d0
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 0x6d88e711
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 0x6d88e708
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x6d88e713
add rax, 0x28
cmp rax, r9
jne 0x6d88e6f4
xor eax, eax
ret

Function at 0x6d88e7b0
Capabilities:
Enumerate pe sections

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

Function at 0x6d88e920
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6d8ab1f0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x6d88e940
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d88e938
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 0x6d88e99d
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 0x6d88e994
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6d88e9a4
add rax, 0x28
cmp rax, r9
jne 0x6d88e980
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x6d88e9c0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x6d8ab1f0]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x6d88ea2e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d88ea2e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x6d88ea2e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x6d88ea2e
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 0x6d88ea25
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x6d88ea35
add rcx, 0x28
cmp rcx, rax
jne 0x6d88ea10
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x6d88ea48
jmp 0x6d88ea2e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x6d88ea56
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x6d88ea2e
test r9d, r9d
jg 0x6d88ea40
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x6d88edc0
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