Function at 0x4e9673
Capabilities:
Hide graphical window

Disassembly:
sub esp, 0x2c
push esi
mov esi, ecx
mov eax, dword [esi + 4]
push eax
call dword [0x5237dc]
test eax, eax
je 0x4e9aff
mov ecx, dword [esi + 4]
push ecx
call dword [0x5237ac]
test eax, eax
je 0x4e9aff
mov eax, dword [esi + 0xeaec]
test eax, eax
je 0x4e96b7
mov edx, dword [esp + 0x3c]
xor eax, eax
pop esi
mov dword [edx], 1
add esp, 0x2c
ret 0x10
cmp dword [esp + 0x34], 1
je 0x4e9aff
mov eax, dword [esi + 4]
push ebx
push ebp
push edi
push 2
push eax
call dword [0x523910]
mov ecx, dword [esp + 0x48]
mov ebp, dword [esp + 0x44]
mov dword [esi + 0xeae4], eax
mov ebx, ebp
mov dword [ecx], 1
mov edx, dword [esi + 4]
and ebx, 0xffff
push edx
shr ebp, 0x10
mov dword [esi + 0xeb3c], ebx
mov dword [esi + 0xeb40], ebp
call dword [0x52399c]
mov ecx, dword [esi + 0xeb48]
test eax, eax
mov dword [esp + 0x18], ecx
je 0x4e97f5
mov eax, ecx
lea edx, [ecx + ecx]
neg eax
mov dword [esp + 0x14], edx
mov ecx, dword [esi + 0xeb54]
mov edi, ecx
neg edi
sbb edi, edi
and edi, eax
mov dword [esp + 0x24], edi
lea eax, [edi + edi]
sub ebx, eax
sub ebp, eax
xor eax, eax
mov dword [esp + 0x1c], ebx
test edi, edi
setl al
dec eax
and eax, edi
mov dword [esp + 0x48], eax
mov eax, dword [esi + 0xeb14]
test eax, eax
je 0x4e9776
mov edx, dword [esi + 0xeb0c]
mov eax, ebx
sub eax, edx
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0xeb10]
test eax, eax
jne 0x4e9776
add edx, edi
mov dword [esp + 0x24], edx
test ecx, ecx
mov dword [esp + 0x10], 0
je 0x4e9826
test ebx, ebx
jle 0x4e9826
mov edx, dword [esi + 0x2b80]
lea ecx, [esi + 0x2b80]
call dword [edx + 0x30]
mov edx, dword [esi + 0x3a74]
mov ecx, eax
mov eax, ebx
sub eax, ecx
lea ecx, [esi + 0x3a74]
mov dword [esp + 0x44], eax
call dword [edx + 0x30]
mov ecx, dword [esp + 0x44]
sub ecx, eax
cmp ecx, 0xc8
mov dword [esp + 0x44], ecx
jge 0x4e97d0
mov dword [esp + 0x44], 0xc8
mov eax, dword [esi + 0x50]
lea ecx, [esi + 0x50]
push 0x3e7
call dword [eax + 0xc]
test eax, eax
je 0x4e980a
mov ecx, dword [esp + 0x44]
push 0xc8
push ecx
push 0xa
push 0x3e7
jmp 0x4e981e
mov ecx, dword [esi + 0xeb4c]
mov eax, dword [esi + 0xeb44]
mov dword [esp + 0x14], ecx
jmp 0x4e9723
mov edx, dword [esp + 0x44]
push 0x109
push edx
push 0x109
push 0x3e9
lea ecx, [esi + 0x28]
call fcn.004f4700
mov eax, dword [esi + 0xeae0]
test eax, eax
je 0x4e9873
mov eax, dword [esi + 0xeaf0]
mov ecx, dword [esi + 0x2c]
cmp eax, ecx
je 0x4e98db
mov edx, dword [esi + 0x28]
lea ecx, [esi + 0x28]
push ebx
call dword [edx + 0x14]
mov eax, dword [esi + 0x2c]
push 0x40
lea ecx, [esi + 0x28]
mov dword [esp + 0x48], eax
call fcn.004f4730
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
push eax
push ebx
push ecx
push edi
push 0
push edx
call dword [0x5237a8]
jmp 0x4e98db
test byte [esi + 0x9878], 1
je 0x4e98cf
lea ecx, [esi + 0x28]
call fcn.004f4730
mov ecx, dword [esi + 0x2c]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0xeaf0]
cmp eax, ecx
je 0x4e98db
mov edx, dword [esi + 0x28]
lea ecx, [esi + 0x28]
push ebx
call dword [edx + 0x14]
lea ecx, [esi + 0x28]
call fcn.004f4730
mov ecx, dword [esi + 0xed88]
mov edx, dword [esp + 0x48]
neg ecx
sbb ecx, ecx
mov dword [esp + 0x10], eax
and ecx, 0x40
push ecx
push eax
mov eax, dword [esi + 0x2c]
push ebx
push edx
push edi
push 0
push eax
call dword [0x5237a8]
jmp 0x4e98db
mov ecx, dword [esi + 0x2c]
push 0
push ecx
call dword [0x523884]
mov eax, dword [esi + 0x58c8]
mov dword [esp + 0x44], 0
test eax, eax
je 0x4e99bb
lea eax, [esi + 0x58c0]
test eax, eax
je 0x4e9903
lea eax, [esi + 0x58c4]
jmp 0x4e9905
xor eax, eax
mov eax, dword [eax + 4]
push eax
call dword [0x5237ac]
test eax, eax
je 0x4e99bb
xor edx, edx
lea eax, [esi + 0x58c0]
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x34], edx
test eax, eax
mov dword [esp + 0x38], edx
je 0x4e993f
lea eax, [esi + 0x58c4]
jmp 0x4e9941
xor eax, eax
mov edx, dword [eax + 4]
lea ecx, [esp + 0x2c]
push ecx
push edx
call dword [0x52378c]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
sub eax, edx
mov dword [esp + 0x44], eax
lea eax, [esi + 0x58c0]
test eax, eax
je 0x4e9970
lea ecx, [esi + 0x58c4]
jmp 0x4e9972
xor ecx, ecx
mov edx, dword [esi + 0xeaf0]
cmp edx, dword [ecx + 4]
je 0x4e99bb
test eax, eax
je 0x4e9989
lea ecx, [esi + 0x58c4]
jmp 0x4e998b
xor ecx, ecx
mov eax, dword [esi + 0xed88]
mov edx, dword [esp + 0x48]
neg eax
sbb eax, eax
and eax, 0x40
push eax
mov eax, dword [esp + 0x48]
push eax
sub edx, eax
mov eax, dword [esp + 0x1c]
push ebx
sub edx, eax
mov eax, dword [ecx + 4]
add edx, ebp
push edx
push edi
push 1
push eax
call dword [0x5237a8]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x48]
lea eax, [ecx + edx]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0xeb14]
test eax, eax
je 0x4e9a67
mov eax, dword [esi + 0x9880]
test eax, eax
je 0x4e9a7c
mov edx, dword [esp + 0x44]
mov eax, ebp
sub eax, edx
mov edx, dword [esp + 0x14]
sub eax, ecx
sub eax, edx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x18]
lea ecx, [edi + eax]
mov dword [esp + 0x48], ecx
mov ecx, dword [esi + 0xeb10]
test ecx, ecx
je 0x4e9a1d
sub edi, dword [esi + 0xeb0c]
sub edi, eax
add edi, ebx
mov dword [esp + 0x48], edi
mov eax, dword [esi + 0x9880]
lea edx, [esp + 0x2c]
push edx
push eax
call dword [0x523780]
mov ecx, dword [esi + 0xeae0]
mov edx, dword [esp + 0x28]
neg ecx
mov eax, dword [esi + 0xeb0c]
sbb ecx, ecx
and ecx, 4
or ecx, 0x40
push ecx
mov ecx, dword [esp + 0x24]
push edx
mov edx, dword [esp + 0x50]
push eax
mov eax, dword [esi + 0x9880]
push ecx
push edx
push 0
push eax
call dword [0x5237a8]
jmp 0x4e9a7c
mov eax, dword [esi + 0x98ac]
test eax, eax
jne 0x4e9a7c
lea ecx, [esi + 0x987c]
call fcn.004f7b90
mov ecx, dword [esi + 0xed88]
mov edx, dword [esp + 0x44]
neg ecx
sbb ecx, ecx
mov eax, dword [esp + 0x14]
and ecx, 0x40
sub ebp, edx
or ecx, 4
push ecx
mov ecx, dword [esp + 0x14]
sub ebp, ecx
mov ecx, dword [esp + 0x1c]
sub ebp, eax
mov eax, dword [esp + 0x20]
lea edx, [ecx + ecx]
push ebp
sub eax, edx
mov edx, dword [esp + 0x2c]
push eax
mov eax, dword [esp + 0x2c]
add edx, ecx
push eax
mov eax, dword [esi + 0xb8c]
push edx
push 1
push eax
call dword [0x5237a8]
mov ecx, esi
call fcn.004ebc50
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x4e9aec
mov edi, dword [esp + 0x40]
mov edx, dword [esi]
xor eax, eax
cmp edi, 2
sete al
push eax
mov ecx, esi
call dword [edx + 0x24]
mov ecx, dword [esi + 4]
push 1
push 0
push ecx
call fcn.0050abf0
add esp, 0xc
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
add esp, 0x2c
ret 0x10