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

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x14000278d
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x140002784
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14000278f
add rax, 0x28
cmp rax, r9
jne 0x140002770
xor eax, eax
ret

Function at 0x140002790
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x140002820
mov rdx, qword [0x140005440]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x14000280e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x14000280e
cmp word [rax + 0x18], 0x20b
jne 0x14000280e
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x140002820
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x1400027f9
add rbx, 0x28
cmp rbx, rdi
je 0x140002820
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x1400027f0
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x140002830
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140005440]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x140002850
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x140002858
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002850
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x1400028ad
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x1400028a4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x140002850
add rax, 0x28
cmp rax, r9
jne 0x140002890
xor eax, eax
ret

Function at 0x1400028b0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140005440]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x1400028cf
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400028d8
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x1400028cf
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x1400028f0
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x140005440]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x140002910
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x140002918
ret
cmp word [rdx + 0x18], 0x20b
jne 0x140002910
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140002960
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x140002957
test rcx, rcx
je 0x140002910
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x140002948
xor eax, eax
ret
Function at 0x140002970
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140005440]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x14000298f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x140002998
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

Function at 0x1400029b0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x140005440]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x1400029d0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x1400029d8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x1400029d0
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x1400029d0
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x140002a24
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x140002a30
add rdx, 0x28
cmp rdx, r9
jne 0x140002a10
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

Function at 0x140002a40
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov r11, qword [0x140005440]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x140002a62
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x140002a70
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x140002a62
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x140002a62
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x140002a62
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x140002ac5
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x140002ad8
add rdx, 0x28
cmp r10, rdx
jne 0x140002ab0
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x140002ae7
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x140002af7
mov edx, dword [rax + 0xc]
test edx, edx
je 0x140002ace
test ecx, ecx
jg 0x140002ae0
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x140002d50
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140002d9a
mov ecx, _callnewh
cmp word [rax], cx
jne 0x140002d9a
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140002d9a
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140002d9a
cmp dword [rcx + 0x84], 0xe
jbe 0x140002d9a
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140002d9c
xor al, al
add rsp, 0x28
ret
Function at 0x140001000
Capabilities:
Access peb ldr_data
Encode data using xor
Get kernel32 base address
Hash data using fnv
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x7b8
lea rdx, [0x140043020]
lea rcx, [rsp + 0x30]
mov r8d, 0x380
call fcn.1400030c0
xor eax, eax
mov ecx, 1
lea rdx, str.QqAaZzOo123FFggfsssccghhjj
xor r8d, r8d
nop word [rax + rax]
cmp r8d, 0x1a
cmove r8d, eax
movsxd r9, r8d
movzx r9d, byte [r9 + rdx]
xor byte [rsp + rcx + 0x2f], r9b
cmp rcx, 0x37f
je 0x14000107f
inc r8d
cmp r8d, 0x1a
cmove r8d, eax
movsxd r8, r8d
movzx r9d, byte [r8 + rdx]
xor byte [rsp + rcx + 0x30], r9b
inc r8d
add rcx, 2
jmp 0x140001040
lea rcx, [rsp + 0x3b0]
lea rdx, [rsp + 0x30]
mov r8d, 0x380
call fcn.1400030c0
mov rax, qword gs:[0x60]
mov rcx, qword [rax + 0x18]
add rcx, 0x10
nop dword [rax + rax]
mov rcx, qword [rcx]
mov rax, qword [rcx + 0x30]
movsxd rdx, dword [rax + 0x3c]
mov edx, dword [rax + rdx + 0x88]
test rdx, rdx
je 0x1400010b0
mov r8d, dword [rax + rdx + 0x18]
test r8, r8
je 0x1400010b0
mov r9d, dword [rax + rdx + 0x20]
add r9, rax
lea r10, [rax + 1]
jmp 0x1400010e5
test r11, r11
je 0x1400010b0
dec r8
mov r11d, r8d
mov esi, dword [r9 + r11*4]
movzx ebx, byte [rax + rsi]
test bl, bl
je 0x1400010e0
add rsi, r10
mov edi, 0xae750f04
nop
movsx ebx, bl
lea ebp, [rbx - 0x41]
mov r14d, ebx
or r14d, 0x20
cmp bpl, 0x1a
cmovae r14d, ebx
xor r14d, edi
imul edi, r14d, 0x1000193
movzx ebx, byte [rsi]
inc rsi
test bl, bl
jne 0x140001100
cmp edi, 0xf2fae2dc
jne 0x1400010e0
mov ecx, dword [rax + rdx + 0x1c]
mov edx, dword [rax + rdx + 0x24]
add rcx, rax
add rdx, rax
movzx edx, word [rdx + r11*2]
mov r10d, dword [rcx + rdx*4]
add r10, rax
mov edx, 0x400
xor ecx, ecx
mov r8d, 0x1000
mov r9d, 0x40
call r10
mov rsi, rax
lea rdx, [rsp + 0x3b0]
mov r8d, 0x400
mov rcx, rax
call fcn.1400030c0
mov rax, qword gs:[0x60]
mov rcx, qword [rax + 0x18]
add rcx, 0x10
nop dword [rax + rax]
mov rcx, qword [rcx]
mov rax, qword [rcx + 0x30]
movsxd rdx, dword [rax + 0x3c]
mov edx, dword [rax + rdx + 0x88]
test rdx, rdx
je 0x140001190
mov r8d, dword [rax + rdx + 0x18]
test r8, r8
je 0x140001190
mov r9d, dword [rax + rdx + 0x20]
add r9, rax
lea r10, [rax + 1]
jmp 0x1400011c5
test r11, r11
je 0x140001190
dec r8
mov r11d, r8d
mov edi, dword [r9 + r11*4]
movzx ebp, byte [rax + rdi]
test bpl, bpl
je 0x1400011c0
add rdi, r10
mov ebx, 0x3b533136
movsx r14d, bpl
lea ebp, [r14 - 0x41]
mov r15d, r14d
or r15d, 0x20
cmp bpl, 0x1a
cmovae r15d, r14d
xor r15d, ebx
imul ebx, r15d, 0x1000193
movzx ebp, byte [rdi]
inc rdi
test bpl, bpl
jne 0x1400011e0
cmp ebx, 0xf144ec46
jne 0x1400011c0
mov ecx, dword [rax + rdx + 0x1c]
mov edx, dword [rax + rdx + 0x24]
add rcx, rax
add rdx, rax
movzx edx, word [rdx + r11*2]
mov r10d, dword [rcx + rdx*4]
add r10, rax
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor ecx, ecx
xor edx, edx
mov r8, rsi
xor r9d, r9d
call r10
mov rcx, rax
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor eax, eax
add rsp, 0x7b8
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop r15
ret
Function at 0x140019bb0
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0xb8
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140019e60
lea rcx, [rsp + 0x40]
call fcn.140019ef0
movzx eax, al
test eax, eax
jne 0x140019bf8
mov qword [rsp + 0x70], 0
lea rcx, [rsp + 0x40]
call fcn.140019e80
mov rax, qword [rsp + 0x70]
jmp 0x140019dc9
lea rcx, [rsp + 0x40]
call fcn.140019ea0
mov qword [rsp + 0x60], rax
mov rcx, qword [rsp + 0x60]
call fcn.140019e10
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x78]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0x40]
call fcn.140019ea0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, dword [rsp + 0x68]
mov r8, rax
xor edx, edx
xor ecx, ecx
call fcn.140019970
cdqe
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x140019c9e
mov qword [rsp + 0x80], 0
lea rcx, [rsp + 0x40]
call fcn.140019e80
mov rax, qword [rsp + 0x80]
jmp 0x140019dc9
mov r9d, 0x66
lea r8, str.minkernelcrtsucrt_srcdesktopcrtenvget_environment_from_os.cpp
mov edx, 2
mov rcx, qword [rsp + 0x58]
call fcn.140008f30
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.140002f30
lea rcx, [rsp + 0x48]
call fcn.140002fd0
movzx eax, al
test eax, eax
jne 0x140019d05
mov qword [rsp + 0x88], 0
lea rcx, [rsp + 0x48]
call fcn.140002f50
lea rcx, [rsp + 0x40]
call fcn.140019e80
mov rax, qword [rsp + 0x88]
jmp 0x140019dc9
lea rcx, [rsp + 0x48]
call fcn.140002ff0
mov qword [rsp + 0x90], rax
lea rcx, [rsp + 0x40]
call fcn.140019ea0
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x68]
mov r8, qword [rsp + 0x98]
xor edx, edx
xor ecx, ecx
call fcn.140019970
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jne 0x140019d9b
mov qword [rsp + 0xa0], 0
lea rcx, [rsp + 0x48]
call fcn.140002f50
lea rcx, [rsp + 0x40]
call fcn.140019e80
mov rax, qword [rsp + 0xa0]
jmp 0x140019dc9
lea rcx, [rsp + 0x48]
call fcn.140006c60
mov qword [rsp + 0xa8], rax
lea rcx, [rsp + 0x48]
call fcn.140002f50
lea rcx, [rsp + 0x40]
call fcn.140019e80
mov rax, qword [rsp + 0xa8]
add rsp, 0xb8
ret

Function at 0x14001af30
Capabilities:
Print debug messages

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x28
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
add rsp, 0x28
ret

Function at 0x14001ba10
Capabilities:
Get thread local storage value

Disassembly:
mov dword [rsp + 8], ecx
sub rsp, 0x48
call fcn.14001bf90
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x14001ba4f
mov rax, qword [rsp + 0x20]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x30], rax
mov ecx, dword [rsp + 0x50]
mov rax, qword [rsp + 0x30]
call qword [0x14005e008]
jmp 0x14001ba59
mov ecx, dword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
add rsp, 0x48
ret
Function at 0x140031b80
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xb8
lea rcx, [rsp + 0x78]
call fcn.140017a50
lea rcx, [rsp + 0x48]
call fcn.140017a50
call fcn.140017930
mov r8d, eax
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0xc0]
call fcn.140017c50
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0
je 0x140031bef
mov dword [rsp + 0x24], 0
lea rcx, [rsp + 0x48]
call fcn.140017ab0
lea rcx, [rsp + 0x78]
call fcn.140017ab0
mov eax, dword [rsp + 0x24]
jmp 0x140031c80
call fcn.140017930
mov r8d, eax
lea rdx, [rsp + 0x48]
mov rcx, qword [rsp + 0xc8]
call fcn.140017c50
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0
je 0x140031c36
mov dword [rsp + 0x2c], 0
lea rcx, [rsp + 0x48]
call fcn.140017ab0
lea rcx, [rsp + 0x78]
call fcn.140017ab0
mov eax, dword [rsp + 0x2c]
jmp 0x140031c80
lea rcx, [rsp + 0x48]
call fcn.140017ae0
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x78]
call fcn.140017ae0
mov qword [rsp + 0x40], rax
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov dword [rsp + 0x30], eax
lea rcx, [rsp + 0x48]
call fcn.140017ab0
lea rcx, [rsp + 0x78]
call fcn.140017ab0
mov eax, dword [rsp + 0x30]
add rsp, 0xb8
ret
Function at 0x140036e80
Capabilities:
Write file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
mov eax, 0x1498
call fcn.14002e9f0
sub rsp, rax
mov rax, qword [0x140057010]
xor rax, rsp
mov qword [rsp + 0x1480], rax
mov eax, dword [rsp + 0x14b8]
sar eax, 6
cdqe
lea rcx, [0x140058e10]
mov edx, dword [rsp + 0x14b8]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
mov rax, qword [rax + rdx + 0x28]
mov qword [rsp + 0x60], rax
mov eax, dword [rsp + 0x14c8]
mov rcx, qword [rsp + 0x14c0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x68]
mov rdi, rax
xor eax, eax
mov ecx, 0xc
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x14c0]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x50]
cmp qword [rsp + 0x48], rax
jae 0x140037072
lea rax, [rsp + 0x147f]
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x38], rax
jae 0x140036fc6
mov rax, qword [rsp + 0x50]
cmp qword [rsp + 0x48], rax
jae 0x140036fc6
mov rax, qword [rsp + 0x48]
movzx eax, byte [rax]
mov byte [rsp + 0x31], al
mov rax, qword [rsp + 0x48]
inc rax
mov qword [rsp + 0x48], rax
movzx eax, byte [rsp + 0x31]
mov byte [rsp + 0x30], al
movsx eax, byte [rsp + 0x30]
cmp eax, 0xa
jne 0x140036fab
mov eax, dword [rsp + 0x70]
inc eax
mov dword [rsp + 0x70], eax
mov rax, qword [rsp + 0x38]
mov byte [rax], 0xd
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx ecx, byte [rsp + 0x30]
mov byte [rax], cl
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
jmp 0x140036f48
lea rax, [rsp + 0x80]
mov rcx, qword [rsp + 0x38]
sub rcx, rax
mov rax, rcx
mov dword [rsp + 0x40], eax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x44]
mov r8d, dword [rsp + 0x40]
lea rdx, [rsp + 0x80]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140037032
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x68], eax
lea rax, [rsp + 0x68]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x140037091
mov eax, dword [rsp + 0x44]
mov ecx, dword [rsp + 0x6c]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x6c], eax
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x44], eax
jae 0x14003706d
lea rax, [rsp + 0x68]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x140037091
jmp 0x140036f1e
lea rax, [rsp + 0x68]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
mov rcx, qword [rsp + 0x1480]
xor rcx, rsp
call fcn.1400026b0
add rsp, 0x1498
pop rdi
pop rsi
ret
Function at 0x1400370b0
Capabilities:
Write file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
mov eax, 0x1498
call fcn.14002e9f0
sub rsp, rax
mov rax, qword [0x140057010]
xor rax, rsp
mov qword [rsp + 0x1480], rax
mov eax, dword [rsp + 0x14b8]
sar eax, 6
cdqe
lea rcx, [0x140058e10]
mov edx, dword [rsp + 0x14b8]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
mov rax, qword [rax + rdx + 0x28]
mov qword [rsp + 0x68], rax
mov eax, dword [rsp + 0x14c8]
mov rcx, qword [rsp + 0x14c0]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x70]
mov rdi, rax
xor eax, eax
mov ecx, 0xc
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x14c0]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x50], rax
jae 0x1400372bd
lea rax, [rsp + 0x147e]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x60]
cmp qword [rsp + 0x38], rax
jae 0x140037209
mov rax, qword [rsp + 0x58]
cmp qword [rsp + 0x50], rax
jae 0x140037209
mov rax, qword [rsp + 0x50]
movzx eax, word [rax]
mov word [rsp + 0x40], ax
mov rax, qword [rsp + 0x50]
add rax, 2
mov qword [rsp + 0x50], rax
movzx eax, word [rsp + 0x40]
mov word [rsp + 0x30], ax
movzx eax, word [rsp + 0x30]
cmp eax, 0xa
jne 0x1400371e9
mov eax, dword [rsp + 0x78]
add eax, 2
mov dword [rsp + 0x78], eax
mov eax, 0xd
mov rcx, qword [rsp + 0x38]
mov word [rcx], ax
mov rax, qword [rsp + 0x38]
add rax, 2
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx ecx, word [rsp + 0x30]
mov word [rax], cx
mov rax, qword [rsp + 0x38]
add rax, 2
mov qword [rsp + 0x38], rax
jmp 0x140037178
lea rax, [rsp + 0x80]
mov rcx, qword [rsp + 0x38]
sub rcx, rax
mov rax, rcx
sar rax, 1
mov eax, eax
shl rax, 1
mov dword [rsp + 0x44], eax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
mov r8d, dword [rsp + 0x44]
lea rdx, [rsp + 0x80]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14003727d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x70], eax
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x1400372dc
mov eax, dword [rsp + 0x48]
mov ecx, dword [rsp + 0x74]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x74], eax
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x48], eax
jae 0x1400372b8
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
jmp 0x1400372dc
jmp 0x14003714e
lea rax, [rsp + 0x70]
mov rdi, qword [rsp + 0x14b0]
mov rsi, rax
mov ecx, 0xc
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x14b0]
mov rcx, qword [rsp + 0x1480]
xor rcx, rsp
call fcn.1400026b0
add rsp, 0x1498
pop rdi
pop rsi
ret
Function at 0x1805e4058
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1805e41df
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 0x1805e4089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1805e406f
add dl, dl
jne 0x1805e4096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1805e40f6
xor eax, eax
add dl, dl
jne 0x1805e40a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x1805e41ad
add dl, dl
jne 0x1805e40b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1805e40c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1805e40d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1805e40dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x1805e40ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x1805e407e
mov eax, 1
add dl, dl
jne 0x1805e4106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1805e4113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1805e40fb
sub eax, ebx
mov ebx, 1
jne 0x1805e414c
mov ecx, 1
add dl, dl
jne 0x1805e412e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1805e413b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1805e4123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1805e407e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1805e4168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1805e4175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x1805e415d
cmp eax, 0x7d00
jae 0x1805e419b
cmp eax, 0x500
jb 0x1805e4196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1805e407e
cmp eax, 0x7f
ja 0x1805e419e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x1805e407e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x1805e41d2
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 0x1805e407e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140003d1c
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140003d66
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140003d66
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140003d66
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140003d66
cmp dword [rcx + 0x84], 0xe
jbe 0x140003d66
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140003d68
xor al, al
add rsp, 0x28
ret
Function at 0x140002520
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x140008040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14000254d
xor eax, eax
jmp 0x1400026b9
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140002587
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140002587
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov eax, edi
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], dil
jmp 0x1400026b9
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x1400026ac
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1400025ca
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x1400025f5
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x1400026b1
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140002664
sub eax, 1
je 0x140002664
cmp eax, 2
jne 0x1400026ac
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x1400026b1
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140002692
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x1400026ac
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x1400026b1
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140003a70
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret