joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1802a6418
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x58
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0xffffffffffffffff
jne 0x1802a6473
xor al, al
jmp 0x1802a6500
mov dword [rsp + 0x40], 0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, dword [rsp + 0x70]
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1802a64aa
mov dword [rsp + 0x40], 0
cmp qword [rsp + 0x78], 0
je 0x1802a64da
mov rax, qword [rsp + 0x78]
add rax, 0x10
mov rcx, qword [rsp + 0x78]
add rcx, 8
mov rdx, qword [rsp + 0x78]
mov r9, rax
mov r8, rcx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_SetFileTime]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x40]
cmp rax, qword [rsp + 0x70]
je 0x1802a64fe
mov rcx, qword [rsp + 0x60]
call fcn.1801ea270
xor al, al
jmp 0x1802a6500
mov al, 1
add rsp, 0x58
ret
Function at 0x1802a650c
Capabilities:
Query environment variable

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x150
mov dword [rsp + 0x30], 0
mov byte [rsp + 0x40], 0
lea rax, [rsp + 0x41]
mov rdi, rax
xor eax, eax
mov ecx, 0x103
rep stosb byte [rdi], al
mov eax, dword [rsp + 0x168]
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0
je 0x1802a6573
cmp dword [rsp + 0x34], 1
je 0x1802a65ea
cmp dword [rsp + 0x34], 2
je 0x1802a6636
cmp dword [rsp + 0x34], 3
je 0x1802a667f
jmp 0x1802a66c5
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x2a
xor ecx, ecx
call fcn.1801e3870
test eax, eax
je 0x1802a65e5
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x26
xor ecx, ecx
call fcn.1801e3870
test eax, eax
je 0x1802a65e5
mov r8d, 0x104
lea rdx, [rsp + 0x40]
lea rcx, [0x1803ac2e8]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x1802a65e5
lea r8, [0x1803ac2d0]
mov edx, 0x104
lea rcx, [rsp + 0x40]
call fcn.180180838
jmp 0x1802a66e7
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1c
xor ecx, ecx
call fcn.1801e3870
test eax, eax
je 0x1802a6631
xor edx, edx
mov rcx, qword [rsp + 0x160]
call fcn.1802a650c
mov eax, dword [rsp + 0x30]
or eax, 1
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x160]
jmp 0x1802a670c
jmp 0x1802a66e7
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1a
xor ecx, ecx
call fcn.1801e3870
test eax, eax
je 0x1802a667d
xor edx, edx
mov rcx, qword [rsp + 0x160]
call fcn.1802a650c
mov eax, dword [rsp + 0x30]
or eax, 1
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x160]
jmp 0x1802a670c
jmp 0x1802a66e7
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x23
xor ecx, ecx
call fcn.1801e3870
test eax, eax
je 0x1802a66c3
xor edx, edx
mov rcx, qword [rsp + 0x160]
call fcn.1802a650c
mov eax, dword [rsp + 0x30]
or eax, 1
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x160]
jmp 0x1802a670c
jmp 0x1802a66e7
mov rcx, qword [rsp + 0x160]
call fcn.180073040
mov eax, dword [rsp + 0x30]
or eax, 1
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x160]
jmp 0x1802a670c
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x160]
call fcn.1800730e0
mov eax, dword [rsp + 0x30]
or eax, 1
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x160]
add rsp, 0x150
pop rdi
ret
Function at 0x1802ad660
Capabilities:
Create process on windows
Get common file path

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x3c8
mov qword [rsp + 0xd8], 0xfffffffffffffffe
xor edx, edx
mov rcx, qword [rsp + 0x3d0]
call fcn.1801e68f0
movzx eax, al
test eax, eax
jne 0x1802ad69d
mov eax, 2
jmp 0x1802ad92b
mov r8d, 0x18
xor edx, edx
lea rcx, [rsp + 0x80]
call fcn.18017d170
mov r8d, 0x68
xor edx, edx
lea rcx, [rsp + 0x140]
call fcn.18017d170
mov dword [rsp + 0x140], 0x68
lea rcx, [rsp + 0x98]
call fcn.180073cf0
nop
lea rcx, [rsp + 0xb8]
call fcn.180073cf0
nop
mov dx, 0x2e
mov rcx, qword [rsp + 0x3d0]
call fcn.180180788
mov qword [rsp + 0x58], rax
lea rdx, [0x1803a73e8]
mov rcx, qword [rsp + 0x58]
call fcn.18017dc80
test eax, eax
jne 0x1802ad77b
mov rdx, qword [rsp + 0x3d0]
lea rcx, [rsp + 0xb8]
call fcn.1800aac90
mov r9, qword [rsp + 0x3d8]
mov r8, qword [rsp + 0x3d0]
lea rdx, [0x1803ab6d8]
lea rcx, [rsp + 0x100]
call fcn.1801e9260
mov qword [rsp + 0x70], rax
mov rdx, qword [rsp + 0x70]
lea rcx, [rsp + 0x98]
call fcn.180073df0
lea rcx, [rsp + 0x100]
call fcn.180073fc0
jmp 0x1802ad83c
lea rdx, [0x1803ab778]
mov rcx, qword [rsp + 0x58]
call fcn.18017dc80
test eax, eax
jne 0x1802ad83c
mov edx, 0x104
lea rcx, [rsp + 0x1b0]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea r8, [rsp + 0x1b0]
lea rdx, [0x1803ab758]
lea rcx, [rsp + 0x120]
call fcn.1801e9260
mov qword [rsp + 0x60], rax
mov rdx, qword [rsp + 0x60]
lea rcx, [rsp + 0xb8]
call fcn.180073df0
lea rcx, [rsp + 0x120]
call fcn.180073fc0
mov rax, qword [rsp + 0x3d8]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x3d0]
lea r8, [rsp + 0x1b0]
lea rdx, [0x1803ab7a0]
lea rcx, [rsp + 0xe0]
call fcn.1801e9260
mov qword [rsp + 0x78], rax
mov rdx, qword [rsp + 0x78]
lea rcx, [rsp + 0x98]
call fcn.180073df0
lea rcx, [rsp + 0xe0]
call fcn.180073fc0
mov dword [rsp + 0x50], 0xffffffff
lea rcx, [rsp + 0x98]
call fcn.180003ba0
test rax, rax
je 0x1802ad904
lea rcx, [rsp + 0x98]
call fcn.180074060
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0xb8]
call fcn.180074060
lea rcx, [rsp + 0x80]
mov qword [rsp + 0x48], rcx
lea rcx, [rsp + 0x140]
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x400
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rsp + 0x68]
mov rdx, rcx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x1802ad904
mov edx, 0x2710
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea rdx, [rsp + 0x50]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x50]
mov dword [rsp + 0x54], eax
lea rcx, [rsp + 0xb8]
call fcn.180073fc0
nop
lea rcx, [rsp + 0x98]
call fcn.180073fc0
mov eax, dword [rsp + 0x54]
add rsp, 0x3c8
ret
Function at 0x1802ad93c
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
mov eax, 0x20a8
call fcn.1801907a0
sub rsp, rax
mov qword [rsp + 0x70], 0xfffffffffffffffe
cmp qword [rsp + 0x20b8], 0
jne 0x1802ad96e
mov al, 1
jmp 0x1802ada7f
mov dword [rsp + 0x34], 0
mov dword [rsp + 0x38], 0x2000
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x34]
xor r8d, r8d
lea rdx, [0x1803aaa00]
mov rcx, qword [rsp + 0x20b0]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x1802ad9bd
xor al, al
jmp 0x1802ada7f
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x50]
call fcn.1800aac40
nop
lea rdx, [rsp + 0x88]
lea rcx, [rsp + 0x50]
call fcn.180079390
mov qword [rsp + 0x40], rax
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x50]
call fcn.1800793d0
mov qword [rsp + 0x48], rax
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0x50]
call fcn.180079390
lea rcx, [fcn.18017dec0]
mov qword [rsp + 0x20], rcx
mov rcx, qword [rsp + 0x40]
mov r9, qword [rcx]
mov rcx, qword [rsp + 0x48]
mov r8, qword [rcx]
mov rdx, qword [rax]
lea rcx, [rsp + 0x78]
call fcn.1800ad3a0
xor r8d, r8d
mov rdx, qword [rsp + 0x20b8]
lea rcx, [rsp + 0x50]
call fcn.1801485a8
cmp rax, qword [0x180323d38]
jne 0x1802ada6c
mov byte [rsp + 0x30], 0
lea rcx, [rsp + 0x50]
call fcn.180073fc0
mov al, byte [rsp + 0x30]
jmp 0x1802ada7f
mov byte [rsp + 0x31], 1
lea rcx, [rsp + 0x50]
call fcn.180073fc0
mov al, byte [rsp + 0x31]
add rsp, 0x20a8
ret
Function at 0x1802ae1d4
Capabilities:
Get file size
Read file via mapping

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x488
mov dword [rsp + 0x40], 0
cmp qword [rsp + 0x498], 0
je 0x1802ae207
mov rax, qword [rsp + 0x498]
movzx eax, word [rax]
test eax, eax
jne 0x1802ae22c
mov rcx, qword [rsp + 0x490]
call fcn.180073cf0
mov eax, dword [rsp + 0x40]
or eax, 1
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x490]
jmp 0x1802ae3ec
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0xffffffffffffffff
jne 0x1802ae293
mov rcx, qword [rsp + 0x490]
call fcn.180073cf0
mov eax, dword [rsp + 0x40]
or eax, 1
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x490]
jmp 0x1802ae3ec
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, 2
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0xffffffffffffffff
je 0x1802ae2cf
cmp qword [rsp + 0x50], 0
jne 0x1802ae2ff
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x490]
call fcn.180073cf0
mov eax, dword [rsp + 0x40]
or eax, 1
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x490]
jmp 0x1802ae3ec
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 4
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [rsp + 0x58], rax
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov eax, eax
mov qword [rsp + 0x68], rax
cmp qword [rsp + 0x68], 0x400
jbe 0x1802ae3a3
mov rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x68]
lea rax, [rax + rcx - 0x110]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x58]
add rcx, rax
mov rax, rcx
mov eax, dword [rax - 0x10]
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0xda7affff
jne 0x1802ae3a3
mov rax, qword [rsp + 0x70]
movzx eax, word [rax]
test eax, eax
je 0x1802ae3a3
mov r9d, 0x100
mov r8, qword [rsp + 0x70]
mov edx, 0x100
lea rcx, [rsp + 0x80]
call fcn.18018146c
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rsp + 0x80]
mov rcx, qword [rsp + 0x490]
call fcn.1800aac40
mov eax, dword [rsp + 0x40]
or eax, 1
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x490]
add rsp, 0x488
ret

Function at 0x1802b0bc4
Capabilities:
Check mutex on windows

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov byte [rsp + 0x20], 0
mov r8, qword [rsp + 0x40]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x1802b0c0b
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1802b0c00
mov byte [rsp + 0x20], 1
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [rsp + 0x20]
add rsp, 0x38
ret
Function at 0x1802b9a54
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x48
mov rax, qword [rsp + 0x50]
movzx eax, word [rax]
sar eax, 4
cdqe
mov rcx, qword [rsp + 0x70]
mov eax, dword [rcx + rax*4]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x50]
movzx eax, word [rax]
xor eax, 0x7ff
sar eax, 4
cdqe
mov rcx, qword [rsp + 0x70]
mov eax, dword [rcx + rax*4]
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0x50]
movzx eax, word [rax + 2]
sar eax, 4
cdqe
mov rcx, qword [rsp + 0x70]
mov eax, dword [rcx + rax*4]
mov ecx, dword [rsp + 0x24]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x2c], eax
mov rax, qword [rsp + 0x50]
movzx eax, word [rax + 2]
xor eax, 0x7ff
sar eax, 4
cdqe
mov rcx, qword [rsp + 0x70]
mov eax, dword [rcx + rax*4]
mov ecx, dword [rsp + 0x24]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x20], 0
mov dword [rsp + 0x20], 0
jmp 0x1802b9b07
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 8
jae 0x1802b9b5d
mov eax, dword [rsp + 0x60]
cmp dword [rsp + 0x20], eax
jb 0x1802b9b1d
jmp 0x1802b9c15
mov eax, dword [rsp + 0x58]
shl eax, 3
mov eax, eax
mov rcx, qword [rsp + 0x50]
lea rax, [rcx + rax*2 + 4]
mov r9, qword [rsp + 0x70]
mov r8d, dword [rsp + 0x20]
mov edx, 3
mov rcx, rax
call fcn.1802b9eac
mov ecx, dword [rsp + 0x28]
add ecx, eax
mov eax, ecx
mov ecx, dword [rsp + 0x20]
mov rdx, qword [rsp + 0x68]
mov dword [rdx + rcx*4], eax
jmp 0x1802b9afd
jmp 0x1802b9b69
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0x10
jae 0x1802b9bc4
mov eax, dword [rsp + 0x60]
cmp dword [rsp + 0x20], eax
jb 0x1802b9b7f
jmp 0x1802b9c15
mov eax, dword [rsp + 0x20]
sub eax, 8
mov ecx, dword [rsp + 0x58]
shl ecx, 3
mov ecx, ecx
mov rdx, qword [rsp + 0x50]
lea rcx, [rdx + rcx*2 + 0x104]
mov r9, qword [rsp + 0x70]
mov r8d, eax
mov edx, 3
call fcn.1802b9eac
mov ecx, dword [rsp + 0x2c]
add ecx, eax
mov eax, ecx
mov ecx, dword [rsp + 0x20]
mov rdx, qword [rsp + 0x68]
mov dword [rdx + rcx*4], eax
jmp 0x1802b9b5f
jmp 0x1802b9bd0
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x60]
cmp dword [rsp + 0x20], eax
jae 0x1802b9c15
mov eax, dword [rsp + 0x20]
sub eax, 0x10
mov rcx, qword [rsp + 0x50]
add rcx, 0x204
mov r9, qword [rsp + 0x70]
mov r8d, eax
mov edx, 8
call fcn.1802b9eac
mov ecx, dword [rsp + 0x30]
add ecx, eax
mov eax, ecx
mov ecx, dword [rsp + 0x20]
mov rdx, qword [rsp + 0x68]
mov dword [rdx + rcx*4], eax
jmp 0x1802b9bc6
add rsp, 0x48
ret
Function at 0x1802ba060
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x18
mov dword [rsp + 4], 0
mov dword [rsp], 0x100
mov eax, dword [rsp + 0x28]
bts eax, 8
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x30]
shl eax, 1
mov dword [rsp + 0x30], eax
mov eax, dword [rsp]
mov ecx, dword [rsp + 0x30]
and ecx, eax
mov eax, ecx
mov ecx, dword [rsp]
add ecx, eax
mov eax, ecx
mov ecx, dword [rsp + 0x28]
shr ecx, 8
add eax, ecx
mov eax, eax
mov rcx, qword [rsp + 0x20]
movzx eax, word [rcx + rax*2]
mov ecx, dword [rsp + 0x28]
shr ecx, 7
and ecx, 1
neg ecx
and ecx, 0x7ff
xor eax, ecx
sar eax, 4
cdqe
mov rcx, qword [rsp + 0x38]
mov eax, dword [rcx + rax*4]
mov ecx, dword [rsp + 4]
add ecx, eax
mov eax, ecx
mov dword [rsp + 4], eax
mov eax, dword [rsp + 0x28]
shl eax, 1
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x28]
mov ecx, dword [rsp + 0x30]
xor ecx, eax
mov eax, ecx
not eax
mov ecx, dword [rsp]
and ecx, eax
mov eax, ecx
mov dword [rsp], eax
cmp dword [rsp + 0x28], 0x10000
jb 0x1802ba092
mov eax, dword [rsp + 4]
add rsp, 0x18
ret

Function at 0x1802ba130
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
sub rsp, 0x18
mov dword [rsp], 0
mov eax, dword [rsp + 0x28]
bts eax, 8
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x28]
shr eax, 8
mov eax, eax
mov rcx, qword [rsp + 0x20]
movzx eax, word [rcx + rax*2]
mov ecx, dword [rsp + 0x28]
shr ecx, 7
and ecx, 1
neg ecx
and ecx, 0x7ff
xor eax, ecx
sar eax, 4
cdqe
mov rcx, qword [rsp + 0x30]
mov eax, dword [rcx + rax*4]
mov ecx, dword [rsp]
add ecx, eax
mov eax, ecx
mov dword [rsp], eax
mov eax, dword [rsp + 0x28]
shl eax, 1
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0x10000
jb 0x1802ba155
mov eax, dword [rsp]
add rsp, 0x18
ret

Function at 0x1802ba288
Capabilities:
Encode data using xor

Disassembly:
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x38
mov dword [rsp + 0x20], 0x100
mov eax, dword [rsp + 0x50]
bts eax, 8
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x58]
shl eax, 1
mov dword [rsp + 0x58], eax
mov eax, dword [rsp + 0x50]
shr eax, 7
and eax, 1
mov ecx, dword [rsp + 0x20]
mov edx, dword [rsp + 0x58]
and edx, ecx
mov ecx, edx
mov edx, dword [rsp + 0x20]
add edx, ecx
mov ecx, edx
mov edx, dword [rsp + 0x50]
shr edx, 8
add ecx, edx
mov ecx, ecx
mov rdx, qword [rsp + 0x48]
lea rcx, [rdx + rcx*2]
mov r8d, eax
mov rdx, rcx
mov rcx, qword [rsp + 0x40]
call fcn.1802ba3a8
mov eax, dword [rsp + 0x50]
shl eax, 1
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x50]
mov ecx, dword [rsp + 0x58]
xor ecx, eax
mov eax, ecx
not eax
mov ecx, dword [rsp + 0x20]
and ecx, eax
mov eax, ecx
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x50], 0x10000
jb 0x1802ba2b4
add rsp, 0x38
ret
Function at 0x14167d058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x14167d1df
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 0x14167d089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14167d06f
add dl, dl
jne 0x14167d096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14167d0f6
xor eax, eax
add dl, dl
jne 0x14167d0a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x14167d1ad
add dl, dl
jne 0x14167d0b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14167d0c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14167d0d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14167d0dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x14167d0ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x14167d07e
mov eax, 1
add dl, dl
jne 0x14167d106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x14167d113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14167d0fb
sub eax, ebx
mov ebx, 1
jne 0x14167d14c
mov ecx, 1
add dl, dl
jne 0x14167d12e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14167d13b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14167d123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14167d07e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x14167d168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x14167d175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x14167d15d
cmp eax, 0x7d00
jae 0x14167d19b
cmp eax, 0x500
jb 0x14167d196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14167d07e
cmp eax, 0x7f
ja 0x14167d19e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x14167d07e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x14167d1d2
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 0x14167d07e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x18000cdb0
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r15
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r15, rdx
mov rdi, rcx
je 0x18000cdd8
add rsp, 0x20
pop r15
pop rdi
pop rbx
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov rsi, rbx
mov qword [rsp + 0x58], r14
mov r9, qword [rax]
test r9, r9
je 0x18000cdfe
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x18000ce00
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x18000ce59
test ecx, ecx
jle 0x18000ce39
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
add r15, rbp
sub rbx, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x18000ce59
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x18000ce59
mov r8, rbx
mov edx, 1
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov r14, qword [rsp + 0x58]
sub rsi, rbx
mov rbp, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rdi
pop rbx
ret

Function at 0x18000ce80
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x30
mov rbp, r8
mov r14, rdx
mov rsi, rcx
test r8, r8
jg 0x18000cea2
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x18000ceb8
add rsp, 0x30
pop r14
pop rsi
pop rbp
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x38]
mov qword [rsp + 0x28], rbx
mov rbx, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x18000ced4
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x18000ced6
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x18000cf12
mov qword [rsp + 0x20], rdi
cmp rax, rbp
mov rdi, rbp
mov rcx, r14
cmovb rdi, rax
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsi + 0x50]
add r14, rdi
sub rbx, rdi
sub dword [rax], edi
mov rcx, qword [rsi + 0x38]
movsxd rax, edi
mov rdi, qword [rsp + 0x20]
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x18000cfae
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x18000cf4d
mov rcx, qword [rsi + 0x88]
mov rdx, qword [rsi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rsi + 0x38]
mov qword [rax], rcx
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
cmp rbx, 0xfff
jbe 0x18000cf8e
nop word [rax + rax]
mov r9, qword [rsi + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add r14, rax
sub rbx, rax
cmp rax, 0xfff
jne 0x18000cfae
cmp rbx, rax
ja 0x18000cf60
test rbx, rbx
je 0x18000cfae
mov r9, qword [rsi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbx, rax
sub rbp, rbx
mov rbx, qword [rsp + 0x28]
mov rax, rbp
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret