Function at 0x4db128
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x46
push 0
push 0
dec ecx
jne 0x4db131
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], eax
lea eax, [ebp - 0x198]
mov edx, dword [sym.imp.rtl70.bpl___xp_19Sysutils_TSearchRec]
call sub.rtl70.bpl__System__InitializeRecord_qqrpvt1
xor eax, eax
push ebp
push 0x4dba14
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, 1
mov eax, dword [sym.imp.rtl70.bpl__Registry_TRegistry_]
call sub.rtl70.bpl__Registry_TRegistry__bctr_qqrv
mov dword [ebp - 0x18], eax
mov byte [ebp - 0x11], 0
xor eax, eax
push ebp
push 0x4db98e
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
mov dword [eax + 8], 2
mov edx, 0x80000002
mov eax, dword [ebp - 0x18]
call sub.rtl70.bpl__Registry_TRegistry_SetRootKey_qqrui
mov cl, 1
mov edx, 0x4dba30
mov eax, dword [ebp - 0x18]
call sub.rtl70.bpl__Registry_TRegistry_OpenKey_qqrx17System_AnsiStringo
lea ecx, [ebp - 0x1c]
mov edx, 0x4dba54
mov eax, dword [ebp - 0x18]
call sub.rtl70.bpl__Registry_TRegistry_ReadString_qqrx17System_AnsiString
lea eax, [ebp - 0x19c]
mov ecx, 0x4dba68
mov edx, dword [ebp - 0x1c]
call sub.rtl70.bpl__System__LStrCat3_qqrv
mov eax, dword [ebp - 0x19c]
call sub.rtl70.bpl__Sysutils_FileExists_qqrx17System_AnsiString
test al, al
jne 0x4db1f3
mov eax, 0x4dba78
call sub.vcl70.bpl__Dialogs_ShowMessage_qqrx17System_AnsiString
call sub.rtl70.bpl__System__TryFinallyExit_qqrv
jmp 0x4db995
lea eax, [ebp - 0x1a0]
call sym.P_Interface.bpl__Publicutil_GetDirectory_qqrv
mov edx, dword [ebp - 0x1a0]
lea eax, [ebp - 0x34]
mov ecx, 0x4dba90
call sub.rtl70.bpl__System__LStrCat3_qqrv
mov eax, dword [ebp - 0x34]
call sub.rtl70.bpl__Sysutils_FileExists_qqrx17System_AnsiString
test al, al
jne 0x4db243
lea ecx, [ebp - 0x1a4]
mov edx, 0x4dba54
mov eax, dword [ebp - 0x18]
call sub.rtl70.bpl__Registry_TRegistry_ReadString_qqrx17System_AnsiString
mov edx, dword [ebp - 0x1a4]
lea eax, [ebp - 0x34]
mov ecx, 0x4dbaa4
call sub.rtl70.bpl__System__LStrCat3_qqrv
push sym.P_Interface.bpl__Skbw20_wg_OLD_GetModuleFileNameA
push 0x4d6c08
push 0x4dbab4
push 0x4dbac8
call sub.kernel32.dll_GetModuleHandleA
push eax
call sub.kernel32.dll_GetProcAddress
push eax
call sym.P_Interface.bpl__Codehook_HookCode_qqspvt1rpv
lea edx, [ebp - 0x1ac]
xor eax, eax
call sub.rtl70.bpl__System_ParamStr_qqri
mov eax, dword [ebp - 0x1ac]
lea edx, [ebp - 0x1a8]
call sub.rtl70.bpl__Sysutils_ExtractFilePath_qqrx17System_AnsiString
lea eax, [ebp - 0x1a8]
mov edx, 0x4dbae0
call sub.rtl70.bpl__System__LStrCat_qqrv
mov eax, dword [ebp - 0x1a8]
call sub.rtl70.bpl__Sysutils_FileExists_qqrx17System_AnsiString
test al, al
jne 0x4db322
lea edx, [ebp - 0x1b4]
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 - 0x1b4]
mov eax, dword [ebp - 8]
mov ebx, dword [eax + 4]
push dword [ebx + 0x54]
push 0x4dbaf4
mov ecx, dword [ebx + 0x58]
lea eax, [ebp - 0x1bc]
mov edx, 0x4dbb00
call sub.rtl70.bpl__System__LStrCat3_qqrv
mov eax, dword [ebp - 0x1bc]
lea ecx, [ebp - 0x1b8]
mov edx, 3
call sub.PCommonUtil.bpl__Ncutil_MyRightStr_qqr17System_AnsiStringi
push dword [ebp - 0x1b8]
push 0x4dbb0c
lea eax, [ebp - 0x1b0]
mov edx, 5
call sub.rtl70.bpl__System__LStrCatN_qqrv
mov eax, dword [ebp - 0x1b0]
call sub.rtl70.bpl__Sysutils_FileExists_qqrx17System_AnsiString
test al, al
je 0x4db545
lea edx, [ebp - 0x1c4]
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 - 0x1c4]
mov eax, dword [ebp - 8]
mov ebx, dword [eax + 4]
push dword [ebx + 0x54]
push 0x4dbaf4
mov ecx, dword [ebx + 0x58]
lea eax, [ebp - 0x1cc]
mov edx, 0x4dbb00
call sub.rtl70.bpl__System__LStrCat3_qqrv
mov eax, dword [ebp - 0x1cc]
lea ecx, [ebp - 0x1c8]
mov edx, 3
call sub.PCommonUtil.bpl__Ncutil_MyRightStr_qqr17System_AnsiStringi
push dword [ebp - 0x1c8]
push 0x4dbb0c
lea eax, [ebp - 0x1c0]
mov edx, 5
call sub.rtl70.bpl__System__LStrCatN_qqrv
mov eax, dword [ebp - 0x1c0]
call sub.rtl70.bpl__Sysutils_FileExists_qqrx17System_AnsiString
test al, al
je 0x4db420
lea edx, [ebp - 0x1d4]
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 - 0x1d4]
mov eax, dword [ebp - 8]
mov ebx, dword [eax + 4]
push dword [ebx + 0x54]
push 0x4dbaf4
mov ecx, dword [ebx + 0x58]
lea eax, [ebp - 0x1dc]
mov edx, 0x4dbb00
call sub.rtl70.bpl__System__LStrCat3_qqrv
mov eax, dword [ebp - 0x1dc]
lea ecx, [ebp - 0x1d8]
mov edx, 3
call sub.PCommonUtil.bpl__Ncutil_MyRightStr_qqr17System_AnsiStringi
push dword [ebp - 0x1d8]
push 0x4dbb0c
lea eax, [ebp - 0x1d0]
mov edx, 5
call sub.rtl70.bpl__System__LStrCatN_qqrv
mov ecx, dword [ebp - 0x1d0]
mov dl, 1
mov eax, dword [sym.imp.rtl70.bpl__Inifiles_TIniFile_]
call sub.rtl70.bpl__Inifiles_TCustomIniFile__bctr_qqrx17System_AnsiString
mov dword [ebp - 0x3c], eax
jmp 0x4db457
lea edx, [ebp - 0x1e0]
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 - 0x1e0]
mov edx, 0x4dbae0
call sub.rtl70.bpl__System__LStrCat_qqrv
mov ecx, dword [ebp - 0x1e0]
mov dl, 1
mov eax, dword [sym.imp.rtl70.bpl__Inifiles_TIniFile_]
call sub.rtl70.bpl__Inifiles_TCustomIniFile__bctr_qqrx17System_AnsiString
mov dword [ebp - 0x3c], eax
xor eax, eax
push ebp
push 0x4db53e
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x4dbb20
lea eax, [ebp - 0x1e4]
push eax
mov ecx, 0x4dbb2c
mov edx, 0x4dbb3c
mov eax, dword [ebp - 0x3c]
mov ebx, dword [eax]
call dword [ebx]
mov eax, dword [ebp - 0x1e4]
mov edx, 0x4dbb4c
call sub.rtl70.bpl__System__LStrCmp_qqrv
jne 0x4db528
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 4]
mov dl, 1
mov eax, dword [sym.P_Interface.bpl__Ptkp_SKPTKP_]
call sym.P_Interface.bpl__Pubsk_PUBSKOBJ__bctr_qqrp14System_TObject
mov edx, dword [ebp - 8]
mov dword [edx + 0x34], eax
xor ecx, ecx
mov dl, 1
mov eax, dword [sym.P_Interface.bpl__Pdfium_TPdfView_]
call sym.P_Interface.bpl__Pdfium_TPdfView__bctr_qqrp18Classes_TComponent
mov edx, dword [ebp - 8]
mov dword [edx + 0x30], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x34]
mov ebx, dword [eax]
call dword [ebx + 0x38]
mov edx, 0x4dbb58
mov eax, 0x4dbb64
call sym.P_Interface.bpl__Publicutil_WriteRegString_qqr17System_AnsiStringt1
push 0
lea eax, [ebp - 0x1e8]
push eax
mov ecx, 0x4dbb74
mov edx, 0x4dbb3c
mov eax, dword [ebp - 0x3c]
mov ebx, dword [eax]
call dword [ebx]
mov edx, dword [ebp - 0x1e8]
mov eax, dword [ebp - 8]
add eax, 0x2c
call sub.rtl70.bpl__System__LStrAsg_qqrpvpxv
mov eax, dword [ebp - 8]
cmp dword [eax + 0x2c], 0
jne 0x4db528
mov eax, dword [ebp - 8]
add eax, 0x2c
mov edx, 0x4dbb58
call sub.rtl70.bpl__System__LStrAsg_qqrpvpxv
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4db545
mov eax, dword [ebp - 0x3c]
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 esi, eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x44]
push dword [ebp - 0x1c]
push 0x4dbb84
mov eax, dword [ebp - 8]
mov eax, dword [eax + 4]
push dword [eax + 0x54]
lea eax, [ebp - 0x1ec]
mov edx, 3
call sub.rtl70.bpl__System__LStrCatN_qqrv
mov eax, dword [ebp - 0x1ec]
mov edx, esi
call fcn.004d69c8
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x4db650
inc eax
mov dword [ebp - 0x40], eax
xor ebx, ebx
lea ecx, [ebp - 0x1f0]
mov edx, ebx
mov eax, esi
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x1f0]
lea ecx, [ebp - 0x198]
mov edx, 0x3f
call sub.rtl70.bpl__Sysutils_FindFirst_qqrx17System_AnsiStringir19Sysutils_TSearchRec
test eax, eax
jne 0x4db63b
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x16c]
push eax
call sub.kernel32.dll_FileTimeToLocalFileTime
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 2]
push eax
lea eax, [ebp - 0x30]
push eax
call sub.kernel32.dll_FileTimeToDosDateTime
mov eax, dword [ebp - 4]
call sub.rtl70.bpl__Sysutils_FileDateToDateTime_qqri
fstp qword [ebp - 0x28]
wait
push dword [ebp - 0x24]
push dword [ebp - 0x28]
lea edx, [ebp - 0x1f4]
mov eax, 0x4dbb90
call sub.rtl70.bpl__Sysutils_FormatDateTime_qqrx17System_AnsiString16System_TDateTime
lea eax, [ebp - 0x1f4]
push eax
lea ecx, [ebp - 0x1f8]
mov edx, ebx
mov eax, esi
mov edi, dword [eax]
call dword [edi + 0xc]
mov edx, dword [ebp - 0x1f8]
pop eax
call sub.rtl70.bpl__System__LStrCat_qqrv
mov ecx, dword [ebp - 0x1f4]
mov edx, ebx
mov eax, esi
mov edi, dword [eax]
call dword [edi + 0x20]
lea eax, [ebp - 0x198]
call sub.rtl70.bpl__Sysutils_FindClose_qqrr19Sysutils_TSearchRec
inc ebx
dec dword [ebp - 0x40]
jne 0x4db59e
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x90]
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x14]
mov ebx, eax
dec ebx
cmp ebx, 0
jl 0x4db706
lea ecx, [ebp - 0x200]
mov edx, ebx
mov eax, esi
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x200]
lea edx, [ebp - 0x1fc]
call sub.rtl70.bpl__Sysutils_LowerCase_qqrx17System_AnsiString
mov edx, dword [ebp - 0x1fc]
mov eax, 0x4dbba8
call sub.rtl70.bpl__System__LStrPos_qqrv
test eax, eax
jne 0x4db6fc
lea ecx, [ebp - 0x208]
mov edx, ebx
mov eax, esi
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x208]
lea edx, [ebp - 0x204]
call sub.rtl70.bpl__Sysutils_LowerCase_qqrx17System_AnsiString
mov edx, dword [ebp - 0x204]
mov eax, 0x4dbbbc
call sub.rtl70.bpl__System__LStrPos_qqrv
test eax, eax
jne 0x4db6fc
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x20c]
mov edx, ebx
mov eax, esi
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebp - 0x20c]
xor ecx, ecx
mov edx, 0xf
call sub.PCommonUtil.bpl__Ncutil_copystr_qqr17System_AnsiStringii
jmp 0x4db706
dec ebx
cmp ebx, 0xffffffff
jne 0x4db66d
lea ecx, [ebp - 0x210]
mov edx, 0x4dba54
mov eax, dword [ebp - 0x18]
call sub.rtl70.bpl__Registry_TRegistry_ReadString_qqrx17System_AnsiString
mov eax, dword [ebp - 0x210]
call sub.rtl70.bpl__Sysutils_SetCurrentDir_qqrx17System_AnsiString
lea ecx, [ebp - 0x214]
mov edx, 0x4dba54
mov eax, dword [ebp - 0x18]
call sub.rtl70.bpl__Registry_TRegistry_ReadString_qqrx17System_AnsiString
mov eax, dword [ebp - 0x214]
call sub.rtl70.bpl__System__LStrToPChar_qqrx17System_AnsiString
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
lea edx, [ebp - 0x218]
mov eax, dword [ebp - 0x1c]
call sub.rtl70.bpl__System_AnsiToUtf8_qqrx17System_AnsiString
mov eax, dword [ebp - 0x218]
push eax
push 0x4dbbcc
mov eax, dword [ebp - 0x34]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 4]
mov ecx, dword [eax + 0x54]
mov dl, 1
mov eax, dword [sym.P_Interface.bpl__Sqlitetable3_TSQLiteDatabase_]
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteDatabase__bctr_qqrx17System_AnsiStringt1t1t1
mov edx, dword [ebp - 8]
mov dword [edx + 0x1c], eax
lea ecx, [ebp - 0x224]
mov edx, 0x4dba54
mov eax, dword [ebp - 0x18]
call sub.rtl70.bpl__Registry_TRegistry_ReadString_qqrx17System_AnsiString
push dword [ebp - 0x224]
push 0x4dbb84
mov eax, dword [ebp - 8]
mov eax, dword [eax + 4]
push dword [eax + 0x54]
push 0x4dbbe8
lea eax, [ebp - 0x220]
mov edx, 4
call sub.rtl70.bpl__System__LStrCatN_qqrv
mov eax, dword [ebp - 0x220]
lea edx, [ebp - 0x21c]
call sub.rtl70.bpl__System_AnsiToUtf8_qqrx17System_AnsiString
mov eax, dword [ebp - 0x21c]
push eax
push 0x4dbbcc
mov eax, dword [ebp - 0x34]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 4]
mov ecx, dword [eax + 0x54]
mov dl, 1
mov eax, dword [sym.P_Interface.bpl__Sqlitetable3_TSQLiteDatabase_]
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteDatabase__bctr_qqrx17System_AnsiStringt1t1t1
mov ebx, eax
mov eax, dword [ebp - 8]
mov dword [eax + 0x20], ebx
lea eax, [ebp - 0x38]
mov edx, 0x4dbb4c
call sub.rtl70.bpl__System__LStrLAsg_qqrpvpxv
xor eax, eax
push ebp
push 0x4db92b
push dword fs:[eax]
mov dword fs:[eax], esp
test ebx, ebx
jne 0x4db836
mov eax, 0x4dbbfc
call sub.vcl70.bpl__Dialogs_ShowMessage_qqrx17System_AnsiString
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
call sub.rtl70.bpl__System__TryFinallyExit_qqrv
jmp 0x4db995
lea edx, [ebp - 0x228]
mov eax, 0x4dbc10
call sub.rtl70.bpl__System_AnsiToUtf8_qqrx17System_AnsiString
mov edx, dword [ebp - 0x228]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x20]
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteDatabase_GetTable_qqrx17System_AnsiString
mov ebx, eax
lea eax, [ebp - 0x38]
mov edx, 0x4dbb58
call sub.rtl70.bpl__System__LStrLAsg_qqrpvpxv
cmp dword [ebx + 8], 0
jbe 0x4db8e9
lea eax, [ebp - 0x38]
mov edx, 0x4dbc30
call sub.rtl70.bpl__System__LStrLAsg_qqrpvpxv
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_MoveFirst_qqrv
lea eax, [ebp - 0x38]
mov edx, 0x4dbc3c
call sub.rtl70.bpl__System__LStrLAsg_qqrpvpxv
lea ecx, [ebp - 0x22c]
mov edx, 0x4dbc48
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0x22c]
mov edx, dword [ebp - 0xc]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
lea eax, [ebp - 0x38]
mov edx, 0x4dbc58
call sub.rtl70.bpl__System__LStrLAsg_qqrpvpxv
lea ecx, [ebp - 0x230]
mov edx, 0x4dbc64
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0x230]
mov edx, dword [ebp - 0x10]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
lea eax, [ebp - 0x38]
mov edx, 0x4dbc74
call sub.rtl70.bpl__System__LStrLAsg_qqrpvpxv
jmp 0x4db8f3
mov eax, 0x4dbc80
call sub.vcl70.bpl__Dialogs_ShowMessage_qqrx17System_AnsiString
lea eax, [ebp - 0x38]
mov edx, 0x4dbc98
call sub.rtl70.bpl__System__LStrLAsg_qqrpvpxv
mov eax, ebx
call sub.rtl70.bpl__System_TObject_Free_qqrv
lea eax, [ebp - 0x38]
mov edx, 0x4dbca4
call sub.rtl70.bpl__System__LStrLAsg_qqrpvpxv
lea eax, [ebp - 0x38]
mov edx, 0x4dbcb0
call sub.rtl70.bpl__System__LStrLAsg_qqrpvpxv
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4db978
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4db995
mov eax, dword [ebp - 0x18]
call sub.rtl70.bpl__System_TObject_Free_qqrv
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4dba1b
lea eax, [ebp - 0x234]
mov edx, 3
call sub.rtl70.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 0x228]
call sub.rtl70.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x224]
mov edx, 2
call sub.rtl70.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 0x21c]
mov edx, 2
call sub.rtl70.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 0x214]
mov edx, 0x1f
call sub.rtl70.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 0x198]
mov edx, dword [sym.imp.rtl70.bpl___xp_19Sysutils_TSearchRec]
call sub.rtl70.bpl__System__FinalizeRecord_qqrpvt1
lea eax, [ebp - 0x38]
mov edx, 2
call sub.rtl70.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 0x1c]
call sub.rtl70.bpl__System__LStrClr_qqrpv
ret