joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140145700
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x38
cmp r8d, 8
jge 0x14014579d
xor eax, eax
cmp r8d, 4
jl 0x140145751
add r8d, 0xfffffffc
movsx r10, word [rcx + rax*2]
movsx r9, dx
cmp r10d, r9d
je 0x140145798
nop dword [rax]
movsx r10, word [rcx + rax*2 + 2]
cmp r10d, r9d
je 0x140145791
movsx r10, word [rcx + rax*2 + 4]
cmp r10d, r9d
je 0x140145789
movsx r10, word [rcx + rax*2 + 6]
cmp r10d, r9d
je 0x140145781
add rax, 4
test r8d, r8d
jle 0x14014597a
movsx r9, dx
nop
dec r8d
movsx rdx, word [rcx + rax*2]
cmp edx, r9d
je 0x140145798
inc rax
test r8d, r8d
jg 0x140145760
jmp 0x14014597a
add eax, 3
jmp 0x140145975
add eax, 2
jmp 0x140145975
inc eax
jmp 0x140145975
jmp 0x140145975
movsx r9, dx
movd xmm0, r9d
punpcklwd xmm0, xmm0
pshufd xmm0, xmm0, 0
mov rax, rcx
lea edx, [r8 - 8]
movsxd rdx, edx
add rdx, rdx
lea r10, [rax + rdx]
movups xmm1, xmmword [rax]
pcmpeqw xmm1, xmm0
movaps xmmword [rsp + 0x20], xmm1
xorps xmm2, xmm2
pcmpeqw xmm1, xmm2
pmovmskb r9d, xmm1
cmp r9d, 0xffff
jne 0x1401458b6
add rax, 0x10
cmp rax, r10
jbe 0x1401457c0
mov eax, r8d
test al, 7
je 0x14014597a
movups xmm1, xmmword [r10]
pcmpeqw xmm0, xmm1
movaps xmmword [rsp + 0x20], xmm0
xorps xmm1, xmm1
pcmpeqw xmm0, xmm1
pmovmskb ecx, xmm0
cmp ecx, 0xffff
je 0x14014597a
mov rax, qword [rsp + 0x20]
mov qword [rsp + 8], rax
movzx eax, word [rsp + 8]
shr eax, 0xf
movzx ecx, word [rsp + 0xa]
shr ecx, 0xf
add ecx, ecx
or eax, ecx
movzx ecx, word [rsp + 0xc]
shr ecx, 0xf
shl ecx, 2
or ecx, eax
mov eax, ecx
movzx ecx, word [rsp + 0xe]
shr ecx, 0xf
shl ecx, 3
or ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x28]
mov qword [rsp], rcx
movzx ecx, word [rsp]
shr ecx, 0xf
movzx r8d, word [rsp + 2]
shr r8d, 0xf
add r8d, r8d
or ecx, r8d
movzx r8d, word [rsp + 4]
shr r8d, 0xf
shl r8d, 2
or r8d, ecx
mov ecx, r8d
movzx r8d, word [rsp + 6]
shr r8d, 0xf
shl r8d, 3
or r8d, ecx
mov ecx, r8d
shl ecx, 4
or eax, ecx
jne 0x14014596c
mov ecx, 0x20
jmp 0x14014596f
mov rdx, qword [rsp + 0x20]
mov qword [rsp + 0x18], rdx
movzx edx, word [rsp + 0x18]
shr edx, 0xf
movzx r8d, word [rsp + 0x1a]
shr r8d, 0xf
add r8d, r8d
or edx, r8d
movzx r8d, word [rsp + 0x1c]
shr r8d, 0xf
shl r8d, 2
or r8d, edx
mov edx, r8d
movzx r8d, word [rsp + 0x1e]
shr r8d, 0xf
shl r8d, 3
or r8d, edx
mov edx, r8d
mov r8, qword [rsp + 0x28]
mov qword [rsp + 0x10], r8
movzx r8d, word [rsp + 0x10]
shr r8d, 0xf
movzx r10d, word [rsp + 0x12]
shr r10d, 0xf
add r10d, r10d
or r8d, r10d
movzx r10d, word [rsp + 0x14]
shr r10d, 0xf
shl r10d, 2
or r10d, r8d
mov r8d, r10d
movzx r10d, word [rsp + 0x16]
shr r10d, 0xf
shl r10d, 3
or r10d, r8d
mov r8d, r10d
shl r8d, 4
or edx, r8d
jne 0x14014595d
mov r8d, 0x20
jmp 0x140145961
bsf r8d, edx
sub rax, rcx
shr rax, 1
add eax, r8d
jmp 0x140145975
bsf ecx, eax
shr rdx, 1
lea eax, [rdx + rcx]
add rsp, 0x38
ret
mov eax, 0xffffffff
add rsp, 0x38
ret
Function at 0x14014bd40
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x48
movaps xmmword [rsp + 0x30], xmm6
cmp r9d, 8
jge 0x14014bd91
movzx r10d, dx
sub r8d, r10d
movzx eax, r8w
xor edx, edx
test r9d, r9d
jle 0x14014bfbb
movsxd r8, edx
movzx r8d, word [rcx + r8*2]
sub r8d, r10d
movzx r8d, r8w
cmp r8d, eax
jle 0x14014bd85
inc edx
cmp edx, r9d
jl 0x14014bd65
jmp 0x14014bfbb
mov eax, edx
movaps xmm6, xmmword [rsp + 0x30]
add rsp, 0x48
ret
movzx r10d, dx
movd xmm0, r10d
punpcklwd xmm0, xmm0
pshufd xmm0, xmm0, 0
mov eax, r8d
sub eax, r10d
movzx eax, ax
movd xmm1, eax
punpcklwd xmm1, xmm1
pshufd xmm1, xmm1, 0
mov rax, rcx
add r9d, 0xfffffff8
mov edx, r9d
add rdx, rdx
lea r8, [rax + rdx]
movups xmm2, xmmword [0x140211400]
movaps xmm3, xmm1
psubw xmm3, xmm2
movups xmm4, xmmword [rax]
psubw xmm4, xmm0
movaps xmm5, xmm4
psubw xmm5, xmm2
movaps xmm6, xmm3
pcmpgtw xmm6, xmm5
pcmpeqw xmm4, xmm1
por xmm4, xmm6
movaps xmmword [rsp + 0x20], xmm4
xorps xmm5, xmm5
pcmpeqw xmm4, xmm5
pmovmskb r10d, xmm4
cmp r10d, 0xffff
jne 0x14014befb
add rax, 0x10
cmp rax, r8
jb 0x14014bdd8
movups xmm4, xmmword [r8]
psubw xmm4, xmm0
movaps xmm0, xmm4
psubw xmm0, xmm2
pcmpgtw xmm3, xmm0
pcmpeqw xmm1, xmm4
por xmm1, xmm3
movaps xmmword [rsp + 0x20], xmm1
xorps xmm0, xmm0
pcmpeqw xmm0, xmm1
pmovmskb eax, xmm0
cmp eax, 0xffff
je 0x14014bfbb
mov rax, qword [rsp + 0x20]
mov qword [rsp + 8], rax
movzx eax, word [rsp + 8]
shr eax, 0xf
movzx ecx, word [rsp + 0xa]
shr ecx, 0xf
add ecx, ecx
or eax, ecx
movzx ecx, word [rsp + 0xc]
shr ecx, 0xf
shl ecx, 2
or ecx, eax
mov eax, ecx
movzx ecx, word [rsp + 0xe]
shr ecx, 0xf
shl ecx, 3
or ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x28]
mov qword [rsp], rcx
movzx ecx, word [rsp]
shr ecx, 0xf
movzx r8d, word [rsp + 2]
shr r8d, 0xf
add r8d, r8d
or ecx, r8d
movzx r8d, word [rsp + 4]
shr r8d, 0xf
shl r8d, 2
or r8d, ecx
mov ecx, r8d
movzx r8d, word [rsp + 6]
shr r8d, 0xf
shl r8d, 3
or r8d, ecx
mov ecx, r8d
shl ecx, 4
or eax, ecx
bsf ecx, eax
mov r8d, 0x20
test eax, eax
cmove ecx, r8d
mov eax, ecx
shr rdx, 1
add eax, edx
movaps xmm6, xmmword [rsp + 0x30]
add rsp, 0x48
ret
mov rdx, qword [rsp + 0x20]
mov qword [rsp + 0x18], rdx
movzx edx, word [rsp + 0x18]
shr edx, 0xf
movzx r8d, word [rsp + 0x1a]
shr r8d, 0xf
add r8d, r8d
or edx, r8d
movzx r8d, word [rsp + 0x1c]
shr r8d, 0xf
shl r8d, 2
or r8d, edx
mov edx, r8d
movzx r8d, word [rsp + 0x1e]
shr r8d, 0xf
shl r8d, 3
or r8d, edx
mov edx, r8d
mov r8, qword [rsp + 0x28]
mov qword [rsp + 0x10], r8
movzx r8d, word [rsp + 0x10]
shr r8d, 0xf
movzx r10d, word [rsp + 0x12]
shr r10d, 0xf
add r10d, r10d
or r8d, r10d
movzx r10d, word [rsp + 0x14]
shr r10d, 0xf
shl r10d, 2
or r10d, r8d
mov r8d, r10d
movzx r10d, word [rsp + 0x16]
shr r10d, 0xf
shl r10d, 3
or r10d, r8d
mov r8d, r10d
shl r8d, 4
or edx, r8d
bsf r8d, edx
mov r10d, 0x20
test edx, edx
cmove r8d, r10d
sub rax, rcx
shr rax, 1
add eax, r8d
movaps xmm6, xmmword [rsp + 0x30]
add rsp, 0x48
ret
mov eax, 0xffffffff
movaps xmm6, xmmword [rsp + 0x30]
add rsp, 0x48
ret
Function at 0x1409f70b0
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.1409f7237
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 0x1409f70e1
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1409f70c7
add dl, dl
jne 0x1409f70ee
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1409f714e
xor eax, eax
add dl, dl
jne 0x1409f70fd
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1409f7205
add dl, dl
jne 0x1409f710e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1409f711b
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1409f7128
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1409f7135
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1409f7142
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1409f70d6
mov eax, 1
add dl, dl
jne 0x1409f715e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1409f716b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1409f7153
sub eax, ebx
mov ebx, 1
jne 0x1409f71a4
mov ecx, 1
add dl, dl
jne 0x1409f7186
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1409f7193
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1409f717b
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1409f70d6
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1409f71c0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1409f71cd
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1409f71b5
cmp eax, 0x7d00
jae 0x1409f71f3
cmp eax, 0x500
jb 0x1409f71ee
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1409f70d6
cmp eax, 0x7f
ja 0x1409f71f6
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1409f70d6
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1409f722a
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 0x1409f70d6
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140011180
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
mov eax, 0x10088
call fcn.140026990
sub rsp, rax
mov rax, qword [0x140063200]
xor rax, rsp
mov qword [rsp + 0x10080], rax
mov word [rsp + 0x80], 0
mov word [rsp + 0x30], 0
movzx ebp, byte [rcx]
test bpl, bpl
je 0x140011258
mov rsi, rcx
mov r14d, 0x28
lea r15, [rsp + 0x30]
xor eax, eax
lea rdi, [rsp + 0x2e]
nop dword [rax]
mov rbx, r15
mov rcx, r14
test ax, ax
je 0x140011211
mov rcx, r14
mov rax, r15
nop word cs:[rax + rax]
lea rbx, [rax + 2]
dec rcx
cmp word [rax + 2], 0
mov rax, rbx
jne 0x140011200
test rcx, rcx
je 0x1400112b4
mov rcx, rbx
call fcn.140036e48
lea rcx, [rbx + rax*2]
mov byte [rsp + 0x2e], bpl
mov byte [rsp + 0x2f], 0
mov r8d, 2
mov rdx, rdi
call fcn.140034d60
movzx ebp, byte [rsi + 1]
test bpl, bpl
je 0x140011258
inc rsi
dec r14
movzx eax, word [r15 + 2]
add r15, 2
jmp 0x1400111e0
lea rcx, [rsp + 0x30]
lea rdx, [rsp + 0x80]
mov r8d, 0x10000
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
add eax, 0xfffeffff
cmp eax, 0xffff0000
jae 0x140011281
xor esi, esi
jmp 0x140011291
lea rcx, [rsp + 0x80]
call fcn.140033624
mov rsi, rax
mov rcx, qword [rsp + 0x10080]
xor rcx, rsp
call fcn.1400269f0
mov rax, rsi
add rsp, 0x10088
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret
call fcn.140034a18
int3

Function at 0x1400112c0
Capabilities:
Set environment variable

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x90
mov rsi, rdx
mov rax, qword [0x140063200]
xor rax, rsp
mov qword [rsp + 0x88], rax
mov word [rsp + 0x30], 0
movzx ebp, byte [rcx]
test bpl, bpl
je 0x140011385
mov rdi, rcx
mov r15d, 0x28
lea r12, [rsp + 0x30]
xor eax, eax
lea rbx, [rsp + 0x2e]
nop
mov r14, r12
mov rcx, r15
test ax, ax
je 0x140011341
mov rcx, r15
mov rax, r12
nop word cs:[rax + rax]
lea r14, [rax + 2]
dec rcx
cmp word [rax + 2], 0
mov rax, r14
jne 0x140011330
test rcx, rcx
je 0x1400113b6
mov rcx, r14
call fcn.140036e48
lea rcx, [r14 + rax*2]
mov byte [rsp + 0x2e], bpl
mov byte [rsp + 0x2f], 0
mov r8d, 2
mov rdx, rbx
call fcn.140034d60
movzx ebp, byte [rdi + 1]
test bpl, bpl
je 0x140011385
inc rdi
dec r15
movzx eax, word [r12 + 2]
add r12, 2
jmp 0x140011310
lea rcx, [rsp + 0x30]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [rsp + 0x88]
xor rcx, rsp
call fcn.1400269f0
nop
add rsp, 0x90
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
call fcn.140034a18
int3
Function at 0x140016040
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x28
mov rbx, r8
mov rsi, rdx
mov rdi, rcx
cmp byte [0x1400656c0], 0
jne 0x1400160be
mov edx, 3
mov r8d, 0xa
xor ecx, ecx
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]
mov qword [0x1400656b8], rax
mov ebp, dword [rax]
lea rcx, [rax + 4]
mov qword [0x1400656b8], rcx
mov r8d, dword [rax + 4]
lea rdx, [rax + 8]
mov qword [0x1400656b8], rdx
xor ecx, ecx
call fcn.1400157e0
cmp eax, ebp
jne 0x1400161b0
mov byte [0x1400656c0], 1
lea rdx, [0x140054236]
mov rcx, rbx
call fcn.140036ab0
test eax, eax
je 0x140016138
cmp byte [0x140065918], 0
jne 0x140016138
mov r14, qword [sym.imp.python311.dll_PyDict_New]
call r14
mov qword [0x140065920], rax
call r14
mov qword [0x140065928], rax
call r14
mov qword [0x140065930], rax
call r14
mov qword [0x140065938], rax
call r14
mov qword [0x140065940], rax
call r14
mov qword [0x140065948], rax
call r14
mov qword [0x140065950], rax
call r14
mov qword [0x140065958], rax
mov byte [0x140065918], 1
mov r14, qword [0x1400656b8]
mov rcx, rbx
mov rdx, r14
call fcn.140036ab0
mov ebp, eax
mov rcx, r14
call fcn.140036b30
lea r8, [rax + r14]
inc r8
test ebp, ebp
je 0x140016190
nop
mov eax, dword [r8]
lea r15, [r8 + rax]
lea r14, [r8 + rax]
add r14, 4
mov rcx, rbx
mov rdx, r14
call fcn.140036ab0
mov ebp, eax
mov rcx, r14
call fcn.140036b30
lea r8, [rax + r15]
add r8, 5
test ebp, ebp
jne 0x140016160
movzx r9d, word [r8 + 4]
add r8, 6
mov rcx, rdi
mov rdx, rsi
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
jmp fcn.140021f50
lea rcx, str.Error__corrupted_constants_object
call fcn.140036694
call fcn.140034a18
int3

Function at 0x140027158
Capabilities:
Parse pe header

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

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14003248c
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x1400324fb
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400324fb
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400324fb
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400324fb
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400324fb
cmp dword [rcx + 0x84], 0xe
jbe 0x1400324fb
cmp dword [rcx + 0xf8], 0
je 0x1400324fb
mov ecx, ebx
call fcn.1400323c4
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.140032620
nop
cmp dword [rbp + 0x20], 0
je 0x140032549
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140032458
int3

Function at 0x14003248c
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x14003248c
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov ebx, ecx
test r8d, r8d
jne 0x1400324fb
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400324fb
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400324fb
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400324fb
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400324fb
cmp dword [rcx + 0x84], 0xe
jbe 0x1400324fb
cmp dword [rcx + 0xf8], 0
je 0x1400324fb
mov ecx, ebx
call fcn.1400323c4
mov byte [rbp + 0x28], 0
lea rax, [rbp + 0x18]
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x20]
mov qword [rbp - 0x10], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov eax, 2
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
lea r9, [rbp - 0x2c]
lea r8, [rbp - 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rbp - 0x30]
call fcn.140032620
nop
cmp dword [rbp + 0x20], 0
je 0x140032549
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140032458
int3

Function at 0x1400372d0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400372f8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1400372f8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x14003cddc
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 0x14003ce63
mov rsi, rbx
cmp word [rax], bp
je 0x14003ce22
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14003ce0c
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14003ce08
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.140039ff8
mov rdi, rax
test rax, rax
je 0x14003ce50
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140045a70
mov rbp, rdi
xor ecx, ecx
call fcn.140039154
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 0x140041984
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x14004199a
mov al, 1
jmp 0x1400419fa
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1400419ab
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x1400419f8
mov ecx, dword [rcx + 0x18]
nop
call fcn.14003d2d4
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400419f8
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1400419f8
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1400419f8
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x1400419fa
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x140004000
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
cld
and rsp, 0xfffffffffffffff0
call fcn.1400040d6
push r9
push r8
push rdx
push rcx
xor rdx, rdx
push rsi
mov rdx, qword gs:[rdx + 0x60]
mov rdx, qword [rdx + 0x18]
mov rdx, qword [rdx + 0x20]
movzx rcx, word [rdx + 0x4a]
mov rsi, qword [rdx + 0x50]
xor r9, r9
xor rax, rax
lodsb al, byte [rsi]
cmp al, 0x61
jl 0x140004037
sub al, 0x20
ror r9d, 0xd
add r9d, eax
loop 0x14000402d
push rdx
mov rdx, qword [rdx + 0x20]
mov eax, dword [rdx + 0x3c]
add rax, rdx
push r9
cmp word [rax + 0x18], 0x20b
jne 0x1400040cb
mov eax, dword [rax + 0x88]
test rax, rax
je 0x1400040cb
add rax, rdx
mov ecx, dword [rax + 0x18]
mov r8d, dword [rax + 0x20]
push rax
add r8, rdx
jrcxz 0x1400040ca
dec rcx
xor r9, r9
mov esi, dword [r8 + rcx*4]
add rsi, rdx
xor rax, rax
ror r9d, 0xd
lodsb al, byte [rsi]
add r9d, eax
cmp al, ah
jne 0x140004081
add r9, qword [rsp + 8]
cmp r9d, r10d
jne 0x140004072
pop rax
mov r8d, dword [rax + 0x24]
add r8, rdx
mov cx, word [r8 + rcx*2]
mov r8d, dword [rax + 0x1c]
add r8, rdx
mov eax, dword [r8 + rcx*4]
pop r8
add rax, rdx
pop r8
pop rsi
pop rcx
pop rdx
pop r8
pop r9
pop r10
sub rsp, 0x20
push r10
jmp rax
pop rax
pop r9
pop rdx
mov rdx, qword [rdx]
jmp 0x140004021
Function at 0x140938160
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1409382e7
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 0x140938191
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140938177
add dl, dl
jne 0x14093819e
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1409381fe
xor eax, eax
add dl, dl
jne 0x1409381ad
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1409382b5
add dl, dl
jne 0x1409381be
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1409381cb
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1409381d8
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1409381e5
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1409381f2
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140938186
mov eax, 1
add dl, dl
jne 0x14093820e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14093821b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140938203
sub eax, ebx
mov ebx, 1
jne 0x140938254
mov ecx, 1
add dl, dl
jne 0x140938236
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140938243
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14093822b
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140938186
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140938270
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14093827d
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140938265
cmp eax, 0x7d00
jae 0x1409382a3
cmp eax, 0x500
jb 0x14093829e
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140938186
cmp eax, 0x7f
ja 0x1409382a6
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140938186
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1409382da
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 0x140938186
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140004428
Capabilities:
Parse pe header

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

Disassembly:
push rbx
sub rsp, 0x40
mov qword [rsp + 0x58], rdx
mov rbx, r8
xor edx, edx
test rcx, rcx
je 0x140003c74
cmp word [rcx], 0x5a4d
jne 0x140003c74
movsxd rax, dword [rcx + 0x3c]
cmp eax, 0x400
jg 0x140003c74
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140003c74
mov edx, dword [rcx + 0x28]
add rdx, qword [rsp + 0x58]
mov rcx, rbx
call fcn.140003b80
test eax, eax
jne 0x140003c90
xor eax, eax
add rsp, 0x40
pop rbx
ret
mov rcx, rbx
call fcn.140003bf0
test rax, rax
je 0x140003c85
lea rdx, [rax + 0x10]
lea rax, [rsp + 0x38]
mov rcx, qword [rbx]
mov r9d, 8
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x58]
mov qword [rsp + 0x38], 0
call fcn.140004439
not eax
shr eax, 0x1f
add rsp, 0x40
pop rbx
ret

Function at 0x140004340
Capabilities:
Execute syscall

Disassembly:
pop rax
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x28
mov rcx, r10
call fcn.1400042e0
add rsp, 0x28
mov rcx, qword [rsp + 8]
mov rdx, qword [rsp + 0x10]
mov r8, qword [rsp + 0x18]
mov r9, qword [rsp + 0x20]
mov r10, rcx
syscall
ret

Function at 0x140009944
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rax, qword [0x1405791b8]
xor ebx, ebx
add rax, 0x18
mov r12, rcx
mov ecx, dword [0x1405791b4]
mov rsi, rdx
mov rdi, r8
cmp ebx, ecx
jge 0x140009992
mov rdx, qword [rax]
cmp r12, rdx
jb 0x14000998a
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp r12, rdx
jb 0x140009a79
inc ebx
add rax, 0x28
jmp 0x14000996a
mov rcx, r12
call fcn.14000a171
mov rbp, rax
test rax, rax
jne 0x1400099b1
mov rdx, r12
lea rcx, str.Address__p_has_no_image_section
call fcn.1400098e0
movsxd rbx, ebx
mov rax, qword [0x1405791b8]
xor edx, edx
imul rbx, rbx, 0x28
add rax, rbx
mov dword [rax], edx
mov qword [rax + 0x20], rbp
call fcn.14000a21f
mov edx, dword [rbp + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1405791b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
jne 0x140009a13
mov rax, qword [0x1405791b8]
mov edx, dword [rbp + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.1400098e0
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140009a73
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x140009a73
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 [0x1405791b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140009a73
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.1400098e0
inc dword [0x1405791b4]
mov ecx, edi
mov rdi, r12
rep movsb byte [rdi], byte [rsi]
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret