joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140032d30
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x14003b410]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140032d50
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140032d58
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140032d50
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x140032dad
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x140032da4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140032d50
add rax, 0x28
cmp rax, r9
jne 0x140032d90
xor eax, eax
ret

Function at 0x140032db0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14003b410]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x140032dcf
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140032dd8
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x140032dcf
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x140032e70
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x14003b410]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x140032e8f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140032e98
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x14194c058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.14194c1df
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 0x14194c089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14194c06f
add dl, dl
jne 0x14194c096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14194c0f6
xor eax, eax
add dl, dl
jne 0x14194c0a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14194c1ad
add dl, dl
jne 0x14194c0b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14194c0c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14194c0d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14194c0dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x14194c0ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14194c07e
mov eax, 1
add dl, dl
jne 0x14194c106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14194c113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14194c0fb
sub eax, ebx
mov ebx, 1
jne 0x14194c14c
mov ecx, 1
add dl, dl
jne 0x14194c12e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14194c13b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14194c123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14194c07e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x14194c168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14194c175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14194c15d
cmp eax, 0x7d00
jae 0x14194c19b
cmp eax, 0x500
jb 0x14194c196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14194c07e
cmp eax, 0x7f
ja 0x14194c19e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14194c07e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x14194c1d2
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 0x14194c07e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x1400ce640]
mov dword [rax], 1
mov rax, qword [0x1400ce650]
mov dword [rax], 1
mov rax, qword [0x1400ce660]
mov dword [rax], 1
mov rax, qword [0x1400ce5f0]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x1400302c0
Capabilities:
Query environment variable

Disassembly:
push r15
mov eax, 0x10088
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.1400aa1f0
sub rsp, rax
xor edx, edx
mov rbp, rcx
xor ecx, ecx
mov word [rsp + 0x80], dx
lea r15, [rsp + 0x30]
movzx eax, byte [rbp]
mov word [rsp + 0x30], cx
test al, al
je 0x140030385
xor edi, edi
lea r15, [rsp + 0x30]
lea r14, [rsp + 0x2a]
mov r12d, 0x28
lea r13, [rsp + 0x2c]
nop dword [rax]
mov rsi, r12
mov r8d, 2
mov rdx, r14
mov rcx, r13
sub rsi, rdi
mov byte [rsp + 0x2a], al
lea rbx, [r15 + rdi*2]
mov byte [rsp + 0x2b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x1400bb0d0
cmp word [r15 + rdi*2], 0
movzx eax, word [rsp + 0x2c]
je 0x140030366
nop dword [rax + rax]
add rbx, 2
sub rsi, 1
cmp word [rbx], 0
jne 0x140030358
test rsi, rsi
je 0x1400bb0d0
mov word [rbx], ax
add rdi, 1
xor eax, eax
mov word [rbx + 2], ax
movzx eax, byte [rbp + rdi]
test al, al
jne 0x140030318
lea rbx, [rsp + 0x80]
mov r8d, 0x10000
mov rcx, r15
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea edx, [rax - 1]
xor eax, eax
cmp edx, 0xffff
ja 0x1400303b4
mov rcx, rbx
call sub.msvcrt.dll__wcsdup
add rsp, 0x10088
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret

Function at 0x1400303d0
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
movzx eax, byte [rcx]
mov qword [rsp + 0xd8], rdx
xor edx, edx
mov rbp, rcx
lea r15, [rsp + 0x30]
mov word [rsp + 0x30], dx
test al, al
je 0x14003048d
xor edi, edi
lea r15, [rsp + 0x30]
lea r14, [rsp + 0x2a]
mov r12d, 0x28
lea r13, [rsp + 0x2c]
nop dword [rax]
mov rsi, r12
mov r8d, 2
mov rdx, r14
mov rcx, r13
sub rsi, rdi
mov byte [rsp + 0x2a], al
lea rbx, [r15 + rdi*2]
mov byte [rsp + 0x2b], 0
call sub.msvcrt.dll_mbstowcs
cmp rax, 1
jne 0x1400bb0d6
cmp word [r15 + rdi*2], 0
movzx eax, word [rsp + 0x2c]
je 0x14003046e
nop dword [rax + rax]
add rbx, 2
sub rsi, 1
cmp word [rbx], 0
jne 0x140030460
test rsi, rsi
je 0x1400bb0d6
mov word [rbx], ax
add rdi, 1
xor eax, eax
mov word [rbx + 2], ax
movzx eax, byte [rbp + rdi]
test al, al
jne 0x140030420
mov rdx, qword [rsp + 0xd8]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
nop
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
Function at 0x1400a69a0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp byte [0x1400df9a1], 0
mov rbp, rcx
mov r12, rdx
mov rdi, r8
je 0x1400a6a28
lea rdx, [0x1400ca6e2]
mov rcx, rdi
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400a6a90
mov rbx, qword [0x1400df840]
jmp 0x1400a69e5
lea rbx, [rdx + rax + 4]
mov rdx, rbx
mov rcx, rdi
call sub.msvcrt.dll_strcmp
mov rcx, rbx
mov esi, eax
call sub.msvcrt.dll_strlen
lea rdx, [rbx + rax + 1]
mov eax, dword [rdx]
test esi, esi
jne 0x1400a69e0
movzx r9d, word [rdx + 4]
lea r8, [rdx + 6]
mov rcx, rbp
mov rdx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp fcn.1400969e0
mov r8d, 0xa
xor ecx, ecx
mov edx, 3
call qword [sym.imp.KERNEL32.dll_FindResourceA]
xor ecx, ecx
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
xor ecx, ecx
lea rdx, [rax + 4]
mov qword [0x1400df840], rax
mov ebx, dword [rax]
mov qword [0x1400df840], rdx
mov r8d, dword [rax + 4]
lea rdx, [rax + 8]
mov qword [0x1400df840], rdx
call fcn.1400a5ad0
cmp eax, ebx
jne 0x1400a6af8
mov byte [0x1400df9a1], 1
jmp 0x1400a69bc
cmp byte [0x1400df9a0], 0
jne 0x1400a69d3
mov rbx, qword [sym.imp.python312.dll_PyDict_New]
call rbx
mov qword [0x1400e0308], rax
call rbx
mov qword [0x1400e0300], rax
call rbx
mov qword [0x1400e02f8], rax
call rbx
mov qword [0x1400e02f0], rax
call rbx
mov qword [0x1400e02e8], rax
call rbx
mov qword [0x1400e02e0], rax
call rbx
mov qword [0x1400e02d8], rax
call rbx
mov byte [0x1400df9a0], 1
mov qword [0x1400e02d0], rax
jmp 0x1400a69d3
lea rcx, str.Error__corrupted_constants_object
call sub.msvcrt.dll_puts
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]

Function at 0x1400a8ed0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call fcn.1400ba650
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call fcn.1400ba650
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
Function at 0x1400a9ba2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x1400e07c8]
test eax, eax
je 0x1400a9c3a
lea rax, [0x1400e07a0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x1400e07d0]
mov qword [rbp - 8], rax
jmp 0x1400a9c1e
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x1400a9c12
cmp qword [rbp - 0x10], 0
je 0x1400a9c12
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x1400a9bd8
lea rax, [0x1400e07a0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x1400a9c3b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x1400a9d40
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400a9d68
mov eax, 0
jmp 0x1400a9db6
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400a9d91
mov eax, 0
jmp 0x1400a9db6
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x1400a9db1
mov eax, 0
jmp 0x1400a9db6
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x1400a9dbc
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x1400a9e3a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x1400a9e31
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x1400a9e31
mov rax, qword [rbp - 8]
jmp 0x1400a9e4f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x1400a9e04
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x1400010e0
Capabilities:
Find process by pid

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x20
cmp dword [rcx], 0xc0120038
mov rdi, rcx
jne 0x140001142
movsxd rax, dword [rcx + 4]
xor ebx, ebx
test eax, eax
je 0x140001142
mov rcx, rax
mov qword [rsp + 0x30], rbx
lea rdx, [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
test eax, eax
js 0x140001142
mov rcx, qword [rsp + 0x30]
call sub.ntoskrnl.exe_PsGetProcessSectionBaseAddress
test rax, rax
jne 0x14000112c
mov ebx, 0xc0000001
jmp 0x140001133
mov rcx, qword [rdi + 8]
mov qword [rcx], rax
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov eax, ebx
jmp 0x140001147
mov eax, 0xc0000001
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

Function at 0x140001154
Capabilities:
Get system information on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
cmp dword [rcx], 0xc0120038
mov rsi, rcx
je 0x140001178
mov eax, 0xc0000001
jmp 0x140001230
xor edi, edi
lea r9, [rsp + 0x30]
xor r8d, r8d
mov dword [rsp + 0x30], edi
lea rdx, [rsp + 0x30]
mov ebx, edi
lea ecx, [rdi + 0x42]
call sub.ntoskrnl.exe_ZwQuerySystemInformation
cmp eax, 0xc0000004
jne 0x14000122e
test rbx, rbx
je 0x1400011b0
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov edx, dword [rsp + 0x30]
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov r8d, dword [rsp + 0x30]
lea r9, [rsp + 0x30]
mov rdx, rax
mov ecx, 0x42
mov rbx, rax
call sub.ntoskrnl.exe_ZwQuerySystemInformation
cmp eax, 0xc0000004
je 0x1400011a0
test rbx, rbx
je 0x14000122e
mov r8d, dword [rbx]
test r8d, r8d
je 0x140001223
mov edx, edi
shl rdx, 5
test byte [rdx + rbx + 0x10], 1
je 0x14000121c
cmp qword [rdx + rbx + 0x18], 0x200000
jne 0x14000121c
mov ecx, dword [0x140002060]
mov r9b, byte [0x140002064]
cmp dword [rdx + rbx + 0x20], ecx
jne 0x14000121c
cmp byte [rdx + rbx + 0x24], r9b
je 0x140001240
inc edi
cmp edi, r8d
jb 0x1400011ea
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov rcx, qword [rsi + 8]
mov rax, qword [rdx + rbx + 8]
mov qword [rcx], rax
jmp 0x14000122e
Function at 0x140001250
Capabilities:
Find process by pid

Disassembly:
mov r11, rsp
mov qword [r11 + 0x18], rbx
mov qword [r11 + 0x20], rsi
push rdi
sub rsp, 0x20
cmp dword [rcx], 0xc0120038
mov rbx, rcx
jne 0x1400012f3
movsxd rax, dword [rcx + 4]
test eax, eax
je 0x1400012f3
and qword [r11 + 8], 0
lea rdx, [r11 + 8]
mov rcx, rax
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x1400012f3
mov rdi, qword [0x140004060]
test rdi, rdi
je 0x1400012f3
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov rdx, qword [rbx + 8]
mov rcx, rdi
mov rsi, qword [rbx + 0x18]
call fcn.140001a28
test rax, rax
je 0x1400012f3
mov ecx, eax
lea r9, [rsp + 0x38]
and ecx, 0xfff
mov edx, 0x1000
sub edx, ecx
mov rcx, rax
cmp edx, esi
cmovl esi, edx
cmp byte [rbx + 0x20], 0
mov rdx, qword [rbx + 0x10]
movsxd r8, esi
je 0x1400012ea
call fcn.140001bac
jmp 0x1400012ef
call fcn.140001840
xor eax, eax
jmp 0x1400012f8
mov eax, 0xc0000001
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret

Function at 0x1400013a4
Capabilities:
Find process by pid

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
cmp qword [0x140004068], 0
mov r13, rcx
jne 0x1400013d2
call fcn.140001504
cmp qword [0x140004090], 0
jne 0x140001407
call fcn.140001308
mov rcx, rax
lea r8, [0x140002020]
lea rdx, [0x140002050]
call fcn.1400018c0
movsxd rcx, dword [rax + 8]
mov rax, qword [rcx + rax + 0xc]
mov qword [0x140004090], rax
call qword [sym.imp.ntoskrnl.exe_MmGetPhysicalMemoryRanges]
mov rdx, qword [0x140004088]
xor r15d, r15d
mov rcx, qword [0x140004080]
lea rsi, [rax + 8]
lea r12, [rcx + rdx*8]
mov rbx, qword [rsi - 8]
test rbx, rbx
jne 0x140001438
cmp qword [rsi], rbx
je 0x1400014e6
mov rbp, qword [rsi]
sar rbp, 0xc
sar rbx, 0xc
add rbp, rbx
cmp rbx, rbp
jge 0x1400014c7
lea rdi, [rbx + rbx*2]
shl rdi, 4
mov rax, qword [0x140004090]
mov r14, qword [rdi + rax]
cmp r14, 2
jb 0x1400014ad
cmp qword [rdi + rax + 8], r12
jne 0x1400014ad
movabs rax, 0xffff800000000000
shr r14, 0xd
or r14, rax
lea rdx, [rsp + 0x58]
mov rax, rbx
shl rax, 0xc
mov qword [0x140004060], rax
mov ecx, dword [r13]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov rcx, r14
call qword [sym.imp.ntoskrnl.exe_MmIsAddressValid]
test al, al
je 0x1400014ad
cmp r14, qword [rsp + 0x58]
je 0x1400014bb
inc rbx
add rdi, 0x30
cmp rbx, rbp
jl 0x140001453
jmp 0x1400014c7
mov rcx, qword [0x140004060]
test rcx, rcx
jne 0x1400014dd
inc r15d
add rsi, 0x10
cmp r15d, 0xc8
jl 0x140001426
jmp 0x1400014e6
mov rax, qword [r13 + 8]
mov qword [rax], rcx
xor eax, eax
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x004094e0]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x004094f0]
mov dword [rax], 1
mov rax, qword [0x00409500]
mov dword [rax], 1
mov rax, qword [0x004094d0]
mov dword [rax], 1
mov rax, qword [0x004093c0]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x004094c0]
mov dword [0x0040c008], 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 [0x00409480]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x00409370]
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 0x403de0
Capabilities:
Enumerate process modules

Disassembly:
push rbp
sub rsp, 0x270
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x200], rcx
mov dword [rbp + 0x208], edx
mov qword [rbp + 0x1e8], 0
mov eax, dword [rbp + 0x208]
mov edx, eax
mov ecx, 0x18
call sym.CreateToolhelp32Snapshot
mov qword [rbp + 0x1e0], rax
cmp qword [rbp + 0x1e0], 0xffffffffffffffff
je 0x403e9b
mov dword [rbp - 0x60], 0x238
lea rax, [rbp - 0x60]
mov rcx, qword [rbp + 0x1e0]
mov rdx, rax
call sym.Module32First
test eax, eax
je 0x403e88
lea rax, [rbp - 0x60]
add rax, 0x30
mov rdx, qword [rbp + 0x200]
mov rcx, rax
call sym.strcmp
test eax, eax
jne 0x403e71
mov rax, qword [rbp - 0x48]
mov qword [rbp + 0x1e8], rax
jmp 0x403e88
lea rax, [rbp - 0x60]
mov rcx, qword [rbp + 0x1e0]
mov rdx, rax
call sym.Module32Next
test eax, eax
jne 0x403e49
mov rax, qword [rbp + 0x1e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rax, qword [rbp + 0x1e8]
add rsp, 0x270
pop rbp
ret
Function at 0x4056a0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x0040c624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x405828
mov rax, qword [0x0040c628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x4056ec
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x405775
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x4056d0
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x40585d
mov rax, qword [0x0040c628]
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 [0x0040c628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x405840
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40576e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x4057d0
add dword [0x0040c624], 1
cmp edi, 8
jae 0x4057a3
test dil, 4
jne 0x405814
test edi, edi
je 0x405798
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x40582f
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 0x405798
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 0x4057bc
jmp 0x405798
add rsi, qword [0x0040c628]
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 0x40576e
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 0x405798
xor esi, esi
jmp 0x4056f7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x405798
mov rax, qword [0x0040c628]
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 0x405fb0
Capabilities:
Get thread local storage value

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