Function at 0x100030f7
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, 0xa0
push ebx
push esi
push edi
push 4
push 2
push str.SeDebugPrivilege
call fcn.10013699
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 - 0x34], ecx
mov ecx, eax
and ecx, 0x18
mov dword [ebp - 0x8c], ecx
mov ecx, eax
and ecx, 0x40
mov edx, eax
mov dword [ebp - 0x84], ecx
mov esi, eax
mov ecx, eax
and eax, 0x200
xor edi, edi
mov dword [ebp - 0x64], 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 - 0x88], edx
mov dword [ebp - 0x14], ecx
je 0x10003178
test byte [eax + 0x2f], 8
je 0x10003178
mov dword [ebp - 0x34], edi
cmp edx, ebx
je 0x1000317f
mov dword [ebp - 0x34], ebx
cmp eax, ebx
je 0x10003193
test byte [eax + 0x2c], 1
je 0x10003193
cmp word [eax + 0x30], bx
jne 0x10003193
mov ecx, edi
jmp 0x10003195
xor ecx, ecx
cmp eax, ebx
je 0x100031a8
test byte [eax + 0x2c], 1
je 0x100031a8
cmp word [eax + 0x30], bx
jne 0x100031a8
mov dword [ebp - 0x34], edi
cmp ecx, ebx
mov dword [ebp - 0x48], 0x100c6d10
jne 0x100031ba
mov dword [ebp - 0x48], 0x100c6a64
lea ecx, [ebp - 0x3c]
call fcn.10046123
cmp dword [ebp + 8], ebx
je 0x100031ec
push 0x100c6cfc
lea ecx, [ebp - 0x3c]
call fcn.100502c8
push dword [ebp + 8]
lea ecx, [ebp - 0x3c]
call fcn.1004618f
push 0x100c6cf8
lea ecx, [ebp - 0x3c]
call fcn.1004618f
cmp esi, ebx
je 0x100031f8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
jmp 0x100031fa
xor eax, eax
cmp eax, ebx
mov dword [ebp - 0x30], eax
je 0x10003213
jmp 0x1000320c
inc eax
inc eax
cmp word [eax], bx
jne 0x10003203
inc eax
inc eax
cmp word [eax], bx
jne 0x10003203
inc eax
inc eax
sub eax, dword [ebp - 0x30]
lea ecx, [ebp - 4]
mov dword [ebp - 0x24], eax
call fcn.10046123
push 0xffffffffffffffff
push 0xffffffffffffffff
push str._nfb__incmd_PECMD_EXEC__InstallService
lea ecx, [ebp - 4]
call fcn.100461de
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0xa000
lea ecx, [ebp - 4]
mov dword [ebp - 0x4c], eax
call fcn.10046168
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ecx, [ebp - 0xc]
mov dword [ebp - 0x80], eax
call fcn.10046123
mov byte [ebp - 5], 0
mov dword [ebp - 0x60], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0xc]
cmp word [eax], bx
mov byte [ebp - 0xa0], 0
sete byte [ebp + 0x2b]
xor eax, eax
lea edi, [ebp - 0x9f]
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 - 0xa0]
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x78]
push eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x7c], 0xc
mov dword [ebp - 0x74], ebx
call fcn.1004276f
pop ecx
inc dword [ebp - 0x58]
test byte [ebp - 0x58], 1
jne 0x100032ff
cmp byte [ebp + 0x2b], 0
jne 0x100032ff
mov esi, dword [ebp - 0x24]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x4c]
add esi, 0x210
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x5c], esi
lea edi, [eax + ecx*2]
call fcn.1004217a
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
jmp 0x1000332a
mov ecx, dword [ebp - 0x4c]
xor eax, eax
cmp byte [ebp + 0x2b], al
push str.PECMD2012.EXESVC
setne al
inc eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
lea eax, [eax + ecx*2]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
pop ecx
mov esi, 0x100000
pop ecx
mov dword [ebp - 0x5c], esi
cmp dword [ebp - 0x14], ebx
jne 0x10003338
cmp dword [ebp - 0x10], ebx
mov byte [ebp + 0x33], 0
je 0x1000333c
mov byte [ebp + 0x33], 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push str.Globalpecmd2012.shm.
lea ecx, [ebp - 0xc]
call fcn.100461de
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 4]
lea eax, [eax + ecx*2]
push eax
lea ecx, [ebp - 0xc]
call fcn.1004618f
add esi, 0x88
mov dword [ebp - 0x38], esi
mov esi, dword [ebp - 0x4c]
push dword [ebp - 0xc]
push ebx
push 6
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov edi, eax
mov dword [ebp - 0x50], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp edi, ebx
jne 0x100033a3
cmp dword [ebp - 0x14], ebx
jne 0x100033ad
cmp dword [ebp - 0x10], 1
je 0x10003486
jmp 0x100033ad
cmp byte [ebp + 0x33], 0
je 0x100034d7
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp byte [ebp + 0x33], 0
je 0x1000344c
cmp dword [ebp - 0x18], ebx
jne 0x10003404
push 0xffffffffffffffff
push str.Globalpecmd2012.lock.
lea ecx, [ebp - 0x54]
call fcn.10050221
mov eax, dword [ebp - 4]
lea eax, [eax + esi*2]
push eax
lea ecx, [ebp - 0x54]
call fcn.1004618f
push dword [ebp - 0x54]
lea eax, [ebp - 0x7c]
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
lea ecx, [ebp - 0x54]
mov dword [ebp - 0x18], eax
call fcn.1003f96c
cmp dword [ebp - 0x18], ebx
je 0x10003486
cmp dword [ebp - 0x28], ebx
jne 0x1000344c
push 0xffffffffffffffff
push str.Globalpecmd2012.event.
lea ecx, [ebp - 0x44]
call fcn.10050221
mov eax, dword [ebp - 4]
lea eax, [eax + esi*2]
push eax
lea ecx, [ebp - 0x44]
call fcn.1004618f
push dword [ebp - 0x44]
lea eax, [ebp - 0x7c]
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, ebx
mov dword [ebp - 0x28], eax
lea ecx, [ebp - 0x44]
jne 0x10003447
call fcn.1003f96c
jmp 0x10003486
call fcn.1003f96c
cmp edi, ebx
jne 0x100034e3
push dword [ebp - 0xc]
lea eax, [ebp - 0x7c]
push dword [ebp - 0x38]
push ebx
push 4
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov edi, eax
mov dword [ebp - 0x50], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp edi, ebx
jne 0x100034cb
cmp dword [ebp - 0x14], ebx
je 0x100034b8
cmp eax, 5
je 0x10003935
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x2c]
cmp eax, 0x7530
jae 0x10003926
xor ebx, ebx
push ebx
push ebx
push 5
mov ecx, 0x100e3108
call fcn.10011621
cmp dword [ebp - 0x14], ebx
jne 0x10003377
jmp 0x100032b8
push ebx
push ebx
push 5
mov ecx, 0x100e3108
call fcn.10011621
jmp 0x100032b8
cmp dword [ebp - 0x14], ebx
jne 0x100034e3
cmp eax, 0xb7
jne 0x100034e3
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100032b8
push dword [ebp - 0x38]
push ebx
push ebx
push 6
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
cmp esi, ebx
je 0x100034d7
mov edi, 0x80
push edi
push ebx
push esi
call fcn.100b40f0
add esp, 0xc
cmp byte [ebp + 0x33], 0
je 0x10003589
push dword [ebp - 0x48]
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 - 0x5c]
jle 0x10003532
mov ebx, dword [ebp - 0x5c]
xor eax, eax
cmp dword [ebp - 0x40], eax
je 0x1000354f
cmp dword [ebp - 0x14], eax
jne 0x1000354f
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 - 0x48]
lea eax, [esi + 0x80]
push eax
call fcn.100144ff
push dword [ebp + 0x28]
lea eax, [edi + esi + 0x80]
push dword [ebp + 0xc]
push eax
call fcn.100144ff
mov dword [esi + 0x18], ebx
and word [esi + ebx + 0x7e], 0
add esp, 0x18
lea edi, [ebx + 0x80]
xor ebx, ebx
cmp dword [ebp - 0x64], ebx
je 0x100035f9
push 0x20a
lea ecx, [ebp + 0x28]
call fcn.10046141
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 - 0x38]
push dword [ebp + 0x28]
sub eax, edi
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ebx, [eax + eax + 2]
cmp ebx, dword [ebp - 0x2c]
jle 0x100035cd
mov ebx, dword [ebp - 0x2c]
test ebx, ebx
jle 0x100035ef
push ebx
push dword [ebp + 0x28]
lea eax, [edi + esi]
push eax
call fcn.100144ff
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.1003f96c
xor ebx, ebx
mov eax, dword [ebp - 0x38]
sub eax, edi
cmp dword [ebp - 0x24], eax
jle 0x10003606
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x30], ebx
je 0x1000362f
cmp dword [ebp - 0x24], 4
jbe 0x1000362f
push dword [ebp - 0x24]
lea eax, [edi + esi]
push dword [ebp - 0x30]
push eax
call fcn.100144ff
mov eax, dword [ebp - 0x24]
add esp, 0xc
add edi, eax
mov dword [edi + esi - 4], ebx
mov dword [esi + 0x20], eax
cmp dword [ebp + 8], ebx
je 0x10003670
mov eax, dword [ebp - 0x38]
push dword [ebp + 8]
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 0x10003651
mov ebx, dword [ebp + 0x28]
test ebx, ebx
jle 0x10003670
push ebx
push dword [ebp + 8]
lea eax, [edi + esi]
push eax
call fcn.100144ff
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 0x100036a8
cmp dword [ebp - 0x28], 0
je 0x100036a8
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp dword [ebp - 0x10], 0
mov edx, 0x100c6c18
jne 0x100036c1
mov edx, 0x100c6a64
cmp dword [ebp - 0x14], 0
mov ecx, 0x100c6c0c
jne 0x100036d1
mov ecx, 0x100c6a64
push dword [ebp + 0xc]
mov ebx, dword [ebp - 0x6c]
push dword [ebp - 0x3c]
mov edi, dword [ebp - 0xc]
push dword [ebp - 0x48]
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, 0x100e3108
mov ecx, edi
call fcn.10002f35
cmp dword [ebp - 0x10], 0
mov dword [ebp - 0x60], eax
mov byte [ebp - 5], 1
jne 0x10003724
cmp dword [ebp - 0x14], 0
jne 0x10003724
and dword [ebp - 0x10], 0
jmp 0x1000374c
mov eax, dword [ebp - 0xc]
add eax, ebx
push eax
push str._wait__s
push dword [ebp - 4]
mov dword [ebp - 0x10], 1
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push dword [ebp - 4]
mov ecx, edi
call fcn.100168c5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x2c], eax
jmp 0x10003774
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x2c]
cmp eax, 0x7530
jae 0x10003785
push 0
push 0
push 1
mov ecx, edi
call fcn.10011621
mov ecx, dword [esi]
cmp ecx, 0xffffffff
mov eax, dword [esi + 4]
mov dword [ebp - 0x70], ecx
jne 0x10003785
cmp eax, ecx
je 0x10003757
cmp dword [ebp - 0x30], 0
je 0x10003794
push dword [ebp - 0x30]
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 - 0x68], edx
mov edx, dword [esi + 0xc]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x64], edx
jl 0x1000385a
jg 0x100037be
test ecx, ecx
jbe 0x1000385a
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 0x100037ee
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 0x1000380c
mov eax, dword [ebp + 0x2c]
test eax, eax
je 0x1000380c
mov ecx, dword [ebp - 0x20]
mov dword [eax + 8], ecx
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
mov esi, dword [ebp - 0x84]
test esi, esi
jne 0x10003823
cmp dword [ebp - 0x34], esi
je 0x10003823
cmp dword [ebp - 0x88], esi
je 0x10003835
push 0x1388
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_WaitForInputIdle]
test esi, esi
jne 0x1000383b
cmp dword [ebp - 0x34], 0
jne 0x1000385a
or esi, dword [ebp - 0x8c]
neg esi
sbb esi, esi
and esi, 0x1220
add esi, 0x168
push esi
push dword [ebp - 0x20]
call fcn.1000306c
xor eax, eax
cmp dword [ebp - 0x40], eax
mov esi, str.0x_X
jne 0x1000388e
cmp dword [ebp - 0x1c], eax
jl 0x1000388e
jg 0x10003872
cmp dword [ebp - 0x20], eax
jbe 0x1000388e
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.1002c0b8
xor eax, eax
cmp dword [ebp - 0x10], eax
jne 0x100038b4
cmp dword [ebp - 0x70], eax
jle 0x100038b4
push dword [ebp - 0x68]
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.1002a91c
xor eax, eax
cmp dword [ebp - 0x40], eax
jne 0x100038e1
cmp dword [ebp - 0x1c], eax
jl 0x100038e1
jg 0x100038c5
cmp dword [ebp - 0x20], eax
jbe 0x100038e1
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.1002a91c
xor eax, eax
cmp dword [ebp - 0x10], eax
jne 0x10003926
mov eax, dword [ebp - 0xc]
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.100168c5
mov eax, dword [ebp - 0xc]
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.100168c5
cmp dword [ebp - 0x50], 0
je 0x10003935
push dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
cmp dword [ebp - 0x28], esi
je 0x10003945
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18], esi
je 0x1000395c
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1c], esi
jg 0x10003979
jl 0x10003968
cmp dword [ebp - 0x20], esi
ja 0x10003979
cmp byte [ebp - 5], 0
je 0x1000397c
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1000397c
xor esi, esi
inc esi
lea ecx, [ebp - 0xc]
call fcn.1003f96c
lea ecx, [ebp - 4]
call fcn.1003f96c
lea ecx, [ebp - 0x3c]
call fcn.1003f96c
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret