Function at 0x404160
Capabilities:
Create process on windows
Get process heap flags
Get process heap force flags
Terminate process

Disassembly:
sub esp, 0x400
mov eax, dword [0x50f130]
xor eax, esp
mov dword [esp + 0x3fc], eax
push ebx
push ebp
push 0x5152b8
mov ebx, ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor ebp, ebp
cmp dword [0x5154bc], ebp
jne 0x404383
push esi
push edi
mov dword [0x5154bc], 1
mov dword [esp + 0x10], ebp
mov eax, dword fs:[0x18]
mov dword [esp + 0x10], eax
mov eax, dword [0x5154b8]
mov ecx, dword [esp + 0x10]
mov dword [eax + 0x20], ecx
mov edx, dword [0x5154b8]
mov dword [edx + 0x34c], ebx
mov edi, dword [0x5154b8]
mov esi, dword [ebx]
add edi, 0x30
mov ecx, 0x14
rep movsd dword es:[edi], dword [esi]
mov edi, dword [0x5154b8]
mov esi, dword [ebx + 4]
add edi, 0x80
mov ecx, 0xb3
rep movsd dword es:[edi], dword [esi]
mov eax, dword [0x5154b8]
mov dword [eax + 0x5f4], ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x5154b8]
push 0x206
lea edx, [esp + 0x20a]
push ebp
mov dword [ecx + 0x18], eax
push edx
mov word [esp + 0x210], bp
call fcn.004be320
push 0x18e
lea eax, [esp + 0x86]
push ebp
push eax
mov word [esp + 0x8c], bp
call fcn.004be320
add esp, 0x18
push ebp
push ebp
mov edi, 1
push edi
lea ecx, [esp + 0x30]
push ecx
mov dword [esp + 0x34], 0xc
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], edi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push 0x40
lea edx, [esp + 0x38]
push ebp
push edx
mov esi, eax
mov dword [esp + 0x3c], 0x44
call fcn.004be320
mov ecx, dword [0x515618]
add esp, 0xc
xor eax, eax
push ebp
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
lea eax, [esp + 0x208]
push eax
push 0x104
push ebp
push str.bugreport.exe
push ecx
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x74], edi
mov word [esp + 0x78], di
call dword [sym.imp.KERNEL32.dll_SearchPathW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call ebx
push eax
push edi
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
mov eax, dword [0x5154c0]
cmp eax, ebp
je 0x4042d9
call eax
cmp edi, ebp
je 0x40435b
cmp esi, ebp
je 0x40435b
cmp word [esp + 0x204], bp
je 0x40435b
call ebx
mov edx, dword [0x5154b8]
push eax
push edx
push edi
push esi
push str.bugreport__buginfo:_p:_p:_p:_lu
lea eax, [esp + 0x88]
push 0xc8
push eax
call fcn.004b946c
add esp, 0x1c
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x34]
push edx
push ebp
push ebp
push ebp
push 1
push ebp
push ebp
lea eax, [esp + 0x94]
push eax
lea ecx, [esp + 0x228]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x40435b
mov edx, dword [esp + 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
mov eax, dword [esp + 0x18]
push eax
call edi
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x404361
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call edi
mov eax, dword [0x5154c4]
cmp eax, ebp
pop edi
pop esi
je 0x404371
call eax
push 0x1234
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, dword [esp + 0x404]
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.004b84de
add esp, 0x400
ret