Function at 0x495790
Capabilities:
Create pipe
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x5831a8
push fcn.004e1840
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x589780]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x34], eax
mov byte [ebp - 0x2d], 0
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call esi
mov ebx, eax
call esi
mov edi, eax
call esi
push 2
push 0
push 0
lea ecx, [ebp - 0x3c]
push ecx
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x49580a
push 0x100040
push dword [ebp - 0x3c]
call fcn.00406c21
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x34]
push ebx
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
call esi
add eax, 0x20
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
mov dword [ebp - 0x34], edi
push ebx
call esi
add eax, 0x20
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x38], eax
mov dword [ebp - 4], 0
push ebx
push edi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
call esi
push 0x10
lea eax, [ebp - 0x2c]
push eax
push 0x5659c4
call fcn.0040a290
push eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
call edi
push dword [ebp - 0x34]
push dword [ebp - 0x38]
call esi
push 0x10
lea eax, [ebp - 0x2c]
push eax
push 0x5659b0
call fcn.0040a290
push eax
mov esi, dword [ebp - 0x34]
push esi
call edi
push 0x10
lea eax, [ebp - 0x2c]
push eax
push 0x5659c0
call fcn.0040a290
push eax
push dword [ebp - 0x38]
call edi
push esi
call fcn.00408ff8
mov dword [ebp - 0x44], eax
test eax, eax
je 0x4959c0
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x14c
push dword [ebp - 0x38]
call fcn.00402806
mov edi, eax
mov dword [ebp - 4], 1
test edi, edi
je 0x4959b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4959ad
push 0
push 0
push 0
push 0xf001f
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
mov dword [ebp - 0x40], esi
test esi, esi
je 0x4959ad
mov byte [ebp - 0x2d], 1
push 0x14c
push 0
push esi
call fcn.004052e0
add esp, 0xc
push 0
call fcn.00403aa3
push eax
lea eax, [esi + 0xc]
push eax
lea eax, [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
mov dword [esi], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [esi + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 0x14]
mov dword [esi + 0x18], eax
mov eax, dword [ebp + 0x18]
mov dword [esi + 0x1c], eax
mov ecx, esi
sub ecx, ebx
mov al, byte [ebx]
mov byte [ecx + ebx + 0x28], al
lea ebx, [ebx + 1]
test al, al
jne 0x495952
push 0x14c
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, 0x53
mov edi, eax
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x48]
push ecx
push 0
push eax
push 0x497830
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, dword [ebp - 0x40]
mov dword [esi + 0x24], eax
push 7
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov dword [esi + 0x12c], 0
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x4959b4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0
call fcn.004959eb
mov dword [ebp - 4], 0xfffffffe
call fcn.004959fd
mov al, byte [ebp - 0x2d]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0040512d
mov esp, ebp
pop ebp
ret