Function at 0x402ea0
Capabilities:
Create restart manager session
Enumerate processes that use resource
Get file size
Move file
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46a352
mov eax, dword fs:[0]
push eax
mov eax, 0x1adc
call fcn.00449df0
mov eax, dword [0x49611c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x1ae8], edi
push 0x47ba78
mov edx, edi
lea ecx, [ebp - 0x1a94]
mov bl, 1
call fcn.00406c30
push 0x49a63c
mov edx, eax
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x1ad8]
call fcn.00406d40
add esp, 8
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x1a80]
cmp eax, 8
jb 0x402f2c
inc eax
lea ecx, [ebp - 0x1a94]
push eax
push dword [ebp - 0x1a94]
call fcn.00405c10
cmp dword [ebp - 0x1ac4], 8
lea eax, [ebp - 0x1ad8]
cmovae eax, dword [ebp - 0x1ad8]
cmp dword [edi + 0x14], 8
jb 0x402f4a
mov ecx, dword [edi]
jmp 0x402f4c
mov ecx, edi
push 9
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x40350f
nop
cmp dword [ebp - 0x1ac4], 8
lea eax, [ebp - 0x1ad8]
push 0
cmovae eax, dword [ebp - 0x1ad8]
push 0x80
push 3
push 0
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x1a74], esi
cmp esi, 0xffffffff
jne 0x4030bc
test bl, bl
je 0x40350f
push 0x42
lea eax, [ebp - 0x54]
push 0
push eax
call fcn.0044bde0
add esp, 0xc
mov ecx, edi
call fcn.00403870
mov dword [ebp - 0x1adc], eax
lea eax, [ebp - 0x54]
push eax
push 0
lea eax, [ebp - 0x1a70]
push eax
call dword [sym.imp.RstrtMgr.DLL_RmStartSession]
test eax, eax
jne 0x40350f
push eax
push eax
push eax
push eax
lea eax, [ebp - 0x1adc]
push eax
push 1
push dword [ebp - 0x1a70]
call dword [sym.imp.RstrtMgr.DLL_RmRegisterResources]
test eax, eax
jne 0x4030a9
lea eax, [ebp - 0x1a78]
mov dword [ebp - 0x1a74], 0xa
push eax
lea eax, [ebp - 0x1a6c]
push eax
lea eax, [ebp - 0x1a74]
push eax
lea eax, [ebp - 0x1a7c]
push eax
push dword [ebp - 0x1a70]
call dword [sym.imp.RstrtMgr.DLL_RmGetList]
test eax, eax
jne 0x4030a9
xor ebx, ebx
cmp dword [ebp - 0x1a74], ebx
jbe 0x4030a9
lea edi, [ebp - 0x1a6c]
mov eax, dword [edi + 0x28c]
cmp eax, 4
je 0x403094
cmp eax, 0x3e8
je 0x403094
mov esi, dword [edi]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp eax, esi
je 0x403094
push esi
push 0
push 0x100001
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
cmp esi, 0xffffffff
je 0x403094
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 - 0x1a74]
jb 0x403045
mov edi, dword [ebp - 0x1ae8]
push dword [ebp - 0x1a70]
call dword [sym.imp.RstrtMgr.DLL_RmEndSession]
xor bl, bl
jmp 0x402f60
mov dword [ebp - 0x1aa4], 0xf
mov dword [ebp - 0x1aa8], 0
mov byte [ebp - 0x1ab8], 0
lea ecx, [ebp - 0x1ab8]
mov byte [ebp - 4], 3
call fcn.00402260
lea eax, [ebp - 0x1ac0]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov ebx, dword [ebp - 0x1ac0]
mov eax, ebx
mov edx, dword [ebp - 0x1abc]
add eax, 0x400
push 0
mov dword [ebp - 0x1a70], edx
adc edx, 0
lea ecx, [ebx + 0x400]
mov dword [ebp - 0x1adc], ebx
push ecx
push edx
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov edi, eax
mov dword [ebp - 0x1a7c], edi
test edi, edi
jne 0x40315b
mov edx, str.Error_creating_file_mapping
mov ecx, 0x499480
call fcn.00406940
push eax
call fcn.00406bf0
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4034bf
xorps xmm0, xmm0
mov dword [ebp - 0x1a98], 0
mov edx, ebx
movq qword [ebp - 0x1aa0], xmm0
lea ecx, [ebp - 0x1aa0]
call fcn.00402a10
mov byte [ebp - 4], 4
mov ebx, dword [ebp - 0x1aa0]
mov esi, ebx
cmp ebx, dword [ebp - 0x1a9c]
je 0x4031e1
sub esp, 0x18
mov ecx, esp
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
cmp dword [ecx + 0x14], 0x10
jb 0x4031ae
mov eax, dword [ecx]
jmp 0x4031b0
mov eax, ecx
push 0xffffffffffffffff
mov byte [eax], 0
lea eax, [ebp - 0x1ab8]
push 0
push eax
call fcn.00404a50
push 0
push dword [esi + 4]
mov ecx, edi
push 0
push dword [esi]
call fcn.00402cc0
add esi, 8
add esp, 0x28
cmp esi, dword [ebp - 0x1a9c]
jne 0x403191
mov esi, dword [ebp - 0x1adc]
push 0
push dword [0x49a5f8]
push dword [ebp - 0x1a70]
push esi
call fcn.00449700
mov edi, eax
mov dword [ebp - 0x1a78], edx
mov ecx, edi
mov dword [ebp - 0x1ae4], edi
xor eax, eax
or ecx, edx
jne 0x4032ed
push 0x400
push esi
push dword [ebp - 0x1a70]
mov esi, dword [ebp - 0x1a74]
push 0xf001f
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
mov dword [ebp - 0x1ae0], edi
test edi, edi
je 0x403307
cmp dword [0x496bf4], 1
jne 0x403424
mov dword [ebp - 0x1a80], 0xf
mov dword [ebp - 0x1a84], 0
mov byte [ebp - 0x1a94], 0
sub esp, 0x18
mov byte [ebp - 4], 5
mov ecx, esp
lea esi, [ebp - 0x1a94]
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
cmp dword [ecx + 0x14], 0x10
jb 0x403292
mov eax, dword [ecx]
jmp 0x403294
mov eax, ecx
push 0xffffffffffffffff
mov byte [eax], 0
lea eax, [ebp - 0x1ab8]
push 0
push eax
call fcn.00404a50
mov ecx, esi
call fcn.00402370
mov eax, dword [ebp - 0x1a80]
lea esi, [ebp - 0x1a94]
mov edx, dword [ebp - 0x1a94]
add esp, 0x18
cmp eax, 0x10
mov ecx, 0x100
cmovae esi, edx
rep movsd dword es:[edi], dword [esi]
mov byte [ebp - 4], 4
jb 0x403431
inc eax
lea ecx, [ebp - 0x1a94]
push eax
push edx
call fcn.00405c70
jmp 0x403431
test edx, edx
jl 0x403437
jg 0x4032ff
test edi, edi
je 0x403437
mov esi, dword [ebp - 0x1a74]
jmp 0x403313
mov edi, dword [ebp - 0x1ae4]
mov edx, dword [ebp - 0x1a78]
mov ecx, dword [ebp - 0x1adc]
mov eax, dword [ebp - 0x1a70]
sub ecx, edi
sbb eax, edx
mov dword [ebp - 0x1a70], eax
sar eax, 0x1f
lea eax, [edi + 0x400]
push eax
push ecx
push dword [ebp - 0x1a70]
push 0xf001f
push dword [ebp - 0x1a7c]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
mov dword [ebp - 0x1ae0], edi
test edi, edi
jne 0x40336d
push dword [ebp - 0x1a7c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push esi
call edi
jmp 0x40345f
cmp dword [0x496bf4], 1
jne 0x40341e
mov dword [ebp - 0x1a80], 0xf
mov dword [ebp - 0x1a84], 0
mov byte [ebp - 0x1a94], 0
sub esp, 0x18
mov byte [ebp - 4], 6
mov ecx, esp
lea esi, [ebp - 0x1a94]
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
cmp dword [ecx + 0x14], 0x10
jb 0x4033bc
mov eax, dword [ecx]
jmp 0x4033be
mov eax, ecx
push 0xffffffffffffffff
mov byte [eax], 0
lea eax, [ebp - 0x1ab8]
push 0
push eax
call fcn.00404a50
mov ecx, esi
call fcn.00402370
mov edx, dword [ebp - 0x1a80]
lea esi, [ebp - 0x1a94]
add esp, 0x18
mov ecx, 0x100
cmp edx, 0x10
cmovae esi, dword [ebp - 0x1a94]
add edi, dword [ebp - 0x1ae4]
rep movsd dword es:[edi], dword [esi]
mov byte [ebp - 4], 4
cmp edx, 0x10
jb 0x403431
lea eax, [edx + 1]
push eax
push dword [ebp - 0x1a94]
lea ecx, [ebp - 0x1a94]
call fcn.00405c70
jmp 0x403431
add edi, dword [ebp - 0x1ae4]
mov esi, dword [0x49a5f0]
mov ecx, 0x100
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x1ae0]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x1a7c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x1a74]
call esi
mov ecx, dword [ebp - 0x1ae8]
call fcn.00414aa0
test ebx, ebx
je 0x4034bf
mov eax, dword [ebp - 0x1a98]
sub eax, ebx
sar eax, 3
cmp eax, 0x1fffffff
jbe 0x40347a
call fcn.00450abf
shl eax, 3
cmp eax, 0x1000
jb 0x4034b6
test byte [ebp - 0x1aa0], 0x1f
je 0x403492
call fcn.00450abf
mov eax, dword [ebx - 4]
cmp eax, ebx
jb 0x40349e
call fcn.00450abf
sub ebx, eax
cmp ebx, 4
jae 0x4034aa
call fcn.00450abf
cmp ebx, 0x23
jbe 0x4034b4
call fcn.00450abf
mov ebx, eax
push ebx
call fcn.00448f45
add esp, 4
mov eax, dword [ebp - 0x1aa4]
cmp eax, 0x10
jb 0x40350f
mov ecx, dword [ebp - 0x1ab8]
inc eax
cmp eax, 0x1000
jb 0x403506
test cl, 0x1f
je 0x4034e2
call fcn.00450abf
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x4034ee
call fcn.00450abf
sub ecx, eax
cmp ecx, 4
jae 0x4034fa
call fcn.00450abf
cmp ecx, 0x23
jbe 0x403504
call fcn.00450abf
mov ecx, eax
push ecx
call fcn.00448f45
add esp, 4
mov eax, dword [ebp - 0x1ac4]
cmp eax, 8
jb 0x40356d
mov ecx, dword [ebp - 0x1ad8]
inc eax
cmp eax, 0x7fffffff
jbe 0x40352d
call fcn.00450abf
add eax, eax
cmp eax, 0x1000
jb 0x403564
test cl, 0x1f
je 0x403540
call fcn.00450abf
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x40354c
call fcn.00450abf
sub ecx, eax
cmp ecx, 4
jae 0x403558
call fcn.00450abf
cmp ecx, 0x23
jbe 0x403562
call fcn.00450abf
mov ecx, eax
push ecx
call fcn.00448f45
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00448a58
mov esp, ebp
pop ebp
ret