joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401854
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [ebp + 8]
cmp edi, dword [ebp + 0xc]
je 0x40188f
push esi
push dword [edi]
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x401886
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add edi, 4
cmp edi, dword [ebp + 0xc]
jne 0x401861
pop esi
lea ecx, [ebp + 8]
pop edi
pop ebp
jmp fcn.00410617

Function at 0x40192a
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x82c
mov eax, dword [0x431138]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
cmp edi, ebx
je 0x4019ff
cmp word [edi], bx
je 0x4019ff
cmp esi, ebx
je 0x4019ff
push 0x820
lea eax, [ebp - 0x824]
push ebx
push eax
mov dword [ebp - 0x828], 0x824
call fcn.004164f0
add esp, 0xc
push ebx
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x82c], eax
cmp ebx, 0xffffffff
je 0x4019ff
lea eax, [ebp - 0x828]
push eax
push ebx
call sub.KERNEL32.dll_Process32FirstW
jmp 0x4019e6
lea eax, [ebp - 0x804]
push edi
push eax
call fcn.00417519
pop ecx
pop ecx
test eax, eax
jne 0x4019d9
mov eax, dword [ebp - 0x82c]
cmp dword [ebp - 0x820], eax
je 0x4019d9
lea eax, [ebp - 0x820]
push eax
mov ecx, esi
call fcn.00401899
lea eax, [ebp - 0x828]
push eax
push ebx
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x4019aa
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi]
xor ecx, ecx
cmp eax, dword [esi + 4]
setne cl
mov eax, ecx
jmp 0x401a01
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004164df
leave
ret

Function at 0x402d1f
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
push esi
lea eax, [ebp - 4]
push eax
push 0
push dword [ebp + 8]
mov esi, ecx
push 0x402b35
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp + 8], eax
test eax, eax
je 0x402d58
lea ecx, [esi + 0x24]
mov eax, dword [ecx]
lea edx, [ebp + 8]
push edx
push eax
call fcn.00402716
pop esi
leave
ret 4

Function at 0x4052a4
Capabilities:
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, 0x811c9dc5
jmp 0x4052bf
movzx edx, word [ecx]
imul eax, eax, 0x1000193
xor eax, edx
add ecx, 2
cmp ecx, dword [ebp + 0xc]
jne 0x4052b1
pop ebp
ret

Function at 0x406fcf
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
call fcn.0040e034
mov ecx, eax
call fcn.0040dfb7
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
push dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop ebp
ret 8
Function at 0x4073e4
Capabilities:
Connect pipe

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0x14
push 0
push esi
mov edi, ecx
mov dword [esi + 0x14], 1
call fcn.004164f0
add esp, 0xc
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x40743f
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x3e5
je 0x40742b
push 0
push esi
mov ecx, edi
call fcn.00407445
jmp 0x40743e
call ebx
cmp eax, 0x217
jne 0x40743e
push 0
push esi
mov ecx, edi
call fcn.00407586
pop ebx
pop edi
pop esi
pop ebp
ret 8

Function at 0x407586
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
and dword [ebp + 8], 0
push edi
mov edi, 0x90
push edi
push 0
push dword [esi + 0x18]
mov ebx, ecx
mov dword [esi + 0x14], 2
call fcn.004164f0
add esp, 0xc
push esi
lea eax, [ebp + 8]
push eax
push edi
push dword [esi + 0x18]
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4075e6
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x3e5
je 0x4075e6
call edi
cmp eax, 0xea
je 0x4075e6
push 0
push esi
mov ecx, ebx
call fcn.00407445
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x4076ae
Capabilities:
Create pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
and dword [ebp - 0xc], 0
push ebx
mov byte [ebp - 0x20], 0
push esi
push edi
mov ebx, ecx
mov dword [ebx + 4], eax
xor eax, eax
lea edi, [ebp - 0x1f]
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
xor eax, eax
lea edi, [ebp - 8]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea esi, [ebp - 0xc]
lea edi, [ebp - 0x20]
call fcn.004073c0
xor esi, esi
mov edx, 0x40000003
cmp dword [ebp + 0x18], esi
je 0x4076f6
mov edx, 0x40080003
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + 0x14], 8
jb 0x407701
mov ecx, dword [ecx]
lea eax, [ebp - 0xc]
push eax
push esi
mov eax, 0x400
push eax
push eax
push 0xff
push 6
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov dword [ebx], eax
cmp eax, 0xffffffff
jne 0x407727
xor eax, eax
jmp 0x407746
push esi
push ebx
push dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
cmp eax, dword [ebp + 0x10]
jne 0x407723
push esi
push dword [ebp + 0x14]
mov ecx, ebx
call fcn.004073e4
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0x14
Function at 0x408286
Capabilities:
Create thread

Disassembly:
push 0xc
mov eax, 0x423e65
call fcn.004172cd
mov esi, ecx
xor ebx, ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov dword [esi + 0x20], eax
cmp eax, 0xffffffff
jne 0x4082b0
xor eax, eax
jmp 0x4083d1
mov eax, dword [esi + 0x1c]
xor ecx, ecx
push 4
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00416334
xor edi, edi
pop ecx
mov dword [esi + 0x24], eax
cmp dword [esi + 0x1c], ebx
jle 0x4082fc
lea eax, [ebp - 0x14]
push eax
push ebx
push esi
push 0x4080d8
push ebx
push ebx
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [esi + 0x24]
mov dword [ecx + edi*4], eax
mov eax, dword [esi + 0x24]
cmp dword [eax + edi*4], ebx
je 0x4082a9
inc edi
cmp edi, dword [esi + 0x1c]
jl 0x4082d2
mov edi, dword [esi + 0x1c]
xor ecx, ecx
push 8
pop edx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.00416334
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], ebx
cmp eax, ebx
je 0x40834c
push fcn.004073b1
push 0x4073a7
push edi
mov dword [eax], edi
add eax, 4
push 8
push eax
mov dword [ebp - 0x10], eax
call fcn.00417c2f
mov eax, dword [ebp - 0x10]
jmp 0x40834e
xor eax, eax
or dword [ebp - 4], 0xffffffff
mov dword [esi + 0x2c], eax
mov eax, dword [esi + 0x1c]
xor ecx, ecx
push 0x1c
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00416334
xor edi, edi
pop ecx
mov dword [esi + 0x28], eax
cmp dword [esi + 0x1c], ebx
jle 0x4083ce
mov dword [ebp - 0x10], ebx
push 0xa0
call fcn.00416dfc
pop ecx
cmp eax, ebx
je 0x408392
mov ecx, eax
call fcn.0040755c
jmp 0x408394
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [esi + 0x28]
mov dword [edx + ecx + 0x18], eax
xor eax, eax
cmp edi, ebx
sete al
push eax
mov eax, dword [esi + 0x28]
add eax, ecx
push eax
push dword [esi + 0x20]
mov eax, dword [esi + 0x2c]
push esi
push esi
lea ecx, [eax + edi*8]
call fcn.004076ae
test eax, eax
je 0x4082a9
add dword [ebp - 0x10], 0x1c
inc edi
cmp edi, dword [esi + 0x1c]
jl 0x40837a
xor eax, eax
inc eax
call fcn.0041736c
ret
Function at 0x40872a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 0xc]
push ebx
xor ebx, ebx
mov dword [ebp + 0xc], eax
cmp eax, ebx
je 0x4087fc
cmp byte [eax], bl
je 0x4087fc
cmp dword [ebp + 8], 0xffffffff
je 0x4087fc
push esi
push edi
mov edi, dword [ebp + 0x10]
xor esi, esi
cmp edi, ebx
jbe 0x4087f6
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x14
lea eax, [ebp - 0x18]
push ebx
push eax
call fcn.004164f0
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
push ebx
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x408796
call esi
cmp eax, 0x3e5
jne 0x4087e4
push dword [ebp + 0x14]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4087cf
push ebx
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
mov dword [ebp + 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x4087e4
mov eax, dword [ebp + 0x10]
add dword [ebp + 0xc], eax
sub edi, eax
cmp edi, ebx
ja 0x408768
mov esi, ebx
jmp 0x4087f6
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
mov esi, 0x800705b4
call fcn.00408701
pop ecx
pop ecx
jmp 0x4087f6
call esi
cmp eax, ebx
jle 0x4087f4
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
pop edi
mov eax, esi
pop esi
jmp 0x408801
mov eax, 0x80070057
pop ebx
leave
ret 0x10

Function at 0x408806
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
cmp dword [ebp + 0xc], 0
push esi
push edi
je 0x40889e
mov edi, dword [ebp + 8]
cmp edi, 0xffffffff
je 0x40889e
push 0x14
lea eax, [ebp - 0x14]
push 0
push eax
call fcn.004164f0
add esp, 0xc
lea eax, [ebp - 0x14]
push eax
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x408868
call esi
cmp eax, 0x3e5
je 0x408868
call esi
test eax, eax
jle 0x4088a3
and eax, 0xffff
or eax, 0x80070000
jmp 0x4088a3
push dword [ebp + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
lea eax, [ebp - 0x14]
je 0x408889
push eax
push edi
call fcn.00408701
pop ecx
pop ecx
mov eax, 0x800705b4
jmp 0x4088a3
push 0
push dword [ebp + 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x408856
xor eax, eax
jmp 0x4088a3
mov eax, 0x80070057
pop edi
pop esi
leave
ret 0x14
Function at 0x409116
Capabilities:
Terminate process

Disassembly:
push 0x3c
mov eax, 0x424016
call fcn.00417336
mov eax, ecx
lea ecx, [ebp - 0x48]
push ecx
mov ecx, dword [eax + 4]
call fcn.00402ede
mov eax, dword [ebp - 0x44]
xor ecx, ecx
push 4
pop edx
xor ebx, ebx
mov dword [ebp - 0x38], eax
mul edx
seto cl
mov dword [ebp - 4], ebx
neg ecx
or ecx, eax
push ecx
call fcn.00416334
mov edi, eax
mov eax, dword [ebp - 0x48]
mov esi, dword [eax]
pop ecx
mov dword [ebp - 0x3c], edi
cmp esi, eax
je 0x409216
mov dword [ebp - 0x34], edi
mov eax, dword [ebp - 0x34]
lea ecx, [esi + 8]
mov dword [eax], ebx
call fcn.00402338
test eax, eax
jne 0x409204
lea ecx, [esi + 8]
call fcn.00405292
push eax
push ebx
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x30], eax
cmp eax, ebx
je 0x409204
lea ecx, [esi + 8]
call fcn.00402349
test eax, eax
jne 0x4091f2
lea ecx, [esi + 8]
call fcn.0040ad4b
test eax, eax
je 0x4091f2
lea eax, [ebp - 0x2c]
push eax
lea ecx, [esi + 8]
call fcn.0040280a
cmp dword [eax + 0x14], 8
mov byte [ebp - 4], 1
jb 0x4091c6
mov eax, dword [eax]
push ebx
push ebx
push ebx
push str._NOTIFY_EXIT_
push eax
call fcn.0040103c
mov ecx, eax
call fcn.0040104a
mov ecx, eax
call fcn.0040a220
push ebx
push 1
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], bl
call fcn.00401310
jmp 0x4091fc
push ebx
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
mov dword [ecx], eax
mov esi, dword [esi]
add dword [ebp - 0x34], 4
cmp esi, dword [ebp - 0x48]
jne 0x409165
mov edi, dword [ebp - 0x3c]
push 0x2710
push 1
push edi
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
xor esi, esi
cmp dword [ebp - 0x38], ebx
jle 0x409269
mov eax, dword [edi + esi*4]
cmp eax, ebx
je 0x409263
lea ecx, [ebp - 0x30]
push ecx
push eax
mov dword [ebp - 0x30], ebx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x40925a
cmp dword [ebp - 0x30], 0x103
jne 0x40925a
push ebx
push dword [edi + esi*4]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [edi + esi*4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
cmp esi, dword [ebp - 0x38]
jl 0x40922e
push edi
call fcn.0041789b
pop ecx
lea ecx, [ebp - 0x48]
mov dword [ebp - 4], 2
call fcn.00402de4
push dword [ebp - 0x48]
call fcn.0041656a
pop ecx
call fcn.00417380
ret

Function at 0x40a812
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x431138]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x110
lea eax, [ebp - 0x114]
push 0
push eax
mov dword [ebp - 0x118], 0x114
call fcn.004164f0
add esp, 0xc
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x114], 6
mov ecx, dword [ebp - 4]
sbb eax, eax
xor ecx, ebp
inc eax
call fcn.004164df
leave
ret
Function at 0x40ab52
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x431138]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, ecx
mov eax, dword [edi]
xor ebx, ebx
cmp eax, ebx
jne 0x40ab75
xor eax, eax
jmp 0x40ac13
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea ecx, [ebp - 0x10]
push ecx
push ebx
push ebx
push 1
push eax
mov dword [ebp - 0x10], ebx
call esi
push dword [ebp - 0x10]
call fcn.00416334
pop ecx
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
push eax
push 1
push dword [edi]
call esi
test eax, eax
jne 0x40abad
push dword [ebp - 0x18]
jmp 0x40ac0a
mov edi, dword [ebp - 0x18]
mov esi, dword [edi]
cmp esi, ebx
je 0x40ac09
push esi
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x40ac09
lea eax, [ebp - 0x14]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x12
push 1
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0xc], ebx
mov word [ebp - 8], 0x500
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x40ac09
push dword [ebp - 0x14]
push esi
call dword [sym.imp.ADVAPI32.dll_EqualSid]
push dword [ebp - 0x14]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
push edi
call fcn.0041789b
mov eax, esi
jmp 0x40ac11
push edi
call fcn.0041789b
xor eax, eax
pop ecx
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.004164df
leave
ret
Function at 0x40b077
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1060
call fcn.00417910
mov eax, dword [0x431138]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
lea ecx, [esi + 4]
call fcn.0040a95b
xor ebx, ebx
mov dword [ebp - 0x100c], eax
cmp eax, ebx
je 0x40b1d7
cmp dword [esi + 0x1c], ebx
je 0x40b1d7
push edi
push 0x40
lea eax, [ebp - 0x105c]
push ebx
push eax
mov dword [ebp - 0x1060], 0x44
call fcn.004164f0
xor eax, eax
mov dword [ebp - 0x101c], ebx
lea edi, [ebp - 0x1018]
stosd dword es:[edi], eax
add esp, 0xc
stosd dword es:[edi], eax
push ebx
push dword [ebp - 0x100c]
stosd dword es:[edi], eax
lea eax, [ebp - 0x1008]
push eax
xor edi, edi
mov dword [ebp - 0x1008], ebx
call sub.USERENV.dll_CreateEnvironmentBlock
test eax, eax
je 0x40b107
mov edi, 0x400
jmp 0x40b10d
mov dword [ebp - 0x1008], ebx
xor eax, eax
push 0xffe
mov word [ebp - 0x1004], ax
lea eax, [ebp - 0x1002]
push ebx
push eax
call fcn.004164f0
lea eax, [esi + 0xc]
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x40b136
mov eax, dword [eax]
push 0x800
push eax
lea eax, [ebp - 0x1004]
push eax
call fcn.0040ce9c
add esp, 0xc
cmp dword [esi + 0x38], ebx
jne 0x40b154
xor eax, eax
jmp 0x40b15f
lea eax, [esi + 0x28]
cmp dword [eax + 0x14], 8
jb 0x40b15f
mov eax, dword [eax]
lea ecx, [ebp - 0x101c]
push ecx
lea ecx, [ebp - 0x1060]
push ecx
push eax
push dword [ebp - 0x1008]
lea eax, [ebp - 0x1004]
push edi
push ebx
push ebx
push ebx
push eax
push ebx
push dword [ebp - 0x100c]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov edi, eax
cmp dword [ebp - 0x1008], ebx
je 0x40b1a1
push dword [ebp - 0x1008]
call sub.USERENV.dll_DestroyEnvironmentBlock
cmp edi, ebx
pop edi
jne 0x40b1b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
shl eax, 0x10
or eax, 0x12
jmp 0x40b1da
mov eax, dword [ebp - 0x1014]
push dword [ebp - 0x1018]
mov dword [esi + 0x44], eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x101c]
call esi
xor eax, eax
jmp 0x40b1da
push 0x12
pop eax
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.004164df
leave
ret
Function at 0x40b251
Capabilities:
Enumerate processes

Disassembly:
push 0x83c
mov eax, 0x42451c
call fcn.00417336
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
xor edi, edi
mov dword [ebp - 0x838], edi
mov dword [ebp - 0x848], edi
mov dword [ebp - 0x844], edi
mov dword [ebp - 0x840], edi
mov dword [ebp - 4], edi
cmp ebx, edi
je 0x40b340
cmp word [ebx], di
je 0x40b340
push 0x820
lea eax, [ebp - 0x830]
push edi
push eax
mov dword [ebp - 0x834], 0x824
call fcn.004164f0
add esp, 0xc
push edi
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov dword [ebp - 0x838], eax
mov byte [ebp - 4], 1
cmp eax, 0xffffffff
je 0x40b340
lea ecx, [ebp - 0x834]
push ecx
push eax
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x40b307
lea eax, [ebp - 0x848]
push eax
mov ecx, esi
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + 8], edi
call fcn.0040b21e
cmp dword [ebp - 0x838], edi
je 0x40b356
push dword [ebp - 0x838]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40b356
lea eax, [ebp - 0x810]
push ebx
push eax
call fcn.00417519
pop ecx
pop ecx
test eax, eax
jne 0x40b32c
lea eax, [ebp - 0x82c]
push eax
lea ecx, [ebp - 0x848]
call fcn.00401899
lea eax, [ebp - 0x834]
push eax
push dword [ebp - 0x838]
call sub.KERNEL32.dll_Process32NextW
jmp 0x40b2d7
lea eax, [ebp - 0x848]
push eax
mov ecx, esi
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + 8], edi
call fcn.0040b21e
lea ecx, [ebp - 0x848]
call fcn.00410617
mov eax, esi
call fcn.00417380
ret

Function at 0x40ba09
Capabilities:
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x431138]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 6
pop ecx
xor esi, esi
xor eax, eax
mov dword [ebp - 0x20], esi
lea edi, [ebp - 0x1c]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x20]
push eax
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ControlService]
jmp 0x40ba63
cmp dword [ebp - 0x1c], 1
je 0x40ba67
cmp esi, dword [ebp + 0xc]
ja 0x40ba67
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 8]
lea esi, [esi + eax + 0xa]
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x40ba3d
mov ecx, dword [ebp - 4]
xor eax, eax
cmp dword [ebp - 0x1c], 1
pop edi
sete al
pop esi
xor ecx, ebp
pop ebx
call fcn.004164df
leave
ret 8
Function at 0x40ba81
Capabilities:
Query service status
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x431138]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
and dword [ebp - 0x20], 0
push esi
push edi
mov dword [ebp - 0x28], eax
xor eax, eax
push 6
pop ecx
lea edi, [ebp - 0x1c]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
imul eax, eax, 0x3e8
xor edx, edx
mov ecx, 0xc8
div ecx
mov esi, dword [ebp + 8]
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov dword [ebp - 0x24], eax
jmp 0x40bb12
cmp dword [ebp - 0x24], 0
jle 0x40bb1d
mov eax, dword [ebp - 0x1c]
cmp eax, 1
je 0x40baf3
cmp eax, 2
je 0x40bae4
cmp eax, 3
jbe 0x40bb04
cmp eax, 7
ja 0x40bb04
lea eax, [ebp - 0x20]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
jmp 0x40bb04
push dword [ebp - 0x28]
push dword [ebp + 0x10]
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x40bb39
dec dword [ebp - 0x24]
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
push eax
push esi
call edi
test eax, eax
jne 0x40bac7
call dword [sym.imp.KERNEL32.dll_GetLastError]
shl eax, 0x10
or eax, 6
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004164df
leave
ret 0x10
xor eax, eax
jmp 0x40bb29

Function at 0x40bb3d
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x431138]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0x20], 0
push ebx
push esi
push edi
xor eax, eax
push 6
pop ecx
lea edi, [ebp - 0x1c]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
imul eax, eax, 0x3e8
mov edi, 0xc8
xor edx, edx
mov ecx, edi
div ecx
mov ebx, dword [ebp + 8]
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov dword [ebp - 0x28], 0x16
mov dword [ebp - 0x24], eax
jmp 0x40bb9d
cmp dword [ebp - 0x24], 0
jle 0x40bbb0
cmp dword [ebp - 0x1c], 1
je 0x40bbaa
dec dword [ebp - 0x24]
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
push eax
push ebx
call esi
test eax, eax
jne 0x40bb87
jmp 0x40bbb0
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x28]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004164df
leave
ret 8
Function at 0x40bd2a
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push esi
push 0x38
xor esi, esi
lea eax, [ebp - 0x38]
push esi
push eax
mov dword [ebp - 0x3c], 0x3c
call fcn.004164f0
mov eax, dword [ebp + 8]
add esp, 0xc
cmp dword [eax + 0x14], 8
mov dword [ebp - 0x38], 0x540
mov dword [ebp - 4], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], str.runas
jb 0x40bd68
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x14], 8
jb 0x40bd76
mov eax, dword [eax]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x1c], esi
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x40bdd5
push 0x1388
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp + 8]
push eax
push dword [ebp - 4]
mov dword [ebp + 8], esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x40bdc2
call dword [sym.imp.KERNEL32.dll_GetLastError]
shl eax, 0x10
or eax, 6
mov dword [ebp + 8], eax
cmp dword [ebp - 4], esi
je 0x40bdd0
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
jmp 0x40bde1
call dword [sym.imp.KERNEL32.dll_GetLastError]
shl eax, 0x10
or eax, 6
pop esi
leave
ret

Function at 0x40c2d3
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x2c
mov eax, 0x42487f
call fcn.00417336
mov edi, dword [ebp + 8]
push str.SYSTEMCurrentControlSetServices_
lea ecx, [ebp - 0x2c]
call fcn.00401af9
push 0xffffffffffffffff
xor esi, esi
push esi
push edi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], esi
call fcn.004034ec
cmp dword [ebp - 0x18], 8
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], esi
jae 0x40c312
lea eax, [ebp - 0x2c]
lea ecx, [ebp - 0x30]
push ecx
push 0x20019
push esi
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40c354
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x34]
push eax
push esi
push esi
push str.Start
push dword [ebp - 0x30]
mov dword [ebp - 0x38], 0x800
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x34]
push esi
push 1
lea ecx, [ebp - 0x2c]
call fcn.00401310
mov eax, edi
call fcn.00417380
ret