Function at 0x401630
Capabilities:
Copy file
Create service
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1244
call fcn.0041cdf0
mov eax, dword [0x42d5dc]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x1220], 0
mov dword [ebp - 0x1224], 0
mov dword [ebp - 0x1218], 0
xor eax, eax
mov word [ebp - 0x20c], ax
push 0x206
push 0
lea ecx, [ebp - 0x20a]
push ecx
call fcn.00412ce0
add esp, 0xc
xor edx, edx
mov word [ebp - 0x120c], dx
push 0x7fe
push 0
lea eax, [ebp - 0x120a]
push eax
call fcn.00412ce0
add esp, 0xc
xor ecx, ecx
mov word [ebp - 0xa0c], cx
push 0x7fe
push 0
lea edx, [ebp - 0xa0a]
push edx
call fcn.00412ce0
add esp, 0xc
mov dword [ebp - 0x121c], 0xffffffff
mov dword [ebp - 0x1210], 0
mov dword [ebp - 0x1214], 0
mov dword [ebp - 0x1238], 0x5d174
cmp dword [ebp + 8], 0
je 0x4016f6
cmp dword [ebp + 0xc], 0
jne 0x4016fe
or eax, 0xffffffff
jmp 0x401d32
cmp dword [ebp + 0x14], 3
je 0x40177b
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.00401580
mov ecx, eax
call fcn.00406930
lea ecx, [ebp - 0x20c]
push ecx
push str.SystemDirectory:__s_n
push 0xd3
push 0x42788c
call fcn.004065b0
add esp, 0x10
push str.drivers_
push 0x104
lea edx, [ebp - 0x20c]
push edx
call fcn.00401260
mov eax, dword [ebp + 8]
push eax
push 0x104
lea ecx, [ebp - 0x20c]
push ecx
call fcn.00401260
push str..sys
push 0x104
lea edx, [ebp - 0x20c]
push edx
call fcn.00401260
call fcn.00401580
mov ecx, eax
call fcn.004068d0
cmp dword [ebp + 0x14], 3
je 0x4017c1
push 0
lea eax, [ebp - 0x20c]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x4017c1
call fcn.00401580
mov ecx, eax
call fcn.00406900
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x121c], eax
jmp 0x401cea
call fcn.00401580
mov ecx, eax
call fcn.00406900
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x1224], eax
cmp dword [ebp - 0x1224], 0
jne 0x40181a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x121c], eax
mov edx, dword [ebp - 0x121c]
push edx
push str.OpenSCManager_dwResult:_d_t_n
push 0xd3
push 0x4278f8
call fcn.004065b0
add esp, 0x10
jmp 0x401cea
cmp dword [ebp + 0x18], 0
je 0x40183f
mov eax, dword [ebp + 8]
push eax
call fcn.00401df0
add esp, 4
test eax, eax
je 0x40183f
mov dword [ebp - 0x121c], 0
jmp 0x401cea
cmp dword [ebp + 0x14], 3
jne 0x4018db
push 0
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x20c]
push ecx
push 1
mov edx, dword [ebp + 0x10]
push edx
push 0x10
push 0xf01ff
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x1224]
push edx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword [ebp - 0x1220], eax
cmp dword [ebp - 0x1220], 0
jne 0x4018c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x121c], eax
mov eax, dword [ebp - 0x121c]
push eax
lea ecx, [ebp - 0x20c]
push ecx
mov edx, dword [ebp + 8]
push edx
push str.CreateServiceW_Name:_s_tPath:_s_tdwResult:_d_t_n
push 0xd3
push 0x42790c
call fcn.004065b0
add esp, 0x18
jmp 0x401cea
mov dword [ebp - 0x121c], 0
jmp 0x401cea
cmp dword [ebp + 0x14], 1
jne 0x40194a
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x20c]
push eax
push 1
mov ecx, dword [ebp + 0x10]
push ecx
push 1
push 0xf01ff
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x1224]
push ecx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword [ebp - 0x1220], eax
cmp dword [ebp - 0x1220], 0
jne 0x401936
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x121c], eax
jmp 0x401cea
mov dword [ebp - 0x121c], 0
jmp 0x401cea
cmp dword [ebp + 0x14], 2
jne 0x401ce2
push 0
push 0
push str.FltMgr
push 0
push str.FSFilter_Activity_Monitor
lea edx, [ebp - 0x20c]
push edx
push 1
mov eax, dword [ebp + 0x10]
push eax
push 2
push 0xf01ff
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x1224]
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword [ebp - 0x1220], eax
cmp dword [ebp - 0x1220], 0
jne 0x4019ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x121c], eax
jmp 0x401cea
cmp dword [ebp - 0x1224], 0
je 0x4019cd
mov ecx, dword [ebp - 0x1224]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0x1224], 0
cmp dword [ebp - 0x1220], 0
je 0x4019ed
mov edx, dword [ebp - 0x1220]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0x1220], 0
push 0x4279c0
push 0x400
lea eax, [ebp - 0x120c]
push eax
call fcn.004011c0
mov ecx, dword [ebp + 8]
push ecx
push 0x400
lea edx, [ebp - 0x120c]
push edx
call fcn.00401260
push str.Instances
push 0x400
lea eax, [ebp - 0x120c]
push eax
call fcn.00401260
lea ecx, [ebp - 0x1210]
push ecx
lea edx, [ebp - 0x1218]
push edx
push 0
push 0xf003f
push 0
push 0
push 0
lea eax, [ebp - 0x120c]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [ebp - 0x121c], eax
cmp dword [ebp - 0x121c], 0
je 0x401a7b
mov ecx, dword [ebp + 8]
push ecx
call fcn.00401d40
add esp, 4
jmp 0x401cea
mov edx, dword [ebp + 8]
push edx
push 0x400
lea eax, [ebp - 0xa0c]
push eax
call fcn.00401210
lea ecx, [ebp - 0xa0c]
mov dword [ebp - 0x122c], ecx
mov edx, dword [ebp - 0x122c]
add edx, 2
mov dword [ebp - 0x1240], edx
mov eax, dword [ebp - 0x122c]
mov cx, word [eax]
mov word [ebp - 0x122e], cx
add dword [ebp - 0x122c], 2
cmp word [ebp - 0x122e], 0
jne 0x401aab
mov edx, dword [ebp - 0x122c]
sub edx, dword [ebp - 0x1240]
sar edx, 1
mov dword [ebp - 0x1234], edx
mov eax, dword [ebp - 0x1234]
shl eax, 1
push eax
lea ecx, [ebp - 0xa0c]
push ecx
push 1
push 0
push str.DefaultInstance
mov edx, dword [ebp - 0x1218]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x401b27
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x121c], eax
mov eax, dword [ebp + 8]
push eax
call fcn.00401d40
add esp, 4
jmp 0x401cea
mov ecx, dword [ebp - 0x1218]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov edx, dword [ebp - 0x1218]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x427a40
push 0x400
lea eax, [ebp - 0x120c]
push eax
call fcn.00401260
mov ecx, dword [ebp + 8]
push ecx
push 0x400
lea edx, [ebp - 0x120c]
push edx
call fcn.00401260
lea eax, [ebp - 0x1210]
push eax
lea ecx, [ebp - 0x1218]
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
lea edx, [ebp - 0x120c]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [ebp - 0x121c], eax
cmp dword [ebp - 0x121c], 0
je 0x401bb9
mov eax, dword [ebp + 8]
push eax
call fcn.00401d40
add esp, 4
jmp 0x401cea
push 0x800
push 0
lea ecx, [ebp - 0xa0c]
push ecx
call fcn.00412ce0
add esp, 0xc
mov edx, dword [ebp - 0x1238]
push edx
push 0x427a44
push 0x400
lea eax, [ebp - 0xa0c]
push eax
call fcn.004012d0
add esp, 0x10
lea ecx, [ebp - 0xa0c]
mov dword [ebp - 0x1228], ecx
mov edx, dword [ebp - 0x1228]
add edx, 2
mov dword [ebp - 0x123c], edx
mov eax, dword [ebp - 0x1228]
mov cx, word [eax]
mov word [ebp - 0x1230], cx
add dword [ebp - 0x1228], 2
cmp word [ebp - 0x1230], 0
jne 0x401c0a
mov edx, dword [ebp - 0x1228]
sub edx, dword [ebp - 0x123c]
sar edx, 1
mov dword [ebp - 0x1244], edx
mov eax, dword [ebp - 0x1244]
shl eax, 1
push eax
lea ecx, [ebp - 0xa0c]
push ecx
push 1
push 0
push 0x427a4c
mov edx, dword [ebp - 0x1218]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [ebp - 0x121c], eax
cmp dword [ebp - 0x121c], 0
je 0x401c82
mov eax, dword [ebp + 8]
push eax
call fcn.00401d40
add esp, 4
jmp 0x401cea
push 4
lea ecx, [ebp - 0x1214]
push ecx
push 4
push 0
push str.Flags
mov edx, dword [ebp - 0x1218]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [ebp - 0x121c], eax
cmp dword [ebp - 0x121c], 0
je 0x401cbe
mov eax, dword [ebp + 8]
push eax
call fcn.00401d40
add esp, 4
jmp 0x401cea
mov ecx, dword [ebp - 0x1218]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov edx, dword [ebp - 0x1218]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x121c], 0
xor eax, eax
jne 0x40177b
cmp dword [ebp - 0x1224], 0
je 0x401d00
mov ecx, dword [ebp - 0x1224]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 0x1220], 0
je 0x401d16
mov edx, dword [ebp - 0x1220]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 0x1218], 0
je 0x401d2c
mov eax, dword [ebp - 0x1218]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x121c]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040e691
mov esp, ebp
pop ebp
ret