joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400590ac
Capabilities:
Hook routines via microsoft detours

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 r13
push r14
push r15
sub rsp, 0x20
mov rdx, qword [0x140091048]
lea rax, [rcx - 0x7ff80000]
cmp rcx, 0x7ff80000
mov r14d, 0x10000
mov rsi, 0xfffffffffff80000
mov rdi, rcx
cmova r14, rax
cmp rcx, 0xffffffff80000000
lea rax, [rcx + 0x7ff80000]
cmovb rsi, rax
mov rax, qword [0x140091040]
xor ebx, ebx
test rdx, rdx
jne 0x140059121
test rax, rax
je 0x140059137
mov rdx, rax
mov qword [0x140091048], rax
cmp qword [rdx + 0x10], rbx
je 0x140059137
cmp qword [rdx + 0x10], r14
jb 0x140059137
cmp qword [rdx + 0x10], rsi
jbe 0x140059282
mov qword [0x140091048], rax
mov rdx, rax
test rax, rax
je 0x14005917a
mov rcx, rax
test rax, rax
je 0x140059164
cmp qword [rcx + 0x10], rbx
je 0x140059164
cmp qword [rcx + 0x10], r14
jb 0x140059164
cmp qword [rcx + 0x10], rsi
jbe 0x140059282
mov rdx, qword [rdx + 8]
mov qword [0x140091048], rdx
mov rcx, rdx
mov rax, rdx
test rdx, rdx
jne 0x140059149
movzx eax, di
movabs r13, 0xffffffff40000000
sub rdi, rax
lea rbp, [rdi - 0x40000000]
cmp rdi, 0x40000000
jbe 0x1400591bf
mov rdx, rbp
mov rcx, r14
call fcn.140058ef4
mov rdx, rax
test rax, rax
jne 0x140059233
cmp rdi, r13
jb 0x1400591bf
lea r15, [rdi + 0x40000000]
jmp 0x1400591e2
lea r15, [rdi + 0x40000000]
mov rdx, rsi
mov rcx, r15
call fcn.140058fd4
mov rdx, rax
test rax, rax
jne 0x140059233
cmp rdi, 0x40000000
jbe 0x1400591f5
mov rdx, rdi
mov rcx, rbp
call fcn.140058fd4
mov rdx, rax
test rax, rax
jne 0x140059233
cmp rdi, r13
jae 0x14005920d
mov rdx, r15
mov rcx, rdi
call fcn.140058ef4
mov rdx, rax
test rax, rax
jne 0x140059233
mov rdx, rdi
mov rcx, r14
call fcn.140058ef4
mov rdx, rax
test rax, rax
jne 0x140059233
mov rdx, rsi
mov rcx, rdi
call fcn.140058fd4
mov rdx, rax
test rax, rax
je 0x1400592ae
mov dword [rdx], 0x52727464
lea rcx, [rdx + 0xffa8]
mov qword [rdx + 0x10], rbx
mov r8d, 0x2a7
mov rax, qword [0x140091040]
mov qword [rdx + 8], rax
lea rax, [rdx + 0xff60]
mov qword [0x140091040], rdx
mov qword [0x140091048], rdx
mov qword [rcx], rbx
mov rbx, rax
sub rax, 0x60
lea rcx, [rcx - 0x60]
sub r8, 1
jne 0x14005926a
mov qword [rdx + 0x10], rbx
mov rbx, qword [rdx + 0x10]
cmp rbx, r14
jb 0x1400592ae
cmp rbx, rsi
ja 0x1400592ae
mov rcx, qword [rbx + 0x48]
mov qword [rdx + 0x10], rcx
mov edx, 0xcc
mov rcx, rbx
lea r8d, [rdx - 0x6c]
call sub.VCRUNTIME140.dll_memset
mov rax, rbx
jmp 0x1400592b0
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop r13
ret
Function at 0x140059508
Capabilities:
Parse pe header

Disassembly:
push rbx
sub rsp, 0x50
mov rbx, rdx
mov r8d, 0x30
lea rdx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
nop
mov eax, 0x5a4d
mov rcx, qword [rsp + 0x28]
cmp word [rcx], ax
je 0x140059536
xor al, al
jmp 0x140059574
movsxd rdx, dword [rcx + 0x3c]
cmp dword [rdx + rcx], 0x4550
je 0x140059547
xor al, al
jmp 0x140059574
mov r8d, dword [rdx + rcx + 0xe8]
lea rax, [r8 + rcx]
cmp rbx, rax
jb 0x14005956e
mov eax, dword [rdx + rcx + 0xec]
add rax, r8
add rax, rcx
cmp rbx, rax
jae 0x14005956e
mov al, 1
jmp 0x140059574
xor al, al
jmp 0x140059574
add rsp, 0x50
pop rbx
ret
Function at 0x140059a0c
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
sub rsp, 0x20
mov rbp, rdx
mov rsi, rcx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x140091058], eax
je 0x140059a36
mov eax, 0x10dd
jmp 0x140059b45
mov eax, dword [0x14009105c]
test eax, eax
jne 0x140059b45
test rbp, rbp
jne 0x140059a51
lea eax, [rbp + 0x57]
jmp 0x140059b45
test rsi, rsi
jne 0x140059a5e
lea eax, [rsi + 6]
jmp 0x140059b45
cmp qword [rsi], 0
jne 0x140059a74
mov eax, 6
mov dword [0x14009105c], eax
jmp 0x140059b3e
mov ecx, 0x30
call fcn.1400520fc
mov rdi, rax
test rax, rax
jne 0x140059a8e
lea ebx, [rax + 8]
jmp 0x140059b24
mov rcx, qword [rsi]
xor edx, edx
call fcn.1400595d8
xor edx, edx
mov rcx, rbp
mov rbx, rax
call fcn.1400595d8
movzx edx, byte [rbx + 0x3e]
mov rbp, qword [rbx + 0x48]
sub rbp, rdx
test dl, dl
je 0x140059b16
cmp rdx, 0x1e
ja 0x140059b16
cmp qword [rbx + 0x50], rax
jne 0x140059b16
and dword [rsp + 0x50], 0
lea r9, [rsp + 0x50]
mov r8d, 0x40
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140059ae7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x140059b24
mov dword [rdi + 8], 1
mov qword [rdi + 0x10], rsi
mov qword [rdi + 0x20], rbx
mov qword [rdi + 0x18], rbp
mov eax, dword [rsp + 0x50]
mov dword [rdi + 0x28], eax
mov rax, qword [0x140091070]
mov qword [rdi], rax
xor eax, eax
mov qword [0x140091070], rdi
jmp 0x140059b45
cmp dword [0x140091050], 0
mov ebx, 9
jne 0x140059b2f
mov dword [0x14009105c], ebx
test rdi, rdi
je 0x140059b3c
mov edx, 0x30
mov rcx, rdi
call fcn.140052590
mov eax, ebx
mov qword [0x140091060], rsi
mov rbx, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
pop rsi
pop rbp
ret

Function at 0x140059b54
Capabilities:
Resume thread

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x140091058], eax
je 0x140059b7b
mov eax, 0x10dd
jmp 0x140059c3e
mov rdi, qword [0x140091070]
test rdi, rdi
je 0x140059bf2
mov rax, qword [rdi + 0x20]
lea r9, [rsp + 0x30]
mov r8d, dword [rdi + 0x28]
mov rcx, qword [rdi + 0x18]
movzx edx, byte [rax + 0x3e]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [rdi + 8], 0
jne 0x140059bda
mov rsi, qword [rdi + 0x20]
test rsi, rsi
je 0x140059bda
xor edx, edx
mov rbx, rsi
mov rcx, rsi
and rbx, 0xffffffffffff0000
lea r8d, [rdx + 0x60]
call sub.VCRUNTIME140.dll_memset
mov rax, qword [rbx + 0x10]
mov qword [rsi + 0x48], rax
mov qword [rbx + 0x10], rsi
and qword [rdi + 0x20], 0
mov rbx, qword [rdi]
mov edx, 0x30
mov rcx, rdi
call fcn.140052590
mov rdi, rbx
test rbx, rbx
jne 0x140059b87
and qword [0x140091070], 0
call fcn.14005957c
mov rdi, qword [0x140091068]
test rdi, rdi
je 0x140059c2d
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rbx, qword [rdi]
mov edx, reloc.OLEAUT32.dll_SafeArrayGetDim
mov rcx, rdi
call fcn.140052590
mov rdi, rbx
test rbx, rbx
jne 0x140059c0b
and qword [0x140091068], 0
and dword [0x140091058], 0
xor eax, eax
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140059c50
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x20
xor ebx, ebx
cmp dword [0x140091058], ebx
jne 0x140059cd0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, eax
xor eax, eax
lock cmpxchg dword [0x140091058], ecx
jne 0x140059cd0
mov rdi, qword [0x140091040]
mov qword [0x140091070], rbx
mov qword [0x140091068], rbx
mov qword [0x140091060], rbx
jmp 0x140059cb7
lea r9, [rsp + 0x30]
mov edx, 0x10000
mov r8d, 0x40
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x140059cbe
mov rdi, qword [rdi + 8]
test rdi, rdi
jne 0x140059c96
jmp 0x140059cc6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov dword [0x14009105c], ebx
mov eax, ebx
jmp 0x140059cd5
mov eax, 0x10dd
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
Function at 0x14005a0c8
Capabilities:
Suspend thread

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov eax, dword [0x14009105c]
mov rdi, rcx
test eax, eax
jne 0x14005a147
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
cmp rdi, rax
jne 0x14005a0ee
xor eax, eax
jmp 0x14005a147
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
call fcn.1400520fc
mov rbx, rax
test rax, rax
je 0x14005a134
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x14005a11d
mov edx, reloc.OLEAUT32.dll_SafeArrayGetDim
mov rcx, rbx
call fcn.140052590
jmp 0x14005a0ea
mov rax, qword [0x140091068]
mov qword [rbx], rax
mov qword [rbx + 8], rdi
mov qword [0x140091068], rbx
jmp 0x14005a0ea
and qword [0x140091060], 0
mov eax, 8
mov dword [0x14009105c], eax
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x14005a804
Capabilities:
Link many functions at runtime

Disassembly:
push rbx
sub rsp, 0x20
lea rdx, str.InitPerf
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.InitPerf2
mov rcx, rbx
mov qword [0x140091078], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.PerfCodeMarker
mov rcx, rbx
mov qword [0x140091080], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.UnInitPerf
mov rcx, rbx
mov qword [0x140091090], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.BeginLogging
mov rcx, rbx
mov qword [0x140091088], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.WriteLog
mov rcx, rbx
mov qword [0x140091098], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.SetPerformanceRegRoot
mov rcx, rbx
mov qword [0x1400910a0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1400910a8], rax
mov qword [0x1400910b0], rbx
mov byte [0x1400910b8], 1
add rsp, 0x20
pop rbx
ret

Function at 0x14005a9a0
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
sub rsp, 0x30
xor ebp, ebp
mov dil, dl
mov rbx, rcx
test rcx, rcx
jne 0x14005a9c0
xor al, al
jmp 0x14005aa59
lea r8, [rsp + 0x68]
mov qword [rsp + 0x68], rbp
mov rdx, rbx
mov rcx, 0xffffffff80000002
call fcn.14005aa68
test eax, eax
jne 0x14005aa56
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x14005aa56
lea rax, [rsp + 0x50]
mov dword [rsp + 0x50], ebp
mov qword [rsp + 0x28], rax
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rbp
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x68]
mov esi, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x14005aa21
cmp esi, 0xea
jne 0x14005aa56
cmp dword [rsp + 0x50], ebp
je 0x14005aa56
mov r8, qword [str.Disable]
lea r9, [rsp + 0x60]
mov rdx, rbx
mov dword [rsp + 0x60], ebp
mov rcx, 0xffffffff80000002
call fcn.14005aaf4
mov ecx, dword [rsp + 0x60]
test eax, eax
cmovne ecx, ebp
test ecx, ecx
sete al
jmp 0x14005aa59
mov al, dil
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret
Function at 0x14005aaf4
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
and qword [rsp + 0x38], 0
mov rdi, r8
lea r8, [rsp + 0x38]
mov rbx, r9
call fcn.14005aa68
test eax, eax
jne 0x14005ab70
mov rcx, qword [rsp + 0x38]
test rcx, rcx
jne 0x14005ab27
lea eax, [rcx + 2]
jmp 0x14005ab70
and dword [rsp + 0x30], 0
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x30]
xor r8d, r8d
mov qword [rsp + 0x20], rbx
mov rdx, rdi
mov dword [rsp + 0x34], 4
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x38]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [rsp + 0x30], 4
mov eax, SafeArrayGetDim
cmovne ebx, eax
mov eax, ebx
mov rbx, qword [rsp + 0x50]
add rsp, 0x40
pop rdi
ret
Function at 0x14005ab7c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
test rdx, rdx
je 0x14005add5
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x990]
sub rsp, 0xa90
mov rax, qword [0x140090008]
xor rax, rsp
mov qword [rbp + 0x980], rax
xor r15d, r15d
mov esi, r9d
cmp qword [0x1400910b0], r15
mov rdi, rdx
mov r14d, ecx
jne 0x14005adb0
mov dl, r8b
mov rcx, rdi
call fcn.14005a9a0
test al, al
je 0x14005ac28
mov rdx, qword [str.Microsoft.Internal.Performance.CodeMarkers.dll]
lea rax, [rsp + 0x60]
sub rdx, rax
lea rcx, [rsp + 0x60]
mov ebx, 0x104
lea rax, [rbx + 0x7ffffefa]
test rax, rax
je 0x14005ac14
movzx eax, word [rdx + rcx]
test ax, ax
je 0x14005ac14
mov word [rcx], ax
add rcx, 2
sub rbx, 1
jne 0x14005abf2
test rbx, rbx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r15w
jmp 0x14005acea
cmp byte [rbp + 0x9e0], r15b
je 0x14005adb0
mov ebx, 0x104
lea rdx, [rbp + 0x370]
mov r8d, ebx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
js 0x14005adb0
lea ecx, [rbx - 4]
mov r8d, 3
mov qword [rsp + 0x40], rcx
lea rax, [rbp + 0x580]
mov qword [rsp + 0x38], rax
lea r9, [rbp + 0x170]
mov qword [rsp + 0x30], rcx
lea rax, [rbp + 0x780]
mov qword [rsp + 0x28], rax
lea rdx, [rsp + 0x54]
mov qword [rsp + 0x20], rcx
lea rcx, [rbp + 0x370]
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__wsplitpath_s
test eax, eax
jne 0x14005adb0
lea rax, str..dll
mov edx, ebx
mov qword [rsp + 0x28], rax
lea r9, [rbp + 0x170]
mov rax, qword [str.Microsoft.VisualStudio.CodeMarkers]
lea r8, [rsp + 0x54]
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x20], rax
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__wmakepath_s
test eax, eax
jne 0x14005adb0
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14005adb0
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
test rax, rax
je 0x14005adb0
mov rcx, rax
call fcn.14005a804
mov rax, qword [0x1400910a8]
test rax, rax
je 0x14005ad1d
mov rcx, rdi
call rax
cmp qword [0x140091090], r15
je 0x14005ad72
cmp qword [0x140091088], r15
je 0x14005ad72
cmp qword [0x140091080], r15
je 0x14005ad53
mov rcx, qword [str.VSCodeMarkersEnabled]
call qword [sym.imp.KERNEL32.dll_AddAtomW]
mov rdx, rdi
mov ecx, r14d
call qword [0x140091080]
jmp 0x14005ad72
cmp qword [0x140091078], r15
je 0x14005ad72
mov rcx, qword [str.VSCodeMarkersEnabled]
call qword [sym.imp.KERNEL32.dll_AddAtomW]
mov ecx, r14d
call qword [0x140091078]
lea r9, [rsp + 0x50]
mov dword [rsp + 0x50], r15d
lea r8, str.AutoStartupLoggingEndMarker
mov rdx, rdi
mov rcx, 0xffffffff80000002
call fcn.14005aaf4
mov edx, dword [rsp + 0x50]
test eax, eax
cmovne edx, r15d
test edx, edx
mov dword [rsp + 0x50], edx
cmovne esi, edx
test esi, esi
je 0x14005adb0
mov ecx, esi
call fcn.14005a924
mov rcx, qword [rbp + 0x980]
xor rcx, rsp
call fcn.140052570
mov rbx, qword [rsp + 0xad0]
add rsp, 0xa90
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x14005af68
Capabilities:
Get file size
Read file via mapping

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rdx
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
mov r13, rdx
xor edi, edi
mov r14d, edi
mov ebx, 0x80030002
mov dword [rax - 0x68], ebx
mov qword [rax - 0x50], rdi
mov qword [rax - 0x78], rdi
mov dword [rax - 0x80], 0x8000000
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rdi + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x60], rax
cmp rax, 0xffffffffffffffff
jne 0x14005afd0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
jmp 0x14005b2c6
xor edx, edx
mov rsi, rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r12d, eax
mov dword [rsp + 0x44], eax
test eax, eax
je 0x14005b2a9
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], edi
xor r9d, r9d
xor edx, edx
lea r8d, [r9 + 2]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov r15, rax
mov qword [rsp + 0x68], rax
test rax, rax
je 0x14005b29e
mov qword [rsp + 0x20], rdi
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 4]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rsi, rax
mov qword [rsp + 0x50], rax
test rax, rax
je 0x14005b28a
mov dword [rsp + 0xc0], edi
mov dword [rsp + 0xc8], edi
lea r8, [rsp + 0xc0]
mov rdx, rax
mov ecx, r12d
call fcn.14005af00
mov dword [rsp + 0x40], eax
lea r9, [rsp + 0xc8]
mov r8, rsi
mov edx, r12d
mov ecx, dword [rsp + 0xc0]
call fcn.14005b520
mov ebx, eax
mov dword [rsp + 0x40], eax
test eax, eax
js 0x14005b0eb
mov ebx, dword [rsp + 0xc8]
mov edx, ebx
xor ecx, ecx
call qword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov rsi, rax
mov qword [rsp + 0x58], rax
test rax, rax
je 0x14005b0e2
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ebx
mov r9, qword [rsp + 0x50]
mov r8d, r12d
xor edx, edx
mov ecx, dword [rsp + 0xc0]
call fcn.14005b2f8
mov ebx, eax
mov dword [rsp + 0x40], eax
test eax, eax
jns 0x14005b0eb
mov rcx, rsi
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rsp + 0x58], rdi
jmp 0x14005b0eb
mov ebx, 0x8007000e
mov dword [rsp + 0x40], ebx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x14005b293
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14005b2bb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
jmp 0x14005b2bb
lea rcx, [0x1400706b8]
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [rsp + 0x58], rax
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r14d, r14d
je 0x14005b2dc
movzx ebx, r14w
or ebx, 0x80070000
test r14d, r14d
cmovle ebx, r14d
mov rax, qword [rsp + 0x58]
mov qword [r13], rax
mov eax, ebx
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
Function at 0x14005bac8
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x30
mov r14, r8
mov rdi, rdx
mov rbp, rcx
test r8, r8
jne 0x14005baf0
mov eax, 0x80004003
jmp 0x14005bbbf
test rdi, rdi
je 0x14005bbba
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov r15, rax
test rax, rax
je 0x14005bbba
and qword [rsp + 0x78], 0
lea r8, [rsp + 0x78]
mov edx, 1
xor ecx, ecx
call qword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
mov ebx, eax
test eax, eax
js 0x14005bba6
and dword [rsp + 0x70], 0
mov rbx, qword [rsp + 0x78]
mov rsi, qword [rbx]
mov rdx, rdi
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rdx, rax
lea r9, [rsp + 0x70]
mov r8d, edi
mov rcx, rbx
call qword [rsi + 0x20]
mov ebx, eax
test eax, eax
js 0x14005bba6
and dword [rsp + 0x20], 0
and dword [rsp + 0x24], 0
mov rcx, qword [rsp + 0x78]
mov rax, qword [rcx]
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsp + 0x20]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayAllocDescriptorEx]
mov ebx, eax
test eax, eax
js 0x14005bba6
mov rcx, qword [rsp + 0x78]
mov qword [r14], rcx
test rcx, rcx
je 0x14005bba2
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rsp + 0x78]
xor ebx, ebx
jmp 0x14005bbab
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x14005bbb6
mov rdx, qword [rcx]
call qword [rdx + reloc.OLEAUT32.dll_SafeArrayGetDim]
mov eax, ebx
jmp 0x14005bbbf
mov eax, 0x80070057
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret

Function at 0x14005bd78
Capabilities:
Check if file exists

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rbx, rdx
mov rsi, rcx
test rdx, rdx
jne 0x14005bd99
mov eax, 0x80070057
jmp 0x14005bdfc
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x14005bdad
mov eax, 0x80070002
jmp 0x14005bdfc
mov ecx, DispGetParam
call sub.gdiplus.dll_GdipAlloc
mov rdi, rax
test rax, rax
je 0x14005bdf7
and qword [rsp + 0x38], 0
lea rax, [0x140069e30]
lea rdx, [rsp + 0x38]
mov qword [rdi], rax
mov rcx, rbx
call sub.gdiplus.dll_GdipCreateBitmapFromFile
mov rcx, qword [rsp + 0x38]
mov qword [rdi + 8], rcx
mov rcx, rsi
mov dword [rdi + 0x10], eax
call fcn.140035e08
xor eax, eax
mov qword [rsi], rdi
jmp 0x14005bdfc
mov eax, 0x80004005
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14005ca94
Capabilities:
Query or enumerate registry value

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x18], rsi
mov qword [r11 + 0x20], rdi
push rbp
lea rbp, [r11 - 0x5f]
sub rsp, 0x90
mov rax, qword [0x140090008]
xor rax, rsp
mov qword [rbp + 0x4f], rax
and qword [rbp + 7], 0
lea rax, [rbp + 7]
mov ebx, r8d
mov qword [r11 - 0x78], rax
mov esi, edx
xor r8d, r8d
lea rdx, str.SoftwareMicrosoftVisualStudio17.0General
mov r9d, 0x20019
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14005cb5f
mov rdi, qword [rbp + 7]
lea rdx, str.ImageScaling_d
mov r8d, esi
lea rcx, [rbp + 0xf]
call fcn.14005c17c
and dword [rbp - 9], 0
lea rax, [rbp - 5]
mov qword [rsp + 0x28], rax
lea r9, [rbp - 1]
lea rax, [rbp - 9]
mov dword [rbp - 5], 4
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [rbp + 0xf]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14005cb51
cmp dword [rbp - 1], 4
jne 0x14005cb51
mov r8d, dword [rbp - 9]
lea edx, [r8 - 1]
cmp edx, 6
cmovbe ebx, r8d
test rdi, rdi
je 0x14005cb5f
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov rcx, qword [rbp + 0x4f]
xor rcx, rsp
call fcn.140052570
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret

Function at 0x14005d28c
Capabilities:
Enumerate pe sections

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
movsxd r8, dword [0x14000003c]
lea rsi, [0x140000000]
add r8, rsi
mov rbx, rdx
mov rdi, rcx
cmp dword [r8 + 0x84], 0xd
jbe 0x14005d304
mov r10d, dword [r8 + 0xf0]
xor r9d, r9d
test r10d, r10d
je 0x14005d304
movzx ecx, word [r8 + 0x14]
movzx r11d, word [r8 + 6]
add rcx, 0x18
mov r10d, dword [r10 + rsi + 0xc]
add rcx, r8
test r11d, r11d
je 0x14005d304
mov eax, dword [rcx + 0xc]
cmp r10d, eax
jb 0x14005d2f8
mov edx, dword [rcx + 8]
add eax, edx
cmp r10d, eax
jb 0x14005d316
inc r9d
add rcx, 0x28
cmp r9d, r11d
jb 0x14005d2e6
xor eax, eax
mov rbx, qword [rsp + 8]
mov rsi, qword [rsp + 0x10]
mov rdi, qword [rsp + 0x18]
ret
mov dword [rdi], edx
mov eax, dword [rcx + 0x24]
mov dword [rbx], eax
mov eax, dword [rcx + 0xc]
add rax, rsi
jmp 0x14005d306
Function at 0x14005d938
Capabilities:
Get file attributes

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 rbx, r8
movsxd rbp, edx
mov r8, rcx
mov rdx, rbp
mov rcx, rbx
call sub.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s
or rdi, 0xffffffffffffffff
mov rax, rdi
xor esi, esi
inc rax
cmp word [rbx + rax*2], si
jne 0x14005d96e
mov r14d, 0x5c
cmp word [rbx + rax*2 - 2], r14w
je 0x14005d997
lea r8, [0x140073508]
mov rdx, rbp
mov rcx, rbx
call sub.api_ms_win_crt_string_l1_1_0.dll_wcscat_s
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or ebp, 0xffffffff
cmp eax, ebp
jne 0x14005d9ed
inc rdi
cmp word [rbx + rdi*2], si
jne 0x14005d9a7
movsxd rcx, edi
mov edx, 0xffdf
movzx eax, word [rbx + rcx*2 - 4]
sub ax, 0x53
test dx, ax
jne 0x14005d9e9
mov word [rbx + rcx*2 - 4], r14w
lea ecx, [rdi - 1]
movsxd rdx, ecx
mov rcx, rbx
mov word [rbx + rdx*2], si
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, ebp
setne sil
mov eax, esi
jmp 0x14005d9f2
xor eax, eax
jmp 0x14005d9f2
mov eax, 1
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