joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000dc50
Capabilities:
Parse pe header

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

Function at 0x140011618
Capabilities:
Parse pe header

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

Function at 0x14001181c
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140011618
Function at 0x140014ab8
Capabilities:
Query environment variable

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 r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x140014ae8
xor eax, eax
jmp 0x140014bab
mov rbp, rbx
cmp word [rax], si
je 0x140014b0d
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x140014af4
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x140014af0
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.1400149d8
movsxd r14, eax
test eax, eax
jne 0x140014b4b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x140014ae1
mov rcx, r14
call fcn.14001554c
mov rdi, rax
test rax, rax
jne 0x140014b64
xor ecx, ecx
call fcn.14001309c
jmp 0x140014b40
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.1400149d8
test eax, eax
jne 0x140014b95
mov rcx, rdi
call fcn.14001309c
jmp 0x140014b9f
xor ecx, ecx
call fcn.14001309c
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret
Function at 0x14001a040
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14001a068
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14001a068
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x180004d20
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x60
mov rax, qword [0x1800832a8]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov rdi, rcx
mov qword [rsp + 0x28], rcx
cmp qword [rcx + 0x18], 0x10
jb 0x180004d5c
mov rsi, qword [rcx]
mov rbx, rsi
add rsi, qword [rcx + 0x10]
jmp 0x180004d66
mov rsi, qword [rcx + 0x10]
add rsi, rdi
mov rbx, rdi
xor r14d, r14d
mov qword [rsp + 0x30], r14
mov ecx, r14d
mov qword [rsp + 0x40], rcx
mov r8d, 7
mov qword [rsp + 0x48], r8
mov rdx, rsi
sub rdx, rbx
cmp rdx, 8
jb 0x180004da4
lea rcx, [rsp + 0x30]
call fcn.18000a810
mov ecx, r14d
mov qword [rsp + 0x40], rcx
mov r8, qword [rsp + 0x48]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov ebp, 1
cmp rbx, rsi
je 0x180004e12
nop dword [rax + rax]
movsx r9d, byte [rbx]
cmp rcx, r8
jae 0x180004dee
lea rax, [rcx + 1]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x30]
cmp r8, 8
cmovae rax, qword [rsp + 0x30]
mov word [rax + rcx*2], r9w
mov word [rax + rcx*2 + 2], r14w
jmp 0x180004dfe
xor r8d, r8d
mov rdx, rbp
lea rcx, [rsp + 0x30]
call fcn.18000a980
inc rbx
mov r8, qword [rsp + 0x48]
cmp rbx, rsi
je 0x180004e12
mov rcx, qword [rsp + 0x40]
jmp 0x180004dc0
lea rcx, [rsp + 0x30]
cmp r8, 8
cmovae rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x180004e30
test al, 0x10
jne 0x180004e33
mov ebp, r14d
mov rdx, qword [rsp + 0x48]
cmp rdx, 8
jb 0x180004e75
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180004e70
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180004ef2
call fcn.18002d110
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x48], 7
mov word [rsp + 0x30], r14w
mov rdx, qword [rdi + 0x18]
cmp rdx, 0x10
jb 0x180004ebf
inc rdx
mov rcx, qword [rdi]
cmp rdx, 0x1000
jb 0x180004eba
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x180004ef8
mov rcx, r8
call fcn.18002d110
mov qword [rdi + 0x10], r14
mov qword [rdi + 0x18], 0xf
mov byte [rdi], 0
mov eax, ebp
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.18002d0f0
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
call fcn.18003e6f8
nop
call fcn.18003e6f8
int3
Function at 0x1800062e0
Capabilities:
Create process on windows

Disassembly:
mov r11, rsp
mov qword [r11 + 0x10], rbx
push rdi
sub rsp, 0xd0
mov rax, qword [0x1800832a8]
xor rax, rsp
mov qword [rsp + 0xc8], rax
mov rbx, rcx
mov qword [r11 - 0x18], rcx
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
movups xmmword [rsp + 0x60], xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [r11 - 0x58], xmm0
movups xmmword [r11 - 0x48], xmm0
movups xmmword [r11 - 0x38], xmm0
movups xmmword [r11 - 0x28], xmm0
mov qword [rsp + 0x50], 0x70
xor edi, edi
mov qword [r11 - 0x80], rdi
lea rax, str.runas
mov qword [r11 - 0x78], rax
lea rax, str.cmd.exe
mov qword [r11 - 0x70], rax
mov rax, rcx
cmp qword [rcx + 0x18], 8
jb 0x180006360
mov rax, qword [rcx]
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rdi
mov dword [rsp + 0x80], edi
mov qword [rsp + 0x88], rdi
lea rcx, [rsp + 0x50]
call qword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x1800063ab
mov edx, 0xffffffff
mov rcx, qword [rsp + 0xb8]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsp + 0xb8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1800063c1
mov rdx, rbx
lea rcx, [rsp + 0x28]
call fcn.180008950
mov rcx, rax
call fcn.1800062e0
nop
mov rdx, qword [rbx + 0x18]
cmp rdx, 8
jb 0x1800063fc
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbx]
cmp rdx, 0x1000
jb 0x1800063f7
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x18000642c
mov rcx, r8
call fcn.18002d110
mov qword [rbx + 0x10], rdi
mov qword [rbx + 0x18], 7
mov word [rbx], di
mov rcx, qword [rsp + 0xc8]
xor rcx, rsp
call fcn.18002d0f0
mov rbx, qword [rsp + 0xe8]
add rsp, 0xd0
pop rdi
ret
call fcn.18003e6f8
int3

Function at 0x180006fd0
Capabilities:
Create thread

Disassembly:
sub rsp, 0x38
cmp edx, 1
jne 0x180006ff8
xor eax, eax
lea r8, [0x180006ea0]
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor edx, edx
mov dword [rsp + 0x20], eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov eax, 1
add rsp, 0x38
ret
Function at 0x1800076f0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r14
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov r14, r8
mov rbp, rdx
mov rdi, rcx
mov rbx, r8
je 0x180007788
test r8, r8
jle 0x180007780
nop word [rax + rax]
mov rcx, rdi
call fcn.180009b70
test rax, rax
jle 0x18000775e
mov rcx, qword [rdi + 0x40]
cmp rbx, rax
mov rsi, rbx
mov rdx, rbp
cmovge rsi, rax
mov r8, rsi
mov rcx, qword [rcx]
call fcn.18002f4a0
mov rax, qword [rdi + 0x58]
sub rbx, rsi
sub dword [rax], esi
mov rcx, qword [rdi + 0x40]
movsxd rax, esi
add qword [rcx], rax
jmp 0x180007778
mov rax, qword [rdi]
mov rcx, rdi
movzx edx, byte [rbp]
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x180007780
dec rbx
mov esi, 1
add rbp, rsi
test rbx, rbx
jg 0x180007720
sub r14, rbx
mov rax, r14
jmp 0x180007806
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x40], r15
mov r9, qword [rax]
test r9, r9
je 0x1800077a1
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x1800077a3
xor ecx, ecx
movsxd rsi, ecx
test r14, r14
jle 0x1800077fb
test ecx, ecx
jle 0x1800077dc
cmp r14, rsi
mov rcx, r9
cmovl rsi, r14
mov r8, rsi
call fcn.18002f4a0
mov rax, qword [rdi + 0x58]
add rbp, rsi
sub r14, rsi
sub dword [rax], esi
mov rcx, qword [rdi + 0x40]
movsxd rax, esi
add qword [rcx], rax
test r14, r14
jle 0x1800077fb
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x1800077fb
mov r8, r14
mov edx, 1
mov rcx, rbp
call fcn.18003fccc
sub r14, rax
mov r15, qword [rsp + 0x40]
sub rbx, r14
mov rax, rbx
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x58]
add rsp, 0x20
pop r14
pop rdi
pop rsi
ret
Function at 0x180007820
Capabilities:
Read file on windows

Disassembly:
push rbx
push rsi
push r14
sub rsp, 0x30
mov r14, r8
mov rsi, rdx
mov rbx, rcx
test r8, r8
jg 0x180007842
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbx
ret
cmp qword [rcx + 0x68], 0
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rdi
je 0x1800078bc
mov rdi, r14
mov rcx, rbx
call fcn.180009b90
test rax, rax
jle 0x180007894
mov rdx, qword [rbx + 0x38]
cmp rdi, rax
mov rbp, rdi
mov rcx, rsi
cmovge rbp, rax
mov r8, rbp
mov rdx, qword [rdx]
call fcn.18002f4a0
mov rax, qword [rbx + 0x50]
sub rdi, rbp
sub dword [rax], ebp
mov rcx, qword [rbx + 0x38]
movsxd rax, ebp
add qword [rcx], rax
jmp 0x1800078ac
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x38]
cmp eax, 0xffffffff
je 0x1800078b4
mov byte [rsi], al
dec rdi
mov ebp, 1
add rsi, rbp
test rdi, rdi
jg 0x180007856
sub r14, rdi
jmp 0x18000799f
mov rax, qword [rcx + 0x38]
mov rbp, r14
mov rdx, qword [rax]
test rdx, rdx
je 0x1800078d3
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x1800078d5
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x180007907
cmp rax, r14
mov rdi, r14
mov rcx, rsi
cmovb rdi, rax
mov r8, rdi
call fcn.18002f4a0
mov rax, qword [rbx + 0x50]
add rsi, rdi
sub rbp, rdi
sub dword [rax], edi
mov rcx, qword [rbx + 0x38]
movsxd rax, edi
add qword [rcx], rax
cmp qword [rbx + 0x80], 0
je 0x18000799c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x180007942
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
cmp rbp, 0xfff
jbe 0x18000797d
nop dword [rax + rax]
mov r9, qword [rbx + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, rsi
call fcn.18003ffb0
add rsi, rax
sub rbp, rax
cmp rax, 0xfff
jne 0x18000799c
cmp rbp, rax
ja 0x180007950
test rbp, rbp
je 0x18000799c
mov r9, qword [rbx + 0x80]
mov r8, rbp
mov edx, 1
mov rcx, rsi
call fcn.18003ffb0
sub rbp, rax
sub r14, rbp
mov rbp, qword [rsp + 0x28]
mov rax, r14
mov rdi, qword [rsp + 0x20]
add rsp, 0x30
pop r14
pop rsi
pop rbx
ret
Function at 0x180007dd0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x1800832a8]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x180007dfd
xor eax, eax
jmp 0x180007f43
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x180007e37
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x180007e37
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 0x180007f43
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x180007f36
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x180007e7a
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 0x180007e89
movsx ecx, dil
jmp 0x180007edd
lea r8, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov rax, qword [rcx]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x38], r8
lea r9, [rsp + 0x51]
lea r8, [rsp + 0x78]
mov qword [rsp + 0x30], r8
lea r8, [rsp + 0x58]
mov qword [rsp + 0x28], r8
lea r8, [rsp + 0x48]
mov qword [rsp + 0x20], r8
lea r8, [rsp + 0x50]
call qword [rax + 0x38]
test eax, eax
je 0x180007ef7
sub eax, 1
je 0x180007ef7
cmp eax, 2
jne 0x180007f36
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call fcn.18003e9ac
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x180007f3b
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x180007f24
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call fcn.18003fccc
cmp rsi, rax
jne 0x180007f36
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov eax, edi
jne 0x180007f3b
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.18002d0f0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x180014550
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0xa0
mov rax, qword [0x1800832a8]
xor rax, rsp
mov qword [rsp + 0x90], rax
mov rbx, rcx
mov qword [rcx], 0
mov dword [rsp + 0x20], 0xf0000000
mov r9d, 1
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x1800145e6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [rsp + 0x20], 8
mov r9d, 1
xor r8d, r8d
lea rdx, str.Crypto_RNG
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x1800145e6
mov dword [rsp + 0x20], 0x28
lea r9d, [rax + 1]
xor r8d, r8d
lea rdx, str.Crypto_RNG
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x18001460a
mov rax, rbx
mov rcx, qword [rsp + 0x90]
xor rcx, rsp
call fcn.18002d0f0
mov rbx, qword [rsp + 0xb8]
add rsp, 0xa0
pop rdi
ret
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdx, str.CryptAcquireContext
lea rcx, [rsp + 0x30]
call fcn.180008d20
nop
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x50]
call fcn.1800146c0
lea rdx, [0x18007e680]
lea rcx, [rsp + 0x50]
call fcn.18002f3d0
int3

Function at 0x180014ac0
Capabilities:
Generate random numbers via winapi

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x90
mov rax, qword [0x1800832a8]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rbx, r8
mov rdi, rdx
mov ecx, dword [0x180088138]
mov rax, qword gs:[0x58]
mov edx, 4
mov rax, qword [rax + rcx*8]
mov ecx, dword [rdx + rax]
cmp dword [0x180086930], ecx
jg 0x180014b9f
mov eax, ebx
cmp rbx, rax
jne 0x180014b61
xor ecx, ecx
mov eax, ecx
test rbx, rbx
setne al
test ebx, ebx
setne cl
cmp eax, ecx
jne 0x180014b61
mov r8, rdi
mov edx, ebx
mov rcx, qword [0x180086928]
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x180014be2
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.18002d0f0
mov rbx, qword [rsp + 0xa0]
add rsp, 0x90
pop rdi
ret
mov ecx, 0x5b6
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rdx, str.GenerateBlock_size
lea rcx, [rsp + 0x20]
call fcn.180008d20
nop
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x40]
call fcn.1800146c0
lea rdx, [0x18007e680]
lea rcx, [rsp + 0x40]
call fcn.18002f3d0
nop
lea rcx, [0x180086930]
call fcn.18002da04
cmp dword [0x180086930], 0xffffffff
jne 0x180014b0c
lea rcx, [0x180086928]
call fcn.180014550
lea rcx, [0x18005c950]
call fcn.18002d504
nop
lea rcx, [0x180086930]
call fcn.18002d9a4
jmp 0x180014b0c
lea rdx, [0x18005ed20]
lea rcx, [rsp + 0x20]
call fcn.180008d20
nop
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x40]
call fcn.1800146c0
lea rdx, [0x18007e680]
lea rcx, [rsp + 0x40]
call fcn.18002f3d0
int3
Function at 0x180021610
Capabilities:
Encode data using xor

Disassembly:
mov r9, r8
xor r11d, r11d
mov r10, rdx
mov r8d, r11d
cmp r9, 8
jb 0x180021647
mov rdx, r9
shr rdx, 3
imul rax, rdx, 0xfffffffffffffff8
add r9, rax
mov rax, qword [rcx]
add rcx, 8
xor rax, qword [r10]
add r10, 8
or r8, rax
sub rdx, 1
jne 0x180021630
mov rdx, r8
shr rdx, 0x20
or edx, r8d
mov r8d, edx
mov eax, edx
shr r8d, 8
or r8d, edx
shr eax, 0x10
and r8d, 0xff00
or r8d, eax
movzx eax, dl
shr r8d, 8
or r8d, eax
test r9, r9
je 0x180021748
sub rcx, r10
cmp r9, 8
jb 0x180021720
mov rax, r9
lea rdx, [r10 + 4]
and rax, 0xfffffffffffffff8
xorps xmm4, xmm4
xorps xmm3, xmm3
nop dword [rax + rax]
movd xmm2, dword [rcx + rdx - 4]
xorps xmm0, xmm0
movd xmm1, dword [rdx - 4]
lea rdx, [rdx + 8]
punpcklbw xmm2, xmm0
add r11, 8
punpcklwd xmm2, xmm0
punpcklbw xmm1, xmm0
punpcklwd xmm1, xmm0
pxor xmm2, xmm1
movd xmm1, dword [rdx - 8]
punpcklbw xmm1, xmm0
por xmm4, xmm2
movd xmm2, dword [rcx + rdx - 8]
punpcklbw xmm2, xmm0
punpcklwd xmm2, xmm0
punpcklwd xmm1, xmm0
pxor xmm2, xmm1
por xmm3, xmm2
cmp r11, rax
jb 0x1800216a0
por xmm3, xmm4
movdqa xmm0, xmm3
psrldq xmm0, 8
por xmm3, xmm0
movdqa xmm0, xmm3
psrldq xmm0, 4
por xmm3, xmm0
movd eax, xmm3
or r8d, eax
cmp r11, r9
jae 0x180021748
add r10, r11
sub r9, r11
nop word [rax + rax]
movzx edx, byte [rcx + r10]
movzx eax, byte [r10]
lea r10, [r10 + 1]
xor edx, eax
or r8d, edx
sub r9, 1
jne 0x180021730
test r8d, r8d
sete al
ret

Function at 0x180021750
Capabilities:
Encode data using xor

Disassembly:
sub rsp, 8
mov r10, rdx
test r9, r9
je 0x1800218a4
cmp r9, 4
jb 0x18002179a
mov rdx, r9
shr rdx, 2
imul rax, rdx, 0xfffffffffffffffc
add r9, rax
nop dword [rax]
nop dword [rax + rax]
mov eax, dword [r10]
add r10, 4
xor eax, dword [r8]
add r8, 4
mov dword [rcx], eax
add rcx, 4
sub rdx, 1
jne 0x180021780
xor r11d, r11d
test r9, r9
je 0x1800218a4
cmp r9, 0x40
jb 0x180021883
lea rdx, [rcx - 1]
lea rax, [r8 - 1]
add rdx, r9
add rax, r9
cmp rcx, rax
ja 0x1800217cc
cmp rdx, r8
jae 0x180021883
lea rax, [r10 - 1]
add rax, r9
cmp rcx, rax
ja 0x1800217e1
cmp rdx, r10
jae 0x180021883
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov rsi, r9
and rsi, 0xffffffffffffffc0
mov qword [rsp], rdi
mov rdx, r10
lea rax, [r8 + 0x10]
sub rdx, r8
mov rbx, rcx
sub rbx, r8
nop word [rax + rax]
movdqu xmm0, xmmword [rax - 0x10]
add r11, 0x40
movdqu xmm1, xmmword [rdx + rax - 0x10]
movdqu xmm2, xmmword [rdx + rax]
lea rax, [rax + 0x40]
pxor xmm1, xmm0
movdqu xmm0, xmmword [rax - 0x40]
movdqu xmmword [rbx + rax - 0x50], xmm1
pxor xmm2, xmm0
movdqu xmm0, xmmword [rax - 0x30]
movdqu xmm1, xmmword [rdx + rax - 0x30]
movdqu xmmword [rbx + rax - 0x40], xmm2
pxor xmm1, xmm0
movdqu xmm0, xmmword [rax - 0x20]
movdqu xmm2, xmmword [rdx + rax - 0x20]
movdqu xmmword [rbx + rax - 0x30], xmm1
pxor xmm2, xmm0
movdqu xmmword [rbx + rax - 0x20], xmm2
cmp r11, rsi
jb 0x180021810
mov rsi, qword [rsp + 0x18]
mov rbx, qword [rsp + 0x10]
mov rdi, qword [rsp]
cmp r11, r9
jae 0x1800218a4
sub r10, r8
lea rdx, [r11 + r8]
sub rcx, r8
sub r9, r11
movzx eax, byte [rdx + r10]
xor al, byte [rdx]
mov byte [rdx + rcx], al
lea rdx, [rdx + 1]
sub r9, 1
jne 0x180021890
add rsp, 8
ret
Function at 0x18002a150
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
lea r11, [0x180062080]
mov r9, rdx
not ecx
cmp r8, 4
jb 0x18002a1c9
mov r10, r8
shr r10, 2
imul rax, r10, 0xfffffffffffffffc
add r8, rax
movzx edx, byte [r9]
mov eax, ecx
xor rdx, rax
shr ecx, 8
movzx eax, dl
movzx edx, byte [r9 + 1]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 2]
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
movzx edx, byte [r9 + 3]
add r9, 4
xor ecx, dword [r11 + rax*4]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
xor ecx, dword [r11 + rax*4]
sub r10, 1
jne 0x18002a170
test r8, r8
je 0x18002a1ed
nop
movzx edx, byte [r9]
lea r9, [r9 + 1]
mov eax, ecx
shr ecx, 8
xor rdx, rax
movzx eax, dl
xor ecx, dword [r11 + rax*4]
sub r8, 1
jne 0x18002a1d0
not ecx
mov eax, ecx
ret
Function at 0x14001a0d0
Capabilities:
Get keyboard layout
Query or enumerate registry value

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x2c0
xor edx, edx
mov rbp, rcx
xor edi, edi
call qword [sym.imp.USER32.dll_ActivateKeyboardLayout]
mov rsi, rax
test rax, rax
je 0x14001a22c
mov edx, edi
lea rcx, [0x1400e4f50]
nop dword [rax]
movzx eax, word [rdx + rcx]
add rdx, 2
mov word [rsp + rdx + 0x2e], ax
test ax, ax
jne 0x14001a100
lea rcx, [rsp + 0x94]
call qword [sym.imp.USER32.dll_GetKeyboardLayoutNameW]
test eax, eax
je 0x14001a21c
lea rax, [rsp + 0x2f0]
lea rdx, [rsp + 0x30]
mov r9d, 1
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14001a21c
mov rcx, qword [rsp + 0x2f0]
lea rax, [rsp + 0x2e8]
lea rdx, [0x1400e4fb8]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xb0]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x2e0], rbx
mov dword [rsp + 0x2e8], 0x208
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x2f0]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
mov rbx, qword [rsp + 0x2e0]
jne 0x14001a21c
mov ecx, dword [rsp + 0x2e8]
test ecx, ecx
je 0x14001a21c
shr ecx, 1
dec ecx
cmp word [rsp + rcx*2 + 0xb0], di
jne 0x14001a1f5
test ecx, ecx
je 0x14001a21c
nop dword [rax]
lea edx, [rcx - 1]
cmp word [rsp + rdx*2 + 0xb0], di
jne 0x14001a207
mov ecx, edx
test edx, edx
jne 0x14001a1e0
jmp 0x14001a21c
inc ecx
cmp ecx, 0x104
jae 0x14001a21c
mov word [rsp + rcx*2 + 0xb0], di
test ecx, ecx
je 0x14001a21c
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rdi, rax
cmp rbp, rsi
je 0x14001a22c
xor edx, edx
mov rcx, rsi
call qword [sym.imp.USER32.dll_ActivateKeyboardLayout]
mov rax, rdi
add rsp, 0x2c0
pop rdi
pop rsi
pop rbp
ret
Function at 0x140020480
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rsi
push rdi
push r12
sub rsp, 0x40
xor r12d, r12d
mov rbp, r8
mov rbx, rdx
mov rsi, rcx
lea rdx, [0x1400e68c8]
lea r8d, [r12 + 0xa]
xor ecx, ecx
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x38], r12d
mov byte [rsp + 0x3c], r12b
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rdi, rax
test rax, rax
jne 0x1400204e9
lea r8d, [r12 + 0xa]
lea rdx, str._AHK_WITH_ICON_
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rdi, rax
test rax, rax
je 0x140020570
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [rsp + 0x38], eax
test eax, eax
je 0x140020570
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x140020570
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov qword [rsp + 0x30], rax
test rax, rax
je 0x140020570
mov rax, qword [rbx]
lea r8, [rsp + 0x78]
lea rdx, [rsp + 0x30]
mov rcx, rbx
mov dword [rsp + 0x78], reloc.OLEAUT32.dll_VariantTimeToDosDateTime
mov dword [rbx + 0xc], r12d
call qword [rax + VariantCopy]
test al, al
je 0x140020555
lea rdx, [rsp + 0x78]
mov r8d, 0xfde9
mov rcx, rbx
call fcn.1400a9690
mov rax, qword [rsi + 0xb80]
inc dword [0x14011747c]
mov qword [0x1401166e0], rax
mov eax, 3
jmp 0x14002058c
xorpd xmm3, xmm3
lea rcx, str.Could_not_extract_script_from_EXE.
mov r8, rbp
xor edx, edx
mov qword [rsp + 0x20], r12
call fcn.1400b26b0
xor eax, eax
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
add rsp, 0x40
pop r12
pop rdi
pop rsi
ret