Function at 0x595310
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x14
push 0
push 0
dec ecx
jne 0x595318
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x5959c0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov byte [eax + 0xf], 1
push 0
call sub.ole32.dll_CoInitialize
mov eax, dword [ebp - 4]
cmp dword [eax + 0x40], 0
jne 0x5956d0
xor ecx, ecx
mov dl, 1
mov eax, dword [sym.imp.adortl70.bpl__Adodb_TADOQuery_]
call sub.adortl70.bpl__Adodb_TADOQuery__bctr_qqrp18Classes_TComponent
mov dword [ebp - 0xc], eax
xor ecx, ecx
mov dl, 1
mov eax, dword [sym.imp.adortl70.bpl__Adodb_TADOQuery_]
call sub.adortl70.bpl__Adodb_TADOQuery__bctr_qqrp18Classes_TComponent
mov dword [ebp - 0x10], eax
xor ecx, ecx
mov dl, 1
mov eax, dword [sym.imp.adortl70.bpl__Adodb_TADOConnection_]
call sub.adortl70.bpl__Adodb_TADOConnection__bctr_qqrp18Classes_TComponent
mov dword [ebp - 0x24], eax
mov dl, 1
mov eax, dword [sym.imp.rtl70.bpl__Classes_TStringList_]
call sub.rtl70.bpl__System_TObject__bctr_qqrv
mov dword [ebp - 0x28], eax
xor edx, edx
push ebp
push 0x5956c9
push dword fs:[edx]
mov dword fs:[edx], esp
xor edx, edx
push ebp
push 0x59566d
push dword fs:[edx]
mov dword fs:[edx], esp
lea edx, [ebp - 0x3c]
mov eax, dword [sym.P_Interface.bpl__Publicutil_ADOConn]
mov eax, dword [eax]
call sub.adortl70.bpl__Adodb_TADOConnection_GetConnectionString_qqrv
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x24]
call sub.adortl70.bpl__Adodb_TADOConnection_SetConnectionString_qqrx17System_WideString
mov eax, dword [ebp - 0x24]
mov byte [eax + 0x3c], 0
mov dl, 1
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
call dword [ecx + 0x48]
mov eax, dword [ebp - 0x24]
call fcn.00594704
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x26c]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
call dword [ecx + 0x26c]
mov eax, dword [ebp - 0x10]
call sub.adortl70.bpl__Adodb_TADOQuery_GetSQL_qqrv
mov edx, 0x5959d8
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebp - 0x10]
call sub.dbrtl70.bpl__Db_TDataSet_Open_qqrv
lea eax, [ebp - 0x14]
call sub.rtl70.bpl__System__LStrClr_qqrpv
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
mov edx, dword [eax]
call dword [edx + 0x14c]
mov ebx, eax
dec ebx
test ebx, ebx
jl 0x595538
inc ebx
mov eax, dword [ebp - 0xc]
call sub.dbrtl70.bpl__Db_TDataSet_Close_qqrv
mov eax, dword [ebp - 0xc]
call sub.adortl70.bpl__Adodb_TADOQuery_GetSQL_qqrv
mov edx, dword [eax]
call dword [edx + 0x44]
mov eax, dword [ebp - 0x24]
call sym.P_Interface.bpl__Publicutil_CheckDataBaseType_qqrp20Adodb_TADOConnection
cmp al, 2
jne 0x5954a1
push 0x5959f4
mov edx, 0x595a10
mov eax, dword [ebp - 0x10]
call sub.dbrtl70.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
lea edx, [ebp - 0x44]
mov ecx, dword [eax]
call dword [ecx + 0x60]
push dword [ebp - 0x44]
push 0x595a1c
lea eax, [ebp - 0x40]
mov edx, 3
call sub.rtl70.bpl__System__LStrCatN_qqrv
mov eax, dword [ebp - 0x40]
push eax
mov eax, dword [ebp - 0xc]
call sub.adortl70.bpl__Adodb_TADOQuery_GetSQL_qqrv
pop edx
mov ecx, dword [eax]
call dword [ecx + 0x38]
jmp 0x5954e2
push 0x595a5c
mov edx, 0x595a10
mov eax, dword [ebp - 0x10]
call sub.dbrtl70.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
lea edx, [ebp - 0x4c]
mov ecx, dword [eax]
call dword [ecx + 0x60]
push dword [ebp - 0x4c]
push 0x595a7c
lea eax, [ebp - 0x48]
mov edx, 3
call sub.rtl70.bpl__System__LStrCatN_qqrv
mov eax, dword [ebp - 0x48]
push eax
mov eax, dword [ebp - 0xc]
call sub.adortl70.bpl__Adodb_TADOQuery_GetSQL_qqrv
pop edx
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebp - 0xc]
call sub.dbrtl70.bpl__Db_TDataSet_Open_qqrv
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
call dword [edx + 0x14c]
test eax, eax
jle 0x595529
mov edx, 0x595ab0
mov eax, dword [ebp - 0xc]
call sub.dbrtl70.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
mov edx, dword [eax]
call dword [edx + 0x50]
fcomp qword [ebp - 0x20]
fnstsw ax
sahf
jbe 0x595529
mov edx, 0x595ab0
mov eax, dword [ebp - 0xc]
call sub.dbrtl70.bpl__Db_TDataSet_FieldByName_qqrx17System_AnsiString
mov edx, dword [eax]
call dword [edx + 0x50]
fstp qword [ebp - 0x20]
wait
mov eax, dword [ebp - 0x10]
call sub.dbrtl70.bpl__Db_TDataSet_Next_qqrv
dec ebx
jne 0x59543d
lea edx, [ebp - 0x50]
mov eax, 0x595ac0
call sym.P_Interface.bpl__Publicutil_ReadRegString_qqr17System_AnsiString
cmp dword [ebp - 0x50], 0
jne 0x5955a9
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
lea edx, [ebp - 0x54]
mov eax, 0x595ad4
call sub.rtl70.bpl__Sysutils_FormatDateTime_qqrx17System_AnsiString16System_TDateTime
mov edx, dword [ebp - 0x54]
mov eax, 0x595ac0
call sym.P_Interface.bpl__Publicutil_WriteRegString_qqr17System_AnsiStringt1
push 0
lea edx, [ebp - 0x5c]
mov eax, dword [sym.P_Interface.bpl__Publicutil_GL_ExeName]
mov eax, dword [eax]
call sub.rtl70.bpl__Sysutils_ExtractFilePath_qqrx17System_AnsiString
push dword [ebp - 0x5c]
push 0x595ae8
push 0x595b04
lea eax, [ebp - 0x58]
mov edx, 3
call sub.rtl70.bpl__System__LStrCatN_qqrv
mov eax, dword [ebp - 0x58]
call sub.rtl70.bpl__System__LStrToPChar_qqrx17System_AnsiString
push eax
call sub.kernel32.dll_WinExec
jmp 0x595663
lea edx, [ebp - 0x60]
mov eax, 0x595ac0
call sym.P_Interface.bpl__Publicutil_ReadRegString_qqr17System_AnsiString
cmp dword [ebp - 0x60], 0
je 0x595663
fld qword [ebp - 0x20]
fcomp dword [0x595b10]
fnstsw ax
sahf
je 0x595663
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
call sub.rtl70.bpl__Sysutils_Now_qqrv
add esp, 0xfffffff8
fstp qword [esp]
wait
lea edx, [ebp - 0x64]
mov eax, 0x595ac0
call sym.P_Interface.bpl__Publicutil_ReadRegString_qqr17System_AnsiString
mov eax, dword [ebp - 0x64]
call sub.rtl70.bpl__Sysutils_StrToDateTimeDef_qqrx17System_AnsiStringx16System_TDateTime
add esp, 0xfffffff8
fstp qword [esp]
wait
call sub.rtl70.bpl__Dateutils_DaysBetween_qqrx16System_TDateTimet1
cmp eax, 0x1e
jle 0x595663
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
lea edx, [ebp - 0x68]
mov eax, 0x595ad4
call sub.rtl70.bpl__Sysutils_FormatDateTime_qqrx17System_AnsiString16System_TDateTime
mov edx, dword [ebp - 0x68]
mov eax, 0x595ac0
call sym.P_Interface.bpl__Publicutil_WriteRegString_qqr17System_AnsiStringt1
push 0
lea edx, [ebp - 0x70]
mov eax, dword [sym.P_Interface.bpl__Publicutil_GL_ExeName]
mov eax, dword [eax]
call sub.rtl70.bpl__Sysutils_ExtractFilePath_qqrx17System_AnsiString
push dword [ebp - 0x70]
push 0x595ae8
push 0x595b04
lea eax, [ebp - 0x6c]
mov edx, 3
call sub.rtl70.bpl__System__LStrCatN_qqrv
mov eax, dword [ebp - 0x6c]
call sub.rtl70.bpl__System__LStrToPChar_qqrx17System_AnsiString
push eax
call sub.kernel32.dll_WinExec
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x595683
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x59596f
mov eax, dword [ebp - 0xc]
call sub.dbrtl70.bpl__Db_TDataSet_Close_qqrv
mov eax, dword [ebp - 0xc]
call sub.rtl70.bpl__System_TObject_Free_qqrv
mov eax, dword [ebp - 0x10]
call sub.dbrtl70.bpl__Db_TDataSet_Close_qqrv
mov eax, dword [ebp - 0x10]
call sub.rtl70.bpl__System_TObject_Free_qqrv
mov eax, dword [ebp - 0x24]
call sub.dbrtl70.bpl__Db_TCustomConnection_Close_qqrv
mov eax, dword [ebp - 0x24]
call sub.rtl70.bpl__System_TObject_Free_qqrv
mov eax, dword [ebp - 0x28]
call sub.rtl70.bpl__System_TObject_Free_qqrv
ret
mov dl, 1
mov eax, dword [sym.imp.rtl70.bpl__Classes_TStringList_]
call sub.rtl70.bpl__System_TObject__bctr_qqrv
mov dword [ebp - 0x28], eax
xor eax, eax
push ebp
push 0x595968
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, 0x595b1c
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea edx, [ebp - 0x74]
mov eax, dword [sym.P_Interface.bpl__Publicutil_GL_ExeName]
mov eax, dword [eax]
call sub.rtl70.bpl__Sysutils_ExtractFilePath_qqrx17System_AnsiString
lea eax, [ebp - 0x74]
mov edx, 0x595b2c
call sub.rtl70.bpl__System__LStrCat_qqrv
mov edx, dword [ebp - 0x74]
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
call dword [ecx + 0x74]
lea edx, [ebp - 0x7c]
mov eax, dword [sym.P_Interface.bpl__Publicutil_GL_ExeName]
mov eax, dword [eax]
call sub.rtl70.bpl__Sysutils_ExtractFilePath_qqrx17System_AnsiString
lea eax, [ebp - 0x7c]
mov edx, 0x595b44
call sub.rtl70.bpl__System__LStrCat_qqrv
mov eax, dword [ebp - 0x7c]
call sub.rtl70.bpl__System__LStrToPChar_qqrx17System_AnsiString
mov edx, eax
lea eax, [ebp - 0x78]
call sub.rtl70.bpl__System__LStrFromPChar_qqrr17System_AnsiStringpc
mov eax, dword [ebp - 0x78]
call sub.rtl70.bpl__Sysutils_FileExists_qqrx17System_AnsiString
test al, al
je 0x595952
mov edx, 0x595b60
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea edx, [ebp - 0x80]
mov eax, dword [sym.P_Interface.bpl__Publicutil_GL_ExeName]
mov eax, dword [eax]
call sub.rtl70.bpl__Sysutils_ExtractFilePath_qqrx17System_AnsiString
lea eax, [ebp - 0x80]
mov edx, 0x595b2c
call sub.rtl70.bpl__System__LStrCat_qqrv
mov edx, dword [ebp - 0x80]
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
call dword [ecx + 0x74]
xor eax, eax
push ebp
push 0x5957f3
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x84]
mov eax, dword [sym.P_Interface.bpl__Publicutil_GL_ExeName]
mov eax, dword [eax]
call sub.rtl70.bpl__Sysutils_ExtractFilePath_qqrx17System_AnsiString
lea eax, [ebp - 0x84]
mov edx, 0x595b70
call sub.rtl70.bpl__System__LStrCat_qqrv
mov eax, dword [ebp - 0x84]
call sub.rtl70.bpl__System__LStrToPChar_qqrx17System_AnsiString
push eax
call sub.kernel32.dll_LoadLibraryA
mov dword [ebp - 8], eax
push 0x595b84
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_GetProcAddress
mov ebx, eax
call ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5957fd
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_FreeLibrary_1
lea edx, [ebp - 0x88]
mov eax, 0x595ba0
call sub.rtl70.bpl__Comobj_CreateOleObject_qqrx17System_AnsiString
mov edx, dword [ebp - 0x88]
lea eax, [ebp - 0x38]
call sub.rtl70.bpl__Variants__VarFromDisp_qqrr8TVarDatax36System__DelphiInterface_t9IDispatch_
mov edx, 0x595bc4
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea edx, [ebp - 0x8c]
mov eax, dword [sym.P_Interface.bpl__Publicutil_GL_ExeName]
mov eax, dword [eax]
call sub.rtl70.bpl__Sysutils_ExtractFilePath_qqrx17System_AnsiString
lea eax, [ebp - 0x8c]
mov edx, 0x595b2c
call sub.rtl70.bpl__System__LStrCat_qqrv
mov edx, dword [ebp - 0x8c]
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
call dword [ecx + 0x74]
xor ebx, ebx
jmp 0x5958e4
push 0x595bcc
lea eax, [ebp - 0x38]
push eax
push 0
call sub.rtl70.bpl__Variants__DispInvoke_qp8TVarDatarx8TVarDatap16System_TCallDescpv
add esp, 0xc
lea edx, [ebp - 0x94]
mov eax, ebx
call sub.rtl70.bpl__Sysutils_IntToStr_qqri
mov ecx, dword [ebp - 0x94]
lea eax, [ebp - 0x90]
mov edx, 0x595bc4
call sub.rtl70.bpl__System__LStrCat3_qqrv
mov edx, dword [ebp - 0x90]
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
call dword [ecx + 0x38]
inc ebx
lea edx, [ebp - 0x98]
mov eax, dword [sym.P_Interface.bpl__Publicutil_GL_ExeName]
mov eax, dword [eax]
call sub.rtl70.bpl__Sysutils_ExtractFilePath_qqrx17System_AnsiString
lea eax, [ebp - 0x98]
mov edx, 0x595b2c
call sub.rtl70.bpl__System__LStrCat_qqrv
mov edx, dword [ebp - 0x98]
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
call dword [ecx + 0x74]
push 0x3e8
call sub.kernel32.dll_Sleep_1
mov eax, dword [ebp - 4]
cmp byte [eax + 0xd], 0
je 0x595865
lea edx, [ebp - 0xa0]
mov eax, ebx
call sub.rtl70.bpl__Sysutils_IntToStr_qqri
mov ecx, dword [ebp - 0xa0]
lea eax, [ebp - 0x9c]
mov edx, 0x595be0
call sub.rtl70.bpl__System__LStrCat3_qqrv
mov edx, dword [ebp - 0x9c]
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea edx, [ebp - 0xa4]
mov eax, dword [sym.P_Interface.bpl__Publicutil_GL_ExeName]
mov eax, dword [eax]
call sub.rtl70.bpl__Sysutils_ExtractFilePath_qqrx17System_AnsiString
lea eax, [ebp - 0xa4]
mov edx, 0x595b2c
call sub.rtl70.bpl__System__LStrCat_qqrv
mov edx, dword [ebp - 0xa4]
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
call dword [ecx + 0x74]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x59596f
mov eax, dword [ebp - 0x28]
call sub.rtl70.bpl__System_TObject_Free_qqrv
ret