joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4409b0
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x46e078
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push esi
mov esi, ecx
lea eax, [esp + 0xc]
mov ecx, dword [esi + 0x1c]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetClientRect]
push 0
lea ecx, [esp + 0x20]
call fcn.00466c50
mov eax, dword [esi + 0xd0]
lea edx, [esp + 0x1c]
push eax
push eax
push edx
mov dword [esp + 0x44], 0
call fcn.00440350
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x48]
add eax, 0x64
add esp, 0xc
add ecx, 0x64
mov dword [esp + 8], eax
lea eax, [esp + 4]
mov dword [esp + 4], ecx
push eax
lea ecx, [esp + 0x20]
call fcn.00466b7e
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0xc]
sub ecx, eax
add ecx, edx
mov eax, 0x88888889
imul ecx
add edx, ecx
push 1
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
lea eax, [edx + ecx + 1]
xor edx, edx
test eax, eax
setl dl
dec edx
mov ecx, esi
and eax, edx
push eax
push 0
push 0
call fcn.00463442
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 8]
sub ecx, eax
add ecx, edx
mov eax, 0x88888889
imul ecx
add edx, ecx
xor ecx, ecx
sar edx, 4
mov eax, edx
push 1
shr eax, 0x1f
lea eax, [edx + eax + 1]
test eax, eax
setl cl
dec ecx
and eax, ecx
mov ecx, esi
push eax
push 0
push 1
call fcn.00463442
push 1
push 0
push 0
mov ecx, esi
call fcn.004633ea
push 1
push 0
push 1
mov ecx, esi
call fcn.004633ea
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
call fcn.00466cc2
mov ecx, dword [esp + 0x30]
pop esi
mov dword fs:[0], ecx
add esp, 0x38
ret

Function at 0x440b30
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x46e098
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push esi
mov esi, ecx
push 0
lea ecx, [esp + 0x20]
call fcn.00466c50
push 0x3e8
lea eax, [esp + 0x20]
push 0x3e8
push eax
mov dword [esp + 0x44], 0
call fcn.00440350
mov ecx, dword [esi + 0x48]
mov eax, dword [esi + 0x4c]
add ecx, 0x64
add esp, 0xc
mov dword [esp + 4], ecx
lea ecx, [esp + 4]
add eax, 0x96
push ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0xc], eax
call fcn.00466b7e
mov eax, dword [esi + 0x1c]
lea edx, [esp + 0xc]
push edx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
sub eax, edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
cdq
idiv dword [esp + 8]
mov edx, dword [esp + 0xc]
mov ecx, eax
mov eax, dword [esp + 0x14]
sub eax, edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
cdq
idiv dword [esp + 4]
cmp dword [esp + 0x44], 1
jne 0x440bf4
cmp dword [esp + 0x40], 1
jne 0x440bf2
cmp ecx, eax
jge 0x440bf4
mov eax, ecx
cmp eax, 0xc8
jge 0x440c00
mov eax, 0xc8
mov ecx, esi
mov dword [esi + 0xd0], eax
call fcn.004409b0
mov ecx, dword [esi + 0x1c]
push 1
push 0
push ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
call fcn.00466cc2
mov ecx, dword [esp + 0x30]
pop esi
mov dword fs:[0], ecx
add esp, 0x38
ret 8
Function at 0x441380
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x46e103
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
call fcn.00461862
lea edi, [esi + 0x64]
mov dword [esp + 0x18], 0
mov dword [edi + 4], 0
mov dword [edi], vtable.CBrush.0
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x3c], eax
mov eax, ebp
mov dword [esi], method.CEdit.virtual_0
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], 0
mov ecx, dword [eax]
lea edx, [esi + 0x48]
mov byte [esp + 0x18], 1
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov ecx, dword [esp + 0x40]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x44]
push eax
mov dword [esi + 0x5c], ecx
mov dword [esi + 0x60], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
mov ecx, edi
call fcn.00466ef8
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebp
push 0x50800044
mov ecx, esi
call fcn.00468414
test eax, eax
je 0x44149c
mov ecx, dword [esp + 0x3c]
call fcn.00466f25
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push eax
push 0x30
push ecx
mov dword [esi + 0x58], eax
call ebp
mov edi, dword [esp + 0x34]
test edi, edi
je 0x441460
push edi
mov ecx, esi
call fcn.00464589
mov ecx, esi
call fcn.00441600
cmp dword [esp + 0x38], 1
jne 0x441495
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esi + 0x1c]
push 0xffffffffffffffff
not ecx
dec ecx
push ecx
push 0xb1
push edx
call ebp
mov eax, dword [esi + 0x1c]
push 0
push 0
push 0xb7
push eax
call ebp
mov ecx, esi
call fcn.004646c4
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x10
ret 0x28
Function at 0x443ec0
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x443ef3
push esi
call fcn.00446fb0
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x443eec
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x443f79
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x443f62
mov eax, dword [esi + 8]
test eax, eax
je 0x443f17
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x443f5e
cmp eax, 2
je 0x443f62
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x443f0a
cmp eax, 3
je 0x443f3d
cmp eax, 1
jne 0x443f0a
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x443f0a
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x443f0a
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.00443fa0
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x443f88
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.00443fa0
add esp, 4
pop esi
ret

Function at 0x462658
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x462690
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.0046070c
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004606e4
jmp 0x46269c
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x463d46
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x463d88
call fcn.004697ff
mov esi, dword [eax + 0xc]
push pe_nt_image_headers32
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x463d88
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x463d7f
xor eax, eax
jmp 0x463d90
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00463d96
pop edi
pop esi
pop ebx
ret 4

Function at 0x469d2f
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x469d5d
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x469d7b
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00469c95
jmp 0x469d7b
mov eax, dword [esi + 0x14]
test eax, eax
je 0x469d7b
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.00469c95
test edi, edi
mov eax, edi
jne 0x469d65
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x406178
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x840
push esi
push edi
mov ecx, 0xe
mov esi, str.MakeMinimalFailSafeOperator
lea edi, [ebp - 0x43c]
rep movsd dword es:[edi], dword [esi]
mov ax, word [0x448544]
mov word [ebp - 0x83c], ax
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x83a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov cx, word [0x44854c]
mov word [ebp - 0x400], cx
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x3fe]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 0x840], 0
mov dword [ebp - 0x404], 0
cmp dword [ebp + 0xc], 0
jne 0x4061f3
xor eax, eax
jmp 0x4063a4
push 0x3a0
push 0
mov edx, dword [ebp + 0xc]
push edx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov eax, dword [ebp + 0xc]
mov dword [eax], 0
lea ecx, [ebp - 0x43c]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.004078f6
add esp, 0xc
test eax, eax
je 0x4062db
push 0x400
lea eax, [ebp - 0x400]
push eax
push 0x43804c
push 0x438054
push 0x44a498
call fcn.0042f530
add esp, 0x14
lea ecx, [ebp - 0x400]
push ecx
push 0x438058
lea edx, [ebp - 0x83c]
push edx
mov eax, dword [0x449ba0]
call dword [eax + 0x4cc]
add esp, 0xc
lea ecx, [ebp - 0x83c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLExecDirect]
add esp, 8
cmp eax, 1
jne 0x4062db
lea eax, [ebp - 0x404]
push eax
lea ecx, [ebp - 0x840]
push ecx
push 4
push 0xfffffffffffffff0
push 1
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLBind]
add esp, 0x18
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SQLSVC.dll_QSQLNextRow]
add esp, 4
cmp eax, 0xffffffff
jne 0x4062be
jmp 0x4062aa
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.SQLSVC.dll_QSQLResults]
add esp, 4
cmp eax, 1
je 0x406289
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x840]
mov dword [edx], eax
push 0x44a498
mov ecx, dword [ebp + 0xc]
add ecx, 4
push ecx
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
push 0x44a698
mov edx, dword [ebp + 0xc]
add edx, 0x114
push edx
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
push 0x44a598
mov eax, dword [ebp + 0xc]
add eax, 0x1e4
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
push 0x44a798
mov ecx, dword [ebp + 0xc]
add ecx, 0x2b4
push ecx
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x110], 0
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x384], 0
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x388], 0
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x38c], 0
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x390], 0
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x394], 0
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x398], 0
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x39c], 0
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40726d
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
push edi
mov dword [ebp - 0x410], 0
mov dword [ebp - 0x208], 0
mov ax, word [0x44858c]
mov word [ebp - 0x408], ax
mov ecx, 0x7f
xor eax, eax
lea edi, [ebp - 0x406]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov cx, word [0x448594]
mov word [ebp - 0x204], cx
mov ecx, 0x7f
xor eax, eax
lea edi, [ebp - 0x202]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 4], 0
mov dword [ebp - 0x40c], 0
push 0
push str.SQL60_RUNNING
push 0x100
lea edx, [ebp - 0x204]
push edx
call fcn.00420ed4
add esp, 0x10
lea eax, [ebp - 0x204]
push eax
push 1
push 4
mov ecx, dword [0x449ba0]
call dword [ecx + 0x354]
mov dword [ebp - 0x410], eax
cmp dword [ebp - 0x410], 0
jne 0x4074bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x40c], eax
cmp dword [ebp - 0x40c], 5
jne 0x407363
cmp dword [0x448560], 0
jne 0x407359
push 0
push 0x8000006a
push 1
push 3
call fcn.0041b0dc
add esp, 0x10
mov dword [0x448560], 1
mov eax, 3
jmp 0x4074d8
push 4
push 0
push 0
push 2
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x407385
xor eax, eax
jmp 0x4074d8
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov dword [ebp - 0x414], ecx
cmp dword [ebp - 0x414], 0
je 0x4073b4
cmp dword [ebp - 0x414], 1
je 0x407401
cmp dword [ebp - 0x414], 2
je 0x407447
jmp 0x4074bd
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [0x44aba0], 0
je 0x4073ce
xor eax, eax
jmp 0x4074d8
cmp dword [0x448564], 0
jne 0x407401
push 0x44908c
push 0x4383f8
push 0x168
push 0
push 2
call fcn.0041b8d1
add esp, 0x14
call fcn.0042f3b3
mov eax, 1
jmp 0x4074d8
mov eax, dword [ebp - 4]
mov dword [eax], 2
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [0x448564], 0
jne 0x407447
push 0x44908c
push 0x438418
push 0x168
push 0
push 2
call fcn.0041b8d1
add esp, 0x14
call fcn.0042f3b3
mov eax, 1
jmp 0x4074d8
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push 0x100
lea eax, [ebp - 0x408]
push eax
call fcn.00421dc6
add esp, 8
lea ecx, [ebp - 0x408]
push ecx
push 0
push 0x100000
mov edx, dword [0x449ba0]
call dword [edx + 0x350]
mov dword [ebp - 0x208], eax
cmp dword [ebp - 0x208], 0
jne 0x4074b0
push 0x44908c
push 0x438438
push 0x168
push 0
push 2
call fcn.0041b8d1
add esp, 0x14
call fcn.0042f3b3
jmp 0x4074bd
mov eax, dword [ebp - 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4074d3
mov ecx, dword [ebp - 0x410]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 2
jmp 0x4074d8
mov eax, 3
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x408148
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
push edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x208], 0
mov ax, word [0x4485f0]
mov word [ebp - 0x408], ax
mov ecx, 0x7f
xor eax, eax
lea edi, [ebp - 0x406]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov cx, word [0x4485f8]
mov word [ebp - 0x204], cx
mov ecx, 0x7f
xor eax, eax
lea edi, [ebp - 0x202]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp dword [ebp + 8], 0
je 0x4081ac
cmp dword [ebp + 0xc], 0
jne 0x4081b3
xor eax, eax
jmp 0x408266
push 0x200
lea edx, [ebp - 0x204]
push edx
push 0x438b44
push 0x438b4c
mov eax, dword [ebp + 0xc]
push eax
call fcn.0042f530
add esp, 0x14
lea ecx, [ebp - 0x204]
push ecx
push 0x438b50
lea edx, [ebp - 0x408]
push edx
mov eax, dword [0x449ba0]
call dword [eax + 0x4cc]
add esp, 0xc
lea ecx, [ebp - 0x408]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLExecDirect]
add esp, 8
cmp eax, 1
jne 0x408260
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0x208]
push ecx
push 4
push 0xfffffffffffffff0
push 1
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLBind]
add esp, 0x18
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SQLSVC.dll_QSQLNextRow]
add esp, 4
cmp eax, 0xffffffff
jne 0x408241
jmp 0x40822d
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.SQLSVC.dll_QSQLPurgeResults]
add esp, 4
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLResults]
add esp, 4
cmp eax, 1
je 0x40820f
mov eax, dword [ebp - 0x208]
pop edi
mov esp, ebp
pop ebp
ret

Function at 0x408400
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
push edi
mov dword [ebp - 8], 0
mov ax, word [0x448600]
mov word [ebp - 0x408], ax
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x406]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 4], 0
cmp dword [ebp + 8], 0
je 0x408442
cmp dword [ebp + 0xc], 0
jne 0x408449
xor eax, eax
jmp 0x4084d1
mov ecx, dword [ebp + 0xc]
push ecx
push str.SELECT_COUNT___FROM_master.dbo.sysprocesses_sp__master.dbo.syslogins_sl_WHERE__sp.sid__sl.sid__AND__sl.loginname__N_s_
lea edx, [ebp - 0x408]
push edx
mov eax, dword [0x449ba0]
call dword [eax + 0x4cc]
add esp, 0xc
lea ecx, [ebp - 0x408]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLExecDirect]
add esp, 8
cmp eax, 1
jne 0x4084ce
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 4]
push ecx
push 4
push 0xfffffffffffffff0
push 1
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLBind]
add esp, 0x18
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SQLSVC.dll_QSQLNextRow]
add esp, 4
cmp eax, 0xffffffff
jne 0x4084af
jmp 0x40849b
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.SQLSVC.dll_QSQLPurgeResults]
add esp, 4
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLResults]
add esp, 4
cmp eax, 1
je 0x408480
mov eax, dword [ebp - 4]
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x40bf45
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x458
push esi
push edi
mov ecx, 0xc
mov esi, str.ConnCacheMSXInstructions
lea edi, [ebp - 0x58]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov ax, word [0x448690]
mov word [ebp - 0x458], ax
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x456]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x58]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.004078f6
add esp, 0xc
test eax, eax
je 0x40c0b0
push 0x1c
push 0
lea eax, [ebp - 0x24]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x449194
mov ecx, dword [ebp + 0x10]
push ecx
push str.SELECT_TOP__ld_instance_id__operation_code__object_type__object_id_FROM_msdb.dbo.sysdownloadlist_WHERE__target_server__N_s__AND__status__0__ORDER_BY_instance_id
lea edx, [ebp - 0x458]
push edx
mov eax, dword [0x449ba0]
call dword [eax + 0x4cc]
add esp, 0x10
lea ecx, [ebp - 0x458]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLExecDirect]
add esp, 8
cmp eax, 1
jne 0x40c0b0
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x24]
push ecx
push 4
push 0xfffffffffffffff0
push 1
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLBind]
add esp, 0x18
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x20]
push ecx
push 4
push 0xfffffffffffffff0
push 2
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLBind]
add esp, 0x18
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x1c]
push ecx
push 4
push 0xfffffffffffffff0
push 3
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLBind]
add esp, 0x18
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x18]
push ecx
push 0x10
push 0xfffffffffffffffe
push 4
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLBind]
add esp, 0x18
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SQLSVC.dll_QSQLNextRow]
add esp, 4
cmp eax, 0xffffffff
jne 0x40c09a
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.SQLSVC.dll_SHRecMemAdd]
add esp, 8
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
push 0x1c
push 0
lea ecx, [ebp - 0x24]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
jmp 0x40c05c
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLResults]
add esp, 4
cmp eax, 1
je 0x40bff0
mov eax, dword [ebp - 4]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x421b12
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x1c]
push eax
push str.SystemCurrentControlSetControlProductOptions
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x421b5d
jmp 0x421c12
lea ecx, [ebp - 8]
push ecx
push 0
lea edx, [ebp - 0xc]
push edx
push 0
push 0x43fc5c
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x421b87
cmp dword [ebp - 8], 0
jne 0x421b8c
jmp 0x421c12
mov ecx, dword [ebp - 8]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x421ba3
jmp 0x421c12
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp - 0x14]
push eax
lea ecx, [ebp - 0xc]
push ecx
push 0
push str.ProductSuite
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x421bcf
cmp dword [ebp - 0xc], 7
je 0x421bd1
jmp 0x421c12
mov eax, dword [ebp - 0x14]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx]
test edx, edx
je 0x421c12
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x421bfc
mov dword [ebp - 0x10], 1
jmp 0x421c12
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax + 1]
mov dword [ebp - 4], edx
jmp 0x421bd7
cmp dword [ebp - 0x14], 0
je 0x421c22
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x1c], 0
je 0x421c32
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret
Function at 0x426bbb
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push edi
mov dword [ebp - 0x210], 0
mov dword [ebp - 0x20c], 0
mov ax, word [0x44983c]
mov word [ebp - 0x208], ax
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x206]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str.DumpFailedJobCreationSQL___n
call fcn.0042fc9e
add esp, 4
cmp dword [ebp + 8], 0
je 0x426c10
cmp dword [ebp + 0xc], 0
jne 0x426c15
jmp 0x426c9d
mov ecx, dword [ebp + 8]
push ecx
push 0x44b4d0
push str._sTempCreateJob_s.SQL
lea edx, [ebp - 0x208]
push edx
mov eax, dword [0x449ba0]
call dword [eax + 0x4cc]
add esp, 0x10
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x208]
push ecx
call dword [sym.imp.SQLUNIRL.dll__CreateFile_28]
mov dword [ebp - 0x210], eax
cmp dword [ebp - 0x210], 0xffffffff
je 0x426c9d
push 0
lea edx, [ebp - 0x20c]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
shl eax, 1
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x210]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x42a7f1
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
push edi
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x218], 0
mov ax, word [0x4499ac]
mov word [ebp - 0x214], ax
mov ecx, 0x7f
xor eax, eax
lea edi, [ebp - 0x212]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x10
push 0
lea ecx, [ebp - 0x10]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
push 1
push str.SQLServerAgentJobListJobIDMemory
push 0x100
lea edx, [ebp - 0x214]
push edx
call fcn.00420ed4
add esp, 0x10
lea eax, [ebp - 0x214]
push eax
push 0
push 4
mov ecx, dword [0x449ba0]
call dword [ecx + 0x354]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x42a8cb
push 0
push 0
push 0
push 4
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x218], eax
cmp dword [ebp - 0x218], 0
je 0x42a8c1
push 0x10
mov eax, dword [ebp - 0x218]
push eax
lea ecx, [ebp - 0x10]
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov edx, dword [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
lea eax, [ebp - 0x10]
mov dword [ebp - 0x218], eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x218]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0042a8f0
add esp, 8
mov ecx, dword [0x44b94c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
pop edi
mov esp, ebp
pop ebp
ret