Function at 0x409670
Capabilities:
Accept command line arguments
Check if file exists
Check mutex on windows
Check os version
Create process on windows
Create process suspended
Disable system features via registry on windows
Get common file path
Query or enumerate registry value
Resume thread
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x43c
mov eax, dword [0x47f034]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov dword [ebp - 0x36c], ecx
lea ecx, [ebp - 0x3a4]
push edi
call fcn.00404d20
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
lea ecx, [ebp - 0x3a4]
call fcn.00405210
lea ecx, [ebp - 0x3a4]
call fcn.00405200
cmp eax, 1
jle 0x40a0a0
call fcn.00408730
test eax, eax
je 0x40a0c0
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x374], eax
call fcn.00408730
test eax, eax
je 0x40a0c0
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
lea ecx, [ebp - 0x370]
push str.HaoKan
mov dword [ebp - 0x370], eax
call fcn.00408250
test al, al
jne 0x40971d
push 6
push str.HaoKan
lea ecx, [ebp - 0x370]
call fcn.0040a1e0
mov esi, dword [ebp - 0x370]
lea ecx, [ebp - 0x374]
push dword [esi - 0xc]
push esi
call fcn.004080f0
or ebx, 0xffffffff
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40974c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push 0x11
push str.HaoKanSvcHost.dll
lea ecx, [ebp - 0x374]
call fcn.004080f0
mov esi, dword [ebp - 0x374]
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, eax
mov eax, dword [ebp - 0x36c]
mov dword [eax], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
je 0x409790
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4097bc
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4097a5
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push 0x46cc9c
call fcn.00406430
add esp, 4
mov esi, 1
jmp 0x40a0a2
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4097d3
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push str.c:xstest.txt
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4097ed
push 0x493e0
call dword [sym.imp.KERNEL32.dll_Sleep]
push str._startby
lea ecx, [ebp - 0x3a4]
call fcn.004060d0
test al, al
jne 0x409813
push 0x46ccb0
call fcn.00406430
add esp, 4
jmp 0x40a0a0
push str._startby
lea ecx, [ebp - 0x3a4]
call fcn.004050b0
mov edi, eax
cmp edi, 0x10
je 0x409841
cmp edi, 0x11
je 0x409841
push 0x46ccc0
call fcn.00406430
add esp, 4
jmp 0x40a0a0
push 0x46cac0
push 0x46cac0
lea ecx, [ebp - 0x3d8]
call fcn.00407c60
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x3a8]
push eax
lea eax, [ebp - 0x37c]
mov dword [ebp - 0x3d8], 0x46cb34
push eax
lea eax, [ebp - 0x3ac]
mov dword [ebp - 0x3a8], 8
push eax
push 0
push str.InstallSvrTime
push dword [ebp - 0x3d4]
xorps xmm0, xmm0
movlpd qword [ebp - 0x37c], xmm0
call esi
test eax, eax
jne 0x4098ac
cmp dword [ebp - 0x3ac], 0xb
je 0x4098b7
xorps xmm0, xmm0
movlpd qword [ebp - 0x37c], xmm0
mov eax, dword [ebp - 0x37c]
mov dword [ebp - 0x390], eax
mov eax, dword [ebp - 0x378]
mov dword [ebp - 0x38c], eax
lea eax, [ebp - 0x3b0]
push eax
lea eax, [ebp - 0x374]
mov dword [ebp - 0x374], 0xffffffff
push eax
lea eax, [ebp - 0x3b4]
mov dword [ebp - 0x3b0], 4
push eax
push 0
push 0x46cb08
push dword [ebp - 0x3d4]
call esi
test eax, eax
jne 0x40991c
cmp dword [ebp - 0x3b4], 4
jne 0x40991c
mov esi, dword [ebp - 0x374]
jmp 0x409925
or esi, 0xffffffff
mov dword [ebp - 0x374], esi
call fcn.00408730
mov ecx, eax
test ecx, ecx
je 0x40a0c0
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
lea ecx, [ebp - 0x36c]
push 0x46cb38
mov dword [ebp - 0x36c], eax
call fcn.00408250
test al, al
jne 0x409968
push 7
push 0x46cb38
lea ecx, [ebp - 0x36c]
call fcn.0040a1e0
lea eax, [ebp - 0x3b8]
mov dword [ebp - 0x370], 0
push eax
lea eax, [ebp - 0x370]
mov dword [ebp - 0x3b8], 4
push eax
lea eax, [ebp - 0x3bc]
push eax
push 0
push 0x46cae0
push dword [ebp - 0x3d4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4099b9
cmp dword [ebp - 0x3bc], 4
jne 0x4099b9
mov eax, dword [ebp - 0x370]
jmp 0x4099c4
mov eax, 1
mov dword [ebp - 0x370], eax
push 1
push dword [ebp - 0x38c]
push dword [ebp - 0x390]
push 1
push esi
mov esi, dword [ebp - 0x36c]
push esi
push eax
push 3
call fcn.0040ee9e
mov ecx, eax
call fcn.00414570
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x409a02
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push edi
push 0xf
call fcn.0040ee9e
mov ecx, eax
call fcn.00413873
push edi
push 0x46ccd4
call fcn.00406430
add esp, 8
xor esi, esi
mov dword [ebp - 0x374], esi
mov dword [ebp - 0x36c], esi
call fcn.00408730
test eax, eax
je 0x40a0c0
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x388], eax
call fcn.00408730
test eax, eax
je 0x40a0c0
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x39c], eax
lea eax, [ebp - 0x374]
push esi
push eax
lea eax, [ebp - 0x36c]
push esi
push eax
call fcn.00408840
add esp, 0x10
cmp dword [ebp - 0x36c], 6
jbe 0x409bcd
push 0x110
lea eax, [ebp - 0x364]
push esi
push eax
call fcn.0041d840
add esp, 0xc
mov dword [ebp - 0x380], esi
lea eax, [ebp - 0x368]
mov dword [ebp - 0x37c], esi
mov dword [ebp - 0x378], esi
mov dword [ebp - 0x370], esi
push eax
mov dword [ebp - 0x36c], esi
mov dword [ebp - 0x368], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x409bcd
cmp dword [ebp - 0x364], 5
ja 0x409aee
xor esi, esi
jmp 0x409bcd
push 0x20119
push str.SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem_
push SysStringLen
lea ecx, [ebp - 0x380]
call fcn.00409440
test eax, eax
je 0x409b25
mov eax, dword [ebp - 0x380]
test eax, eax
je 0x409b1e
push eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call eax
xor esi, esi
jmp 0x409bcd
cmp dword [ebp - 0x364], 6
jb 0x409b98
jne 0x409b39
cmp dword [ebp - 0x360], 2
jb 0x409b98
lea eax, [ebp - 0x370]
push eax
push str.ConsentPromptBehaviorAdmin
lea ecx, [ebp - 0x380]
call fcn.00409550
lea eax, [ebp - 0x36c]
push eax
push str.PromptOnSecureDesktop
lea ecx, [ebp - 0x380]
call fcn.00409550
cmp dword [ebp - 0x370], esi
jne 0x409b86
cmp dword [ebp - 0x36c], esi
jne 0x409b86
lea ecx, [ebp - 0x380]
xor esi, esi
call fcn.00407ec0
jmp 0x409bcd
lea ecx, [ebp - 0x380]
mov esi, 1
call fcn.00407ec0
jmp 0x409bcd
lea eax, [ebp - 0x370]
push eax
push str.EnableLUA
lea ecx, [ebp - 0x380]
call fcn.00409550
xor eax, eax
cmp eax, dword [ebp - 0x370]
mov eax, dword [ebp - 0x380]
sbb esi, esi
neg esi
test eax, eax
je 0x409bcd
push eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call eax
lea eax, [ebp - 0x3c0]
mov dword [ebp - 0x36c], 0
push eax
push 0x20119
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstallHaoKanWallPaper
push SysStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x409c0f
push dword [ebp - 0x3c0]
mov dword [ebp - 0x36c], 1
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x398]
mov dword [ebp - 0x384], 0
push eax
lea eax, [ebp - 0x384]
mov dword [ebp - 0x398], 0
push eax
lea eax, [ebp - 0x39c]
push eax
lea eax, [ebp - 0x388]
push eax
push esi
push dword [ebp - 0x374]
push dword [ebp - 0x36c]
push edi
call fcn.0040ee9e
mov ecx, eax
call fcn.00410e44
test eax, eax
jne 0x409c69
push esi
push edi
push 0x46cd88
jmp 0x40a055
mov esi, dword [ebp - 0x384]
xorps xmm0, xmm0
movlpd qword [ebp - 0x37c], xmm0
call fcn.00408730
mov ecx, eax
test ecx, ecx
je 0x40a0ca
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
push esi
mov dword [ebp - 0x36c], eax
lea eax, [ebp - 0x36c]
push str.TimeHostWheel_d
push eax
call fcn.00408640
mov esi, dword [ebp - 0x36c]
lea eax, [ebp - 0x390]
add esp, 0xc
mov dword [ebp - 0x390], 8
push eax
lea eax, [ebp - 0x37c]
push eax
lea eax, [ebp - 0x38c]
push eax
push 0
push esi
push dword [ebp - 0x3d4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x409ced
cmp dword [ebp - 0x38c], 0xb
je 0x409cf8
xorps xmm0, xmm0
movlpd qword [ebp - 0x37c], xmm0
mov ecx, dword [ebp - 0x378]
add esi, 0xfffffff0
mov edi, dword [ebp - 0x37c]
mov eax, ebx
mov dword [ebp - 0x390], ecx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x409d27
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x390]
test ecx, ecx
jl 0x409df0
jg 0x409d39
test edi, edi
je 0x409df0
mov esi, dword [ebp - 0x398]
mov dword [ebp - 0x37c], edi
mov dword [ebp - 0x378], ecx
test esi, esi
js 0x409dfe
xorps xmm0, xmm0
mov dword [ebp - 0x210], 0
push 0
movups xmmword [ebp - 0x230], xmm0
mov dword [ebp - 0x234], 0
movups xmmword [ebp - 0x220], xmm0
movups xmmword [ebp - 0x254], xmm0
movups xmmword [ebp - 0x244], xmm0
call fcn.0043bfee
mov dword [ebp - 0x394], eax
lea eax, [ebp - 0x37c]
push eax
lea eax, [ebp - 0x254]
mov dword [ebp - 0x390], edx
push eax
call fcn.0043be43
lea eax, [ebp - 0x394]
push eax
lea eax, [ebp - 0x230]
push eax
call fcn.0043be43
mov eax, dword [ebp - 0x21c]
add esp, 0x14
cmp eax, dword [ebp - 0x240]
jne 0x409dfe
mov eax, dword [ebp - 0x214]
sub eax, dword [ebp - 0x238]
cdq
xor eax, edx
sub eax, edx
cmp eax, esi
jg 0x409dfe
push dword [ebp - 0x398]
jmp 0x40a04a
mov eax, dword [ebp - 0x398]
test eax, eax
jg 0x40a049
push dword [ebp - 0x39c]
push dword [ebp - 0x388]
push 0x46cdfc
call fcn.00406430
add esp, 0xc
push dword [ebp - 0x388]
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea ecx, [ebp - 0x370]
call fcn.00407d30
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.0041d840
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea ecx, [ebp - 0x36c]
call fcn.00407db0
push dword [ebp - 0x370]
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x36c]
push str._s_s
push eax
call fcn.00408640
add esp, 0x10
lea ecx, [ebp - 0x3f8]
call fcn.0040aa38
mov esi, dword [ebp - 0x36c]
lea ecx, [ebp - 0x3f8]
push 0
push esi
push dword [ebp - 0x388]
call fcn.0040b254
test eax, eax
jne 0x409ebe
push 0x46ce34
call fcn.00406430
add esp, 4
jmp 0x40a026
xor eax, eax
mov dword [ebp - 0x43c], 0x44
mov word [ebp - 0x3fa], ax
xorps xmm0, xmm0
mov eax, 5
movlpd qword [ebp - 0x438], xmm0
mov word [ebp - 0x40c], ax
mov eax, dword [ebp - 0x39c]
movlpd qword [ebp - 0x430], xmm0
movlpd qword [ebp - 0x428], xmm0
movlpd qword [ebp - 0x420], xmm0
movlpd qword [ebp - 0x418], xmm0
movlpd qword [ebp - 0x40a], xmm0
movlpd qword [ebp - 0x402], xmm0
mov dword [ebp - 0x410], 1
movups xmmword [ebp - 0x3e8], xmm0
push dword [eax - 0xc]
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
test eax, eax
je 0x40a0d4
lea ecx, [ebp - 0x3e8]
push ecx
lea ecx, [ebp - 0x43c]
push ecx
push 0
push 0
push 4
push 0
push 0
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x3e4]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push esi
push dword [ebp - 0x3e0]
push 0x46ce44
call fcn.00406430
push 0
call fcn.0043bfee
add esp, 0x10
mov dword [ebp - 0x38c], edx
mov edi, eax
mov eax, dword [ebp - 0x384]
mov dword [ebp - 0x390], eax
call fcn.00408730
test eax, eax
je 0x40a0c0
mov esi, dword [eax]
mov ecx, eax
call dword [esi + 0xc]
push dword [ebp - 0x390]
add eax, 0x10
mov dword [ebp - 0x374], eax
lea eax, [ebp - 0x374]
push str.TimeHostWheel_d
push eax
call fcn.00408640
mov eax, dword [ebp - 0x38c]
add esp, 0xc
mov esi, dword [ebp - 0x374]
mov dword [ebp - 0x378], eax
lea eax, [ebp - 0x37c]
mov dword [ebp - 0x37c], edi
push 8
push eax
push 0xb
push 0
push esi
push dword [ebp - 0x3d4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40a026
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x3f8]
call fcn.0040aa94
lea ecx, [ebp - 0x36c]
call fcn.00407e70
lea ecx, [ebp - 0x370]
call fcn.00407e70
jmp 0x40a05d
push eax
push dword [ebp - 0x384]
push str.S_MR
call fcn.00406430
add esp, 0xc
mov edx, dword [ebp - 0x39c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40a07a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x388]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x40a095
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x3d8]
call fcn.00407df0
xor esi, esi
lea ecx, [ebp - 0x3a4]
call fcn.00404e40
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041afcb
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.004012b5
push 0x80004005
call fcn.004012b5
call fcn.0040a2c0
int3