Function at 0x501f495c
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x501f4fbe
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
test byte [eax + 0x1c], 0x10
jne 0x501f49b1
mov eax, dword [ebp - 4]
test byte [eax + 0x374], 4
je 0x501f49b1
lea edx, [ebp - 0x18]
mov eax, dword [sym.vcl120.bpl__Consts__SVisibleChanged]
call sub.rtl120.bpl__System_LoadResString_qqrp20System_TResStringRec
mov ecx, dword [ebp - 0x18]
mov dl, 1
mov eax, dword [sym.imp.rtl120.bpl__Classes_EInvalidOperation_]
call fcn.50123374
call sub.rtl120.bpl__System__RaiseExcept_qqrv
mov eax, dword [sym.vcl120.bpl__Forms_Application]
call sym.vcl120.bpl__Forms_TApplication_UpdateVisible_qqrv
mov eax, dword [ebp - 4]
or byte [eax + 0x374], 4
xor edx, edx
push ebp
push 0x501f4fa1
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 4]
test byte [eax + 0x1c], 0x10
jne 0x501f4f5b
mov eax, dword [ebp - 4]
cmp byte [eax + 0x1e2], 0
je 0x501f4e4f
xor eax, eax
push ebp
push 0x501f4a14
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov si, 0xffab
call sub.rtl120.bpl__System__CallDynaInst_qqrv
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x501f4a2b
mov eax, dword [ebp - 4]
cmp byte [eax + 0x288], 4
je 0x501f4a57
mov eax, dword [ebp - 4]
cmp byte [eax + 0x288], 6
jne 0x501f4b3b
mov eax, dword [ebp - 4]
cmp byte [eax + 0x287], 1
jne 0x501f4b3b
mov eax, dword [ebp - 4]
cmp byte [eax + 0x287], 1
jne 0x501f4a9d
mov eax, dword [sym.vcl120.bpl__Forms_Application]
mov eax, dword [eax + 0x40]
call sym.vcl120.bpl__Controls_TControl_GetClientWidth_qqrv
mov ebx, eax
mov eax, dword [ebp - 4]
sub ebx, dword [eax + 0x48]
sar ebx, 1
jns 0x501f4a7f
adc ebx, 0
mov eax, dword [sym.vcl120.bpl__Forms_Application]
mov eax, dword [eax + 0x40]
call sym.vcl120.bpl__Controls_TControl_GetClientHeight_qqrv
mov esi, eax
mov eax, dword [ebp - 4]
sub esi, dword [eax + 0x4c]
sar esi, 1
jns 0x501f4ad0
adc esi, 0
jmp 0x501f4ad0
lea edx, [ebp - 0x14]
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetWorkAreaRect_qqrv
mov ebx, dword [ebp - 0xc]
sub ebx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
sub ebx, dword [eax + 0x48]
sar ebx, 1
jns 0x501f4abd
adc ebx, 0
mov esi, dword [ebp - 8]
sub esi, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
sub esi, dword [eax + 0x4c]
sar esi, 1
jns 0x501f4ad0
adc esi, 0
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetDesktopLeft_qqrv
cmp ebx, eax
jge 0x501f4aea
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetDesktopLeft_qqrv
mov ebx, eax
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetDesktopTop_qqrv
cmp esi, eax
jge 0x501f4b04
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetDesktopTop_qqrv
mov esi, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x48]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
mov ecx, esi
mov edx, ebx
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x88]
mov eax, dword [ebp - 4]
cmp byte [eax + 0x57], 0
je 0x501f4d5b
mov eax, dword [ebp - 4]
call sym.vcl120.bpl__Forms_TCustomForm_SetWindowToMonitor_qqrv
jmp 0x501f4d5b
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0x288]
mov edx, eax
add dl, 0xfa
sub dl, 2
jae 0x501f4c60
mov eax, dword [sym.vcl120.bpl__Forms_Application]
mov esi, dword [eax + 0x40]
mov eax, dword [ebp - 4]
cmp byte [eax + 0x288], 7
jne 0x501f4b82
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [sym.vcl120.bpl__Forms_TCustomForm_]
call sub.rtl120.bpl__System__IsClass_qqrp14System_TObjectp17System_TMetaClass
test al, al
je 0x501f4b82
mov eax, dword [ebp - 4]
mov esi, dword [eax + 4]
test esi, esi
je 0x501f4bc3
cmp esi, dword [ebp - 4]
je 0x501f4bc3
mov eax, esi
call sym.vcl120.bpl__Forms_TCustomForm_GetLeft_qqrv
mov ebx, eax
mov eax, dword [esi + 0x48]
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x48]
sar eax, 1
jns 0x501f4ba4
adc eax, 0
add ebx, eax
mov eax, esi
call sym.vcl120.bpl__Forms_TCustomForm_GetTop_qqrv
mov edx, dword [esi + 0x4c]
mov ecx, dword [ebp - 4]
sub edx, dword [ecx + 0x4c]
sar edx, 1
jns 0x501f4bbd
adc edx, 0
add eax, edx
mov esi, eax
jmp 0x501f4bf5
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetWidth_qqrv
mov ebx, eax
mov eax, dword [ebp - 4]
sub ebx, dword [eax + 0x48]
sar ebx, 1
jns 0x501f4bdc
adc ebx, 0
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetHeight_qqrv
mov esi, eax
mov eax, dword [ebp - 4]
sub esi, dword [eax + 0x4c]
sar esi, 1
jns 0x501f4bf5
adc esi, 0
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetDesktopLeft_qqrv
cmp ebx, eax
jge 0x501f4c0f
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetDesktopLeft_qqrv
mov ebx, eax
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetDesktopTop_qqrv
cmp esi, eax
jge 0x501f4c29
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetDesktopTop_qqrv
mov esi, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x48]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
mov ecx, esi
mov edx, ebx
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x88]
mov eax, dword [ebp - 4]
cmp byte [eax + 0x57], 0
je 0x501f4d5b
mov eax, dword [ebp - 4]
call sym.vcl120.bpl__Forms_TCustomForm_SetWindowToMonitor_qqrv
jmp 0x501f4d5b
cmp al, 5
jne 0x501f4d5b
mov eax, dword [ebp - 4]
cmp byte [eax + 0x287], 1
jne 0x501f4cae
mov eax, dword [sym.vcl120.bpl__Forms_Application]
mov eax, dword [eax + 0x40]
call sym.vcl120.bpl__Controls_TControl_GetClientWidth_qqrv
mov ebx, eax
mov eax, dword [ebp - 4]
sub ebx, dword [eax + 0x48]
sar ebx, 1
jns 0x501f4c90
adc ebx, 0
mov eax, dword [sym.vcl120.bpl__Forms_Application]
mov eax, dword [eax + 0x40]
call sym.vcl120.bpl__Controls_TControl_GetClientHeight_qqrv
mov esi, eax
mov eax, dword [ebp - 4]
sub esi, dword [eax + 0x4c]
sar esi, 1
jns 0x501f4d0a
adc esi, 0
jmp 0x501f4d0a
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetDesktopWidth_qqrv
mov ebx, eax
sar ebx, 1
jns 0x501f4cc1
adc ebx, 0
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetDesktopLeft_qqrv
add ebx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x48]
sar eax, 1
jns 0x501f4cda
adc eax, 0
sub ebx, eax
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetDesktopHeight_qqrv
mov esi, eax
sar esi, 1
jns 0x501f4cef
adc esi, 0
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetDesktopTop_qqrv
add esi, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
sar eax, 1
jns 0x501f4d08
adc eax, 0
sub esi, eax
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetDesktopLeft_qqrv
cmp ebx, eax
jge 0x501f4d24
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetDesktopLeft_qqrv
mov ebx, eax
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetDesktopTop_qqrv
cmp esi, eax
jge 0x501f4d3e
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
call sym.vcl120.bpl__Forms_TScreen_GetDesktopTop_qqrv
mov esi, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x48]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
mov ecx, esi
mov edx, ebx
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x88]
mov eax, dword [ebp - 4]
mov byte [eax + 0x288], 0
mov eax, dword [ebp - 4]
cmp byte [eax + 0x287], 1
jne 0x501f4e2a
mov eax, dword [ebp - 4]
cmp byte [eax + 0x283], 2
jne 0x501f4db7
push 0
mov eax, dword [ebp - 4]
call sym.vcl120.bpl__Controls_TWinControl_GetHandle_qqrv
push eax
push 0x223
mov eax, dword [sym.vcl120.bpl__Forms_Application]
mov eax, dword [eax + 0x40]
mov eax, dword [eax + 0x36c]
push eax
call sub.user32.dll_SendMessageW
push 3
mov eax, dword [ebp - 4]
call sym.vcl120.bpl__Controls_TWinControl_GetHandle_qqrv
push eax
call sub.user32.dll_ShowWindow
jmp 0x501f4e08
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0x283]
mov eax, dword [eax*4 + 0x502438f4]
push eax
mov eax, dword [ebp - 4]
call sym.vcl120.bpl__Controls_TWinControl_GetHandle_qqrv
push eax
call sub.user32.dll_ShowWindow
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x48]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x4c]
shl edx, 0x10
or eax, edx
push eax
push 0
push 5
mov eax, dword [ebp - 4]
call sym.vcl120.bpl__Controls_TWinControl_GetHandle_qqrv
push eax
push 0x50122764
call sub.user32.dll_CallWindowProcW
mov eax, dword [ebp - 4]
call sym.vcl120.bpl__Controls_TControl_BringToFront_qqrv
push 0
push 0
push 0x234
mov eax, dword [sym.vcl120.bpl__Forms_Application]
mov eax, dword [eax + 0x40]
mov eax, dword [eax + 0x36c]
push eax
call sub.user32.dll_SendMessageW
jmp 0x501f4f89
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0x283]
mov eax, dword [eax*4 + 0x502438f4]
push eax
mov eax, dword [ebp - 4]
call sym.vcl120.bpl__Controls_TWinControl_GetHandle_qqrv
push eax
call sub.user32.dll_ShowWindow
jmp 0x501f4f89
xor eax, eax
push ebp
push 0x501f4e73
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov si, 0xffac
call sub.rtl120.bpl__System__CallDynaInst_qqrv
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x501f4e8a
mov eax, dword [sym.vcl120.bpl__Forms_Screen]
mov eax, dword [eax + 0x64]
cmp eax, dword [ebp - 4]
jne 0x501f4ea1
xor edx, edx
mov eax, dword [ebp - 4]
call sym.vcl120.bpl__Forms_TCustomForm_MergeMenu_qqro
mov eax, dword [ebp - 4]
cmp byte [eax + 0x287], 1
jne 0x501f4ebd
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0xb0]
jmp 0x501f4f89
mov eax, dword [ebp - 4]
test byte [eax + 0x374], 8
je 0x501f4eeb
push 0x97
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call sym.vcl120.bpl__Controls_TWinControl_GetHandle_qqrv
push eax
call sub.user32.dll_SetWindowPos
jmp 0x501f4f89
xor ebx, ebx
mov eax, dword [ebp - 4]
call sym.vcl120.bpl__Controls_TWinControl_GetHandle_qqrv
mov esi, eax
call sub.user32.dll_GetActiveWindow
cmp esi, eax
jne 0x501f4f20
mov eax, dword [ebp - 4]
call sym.vcl120.bpl__Controls_TWinControl_GetHandle_qqrv
call fcn.501ed808
test eax, eax
jne 0x501f4f20
mov eax, dword [ebp - 4]
call sym.vcl120.bpl__Controls_TWinControl_GetHandle_qqrv
call fcn.501edb34
mov ebx, eax
test ebx, ebx
je 0x501f4f49
push 0x97
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call sym.vcl120.bpl__Controls_TWinControl_GetHandle_qqrv
push eax
call sub.user32.dll_SetWindowPos
push ebx
call sub.user32.dll_SetActiveWindow
jmp 0x501f4f89
push 0
mov eax, dword [ebp - 4]
call sym.vcl120.bpl__Controls_TWinControl_GetHandle_qqrv
push eax
call sub.user32.dll_ShowWindow
jmp 0x501f4f89
mov eax, dword [ebp - 4]
test byte [eax + 0x1c], 0x10
je 0x501f4f89
mov eax, dword [ebp - 4]
cmp dword [eax + 0x30], 0
je 0x501f4f89
mov eax, dword [ebp - 4]
cmp byte [eax + 0x1e2], 0
je 0x501f4f89
push 1
mov eax, dword [ebp - 4]
call sym.vcl120.bpl__Controls_TWinControl_GetHandle_qqrv
push eax
call sub.user32.dll_ShowWindow
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x501f4fa8
mov eax, dword [ebp - 4]
and byte [eax + 0x374], 0xfb
ret