joyce8/EMBER2024-capa huggingface dataset:
Function at 0x511940
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x615720]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
xor ebx, ebx
mov ecx, dword [ebp + 8]
push edi
test ecx, ecx
je 0x511963
cmp word [ecx], bx
jne 0x511968
mov ecx, str.0.0.0.0
mov edx, dword [ebp + 0xc]
xor eax, eax
mov word [ebp - 0x30], ax
lea eax, [ebp - 0x30]
push eax
call fcn.00514e90
add esp, 4
test eax, eax
je 0x511afe
mov ax, word [ebp - 0x30]
push 6
mov word [esi + 0x4c], ax
push 1
movzx eax, ax
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, eax
mov dword [esi + 0x54], ecx
cmp ecx, 0xffffffff
je 0x511afe
mov edx, dword [esi + 0x34]
test edx, edx
je 0x5119bc
cmp dword [esi + 0x38], ebx
jbe 0x5119bc
mov eax, 1
jmp 0x5119be
xor eax, eax
push 0
push 0
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x38]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x10]
mov dword [ebp - 0xc], edx
push eax
push 0x98000004
push ecx
call dword [sym.imp.WS2_32.dll_WSAIoctl]
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0xffffffff
jne 0x511a04
call edi
cmp eax, 0x2733
je 0x511a04
test eax, eax
jne 0x511b27
push 4
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 1
push eax
push 0xfffffffffffffffb
push 0xffff
push dword [esi + 0x54]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x511b31
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 1
push eax
push 0x8004667e
push dword [esi + 0x54]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x511b3b
cmp word [ebp - 0x30], 2
mov ecx, 0x10
mov eax, 0x1c
cmove eax, ecx
push eax
lea eax, [ebp - 0x30]
push eax
push dword [esi + 0x54]
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x511aeb
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esi]
mov ecx, esi
push dword [esi + 0x54]
call dword [eax + 0xe4]
cmp eax, 2
je 0x511ad5
push dword [esi + 0x14]
push dword [esi + 0x54]
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x511ac2
mov ecx, dword [esi + 0x54]
call fcn.00514f10
mov ecx, dword [esi + 0x54]
mov dword [esi + 0x40], eax
call fcn.00514f80
mov ecx, dword [esi + 0x54]
mov dword [esi + 0x44], eax
call fcn.00514ff0
mov dword [esi + 0x48], eax
mov ebx, 1
jmp 0x511b12
call edi
push eax
push str.CTcpServer::CreateListenSocket
push 6
mov ecx, esi
call fcn.00511670
jmp 0x511b12
call fcn.005113e0
push eax
push str.CTcpServer::CreateListenSocket
push 5
mov ecx, esi
call fcn.00511670
jmp 0x511b12
call edi
push eax
push str.CTcpServer::CreateListenSocket
push 4
mov ecx, esi
call fcn.00511670
jmp 0x511b12
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov dword [esi + 0x60], 3
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0055e48d
mov esp, ebp
pop ebp
ret 8
push 0x80004005
call fcn.004e16e0
push 0x80004005
call fcn.004e16e0
push 0x80004005
call fcn.004e16e0
int3
Function at 0x511b50
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 8], esi
cmp dword [esi + 0x10], ebx
jbe 0x511c16
push edi
lea esp, [esp]
push 0
push 0
push esi
push 0x512cf0
push 0
push 0
call fcn.00565c68
mov edi, eax
add esp, 0x18
mov dword [ebp - 4], edi
test edi, edi
je 0x511bf9
mov eax, dword [esi + 0x68]
lea ecx, [ebp - 4]
cmp ecx, eax
jae 0x511bc9
mov ecx, dword [esi + 0x64]
lea edx, [ebp - 4]
cmp ecx, edx
ja 0x511bc9
mov edi, edx
sub edi, ecx
sar edi, 2
cmp eax, dword [esi + 0x6c]
jne 0x511bb8
push ecx
lea ecx, [esi + 0x64]
call fcn.00514510
mov ecx, dword [esi + 0x68]
test ecx, ecx
je 0x511be0
mov eax, dword [esi + 0x64]
mov eax, dword [eax + edi*4]
mov dword [ecx], eax
jmp 0x511be0
cmp eax, dword [esi + 0x6c]
jne 0x511bd7
push ecx
lea ecx, [esi + 0x64]
call fcn.00514510
mov eax, dword [esi + 0x68]
test eax, eax
je 0x511be0
mov dword [eax], edi
add dword [esi + 0x68], 4
inc ebx
mov esi, dword [ebp - 8]
cmp ebx, dword [esi + 0x10]
jb 0x511b70
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov dword [esi + 0x60], 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x512340
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
xor eax, eax
mov dword [ebp - 4], 0x1c
mov word [ebp - 0x20], ax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ecx + 0x54]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x512370
xor eax, eax
mov esp, ebp
pop ebp
ret 0xc
push dword [ebp + 0x10]
lea edx, [ebp + 0x10]
push dword [ebp + 0xc]
lea ecx, [ebp - 0x20]
push dword [ebp + 8]
call fcn.00514db0
add esp, 0xc
mov esp, ebp
pop ebp
ret 0xc

Function at 0x512390
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
mov esi, dword [ecx + 0x168]
test esi, esi
je 0x51241b
mov eax, dword [ebp + 8]
xor edx, edx
dec eax
div dword [ecx + 0x164]
mov ecx, dword [ecx + 0x1a8]
movzx ecx, byte [ecx + edx]
cmp eax, ecx
jne 0x51241b
mov ecx, dword [esi + edx*4]
mov eax, 0xf
cmp eax, ecx
sbb eax, eax
neg eax
cmp eax, 1
jne 0x51241b
test ecx, ecx
je 0x51241b
cmp dword [ecx + 0x30], 0
je 0x51241b
xor eax, eax
mov dword [ebp - 4], 0x1c
mov word [ebp - 0x20], ax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ecx + 0x8c]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x51241b
push dword [ebp + 0x14]
lea edx, [ebp + 8]
push dword [ebp + 0x10]
lea ecx, [ebp - 0x20]
push dword [ebp + 0xc]
call fcn.00514db0
add esp, 0xc
pop esi
mov esp, ebp
pop ebp
ret 0x10
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0x10
Function at 0x513370
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59c168
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x615720]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, ecx
mov dword [ebp - 0x10], edx
mov esi, dword [ebp + 8]
xor edi, edi
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x18], edi
jmp 0x5133b0
cmp dword [esi + 0x50], 0
jne 0x5134b2
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
test eax, eax
je 0x5133cc
cmp eax, 1
jne 0x5134b2
mov ecx, dword [ebp + 0xc]
mov eax, dword [edx + 0x1c]
lea ebx, [ecx + 0x1c]
cmp dword [ebx], eax
jne 0x5134a8
xor edi, edi
mov dword [ebx], eax
push edi
push edi
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], edi
push eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], edi
push eax
push 1
push ebx
push dword [ecx + 0x34]
call dword [sym.imp.WS2_32.dll_WSARecv]
cmp eax, 0xffffffff
jne 0x51340c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
jmp 0x51341c
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x513417
mov dword [ebx], eax
jmp 0x513424
mov edi, 0x2775
test edi, edi
jne 0x5134ac
cmp dword [esi + 0x30], 0
mov eax, 0xff
mov dword [ebp - 0x14], eax
je 0x51348b
add esi, 0x58
push esi
mov dword [ebp - 0x20], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 8]
mov dword [ebp - 4], 0
cmp dword [eax + 0x30], 0
je 0x513472
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebx]
mov ecx, dword [ebp - 0x10]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ecx]
push dword [ebx + 0x20]
push dword [ebp + 8]
call dword [eax + 0xf4]
mov dword [ebp - 0x14], eax
jmp 0x513475
mov ebx, dword [ebp + 0xc]
push esi
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 0x14]
jmp 0x51348e
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x10]
mov dword [ecx], eax
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
cmp eax, 0x1e
jl 0x5133b0
jmp 0x5134b2
mov ebx, ecx
jmp 0x5134b2
mov ebx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
test eax, eax
je 0x5134c0
cmp eax, 1
jne 0x513519
test edi, edi
je 0x51352f
cmp edi, 0x2733
je 0x51352f
cmp edi, 0x2775
jne 0x5134dc
push 0
push 0
push 1
jmp 0x5134f1
cmp edi, 0x2736
je 0x5134f9
cmp edi, 0x3e3
je 0x5134f9
push edi
push 4
push 2
push esi
mov ecx, edx
call fcn.00511fc0
mov ecx, dword [ebp - 0x10]
push ebx
add ecx, 0x9c
call fcn.005105a0
test eax, eax
jne 0x513519
push ebx
push eax
mov eax, dword [ebx + 0x14]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x513980
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0x10]
mov dword [ebp - 8], ecx
test eax, eax
jle 0x513aff
push ebx
lea ebx, [ecx + 0x80]
push esi
mov dword [ebp - 0xc], ebx
push edi
mov esi, dword [ecx + 0x1c]
cmp eax, esi
lea ecx, [ebx + 0x1c]
mov dword [ebp - 4], 0
cmovl esi, eax
lea eax, [ebp - 4]
push eax
mov dword [ebp - 0x10], esi
call fcn.0050f300
test eax, eax
je 0x5139dc
mov ebx, dword [ebp - 4]
xorps xmm0, xmm0
movdqu xmmword [ebx], xmm0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x1c], 0
jmp 0x513a0e
mov edi, dword [ebx + 0x10]
lea eax, [edi + 0x38]
push eax
push 0
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0x38
mov ebx, eax
push 0
push ebx
call fcn.0055eb60
mov eax, dword [ebp - 0xc]
add esp, 0xc
mov dword [ebx + 0x14], eax
lea eax, [ebx + 0x38]
mov dword [ebx + 0x24], edi
mov dword [ebx + 0x20], eax
mov dword [ebp - 4], ebx
test esi, esi
jns 0x513a1a
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x1c]
jmp 0x513a1d
mov eax, dword [ebp - 0x10]
push esi
push dword [ebp + 0xc]
lea edi, [ebx + 0x1c]
mov dword [edi], eax
push dword [ebx + 0x20]
call fcn.0055d750
mov edx, dword [ebp + 8]
add esp, 0xc
mov eax, esi
lea ecx, [edx + 0x44]
lock xadd dword [ecx], eax
mov eax, dword [edx + 0x8c]
push 0
push ebx
mov dword [ebx + 0x34], eax
lea eax, [ebp - 0x10]
push 0
push eax
push 1
push edi
push dword [ebx + 0x34]
mov dword [ebp - 0x10], 0
mov dword [ebx + 0x18], 3
mov dword [ebx + 0x28], 2
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x513a7f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
jmp 0x513a81
xor edi, edi
xor eax, eax
lea ecx, [ebx + 0x28]
cmp edi, 0x3e5
cmove edi, eax
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
je 0x513a9d
test edi, edi
je 0x513ac1
mov ecx, dword [ebp - 8]
push ebx
lea ecx, [ecx + 0x9c]
call fcn.005105a0
test eax, eax
jne 0x513abd
push ebx
push eax
mov eax, dword [ebx + 0x14]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_HeapFree]
test edi, edi
jne 0x513ae8
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 8]
sub eax, esi
add dword [ebp + 0xc], esi
mov dword [ebp + 0x10], eax
lea ebx, [ecx + 0x80]
test eax, eax
jg 0x5139a0
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 8]
neg esi
add eax, 0x44
lock xadd dword [eax], esi
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
xor eax, eax
mov esp, ebp
pop ebp
ret 0xc
Function at 0x51a2c0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x615720]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x118], 0x114
push 0x110
push 0
lea eax, [ebp - 0x114]
push eax
call fcn.0055eb60
add esp, 0xc
lea ecx, [ebp - 0x118]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0
je 0x51a324
cmp dword [ebp - 0x114], 6
jb 0x51a324
mov dword [ebp - 0x11c], 1
jmp 0x51a32e
mov dword [ebp - 0x11c], 0
mov al, byte [ebp - 0x11c]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055e48d
mov esp, ebp
pop ebp
ret

Function at 0x51ac90
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x51acb4
xor eax, eax
jmp 0x51ad34
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x51accb
xor eax, eax
jmp 0x51ad34
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 4]
add edx, dword [ebp - 0x14]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp + 0x10]
and eax, 0xf
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jbe 0x51ad17
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x10]
jae 0x51ad17
mov edx, dword [ebp - 4]
movzx eax, word [edx]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax*2 + 2]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 8]
sub eax, 1
mov dword [ebp - 8], eax
jmp 0x51acee
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x10]
jb 0x51ad23
xor eax, eax
jmp 0x51ad34
mov edx, dword [ebp - 4]
movzx eax, word [edx]
test eax, eax
jne 0x51ad31
xor eax, eax
jmp 0x51ad34
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x51e340
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x848
mov eax, dword [0x615720]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x83c], ecx
mov dword [ebp - 0x840], 0
movzx eax, byte [ebp + 8]
push eax
mov ecx, dword [ebp - 0x83c]
call fcn.00522b70
mov dword [ebp - 0x848], eax
movzx ecx, byte [ebp + 8]
test ecx, ecx
je 0x51e58c
mov ecx, dword [ebp - 0x83c]
call fcn.00521c40
test eax, eax
je 0x51e58c
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x844], eax
mov dword [ebp - 0x838], 0
cmp dword [ebp - 0x844], 0
jne 0x51e3cd
call fcn.0050fd20
mov dword [ebp - 0x840], eax
jmp 0x51e57f
push 0xf01ff
mov edx, dword [ebp - 0x83c]
add edx, 0x2c
push edx
mov eax, dword [ebp - 0x844]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x838], eax
cmp dword [ebp - 0x838], 0
je 0x51e574
mov ecx, dword [ebp - 0x83c]
add ecx, 0x2c
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 2
push 0x110
mov edx, dword [ebp - 0x838]
push edx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
push 0x400
push 0
lea eax, [ebp - 0x804]
push eax
call fcn.0055eb60
add esp, 0xc
push 4
push 0
lea ecx, [ebp - 0x820]
push ecx
call fcn.0055eb60
add esp, 0xc
push 0x5a5388
lea edx, [ebp - 0x804]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x804]
mov dword [ebp - 0x820], eax
lea ecx, [ebp - 0x820]
push ecx
push 1
mov edx, dword [ebp - 0x838]
push edx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push 0x14
push 0
lea eax, [ebp - 0x834]
push eax
call fcn.0055eb60
add esp, 0xc
push 8
push 0
lea ecx, [ebp - 0x81c]
push ecx
call fcn.0055eb60
add esp, 0xc
mov edx, 8
imul eax, edx, 0
mov dword [ebp + eax - 0x818], 0
mov ecx, 8
imul edx, ecx, 0
mov dword [ebp + edx - 0x81c], 1
mov eax, 8
shl eax, 0
mov dword [ebp + eax - 0x818], 0xea60
mov ecx, 8
shl ecx, 0
mov dword [ebp + ecx - 0x81c], 1
mov edx, 8
shl edx, 1
mov dword [ebp + edx - 0x818], 0
mov eax, 8
shl eax, 1
mov dword [ebp + eax - 0x81c], 0
mov dword [ebp - 0x830], 0
mov dword [ebp - 0x834], 0x15180
mov dword [ebp - 0x828], 3
lea ecx, [ebp - 0x81c]
mov dword [ebp - 0x824], ecx
mov dword [ebp - 0x82c], 0
lea edx, [ebp - 0x834]
push edx
push 2
mov eax, dword [ebp - 0x838]
push eax
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
mov ecx, dword [ebp - 0x838]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x51e57f
call fcn.0050fd20
mov dword [ebp - 0x840], eax
mov edx, dword [ebp - 0x844]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x840]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055e48d
mov esp, ebp
pop ebp
ret 4
Function at 0x51ead0
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59cb10
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x615720]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x4c], ecx
mov eax, dword [ebp - 0x4c]
movzx ecx, byte [eax + 0x278]
test ecx, ecx
je 0x51eb7a
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x78]
push eax
call fcn.004e3410
add esp, 4
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x58]
mov dword [ebp - 0x54], ecx
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x54]
call fcn.004e9c70
push eax
push str.__s____s
lea edx, [ebp - 0x28]
push edx
call fcn.004e2580
add esp, 0x10
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x78]
call fcn.004e99d0
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x5c], esp
lea eax, [ebp - 0x28]
push eax
call fcn.004e9870
mov dword [ebp - 0x60], eax
mov ecx, dword [ebp - 0x4c]
call fcn.0051efd0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.004e99d0
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
jne 0x51eb94
jmp 0x51ec05
push 0xf01ff
mov ecx, dword [ebp - 0x4c]
add ecx, 0x2c
push ecx
mov edx, dword [ebp - 0x48]
push edx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
jne 0x51ebbf
mov eax, dword [ebp - 0x48]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x51ec05
lea ecx, [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x50]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x51ebd3
jmp 0x51ec05
cmp dword [ebp - 0x40], 1
jne 0x51ebf1
push 0
push 0
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push 4
mov ecx, dword [ebp - 0x4c]
call fcn.00523f60
mov ecx, dword [ebp - 0x50]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebp - 0x48]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0055e48d
mov esp, ebp
pop ebp
ret 4
Function at 0x51ec20
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x615720]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x30], ecx
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x51ec50
jmp 0x51ecd4
push 0xf01ff
mov eax, dword [ebp - 0x30]
add eax, 0x2c
push eax
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x51ec7b
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x51ecd4
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x51eca3
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x51ecd4
cmp dword [ebp - 0x1c], 1
jne 0x51ecc0
mov dword [ebp - 0x24], 0x5a51a8
lea ecx, [ebp - 0x24]
push ecx
push 1
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055e48d
mov esp, ebp
pop ebp
ret

Function at 0x51ecf0
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x615720]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x24], ecx
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x51ed20
jmp 0x51edba
push 0xf01ff
mov eax, dword [ebp - 0x24]
add eax, 0x2c
push eax
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x51ed4b
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x51edba
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x51ed5f
jmp 0x51edba
cmp dword [ebp - 0x1c], 4
jne 0x51edb0
push 0x20
mov ecx, dword [ebp - 0x24]
call fcn.00523f60
mov edx, dword [ebp - 0x24]
cmp dword [edx + 0x26c], 0
je 0x51eda6
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0x26c]
cmp dword [ecx + 4], 0
je 0x51eda6
push 0
push 0
push 0x4ca
mov edx, dword [ebp - 0x24]
mov eax, dword [edx + 0x26c]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.USER32.dll_PostMessageW]
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055e48d
mov esp, ebp
pop ebp
ret
Function at 0x51edd0
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59cb66
mov eax, dword fs:[0]
push eax
sub esp, 0xb0
mov eax, dword [0x615720]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x74], ecx
lea eax, [ebp - 0xa4]
push eax
call fcn.004e31d0
add esp, 4
mov dword [ebp - 0x60], eax
mov ecx, dword [ebp - 0x60]
mov dword [ebp - 0x64], ecx
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x64]
call fcn.004e9c70
push eax
push str._sadsconfig.ini
lea edx, [ebp - 0x28]
push edx
call fcn.004e2580
add esp, 0xc
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xa4]
call fcn.004e99d0
lea eax, [ebp - 0x8c]
push eax
call fcn.004e3590
add esp, 4
mov dword [ebp - 0x68], eax
mov ecx, dword [ebp - 0x68]
mov dword [ebp - 0x70], ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x70]
call fcn.004e9c70
push eax
push 0x5a51d0
lea edx, [ebp - 0x40]
push edx
call fcn.004e2580
add esp, 0xc
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x8c]
call fcn.004e99d0
lea eax, [ebp - 0xbc]
push eax
call fcn.004e3770
add esp, 4
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x6c], ecx
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x6c]
call fcn.004e9c70
push eax
push 0x5a5228
lea edx, [ebp - 0x58]
push edx
call fcn.004e2580
add esp, 0xc
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xbc]
call fcn.004e99d0
lea ecx, [ebp - 0x28]
call fcn.004e9c70
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x40]
call fcn.004e9c70
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x58]
call fcn.004e9c70
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x58]
call fcn.004e99d0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x40]
call fcn.004e99d0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.004e99d0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0055e48d
mov esp, ebp
pop ebp
ret

Function at 0x51efd0
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x615720]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x10], 0x5a5270
lea eax, [ebp - 8]
push eax
push 0x2001f
push 0
mov ecx, dword [ebp - 0x10]
push ecx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x51f047
lea ecx, [ebp + 8]
call fcn.004e92c0
shl eax, 1
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
push edx
lea ecx, [ebp + 8]
call fcn.004e9c70
push eax
push 1
push 0
push str.ImagePath
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp + 8]
call fcn.004e99d0
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055e48d
mov esp, ebp
pop ebp
ret 0x18