joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4ecda0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get socket status
Set socket configuration

Disassembly:
sub esp, 0x124
mov eax, dword [0x57f7c4]
xor eax, esp
mov dword [esp + 0x120], eax
push esi
push 6
push 1
push 2
mov dword [esp + 0x10], 1
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x4ece74
mov edx, dword [esp + 0x130]
mov ecx, dword [esp + 0x12c]
mov eax, 2
push edx
mov word [esp + 0x118], ax
mov dword [esp + 0x11c], ecx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x116], ax
lea eax, [esp + 4]
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push 0x10
lea ecx, [esp + 0x118]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_connect]
mov edx, dword [esp + 0x134]
lea eax, [esp + 8]
push eax
push 0
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x14], edx
push 0
lea edx, [esi + 1]
push edx
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], 1
mov dword [esp + 0x20], 0
call dword [sym.imp.WS2_32.dll_select]
lea eax, [esp + 0x10]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
push esi
test eax, eax
jne 0x4ece8c
call dword [sym.imp.WS2_32.dll_closesocket]
xor al, al
pop esi
mov ecx, dword [esp + 0x120]
xor ecx, esp
call fcn.0051a8be
add esp, 0x124
ret
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esp + 0x124]
pop esi
xor ecx, esp
mov al, 1
call fcn.0051a8be
add esp, 0x124
ret

Function at 0x4edd60
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x5767e0
push 0x51dea0
mov eax, dword fs:[0]
push eax
sub esp, 0x118
mov eax, dword [0x57f7c4]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov edi, ecx
mov esi, dword [ebp + 8]
push str.Module_list:
mov eax, dword [edi + 0x30c]
push eax
call fcn.004eff70
add esp, 8
xor ebx, ebx
mov dword [ebp - 4], ebx
push 0x104
lea ecx, [ebp - 0x120]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jbe 0x4ede4c
mov edx, 0x5a4d
cmp dx, word [esi]
jne 0x4ede4c
mov eax, dword [esi + 0x3c]
add eax, esi
cmp dword [eax], 0x4550
jne 0x4ede4c
mov eax, dword [eax + 8]
add eax, 0x7e90
mov dword [ebp - 0x128], eax
mov dword [ebp - 0x124], ebx
lea ecx, [ebp - 0x128]
push ecx
call fcn.0051de3b
mov edx, dword [eax]
push edx
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [eax + 8]
push edx
mov ecx, dword [eax + 0xc]
push ecx
mov edx, dword [eax + 0x10]
inc edx
push edx
mov eax, dword [eax + 0x14]
cdq
mov ecx, 0x64
idiv ecx
push edx
push esi
lea edx, [ebp - 0x120]
push edx
push str._s__loaded_at_0x_08x____02d__02d__02d__02d:_02d:_02d_r_n
mov eax, dword [edi + 0x30c]
push eax
call fcn.004f0020
add esp, 0x2c
jmp 0x4ede4c
mov dword [ebp - 4], 0xfffffffe
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0051a8be
mov esp, ebp
pop ebp
ret 4
Function at 0x4ee000
Capabilities:
Create process memory minidump

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0xc
push esi
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
je 0x4ee06a
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [esp + 0x14]
push 0
push 0
lea edx, [esp + 0xc]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x20]
push edx
push eax
push esi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call sub.dbghelp.dll_MiniDumpWriteDump
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
add esp, 0xc
ret
Function at 0x4ee9d0
Capabilities:
Move file

Disassembly:
mov eax, 0x442c
call fcn.0051e030
mov eax, dword [0x57f7c4]
xor eax, esp
mov dword [esp + 0x4428], eax
mov eax, dword [esp + 0x4430]
push ebp
push esi
mov esi, ecx
lea ecx, [esp + 0x64]
push ecx
mov dword [esp + 0x14], eax
call fcn.004ede90
push 0x50
lea edx, [esp + 0x1c]
push 0
push edx
call fcn.0051d6f0
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x12c]
lea ecx, [esp + 0x74]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x24]
add esp, 0x10
mov dword [esp + 0x20], eax
mov eax, dword [esi]
lea edx, [esp + 0x14]
mov dword [esp + 8], edx
mov edx, dword [eax]
push ecx
mov ecx, esi
call edx
mov eax, dword [esi + 0x30c]
test eax, eax
je 0x4eea58
push str._r_n_r_n_GenerateExceptionHandler__r_n
push eax
call fcn.004f0020
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0xc]
mov edx, dword [eax]
mov eax, dword [esi + 0x30c]
push ecx
push edx
push str.Exception______code0x_08X__address0x_08X
push eax
call fcn.004efdc0
add esp, 0x18
mov ecx, dword [esi + 4]
lea ebp, [esi + 8]
push ebp
push ecx
lea edx, [esp + 0x10]
push edx
call fcn.004ee000
mov eax, dword [esi + 0x30c]
add esp, 0xc
test eax, eax
je 0x4eea85
push str.Minidump_write_end....................._r_n
push eax
call fcn.004f0020
add esp, 8
push ebx
push edi
push 0x3fff
lea eax, [esp + 0x43d]
push 0
push eax
mov byte [esp + 0x444], 0
call fcn.0051d6f0
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
add esp, 0xc
push 1
push 0
call edi
push eax
call dword [sym.imp.dbghelp.dll_SymInitialize]
push 0x4000
lea ecx, [esp + 0x43c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call edi
mov ecx, dword [esp + 0x20]
mov ebx, eax
call fcn.004ee2c0
add esp, 0xc
call edi
push eax
call dword [sym.imp.dbghelp.dll_SymCleanup]
mov eax, dword [esi + 0x30c]
pop edi
pop ebx
test eax, eax
je 0x4eeb19
lea edx, [esp + 0x430]
push edx
push 0x554840
push eax
call fcn.004f0020
mov eax, dword [esi + 0x30c]
push str.Stack_trace_end....................._r_n_r_n
push eax
call fcn.004f0020
add esp, 0x14
cmp byte [esi + 0x308], 0
je 0x4eeb29
mov ecx, esi
call fcn.004ee490
mov esi, dword [esi + 0x30c]
test esi, esi
je 0x4eeb41
push str._GenerateExceptionHandler_End__r_n_r_n
push esi
call fcn.004f0020
add esp, 8
mov ecx, dword [esp + 0x443c]
mov edx, dword [esp + 0x10]
push ecx
push edx
push ebp
lea eax, [esp + 0x33c]
push str._s__s__d.dmp
push eax
call fcn.0051a8cd
add esp, 0x14
push 1
lea ecx, [esp + 0x334]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov ecx, dword [esp + 0x4430]
pop esi
pop ebp
xor ecx, esp
mov eax, 1
call fcn.0051a8be
add esp, 0x442c
ret 8
Function at 0x4eeda0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x54d30b
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
mov eax, dword [0x57f7c4]
xor eax, esp
push eax
lea eax, [esp + 0x10]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0xc], esi
lea eax, [esi + 0x40]
push 0xfa0
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
xor ebx, ebx
lea ecx, [esi + 0x60]
mov dword [esp + 0x18], ebx
call fcn.004eab00
lea ecx, [esi + 0xb8]
call fcn.004eab00
mov al, 1
mov ecx, 0x10000
mov dword [esi + 0x18], ecx
mov dword [esi + 0x1c], ecx
mov ecx, 0x493e0
mov byte [esi + 8], al
mov byte [esi + 0x28], al
mov byte [esi + 0x29], al
mov byte [esi + 0x3d], al
mov byte [esi + 0x3c], al
mov byte [esi + 0x58], al
mov dword [esi + 0x11c], ebx
mov dword [esi + 0x110], ebx
mov dword [esi + 0x114], ebx
mov dword [esi + 0x118], ebx
mov dword [esi + 0x124], ebx
mov dword [esi + 0x120], ebx
mov byte [esi + 0x10], bl
mov dword [esi + 0xc], 0x800000
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
mov byte [esi + 0x2a], bl
mov dword [esi + 0x2c], ebx
mov dword [esi + 0x30], ecx
mov dword [esi + 0x34], ecx
mov dword [esi + 0x38], ecx
mov byte [esi + 0x3e], bl
mov byte [esi + 0x59], bl
mov eax, esi
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
add esp, 0x10
ret

Function at 0x4ef1b0
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push 1
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketA]
ret

Function at 0x4efaf0
Capabilities:
Create directory

Disassembly:
sub esp, 0x404
mov eax, dword [0x57f7c4]
xor eax, esp
mov dword [esp + 0x400], eax
push ebx
mov ebx, dword [esp + 0x40c]
lea edx, [esp + 4]
push ebp
mov ebp, ecx
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4efb17
push esi
lea esi, [esp + 0xc]
cmp byte [esp + 0xc], cl
je 0x4efb64
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov al, byte [esi]
cmp al, 0x5c
jne 0x4efb4a
push 0
lea eax, [esp + 0x14]
push eax
mov byte [esi], 0
call edi
mov byte [esi], 0x5c
jmp 0x4efb5d
cmp al, 0x2f
jne 0x4efb5d
push 0
lea ecx, [esp + 0x14]
push ecx
mov byte [esi], 0
call edi
mov byte [esi], 0x2f
inc esi
cmp byte [esi], 0
jne 0x4efb33
pop edi
cmp dword [esp + 0x418], 0
pop esi
je 0x4efb76
push 0x554bfc
jmp 0x4efb7b
push 0x554bf8
push ebx
call fcn.0051bcea
mov ecx, dword [esp + 0x410]
add esp, 8
mov dword [ebp + 4], eax
test eax, eax
pop ebp
setne al
pop ebx
xor ecx, esp
call fcn.0051a8be
add esp, 0x404
ret 8
Function at 0x4efbb0
Capabilities:
Create directory

Disassembly:
sub esp, 0x404
mov eax, dword [0x57f7c4]
xor eax, esp
mov dword [esp + 0x400], eax
push ebx
mov ebx, dword [esp + 0x40c]
lea edx, [esp + 4]
push ebp
mov ebp, ecx
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4efbd7
push esi
lea esi, [esp + 0xc]
cmp byte [esp + 0xc], cl
je 0x4efc24
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov al, byte [esi]
cmp al, 0x5c
jne 0x4efc0a
push 0
lea eax, [esp + 0x14]
push eax
mov byte [esi], 0
call edi
mov byte [esi], 0x5c
jmp 0x4efc1d
cmp al, 0x2f
jne 0x4efc1d
push 0
lea ecx, [esp + 0x14]
push ecx
mov byte [esi], 0
call edi
mov byte [esi], 0x2f
inc esi
cmp byte [esi], 0
jne 0x4efbf3
pop edi
cmp dword [esp + 0x418], 0
pop esi
je 0x4efc36
push 0x554bfc
jmp 0x4efc3b
push 0x554bf8
push ebx
call fcn.0051bcea
mov ecx, dword [esp + 0x410]
add esp, 8
mov dword [ebp + 4], eax
test eax, eax
pop ebp
setne al
pop ebx
xor ecx, esp
call fcn.0051a8be
add esp, 0x404
ret 8

Function at 0x4f03d0
Capabilities:
Get system information on windows

Disassembly:
sub esp, 0x24
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [esp + 0x14]
cmp eax, 1
jae 0x4f03eb
mov eax, 1
add esp, 0x24
ret
Function at 0x4f1870
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x41c
mov eax, dword [0x57f7c4]
xor eax, esp
mov dword [esp + 0x418], eax
push ebp
push esi
mov esi, dword [esp + 0x428]
mov eax, dword [esi + 0x124]
push edi
push 4
lea ebp, [esi + 0x128]
push ebp
push 0x700b
push 0xffff
mov edi, ecx
push eax
mov dword [esp + 0x30], edi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x4f191e
push 0x583880
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [0x58385c]
mov dword [esi + 0x18], ecx
inc dword [0x58387c]
push 0x583880
mov dword [0x58385c], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x28]
push str.SWorker::IOAccept__:setsockopt____d
push edx
call fcn.0051a8cd
mov ecx, dword [edi + 0x410]
add esp, 0xc
test ecx, ecx
je 0x4f1a17
lea eax, [esp + 0x24]
push eax
push 1
push 1
call fcn.004f02e0
jmp 0x4f1a17
push ebx
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x20]
push ecx
push 0x20
xor ebx, ebx
push 0x20
push ebx
lea edi, [esi + 0x24]
push edi
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], ebx
call sub.MSWSOCK.dll_GetAcceptExSockaddrs
mov eax, dword [esi + 0x12c]
mov edx, dword [esp + 0x10]
mov ecx, dword [eax + 0x20]
push edx
mov edx, dword [esi + 0x124]
push ecx
mov ecx, dword [eax + 0x24]
push edx
call fcn.004ef3d0
mov eax, dword [esi + 0x12c]
cmp byte [eax + 0x18], bl
je 0x4f1a16
mov dword [esi + 0x124], 0xffffffff
mov ecx, dword [eax + 0x24]
call fcn.004ef1b0
mov edx, dword [ebp]
push esi
lea ecx, [esp + 0x1c]
push ecx
push 0x20
push 0x20
push ebx
push edi
push eax
push edx
mov dword [esi + 0x124], eax
mov dword [esp + 0x38], ebx
call sub.MSWSOCK.dll_AcceptEx
cmp eax, 0xffffffff
jne 0x4f1a16
push 0x583880
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x58385c]
mov dword [esi + 0x18], eax
inc dword [0x58387c]
push 0x583880
mov dword [0x58385c], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x2c]
push str.SWorker::IOAccept__:AcceptEx____d
push ecx
call fcn.0051a8cd
mov edx, dword [esp + 0x2c]
mov ecx, dword [edx + 0x410]
add esp, 0xc
cmp ecx, ebx
je 0x4f1a16
lea eax, [esp + 0x28]
push eax
push 1
push 1
call fcn.004f02e0
pop ebx
mov ecx, dword [esp + 0x424]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.0051a8be
add esp, 0x41c
ret 4
Function at 0x4f1a40
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x40c
mov eax, dword [0x57f7c4]
xor eax, esp
mov dword [esp + 0x408], eax
push ebp
push esi
mov esi, dword [esp + 0x418]
mov eax, dword [esi + 0x68]
push edi
mov edi, dword [esp + 0x420]
mov ebp, ecx
push 0
cmp eax, 0xffffffff
je 0x4f1b34
push edi
lea edx, [esp + 0x18]
push edx
lea edx, [esp + 0x18]
push edx
push 1
lea ecx, [edi + 0x20]
push ecx
push eax
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
call dword [sym.imp.WS2_32.dll_WSARecv]
cmp eax, 0xffffffff
jne 0x4f1b1a
push ebx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0x3e5
je 0x4f1b19
cmp ebx, 0x2746
je 0x4f1b06
cmp ebx, 0x2745
je 0x4f1b06
cmp ebx, 0x2775
je 0x4f1b06
cmp ebx, 0x2736
je 0x4f1b06
cmp ebx, 0x2714
je 0x4f1b06
mov eax, dword [edi + 0x20]
mov ecx, dword [edi + 0x1c]
mov edx, dword [esi + 0x68]
push eax
push ecx
push edx
push ebx
lea eax, [esp + 0x28]
push str.SWorker::Recv__:WSARecv____d___d__d__d_
push eax
call fcn.0051a8cd
add esp, 0x18
lea ecx, [esp + 0x18]
push ecx
mov ecx, ebp
call fcn.004f16e0
push ebx
push 7
push esi
mov ecx, ebp
call fcn.004f15b0
push edi
mov ecx, ebp
call fcn.004f17e0
pop ebx
mov ecx, dword [esp + 0x414]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.0051a8be
add esp, 0x40c
ret 8
push 5
mov ecx, esi
call fcn.004ec760
mov edx, dword [esi + 0xc8]
mov ecx, dword [edx + 0x120]
test ecx, ecx
je 0x4f1b5d
push esi
call fcn.004ed8b0
push edi
mov ecx, ebp
call fcn.004f17e0
jmp 0x4f1b1a
mov ecx, esi
call fcn.004ec7a0
push edi
mov ecx, ebp
call fcn.004f17e0
jmp 0x4f1b1a
Function at 0x4f1b70
Capabilities:
Send data
Send data on socket

Disassembly:
sub esp, 0x408
mov eax, dword [0x57f7c4]
xor eax, esp
mov dword [esp + 0x404], eax
push ebp
push esi
mov esi, dword [esp + 0x418]
push edi
mov edi, dword [esp + 0x418]
mov eax, dword [edi + 0x68]
mov ebp, ecx
cmp eax, 0xffffffff
je 0x4f1c55
mov edx, dword [esi + 0x24]
push 0
push esi
push 0
lea ecx, [esp + 0x18]
push ecx
push edx
lea ecx, [esi + 0x28]
push ecx
push eax
mov dword [esp + 0x28], 0
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x4f1c3b
push ebx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0x3e5
je 0x4f1c3a
lea edx, [edi + 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp ebx, 0x2746
je 0x4f1c27
cmp ebx, 0x2736
je 0x4f1c27
cmp ebx, 0x2745
je 0x4f1c27
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x24]
mov edx, dword [edi + 0x68]
push eax
push ecx
push edx
push ebx
lea eax, [esp + 0x24]
push str.SWorker::Send__:WSASend____d___d__d__d_
push eax
call fcn.0051a8cd
add esp, 0x18
lea ecx, [esp + 0x14]
push ecx
mov ecx, ebp
call fcn.004f16e0
push esi
mov ecx, ebp
call fcn.004f1830
push 0
push 9
mov ecx, edi
call fcn.004ec760
pop ebx
mov ecx, dword [esp + 0x410]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.0051a8be
add esp, 0x408
ret 8
lea edx, [edi + 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov ecx, esi
call fcn.004f13a0
push 0x5838bc
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x583898]
mov dword [esi + 0x18], eax
inc dword [0x5838b8]
push 0x5838bc
mov dword [0x583898], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0
push 9
mov ecx, edi
call fcn.004ec760
jmp 0x4f1c3b

Function at 0x4f8f80
Capabilities:
Create thread

Disassembly:
mov eax, dword [esp + 4]
cmp eax, 0x100
push ebx
push esi
push edi
mov esi, ecx
jg 0x4f8f96
mov dword [esi + 0x404], eax
xor ebx, ebx
cmp dword [esi + 0x404], ebx
jle 0x4f8fce
lea edi, [esi + 4]
cmp dword [edi], 0xffffffff
jne 0x4f8fdd
push esi
push 0x200000
push 0x4f8f60
call fcn.0051d0a0
add esp, 0xc
mov dword [edi], eax
cmp eax, 0xffffffff
je 0x4f8fdd
inc ebx
add edi, 4
cmp ebx, dword [esi + 0x404]
jl 0x4f8fa3
pop edi
mov byte [esi + 0x408], 1
pop esi
mov al, 1
pop ebx
ret 4
pop edi
pop esi
xor al, al
pop ebx
ret 4
Function at 0x4fb200
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
push ebx
push edi
push 0xf003f
push 0
push 0
mov ebx, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x4fb221
lea eax, [edi + 2]
pop edi
pop ebx
ret 0x14
cmp byte [esp + 0x1c], 0
push esi
mov esi, dword [esp + 0x10]
je 0x4fb24f
push 0
push esi
call fcn.0051fff6
add esp, 8
cmp eax, 0xffffffff
jne 0x4fb24f
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
pop edi
mov eax, 4
pop ebx
ret 0x14
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
push 0
push 0
push 0
push 0
push 0
push esi
push 0
push eax
push 0x10
push 2
push ecx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
je 0x4fb2a8
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4fb298
lea edx, [esp + 0x20]
push edx
push 1
push esi
mov dword [esp + 0x2c], eax
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
push esi
call ebx
push edi
xor esi, esi
call ebx
mov eax, esi
pop esi
pop edi
pop ebx
ret 0x14
push edi
mov esi, 1
call ebx
mov eax, esi
pop esi
pop edi
pop ebx
ret 0x14

Function at 0x4fb2c0
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
sub esp, 0x1c
push ebx
push esi
push 0xf003f
push 0
push 0
mov esi, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
jne 0x4fb2e5
pop esi
lea eax, [ebx + 2]
pop ebx
add esp, 0x1c
ret
push edi
push 0xf01ff
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x4fb30a
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea eax, [edi + 3]
pop edi
pop esi
pop ebx
add esp, 0x1c
ret
lea eax, [esp + 0xc]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [esp + 0x10], 1
je 0x4fb367
lea ecx, [esp + 0xc]
push ecx
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
xor esi, esi
cmp dword [esp + 0x24], esi
jbe 0x4fb367
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
lea ebx, [ebx]
lea edx, [esp + 0x10]
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [esp + 0x14], 1
je 0x4fb366
push 0x3e8
add esi, 0x3e8
call ebp
cmp esi, dword [esp + 0x28]
jb 0x4fb340
pop ebp
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov esi, eax
neg esi
sbb esi, esi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
inc esi
call edi
push ebx
call edi
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x1c
ret
Function at 0x4fb7b0
Capabilities:
Check for time delay via gettickcount
Query service status
Start service

Disassembly:
sub esp, 0x42c
mov eax, dword [0x57f7c4]
xor eax, esp
mov dword [esp + 0x428], eax
push ebx
push esi
push edi
push 0xf003f
push 0
mov ebx, ecx
push 0
mov dword [esp + 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
mov dword [esp + 0xc], edi
test edi, edi
jne 0x4fb828
mov ecx, 0xc
mov esi, str.SServiceControl::ServiceStart_OpenSCManager_NULL
lea edi, [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x100]
lea eax, [esp + 0x34]
push eax
push 1
push 3
movsb byte es:[edi], byte [esi]
call fcn.004f02e0
pop edi
pop esi
mov eax, 2
pop ebx
mov ecx, dword [esp + 0x428]
xor ecx, esp
call fcn.0051a8be
add esp, 0x42c
ret
push 0x14
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x4fb883
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, 0xb
mov esi, str.SServiceControl::ServiceStart_OpenService_NULL
lea edi, [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [ebx + 0x100]
movsw word es:[edi], word [esi]
push 1
push 3
movsb byte es:[edi], byte [esi]
call fcn.004f02e0
pop edi
pop esi
mov eax, 3
pop ebx
mov ecx, dword [esp + 0x428]
xor ecx, esp
call fcn.0051a8be
add esp, 0x42c
ret
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
cmp eax, 1
jne 0x4fb95f
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
push ebp
lea edx, [esp + 0x1c]
push edx
push esi
call edi
mov eax, dword [esp + 0x34]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push eax
call ebx
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebp
cmp dword [esp + 0x20], 4
mov dword [esp + 0x18], eax
je 0x4fb8e6
lea ecx, [esp + 0x1c]
push ecx
push esi
call edi
push 0
call ebx
call ebp
sub eax, dword [esp + 0x18]
cmp eax, 0x3e8
jae 0x4fb911
cmp dword [esp + 0x20], 4
jne 0x4fb8c6
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov edx, dword [esp + 0x10]
push edx
call esi
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x428]
xor ecx, esp
call fcn.0051a8be
add esp, 0x42c
ret
mov eax, dword [esp + 0x20]
cmp eax, 4
je 0x4fb8e6
cmp eax, 2
je 0x4fb8e6
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov edx, dword [esp + 0x10]
push edx
call esi
mov ecx, 0x16
mov esi, str.SServiceControl::ServiceStart_ss.dwCurrentState___SERVICE_RUNNING_SERVICE_START_PENDING
lea edi, [esp + 0x38]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx + 0x100]
lea eax, [esp + 0x38]
push eax
push 1
push 3
movsb byte es:[edi], byte [esi]
call fcn.004f02e0
mov eax, 1
jmp 0x4fb8f8
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
lea eax, [esp + 0x234]
push eax
mov ecx, 0xc
mov esi, str.SServiceControl::ServiceStart_StartService_NULL
lea edi, [esp + 0x238]
push 1
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x100]
push 3
call fcn.004f02e0
mov ecx, dword [esp + 0x434]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.0051a8be
add esp, 0x42c
ret