Function at 0x1000d220
Capabilities:
Check if file exists
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005698b
mov eax, dword fs:[0]
push eax
sub esp, 0x244
mov eax, dword [0x10079214]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x238], ecx
mov esi, dword [ebp + 8]
push dword [esi]
push str.CInstallSvc_enter_app_s
call fcn.10004bd0
push dword [esi + 8]
call fcn.1001fa80
push dword [esi + 0x10]
push dword [esi + 0xc]
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.1001f7f0
add esp, 0x1c
mov dword [ebp - 4], 0
push dword [ebp - 0x240]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1000d2b0
push dword [ebp - 0x240]
push str.CInstallSvc_rootdir_s_is_not_exist
call fcn.10004bd0
add esp, 8
jmp 0x1000d771
mov eax, dword [esi + 0x3c]
lea edi, [esi + 0x3c]
cmp dword [eax - 0xc], 0
je 0x1000d764
mov eax, dword [esi + 0x38]
cmp dword [eax - 0xc], 0
je 0x1000d764
call fcn.1001f530
test eax, eax
je 0x1000d2e0
push str.CInstallSvc_hr_give_up
jmp 0x1000d769
lea eax, [ebp - 0x234]
push eax
push dword [edi]
call fcn.1000c7f0
add esp, 8
xor ebx, ebx
test eax, eax
js 0x1000d301
cmp dword [ebp - 0x230], 4
sete bl
mov ecx, dword [ebp - 0x238]
push edi
call fcn.1000d030
mov dword [ebp - 0x244], eax
test ebx, ebx
je 0x1000d325
test eax, eax
je 0x1000d325
push str.CInstallSvc_is_ok
jmp 0x1000d769
push str.svc_start
lea ecx, [ebp - 0x23c]
call fcn.100036d0
mov byte [ebp - 4], 1
lea eax, [ebp - 0x23c]
push 0
push esi
push eax
call fcn.100054a0
mov ecx, eax
call fcn.10017be0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x23c]
call fcn.10003b50
cmp dword [esi + 0x30], 0
je 0x1000d3af
push edi
call fcn.1001e1d0
add esp, 4
test eax, eax
jne 0x1000d3af
push str.svc_safe
lea ecx, [ebp - 0x23c]
call fcn.100036d0
mov byte [ebp - 4], 2
push 0
lea eax, [ebp - 0x23c]
push esi
push eax
call fcn.100054a0
mov ecx, eax
call fcn.10017be0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x23c]
call fcn.10003b50
jmp 0x1000d771
cmp dword [esi + 0x34], 0
je 0x1000d3d8
push edi
call fcn.1001e3e0
add esp, 4
test eax, eax
jne 0x1000d3d8
push str.svc_qg
lea ecx, [ebp - 0x23c]
call fcn.100036d0
mov byte [ebp - 4], 3
jmp 0x1000d385
test ebx, ebx
jne 0x1000d5ba
push 0x208
lea eax, [ebp - 0x218]
push ebx
push eax
call fcn.10031950
add esp, 0xc
lea eax, [ebp - 0x218]
push dword [esi + 0x38]
push dword [ebp - 0x240]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1000d568
mov ecx, dword [0x1007a4a0]
test ecx, ecx
jne 0x1000d483
push 0x10078064
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x1007a4a0], ebx
jne 0x1000d472
push 4
call fcn.1002db0a
add esp, 4
mov dword [ebp - 0x244], eax
mov byte [ebp - 4], 4
test eax, eax
je 0x1000d460
mov ecx, eax
call fcn.1000afc0
mov ecx, eax
jmp 0x1000d462
xor ecx, ecx
mov byte [ebp - 4], 0
xchg dword [ebp - 0x23c], eax
mov dword [0x1007a4a0], ecx
push 0x10078064
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [0x1007a4a0]
lea eax, [ebp - 0x218]
push eax
call fcn.1000afe0
test eax, eax
je 0x1000d568
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
jne 0x1000d4c1
lea eax, [ebp - 0x218]
push eax
push str.CInstallSvc_svcpath___s_load_fail
call fcn.10004bd0
add esp, 8
jmp 0x1000d771
push 0x1005c958
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1000d4d8
push 0x1005a6b8
call eax
mov ecx, dword [ebp - 0x238]
push edi
call fcn.1000d030
lea ecx, [ebp - 0x238]
test eax, eax
je 0x1000d52b
push str.svc_succ
call fcn.100036d0
mov byte [ebp - 4], 6
lea eax, [ebp - 0x238]
push 0
push esi
push eax
call fcn.100054a0
mov ecx, eax
call fcn.10017be0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x238]
call fcn.10003b50
push str.CInstallSvc_type__svc_succ_1
jmp 0x1000d769
push str.svc_fails
call fcn.100036d0
mov byte [ebp - 4], 7
lea eax, [ebp - 0x238]
push 0
push esi
push eax
call fcn.100054a0
mov ecx, eax
call fcn.10017be0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x238]
call fcn.10003b50
push str.CInstallSvc_type__svc_fails_1
jmp 0x1000d769
push str.svc_other
lea ecx, [ebp - 0x238]
call fcn.100036d0
mov byte [ebp - 4], 5
lea eax, [ebp - 0x238]
push 0
push esi
push eax
call fcn.100054a0
mov ecx, eax
call fcn.10017be0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x238]
call fcn.10003b50
lea eax, [ebp - 0x218]
push eax
push str.CInstallSvc_svcpath___s_is_not_exist
call fcn.10004bd0
add esp, 8
jmp 0x1000d771
cmp dword [ebp - 0x244], 0
jne 0x1000d771
push 0x200
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.10031950
push dword [edi]
lea eax, [ebp - 0x210]
push str.SYSTEMCurrentControlSetServices_s
push 0xff
push eax
call dword [sym.imp.SHLWAPI.dll_wnsprintfW]
add esp, 0x1c
mov dword [ebp - 0x250], 0
mov dword [ebp - 0x24c], 0
mov dword [ebp - 0x248], 0
mov byte [ebp - 4], 8
lea eax, [ebp - 0x210]
push 0x20219
push eax
push reloc.WS2_32.dll_bind
lea ecx, [ebp - 0x250]
call fcn.1000d170
test eax, eax
je 0x1000d6a4
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x250]
test eax, eax
je 0x1000d657
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x250], 0
mov dword [ebp - 0x24c], 0
push str.svc_fails
lea ecx, [ebp - 0x238]
call fcn.100036d0
mov byte [ebp - 4], 0xa
lea eax, [ebp - 0x238]
push 0
push esi
push eax
call fcn.100054a0
mov ecx, eax
call fcn.10017be0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x238]
call fcn.10003b50
push str.CInstallSvc_type__svc_fails_2
jmp 0x1000d769
push 4
lea eax, [ebp - 0x244]
mov dword [ebp - 0x244], 2
push eax
push 4
push 0
push str.Start
push dword [ebp - 0x250]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [ebp - 0x238], eax
test eax, eax
je 0x1000d6ec
push eax
push dword [edi]
push str.CInstallSvc::SetAutoRun_fail_strSvcName__s__lResult_ld
call fcn.10004bd0
mov eax, dword [ebp - 0x238]
add esp, 0xc
xor ebx, ebx
test eax, eax
sete bl
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x250]
test eax, eax
je 0x1000d712
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x250], 0
mov dword [ebp - 0x24c], 0
test ebx, ebx
je 0x1000d661
push str.svc_succ
lea ecx, [ebp - 0x238]
call fcn.100036d0
mov byte [ebp - 4], 9
lea eax, [ebp - 0x238]
push 0
push esi
push eax
call fcn.100054a0
mov ecx, eax
call fcn.10017be0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x238]
call fcn.10003b50
push str.CInstallSvc_type__svc_succ_2
jmp 0x1000d769
push str.CInstallSvc_except_1
call fcn.10004bd0
add esp, 4
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov edx, dword [ebp - 0x240]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1000d796
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1002deb9
mov esp, ebp
pop ebp
ret 4