joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140024f64
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.1400140c4
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x140024fee
cmp byte [rbp - 0x21], r15b
je 0x140024fe9
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140025024
call fcn.140018880
test eax, eax
jne 0x140025010
cmp byte [rbp - 0x21], r15b
je 0x140025008
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140025024
cmp byte [rbp - 0x21], r15b
je 0x140025021
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.140014248
test eax, eax
jne 0x1400250c4
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.1400140c4
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x140025063
cmp byte [rbp - 0x21], r15b
je 0x140025098
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140025098
call fcn.140018880
test eax, eax
jne 0x140025084
cmp byte [rbp - 0x21], r15b
je 0x14002507d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140025098
cmp byte [rbp - 0x21], r15b
je 0x140025095
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.140014248
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x1400250c4
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x1400250c7
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x1400250d5
mov rcx, rdi
call fcn.140018504
cmp byte [rbp + 0x3f], r15b
je 0x1400250e4
mov rcx, qword [rbp + 0x27]
call fcn.140018504
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 0x140025730
Capabilities:
Clear file content

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 r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.14001bb2c
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.14001bb2c
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x140025880
cmp rax, 0xffffffffffffffff
je 0x140025880
xor edi, edi
test rbp, rbp
jle 0x14002582b
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.140018540
mov rbx, rax
test rax, rax
jne 0x1400257b8
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x140025821
mov edx, 0x8000
mov ecx, r14d
call fcn.1400154d0
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.14001a27c
cmp eax, 0xffffffff
je 0x140025801
cdqe
sub rbp, rax
test rbp, rbp
jg 0x1400257c8
mov edx, r15d
mov ecx, r14d
call fcn.1400154d0
jmp 0x140025821
cmp byte [rsi + 0x38], dil
je 0x140025818
cmp dword [rsi + 0x34], 5
jne 0x140025818
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
cmp byte [rsi + 0x30], dil
je 0x140025821
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.140018504
jmp 0x140025894
jns 0x140025894
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.14001bb2c
cmp rax, 0xffffffffffffffff
jne 0x14002584c
cmp byte [rsi + 0x30], dil
je 0x140025894
mov edi, dword [rsi + 0x2c]
jmp 0x140025894
mov ecx, r14d
call fcn.1400203a4
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x140025894
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, 0xd
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], 0xd
jmp 0x140025894
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14002588d
mov eax, dword [rsi + 0x2c]
jmp 0x140025892
mov eax, 0x16
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.14001bb2c
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret

Function at 0x140026750
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140026778
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140026778
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x2fc4caa80
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 sym.__acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sym.fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sym.__acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sym.vfprintf
call sym.abort
nop

Function at 0x2fc4cb482
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x2fc4ef108]
test eax, eax
je 0x2fc4cb51a
lea rax, [0x2fc4ef0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x2fc4ef110]
mov qword [rbp - 8], rax
jmp 0x2fc4cb4fe
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 0x2fc4cb4f2
cmp qword [rbp - 0x10], 0
je 0x2fc4cb4f2
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 0x2fc4cb4b8
lea rax, [0x2fc4ef0e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x2fc4cb51b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x2fc4cb620
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 0x2fc4cb648
mov eax, 0
jmp 0x2fc4cb696
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 0x2fc4cb671
mov eax, 0
jmp 0x2fc4cb696
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 0x2fc4cb691
mov eax, 0
jmp 0x2fc4cb696
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x2fc4cb69c
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 0x2fc4cb71a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x2fc4cb711
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 0x2fc4cb711
mov rax, qword [rbp - 8]
jmp 0x2fc4cb72f
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 0x2fc4cb6e4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140010188
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 [0x140019760], eax
call fcn.140010b30
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 [0x140019760], 0
jne case.default.0x1400101de
mov ecx, 1
call fcn.140010b30
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]
leave
and ch, byte [rdi]
pop rbp
mov dl, reloc.OLEAUT32.dll_CreateErrorInfo
in al, dx
jae 0x14002b0a0
popfq
mov bl, byte [rdi - 0x294d1ac7]
and bl, byte [rdi + 0x16ffa6be]
invalid
push rsp
ficomp word [rbp + 0x2d]
fmulp st(2)
out 0xd8, al
loopne 0x14002b0e2
mov esi, 0xcf1c59ef
invalid
xchg ecx, eax
cmp dl, byte [ecx - 0x16]
and al, 0x2a
stosb byte [rdi], al
jne 0x14002b16a
sbb byte [0x124bcc22e], cl
xchg dword [rax + 0x1c], ebx
sahf
adc al, byte [rbx]
int 0x3c
invalid
push rcx
int1
invalid
Function at 0x140001070
Capabilities:
Access peb ldr_data

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x450
mov rax, qword [0x140005040]
xor rax, rsp
mov qword [rsp + 0x440], rax
mov rax, qword gs:[0x60]
mov r15, rcx
mov rdx, qword [rax + 0x18]
mov rdi, qword [rdx + 0x20]
test rdi, rdi
je 0x14000119d
xor r12d, r12d
nop dword [rax + rax]
cmp word [rdi + 0x48], r12w
je 0x14000119d
mov rbp, qword [rdi + 0x50]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rcx, r15
movsxd rsi, eax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd r14, eax
cmp esi, 0x104
jge 0x140001191
cmp r14d, 0x104
jge 0x140001191
mov rbx, r12
test rsi, rsi
jle 0x14000112b
nop dword [rax + rax]
movzx ecx, word [rbp + rbx*2]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_tolower]
mov word [rsp + rbx*2 + 0x230], ax
inc rbx
cmp rbx, rsi
jl 0x140001110
add rbx, rbx
cmp rbx, 0x208
jae 0x1400011d1
mov word [rsp + rbx + 0x230], r12w
mov rbx, r12
test r14d, r14d
jle 0x140001168
nop dword [rax]
movzx ecx, word [r15 + rbx*2]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_tolower]
mov word [rsp + rbx*2 + 0x20], ax
inc rbx
cmp rbx, r14
jl 0x140001150
add rbx, rbx
cmp rbx, 0x208
jae 0x1400011d1
lea rdx, [rsp + 0x20]
mov word [rsp + rbx + 0x20], r12w
lea rcx, [rsp + 0x230]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1400011cb
mov rdi, qword [rdi]
test rdi, rdi
jne 0x1400010c0
xor eax, eax
mov rcx, qword [rsp + 0x440]
xor rcx, rsp
call fcn.140001ad0
lea r11, [rsp + 0x450]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
mov rax, qword [rdi + 0x20]
jmp 0x14000119f
call fcn.140001bf8
int3
Function at 0x1400011e0
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
mov r11, rsp
mov qword [r11 + 0x20], rbx
push rbp
sub rsp, 0xf0
mov eax, 0x5a4d
mov rbp, rdx
mov rbx, rcx
cmp word [rcx], ax
jne 0x140001365
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x140001365
movups xmm0, xmmword [rax + 0x18]
lea r8, [rsp]
mov qword [r11 + 8], rsi
movups xmm1, xmmword [rax + 0x28]
mov qword [r11 + 0x18], r14
xor r9d, r9d
movups xmmword [r8], xmm0
movups xmm0, xmmword [rax + 0x38]
movups xmmword [r8 + 0x10], xmm1
movups xmm1, xmmword [rax + 0x48]
movups xmmword [r8 + 0x20], xmm0
movups xmm0, xmmword [rax + 0x58]
movups xmmword [r8 + 0x30], xmm1
movups xmm1, xmmword [rax + 0x68]
movups xmmword [r8 + 0x40], xmm0
movups xmm0, xmmword [rax + 0x78]
movups xmmword [r8 + 0x50], xmm1
movups xmmword [r8 + 0x60], xmm0
lea r8, [r8 + 0x80]
movups xmm0, xmmword [rax + 0x88]
sub rax, 0xffffffffffffff68
movups xmmword [r8 - 0x10], xmm0
movups xmm1, xmmword [rax]
movups xmm0, xmmword [rax + 0x10]
movups xmmword [r8], xmm1
movups xmm1, xmmword [rax + 0x20]
movups xmmword [r8 + 0x10], xmm0
movups xmm0, xmmword [rax + 0x30]
movups xmmword [r8 + 0x20], xmm1
movups xmm1, xmmword [rax + 0x40]
movups xmmword [r8 + 0x30], xmm0
movups xmm0, xmmword [rax + 0x50]
movups xmmword [r8 + 0x40], xmm1
movups xmm1, xmmword [rax + 0x60]
movups xmmword [r8 + 0x50], xmm0
movups xmmword [r8 + 0x60], xmm1
mov eax, dword [rsp + 0x70]
add rax, rcx
mov r10d, dword [rax + 0x20]
mov r14d, dword [rax + 0x1c]
add r10, rcx
mov r11d, dword [rax + 0x24]
add r14, rcx
mov esi, dword [rax + 0x14]
add r11, rcx
test esi, esi
je 0x14000133f
mov qword [rsp + 0x108], rdi
nop dword [rax]
nop dword [rax + rax]
movzx eax, word [r11]
mov r8d, dword [r10]
add r8, rbx
mov edi, dword [r14 + rax*4]
mov rax, rbp
add rdi, rbx
sub r8, rbp
nop word [rax + rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x140001323
inc rax
test ecx, ecx
jne 0x140001310
test edx, edx
je 0x140001360
inc r9d
add r11, 2
add r10, 4
cmp r9d, esi
jb 0x1400012f0
mov rdi, qword [rsp + 0x108]
mov rsi, qword [rsp + 0x100]
mov r14, qword [rsp + 0x110]
mov rbx, qword [rsp + 0x118]
add rsp, 0xf0
pop rbp
ret
mov rax, rdi
jmp 0x140001337
mov rbx, qword [rsp + 0x118]
xor eax, eax
add rsp, 0xf0
pop rbp
ret
Function at 0x1805e0058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1805e01df
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 0x1805e0089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1805e006f
add dl, dl
jne 0x1805e0096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1805e00f6
xor eax, eax
add dl, dl
jne 0x1805e00a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1805e01ad
add dl, dl
jne 0x1805e00b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1805e00c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1805e00d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1805e00dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1805e00ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1805e007e
mov eax, 1
add dl, dl
jne 0x1805e0106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1805e0113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1805e00fb
sub eax, ebx
mov ebx, 1
jne 0x1805e014c
mov ecx, 1
add dl, dl
jne 0x1805e012e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1805e013b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1805e0123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1805e007e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1805e0168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1805e0175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1805e015d
cmp eax, 0x7d00
jae 0x1805e019b
cmp eax, 0x500
jb 0x1805e0196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1805e007e
cmp eax, 0x7f
ja 0x1805e019e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1805e007e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1805e01d2
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 0x1805e007e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x180664058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1806641df
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 0x180664089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x18066406f
add dl, dl
jne 0x180664096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1806640f6
xor eax, eax
add dl, dl
jne 0x1806640a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1806641ad
add dl, dl
jne 0x1806640b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1806640c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1806640d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1806640dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1806640ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x18066407e
mov eax, 1
add dl, dl
jne 0x180664106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x180664113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1806640fb
sub eax, ebx
mov ebx, 1
jne 0x18066414c
mov ecx, 1
add dl, dl
jne 0x18066412e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x18066413b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x180664123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x18066407e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x180664168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x180664175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x18066415d
cmp eax, 0x7d00
jae 0x18066419b
cmp eax, 0x500
jb 0x180664196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x18066407e
cmp eax, 0x7f
ja 0x18066419e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x18066407e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1806641d2
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 0x18066407e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140003998
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x20
mov rdi, r8
lea rbp, [0x14001a060]
lea r8, [rdx + 1]
mov rbx, rdx
mov rsi, rcx
xor edx, edx
mov rcx, rbp
call fcn.140008820
xor r9d, r9d
test rbx, rbx
je 0x140003a4a
movabs r14, 0xf0f0f0f0f0f0f0f1
lea r15, [0x140013230]
mov rax, r14
mov rcx, rdi
mul rdi
shr rdx, 5
imul rax, rdx, 0x22
sub rcx, rax
movabs rax, 0x8080808080808081
mul rdi
mov r11b, byte [rcx + r15]
mov r10, rdx
shr r10, 7
add r10b, dil
sub rsi, rbp
lea r8, [r9 + rbp]
mov rcx, r9
mov rax, r14
mul r9
inc r9
shr rdx, 5
imul rax, rdx, 0x22
sub rcx, rax
mov al, byte [rcx + r15]
xor al, byte [rsi + r8]
xor al, r10b
xor al, r11b
mov byte [r8], al
cmp r9, rbx
jb 0x140003a19
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret

Function at 0x140003a64
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
xor r9b, r9b
movzx r11d, cl
shl r11d, 2
mov rbx, r8
movzx r8d, r9b
xor r10b, r10b
add r8d, r11d
shl r8d, 2
movzx eax, r10b
inc r10b
add eax, r8d
mov cl, byte [rax + rbx]
xor byte [rdx], cl
inc rdx
cmp r10b, 4
jb 0x140003a85
inc r9b
cmp r9b, 4
jb 0x140003a77
mov rbx, qword [rsp + 8]
ret
Function at 0x140003aac
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov r8, rdx
mov rdx, rcx
mov r15, rcx
mov cl, 0xe
call fcn.140003a64
mov r12b, 0xd
mov edi, 4
mov al, byte [r15 + 9]
lea r13, [r15 + 2]
mov cl, byte [r15 + 0xd]
mov rdx, r15
mov byte [r15 + 0xd], al
mov r9, rdi
mov al, byte [r15 + 5]
mov byte [r15 + 9], al
mov al, byte [r15 + 1]
mov byte [r15 + 5], al
mov al, byte [r15 + 0xa]
mov byte [r15 + 1], cl
mov cl, byte [r13]
mov byte [r13], al
mov al, byte [r15 + 0xe]
mov byte [r15 + 0xa], cl
mov cl, byte [r15 + 6]
mov byte [r15 + 6], al
mov al, byte [r15 + 7]
mov byte [r15 + 0xe], cl
mov cl, byte [r15 + 3]
mov byte [r15 + 3], al
mov al, byte [r15 + 0xb]
mov byte [r15 + 7], al
mov al, byte [r15 + 0xf]
mov byte [r15 + 0xb], al
mov byte [r15 + 0xf], cl
mov rcx, rdx
mov r8, rdi
movzx eax, byte [rcx]
lea r10, [0x1400133a0]
mov al, byte [rax + r10]
mov byte [rcx], al
add rcx, rdi
sub r8, 1
jne 0x140003b55
inc rdx
sub r9, 1
jne 0x140003b4f
mov r8, rbx
mov rdx, r15
mov cl, r12b
call fcn.140003a64
test r12b, r12b
je 0x140003c96
mov r15, rdi
mov dil, byte [r13 + 1]
mov dl, 9
mov r14b, byte [r13 - 2]
mov cl, dil
mov bpl, byte [r13 - 1]
mov sil, byte [r13]
call fcn.140003cac
mov dl, 0xd
mov cl, sil
mov bl, al
call fcn.140003cac
mov dl, 0xb
mov cl, bpl
xor bl, al
call fcn.140003cac
mov dl, 0xe
mov cl, r14b
xor bl, al
call fcn.140003cac
xor bl, al
mov dl, 0xd
mov cl, dil
mov byte [r13 - 2], bl
call fcn.140003cac
mov dl, 0xb
mov cl, sil
mov bl, al
call fcn.140003cac
mov dl, 0xe
mov cl, bpl
xor bl, al
call fcn.140003cac
mov dl, 9
mov cl, r14b
xor bl, al
call fcn.140003cac
xor bl, al
mov dl, 0xb
mov cl, dil
mov byte [r13 - 1], bl
call fcn.140003cac
mov dl, 0xe
mov cl, sil
mov bl, al
call fcn.140003cac
mov dl, 9
mov cl, bpl
xor bl, al
call fcn.140003cac
mov dl, 0xd
mov cl, r14b
xor bl, al
call fcn.140003cac
xor bl, al
mov dl, 0xe
mov cl, dil
mov byte [r13], bl
call fcn.140003cac
mov dl, 9
mov cl, sil
mov bl, al
call fcn.140003cac
mov dl, 0xd
mov cl, bpl
xor bl, al
call fcn.140003cac
mov dl, 0xb
mov cl, r14b
xor bl, al
call fcn.140003cac
xor bl, al
mov edi, 4
mov byte [r13 + 1], bl
add r13, rdi
sub r15, 1
jne 0x140003b91
mov r15, qword [rsp + 0x60]
add r12b, 0xff
mov rbx, qword [rsp + 0x68]
jmp 0x140003ae5
mov rbx, qword [rsp + 0x78]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x140004240
Capabilities:
Encode data using xor

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 r12
push r14
push r15
sub rsp, 0x30
mov rbx, qword [rdx + 8]
xor ebp, ebp
mov rsi, rdx
mov r14, rcx
cmp dword [rdx], ebp
jbe 0x1400042cd
mov rdi, rcx
lea r12d, [rbp + 0x10]
sub rdi, rbx
add rdi, 0xf0
mov r8, r12
lea rcx, [rsp + 0x20]
mov rdx, rbx
call qword [0x140018780]
mov rdx, r14
mov rcx, rbx
call fcn.140003aac
mov rcx, r12
mov al, byte [rdi + rbx]
xor byte [rbx], al
inc rbx
sub rcx, 1
jne 0x14000429d
mov r8, r12
lea rdx, [rsp + 0x20]
lea rcx, [r14 + 0xf0]
call qword [0x140018780]
mov eax, dword [rsi]
sub rdi, r12
add rbp, r12
cmp rbp, rax
jb 0x14000427e
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop r12
ret