joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4e6550
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53d498
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x10], esp
mov al, byte [ecx + 0x14]
mov dword [ebp - 4], 0
test al, al
jne 0x4e65f0
lea ebx, [ecx + 4]
mov edi, 0x932118
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov esi, ecx
mov ecx, ebx
push esi
mov dword [ebp - 0x18], esi
call fcn.004e6af0
test al, al
je 0x4e65ca
mov edi, dword [ebx + 4]
mov ecx, esi
mov eax, ecx
mov esi, 0x932118
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx + 8], eax
mov ebx, dword [ebx + 4]
add ebx, eax
mov byte [ebx], 0
push 1
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0xffffffff
call fcn.004edcf0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp + 0xc]
mov bl, 1
test eax, eax
mov byte [ebp - 4], bl
jne 0x4e6601
mov eax, 0x911e68
mov edx, dword [ebp + 0x10]
push 0
push edx
push eax
mov eax, dword [ecx + 0x58]
push eax
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
jne 0x4e6745
lea ecx, [ebp - 0x1c]
push 0x91efc0
push ecx
mov dword [ebp - 0x1c], 1
call fcn.0051bf18
mov eax, dword [ebp - 0x20]
mov byte [ebp - 0x11], 0
dec eax
jne 0x4e6684
mov edi, 0x93212c
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [ebp - 0x18]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea ebx, [edx + 4]
mov esi, ecx
push 1
push esi
mov ecx, ebx
mov dword [ebp - 0x18], esi
call fcn.004e6af0
test al, al
je 0x4e6684
mov edi, dword [ebx + 4]
mov ecx, esi
mov eax, ecx
mov esi, 0x93212c
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx + 8], eax
mov ebx, dword [ebx + 4]
add ebx, eax
mov byte [ebx], 0
mov eax, 0x4e6742
ret
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x4e6768
mov al, byte [ecx - 1]
test al, al
je 0x4e675e
cmp al, 0xff
je 0x4e675e
dec al
mov byte [ecx - 1], al
jmp 0x4e6768
dec ecx
push ecx
call fcn.0052b878
add esp, 4
mov ecx, dword [ebp - 0xc]
pop edi
mov al, bl
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x10

Function at 0x4e6780
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
push ebx
push esi
mov esi, ecx
mov eax, 0x10624dd3
mov ecx, dword [esp + 0x118]
xor bl, bl
imul ecx
sar edx, 6
mov eax, edx
mov dword [esp + 0xc], ecx
shr eax, 0x1f
add edx, eax
mov eax, dword [esi + 0x58]
lea ecx, [esp + 8]
mov dword [esp + 8], edx
push ecx
mov dword [esp + 0x18], eax
push 0
lea edx, [esp + 0x18]
push 0
inc eax
push edx
push eax
mov dword [esp + 0x24], 1
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
jne 0x4e67e2
pop esi
xor al, al
pop ebx
add esp, 0x10c
ret 4
test eax, eax
jle 0x4e67fa
mov ecx, dword [esi + 0x58]
lea eax, [esp + 0x10]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
mov al, 1
jne 0x4e67fc
mov al, bl
pop esi
pop ebx
add esp, 0x10c
ret 4
Function at 0x4ee660
Capabilities:
Connect socket
Resolve dns

Disassembly:
sub esp, 0x10
push esi
mov esi, ecx
mov word [esp + 4], 2
mov ax, word [esi + 0x18]
push eax
call sub.WS2_32.dll_htons
mov word [esp + 6], ax
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x4ee688
mov eax, 0x912014
push eax
call sub.WS2_32.dll_inet_addr
cmp eax, 0xffffffff
mov dword [esp + 8], eax
jne 0x4ee6b8
mov esi, dword [esi + 0xc]
test esi, esi
jne 0x4ee6a3
mov esi, 0x912014
push esi
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x4ee6da
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
mov dword [esp + 8], eax
mov edx, dword [esp + 0x18]
lea ecx, [esp + 4]
push 0x10
push ecx
push edx
call sub.WS2_32.dll_connect
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop esi
add esp, 0x10
ret 4
xor eax, eax
pop esi
add esp, 0x10
ret 4
Function at 0x4fb350
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x208
push ebx
push ebp
push esi
push edi
mov esi, ecx
push 0
call fcn.005017d0
mov ebp, dword [esp + 0x220]
mov eax, dword [esp + 0x21c]
push ebp
push 0
push 0
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov edi, eax
cmp edi, 0x20
ja 0x4fb449
lea ecx, [esp + 0x10]
push ecx
push str..htm
push connect
mov ecx, esi
call fcn.004fb460
test eax, eax
jne 0x4fb449
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x10]
push str._shellopencommand
push edx
call ebx
lea eax, [esp + 0x10]
lea ecx, [esp + 0x10]
push eax
push ecx
push connect
mov ecx, esi
call fcn.004fb460
test eax, eax
jne 0x4fb449
lea edx, [esp + 0x10]
push 0x933aa8
push edx
call fcn.0051b370
mov esi, eax
add esp, 8
test esi, esi
jne 0x4fb41a
lea eax, [esp + 0x10]
push 0x933aa4
push eax
call fcn.0051b370
mov esi, eax
add esp, 8
test esi, esi
jne 0x4fb41a
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esp + eax + 0xf]
jmp 0x4fb41d
mov byte [esi], 0
push 0x93326c
push esi
call ebx
mov edx, dword [esp + 0x21c]
push edx
push esi
call ebx
lea eax, [esp + 0x10]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_WinExec]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 8

Function at 0x4fb460
Capabilities:
Query or enumerate registry value

Disassembly:
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
sub esp, 0x10c
lea eax, [esp]
push esi
push eax
push 1
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
test esi, esi
jne 0x4fb4c2
mov edx, dword [esp + 4]
lea eax, [esp + 8]
lea ecx, [esp + 0xc]
push eax
push ecx
push esi
push edx
mov dword [esp + 0x18], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
mov ecx, dword [esp + 0x11c]
lea eax, [esp + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0x10c
ret 0xc
Function at 0x501710
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x53ea58
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push edi
mov edi, ecx
mov eax, dword [edi + 0x118]
test eax, eax
jne 0x5017c0
mov eax, dword [0x9345dc]
push esi
mov dword [esp + 8], eax
push 0x104
push 0x104
lea ecx, [esp + 0x10]
mov dword [esp + 0x1c], 0
call fcn.0052bf3e
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0xffffffffffffffff
lea ecx, [esp + 0xc]
call fcn.0052bf8d
push str.winhlp32.exe
lea ecx, [esp + 0xc]
call fcn.0052beea
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x5017a7
push 0x6a
push esi
call dword [sym.imp.USER32.dll_LoadCursorA]
test eax, eax
je 0x5017a7
push eax
call dword [sym.imp.USER32.dll_CopyIcon]
mov dword [edi + 0x118], eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [esp + 8]
mov dword [esp + 0x14], 0xffffffff
call fcn.0052bb0e
pop esi
mov ecx, dword [esp + 8]
pop edi
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x5048c0
Capabilities:
Get number of processors

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x53eee0
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [esp + 0x30]
mov esi, ecx
mov eax, dword [edi]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x504a67
mov ecx, dword [0x9345dc]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 0x28], 0
mov dword [esp + 0x30], ecx
mov ecx, dword [eax - 8]
mov bl, 1
test ecx, ecx
mov byte [esp + 0x28], bl
jle 0x5049bc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push edi
push ecx
mov ecx, esi
call fcn.005035e0
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c], 2
call fcn.0052bc47
lea ecx, [esp + 0x14]
mov byte [esp + 0x28], bl
call fcn.0052bb0e
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push 0x93326c
call fcn.0052bb7c
lea edx, [esp + 0x14]
push 0x3d
push edx
lea eax, [esp + 0x24]
push edi
push eax
mov ecx, esi
call fcn.005039a0
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x2c], 3
call fcn.0052bc47
lea ecx, [esp + 0x18]
mov byte [esp + 0x28], bl
call fcn.0052bb0e
lea ecx, [esp + 0xc]
call fcn.0052c022
mov ecx, dword [esp + 0xc]
push 0x933cac
push ecx
call fcn.0051a064
add esp, 8
test eax, eax
je 0x5049e4
mov edx, dword [edi]
mov ecx, dword [esp + 0x10]
mov eax, dword [edx - 8]
cmp ecx, eax
jl 0x50491d
mov esi, dword [esp + 0x34]
lea ecx, [esp + 0x30]
mov byte [esp + 0x28], 0
call fcn.0052bb0e
lea ecx, [esp + 0xc]
mov dword [esp + 0x28], 0xffffffff
call fcn.0052bb0e
jmp 0x504a6b
lea eax, [esp + 0x30]
mov ecx, esi
push eax
call fcn.00504660
test eax, eax
push 0
je 0x504a4f
lea ecx, [esp + 0x34]
push 0x64
push ecx
mov ecx, esi
call fcn.00502d00
mov ecx, dword [esp + 0x3c]
test ecx, ecx
je 0x504a35
cmp eax, 0x64
jg 0x504a23
mov edx, dword [esp + 0x38]
push eax
push 0x64
push edx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
jmp 0x5049c0
push 0x64
push eax
mov eax, dword [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
jmp 0x5049c0
cmp eax, 0x64
jge 0x5049bc
mov ecx, dword [esp + 0x34]
push 0x64
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
jmp 0x5049c0
mov edx, dword [esp + 0x3c]
lea eax, [esp + 0x34]
push edx
push eax
mov ecx, esi
call fcn.00502d00
mov esi, eax
jmp 0x5049c0
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
cmp esi, eax
jl 0x504a75
mov eax, esi
mov ecx, dword [esp + 0x20]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x20
ret 0x10
Function at 0x52df65
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x52df9d
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.0052bfb5
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.0052bf8d
jmp 0x52dfa9
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x52f65a
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x52f69c
call fcn.00535658
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x52f69c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x52f693
xor eax, eax
jmp 0x52f6a4
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0052f6aa
pop edi
pop esi
pop ebx
ret 4

Function at 0x535b88
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x535bb6
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x535bd4
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00535aee
jmp 0x535bd4
mov eax, dword [esi + 0x14]
test eax, eax
je 0x535bd4
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.00535aee
test edi, edi
mov eax, edi
jne 0x535bbe
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x4027b0
Capabilities:
Get common file path
Get startup folder

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x575f12
mov eax, dword fs:[0]
push eax
sub esp, 0x21c
mov eax, dword [0x629f58]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x220], esi
mov dword [ebp - 0x21c], 0
xor eax, eax
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov dword [ebp - 0x224], esi
mov word [esi], ax
push 0x208
mov dword [ebp - 4], eax
push eax
lea eax, [ebp - 0x218]
mov dword [ebp - 0x21c], 1
push eax
call fcn.00551350
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x23
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402845
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00402df0
push str.Foxit_Software
mov ecx, esi
call fcn.00402930
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x402879
mov ecx, dword [esi]
call fcn.00410fc0
test eax, eax
jne 0x402891
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x40288c
mov ecx, dword [esi]
call fcn.00411090
push str.Foxit_PDF_Reader_
mov ecx, esi
call fcn.00402930
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x4028a7
mov ecx, dword [esi]
call fcn.00410fc0
test eax, eax
jne 0x4028bf
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x4028ba
mov ecx, dword [esi]
call fcn.00411090
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0054b283
mov esp, ebp
pop ebp
ret
Function at 0x403fb0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
xor cl, cl
test eax, eax
je 0x4040ba
test eax, 0xffff0000
jne 0x4040ba
push esi
push edi
movzx edi, ax
push edi
call fcn.004126d7
mov esi, eax
mov dword [ebp - 4], esi
test esi, esi
je 0x4040b6
mov eax, edi
shr eax, 4
push 6
inc eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp + 8], eax
test eax, eax
je 0x4040b6
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4040b6
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4040b6
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
lea ecx, [esi + eax]
and edi, 0xf
jbe 0x404049
cmp esi, ecx
jae 0x4040b6
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub edi, 1
jne 0x404037
cmp esi, ecx
jae 0x4040b6
movzx eax, word [esi]
test ax, ax
je 0x4040b6
mov edx, dword [ebx]
mov edi, eax
mov dword [ebp + 8], eax
mov ecx, 1
mov eax, dword [edx - 8]
sub ecx, dword [edx - 4]
sub eax, edi
or ecx, eax
jge 0x40407c
push edi
mov ecx, ebx
call fcn.004044c0
mov edx, dword [ebx]
movzx eax, word [esi]
jmp 0x40407f
mov eax, dword [ebp + 8]
movzx ecx, ax
lea eax, [esi + 2]
push ecx
push eax
push edi
push edx
call fcn.0055570c
add esp, 0x10
cmp eax, 0x50
ja case.0x40409d.1
movzx eax, byte [eax + 0x4040e8]
jmp dword [eax*4 + 0x4040d8]
mov eax, dword [ebx]
cmp edi, dword [eax - 8]
jg 0x4040cd
mov dword [eax - 0xc], edi
xor ecx, ecx
mov eax, dword [ebx]
mov word [eax + edi*2], cx
pop edi
mov cl, 1
pop esi
mov al, cl
pop ebx
mov esp, ebp
pop ebp
ret 4
call fcn.00412463
call fcn.00412449
push 0x80070057
call fcn.00404450
nop
movsb byte es:[edi], byte [esi]
inc eax
inc eax
add bl, al
inc eax
inc eax
add al, cl
inc eax
inc eax
add al, cl
inc eax
inc eax
add byte [eax], al
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ecx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [edx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [edx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [eax]
int3
Function at 0x404b50
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x576178
mov eax, dword fs:[0]
push eax
sub esp, 0x210
mov eax, dword [0x629f58]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x218], esi
lea ecx, [ebp - 0x214]
mov dword [ebp - 4], 2
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
push ecx
cmovae eax, dword [ebp + 8]
push 1
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x404d38
push 0x200
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.00551350
add esp, 0xc
mov dword [ebp - 0x218], 0
cmp dword [ebp + 0x34], 8
lea ecx, [ebp - 0x21c]
lea eax, [ebp + 0x20]
mov dword [ebp - 0x21c], 0x1ff
cmovae eax, dword [ebp + 0x20]
push ecx
lea ecx, [ebp - 0x210]
push ecx
lea ecx, [ebp - 0x218]
push ecx
push 0
push eax
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x404d38
mov eax, dword [ebp - 0x214]
test eax, eax
je 0x404c30
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x214], 0
xor eax, eax
mov dword [esi + 0x10], 0
lea ecx, [ebp - 0x210]
mov dword [esi + 0x14], 7
mov word [esi], ax
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404c50
sub ecx, edx
lea eax, [ebp - 0x210]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00402df0
mov edx, dword [ebp + 0x1c]
cmp edx, 8
jb 0x404ca8
mov ecx, dword [ebp + 8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404c9e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404d89
push edx
push ecx
call fcn.0054b294
add esp, 8
mov edx, dword [ebp + 0x34]
xor eax, eax
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x1c], 7
mov word [ebp + 8], ax
cmp edx, 8
jb 0x404cf6
mov ecx, dword [ebp + 0x20]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404cec
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404d8e
push edx
push ecx
call fcn.0054b294
add esp, 8
mov edx, dword [ebp + 0x4c]
xor eax, eax
mov dword [ebp + 0x30], 0
mov dword [ebp + 0x34], 7
mov word [ebp + 0x20], ax
cmp edx, 8
jb 0x404d6d
mov ecx, dword [ebp + 0x38]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404d63
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404d93
jmp 0x404d63
mov eax, dword [ebp - 0x214]
test eax, eax
je 0x404d53
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x214], 0
lea eax, [ebp + 0x38]
mov ecx, esi
push eax
call fcn.00403e40
jmp 0x404c6e
push edx
push ecx
call fcn.0054b294
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0054b283
mov esp, ebp
pop ebp
ret
call fcn.00555009
call fcn.00555009
call fcn.00555009
int3
Function at 0x40f410
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
push edi
lea edi, [ecx + 4]
mov dword [ebp - 8], 0
push edi
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x40f461
mov ecx, dword [ebp + 8]
lea eax, [ebp - 8]
push 0
push eax
push 0
push 2
push 0
push 0
push 0
push 1
push esi
mov dword [ebp - 8], edi
mov dword [ebp - 4], ecx
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8

Function at 0x40f470
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x629f58]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
push dword [ebp + 0xc]
mov edi, ecx
push eax
lea eax, [ebp - 0x20c]
push str._s_failed_w_err_0x_08lx
push eax
call fcn.0040f510
add esp, 0x10
mov dword [ebp - 0x214], 0
add edi, 4
mov dword [ebp - 0x210], 0
push edi
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x40f4fd
push 0
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x214], edi
mov dword [ebp - 0x210], eax
lea eax, [ebp - 0x214]
push eax
push 0
push 2
push 0
push 0
push 0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0054b283
mov esp, ebp
pop ebp
ret 8
Function at 0x40f830
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57778b
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x629f58]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov ebx, ecx
mov dword [ebp - 0x234], ebx
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00551350
add esp, 0xc
mov dword [ebp - 0x220], 0
xor eax, eax
mov dword [ebp - 0x21c], 7
lea ecx, [ebp - 0x230]
mov word [ebp - 0x230], ax
push 1
push 0x60627c
call fcn.00402df0
push 0x104
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x40f8e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetModuleFileName_failed_w_err_0x_08lx_n
call fcn.0040eaf0
add esp, 8
jmp 0x40f9ef
push 3
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x40f910
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x60c1a8
call fcn.0040eaf0
add esp, 8
jmp 0x40f9ef
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x230]
call fcn.00402930
push 0x60627c
lea ecx, [ebp - 0x230]
call fcn.00402930
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
push 0
cmovae eax, dword [ebp - 0x230]
push 0
push 0x605db0
push 0
push 0
push eax
push 1
push 2
push 0x110
push 0xf01ff
push esi
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
jne 0x40f98a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateService_failed_w_err_0x_08lx_n
call fcn.0040eaf0
jmp 0x40f9e2
push esi
call ebx
mov esi, dword [ebp - 0x234]
push esi
push str._s_is_installed._n
call fcn.0040eaf0
add esp, 8
push 0x114
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x40f9c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenService_failed_w_err_0x_08lx_n
jmp 0x40f9dd
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x40f9e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.StartService_failed_w_err_0x_08lx_n
call fcn.00404560
add esp, 8
push edi
call ebx
test esi, esi
je 0x40f9ef
push esi
call ebx
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x40fa2b
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40fa21
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fa47
push edx
push ecx
call fcn.0054b294
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0054b283
mov esp, ebp
pop ebp
ret
call fcn.00555009
int3