Function at 0x402f1d
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.0041147a
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 0x402f9b
test byte [eax + 0x2f], 8
je 0x402f9b
mov dword [ebp - 0x30], edi
cmp edx, ebx
je 0x402fa2
mov dword [ebp - 0x30], ebx
cmp eax, ebx
je 0x402fb6
test byte [eax + 0x2c], 1
je 0x402fb6
cmp word [eax + 0x30], bx
jne 0x402fb6
mov ecx, edi
jmp 0x402fb8
xor ecx, ecx
cmp eax, ebx
je 0x402fcb
test byte [eax + 0x2c], 1
je 0x402fcb
cmp word [eax + 0x30], bx
jne 0x402fcb
mov dword [ebp - 0x30], edi
cmp ecx, ebx
mov dword [ebp - 0x44], 0x4a3c3c
jne 0x402fdd
mov dword [ebp - 0x44], 0x4a39d4
lea ecx, [ebp - 0x38]
call fcn.0043d3a5
cmp dword [ebp + 8], ebx
je 0x40300f
push 0x4a3c28
lea ecx, [ebp - 0x38]
call fcn.0044580a
push dword [ebp + 8]
lea ecx, [ebp - 0x38]
call fcn.0043d411
push 0x4a3c24
lea ecx, [ebp - 0x38]
call fcn.0043d411
cmp esi, ebx
je 0x40301d
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentStringsW]
mov ecx, eax
jmp 0x40301f
xor ecx, ecx
cmp ecx, ebx
mov dword [ebp - 0x34], ecx
mov eax, ecx
je 0x40303d
cmp word [ecx], bx
je 0x40303b
inc eax
inc eax
cmp word [eax], bx
jne 0x40302d
inc eax
inc eax
cmp word [eax], bx
jne 0x40302d
inc eax
inc eax
sub eax, ecx
lea ecx, [ebp - 4]
mov dword [ebp - 0x24], eax
call fcn.0043d3a5
push 0xffffffffffffffff
push 0xffffffffffffffff
push str._nfb__incmd_PECMD_EXEC__InstallService
lea ecx, [ebp - 4]
call fcn.0043d460
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
push 0xa000
lea ecx, [ebp - 4]
mov dword [ebp - 0x3c], eax
call fcn.0043d3ea
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
lea ecx, [ebp - 8]
mov dword [ebp - 0x80], eax
call fcn.0043d3a5
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.0043a212
pop ecx
inc dword [ebp - 0x54]
test byte [ebp - 0x54], 1
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 4]
je 0x403108
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 0x403139
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.00439b48
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 0x403149
cmp dword [ebp - 0xc], 0
mov byte [ebp + 0x33], 0
je 0x40314d
mov byte [ebp + 0x33], 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push str.Globalpecmd2012.shm.
lea ecx, [ebp - 8]
call fcn.0043d460
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.0043d411
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 0x4031b2
cmp dword [ebp - 0x10], edi
jne 0x4031bc
cmp dword [ebp - 0xc], edi
jne 0x403298
jmp 0x4031bc
cmp byte [ebp + 0x33], 0
je 0x4032ca
push edi
call dword [sym.imp.KERNEL32.DLL_SetLastError]
cmp byte [ebp + 0x33], 0
je 0x403261
cmp dword [ebp - 0x14], edi
jne 0x403216
push 0xffffffffffffffff
push str.Globalpecmd2012.lock.
lea ecx, [ebp - 0x58]
call fcn.0044577c
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x3c]
lea eax, [eax + ecx*2]
push eax
lea ecx, [ebp - 0x58]
call fcn.0043d411
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.00437884
cmp dword [ebp - 0x14], edi
je 0x403298
cmp dword [ebp - 0x2c], edi
jne 0x403261
push 0xffffffffffffffff
push str.Globalpecmd2012.event.
lea ecx, [ebp - 0x48]
call fcn.0044577c
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x3c]
lea eax, [eax + ecx*2]
push eax
lea ecx, [ebp - 0x48]
call fcn.0043d411
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 0x40325c
call fcn.00437884
jmp 0x403298
call fcn.00437884
cmp esi, edi
jne 0x4032fa
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 0x4032e0
cmp dword [ebp - 0x10], edi
je 0x4032cd
cmp eax, 5
je 0x403736
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
sub eax, dword [ebp - 0x28]
cmp eax, 0x7530
jae 0x403727
xor edi, edi
push edi
push edi
push 5
mov ecx, 0x4bdfa0
call fcn.004137db
cmp dword [ebp - 0x10], edi
jne 0x403187
jmp 0x4030d7
push esi
jmp 0x4032ef
push edi
push edi
push 5
mov ecx, 0x4bdfa0
call fcn.004137db
jmp 0x4030d7
cmp dword [ebp - 0x10], edi
jne 0x4032fa
cmp eax, 0xb7
jne 0x4032fa
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x4030d7
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 0x4032ec
mov edi, 0x80
push edi
push 0
push esi
call fcn.0048f710
add esp, 0xc
cmp byte [ebp + 0x33], 0
je 0x4033a2
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 0x40334a
mov ebx, dword [ebp - 0x50]
xor eax, eax
cmp dword [ebp - 0x40], eax
je 0x403367
cmp dword [ebp - 0x10], eax
jne 0x403367
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.0041255f
push dword [ebp + 0x28]
lea eax, [edi + esi + 0x80]
push dword [ebp + 0xc]
push eax
call fcn.0041255f
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 0x403414
push 0x20a
lea ecx, [ebp + 0x28]
call fcn.0043d3c3
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 0x4033e7
mov ebx, dword [ebp - 0x28]
test ebx, ebx
jle 0x403409
push ebx
push dword [ebp + 0x28]
lea eax, [edi + esi]
push eax
call fcn.0041255f
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.00437884
mov ebx, dword [ebp - 0x4c]
mov eax, ebx
sub eax, edi
cmp dword [ebp - 0x24], eax
jle 0x403420
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x34], 0
je 0x40344b
cmp dword [ebp - 0x24], 4
jbe 0x40344b
push dword [ebp - 0x24]
lea eax, [edi + esi]
push dword [ebp - 0x34]
push eax
call fcn.0041255f
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 0x40348a
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 0x40346b
mov ebx, dword [ebp + 0x28]
test ebx, ebx
jle 0x40348a
push ebx
push dword [ebp + 8]
lea eax, [edi + esi]
push eax
call fcn.0041255f
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 0x4034ac
cmp dword [ebp - 0x2c], 0
je 0x4034ac
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 0x4034c5
mov edx, 0x4a39d4
cmp dword [ebp - 0x10], 0
mov ecx, 0x4a3b38
jne 0x4034d5
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.00402d92
cmp dword [ebp - 0xc], 0
mov dword [ebp - 0x5c], eax
mov byte [ebp + 0x2b], 1
jne 0x403528
cmp dword [ebp - 0x10], 0
jne 0x403528
and dword [ebp - 0xc], 0
jmp 0x403550
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.00413b22
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov dword [ebp - 0x28], eax
jmp 0x403578
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
sub eax, dword [ebp - 0x28]
cmp eax, 0x7530
jae 0x403589
push 0
push 0
push 1
mov ecx, edi
call fcn.004137db
mov ecx, dword [esi]
cmp ecx, 0xffffffff
mov eax, dword [esi + 4]
mov dword [ebp - 0x6c], ecx
jne 0x403589
cmp eax, ecx
je 0x40355b
cmp dword [ebp - 0x34], 0
je 0x403598
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 0x40365b
jg 0x4035c2
test ecx, ecx
jbe 0x40365b
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 0x4035f2
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 0x403610
mov eax, dword [ebp + 0x2c]
test eax, eax
je 0x403610
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 0x403627
cmp dword [ebp - 0x30], esi
je 0x403627
cmp dword [ebp - 0x84], esi
je 0x403639
push 0x1388
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_WaitForInputIdle]
test esi, esi
jne 0x40363f
cmp dword [ebp - 0x30], 0
jne 0x40365b
or esi, dword [ebp - 0x7c]
neg esi
sbb esi, esi
and esi, 0x1220
add esi, 0x168
push esi
push dword [ebp - 0x20]
call fcn.00402e92
xor eax, eax
cmp dword [ebp - 0x40], eax
mov esi, 0x4a3ad8
jne 0x40368f
cmp dword [ebp - 0x1c], eax
jl 0x40368f
jg 0x403673
cmp dword [ebp - 0x20], eax
jbe 0x40368f
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.00425802
xor eax, eax
cmp dword [ebp - 0xc], eax
jne 0x4036b5
cmp dword [ebp - 0x6c], eax
jle 0x4036b5
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.00416392
xor eax, eax
cmp dword [ebp - 0x40], eax
jne 0x4036e2
cmp dword [ebp - 0x1c], eax
jl 0x4036e2
jg 0x4036c6
cmp dword [ebp - 0x20], eax
jbe 0x4036e2
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.00416392
xor eax, eax
cmp dword [ebp - 0xc], eax
jne 0x403727
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.00413b22
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.00413b22
cmp dword [ebp - 0x18], 0
je 0x403736
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor esi, esi
cmp dword [ebp - 0x2c], esi
je 0x403746
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp dword [ebp - 0x14], esi
je 0x40375d
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 0x40377a
jl 0x403769
cmp dword [ebp - 0x20], esi
ja 0x40377a
cmp byte [ebp + 0x2b], 0
je 0x40377d
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.DLL_SetLastError]
jmp 0x40377d
xor esi, esi
inc esi
lea ecx, [ebp - 8]
call fcn.00437884
lea ecx, [ebp - 4]
call fcn.00437884
lea ecx, [ebp - 0x38]
call fcn.00437884
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret