joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10042b260
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x10], rbx
mov dword [rsp + 0x18], r8d
push rdi
sub rsp, 0x20
xor edi, edi
mov dword [rsp + 0x40], 0x20a
mov dword [rsp + 0x30], 0x20a
mov rbx, rdx
test ecx, ecx
je 0x10042b458
sub ecx, 1
je 0x10042b400
sub ecx, 1
je 0x10042b3d4
sub ecx, 1
je 0x10042b39f
cmp ecx, 1
jne 0x10042b483
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.instapi150.dll_GetSQLToolsDirPath]
cmp eax, 1
jne 0x10042b483
mov edx, dword [rsp + 0x40]
mov rax, 0xffffffffffffffff
cmp word [rbx + rax*2 + 2], di
lea rax, [rax + 1]
jne 0x10042b2d2
lea rax, [rax*2 + 0x2e]
cmp rax, rdx
ja 0x10042b483
lea r8, str.Binn
mov rcx, rbx
call fcn.10042b640
mov r9d, dword [rsp + 0x40]
mov eax, 0x80070057
shr r9, 1
cmovne eax, edi
test r9, r9
je 0x10042b33c
mov rcx, r9
mov rax, rbx
cmp word [rax], di
je 0x10042b327
add rax, 2
sub rcx, 1
jne 0x10042b318
test rcx, rcx
mov eax, 0x80070057
cmovne eax, edi
je 0x10042b33c
mov r8, r9
sub r8, rcx
jmp 0x10042b33f
mov r8, rdi
test eax, eax
js 0x10042b480
mov rdx, r9
lea rcx, [rbx + r8*2]
sub rdx, r8
je 0x10042b38f
add r8, 0x7ffffffe
mov rax, rdx
sub rax, r9
lea r9, str.ManagementStudio
add r8, rax
sub r9, rcx
nop dword [rax]
test r8, r8
je 0x10042b38f
movzx eax, word [r9 + rcx]
test ax, ax
je 0x10042b38f
mov word [rcx], ax
dec r8
add rcx, 2
sub rdx, 1
jne 0x10042b370
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
jmp 0x10042b47d
mov edx, 0x105
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x10042b483
mov ecx, dword [rsp + 0x40]
shr ecx, 1
cmp eax, ecx
jae 0x10042b483
mov rdi, rbx
mov rax, rbx
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
lea r9, [rsp + 0x40]
mov r8, rbx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.instapi150.dll_GetSvcBinPathByInstName]
cmp eax, 1
jne 0x10042b483
mov rdi, rbx
mov rax, rbx
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.instapi150.dll_GetSQLToolsDirPath]
cmp eax, 1
jne 0x10042b483
mov edx, dword [rsp + 0x40]
mov rax, 0xffffffffffffffff
nop
cmp word [rbx + rax*2 + 2], di
lea rax, [rax + 1]
jne 0x10042b420
lea rax, [rax*2 + 0xc]
cmp rax, rdx
ja 0x10042b483
lea r8, str.Binn
mov rcx, rbx
call fcn.10042b640
mov rax, rbx
mov rdi, rbx
mov rbx, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
xor ecx, ecx
mov r8d, 0x105
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x10042b483
mov edx, 0x5c
mov rcx, rbx
call qword [sym.imp.VCRUNTIME140.dll_wcsrchr]
test rax, rax
je 0x10042b483
mov word [rax], di
mov rdi, rbx
mov rbx, qword [rsp + 0x38]
mov rax, rdi
add rsp, 0x20
pop rdi
ret
Function at 0x100430260
Capabilities:
Encrypt data using dpapi

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov dword [rax + 0x18], r8d
mov qword [rax + 8], rcx
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x80
mov r14, rdx
mov r15, rcx
xor r12d, r12d
mov ebx, r12d
mov dword [rax - 0x68], ebx
mov esi, r12d
mov qword [rax - 0x60], r12
mov dword [rax + 0x18], r12d
mov dword [rax - 0x40], r12d
mov qword [rax - 0x38], r12
mov dword [rax - 0x50], r12d
mov qword [rax - 0x48], r12
lea r9, [rax + 0x18]
xor r8d, r8d
xor edx, edx
call fcn.10044bc90
test eax, eax
jns 0x1004302c6
mov ecx, eax
call fcn.10044bcd0
jmp 0x100430371
mov ecx, dword [rsp + 0xc0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
mov qword [rsp + 0x48], rax
test rax, rax
je 0x10043036b
lea r9, [rsp + 0xc0]
mov r8d, dword [rsp + 0xc0]
mov rdx, rax
call fcn.10044bc90
test eax, eax
jns 0x100430309
mov ecx, eax
call fcn.10044bcd0
jmp 0x100430371
mov qword [rsp + 0x70], rsi
mov eax, dword [rsp + 0xc0]
mov dword [rsp + 0x68], eax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x68]
call qword [sym.imp.CRYPT32.dll_CryptProtectData]
mov ebx, eax
mov dword [rsp + 0x40], eax
test eax, eax
je 0x10043036b
mov eax, dword [rsp + 0x58]
lea ecx, [rax*2 + 1]
add rcx, rcx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
mov qword [rsp + 0x50], rax
test rax, rax
jne 0x100430383
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
mov r8d, 0xfa
mov rdx, r14
call fcn.10044bfe0
jmp 0x1004303f0
mov eax, dword [rsp + 0x58]
lea eax, [rax*2 + 1]
mov r8d, eax
add r8, r8
xor edx, edx
mov rcx, rdi
call sub.VCRUNTIME140.dll_memset
mov qword [r15], rdi
mov ebx, r12d
mov dword [rsp + 0x44], ebx
mov edx, dword [rsp + 0x58]
cmp ebx, edx
jae 0x1004303e3
mov ecx, ebx
mov rax, qword [rsp + 0x60]
movzx r9d, byte [rcx + rax]
sub edx, ebx
lea eax, [rdx*2 + 1]
mov edx, eax
lea r8, str._02X
mov rcx, rdi
call fcn.10040b460
inc ebx
add rdi, 4
mov qword [rsp + 0x50], rdi
jmp 0x1004303a4
mov word [rdi], r12w
mov ebx, 1
mov dword [rsp + 0x40], ebx
test rsi, rsi
je 0x1004303fe
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x100430413
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rsp + 0x60], r12
test ebx, ebx
jne 0x100430428
mov rcx, qword [r15]
test rcx, rcx
je 0x100430428
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [r15], r12
mov eax, ebx
mov rbx, qword [rsp + 0xb8]
add rsp, 0x80
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
Function at 0x100433710
Capabilities:
Manipulate console buffer

Disassembly:
sub rsp, 0x458
mov rax, qword [0x100499010]
xor rax, rsp
mov qword [rsp + 0x440], rax
xor edx, edx
mov dword [rsp + 0x20], 0
mov r8d, 0x400
lea rcx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memset
cmp dword [0x1004a92b4], 1
jne 0x1004337b7
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp rax, 0xffffffffffffffff
je 0x1004337ad
xor ecx, ecx
lea r9, [rsp + 0x20]
mov qword [rsp + 0x28], rcx
lea rdx, [rsp + 0x28]
mov qword [rsp + 0x30], rcx
mov r8d, 1
mov dword [rsp + 0x38], ecx
mov rcx, rax
mov word [rsp + 0x28], r8w
mov byte [rsp + 0x36], 0x58
call qword [sym.imp.KERNEL32.dll_WriteConsoleInputW]
test eax, eax
jne 0x1004337ad
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x400
lea rdx, [rsp + 0x40]
mov ecx, eax
call fcn.10044bfe0
mov dword [0x1004a92b4], 0
mov rcx, qword [rsp + 0x440]
xor rcx, rsp
call fcn.100469360
add rsp, 0x458
ret
Function at 0x100434b60
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x440
mov rax, qword [0x100499010]
xor rax, rsp
mov qword [rsp + 0x430], rax
cmp dword [0x1004a9184], 0
je 0x100434d12
xor edx, edx
lea rcx, [rsp + 0x230]
mov r8d, 0x200
call sub.VCRUNTIME140.dll_memset
lea r8, str.SQLServerAgentXdbPrimaryActive
lea rcx, [rsp + 0x230]
call fcn.10043b5a0
lea rcx, [rsp + 0x230]
call fcn.100434a60
test eax, eax
je 0x100434c1d
xor edi, edi
lea r8, [0x100434d40]
mov qword [rsp + 0x28], rdi
xor r9d, r9d
xor edx, edx
mov dword [rsp + 0x20], edi
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov rbx, rax
test rax, rax
je 0x100434c06
lea edx, [rdi + 2]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov rcx, rbx
test eax, eax
jne 0x100434c24
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
lea r9, str.WaitAndShutdownWhenNonActiveReplica
mov r8d, 0x177
lea ecx, [rdx + 2]
call fcn.100432180
xor eax, eax
jmp 0x100434d17
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
lea rcx, [rsp + 0x30]
mov r8d, 0x200
call sub.VCRUNTIME140.dll_memset
call fcn.10044da70
mov edx, 0x100
lea rcx, [rsp + 0x30]
lea r9, str.Global_sqlserverRecComplete
cmp byte [rax + 0xc8], dil
je 0x100434c96
lea rax, [rsp + 0x30]
sub r9, rax
lea rax, [rdx + 0x7ffffefe]
test rax, rax
je 0x100434c86
movzx eax, word [r9 + rcx]
test ax, ax
je 0x100434c86
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x100434c63
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], di
jmp 0x100434cae
lea rax, str.MSSQLSERVER
lea r8, [0x10047a508]
mov qword [rsp + 0x20], rax
call fcn.10040b460
lea r8, [rsp + 0x30]
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenEventW]
mov rbx, rax
test rax, rax
je 0x100434cec
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x30]
call fcn.100434a60
test eax, eax
jne 0x100434cff
jmp 0x100434d17
xor r8d, r8d
lea rdx, str.Recovery_event_not_found.
lea ecx, [r8 + 4]
call fcn.100432180
xor r8d, r8d
lea rdx, str.Waiting_in_stand_by_has_completed
lea ecx, [r8 + 4]
call fcn.100432180
mov eax, 1
mov rcx, qword [rsp + 0x430]
xor rcx, rsp
call fcn.100469360
mov rbx, qword [rsp + 0x450]
add rsp, 0x440
pop rdi
ret
Function at 0x100437030
Capabilities:
Check if file exists

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x240
mov rax, qword [0x100499010]
xor rax, rsp
mov qword [rsp + 0x230], rax
movzx ebp, cl
xor r14d, r14d
lea rcx, [rsp + 0x30]
xor edx, edx
mov r8d, 0x200
mov edi, r14d
call sub.VCRUNTIME140.dll_memset
xor r9d, r9d
lea ecx, [r14 + 4]
xor r8d, r8d
mov sil, 1
call fcn.10044b960
call fcn.10044da70
mov edx, 0x100
lea rcx, [rsp + 0x30]
lea r9, str.Global_sqlserverRecComplete
cmp byte [rax + 0xc8], dil
je 0x1004370e7
lea rax, [rsp + 0x30]
sub r9, rax
lea rax, [rdx + 0x7ffffefe]
test rax, rax
je 0x1004370d6
movzx eax, word [r9 + rcx]
test ax, ax
je 0x1004370d6
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x1004370b3
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r14w
jmp 0x1004370ff
lea rax, str.MSSQLSERVER
lea r8, [0x10047a508]
mov qword [rsp + 0x20], rax
call fcn.10040b460
lea r8, [rsp + 0x30]
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenEventW]
mov rbx, rax
test rax, rax
jne 0x10043718c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp eax, 2
jne 0x10043718c
xor edx, edx
lea ecx, [rbx + 4]
mov r8d, 0x15e
mov edi, r14d
call fcn.100432180
lea r8, [rsp + 0x30]
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenEventW]
mov rbx, rax
test rax, rax
jne 0x10043718c
mov rcx, qword [0x1004a90e0]
mov edx, 0x1f4
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
movzx esi, sil
lea r8, [rsp + 0x30]
cmp eax, 0x102
mov ecx, 0x100000
cmovne esi, r14d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_OpenEventW]
mov rbx, rax
test rax, rax
je 0x100437153
xor r8d, r8d
lea r9, [rsp + 0x30]
lea rdx, str.Event__s_opened
lea ecx, [r8 + 4]
call fcn.100432180
test sil, sil
je 0x1004371fa
test bpl, bpl
je 0x1004371fa
test rbx, rbx
je 0x100437208
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1004371d2
xor edx, edx
mov r8d, 0x1f4
lea ecx, [rdx + 4]
call fcn.100432180
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1004371fa
mov rcx, qword [0x1004a90e0]
mov edx, 0x1f4
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x1004371d2
test rbx, rbx
je 0x100437208
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov rcx, qword [rsp + 0x230]
xor rcx, rsp
call fcn.100469360
lea r11, [rsp + 0x240]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret
Function at 0x10043a0a0
Capabilities:
Delete file

Disassembly:
mov r11, rsp
push rdi
sub rsp, 0xff0
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rsi
mov rax, qword [0x100499010]
xor rax, rsp
mov qword [rsp + 0xfe0], rax
mov rdi, rcx
movups xmm0, xmmword [str.FlushOperationCache]
movups xmmword [rsp + 0xeb0], xmm0
movups xmm1, xmmword [0x100479d50]
movups xmmword [rsp + 0xec0], xmm1
movsd xmm0, qword [0x100479d60]
movsd qword [rsp + 0xed0], xmm0
xor edx, edx
mov r8d, 0x100
lea rcx, [r11 - 0x118]
call sub.VCRUNTIME140.dll_memset
xor ebx, ebx
xor edx, edx
mov r8d, 0x250
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll_memset
mov r9d, 0x80
lea r8, [rsp + 0xee0]
lea edx, [rbx + 0x74]
mov rcx, qword [0x1004a90d8]
call qword [sym.imp.USER32.dll_LoadStringW]
lea rax, [0x100472884]
lea r9, [rsp + 0xee0]
test rdi, rdi
cmovne r9, rax
xor edx, edx
lea ecx, [rbx + 2]
lea r8d, [rbx + 0x73]
call fcn.100432180
xor r9d, r9d
lea r8, str.msdb
lea rdx, str.SQLAgent___SQL_Operation_Flush
lea rcx, [rsp + 0x2a0]
call fcn.10040f7b0
lea rax, [rsp + 0x20]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], 7
mov word [rsp + 0x20], bx
lea r8d, [rbx + 0xc]
lea rdx, str.LoginTimeout
lea rcx, [rsp + 0x20]
call fcn.10040da90
nop
call fcn.10044da70
mov rcx, rax
lea rdx, [rsp + 0x20]
call fcn.100409ee0
mov r9d, eax
lea r8, [rsp + 0xeb0]
xor edx, edx
lea rcx, [rsp + 0x2a0]
call fcn.10040fcc0
test eax, eax
je 0x10043a240
xor edx, edx
lea rcx, [rsp + 0x2a0]
call fcn.100412010
test rdi, rdi
je 0x10043a22d
cmp word [rdi], bx
je 0x10043a232
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x10043a232
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, 1
lea rcx, [rsp + 0x2a0]
call qword [sym.imp.SQLSVC.dll_QSQLLogoff]
mov eax, ebx
mov rcx, qword [rsp + 0xfe0]
xor rcx, rsp
call fcn.100469360
lea r11, [rsp + 0xff0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x10043b6b0
Capabilities:
Get hostname
Query or enumerate registry value
Read file via mapping

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x490
mov rax, qword [0x100499010]
xor rax, rsp
mov qword [rsp + 0x480], rax
call fcn.10044da70
xor edi, edi
lea rdx, str.MSSQLSERVER
lea rbx, [0x1004a9b30]
mov rcx, rbx
cmp byte [rax + 0xc8], dil
lea r9d, [rdi + 1]
cmovne rdx, rdi
xor r8d, r8d
call qword [sym.imp.SQLSVC.dll_CreateCrossServiceSA]
test eax, eax
je 0x10043b718
mov r9d, eax
lea ecx, [rdi + 1]
xor edx, edx
mov r8d, 0x19d
call fcn.100432180
jmp 0x10043b726
mov qword [0x1004a9b00], rbx
mov qword [0x10049bbd0], rbx
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x30], 0x80
lea rcx, [rsp + 0x380]
call qword [sym.imp.KERNEL32.dll_GetComputerNameW]
lea r8, [rsp + 0x40]
mov rdx, 0xffffffff80000002
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_RegConnectRegistryW]
test eax, eax
jne 0x10043b8da
lea rbx, [0x10049b9b0]
mov dword [rsp + 0x38], 0x105
mov r8, rbx
lea r9, [rsp + 0x38]
lea edx, [rax + 1]
lea rcx, str.MSSQLSERVER
call qword [sym.imp.instapi150.dll_GetSQLServiceByName]
test eax, eax
jne 0x10043b798
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x10043b8da
xor r9d, r9d
mov qword [rsp + 0x20], rbx
lea r8, str.SYSTEMCurrentControlSetServices_lsPerformance
mov edx, 0x105
lea rcx, [rsp + 0x170]
call fcn.10042b040
lea rax, [rsp + 0x48]
mov word [rsp + 0x378], di
mov r9d, 0x20019
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rsp + 0x170]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10043b788
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x54]
xor r8d, r8d
mov qword [rsp + 0x20], rdi
lea rdx, str.First_Counter
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x48]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x10043b8da
lea rcx, [0x1004adcf8]
call fcn.10042b850
test eax, eax
jne 0x10043b8da
lea rax, [0x10049b7a0]
mov edx, 0x105
lea r9, str.GlobalSQLAgentCounters
mov qword [rsp + 0x20], rax
lea r8, str._ls__ls
lea rcx, [rsp + 0x60]
call fcn.10043c180
mov rdx, qword [0x1004a9b00]
lea rax, [rsp + 0x60]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea r8d, [rbx + 4]
mov dword [rsp + 0x20], 4
lea rcx, [r9 - 1]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov rbx, rax
test rax, rax
je 0x10043b8da
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x10043b8be
mov rcx, rbx
call fcn.10042e920
test eax, eax
jne 0x10043b8da
xor r9d, r9d
mov qword [rsp + 0x20], 4
xor r8d, r8d
mov rcx, rbx
lea edx, [r9 + 2]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rcx, qword [rsp + 0x480]
xor rcx, rsp
call fcn.100469360
mov rbx, qword [rsp + 0x4a0]
add rsp, 0x490
pop rdi
ret
Function at 0x1004498c0
Capabilities:
Read file via mapping

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x250
mov rax, qword [0x100499010]
xor rax, rsp
mov qword [rsp + 0x240], rax
xor edx, edx
lea rcx, [rsp + 0x40]
mov r8d, 0x200
xor ebx, ebx
call sub.VCRUNTIME140.dll_memset
xor eax, eax
lea rdi, str.MSSQLSERVER
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rax
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp word [rdi + rax*2], bx
jne 0x100449910
add eax, 0x22
cmp eax, 0x100
jle 0x100449958
xor r8d, r8d
lea r9, str.SQLServerAgent
lea rdx, str.Internal_Error:_Buffer_overrun_in_MakeInstanceSafeName______s_shutting_down...
lea ecx, [r8 + 1]
call fcn.100432180
mov rcx, qword [0x1004a90e0]
test rcx, rcx
je 0x100449a1a
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x100449a1a
lea r8, str.SQLServerAgentJobListJobIDMemory
mov word [rsp + 0x40], bx
lea rax, [rsp + 0x40]
mov edx, 0x100
sub r8, rax
lea rcx, [rsp + 0x40]
nop word [rax + rax]
lea rax, [rdx + 0x7ffffefe]
test rax, rax
je 0x1004499a3
movzx eax, word [r8 + rcx]
test ax, ax
je 0x1004499a3
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x100449980
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], bx
call fcn.10044da70
cmp byte [rax + 0xc8], bl
jne 0x1004499e6
lea r8, [0x1004777a0]
mov edx, 0x100
lea rcx, [rsp + 0x40]
call fcn.10040d600
mov r8, rdi
lea rcx, [rsp + 0x40]
mov edx, 0x100
call fcn.10040d600
cmp dword [0x1004a9184], ebx
je 0x100449a1a
lea r8, [0x10047773c]
mov edx, 0x100
lea rcx, [rsp + 0x40]
call fcn.10040d600
lea r8, [0x1004a9cf0]
mov edx, 0x100
lea rcx, [rsp + 0x40]
call fcn.10040d600
xor edx, edx
lea r8, [rsp + 0x40]
lea ecx, [rdx + 4]
call qword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov rdi, rax
test rax, rax
je 0x100449a71
xor r9d, r9d
mov qword [rsp + 0x20], rbx
xor r8d, r8d
mov rcx, rax
lea edx, [r9 + 4]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rbx, rax
test rax, rax
je 0x100449a68
movups xmm0, xmmword [rax]
mov rcx, rax
movups xmmword [rsp + 0x30], xmm0
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
lea rbx, [rsp + 0x30]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdx, rbx
call fcn.100449ad0
test al, al
jne 0x100449a94
xor edx, edx
lea r9, str.xp_sqlagent_enum_jobs
mov r8d, 0x93
lea ecx, [rdx + 1]
call fcn.100432180
mov rcx, qword [0x1004a90f8]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.100469360
mov rbx, qword [rsp + 0x260]
add rsp, 0x250
pop rdi
ret
Function at 0x10044bb80
Capabilities:
Generate random numbers via winapi

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x50
mov rsi, rdx
mov r14, qword [0x10049b770]
xor ebx, ebx
mov qword [rsp + 0x48], rbx
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x10047ee38]
mov rcx, r14
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
mov edi, eax
mov dword [rsp + 0x40], eax
test eax, eax
jns 0x10044bbcf
lea r8, [0x10047ee40]
jmp 0x10044bc48
mov ecx, 0x20
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
mov qword [rsp + 0x48], rax
test rax, rax
jne 0x10044bbf0
lea r8, [0x1004756d8]
jmp 0x10044bc48
mov r9d, 2
lea r8d, [r9 + 0x1e]
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.bcrypt.dll_BCryptGenRandom]
mov edi, eax
mov dword [rsp + 0x40], eax
test eax, eax
js 0x10044bc41
lea rdx, [r14 + 8]
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x20
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [r14]
call qword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
mov edi, eax
mov dword [rsp + 0x40], eax
test eax, eax
jns 0x10044bc56
lea r8, [0x10047ee78]
mov edx, 0x80
mov rcx, rsi
call fcn.10040d530
nop
test rbx, rbx
je 0x10044bc64
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, edi
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x70]
add rsp, 0x50
pop r14
ret
Function at 0x1004540c0
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
sub rsp, 0x30
mov r14, rcx
mov rbx, 0xffffffffffffffff
mov r15d, 0x80
nop dword [rax + rax]
inc rbx
cmp word [rcx + rbx*2], 0
jne 0x1004540f0
lea esi, [rbx + 0x80]
mov edi, esi
add rdi, rdi
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
je 0x1004541d7
mov qword [rsp + 0x50], r12
lea r12, str._dp_
mov dword [rsp + 0x28], 5
mov r9d, ebx
mov r8, r14
mov qword [rsp + 0x20], r12
mov edx, 1
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_CompareStringW]
cmp eax, 2
jne 0x100454178
mov edi, dword [0x1004add54]
cmp edi, esi
ja 0x10045418b
lea r8d, [rdi + rdi]
mov rcx, rbp
lea rdx, [0x1004ae390]
call sub.VCRUNTIME140.dll_memcpy
jmp 0x100454189
mov r8d, esi
mov rdx, rbp
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
cmp edi, esi
jle 0x1004541cf
add r15d, r15d
lea esi, [rbx + r15]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbp
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, esi
add rdi, rdi
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbp, rax
test rax, rax
jne 0x100454131
jmp 0x1004541d2
mov rax, rbp
mov r12, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop rdi
ret