Function at 0x501b6768
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff58
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0xa8], ecx
mov dword [ebp - 0xa4], ecx
mov dword [ebp - 0xa0], ecx
mov dword [ebp - 0x9c], ecx
mov dword [ebp - 0x98], ecx
mov dword [ebp - 0x94], ecx
mov dword [ebp - 0x90], ecx
mov dword [ebp - 0x8c], ecx
mov dword [ebp - 0x88], ecx
mov dword [ebp - 4], edx
mov ebx, eax
lea esi, [ebp - 0x7c]
xor eax, eax
push ebp
push 0x501b6b63
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_Win32MajorVersion]
cmp dword [eax], 6
jge 0x501b6809
lea edx, [ebp - 0x88]
mov eax, dword [ebx]
call sub.rtl120.bpl__System_TObject_ClassName_qqrv
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x84], eax
mov byte [ebp - 0x80], 0x11
lea eax, [ebp - 0x84]
push eax
push 0
mov ecx, dword [sym.vcl120.bpl__Consts__SWindowsVistaRequired]
mov dl, 1
mov eax, dword [sym.vcl120.bpl__Dialogs_EPlatformVersionException_]
call fcn.5012338c
call sub.rtl120.bpl__System__RaiseExcept_qqrv
call sym.vcl120.bpl__Themes_ThemeServices_qqrv
call sym.vcl120.bpl__Themes_TThemeServices_GetThemesEnabled_qqrv
test al, al
jne 0x501b6854
lea edx, [ebp - 0x8c]
mov eax, dword [ebx]
call sub.rtl120.bpl__System_TObject_ClassName_qqrv
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x84], eax
mov byte [ebp - 0x80], 0x11
lea eax, [ebp - 0x84]
push eax
push 0
mov ecx, dword [sym.vcl120.bpl__Consts__SXPThemesRequired]
mov dl, 1
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_Exception_]
call fcn.5012338c
call sub.rtl120.bpl__System__RaiseExcept_qqrv
mov eax, esi
xor ecx, ecx
mov edx, 0x60
call sub.rtl120.bpl__System__FillChar_qqrpvib
mov dword [esi], 0x60
mov eax, dword [ebp - 4]
mov dword [esi + 4], eax
xor eax, eax
mov dword [esi + 0xc], eax
xor eax, eax
mov edi, 0x50243378
mov edx, eax
cmp dl, 0xf
ja 0x501b6888
and edx, 0x7f
bt dword [ebx + 0x58], edx
jae 0x501b688f
mov edx, dword [edi]
or dword [esi + 0xc], edx
inc eax
add edi, 4
cmp al, 0x10
jne 0x501b687a
xor eax, eax
mov dword [esi + 0x10], eax
xor eax, eax
mov edi, 0x502433b8
mov edx, eax
cmp dl, 7
ja 0x501b68b1
and edx, 0x7f
bt dword [ebx + 0x3c], edx
jae 0x501b68b8
mov edx, dword [edi]
or dword [esi + 0x10], edx
inc eax
add edi, 4
cmp al, 6
jne 0x501b68a3
cmp dword [ebx + 0x80], 0
je 0x501b68e8
lea eax, [ebp - 0x90]
mov edx, dword [ebx + 0x80]
call sub.rtl120.bpl__System__WStrFromUStr_qqrr17System_WideStringx20System_UnicodeString
mov eax, dword [ebp - 0x90]
call sub.rtl120.bpl__System__WStrToPWChar_qqrx17System_WideString
mov dword [esi + 0x20], eax
cmp dword [ebx + 0x84], 0
je 0x501b6910
lea eax, [ebp - 0x94]
mov edx, dword [ebx + 0x84]
call sub.rtl120.bpl__System__WStrFromUStr_qqrr17System_WideStringx20System_UnicodeString
mov eax, dword [ebp - 0x94]
call sub.rtl120.bpl__System__WStrToPWChar_qqrx17System_WideString
mov dword [esi + 0x1c], eax
cmp dword [ebx + 0x38], 0
je 0x501b6932
lea eax, [ebp - 0x98]
mov edx, dword [ebx + 0x38]
call sub.rtl120.bpl__System__WStrFromUStr_qqrr17System_WideStringx20System_UnicodeString
mov eax, dword [ebp - 0x98]
call sub.rtl120.bpl__System__WStrToPWChar_qqrx17System_WideString
mov dword [esi + 0x14], eax
test byte [ebx + 0x58], 2
je 0x501b6945
mov eax, dword [ebx + 0x44]
call sym.vcl120.bpl__Graphics_TIcon_GetHandle_qqrv
mov dword [esi + 0x18], eax
jmp 0x501b6962
mov eax, dword [ebx + 0x6c]
mov edx, eax
sub edx, 5
jae 0x501b695b
mov eax, dword [eax*4 + 0x50243364]
mov dword [esi + 0x18], eax
jmp 0x501b6962
movzx eax, word [ebx + 0x6c]
mov dword [esi + 0x18], eax
movzx eax, byte [ebx + 0x48]
mov eax, dword [eax*4 + 0x502433d0]
mov dword [esi + 0x2c], eax
cmp dword [ebx + 0x60], 0
je 0x501b6992
lea eax, [ebp - 0x9c]
mov edx, dword [ebx + 0x60]
call sub.rtl120.bpl__System__WStrFromUStr_qqrr17System_WideStringx20System_UnicodeString
mov eax, dword [ebp - 0x9c]
call sub.rtl120.bpl__System__WStrToPWChar_qqrx17System_WideString
mov dword [esi + 0x50], eax
test byte [ebx + 0x58], 4
je 0x501b69a5
mov eax, dword [ebx + 0x40]
call sym.vcl120.bpl__Graphics_TIcon_GetHandle_qqrv
mov dword [esi + 0x4c], eax
jmp 0x501b69c2
mov eax, dword [ebx + 0x5c]
mov edx, eax
sub edx, 5
jae 0x501b69bb
mov eax, dword [eax*4 + 0x50243364]
mov dword [esi + 0x4c], eax
jmp 0x501b69c2
movzx eax, word [ebx + 0x5c]
mov dword [esi + 0x4c], eax
cmp dword [ebx + 0x8c], 0
je 0x501b69ea
lea eax, [ebp - 0xa0]
mov edx, dword [ebx + 0x8c]
call sub.rtl120.bpl__System__WStrFromUStr_qqrr17System_WideStringx20System_UnicodeString
mov eax, dword [ebp - 0xa0]
call sub.rtl120.bpl__System__WStrToPWChar_qqrx17System_WideString
mov dword [esi + 0x3c], eax
cmp dword [ebx + 0x54], 0
je 0x501b6a0c
lea eax, [ebp - 0xa4]
mov edx, dword [ebx + 0x54]
call sub.rtl120.bpl__System__WStrFromUStr_qqrr17System_WideStringx20System_UnicodeString
mov eax, dword [ebp - 0xa4]
call sub.rtl120.bpl__System__WStrToPWChar_qqrx17System_WideString
mov dword [esi + 0x40], eax
cmp dword [ebx + 0x4c], 0
je 0x501b6a2e
lea eax, [ebp - 0xa8]
mov edx, dword [ebx + 0x4c]
call sub.rtl120.bpl__System__WStrFromUStr_qqrr17System_WideStringx20System_UnicodeString
mov eax, dword [ebp - 0xa8]
call sub.rtl120.bpl__System__WStrToPWChar_qqrx17System_WideString
mov dword [esi + 0x48], eax
mov eax, dword [ebx + 0x34]
call sub.rtl120.bpl__Classes_TCollection_GetCount_qqrv
mov edi, eax
mov dword [esi + 0x24], edi
test edi, edi
jbe 0x501b6a4a
mov eax, dword [ebx + 0x34]
call sym.vcl120.bpl__Dialogs_TTaskDialogButtons_Buttons_qqrv
mov dword [esi + 0x28], eax
mov eax, dword [ebx + 0x34]
mov eax, dword [eax + 0x24]
test eax, eax
je 0x501b6a5a
mov eax, dword [eax + 0x18]
mov dword [esi + 0x2c], eax
mov eax, dword [ebx + 0x7c]
call sub.rtl120.bpl__Classes_TCollection_GetCount_qqrv
mov edi, eax
mov dword [esi + 0x30], edi
test edi, edi
jbe 0x501b6a76
mov eax, dword [ebx + 0x7c]
call sym.vcl120.bpl__Dialogs_TTaskDialogButtons_Buttons_qqrv
mov dword [esi + 0x34], eax
test byte [ebx + 0x59], 0x40
jne 0x501b6a91
mov eax, dword [ebx + 0x7c]
cmp dword [eax + 0x24], 0
je 0x501b6a91
mov eax, dword [ebx + 0x7c]
mov eax, dword [eax + 0x24]
mov eax, dword [eax + 0x18]
mov dword [esi + 0x38], eax
mov dword [esi + 0x58], ebx
mov eax, 0x501b6740
mov dword [esi + 0x54], eax
mov eax, dword [ebp - 4]
call sym.vcl120.bpl__Forms_DisableTaskWindows_qqrp6HWND__
mov dword [ebp - 0xc], eax
call sym.vcl120.bpl__Forms_SaveFocusState_qqrv
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x501b6b2e
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x14]
lea edx, [ebp - 0x10]
mov eax, esi
call fcn.50131058
test eax, eax
sete byte [ebp - 5]
mov esi, dword [ebp - 0x10]
mov dword [ebx + 0x70], esi
cmp byte [ebp - 5], 0
je 0x501b6b07
mov edx, esi
mov eax, dword [ebx + 0x34]
call sym.vcl120.bpl__Dialogs_TTaskDialogButtons_FindButton_qqri
mov dword [ebx + 0x30], eax
mov eax, dword [ebx + 0x7c]
mov edx, dword [ebp - 0x14]
call sym.vcl120.bpl__Dialogs_TTaskDialogButtons_FindButton_qqri
mov dword [ebx + 0x78], eax
cmp dword [ebp - 0x1c], 0
je 0x501b6b07
or word [ebx + 0x58], 0x100
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x501b6b35
mov eax, dword [ebp - 0xc]
call sym.vcl120.bpl__Forms_EnableTaskWindows_qqrpv
mov eax, dword [ebp - 4]
push eax
call sub.user32.dll_SetActiveWindow
mov eax, dword [ebp - 0x18]
call sym.vcl120.bpl__Forms_RestoreFocusState_qqrpv
ret