Function at 0x505f28
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 4], eax
cmp byte [0x672f4c], 0
jne 0x506663
mov eax, dword [0x66ea7c]
mov eax, dword [eax]
cmp byte [eax + 0x16d], 0
jne 0x506663
mov eax, dword [0x66fa60]
cmp byte [eax], 0
jne 0x506663
cmp byte [0x672ead], 0
jne 0x506663
call fcn.00539564
test eax, eax
je 0x505f8b
call fcn.00539564
cmp byte [eax + 0x464], 0
jne 0x506663
mov byte [0x672f4c], 1
mov byte [0x672eac], 0
call fcn.00539564
call fcn.004e0998
call fcn.00539564
test eax, eax
je 0x505fbf
call fcn.00539564
mov byte [eax + 0x453], 0
mov dl, 0xff
call fcn.005e3244
mov eax, dword [ebp - 4]
call fcn.006414d8
xor edx, edx
push ebp
push 0x5065dc
push dword fs:[edx]
mov dword fs:[edx], esp
call fcn.004e30e4
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x1f0]
call fcn.004fa908
call fcn.004e30e4
call fcn.004fae90
call fcn.004e30e4
call fcn.004fafa0
call fcn.004e30e4
call fcn.004fb084
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1f0]
call fcn.006463dc
call fcn.00539564
call fcn.0048cb38
mov eax, dword [0x66fc50]
cmp byte [eax + 8], 1
jne 0x50603d
cmp byte [0x672ee8], 0
je 0x506053
mov eax, dword [0x66fc50]
test byte [eax + 0x2b], 2
jne 0x506053
mov eax, dword [ebp - 4]
call fcn.00504274
test al, al
jne 0x506053
mov eax, dword [0x66f704]
cmp byte [eax], 0
je 0x5060c2
push ebp
call fcn.005044b0
pop ecx
mov eax, dword [ebp - 4]
call fcn.00504274
test al, al
je 0x506090
mov eax, dword [ebp - 4]
call fcn.005042b8
test al, al
je 0x506090
mov eax, dword [0x672ed4]
call fcn.0063fe74
push 0
mov eax, dword [0x672ed4]
call fcn.00643864
push eax
call sub.user32.dll_ShowWindow
jmp 0x5060e7
mov eax, dword [0x672ed4]
call fcn.0060e4fc
mov eax, dword [0x672ed4]
call fcn.0063fe7c
cmp byte [0x672ec7], 0
je 0x5060e7
mov byte [0x672ec7], 0
xor edx, edx
mov eax, dword [0x672ed4]
call fcn.0060dddc
jmp 0x5060e7
cmp dword [0x672ed4], 0
je 0x5060e7
mov eax, dword [0x672ed4]
call fcn.0063fe74
push 0
mov eax, dword [0x672ed4]
call fcn.00643864
push eax
call sub.user32.dll_ShowWindow
cmp dword [0x672ed4], 0
je 0x506256
mov eax, dword [ebp - 4]
call fcn.00504274
test al, al
je 0x506140
xor edx, edx
mov eax, dword [0x672ed4]
call fcn.0063f5a0
xor esi, esi
call fcn.0048cb84
cmp al, 2
jne 0x506128
mov eax, dword [ebp - 4]
call fcn.0063f7b4
mov esi, eax
call fcn.004a6920
sub esi, eax
mov edx, esi
mov eax, dword [0x672ed4]
call fcn.0063f6f8
mov eax, dword [0x672ed4]
call fcn.006437c0
jmp 0x506163
call fcn.0048cb84
sub al, 1
jb 0x50614d
je 0x506151
jmp 0x506155
mov al, 1
jmp 0x506157
mov al, 3
jmp 0x506157
mov al, 4
mov edx, eax
mov eax, dword [0x672ed4]
call fcn.0063f5a0
mov eax, dword [0x672ed4]
cmp byte [eax + 0x3a], 0
je 0x506256
call fcn.0048cb84
sub al, 1
jb 0x50617f
je 0x50619f
jmp 0x5061a9
mov eax, dword [ebp - 4]
call fcn.00504274
test al, al
je 0x506195
mov al, byte [0x50666c]
mov byte [ebp - 5], al
jmp 0x5061b1
mov al, byte [0x506670]
mov byte [ebp - 5], al
jmp 0x5061b1
mov al, byte [0x506674]
mov byte [ebp - 5], al
jmp 0x5061b1
mov al, byte [0x506678]
mov byte [ebp - 5], al
mov eax, dword [0x672ed4]
mov eax, dword [eax + 0x124]
mov esi, dword [eax + 0x18]
dec esi
cmp esi, 0
jl 0x506256
mov eax, dword [0x672ed4]
mov eax, dword [eax + 0x124]
mov eax, dword [eax + 0x1c]
mov edi, dword [eax + esi*4]
mov bl, byte [ebp - 5]
cmp esi, 0x1e
jne 0x506209
call fcn.0048cb84
test al, al
je 0x506209
mov eax, dword [0x672ed4]
mov eax, dword [eax + 0x128]
and eax, dword [0x50667c]
mov edx, dword [0x506680]
cmp edx, eax
jne 0x506209
and bl, 0xf7
mov eax, ebx
cmp al, byte [edi + 0x157]
je 0x50624c
mov al, byte [edi + 0x157]
and al, byte [0x506684]
push eax
mov al, byte [0x506684]
and al, bl
pop edx
cmp al, dl
jne 0x50623b
mov byte [edi + 0x157], bl
mov eax, edi
call fcn.0060c060
jmp 0x50624c
mov byte [edi + 0x157], bl
mov eax, edi
mov bx, 0xffe8
call fcn.00403254
dec esi
cmp esi, 0xffffffff
jne 0x5061c9
mov byte [0x672ec8], 0
call fcn.00539564
test eax, eax
je 0x50628f
mov bl, 1
mov esi, 0x672ed8
mov eax, dword [esi]
test eax, eax
je 0x50627e
mov eax, dword [eax + 0x1a0]
call fcn.0060ce60
add esi, 4
dec bl
jne 0x50626d
call fcn.004651e4
call fcn.004629d8
push ebp
call fcn.00504ad8
pop ecx
push ebp
call fcn.00504cdc
pop ecx
call fcn.00505d6c
mov eax, dword [0x670318]
cmp dword [eax], 0
je 0x5062c5
mov eax, dword [0x670318]
mov eax, dword [eax]
cmp byte [eax + 0x3a], 0
je 0x5062c5
mov eax, dword [0x670318]
mov eax, dword [eax]
call fcn.004d0f34
cmp dword [0x672edc], 0
je 0x506436
mov eax, dword [0x672edc]
cmp byte [eax + 0x3a], 0
je 0x506436
mov eax, dword [0x672edc]
and word [eax + 0xbc], 0xfbff
mov eax, dword [0x66fc50]
test byte [eax + 2], 1
jne 0x506312
call fcn.0053afa8
dec eax
sub al, 2
jae 0x506312
mov eax, dword [0x672edc]
or word [eax + 0xbc], 0x400
cmp dword [0x672ed4], 0
je 0x5063dd
mov eax, dword [0x672ed4]
cmp byte [eax + 0x3a], 0
je 0x5063dd
mov eax, dword [ebp - 4]
call fcn.00504274
test al, al
jne 0x5063dd
lea edx, [ebp - 0x28]
mov eax, dword [0x672ed4]
call fcn.0063f758
call fcn.0053afa8
cmp al, 1
jne 0x506379
call fcn.0048cb84
test al, al
jne 0x506379
mov eax, dword [0x672edc]
mov eax, dword [eax + 0x2c]
cmp eax, dword [ebp - 0x1c]
jge 0x506379
mov edx, dword [ebp - 0x1c]
mov eax, dword [0x672edc]
call fcn.0063f710
jmp 0x5063dd
call fcn.0053afa8
cmp al, 3
jne 0x5063a7
call fcn.0048cb84
cmp al, 1
jne 0x5063a7
mov eax, dword [0x672edc]
mov eax, dword [eax + 0x28]
cmp eax, dword [ebp - 0x20]
jge 0x5063a7
mov edx, dword [ebp - 0x20]
mov eax, dword [0x672edc]
call fcn.0063f6f8
jmp 0x5063dd
call fcn.0053afa8
cmp al, 4
jne 0x5063dd
call fcn.0048cb84
cmp al, 2
jne 0x5063dd
mov eax, dword [0x672edc]
call fcn.0063f604
cmp eax, dword [ebp - 0x28]
jle 0x5063dd
mov eax, dword [0x672edc]
mov edx, dword [ebp - 0x28]
sub edx, dword [eax + 0x30]
mov eax, dword [0x672edc]
call fcn.0063f6f8
cmp dword [0x672ee0], 0
je 0x506436
mov eax, dword [0x672ee0]
cmp byte [eax + 0x3a], 0
je 0x506436
call fcn.0053afa8
cmp al, 2
jne 0x506436
mov eax, dword [0x672edc]
call fcn.0063f610
mov edx, dword [0x672ee0]
cmp eax, dword [edx + 0x2c]
jle 0x506436
mov eax, dword [0x672edc]
mov eax, dword [eax + 0x34]
mov edx, 1
call fcn.00653540
mov edx, dword [0x672ee0]
mov edx, dword [edx + 0x2c]
sub edx, eax
mov eax, dword [0x672edc]
call fcn.0063f710
call fcn.00513e40
test eax, eax
je 0x506578
call fcn.00513e40
cmp byte [eax + 0x3a], 0
je 0x506578
mov eax, dword [0x66fc50]
mov al, byte [eax + 0x1b]
sub al, 1
jb 0x506462
je 0x50646d
jmp 0x506478
call fcn.00513e40
mov esi, eax
xor ebx, ebx
jmp 0x506486
xor esi, esi
call fcn.00513e40
mov ebx, eax
jmp 0x506486
call fcn.00513e40
mov esi, eax
call fcn.00513e48
mov ebx, eax
cmp dword [0x672ed4], 0
je 0x5064f8
mov eax, dword [0x672ed4]
cmp byte [eax + 0x3a], 0
je 0x5064f8
mov eax, dword [ebp - 4]
call fcn.00504274
test al, al
jne 0x5064f8
lea edx, [ebp - 0x38]
mov eax, dword [0x672ed4]
call fcn.0063f758
test esi, esi
je 0x5064d2
call fcn.0048cb84
cmp al, 1
jne 0x5064d2
mov eax, dword [esi + 0x28]
cmp eax, dword [ebp - 0x30]
jge 0x5064d2
mov edx, dword [ebp - 0x30]
mov eax, esi
call fcn.0063f6f8
test ebx, ebx
je 0x5064f8
call fcn.0048cb84
cmp al, 2
jne 0x5064f8
mov eax, ebx
call fcn.0063f604
cmp eax, dword [ebp - 0x38]
jle 0x5064f8
mov edx, dword [ebp - 0x38]
sub edx, dword [ebx + 0x30]
mov eax, ebx
call fcn.0063f6f8
cmp dword [0x672edc], 0
je 0x50655e
mov eax, dword [0x672edc]
cmp byte [eax + 0x3a], 0
je 0x50655e
lea edx, [ebp - 0x48]
mov eax, dword [0x672edc]
call fcn.0063f758
test esi, esi
je 0x506538
call fcn.0053afa8
cmp al, 3
jne 0x506538
mov eax, dword [esi + 0x28]
cmp eax, dword [ebp - 0x40]
jge 0x506538
mov edx, dword [ebp - 0x40]
mov eax, esi
call fcn.0063f6f8
test ebx, ebx
je 0x50655e
call fcn.0053afa8
cmp al, 4
jne 0x50655e
mov eax, ebx
call fcn.0063f604
cmp eax, dword [ebp - 0x48]
jle 0x50655e
mov edx, dword [ebp - 0x48]
sub edx, dword [ebx + 0x30]
mov eax, ebx
call fcn.0063f6f8
test esi, esi
je 0x50656b
mov dl, 3
mov eax, esi
call fcn.0063f5a0
test ebx, ebx
je 0x506578
mov dl, 4
mov eax, ebx
call fcn.0063f5a0
mov eax, dword [0x672ee0]
cmp byte [eax + 0x3a], 0
je 0x5065d2
mov eax, dword [0x672ee0]
and word [eax + 0xbc], 0xfbff
mov eax, dword [0x66fc50]
test byte [eax + 2], 2
jne 0x5065d2
mov eax, dword [0x66fc50]
test byte [eax + 2], 1
je 0x5065c4
cmp dword [0x672edc], 0
je 0x5065c4
call fcn.0053afa8
cmp al, 2
jne 0x5065c4
mov eax, dword [0x672edc]
cmp byte [eax + 0x3a], 0
jne 0x5065d2
mov eax, dword [0x672ee0]
or word [eax + 0xbc], 0x400
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5065e6
cmp dword [0x672ed4], 0
je 0x5065fc
lea edx, [ebp - 0x18]
mov eax, dword [0x672ed4]
call fcn.0063f758
mov eax, dword [ebp - 4]
call fcn.006414e0
cmp dword [0x672ed4], 0
je 0x506642
mov eax, dword [0x672ed4]
cmp byte [eax + 0x3a], 0
je 0x506642
lea eax, [ebp - 0x18]
push eax
lea edx, [ebp - 0x58]
mov eax, dword [0x672ed4]
call fcn.0063f758
lea eax, [ebp - 0x58]
push eax
call sub.user32.dll_EqualRect
test eax, eax
jne 0x506642
xor edx, edx
mov eax, dword [0x672ed4]
call fcn.0060dddc
call fcn.00539564
test eax, eax
je 0x506657
call fcn.00539564
mov byte [eax + 0x453], 0
call fcn.004e09b4
mov byte [0x672f4c], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret