joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4054dc
Capabilities:
Get session user name
Manipulate user privileges

Disassembly:
push rbx
push rbp
push rsi
push rdi
mov rax, rsp
sub rsp, 0x378
xor ebp, ebp
lea r9, [rax + 0x30]
lea rdx, [rsp + 0x30]
mov r8d, 0xf0fff
xor ecx, ecx
mov dword [rsp + 0x30], 0x30
mov qword [rax + 0x30], rbp
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x40], rbp
mov dword [rsp + 0x48], ebp
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x58], rbp
call sub.ADVAPI32.dll_LsaOpenPolicy
cmp eax, ebp
je 0x405538
mov rcx, qword [rsp + 0x3a8]
jmp 0x4055d0
lea rcx, [rsp + 0x60]
lea rdx, [0x0049dc60]
mov r8d, 0x2c
call sub.msvcrt.dll_memcpy
lea rcx, [rsp + 0x8c]
xor edx, edx
mov r8d, 0xd4
call sub.msvcrt.dll_memset
lea rcx, [rsp + 0x60]
call qword [sym.imp.msvcrt.dll_wcslen]
lea rdx, [rsp + 0x3a0]
lea rcx, [rsp + 0x160]
add ax, ax
mov dword [rsp + 0x3a0], 0x100
mov word [rsp + 0x20], ax
add ax, 2
mov word [rsp + 0x22], ax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
cmp eax, ebp
je 0x40552b
lea rcx, [rsp + 0x160]
call fcn.004053dc
mov rcx, qword [rsp + 0x3a8]
cmp rax, rbp
mov rbx, rax
jne 0x4055de
cmp rcx, rbp
je 0x4055da
call sub.ADVAPI32.dll_LsaClose
xor al, al
jmp 0x405625
mov esi, 1
lea r8, [rsp + 0x20]
mov rdx, rax
mov r9d, esi
call sub.ADVAPI32.dll_LsaAddAccountRights
movzx edi, bpl
cmp eax, ebp
cmove edi, esi
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rsp + 0x3a8]
cmp rcx, rbp
je 0x405622
call sub.ADVAPI32.dll_LsaClose
mov al, dil
add rsp, 0x378
pop rdi
pop rsi
pop rbp
pop rbx
ret

Function at 0x405688
Capabilities:
Open clipboard
Write clipboard data

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x28
mov rdi, rdx
call qword [sym.imp.USER32.dll_OpenClipboard]
xor ebx, ebx
cmp eax, ebx
setne al
cmp al, bl
mov byte [rsp + 0x60], al
je 0x40573f
call qword [sym.imp.USER32.dll_EmptyClipboard]
cmp eax, ebx
je 0x40573f
mov esi, dword [rdi + 8]
mov rbp, qword [rdi]
lea rcx, [rsp + 0x68]
inc esi
mov edx, 0x2002
mov qword [rsp + 0x68], rbx
add rsi, rsi
mov r8, rsi
call fcn.0040af24
cmp al, bl
jne 0x4056e8
lea rcx, [rsp + 0x68]
jmp 0x40572c
mov rdi, qword [rsp + 0x68]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalLock]
cmp rax, rbx
je 0x4056e1
mov r8, rsi
mov rdx, rbp
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rdx, qword [rsp + 0x68]
mov ecx, InitCommonControls
call qword [sym.imp.USER32.dll_SetClipboardData]
lea rcx, [rsp + 0x68]
cmp rax, rbx
jne 0x405733
call fcn.0040af4c
jmp 0x40573f
mov qword [rsp + 0x68], rbx
call fcn.0040af4c
mov bl, 1
lea rcx, [rsp + 0x60]
call fcn.00405658
mov al, bl
add rsp, 0x28
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x405cc4
Capabilities:
Get common file path

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x250
mov rbx, rcx
lea rcx, [rsp + 0x20]
xor edi, edi
mov edx, 0x114
mov word [rsp + 0x20], di
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea rdx, [rsp + 0x20]
mov rcx, rbx
mov esi, eax
call fcn.00402b00
cmp esi, edi
je 0x405d09
cmp esi, 0x114
jae 0x405d09
mov edi, 1
mov al, dil
add rsp, 0x250
pop rdi
pop rsi
pop rbx
ret

Function at 0x405ee8
Capabilities:
Set file attributes

Disassembly:
test edx, 0xf0000000
je 0x405ef6
and edx, 0x3fff
jmp fcn.00405e40

Function at 0x405efc
Capabilities:
Delete directory

Disassembly:
push rbx
push rdi
sub rsp, 0x48
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov rdi, rcx
call fcn.0040a4c0
mov ebx, eax
cmp eax, 1
je 0x405f2c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x405f2c
mov al, 1
jmp 0x405f7d
test ebx, ebx
je 0x405f7b
lea rcx, [rsp + 0x28]
call fcn.004028ec
nop
cmp ebx, 1
setne r8b
lea rdx, [rsp + 0x28]
mov rcx, rdi
call fcn.0040ab8c
test al, al
je 0x405f71
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
setne bl
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
mov al, bl
jmp 0x405f7d
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
xor al, al
add rsp, 0x48
pop rdi
pop rbx
ret

Function at 0x405fa4
Capabilities:
Move file

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x60
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov rbp, rdx
mov r12, rcx
call fcn.0040a4c0
mov esi, eax
mov rcx, rbp
call fcn.0040a4c0
mov edi, eax
mov ebx, 1
cmp esi, ebx
je 0x405ff3
cmp eax, ebx
je 0x405ff3
mov rdx, rbp
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x405ff3
mov al, bl
jmp 0x406081
test esi, esi
jne 0x405fff
test edi, edi
je 0x40607f
lea rcx, [rsp + 0x48]
call fcn.004028ec
nop
lea rcx, [rsp + 0x38]
call fcn.004028ec
nop
cmp esi, ebx
je 0x40601d
cmp edi, ebx
jne 0x40601f
xor bl, bl
mov byte [rsp + 0x20], bl
lea r9, [rsp + 0x38]
lea r8, [rsp + 0x48]
mov rdx, rbp
mov rcx, r12
call fcn.0040abd4
test al, al
je 0x40606a
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
setne bl
mov rcx, qword [rsp + 0x38]
call sub.msvcrt.dll_free
nop
mov rcx, qword [rsp + 0x48]
call sub.msvcrt.dll_free
mov al, bl
jmp 0x406081
mov rcx, qword [rsp + 0x38]
call sub.msvcrt.dll_free
nop
mov rcx, qword [rsp + 0x48]
call sub.msvcrt.dll_free
xor al, al
add rsp, 0x60
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x4061f4
Capabilities:
Create directory

Disassembly:
push rbx
push rdi
sub rsp, 0x48
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov rdi, rcx
call fcn.0040a4c0
mov ebx, eax
cmp eax, 1
je 0x406233
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x406226
mov al, 1
jmp 0x406286
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x406284
test ebx, ebx
je 0x406284
lea rcx, [rsp + 0x28]
call fcn.004028ec
nop
cmp ebx, 1
setne r8b
lea rdx, [rsp + 0x28]
mov rcx, rdi
call fcn.0040ab8c
test al, al
je 0x40627a
xor edx, edx
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
setne bl
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
mov al, bl
jmp 0x406286
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
xor al, al
add rsp, 0x48
pop rdi
pop rbx
ret

Function at 0x4062b8
Capabilities:
Delete file

Disassembly:
push rbx
push rdi
sub rsp, 0x48
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov rbx, rcx
call fcn.004075bc
cmp eax, 0xffffffff
je 0x4062ee
test al, 0x10
jne 0x4062ee
test al, 1
je 0x4062ee
and eax, 0xfffffffe
mov edx, eax
mov rcx, rbx
call fcn.00405e40
test al, al
je 0x40635f
mov rcx, rbx
call fcn.0040a4c0
mov edi, eax
cmp eax, 1
je 0x40630e
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x40630e
mov al, 1
jmp 0x40635f
test edi, edi
je 0x40635d
lea rcx, [rsp + 0x28]
call fcn.004028ec
nop
cmp edi, 1
setne r8b
lea rdx, [rsp + 0x28]
mov rcx, rbx
call fcn.0040ab8c
test al, al
je 0x406353
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
setne bl
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
mov al, bl
jmp 0x40635f
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
xor al, al
add rsp, 0x48
pop rdi
pop rbx
ret

Function at 0x406388
Capabilities:
Get common file path

Disassembly:
push rbx
push rdi
sub rsp, 0x278
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov rdi, rcx
mov dword [rcx + 8], 0
mov rax, qword [rcx]
mov word [rax], 0
mov word [rsp + 0x40], 0
lea rdx, [rsp + 0x40]
mov ecx, 0x114
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ebx, eax
test eax, eax
je 0x40648a
cmp ebx, 0x114
jae 0x4063f4
mov word [rsp + 0x268], 0
lea rdx, [rsp + 0x40]
mov rcx, rdi
call fcn.00402b00
mov al, 1
jmp 0x40648a
lea rcx, [rsp + 0x20]
call fcn.004028ec
nop
cmp ebx, dword [rsp + 0x2c]
jbe 0x406411
mov edx, ebx
lea rcx, [rsp + 0x20]
call fcn.00402578
mov rdx, qword [rsp + 0x20]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov r11d, eax
test eax, eax
jne 0x406433
mov rcx, qword [rsp + 0x20]
call sub.msvcrt.dll_free
xor al, al
jmp 0x40648a
mov rcx, qword [rsp + 0x20]
mov word [rcx + rbx*2], 0
xor eax, eax
cmp word [rcx], ax
je 0x406451
inc eax
add rcx, 2
cmp word [rcx], 0
jne 0x406445
mov dword [rsp + 0x28], eax
cmp eax, r11d
jne 0x40647e
lea eax, [rbx - 1]
cmp eax, r11d
jne 0x40647e
lea rdx, [rsp + 0x20]
mov rcx, rdi
call fcn.00402b68
nop
mov rcx, qword [rsp + 0x20]
call sub.msvcrt.dll_free
mov al, 1
jmp 0x40648a
mov rcx, qword [rsp + 0x20]
call sub.msvcrt.dll_free
xor al, al
add rsp, 0x278
pop rdi
pop rbx
ret
Function at 0x40657c
Capabilities:
Get common file path

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x250
mov rbx, rcx
lea rdx, [rsp + 0x20]
xor edi, edi
mov ecx, 0x114
mov word [rsp + 0x20], di
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea rdx, [rsp + 0x20]
mov rcx, rbx
mov esi, eax
call fcn.00402b00
mov rcx, rbx
call fcn.00409d20
cmp esi, edi
je 0x4065c9
cmp esi, 0x114
jae 0x4065c9
mov edi, 1
mov al, dil
add rsp, 0x250
pop rdi
pop rsi
pop rbx
ret

Function at 0x4065d8
Capabilities:
Check for time delay via gettickcount

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x58
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov rbp, r9
mov rsi, r8
mov r12b, dl
mov r14, rcx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebx, eax
shl ebx, 2
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
xor edi, ebx
shl edi, 0xc
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r13d, eax
xor r13d, edi
xor edi, edi
mov ebx, edi
lea r15d, [rdi + 1]
mov dword [rsi + 8], edi
mov rcx, qword [rsi]
mov byte [rcx], dil
cmp r12b, dil
je 0x4066a0
mov r10d, r13d
mov r9, rdi
mov r11d, 8
mov r8d, r10d
and r8d, 0xf
shr r10d, 4
lea edx, [r8 + 0x30]
lea eax, [r8 + 0x37]
movzx ecx, al
movzx eax, dl
cmp r8d, 0xa
cmovb ecx, eax
mov byte [rsp + r9 + 0x38], cl
add r9, r15
sub r11, r15
jne 0x406644
mov byte [rsp + r9 + 0x38], dil
cmp rbp, rdi
je 0x406683
mov rcx, rsi
call fcn.00403198
lea rdx, [rsp + 0x38]
mov rcx, rsi
call fcn.004023a4
call qword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, 2
cmove eax, r15d
add r13d, eax
mov r12b, r15b
cmp rbp, rdi
je 0x4066b7
lea rdx, str..tmp
mov rcx, rsi
call fcn.004023a4
mov rdx, r14
lea rcx, [rsp + 0x28]
call fcn.00402988
nop
mov rdx, qword [rsi]
lea rcx, [rsp + 0x28]
call fcn.00402da8
mov rcx, qword [rsp + 0x28]
call fcn.004082ac
cmp al, dil
je 0x4066f9
mov ecx, 0xb7
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
jmp 0x406740
cmp rbp, rdi
je 0x406715
mov r8d, r15d
mov rdx, qword [rsp + 0x28]
mov rcx, rbp
call fcn.00409050
cmp al, dil
jne 0x40674e
jmp 0x406724
mov rcx, qword [rsp + 0x28]
call fcn.004061f4
cmp al, dil
jne 0x40675d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
je 0x406736
cmp eax, 0xb7
jne 0x40676c
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
add ebx, r15d
cmp ebx, 0x64
jb 0x40662a
jmp 0x406776
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
mov al, r15b
jmp 0x406781
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
mov al, r15b
jmp 0x406781
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
mov dword [rsi + 8], edi
mov rax, qword [rsi]
mov byte [rax], dil
xor al, al
add rsp, 0x58
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x4075bc
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbx
push rdi
sub rsp, 0x48
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov rdi, rcx
call fcn.0040a4c0
mov ebx, eax
cmp eax, 1
je 0x4075e9
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40763a
test ebx, ebx
je 0x407635
lea rcx, [rsp + 0x28]
call fcn.004028ec
nop
cmp ebx, 1
setne r8b
lea rdx, [rsp + 0x28]
mov rcx, rdi
call fcn.0040ab8c
test al, al
je 0x40762b
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
mov eax, ebx
jmp 0x40763a
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
mov eax, 0xffffffff
add rsp, 0x48
pop rdi
pop rbx
ret

Function at 0x4083ec
Capabilities:
Get disk information

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x48
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov rbp, rcx
movsxd rbx, dword [rcx + 8]
mov rdi, rbx
test ebx, ebx
je 0x40843c
shl rdi, 3
add ebx, 0xffffffff
sub rdi, 8
mov rax, qword [rbp]
mov rsi, qword [rdi + rax]
test rsi, rsi
je 0x408438
mov rcx, qword [rsi]
call sub.msvcrt.dll_free
mov rcx, rsi
call sub.msvcrt.dll_free
test ebx, ebx
jne 0x408414
mov dword [rbp + 8], 0
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
mov edi, eax
test eax, eax
je 0x408541
mov rcx, rdi
xor ebx, ebx
mov qword [rsp + 0x80], rbx
test eax, eax
je 0x40847b
add rcx, rcx
call fcn.00403800
mov rbx, rax
mov qword [rsp + 0x80], rax
mov rdx, rbx
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
mov esi, eax
test eax, eax
je 0x408537
cmp eax, edi
ja 0x408537
lea rcx, [rsp + 0x28]
call fcn.004028ec
nop
xor r13d, r13d
xor edi, edi
test esi, esi
je 0x408518
mov r12, rbx
cmp word [r12], 0
jne 0x40850e
lea rdx, [rbx + r13*2]
lea rcx, [rsp + 0x28]
call fcn.00402b00
lea r13d, [rdi + 1]
mov rcx, rbp
call fcn.00431354
mov ecx, InitCommonControls
call fcn.00403800
mov qword [rsp + 0x88], rax
test rax, rax
je 0x4084fa
lea rdx, [rsp + 0x28]
mov rcx, rax
call fcn.00402a78
mov r11, rax
jmp 0x4084fd
xor r11d, r11d
mov ecx, dword [rbp + 8]
lea eax, [rcx + 1]
mov dword [rbp + 8], eax
mov rax, qword [rbp]
mov qword [rax + rcx*8], r11
inc edi
add r12, 2
cmp edi, esi
jb 0x4084af
cmp r13d, esi
sete dil
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
nop
mov rcx, rbx
call sub.msvcrt.dll_free
mov al, dil
jmp 0x408541
mov rcx, rbx
call sub.msvcrt.dll_free
xor al, al
add rsp, 0x48
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x408610
Capabilities:
Get file size

Disassembly:
push rbx
push rdi
sub rsp, 0x28
cmp byte [rcx + 9], 0
mov rbx, rdx
je 0x40862f
cmp byte [rcx + 0xa], 0
je 0x40862f
mov rax, qword [rcx + 0x10]
mov qword [rdx], rax
jmp 0x40866b
mov rcx, qword [rcx]
lea rdx, [rsp + 0x40]
mov dword [rsp + 0x40], 0
call qword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov edi, eax
jne 0x40865a
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40865a
xor al, al
jmp 0x40866d
mov ecx, dword [rsp + 0x40]
mov rax, rdi
shl rcx, 0x20
add rcx, rdi
mov qword [rbx], rcx
mov al, 1
add rsp, 0x28
pop rdi
pop rbx
ret

Function at 0x408790
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x30
mov rcx, qword [rcx]
mov rbx, r9
lea r9, [rsp + 0x58]
mov dword [rsp + 0x58], 0
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [rsp + 0x58]
test eax, eax
setne al
mov dword [rbx], ecx
add rsp, 0x30
pop rbx
ret

Function at 0x4087cc
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x400000
cmp r8d, eax
cmova r8d, eax
jmp fcn.00408790

Function at 0x408900
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x30
mov rcx, qword [rcx]
mov eax, 0x400000
mov rbx, r9
cmp r8d, eax
lea r9, [rsp + 0x50]
mov dword [rsp + 0x50], 0
cmova r8d, eax
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [rsp + 0x50]
test eax, eax
mov dword [rbx], ecx
setne al
add rsp, 0x30
pop rbx
ret

Function at 0x408a14
Capabilities:
Clear file content

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x20
lea r9, [rsp + 0x50]
xor r8d, r8d
mov rdi, rdx
mov rsi, rcx
call fcn.004086d0
xor ebx, ebx
cmp al, bl
je 0x408a3c
cmp qword [rsp + 0x50], rdi
je 0x408a40
xor al, al
jmp 0x408a4e
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp eax, ebx
setne al
add rsp, 0x20
pop rdi
pop rsi
pop rbx
ret
Function at 0x40b3d8
Capabilities:
Create process on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x128
mov qword [rsp + 0xa8], 0xfffffffffffffffe
mov rdi, r9
mov rsi, r8
mov rbp, rdx
mov rbx, rcx
mov rcx, qword [rcx]
test rcx, rcx
je 0x40b415
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40b415
mov qword [rbx], 0
mov rdx, rbp
lea rcx, [rsp + 0x60]
call fcn.00402988
nop
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x80]
call fcn.0040b330
nop
mov r8w, 0x20
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.0040b3b8
nop
mov r8, rsi
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.00402828
nop
mov rcx, qword [rsp + 0x70]
call sub.msvcrt.dll_free
nop
mov rcx, qword [rsp + 0x80]
call sub.msvcrt.dll_free
nop
mov rcx, qword [rsp + 0x60]
call sub.msvcrt.dll_free
mov dword [rsp + 0xb0], 0x68
mov qword [rsp + 0xb8], 0
mov qword [rsp + 0xc0], 0
mov qword [rsp + 0xc8], 0
mov dword [rsp + 0xec], 0
mov word [rsp + 0xf2], 0
mov qword [rsp + 0xf8], 0
lea rax, [rsp + 0x90]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsp + 0x50]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x40b526
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x40b541
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r11, qword [rsp + 0x90]
mov qword [rbx], r11
xor ebx, ebx
mov rcx, qword [rsp + 0x50]
call sub.msvcrt.dll_free
mov eax, ebx
add rsp, 0x128
pop rdi
pop rsi
pop rbp
pop rbx
ret

Function at 0x40c0e4
Capabilities:
Set registry value

Disassembly:
mov dword [rsp + 0x18], r8d
sub rsp, 0x38
mov rcx, qword [rcx]
lea rax, [rsp + 0x50]
mov r9d, 4
mov dword [rsp + 0x28], r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
add rsp, 0x38
ret

Function at 0x40c114
Capabilities:
Set registry value

Disassembly:
mov al, r8b
xor r8d, r8d
cmp al, r8b
setne r8b
jmp fcn.0040c0e4

Function at 0x40c128
Capabilities:
Set registry value

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x30
mov rsi, rcx
mov rcx, r8
mov rbx, r8
mov rdi, rdx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov rcx, qword [rsi]
lea eax, [rax + rax + 2]
mov r9d, 1
xor r8d, r8d
mov dword [rsp + 0x28], eax
mov rdx, rdi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
add rsp, 0x30
pop rdi
pop rsi
pop rbx
ret

Function at 0x40c16c
Capabilities:
Set registry value

Disassembly:
sub rsp, 0x38
mov rcx, qword [rcx]
mov dword [rsp + 0x28], r9d
mov qword [rsp + 0x20], r8
mov r9d, 3
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
add rsp, 0x38
ret

Function at 0x40c194
Capabilities:
Query or enumerate registry value

Disassembly:
mov r11, rsp
sub rsp, 0x48
mov rcx, qword [rcx]
lea rax, [r11 + 0x20]
lea r9, [r11 - 0x18]
mov qword [r11 - 0x20], rax
mov qword [r11 - 0x28], r8
xor r8d, r8d
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x68], 4
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
add rsp, 0x48
ret
Function at 0x40c248
Capabilities:
Query or enumerate registry value

Disassembly:
push rbx
push rsi
push rdi
mov r11, rsp
sub rsp, 0x40
mov rax, qword [r8]
mov dword [r8 + 8], 0
mov rsi, rcx
mov word [rax], 0
mov rcx, qword [rcx]
lea rax, [r11 + 0x30]
mov rbx, r8
mov qword [r11 - 0x18], rax
lea r9, [r11 - 0x10]
xor r8d, r8d
mov qword [r11 - 0x20], 0
mov rdi, rdx
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x70], 0
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40c2a7
cmp eax, 0xea
jne 0x40c31d
mov edx, dword [rsp + 0x70]
cmp edx, dword [rbx + 0xc]
mov dword [rsp + 0x78], edx
jbe 0x40c2bc
mov rcx, rbx
call fcn.00402578
mov rax, qword [rbx]
lea rcx, [rsp + 0x78]
lea r9, [rsp + 0x34]
mov qword [rsp + 0x28], rcx
mov rcx, qword [rsi]
xor r8d, r8d
mov rdx, rdi
mov dword [rsp + 0x34], 0
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ecx, dword [rsp + 0x70]
mov rdx, qword [rbx]
cmp ecx, dword [rsp + 0x78]
cmova ecx, dword [rsp + 0x78]
mov dword [rsp + 0x70], ecx
shr rcx, 1
mov word [rdx + rcx*2], 0
xor ecx, ecx
cmp word [rdx], cx
je 0x40c31a
add rdx, 2
inc ecx
cmp word [rdx], 0
jne 0x40c30e
mov dword [rbx + 8], ecx
add rsp, 0x40
pop rdi
pop rsi
pop rbx
ret

Function at 0x40c41c
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push rbx
push rsi
push rdi
mov rax, rsp
sub rsp, 0x260
mov rdi, rdx
mov r8, rdx
mov rdx, qword [rcx]
mov rsi, rcx
lea rcx, [rax + 0x38]
mov r9d, 0x2001f
mov qword [rax + 0x38], 0
call fcn.0040c3c8
test eax, eax
mov ebx, eax
jne 0x40c4d0
mov ebx, 0x105
jmp 0x40c468
lea rdx, [rsp + 0x50]
call fcn.0040c41c
test eax, eax
jne 0x40c4ce
mov rcx, qword [rsp + 0x298]
lea rax, [rsp + 0x40]
lea r9, [rsp + 0x290]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0
lea r8, [rsp + 0x50]
xor edx, edx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x290], ebx
mov qword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
lea rcx, [rsp + 0x298]
test eax, eax
je 0x40c45a
call fcn.0040c0b0
mov rcx, qword [rsi]
mov rdx, rdi
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov ebx, eax
lea rcx, [rsp + 0x298]
call fcn.0040c0b0
mov eax, ebx
add rsp, 0x260
pop rdi
pop rsi
pop rbx
ret
Function at 0x40c4ec
Capabilities:
Query or enumerate registry value

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
mov rax, rsp
sub rsp, 0x40
mov dword [r9], 0
mov qword [rax - 0x18], r9
mov r12, rcx
mov rcx, qword [rcx]
mov rsi, r9
mov rbx, r8
lea r9, [rax + 0x48]
xor r8d, r8d
mov rbp, rdx
mov dword [rax + 0x48], 0
mov qword [rax - 0x20], 0
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40c53b
cmp eax, 0xea
jne 0x40c59d
mov edi, dword [rsi]
cmp rdi, qword [rbx + 8]
je 0x40c573
mov rcx, qword [rbx]
test rcx, rcx
je 0x40c557
call sub.msvcrt.dll_free
mov qword [rbx], 0
test rdi, rdi
mov qword [rbx + 8], 0
je 0x40c573
mov rcx, rdi
call fcn.00403800
mov qword [rbx + 8], rdi
mov qword [rbx], rax
mov rax, qword [rbx]
mov rcx, qword [r12]
lea r9, [rsp + 0x30]
xor r8d, r8d
mov rdx, rbp
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
add rsp, 0x40
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret

Function at 0x40c5a8
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x38
xor esi, esi
mov r12, r8
mov r15, rdx
cmp dword [r8 + 8], esi
mov rbp, rsi
jbe 0x40c5e9
mov r9, qword [r8]
mov r8d, dword [r8 + 8]
mov rax, qword [r9]
add r9, 8
mov eax, dword [rax + 8]
inc eax
add rbp, rax
dec r8
jne 0x40c5d5
cmp rbp, rsi
mov rbx, rsi
je 0x40c5fe
lea rcx, [rbp + rbp]
call fcn.00403800
mov rbx, rax
cmp dword [r12 + 8], esi
mov r14d, esi
jbe 0x40c63c
mov r13, rsi
mov rax, qword [r12]
lea rcx, [rbx + rsi*2]
mov rdx, qword [r13 + rax]
mov eax, dword [rdx + 8]
mov rdx, qword [rdx]
inc eax
mov edi, eax
lea r8, [rax + rax]
call sub.msvcrt.dll_memcpy
inc r14d
add rsi, rdi
add r13, 8
cmp r14d, dword [r12 + 8]
jb 0x40c60b
mov rcx, qword [rsp + 0x80]
lea eax, [rbp + rbp]
mov r9d, 3
mov rcx, qword [rcx]
mov dword [rsp + 0x28], eax
xor r8d, r8d
mov rdx, r15
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, rbx
mov edi, eax
call sub.msvcrt.dll_free
mov eax, edi
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret

Function at 0x40d8b8
Capabilities:
Get memory capacity

Disassembly:
push rbx
sub rsp, 0x60
movabs rax, 0x100000000
mov rbx, rcx
mov dword [rsp + 0x20], 0x40
mov qword [rcx], rax
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
test eax, eax
je 0x40d8fa
mov rax, qword [rsp + 0x28]
cmp qword [rsp + 0x48], rax
cmovb rax, qword [rsp + 0x48]
mov qword [rbx], rax
mov al, 1
add rsp, 0x60
pop rbx
ret