joyce8/EMBER2024-capa huggingface dataset:
Function at 0x2fc4c479c
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 0x2fc4c481a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x2fc4c4811
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 0x2fc4c4811
mov rax, qword [rbp - 8]
jmp 0x2fc4c482f
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 0x2fc4c47e4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x1400111ef
Capabilities:
Terminate process

Disassembly:
jmp 0x140012e20
mov qword [rsp + 8], rcx
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, 0xc0000409
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
nop
add rsp, 0x28
ret

Function at 0x140011267
Capabilities:
Create thread

Disassembly:
jmp 0x1400117c0
push rbp
push rsi
push rdi
sub rsp, 0x3f0
lea rbp, [rsp + 0x30]
lea rdi, [rsp + 0x30]
mov ecx, 0x90
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rax, qword [section..data]
xor rax, rbp
mov qword [rbp + 0x3b8], rax
lea rcx, [0x1400220a2]
call fcn.140011370
nop
lea rax, [rbp + 0x10]
lea rcx, [0x14001aca0]
mov rdi, rax
mov rsi, rcx
mov ecx, 0x13b
rep movsb byte [rdi], byte [rsi]
mov dword [rbp + 0x164], 0x13b
mov byte [rbp + 0x184], 0x41
mov dword [rbp + 0x1a4], 0
jmp 0x140011842
mov eax, dword [rbp + 0x1a4]
inc eax
mov dword [rbp + 0x1a4], eax
mov eax, dword [rbp + 0x164]
dec eax
cmp dword [rbp + 0x1a4], eax
jae 0x140011874
movsxd rax, dword [rbp + 0x1a4]
movzx eax, byte [rbp + rax + 0x10]
movsx ecx, byte [rbp + 0x184]
xor eax, ecx
movsxd rcx, dword [rbp + 0x1a4]
mov byte [rbp + rcx + 0x10], al
jmp 0x140011834
mov eax, dword [rbp + 0x164]
mov r9d, 4
mov r8d, 0x3000
mov edx, eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rbp + 0x1c8], rax
mov eax, dword [rbp + 0x164]
mov r8d, eax
lea rdx, [rbp + 0x10]
mov rcx, qword [rbp + 0x1c8]
call fcn.1400113ac
nop
mov dword [rbp + 0x1e4], 0
mov eax, dword [rbp + 0x164]
lea r9, [rbp + 0x1e4]
mov r8d, 0x20
mov edx, eax
mov rcx, qword [rbp + 0x1c8]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [rbp + 0x204], eax
cmp dword [rbp + 0x204], 0
je 0x14001192b
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
mov r8, qword [rbp + 0x1c8]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbp + 0x228], rax
mov edx, 0xffffffff
mov rcx, qword [rbp + 0x228]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
nop
xor eax, eax
mov edi, eax
lea rcx, [rbp - 0x30]
lea rdx, [0x14001ac60]
call fcn.140011302
mov eax, edi
mov rcx, qword [rbp + 0x3b8]
xor rcx, rbp
call fcn.1400111a9
lea rsp, [rbp + 0x3c0]
pop rdi
pop rsi
pop rbp
ret
Function at 0x140011271
Capabilities:
Parse pe header

Disassembly:
jmp 0x140014170
sub rsp, 0x38
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140014190
xor al, al
jmp 0x140014211
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x1400141a3
xor al, al
jmp 0x140014211
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x1400141cd
xor al, al
jmp 0x140014211
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x1400141e1
xor al, al
jmp 0x140014211
mov rax, qword [rsp + 0x28]
cmp dword [rax + 0x84], 0xe
ja 0x1400141f3
xor al, al
jmp 0x140014211
mov eax, 8
imul rax, rax, 0xe
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + rax + 0x88], 0
jne 0x14001420f
xor al, al
jmp 0x140014211
mov al, 1
add rsp, 0x38
ret
Function at 0x140012050
Capabilities:
Terminate process

Disassembly:
sub rsp, 0x68
mov ecx, 1
call fcn.140011398
movzx eax, al
test eax, eax
jne 0x140012070
mov ecx, 7
call fcn.14001130c
nop
mov byte [rsp + 0x20], 0
call fcn.140011320
mov byte [rsp + 0x21], al
cmp dword [0x14001d868], 1
jne 0x140012094
mov ecx, 7
call fcn.14001130c
nop
jmp 0x1400120ec
cmp dword [0x14001d868], 0
jne 0x1400120e7
mov dword [0x14001d868], 1
lea rdx, [0x14001a660]
lea rcx, [0x14001a330]
call fcn.140011195
test eax, eax
je 0x1400120c8
mov eax, 0xff
jmp 0x1400121f1
lea rdx, [0x14001a220]
lea rcx, [section..rdata]
call fcn.140011316
mov dword [0x14001d868], 2
jmp 0x1400120ec
mov byte [rsp + 0x20], 1
movzx ecx, byte [rsp + 0x21]
call fcn.1400112f8
call fcn.140011294
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
cmp qword [rax], 0
je 0x140012149
mov rcx, qword [rsp + 0x30]
call fcn.140011154
movzx eax, al
test eax, eax
je 0x140012149
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x50], rax
xor r8d, r8d
mov edx, 2
xor ecx, ecx
mov rax, qword [rsp + 0x50]
call qword [0x140023020]
nop
call fcn.1400112c6
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
cmp qword [rax], 0
je 0x14001217d
mov rcx, qword [rsp + 0x38]
call fcn.140011154
movzx eax, al
test eax, eax
je 0x14001217d
mov rax, qword [rsp + 0x38]
mov rcx, qword [rax]
call fcn.140011352
nop
call fcn.1400122a0
mov dword [rsp + 0x28], eax
call fcn.140011271
movzx eax, al
test eax, eax
jne 0x14001219c
mov ecx, dword [rsp + 0x28]
call fcn.140011055
nop
movzx eax, byte [rsp + 0x20]
test eax, eax
jne 0x1400121ab
call fcn.14001135c
nop
xor edx, edx
mov cl, 1
call fcn.140011145
mov eax, dword [rsp + 0x28]
jmp 0x1400121f1
add rsp, 0x68
ret
Function at 0x140020e60
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
mov eax, 0x10090
call fcn.140025100
sub rsp, rax
mov rax, qword [0x140062280]
xor rax, rsp
mov qword [rsp + 0x10080], rax
movzx eax, byte [rcx]
lea rbx, [rsp + 0x30]
xor ebp, ebp
mov rsi, rcx
mov word [rsp + 0x80], bp
mov edi, 0x28
mov word [rsp + 0x30], bp
test al, al
je 0x140020f22
nop dword [rax]
nop word [rax + rax]
mov r8d, 2
mov byte [rsp + 0x20], al
lea rdx, [rsp + 0x20]
mov byte [rsp + 0x21], bpl
lea rcx, [rsp + 0x24]
call fcn.14003404c
cmp rax, 1
jne 0x140020f7e
mov rcx, rdi
mov rax, rbx
cmp word [rbx], bp
je 0x140020eff
add rax, 2
dec rcx
cmp word [rax], bp
jne 0x140020ef3
cmp rcx, 1
jb 0x140020f7e
movzx ecx, word [rsp + 0x24]
inc rsi
mov word [rax], cx
add rbx, 2
mov word [rax + 2], bp
dec rdi
movzx eax, byte [rsi]
test al, al
jne 0x140020ec0
mov r8d, 0x10000
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
dec eax
cmp eax, 0xffff
ja 0x140020f53
lea rcx, [rsp + 0x80]
call fcn.140036b54
jmp 0x140020f55
xor eax, eax
mov rcx, qword [rsp + 0x10080]
xor rcx, rsp
call fcn.140024e30
lea r11, [rsp + 0x10090]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
call fcn.140033df8
int3
Function at 0x140024950
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r14
sub rsp, 0x90
mov rax, qword [0x140062280]
xor rax, rsp
mov qword [rsp + 0x80], rax
movzx eax, byte [rcx]
lea rbx, [rsp + 0x30]
xor r14d, r14d
mov rbp, rdx
mov word [rsp + 0x30], r14w
mov rsi, rcx
mov edi, 0x28
test al, al
je 0x140024a01
nop word [rax + rax]
mov r8d, 2
mov byte [rsp + 0x20], al
lea rdx, [rsp + 0x20]
mov byte [rsp + 0x21], r14b
lea rcx, [rsp + 0x24]
call fcn.14003404c
cmp rax, 1
jne 0x140024a37
mov rcx, rdi
mov rax, rbx
cmp word [rbx], r14w
je 0x1400249dd
add rax, 2
dec rcx
cmp word [rax], r14w
jne 0x1400249d0
cmp rcx, 1
jb 0x140024a37
movzx ecx, word [rsp + 0x24]
inc rsi
mov word [rax], cx
add rbx, 2
mov word [rax + 2], r14w
dec rdi
movzx eax, byte [rsi]
test al, al
jne 0x1400249a0
mov rdx, rbp
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140024e30
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
call fcn.140033df8
int3

Function at 0x140024cb0
Capabilities:
Set environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x90
mov rax, qword [0x140062280]
xor rax, rsp
mov qword [rsp + 0x80], rax
movzx eax, byte [rcx]
lea rbx, [rsp + 0x30]
xor ebp, ebp
mov rsi, rcx
mov word [rsp + 0x30], bp
mov edi, 0x28
test al, al
je 0x140024d5f
nop dword [rax]
nop dword [rax + rax]
mov r8d, 2
mov byte [rsp + 0x20], al
lea rdx, [rsp + 0x20]
mov byte [rsp + 0x21], bpl
lea rcx, [rsp + 0x24]
call fcn.14003404c
cmp rax, 1
jne 0x140024d95
mov rcx, rdi
mov rax, rbx
cmp word [rbx], bp
je 0x140024d3c
nop
add rax, 2
dec rcx
cmp word [rax], bp
jne 0x140024d30
cmp rcx, 1
jb 0x140024d95
movzx ecx, word [rsp + 0x24]
inc rsi
mov word [rax], cx
add rbx, 2
mov word [rax + 2], bp
dec rdi
movzx eax, byte [rsi]
test al, al
jne 0x140024d00
xor edx, edx
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140024e30
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
call fcn.140033df8
int3

Function at 0x140025898
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400258e2
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400258e2
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400258e2
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400258e2
cmp dword [rcx + 0x84], 0xe
jbe 0x1400258e2
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x1400258e4
xor al, al
add rsp, 0x28
ret
Function at 0x140029c04
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 0x140029c73
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140029c73
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140029c73
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140029c73
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140029c73
cmp dword [rcx + 0x84], 0xe
jbe 0x140029c73
cmp dword [rcx + 0xf8], 0
je 0x140029c73
mov ecx, ebx
call fcn.140029d24
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.140029b00
nop
cmp dword [rbp + 0x20], 0
je 0x140029cc1
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140029ccc
int3
xor r8d, r8d
xor edx, edx
jmp 0x140029c04

Function at 0x140029e08
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 0x140029c73
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140029c73
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140029c73
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140029c73
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140029c73
cmp dword [rcx + 0x84], 0xe
jbe 0x140029c73
cmp dword [rcx + 0xf8], 0
je 0x140029c73
mov ecx, ebx
call fcn.140029d24
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.140029b00
nop
cmp dword [rbp + 0x20], 0
je 0x140029cc1
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.140029ccc
int3
xor r8d, r8d
xor edx, edx
jmp 0x140029c04
Function at 0x14003b9c0
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x14003ba47
mov rsi, rbx
cmp word [rax], bp
je 0x14003ba06
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x14003b9f0
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x14003b9ec
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.140036c40
mov rdi, rax
test rax, rax
je 0x14003ba34
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140041680
mov rbp, rdi
xor ecx, ecx
call fcn.140037b74
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14003dcf0
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x14003dd06
mov al, 1
jmp 0x14003dd66
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x14003dd17
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x14003dd64
mov ecx, dword [rcx + 0x18]
nop
call fcn.14003bd08
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14003dd64
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14003dd64
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14003dd64
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x14003dd66
xor al, al
add rsp, 0x20
pop rbx
ret

Function at 0x1400414d0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400414f8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1400414f8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140001760
Capabilities:
Hash data via wincrypt

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
sub rsp, 0x30
mov esi, edx
mov rbp, rcx
xor edi, edi
lea rdx, [rax + 0x20]
lea rcx, [rax - 0x18]
mov qword [rax - 0x18], rdi
mov qword [rax + 0x20], rdi
mov rbx, r8
call fcn.140001820
test eax, eax
je 0x1400017d9
mov rcx, qword [rsp + 0x58]
xor r9d, r9d
mov r8d, esi
mov rdx, rbp
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x1400017be
mov rcx, qword [rsp + 0x58]
mov rdx, rbx
call fcn.1400017f0
mov edi, eax
mov rcx, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x20]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret

Function at 0x140001820
Capabilities:
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov rdi, rdx
mov dword [rsp + 0x20], 0xf0000000
xor edx, edx
mov r9d, 1
xor r8d, r8d
mov rbx, rcx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x140001884
mov rcx, qword [rbx]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rdi
mov edx, 0x8003
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x140001871
mov eax, 1
jmp 0x140001894
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbx]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x14000188a
call qword [sym.imp.KERNEL32.dll_GetLastError]
and qword [rbx], 0
and qword [rdi], 0
xor eax, eax
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
Function at 0x1400018ac
Capabilities:
Create new key via cryptacquirecontext
Encrypt or decrypt via wincrypt
Import public key

Disassembly:
mov qword [rsp + 0x10], rbx
mov dword [rsp + 0x18], r8d
push rbp
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
mov rdi, rcx
mov r15d, r9d
mov rcx, qword [rcx + 0x18]
xor ebx, ebx
mov rsi, rdx
mov qword [rbp + 0x30], rbx
lea rdx, [0x140001038]
mov r14d, ebx
mov rcx, qword [rcx + 0x60]
call qword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x1400018f6
xor eax, eax
jmp 0x140001a0b
mov r9d, 0x18
mov dword [rsp + 0x20], 8
xor r8d, r8d
lea rcx, [rbp + 0x30]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x14000193d
lea r9d, [rax + 0x18]
mov dword [rsp + 0x20], ebx
xor r8d, r8d
lea rcx, [rbp + 0x30]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x14000193d
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140001a08
mov r8, qword [rdi + 0x18]
lea r9, [rbp - 0x10]
mov rcx, qword [rbp + 0x30]
add r8, 0x60
mov edx, 0x10001
mov qword [rbp - 0x10], rbx
call qword [sym.imp.CRYPT32.dll_CryptImportPublicKeyInfo]
test eax, eax
je 0x1400019f6
mov rdx, r15
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x1400019e4
mov r8d, dword [rbp + 0x40]
mov rdx, rsi
mov rcx, rax
call fcn.140004dcc
mov rcx, qword [rbp - 0x10]
lea rax, [rbp + 0x40]
xor r9d, r9d
mov dword [rsp + 0x30], r15d
mov qword [rsp + 0x28], rax
xor edx, edx
mov qword [rsp + 0x20], rdi
lea r8d, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov r14d, eax
test eax, eax
je 0x1400019d3
mov edx, dword [rbp + 0x40]
test edx, edx
je 0x1400019d9
mov ecx, edx
sub ecx, ebx
inc ebx
dec ecx
mov cl, byte [rcx + rdi]
mov byte [rsi], cl
inc rsi
cmp ebx, edx
jb 0x1400019bd
jmp 0x1400019d9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400019ea
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp - 0x10]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x1400019fc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x30]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, r14d
mov rbx, qword [rsp + 0x88]
add rsp, 0x50
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x140001a20
Capabilities:
Create new key via cryptacquirecontext
Import public key

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
mov rbp, rsp
sub rsp, 0x30
mov rbx, rcx
lea rdx, [0x140001038]
mov rcx, qword [rcx + 0x18]
mov rcx, qword [rcx + 0x60]
call qword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x140001b78
and qword [rbp + 0x20], 0
lea r9d, [rax + 0x18]
xor r8d, r8d
mov dword [rsp + 0x20], 8
xor edx, edx
lea rcx, [rbp + 0x20]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x140001a97
and dword [rsp + 0x20], eax
lea r9d, [rax + 0x18]
xor r8d, r8d
lea rcx, [rbp + 0x20]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x140001a97
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140001b78
mov r8, qword [rbx + 0x18]
lea r9, [rbp + 0x18]
mov rcx, qword [rbp + 0x20]
add r8, 0x60
and qword [rbp + 0x18], 0
mov edx, 0x10001
call qword [sym.imp.CRYPT32.dll_CryptImportPublicKeyInfo]
test eax, eax
je 0x140001b66
mov rcx, qword [rbp + 0x18]
lea rax, [rbp + 0x10]
and dword [rbp + 0x10], 0
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor edx, edx
and qword [rsp + 0x20], 0
lea r8d, [r9 + 6]
call qword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
je 0x140001b54
mov edx, dword [rbp + 0x10]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x140001b54
mov rcx, qword [rbp + 0x18]
lea rax, [rbp + 0x10]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor edx, edx
mov qword [rsp + 0x20], rbx
lea r8d, [r9 + 6]
call qword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
je 0x140001b43
cmp byte [rbx], 6
jne 0x140001b49
cmp dword [rbx + 4], 0xa400
jne 0x140001b49
cmp dword [rbx + 8], 0x31415352
jne 0x140001b49
mov eax, dword [rbx + 0xc]
shr eax, 3
jmp 0x140001b7a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140001b5a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x18]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x140001b6c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x20]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor eax, eax
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rbp
ret
Function at 0x140001b88
Capabilities:
Create new key via cryptacquirecontext
Generate random numbers via winapi

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
push rdi
sub rsp, 0x30
and qword [rax + 0x18], 0
mov edi, edx
and dword [rax - 0x18], 0
mov rsi, rcx
xor edx, edx
lea rcx, [rax + 0x18]
mov r9d, 1
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
mov ebx, eax
test eax, eax
jne 0x140001bf8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x140001bf0
lea r9d, [rbx + 1]
mov dword [rsp + 0x20], 8
xor r8d, r8d
lea rcx, [rsp + 0x50]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
mov ebx, eax
test eax, eax
jne 0x140001bf8
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140001c21
mov rcx, qword [rsp + 0x50]
mov r8, rsi
mov edx, edi
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
mov ebx, eax
test eax, eax
jne 0x140001c14
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x50]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rsi, qword [rsp + 0x48]
mov eax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret