Function at 0x402ea0
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 0x4a69e8
call fcn.004119f4
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 0x402f1e
test byte [eax + 0x2f], 8
je 0x402f1e
mov dword [ebp - 0x30], edi
cmp edx, ebx
je 0x402f25
mov dword [ebp - 0x30], ebx
cmp eax, ebx
je 0x402f39
test byte [eax + 0x2c], 1
je 0x402f39
cmp word [eax + 0x30], bx
jne 0x402f39
mov ecx, edi
jmp 0x402f3b
xor ecx, ecx
cmp eax, ebx
je 0x402f4e
test byte [eax + 0x2c], 1
je 0x402f4e
cmp word [eax + 0x30], bx
jne 0x402f4e
mov dword [ebp - 0x30], edi
cmp ecx, ebx
mov dword [ebp - 0x44], 0x4a6c3c
jne 0x402f60
mov dword [ebp - 0x44], 0x4a69d4
lea ecx, [ebp - 0x38]
call fcn.0043dd7e
cmp dword [ebp + 8], ebx
je 0x402f92
push 0x4a6c28
lea ecx, [ebp - 0x38]
call fcn.0044655b
push dword [ebp + 8]
lea ecx, [ebp - 0x38]
call fcn.0043ddea
push 0x4a6c24
lea ecx, [ebp - 0x38]
call fcn.0043ddea
cmp esi, ebx
je 0x402fa0
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentStringsW]
mov ecx, eax
jmp 0x402fa2
xor ecx, ecx
cmp ecx, ebx
mov dword [ebp - 0x34], ecx
mov eax, ecx
je 0x402fc0
cmp word [ecx], bx
je 0x402fbe
inc eax
inc eax
cmp word [eax], bx
jne 0x402fb0
inc eax
inc eax
cmp word [eax], bx
jne 0x402fb0
inc eax
inc eax
sub eax, ecx
lea ecx, [ebp - 4]
mov dword [ebp - 0x24], eax
call fcn.0043dd7e
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0x4a6bf8
lea ecx, [ebp - 4]
call fcn.0043de39
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
push 0xa000
lea ecx, [ebp - 4]
mov dword [ebp - 0x3c], eax
call fcn.0043ddc3
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
lea ecx, [ebp - 8]
mov dword [ebp - 0x80], eax
call fcn.0043dd7e
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.0043a99f
pop ecx
inc dword [ebp - 0x54]
test byte [ebp - 0x54], 1
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 4]
je 0x40308b
lea eax, [eax + ecx*2]
push 0x4a6bd4
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 0x4030bc
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.0043a2d5
push edx
push eax
push dword [ebp - 0x80]
push 0x4a6bc0
push 0x4a6b98
push edi
call dword [sym.imp.USER32.DLL_wsprintfW]
add esp, 0x18
cmp dword [ebp - 0x10], 0
jne 0x4030cc
cmp dword [ebp - 0xc], 0
mov byte [ebp + 0x33], 0
je 0x4030d0
mov byte [ebp + 0x33], 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0x4a6b80
lea ecx, [ebp - 8]
call fcn.0043de39
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.0043ddea
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 0x403135
cmp dword [ebp - 0x10], edi
jne 0x40313f
cmp dword [ebp - 0xc], edi
jne 0x40321b
jmp 0x40313f
cmp byte [ebp + 0x33], 0
je 0x40324d
push edi
call dword [sym.imp.KERNEL32.DLL_SetLastError]
cmp byte [ebp + 0x33], 0
je 0x4031e4
cmp dword [ebp - 0x14], edi
jne 0x403199
push 0xffffffffffffffff
push 0x4a6b68
lea ecx, [ebp - 0x58]
call fcn.004464cd
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x3c]
lea eax, [eax + ecx*2]
push eax
lea ecx, [ebp - 0x58]
call fcn.0043ddea
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.00437e1a
cmp dword [ebp - 0x14], edi
je 0x40321b
cmp dword [ebp - 0x2c], edi
jne 0x4031e4
push 0xffffffffffffffff
push 0x4a6b50
lea ecx, [ebp - 0x48]
call fcn.004464cd
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x3c]
lea eax, [eax + ecx*2]
push eax
lea ecx, [ebp - 0x48]
call fcn.0043ddea
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 0x4031df
call fcn.00437e1a
jmp 0x40321b
call fcn.00437e1a
cmp esi, edi
jne 0x40327d
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 0x403263
cmp dword [ebp - 0x10], edi
je 0x403250
cmp eax, 5
je 0x4036cf
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
sub eax, dword [ebp - 0x28]
cmp eax, 0x7530
jae 0x4036c0
xor edi, edi
push edi
push edi
push 5
mov ecx, 0x4c0fb8
call fcn.00413b53
cmp dword [ebp - 0x10], edi
jne 0x40310a
jmp 0x40305a
push esi
jmp 0x403272
push edi
push edi
push 5
mov ecx, 0x4c0fb8
call fcn.00413b53
jmp 0x40305a
cmp dword [ebp - 0x10], edi
jne 0x40327d
cmp eax, 0xb7
jne 0x40327d
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x40305a
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 0x40326f
mov edi, 0x80
push edi
push 0
push esi
call fcn.00492e00
add esp, 0xc
cmp byte [ebp + 0x33], 0
je 0x403325
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 0x4032cd
mov ebx, dword [ebp - 0x50]
xor eax, eax
cmp dword [ebp - 0x40], eax
je 0x4032ea
cmp dword [ebp - 0x10], eax
jne 0x4032ea
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.004128b6
push dword [ebp + 0x28]
lea eax, [edi + esi + 0x80]
push dword [ebp + 0xc]
push eax
call fcn.004128b6
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 0x403397
push 0x20a
lea ecx, [ebp + 0x28]
call fcn.0043dd9c
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 0x40336a
mov ebx, dword [ebp - 0x28]
test ebx, ebx
jle 0x40338c
push ebx
push dword [ebp + 0x28]
lea eax, [edi + esi]
push eax
call fcn.004128b6
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.00437e1a
mov ebx, dword [ebp - 0x4c]
mov eax, ebx
sub eax, edi
cmp dword [ebp - 0x24], eax
jle 0x4033a3
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x34], 0
je 0x4033ce
cmp dword [ebp - 0x24], 4
jbe 0x4033ce
push dword [ebp - 0x24]
lea eax, [edi + esi]
push dword [ebp - 0x34]
push eax
call fcn.004128b6
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 0x40340d
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 0x4033ee
mov ebx, dword [ebp + 0x28]
test ebx, ebx
jle 0x40340d
push ebx
push dword [ebp + 8]
lea eax, [edi + esi]
push eax
call fcn.004128b6
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 0x403445
cmp dword [ebp - 0x2c], 0
je 0x403445
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, 0x4a6b44
jne 0x40345e
mov edx, 0x4a69d4
cmp dword [ebp - 0x10], 0
mov ecx, 0x4a6b38
jne 0x40346e
mov ecx, 0x4a69d4
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 0x4a6af8
push eax
call dword [sym.imp.USER32.DLL_wsprintfW]
add esp, 0x20
push dword [ebp - 4]
mov edi, 0x4c0fb8
mov ecx, edi
call fcn.00402d14
cmp dword [ebp - 0xc], 0
mov dword [ebp - 0x5c], eax
mov byte [ebp + 0x2b], 1
jne 0x4034c1
cmp dword [ebp - 0x10], 0
jne 0x4034c1
and dword [ebp - 0xc], 0
jmp 0x4034e9
mov eax, dword [ebp - 8]
add eax, ebx
push eax
push 0x4a6ae4
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.00413eae
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov dword [ebp - 0x28], eax
jmp 0x403511
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
sub eax, dword [ebp - 0x28]
cmp eax, 0x7530
jae 0x403522
push 0
push 0
push 1
mov ecx, edi
call fcn.00413b53
mov ecx, dword [esi]
cmp ecx, 0xffffffff
mov eax, dword [esi + 4]
mov dword [ebp - 0x6c], ecx
jne 0x403522
cmp eax, ecx
je 0x4034f4
cmp dword [ebp - 0x34], 0
je 0x403531
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 0x4035f4
jg 0x40355b
test ecx, ecx
jbe 0x4035f4
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 0x40358b
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 0x4035a9
mov eax, dword [ebp + 0x2c]
test eax, eax
je 0x4035a9
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 0x4035c0
cmp dword [ebp - 0x30], esi
je 0x4035c0
cmp dword [ebp - 0x84], esi
je 0x4035d2
push 0x1388
push dword [ebp + 8]
call dword [sym.imp.USER32.DLL_WaitForInputIdle]
test esi, esi
jne 0x4035d8
cmp dword [ebp - 0x30], 0
jne 0x4035f4
or esi, dword [ebp - 0x7c]
neg esi
sbb esi, esi
and esi, 0x1220
add esi, 0x168
push esi
push dword [ebp - 0x20]
call fcn.00402e15
xor eax, eax
cmp dword [ebp - 0x40], eax
mov esi, 0x4a6ad8
jne 0x403628
cmp dword [ebp - 0x1c], eax
jl 0x403628
jg 0x40360c
cmp dword [ebp - 0x20], eax
jbe 0x403628
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.00425e9f
xor eax, eax
cmp dword [ebp - 0xc], eax
jne 0x40364e
cmp dword [ebp - 0x6c], eax
jle 0x40364e
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.00416871
xor eax, eax
cmp dword [ebp - 0x40], eax
jne 0x40367b
cmp dword [ebp - 0x1c], eax
jl 0x40367b
jg 0x40365f
cmp dword [ebp - 0x20], eax
jbe 0x40367b
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.00416871
xor eax, eax
cmp dword [ebp - 0xc], eax
jne 0x4036c0
mov eax, dword [ebp - 8]
mov esi, dword [sym.imp.USER32.DLL_wsprintfW]
add eax, ebx
push eax
push 0x4a6ac4
push dword [ebp - 4]
call esi
add esp, 0xc
push dword [ebp - 4]
mov ecx, edi
call fcn.00413eae
mov eax, dword [ebp - 8]
add ebx, eax
push ebx
push 0x4a6aac
push dword [ebp - 4]
call esi
add esp, 0xc
push dword [ebp - 4]
mov ecx, edi
call fcn.00413eae
cmp dword [ebp - 0x18], 0
je 0x4036cf
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor esi, esi
cmp dword [ebp - 0x2c], esi
je 0x4036df
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp dword [ebp - 0x14], esi
je 0x4036f6
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 0x403713
jl 0x403702
cmp dword [ebp - 0x20], esi
ja 0x403713
cmp byte [ebp + 0x2b], 0
je 0x403716
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.DLL_SetLastError]
jmp 0x403716
xor esi, esi
inc esi
lea ecx, [ebp - 8]
call fcn.00437e1a
lea ecx, [ebp - 4]
call fcn.00437e1a
lea ecx, [ebp - 0x38]
call fcn.00437e1a
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret