joyce8/EMBER2024-capa huggingface dataset:
Function at 0x43d487
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
xor eax, eax
push eax
push eax
push eax
push 4
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
pop ebp
ret 4

Function at 0x4406cf
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
push 0x33
pop edi
push 0x1f
pop esi
mov dword [ebp - 4], edi
mov dword [ebp - 8], esi
push 0x20
pop ecx
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 8]
cdq
push 0x3b
pop ebx
idiv ebx
push 0x14
pop ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
cdq
idiv ebx
mov edx, dword [ebp - 4]
sub eax, edx
add eax, dword [ebp - 4]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
cmp eax, edx
jg 0x44073f
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 4]
imul eax, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
imul eax, edx
mov edx, dword [ebp - 4]
imul eax, eax, 0xb
lea eax, [eax + edx + 5]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
add eax, dword [ebp - 4]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov edx, 0x5a4d
cmp word [eax], dx
je 0x440750
xor eax, eax
jmp 0x4407ca
mov ebx, dword [eax + 0x3c]
add ebx, eax
cmp dword [ebx], 0x4550
jne 0x44074c
mov dword [ebp - 4], edi
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 8]
cdq
push 0x3b
pop ecx
idiv ecx
push 0x14
pop ecx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
cdq
idiv ecx
mov ecx, dword [ebp - 4]
sub eax, ecx
add eax, dword [ebp - 4]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
cmp eax, ecx
jg 0x4407bb
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 4]
imul eax, ecx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
imul eax, ecx
mov ecx, dword [ebp - 4]
imul eax, eax, 0xb
lea eax, [eax + ecx + 5]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
add eax, dword [ebp - 4]
mov dword [ebp - 8], eax
mov ebx, dword [ebx + 0x98]
test ebx, ebx
je 0x44074c
mov eax, dword [ebp + 8]
add eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40c4e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push dword [ebp + 0xc]
call fcn.0040c4a7
push 0xc
push dword [ebp + 8]
lea eax, [ebp - 0xc]
push eax
call fcn.00408ca3
xor esi, esi
lea edx, [ebp + esi - 0xc]
call fcn.0040c42d
xor byte [edx], al
movzx eax, byte [edx]
push eax
call fcn.0040c44d
inc esi
cmp esi, 0xc
jl 0x40c4ff
movzx ax, byte [ebp - 1]
movzx ecx, ax
mov eax, dword [0x410550]
test byte [eax + 0x28], 2
movzx eax, byte [0x4205bf]
jne 0x40c53a
movzx eax, byte [0x4205c7]
movzx ecx, cx
cmp ecx, eax
je 0x40c546
or eax, 0xffffffff
jmp 0x40c58b
mov ecx, dword [0x420568]
mov eax, ecx
cdq
cmp edx, dword [0x40f924]
push edi
jl 0x40c568
mov edx, dword [0x40f920]
jg 0x40c564
cmp eax, edx
jbe 0x40c568
mov edi, edx
jmp 0x40c56a
mov edi, ecx
mov esi, dword [0x420560]
jmp 0x40c584
dec edi
call fcn.0040c42d
xor byte [esi], al
movzx eax, byte [esi]
push eax
call fcn.0040c44d
inc esi
test edi, edi
jne 0x40c572
xor eax, eax
pop edi
pop esi
leave
ret 8

Function at 0x433000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43300c
pop eax
nop
nop
nop
nop
nop
add eax, 0x40a063
nop
nop
sub eax, 0x40a009
mov ebx, dword [eax]
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
xor dword [ebx], edx
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
jl 0x433030
nop
nop
nop
add eax, 0xc
cmp dword [eax], 0
nop
nop
nop
nop
jne 0x43301e
nop
nop
nop
nop
popal
nop
nop
nop
nop
jmp 0x431219
Function at 0x180fb6c
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x181b520]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.01806e52
and dword [ebp - 0x14], 0
cmp dword [0x185d558], 0
mov dword [ebp - 0x18], eax
jne 0x180fc1f
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x180fcc7
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x180fcc7
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x185d558], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x185d55c], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x185d560], eax
call edi
push eax
call esi
mov dword [0x185d568], eax
test eax, eax
je 0x180fc1f
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x185d564], eax
mov eax, dword [0x185d564]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x180fc78
cmp dword [0x185d568], ecx
je 0x180fc78
push eax
call esi
push dword [0x185d568]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x180fc78
test ebx, ebx
je 0x180fc78
call edi
test eax, eax
je 0x180fc6f
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x180fc6f
test byte [ebp - 8], 1
jne 0x180fc78
or dword [ebp + 0x10], 0x200000
jmp 0x180fcab
mov eax, dword [0x185d55c]
cmp eax, dword [ebp - 0x18]
je 0x180fcab
push eax
call esi
test eax, eax
je 0x180fcab
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x180fcab
mov eax, dword [0x185d560]
cmp eax, dword [ebp - 0x18]
je 0x180fcab
push eax
call esi
test eax, eax
je 0x180fcab
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x185d558]
call esi
test eax, eax
je 0x180fcc7
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x180fcc9
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.018013cb
leave
ret

Function at 0x431005
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
call 0x43100c
nop
nop
nop
nop
nop
pop eax
nop
add eax, 0x403e6a
sub eax, 0x403e10
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
mov edx, dword [eax + 8]
xor dword [ebx], edx
nop
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
nop
nop
cmp ebx, ecx
jl 0x431030
nop
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
nop
nop
cmp dword [eax], 0
nop
jne 0x43101e
nop
nop
nop
nop
popal
nop
nop
nop
nop
jmp fcn.00401219
Function at 0x401250
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401269
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x40127d
pop esi
pop edi
xor eax, eax
pop ebx
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x40129e
cmp esi, eax
jae 0x401277
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401290
cmp esi, eax
jae 0x401277
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret

Function at 0x4016b0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
push esi
push edi
mov edi, dword [esp + 0x10]
mov eax, edi
mov ebp, ecx
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4016c0
sub eax, edx
lea esi, [eax + 1]
test esi, esi
jle 0x4016f3
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_send]
mov eax, dword [ebp + 4]
push 0
push esi
push edi
push eax
call ebx
cmp eax, 0xffffffff
je 0x4016ee
sub esi, eax
add edi, eax
test esi, esi
jg 0x4016d7
mov edi, dword [esp + 0x14]
pop ebx
push edi
push 0x410418
call fcn.004062a0
add esp, 8
pop edi
pop esi
pop ebp
ret 4
Function at 0x404ba0
Capabilities:
Create thread

Disassembly:
push 0xffffffffffffffff
push 0x40ea63
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
mov eax, dword [0x413910]
push ebx
push esi
push edi
push eax
lea ecx, [esp + 0x10]
call fcn.00405030
mov eax, dword [0x41390c]
cmp dword [0x413908], eax
mov dword [esp + 0x1c], 0
jne 0x404c20
lea ecx, [eax*4 + 0xf8]
push ecx
call sub.MSVCR71.dll_void____cdecl_operator_new___unsigned_int_
mov ecx, dword [0x41390c]
mov esi, dword [0x413904]
mov ebx, eax
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov edx, dword [0x413904]
push edx
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
mov eax, dword [0x41390c]
add esp, 8
add eax, 0x3e
mov dword [0x413904], ebx
mov dword [0x41390c], eax
push 0x1c
call sub.MSVCR71.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
mov byte [esp + 0x1c], 1
je 0x404c42
mov ecx, eax
call fcn.00402ad0
mov esi, eax
jmp 0x404c44
xor esi, esi
mov eax, dword [esp + 0x24]
mov dword [esi + 4], eax
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov ecx, dword [esi + 4]
push 0x21
push eax
push ecx
mov dword [esi + 8], eax
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov edx, dword [0x413908]
mov eax, dword [0x413904]
mov dword [eax + edx*4], esi
mov edi, dword [0x413908]
lea ecx, [edi + 0x3d]
mov eax, 0x8421085
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 5
inc edi
mov esi, ecx
mov dword [0x413908], edi
xor edi, edi
test esi, esi
jle 0x404caf
mov ebx, dword [sym.imp.KERNEL32.dll_SetEvent]
lea ecx, [ecx]
mov ecx, dword [edi*4 + 0x41391c]
push ecx
call ebx
inc edi
cmp edi, esi
jl 0x404ca0
mov ecx, dword [0x413908]
add ecx, 0x3d
mov eax, 0x8421085
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 5
pop edi
cmp ecx, esi
pop esi
pop ebx
jle 0x404cf1
lea edx, [esp + 0x18]
push edx
push 0
dec ecx
push ecx
push 0x404970
push 0
push 0
call dword [sym.imp.MSVCR71.dll__beginthreadex]
add esp, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp]
mov dword [esp + 0x10], 0xffffffff
call fcn.00405050
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x404e70
Capabilities:
Create tcp socket
Create thread
Get local ipv4 addresses
Get socket information
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2b4
mov eax, dword [0x4138d0]
push ebx
push esi
mov dword [esp + 0x2b8], eax
push edi
lea eax, [esp + 0x128]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x404f78
xor ebx, ebx
push ebx
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, ebx
je 0x404f78
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
push 6
push 1
push 2
mov dword [0x4138f8], eax
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [0x413914], eax
je 0x404f78
xor ecx, ecx
mov dword [esp + 0x18], ecx
push 0x10
mov dword [esp + 0x20], ecx
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x28], ecx
push eax
mov dword [esp + 0x30], ecx
mov word [esp + 0x24], 2
mov word [esp + 0x26], bx
mov dword [esp + 0x28], ebx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x404f3a
mov eax, dword [0x413914]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [0x413914], ebx
xor ax, ax
mov ecx, dword [esp + 0x2bc]
call fcn.0040e0fe
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
mov ecx, dword [0x413914]
push accept
push ecx
mov dword [esp + 0x18], 0x100
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
mov edx, dword [0x413914]
je 0x404f8e
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [0x413914], ebx
xor ax, ax
mov ecx, dword [esp + 0x2bc]
call fcn.0040e0fe
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x2c]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_getsockname]
mov eax, dword [esp + 0x2a]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov edi, dword [sym.imp.MSVCR71.dll__beginthreadex]
lea ecx, [esp + 0x14]
push ecx
push ebx
push ebx
push 0x404d10
push ebx
push ebx
mov esi, eax
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0x18
push eax
call ebx
push 0x10
call sub.MSVCR71.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0x2c]
mov edx, eax
mov dword [edx], ecx
mov ecx, dword [esp + 0x30]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x34]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x38]
mov dword [edx + 0xc], ecx
lea edx, [esp + 0x18]
push edx
push 0
push eax
push 0x401ad0
push 0
push 0
call edi
add esp, 0x1c
push eax
call ebx
mov ecx, dword [esp + 0x2bc]
mov ax, si
call fcn.0040e0fe
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x406400
Capabilities:
Set registry value

Disassembly:
mov edx, dword [esp + 4]
push 4
lea eax, [esp + 0xc]
push eax
mov eax, dword [ecx]
push 4
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
ret 8

Function at 0x406420
Capabilities:
Set registry value

Disassembly:
push esi
push edi
mov edi, dword [esp + 0x10]
push edi
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0xc]
mov edx, dword [esi]
inc eax
push eax
mov eax, dword [esp + 0x18]
push edi
push eax
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
pop edi
pop esi
ret 0xc

Function at 0x406450
Capabilities:
Set registry value

Disassembly:
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebp
push esi
mov esi, dword [esp + 0x14]
push edi
mov ebp, ecx
xor edi, edi
push esi
call ebx
inc eax
add esi, eax
add edi, eax
cmp eax, 1
jne 0x406462
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [ebp]
push edi
push eax
push 7
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
pop edi
pop esi
pop ebp
pop ebx
ret 8

Function at 0x4069e0
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
sub esp, 0x11c
mov eax, dword [0x4138d0]
mov edx, dword [esp + 0x120]
push esi
push edi
mov edi, ecx
lea ecx, [esp + 0x10]
push ecx
push 0x2001f
push 0
mov dword [esp + 0x12c], eax
mov eax, dword [edi]
push edx
push eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x24], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ecx, dword [esp + 8]
mov esi, eax
test esi, esi
jne 0x406a4a
test ecx, ecx
je 0x406a3c
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
mov ecx, dword [esp + 0x10]
mov esi, eax
mov dword [esp + 8], ecx
je 0x406a58
test ecx, ecx
je 0x406afb
push ecx
jmp 0x406af5
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
lea eax, [esp + 0x18]
push eax
push 0
push 0
push 0
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x34]
push eax
push 0
push ecx
mov dword [esp + 0x2c], 0x100
call esi
test eax, eax
jne 0x406ac2
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0xc]
call fcn.004069e0
mov edi, eax
test edi, edi
jne 0x406b14
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0xc]
push eax
push eax
push eax
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x34]
push ecx
push edi
push edx
mov dword [esp + 0x2c], 0x100
call esi
test eax, eax
je 0x406a84
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 8]
test eax, eax
je 0x406ad9
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 8], 0
mov eax, dword [esp + 0x128]
mov ecx, dword [edi]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov esi, eax
mov eax, dword [esp + 8]
test eax, eax
je 0x406afb
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, esi
pop esi
mov ecx, dword [esp + 0x118]
call fcn.0040e0fe
add esp, 0x11c
ret 4
mov eax, dword [esp + 8]
test eax, eax
je 0x406b23
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x120]
mov eax, edi
pop edi
pop esi
call fcn.0040e0fe
add esp, 0x11c
ret 4
Function at 0x406f30
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x40eb78
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
mov eax, dword [0x4138d0]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x50]
xor ebp, ebp
cmp edi, ebp
mov dword [esp + 0x3c], eax
mov esi, ecx
je 0x4070cd
mov ebx, dword [esp + 0x54]
cmp ebx, ebp
je 0x4070cd
push edi
mov dword [ebx], ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
shl eax, 1
cmp eax, 0x64
jge 0x406f86
mov eax, 0x3e8
push eax
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], eax
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
cmp eax, ebp
mov dword [esp + 0x18], eax
je 0x406fa0
mov byte [eax], 0
cmp eax, ebp
mov dword [esp + 0x48], ebp
jne 0x406fb9
push ebp
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, 0x8007000e
jmp 0x4070d2
mov dword [esi], edi
cmp byte [edi], 0
mov dword [esp + 0x50], ebp
je 0x407013
mov ebp, dword [sym.imp.USER32.dll_CharNextA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov edi, dword [esi]
cmp byte [edi], 0x25
push edi
jne 0x406fe4
call ebp
mov edi, eax
mov dword [esi], edi
cmp byte [edi], 0x25
jne 0x40702b
push edi
call ebp
sub eax, edi
push eax
lea ecx, [esp + 0x14]
push edi
call fcn.004064a0
test eax, eax
je 0x4070b4
mov eax, dword [esi]
push eax
call ebp
mov ecx, eax
mov dword [esi], eax
cmp byte [ecx], 0
jne 0x406fd0
mov ebx, dword [esp + 0x54]
mov eax, dword [esp + 0x18]
xor ebp, ebp
mov edx, ebp
push edx
mov dword [esp + 0x1c], ebp
mov dword [ebx], eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [esp + 0x50]
jmp 0x4070d2
push 0x25
push edi
call fcn.00406640
mov edi, eax
add esp, 8
test edi, edi
je 0x40709b
mov ecx, dword [esi]
sub eax, ecx
cmp eax, 0x1f
jg 0x407082
inc eax
push eax
push ecx
lea eax, [esp + 0x24]
push eax
call ebx
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esi + 4]
call fcn.00406ef0
test eax, eax
je 0x40709b
push eax
lea ecx, [esp + 0x14]
call fcn.00406da0
test eax, eax
je 0x4070b4
cmp dword [esi], edi
je 0x406ffb
mov edx, dword [esi]
push edx
call ebp
cmp eax, edi
mov dword [esi], eax
jne 0x407072
jmp 0x406ffb
mov edx, dword [esp + 0x18]
push edx
mov dword [esp + 0x54], 0x80004005
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [esp + 0x50]
jmp 0x4070d2
mov edx, dword [esp + 0x18]
push edx
mov dword [esp + 0x54], 0x80020009
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [esp + 0x50]
jmp 0x4070d2
mov edx, dword [esp + 0x18]
push edx
mov dword [esp + 0x54], 0x8007000e
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [esp + 0x50]
jmp 0x4070d2
mov eax, 0x80004003
mov ecx, dword [esp + 0x40]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x30]
pop ebx
call fcn.0040e0fe
add esp, 0x3c
ret 8
Function at 0x4095d0
Capabilities:
Delete service
Stop service

Disassembly:
sub esp, 0x820
mov eax, dword [0x4138d0]
push ebx
push ebp
push esi
push edi
push 0xf003f
xor ebx, ebx
push ebx
push ebx
mov dword [esp + 0x838], eax
mov edi, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
je 0x409735
mov ebp, dword [sym.imp.ADVAPI32.dll_OpenServiceA]
push 1
add edi, 0x40
push edi
push esi
call ebp
test eax, eax
je 0x409620
push eax
mov ebx, 1
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test ebx, ebx
je 0x409735
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
jne 0x409666
push 0x400
lea eax, [esp + 0x30]
push eax
push 0xd80a
call fcn.00409580
add esp, 0xc
test eax, eax
jne 0x4096a7
push str.Could_not_open_Service_Manager
jmp 0x40969c
push 0x10020
push edi
push ebx
call ebp
mov esi, eax
test esi, esi
jne 0x4096b4
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x400
lea eax, [esp + 0x30]
push eax
push 0xd80c
call fcn.00409580
add esp, 0xc
test eax, eax
jne 0x4096a7
push str.Could_not_open_service
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0
push edi
lea edx, [esp + 0x34]
push edx
jmp 0x40978d
lea eax, [esp + 0x10]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x40971c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x426
je 0x40971c
cmp eax, 0x425
jne 0x4096e1
cmp dword [esp + 0x14], 3
je 0x40971c
push 0x400
lea ecx, [esp + 0x30]
push ecx
push 0xd80e
call fcn.00409580
add esp, 0xc
test eax, eax
jne 0x40970c
push str.Could_not_stop_service
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0
push edi
lea eax, [esp + 0x34]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebp, eax
call esi
push ebx
call esi
test ebp, ebp
je 0x409751
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x81c]
call fcn.0040e0fe
add esp, 0x820
ret
push 0x400
lea ecx, [esp + 0x430]
push ecx
push 0xd80d
call fcn.00409580
add esp, 0xc
test eax, eax
jne 0x409782
push str.Could_not_delete_service
lea edx, [esp + 0x430]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0
push edi
lea eax, [esp + 0x434]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [esp + 0x82c]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
call fcn.0040e0fe
add esp, 0x820
ret
Function at 0x4097b0
Capabilities:
Access the windows event log

Disassembly:
sub esp, 0x108
mov eax, dword [0x4138d0]
mov ecx, dword [esp + 0x110]
mov dword [esp + 0x104], eax
push esi
lea eax, [esp + 0x118]
push eax
push ecx
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.MSVCR71.dll_vsprintf]
mov esi, dword [esp + 0x11c]
lea eax, [esp + 0x14]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x160]
add esp, 0xc
test eax, eax
jne 0x409808
lea ecx, [esp + 8]
push ecx
call dword [sym.imp.MSVCR71.dll_puts]
add esp, 4
add esi, 0x40
push esi
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov esi, eax
test esi, esi
je 0x40983b
push 0
lea edx, [esp + 8]
push edx
push 0
push 1
push 0
push 0
push 0
push 4
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov ecx, dword [esp + 0x108]
pop esi
call fcn.0040e0fe
add esp, 0x108
ret

Function at 0x409ae0
Capabilities:
Query or enumerate registry value

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, dword [esp + 0x14]
mov eax, dword [edi]
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x10]
push esi
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x18]
push eax
push 0
mov dword [edi], 0
mov eax, dword [ecx]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x409b41
mov eax, dword [esp + 0x10]
cmp eax, 1
je 0x409b23
cmp eax, 2
jne 0x409b33
test esi, esi
mov eax, dword [esp + 0x14]
je 0x409b3d
mov cl, byte [eax + esi - 1]
test cl, cl
je 0x409b3d
pop edi
mov eax, 0xd
pop esi
ret 0xc
mov dword [edi], eax
xor eax, eax
pop edi
pop esi
ret 0xc