Function at 0x4387c4
Capabilities:
Create a process with modified i/o handles and window
Create process on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffd10
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x2f0], ebx
mov dword [ebp - 0x2ec], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 8], ecx
mov edi, edx
mov dword [ebp - 4], eax
mov ebx, dword [ebp + 0x1c]
mov eax, dword [ebp - 4]
call sub.rtl70.bpl__System__LStrAddRef_qqrpv
lea eax, [ebp - 0x140]
mov edx, dword [0x4382b4]
call sub.rtl70.bpl__System__InitializeRecord_qqrpvt1
lea eax, [ebp - 0x260]
mov edx, dword [0x4382b4]
call sub.rtl70.bpl__System__InitializeRecord_qqrpvt1
xor eax, eax
push ebp
push 0x438e79
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 0xffffffff
mov dword [ebp - 0x2c0], 0xc
xor eax, eax
mov dword [ebp - 0x2bc], eax
mov dword [ebp - 0x2b8], 0xffffffff
mov edx, dword [0x4382b4]
lea eax, [ebp - 0x140]
call sub.rtl70.bpl__System__FinalizeRecord_qqrpvt1
mov edx, 0x120
call sym.P_Interface.bpl__Jclsysutils_ResetMemory_qqrpvi
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x2c], eax
mov al, byte [ebp + 0x20]
mov byte [ebp - 0x28], al
push 0
lea ecx, [ebp - 0x2c0]
lea edx, [ebp - 0x13c]
lea eax, [ebp - 0x140]
call fcn.00438644
test eax, eax
jne 0x43889e
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0xc], eax
jmp 0x438e2f
push 0
push 0
push 0
lea ecx, [ebp - 0x2c0]
mov dl, 1
mov eax, dword [sym.P_Interface.bpl__Jclsynch_TJclEvent_]
call sym.P_Interface.bpl__Jclsynch_TJclEvent__bctr_qqrp20_SECURITY_ATTRIBUTESoox17System_AnsiString
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x260]
mov edx, dword [0x4382b4]
call sub.rtl70.bpl__System__FinalizeRecord_qqrpvt1
mov edx, 0x120
call sym.P_Interface.bpl__Jclsysutils_ResetMemory_qqrpvi
mov eax, ebx
xor al, 1
test al, al
je 0x438963
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x150], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x14c], eax
mov al, byte [ebp + 0xc]
mov byte [ebp - 0x148], al
push 0
lea ecx, [ebp - 0x2c0]
lea edx, [ebp - 0x25c]
lea eax, [ebp - 0x260]
call fcn.00438644
test eax, eax
jne 0x438945
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x13c]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x140]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x24]
call sub.rtl70.bpl__System_TObject_Free_qqrv
jmp 0x438e2f
push 0
push 0
push 0
lea ecx, [ebp - 0x2c0]
mov dl, 1
mov eax, dword [sym.P_Interface.bpl__Jclsynch_TJclEvent_]
call sym.P_Interface.bpl__Jclsynch_TJclEvent__bctr_qqrp20_SECURITY_ATTRIBUTESoox17System_AnsiString
mov dword [ebp - 0x144], eax
lea eax, [ebp - 0x2a4]
mov edx, 0x44
call sym.P_Interface.bpl__Jclsysutils_ResetMemory_qqrpvi
mov dword [ebp - 0x2a4], 0x44
mov dword [ebp - 0x278], 0x101
mov word [ebp - 0x274], 0
push 0xfffffffffffffff6
call sub.kernel32.dll_GetStdHandle
mov dword [ebp - 0x26c], eax
mov eax, dword [ebp - 0x13c]
mov dword [ebp - 0x268], eax
test bl, bl
je 0x4389b5
mov dword [ebp - 0x264], eax
jmp 0x4389c1
mov eax, dword [ebp - 0x25c]
mov dword [ebp - 0x264], eax
lea eax, [ebp - 4]
call sub.rtl70.bpl__System_UniqueString_qqrr17System_AnsiString
xor eax, eax
mov dword [ebp - 0x2ac], eax
xor eax, eax
mov dword [ebp - 0x10], eax
xor edx, edx
push ebp
push 0x438d64
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 0x2b4]
push eax
lea eax, [ebp - 0x2a4]
push eax
push 0
push 0
xor eax, eax
mov al, byte [ebp + 8]
mov eax, dword [eax*4 + 0x6d2934]
push eax
push 0xffffffffffffffff
push 0
push 0
mov eax, dword [ebp - 4]
call sub.rtl70.bpl__System__LStrToPChar_qqrx17System_AnsiString
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
je 0x438c9f
xor edx, edx
push ebp
push 0x438c5d
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 0x13c]
push eax
call sub.kernel32.dll_CloseHandle
xor eax, eax
mov dword [ebp - 0x13c], eax
mov eax, ebx
xor al, 1
test al, al
je 0x438a5f
mov eax, dword [ebp - 0x25c]
push eax
call sub.kernel32.dll_CloseHandle
xor eax, eax
mov dword [ebp - 0x25c], eax
mov byte [ebp - 0x15], 0
test edi, edi
je 0x438a6c
mov byte [edi], 0
jmp 0x438a6f
lea edi, [ebp - 0x15]
mov ecx, dword [ebp - 0x2b4]
mov dl, 1
mov eax, dword [sym.P_Interface.bpl__Jclsynch_TJclDispatcherObject_]
call sym.P_Interface.bpl__Jclsynch_TJclDispatcherObject__bctr_qqrui
mov dword [ebp - 0x10], eax
push 2
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x43879c]
call sub.rtl70.bpl__System__DynArraySetLength_qqrv
add esp, 4
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov dword [eax], edx
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x24]
mov dword [eax + 4], edx
mov eax, ebx
xor al, 1
test al, al
je 0x438ad9
push 3
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x43879c]
call sub.rtl70.bpl__System__DynArraySetLength_qqrv
add esp, 4
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x144]
mov dword [eax + 8], edx
cmp dword [ebp - 8], 0
je 0x438b14
mov eax, dword [ebp - 8]
call sym.P_Interface.bpl__Jclsynch_TJclEvent_ResetEvent_qqrv
mov eax, dword [ebp - 0x14]
call sub.rtl70.bpl__System__DynArrayLength_qqrv
mov esi, eax
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x43879c]
call sub.rtl70.bpl__System__DynArraySetLength_qqrv
add esp, 4
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 8]
mov dword [eax + esi*4], edx
lea eax, [ebp - 0x2d4]
mov edx, 0x14
call sym.P_Interface.bpl__Jclsysutils_ResetMemory_qqrpvi
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 8]
mov dword [ebp - 0x2c4], eax
lea edx, [ebp - 0x2d4]
lea eax, [ebp - 0x140]
call fcn.00438524
mov eax, ebx
xor al, 1
test al, al
je 0x438bec
lea eax, [ebp - 0x2e8]
mov edx, 0x14
call sym.P_Interface.bpl__Jclsysutils_ResetMemory_qqrpvi
mov eax, dword [ebp - 0x144]
mov eax, dword [eax + 8]
mov dword [ebp - 0x2d8], eax
lea edx, [ebp - 0x2e8]
lea eax, [ebp - 0x260]
call fcn.00438524
jmp 0x438bec
push 0xffffffffffffffff
mov eax, dword [ebp - 0x14]
call sub.rtl70.bpl__System__DynArrayHigh_qqrv
mov edx, eax
xor ecx, ecx
mov eax, dword [ebp - 0x14]
call sym.P_Interface.bpl__Jclsynch_WaitAlertableForMultipleObjects_qqrppx29Jclsynch_TJclDispatcherObjectxioui
mov esi, eax
test esi, esi
je 0x438bf1
cmp esi, 1
jne 0x438bb3
lea edx, [ebp - 0x2d4]
lea eax, [ebp - 0x140]
call fcn.00438570
jmp 0x438bec
cmp esi, 2
jne 0x438bcf
test bl, bl
jne 0x438bcf
lea edx, [ebp - 0x2e8]
lea eax, [ebp - 0x260]
call fcn.00438570
jmp 0x438bec
cmp esi, 2
sete al
test al, bl
jne 0x438be2
cmp esi, 3
jne 0x438be7
test bl, bl
jne 0x438be7
mov byte [edi], 1
jmp 0x438bec
call sub.rtl70.bpl__Sysutils_RaiseLastOSError_qqrv
cmp byte [edi], 0
je 0x438b7f
cmp byte [edi], 0
je 0x438c07
push 0x4c7
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
push eax
call sub.kernel32.dll_TerminateProcess
mov eax, dword [ebp - 0x2b0]
push eax
call sub.kernel32.dll_CloseHandle
xor eax, eax
mov dword [ebp - 0x2b0], eax
cmp dword [ebp - 0x140], 0
je 0x438c35
lea edx, [ebp - 0x2d4]
lea eax, [ebp - 0x140]
call fcn.004385c4
test bl, bl
jne 0x438c53
cmp dword [ebp - 0x260], 0
je 0x438c53
lea edx, [ebp - 0x2e8]
lea eax, [ebp - 0x260]
call fcn.004385c4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x438c9f
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x438d6e
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x1c], eax
xor edx, edx
push ebp
push 0x438d5c
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 0x140]
test eax, eax
je 0x438cd2
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x13c]
test eax, eax
je 0x438ce2
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x260]
test eax, eax
je 0x438cf2
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x25c]
test eax, eax
je 0x438d02
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x2b0]
test eax, eax
je 0x438d12
push eax
call sub.kernel32.dll_CloseHandle
cmp dword [ebp - 0x10], 0
je 0x438d22
mov eax, dword [ebp - 0x10]
call sub.rtl70.bpl__System_TObject_Free_qqrv
jmp 0x438d32
mov eax, dword [ebp - 0x2b4]
test eax, eax
je 0x438d32
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x24]
call sub.rtl70.bpl__System_TObject_Free_qqrv
mov eax, dword [ebp - 0x144]
call sub.rtl70.bpl__System_TObject_Free_qqrv
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x438d63
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_SetLastError
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x438e80
lea eax, [ebp - 0x2f0]
mov edx, 2
call sub.rtl70.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 0x260]
mov edx, dword [0x4382b4]
mov ecx, 2
call sub.rtl70.bpl__System__FinalizeArray_qqrpvt1ui
lea eax, [ebp - 0x14]
mov edx, dword [0x43879c]
call sub.rtl70.bpl__System__DynArrayClear_qqrrpvpv
lea eax, [ebp - 4]
call sub.rtl70.bpl__System__LStrClr_qqrpv
ret