joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10003e04
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0xc]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0xc]
add ecx, dword [eax + edx*8 + 0x78]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 0xc]
add eax, dword [edx + 0x20]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
add edx, dword [ecx + 0x1c]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
add ecx, dword [eax + 0x24]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 4], 0
jmp 0x10003e5c
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
cmp ecx, dword [eax + 0x18]
jae 0x10003ea4
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0xc]
add ecx, dword [eax + edx*4]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp + 0x14]
push eax
call fcn.10003da4
add esp, 8
cmp eax, dword [ebp + 0x10]
jne 0x10003ea2
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
call 0x5a04f5a4
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp + 0xc]
add edx, dword [ecx + eax*4]
mov eax, edx
jmp 0x10003ea6
jmp 0x10003e53
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x10003eb4
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword fs:[0x30]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0xc]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
add eax, 0xc
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx]
mov dword [ebp - 4], eax
Function at 0x402f90
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x408
mov eax, dword [0x435e80]
xor eax, esp
mov dword [esp + 0x404], eax
push esi
mov esi, ecx
test byte [esi + 0x14], 4
push edi
mov edi, dword [esp + 0x414]
je 0x402fc2
mov eax, dword [esi]
push 0
push eax
push edi
call fcn.00402660
jmp 0x40300d
lea ecx, [esp + 0xc]
push ecx
mov ecx, esi
call fcn.00402c10
lea eax, [esp + 0xc]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x402fd5
sub eax, edx
push 0
lea edx, [esp + 0xc]
push edx
push eax
lea eax, [esp + 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403007
mov ecx, dword [esi]
push 0
push ecx
push edi
mov ecx, esi
call fcn.00402660
jmp 0x40300d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x40c]
pop edi
mov eax, esi
pop esi
xor ecx, esp
call fcn.00412a21
add esp, 0x408
ret 4
Function at 0x406ff0
Capabilities:
Check os version
Get system information on windows

Disassembly:
sub esp, 0xc4
mov eax, dword [0x435e80]
xor eax, esp
mov dword [esp + 0xc0], eax
push esi
push edi
push 0x9c
xor edi, edi
lea eax, [esp + 0x30]
push edi
push eax
call fcn.00412590
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
add esp, 0xc
lea ecx, [esp + 0x2c]
push ecx
mov dword [esp + 0x30], 0x9c
call esi
test eax, eax
jne 0x40705e
lea edx, [esp + 0x2c]
push edx
mov dword [esp + 0x30], 0x94
call esi
test eax, eax
jne 0x40705e
pop edi
pop esi
mov ecx, dword [esp + 0xc0]
xor ecx, esp
call fcn.00412a21
add esp, 0xc4
ret
mov eax, dword [esp + 0x30]
cmp eax, 6
jae 0x407073
cmp eax, 5
jne 0x4070ad
cmp dword [esp + 0x34], 2
jne 0x4070ad
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
push str.GetNativeSystemInfo
push 0x42af30
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4070a0
lea ecx, [esp + 8]
push ecx
call eax
cmp word [esp + 8], 9
jne 0x4070ad
mov edi, 1
mov ecx, dword [esp + 0xc8]
mov eax, edi
pop edi
pop esi
xor ecx, esp
call fcn.00412a21
add esp, 0xc4
ret

Function at 0x4071f0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 8
mov edx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0x24]
mov eax, dword [esi]
lea ecx, [esp + 0x24]
push ecx
push 0x20019
push 0
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1c]
push edx
push eax
mov dword [esp + 0x18], 0
mov dword [esi], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40728e
mov ecx, dword [esi]
push edi
mov edi, dword [esp + 0x24]
push ecx
push eax
push edi
call fcn.00412590
mov ecx, dword [esp + 0x28]
add esp, 0xc
lea edx, [esp + 0xc]
push edx
mov edx, dword [esp + 0x2c]
push edi
lea eax, [esp + 0x10]
push eax
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, eax
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
pop edi
je 0x407277
mov eax, 0xfffffffe
pop esi
add esp, 8
ret
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 4]
mov eax, dword [esp + 8]
mov dword [ecx], edx
mov dword [esi], eax
xor eax, eax
pop esi
add esp, 8
ret
or eax, 0xffffffff
pop esi
add esp, 8
ret
Function at 0x4073d0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
push edi
or edi, 0xffffffff
test eax, eax
je 0x40750c
push ebx
mov ebx, dword [esp + 0x14]
test ebx, ebx
je 0x40750b
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, edi
mov dword [esp + 0x10], eax
je 0x40750b
push ebp
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
lea eax, [esi + 1]
push eax
call fcn.00412f17
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x4074fe
mov edx, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x14]
push ecx
push esi
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4074f5
push ebx
push ebp
mov byte [esi + ebp], 0
call fcn.00413590
add esp, 8
test eax, eax
je 0x4074f5
mov ecx, ebx
lea esi, [ecx + 1]
lea ecx, [ecx]
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x407470
sub ecx, esi
add eax, ecx
mov cl, byte [eax]
test cl, cl
je 0x407497
cmp cl, 0x20
je 0x40748d
cmp cl, 9
jne 0x407497
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x407483
cmp byte [eax], 0
mov ebx, eax
je 0x4074bd
mov edi, edi
mov cl, byte [eax]
cmp cl, 0xd
je 0x4074ba
cmp cl, 0xa
je 0x4074ba
test cl, cl
je 0x4074ba
add eax, 1
cmp byte [eax], 0
jne 0x4074a0
jmp 0x4074bd
mov byte [eax], 0
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4074c2
mov esi, dword [esp + 0x20]
sub eax, edx
test esi, esi
je 0x4074f3
mov edi, dword [esp + 0x24]
add edi, 0xffffffff
cmp eax, edi
jg 0x4074e2
mov edi, eax
push edi
push ebx
push esi
call fcn.00413710
add esp, 0xc
mov byte [edi + esi], 0
jmp 0x4074f5
mov edi, eax
push ebp
call fcn.00412262
add esp, 4
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop ebp
pop ebx
mov eax, edi
pop edi
pop ecx
ret
Function at 0x408db0
Capabilities:
Check os version

Disassembly:
push esi
mov esi, dword [esp + 8]
xor eax, eax
test esi, esi
je 0x408df0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov edi, eax
test edi, edi
je 0x408def
mov eax, dword [esi + 4]
cmp eax, 6
lea ecx, [esi + 4]
ja 0x408ddc
jne 0x408ded
cmp dword [esi + 8], 2
jb 0x408ded
lea eax, [esi + 0xc]
push eax
add esi, 8
push esi
push ecx
call fcn.00407520
add esp, 0xc
mov eax, edi
pop edi
pop esi
ret
Function at 0x40aae0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xc
test eax, eax
push ebp
mov ebp, dword [esp + 0x18]
push edi
mov edi, ecx
mov ecx, dword [esi]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], ecx
mov dword [esi], 0
je 0x40ab7f
test ebx, ebx
je 0x40ab7f
test ebp, ebp
je 0x40ab7f
test edi, edi
je 0x40ab7f
lea edx, [esp + 8]
push edx
push 0x20019
push 0
push eax
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40ab84
mov ecx, dword [esi]
push ecx
push eax
push edi
call fcn.00412590
mov ecx, dword [esp + 0x14]
add esp, 0xc
lea edx, [esp + 0x10]
push edx
push edi
lea eax, [esp + 0x14]
push eax
push 0
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 8]
push edx
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x40ab6a
mov eax, edi
pop edi
pop ebp
add esp, 0xc
ret
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [ebp], eax
pop edi
mov dword [esi], ecx
xor eax, eax
pop ebp
add esp, 0xc
ret
mov eax, 6
pop edi
pop ebp
add esp, 0xc
ret

Function at 0x40ade0
Capabilities:
Get file version info

Disassembly:
sub esp, 0xc
push ebx
push ebp
mov ebp, dword [esp + 0x18]
mov ebx, ecx
test ebx, ebx
push esi
mov esi, eax
je 0x40af18
cmp byte [ebx], 0
je 0x40af18
test esi, esi
je 0x40af18
push ebp
push 0
push esi
call fcn.00412590
add esp, 0xc
lea eax, [esp + 0x14]
push eax
push ebx
call sub.VERSION.dll_GetFileVersionInfoSizeA
test eax, eax
mov dword [esp + 0xc], eax
ja 0x40ae32
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xc
ret
push edi
push eax
call fcn.00412f17
mov edi, eax
add esp, 4
test edi, edi
jne 0x40ae4d
lea eax, [edi + 2]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov ecx, dword [esp + 0x10]
push ecx
push 0
push edi
call fcn.00412590
mov edx, dword [esp + 0x1c]
add esp, 0xc
push edi
push edx
push 0
push ebx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x40ae85
push edi
call fcn.00412262
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0xc
ret
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x18]
push ecx
push str.VarFileInfoTranslation
push edi
call sub.VERSION.dll_VerQueryValueA
cmp dword [esp + 0x10], 0
jbe 0x40af02
test eax, eax
je 0x40af02
mov eax, dword [esp + 0x14]
movzx edx, word [eax + 2]
movzx eax, word [eax]
push ebp
push edx
push eax
push edi
mov ecx, 0x42c14c
call fcn.0040ab90
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x40aee5
mov eax, dword [esp + 0x14]
movzx ecx, word [eax + 2]
movzx edx, word [eax]
push ebp
push ecx
push edx
push edi
mov ecx, 0x42c140
call fcn.0040ab90
add esp, 0x10
mov ebx, eax
push edi
call fcn.00412262
add esp, 4
mov eax, ebx
neg eax
pop edi
sbb eax, eax
pop esi
and eax, 2
pop ebp
add eax, 0xfffffffe
pop ebx
add esp, 0xc
ret
push edi
call fcn.00412262
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 0xc
ret
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0xc
ret
Function at 0x40af30
Capabilities:
Shutdown system

Disassembly:
sub esp, 0xac
mov eax, dword [0x435e80]
xor eax, esp
mov dword [esp + 0xa8], eax
push esi
push 0x94
lea eax, [esp + 0x1c]
push 0
push eax
call fcn.00412590
add esp, 0xc
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x1c], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
je 0x40afd5
cmp dword [esp + 0x28], 2
jne 0x40afd5
lea edx, [esp + 4]
push edx
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40affb
lea eax, [esp + 0xc]
push eax
push str.SeShutdownPrivilege
push 0
mov dword [esp + 0x14], 1
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov edx, dword [esp + 4]
push 0
push 0
push 0
lea ecx, [esp + 0x14]
push ecx
push 0
push edx
mov dword [esp + 0x2c], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call esi
test eax, eax
jne 0x40b019
push 0
push 6
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
je 0x40b017
call esi
pop esi
mov ecx, dword [esp + 0xa8]
xor ecx, esp
call fcn.00412a21
add esp, 0xac
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop esi
mov ecx, dword [esp + 0xa8]
xor ecx, esp
call fcn.00412a21
add esp, 0xac
ret
xor eax, eax
mov ecx, dword [esp + 0xac]
pop esi
xor ecx, esp
call fcn.00412a21
add esp, 0xac
ret
Function at 0x40b5b0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x74
push edi
xor eax, eax
xor edi, edi
push 0x44
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
lea eax, [esp + 0x38]
push edi
push eax
mov dword [esp + 0x30], edi
call fcn.00412590
add esp, 0xc
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x38]
push edx
mov edx, dword [esp + 0x88]
push edi
push edi
mov eax, 0xfffff830
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
push edi
mov eax, 0xc
push edi
mov dword [esp + 0x30], eax
mov dword [esp + 0x24], eax
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x98]
lea ecx, [esp + 0x34]
push ecx
push edx
push eax
mov dword [esp + 0x5c], 0x44
mov dword [esp + 0x88], 5
mov word [esp + 0x8c], 7
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], 1
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x40b65d
or eax, 0xffffffff
pop edi
add esp, 0x74
ret
mov ecx, dword [esp + 0x28]
push esi
push ecx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x88], edi
je 0x40b6c3
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [esp + 0xc], 0x103
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0xc]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x40b6d6
cmp dword [esp + 0xc], 0x103
jne 0x40b6c0
push 0x1f4
call ebp
add esi, 1
cmp ebx, edi
jle 0x40b6b6
lea ecx, [ebx + ebx]
cmp ecx, esi
jl 0x40b6ef
cmp dword [esp + 0xc], 0x103
je 0x40b683
mov esi, edi
pop ebp
mov edx, dword [esp + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop edi
add esp, 0x74
ret
mov edx, dword [esp + 0x2c]
pop ebp
push edx
mov esi, 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop edi
add esp, 0x74
ret
mov edx, dword [esp + 0x2c]
pop ebp
push edx
mov esi, 2
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop edi
add esp, 0x74
ret
Function at 0x40bc30
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ecx
push ebp
push esi
xor ebp, ebp
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
cmp esi, ebp
jne 0x40bc48
pop esi
xor eax, eax
pop ebp
pop ecx
ret
push edi
push 0x42c56c
push 0x7d0
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
cmp edi, ebp
je 0x40bccf
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebp
je 0x40bccf
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
cmp ebx, ebp
je 0x40bcce
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push ebp
push 0x80
push 2
push ebp
push ebp
mov edi, eax
mov eax, dword [esp + 0x2c]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40bcce
push ebp
lea ecx, [esp + 0x14]
push ecx
push edi
push ebx
push esi
mov dword [esp + 0x24], ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40bcc7
cmp dword [esp + 0x10], edi
jne 0x40bcc7
mov ebp, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop edi
pop esi
mov eax, ebp
pop ebp
pop ecx
ret
Function at 0x40eb60
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x28
mov eax, dword [0x435e80]
xor eax, esp
mov dword [esp + 0x24], eax
push esi
xor esi, esi
push edi
push str.advapi32.dll
mov dword [esp + 0x1c], esi
mov byte [esp + 0x28], 0
mov byte [esp + 0x29], 0
mov byte [esp + 0x2a], 0
mov byte [esp + 0x2b], 0
mov byte [esp + 0x2c], 0
mov byte [esp + 0x2d], 5
mov dword [esp + 0x14], esi
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, esi
je 0x40ecf7
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ebx
push ebp
push str.AllocateAndInitializeSid
push edi
call esi
push 0x42dd80
push edi
mov ebx, eax
call esi
push str.GetTokenInformation
push edi
mov dword [esp + 0x2c], eax
call esi
push str.EqualSid
push edi
mov ebp, eax
call esi
push str.FreeSid
push edi
mov dword [esp + 0x24], eax
call esi
test ebx, ebx
mov dword [esp + 0x28], eax
je 0x40ecd9
mov esi, dword [esp + 0x24]
test esi, esi
je 0x40ecd9
test ebp, ebp
je 0x40ecd9
cmp dword [esp + 0x1c], 0
je 0x40ecd9
test eax, eax
je 0x40ecd9
lea eax, [esp + 0x18]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea ecx, [esp + 0x54]
push ecx
call ebx
lea edx, [esp + 0x10]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 2
push ecx
call ebp
mov edx, dword [esp + 0x14]
push edx
call fcn.00412f17
mov esi, eax
add esp, 4
test esi, esi
je 0x40ecc5
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push ecx
push esi
push 2
push edx
call ebp
xor ebx, ebx
cmp dword [esi], ebx
jbe 0x40ecbc
lea ebp, [esi + 4]
mov eax, dword [ebp]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call dword [esp + 0x24]
test eax, eax
jne 0x40ecb4
add ebx, 1
add ebp, 8
cmp ebx, dword [esi]
jb 0x40ec97
jmp 0x40ecbc
mov dword [esp + 0x20], 1
push esi
call fcn.00412262
add esp, 4
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
push eax
call dword [esp + 0x2c]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x20]
pop ebp
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00412a21
add esp, 0x28
ret
mov ecx, dword [esp + 0x2c]
pop edi
mov eax, esi
pop esi
xor ecx, esp
call fcn.00412a21
add esp, 0x28
ret
Function at 0x40ee30
Capabilities:
Set registry value

Disassembly:
sub esp, 8
mov edx, dword [esp + 0x10]
lea eax, [esp + 4]
push eax
mov eax, dword [esp + 0x10]
lea ecx, [esp + 4]
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
push edx
push eax
mov dword [esp + 0x28], 0
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40eea3
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push esi
push ecx
mov ecx, dword [esp + 0x1c]
push edx
mov edx, dword [esp + 0xc]
push eax
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
neg eax
sbb eax, eax
and eax, 0xfffffffe
pop esi
add esp, 8
ret
or eax, 0xffffffff
add esp, 8
ret

Function at 0x40f480
Capabilities:
Enumerate network shares

Disassembly:
mov eax, 0x190c
call fcn.00416aa0
push 0x18fc
lea eax, [esp + 0x14]
push 0
push eax
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], 0
call fcn.00412590
mov edx, dword [esp + 0x191c]
add esp, 0xc
lea ecx, [esp + 4]
push ecx
push edx
push 2
push 0
push 2
call sub.MPR.dll_WNetOpenEnumA
test eax, eax
je 0x40f4d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x190c
ret
push esi
lea eax, [esp + 0xc]
push eax
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0xc]
push edx
push eax
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x1c], 0x1900
call sub.MPR.dll_WNetEnumResourceA
mov esi, eax
test esi, esi
jne 0x40f5e4
push ebp
mov ebp, dword [esp + 0x1920]
push edi
xor edi, edi
cmp dword [esp + 0xc], edi
jbe 0x40f5af
lea esi, [esp + 0x24]
mov ecx, dword [esi - 4]
test ecx, ecx
je 0x40f53c
cmp ecx, 1
jbe 0x40f535
cmp ecx, 3
jbe 0x40f53c
mov edx, 1
jmp 0x40f53e
xor edx, edx
mov eax, dword [esi]
and eax, 2
je 0x40f566
test edx, edx
je 0x40f566
mov ecx, dword [esp + 0x1920]
push ebp
push ecx
lea edx, [esi - 0xc]
push edx
call fcn.0040f480
add esp, 0xc
cmp byte [ebp], 0
jne 0x40f5af
jmp 0x40f587
test eax, eax
je 0x40f587
cmp ecx, 2
jne 0x40f587
mov eax, dword [esp + 0x1920]
mov ecx, dword [esi + 8]
push eax
push ecx
call fcn.00413d2f
add esp, 8
test eax, eax
je 0x40f595
add edi, 1
add esi, 0x20
cmp edi, dword [esp + 0xc]
jb 0x40f524
jmp 0x40f5af
mov edx, dword [esp + 0x191c]
mov ecx, dword [edx + 0x14]
mov edx, ebp
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x40f5a1
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x14]
push edx
push eax
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x24], 0x1900
call sub.MPR.dll_WNetEnumResourceA
mov esi, eax
test esi, esi
je 0x40f514
pop edi
pop ebp
cmp esi, 0x103
jne 0x40f5ee
xor esi, esi
mov eax, dword [esp + 8]
test eax, eax
je 0x40f5fc
push eax
call sub.MPR.dll_WNetCloseEnum
mov eax, esi
pop esi
add esp, 0x190c
ret
Function at 0x4105a0
Capabilities:
Delete file

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
mov eax, 0xfffffff8
je 0x41064f
mov ecx, dword [esi]
test ecx, ecx
je 0x41064f
cmp byte [ecx + 0x3fc], 0
lea eax, [ecx + 0x3fc]
je 0x4105d2
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esi]
mov eax, dword [eax + 0x31c]
test eax, eax
je 0x4105ef
cmp eax, dword [str.Kaseya_Agent]
je 0x4105ef
push eax
call fcn.00412262
add esp, 4
mov ecx, dword [esi]
mov eax, dword [ecx + 0x320]
test eax, eax
je 0x410604
push eax
call fcn.00412262
add esp, 4
mov edx, dword [esi]
mov eax, dword [edx + 0x318]
test eax, eax
je 0x410627
cmp eax, str.The_Agent_has_been_installed_successfully_on_your_computer.
je 0x410627
cmp eax, str.The_Agent_has_been_installed_successfully_on_your_computer._n_nThe_protection_features_will_take_effect_after_the_next_reboot.
je 0x410627
push eax
call fcn.00412262
add esp, 4
mov eax, dword [esi]
mov eax, dword [eax + 0x324]
test eax, eax
je 0x41063c
push eax
call fcn.00412262
add esp, 4
mov ecx, dword [esi]
push ecx
call fcn.00412262
add esp, 4
mov dword [esi], 0
xor eax, eax
pop esi
ret
Function at 0x411880
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x13c
mov eax, dword [0x435e80]
xor eax, esp
mov dword [esp + 0x138], eax
push ebp
mov ebp, dword [esp + 0x148]
push esi
mov esi, dword [esp + 0x148]
push edi
push 0x12f
xor edi, edi
lea eax, [esp + 0x19]
push edi
push eax
mov dword [esp + 0x18], esi
mov byte [esp + 0x20], 0
call fcn.00412590
add esp, 0xc
cmp ebp, edi
jne 0x4118e2
pop edi
pop esi
or eax, 0xffffffff
pop ebp
mov ecx, dword [esp + 0x138]
xor ecx, esp
call fcn.00412a21
add esp, 0x13c
ret
mov eax, dword [ebp + 0x13c]
cmp eax, edi
je 0x4118fb
push eax
call fcn.00412262
add esp, 4
mov dword [ebp + 0x13c], edi
xor eax, eax
mov dword [ebp], eax
mov dword [ebp + 4], eax
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], eax
push ebx
mov dword [ebp + 0x10], eax
mov dword [ebp + 0x14], eax
mov dword [ebp + 0x18], eax
push 0x108
mov dword [ebp + 0x1c], eax
lea ebx, [ebp + 0x28]
push edi
mov dword [ebp + 0x20], eax
push ebx
mov dword [ebp + 0x24], eax
call fcn.00412590
mov ecx, dword [ebp + 0x130]
add ecx, 0x130
add dword [ebp + 0x134], ecx
mov eax, dword [ebp + 0x134]
push 2
neg eax
push eax
push esi
call fcn.00413355
push esi
push 0x130
lea edx, [esp + 0x38]
push 1
push edx
call fcn.00412ead
add esp, 0x28
cmp eax, 0x130
je 0x41197a
mov dword [ebp + 0x130], edi
mov eax, 0xfffffffe
jmp 0x411a85
push 0x24
lea eax, [esp + 0x1c]
push eax
mov ecx, 9
lea esi, [esp + 0x20]
mov edi, ebp
push str.Agent_Install_Additional_File___v01
rep movsd dword es:[edi], dword [esi]
call fcn.0042559f
add esp, 0xc
test eax, eax
je 0x4119a9
mov eax, 0xfffffffd
jmp 0x411a85
push 4
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x148]
push edx
call fcn.0040efa0
lea eax, [esp + 0x20]
push eax
call fcn.0040f120
mov dword [ebp + 0x130], eax
mov ecx, 0x41
lea esi, [esp + 0x4c]
mov edi, ebx
mov eax, ebx
add esp, 0x10
rep movsd dword es:[edi], dword [esi]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4119e2
sub eax, edx
sub eax, 1
js 0x411a02
cmp byte [ebx + eax], 0x20
jne 0x411a02
sub eax, 1
mov byte [ebx + eax + 1], 0
jns 0x4119f2
mov eax, dword [ebp + 0x134]
mov edx, dword [ebp + 0x138]
mov ecx, dword [ebp + 0x130]
sub edx, eax
cmp ecx, edx
jbe 0x411a21
mov eax, 0xfffffffc
jmp 0x411a85
mov esi, dword [esp + 0x10]
add ecx, eax
push 2
neg ecx
push ecx
push esi
call fcn.00413355
mov eax, dword [ebp + 0x130]
add eax, 1
push eax
call fcn.00412f17
add esp, 0x10
test eax, eax
mov dword [ebp + 0x13c], eax
jne 0x411a55
mov eax, 0xfffffffb
jmp 0x411a85
mov ecx, dword [ebp + 0x130]
mov byte [eax + ecx], 0
mov edx, dword [ebp + 0x130]
mov eax, dword [ebp + 0x13c]
push esi
push edx
push 1
push eax
call fcn.00412ead
sub eax, dword [ebp + 0x130]
add esp, 0x10
neg eax
sbb eax, eax
and eax, 0xfffffffa
mov ecx, dword [esp + 0x148]
pop ebx
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.00412a21
add esp, 0x13c
ret