Function at 0x501b677c
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 0x501b6b77
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_Win32MajorVersion]
cmp dword [eax], 6
jge 0x501b681d
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 sub.rtl120.bpl__Sysutils_Exception__bctr_qqrp20System_TResStringRecpx14System_TVarRecxi
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 0x501b6868
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 sub.rtl120.bpl__Sysutils_Exception__bctr_qqrp20System_TResStringRecpx14System_TVarRecxi
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 0x501b689c
and edx, 0x7f
bt dword [ebx + 0x58], edx
jae 0x501b68a3
mov edx, dword [edi]
or dword [esi + 0xc], edx
inc eax
add edi, 4
cmp al, 0x10
jne 0x501b688e
xor eax, eax
mov dword [esi + 0x10], eax
xor eax, eax
mov edi, 0x502433b8
mov edx, eax
cmp dl, 7
ja 0x501b68c5
and edx, 0x7f
bt dword [ebx + 0x3c], edx
jae 0x501b68cc
mov edx, dword [edi]
or dword [esi + 0x10], edx
inc eax
add edi, 4
cmp al, 6
jne 0x501b68b7
cmp dword [ebx + 0x80], 0
je 0x501b68fc
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 0x501b6924
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 0x501b6946
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 0x501b6959
mov eax, dword [ebx + 0x44]
call sym.vcl120.bpl__Graphics_TIcon_GetHandle_qqrv
mov dword [esi + 0x18], eax
jmp 0x501b6976
mov eax, dword [ebx + 0x6c]
mov edx, eax
sub edx, 5
jae 0x501b696f
mov eax, dword [eax*4 + 0x50243364]
mov dword [esi + 0x18], eax
jmp 0x501b6976
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 0x501b69a6
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 0x501b69b9
mov eax, dword [ebx + 0x40]
call sym.vcl120.bpl__Graphics_TIcon_GetHandle_qqrv
mov dword [esi + 0x4c], eax
jmp 0x501b69d6
mov eax, dword [ebx + 0x5c]
mov edx, eax
sub edx, 5
jae 0x501b69cf
mov eax, dword [eax*4 + 0x50243364]
mov dword [esi + 0x4c], eax
jmp 0x501b69d6
movzx eax, word [ebx + 0x5c]
mov dword [esi + 0x4c], eax
cmp dword [ebx + 0x8c], 0
je 0x501b69fe
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 0x501b6a20
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 0x501b6a42
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 0x501b6a5e
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 0x501b6a6e
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 0x501b6a8a
mov eax, dword [ebx + 0x7c]
call sym.vcl120.bpl__Dialogs_TTaskDialogButtons_Buttons_qqrv
mov dword [esi + 0x34], eax
test byte [ebx + 0x59], 0x40
jne 0x501b6aa5
mov eax, dword [ebx + 0x7c]
cmp dword [eax + 0x24], 0
je 0x501b6aa5
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, 0x501b6754
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 0x501b6b42
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 0x501b6b1b
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 0x501b6b1b
or word [ebx + 0x58], 0x100
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x501b6b49
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