joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4b3e20
Capabilities:
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x4de510
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push esi
push edi
lea ecx, [esp + 0xc]
call fcn.004b36d0
xor ebx, ebx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x34], ebx
call fcn.004b36d0
mov esi, dword [esp + 0x3c]
lea ecx, [esp + 0xc]
push esi
mov byte [esp + 0x38], 1
call fcn.004b3740
cmp dword [esp + 0x40], ebx
jne 0x4b3ea8
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea ecx, [esp + 0x1c]
mov esi, eax
mov byte [esp + 0x34], bl
call fcn.004b36f0
lea ecx, [esp + 0xc]
mov dword [esp + 0x34], 0xffffffff
call fcn.004b36f0
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
add esp, 0x2c
ret
lea eax, [esp + 0xc]
push eax
call fcn.004b3d60
add esp, 4
lea ecx, [esp + 0xc]
mov esi, 1
call fcn.004b3b70
cmp eax, esi
jb 0x4b3f2b
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 1
push 1
push esi
push 0x5391b8
lea ecx, [esp + 0x1c]
call fcn.004b3af0
cmp eax, 1
jne 0x4b3f1d
push esi
lea ecx, [esp + 0x20]
push eax
push ecx
lea ecx, [esp + 0x18]
call fcn.004b3890
push ebx
lea ecx, [esp + 0x20]
call fcn.004b3bf0
push eax
call fcn.004bfb50
add esp, 8
test eax, eax
jge 0x4b3f1d
push ebx
lea ecx, [esp + 0x20]
call fcn.004b3be0
push eax
call edi
test eax, eax
je 0x4b3f60
lea ecx, [esp + 0xc]
inc esi
call fcn.004b3b70
cmp esi, eax
jbe 0x4b3ecd
lea ecx, [esp + 0x1c]
mov byte [esp + 0x34], bl
call fcn.004b36f0
lea ecx, [esp + 0xc]
mov dword [esp + 0x34], 0xffffffff
call fcn.004b36f0
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
add esp, 0x2c
ret
lea ecx, [esp + 0x1c]
mov byte [esp + 0x34], bl
call fcn.004b36f0
lea ecx, [esp + 0xc]
mov dword [esp + 0x34], 0xffffffff
call fcn.004b36f0
mov ecx, dword [esp + 0x2c]
pop edi
pop esi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x2c
ret
Function at 0x4b6440
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 8]
test ecx, ecx
jne 0x4b644b
xor eax, eax
ret
mov eax, dword [esp + 4]
push ebx
push esi
mov esi, dword [esp + 0x14]
cmp esi, 8
not eax
jb 0x4b654e
push edi
mov edi, esi
shr edi, 3
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
mov ebx, eax
shr ebx, 8
mov eax, dword [edx*4 + 0x518fdc]
sub esi, 8
xor eax, ebx
inc ecx
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x518fdc]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x518fdc]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x518fdc]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x518fdc]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x518fdc]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x518fdc]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0x518fdc]
xor eax, edx
inc ecx
dec edi
jne 0x4b6466
pop edi
test esi, esi
je 0x4b6570
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0x518fdc]
xor eax, edx
inc ecx
dec esi
jne 0x4b6552
pop esi
pop ebx
not eax
ret

Function at 0x4b6e60
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 0x14]
push ebp
mov ebp, dword [esp + 0x10]
mov cl, byte [ebx]
mov eax, ebp
imul eax, dword [esp + 0x14]
test cl, cl
je 0x4b6ea1
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0xc]
push 0
push ecx
push eax
mov eax, dword [ebx + 4]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4b6e96
mov byte [ebx + 8], 1
mov eax, dword [esp + 0xc]
xor edx, edx
div ebp
pop ebp
pop ebx
ret
mov edx, dword [ebx + 0x18]
mov ecx, dword [ebx + 0x14]
push esi
push edi
lea esi, [edx + eax]
cmp esi, ecx
jbe 0x4b6eb4
sub ecx, edx
mov eax, ecx
mov esi, dword [ebx + 0x10]
mov edi, dword [esp + 0x14]
mov ecx, eax
add esi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
xor edx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x18]
pop edi
add ecx, eax
pop esi
div ebp
mov dword [ebx + 0x18], ecx
pop ebp
pop ebx
ret
Function at 0x4b7df0
Capabilities:
Get common file path

Disassembly:
push ecx
push ebp
mov ebp, ecx
push esi
push edi
cmp dword [ebp], 0
jne 0x4b7ea5
cmp dword [ebp + 4], 0xffffffff
jne 0x4b7ea5
push ebx
lea ebx, [ebp + 0x138]
push ebx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, 0x539440
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
pop ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x14]
cmp esi, 1
jne 0x4b7e6d
push edi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
je 0x4b7e6d
pop edi
pop esi
mov eax, 0x2000000
pop ebp
pop ecx
ret 0xc
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0xc]
push eax
push esi
push ecx
push edi
call fcn.004b6bf0
add esp, 0x10
test eax, eax
jne 0x4b7e90
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebp
pop ecx
ret 0xc
push eax
call fcn.004b7130
add esp, 4
mov dword [ebp], eax
xor eax, eax
pop edi
pop esi
pop ebp
pop ecx
ret 0xc
pop edi
pop esi
mov eax, 0x1000000
pop ebp
pop ecx
ret 0xc

Function at 0x4b8300
Capabilities:
Create directory

Disassembly:
mov ecx, dword [esp + 8]
sub esp, 0x208
test ecx, ecx
je 0x4b83c8
mov al, byte [ecx]
test al, al
je 0x4b83c8
push ebx
push esi
push edi
mov ebx, ecx
mov esi, ecx
cmp al, 0x2f
je 0x4b832b
cmp al, 0x5c
jne 0x4b832d
mov ebx, esi
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x4b8323
mov edi, dword [esp + 0x218]
cmp ebx, ecx
je 0x4b8364
mov esi, ebx
lea eax, [esp + 0xc]
sub esi, ecx
push esi
push ecx
push eax
call fcn.004bfb96
lea ecx, [esp + 0x18]
mov byte [esp + esi + 0x18], 0
push ecx
push edi
call fcn.004b8300
add esp, 0x14
inc ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x110]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x110]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x114]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
pop edi
pop esi
pop ebx
add esp, 0x208
ret
Function at 0x4bfb50
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4bfb70
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004be0fa
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x4bfb93
test byte [esp + 8], 2
je 0x4bfb93
call fcn.004be16d
mov dword [eax], 0xd
call fcn.004be176
mov dword [eax], 5
jmp 0x4bfb6c
xor eax, eax
ret

Function at 0x4d0b35
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4d0b6d
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.004cebc2
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004ceb9a
jmp 0x4d0b79
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4d2223
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 0x4d2265
call fcn.004d7fe3
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4d2265
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4d225c
xor eax, eax
jmp 0x4d226d
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004d2273
pop edi
pop esi
pop ebx
ret 4

Function at 0x4d8513
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 0x4d8541
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4d855f
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004d8479
jmp 0x4d855f
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4d855f
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004d8479
test edi, edi
mov eax, edi
jne 0x4d8549
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8

Function at 0x430006
Capabilities:
Encode data using xor

Disassembly:
call 0x43000c
nop
nop
nop
nop
pop eax
nop
nop
add eax, 0x403daa
sub eax, 0x403d50
nop
nop
nop
nop
mov ebx, dword [eax]
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
nop
mov edx, dword [eax + 8]
xor dword [ebx], edx
nop
nop
nop
nop
nop
nop
add ebx, 4
nop
nop
nop
cmp ebx, ecx
nop
nop
jl 0x430030
nop
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
cmp dword [eax], 0
nop
nop
jne 0x43001e
nop
nop
nop
nop
nop
nop
nop
nop
nop
popal
jmp fcn.00401219
Function at 0x405d63
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 [0x44aa80]
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 [0x44aa88]
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 0x405dde
xor eax, eax
jmp 0x405f8f
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 0x405ec6
push 0x400
lea eax, [ebp - 0x400]
push eax
push 0x43b000
push 0x43b008
push 0x44ca3c
call fcn.0042fc50
add esp, 0x14
lea ecx, [ebp - 0x400]
push ecx
push 0x43b00c
lea edx, [ebp - 0x83c]
push edx
mov eax, dword [0x44df4c]
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 0x405ec6
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 0x405ea9
jmp 0x405e95
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.SQLSVC.dll_QSQLResults]
add esp, 4
cmp eax, 1
je 0x405e74
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x840]
mov dword [edx], eax
push 0x44ca3c
mov ecx, dword [ebp + 0xc]
add ecx, 4
push ecx
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
push 0x44cc3c
mov edx, dword [ebp + 0xc]
add edx, 0x114
push edx
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
push 0x44cb3c
mov eax, dword [ebp + 0xc]
add eax, 0x1e4
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
push 0x44cd3c
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 0x406ac0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 4], 0
cmp dword [ebp + 8], 0
je 0x406ad9
cmp dword [ebp + 0xc], 0
jne 0x406add
xor eax, eax
jmp 0x406b36
mov eax, dword [ebp + 8]
mov word [eax], 0
lea ecx, [ebp - 4]
push ecx
push 0x20019
push 0
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x406b34
lea ecx, [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
push 0
push 0
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 8], eax
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 8], 0
jne 0x406b34
mov eax, dword [ebp + 8]
jmp 0x406b36
xor eax, eax
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 [0x44aacc]
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 [0x44aad4]
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.00421862
add esp, 0x10
lea eax, [ebp - 0x204]
push eax
push 1
push 4
mov ecx, dword [0x44df4c]
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 [0x44aaa0], 0
jne 0x407359
push 0
push 0x8000006a
push 1
push 3
call fcn.0041b7ad
add esp, 0x10
mov dword [0x44aaa0], 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 [0x44d144], 0
je 0x4073ce
xor eax, eax
jmp 0x4074d8
cmp dword [0x44aaa4], 0
jne 0x407401
push 0x44b5fc
push 0x43b484
push 0x168
push 0
push 2
call fcn.0041bfab
add esp, 0x14
call fcn.0042fad3
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 [0x44aaa4], 0
jne 0x407447
push 0x44b5fc
push 0x43b4a4
push 0x168
push 0
push 2
call fcn.0041bfab
add esp, 0x14
call fcn.0042fad3
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.00422939
add esp, 8
lea ecx, [ebp - 0x408]
push ecx
push 0
push 0x100000
mov edx, dword [0x44df4c]
call dword [edx + 0x350]
mov dword [ebp - 0x208], eax
cmp dword [ebp - 0x208], 0
jne 0x4074b0
push 0x44b5fc
push 0x43b4c4
push 0x168
push 0
push 2
call fcn.0041bfab
add esp, 0x14
call fcn.0042fad3
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 0x40811e
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 [0x44ab30]
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 [0x44ab38]
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 0x408182
cmp dword [ebp + 0xc], 0
jne 0x408189
xor eax, eax
jmp 0x40823c
push 0x200
lea edx, [ebp - 0x204]
push edx
push 0x43bbd0
push 0x43bbd8
mov eax, dword [ebp + 0xc]
push eax
call fcn.0042fc50
add esp, 0x14
lea ecx, [ebp - 0x204]
push ecx
push 0x43bbdc
lea edx, [ebp - 0x408]
push edx
mov eax, dword [0x44df4c]
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 0x408236
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 0x408217
jmp 0x408203
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 0x4081e5
mov eax, dword [ebp - 0x208]
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x40bf04
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 [0x44abd0]
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 0x40c06f
push 0x1c
push 0
lea eax, [ebp - 0x24]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x44b704
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 [0x44df4c]
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 0x40c06f
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 0x40c059
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 0x40c01b
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.SQLSVC.dll_QSQLResults]
add esp, 4
cmp eax, 1
je 0x40bfaf
mov eax, dword [ebp - 4]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x422685
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 0x4226d0
jmp 0x422785
lea ecx, [ebp - 8]
push ecx
push 0
lea edx, [ebp - 0xc]
push edx
push 0
push 0x442acc
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 0x4226fa
cmp dword [ebp - 8], 0
jne 0x4226ff
jmp 0x422785
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 0x422716
jmp 0x422785
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 0x422742
cmp dword [ebp - 0xc], 7
je 0x422744
jmp 0x422785
mov eax, dword [ebp - 0x14]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx]
test edx, edx
je 0x422785
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 0x42276f
mov dword [ebp - 0x10], 1
jmp 0x422785
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 0x42274a
cmp dword [ebp - 0x14], 0
je 0x422795
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x1c], 0
je 0x4227a5
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