Function at 0x402ef4
Capabilities:
Acquire debug privileges
Check for time delay via gettickcount
Get common file path
Query environment variable
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
push ebx
push esi
push edi
push 4
push 2
push str.SeDebugPrivilege
call fcn.00411514
mov eax, dword [ebp + 0x30]
mov ecx, eax
and ecx, 8
mov dword [ebp - 0x40], ecx
mov ecx, eax
and ecx, 4
mov dword [ebp - 0x30], ecx
mov ecx, eax
and ecx, 0x18
mov dword [ebp - 0x7c], ecx
mov ecx, eax
and ecx, 0x40
mov edx, eax
mov dword [ebp - 0x88], ecx
mov esi, eax
mov ecx, eax
and eax, 0x200
xor edi, edi
mov dword [ebp - 0x60], eax
mov eax, dword [ebp + 0x28]
and edx, 0x20
and ecx, 0x100
xor ebx, ebx
add esp, 0xc
and esi, 0x80
inc edi
cmp eax, ebx
mov dword [ebp - 0x84], edx
mov dword [ebp - 0x10], ecx
je 0x402f72
test byte [eax + 0x2f], 8
je 0x402f72
mov dword [ebp - 0x30], edi
cmp edx, ebx
je 0x402f79
mov dword [ebp - 0x30], ebx
cmp eax, ebx
je 0x402f8d
test byte [eax + 0x2c], 1
je 0x402f8d
cmp word [eax + 0x30], bx
jne 0x402f8d
mov ecx, edi
jmp 0x402f8f
xor ecx, ecx
cmp eax, ebx
je 0x402fa2
test byte [eax + 0x2c], 1
je 0x402fa2
cmp word [eax + 0x30], bx
jne 0x402fa2
mov dword [ebp - 0x30], edi
cmp ecx, ebx
mov dword [ebp - 0x44], 0x4a3c3c
jne 0x402fb4
mov dword [ebp - 0x44], 0x4a39d4
lea ecx, [ebp - 0x38]
call fcn.0043d47d
cmp dword [ebp + 8], ebx
je 0x402fe6
push 0x4a3c28
lea ecx, [ebp - 0x38]
call fcn.004458a8
push dword [ebp + 8]
lea ecx, [ebp - 0x38]
call fcn.0043d4e9
push 0x4a3c24
lea ecx, [ebp - 0x38]
call fcn.0043d4e9
cmp esi, ebx
je 0x402ff4
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentStringsW]
mov ecx, eax
jmp 0x402ff6
xor ecx, ecx
cmp ecx, ebx
mov dword [ebp - 0x34], ecx
mov eax, ecx
je 0x403014
cmp word [ecx], bx
je 0x403012
inc eax
inc eax
cmp word [eax], bx
jne 0x403004
inc eax
inc eax
cmp word [eax], bx
jne 0x403004
inc eax
inc eax
sub eax, ecx
lea ecx, [ebp - 4]
mov dword [ebp - 0x24], eax
call fcn.0043d47d
push 0xffffffffffffffff
push 0xffffffffffffffff
push str._nfb__incmd_PECMD_EXEC__InstallService
lea ecx, [ebp - 4]
call fcn.0043d538
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
push 0xa000
lea ecx, [ebp - 4]
mov dword [ebp - 0x3c], eax
call fcn.0043d4c2
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
lea ecx, [ebp - 8]
mov dword [ebp - 0x80], eax
call fcn.0043d47d
mov byte [ebp + 0x2b], 0
mov dword [ebp - 0x5c], ebx
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov dword [ebp - 0x28], eax
xor eax, eax
mov byte [ebp - 0x9c], 0
lea edi, [ebp - 0x9b]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x9c]
mov dword [ebp - 0x74], eax
lea eax, [ebp - 0x74]
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x78], 0xc
mov dword [ebp - 0x70], ebx
call fcn.0043a300
pop ecx
inc dword [ebp - 0x54]
test byte [ebp - 0x54], 1
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 4]
je 0x4030df
lea eax, [eax + ecx*2]
push str.PECMD2012.EXESVC
push eax
mov dword [ebp - 0xc], 1
call dword [sym.imp.USER32.dll_wsprintfW]
pop ecx
mov esi, 0x100000
pop ecx
mov dword [ebp - 0x50], esi
jmp 0x403110
mov esi, dword [ebp - 0x24]
and dword [ebp - 0xc], 0
add esi, 0x210
mov dword [ebp - 0x50], esi
lea edi, [eax + ecx*2]
call fcn.00439c36
push edx
push eax
push dword [ebp - 0x80]
push str.EXEC.SYS
push str.__PECMD._s._u._I64u
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
cmp dword [ebp - 0x10], 0
jne 0x403120
cmp dword [ebp - 0xc], 0
mov byte [ebp + 0x33], 0
je 0x403124
mov byte [ebp + 0x33], 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push str.Globalpecmd2012.shm.
lea ecx, [ebp - 8]
call fcn.0043d538
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 4]
lea eax, [eax + ecx*2]
push eax
lea ecx, [ebp - 8]
call fcn.0043d4e9
lea ebx, [esi + 0x88]
mov dword [ebp - 0x4c], ebx
xor edi, edi
push dword [ebp - 8]
push edi
push 6
call dword [sym.imp.KERNEL32.DLL_OpenFileMappingW]
mov esi, eax
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp esi, edi
jne 0x403189
cmp dword [ebp - 0x10], edi
jne 0x403193
cmp dword [ebp - 0xc], edi
jne 0x40326f
jmp 0x403193
cmp byte [ebp + 0x33], 0
je 0x4032a1
push edi
call dword [sym.imp.KERNEL32.DLL_SetLastError]
cmp byte [ebp + 0x33], 0
je 0x403238
cmp dword [ebp - 0x14], edi
jne 0x4031ed
push 0xffffffffffffffff
push str.Globalpecmd2012.lock.
lea ecx, [ebp - 0x58]
call fcn.0044581a
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x3c]
lea eax, [eax + ecx*2]
push eax
lea ecx, [ebp - 0x58]
call fcn.0043d4e9
push dword [ebp - 0x58]
lea eax, [ebp - 0x78]
push 1
push eax
call dword [sym.imp.KERNEL32.DLL_CreateMutexW]
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x14], eax
call fcn.00437960
cmp dword [ebp - 0x14], edi
je 0x40326f
cmp dword [ebp - 0x2c], edi
jne 0x403238
push 0xffffffffffffffff
push str.Globalpecmd2012.event.
lea ecx, [ebp - 0x48]
call fcn.0044581a
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x3c]
lea eax, [eax + ecx*2]
push eax
lea ecx, [ebp - 0x48]
call fcn.0043d4e9
push dword [ebp - 0x48]
lea eax, [ebp - 0x78]
push edi
push edi
push eax
call dword [sym.imp.KERNEL32.DLL_CreateEventW]
cmp eax, edi
mov dword [ebp - 0x2c], eax
lea ecx, [ebp - 0x48]
jne 0x403233
call fcn.00437960
jmp 0x40326f
call fcn.00437960
cmp esi, edi
jne 0x4032d1
push dword [ebp - 8]
lea eax, [ebp - 0x78]
push ebx
push edi
push 4
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.DLL_CreateFileMappingW]
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp dword [ebp - 0x18], edi
jne 0x4032b7
cmp dword [ebp - 0x10], edi
je 0x4032a4
cmp eax, 5
je 0x40370d
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
sub eax, dword [ebp - 0x28]
cmp eax, 0x7530
jae 0x4036fe
xor edi, edi
push edi
push edi
push 5
mov ecx, 0x4bdfa0
call fcn.00413857
cmp dword [ebp - 0x10], edi
jne 0x40315e
jmp 0x4030ae
push esi
jmp 0x4032c6
push edi
push edi
push 5
mov ecx, 0x4bdfa0
call fcn.00413857
jmp 0x4030ae
cmp dword [ebp - 0x10], edi
jne 0x4032d1
cmp eax, 0xb7
jne 0x4032d1
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x4030ae
push ebx
push edi
push edi
push 6
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
mov esi, eax
cmp esi, edi
je 0x4032c3
mov edi, 0x80
push edi
push 0
push esi
call fcn.0048f7a0
add esp, 0xc
cmp byte [ebp + 0x33], 0
je 0x403379
push dword [ebp - 0x44]
mov ebx, dword [sym.imp.KERNEL32.DLL_lstrlenW]
call ebx
push dword [ebp + 0xc]
mov edi, eax
shl edi, 1
call ebx
lea ebx, [eax + eax + 2]
mov dword [ebp + 0x28], ebx
add ebx, edi
cmp ebx, dword [ebp - 0x50]
jle 0x403321
mov ebx, dword [ebp - 0x50]
xor eax, eax
cmp dword [ebp - 0x40], eax
je 0x40333e
cmp dword [ebp - 0x10], eax
jne 0x40333e
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x2c]
or ecx, 1
or edx, eax
mov dword [esi + 0x28], ecx
mov dword [esi + 0x2c], edx
lea ecx, [edi + 2]
push ecx
push dword [ebp - 0x44]
lea eax, [esi + 0x80]
push eax
call fcn.004125f9
push dword [ebp + 0x28]
lea eax, [edi + esi + 0x80]
push dword [ebp + 0xc]
push eax
call fcn.004125f9
mov dword [esi + 0x18], ebx
add esp, 0x18
and word [esi + ebx + 0x7e], 0
lea edi, [ebx + 0x80]
mov ebx, dword [ebp - 0x4c]
cmp dword [ebp - 0x60], 0
je 0x4033eb
push 0x20a
lea ecx, [ebp + 0x28]
call fcn.0043d49b
mov eax, dword [ebp + 0x28]
and word [eax], 0
push dword [ebp + 0x28]
push 0x208
call dword [sym.imp.KERNEL32.DLL_GetCurrentDirectoryW]
mov eax, dword [ebp - 0x4c]
push dword [ebp + 0x28]
sub eax, edi
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
lea ebx, [eax + eax + 2]
cmp ebx, dword [ebp - 0x28]
jle 0x4033be
mov ebx, dword [ebp - 0x28]
test ebx, ebx
jle 0x4033e0
push ebx
push dword [ebp + 0x28]
lea eax, [edi + esi]
push eax
call fcn.004125f9
lea eax, [edi + esi]
mov dword [esi + 0x1c], ebx
and word [eax + ebx - 2], 0
add esp, 0xc
add edi, ebx
lea ecx, [ebp + 0x28]
call fcn.00437960
mov ebx, dword [ebp - 0x4c]
mov eax, ebx
sub eax, edi
cmp dword [ebp - 0x24], eax
jle 0x4033f7
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x34], 0
je 0x403422
cmp dword [ebp - 0x24], 4
jbe 0x403422
push dword [ebp - 0x24]
lea eax, [edi + esi]
push dword [ebp - 0x34]
push eax
call fcn.004125f9
mov eax, dword [ebp - 0x24]
add edi, eax
add esp, 0xc
and dword [edi + esi - 4], 0
mov dword [esi + 0x20], eax
cmp dword [ebp + 8], 0
je 0x403461
push dword [ebp + 8]
sub ebx, edi
mov dword [ebp + 0x28], ebx
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
lea ebx, [eax + eax + 2]
cmp ebx, dword [ebp + 0x28]
jle 0x403442
mov ebx, dword [ebp + 0x28]
test ebx, ebx
jle 0x403461
push ebx
push dword [ebp + 8]
lea eax, [edi + esi]
push eax
call fcn.004125f9
mov dword [esi + 0x24], ebx
add ebx, edi
add esp, 0xc
and word [ebx + esi - 2], 0
cmp byte [ebp + 0x33], 0
mov dword [esi], 0xffffffff
mov dword [esi + 4], 0xffffffff
je 0x403483
cmp dword [ebp - 0x2c], 0
je 0x403483
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.DLL_SetEvent]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
cmp dword [ebp - 0xc], 0
mov edx, 0x4a3b44
jne 0x40349c
mov edx, 0x4a39d4
cmp dword [ebp - 0x10], 0
mov ecx, 0x4a3b38
jne 0x4034ac
mov ecx, 0x4a39d4
push dword [ebp + 0xc]
mov ebx, dword [ebp - 0x68]
push dword [ebp - 0x38]
mov edi, dword [ebp - 8]
push dword [ebp - 0x44]
add ebx, ebx
add edi, ebx
push edi
push ecx
mov ecx, dword [ebp - 4]
push edx
lea eax, [ecx + eax*2]
push str.___desk__s__s___ack:_s__s_s__s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x20
push dword [ebp - 4]
mov edi, 0x4bdfa0
mov ecx, edi
call fcn.00402d69
cmp dword [ebp - 0xc], 0
mov dword [ebp - 0x5c], eax
mov byte [ebp + 0x2b], 1
jne 0x4034ff
cmp dword [ebp - 0x10], 0
jne 0x4034ff
and dword [ebp - 0xc], 0
jmp 0x403527
mov eax, dword [ebp - 8]
add eax, ebx
push eax
push str._wait__s
push dword [ebp - 4]
mov dword [ebp - 0xc], 1
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push dword [ebp - 4]
mov ecx, edi
call fcn.00413b9e
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov dword [ebp - 0x28], eax
jmp 0x40354f
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
sub eax, dword [ebp - 0x28]
cmp eax, 0x7530
jae 0x403560
push 0
push 0
push 1
mov ecx, edi
call fcn.00413857
mov ecx, dword [esi]
cmp ecx, 0xffffffff
mov eax, dword [esi + 4]
mov dword [ebp - 0x6c], ecx
jne 0x403560
cmp eax, ecx
je 0x403532
cmp dword [ebp - 0x34], 0
je 0x40356f
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.DLL_FreeEnvironmentStringsW]
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
test eax, eax
mov edx, dword [esi + 8]
mov dword [ebp - 0x64], edx
mov edx, dword [esi + 0xc]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x60], edx
jl 0x403632
jg 0x403599
test ecx, ecx
jbe 0x403632
push dword [ebp - 0x20]
mov esi, dword [sym.imp.KERNEL32.DLL_OpenProcess]
push 0
push 0x100400
call esi
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp dword [ebp + 8], 0
jne 0x4035c9
push dword [ebp - 0x20]
push 0
push 0x100000
call esi
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp dword [ebp - 0x40], 0
je 0x4035e7
mov eax, dword [ebp + 0x2c]
test eax, eax
je 0x4035e7
mov ecx, dword [ebp - 0x20]
mov dword [eax + 8], ecx
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
mov esi, dword [ebp - 0x88]
test esi, esi
jne 0x4035fe
cmp dword [ebp - 0x30], esi
je 0x4035fe
cmp dword [ebp - 0x84], esi
je 0x403610
push 0x1388
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_WaitForInputIdle]
test esi, esi
jne 0x403616
cmp dword [ebp - 0x30], 0
jne 0x403632
or esi, dword [ebp - 0x7c]
neg esi
sbb esi, esi
and esi, 0x1220
add esi, 0x168
push esi
push dword [ebp - 0x20]
call fcn.00402e69
xor eax, eax
cmp dword [ebp - 0x40], eax
mov esi, 0x4a3ad8
jne 0x403666
cmp dword [ebp - 0x1c], eax
jl 0x403666
jg 0x40364a
cmp dword [ebp - 0x20], eax
jbe 0x403666
push dword [ebp - 0x20]
push esi
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push dword [ebp - 4]
mov ecx, edi
call fcn.004258c6
xor eax, eax
cmp dword [ebp - 0xc], eax
jne 0x40368c
cmp dword [ebp - 0x6c], eax
jle 0x40368c
push dword [ebp - 0x64]
push esi
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push dword [ebp - 4]
mov ecx, edi
call fcn.00416411
xor eax, eax
cmp dword [ebp - 0x40], eax
jne 0x4036b9
cmp dword [ebp - 0x1c], eax
jl 0x4036b9
jg 0x40369d
cmp dword [ebp - 0x20], eax
jbe 0x4036b9
push dword [ebp - 0x20]
push esi
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push dword [ebp - 4]
mov ecx, edi
call fcn.00416411
xor eax, eax
cmp dword [ebp - 0xc], eax
jne 0x4036fe
mov eax, dword [ebp - 8]
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
add eax, ebx
push eax
push str._wait___s
push dword [ebp - 4]
call esi
add esp, 0xc
push dword [ebp - 4]
mov ecx, edi
call fcn.00413b9e
mov eax, dword [ebp - 8]
add ebx, eax
push ebx
push str._delete__s
push dword [ebp - 4]
call esi
add esp, 0xc
push dword [ebp - 4]
mov ecx, edi
call fcn.00413b9e
cmp dword [ebp - 0x18], 0
je 0x40370d
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor esi, esi
cmp dword [ebp - 0x2c], esi
je 0x40371d
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp dword [ebp - 0x14], esi
je 0x403734
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.DLL_ReleaseMutex]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp dword [ebp - 0x1c], esi
jg 0x403751
jl 0x403740
cmp dword [ebp - 0x20], esi
ja 0x403751
cmp byte [ebp + 0x2b], 0
je 0x403754
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.DLL_SetLastError]
jmp 0x403754
xor esi, esi
inc esi
lea ecx, [ebp - 8]
call fcn.00437960
lea ecx, [ebp - 4]
call fcn.00437960
lea ecx, [ebp - 0x38]
call fcn.00437960
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret