joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001808
Capabilities:
Find process by pid

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x20
mov rsi, rcx
mov rcx, qword [rcx + 8]
test rcx, rcx
je 0x1400019c2
and qword [rax + 8], 0
lea rdx, [rax + 8]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov rdi, qword [rsp + 0x30]
test rdi, rdi
je 0x1400019c2
mov rbx, qword [rdi + 0x28]
test rbx, rbx
jne 0x140001859
call fcn.1400011d4
mov ecx, eax
mov rbx, qword [rcx + rdi]
mov rax, rbx
shr rax, 0x38
cmp al, 0x40
jne 0x140001974
cmp qword [0x140004058], rdi
je 0x14000196d
lea rcx, [0x140002080]
call fcn.1400010a0
test rax, rax
je 0x140001974
mov r8, qword [rax + 0x1706a8]
test r8, r8
je 0x140001974
lea rcx, [rax + 0x18f7a0]
movabs r9, 0xffff000000000014
mov rax, rcx
mov rdx, rcx
and eax, 0x3f
and edx, 0xf
shl rdx, 2
xor rdx, rax
mov rax, rcx
and eax, 0x780
shl rdx, 5
xor rdx, rax
mov rax, rcx
and eax, 0x1fff
shl rdx, 2
xor rdx, rax
mov rax, rcx
and eax, 0x7ffff
shl rdx, 6
xor rdx, rax
mov rax, rcx
and eax, 0x7fffff
shl rdx, 4
xor rdx, rax
mov rax, rcx
and eax, 0x3ffff80
shl rdx, 3
xor rdx, rax
mov rax, rcx
and eax, 0x3fffffff
shl rdx, 4
xor rdx, rax
movabs rax, 0xfffffffff
and r8, rax
shl rdx, 0xd
shl r8, 0xc
mov rax, rcx
xor rax, qword [r8 + r9]
shl rax, 7
xor rax, rcx
mov qword [0x140004058], rdi
movabs rcx, 0x7ffffffff80
and rax, rcx
xor rdx, rax
movabs rax, 0xbfff000000000fff
and rbx, rax
shl rdx, 5
or rdx, rbx
mov qword [0x140004050], rdx
mov rbx, qword [0x140004050]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov rdx, qword [rsi + 0x10]
mov rcx, rbx
call fcn.1400015dc
test rax, rax
je 0x1400019c2
mov rdx, qword [rsi + 0x18]
lea r9, [rsp + 0x38]
mov rcx, rax
mov r8d, 0x1000
and ecx, 0xfff
sub r8, rcx
mov rcx, qword [rsi + 0x20]
cmp r8, rcx
cmovae r8, rcx
mov rcx, rax
call fcn.140001794
xor eax, eax
jmp 0x1400019c7
mov eax, 0xc0000001
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x140001487
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x14004df00]
mov dword [rax], 1
mov rax, qword [0x14004df10]
mov dword [rax], 1
mov rax, qword [0x14004df20]
mov dword [rax], 1
mov rax, qword [0x14004dea0]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400014d8
mov eax, 0
jmp 0x140001585
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 0x140001504
mov eax, 0
jmp 0x140001585
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000152a
cmp eax, 0x20b
je 0x140001551
jmp 0x140001580
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000153d
mov eax, 0
jmp 0x140001585
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001585
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000156c
mov eax, 0
jmp 0x140001585
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001585
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x1400286f0
Capabilities:
Encode data using xor
Extract resource via kernel32 functions
Hash data with crc32

Disassembly:
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp byte [0x140056de0], 0
mov r12, rcx
mov r13, rdx
mov rdi, r8
je 0x140028778
lea rdx, [0x14004c1e2]
mov rcx, rdi
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x140028880
mov rsi, qword [0x140056dd8]
jmp 0x140028735
lea rsi, [rdx + rax + 4]
mov rdx, rsi
mov rcx, rdi
call sub.msvcrt.dll_strcmp
mov rcx, rsi
mov ebx, eax
call sub.msvcrt.dll_strlen
lea rdx, [rsi + rax + 1]
mov eax, dword [rdx]
test ebx, ebx
jne 0x140028730
movzx r9d, word [rdx + 4]
lea r8, [rdx + 6]
mov rcx, r12
mov rdx, r13
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop r12
pop r13
jmp fcn.140027560
mov r8d, 0xa
mov edx, 3
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 rdx, rax
mov r9d, dword [rax]
mov eax, dword [rax + 4]
lea rcx, [rdx + 8]
mov qword [0x140056dd8], rcx
test eax, eax
je 0x140028868
sub eax, 1
lea r8, [rdx + rax + 9]
mov eax, 0xffffffff
nop dword [rax + rax]
movzx edx, byte [rcx]
xor edx, eax
mov eax, edx
and edx, 1
neg edx
shr eax, 1
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor edx, eax
mov eax, edx
and edx, 1
neg edx
shr eax, 1
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor edx, eax
mov eax, edx
and edx, 1
neg edx
shr eax, 1
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor edx, eax
mov eax, edx
shr eax, 1
and edx, 1
add rcx, 1
neg edx
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor eax, edx
cmp r8, rcx
jne 0x1400287d0
not eax
cmp r9d, eax
jne 0x140028907
mov byte [0x140056de0], 1
jmp 0x14002870d
cmp byte [0x140056dd0], 0
jne 0x140028724
mov rbx, qword [sym.imp.python310.dll_PyDict_New]
call rbx
mov qword [0x140056e30], rax
call rbx
mov qword [0x140056e28], rax
call rbx
mov qword [0x140056e20], rax
call rbx
mov qword [0x140056e60], rax
call rbx
mov qword [0x140056e58], rax
call rbx
mov qword [0x140056e50], rax
call rbx
mov qword [0x140056e40], rax
call rbx
mov byte [0x140056dd0], 1
mov qword [0x140056e38], rax
mov rax, qword [sym.imp.python310.dll__PyRuntime]
mov rax, qword [rax + 0x1f0]
mov rax, qword [rax + 0x10]
add rax, 0xda0
mov qword [0x140056de8], rax
jmp 0x140028724
lea rcx, str.Error__corrupted_constants_object
call sub.msvcrt.dll_puts
call sub.msvcrt.dll_abort
nop
nop dword [rax]
Function at 0x140032360
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call fcn.140043870
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call fcn.140043870
mov r8, rbx
mov rdx, qword [rbp + 0x20]
mov rcx, rax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop

Function at 0x140033012
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x140057308]
test eax, eax
je 0x1400330aa
lea rax, [0x1400572e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x140057310]
mov qword [rbp - 8], rax
jmp 0x14003308e
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 0x140033082
cmp qword [rbp - 0x10], 0
je 0x140033082
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 0x140033048
lea rax, [0x1400572e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x1400330ab
nop
add rsp, 0x30
pop rbp
ret

Function at 0x1400331b0
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 0x1400331d8
mov eax, 0
jmp 0x140033226
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 0x140033201
mov eax, 0
jmp 0x140033226
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 0x140033221
mov eax, 0
jmp 0x140033226
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x14003322c
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 0x1400332aa
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x1400332a1
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 0x1400332a1
mov rax, qword [rbp - 8]
jmp 0x1400332bf
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 0x140033274
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140e400b0
Capabilities:
Decompress data using aplib

Disassembly:
call 0x140e40237
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 0x140e400e1
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140e400c7
add dl, dl
jne 0x140e400ee
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140e4014e
xor eax, eax
add dl, dl
jne 0x140e400fd
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140e40205
add dl, dl
jne 0x140e4010e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140e4011b
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140e40128
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140e40135
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x140e40142
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140e400d6
mov eax, 1
add dl, dl
jne 0x140e4015e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140e4016b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140e40153
sub eax, ebx
mov ebx, 1
jne 0x140e401a4
mov ecx, 1
add dl, dl
jne 0x140e40186
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140e40193
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140e4017b
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140e400d6
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140e401c0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140e401cd
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140e401b5
cmp eax, 0x7d00
jae 0x140e401f3
cmp eax, 0x500
jb 0x140e401ee
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140e400d6
cmp eax, 0x7f
ja 0x140e401f6
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140e400d6
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x140e4022a
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 0x140e400d6
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x100015128
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x88
call qword [sym.imp.ntdll.dll_RtlCaptureContext]
xor r8d, r8d
mov r11, qword [0x1001252b8]
mov qword [rsp + 0x58], r11
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
lea rbp, [rbp - 0x12a71f01]
call fcn.10001510c
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x1000151af
lea r10, [r10 - 0x46ccc7fb]
xor ecx, ecx
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [0x1001251c0]
mov qword [rsp + 0x20], rax
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
mov r9, qword [rsp + 0x50]
call fcn.1000bf9a8
jmp 0x1000151d1
mov rax, qword [rsp + 0x88]
mov qword [0x1001252b8], rax
lea rax, [rsp + 0x88]
add rax, 8
mov qword [0x100125258], rax
xor ecx, ecx
mov rax, qword [0x1001252b8]
mov qword [0x100126a50], rax
mov rax, qword [rsp + 0x90]
mov qword [0x100125240], rax
mov dword [0x100126a40], 0xc0000409
mov dword [0x100126a44], 1
mov rax, qword [0x10011e450]
mov qword [rsp + 0x68], rax
mov rax, qword [0x1001267a8]
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [0x1000bf770]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xc0000409
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x88
ret
cmp rcx, qword [0x10011e450]
jne 0x1000d8aa7
rol rcx, 0x10
test cx, 0xffff
jne 0x1000d8aa3
ret 0
ror rcx, 0x10
mov qword [rsp + 8], rcx
lea rcx, [0x1001251c0]
jmp 0x100015128
Function at 0x1000d8a8c
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x88
call qword [sym.imp.ntdll.dll_RtlCaptureContext]
xor r8d, r8d
mov r11, qword [0x1001252b8]
mov qword [rsp + 0x58], r11
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
lea rbp, [rbp - 0x12a71f01]
call fcn.10001510c
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x1000151af
lea r10, [r10 - 0x46ccc7fb]
xor ecx, ecx
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [0x1001251c0]
mov qword [rsp + 0x20], rax
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
mov r9, qword [rsp + 0x50]
call fcn.1000bf9a8
jmp 0x1000151d1
mov rax, qword [rsp + 0x88]
mov qword [0x1001252b8], rax
lea rax, [rsp + 0x88]
add rax, 8
mov qword [0x100125258], rax
xor ecx, ecx
mov rax, qword [0x1001252b8]
mov qword [0x100126a50], rax
mov rax, qword [rsp + 0x90]
mov qword [0x100125240], rax
mov dword [0x100126a40], 0xc0000409
mov dword [0x100126a44], 1
mov rax, qword [0x10011e450]
mov qword [rsp + 0x68], rax
mov rax, qword [0x1001267a8]
mov qword [rsp + 0x70], rax
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rcx, [0x1000bf770]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov edx, 0xc0000409
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
add rsp, 0x88
ret
cmp rcx, qword [0x10011e450]
jne 0x1000d8aa7
rol rcx, 0x10
test cx, 0xffff
jne 0x1000d8aa3
ret 0
ror rcx, 0x10
mov qword [rsp + 8], rcx
lea rcx, [0x1001251c0]
jmp 0x100015128
Function at 0x100102318
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get system information on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
xchg rsi, rdi
push rsi
push rdi
sub rsp, 0x50
rdtsc
shl rdx, 0x20
or rax, rdx
cdqe
mov qword [0x1001241b0], rax
call qword [sym.imp.KERNEL32.dll_GetVersion]
lea rbp, [0x100000000]
xor ebx, ebx
and eax, 0x80000000
mov dword [0x1001268cc], eax
cmp dword [0x10011dbc0], ebx
jne 0x10010237e
lea rcx, [0x100126938]
mov edx, 0x80000000
call fcn.100090afc
cmp eax, ebx
jl 0x100102572
mov dword [0x10011dbc0], 1
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov r8d, 0x80000000
lea rcx, [0x100000000]
movsxd rdx, dword [0x10000003c]
mov rdi, qword [rsp + 0x28]
lea rax, [rdi + r8]
mov edx, dword [rdx + rbp + 0x50]
add rdx, rcx
cmp rdx, rax
jb 0x1001023b9
lea rdi, [rdx - 0x80000000]
lea rdx, [rdi + 0xffff]
and rdx, 0xffffffffffff0000
mov rdi, qword [rsp + 0x30]
mov qword [0x100126f18], rdx
lea rax, [rdi - 0x80000000]
cmp rcx, rax
jbe 0x1001023e8
mov qword [0x100126c28], rdi
jmp 0x1001023f2
add rcx, r8
mov qword [0x100126c28], rcx
mov word [0x100126c28], bx
mov rax, qword [0x100126c28]
sub rax, rdx
shr rax, 0x10
mov qword [0x10011ddb8], rax
mov eax, ebx
cmp eax, ebx
jl 0x100102572
mov rax, qword [0x1001241c8]
cmp rax, 1
jae 0x100102463
mov edx, 0x80000000
lea rax, [rax + rax*4]
lea rcx, [rbp + rax*8 + 0x11e208]
call fcn.1001c1000
mov edx, eax
cmp eax, ebx
jl 0x10010245c
mov rax, qword [0x1001241c8]
inc rax
cmp rax, 1
mov qword [0x1001241c8], rax
jb 0x100102425
cmp edx, ebx
jge 0x100102463
mov eax, edx
jmp 0x100102572
mov eax, dword [0x10000c52c]
cmp eax, ebx
je 0x1001024fd
mov eax, dword [0x10000c52c]
lea rsi, [0x100109088]
lea r9, [rsp + 0x78]
mov r8d, 0x40
mov edx, dword [0x1000a5f24]
mov rcx, rsi
imul edx, eax
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp eax, ebx
jne 0x1001024bf
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
mov ecx, 0x54f
cmove eax, ecx
movzx ecx, ax
or ecx, 0x80070000
cmp eax, ebx
cmovle ecx, eax
jmp 0x1001024ff
mov r8, rbx
mov eax, dword [0x10000c52c]
cmp eax, ebx
jbe 0x1001024fd
mov ecx, dword [0x1000a5f24]
mov edi, dword [0x1000a5f24]
xor eax, eax
mov dword [rbp + r8*4 + 0x127060], 0x23ad
imul rdi, r8
add rdi, rsi
rep stosb byte [rdi], al
inc r8
mov eax, dword [0x10000c52c]
cmp r8, rax
jb 0x1001024cc
mov ecx, ebx
cmp ecx, ebx
jge 0x100102507
mov eax, ecx
jmp 0x100102572
mov ecx, dword [0x10011dcc8]
cmp ecx, ebx
je 0x100102559
lea rdi, [0x10011dcf0]
mov edx, dword [0x10011dcc0]
mov qword [0x10011dcd0], rdi
lea rax, [rdx + rbp + 0x11dcf0]
mov qword [0x10011dcd8], rax
mov eax, dword [0x10011dcc4]
add rdx, rax
add rcx, rdx
add rcx, rdi
lea rax, [rdx + rbp + 0x11dcf0]
mov qword [0x10011dce0], rax
mov qword [0x10011dce8], rcx
mov dword [rsp + 0x70], ebx
lea rcx, [rsp + 0x70]
mov eax, 0x7178ab80
cmp dword [rsp + 0x70], ebx
cmovl ebx, dword [rsp + 0x70]
mov eax, ebx
mov rbx, qword [rsp + 0x80]
add rsp, 0x50
pop rdi
pop rsi
pop rbp
ret
Function at 0x140722c60
Capabilities:
Decompress data using aplib

Disassembly:
call 0x140722de7
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 0x140722c91
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140722c77
add dl, dl
jne 0x140722c9e
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140722cfe
xor eax, eax
add dl, dl
jne 0x140722cad
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140722db5
add dl, dl
jne 0x140722cbe
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140722ccb
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140722cd8
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140722ce5
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x140722cf2
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140722c86
mov eax, 1
add dl, dl
jne 0x140722d0e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140722d1b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140722d03
sub eax, ebx
mov ebx, 1
jne 0x140722d54
mov ecx, 1
add dl, dl
jne 0x140722d36
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140722d43
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140722d2b
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140722c86
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140722d70
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140722d7d
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140722d65
cmp eax, 0x7d00
jae 0x140722da3
cmp eax, 0x500
jb 0x140722d9e
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140722c86
cmp eax, 0x7f
ja 0x140722da6
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140722c86
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x140722dda
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 0x140722c86
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x180005320
Capabilities:
Get file size
Read file via mapping

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x150
mov rax, qword [0x1800882a8]
xor rax, rsp
mov qword [rsp + 0x140], rax
mov rbx, rdx
mov rdi, rcx
mov qword [rsp + 0x48], rcx
xor r15d, r15d
mov dword [rsp + 0x40], r15d
xor edx, edx
mov r8d, 0xc8
lea rcx, [rsp + 0x70]
call fcn.180040eb0
xor r9d, r9d
mov r8d, 0x100
lea rdx, [rsp + 0x70]
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_GetFinalPathNameByHandleA]
lea rcx, [rsp + 0x70]
mov rbx, 0xffffffffffffffff
mov rax, rbx
inc rax
cmp byte [rcx + rax], r15b
jne 0x180005390
test rax, rax
jne 0x1800053c0
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
mov qword [rdi + 0x10], r15
mov qword [rdi + 0x18], 0xf
mov byte [rdi], r15b
mov dword [rsp + 0x40], 1
jmp 0x1800054f2
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
lea rcx, [rsp + 0x74]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbp, rax
cmp rax, rbx
je 0x180005456
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov qword [rsp + 0x28], r15
mov dword [rsp + 0x20], esi
xor r9d, r9d
xor edx, edx
lea r8d, [r9 + 2]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov r14, rax
test rax, rax
je 0x18000544d
mov qword [rsp + 0x20], rsi
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 4]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rsi, rax
test rax, rax
jne 0x180005475
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
mov qword [rdi + 0x10], r15
mov qword [rdi + 0x18], 0xf
mov byte [rdi], r15b
mov dword [rsp + 0x40], 1
jmp 0x1800054f2
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x60], xmm1
inc rbx
cmp byte [rax + rbx], r15b
jne 0x180005486
mov r8, rbx
mov rdx, rsi
lea rcx, [rsp + 0x50]
call fcn.180006c30
nop
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movups xmm0, xmmword [rsp + 0x50]
movups xmmword [rdi], xmm0
movups xmm1, xmmword [rsp + 0x60]
movups xmmword [rdi + 0x10], xmm1
movdqa xmm0, xmmword [0x18006d380]
movdqu xmmword [rsp + 0x60], xmm0
mov byte [rsp + 0x50], 0
mov dword [rsp + 0x40], 1
movdqu xmmword [rsp + 0x60], xmm0
mov byte [rsp + 0x50], 0
mov rax, rdi
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.18003ef80
mov rbx, qword [rsp + 0x190]
add rsp, 0x150
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x180005790
Capabilities:
Get file size
Read file on windows

Disassembly:
push rsi
push r14
push r15
sub rsp, 0x40
xor esi, esi
mov r15, rdx
mov qword [rsp + 0x30], rsi
xor r9d, r9d
mov dword [rsp + 0x28], esi
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
lea r8d, [rsi + 7]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x18000585d
xor edx, edx
mov qword [rsp + 0x78], rdi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test eax, eax
je 0x18000584f
mov qword [rsp + 0x60], rbx
lea ecx, [rdi + 1]
mov qword [rsp + 0x68], rbp
call fcn.18003e7dc
mov dword [rsp + 0x70], esi
mov rbp, rax
mov ebx, esi
test rax, rax
je 0x180005808
mov byte [rdi + rax], bl
test edi, edi
je 0x18000583a
nop dword [rax]
mov r8d, edi
mov edx, ebx
sub r8d, ebx
mov qword [rsp + 0x20], rsi
add rdx, rbp
lea r9, [rsp + 0x70]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18000586a
add ebx, dword [rsp + 0x70]
cmp ebx, edi
jb 0x180005810
test r15, r15
je 0x180005842
mov dword [r15], edi
mov rsi, rbp
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdi, qword [rsp + 0x78]
mov rax, rsi
add rsp, 0x40
pop r15
pop r14
pop rsi
ret
cmp ebx, edi
jae 0x18000583a
test rbp, rbp
je 0x180005845
mov rcx, rbp
call fcn.18003e7a4
jmp 0x180005845