Function at 0x402240
Capabilities:
Copy file
Create process on windows
Create service
Modify service
Persist via windows service
Query or enumerate registry value
Resolve function by parsing pe exports
Schedule task via schtasks
Set registry value
Start service

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x410438
mov eax, dword fs:[0]
push eax
sub esp, 0x2f8
mov eax, dword [0x415040]
xor eax, esp
mov dword [esp + 0x2f0], eax
push ebx
push esi
push edi
mov eax, dword [0x415040]
xor eax, esp
push eax
lea eax, [esp + 0x308]
mov dword fs:[0], eax
mov dword [esp + 0x28], ecx
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [esp + 0x18], edi
xor ebx, ebx
push ebx
lea eax, [esp + 0x24]
push eax
push ebx
push 2
push ebx
push ebx
push ebx
push str.SOFTWAREPoliciesMicrosoftWindowsAppx
push 0x80000002
mov dword [esp + 0x334], 0
xor esi, esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x4022ea
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.SOFTWAREPoliciesMicrosoftWindowsAppx
lea eax, [esp + 0x1c]
push str.CreateKey__s
push eax
call fcn.00401ca0
add esp, 0xc
jmp 0x4024b7
push 4
lea eax, [esp + 0x64]
push eax
push 4
push 0
push str.AllowAllTrustedApps
push dword [esp + 0x34]
mov dword [esp + 0x78], 1
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.KERNEL32.dll_WinExec]
push 0
push str.schtasks__change__disable__TN__MicrosoftWindowsWSLicense_Validation_
call esi
push 0
push str.schtasks__change__disable__TN__MicrosoftWindowsWSWSRefreshBannedAppsListTask_
call esi
mov edx, dword [esp + 0x28]
push 0x4135fc
lea edx, [edx + 0xc]
lea ecx, [esp + 0x30]
call fcn.00401740
push str.wsservice_crk.dll
mov edx, eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x318], 1
call fcn.00401740
add esp, 8
mov byte [esp + 0x310], 3
mov edx, dword [esp + 0x2c]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402384
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [section..data]
xor esi, esi
mov ecx, section..data
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x58], eax
mov byte [esp + 0x310], 4
mov eax, dword [section..data]
mov ecx, section..data
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x28]
mov byte [esp + 0x310], 5
push dword [eax + 0x10]
lea ecx, [esp + 0x38]
call fcn.004012f0
test eax, eax
je 0x4025b5
push dword [esp + 0x14]
lea ecx, [esp + 0x4c]
call fcn.004012f0
test eax, eax
jne 0x4024eb
push dword [esp + 0x14]
lea eax, [esp + 0x1c]
push 0x413600
push eax
call fcn.00401ca0
mov byte [esp + 0x31c], 4
mov edx, dword [esp + 0x50]
add edx, 0xfffffff0
or esi, 0xffffffff
add esp, 0xc
lea eax, [edx + 0xc]
mov ecx, esi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402449
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esp + 0x34]
test eax, eax
je 0x40245a
push eax
call fcn.00403a64
add esp, 4
mov byte [esp + 0x310], 3
mov edx, dword [esp + 0x58]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40247f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esp + 0x48]
test eax, eax
je 0x402490
push eax
call fcn.00403a64
add esp, 4
mov byte [esp + 0x310], 0
mov edx, dword [esp + 0x14]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4024b5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor esi, esi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov ecx, dword [esp + 0x28]
mov dword [ecx + 8], eax
call edi
mov edi, dword [esp + 0x18]
mov edx, eax
mov ecx, edi
call fcn.00401fa0
test ebx, ebx
je 0x402c44
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call ebx
jmp 0x402c4a
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x4c]
call fcn.00401510
test eax, eax
jne 0x40253c
push dword [esp + 0x14]
lea eax, [esp + 0x1c]
push str.GetFileVersion_for__s
push eax
call fcn.00401ca0
add esp, 0xc
lea ecx, [esp + 0x34]
call fcn.00402ca0
lea ecx, [esp + 0x48]
call fcn.00402ca0
mov byte [esp + 0x310], 0
mov edx, dword [esp + 0x14]
add edx, 0xfffffff0
or ecx, 0xffffffff
jmp 0x4024a1
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x38]
call fcn.00401510
test eax, eax
jne 0x40258f
mov eax, dword [esp + 0x28]
push dword [eax + 0x10]
lea eax, [esp + 0x1c]
push str.GetFileVersion_for__s
push eax
call fcn.00401ca0
add esp, 0xc
lea ecx, [esp + 0x34]
call fcn.00402ca0
lea ecx, [esp + 0x48]
call fcn.00402ca0
lea ecx, [esp + 0x14]
mov byte [esp + 0x310], 0
call fcn.004016b0
jmp 0x4024b5
mov eax, dword [esp + 0x30]
cmp eax, dword [esp + 0x24]
jbe 0x4025b1
push str.You_have_newer_version_installed._Installation_aborted.
lea ecx, [esp + 0x1c]
call fcn.00401820
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x402567
mov esi, dword [esp + 0x48]
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x402676
push 0xd
push str.OpenSCManager
lea ecx, [esp + 0x20]
call fcn.00401900
mov byte [esp + 0x310], 4
mov edx, dword [esp + 0x44]
add edx, 0xfffffff0
or edi, 0xffffffff
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402605
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esp + 0x34]
test eax, eax
je 0x402616
push eax
call fcn.00403a64
add esp, 4
mov byte [esp + 0x310], 3
mov edx, dword [esp + 0x58]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40263b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
je 0x402648
push esi
call fcn.00403a64
add esp, 4
mov byte [esp + 0x310], 0
mov edx, dword [esp + 0x14]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40266d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [esp + 0x1c]
jmp 0x4024b7
push 0
mov edx, str.WSServiceCrk
mov ecx, eax
call section..text
add esp, 4
test eax, eax
je 0x4026fa
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
mov eax, dword [esp + 0x28]
push 0
push dword [eax + 0x10]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x402755
mov eax, dword [esp + 0x28]
push dword [eax + 0x10]
lea eax, [esp + 0x1c]
push str.wsservice_crk.dll
push str.Copy__s_to__s
push eax
call fcn.00401ca0
add esp, 0x10
lea ecx, [esp + 0x34]
call fcn.00402ca0
lea ecx, [esp + 0x48]
call fcn.00402ca0
mov byte [esp + 0x310], 0
mov edx, dword [esp + 0x14]
add edx, 0xfffffff0
or ecx, 0xffffffff
jmp 0x402659
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x424
je 0x402698
cmp esi, 0x426
je 0x402698
push str.WSServiceCrk
lea eax, [esp + 0x1c]
push str.Attempt_to_stop_service__s
push eax
call fcn.00401ca0
add esp, 0xc
lea ecx, [esp + 0x34]
call fcn.00402ca0
lea ecx, [esp + 0x48]
call fcn.00402ca0
lea ecx, [esp + 0x14]
mov byte [esp + 0x310], 0
call fcn.004016b0
mov esi, dword [esp + 0x1c]
jmp 0x4024b7
cmp esi, 0x424
jne 0x402ab9
lea eax, [esp + 0x20]
push eax
push 3
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion_svchost
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x4027c8
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion_svchost
lea eax, [esp + 0x1c]
push str.OpenKey__s
push eax
call fcn.00401ca0
add esp, 0xc
lea ecx, [esp + 0x34]
call fcn.00402ca0
lea ecx, [esp + 0x48]
call fcn.00402ca0
lea ecx, [esp + 0x14]
mov byte [esp + 0x310], 0
call fcn.004016b0
mov esi, dword [esp + 0x1c]
jmp 0x4024b7
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x80]
push eax
push 0
push 0
push str.LocalServiceAndNoImpersonation
push dword [esp + 0x34]
mov dword [esp + 0x48], 0x200
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
test esi, esi
je 0x402829
push dword [esp + 0x20]
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.LocalServiceAndNoImpersonation
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion_svchost
lea eax, [esp + 0x20]
push str.QueryValue__s_s
push eax
call fcn.00401ca0
add esp, 0x10
jmp 0x402729
cmp word [esp + 0x7c], 0
lea esi, [esp + 0x7c]
je 0x40286a
push str.WSServiceCrk
push esi
call fcn.00403d61
add esp, 8
test eax, eax
je 0x4028af
mov ecx, esi
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402850
sub ecx, edx
sar ecx, 1
lea esi, [esi + ecx*2]
add esi, 2
cmp word [esi], ax
jne 0x402835
mov eax, dword [esp + 0x30]
push 0x1a
lea esi, [esp + eax + 0x7e]
push str.WSServiceCrk
push esi
call fcn.00405cb0
xor eax, eax
mov word [esi + 0x1a], ax
mov eax, dword [esp + 0x3c]
add esp, 0xc
add eax, 0x1a
push eax
mov dword [esp + 0x34], eax
lea eax, [esp + 0x80]
push eax
push 7
push 0
push str.LocalServiceAndNoImpersonation
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [esp + 0x20]
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call eax
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x24], eax
push str.LocalServiceAndNoImpersonation
lea eax, [esp + 0x28]
push str.__SystemRoot__System32_svchost.exe__k__s
push eax
mov byte [esp + 0x31c], 6
call fcn.00401ca0
add esp, 0xc
mov esi, dword [esp + 0x1c]
push 0
push str.NT_AUTHORITYLocalService
push 0
push 0
push 0
push dword [esp + 0x38]
push 1
push 2
push 0x20
push 0xf01ff
push str.Windows_Store_service_crack
push str.WSServiceCrk
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov ebx, eax
test ebx, ebx
jne 0x40296c
push str.WSServiceCrk
lea eax, [esp + 0x1c]
push str.Create_service__s
push eax
call fcn.00401ca0
add esp, 0xc
lea ecx, [esp + 0x24]
call fcn.004016b0
lea ecx, [esp + 0x34]
call fcn.00402ca0
lea ecx, [esp + 0x48]
call fcn.00402ca0
lea ecx, [esp + 0x14]
mov byte [esp + 0x310], 0
call fcn.004016b0
jmp 0x4024b7
lea eax, [esp + 0x5c]
push eax
push 6
push ebx
mov dword [esp + 0x68], str.SeCreateGlobalPrivilege
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x4029ce
push str.WSServiceCrk
lea eax, [esp + 0x1c]
push str.Change_service_config_for__s
push eax
call fcn.00401ca0
add esp, 0xc
lea ecx, [esp + 0x24]
call fcn.004016b0
lea ecx, [esp + 0x34]
call fcn.00402ca0
lea ecx, [esp + 0x48]
call fcn.00402ca0
lea ecx, [esp + 0x14]
mov byte [esp + 0x310], 0
call fcn.004016b0
jmp 0x4024b7
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
xor esi, esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x64], esi
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], 0xa
mov byte [esp + 0x310], 7
lea ebx, [esp + 0x7c]
cmp word [esp + 0x7c], si
je 0x402a4f
mov esi, dword [esp + 0x1c]
push 0
mov edx, ebx
mov ecx, esi
call section..text
add esp, 4
test eax, eax
je 0x402a2c
push ebx
lea ecx, [esp + 0x68]
call fcn.00403100
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402a31
sub ecx, edx
sar ecx, 1
lea ebx, [ebx + ecx*2]
add ebx, 2
cmp word [ebx], ax
jne 0x402a10
mov esi, dword [esp + 0x64]
test esi, esi
je 0x402a9b
xor eax, eax
test esi, esi
setne al
test eax, eax
je 0x402b39
mov eax, esi
mov esi, dword [esi]
push 0x10
push dword [eax + 8]
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
mov dword [esp + 0x2c], ebx
test ebx, ebx
je 0x402a97
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
mov dword [esp + 0x2c], eax
test esi, esi
jne 0x402a53
lea ecx, [esp + 0x64]
call fcn.00403240
lea ecx, [esp + 0x24]
mov byte [esp + 0x310], 5
call fcn.004016b0
mov ebx, dword [esp + 0x2c]
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x24], eax
push str.WSServiceCrk
lea eax, [esp + 0x28]
push str.SYSTEMCurrentControlSetServices_sParameters
push eax
mov byte [esp + 0x31c], 8
call fcn.00401ca0
mov esi, dword [esp + 0x30]
add esp, 0xc
lea eax, [esp + 0x20]
push 0
push eax
push 0
push 2
push 0
push 0
push 0
push esi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x402b43
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
lea eax, [esp + 0x1c]
push str.CreateKey__s
push eax
call fcn.00401ca0
add esp, 0xc
lea ecx, [esp + 0x24]
call fcn.004016b0
jmp 0x402729
push 0x80004005
call fcn.00401f80
mov eax, dword [esp + 0x28]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, dword [eax + 0x10]
mov eax, dword [ecx - 0xc]
lea eax, [eax*2 + 2]
push eax
push ecx
push 2
push 0
push str.ServiceDll
push dword [esp + 0x34]
call esi
push 0x18
push str.ServiceMain
push 1
push 0
push str.ServiceMain
push dword [esp + 0x34]
call esi
push 4
lea eax, [esp + 0x30]
push eax
push 4
push 0
push str.ServiceDllUnloadOnStop
push dword [esp + 0x34]
mov dword [esp + 0x44], 1
call esi
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x24]
mov byte [esp + 0x310], 5
call fcn.004016b0
mov esi, dword [esp + 0x1c]
push 0x15
push str.WSServiceCrk
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
je 0x402c28
mov ecx, eax
call fcn.004012c0
test eax, eax
je 0x402c28
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x40
push str.Installer
push str.WSService_crack_was_successfully_installed__
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x34]
mov dword [eax + 8], 0
call fcn.00402ca0
lea ecx, [esp + 0x48]
call fcn.00402ca0
lea ecx, [esp + 0x14]
call fcn.004016b0
mov esi, 1
jmp 0x402c53
push str.WSServiceCrk
lea eax, [esp + 0x1c]
push str.Start_service__s
push eax
call fcn.00401ca0
add esp, 0xc
jmp 0x402944
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x402c51
push esi
call ebx
xor esi, esi
add edi, 0xfffffff0
mov dword [esp + 0x310], 0xffffffff
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402c78
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [esp + 0x308]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2f0]
xor ecx, esp
call fcn.004037fe
mov esp, ebp
pop ebp
ret