joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40a6c0
Capabilities:
Access peb ldr_data
Log keystrokes via polling

Disassembly:
push 0xffffffffffffffff
push 0x4e7e58
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
push ebp
lea ecx, [esp + 0xc]
call fcn.004c7894
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0xc]
push eax
xor ebx, ebx
push ecx
mov dword [esp + 0x30], ebx
call fcn.004098e0
mov ebp, eax
add esp, 8
cmp ebp, ebx
mov dword [esp + 8], ebp
jg 0x40a729
lea ecx, [esp + 0xc]
mov dword [esp + 0x28], 0xffffffff
call fcn.004c78e6
mov eax, ebp
pop ebp
pop ebx
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
add esp, 0x24
ret
cmp dword [esp + 0x38], ebx
push esi
push edi
je 0x40a7cc
mov esi, dword [esp + 0x3c]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
cmp edi, ebx
jle 0x40a74f
cmp word [esi + edi*2 - 2], 0x5c
jne 0x40a74f
dec edi
cmp ebp, ebx
jle 0x40a7a6
mov ebp, dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
lea esp, [esp]
test ebx, ebx
jl 0x40a7d4
cmp ebx, dword [esp + 0x1c]
jge 0x40a7d4
mov edx, dword [esp + 0x18]
mov esi, dword [edx + ebx*4]
mov eax, dword [esp + 0x3c]
push edi
push esi
push eax
call ebp
test eax, eax
jne 0x40a7cc
cmp word [esi + edi*2], 0x5c
jne 0x40a7cc
push 0x5c
lea ecx, [esi + edi*2 + 2]
push ecx
call dword [sym.imp.SHLWAPI.dll_StrChrW]
test eax, eax
je 0x40a79d
cmp word [eax + 2], 0
jne 0x40a7cc
mov eax, dword [esp + 0x10]
inc ebx
cmp ebx, eax
jl 0x40a760
lea ecx, [esp + 0x14]
mov dword [esp + 0x30], 0xffffffff
call fcn.004c78e6
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
add esp, 0x24
ret
mov eax, dword [esp + 0x1c]
test eax, eax
jg 0x40a7d9
jmp fcn.004c6440
mov edx, dword [esp + 0x18]
mov eax, dword [edx]
movzx eax, word [eax]
cmp ax, 0x61
jb 0x40a7f3
cmp ax, 0x7a
jb 0x40a7f3
and eax, 0xffdf
mov ebp, dword [esp + 0x3c]
xor ecx, ecx
mov cx, word [ebp]
cmp cx, 0x61
jb 0x40a80f
cmp cx, 0x7a
jb 0x40a80f
and ecx, 0xffdf
mov edi, dword [sym.imp.USER32.dll_GetKeyState]
xor edx, edx
cmp ax, cx
sete dl
push 0x11
inc edx
mov esi, edx
call edi
test ah, ah
jns 0x40a82d
mov esi, 1
push 0x10
call edi
test ah, ah
jns 0x40a83a
mov esi, 2
push 0x200
push esi
lea eax, [esp + 0x1c]
push ebp
push eax
call fcn.0040a3c0
add esp, 0x10
lea ecx, [esp + 0x14]
mov dword [esp + 0x30], 0xffffffff
call fcn.004c78e6
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x24
ret
Function at 0x40d010
Capabilities:
Terminate process

Disassembly:
mov al, byte [0x51be78]
test al, al
push esi
mov esi, ecx
jg 0x40d0bd
push 0
call fcn.00407130
mov al, byte [esi + 0xd4]
add esp, 4
test al, al
jle 0x40d03c
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov eax, dword [esi + 0x1c]
push edi
mov edi, dword [sym.imp.USER32.dll_SetTimer]
push 0
push 0x7530
push 0x68
push eax
call edi
mov byte [esi + 0xd4], 1
mov ecx, dword [0x51c63c]
test ecx, ecx
je 0x40d073
mov edx, dword [ecx]
push str.THREAD__wait_OnExit
call dword [edx + 4]
mov ecx, dword [0x51c63c]
mov eax, dword [esi + 0xd8]
test eax, eax
push 0
jle 0x40d085
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 5
push 0xffffffffffffffff
push ecx
call fcn.00417a8e
add esp, 0x10
mov dword [0x51c63c], 0
mov eax, dword [esi + 0x1c]
push 0x68
push eax
call dword [sym.imp.USER32.dll_KillTimer]
mov ecx, dword [esi + 0x1c]
push 0
push 0x64
push 0x68
push ecx
call edi
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
pop edi
pop esi
ret
Function at 0x40f0f0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x51f9f8]
sub esp, 0x208
cmp eax, 1
push ebx
push ebp
push esi
mov ebx, ecx
jle 0x40f121
mov cl, byte [0x51c648]
test cl, cl
jne 0x40f121
mov ecx, dword [0x51fa00]
mov esi, dword [ecx + eax*4 - 4]
test esi, esi
je 0x40f121
mov ebp, esi
jmp 0x40f13d
lea esi, [esp + 0xc]
push 0x104
mov edx, esi
push edx
push 0x4f0208
mov ebp, 1
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push edi
mov edi, dword [ebx + 0x93c]
add edi, 0xb0
test esi, esi
jne 0x40f152
xor eax, eax
jmp 0x40f15b
push esi
call fcn.004b3af1
add esp, 4
push eax
push esi
mov ecx, edi
call fcn.00402280
mov eax, dword [ebx + 0x93c]
lea ecx, [eax + 0xb0]
mov eax, dword [ecx]
cmp word [eax], 0
pop edi
je 0x40f191
cmp word [eax + 2], 0x3a
jne 0x40f191
cmp word [eax + 4], 0
jne 0x40f191
push 0x4efeb0
call fcn.00403f10
mov ecx, dword [ebx + 0x938]
push 0
push 0
push ebp
call fcn.0040a960
pop esi
pop ebp
pop ebx
add esp, 0x208
ret

Function at 0x4137ca
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 0x416b1a
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push edi
xor eax, eax
cmp word [0x522010], 0
mov byte [ebp - 0x18], 0
lea edi, [ebp - 0x17]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop edi
jne 0x416b65
push 0x18
lea eax, [ebp - 0x18]
push eax
push 0xb
push 0x800
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
lea eax, [ebp - 0x18]
push eax
call fcn.0044a3a0
cmp eax, 1
pop ecx
jle 0x416b65
mov word [0x522010], ax
leave
ret

Function at 0x416c04
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 [0x51c75c]
test ecx, ecx
jle 0x416c37
mov dword [0x51c75c], eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov dword [0x51c75c], eax
jmp 0x416c6f
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 0x416c67
sub eax, dword [0x51c75c]
cmp eax, dword [ebp + 8]
jae 0x416c77
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0x519300], bl
jg 0x416c47
mov eax, dword [ebp - 4]
mov ecx, eax
sub ecx, dword [0x51c75c]
pop esi
test ecx, ecx
jle 0x416c8c
mov dword [0x51c75c], eax
xor eax, eax
cmp byte [0x519300], bl
pop edi
setg al
pop ebx
leave
ret

Function at 0x416e61
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push edi
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x10], ebx
lea edi, [ebp - 0xc]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0xf
xor eax, eax
cmp byte [ebp + 0x10], bl
pop ecx
lea edi, [ebp - 0x4c]
mov dword [ebp - 0x54], 0x44
mov dword [ebp - 0x50], ebx
rep stosd dword es:[edi], eax
je 0x416e97
or dword [ebp - 0x28], 1
mov word [ebp - 0x24], bx
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x54]
push eax
push ebx
push ebx
push ebx
push 1
push ebx
push ebx
push dword [ebp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x416ed6
push esi
push dword [ebp - 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
cmp byte [ebp + 0xc], bl
je 0x416ed0
push 0xffffffffffffffff
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x10]
call esi
pop esi
pop edi
pop ebx
leave
ret

Function at 0x416eda
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
push 0x3ff
lea eax, [ebp - 0x400]
push eax
push str.SHOWEWFMSG
mov byte [ebp - 0x400], 0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
cmp byte [ebp - 0x400], 0x31
jne 0x416f1c
push 0
push 0x4f39ec
push dword [ebp + 8]
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
leave
ret
Function at 0x416f1e
Capabilities:
Terminate process

Disassembly:
cmp byte [0x519300], 2
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x14
pop esi
je 0x416f35
push esi
call edi
cmp dword [0x51c768], 0
je 0x416f50
push 0x1e
pop esi
jmp 0x416f50
cmp dword [0x51c760], 0
je 0x416f53
push 0xa
call edi
dec esi
jns 0x416f43
mov eax, dword [0x51c760]
test eax, eax
pop edi
pop esi
je 0x416f71
push 0
push eax
mov dword [0x51c760], 0
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov byte [0x519300], 0xff
ret

Function at 0x416f79
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 0x416fba
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x416fcb
mov byte [ebp - 1], bl
jmp 0x416fcb
push dword [ebp + 0xc]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov edi, eax
cmp edi, ebx
je 0x417007
push ebx
push ebx
push ebx
push 6
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push edi
mov dword [0x51c770], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x51c770]
cmp eax, ebx
je 0x417007
cmp byte [ebp - 1], bl
je 0x417002
push 0x64
push ebx
push eax
call fcn.004b4840
mov eax, dword [0x51c770]
add esp, 0xc
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x417303
Capabilities:
Get file version info

Disassembly:
mov eax, 0x4e86f0
call fcn.004b48a0
sub esp, 0x14
push ebx
push esi
push edi
xor esi, esi
push 0x169
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x20], esi
call fcn.004494b0
mov ebx, dword [ebp - 0x10]
push 0x104
push dword [ebp + 0xc]
add ebx, 0xc8
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea eax, [ebp - 0x14]
push eax
push ebx
mov dword [ebp - 0x14], esi
call sub.VERSION.dll_GetFileVersionInfoSizeW
cmp eax, esi
mov dword [ebp - 0x1c], eax
je 0x4173cc
push eax
push 2
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
push edi
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
push ebx
call sub.VERSION.dll_GetFileVersionInfoW
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x4f036c
push edi
call sub.VERSION.dll_VerQueryValueW
mov eax, dword [ebp - 0x18]
mov cx, word [eax + 0x12]
mov dx, word [eax + 0x10]
mov di, word [eax + 0x16]
movzx eax, word [eax + 0x14]
push eax
movzx eax, di
push eax
movzx eax, dx
push eax
movzx eax, cx
push eax
push 0x4f3a10
push dword [ebp - 0x10]
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor esi, esi
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp + 8]
mov dword [edi], eax
mov dword [ebp - 0x10], esi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x20], 1
call fcn.00443880
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x417bd9
Capabilities:
Enumerate disk volumes
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd5c
mov eax, dword [ebp + 0xc]
and eax, dword [ebp + 0x10]
push esi
xor esi, esi
cmp eax, 0xffffffff
push edi
mov word [ebp - 0xd5c], si
je 0x417dae
mov edi, 0x514
push edi
lea eax, [ebp - 0xd5c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
cmp eax, 0xffffffff
mov dword [ebp + 0x10], eax
je 0x417d6b
push edi
lea eax, [ebp - 0xd5c]
push eax
push dword [ebp + 0x10]
mov word [ebp - 0xd5c], si
call dword [sym.imp.KERNEL32.dll_FindNextVolumeW]
test eax, eax
je 0x417d62
push ebx
lea eax, [ebp - 0xd5c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
mov word [ebp + eax*2 - 0xd5e], si
call dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
push 0x80
push 3
push esi
push 3
push SysReAllocStringLen
lea eax, [ebp - 0xd5c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x417d3d
xor eax, eax
mov dword [ebp - 0x330], esi
mov ecx, 0xc7
lea edi, [ebp - 0x32c]
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x10]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push esi
mov dword [ebp - 4], 0xffffff9c
stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
or dword [ebp - 0xc], 0xffffffff
push esi
lea eax, [ebp - 0x330]
push eax
push 0xc
lea eax, [ebp - 0x10]
push eax
push esi
push esi
push 0x2d1080
push ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
movsx eax, word [ebp - 0xc]
jne 0x417cd4
mov eax, dword [ebp - 4]
cmp dword [ebp + 8], eax
jne 0x417d32
mov edi, dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push ebx
mov dword [ebp - 4], esi
call edi
push ebx
call edi
push ebx
call edi
push ebx
call edi
xor edi, edi
push esi
lea eax, [ebp - 4]
push eax
push esi
push esi
push esi
push esi
push 0x90018
push ebx
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x417d17
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
dec edi
jns 0x417cf0
mov eax, dword [0x51cf50]
cmp eax, 0x1f4
jge 0x417d32
mov dword [eax*4 + 0x51c780], ebx
inc eax
mov dword [0x51cf50], eax
xor ebx, ebx
cmp ebx, esi
je 0x417d3d
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x514
lea eax, [ebp - 0xd5c]
push eax
push dword [ebp + 0x10]
mov word [ebp - 0xd5c], si
call dword [sym.imp.KERNEL32.dll_FindNextVolumeW]
test eax, eax
jne 0x417c3c
pop ebx
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_FindVolumeClose]
pop edi
pop esi
leave
ret
dec dword [0x51cf50]
mov eax, dword [0x51cf50]
lea eax, [eax*4 + 0x51c780]
mov edi, dword [eax]
cmp edi, esi
mov dword [eax], esi
je 0x417dae
push esi
lea eax, [ebp + 0x10]
push eax
push esi
push esi
push esi
push esi
push 0x9001c
push edi
mov dword [ebp + 0x10], esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x51cf50], esi
jg 0x417d6f
jmp 0x417d6b
Function at 0x418254
Capabilities:
Query environment variable
Terminate process

Disassembly:
mov eax, 0x4e8772
call fcn.004b48a0
sub esp, 0x70
mov eax, dword [ebp + 8]
mov dword [ebp + 8], eax
push ebx
lea ecx, [eax + 8]
push edi
mov di, word [eax]
mov dword [ebp + 8], ecx
mov ax, word [ecx]
call fcn.0041ed7f
test al, al
jne 0x418283
inc ecx
inc ecx
mov dword [ebp + 8], ecx
push 0x63
lea eax, [ebp - 0x7c]
push eax
xor ebx, ebx
push str.DEBUGMDG
mov byte [ebp - 0x7c], bl
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
cmp byte [ebp - 0x7c], 0x31
jne 0x4182a6
mov byte [0x51c759], 1
push esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x51c75c], eax
mov dword [ebp - 0x14], ebx
push dword [ebp + 8]
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], ebx
call fcn.00456550
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.00449480
push 1
push ebx
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x18]
mov ecx, 0x51d2a0
mov byte [ebp - 4], 2
call fcn.00452ca0
push dword [ebp - 0x10]
lea ecx, [ebp - 0x14]
call fcn.004566f0
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x10]
mov dword [ebp + 8], eax
mov byte [ebp - 4], 1
call fcn.00443880
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], bl
call fcn.00443880
mov ecx, dword [ebp + 8]
call fcn.00416c9b
push 0x1e
push eax
push str._InstallService
mov dword [ebp + 8], eax
mov esi, eax
call fcn.004b4c10
add esp, 0xc
test eax, eax
jne 0x418366
movzx esi, word [esi + 0x1e]
mov eax, esi
call fcn.0041ed7f
test al, al
jne 0x418344
cmp si, bx
jne 0x418366
push 0x1e
push 0x4f3ca8
push dword [ebp + 8]
call fcn.004b4dd0
mov ecx, dword [ebp + 8]
add esp, 0xc
add ecx, 0x1e
call fcn.00416c9b
mov dword [ebp + 8], eax
jmp 0x41837d
push 8
lea eax, [ebp + 8]
push eax
push 0x4f3c9c
call fcn.0044b960
add esp, 0xc
test al, al
je 0x4183c0
cmp di, 0x22
jne 0x4183b6
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 0x4183b6
mov ax, word [ecx]
call fcn.0041ed7f
test al, al
je 0x4183a9
dec ecx
dec ecx
cmp ecx, edx
ja 0x418397
cmp ecx, edx
jbe 0x4183b6
cmp word [ecx], 0x22
jne 0x4183b6
mov word [ecx], bx
push dword [ebp + 8]
call fcn.0041eb73
jmp 0x4183e0
push 0xe
lea eax, [ebp + 8]
push eax
push 0x4f3c8c
call fcn.0044b960
add esp, 0xc
test al, al
pop esi
je 0x4183e8
push dword [ebp + 8]
call fcn.00418ea8
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00443880
mov ecx, dword [ebp - 0xc]
pop edi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
leave
ret 4
Function at 0x418406
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 [0x51c760], 0
call ebx
and dword [esi], 0
test edi, edi
je 0x418445
mov eax, dword [edi]
test eax, eax
je 0x418445
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 0x41845d
push 1
push 0
push str.shutdown__a
call fcn.00416e61
add esp, 0xc
push dword [0x51cfc4]
call fcn.00416de0
cmp byte [esp + 0x10], 0
pop ecx
je 0x418489
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 0x418473
pop esi
pop ebx
ret
Function at 0x418ce6
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
mov eax, 0x4e871c
call fcn.004b48a0
sub esp, 0x820
push ebx
push esi
push edi
mov edi, ecx
xor eax, eax
mov dword [0x51c764], ecx
mov dword [ebp - 0x18], edi
xor ebx, ebx
jmp 0x418d15
call fcn.0041ed7f
test al, al
jne 0x418d1d
inc ecx
inc ecx
mov ax, word [ecx]
cmp ax, bx
jne 0x418d0a
sub ecx, edi
sar ecx, 1
mov eax, 0x400
cmp ecx, eax
jle 0x418d2c
mov ecx, eax
lea esi, [ecx + ecx]
push esi
lea eax, [ebp - 0x82c]
push edi
push eax
call fcn.004b4dd0
add esp, 0xc
push edi
mov word [ebp + esi - 0x82c], bx
mov byte [0x522003], bl
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
inc esi
lea eax, [esi + 0x226]
push eax
lea ecx, [ebp - 0x10]
call fcn.004494b0
mov eax, dword [ebp - 0x10]
push 0x1cc
add eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ecx, eax
cmp ecx, ebx
jle 0x418e8d
mov eax, dword [ebp - 0x10]
mov word [eax + ecx*2 + 2], bx
mov eax, dword [ebp - 0x10]
lea edi, [eax + ecx*2 + 2]
mov dword [ebp - 0x14], edi
lea edx, [eax + 2]
xor edi, edi
mov word [eax], 0x22
jmp 0x418db3
mov ax, word [edx]
call fcn.0041ed7f
test al, al
je 0x418db1
xor edi, edi
inc edi
inc edx
inc edx
cmp edx, dword [ebp - 0x14]
jb 0x418da2
cmp di, bx
mov edx, dword [ebp - 0x10]
lea eax, [edx + 2]
mov dword [ebp - 0x14], eax
je 0x418dd4
dec eax
dec eax
mov word [edx + ecx*2 + 2], 0x22
inc ecx
mov dword [ebp - 0x14], eax
inc ecx
push 0x1e
lea edi, [eax + ecx*2]
push 0x4f3e3c
push edi
call fcn.004b4dd0
push esi
push dword [ebp - 0x18]
add edi, 0x1e
push edi
call fcn.00417dcd
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 0x418e7f
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp - 0x14]
lea eax, [ebp - 0x82c]
push ebx
push 2
push 0x110
push 0xf01ff
push eax
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
cmp eax, ebx
je 0x418e7f
push eax
call esi
push 0x20000000
lea eax, [ebp - 0x82c]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp eax, ebx
mov dword [ebp - 0x18], eax
je 0x418e78
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x418e66
push 0x4f3e30
jmp 0x418e6b
push 0x4f3e24
call fcn.00416eda
pop ecx
push dword [ebp - 0x18]
call esi
jmp 0x418e8a
push 0x4f3e18
jmp 0x418e84
push 0x4f3e0c
call fcn.00416eda
pop ecx
push edi
call esi
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00443880
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret