Function at 0x402fcc
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.00412301
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 0x40304a
test byte [eax + 0x2f], 8
je 0x40304a
mov dword [ebp - 0x30], edi
cmp edx, ebx
je 0x403051
mov dword [ebp - 0x30], ebx
cmp eax, ebx
je 0x403065
test byte [eax + 0x2c], 1
je 0x403065
cmp word [eax + 0x30], bx
jne 0x403065
mov ecx, edi
jmp 0x403067
xor ecx, ecx
cmp eax, ebx
je 0x40307a
test byte [eax + 0x2c], 1
je 0x40307a
cmp word [eax + 0x30], bx
jne 0x40307a
mov dword [ebp - 0x30], edi
cmp ecx, ebx
mov dword [ebp - 0x44], 0x4aec64
jne 0x40308c
mov dword [ebp - 0x44], 0x4ae9fc
lea ecx, [ebp - 0x38]
call fcn.0043fd9a
cmp dword [ebp + 8], ebx
je 0x4030be
push 0x4aec50
lea ecx, [ebp - 0x38]
call fcn.0044845d
push dword [ebp + 8]
lea ecx, [ebp - 0x38]
call fcn.0043fe06
push 0x4aec4c
lea ecx, [ebp - 0x38]
call fcn.0043fe06
cmp esi, ebx
je 0x4030cc
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov ecx, eax
jmp 0x4030ce
xor ecx, ecx
cmp ecx, ebx
mov dword [ebp - 0x34], ecx
mov eax, ecx
je 0x4030ec
cmp word [ecx], bx
je 0x4030ea
inc eax
inc eax
cmp word [eax], bx
jne 0x4030dc
inc eax
inc eax
cmp word [eax], bx
jne 0x4030dc
inc eax
inc eax
sub eax, ecx
lea ecx, [ebp - 4]
mov dword [ebp - 0x24], eax
call fcn.0043fd9a
push 0xffffffffffffffff
push 0xffffffffffffffff
push str._nfb__incmd_PECMD_EXEC__InstallService
lea ecx, [ebp - 4]
call fcn.0043fe55
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0xa000
lea ecx, [ebp - 4]
mov dword [ebp - 0x3c], eax
call fcn.0043fddf
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ecx, [ebp - 8]
mov dword [ebp - 0x80], eax
call fcn.0043fd9a
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.0043c6a1
pop ecx
inc dword [ebp - 0x54]
test byte [ebp - 0x54], 1
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 4]
je 0x4031b7
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 0x4031e8
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.0043c0b2
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 0x4031f8
cmp dword [ebp - 0xc], 0
mov byte [ebp + 0x33], 0
je 0x4031fc
mov byte [ebp + 0x33], 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push str.Globalpecmd2012.shm.
lea ecx, [ebp - 8]
call fcn.0043fe55
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.0043fe06
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 0x403261
cmp dword [ebp - 0x10], edi
jne 0x40326b
cmp dword [ebp - 0xc], edi
jne 0x403347
jmp 0x40326b
cmp byte [ebp + 0x33], 0
je 0x403379
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp byte [ebp + 0x33], 0
je 0x403310
cmp dword [ebp - 0x14], edi
jne 0x4032c5
push 0xffffffffffffffff
push str.Globalpecmd2012.lock.
lea ecx, [ebp - 0x58]
call fcn.004483cf
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x3c]
lea eax, [eax + ecx*2]
push eax
lea ecx, [ebp - 0x58]
call fcn.0043fe06
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.00439cfd
cmp dword [ebp - 0x14], edi
je 0x403347
cmp dword [ebp - 0x2c], edi
jne 0x403310
push 0xffffffffffffffff
push str.Globalpecmd2012.event.
lea ecx, [ebp - 0x48]
call fcn.004483cf
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x3c]
lea eax, [eax + ecx*2]
push eax
lea ecx, [ebp - 0x48]
call fcn.0043fe06
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 0x40330b
call fcn.00439cfd
jmp 0x403347
call fcn.00439cfd
cmp esi, edi
jne 0x4033a9
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 0x40338f
cmp dword [ebp - 0x10], edi
je 0x40337c
cmp eax, 5
je 0x4037fb
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x28]
cmp eax, 0x7530
jae 0x4037ec
xor edi, edi
push edi
push edi
push 5
mov ecx, 0x4c9048
call fcn.00414c28
cmp dword [ebp - 0x10], edi
jne 0x403236
jmp 0x403186
push esi
jmp 0x40339e
push edi
push edi
push 5
mov ecx, 0x4c9048
call fcn.00414c28
jmp 0x403186
cmp dword [ebp - 0x10], edi
jne 0x4033a9
cmp eax, 0xb7
jne 0x4033a9
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x403186
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 0x40339b
mov edi, 0x80
push edi
push 0
push esi
call fcn.0049a7e0
add esp, 0xc
cmp byte [ebp + 0x33], 0
je 0x403451
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 0x4033f9
mov ebx, dword [ebp - 0x50]
xor eax, eax
cmp dword [ebp - 0x40], eax
je 0x403416
cmp dword [ebp - 0x10], eax
jne 0x403416
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.00413203
push dword [ebp + 0x28]
lea eax, [edi + esi + 0x80]
push dword [ebp + 0xc]
push eax
call fcn.00413203
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 0x4034c3
push 0x20a
lea ecx, [ebp + 0x28]
call fcn.0043fdb8
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 0x403496
mov ebx, dword [ebp - 0x28]
test ebx, ebx
jle 0x4034b8
push ebx
push dword [ebp + 0x28]
lea eax, [edi + esi]
push eax
call fcn.00413203
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.00439cfd
mov ebx, dword [ebp - 0x4c]
mov eax, ebx
sub eax, edi
cmp dword [ebp - 0x24], eax
jle 0x4034cf
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x34], 0
je 0x4034fa
cmp dword [ebp - 0x24], 4
jbe 0x4034fa
push dword [ebp - 0x24]
lea eax, [edi + esi]
push dword [ebp - 0x34]
push eax
call fcn.00413203
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 0x403539
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 0x40351a
mov ebx, dword [ebp + 0x28]
test ebx, ebx
jle 0x403539
push ebx
push dword [ebp + 8]
lea eax, [edi + esi]
push eax
call fcn.00413203
add edi, ebx
add esp, 0xc
mov dword [esi + 0x24], ebx
and word [edi + esi - 2], 0
lea eax, [edi + esi]
and dword [eax + 8], 0
and dword [eax + 0xc], 0
cmp byte [ebp + 0x33], 0
push 0x10
pop ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [esi + 0x30], ecx
mov dword [esi], 0xffffffff
mov dword [esi + 4], 0xffffffff
je 0x403571
cmp dword [ebp - 0x2c], 0
je 0x403571
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, 0x4aeb6c
jne 0x40358a
mov edx, 0x4ae9fc
cmp dword [ebp - 0x10], 0
mov ecx, 0x4aeb60
jne 0x40359a
mov ecx, 0x4ae9fc
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, 0x4c9048
mov ecx, edi
call fcn.00402e40
cmp dword [ebp - 0xc], 0
mov dword [ebp - 0x5c], eax
mov byte [ebp + 0x2b], 1
jne 0x4035ed
cmp dword [ebp - 0x10], 0
jne 0x4035ed
and dword [ebp - 0xc], 0
jmp 0x403615
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.00414f83
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x28], eax
jmp 0x40363d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x28]
cmp eax, 0x7530
jae 0x40364e
push 0
push 0
push 1
mov ecx, edi
call fcn.00414c28
mov ecx, dword [esi]
cmp ecx, 0xffffffff
mov eax, dword [esi + 4]
mov dword [ebp - 0x6c], ecx
jne 0x40364e
cmp eax, ecx
je 0x403620
cmp dword [ebp - 0x34], 0
je 0x40365d
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 0x403720
jg 0x403687
test ecx, ecx
jbe 0x403720
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 0x4036b7
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 0x4036d5
mov eax, dword [ebp + 0x2c]
test eax, eax
je 0x4036d5
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 0x4036ec
cmp dword [ebp - 0x30], esi
je 0x4036ec
cmp dword [ebp - 0x84], esi
je 0x4036fe
push 0x1388
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_WaitForInputIdle]
test esi, esi
jne 0x403704
cmp dword [ebp - 0x30], 0
jne 0x403720
or esi, dword [ebp - 0x7c]
neg esi
sbb esi, esi
and esi, 0x1220
add esi, 0x168
push esi
push dword [ebp - 0x20]
call fcn.00402f41
xor eax, eax
cmp dword [ebp - 0x40], eax
mov esi, 0x4aeb00
jne 0x403754
cmp dword [ebp - 0x1c], eax
jl 0x403754
jg 0x403738
cmp dword [ebp - 0x20], eax
jbe 0x403754
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.00424eff
xor eax, eax
cmp dword [ebp - 0xc], eax
jne 0x40377a
cmp dword [ebp - 0x6c], eax
jle 0x40377a
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.00417980
xor eax, eax
cmp dword [ebp - 0x40], eax
jne 0x4037a7
cmp dword [ebp - 0x1c], eax
jl 0x4037a7
jg 0x40378b
cmp dword [ebp - 0x20], eax
jbe 0x4037a7
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.00417980
xor eax, eax
cmp dword [ebp - 0xc], eax
jne 0x4037ec
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.00414f83
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.00414f83
cmp dword [ebp - 0x18], 0
je 0x4037fb
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
cmp dword [ebp - 0x2c], esi
je 0x40380b
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x14], esi
je 0x403822
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 0x40383f
jl 0x40382e
cmp dword [ebp - 0x20], esi
ja 0x40383f
cmp byte [ebp + 0x2b], 0
je 0x403842
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x403842
xor esi, esi
inc esi
lea ecx, [ebp - 8]
call fcn.00439cfd
lea ecx, [ebp - 4]
call fcn.00439cfd
lea ecx, [ebp - 0x38]
call fcn.00439cfd
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret