Function at 0x402570
Capabilities:
Check if file exists
Copy file
Create service
Get common file path
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x42c
mov eax, dword [0x42aaa0]
xor eax, esp
mov dword [esp + 0x428], eax
mov eax, dword [esp + 0x434]
push ebx
push ebp
mov ebp, dword [esp + 0x438]
push esi
push edi
push 0xf003f
xor ebx, ebx
push ebx
mov edi, ecx
push ebx
mov dword [esp + 0x30], edi
mov dword [esp + 0x2c], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
cmp esi, ebx
je 0x4025cd
push 0xf01ff
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
cmp eax, ebx
jne 0x40262f
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x103
lea ecx, [esp + 0x131]
push ebx
push ecx
mov byte [esp + 0x138], bl
call fcn.004109d0
push 0x103
lea edx, [esp + 0x241]
push ebx
push edx
mov byte [esp + 0x248], bl
call fcn.004109d0
add esp, 0x18
push 0x104
lea eax, [esp + 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x40263b
push 0x5c
push ebp
call fcn.0040f412
add esp, 8
cmp eax, ebx
je 0x402642
add eax, 1
jmp 0x402644
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call edi
push esi
call edi
xor eax, eax
jmp 0x4029e2
mov eax, ebp
xor ecx, ecx
jmp 0x402650
mov dl, byte [esp + ecx + 0x230]
mov byte [esp + ecx + 0x12c], dl
add ecx, 1
cmp dl, bl
jne 0x402650
lea ecx, [esp + 0x12c]
add ecx, 0xffffffff
nop
mov dl, byte [ecx + 1]
add ecx, 1
cmp dl, bl
jne 0x402670
mov edx, dword [str.System32Drivers_]
mov dword [ecx], edx
mov edx, dword [0x425fac]
mov dword [ecx + 4], edx
mov edx, dword [0x425fb0]
mov dword [ecx + 8], edx
mov edx, dword [0x425fb4]
mov dword [ecx + 0xc], edx
mov dx, word [0x425fb8]
mov word [ecx + 0x10], dx
mov dl, byte [0x425fba]
mov byte [ecx + 0x12], dl
mov ecx, eax
mov dl, byte [eax]
add eax, 1
cmp dl, bl
jne 0x4026b3
lea edi, [esp + 0x12c]
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
lea ebx, [ebx]
mov cl, byte [edi + 1]
add edi, 1
cmp cl, bl
jne 0x4026d0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
push ebp
call esi
test eax, eax
je 0x402722
lea eax, [esp + 0x12c]
push eax
push ebp
call fcn.0040f33f
add esp, 8
test eax, eax
je 0x402722
push ebx
lea ecx, [esp + 0x130]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x40263b
lea edx, [esp + 0x12c]
push edx
call esi
test eax, eax
je 0x40263b
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
cmp esi, ebx
je 0x40263b
mov ecx, dword [esp + 0x20]
push ebx
mov ebp, dword [esp + 0x28]
push ebx
push str.FltMgr
push ebx
push str.FSFilter_Activity_Monitor
lea eax, [esp + 0x140]
push eax
push ebx
push 1
push 2
push 0xf01ff
push ecx
push ebp
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
cmp eax, ebx
jne 0x40278d
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x4029e2
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call edi
push esi
call edi
push 0x103
lea edx, [esp + 0x2d]
push ebx
push edx
mov byte [esp + 0x34], bl
call fcn.004109d0
push ebp
lea eax, [esp + 0x344]
push str.SYSTEMCurrentControlSetServices_s
push eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
call fcn.0040efed
add esp, 0x18
lea ecx, [esp + 0x10]
push ecx
push 0xf003f
push ebx
lea edx, [esp + 0x340]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402829
mov edx, dword [esp + 0x10]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x18]
push ecx
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push str.Instances
push edx
call edi
test eax, eax
je 0x402839
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebp
call fcn.00402b70
add esp, 4
xor eax, eax
jmp 0x4029e2
lea edx, [esp + 0x28]
mov eax, ebp
sub edx, ebp
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
cmp cl, bl
jne 0x402841
lea eax, [esp + 0x28]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
cmp cl, bl
jne 0x402854
mov ecx, dword [str._Instance]
mov edx, dword [0x426018]
mov dword [eax], ecx
mov cx, word [0x42601c]
mov dword [eax + 4], edx
mov word [eax + 8], cx
lea eax, [esp + 0x28]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x402881
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
sub eax, edx
push eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x2c]
push edx
push 1
push ebx
push str.DefaultInstance
push eax
call esi
test eax, eax
je 0x4028cf
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x14]
push ecx
call esi
mov edx, dword [esp + 0x10]
push edx
call esi
push ebp
call fcn.00402b70
add esp, 4
xor eax, eax
jmp 0x4029e2
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
push ecx
push ebx
push 0xf003f
push ebx
push ebx
push ebx
lea edx, [esp + 0x44]
push edx
push eax
call edi
test eax, eax
jne 0x4028ab
push 0x104
lea eax, [esp + 0x2c]
push ebx
push eax
call fcn.004109d0
mov al, byte [0x426036]
mov dx, word [0x426034]
mov ecx, dword [str.360054]
mov byte [esp + 0x3a], al
lea eax, [esp + 0x34]
mov word [esp + 0x38], dx
add esp, 0xc
mov dword [esp + 0x28], ecx
lea edx, [eax + 1]
jmp 0x402930
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x402930
sub eax, edx
mov edx, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x2c]
push ecx
push 1
push ebx
push str.Altitude
push edx
call esi
test eax, eax
je 0x402966
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call esi
jmp 0x4028b1
mov ecx, dword [esp + 0x18]
push 4
lea eax, [esp + 0x20]
push eax
push 4
push ebx
push str.Flags
push ecx
mov dword [esp + 0x34], ebx
call esi
test eax, eax
mov edx, dword [esp + 0x18]
push edx
je 0x4029ac
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
mov eax, dword [esp + 0x14]
push eax
call esi
mov ecx, dword [esp + 0x10]
push ecx
call esi
push ebp
call fcn.00402b70
add esp, 4
xor eax, eax
jmp 0x4029e2
mov esi, dword [sym.imp.ADVAPI32.dll_RegFlushKey]
call esi
mov eax, dword [esp + 0x14]
push eax
call esi
mov ecx, dword [esp + 0x10]
push ecx
call esi
mov edx, dword [esp + 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
call esi
mov eax, dword [esp + 0x14]
push eax
call esi
mov ecx, dword [esp + 0x10]
push ecx
call esi
mov eax, 1
mov ecx, dword [esp + 0x438]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040e571
add esp, 0x42c
ret