joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140002c10
Capabilities:
Access peb ldr_data
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x110
mov rax, qword [0x14003b008]
xor rax, rsp
mov qword [rsp + 0x100], rax
mov rax, qword gs:[0x30]
mov ebx, 1
mov rcx, qword [rax + 0x60]
mov rbp, qword [rcx + 0x10]
movsxd rsi, dword [rbp + 0x3c]
lea rdi, [rbp + 0x108]
add rdi, rsi
cmp bx, word [rsi + rbp + 6]
ja 0x140002c98
nop dword [rax + rax]
mov r8d, 5
lea rdx, str..huan
mov rcx, rdi
call fcn.140011570
test eax, eax
je 0x140002c98
movzx eax, word [rsi + rbp + 6]
add rdi, 0x28
inc ebx
cmp ebx, eax
jbe 0x140002c70
mov r14d, dword [rdi + 0xc]
add r14, rbp
movups xmm0, xmmword [r14 + 8]
movsxd rcx, dword [r14 + 4]
movups xmmword [rsp + 0xf0], xmm0
movups xmm0, xmmword [r14 + 0x18]
movups xmmword [rsp + 0x20], xmm0
call fcn.14000f098
movsxd rcx, dword [r14]
mov rbp, rax
call fcn.14000f098
movsxd r8, dword [r14 + 4]
lea rdx, [r14 + 0x28]
mov rcx, rbp
mov r15, rax
call fcn.14000b110
movsxd rsi, dword [r14 + 4]
lea rdx, [rsp + 0xf0]
lea rcx, [rsp + 0x30]
call fcn.140001150
mov rbx, rbp
movups xmm0, xmmword [rsp + 0x20]
movaps xmmword [rsp + 0xe0], xmm0
test rsi, rsi
je 0x140002d61
lea rdi, [rsp + 0xe0]
sub rdi, rbp
dec rsi
shr rsi, 4
inc rsi
nop dword [rax]
movups xmm0, xmmword [rbx]
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.1400017e0
mov ecx, 0x10
nop word [rax + rax]
movzx eax, byte [rdi + rbx]
xor byte [rbx], al
inc rbx
sub rcx, 1
jne 0x140002d40
sub rdi, 0x10
movaps xmmword [rsp + 0xe0], xmm0
sub rsi, 1
jne 0x140002d20
movsxd r8, dword [r14]
mov rdx, rbp
mov rcx, r15
call fcn.14000b110
lea rdx, str.___Data_is_decrypted_
lea rcx, [0x14003c940]
call fcn.140005390
mov rcx, rax
call fcn.140005640
mov rcx, r15
call fcn.140002970
xor eax, eax
mov rcx, qword [rsp + 0x100]
xor rcx, rsp
call fcn.140006490
lea r11, [rsp + 0x110]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rdi
ret

Function at 0x140006f3c
Capabilities:
Parse pe header

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

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, 0x20
mov rbp, r8
mov r14, rdx
mov rdi, rcx
test r8, r8
jg 0x140008a8a
xor eax, eax
jmp 0x140008b70
cmp qword [rcx + 0x68], 0
je 0x140008a9b
call fcn.140008b8c
jmp 0x140008b70
mov rax, qword [rcx + 0x38]
mov rsi, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x140008ab2
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x140008ab4
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x140008ae6
cmp rax, rbp
mov rbx, rbp
mov rcx, r14
cmovb rbx, rax
mov r8, rbx
call fcn.14000b110
mov rax, qword [rdi + 0x50]
add r14, rbx
sub rsi, rbx
sub dword [rax], ebx
mov rcx, qword [rdi + 0x38]
movsxd rax, ebx
add qword [rcx], rax
cmp qword [rdi + 0x80], 0
je 0x140008b6a
mov r8, qword [rdi + 0x18]
lea rax, [rdi + 0x70]
cmp qword [r8], rax
jne 0x140008b1d
mov rcx, qword [rdi + 0x88]
mov rdx, qword [rdi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rdi + 0x38]
mov qword [rax], rcx
mov rax, qword [rdi + 0x50]
mov dword [rax], edx
mov ebx, 0xfff
jmp 0x140008b46
mov r9, qword [rdi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call fcn.140015694
add r14, rax
sub rsi, rax
cmp rax, rbx
jne 0x140008b6a
cmp rsi, rbx
ja 0x140008b24
test rsi, rsi
je 0x140008b6a
mov r9, qword [rdi + 0x80]
mov r8, rsi
mov edx, 1
mov rcx, r14
call fcn.140015694
sub rsi, rax
sub rbp, rsi
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret

Function at 0x1400128b4
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x1400126b0
Function at 0x14001c63c
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 0x14001c66c
xor eax, eax
jmp 0x14001c72f
mov rbp, rbx
cmp word [rax], si
je 0x14001c691
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14001c678
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14001c674
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.14001c55c
movsxd r14, eax
test eax, eax
jne 0x14001c6cf
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14001c665
mov rcx, r14
call fcn.140018b4c
mov rdi, rax
test rax, rax
jne 0x14001c6e8
xor ecx, ecx
call fcn.140018c24
jmp 0x14001c6c4
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.14001c55c
test eax, eax
jne 0x14001c719
mov rcx, rdi
call fcn.140018c24
jmp 0x14001c723
xor ecx, ecx
call fcn.140018c24
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 0x14001f588
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov esi, edx
mov ebx, ecx
call fcn.1400187ec
mov ecx, ebx
lea r8, [rsp + 0x30]
and ecx, 0x3ff
mov r9d, 2
bts ecx, 0xa
mov edx, 0x20000001
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
xor edx, edx
test eax, eax
je 0x14001f629
cmp ebx, dword [rsp + 0x30]
je 0x14001f622
test esi, esi
je 0x14001f622
mov r10, qword [rdi + 0x98]
mov r9d, edx
movzx r8d, word [r10]
lea rcx, [r10 + 2]
lea eax, [r8 - 0x41]
cmp ax, 0x19
jbe 0x14001f5fd
sub r8w, 0x61
cmp r8w, 0x19
ja 0x14001f60a
movzx r8d, word [rcx]
inc r9d
add rcx, 2
jmp 0x14001f5e7
or rax, 0xffffffffffffffff
inc rax
cmp word [r10 + rax*2], dx
jne 0x14001f60e
cmp r9d, eax
setne dl
mov eax, edx
jmp 0x14001f62b
mov eax, 1
jmp 0x14001f62b
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140021d28
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1050
call fcn.140028bd0
sub rsp, rax
mov rax, qword [0x14003b008]
xor rax, rsp
mov qword [rsp + 0x1040], rax
mov r15, r8
mov rbp, rdx
mov rbx, rcx
call fcn.140019e5c
xor edi, edi
movsxd r14, eax
cmp dword [rbx + 0x10], edi
jne 0x140021d77
mov rax, rbp
jmp 0x140021e7f
mov rax, qword [rbx]
mov rcx, r14
sub rax, qword [rbx + 8]
and ecx, 0x3f
cqo
mov rbx, r14
sub rax, rdx
sar rbx, 6
sar rax, 1
mov r9, r15
lea r12, [rcx + rcx*8]
mov rsi, rax
lea rax, [0x140000000]
xor r8d, r8d
mov rdx, qword [rax + rbx*8 + 0x3d2a0]
mov ecx, r14d
mov rdx, qword [rdx + r12*8 + 0x30]
call fcn.140022e48
mov r13, rax
lea rax, [0x140000000]
mov rcx, qword [rax + rbx*8 + 0x3d2a0]
cmp r13, qword [rcx + r12*8 + 0x30]
jne 0x140021e7b
mov rcx, qword [rcx + r12*8 + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140021e7b
mov r9, r15
xor r8d, r8d
mov rdx, rbp
mov ecx, r14d
call fcn.140022e48
test rax, rax
js 0x140021e7b
mov eax, dword [rsp + 0x30]
cmp rsi, rax
jg 0x140021e7b
lea rdx, [rsp + 0x40]
add rdx, rax
lea rcx, [rsp + 0x40]
test rsi, rsi
je 0x140021e6d
lea r8, [0x140000000]
cmp rcx, rdx
jae 0x140021e6d
cmp byte [rcx], 0xd
jne 0x140021e53
lea rax, [rdx - 1]
cmp rcx, rax
jae 0x140021e62
cmp byte [rcx + 1], 0xa
jne 0x140021e62
inc rcx
jmp 0x140021e62
movzx eax, byte [rcx]
movsx rax, byte [rax + r8 + 0x3b950]
add rcx, rax
inc rdi
inc rcx
cmp rdi, rsi
jne 0x140021e35
lea rax, [rsp + 0x40]
sub rcx, rax
lea rax, [rcx + r13]
jmp 0x140021e7f
or rax, 0xffffffffffffffff
mov rcx, qword [rsp + 0x1040]
xor rcx, rsp
call fcn.140006490
mov rbx, qword [rsp + 0x1090]
add rsp, 0x1050
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret

Function at 0x1400220a0
Capabilities:
Get file size

Disassembly:
push rbx
sub rsp, 0x20
mov edx, dword [rcx + 0x14]
nop
shr edx, 3
test dl, 1
je 0x1400220b6
mov al, 1
jmp 0x140022116
mov eax, dword [rcx + 0x14]
nop
test al, 0xc0
je 0x1400220c7
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
je 0x140022114
mov ecx, dword [rcx + 0x18]
nop
call fcn.14001cea4
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140022114
mov r9d, 1
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x140022114
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140022114
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
sete al
jmp 0x140022116
xor al, al
add rsp, 0x20
pop rbx
ret
Function at 0x1400221e8
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
movsxd r15, ecx
lea r9, [0x14003d2a0]
mov rax, r15
mov rbp, r15
and eax, 0x3f
sar rbp, 6
mov ecx, 4
xor esi, esi
mov r14, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8]
lea r13d, [rcx + 6]
mov r10, qword [rax + rdi*8 + 0x28]
test r8, r8
je 0x14002223f
cmp word [rdx], r13w
jne 0x14002223f
or byte [rax + rdi*8 + 0x38], cl
jmp 0x140022244
and byte [rax + rdi*8 + 0x38], 0xfb
lea r8, [rdx + r8*2]
mov rbx, r14
cmp r14, r8
jae 0x140022369
mov r11d, 0xd
lea r12d, [r11 - 0xb]
movzx ecx, word [rdx]
cmp cx, 0x1a
je 0x14002238a
lea r9, [rdx + 2]
cmp cx, r11w
je 0x14002227d
mov rdx, r9
mov word [rbx], cx
jmp 0x1400222a4
cmp r9, r8
jae 0x1400222b4
cmp word [r9], r13w
mov rax, r12
mov ecx, 4
cmove rax, rcx
add rdx, rax
mov eax, r13d
cmp word [r9], r13w
cmovne ax, r11w
mov word [rbx], ax
mov rax, r12
add rbx, rax
cmp rdx, r8
jb 0x14002225e
jmp 0x140022369
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rsi
mov r8d, r12d
lea rdx, [rsp + 0x70]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14002235e
cmp dword [rsp + 0x80], esi
je 0x14002235e
lea r8, [0x14003d2a0]
mov rax, qword [r8 + rbp*8]
test byte [rax + rdi*8 + 0x38], 0x48
je 0x140022336
movzx eax, word [rsp + 0x70]
cmp ax, r13w
jne 0x140022306
mov word [rbx], r13w
jmp 0x140022366
mov ecx, 0xd
mov word [rsp + 0x78], ax
mov word [rbx], cx
mov rax, qword [r8 + rbp*8]
lea rcx, [rax + rdi*8]
mov al, byte [rsp + rsi + 0x78]
mov byte [rcx + rsi + 0x3a], al
inc rsi
cmp rsi, r12
jl 0x140022313
mov rax, qword [r8 + rbp*8]
mov byte [rax + rdi*8 + 0x3c], r13b
jmp 0x140022366
cmp word [rsp + 0x70], r13w
jne 0x140022343
cmp rbx, r14
je 0x140022300
mov rdx, 0xfffffffffffffffe
mov ecx, r15d
lea r8d, [rdx + 3]
call fcn.140022e50
cmp word [rsp + 0x70], r13w
je 0x140022369
mov ecx, 0xd
mov word [rbx], cx
add rbx, r12
sub rbx, r14
sar rbx, 1
lea eax, [rbx + rbx]
mov rbx, qword [rsp + 0x88]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [0x14003d2a0]
mov rdx, qword [r8 + rbp*8]
mov al, byte [rdx + rdi*8 + 0x38]
test al, 0x40
jne 0x140022363
or al, r12b
mov byte [rdx + rdi*8 + 0x38], al
jmp 0x140022369
Function at 0x140026644
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.140017000
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x1400266ce
cmp byte [rbp - 0x21], r15b
je 0x1400266c9
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x140026704
call fcn.14001fc04
test eax, eax
jne 0x1400266f0
cmp byte [rbp - 0x21], r15b
je 0x1400266e8
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x140026704
cmp byte [rbp - 0x21], r15b
je 0x140026701
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.1400175dc
test eax, eax
jne 0x1400267a4
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.140017000
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x140026743
cmp byte [rbp - 0x21], r15b
je 0x140026778
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140026778
call fcn.14001fc04
test eax, eax
jne 0x140026764
cmp byte [rbp - 0x21], r15b
je 0x14002675d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140026778
cmp byte [rbp - 0x21], r15b
je 0x140026775
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.1400175dc
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x1400267a4
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x1400267a7
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x1400267b5
mov rcx, rdi
call fcn.140018c24
cmp byte [rbp + 0x3f], r15b
je 0x1400267c4
mov rcx, qword [rbp + 0x27]
call fcn.140018c24
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret

Function at 0x140028cc0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140028ce8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140028ce8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x140011810
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
sub rsp, 0x20
mov eax, r8d
mov rbp, rdx
mov ebx, r8d
shr eax, 4
mov rsi, rcx
mov r8d, 6
add ax, 1
mov rcx, rbp
movzx edx, ax
call qword [sym.imp.KERNEL32.dll_FindResourceW]
test rax, rax
mov r12, rax
je 0x140011972
mov rdx, rax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
je 0x140011972
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
test rax, rax
mov rdi, rax
je 0x140011972
mov rdx, r12
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r11d, eax
add r11, rdi
and ebx, 0xf
jbe 0x1400118b6
nop
cmp rdi, r11
jae 0x140011972
add ebx, 0xffffffff
movzx eax, word [rdi]
lea rdi, [rdi + rax*2 + 2]
jne 0x1400118a0
cmp rdi, r11
jae 0x140011972
movzx eax, word [rdi]
test ax, ax
je 0x140011972
movzx ebx, ax
mov rax, qword [rsi]
mov ecx, 1
sub ecx, dword [rax - 8]
mov eax, dword [rax - 0xc]
sub eax, ebx
or ecx, eax
jge 0x1400118ec
mov edx, ebx
mov rcx, rsi
call fcn.140011a30
movzx ecx, word [rdi]
lea r8, [rdi + 2]
cmp ecx, 0xffffffff
jne 0x140011909
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r8
repne scasw ax, word [rdi]
not rcx
and ecx, ecx
movsxd r9, ecx
mov rcx, qword [rsi]
lea rdi, [rbx + rbx]
mov rdx, rdi
add r9, r9
call fcn.140082af0
test eax, eax
je 0x140011948
cmp eax, 0xc
je 0x140011942
cmp eax, 0x16
je 0x14001193c
cmp eax, 0x22
je 0x14001193c
cmp eax, 0x50
je 0x140011948
call fcn.140057a80
int3
call fcn.140057a80
int3
call fcn.140057a38
int3
test ebx, ebx
js 0x140011967
mov rcx, qword [rsi]
cmp ebx, dword [rcx - 0xc]
jg 0x140011967
mov dword [rcx - 0x10], ebx
mov rcx, qword [rsi]
mov eax, 1
mov word [rdi + rcx], 0
jmp 0x140011974
mov ecx, 0x80070057
call fcn.1400120e0
int3
xor eax, eax
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r12
ret

Function at 0x140011990
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov edi, r8d
mov rsi, rdx
mov rbp, rcx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
jne 0x1400119c3
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov rcx, rax
mov qword [rsp + 0x30], rbx
call qword [sym.imp.KERNEL32.dll_LockResource]
test rax, rax
mov rbx, rax
je 0x140011a07
mov rdx, rsi
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r11d, eax
add r11, rbx
and edi, 0xf
jbe 0x140011a02
cmp rbx, r11
jae 0x140011a07
add edi, 0xffffffff
movzx eax, word [rbx]
lea rbx, [rbx + rax*2 + 2]
jne 0x1400119f0
cmp rbx, r11
jb 0x140011a0b
xor eax, eax
jmp 0x140011a17
xor eax, eax
cmp word [rbx], ax
cmove rbx, rax
mov rax, rbx
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140012fa0
Capabilities:
Query or enumerate registry value

Disassembly:
push rbp
push rdi
sub rsp, 0x48
test rcx, rcx
mov rbp, r8
mov rdi, rdx
jne 0x140012fda
mov rdx, qword [rdx]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140012fd1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
add rsp, 0x48
pop rdi
pop rbp
ret
test r8, r8
je 0x140012fb2
xor eax, eax
mov rdx, rcx
mov qword [rsp + 0x40], rsi
mov qword [r8], rax
mov qword [r8 + 8], rax
xor esi, esi
mov qword [r8 + 0x10], rax
lea rax, [rsp + 0x38]
lea r9d, [rsi + 1]
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x60], esi
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x38], rsi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14001312e
mov rdx, qword [rdi]
mov qword [rsp + 0x68], rbx
mov rbx, qword [rsp + 0x38]
lea r9, [rsp + 0x60]
mov rcx, rbx
xor r8d, r8d
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x140013058
test rbx, rbx
je 0x14001306d
jmp 0x140013064
cmp dword [rsp + 0x60], 4
je 0x14001309f
test rbx, rbx
je 0x14001306d
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdx, qword [rdi]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14001308c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x40]
xor eax, eax
add rsp, 0x48
pop rdi
pop rbp
ret
lea rcx, [rsp + 0x78]
mov word [rbp], SafeArrayUnaccessData
mov rdx, qword [rdi]
mov qword [rsp + 0x28], rcx
lea rax, [rbp + 8]
lea r9, [rsp + 0x30]
mov rcx, rbx
xor r8d, r8d
mov dword [rsp + 0x78], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400130e7
cmp dword [rsp + 0x30], 4
mov eax, esi
mov ecx, SafeArrayGetDim
cmovne eax, ecx
test eax, eax
sete sil
test rbx, rbx
je 0x1400130fb
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdx, qword [rdi]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14001311b
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov rbx, qword [rsp + 0x68]
mov eax, esi
mov rsi, qword [rsp + 0x40]
add rsp, 0x48
pop rdi
pop rbp
ret
mov rdx, qword [rdi]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14001314d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
mov rsi, qword [rsp + 0x40]
add rsp, 0x48
pop rdi
pop rbp
ret
Function at 0x140013460
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x50
xor edi, edi
sub r8d, 3
mov r10, rdx
mov rsi, rcx
je 0x140013522
sub r8d, 1
je 0x1400134fa
sub r8d, 7
je 0x1400134d7
cmp r8d, 8
jne 0x14001359b
cmp qword [rcx], rdi
mov ebx, dword [r9]
mov qword [rsp + 0x30], rdi
je 0x14001359b
lea rdx, [rsp + 0x30]
mov rcx, r10
call fcn.1400132b0
test eax, eax
js 0x14001359b
mov dword [rsp + 0x70], ebx
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x70]
lea r9d, [rdi + 4]
jmp 0x14001356f
xor eax, eax
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rax
movzx eax, word [r9]
mov word [rsp + 0x38], VariantTimeToDosDateTime
mov word [rsp + 0x40], ax
jmp 0x140013541
movss xmm0, dword [r9]
xor eax, eax
cmp qword [rcx], rax
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], rax
movss dword [rsp + 0x40], xmm0
mov qword [rsp + 0x48], rax
mov word [rsp + 0x38], 4
jmp 0x140013544
xor eax, eax
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rax
mov eax, dword [r9]
mov word [rsp + 0x38], 3
mov dword [rsp + 0x40], eax
cmp qword [rcx], rdi
mov qword [rsp + 0x30], rdi
je 0x14001359b
lea rdx, [rsp + 0x30]
mov rcx, r10
call fcn.1400132b0
test eax, eax
js 0x14001359b
mov dword [rsp + 0x28], reloc.OLEAUT32.dll_SafeArrayGetElement
lea rax, [rsp + 0x38]
mov r9d, 3
mov rbx, qword [rsp + 0x30]
mov rcx, qword [rsi]
xor r8d, r8d
mov rdx, rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, 1
test eax, eax
cmove edi, ecx
mov rcx, rbx
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
mov eax, edi
add rsp, 0x50
pop rdi
ret
Function at 0x1400135b0
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 0x18], r8
push rsi
push rdi
push r12
sub rsp, 0x40
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x78], rbp
mov rdi, r8
mov rax, rdx
mov rbp, rcx
xor esi, esi
mov qword [rsp + 0x60], rsi
cmp qword [rcx], rsi
jne 0x14001360b
mov rdx, qword [r8]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140013604
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x14001369c
lea rdx, [rsp + 0x60]
mov rcx, rax
call fcn.1400132b0
test eax, eax
js 0x14001367a
mov rbx, qword [rdi]
mov eax, esi
test rbx, rbx
setne al
test eax, eax
jne 0x140013636
mov ecx, 0x80004005
call fcn.1400120e0
int3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [rax + rax + 2]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
mov r12d, 1
mov r9d, r12d
xor r8d, r8d
mov rbx, qword [rsp + 0x60]
mov rdx, rbx
mov rcx, qword [rbp]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
cmove esi, r12d
mov rcx, rbx
call qword [sym.imp.ole32.dll_CoTaskMemFree]
nop
mov rdx, qword [rdi]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14001369a
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov eax, esi
mov rbx, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x78]
add rsp, 0x40
pop r12
pop rdi
pop rsi
ret