joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4036c6
Capabilities:
Create process on windows
Resume thread
Self delete

Disassembly:
push ebp
lea ebp, [esp - 0x1e0]
sub esp, 0x260
mov eax, dword [0x42f180]
xor eax, ebp
mov dword [ebp + 0x1dc], eax
push ebx
push esi
push edi
push 0x104
lea eax, [ebp + 0xd8]
push eax
xor edi, edi
push edi
call dword [sym.imp.kernel32.dll_GetModuleFileNameA]
lea eax, [ebp + 0xd8]
push eax
lea eax, [ebp - 0x2c]
push str._s.bat
push eax
call fcn.004179b4
lea eax, [ebp - 0x2c]
push 0x425fc0
push eax
call fcn.004179b4
mov ebx, eax
push str.:Repeat_n
push ebx
call fcn.00408778
lea eax, [ebp + 0xd8]
push eax
mov esi, str.del___s__n
push esi
push ebx
call fcn.00408778
lea eax, [ebp + 0xd8]
push eax
push str.if_exist___s__goto_Repeat_n
push ebx
call fcn.00408778
lea eax, [ebp - 0x2c]
push eax
push esi
push ebx
call fcn.00408778
add esp, 0x40
push ebx
call fcn.00408fa6
push 0x44
pop esi
push esi
lea eax, [ebp - 0x80]
push edi
push eax
call fcn.004076c0
add esp, 0x10
xor eax, eax
mov word [ebp - 0x50], ax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x80]
push eax
push 0x4253ac
push edi
push esi
push edi
push edi
push edi
lea eax, [ebp - 0x2c]
push eax
push edi
mov dword [ebp - 0x80], esi
mov dword [ebp - 0x54], 1
call dword [sym.imp.kernel32.dll_CreateProcessA]
test eax, eax
je 0x4037e7
mov esi, dword [sym.imp.kernel32.dll_SetThreadPriority]
push 0xfffffffffffffff1
push dword [ebp - 0x38]
call esi
push 0xf
call dword [sym.imp.kernel32.dll_GetCurrentThread]
push eax
call esi
push 0x80
call dword [sym.imp.kernel32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.kernel32.dll_SetPriorityClass]
push dword [ebp - 0x3c]
mov esi, dword [sym.imp.kernel32.dll_CloseHandle]
call esi
push dword [ebp - 0x38]
call dword [sym.imp.kernel32.dll_ResumeThread]
push dword [ebp - 0x38]
call esi
mov ecx, dword [ebp + 0x1dc]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407875
add ebp, 0x1e0
leave
ret

Function at 0x403989
Capabilities:
Delete file

Disassembly:
push esi
push 0x3a
push dword [esp + 0xc]
call fcn.00407290
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x40399f
pop esi
ret
inc esi
movsx eax, byte [esi]
push eax
call fcn.004179b4
pop ecx
test eax, eax
jne 0x40399f
push esi
call dword [sym.imp.kernel32.dll_DeleteFileA]
pop esi
ret

Function at 0x4039b7
Capabilities:
Delete directory

Disassembly:
push esi
push 0x3a
push dword [esp + 0xc]
call fcn.00407290
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4039cd
pop esi
ret
inc esi
movsx eax, byte [esi]
push eax
call fcn.004179b4
pop ecx
test eax, eax
jne 0x4039cd
push esi
call dword [sym.imp.kernel32.dll_RemoveDirectoryA]
pop esi
ret
Function at 0x4044dd
Capabilities:
Delete file
Read .ini file

Disassembly:
mov eax, 0x1004
call fcn.00408e10
mov eax, dword [0x42f180]
xor eax, esp
mov dword [esp + 0x1000], eax
push ebx
push ebp
push esi
push edi
push dword [0x43292c]
mov edi, dword [sym.imp.kernel32.dll_GetPrivateProfileStringA]
mov ebp, 0x1000
push ebp
lea eax, [esp + 0x18]
push eax
mov ebx, 0x425524
push ebx
push str.title
mov esi, 0x425f40
push esi
call edi
push 0x50
pop ecx
lea eax, [esp + 0x10]
mov edx, 0x431140
call fcn.004179b4
push dword [0x43292c]
lea eax, [esp + 0x14]
push ebp
push eax
push ebx
push str.info
push esi
call edi
mov ecx, ebp
lea eax, [esp + 0x10]
mov edx, 0x431580
call fcn.004179b4
push dword [0x43292c]
push 0x50
push 0x4327c0
push ebx
push str.build_info
push esi
call edi
push dword [0x43292c]
mov ebp, dword [sym.imp.kernel32.dll_GetPrivateProfileIntA]
push 1
push str.target_compile
push esi
call ebp
push dword [0x43292c]
mov dword [0x431194], eax
push 1
push str.target_optimize
push esi
call ebp
push dword [0x43292c]
mov dword [0x431190], eax
push 0xa
push 0x432590
push ebx
push str.target_version
push esi
call edi
push dword [0x43292c]
push 0x50
push 0x4312c0
push ebx
push str.name
push str.metadata
call edi
push dword [0x43292c]
push 0x104
push 0x4311a0
push ebx
push str.install_script
push esi
call edi
push dword [0x43292c]
mov ebp, 0x431550
push 0xa
push ebp
push ebx
push str.user_access_control
push esi
call edi
push 6
mov edi, str.force
mov esi, ebp
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x40462b
call fcn.004179b4
test eax, eax
je 0x404688
call fcn.00403547
test eax, eax
jne 0x404688
call fcn.004179b4
jmp 0x4046cb
push 5
mov edi, str.auto
mov esi, ebp
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x404658
call fcn.004179b4
test eax, eax
je 0x404688
call fcn.00403547
test eax, eax
jne 0x404688
call fcn.004179b4
test eax, eax
je 0x404688
jmp 0x404621
cmp byte [0x431550], al
je 0x404688
push 5
mov edi, str.none
mov esi, ebp
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x404688
push eax
push str.oops
push str.Bad_user_access_control_value
call dword [sym.imp.USER32.dll_GetFocus]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0x431140
call fcn.00402766
push eax
mov dword [0x432580], eax
call fcn.004179b4
pop ecx
pop ecx
push dword [0x432814]
call dword [sym.imp.kernel32.dll_UnmapViewOfFile]
mov eax, dword [0x43292c]
test eax, eax
je 0x4046bb
push eax
call dword [sym.imp.kernel32.dll_DeleteFileA]
mov eax, dword [0x432930]
test eax, eax
je 0x4046cb
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esp + 0x1010]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00407875
add esp, 0x1004
ret

Function at 0x407875
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x42f180]
jne 0x40787f
repz ret
jmp fcn.0040bbd7
Function at 0x4179b4
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
pushal
call 0x4179c3
pop dword [ebp - 0x44]
mov eax, 0x8ecf4879
add eax, 0x7172314a
sub dword [ebp - 0x44], eax
push 0x40
push 0x1000
push 0x3bcb9
push 0
mov eax, sym.imp.kernel32.dll_VirtualAlloc
add eax, dword [ebp - 0x44]
call dword [eax]
mov ecx, 0x4026
mov edx, eax
mov esi, 0x435400
add esi, dword [ebp - 0x44]
mov ebx, 0xe7ae561c
add ebx, 0xd27b229f
xor dword [ebp - 0x1c], 0x843766b7
mov edi, dword [esi]
add edi, ebx
mov dword [edx], edi
add edx, 0xd644bf2a
add edx, 0x29bb40da
add esi, 0x4e3cb397
sub esi, 0x4e3cb393
loop 0x417a11
add eax, 0xb12d1d4d
add eax, 0x4ed3d61e
mov ebx, eax
add eax, 0xea7a2b8c
sub eax, 0xea7a2b87
mov ecx, 0x7130970a
add ecx, 0x8f0f68f6
add ecx, dword [ebp - 0x44]
call ebx
leave
ret
Function at 0x4013c0
Capabilities:
Encode data using xor

Disassembly:
jmp 0x414fb0
push esi
push edi
mov edi, dword [esp + 0x10]
xor esi, esi
test edi, edi
je 0x41515a
push ebx
mov ebx, dword [esp + 0x10]
nop word [eax + eax]
push str.Protocol_of_Mind
push 0x4d24a8
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0x34
push str.Protocol_of_Mind
push 0x4d24a8
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0x2a
push str.Protocol_of_Mind
push 0x4d24a8
call fcn.0040349f
push eax
call fcn.004013a7
xor byte [esi + ebx], 0x9f
push str.Protocol_of_Mind
push 0x4d24a8
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0x4e
push str.Protocol_of_Mind
push 0x4d24a8
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0xbf
push str.Protocol_of_Mind
push 0x4d24a8
call fcn.0040349f
add esp, 0x44
push eax
call fcn.004013a7
add byte [esi + ebx], 0x68
push str.Protocol_of_Mind
push 0x4d24a8
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0x57
push str.Protocol_of_Mind
push 0x4d24a8
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0x17
push str.Protocol_of_Mind
push 0x4d24a8
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0x67
push str.Protocol_of_Mind
push 0x4d24a8
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0x9d
push str.Protocol_of_Mind
push 0x4d24a8
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0x8d
add esp, 0x40
push str.Protocol_of_Mind
push 0x4d24a8
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0x15
push str.Protocol_of_Mind
push 0x4d24a8
call fcn.0040349f
push eax
call fcn.004013a7
xor byte [esi + ebx], 2
push str.Protocol_of_Mind
push 0x4d24a8
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0xb2
push str.Protocol_of_Mind
push 0x4d24a8
call fcn.0040349f
push eax
call fcn.004013a7
add byte [esi + ebx], 0xf1
add esp, 0x30
inc esi
cmp esi, edi
jb 0x414fd0
pop ebx
pop edi
pop esi
ret

Function at 0x4035da
Capabilities:
Terminate process

Disassembly:
jmp 0x453329
push 0x17
call dword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
test eax, eax
je 0x45333a
push 5
pop ecx
int 0x29
push esi
push 1
mov esi, 0xc0000417
push esi
push 2
call fcn.00405920
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop esi
ret

Function at 0x40370b
Capabilities:
Query environment variable

Disassembly:
jmp 0x49c7e2
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x49c7f3
pop esi
ret
push ebx
push edi
push esi
call fcn.0049c6c9
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00403fe9
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x49c81b
push ebx
push esi
push edi
call fcn.00405713
add esp, 0xc
push 0
call fcn.00406262
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret
Function at 0x402040
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x40c014]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp + 0x10]
push eax
push 0
push dword [ebp + 0xc]
lea eax, [ebp - 0x208]
push 0xff
push 0x100
push eax
call fcn.00404470
push dword [eax + 4]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___stdio_common_vsnwprintf_s]
xor eax, eax
add esp, 0x20
cmp dword [esi + 0x24c], 0
mov word [ebp - 0xa], ax
lea eax, [ebp - 0x208]
mov dword [ebp - 0x20c], eax
jne 0x4020a9
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__putws]
add esp, 4
lea eax, [esi + 0x2c]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x4020de
push 0
lea eax, [ebp - 0x20c]
push eax
push 0
push 1
push 0
push 0
push 0
push 4
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004068e1
mov esp, ebp
pop ebp
ret

Function at 0x4029a0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x40c014]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
add eax, eax
mov dword [edi], 0
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push esi
lea eax, [ebp - 8]
push eax
push 0
push edx
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x402a2b
mov eax, dword [ebp - 8]
cmp eax, 1
je 0x4029ed
cmp eax, 2
jne 0x402a09
mov ecx, dword [ebp - 0xc]
test esi, esi
je 0x402a25
test ecx, ecx
je 0x402a20
test cl, 1
jne 0x402a09
mov eax, ecx
shr eax, 1
cmp word [esi + eax*2 - 2], 0
je 0x402a25
pop edi
mov eax, 0xd
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004068e1
mov esp, ebp
pop ebp
ret 0xc
xor eax, eax
mov word [esi], ax
shr ecx, 1
xor eax, eax
mov dword [edi], ecx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004068e1
mov esp, ebp
pop ebp
ret 0xc
Function at 0x402ce0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4076b6
mov eax, dword fs:[0]
push eax
sub esp, 0x424
mov eax, dword [0x40c014]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x428], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x424], eax
mov dword [ebp - 0x430], 0
xor eax, eax
mov dword [ebp - 4], 0
push 0x404
push eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x420]
push eax
mov dword [ebp - 0x18], ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x420], 0
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
push 0x60
push 0
push esi
mov byte [ebp - 4], 1
call ebx
mov edi, eax
mov dword [ebp - 0x42c], edi
test edi, edi
jne 0x402d99
push 2
push eax
push esi
call ebx
mov edi, eax
mov dword [ebp - 0x42c], eax
test edi, edi
jne 0x402d99
call fcn.00401af0
mov esi, eax
jmp 0x402e86
push dword [ebp - 0x424]
push dword [ebp - 0x428]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
jne 0x402dbc
call fcn.00401af0
jmp 0x402e79
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
mov dword [ebp - 0x428], ebx
test ebx, ebx
jne 0x402dda
call fcn.00401af0
jmp 0x402e79
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
mov dword [ebp - 0x424], esi
lea eax, [esi + 1]
cmp eax, esi
jae 0x402dfb
mov esi, 0x8007000e
jmp 0x402e7b
push eax
lea ecx, [ebp - 0x420]
mov byte [ebp - 4], 2
call fcn.00401920
jmp 0x402e25
cmp dword [ebp - 0x420], 0
mov dword [ebp - 4], 1
jne 0x402e3c
mov esi, 0x8007000e
jmp 0x402e7b
push esi
push dword [ebp - 0x420]
push esi
push ebx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, eax
test ecx, ecx
jne 0x402e5c
call fcn.00401af0
jmp 0x402e79
mov eax, dword [ebp - 0x420]
xor edx, edx
push dword [ebp + 0x14]
mov word [eax + ecx*2], dx
lea ecx, [ebp - 0x1c]
push dword [ebp - 0x420]
call fcn.00402b80
mov esi, eax
test edi, edi
je 0x402e86
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x41c]
cmp dword [ebp - 0x420], eax
je 0x402ea0
lea ecx, [ebp - 0x420]
call fcn.00401fc0
nop
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004068e1
mov esp, ebp
pop ebp
ret 0x10
Function at 0x403800
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
test ebx, ebx
jne 0x403819
lea eax, [ebx + 0xd]
pop ebx
mov esp, ebp
pop ebp
ret 8
push esi
push edi
xor esi, esi
mov edx, ebx
nop
mov eax, edx
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403825
sub eax, edi
sar eax, 1
lea ecx, [eax + 1]
lea edx, [edx + ecx*2]
lea esi, [esi + ecx*2]
cmp ecx, 1
jne 0x403820
mov eax, dword [ebp - 4]
push esi
push ebx
push 7
push 0
push dword [ebp + 8]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x403860
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
push esi
mov esi, ecx
test edx, edx
jne 0x403875
lea eax, [edx + 0xd]
pop esi
pop ebp
ret 0xc
mov eax, edx
push edi
lea edi, [eax + 2]
jmp 0x403880
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403880
sub eax, edi
sar eax, 1
lea eax, [eax*2 + 2]
push eax
push edx
push dword [ebp + 0x10]
push 0
push dword [ebp + 8]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop edi
pop esi
pop ebp
ret 0xc
Function at 0x403d90
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
call fcn.00403b20
test eax, eax
jne 0x403da8
mov eax, 0x80004005
mov esp, ebp
pop ebp
ret
push ebx
push esi
push edi
push 0x20006
xor eax, eax
lea ecx, [ebp - 0xc]
push str.AppID
push 0x80000000
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
call fcn.004022f0
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [ebp - 0xc]
test eax, eax
je 0x403de7
push eax
call fcn.00401b10
add esp, 4
mov esi, eax
jmp 0x403e41
push 0x20006
xor eax, eax
lea ecx, [ebp - 0xc]
push str.712C15F9_7879_4E56_89A1_169E7863F83A
push ebx
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
call fcn.004022f0
mov edi, dword [ebp - 0xc]
test eax, eax
je 0x403e17
push eax
call fcn.00401b10
add esp, 4
jmp 0x403e2a
push str.LocalService
push edi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push 0
call fcn.00403e60
mov esi, eax
test edi, edi
je 0x403e3b
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call edi
jmp 0x403e41
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x403e48
push ebx
call edi
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x404520
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x260
mov eax, dword [0x40c014]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x258
lea eax, [ebp - 0x25c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x25c]
call fcn.004046e0
cmp byte [0x40c298], 0
je 0x404563
or esi, 0xffffffff
jmp 0x4045a2
mov dword [ebp - 0x260], 0
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea ecx, [ebp - 0x260]
push ecx
push eax
lea ecx, [ebp - 0x25c]
call fcn.00402570
cmp al, 1
jne 0x40459c
push dword [ebp + 0x14]
lea ecx, [ebp - 0x25c]
call fcn.00403970
mov esi, eax
jmp 0x4045a2
mov esi, dword [ebp - 0x260]
lea ecx, [ebp - 0x25c]
call fcn.00404830
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.004068e1
mov esp, ebp
pop ebp
ret 0x10
Function at 0x405170
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa08
mov eax, dword [0x40c014]
xor eax, ebp
mov dword [ebp - 4], eax
push 0
push str..pipeKuGouServicePipe
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
je 0x4051fa
push esi
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push str..pipeKuGouServicePipe
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4051f9
push 0x9ff
lea eax, [ebp - 0xa03]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0xa04], 0x64
lea eax, [ebp - 0xa08]
push 0
push eax
push 0xa00
lea eax, [ebp - 0xa04]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004068e1
mov esp, ebp
pop ebp
ret

Function at 0x405210
Capabilities:
Modify service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x40c014]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0xf003f
push 0
push 0
mov esi, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x405297
push 0x12
lea ecx, [esi + 0x2c]
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x405290
push str.KuGou_Service
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 2
push 0xffffffffffffffff
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x408c34
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004068e1
mov esp, ebp
pop ebp
ret
Function at 0x4053a0
Capabilities:
Create service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa14
mov eax, dword [0x40c014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0xf003f
push 0
push 0
mov ebx, ecx
mov dword [ebp - 0xa14], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
test edi, edi
je 0x40540b
push 1
lea ecx, [ebx + 0x2c]
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
je 0x4053fb
push eax
mov dword [ebp - 0xa14], 1
call esi
push edi
call esi
cmp dword [ebp - 0xa14], 0
jne 0x40556f
push 0x104
lea eax, [ebp - 0x20e]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4054d0
cmp eax, 0x104
je 0x4054d0
mov ecx, 0x22
mov word [ebp - 0x210], cx
mov word [ebp + eax*2 - 0x20e], cx
lea eax, [eax*2 + 4]
cmp eax, 0x20c
jae 0x405585
xor ecx, ecx
push 0xf003f
push ecx
push ecx
mov word [ebp + eax - 0x210], cx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x4054e3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea eax, [ebp - 0xa10]
push 0x400
push eax
push 0xd80a
call fcn.00401b30
add esp, 0xc
test eax, eax
jne 0x4054ba
push str.Could_not_open_Service_Manager
lea eax, [ebp - 0xa10]
push 0x400
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
push eax
call fcn.00401a50
add esp, 0x10
push esi
lea eax, [ebp - 0xa10]
push eax
push str._s__code_d
push ebx
call fcn.00402040
add esp, 0x10
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004068e1
mov esp, ebp
pop ebp
ret
push 0
push 0
push str.RPCSS
push 0
push 0
lea ecx, [ebp - 0x210]
push ecx
push 1
push 3
push 0x10
push 0xf01ff
lea eax, [ebx + 0x2c]
push eax
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
test eax, eax
jne 0x405569
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov dword [ebp - 0xa14], eax
call esi
push 0x400
lea eax, [ebp - 0xa10]
push eax
push 0xd80b
call fcn.00401b30
add esp, 0xc
test eax, eax
jne 0x40555e
push str.Could_not_start_service
lea eax, [ebp - 0xa10]
push 0x400
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
push eax
call fcn.00401a50
add esp, 0x10
push dword [ebp - 0xa14]
jmp 0x4054bb
push eax
call esi
push edi
call esi
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004068e1
mov esp, ebp
pop ebp
ret
call fcn.004065c0
int3