joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401aa0
Capabilities:
Enumerate files on windows

Disassembly:
push 0xffffffffffffffff
push 0x40f6c0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x268
push ebx
push ebp
xor ebp, ebp
push esi
push edi
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x10], 0x4102ac
mov eax, dword [esp + 0x290]
mov ecx, dword [esp + 0x28c]
push eax
push ecx
push str._s_s
lea edx, [esp + 0x17c]
push 0x105
push edx
mov dword [esp + 0x294], 1
call fcn.004020f0
add esp, 0x14
lea eax, [esp + 0x30]
lea ecx, [esp + 0x170]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x401b33
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x401bf7
test byte [esp + 0x30], 0x10
jne 0x401bdc
mov edx, dword [esp + 0x294]
mov dword [esp + 0x28], ebp
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], 0x4102cc
lea ecx, [esp + 0x20]
mov byte [esp + 0x280], 2
xor bl, bl
call fcn.00401f00
mov eax, dword [esp + 0x28]
cmp eax, ebp
je 0x401b97
mov eax, dword [eax]
lea ecx, [esp + 0x5c]
push ecx
push eax
call fcn.00408e26
add esp, 8
test eax, eax
jne 0x401b86
mov bl, 1
mov edx, dword [esp + 0x28]
test bl, bl
mov eax, dword [edx + 4]
mov dword [esp + 0x28], eax
je 0x401b6c
jmp 0x401bcc
test bl, bl
jne 0x401bcc
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
call fcn.00408a4a
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x401bcc
lea ecx, [esp + 0x5c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
lea ecx, [esp + 0x14]
call fcn.00401e20
mov byte [esp + 0x280], 1
mov dword [esp + 0x20], 0x4102cc
lea edx, [esp + 0x30]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
cmp eax, ebp
jne 0x401b33
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [esp + 0x288]
mov eax, dword [esp + 0x14]
cmp eax, ebp
mov edi, eax
mov dword [esi + 4], ebp
mov dword [esi + 8], ebp
mov dword [esi + 0xc], ebp
mov dword [esi], 0x4102ac
je 0x401c5a
mov ebx, dword [edi]
push 8
call fcn.00408a4a
add esp, 4
cmp eax, ebp
je 0x401c2e
mov dword [eax], ebx
mov dword [eax + 4], ebp
jmp 0x401c30
xor eax, eax
cmp dword [esi + 4], ebp
jne 0x401c38
mov dword [esi + 4], eax
mov ecx, dword [esi + 8]
cmp ecx, ebp
je 0x401c45
mov dword [ecx + 4], eax
mov dword [eax + 4], ebp
mov ecx, dword [esi + 0xc]
mov dword [esi + 8], eax
inc ecx
mov dword [esi + 0xc], ecx
mov edi, dword [edi + 4]
cmp edi, ebp
jne 0x401c17
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2c], 1
cmp eax, ebp
mov byte [esp + 0x280], 0
mov dword [esp + 0x10], 0x4102ac
je 0x401ca9
mov edx, dword [esp + 0x18]
mov ecx, eax
mov eax, dword [eax + 4]
cmp ecx, edx
mov dword [esp + 0x14], eax
jne 0x401c8b
mov dword [esp + 0x18], ebp
mov edi, dword [esp + 0x1c]
dec edi
cmp ecx, ebp
mov dword [esp + 0x1c], edi
je 0x401ca5
push ecx
call fcn.00408a3f
mov eax, dword [esp + 0x18]
add esp, 4
cmp eax, ebp
jne 0x401c76
mov ecx, dword [esp + 0x278]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x274
ret
Function at 0x4023c0
Capabilities:
Hide graphical window

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 4]
test eax, eax
jne 0x4023cf
call fcn.00402360
mov eax, dword [esi + 4]
test eax, eax
je 0x402408
push 5
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [esi + 4]
push 1
push 0
push eax
mov dword [esi + 0xc], 1
call dword [sym.imp.USER32.dll_InvalidateRect]
mov ecx, dword [esi + 4]
push ecx
call dword [sym.imp.USER32.dll_UpdateWindow]
mov edx, dword [esi + 4]
push edx
call dword [sym.imp.USER32.dll_SetForegroundWindow]
pop esi
ret

Function at 0x403240
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x110
lea eax, [esp + 0xc]
push eax
call fcn.00403640
add esp, 4
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea ecx, [esp + 0xc]
lea edx, [esp]
push ecx
push 1
push edx
mov dword [esp + 0xc], 0xc
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
mov dword [0x412238], eax
je 0x4032a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4032a7
mov eax, 1
add esp, 0x110
ret
xor eax, eax
add esp, 0x110
ret

Function at 0x403300
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x104
push ebx
push esi
push edi
mov edi, dword [esp + 0x114]
xor esi, esi
mov eax, edi
cmp byte [edi], 0x22
jne 0x403330
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
lea eax, [edi + 1]
dec esi
cmp byte [esi + edi], 0x22
jne 0x403330
mov byte [esi + edi], 0
lea ecx, [esp + 0xc]
push 0x104
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov ebx, eax
test ebx, ebx
jbe 0x40335d
cmp ebx, 0x104
ja 0x40335d
lea edx, [esp + 0xc]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x403365
test esi, esi
je 0x403365
mov byte [esi + edi], 0x22
test ebx, ebx
jbe 0x403380
cmp ebx, 0x104
ja 0x403380
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x104
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x104
ret

Function at 0x403390
Capabilities:
Read .ini file

Disassembly:
mov ecx, dword [0x4151bc]
sub esp, 0x208
lea eax, [esp + 0x104]
push 0x104
push eax
push 0x12
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
mov al, byte [0x414fb4]
test al, al
je 0x4033e2
push 0x414fb4
lea edx, [esp + 4]
push 0x104
lea eax, [esp + 0x10c]
push edx
push eax
push str.Autorun.inf
push str.AutoRun
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x218]
push edi
push 0x4151c0
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x412250
push esi
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
call edi
lea ecx, [esp + 0x10]
mov ebp, eax
push ecx
call edi
add ebp, eax
cmp ebp, 0x104
jge 0x40342b
lea edx, [esp + 0x10]
push edx
push esi
call ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
Function at 0x403470
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x104
lea eax, [esp]
push eax
call fcn.00403390
mov edx, dword [esp + 0x10c]
add esp, 4
lea ecx, [esp]
push ecx
push 0x104
push edx
push 0x402650
push str.DisplayName
push str.ProductInformation
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
add esp, 0x104
ret

Function at 0x4034c0
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x104
lea eax, [esp]
push esi
push eax
call fcn.00403390
mov edx, dword [esp + 0x114]
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea ecx, [esp + 4]
push ecx
push 0x104
push edx
push 0x402650
push str.SPLevel
push str.ServicePack
call esi
test eax, eax
je 0x403535
mov ecx, dword [esp + 0x10c]
lea eax, [esp + 4]
push eax
push 0x104
push ecx
push 0x402650
push str.NTVersion
push str.ServicePack
call esi
test eax, eax
je 0x403535
mov eax, 1
pop esi
add esp, 0x104
ret
xor eax, eax
pop esi
add esp, 0x104
ret

Function at 0x403640
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x104
lea eax, [esp]
push eax
call fcn.00403390
mov edx, dword [esp + 0x10c]
add esp, 4
lea ecx, [esp]
push ecx
push 0x104
push edx
push 0x402650
push str.ProductCode
push str.ProductInformation
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
add esp, 0x104
ret

Function at 0x403690
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x408
lea eax, [esp + 0x200]
push esi
push edi
push eax
call fcn.00403390
mov edx, dword [esp + 0x420]
mov eax, dword [0x4151bc]
add esp, 4
lea ecx, [esp + 0x30c]
push 0x104
push ecx
push edx
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
lea ecx, [esp + 0x208]
lea edx, [esp + 8]
push ecx
mov ecx, dword [esp + 0x424]
push 0x104
lea eax, [esp + 0x314]
push edx
push eax
push str.MessageText
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea edx, [esp + 0x108]
push edx
call fcn.00403470
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 4
lea eax, [esp + 0x108]
push eax
call esi
lea ecx, [esp + 8]
mov edi, eax
push ecx
call esi
add edi, eax
mov eax, dword [esp + 0x418]
cmp edi, eax
pop edi
pop esi
jle 0x403748
mov edx, dword [esp + 0x40c]
push str.Function:GetCustomErrorMessage_____szError_size_is_too_small
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esp, 0x408
ret
mov edx, dword [esp + 0x40c]
lea eax, [esp + 0x100]
lea ecx, [esp]
push eax
push ecx
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
add esp, 0x408
ret
Function at 0x403840
Capabilities:
Enumerate files on windows

Disassembly:
sub esp, 0x140
lea eax, [esp]
push ebx
push ebp
mov ebp, dword [esp + 0x14c]
push esi
push eax
push ebp
xor esi, esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4038a2
push edi
mov edi, dword [sym.imp.USER32.dll_CharNextA]
lea ecx, [esp + 0x3c]
push 0x28
push ecx
call fcn.00404190
add esp, 8
test eax, eax
je 0x403891
push eax
call edi
push eax
call fcn.004041f0
add esp, 4
cmp esi, eax
jae 0x403891
mov esi, eax
lea edx, [esp + 0x10]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40386c
pop edi
push 0x28
push ebp
call fcn.00404190
add esp, 8
test eax, eax
je 0x4038c2
inc esi
push esi
push str.__04i_.txt
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x140
ret

Function at 0x4038e0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0xc]
sub esp, 0x244
lea edx, [esp]
mov byte [eax], 0
push ebx
push ebp
push esi
push edi
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x10]
push eax
call fcn.00403300
add esp, 4
test eax, eax
je 0x403a21
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x403947
lea edx, [esp + 0x10]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40394f
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x244
ret
test al, 0x10
je 0x403a21
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [esp + 0x10]
push eax
call ebp
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
mov esi, eax
test esi, esi
jbe 0x403984
cmp esi, 0x103
jae 0x403984
cmp byte [esp + esi + 0xf], 0x5c
je 0x403984
lea ecx, [esp + 0x10]
push 0x412250
push ecx
call ebx
inc esi
cmp esi, 0x101
jae 0x403a21
lea edx, [esp + 0x10]
push 0x412334
push edx
call ebx
lea eax, [esp + 0x114]
lea ecx, [esp + 0x10]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x403a21
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [esp + 0x25c]
mov byte [esp + esi + 0x10], 0
push edi
call fcn.00403300
add esp, 4
test eax, eax
je 0x403a21
push edi
call ebp
add eax, esi
cmp eax, 0x104
jae 0x403a21
lea edx, [esp + 0x10]
push edi
push edx
call ebx
lea eax, [esp + 0x10]
push 0x104
push eax
call fcn.00403840
add esp, 8
test eax, eax
je 0x403a21
mov edx, dword [esp + 0x260]
lea ecx, [esp + 0x10]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x244
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x244
ret
Function at 0x403a30
Capabilities:
Read .ini file

Disassembly:
mov eax, dword [0x41683c]
sub esp, 0x138
test eax, eax
jne 0x403a93
lea eax, [esp + 0x34]
push eax
call fcn.00403390
add esp, 4
lea ecx, [esp + 0x34]
lea edx, [esp]
mov byte [esp], 0
push ecx
push 0x32
push edx
push 0x412340
push str.InstMsi
push str.InstallMSI
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov al, byte [esp]
cmp al, 0x32
je 0x403a93
cmp dword [0x4162dc], 4
ja 0x403a87
cmp al, 0x30
jne 0x403a93
mov eax, 1
add esp, 0x138
ret
xor eax, eax
add esp, 0x138
ret

Function at 0x403ce0
Capabilities:
Create process on windows

Disassembly:
mov eax, dword [0x416844]
sub esp, 0xc0
test eax, eax
jne 0x403e75
push edi
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x80]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x80], 0x44
push eax
mov dword [esp + 0xb0], 0x40
call fcn.004046c0
lea ecx, [esp + 0x20]
push ecx
call fcn.004032b0
add esp, 8
lea edx, [esp + 0x1c]
push str.__q__r:n
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
call fcn.00407950
lea eax, [esp + 0xc]
lea ecx, [esp + 0x80]
push eax
push ecx
push 0
push 0
push 0x20
push 0
push 0
lea edx, [esp + 0x38]
push 0
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
pop edi
jne 0x403da3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], eax
lea eax, [esp + 0x18]
push eax
call fcn.004046c0
mov edx, dword [esp + 4]
lea ecx, [esp + 0x1c]
push ecx
push edx
call fcn.00405f30
add esp, 0xc
mov eax, 0xffffff32
add esp, 0xc0
ret
mov eax, dword [esp + 0xc]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov eax, dword [0x41680c]
test eax, eax
jne 0x403dc9
mov ecx, dword [esp + 0xc]
push ecx
call fcn.00403aa0
add esp, 4
jmp 0x403dd6
mov edx, dword [esp + 0xc]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esp + 0xc]
lea eax, [esp + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov edx, dword [esp + 0xc]
push edx
call esi
mov eax, dword [esp + 4]
pop esi
test eax, eax
je 0x403e15
cmp eax, 0xbc2
je 0x403e15
push 0x20
push 0
call fcn.00403f30
add esp, 8
mov eax, 0xffffff32
add esp, 0xc0
ret
lea eax, [esp + 4]
mov dword [esp + 4], 0
push eax
push 0
call fcn.004047c0
add esp, 8
test eax, eax
je 0x403e38
mov eax, dword [esp + 4]
test eax, eax
je 0x403e75
mov eax, dword [0x416818]
test eax, eax
jne 0x403e69
mov eax, dword [0x41680c]
test eax, eax
jne 0x403e69
push 1
push 0x22
push 0
call fcn.00403fd0
add esp, 0xc
cmp eax, 6
je 0x403e69
mov eax, 0x642
add esp, 0xc0
ret
mov eax, 0xbc2
add esp, 0xc0
ret
xor eax, eax
add esp, 0xc0
ret

Function at 0x403ea0
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x104
lea eax, [esp]
push eax
call fcn.00403390
add esp, 4
lea ecx, [esp]
push ecx
push 0
push str.AutorunIfInstalled
push str.ProductInformation
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
add esp, 0x104
ret
Function at 0x4042f0
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x104
lea eax, [esp]
push ebx
push esi
push edi
push eax
call fcn.00403390
mov esi, dword [esp + 0x118]
mov edi, dword [esp + 0x11c]
add esp, 4
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea ecx, [esp + 0xc]
mov byte [edi], 0
push ecx
push 0x104
push esi
push 0x402650
push str.RegKey
push 0x412324
mov byte [esi], 0
call ebx
lea edx, [esp + 0xc]
push edx
push 0x104
push edi
push 0x402650
push str.RegValue
push 0x412324
call ebx
cmp byte [esi], 0
je 0x404371
cmp byte [edi], 0
je 0x404371
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x104
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x104
ret

Function at 0x404380
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x210
mov ecx, dword [0x4162dc]
mov eax, 4
cmp ecx, eax
mov dword [esp], 0
mov dword [esp + 4], eax
jne 0x404415
lea eax, [esp + 0x10c]
lea ecx, [esp + 8]
push eax
push ecx
call fcn.004042f0
add esp, 8
test eax, eax
je 0x404415
call fcn.00405d10
test eax, eax
jne 0x404415
lea edx, [esp]
push edx
push 1
push eax
lea eax, [esp + 0x14]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4043fa
lea ecx, [esp + 4]
lea edx, [esp + 0x10c]
push ecx
push eax
push eax
push eax
mov eax, dword [esp + 0x10]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp]
test eax, eax
je 0x404409
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
add esp, 0x210
ret
xor eax, eax
add esp, 0x210
ret

Function at 0x404420
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0x400
push ebx
push ebp
push esi
push edi
push 0x4151c0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4044d7
mov esi, dword [esp + 0x414]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, dword [sym.imp.USER32.dll_MessageBoxA]
mov ebp, dword [sym.imp.USER32.dll_LoadStringA]
mov eax, dword [0x41680c]
test eax, eax
jne 0x4044e7
mov ecx, dword [0x4151bc]
lea eax, [esp + 0x10]
push 0x100
push eax
push 2
push ecx
call ebp
lea edx, [esp + 0x210]
push edx
call fcn.00403470
lea eax, [esp + 0x214]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x318]
push ecx
push edx
call edi
lea eax, [esp + 0x120]
push eax
call fcn.004037f0
add esp, 0x14
lea ecx, [esp + 0x110]
lea edx, [esp + 0x310]
push 0x11
push ecx
push edx
push esi
call ebx
cmp eax, 2
je 0x4044e7
push 0x4151c0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x404457
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x400
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x400
ret

Function at 0x404580
Capabilities:
Create thread

Disassembly:
push ecx
lea eax, [esp]
push eax
push 0
push 0
push 0x404560
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x412234], eax
pop ecx
ret
Function at 0x4045a0
Capabilities:
Get file version info

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x20]
lea eax, [esp + 0x18]
xor ebx, ebx
push eax
push edi
mov dword [esp + 0x20], ebx
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov ebp, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
xor edx, edx
cmp eax, ebx
sete dl
mov esi, edx
mov dword [ebp], ebx
cmp esi, ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
mov dword [ecx], ebx
jne 0x4046a8
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
mov eax, dword [esp + 0x20]
push ebx
push eax
push 0
push edi
call sub.VERSION.dll_GetFileVersionInfoA
mov esi, eax
neg esi
sbb esi, esi
inc esi
jne 0x40469d
mov eax, dword [esp + 0x24]
xor esi, esi
cmp eax, esi
jne 0x404648
lea ecx, [esp + 0x20]
lea edx, [esp + 0x10]
push ecx
push edx
push 0x412250
push ebx
mov dword [esp + 0x30], esi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x404641
cmp dword [esp + 0x20], esi
je 0x404641
mov eax, dword [esp + 0x10]
cmp eax, esi
jne 0x40468e
mov esi, 1
jmp 0x40469d
lea eax, [esp + 0x20]
lea ecx, [esp + 0x14]
push eax
push ecx
push str.StringFileInfo040904B0ProductVersion
push ebx
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x40466f
cmp dword [esp + 0x20], esi
je 0x40466f
mov eax, dword [esp + 0x14]
cmp eax, esi
jne 0x404676
mov esi, 1
jmp 0x40469d
mov edx, dword [esp + 0x2c]
push edx
push ebp
push eax
call fcn.00403540
mov esi, eax
add esp, 0xc
neg esi
sbb esi, esi
inc esi
jmp 0x40469d
mov ecx, dword [eax + 0x10]
mov dword [ebp], ecx
mov edx, dword [eax + 0x14]
mov eax, dword [esp + 0x2c]
mov dword [eax], edx
test ebx, ebx
je 0x4046a8
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
pop edi
test esi, esi
pop esi
pop ebp
sete al
pop ebx
add esp, 0xc
ret

Function at 0x4046c0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0x104
lea eax, [esp]
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x4151c0
push eax
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [esp + 0x10]
push str.msi
push ecx
call ebx
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea edx, [esp + 0x10]
push edx
call ebp
cmp eax, 0xffffffff
je 0x404704
test al, 0x10
jne 0x404710
lea eax, [esp + 0x10]
push 0x4151c0
push eax
call edi
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [esp + eax + 0xf], 0x5c
je 0x40472e
lea edx, [esp + 0x10]
push 0x412250
push edx
call ebx
mov esi, dword [esp + 0x118]
lea eax, [esp + 0x10]
push eax
push esi
call edi
mov eax, dword [0x4162dc]
test eax, eax
mov eax, str.instmsiW.exe
jne 0x404750
mov eax, str.instmsi.exe
push eax
push esi
call ebx
mov eax, dword [0x4162dc]
test eax, eax
je 0x404775
push esi
call ebp
cmp eax, 0xffffffff
jne 0x404775
lea ecx, [esp + 0x10]
push ecx
push esi
call edi
push str.instmsi.exe
push esi
call ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
Function at 0x404c90
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x110
push esi
lea eax, [esp + 0x10]
push 0x402650
push eax
mov dword [esp + 0x10], 0x104
mov dword [esp + 0x14], 1
call fcn.004085b0
mov esi, dword [esp + 0x120]
add esp, 8
test esi, esi
je 0x404dd9
push edi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
pop edi
je 0x404dd9
push esi
push str.MSSQLSERVER
call fcn.0040bf20
add esp, 8
test eax, eax
jne 0x404d54
mov edx, dword [0x402450]
lea ecx, [esp + 4]
push ecx
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x404d13
xor eax, eax
pop esi
add esp, 0x110
ret
mov edx, dword [esp + 4]
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0x10]
push 0x415ccc
push ecx
push 0
push 0x410754
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x404d4d
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop esi
add esp, 0x110
ret
mov ecx, dword [esp + 4]
push ecx
jmp 0x404dd3
push str.Setup
push esi
push str.SOFTWAREMicrosoftMicrosoft_Sql_Server
lea edx, [esp + 0x1c]
push str._s_s_s
push edx
call fcn.004085b0
add esp, 0x14
lea eax, [esp + 4]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x404d94
xor eax, eax
pop esi
add esp, 0x110
ret
mov ecx, dword [esp + 4]
lea edx, [esp + 8]
push edx
lea eax, [esp + 0x10]
push 0x415ccc
push eax
push 0
push 0x410754
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x404dce
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop esi
add esp, 0x110
ret
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x402650
push 0x415ccc
call fcn.00408e26
add esp, 8
neg eax
sbb eax, eax
pop esi
neg eax
add esp, 0x110
ret
Function at 0x4054f0
Capabilities:
Get common file path

Disassembly:
push ecx
lea eax, [esp]
push esi
mov esi, dword [esp + 0xc]
push eax
push 0x14
push 0
mov dword [esp + 0x10], 0
mov byte [esi], 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x405552
mov eax, dword [esp + 4]
test eax, eax
je 0x405552
push esi
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x405552
lea ecx, [esp + 0xc]
push ecx
push 1
call dword [sym.imp.ole32.dll_CoGetMalloc]
mov eax, dword [esp + 0xc]
test eax, eax
je 0x405552
mov ecx, dword [esp + 4]
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0x14]
mov eax, dword [esp + 0xc]
push eax
mov edx, dword [eax]
call dword [edx + 8]
pop esi
pop ecx
ret

Function at 0x4055a0
Capabilities:
Get file attributes
Query or enumerate registry value

Disassembly:
sub esp, 0x108
push esi
push edi
push 1
call fcn.00405560
mov edi, eax
add esp, 4
xor esi, esi
mov dword [esp + 8], 0x104
test edi, edi
je 0x405664
mov edx, dword [esp + 0x114]
lea eax, [esp + 8]
lea ecx, [esp + 0xc]
push eax
push ecx
push esi
push esi
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40565d
cmp byte [esp + 0xd], 0x3a
je 0x40561d
cmp byte [esp + 0xc], 0x5c
je 0x40561d
mov esi, dword [esp + 0x118]
push ebx
push esi
call fcn.004054f0
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
add esp, 4
push 0x412250
push esi
call ebx
lea eax, [esp + 0x10]
push eax
push esi
call ebx
pop ebx
jmp 0x405630
mov esi, dword [esp + 0x118]
lea ecx, [esp + 0xc]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp dword [0x4162dc], 5
jae 0x405658
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 0x10
je 0x405658
push edi
xor esi, esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop edi
pop esi
add esp, 0x108
ret
mov esi, 1
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop edi
pop esi
add esp, 0x108
ret