Function at 0x50111c
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 [0x674d48], 0
jne 0x501927
mov eax, dword [0x672094]
mov eax, dword [eax]
cmp byte [eax + 0x16d], 0
jne 0x501927
mov eax, dword [0x672680]
cmp byte [eax], 0
jne 0x501927
mov eax, dword [ebp - 4]
cmp byte [eax + 0x271], 0
jne 0x501927
call fcn.005397f4
test eax, eax
je 0x501182
call fcn.005397f4
cmp byte [eax + 0x45c], 0
jne 0x501927
mov byte [0x674d48], 1
mov eax, dword [ebp - 4]
mov byte [eax + 0x270], 0
call fcn.005397f4
call fcn.004d66c4
call fcn.005397f4
test eax, eax
je 0x5011b9
call fcn.005397f4
mov byte [eax + 0x44b], 0
mov dl, 0xff
call fcn.005e7788
mov eax, dword [ebp - 4]
call fcn.006480a8
xor edx, edx
push ebp
push 0x50189f
push dword fs:[edx]
mov dword fs:[edx], esp
call fcn.004da2b4
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x1ec]
call fcn.004f4734
call fcn.004da2b4
call fcn.004f4dc0
call fcn.004da2b4
call fcn.004f4ed0
call fcn.004da2b4
call fcn.004f4fb4
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1ec]
call fcn.0064d014
call fcn.005397f4
push eax
call fcn.005397ec
pop edx
call fcn.00539468
mov eax, dword [0x672428]
cmp byte [eax + 0x14c], 1
jne 0x501247
mov eax, dword [ebp - 4]
cmp byte [eax + 0x294], 0
je 0x501261
mov eax, dword [0x672428]
test byte [eax + 0x16f], 2
jne 0x501261
mov eax, dword [ebp - 4]
call fcn.004ff12c
test al, al
jne 0x501261
mov eax, dword [0x672558]
cmp byte [eax], 0
je 0x5012ea
push ebp
call fcn.004ff38c
pop ecx
mov eax, dword [ebp - 4]
call fcn.004ff12c
test al, al
je 0x5012a6
mov eax, dword [ebp - 4]
call fcn.004ff17c
test al, al
je 0x5012a6
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
call fcn.00646a88
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
call fcn.0064a424
push eax
call sub.user32.dll_ShowWindow
jmp 0x501312
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
call fcn.00614f44
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
call fcn.00646a90
mov eax, dword [ebp - 4]
cmp byte [eax + 0x28d], 0
je 0x501312
mov eax, dword [ebp - 4]
mov byte [eax + 0x28d], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
xor edx, edx
call fcn.006147b0
jmp 0x501312
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
test eax, eax
je 0x501312
call fcn.00646a88
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
call fcn.0064a424
push eax
call sub.user32.dll_ShowWindow
mov eax, dword [ebp - 4]
cmp dword [eax + 0x260], 0
je 0x5014bc
mov eax, dword [ebp - 4]
call fcn.004ff12c
test al, al
je 0x50137c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
xor edx, edx
call fcn.006461dc
call fcn.004798b0
cmp al, 2
jne 0x50135a
mov eax, dword [ebp - 4]
call fcn.006463f0
mov edi, eax
call fcn.00499420
sub edi, eax
jmp 0x50135c
xor edi, edi
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
mov edx, edi
call fcn.00646310
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
call fcn.0064a384
jmp 0x5013bd
call fcn.004798b0
sub al, 1
jb 0x501389
je 0x50139b
jmp 0x5013ad
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
mov dl, 1
call fcn.006461dc
jmp 0x5013bd
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
mov dl, 3
call fcn.006461dc
jmp 0x5013bd
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
mov dl, 4
call fcn.006461dc
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
cmp byte [eax + 0x3a], 0
je 0x5014bc
call fcn.004798b0
sub al, 1
jb 0x5013dd
je 0x5013fd
jmp 0x501407
mov eax, dword [ebp - 4]
call fcn.004ff12c
test al, al
je 0x5013f3
mov al, byte [0x501930]
mov byte [ebp - 5], al
jmp 0x50140f
mov al, byte [0x501934]
mov byte [ebp - 5], al
jmp 0x50140f
mov al, byte [0x501938]
mov byte [ebp - 5], al
jmp 0x50140f
mov al, byte [0x50193c]
mov byte [ebp - 5], al
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
mov eax, dword [eax + 0x124]
mov edi, dword [eax + 0x18]
dec edi
cmp edi, 0
jl 0x5014bc
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
mov eax, dword [eax + 0x124]
mov eax, dword [eax + 0x1c]
mov esi, dword [eax + edi*4]
mov bl, byte [ebp - 5]
cmp edi, 0x1e
jne 0x501473
call fcn.004798b0
test al, al
je 0x501473
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
mov eax, dword [eax + 0x128]
and eax, dword [0x501940]
mov edx, dword [0x501944]
cmp edx, eax
jne 0x501473
and bl, 0xf7
mov eax, ebx
cmp al, byte [esi + 0x157]
je 0x5014b2
mov al, byte [esi + 0x157]
and al, byte [0x501948]
push eax
mov al, byte [0x501948]
and al, bl
pop edx
cmp al, dl
jne 0x5014a5
mov byte [esi + 0x157], bl
mov eax, esi
call fcn.00612a1c
jmp 0x5014b2
mov byte [esi + 0x157], bl
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x38]
dec edi
cmp edi, 0xffffffff
jne 0x50142b
mov eax, dword [ebp - 4]
mov byte [eax + 0x28e], 0
call fcn.005397f4
test eax, eax
je 0x501505
xor ebx, ebx
xor eax, eax
mov al, bl
mov edx, dword [ebp - 4]
mov eax, dword [edx + eax*4 + 0x26c]
test eax, eax
je 0x5014f5
xor edx, edx
mov dl, bl
mov ecx, dword [ebp - 4]
mov eax, dword [eax + 0x19c]
call fcn.00613844
inc ebx
cmp bl, 1
jne 0x5014d1
call fcn.00452290
call fcn.0044f8ac
push ebp
call fcn.004ffa3c
pop ecx
push ebp
call fcn.004ffc54
pop ecx
push ebp
call fcn.00500f3c
pop ecx
mov eax, dword [0x672994]
cmp dword [eax], 0
je 0x50153d
mov eax, dword [0x672994]
mov eax, dword [eax]
cmp byte [eax + 0x3a], 0
je 0x50153d
mov eax, dword [0x672994]
mov eax, dword [eax]
call fcn.004c4d04
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x264]
test ebx, ebx
je 0x5016db
cmp byte [ebx + 0x3a], 0
je 0x5016db
and word [ebx + 0xbc], 0xfbff
mov eax, dword [0x672428]
test byte [eax + 0x146], 1
jne 0x50158b
call fcn.0053a574
dec eax
sub al, 2
jae 0x50158b
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x264]
or word [eax + 0xbc], 0x400
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x260]
test ebx, ebx
je 0x501672
cmp byte [ebx + 0x3a], 0
je 0x501672
mov eax, dword [ebp - 4]
call fcn.004ff12c
test al, al
jne 0x501672
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
call fcn.00646394
call fcn.0053a574
cmp al, 1
jne 0x5015fd
call fcn.004798b0
test al, al
jne 0x5015fd
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x264]
mov eax, dword [eax + 0x2c]
cmp eax, dword [ebp - 0x1c]
jge 0x5015fd
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x264]
mov edx, dword [ebp - 0x1c]
call fcn.00646330
jmp 0x501672
call fcn.0053a574
cmp al, 3
jne 0x501633
call fcn.004798b0
cmp al, 1
jne 0x501633
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x264]
mov eax, dword [eax + 0x28]
cmp eax, dword [ebp - 0x20]
jge 0x501633
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x264]
mov edx, dword [ebp - 0x20]
call fcn.00646310
jmp 0x501672
call fcn.0053a574
cmp al, 4
jne 0x501672
call fcn.004798b0
cmp al, 2
jne 0x501672
lea edx, [ebp - 0x58]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x264]
call fcn.00646394
mov eax, dword [ebp - 0x50]
cmp eax, dword [ebp - 0x28]
jle 0x501672
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x264]
mov edx, dword [ebp - 0x28]
sub edx, dword [eax + 0x30]
call fcn.00646310
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x268]
test ebx, ebx
je 0x5016db
cmp byte [ebx + 0x3a], 0
je 0x5016db
call fcn.0053a574
cmp al, 2
jne 0x5016db
lea edx, [ebp - 0x58]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x264]
call fcn.00646394
mov eax, dword [ebp - 0x4c]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x268]
cmp eax, dword [edx + 0x2c]
jle 0x5016db
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x264]
mov eax, dword [ebx + 0x34]
mov edx, 1
call fcn.0065b294
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x268]
mov edx, dword [edx + 0x2c]
sub edx, eax
mov eax, ebx
call fcn.00646330
call fcn.00510270
test eax, eax
je 0x50182b
call fcn.00510270
cmp byte [eax + 0x3a], 0
je 0x50182b
mov eax, dword [0x672428]
mov al, byte [eax + 0x15f]
sub al, 1
jb 0x50170a
je 0x501715
jmp 0x501720
call fcn.00510270
mov esi, eax
xor ebx, ebx
jmp 0x50172e
xor esi, esi
call fcn.00510270
mov ebx, eax
jmp 0x50172e
call fcn.00510270
mov esi, eax
call fcn.00510278
mov ebx, eax
mov eax, dword [ebp - 4]
mov edi, dword [eax + 0x260]
test edi, edi
je 0x5017a9
cmp byte [edi + 0x3a], 0
je 0x5017a9
mov eax, dword [ebp - 4]
call fcn.004ff12c
test al, al
jne 0x5017a9
lea edx, [ebp - 0x38]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
call fcn.00646394
test esi, esi
je 0x50177d
call fcn.004798b0
cmp al, 1
jne 0x50177d
mov eax, dword [esi + 0x28]
cmp eax, dword [ebp - 0x30]
jge 0x50177d
mov edx, dword [ebp - 0x30]
mov eax, esi
call fcn.00646310
test ebx, ebx
je 0x5017a9
call fcn.004798b0
cmp al, 2
jne 0x5017a9
lea edx, [ebp - 0x58]
mov eax, ebx
call fcn.00646394
mov eax, dword [ebp - 0x50]
cmp eax, dword [ebp - 0x38]
jle 0x5017a9
mov edx, dword [ebp - 0x38]
sub edx, dword [ebx + 0x30]
mov eax, ebx
call fcn.00646310
mov eax, dword [ebp - 4]
mov edi, dword [eax + 0x264]
test edi, edi
je 0x501811
cmp byte [edi + 0x3a], 0
je 0x501811
lea edx, [ebp - 0x48]
mov eax, edi
call fcn.00646394
test esi, esi
je 0x5017e5
call fcn.0053a574
cmp al, 3
jne 0x5017e5
mov eax, dword [esi + 0x28]
cmp eax, dword [ebp - 0x40]
jge 0x5017e5
mov edx, dword [ebp - 0x40]
mov eax, esi
call fcn.00646310
test ebx, ebx
je 0x501811
call fcn.0053a574
cmp al, 4
jne 0x501811
lea edx, [ebp - 0x58]
mov eax, ebx
call fcn.00646394
mov eax, dword [ebp - 0x50]
cmp eax, dword [ebp - 0x48]
jle 0x501811
mov edx, dword [ebp - 0x48]
sub edx, dword [ebx + 0x30]
mov eax, ebx
call fcn.00646310
test esi, esi
je 0x50181e
mov dl, 3
mov eax, esi
call fcn.006461dc
test ebx, ebx
je 0x50182b
mov dl, 4
mov eax, ebx
call fcn.006461dc
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x268]
cmp byte [ebx + 0x3a], 0
je 0x501895
and word [ebx + 0xbc], 0xfbff
mov eax, dword [0x672428]
test byte [eax + 0x146], 2
jne 0x501895
mov eax, dword [0x672428]
test byte [eax + 0x146], 1
je 0x501883
mov eax, dword [ebp - 4]
cmp dword [eax + 0x264], 0
je 0x501883
call fcn.0053a574
cmp al, 2
jne 0x501883
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x264]
cmp byte [eax + 0x3a], 0
jne 0x501895
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x268]
or word [eax + 0xbc], 0x400
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5018a9
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x260]
test ebx, ebx
je 0x5018c0
lea edx, [ebp - 0x18]
mov eax, ebx
call fcn.00646394
mov eax, dword [ebp - 4]
call fcn.006480b0
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x260]
test ebx, ebx
je 0x501906
cmp byte [ebx + 0x3a], 0
je 0x501906
lea eax, [ebp - 0x18]
push eax
lea edx, [ebp - 0x58]
mov eax, ebx
call fcn.00646394
lea eax, [ebp - 0x58]
push eax
call sub.user32.dll_EqualRect
test eax, eax
jne 0x501906
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
xor edx, edx
call fcn.006147b0
call fcn.005397f4
test eax, eax
je 0x50191b
call fcn.005397f4
mov byte [eax + 0x44b], 0
call fcn.004d66e0
mov byte [0x674d48], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret