Function at 0x505884
Capabilities:
Hide graphical window

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffac
mov byte [esp], dl
mov ebx, eax
mov esi, dword [ebx + 0x8c]
mov edi, dword [ebx + 0x9c]
test esi, esi
je 0x505ebc
test edi, edi
je 0x505ebc
mov eax, edi
call fcn.004918f8
test al, al
je 0x505ebc
mov eax, esi
call fcn.004918f8
test al, al
je 0x505ebc
mov eax, ebx
call fcn.00505854
test al, al
je 0x50591e
mov eax, esi
call fcn.00491544
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x5058f5
push 0
mov eax, esi
call fcn.00491544
push eax
call sub.user32.dll_ShowWindow
mov eax, edi
call fcn.00491544
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x505ebc
push 0
mov eax, edi
call fcn.00491544
push eax
call sub.user32.dll_ShowWindow
jmp 0x505ebc
mov byte [esp + 0x18], 0
lea edx, [esp + 0x24]
mov eax, ebx
call fcn.00506244
mov dword [esp + 4], 0x7fffffff
mov dword [esp + 8], 0x7fffffff
mov dword [esp + 0xc], 0x80000001
mov dword [esp + 0x10], 0x80000001
mov eax, ebx
call fcn.0050659c
call fcn.004f7c98
dec eax
test eax, eax
jl 0x505a5c
inc eax
mov dword [esp + 0x1c], eax
xor ebp, ebp
mov eax, ebx
call fcn.0050659c
mov edx, ebp
call fcn.004f7ce4
cmp byte [eax + 0x61], 0
je 0x505a51
mov eax, ebx
call fcn.0050659c
mov edx, ebp
call fcn.004f7ce4
call fcn.00491544
cmp eax, dword [ebx + 0x3c]
je 0x505a51
mov eax, ebx
call fcn.0050659c
mov dword [esp + 0x20], eax
lea eax, [esp + 0x34]
push eax
mov edx, ebp
mov eax, dword [esp + 0x24]
call fcn.004f7ce4
call fcn.00491544
push eax
call sub.user32.dll_GetWindowRect
lea eax, [esp + 0x44]
push eax
mov eax, dword [ebx + 8]
mov eax, dword [eax + 0x384]
push eax
call sub.user32.dll_GetWindowRect
mov ecx, dword [esp + 0x48]
neg ecx
mov edx, dword [esp + 0x44]
neg edx
lea eax, [esp + 0x34]
call fcn.0040d094
mov eax, dword [esp + 0x34]
cmp eax, dword [esp + 4]
jge 0x5059fb
mov dword [esp + 4], eax
mov eax, dword [esp + 0x38]
cmp eax, dword [esp + 8]
jge 0x505a09
mov dword [esp + 8], eax
lea eax, [esp + 0x34]
call fcn.0040c9c4
add eax, dword [esp + 0x34]
cmp eax, dword [esp + 0xc]
jle 0x505a2d
lea eax, [esp + 0x34]
call fcn.0040c9c4
add eax, dword [esp + 0x34]
mov dword [esp + 0xc], eax
lea eax, [esp + 0x34]
call fcn.0040c9cc
add eax, dword [esp + 0x38]
cmp eax, dword [esp + 0x10]
jle 0x505a51
lea eax, [esp + 0x34]
call fcn.0040c9cc
add eax, dword [esp + 0x38]
mov dword [esp + 0x10], eax
inc ebp
dec dword [esp + 0x1c]
jne 0x50596a
cmp dword [esp + 4], 0
jl 0x505a76
lea eax, [esp + 0x24]
call fcn.0040c9c4
cmp eax, dword [esp + 0xc]
jl 0x505a76
xor eax, eax
jmp 0x505a78
mov al, 1
mov byte [esp + 0x19], al
cmp dword [esp + 8], 0
jl 0x505a96
lea eax, [esp + 0x24]
call fcn.0040c9cc
cmp eax, dword [esp + 0x10]
jl 0x505a96
xor eax, eax
jmp 0x505a98
mov al, 1
mov byte [esp + 0x1a], al
cmp byte [esp + 0x1a], 0
je 0x505acd
cmp byte [esp + 0x19], 0
jne 0x505acd
cmp dword [esp + 4], 0
jl 0x505ac7
lea eax, [esp + 0x24]
call fcn.0040c9c4
sub eax, dword [edi + 0x50]
cmp eax, dword [esp + 0xc]
jl 0x505ac7
xor eax, eax
jmp 0x505ac9
mov al, 1
mov byte [esp + 0x19], al
cmp byte [esp + 0x19], 0
je 0x505afe
cmp byte [esp + 0x1a], 0
jne 0x505afe
cmp dword [esp + 8], 0
jl 0x505af8
lea eax, [esp + 0x24]
call fcn.0040c9cc
sub eax, dword [esi + 0x54]
cmp eax, dword [esp + 0x10]
jl 0x505af8
xor eax, eax
jmp 0x505afa
mov al, 1
mov byte [esp + 0x1a], al
cmp byte [esp + 0x19], 0
je 0x505b58
mov eax, esi
call fcn.00491544
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
jne 0x505b58
push 0x40
mov eax, dword [esi + 0x54]
push eax
lea eax, [esp + 0x2c]
call fcn.0040c9c4
push eax
mov eax, dword [esp + 0x3c]
sub eax, dword [esi + 0x54]
push eax
mov eax, dword [esp + 0x34]
push eax
push 0
mov eax, esi
call fcn.00491544
push eax
call sub.user32.dll_SetWindowPos
push 5
mov eax, esi
call fcn.00491544
push eax
call sub.user32.dll_ShowWindow
mov byte [esp + 0x18], 1
jmp 0x505b84
cmp byte [esp + 0x19], 0
jne 0x505b84
mov eax, esi
call fcn.00491544
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x505b84
push 0
mov eax, esi
call fcn.00491544
push eax
call sub.user32.dll_ShowWindow
mov byte [esp + 0x18], 1
cmp byte [esp + 0x1a], 0
je 0x505c18
mov eax, edi
call fcn.00491544
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
jne 0x505c18
cmp byte [esp + 0x19], 0
je 0x505bd7
push 0x40
lea eax, [esp + 0x28]
call fcn.0040c9cc
sub eax, dword [esi + 0x54]
push eax
mov ebp, dword [edi + 0x50]
push ebp
mov eax, dword [esp + 0x34]
push eax
mov eax, dword [esp + 0x3c]
sub eax, ebp
push eax
push 0
mov eax, edi
call fcn.00491544
push eax
call sub.user32.dll_SetWindowPos
jmp 0x505c02
push 0x40
lea eax, [esp + 0x28]
call fcn.0040c9cc
push eax
mov ebp, dword [edi + 0x50]
push ebp
mov eax, dword [esp + 0x34]
push eax
mov eax, dword [esp + 0x3c]
sub eax, ebp
push eax
push 0
mov eax, edi
call fcn.00491544
push eax
call sub.user32.dll_SetWindowPos
push 5
mov eax, edi
call fcn.00491544
push eax
call sub.user32.dll_ShowWindow
mov byte [esp + 0x18], 1
jmp 0x505c44
cmp byte [esp + 0x1a], 0
jne 0x505c44
mov eax, edi
call fcn.00491544
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x505c44
push 0
mov eax, edi
call fcn.00491544
push eax
call sub.user32.dll_ShowWindow
mov byte [esp + 0x18], 1
lea eax, [esp + 0x24]
call fcn.0040c9c4
mov ebp, eax
lea eax, [esp + 0x24]
call fcn.0040c9cc
mov dword [esp + 0x14], eax
mov eax, ebx
call fcn.00506024
mov eax, esi
call fcn.00491544
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x505d10
cmp dword [esp + 4], 0
jle 0x505c85
xor eax, eax
mov dword [esp + 4], eax
lea eax, [esp + 0x24]
call fcn.0040c9c4
cmp eax, dword [esp + 0xc]
jle 0x505ca1
lea eax, [esp + 0x24]
call fcn.0040c9c4
mov dword [esp + 0xc], eax
cmp byte [esp], 0
je 0x505d02
mov byte [ebx + 0x98], 1
mov eax, edi
call fcn.00491544
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x505ccd
mov edx, ebp
sub edx, dword [edi + 0x50]
mov eax, esi
call fcn.004a1c38
jmp 0x505cd6
mov edx, ebp
mov eax, esi
call fcn.004a1c38
mov eax, dword [esp + 0xc]
sub eax, dword [esp + 4]
dec eax
push eax
mov edx, dword [esp + 8]
neg edx
xor ecx, ecx
mov eax, esi
call fcn.004a1a64
mov eax, dword [esi + 0x27c]
mov dword [ebx + 0xb8], eax
mov byte [ebx + 0x98], 0
movzx eax, word [esi + 0x288]
mov word [esi + 0x292], ax
mov eax, edi
call fcn.00491544
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x505dc1
cmp dword [esp + 8], 0
jle 0x505d32
xor eax, eax
mov dword [esp + 8], eax
lea eax, [esp + 0x24]
call fcn.0040c9cc
cmp eax, dword [esp + 0x10]
jle 0x505d4e
lea eax, [esp + 0x24]
call fcn.0040c9cc
mov dword [esp + 0x10], eax
cmp byte [esp], 0
je 0x505db3
mov byte [ebx + 0x99], 1
mov eax, esi
call fcn.00491544
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x505d7c
mov edx, dword [esp + 0x14]
sub edx, dword [esi + 0x54]
mov eax, edi
call fcn.004a1c38
jmp 0x505d87
mov edx, dword [esp + 0x14]
mov eax, edi
call fcn.004a1c38
mov eax, dword [esp + 0x10]
sub eax, dword [esp + 8]
dec eax
push eax
mov edx, dword [esp + 0xc]
neg edx
xor ecx, ecx
mov eax, edi
call fcn.004a1a64
mov eax, dword [edi + 0x27c]
mov dword [ebx + 0xbc], eax
mov byte [ebx + 0x99], 0
movzx eax, word [edi + 0x288]
mov word [edi + 0x292], ax
mov eax, esi
call fcn.00491544
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
jne 0x505de8
mov eax, edi
call fcn.00491544
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
jne 0x505de8
mov byte [esp + 0x18], 0
mov eax, esi
call fcn.00491544
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x505e60
mov eax, edi
call fcn.00491544
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x505e60
mov eax, dword [ebx + 0x94]
call fcn.00491544
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
jne 0x505e60
push 0x40
mov eax, dword [esi + 0x54]
push eax
mov ebp, dword [edi + 0x50]
push ebp
mov eax, dword [esp + 0x3c]
sub eax, dword [esi + 0x54]
push eax
mov eax, dword [esp + 0x3c]
sub eax, ebp
push eax
push 0
mov eax, dword [ebx + 0x94]
call fcn.00491544
push eax
call sub.user32.dll_SetWindowPos
push 5
mov eax, dword [ebx + 0x94]
call fcn.00491544
push eax
call sub.user32.dll_ShowWindow
jmp 0x505eaa
mov eax, esi
call fcn.00491544
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x505e97
mov eax, edi
call fcn.00491544
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
jne 0x505eaa
mov eax, dword [ebx + 0x94]
call fcn.00491544
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x505eaa
push 0
mov eax, dword [ebx + 0x94]
call fcn.00491544
push eax
call sub.user32.dll_ShowWindow
cmp byte [esp + 0x18], 0
je 0x505ebc
movzx edx, byte [esp]
mov eax, ebx
call fcn.00505884
add esp, 0x54
pop ebp
pop edi
pop esi
pop ebx
ret