joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1001da70
Capabilities:
Set registry value

Disassembly:
sub esp, 8
xor eax, eax
push ebp
mov ebp, dword [sym.imp.MSVCRT.dll_strchr]
push esi
mov esi, dword [esp + 0x14]
mov dword [esp + 9], eax
push edi
mov word [esp + 0x11], ax
push 0x2d
push esi
mov byte [esp + 0x14], 0
mov byte [esp + 0x1b], al
call ebp
add esp, 8
test eax, eax
jne 0x1001daa7
pop edi
pop esi
pop ebp
add esp, 8
ret
push 0x2d
push esi
call ebp
lea ecx, [esi + 4]
add esp, 8
cmp eax, ecx
je 0x1001dabf
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 8
ret
push 0x2d
push esi
call ebp
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 4
je 0x1001dadf
pop edi
pop esi
pop ebp
add esp, 8
ret
lea edx, [esp + 0x18]
push edx
push 0xf003f
push 0
push 0x10043190
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x1001db23
lea eax, [esp + 0x18]
push 0
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SOFTWAREIBMThinkPadSoftwareInstallerSysInfoOW
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push ebx
push 4
lea ecx, [esp + 0x14]
push esi
push ecx
call dword [sym.imp.MSVCRT.dll_strncpy]
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
lea edx, [esp + 0x10]
push ecx
push edx
push 1
push eax
mov eax, dword [esp + 0x2c]
push str.MachineType
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
push 0x2d
neg ebx
sbb ebx, ebx
push esi
inc ebx
call ebp
mov edi, eax
add esp, 8
inc edi
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
test ebx, ebx
rep movsb byte es:[edi], byte [esi]
pop ebx
je 0x1001dbd6
lea edi, [esp + 0xc]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
push ecx
lea ecx, [esp + 0x10]
push ecx
push 1
push eax
push str.ModelName
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x1001dbd6
mov eax, dword [esp + 0x18]
mov esi, 1
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop edi
pop esi
pop ebp
add esp, 8
ret
mov eax, dword [esp + 0x18]
xor esi, esi
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop edi
pop esi
pop ebp
add esp, 8
ret

Function at 0x1001dbf0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 8
lea eax, [esp]
push eax
push 0x20019
push 0
push 0x10043210
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x1001dc19
xor eax, eax
add esp, 8
ret
mov edx, dword [esp + 0xc]
mov eax, dword [esp]
lea ecx, [esp + 4]
push esi
push ecx
push edx
push 0
push 0
push 0x10043238
push eax
mov dword [esp + 0x20], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 4]
mov esi, eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test esi, esi
sete al
pop esi
add esp, 8
ret
Function at 0x1001dd60
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 8]
lea ecx, [esp + 0x18]
push eax
mov eax, dword [esp + 8]
push ecx
push 0x20019
push 0
push edx
push eax
call fcn.1001af10
add esp, 0x18
test eax, eax
jne 0x1001ddcb
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push esi
push ecx
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push edx
mov edx, dword [esp + 0x24]
push eax
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x1001ddba
mov eax, dword [esp + 0xc]
mov esi, 1
cmp eax, esi
je 0x1001ddbc
xor esi, esi
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
ret
xor eax, eax
ret

Function at 0x1001ddd0
Capabilities:
Query or enumerate registry key

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x108
lea ecx, [esp + 4]
push esi
mov esi, dword [esp + 0x118]
push eax
push 0x100432c0
push 0x100432f4
push ecx
mov dword [esi + 4], 0
mov dword [esi], 0
call dword [sym.imp.MSVCRT.dll_sprintf]
mov edx, dword [esp + 0x12c]
lea eax, [esp + 0x14]
push edx
mov edx, dword [esp + 0x124]
push eax
push 0x20019
lea ecx, [esp + 0x24]
push 0
push ecx
push edx
call fcn.1001af10
add esp, 0x28
test eax, eax
jne 0x1001de64
push esi
push eax
push eax
push eax
push eax
push eax
push eax
push eax
push eax
push eax
push eax
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov ecx, dword [esp + 4]
mov esi, eax
neg esi
sbb esi, esi
push ecx
inc esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0x108
ret
xor eax, eax
pop esi
add esp, 0x108
ret
Function at 0x1001de70
Capabilities:
Check if file exists
Create directory
Create shortcut via ishelllink
Delete directory
Delete file
Get file attributes

Disassembly:
mov eax, dword [esp + 0x14]
sub esp, 0x828
cmp eax, 1
push esi
jne 0x1001e06f
mov esi, dword [esp + 0x838]
push ebx
push ebp
push edi
mov edi, dword [0x1004c1bc]
lea eax, [esp + 0x11c]
push 0x104
push eax
push 0xffffffffffffffff
push esi
push 0
push 0
call edi
mov ebx, dword [sym.imp.MSVCRT.dll_wcsrchr]
push str.ThinkPad
lea ecx, [esp + 0x120]
push 0x5c
push ecx
call ebx
mov ebp, dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
push eax
call ebp
mov eax, dword [esp + 0x848]
add esp, 8
lea edx, [esp + 0x324]
push 0x104
push edx
push 0xffffffffffffffff
push eax
push 0
push 0
call edi
lea ecx, [esp + 0x11c]
lea edx, [esp + 0x630]
push ecx
push edx
call ebp
lea eax, [esp + 0x32c]
push 0x5c
push eax
call ebx
lea ecx, [esp + 0x640]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 0x18
mov ebx, dword [0x1004c1c0]
lea edx, [esp + 0x52c]
lea eax, [esp + 0x630]
push 0
push 0
push 0x104
push edx
push 0xffffffffffffffff
push eax
push 0
push 0
call ebx
push 0
push 0
lea ecx, [esp + 0x20]
push 0x104
push ecx
lea edx, [esp + 0x12c]
push 0xffffffffffffffff
push edx
push 0
push 0
call ebx
lea eax, [esp + 0x52c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1001df90
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
lea edx, [esp + 0x10]
xor ebx, ebx
push edx
push 0x1003c368
push 1
push 0
test eax, eax
push 0x1003c598
setge bl
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov esi, eax
test esi, esi
jl 0x1001e058
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x83c]
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x50]
mov eax, dword [esp + 0x10]
push 0
push esi
push eax
mov edx, dword [eax]
call dword [edx + 0x44]
mov eax, dword [esp + 0x848]
cmp byte [eax], 0
je 0x1001dff8
mov ecx, dword [esp + 0x10]
push eax
push ecx
mov edx, dword [ecx]
call dword [edx + 0x2c]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
push 0x1003d498
mov ecx, dword [eax]
push eax
call dword [ecx]
mov esi, eax
test esi, esi
jl 0x1001e04e
mov ecx, dword [esp + 0x840]
lea eax, [esp + 0x324]
push 0x104
push eax
push 0xffffffffffffffff
push ecx
push 0
push 0
call edi
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x324]
push 1
push ecx
mov edx, dword [eax]
push eax
call dword [edx + 0x18]
mov esi, eax
mov eax, dword [esp + 0x14]
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
pop edi
pop ebp
test ebx, ebx
pop ebx
je 0x1001e065
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, esi
pop esi
add esp, 0x828
ret
mov edx, dword [esp + 0x834]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esp + 0x838]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
xor eax, eax
pop esi
add esp, 0x828
ret
Function at 0x1001e0a0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x208
lea eax, [esp + 0x104]
push ebx
push esi
push edi
push 0x104
push eax
call fcn.1000bd40
lea edi, [esp + 0x118]
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
mov ecx, dword [0x10043310]
mov edx, dword [0x10043314]
mov eax, dword [0x10043318]
dec edi
mov ebx, dword [esp + 0x218]
mov dword [edi], ecx
mov cx, word [0x1004331c]
test ebx, ebx
mov dword [edi + 4], edx
mov dword [edi + 8], eax
mov word [edi + 0xc], cx
je 0x1001e18a
push 0x104
push ebx
push str.ProgramFilesDir
call fcn.1001b300
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
mov dx, word [0x10043330]
repne scasb al, byte es:[edi]
lea eax, [esp + 0x11c]
lea ecx, [esp + 0x18]
push eax
push ecx
push str.TARGET
push 0x1004333c
mov word [edi - 1], dx
call fcn.1000f520
add esp, 0x1c
test eax, eax
jne 0x1001e151
pop edi
pop esi
pop ebx
add esp, 0x208
ret
cmp byte [esp + 0xc], 0x2a
jne 0x1001e161
mov byte [ebx], 0x2a
mov byte [ebx + 1], 0
jmp 0x1001e18a
lea edi, [esp + 0xc]
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
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x21c]
test esi, esi
je 0x1001e1c4
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0x1c]
push esi
cmp eax, 2
push 0
push 0
jne 0x1001e1ba
push 0x17
jmp 0x1001e1bc
push 2
push 0
call dword [sym.imp.SHFOLDER.dll_SHGetFolderPathA]
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x208
ret
Function at 0x1001e970
Capabilities:
Get common file path

Disassembly:
sub esp, 0x208
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x109]
mov byte [esp + 0x108], 0
mov byte [esp + 4], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 5]
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x10c]
push eax
call fcn.1000bd40
lea edi, [esp + 0x110]
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
mov ecx, dword [str._tpisetup.dat]
mov edx, dword [0x100434fc]
mov eax, dword [0x10043500]
dec edi
push 0x104
mov dword [edi], ecx
mov cx, word [0x10043504]
mov dword [edi + 4], edx
lea edx, [esp + 8]
push edx
mov dword [edi + 8], eax
mov word [edi + 0xc], cx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [esp + 4]
push 0x5c
push eax
call dword [sym.imp.MSVCRT.dll_strchr]
lea ecx, [esp + 0x110]
mov byte [eax], 0
push ecx
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esp + ecx + 0x10]
push edx
push str.DOWNLOAD
push str.INIT
call fcn.1000f520
add esp, 0x18
test eax, eax
jne 0x1001ea48
pop edi
add esp, 0x208
ret
lea edi, [esp + 4]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, ecx
mov ecx, dword [esp + 0x214]
inc eax
cmp ecx, eax
jae 0x1001ea6e
xor eax, eax
pop edi
add esp, 0x208
ret
mov edx, dword [esp + 0x210]
push esi
mov esi, ecx
xor eax, eax
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
lea edi, [esp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop esi
pop edi
add esp, 0x208
ret
Function at 0x1001eac0
Capabilities:
Read .ini file

Disassembly:
mov eax, 0x1000
call fcn.1003a3a0
mov eax, dword [esp + 0x1010]
push ebx
push ebp
push esi
push edi
push eax
lea ecx, [esp + 0x14]
push 0x1000
push ecx
push 0x1004ccf8
push 0x1004351c
push 0x10043528
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
jne 0x1001eb04
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1000
ret
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x11], al
mov al, byte [esp + 0x10]
test al, al
je 0x1001eb65
mov ebx, dword [sym.imp.MSVCRT.dll_strchr]
mov ebp, dword [esp + 0x101c]
push 0x3b
push esi
call ebx
add esp, 8
test eax, eax
je 0x1001eb46
push 0x3b
push esi
call ebx
add esp, 8
mov byte [eax], 0
test ebp, ebp
je 0x1001eb7d
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
dec ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov al, byte [esi + ecx + 1]
lea esi, [esi + ecx + 1]
test al, al
jne 0x1001eb2f
jmp 0x1001eb6c
mov ebp, dword [esp + 0x101c]
test ebp, ebp
je 0x1001eb7d
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1000
ret
cmp byte [esi], 0
jne 0x1001eb8f
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1000
ret
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x1018]
not ecx
dec ecx
cmp ecx, eax
jbe 0x1001ebb3
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1000
ret
mov edx, dword [esp + 0x1014]
mov ecx, eax
mov ebx, ecx
xor eax, eax
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1000
ret
Function at 0x1001ef90
Capabilities:
Read .ini file

Disassembly:
mov eax, 0x1000
call fcn.1003a3a0
push ebx
mov ebx, dword [esp + 0x100c]
push ebp
push edi
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0xc]
push ebx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
push 0x1000
push eax
push 0x1004cd08
push 0x10043550
push 0x1004355c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov ebp, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
test eax, eax
je 0x1001f015
mov ecx, dword [esp + 0x1010]
lea edi, [esp + 0xc]
push ecx
or ecx, 0xffffffff
xor eax, eax
push 0x10043568
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esp + ecx + 0x14]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
push ebx
push 0
push 0x1004356c
push 0x10043578
call ebp
jmp 0x1001f03f
mov edi, dword [esp + 0x1010]
or ecx, 0xffffffff
xor eax, eax
push esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x10]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop esi
lea ecx, [esp + 0xc]
push ebx
push ecx
push str.SEARCHPATH
push str.DIRECTORY
call ebp
pop edi
pop ebp
pop ebx
add esp, 0x1000
ret

Function at 0x1001f670
Capabilities:
Check os version
Set current directory

Disassembly:
sub esp, 0x198
mov ecx, dword [esp + 0x19c]
lea eax, [esp]
push 0x104
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp]
push 0x5c
push edx
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
mov byte [eax], 0
lea eax, [esp + 0x104]
mov dword [esp + 0x104], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0x114]
cmp eax, 2
mov dword [0x10052c98], eax
jne 0x1001f753
push 0x100435b4
call fcn.1001fcb0
mov eax, dword [esp + 0x1a4]
add esp, 4
test eax, eax
je 0x1001f723
mov eax, dword [esp + 0x1a4]
and eax, 0xffff
cmp eax, 6
je 0x1001f712
cmp eax, 9
jne 0x1001f7a0
push 0x100435c0
lea ecx, [esp + 4]
push str.SWIX64
push ecx
jmp 0x1001f732
push 0x100435d4
lea edx, [esp + 4]
push str.SWII64
push edx
jmp 0x1001f732
push 0x100435e8
lea eax, [esp + 4]
push str.SWI32
push eax
call fcn.1001fc60
add esp, 0xc
push 0
push 0x4000000
push 3
push 0
push 3
push 0xc0000000
push str..TPISYSID3
jmp 0x1001f77a
cmp eax, 1
jne 0x1001f7a0
lea ecx, [esp]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0
push 0x4000000
push 3
push 0
push 3
push 0xc0000000
push str..SWI32.VXD
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [0x10052c90], eax
jne 0x1001f7ac
cmp dword [0x10052c98], 2
jne 0x1001f7a0
push 0x1004361c
call fcn.1001fcb0
add esp, 4
mov eax, 0x6e
add esp, 0x198
ret
xor eax, eax
add esp, 0x198
ret
Function at 0x1001f8e0
Capabilities:
Check if file exists
Copy file
Create directory
Get common file path
Get file attributes
Terminate process

Disassembly:
sub esp, 0x104
lea eax, [esp]
push ebx
push ebp
push esi
push edi
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov ebx, dword [esp + 0x11c]
mov edi, dword [sym.imp.MSVCRT.dll_sprintf]
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor esi, esi
mov ecx, esi
lea edx, [esp + 0x10]
and ecx, 0xffff
push ecx
push edx
push str._s_tpi_04x.tmp
push ebx
call edi
add esp, 0x10
push ebx
call ebp
cmp eax, 0xffffffff
je 0x1001f938
inc esi
cmp si, 0xffff
jb 0x1001f90f
cmp si, 0xffff
jne 0x1001f947
push 0xffffffffffffffff
call dword [sym.imp.MSVCRT.dll_exit]
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebp, dword [esp + 0x118]
push 0x5c
push ebp
call dword [sym.imp.MSVCRT.dll_strrchr]
mov esi, eax
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, esi
mov edx, ecx
or ecx, 0xffffffff
add edx, ebx
push 1
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov eax, ecx
mov esi, edi
mov edi, edx
push ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret

Function at 0x1001f9b0
Capabilities:
Delete directory
Delete file

Disassembly:
sub esp, 0x104
push esi
push edi
mov edi, dword [esp + 0x110]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 8]
mov eax, ecx
mov esi, edi
mov edi, edx
push 0x5c
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xc]
push ecx
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
lea edx, [esp + 8]
mov byte [eax], 0
push edx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
pop edi
pop esi
add esp, 0x104
ret
Function at 0x1001fa10
Capabilities:
Create service
Persist via windows service

Disassembly:
sub esp, 0x208
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 9]
mov byte [esp + 8], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [esp + 0x218]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x10c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov esi, dword [esp + 0x21c]
not ecx
dec ecx
push esi
push str._s.sys
lea ecx, [esp + ecx + 0x114]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov al, byte [0x10043698]
mov edx, dword [str.__]
mov byte [esp + 0x18], al
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x14], edx
lea edx, [esp + 0x118]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea ecx, [esp + ecx + 0x14]
push ecx
push edx
call fcn.1001f8e0
add esp, 0x14
mov ecx, dword [esp + 0x220]
mov edx, dword [esp + 0x214]
lea eax, [esp + 8]
push 0
push 0
push 0
push 0
push 0
push eax
push 0
push 3
push 1
push 0xf01ff
push esi
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, eax
test esi, esi
jne 0x1001fb16
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
je 0x1001fb16
lea eax, [esp + 0xc]
push eax
call fcn.1001f9b0
add esp, 4
xor eax, eax
pop edi
pop esi
add esp, 0x208
ret
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
mov eax, 1
pop esi
add esp, 0x208
ret

Function at 0x1001fb90
Capabilities:
Stop service

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
sub esp, 0x1c
push esi
push 0xf01ff
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x1001fbb4
pop esi
add esp, 0x1c
ret
lea edx, [esp + 4]
push edi
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, edi
pop edi
pop esi
add esp, 0x1c
ret

Function at 0x1001fbe0
Capabilities:
Delete service
Query service configuration

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
sub esp, 0x53c
push esi
push 0xf01ff
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x1001fc0a
pop esi
add esp, 0x53c
ret
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov edi, eax
test edi, edi
je 0x1001fc4a
lea edx, [esp + 8]
lea eax, [esp + 0xc]
push edx
push 0x538
push eax
push esi
mov dword [esp + 0x18], 0x538
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
je 0x1001fc4a
mov ecx, dword [esp + 0x18]
add ecx, 4
push ecx
call fcn.1001f9b0
add esp, 4
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, edi
pop edi
pop esi
add esp, 0x53c
ret
Function at 0x1001fcf0
Capabilities:
Compare security identifiers

Disassembly:
sub esp, 0x7c
lea ecx, [esp + 4]
push edi
xor edi, edi
lea eax, [esp + 0x1c]
push ecx
push 8
mov dword [esp + 0xc], edi
mov dword [esp + 0x14], eax
mov byte [esp + 0x1c], 0
mov byte [esp + 0x1d], 0
mov byte [esp + 0x1e], 0
mov byte [esp + 0x1f], 0
mov byte [esp + 0x20], 0
mov byte [esp + 0x21], 5
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x1001fd3d
pop edi
add esp, 0x7c
ret
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
push ebp
lea edx, [esp + 8]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push edx
push eax
push edi
push 2
push ecx
call esi
test eax, eax
jne 0x1001fd68
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1001fd9a
mov edx, dword [esp + 0xc]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
cmp ebp, edi
je 0x1001fd9e
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0xc]
push eax
push ecx
push ebp
push 2
push edx
call esi
test eax, eax
je 0x1001fd9e
mov esi, 1
jmp 0x1001fda0
mov ebp, dword [esp + 0x18]
xor esi, esi
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, edi
je 0x1001fdd9
lea ecx, [esp + 0x14]
lea edx, [esp + 0x1c]
push ecx
push edi
push edi
push edi
push edi
push edi
push edi
push 0x220
push 0x20
push 2
push edx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x1001fdd9
mov eax, 1
jmp 0x1001fddb
xor eax, eax
cmp eax, edi
mov dword [esp + 0x18], edi
je 0x1001fe1a
cmp dword [ebp], edi
jbe 0x1001fe1a
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_EqualSid]
lea esi, [ebp + 8]
mov eax, dword [esi - 4]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call ebx
test eax, eax
je 0x1001fe0e
test byte [esi], 4
je 0x1001fe0e
mov dword [esp + 0x1c], 1
mov eax, dword [ebp]
inc edi
add esi, 8
cmp edi, eax
jb 0x1001fdf2
pop ebx
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1001fe29
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
test ebp, ebp
je 0x1001fe34
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x18]
pop esi
pop ebp
pop edi
add esp, 0x7c
ret

Function at 0x10020db0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x10
lea eax, [esp]
mov dword [esp + 4], 1
push eax
push 0x20019
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionSetupOC_ManagerSubcomponents
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x10020e14
mov eax, 4
lea ecx, [esp + 8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], eax
lea edx, [esp + 4]
push ecx
mov ecx, dword [esp + 4]
lea eax, [esp + 0x10]
push edx
push eax
push 0
push str.ieaccess
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 4]
xor eax, eax
test ecx, ecx
setne al
add esp, 0x10
ret