Function at 0x4c99ac
Capabilities:
Create process on windows
Delete file
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5120ea
mov eax, dword fs:[0]
push eax
sub esp, 0x828
mov eax, dword [0x5836e0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
xor ebx, ebx
cmp dword [edi + 8], ebx
je 0x4c9a2b
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
push dword [edi + 8]
call esi
cmp eax, 0x102
jne 0x4c9a07
mov ecx, edi
call fcn.004cd635
push 0x9c4
push dword [edi + 8]
call esi
test eax, eax
je 0x4c9a1f
push 0x6d
push 0x563e08
push 0x64
push dword [edi + 8]
call fcn.004e6709
add esp, 0x10
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 8], ebx
mov ecx, edi
call fcn.004cb67a
push 1
lea ecx, [edi + 0x18]
call fcn.004cb654
mov eax, dword [edi + 0x6a8]
test eax, eax
je 0x4c9a53
push eax
call fcn.004e1bea
pop ecx
mov dword [edi + 0x6a8], ebx
mov eax, dword [edi + 0x1c8]
cmp eax, 6
je 0x4c9a67
cmp eax, 5
jne 0x4c9b59
cmp dword [edi + 0x50], ebx
je 0x4c9b59
mov ecx, edi
call fcn.004cdf07
push ebx
push 0x525554
call fcn.004e230a
pop ecx
pop ecx
push dword [edi + 0x50]
mov dword [ebp - 0x834], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 2
lea esi, [eax + 0x10]
push esi
call fcn.004e1c42
push dword [edi + 0x50]
mov ebx, eax
push str._c____s__
push esi
push ebx
call fcn.004e22e7
add esp, 0x18
push 0x524800
push str.ConEmuInUpdate
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp byte [edi + 0x1c4], 0
mov ecx, str.open
mov esi, dword [ebp - 0x834]
mov eax, str.runas
push 2
push 0
push ebx
push esi
cmove eax, ecx
push eax
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp eax, 0x20
jg 0x4c9b41
push eax
push dword [edi + 0x50]
lea eax, [ebp - 0x830]
push str.Failed_to_start_update_batch_n_s_nError_code_i
push eax
call fcn.0040111a
push 0
push 0
push 0x5242d0
lea eax, [ebp - 0x830]
push 0x1010
push eax
call fcn.00421ef1
add esp, 0x24
push dword [edi + 0x50]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [edi + 0x28]
test eax, eax
je 0x4c9b38
cmp byte [eax + 0x38], 0
jne 0x4c9b41
push dword [edi + 0x4c]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test esi, esi
je 0x4c9b4c
push esi
call fcn.004e1bea
pop ecx
test ebx, ebx
je 0x4c9b57
push ebx
call fcn.004e1bea
pop ecx
xor ebx, ebx
cmp dword [edi + 0x50], 0
je 0x4c9b6b
push dword [edi + 0x50]
call fcn.004e1bea
pop ecx
mov dword [edi + 0x50], ebx
cmp dword [edi + 0x4c], 0
je 0x4c9b7d
push dword [edi + 0x4c]
call fcn.004e1bea
pop ecx
mov dword [edi + 0x4c], ebx
mov esi, dword [edi + 0x28]
test esi, esi
je 0x4c9b98
mov ecx, esi
call fcn.004ce020
push 0x40
push esi
call fcn.004ef54a
pop ecx
pop ecx
mov dword [edi + 0x28], ebx
lea eax, [edi + 0x38]
push eax
call fcn.0040991d
cmp dword [edi + 0x3c], 0
pop ecx
je 0x4c9bb4
push dword [edi + 0x3c]
call fcn.004e1bea
pop ecx
mov dword [edi + 0x3c], ebx
lea ecx, [edi + 0x168]
call fcn.004e25e0
lea ecx, [edi + 0x10c]
call fcn.004e25e0
lea ecx, [edi + 0xb0]
call fcn.004e25e0
lea ecx, [edi + 0x54]
call fcn.004e25e0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004f4166
leave
ret