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

Disassembly:
push ebp
lea ebp, [esp - 0x388]
sub esp, 0x408
mov eax, dword [0x404008]
xor eax, ebp
mov dword [ebp + 0x384], eax
push ebx
push 0x404020
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor ebx, ebx
cmp dword [0x40403c], ebx
jne 0x401256
push esi
push edi
mov dword [0x40403c], 1
mov dword [ebp - 0x1c], ebx
mov eax, dword fs:[0x18]
mov dword [ebp - 0x1c], eax
mov eax, dword [0x404038]
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0x20], ecx
mov ecx, dword [0x404038]
mov eax, dword [ebp + 0x390]
mov dword [ecx + 0x34c], eax
mov edi, dword [0x404038]
mov esi, dword [eax]
add edi, 0x30
push 0x14
pop ecx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [0x404038]
mov esi, dword [eax + 4]
add edi, 0x80
mov ecx, 0xb3
rep movsd dword es:[edi], dword [esi]
mov eax, dword [0x404038]
mov ecx, dword [ebp + 0x394]
mov dword [eax + 0x5f4], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x404038]
mov dword [ecx + 0x18], eax
push 0x206
lea eax, [ebp - 0x12]
push ebx
push eax
mov word [ebp - 0x14], bx
call sub.MSVCR80.dll_memset
push 0x18e
lea eax, [ebp + 0x1f6]
push ebx
push eax
mov word [ebp + 0x1f4], bx
call sub.MSVCR80.dll_memset
add esp, 0x18
push ebx
xor esi, esi
push ebx
inc esi
push esi
lea eax, [ebp - 0x2c]
push eax
mov dword [ebp - 0x2c], 0xc
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], esi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push 0x40
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x7c]
push ebx
push eax
mov dword [ebp - 0x80], 0x44
call sub.MSVCR80.dll_memset
xor eax, eax
mov dword [ebp - 0x3c], ebx
lea edi, [ebp - 0x38]
stosd dword es:[edi], eax
add esp, 0xc
stosd dword es:[edi], eax
push ebx
stosd dword es:[edi], eax
lea eax, [ebp - 0x14]
push eax
push 0x104
push ebx
push str.bugreport.exe
push ebx
mov dword [ebp - 0x54], esi
mov word [ebp - 0x50], si
call dword [sym.imp.KERNEL32.dll_SearchPathW]
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call edi
push eax
push esi
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x20], eax
mov eax, dword [0x404040]
cmp eax, ebx
je 0x4011b5
call eax
cmp dword [ebp - 0x20], ebx
je 0x40122e
cmp dword [ebp - 0x18], ebx
je 0x40122e
cmp word [ebp - 0x14], bx
je 0x40122e
call edi
push eax
push dword [0x404038]
lea eax, [ebp + 0x1f4]
push dword [ebp - 0x20]
push dword [ebp - 0x18]
push str.bugreport__buginfo:_p:_p:_p:_lu
push 0xffffffffffffffff
push 0xc8
push eax
call dword [sym.imp.MSVCR80.dll__snwprintf_s]
add esp, 0x20
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x80]
push eax
push ebx
push ebx
push ebx
push esi
push ebx
push ebx
lea eax, [ebp + 0x1f4]
push eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x40122e
push dword [ebp - 0x3c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x38]
call esi
push 0xffffffffffffffff
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x404044]
cmp eax, ebx
pop edi
pop esi
je 0x401244
call eax
push 0x1234
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, dword [ebp + 0x384]
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00401da8
add ebp, 0x388
leave
ret