joyce8/EMBER2024-capa huggingface dataset:
Function at 0x46d520
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4dcc90
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebp
push esi
push edi
mov edi, dword [esp + 0x34]
mov ebp, ecx
mov eax, dword [edi]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x46d615
lea ecx, [esp + 0x34]
lea esi, [ebp + 0x2c]
push edi
push ecx
mov ecx, esi
call fcn.0046e3a0
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x34]
cmp ecx, eax
je 0x46d583
mov ecx, dword [ecx + 0xc]
mov eax, dword [edi]
push ecx
push eax
call dword [sym.imp.MSVCRT.dll__mbsicmp]
add esp, 8
test eax, eax
jl 0x46d583
lea eax, [esp + 0x34]
jmp 0x46d58e
mov eax, dword [esi + 4]
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0x30]
cmp eax, ecx
jne 0x46d60e
lea edx, [esp + 0x38]
lea eax, [esp + 0x14]
push edx
push edi
push eax
call fcn.0046f170
add esp, 0xc
mov edi, eax
push edi
lea ecx, [esp + 0x10]
mov dword [esp + 0x30], 0
call sub.MFC42.DLL_CString::CString_4
mov ecx, dword [edi + 4]
mov dword [esp + 0x10], ecx
lea edx, [esp + 0xc]
lea eax, [esp + 0x1c]
push edx
push eax
mov ecx, esi
mov byte [esp + 0x34], 1
call fcn.0046d8b0
lea ecx, [esp + 0xc]
mov byte [esp + 0x2c], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov dword [esp + 0x2c], 0xffffffff
call sub.MFC42.DLL_CString::CString
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
add esp, 0x24
ret 8
mov ecx, dword [esp + 0x38]
mov dword [eax + 0x10], ecx
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x24
ret 8
Function at 0x46f280
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4dccf7
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x14], esi
lea edi, [esi + 4]
mov dword [esi], method.boost::detail::sp_counted_base.virtual_4
mov ecx, edi
call sub.MFC42.DLL_CString::CString_3
lea ebp, [esi + 8]
xor ebx, ebx
mov ecx, ebp
mov dword [esp + 0x20], ebx
call sub.MFC42.DLL_CString::CString_3
lea ecx, [esi + 0xc]
mov byte [esp + 0x20], 1
call sub.MFC42.DLL_CString::CString_3
mov al, byte [esp + 0x13]
push 0xc
mov byte [esp + 0x24], 2
mov byte [esi + 0x48], al
call sub.MFC42.DLL_operatornew
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [esi + 0x4c], eax
mov dword [esi + 0x50], ebx
mov cl, byte [esp + 0x17]
push 0xc
mov byte [esp + 0x28], 3
mov byte [esi + 0x54], cl
call sub.MFC42.DLL_operatornew
mov dword [eax], eax
mov dword [eax + 4], eax
add esp, 8
mov dword [esi + 0x58], eax
mov dword [esi + 0x5c], ebx
push str.Control
mov ecx, edi
mov byte [esp + 0x24], 4
mov dword [esi], fcn.0045a400
call fcn.0045acce
push 0x5e2540
mov ecx, ebp
call fcn.0045acce
push 0x5e2540
lea ecx, [esi + 0xc]
call fcn.0045acce
mov edi, dword [sym.imp.USER32.dll_GetSysColor]
xor eax, eax
mov dword [esi + 0x14], eax
mov eax, 0x51
mov ecx, 0x21
mov dword [esi + 0x1c], eax
push 8
mov byte [esi + 0x10], 1
mov byte [esi + 0x11], 1
mov byte [esi + 0x12], bl
mov dword [esi + 0x18], ebx
mov dword [esi + 0x20], ecx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
call edi
push 0xf
mov dword [esi + 0x30], eax
call edi
mov dword [esi + 0x34], eax
mov dword [esi + 0x3c], ebx
mov byte [esi + 0x38], bl
mov dword [esi + 0x40], ebx
mov byte [esi + 0x44], bl
mov byte [esi + 0x45], 1
mov byte [esi + 0x46], 1
mov eax, esi
pop edi
mov ecx, dword [esp + 0x14]
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x470730
Capabilities:
Create thread
Resume thread

Disassembly:
mov ecx, dword [ecx + 0x28]
jmp 0x476080
sub esp, 8
push esi
mov esi, ecx
mov eax, dword [esi + 0x78]
test eax, eax
je 0x4760c1
call fcn.00476bd0
test eax, eax
je 0x4760c8
lea eax, [esp + 8]
push eax
push 4
push esi
push 0x4764f0
push 0
push 0
call dword [sym.imp.MSVCRT.dll__beginthreadex]
add esp, 0x18
mov dword [esi + 0x94], eax
test eax, eax
je 0x4760c1
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
xor eax, eax
pop esi
add esp, 8
ret
mov eax, dword [esi + 0x9c]
test eax, eax
je 0x4760c1
mov ecx, dword [eax]
lea edx, [esp + 8]
push edi
push edx
push eax
call dword [ecx + 0x18]
mov eax, dword [esi + 0x9c]
lea edx, [esp + 8]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov ecx, dword [esp + 8]
push 0
mov edi, ecx
mov eax, dword [esi + 0x9c]
neg edi
push edi
mov edi, dword [esp + 0x14]
push edi
push ecx
mov ecx, dword [esi + 0x54]
mov edx, dword [eax]
push 0
push ecx
mov ecx, dword [esi + 0x50]
push ecx
mov ecx, dword [esi + 0x7c]
push 0
push 0
push ecx
push eax
call dword [edx + 0x20]
test eax, eax
pop edi
jne 0x4760c1
mov edx, dword [esi + 0x20]
push eax
push eax
push edx
call dword [sym.imp.USER32.dll_InvalidateRect]
mov eax, 1
pop esi
add esp, 8
ret

Function at 0x472cc0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4dd2b6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x18], esi
lea ebp, [esi + 4]
mov ecx, ebp
call sub.MFC42.DLL_CString::CString_3
mov al, byte [esp + 0x2c]
mov cl, byte [esp + 0x2c]
xor ebx, ebx
push 0x18
mov dword [esp + 0x28], ebx
mov byte [esi + 8], al
mov byte [esi + 9], cl
mov byte [esi + 0x10], bl
call sub.MFC42.DLL_operatornew
mov edi, eax
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esp + 0x10], edi
mov dword [edi + 4], ebx
mov dword [edi + 0x14], 1
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::constructor_void_]
cmp dword [0x60b660], ebx
jne 0x472d44
mov dword [0x60b660], edi
mov dword [edi], ebx
mov edx, dword [0x60b660]
mov dword [esp + 0x10], ebx
mov dword [edx + 8], ebx
mov edx, dword [0x60b65c]
lea ecx, [esp + 0x14]
inc edx
mov dword [0x60b65c], edx
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::_Lockit::destructor_void_]
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x472d6c
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov edi, dword [0x60b660]
push 0x18
call sub.MFC42.DLL_operatornew
mov dword [eax + 4], edi
mov dword [eax + 0x14], ebx
mov dword [esi + 0xc], eax
mov dword [esi + 0x14], ebx
mov dword [eax], eax
mov eax, dword [esi + 0xc]
add esp, 4
mov dword [eax + 8], eax
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
push ecx
mov ecx, ebp
mov byte [esp + 0x28], 1
mov dword [esi], eax
call sub.MFC42.DLL_CString::operator_3
mov ecx, dword [esp + 0x1c]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret 8
Function at 0x47a290
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
call fcn.004626c0
test eax, eax
push 0x5c1aec
push 0x60b684
je 0x47a2e6
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x47a322
mov ebx, dword [sym.imp.MSVCRT.dll_fputc]
xor esi, esi
xor eax, eax
push edi
mov al, byte [esi + 0x517d78]
xor eax, 0x7d
push eax
call ebx
add esp, 8
inc esi
cmp esi, 0x3d10
jb 0x47a2bd
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebx
ret
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x47a322
mov ebx, dword [sym.imp.MSVCRT.dll_fputc]
xor esi, esi
xor ecx, ecx
push edi
mov cl, byte [esi + 0x50e368]
xor ecx, 0x7d
push ecx
call ebx
add esp, 8
inc esi
cmp esi, 0x9a10
jb 0x47a2fd
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebx
ret
Function at 0x47a460
Capabilities:
Delete registry key
Set registry value

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
call fcn.0047a340
test al, al
mov byte [0x60b680], al
je 0x47a66b
mov eax, dword [esp + 0x30]
and eax, 0x2000
push eax
call fcn.0047a370
call fcn.0047a290
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, 0x618eb0
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 0x47a512
call ebx
cdq
mov ecx, 0x1a
idiv ecx
add dl, 0x61
mov byte [esp + esi + 0x18], dl
inc esi
cmp esi, edi
jb 0x47a4fc
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, 0x618eb0
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 0x47a5a1
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 0x618eb0
call esi
cmp eax, 0xffffffff
mov dword [0x5d9e14], eax
jne 0x47a626
xor edi, edi
push 1
push 0x60b684
call fcn.0047a7b0
mov bl, al
test bl, bl
je 0x47a612
call fcn.0047a8f0
mov bl, al
test bl, bl
je 0x47a612
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push 0x618eb0
call esi
test eax, eax
mov dword [0x5d9e14], eax
je 0x47a617
cmp eax, 0xffffffff
jne 0x47a61d
jmp 0x47a617
mov eax, dword [0x5d9e14]
inc edi
cmp edi, 4
jl 0x47a5cc
test bl, bl
je 0x47a66b
cmp eax, 0xffffffff
je 0x47a66b
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]
push str.rename
mov edx, dword [esp + 0x34]
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 [0x618ead], 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 0x47a7b0
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 0x47a7e4
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, 0x618fb4
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
jmp 0x47a800
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
mov esi, ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, 0x618fb4
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 0x618fb4
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
test eax, eax
je 0x47a81c
mov byte [eax], 0
call fcn.0047a890
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
je 0x47a888
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 0x618fb4
push 0x618fb4
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 0x47a888
push edi
call esi
call fcn.0047a8f0
pop edi
pop esi
pop ebx
ret 8
pop edi
pop esi
xor al, al
pop ebx
ret 8

Function at 0x47a960
Capabilities:
Stop service

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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x522508
push 0x45b9de
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 [0x6194bc], eax
cmp eax, esi
je 0x47ab1d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x47ab1d
push 0x5c1aec
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 0x47aa87
mov dword [ebp - 0x38], esi
mov ebx, dword [sym.imp.MSVCRT.dll_fputc]
cmp esi, dword [0x5d9e50]
push edi
jae 0x47aa7c
xor ecx, ecx
mov cl, byte [esi + 0x51ba88]
xor ecx, 0x7d
push ecx
call ebx
add esp, 8
inc esi
mov dword [ebp - 0x38], esi
jmp 0x47aa5c
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
xor esi, esi
cmp dword [ebp + 0x14], esi
je 0x47aaa3
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.0047af50
add esp, 8
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x47ab1d
push esi
push 0x80
push 3
push esi
push esi
push 0xc0000000
push str..hkSymbolicLink
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x6194b4], eax
cmp eax, 0xffffffff
je 0x47ab1d
mov dword [ebp - 0x24], esi
push esi
push esi
push esi
push 0x47a9d0
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x24], eax
cmp eax, esi
je 0x47ab1d
mov dword [0x6194b8], 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 [0x6194b4]
push edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x47ab1d
mov dword [ebp - 0x1c], 1
mov dword [ebp - 4], 0xffffffff
call fcn.0047ab40
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 0x47ab40
Capabilities:
Delete file
Terminate thread

Disassembly:
mov edi, dword [ebp - 0x1c]
cmp edi, esi
jne 0x47ab83
mov eax, dword [0x6194bc]
cmp eax, esi
je 0x47ab5d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x6194bc], esi
mov eax, dword [0x6194b4]
cmp eax, 0xffffffff
je 0x47ab74
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x6194b4], esi
mov eax, dword [ebp - 0x24]
cmp eax, esi
je 0x47ab83
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 0x47ad40
Capabilities:
Log keystrokes

Disassembly:
mov eax, dword [0x6194bc]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x47ad65
push 1
push eax
call fcn.0047ad90
add esp, 4
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
ret
xor eax, eax
ret
Function at 0x47ad70
Capabilities:
Log keystrokes

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

Function at 0x47ae00
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 0x47ae59
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x431
je 0x47ae55
call esi
push eax
push str.failure:_CreateService__error_code:_u_n
push 0x6194c0
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 0x47af00
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 0x47af24
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 0x47c840
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 0x47c85b
cmp ebx, 8
jg 0x47c85b
mov eax, 1
jmp 0x47c85d
xor eax, eax
mov esi, dword [esp + 0x14]
push str.bad_pack_level
push eax
push esi
call fcn.0047b0b0
mov eax, dword [esi + 0x6af70]
add esp, 0xc
cmp eax, ebp
mov dword [esi + 0x6af78], ebp
jne 0x47c894
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 + 0x52266a]
xor ecx, ecx
mov dword [esi + 0x6af98], eax
mov cx, word [ebx*8 + 0x522668]
xor edx, edx
mov dword [esi + 0x6af9c], ecx
mov dx, word [ebx*8 + 0x52266c]
xor eax, eax
mov dword [esi + 0x6afa0], edx
mov ax, word [ebx*8 + 0x52266e]
cmp ebx, 2
mov dword [esi + 0x6af94], eax
jg 0x47c8f5
mov eax, dword [esp + 0x1c]
or byte [eax], 4
jmp 0x47c901
cmp ebx, 8
jl 0x47c901
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 0x47c97a
cmp eax, 0xffffffff
je 0x47c97a
cmp eax, 0x106
mov dword [esi + 0x6af8c], ebp
jae 0x47c945
push esi
call fcn.0047cb90
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 0x47c94d
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 0x47df80
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 0x47dfa2
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 0x47dfb5
mov ebp, 1
test al, 2
je 0x47dfbc
or ebp, 2
test al, 4
je 0x47dfc3
or ebp, 4
mov ecx, eax
and ecx, 0x10
je 0x47dfcd
or ebp, 0x10
test al, 0x20
je 0x47dfd4
or ebp, 0x20
test ecx, ecx
je 0x47dfe0
or ebp, 0x40000000
jmp 0x47dfe6
or ebp, 0x80000000
or ebp, 0x1000000
test edx, edx
jne 0x47dff6
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 0x47e0a5
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 0x47e0a5
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
lea edx, [eax + 0x34]
cmp ecx, edx
jbe 0x47e0a5
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 0x47e09f
cmp eax, 0x454e
je 0x47e09f
cmp eax, 0x454c
je 0x47e09f
cmp eax, 0x4550
jne 0x47e0a5
or ebp, 0x400000
mov eax, dword [esp + 0x5c]
pop edi
test eax, eax
pop ebx
je 0x47e0b1
mov dword [eax], ebp
mov eax, dword [esp + 0x58]
pop ebp
test eax, eax
je 0x47e0c0
mov edx, dword [esp + 8]
mov dword [eax], edx
mov esi, dword [esp + 0x58]
test esi, esi
je 0x47e109
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push eax
push ecx
call fcn.0047dee0
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.0047dee0
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.0047dee0
mov dword [esi + 0x10], eax
add esp, 0x18
mov dword [esi + 0x14], edx
mov esi, dword [esp + 0x5c]
test esi, esi
je 0x47e148
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.0047df10
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
Function at 0x47e300
Capabilities:
Write file on windows

Disassembly:
push ebx
mov ebx, ecx
push ebp
mov ebp, dword [esp + 0x10]
mov al, byte [ebx + 0x2d]
push esi
mov esi, dword [esp + 0x10]
push edi
test al, al
je 0x47e385
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x47e331
cmp dword [ebx + 0x40], ebp
jae 0x47e331
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [ebx + 0x3c], 0
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x47e34b
lea eax, [ebp + ebp]
push eax
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [ebx + 0x3c], eax
mov dword [ebx + 0x40], ebp
mov edi, dword [ebx + 0x3c]
mov ecx, ebp
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor esi, esi
test ebp, ebp
jbe 0x47e382
lea edi, [ebx + 0x30]
mov eax, dword [ebx + 0x3c]
mov cl, byte [esi + eax]
push ecx
push edi
call fcn.0047ddd0
mov edx, dword [ebx + 0x3c]
add esp, 8
mov byte [esi + edx], al
inc esi
cmp esi, ebp
jb 0x47e367
mov esi, dword [ebx + 0x3c]
mov edx, dword [ebx + 0x20]
test edx, edx
je 0x47e3cd
mov eax, dword [ebx + 0x24]
mov edi, dword [ebx + 0x28]
lea ecx, [eax + ebp]
cmp ecx, edi
jb 0x47e3a9
pop edi
pop esi
mov dword [ebx + 0x14], 0x30000
pop ebp
xor eax, eax
pop ebx
ret 8
mov ecx, ebp
lea edi, [eax + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0x24]
pop edi
add eax, ebp
pop esi
mov dword [ebx + 0x24], eax
mov eax, ebp
pop ebp
pop ebx
ret 8
mov eax, dword [ebx + 4]
test eax, eax
je 0x47e3ef
lea ecx, [esp + 0x14]
push 0
push ecx
push ebp
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
ret 8
pop edi
pop esi
mov dword [ebx + 0x14], 0x1000000
pop ebp
xor eax, eax
pop ebx
ret 8