joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140013ed0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rcx
push rdi
sub rsp, 0x30
movsxd rax, edx
mov rdi, rcx
dec rax
mov qword [r11 + 0x18], rbp
mov rbp, r9
xor r9d, r9d
lea rax, [rcx + rax*2]
mov qword [rsp + 8], rax
cmp rcx, rax
jae 0x1400140f9
mov qword [r11 + 0x20], rsi
lea rsi, [0x140000000]
mov qword [r11 + 0x10], rbx
mov qword [r11 - 0x10], r12
mov qword [r11 - 0x18], r13
mov qword [r11 - 0x20], r14
mov qword [r11 - 0x28], r15
mov qword [rsp], r8
test rbp, rbp
je 0x140013f32
cmp r8, rbp
jae 0x1400140d6
movzx edx, byte [r8]
test dl, dl
je 0x1400140d6
mov eax, edx
mov rcx, rbp
shr rax, 3
movsx r9, byte [rax + rsi + 0xd2c30]
xor eax, eax
test r9d, r9d
mov ebx, eax
sete bl
add ebx, r9d
test rbp, rbp
jne 0x140013f68
movsxd rcx, ebx
add rcx, r8
cmp r8, rcx
mov r14d, edx
cmovae r14d, eax
lea rax, [r8 + 1]
cmp rax, rcx
jae 0x140013f81
movzx r13d, byte [rax]
jmp 0x140013f84
xor r13b, r13b
lea rax, [r8 + 2]
cmp rax, rcx
jae 0x140013f93
movzx r12d, byte [rax]
jmp 0x140013f96
xor r12b, r12b
lea rax, [r8 + 3]
cmp rax, rcx
jae 0x140013fa5
movzx r15d, byte [rax]
jmp 0x140013fa8
xor r15b, r15b
lea r10, [r9*4]
movzx eax, r14b
mov esi, dword [r10 + rsi + 0xd2c50]
and esi, eax
movzx r9d, r13b
shl esi, 6
mov eax, r9d
and eax, 0x3f
movzx edx, r12b
or esi, eax
movzx r11d, r15b
shl esi, 6
and r9d, 0xc0
mov eax, edx
and edx, 0xc0
and eax, 0x3f
or esi, eax
mov eax, r11d
shr r11d, 2
and eax, 0x3f
or r11d, edx
shl esi, 6
or esi, eax
shr r11d, 2
or r11d, r9d
lea rax, [0x140000000]
mov ecx, dword [r10 + rax + 0xd2c80]
shr r11d, 2
shr esi, cl
mov ecx, 0x100
cmp esi, dword [r10 + rax + 0xd2c68]
sbb eax, eax
xor r9d, r9d
and eax, 0x40
mov edx, r9d
or r11d, eax
mov eax, esi
and eax, 0xfffff800
cmp eax, 0xd800
mov eax, 0x80
cmove edx, eax
mov eax, r9d
or r11d, edx
cmp esi, 0xffff
cmova eax, ecx
lea rcx, [0x140000000]
mov ecx, dword [r10 + rcx + 0xd2c98]
or r11d, eax
xor r11d, 0x2a
sar r11d, cl
test r11d, r11d
je 0x1400140b3
test r14b, r14b
mov eax, r9d
mov ecx, r9d
mov esi, 0xfffd
setne cl
test r15b, r15b
setne al
add ecx, eax
mov eax, r9d
test r12b, r12b
setne al
add ecx, eax
mov eax, r9d
test r13b, r13b
setne al
add ecx, eax
cmp ebx, ecx
cmovl ecx, ebx
movsxd r8, ecx
add r8, qword [rsp]
jmp 0x1400140bd
movsxd rax, ebx
add r8, rax
test esi, esi
je 0x1400140d6
mov word [rdi], si
add rdi, 2
lea rsi, [0x140000000]
cmp rdi, qword [rsp + 8]
jb 0x140013f20
mov rcx, qword [rsp + 0x40]
mov r15, qword [rsp + 0x10]
mov r14, qword [rsp + 0x18]
mov r13, qword [rsp + 0x20]
mov r12, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x48]
mov rax, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x50]
mov word [rdi], r9w
test rax, rax
je 0x14001410f
mov qword [rax], r8
sub rdi, rcx
sar rdi, 1
mov eax, edi
add rsp, 0x30
pop rdi
ret
Function at 0x140015550
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x20
cmp qword [rcx + 0x3138], 0
lea rbx, [rcx + 0x3140]
mov rsi, r8
mov rbp, rdx
mov rdi, rcx
je 0x1400155f7
mov r9d, dword [rbx + 4]
mov qword [rsp + 0x30], r14
xor r14d, r14d
test r9d, r9d
jns 0x1400155aa
mov eax, r9d
mov rcx, rbx
cdq
sub eax, edx
mov edx, r14d
sar eax, 1
add eax, r9d
test eax, eax
cmovg edx, eax
call fcn.140021a80
mov r8, rsi
mov dword [rbx], r14d
mov rdx, rbp
mov rcx, rbx
call fcn.140021590
mov eax, dword [rbx]
mov edx, 1
mov r9, qword [rdi + 0x3138]
test eax, eax
lea ecx, [rax - 1]
mov rax, qword [rdi + 0x3148]
cmove ecx, r14d
test rax, rax
movsxd r8, ecx
lea rcx, [0x14014bc08]
cmovne rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov r14, qword [rsp + 0x30]
jmp 0x1400155ff
mov rcx, rbx
call fcn.140021590
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret

Function at 0x14001d9d0
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x20
mov rax, qword [0x14014bc10]
mov rbx, rcx
xor ecx, ecx
mov dword [rax + 0x30d4], ecx
test rbx, rbx
je 0x14001da3f
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x38], rdi
call fcn.14001da50
lea rdx, [0x1400d2db8]
mov rcx, rbx
mov rdi, rax
call fcn.1400136f0
mov rbx, rax
test rax, rax
je 0x14001da3a
mov r8, qword [rsp + 0x30]
mov r9, rax
mov edx, 1
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rdi, qword [rsp + 0x38]
add rsp, 0x20
pop rbx
ret
Function at 0x140020120
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rsi
sub rsp, 0x20
mov rbx, qword [0x14014bc10]
cmp byte [rbx + 0x30d1], 0
jne 0x140020279
mov rcx, qword [rbx + 0x20]
test rcx, rcx
je 0x140020272
lea rdx, [0x1400d2db4]
mov qword [rsp + 0x38], rdi
call fcn.1400136f0
mov rdi, rax
test rax, rax
je 0x14002026d
mov qword [rsp + 0x40], r14
mov rcx, rax
mov qword [rsp + 0x30], rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
mov r14d, eax
cmp eax, 0xffffffff
je 0x14002025a
xor edx, edx
mov rcx, rdi
lea r8d, [rdx + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
test eax, eax
jne 0x14002025a
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
movsxd rbp, eax
cmp ebp, 0xffffffff
je 0x14002025a
xor r8d, r8d
mov edx, r14d
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
test eax, eax
jne 0x14002025a
mov r14, rbp
cmp rbp, 0xffffffffffffffff
je 0x14002025a
mov rax, qword [0x14014bc10]
test rax, rax
je 0x1400201e9
inc dword [rax + 0x3b0]
mov rdx, qword [0x14014bc18]
mov rcx, r14
call qword [0x140108010]
mov rbp, rax
test rax, rax
je 0x14002025a
mov r9, rdi
mov r8, r14
mov edx, 1
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rcx, rdi
cmp rax, r14
je 0x140020225
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x140020236
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rdx, r14
mov rcx, rbp
call fcn.140014f90
mov rax, qword [0x14014bc10]
test rax, rax
je 0x140020248
dec dword [rax + 0x3b0]
mov rdx, qword [0x14014bc18]
mov rcx, rbp
call qword [0x140108018]
jmp 0x140020263
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rbp, qword [rsp + 0x30]
mov r14, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x38]
mov byte [rbx + 0x30d1], 1
movss xmm0, dword [rbx + 0x30d4]
xorps xmm1, xmm1
comiss xmm0, xmm1
jbe 0x1400202bc
subss xmm0, dword [rbx + 0x18]
comiss xmm1, xmm0
movss dword [rbx + 0x30d4], xmm0
jb 0x1400202bc
mov rcx, qword [rbx + 0x20]
test rcx, rcx
je 0x1400202ab
call fcn.14001d9d0
jmp 0x1400202b2
mov byte [rbx + 0x398], 1
mov dword [rbx + 0x30d4], 0
mov rbx, qword [rsp + 0x48]
add rsp, 0x20
pop rsi
ret
Function at 0x140035550
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub rsp, 0x38
mov rax, qword [0x14014bc10]
mov rcx, qword [rax + 0x2070]
mov r10, qword [rax + 0x1c20]
movsxd rax, dword [rcx + 0x7c]
movups xmm0, xmmword [rcx + 0x174]
movss xmm4, dword [rcx + 0x174]
movss xmm3, dword [rcx + 0x178]
movss xmm2, dword [rcx + 0x17c]
movss xmm1, dword [rcx + 0x180]
movss dword [rsp + 0x20], xmm4
movss dword [rsp + 0x24], xmm3
movss dword [rsp + 0x28], xmm2
movss dword [rsp + 0x2c], xmm1
imul r9, rax, 0x68
mov rax, qword [r10 + 0x270]
add r9, qword [rcx + 0x18]
movups xmmword [r10 + 0x210], xmm0
movss dword [rax + 0x88], xmm4
movss dword [rax + 0x8c], xmm3
movss dword [rax + 0x90], xmm2
movss dword [rax + 0x94], xmm1
mov rax, qword [r10 + 0x270]
movups xmm0, xmmword [rsp + 0x20]
movsxd r8, dword [rax + 0x58]
mov rdx, qword [rax + 0x60]
add r8, r8
movups xmmword [rdx + r8*8 - 0x10], xmm0
movzx r8d, byte [r9 + 0x57]
mov rdx, qword [r10 + 0x270]
mov rcx, qword [rcx + 0x1a8]
add rsp, 0x38
jmp 0x14002a0c0

Function at 0x140035620
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub rsp, 0x38
mov rax, qword [0x14014bc10]
mov rcx, qword [rax + 0x2070]
mov r9, qword [rax + 0x1c20]
movups xmm0, xmmword [r9 + 0x210]
movups xmmword [rcx + 0x174], xmm0
mov rax, qword [r9 + 0x270]
movups xmm0, xmmword [rcx + 0x154]
movss xmm4, dword [rcx + 0x154]
movss xmm3, dword [rcx + 0x158]
movss xmm2, dword [rcx + 0x15c]
movss xmm1, dword [rcx + 0x160]
movups xmmword [r9 + 0x210], xmm0
movss dword [rsp + 0x20], xmm4
movss dword [rsp + 0x24], xmm3
movss dword [rsp + 0x28], xmm2
movss dword [rsp + 0x2c], xmm1
movss dword [rax + 0x88], xmm4
movss dword [rax + 0x8c], xmm3
movss dword [rax + 0x90], xmm2
movss dword [rax + 0x94], xmm1
mov rax, qword [r9 + 0x270]
movups xmm0, xmmword [rsp + 0x20]
movsxd r8, dword [rax + 0x58]
mov rdx, qword [rax + 0x60]
add r8, r8
movups xmmword [rdx + r8*8 - 0x10], xmm0
movzx r8d, byte [rcx + 0x1f7]
mov rcx, qword [rcx + 0x1a8]
mov rdx, qword [r9 + 0x270]
add rsp, 0x38
jmp 0x14002a0c0
Function at 0x14004a860
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
mov ecx, dword [rcx + 0x10]
mov r10d, ecx
and r10d, 7
je 0x14004a894
cmp ecx, r10d
jge 0x14004a882
mov rcx, rbx
call fcn.140044200
mov eax, dword [rbx + 0x14]
mov ecx, r10d
shr eax, cl
sub dword [rbx + 0x10], r10d
mov ecx, dword [rbx + 0x10]
mov dword [rbx + 0x14], eax
xor r8d, r8d
mov eax, ecx
test ecx, ecx
jle 0x14004a8ce
mov ecx, dword [rbx + 0x14]
lea rdx, [rsp + 0x30]
movzx r9d, cl
nop dword [rax]
shr ecx, 8
inc r8d
mov byte [rdx], r9b
lea rdx, [rdx + 1]
sub eax, 8
mov dword [rbx + 0x14], ecx
movzx r9d, cl
test eax, eax
jg 0x14004a8b0
mov dword [rbx + 0x10], eax
test eax, eax
jns 0x14004a8fd
mov edx, dword [0x14014c050]
mov rax, qword gs:[0x58]
mov ecx, 0x20
mov rax, qword [rax + rdx*8]
lea rdx, [0x1400d7c88]
mov qword [rcx + rax], rdx
xor eax, eax
add rsp, 0x20
pop rbx
ret
movsxd rcx, r8d
cmp rcx, 4
jge 0x14004a92f
mov r8, qword [rbx + 8]
mov rax, qword [rbx]
nop dword [rax]
cmp rax, r8
jb 0x14004a919
xor dl, dl
jmp 0x14004a922
movzx edx, byte [rax]
inc rax
mov qword [rbx], rax
mov byte [rsp + rcx + 0x30], dl
inc rcx
cmp rcx, 4
jl 0x14004a910
movzx eax, byte [rsp + 0x30]
movzx r8d, byte [rsp + 0x31]
movzx ecx, byte [rsp + 0x33]
shl r8d, 8
add r8d, eax
shl ecx, 8
movzx eax, byte [rsp + 0x32]
add ecx, eax
mov eax, r8d
xor eax, 0xffff
cmp ecx, eax
jne 0x14004a8d2
mov rcx, qword [rbx]
mov qword [rsp + 0x38], rdi
mov edi, r8d
add rcx, rdi
cmp rcx, qword [rbx + 8]
jbe 0x14004a9a4
mov edx, dword [0x14014c050]
mov rax, qword gs:[0x58]
mov ecx, 0x20
mov rax, qword [rax + rdx*8]
lea rdx, [0x1400d7c98]
mov qword [rcx + rax], rdx
mov rdi, qword [rsp + 0x38]
xor eax, eax
add rsp, 0x20
pop rbx
ret
mov rdx, qword [rbx + 0x18]
lea rax, [r8 + rdx]
cmp rax, qword [rbx + 0x28]
jbe 0x14004a9be
mov rcx, rbx
call fcn.14004fce0
test eax, eax
je 0x14004a997
mov rdx, qword [rbx]
mov r8, rdi
mov rcx, qword [rbx + 0x18]
call sub.VCRUNTIME140.dll_memcpy
add qword [rbx], rdi
mov eax, 1
add qword [rbx + 0x18], rdi
mov rdi, qword [rsp + 0x38]
add rsp, 0x20
pop rbx
ret
Function at 0x14004fee0
Capabilities:
Set registry value

Disassembly:
sub rsp, 0x78
mov rax, rdx
mov dword [rsp + 0x80], 1
mov rdx, qword [rcx]
cmp qword [rdx + 0x18], 0xf
jbe 0x14004feff
mov rdx, qword [rdx]
mov dword [rsp + 0x28], 4
lea rcx, [rsp + 0x80]
mov qword [rsp + 0x20], rcx
mov r9d, 4
xor r8d, r8d
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x90], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
xor eax, eax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
lea ecx, [rax + 0x40]
call fcn.14008e18c
mov rcx, rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x60], 0x3d
mov qword [rsp + 0x68], 0x3f
movups xmm0, xmmword [0x1400d84c8]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x1400d84d8]
movups xmmword [rax + 0x10], xmm1
movups xmm0, xmmword [0x1400d84e8]
movups xmmword [rax + 0x20], xmm0
movsd xmm0, qword [0x1400d84f8]
movsd qword [rax + 0x30], xmm0
mov eax, dword [0x1400d8500]
mov dword [rcx + 0x38], eax
movzx eax, byte [0x1400d8504]
mov byte [rcx + 0x3c], al
mov byte [rcx + 0x3d], 0
mov word [rsp + 0x3e], 0
mov qword [rsp + 0x40], 0xe
mov qword [rsp + 0x48], 0xf
movsd xmm0, qword [0x1400d8508]
movsd qword [rsp + 0x30], xmm0
mov eax, dword [0x1400d8510]
mov dword [rsp + 0x38], eax
movzx eax, word [0x1400d8514]
mov word [rsp + 0x3c], ax
xor r9d, r9d
mov r8b, 1
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x30]
call fcn.140004680
add rsp, 0x78
ret
Function at 0x140050010
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x60
mov dword [rbp + 0x20], 4
mov dword [rbp + 0x28], 4
xorps xmm0, xmm0
movups xmmword [rbp - 0x20], xmm0
movdqa xmm1, xmmword [0x1400d85b0]
movdqu xmmword [rbp - 0x10], xmm1
movsd xmm0, qword [0x1400d8518]
movsd qword [rbp - 0x20], xmm0
mov eax, dword [0x1400d8520]
mov dword [rbp - 0x18], eax
mov byte [rbp - 0x14], 0
lea rax, [rbp - 0x20]
mov qword [rbp - 0x28], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x20], rax
mov r9d, 0xf003f
xor r8d, r8d
lea rdx, [0x1400d8528]
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
js 0x14005012d
lea rdx, [rbp - 0x20]
cmp qword [rbp - 8], 0xf
cmova rdx, qword [rbp - 0x20]
lea rax, [rbp + 0x20]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x18]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x28]
xor r8d, r8d
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [rbp + 0x18]
test eax, eax
jne 0x1400500dd
mov rdx, qword [rbp - 0x30]
lea rcx, [rbp - 0x28]
call fcn.14004fee0
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [rbp + 0x18]
cmp eax, 1
jbe 0x14005015d
lea rdx, [rbp - 0x20]
cmp qword [rbp - 8], 0xf
cmova rdx, qword [rbp - 0x20]
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
js 0x14005015d
mov rdx, qword [rbp - 0x30]
lea rcx, [rbp - 0x28]
call fcn.14004fee0
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x14005015d
xor eax, eax
mov dword [rsp + 0x28], 0x7d0
mov word [rsp + 0x20], ax
mov r9d, 0x1040
lea r8, [0x1400d8564]
lea rdx, [0x1400d8570]
xor ecx, ecx
call fcn.1400052d0
call fcn.140005630
nop
mov rdx, qword [rbp - 8]
cmp rdx, 0xf
jbe 0x14005019b
inc rdx
mov rcx, qword [rbp - 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140050196
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140050196
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14008e1c8
add rsp, 0x60
pop rbp
ret
Function at 0x1400509b0
Capabilities:
Enumerate pe sections

Disassembly:
mov qword [rsp + 8], rbx
mov rbx, rdx
test rcx, rcx
je 0x1400509fb
movzx r10d, word [rcx + 6]
test r10d, r10d
je 0x1400509fb
movzx r11d, word [rcx + 0x14]
xor r9d, r9d
add r11, 0x18
add r11, rcx
test r10d, r10d
je 0x1400509fb
lea rdx, [r11 + 0x10]
nop
mov ecx, dword [rdx - 4]
cmp r8d, ecx
jb 0x1400509ef
add ecx, dword [rdx]
cmp r8d, ecx
jb 0x140050a03
inc r9d
add rdx, 0x28
cmp r9d, r10d
jb 0x1400509e0
xor eax, eax
mov rbx, qword [rsp + 8]
ret
lea rcx, [r9 + r9*4]
lea rax, [r11 + rcx*8]
test rax, rax
je 0x1400509fb
sub r8d, dword [rax + 0xc]
mov eax, dword [rax + 0x14]
mov ecx, r8d
add rcx, rbx
mov rbx, qword [rsp + 8]
add rax, rcx
ret

Function at 0x140050a50
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
sub rsp, 0x60
mov rbp, rdx
mov rdi, rcx
mov rdx, rcx
lea rcx, [rsp + 0x40]
call fcn.140003600
mov rbx, rax
mov dword [rsp + 0x98], 1
mov dword [rsp + 0x90], 0xff
lea rdx, [0x14014bf98]
cmp qword [0x14014bfb0], 0xf
cmova rdx, qword [0x14014bf98]
mov rcx, 0xffffffff80000001
call fcn.140050bb0
mov rsi, rax
mov r8, rbx
cmp qword [rbx + 0x18], 0xf
jbe 0x140050ac0
mov r8, qword [rbx]
lea rax, [rsp + 0x90]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rbp
lea rax, [rsp + 0x98]
mov qword [rsp + 0x20], rax
xor edx, edx
lea r9d, [rdx + 2]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegGetValueA]
mov ebp, eax
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdx, qword [rbx + 0x18]
cmp rdx, 0xf
jbe 0x140050b2f
mov rcx, qword [rbx]
inc rdx
cmp rdx, 0x1000
jb 0x140050b2a
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140050b97
mov rcx, r8
call fcn.14008e1c8
xor esi, esi
mov qword [rbx + 0x10], rsi
mov qword [rbx + 0x18], 0xf
mov byte [rbx], sil
mov rdx, qword [rdi + 0x18]
cmp rdx, 0xf
jbe 0x140050b76
inc rdx
mov rcx, qword [rdi]
cmp rdx, 0x1000
jb 0x140050b71
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140050b9e
mov rcx, r8
call fcn.14008e1c8
mov qword [rdi + 0x10], rsi
mov qword [rdi + 0x18], 0xf
mov byte [rdi], 0
mov eax, ebp
mov rbx, qword [rsp + 0x88]
add rsp, 0x60
pop rdi
pop rsi
pop rbp
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
Function at 0x140050c30
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x30
cmp qword [0x14014bfb0], 0xf
mov rbx, rdx
mov rdi, rcx
mov qword [rsp + 0x58], r12
lea rdx, [0x14014bf98]
mov rcx, 0xffffffff80000001
cmova rdx, qword [0x14014bf98]
call fcn.140050bb0
cmp qword [rbx + 0x18], 0xf
lea r14, [rbx + 0x10]
mov r12, rax
mov rcx, rbx
mov eax, dword [r14]
jbe 0x140050c8c
mov rcx, qword [rbx]
lea r14, [rbx + 0x10]
cmp qword [rdi + 0x18], 0xf
lea rsi, [rdi + 0x18]
mov qword [rsp + 0x50], rbp
mov rdx, rdi
jbe 0x140050ca8
mov rdx, qword [rdi]
lea rbp, [rbx + 0x10]
jmp 0x140050cab
mov rbp, r14
mov dword [rsp + 0x28], eax
mov r9d, 1
mov qword [rsp + 0x20], rcx
xor r8d, r8d
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, r12
mov r15d, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdx, qword [rsi]
mov r12, qword [rsp + 0x58]
cmp rdx, 0xf
jbe 0x140050d13
mov rcx, qword [rdi]
inc rdx
cmp rdx, 0x1000
jb 0x140050d0b
mov r8, qword [rcx - 8]
add rdx, 0x27
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140050d83
mov rcx, r8
lea rsi, [rdi + 0x18]
call fcn.14008e1c8
mov r14, rbp
xor ebp, ebp
mov qword [rsi], 0xf
mov qword [rdi + 0x10], rbp
mov byte [rdi], bpl
mov rdx, qword [rbx + 0x18]
cmp rdx, 0xf
jbe 0x140050d59
mov rcx, qword [rbx]
inc rdx
cmp rdx, 0x1000
jb 0x140050d54
mov r8, qword [rcx - 8]
add rdx, 0x27
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140050d83
mov rcx, r8
call fcn.14008e1c8
mov rsi, qword [rsp + 0x68]
mov eax, r15d
mov byte [rbx], bpl
mov qword [r14], rbp
mov rbp, qword [rsp + 0x50]
mov qword [rbx + 0x18], 0xf
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
Function at 0x140050d90
Capabilities:
Get uefi variable
Query environment variable

Disassembly:
push rbx
sub rsp, 0x430
mov r8d, 0x400
lea rdx, [rsp + 0x30]
lea rcx, [0x1400d85e0]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rbx, rax
test rax, rax
je 0x140050de4
mov r8b, 1
lea rdx, [0x1400d8610]
mov rcx, rax
call fcn.1400503e0
test rax, rax
jne 0x140050e46
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea rcx, [rsp + 0x440]
call qword [sym.imp.KERNEL32.dll_GetFirmwareType]
cmp dword [rsp + 0x440], 2
jne 0x140050e3b
lea rcx, [0x1400d8670]
call fcn.140004210
test eax, eax
je 0x140050e3b
xor r9d, r9d
lea rdx, [0x1400d8690]
xor r8d, r8d
lea rcx, [0x1400d224a]
call qword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableA]
test eax, eax
jne 0x140050e3b
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 1
je 0x140050e6c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov al, 1
add rsp, 0x430
pop rbx
ret
lea rcx, [rsp + 0x440]
call rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [rsp + 0x440], 0
je 0x140050de4
lea rdx, [0x1400d8620]
jmp 0x140050e73
lea rdx, [0x1400d86b8]
xor eax, eax
mov dword [rsp + 0x28], 0x4e20
mov r9d, 0x1010
mov word [rsp + 0x20], ax
lea r8, [0x1400d8564]
xor ecx, ecx
call fcn.1400052d0
xor al, al
add rsp, 0x430
pop rbx
ret
Function at 0x14008de50
Capabilities:
Set console window title

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rdi, rcx
lea rcx, [0x1401346e0]
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
cmp byte [0x1401346e0], 0x5e
jne 0x14008de78
call fcn.14008dfc0
mov rax, qword gs:[0x58]
mov edx, dword [0x14014c050]
mov ecx, 0x38
mov rbx, qword [rax + rdx*8]
add rbx, rcx
mov eax, dword [rbx]
cmp dword [0x14014bbe8], eax
jg 0x14008df7c
lea rcx, [rsp + 0x20]
mov qword [0x14014ba70], rdi
call fcn.140050a30
cmp qword [rax + 0x18], 0xf
jbe 0x14008debc
mov rax, qword [rax]
mov rdx, rax
mov rcx, 0xffffffff80000002
call fcn.140050bb0
mov rdx, qword [rsp + 0x38]
cmp rdx, 0xf
jbe 0x14008df0b
mov rcx, qword [rsp + 0x20]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14008df06
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14008df06
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14008e1c8
mov eax, dword [rbx]
cmp dword [0x14014b9dc], eax
jg 0x14008df4d
lea rcx, [0x14014b9d8]
call fcn.140007750
call fcn.14008ddc0
mov rcx, rax
call fcn.140050010
call fcn.14008ddc0
mov rcx, rax
call fcn.1400501b0
call fcn.140008990
mov rbx, qword [rsp + 0x50]
xor eax, eax
add rsp, 0x40
pop rdi
ret
lea rcx, [0x14014b9dc]
call fcn.14008e4b8
cmp dword [0x14014b9dc], 0xffffffff
jne 0x14008df15
lea rcx, [0x1400cdc80]
call fcn.14008e3f8
lea rcx, [0x14014b9dc]
call fcn.14008e44c
jmp 0x14008df15
lea rcx, [0x14014bbe8]
call fcn.14008e4b8
cmp dword [0x14014bbe8], 0xffffffff
jne 0x14008dea1
lea rcx, [0x14014ba70]
call fcn.1400082c0
lea rcx, [0x1400cdce0]
call fcn.14008e3f8
lea rcx, [0x14014bbe8]
call fcn.14008e44c
jmp 0x14008dea1

Function at 0x14008ed0c
Capabilities:
Parse pe header

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