joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40360c
Capabilities:
Log keystrokes via polling

Disassembly:
jmp 0x494100
sub esp, 0x404
mov eax, dword [0x589780]
xor eax, esp
mov dword [esp + 0x400], eax
mov eax, dword [esp + 0x40c]
mov dx, word [esp + 0x408]
push ebx
mov ebx, eax
push esi
mov esi, dword [esp + 0x418]
and ebx, 2
je 0x494159
mov ecx, 0xb7
cmp dx, cx
jne 0x494159
pop esi
mov eax, 0x2c
pop ebx
mov ecx, dword [esp + 0x400]
xor ecx, esp
call fcn.0040512d
add esp, 0x404
ret
test ax, ax
jne 0x494180
cmp dx, 0x45
jne 0x494180
pop esi
mov eax, 0x13
pop ebx
mov ecx, dword [esp + 0x400]
xor ecx, esp
call fcn.0040512d
add esp, 0x404
ret
test bx, bx
je 0x49418c
mov ecx, 0xe0
jmp 0x49419b
and al, 4
movzx ecx, al
neg ecx
sbb ecx, ecx
and ecx, 0xe1
push ebp
push esi
shl ecx, 8
movzx eax, dl
push 1
or ecx, eax
push ecx
call dword [sym.imp.USER32.dll_MapVirtualKeyExA]
movzx ebp, ax
test bp, bp
jne 0x4941fe
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push esi
push eax
push 0x111
push str.C:projectsentryprotect_srccorekeystroke.cpp
lea eax, [esp + 0x20]
push str._s__d_:___u__u__assert_failed__SB__n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x28]
push eax
call fcn.0040946c
add esp, 0x1c
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
test bx, bx
jne case.0x49422e.13
push 0x90
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
je case.0x49422e.13
lea eax, [ebp - 0xc]
cmp eax, 0x22
ja case.0x49422e.13
movzx eax, byte [eax + 0x4943c0]
jmp dword [eax*4 + 0x494390]
pop ebp
pop esi
mov eax, 0x6e
pop ebx
mov ecx, dword [esp + 0x400]
xor ecx, esp
call fcn.0040512d
add esp, 0x404
ret
pop ebp
pop esi
mov eax, 0x60
pop ebx
mov ecx, dword [esp + 0x400]
xor ecx, esp
call fcn.0040512d
add esp, 0x404
ret
pop ebp
pop esi
mov eax, 0x61
pop ebx
mov ecx, dword [esp + 0x400]
xor ecx, esp
call fcn.0040512d
add esp, 0x404
ret
pop ebp
pop esi
mov eax, 0x62
pop ebx
mov ecx, dword [esp + 0x400]
xor ecx, esp
call fcn.0040512d
add esp, 0x404
ret
pop ebp
pop esi
mov eax, 0x63
pop ebx
mov ecx, dword [esp + 0x400]
xor ecx, esp
call fcn.0040512d
add esp, 0x404
ret
pop ebp
pop esi
mov eax, 0x64
pop ebx
mov ecx, dword [esp + 0x400]
xor ecx, esp
call fcn.0040512d
add esp, 0x404
ret
pop ebp
pop esi
mov eax, 0x65
pop ebx
mov ecx, dword [esp + 0x400]
xor ecx, esp
call fcn.0040512d
add esp, 0x404
ret
pop ebp
pop esi
mov eax, 0x66
pop ebx
mov ecx, dword [esp + 0x400]
xor ecx, esp
call fcn.0040512d
add esp, 0x404
ret
pop ebp
pop esi
mov eax, 0x67
pop ebx
mov ecx, dword [esp + 0x400]
xor ecx, esp
call fcn.0040512d
add esp, 0x404
ret
pop ebp
pop esi
mov eax, 0x68
pop ebx
mov ecx, dword [esp + 0x400]
xor ecx, esp
call fcn.0040512d
add esp, 0x404
ret
pop ebp
pop esi
mov eax, 0x69
pop ebx
mov ecx, dword [esp + 0x400]
xor ecx, esp
call fcn.0040512d
add esp, 0x404
ret
mov ecx, dword [esp + 0x40c]
mov ax, bp
pop ebp
pop esi
pop ebx
xor ecx, esp
call fcn.0040512d
add esp, 0x404
ret
Function at 0x403670
Capabilities:
Allocate or change rwx memory
Check mutex on windows
Execute shellcode via indirect call

Disassembly:
jmp 0x4b26e0
sub esp, 0x40
mov eax, dword [0x589780]
xor eax, esp
mov dword [esp + 0x3c], eax
push ebx
push ebp
mov ebp, dword [esp + 0x4c]
xor ebx, ebx
push esi
mov esi, dword [esp + 0x54]
push ebx
push 0x567814
mov dword [esi], ebx
call fcn.00403887
push ebx
push 0x567830
mov dword [0x58e5a0], eax
call fcn.00403887
lea ecx, [esp + 0x10]
mov dword [0x58e5a4], eax
call fcn.0040c383
push 0x20
lea eax, [esp + 0x2c]
push eax
push 0x56785c
call fcn.0040a290
push 0x566738
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov dword [esp + 0x2f], 0x63656472
mov word [esp + 0x33], 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x18]
push str._S__x
push eax
call fcn.004067fd
add esp, 0x10
lea ecx, [esp + 0x10]
call fcn.004026a3
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [ebp], eax
test eax, eax
je 0x4b27e1
push edi
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x5c]
mov dword [0x58e594], eax
mov eax, dword [esp + 0x60]
mov dword [0x58e598], eax
mov eax, dword [0x58e5a0]
test eax, eax
je 0x4b2800
cmp dword [0x58e5a4], ebx
je 0x4b2800
push 0x4024be
push 1
call eax
test eax, eax
mov dword [esi], eax
setne bl
test eax, eax
jne 0x4b27e0
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
lea ecx, [esp + 0x10]
call fcn.004042ff
mov ecx, dword [esp + 0x48]
mov eax, ebx
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040512d
add esp, 0x40
ret 0x10
push 1
push 0x5677f8
call fcn.004072fc
mov esi, eax
cmp dword [esi], 0x4244c8b
jne 0x4b27ce
mov ecx, dword [esi + 4]
mov eax, ecx
and eax, 0xffffff
cmp eax, 0x241c8b
jne 0x4b27ce
shr ecx, 0x18
cmp cl, 0x51
jne 0x4b27ce
cmp byte [esi + 8], 0x53
jne 0x4b27ce
cmp byte [esi + 9], 0xe8
jne 0x4b27ce
lea eax, [esp + 0x10]
push eax
push 0x40
push 4
lea edi, [esi + 0xa]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x4b27ce
mov eax, dword [edi]
add eax, 0xe
add eax, esi
mov dword [0x58e59c], eax
mov eax, 0x4078b5
sub eax, esi
sub eax, 0xe
mov dword [edi], eax
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x14]
push 4
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ebx, 1
jmp 0x4b27e0
Function at 0x40367f
Capabilities:
Read file via mapping

Disassembly:
jmp 0x4a64b0
sub esp, 0x108
mov eax, dword [0x589780]
xor eax, esp
mov dword [esp + 0x104], eax
push ebx
mov ebx, dword [esp + 0x110]
lea eax, [esp + 4]
push esi
push edi
push eax
push dword [ebx]
xor esi, esi
push 0x566878
push 0x56686c
call fcn.00409a9d
add esp, 0x10
lea eax, [esp + 0xc]
push 1
push eax
call fcn.0040444e
mov edi, eax
test edi, edi
je 0x4a652c
push esi
push esi
push esi
push 4
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, eax
test ecx, ecx
je 0x4a651f
mov eax, dword [ecx]
push ecx
mov dword [ebx], eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov esi, 1
jmp 0x4a6525
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x110]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040512d
add esp, 0x108
ret 4

Function at 0x4039f4
Capabilities:
Read file on windows

Disassembly:
jmp 0x494e90
sub esp, 0x404
mov eax, dword [0x589780]
xor eax, esp
mov dword [esp + 0x400], eax
mov eax, dword [esp + 0x414]
mov edx, dword [esp + 0x410]
push esi
mov esi, dword [esp + 0x40c]
push eax
push edx
push dword [esp + 0x418]
push esi
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x494f47
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x3e5
je 0x494f23
push edi
call ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push edi
push esi
push eax
push 0x2f
push str.C:projectsentryprotect_srccoredrivercontroldevice.cpp
lea eax, [esp + 0x20]
push str._s__d_:___u__u__error_u__SB__n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x28]
push eax
call fcn.0040946c
add esp, 0x20
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
call ebx
pop ebx
cmp eax, 0x3e5
je 0x494f47
xor al, al
pop esi
mov ecx, dword [esp + 0x400]
xor ecx, esp
call fcn.0040512d
add esp, 0x404
ret 0x10
mov ecx, dword [esp + 0x404]
mov al, 1
pop esi
xor ecx, esp
call fcn.0040512d
add esp, 0x404
ret 0x10
Function at 0x403db4
Capabilities:
Parse pe header
Read file via mapping

Disassembly:
jmp 0x4a6600
push ebx
push edi
xor edi, edi
push edi
push edi
push 3
push edi
push 1
push 0x80000000
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4a66ac
push ebp
push edi
push edi
push edi
push 2
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ebp, eax
test ebp, ebp
je 0x4a66a4
push esi
push edi
push edi
push edi
push 4
push ebp
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
test esi, esi
je 0x4a669c
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x4a6695
mov eax, dword [esi + 0x3c]
add eax, esi
cmp dword [eax], 0x4550
jne 0x4a6695
mov ecx, 0x20b
cmp word [eax + 0x18], cx
jne 0x4a6676
mov ecx, dword [eax + 0x88]
jmp 0x4a6679
mov ecx, dword [eax + 0x78]
test ecx, ecx
je 0x4a6695
push ecx
push eax
call fcn.00405132
mov ecx, dword [eax + esi + 0x10]
test ecx, ecx
jne 0x4a66b3
cmp dword [eax + esi + 0x14], 1
ja 0x4a66be
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebp
mov eax, edi
pop edi
pop ebx
ret 4
cmp ecx, 1
jne 0x4a6693
cmp dword [eax + esi + 0x14], edi
jbe 0x4a6693
mov edi, 1
jmp 0x4a6695
Function at 0x404a75
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
jmp 0x4a9b30
sub esp, 0xd8
push ebx
xor bl, bl
cmp byte [0x58e4f4], bl
je 0x4a9b4b
mov al, 1
pop ebx
add esp, 0xd8
ret
push 0
push 0x566a58
call fcn.004072fc
mov dword [0x58e4f0], eax
test eax, eax
je 0x4a9d30
push 0
push 0x566b18
call fcn.00403887
test eax, eax
jne 0x4a9b7f
push eax
push 0x566b04
call fcn.00403887
push eax
lea ecx, [esp + 0x10]
call fcn.00408b89
mov edx, dword [esp + 0xc0]
xor ecx, ecx
test edx, edx
jle 0x4a9d27
mov eax, dword [esp + 0xbc]
push ebp
mov ebp, dword [0x58e4f0]
add eax, 0x18
push esi
push edi
nop dword [eax]
mov esi, dword [eax - 4]
test esi, esi
jne 0x4a9bbb
cmp dword [eax], esi
je 0x4a9bc2
mov edi, dword [eax - 0xc]
cmp edi, ebp
je 0x4a9bcf
inc ecx
add eax, 0x1c
cmp ecx, edx
jl 0x4a9bb0
jmp 0x4a9d24
mov eax, dword [esp + 0xc8]
lea ebx, [ecx*8]
sub ebx, ecx
shl ebx, 2
cmp dword [ebx + eax + 0x10], 0
je 0x4a9c3f
mov ebp, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [esp + 0x10]
push eax
push 0x40
push 4
push esi
call ebp
test eax, eax
je 0x4a9d06
mov eax, dword [esp + 0xc8]
sub edi, esi
sub edi, 4
mov ecx, dword [ebx + eax + 0x14]
mov dword [0x58e4e0], ecx
mov eax, dword [ecx]
mov dword [0x58e4e4], eax
lea eax, [esp + 0x10]
push eax
mov dword [ecx], edi
push dword [esp + 0x14]
mov eax, dword [esp + 0xd0]
push 4
push dword [ebx + eax + 0x14]
call ebp
jmp 0x4a9d06
cmp dword [ebx + eax + 0x18], 0
je 0x4a9cba
push 0
push 4
call fcn.004049b2
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea ecx, [esp + 0x18]
add esp, 8
mov esi, eax
push ecx
mov dword [esi], 0x404d45
mov eax, dword [esp + 0xcc]
push 0x40
push 4
push dword [ebx + eax + 0x18]
call edi
test eax, eax
je 0x4a9cac
mov eax, dword [esp + 0xc8]
mov ecx, dword [ebx + eax + 0x18]
mov dword [0x58e4e8], ecx
mov eax, dword [ecx]
mov dword [0x58e4ec], eax
lea eax, [esp + 0x10]
push eax
mov dword [ecx], esi
push dword [esp + 0x14]
mov eax, dword [esp + 0xd0]
push 4
push dword [ebx + eax + 0x18]
call edi
lea eax, [esp + 0x14]
push eax
push 0x20
push 4
push esi
call edi
jmp 0x4a9d06
lea eax, [esp + 0x10]
push eax
push 0x40
push 4
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
call esi
test eax, eax
je 0x4a9d06
mov ecx, dword [esp + 0xc8]
mov edx, dword [ecx + ebx + 0x14]
mov dword [0x58e4e8], edx
mov eax, dword [edx]
mov dword [0x58e4ec], eax
mov eax, dword [ecx + ebx + 0xc]
mov dword [edx], eax
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x14]
mov eax, dword [esp + 0xd0]
push 4
push dword [ebx + eax + 0x14]
call esi
cmp dword [0x58e4e8], 0
jne 0x4a9d1c
cmp dword [0x58e4e0], 0
jne 0x4a9d1c
xor bl, bl
jmp 0x4a9d1e
mov bl, 1
mov byte [0x58e4f4], bl
pop edi
pop esi
pop ebp
lea ecx, [esp + 0xc]
call fcn.004032b5
mov al, bl
pop ebx
add esp, 0xd8
ret
Function at 0x405038
Capabilities:
Get file size
Read file via mapping

Disassembly:
jmp 0x4a0120
push esi
push edi
xor edi, edi
push edi
push edi
push 3
push edi
push 1
push 0x80000000
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4a01a7
push ebx
push edi
push edi
push edi
push 2
push edi
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ebx, eax
test ebx, ebx
je 0x4a019f
push ebp
push edi
push edi
push edi
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebp, eax
test ebp, ebp
je 0x4a0197
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4a017d
cmp ecx, eax
cmovb eax, ecx
push dword [esp + 0x18]
push eax
push ebp
call fcn.0040aba0
add esp, 0xc
mov edi, 1
push ebp
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebp
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
mov eax, edi
pop edi
pop esi
ret
Function at 0x405646
Capabilities:
Create thread

Disassembly:
jmp 0x4a8e40
sub esp, 0x50
push ebx
push ebp
push esi
mov esi, dword [esp + 0x64]
xorps xmm0, xmm0
movq qword [esp + 0x28], xmm0
mov dword [esp + 0x30], 0
push edi
test esi, esi
jne 0x4a8e78
lea eax, [esp + 0x2c]
push eax
call fcn.00406226
add esp, 4
lea ecx, [esp + 0x2c]
test eax, eax
cmove ecx, esi
mov esi, ecx
call fcn.00404a75
push dword [esp + 0x7c]
mov ebp, dword [esp + 0x7c]
mov ebx, dword [esp + 0x70]
mov edi, dword [esp + 0x68]
push ebp
push dword [esp + 0x7c]
push dword [esp + 0x7c]
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov dword [esp + 0x68], eax
test eax, eax
jne 0x4a8fe1
cmp byte [esp + 0x80], al
jne 0x4a8fe1
push eax
push 0x566a18
call fcn.004072fc
mov dword [esp + 0x1c], eax
test eax, eax
je 0x4a8fe1
mov dword [esp + 0x18], 0
test esi, esi
je 0x4a8ee2
mov eax, dword [esi + 4]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
test ebx, ebx
je 0x4a8f08
test ebp, 0x10000
je 0x4a8f04
mov dword [esp + 0x14], ebx
jmp 0x4a8f08
mov dword [esp + 0x10], ebx
push edi
push 0x25
call fcn.00405e39
mov esi, eax
test esi, esi
je 0x4a8fe1
movups xmm0, xmmword [0x566b88]
mov al, byte [0x566bac]
mov ecx, dword [0x566ba8]
movups xmmword [esp + 0x38], xmm0
push 1
movups xmm0, xmmword [0x566b98]
mov byte [esp + 0x60], al
mov eax, dword [esp + 0x74]
movups xmmword [esp + 0x4c], xmm0
push 0x566b30
mov dword [esp + 0x60], ecx
mov dword [esp + 0x45], eax
mov dword [esp + 0x55], esi
call fcn.00403887
push 1
push 0x566ac0
mov dword [esp + 0x5a], eax
call fcn.00403887
mov dword [esp + 0x57], eax
lea eax, [esp + 0x20]
push eax
push 0x25
lea eax, [esp + 0x40]
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x4a8fdb
lea eax, [esp + 0x24]
and ebp, 4
push eax
lea eax, [esp + 0x6c]
push eax
push dword [esp + 0x7c]
lea eax, [esp + 0x1c]
push esi
push eax
lea eax, [esp + 0x28]
push eax
push 0
push ebp
push dword [esp + 0x38]
push edi
call dword [esp + 0x44]
test eax, eax
js 0x4a8fd2
mov ecx, dword [esp + 0x7c]
mov eax, dword [esp + 0x28]
mov dword [ecx], eax
lea eax, [esp + 0x1c]
push eax
push 0x20
push 0x25
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
jmp 0x4a8fe1
push edi
push esi
call fcn.00401578
jmp 0x4a8fe1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esp + 0x30]
pop edi
pop esi
pop ebp
pop ebx
test eax, eax
je 0x4a8ffd
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x58]
add esp, 0x50
ret

Function at 0x405cf9
Capabilities:
Terminate process

Disassembly:
jmp 0x4f0b51
push 0x17
call dword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
test eax, eax
je 0x4f0b62
push 5
pop ecx
int 0x29
push esi
push 1
mov esi, 0xc0000417
push esi
push 2
call fcn.0040a3bc
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop esi
ret
Function at 0x405f74
Capabilities:
Query environment variable

Disassembly:
jmp 0x53a0a7
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x53a0b8
pop esi
ret
push ebx
push edi
push esi
call fcn.00539f8e
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0040718a
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x53a0e0
push ebx
push esi
push edi
call fcn.00409f98
add esp, 0xc
push 0
call fcn.0040b70d
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x4064ba
Capabilities:
Parse pe header
Read file via mapping

Disassembly:
jmp 0x4a6960
push esi
push edi
xor esi, esi
push esi
push esi
push 3
push esi
push 1
push 0x80000000
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4a69e3
push ebx
push esi
push esi
push esi
push 2
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ebx, eax
test ebx, ebx
je 0x4a69db
push esi
push esi
push esi
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
je 0x4a69d4
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4a69cd
mov ecx, dword [eax + 0x3c]
cmp dword [ecx + eax], 0x4550
jne 0x4a69cd
mov edx, 0x20b
cmp word [ecx + eax + 0x18], dx
mov edx, 1
cmove esi, edx
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop edi
mov eax, esi
pop esi
ret 4
Function at 0x40657d
Capabilities:
Query service status

Disassembly:
jmp 0x429750
sub esp, 0x424
mov eax, dword [0x589780]
xor eax, esp
mov dword [esp + 0x420], eax
mov eax, dword [esp + 0x428]
push ebx
push esi
push edi
mov edi, ecx
xor bl, bl
push 4
push eax
push dword [edi + 4]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [esp + 0xc], esi
test esi, esi
jne 0x4297d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push edi
push esi
push eax
push 0x1b7
push str.C:projectsentryprotect_submodules_build_environmentinclude_sentrybay_servicemanager.h
lea eax, [esp + 0x40]
push str._s__d_:___u__u__error_u__SB__n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x48]
push eax
call fcn.0040946c
add esp, 0x20
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x429860
lea eax, [esp + 0x10]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x42982d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push edi
push esi
push eax
push 0x1bc
push str.C:projectsentryprotect_submodules_build_environmentinclude_sentrybay_servicemanager.h
lea eax, [esp + 0x40]
push str._s__d_:___u__u__error_u__SB__n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x48]
push eax
call fcn.0040946c
add esp, 0x20
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x429860
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x438]
cmp eax, ecx
je 0x429850
mov edx, dword [esp + 0x43c]
cmp eax, edx
jne 0x429860
cmp byte [esp + 0x440], bl
je 0x429854
mov bl, 1
jmp 0x429860
push edx
push ecx
push esi
mov ecx, edi
call fcn.004020f4
mov bl, al
lea ecx, [esp + 0xc]
call fcn.0040a66e
mov ecx, dword [esp + 0x42c]
mov al, bl
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040512d
add esp, 0x424
ret 0x10
Function at 0x408e45
Capabilities:
Allocate or change rwx memory

Disassembly:
jmp 0x4ad370
push edi
mov edi, dword [esp + 8]
test edi, edi
sete dl
mov byte [esp + 8], dl
test edi, edi
je 0x4ad3dc
mov eax, dword [edi]
push esi
xor esi, esi
test eax, eax
je 0x4ad3db
mov ecx, dword [esp + 0x10]
nop
cmp eax, ecx
je 0x4ad3a5
mov eax, dword [edi + esi*4 + 4]
inc esi
test eax, eax
jne 0x4ad390
pop esi
movzx eax, dl
pop edi
ret 0xc
lea ecx, [esp + 0x10]
push ecx
push 0x40
push 4
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x4ad3d7
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push ecx
push dword [esp + 0x14]
mov dword [edi + esi*4], eax
push 4
push eax
mov byte [esp + 0x1c], 1
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dl, byte [esp + 0xc]
pop esi
movzx eax, dl
pop edi
ret 0xc
Function at 0x40946c
Capabilities:
Print debug messages

Disassembly:
jmp 0x46af10
call fcn.00402491
test eax, eax
je 0x46af30
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x46af30
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
ret

Function at 0x409c5a
Capabilities:
Check os version

Disassembly:
jmp 0x4a9080
sub esp, 0x20
mov eax, dword [0x589780]
xor eax, esp
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp al, 6
jae 0x4a90c2
push ebx
call fcn.004026e9
xor ebx, ebx
test eax, eax
setne bl
test eax, eax
je 0x4a90b0
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.0040512d
add esp, 0x20
ret
push esi
push str.CheckTokenMembership
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
mov dword [esp + 0x18], 0
mov word [esp + 0x1c], 0x500
test esi, esi
je 0x4a91d1
lea eax, [esp + 4]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x4a91d1
lea eax, [esp + 0xc]
push eax
push dword [esp + 8]
push 0
call esi
test eax, eax
je 0x4a91c7
cmp dword [esp + 0xc], 0
je 0x4a91c7
push dword [esp + 4]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
lea eax, [esp + 8]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4a91b2
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 4
push eax
push 4
lea eax, [esp + 0x1c]
push eax
push 0x14
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x4a9194
cmp dword [esp + 0x14], 0
je 0x4a9194
mov esi, 1
jmp 0x4a9196
xor esi, esi
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.0040512d
add esp, 0x20
ret
mov eax, 1
pop esi
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.0040512d
add esp, 0x20
ret
push dword [esp + 4]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov ecx, dword [esp + 0x20]
xor eax, eax
pop esi
xor ecx, esp
call fcn.0040512d
add esp, 0x20
ret

Function at 0x409f2f
Capabilities:
Check os version

Disassembly:
jmp 0x4a4c10
sub esp, 0x118
mov eax, dword [0x589780]
xor eax, esp
mov dword [esp + 0x114], eax
mov eax, dword [0x589638]
cmp eax, 0xffffffff
jne 0x4a4c71
push 0x110
lea eax, [esp + 8]
push 0
push eax
call fcn.004052e0
add esp, 0xc
mov dword [esp], 0x114
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [esp + 4], 6
ja 0x4a4c67
jne 0x4a4c63
cmp dword [esp + 8], 1
ja 0x4a4c67
xor eax, eax
jmp 0x4a4c6c
mov eax, 1
mov dword [0x589638], eax
mov ecx, dword [esp + 0x114]
cmp eax, 1
sete al
xor ecx, esp
call fcn.0040512d
add esp, 0x118
ret
Function at 0x40a128
Capabilities:
Parse pe header

Disassembly:
jmp 0x4df79b
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4df7da
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4df7da
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4df7da
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x4df7da
cmp dword [ecx + 0x74], 0xe
jbe 0x4df7da
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret