joyce8/EMBER2024-capa huggingface dataset:
Function at 0x433001
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
mov eax, section..text
nop
nop
nop
push 4
nop
nop
nop
pop edi
nop
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
je 0x433072
nop
nop
mov ebx, 0x40de38
nop
nop
mov ecx, ebx
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
mov eax, ecx
div edi
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
nop
mov esi, 0x3f571150
nop
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
add eax, edi
nop
nop
loop 0x433060
nop
nop
nop
nop
mov eax, str.iou
nop
nop
cmp eax, 0
nop
nop
nop
nop
nop
nop
je 0x4330d2
nop
mov ebx, 0x4304d8
mov ecx, ebx
nop
nop
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
push eax
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
nop
div edi
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
nop
mov esi, 0x6ff02969
nop
nop
nop
nop
nop
xor dword [eax], esi
nop
add eax, edi
nop
nop
nop
nop
nop
nop
loop 0x4330c0
nop
nop
nop
nop
popal
nop
nop
jmp 0x431219
Function at 0x401293
Capabilities:
Get graphical window text

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0xe8
push ebx
push esi
mov esi, dword [ebp + 0x78]
push edi
push dword [ebp + 0x7c]
mov edi, dword [sym.imp.USER32.dll_GetDlgItem]
push dword [esi + 0x18]
call edi
push 9
push dword [esi + 0x18]
mov dword [ebp + 0x6c], eax
call edi
mov dword [ebp + 0x78], eax
push 0x64
lea eax, [ebp - 0x78]
push eax
push dword [ebp + 0x6c]
xor ebx, ebx
mov word [ebp - 0x78], bx
call dword [sym.imp.USER32.dll_GetWindowTextW]
lea eax, [ebp - 0x78]
push eax
push dword [ebp + 0x78]
call dword [sym.imp.USER32.dll_SetWindowTextW]
lea eax, [ebp + 0x64]
push eax
push dword [esi + 0x18]
mov dword [ebp + 0x64], ebx
mov dword [ebp + 0x68], ebx
call dword [sym.imp.USER32.dll_ClientToScreen]
xor eax, eax
lea edi, [ebp + 0x54]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp + 0x54]
push eax
push dword [ebp + 0x6c]
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ecx, dword [ebp + 0x58]
mov eax, dword [ebp + 0x54]
mov edi, dword [ebp + 0x60]
mov esi, dword [ebp + 0x5c]
push 4
sub edi, ecx
sub ecx, dword [ebp + 0x68]
push edi
sub esi, eax
sub eax, dword [ebp + 0x64]
push esi
push ecx
push eax
push ebx
push dword [ebp + 0x78]
mov dword [ebp + 0x54], eax
mov dword [ebp + 0x58], ecx
call dword [sym.imp.USER32.dll_SetWindowPos]
push 1
push edi
push esi
push dword [ebp + 0x58]
push dword [ebp + 0x54]
push dword [ebp + 0x78]
call dword [sym.imp.USER32.dll_MoveWindow]
push ebx
push dword [ebp + 0x6c]
call dword [sym.imp.USER32.dll_ShowWindow]
pop edi
pop esi
pop ebx
add ebp, 0x70
leave
ret

Function at 0x402e12
Capabilities:
Acquire debug privileges

Disassembly:
xor eax, eax
cmp byte [esp + 4], al
push esi
mov esi, ecx
mov byte [esi], al
je 0x402e42
test byte [0x4e3ddc], 4
jne 0x402e42
push eax
push 2
mov byte [esi], 1
or byte [0x4e3ddc], 4
push str.SeDebugPrivilege
call fcn.004139d3
add esp, 0xc
mov eax, esi
pop esi
ret 4
Function at 0x403a26
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
mov eax, dword [esi]
push edi
xor edi, edi
test eax, eax
je 0x403a3e
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
lea eax, [edi + 0x2d0]
push eax
mov ecx, esi
call fcn.004465d3
test edi, edi
jg 0x403ac9
mov eax, dword [esi]
and word [eax], 0
mov eax, dword [esi]
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push ebp
mov ebp, 0x208
push ebp
push eax
push 0x4c6d94
call ebx
mov edi, eax
test edi, edi
jg 0x403ab8
mov eax, dword [esi]
push ebp
push eax
push 0x4c6d88
call ebx
mov edi, eax
test edi, edi
jg 0x403ab8
push 0
push 0x24
push dword [esi]
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
test edi, edi
jle 0x403ac8
mov eax, dword [esi]
push 0x4c6d7c
lea eax, [eax + edi*2]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
add edi, 5
test edi, edi
jle 0x403ac8
mov eax, dword [esi]
mov word [eax + edi*2], 0x5c
mov eax, dword [esi]
inc edi
and word [eax + edi*2], 0
pop ebp
push dword [esi]
mov ebx, 0x4e3110
mov ecx, ebx
call fcn.0041c796
test edi, edi
jle 0x403ae7
push dword [esi]
call fcn.004b3b0b
test eax, eax
pop ecx
jne 0x403b15
push 0
push 0x24
push dword [esi]
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x4c6d6c
push dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push dword [esi]
mov ecx, ebx
call fcn.0041c796
push dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
mov eax, edi
pop edi
pop esi
pop ebx
ret
Function at 0x403f08
Capabilities:
Get geographical location
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
and word [ebp - 0x44], 0
push 0x20
lea eax, [ebp - 0x44]
push eax
push str.LC_ALL
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp word [ebp - 0x44], 0
jne 0x403f3e
push 0x20
lea eax, [ebp - 0x44]
push eax
push 0xb
push 0x800
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
cmp word [ebp - 0x44], 0
lea eax, [ebp - 0x44]
jne 0x403f4d
mov eax, 0x4c6f8c
push eax
mov ecx, 0x4e2c98
call fcn.004506c8
push dword [0x4e2c98]
call fcn.00447254
cmp eax, 1
pop ecx
jle 0x403f6f
mov word [0x4e6018], ax
leave
ret

Function at 0x4040c8
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push edi
mov edi, dword [sym.imp.USER32.dll_GetLastInputInfo]
lea eax, [ebp - 8]
xor ebx, ebx
push eax
mov dword [ebp - 8], 8
mov dword [ebp - 4], ebx
call edi
mov eax, dword [ebp - 4]
mov ecx, eax
sub ecx, dword [0x4e2c4c]
test ecx, ecx
jle 0x4040fb
mov dword [0x4e2c4c], eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov dword [0x4e2c4c], eax
jmp 0x404133
lea eax, [ebp - 8]
push eax
mov dword [ebp - 4], ebx
call edi
call esi
mov ecx, eax
sub ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 8]
jb 0x40412b
sub eax, dword [0x4e2c4c]
cmp eax, dword [ebp + 8]
jae 0x40413b
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0x4e12e4], bl
jg 0x40410b
mov eax, dword [ebp - 4]
mov ecx, eax
sub ecx, dword [0x4e2c4c]
pop esi
test ecx, ecx
jle 0x404150
mov dword [0x4e2c4c], eax
xor eax, eax
cmp byte [0x4e12e4], bl
pop edi
setg al
pop ebx
leave
ret

Function at 0x404325
Capabilities:
Terminate process

Disassembly:
cmp byte [0x4e12e4], 2
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x14
pop esi
je 0x40433c
push esi
call edi
cmp dword [0x4e2c5c], 0
je 0x404357
push 0x1e
pop esi
jmp 0x404357
cmp dword [0x4e2c50], 0
je 0x40435a
push 0xa
call edi
dec esi
jns 0x40434a
mov eax, dword [0x4e2c50]
test eax, eax
pop edi
pop esi
je 0x404378
push 0
push eax
mov dword [0x4e2c50], 0
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov byte [0x4e12e4], 0xff
ret
Function at 0x404380
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp + 0xc]
mov esi, 0x8000004
push 0x64
push ebx
push esi
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov edi, eax
cmp edi, ebx
mov byte [ebp - 1], 1
je 0x4043c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4043d2
mov byte [ebp - 1], bl
jmp 0x4043d2
push dword [ebp + 0xc]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov edi, eax
cmp edi, ebx
je 0x40440e
push ebx
push ebx
push ebx
push 6
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push edi
mov dword [0x4e2c64], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x4e2c64]
cmp eax, ebx
je 0x40440e
cmp byte [ebp - 1], bl
je 0x404409
push 0x64
push ebx
push eax
call fcn.004b4520
mov eax, dword [0x4e2c64]
add esp, 0xc
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x406034
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor edi, edi
cmp dword [ebp + 8], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
jne 0x406050
lea ebx, [ebp - 0x14]
cmp dword [ebp + 0xc], edi
mov esi, dword [ebp + 0xc]
jne 0x40606e
cmp dword [ebp + 8], edi
lea esi, [ebp - 0x10]
je 0x4061f9
push dword [ebx]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x26c
mov ecx, ebx
call fcn.004465d3
push esi
call fcn.00403a26
mov edi, eax
lea eax, [edi + 1]
push eax
push dword [esi]
mov dword [ebp - 0x18], edi
push dword [ebx]
call fcn.00405c0c
add esp, 0x10
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
and dword [ebp - 4], 0
and dword [ebp - 0xc], 0
mov dword [ebp - 8], 0xc7
jmp 0x4060b1
mov edi, dword [ebp - 0x18]
cmp dword [ebp + 8], 0
je 0x40615c
mov eax, dword [ebx]
lea eax, [eax + edi*2]
push 0x4c7380
mov dword [ebp - 0x1c], eax
call fcn.004425fc
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push dword [ebp + 0x14]
push str.pecmd__s._lu._lu_s_
push dword [ebp - 0x1c]
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [ebx]
add esp, 0x18
xor edi, edi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40611b
push edi
push edi
push 5
mov ecx, 0x4e3110
call fcn.0041195d
dec dword [ebp - 8]
jns 0x4060ae
jmp 0x4061d5
cmp dword [ebp + 0xc], edi
mov dword [ebp - 0xc], 1
je 0x4061f9
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
lea eax, [edi + 1]
push eax
push dword [ebx]
mov dword [ebp + 8], eax
push dword [esi]
call fcn.00405c0c
mov eax, dword [esi]
mov word [eax + edi*2], 0x5c
mov eax, dword [ebp + 8]
mov ecx, dword [esi]
add esp, 0xc
and word [ecx + eax*2], 0
jmp 0x40615e
mov eax, edi
and dword [ebp + 8], 0
add eax, eax
mov dword [ebp + 0xc], eax
push dword [ebp + 0x18]
mov edi, dword [esi]
push dword [ebp + 8]
add edi, dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push dword [ebp + 0x14]
push str.pecmd__s._lu._lu_s
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [esi]
add esp, 0x18
xor edi, edi
push edi
push 0x80
push 1
push edi
push edi
push 0x40000000
push eax
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], edi
call fcn.00405c6d
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x4061d0
push edi
push edi
push 5
mov ecx, 0x4e3110
call fcn.0041195d
inc dword [ebp + 8]
cmp dword [ebp + 8], 0xc8
jl 0x406167
mov eax, dword [esi]
and word [eax], di
cmp dword [ebp - 0xc], edi
jne 0x4061da
mov eax, dword [ebx]
mov word [eax], di
mov eax, dword [ebp + 0x10]
cmp eax, edi
je 0x4061e8
mov ecx, dword [ebp - 4]
mov dword [eax], ecx
jmp 0x4061f6
cmp dword [ebp - 4], edi
je 0x4061f6
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 4]
lea ecx, [ebp - 0x10]
call fcn.0043fe25
lea ecx, [ebp - 0x14]
call fcn.0043fe25
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x406210
Capabilities:
Get common file path
Get startup folder

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
push ebx
push esi
push edi
push str.PECMD:MSGSVR:HWND
xor ebx, ebx
push ebx
call fcn.00404380
pop ecx
pop ecx
call fcn.00403f08
mov byte [0x4e2c3e], 1
call fcn.00406378
call fcn.00441e12
push str.TaskbarButtonCreated
call dword [sym.imp.USER32.dll_RegisterWindowMessageW]
push ebx
push 0x24
pop edi
mov dword [0x4e2c40], eax
push edi
lea eax, [ebp - 0x12c]
push eax
push ebx
mov byte [ebp - 0x12c], bl
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push str.System32Kernel32
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.user32
mov dword [0x4e3010], eax
mov dword [ebp - 4], eax
call esi
push str.GDI32
mov dword [0x4e300c], eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4c7430
push dword [ebp - 4]
mov dword [0x4e3014], eax
call esi
push 7
pop ecx
mov dword [ebp - 0x28], edi
push str.GetNativeSystemInfo
push dword [ebp - 4]
mov dword [0x4e2be4], eax
xor eax, eax
mov dword [ebp - 0x24], ebx
lea edi, [ebp - 0x20]
rep stosd dword es:[edi], eax
call esi
cmp eax, ebx
je 0x4062e8
lea ecx, [ebp - 0x28]
push ecx
call eax
call fcn.00442da6
shrd eax, edx, 0x10
shr edx, 0x10
cmp word [ebp - 0x28], bx
je 0x406338
cmp eax, 0x50000
jbe 0x406338
push str.Wow64RevertWow64FsRedirection
push dword [ebp - 4]
call esi
push str.Wow64DisableWow64FsRedirection
push dword [ebp - 4]
mov dword [0x4e2c38], eax
call esi
cmp dword [0x4e2c38], ebx
mov dword [0x4e2c34], eax
jne 0x40632d
mov dword [0x4e2c34], ebx
mov bl, 1
mov word [0x4e2c20], 0x100
movsx eax, bl
push str.bX64
push eax
mov esi, 0x4e3110
push esi
mov byte [0x4e2c3d], bl
call fcn.00448c7f
push str.ptrlen
push 4
push esi
call fcn.00448c7f
push str.WM_TASKBARBUTTONCREATED
push dword [0x4e2c40]
push esi
call fcn.00448c7f
add esp, 0x24
pop edi
pop esi
pop ebx
leave
ret
Function at 0x406379
Capabilities:
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
mov dword [ebp - 8], eax
lea ecx, [eax + 8]
push ebx
mov bx, word [eax]
mov dword [ebp - 8], ecx
mov ax, word [ecx]
call fcn.004b1b03
test al, al
jne 0x40639d
inc ecx
inc ecx
mov dword [ebp - 8], ecx
push 0x63
lea eax, [ebp - 0x78]
push eax
push str.DEBUGMDG
mov byte [ebp - 0x78], 0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
cmp byte [ebp - 0x78], 0x31
jne 0x4063bf
mov byte [0x4e2c48], 1
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push dword [ebp - 8]
and dword [ebp - 0x10], 0
lea ecx, [ebp - 0x14]
mov dword [0x4e2c4c], eax
call fcn.004505eb
lea ecx, [ebp - 0xc]
call fcn.0044658e
push 1
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x14]
mov ecx, 0x4e3110
call fcn.00457f62
push dword [ebp - 0xc]
lea ecx, [ebp - 0x10]
call fcn.004506c8
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0xc]
mov dword [ebp - 8], eax
call fcn.0043fe25
lea ecx, [ebp - 0x14]
call fcn.0043fe25
mov ecx, dword [ebp - 8]
call fcn.0040415f
push str._InstallService
mov edi, eax
push 0xf
pop esi
mov dword [ebp - 8], edi
call fcn.00402de3
test al, al
pop ecx
pop edi
pop esi
je 0x406460
push 0x1e
push str._Service
push dword [ebp - 8]
mov byte [ebp - 1], 0x49
call fcn.00414839
mov ecx, dword [ebp - 8]
add esp, 0xc
add ecx, 0x1e
call fcn.0040415f
mov dword [ebp - 8], eax
jmp 0x40647b
push 8
lea eax, [ebp - 8]
push eax
push 0x4c74b8
call fcn.004485c7
add esp, 0xc
test al, al
je 0x4064da
mov byte [ebp - 1], 0x53
cmp bx, 0x22
jne 0x4064b5
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [ebp - 8]
lea ecx, [edx + eax*2 - 2]
cmp ecx, edx
jbe 0x4064b5
mov ax, word [ecx]
call fcn.004b1b03
test al, al
je 0x4064a7
dec ecx
dec ecx
cmp ecx, edx
ja 0x406495
cmp ecx, edx
jbe 0x4064b5
cmp word [ecx], 0x22
jne 0x4064b5
and word [ecx], 0
sub dword [ebp - 8], 2
movsx ax, byte [ebp - 1]
mov ecx, dword [ebp - 8]
mov word [ecx], ax
sub dword [ebp - 8], 2
mov eax, dword [ebp - 8]
mov word [eax], 0x7e
push dword [ebp - 8]
call fcn.0040f9a8
jmp 0x4064fa
push 0xe
lea eax, [ebp - 8]
push eax
push str._RemoveService
call fcn.004485c7
add esp, 0xc
test al, al
pop ebx
je 0x406503
push dword [ebp - 8]
call fcn.00406796
pop ecx
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
lea ecx, [ebp - 0x10]
call fcn.0043fe25
xor eax, eax
leave
ret
Function at 0x40659b
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x828
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
mov dword [0x4e2c54], eax
cmp word [eax], 0x7e
push edi
mov dword [ebp - 0x14], 0x100
mov byte [ebp - 1], bl
jne 0x4065d5
inc eax
inc eax
mov dword [0x4e2c54], eax
cmp word [eax], 0x49
sete byte [ebp - 1]
inc eax
inc eax
mov dword [ebp + 8], eax
mov dword [ebp - 0x10], eax
lea eax, [ebp + 8]
push eax
call fcn.00405c44
pop ecx
mov ecx, dword [ebp + 8]
mov esi, ecx
sub esi, dword [ebp - 0x10]
mov eax, 0x400
sar esi, 1
cmp esi, eax
jle 0x4065f7
mov esi, eax
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0xc], ecx
call fcn.0043fe57
push 6
push dword [ebp - 0xc]
push 0x4c7528
call fcn.00441220
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
add esp, 0x10
test al, al
je 0x40664c
mov eax, dword [ebp - 0xc]
add eax, 0xc
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
mov dword [ebp - 0x14], ebx
call fcn.0043fe57
pop ecx
push dword [ebp + 8]
call edi
inc eax
add eax, eax
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
call fcn.004147ef
add esp, 0xc
add esi, esi
push esi
push dword [ebp - 0x10]
lea eax, [ebp - 0x828]
push eax
call fcn.00414839
add esp, 0xc
push dword [ebp - 0x10]
mov word [ebp + esi - 0x828], bx
mov byte [0x4e6003], bl
call edi
mov esi, eax
inc esi
lea eax, [esi + 0x226]
push eax
lea ecx, [ebp - 8]
call fcn.004465ac
mov eax, dword [ebp - 8]
push 0x1cc
add eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ecx, eax
cmp ecx, ebx
jle 0x406789
mov eax, dword [ebp - 8]
mov word [eax + ecx*2 + 2], bx
mov eax, dword [ebp - 8]
lea edi, [eax + ecx*2 + 2]
mov dword [ebp + 8], edi
lea edx, [eax + 2]
xor edi, edi
mov word [eax], 0x22
jmp 0x4066d2
mov ax, word [edx]
call fcn.004b1b03
test al, al
je 0x4066d0
xor edi, edi
inc edi
inc edx
inc edx
cmp edx, dword [ebp + 8]
jb 0x4066c1
cmp di, bx
mov edx, dword [ebp - 8]
lea eax, [edx + 2]
mov dword [ebp + 8], eax
je 0x4066f3
dec eax
dec eax
mov word [edx + ecx*2 + 2], 0x22
inc ecx
mov dword [ebp + 8], eax
inc ecx
push 0x1e
lea edi, [eax + ecx*2]
push 0x4c7508
push edi
call fcn.00414839
push esi
push dword [ebp - 0x10]
add edi, 0x1e
push edi
call fcn.00405c0c
add esp, 0x18
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
cmp edi, ebx
je 0x406786
mov eax, dword [ebp - 0x14]
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 8]
or eax, 0x10
push ebx
push 2
push eax
push 0xf01ff
lea eax, [ebp - 0x828]
push eax
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
cmp eax, ebx
je 0x406786
cmp byte [ebp - 1], bl
je 0x406786
push eax
call esi
push 0x20000000
lea eax, [ebp - 0x828]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x406786
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push dword [ebp + 8]
call esi
push edi
call esi
lea ecx, [ebp - 8]
call fcn.0043fe25
pop edi
pop esi
pop ebx
leave
ret
Function at 0x406796
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
push ebx
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
mov edx, esi
xor ebx, ebx
jmp 0x4067b8
call fcn.004b1b03
test al, al
jne 0x4067c0
inc esi
inc esi
mov ax, word [esi]
cmp ax, bx
jne 0x4067ad
mov eax, esi
sub eax, edx
sar eax, 1
mov ecx, 0x400
cmp eax, ecx
jle 0x4067d1
mov eax, ecx
lea edi, [eax + eax]
push edi
push edx
lea eax, [ebp - 0x824]
push eax
call fcn.00414839
add esp, 0xc
mov word [ebp + edi - 0x824], bx
jmp 0x4067f1
inc esi
inc esi
mov ax, word [esi]
call fcn.004b1b03
test al, al
jne 0x4067ef
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 4], eax
je 0x40685f
push 0x10020
lea ecx, [ebp - 0x824]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
mov dword [ebp + 8], eax
je 0x40685f
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, 0xc8
push edi
call esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push dword [ebp + 8]
call ebx
push edi
call esi
jmp 0x406865
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 4]
call ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x406955
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7f8
push ebx
push esi
push edi
mov esi, str.service:
lea edi, [ebp - 0x7f8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
mov ecx, 0x1f9
lea edi, [ebp - 0x7e6]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 8]
call fcn.0040415f
mov edx, eax
mov ecx, edx
call fcn.00404226
mov esi, eax
sub esi, edx
sar esi, 1
mov eax, 0x3e8
cmp esi, eax
jl 0x4069a3
mov esi, eax
push esi
push edx
lea eax, [ebp - 0x7e8]
push eax
call fcn.00405c0c
add esp, 0xc
lea eax, [ebp - 0x7f8]
push eax
push 0x64
xor edi, edi
push edi
push 0x8000004
push edi
push 0xffffffffffffffff
mov word [ebp + esi*2 - 0x7e8], di
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ebx, eax
cmp ebx, edi
je 0x406a18
push edi
push edi
push edi
push 6
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, edi
je 0x406a18
push 0x64
push edi
push esi
call fcn.00404172
mov dword [esi], 0xffffffff
mov dword [esi + 8], edi
lea eax, [esi + 4]
add esp, 0xc
mov dword [0x4e111c], eax
mov dword [0x4e2c5c], esi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4091f7
Capabilities:
Terminate process

Disassembly:
push ebx
push esi
mov esi, eax
push 0
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [esi]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4e2c50], 0
call ebx
and dword [esi], 0
test edi, edi
je 0x409236
mov eax, dword [edi]
test eax, eax
je 0x409236
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateJobObject]
push dword [edi]
call ebx
and dword [edi], 0
cmp byte [esp + 0x10], 0
je 0x40924e
push 1
push 0
push str.shutdown__a
call fcn.0040650f
add esp, 0xc
push dword [0x4e2ccc]
call fcn.004042a4
cmp byte [esp + 0x10], 0
pop ecx
je 0x40927a
push 3
pop esi
push 0
call dword [sym.imp.ADVAPI32.dll_AbortSystemShutdownW]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
dec esi
jne 0x409264
pop esi
pop ebx
ret