Function at 0x487830
Capabilities:
Check os version

Disassembly:
push 0xffffffffffffffff
push 0x4c5cfb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x94
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
mov dword [esp + 0x28], ebx
xor eax, eax
mov dword [esp + 0x30], eax
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x48], edx
push edi
mov dword [esp + 0x38], eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x50], edx
mov dword [esp + 0x64], eax
mov dword [esp + 0x60], eax
mov edx, dword [esi + 0x114]
mov dword [esp + 0x20], 0x461c4000
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x1c], 0x461c4000
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x34], eax
mov eax, dword [esi + 0x120]
mov dword [esp + 0x38], ecx
mov ecx, dword [esi + 0x110]
mov edi, ecx
sub edi, eax
mov eax, edx
sbb eax, dword [esi + 0x124]
mov ebp, 1
cmp eax, dword [esi + 0x12c]
mov dword [esp + 0xac], ebp
mov dword [esi + 0x138], 0x107a4000
mov dword [esi + 0x13c], 0x5af3
jl 0x487e65
jg 0x4878f9
cmp edi, dword [esi + 0x128]
jb 0x487e65
mov edi, dword [esi + 0xf4]
mov bl, byte [esp + 0xc0]
mov dword [esi + 0x124], edx
mov edx, dword [esi + 0x15c]
mov dword [esi + 0x120], ecx
mov dword [esi + 0x158], edx
mov eax, dword [edi]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x30], ecx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0x14]
mov dword [esp + 0x38], ecx
mov ecx, dword [esi + 0x80]
mov dword [esp + 0x34], edx
mov edx, dword [esi + 0x7c]
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0xbc]
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0xb8]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x50], ecx
push ebp
mov ecx, eax
mov byte [esp + 0x4c], bl
mov byte [esp + 0x58], bl
mov dword [esp + 0x20], edx
mov dword [esp + 0x50], edx
call fcn.004244f0
mov eax, dword [edi]
mov ecx, dword [eax + 0x14]
add eax, 0x14
test ecx, ecx
mov dword [eax], 0
je 0x48799a
mov edx, dword [ecx + 4]
dec edx
mov eax, edx
test eax, eax
mov dword [ecx + 4], edx
jne 0x48799a
mov edx, dword [ecx]
push ebp
call dword [edx]
mov ecx, dword [esi + 0xf8]
lea ebp, [esi + 0xf0]
lea eax, [edi + 4]
cmp eax, ecx
je 0x4879bc
sub edi, eax
nop
mov edx, dword [eax]
mov dword [edi + eax], edx
add eax, 4
cmp eax, ecx
jne 0x4879b0
add dword [ebp + 8], 0xfffffffc
mov eax, dword [esi + 0x104]
test eax, eax
je 0x487a17
push 1
push ecx
mov ecx, esp
mov dword [ecx], eax
inc dword [eax + 4]
mov ecx, dword [esi + 0xa0]
mov eax, dword [ecx]
mov dword [esp + 0x18], esp
call dword [eax + 0xc]
mov ecx, dword [esi + 0x104]
push 1
call fcn.004244f0
mov ecx, dword [esi + 0x104]
test ecx, ecx
mov dword [esi + 0x104], 0
je 0x487a17
mov edx, dword [ecx + 4]
dec edx
mov eax, edx
test eax, eax
mov dword [ecx + 4], edx
jne 0x487a17
mov edx, dword [ecx]
push 1
call dword [edx]
mov ecx, esi
call fcn.00485ea0
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
mov ecx, ebp
call fcn.00485c00
mov eax, dword [esi + 0x14c]
test eax, eax
je 0x487de1
mov eax, dword [esi + 0xc4]
cmp eax, 4
je 0x487a50
cmp eax, 6
jne 0x487de1
mov ecx, dword [esp + 0xb8]
mov edx, dword [esp + 0xbc]
xor ebp, ebp
xor ebx, ebx
mov byte [esp + 0xac], 2
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x9c], ecx
mov dword [esp + 0xa0], edx
mov dword [esp + 0x14], 0xfffffffe
lea esp, [esp]
fild dword [esp + 0x14]
mov edi, 0xfffffffe
mov dword [esp + 0x18], edi
fmul dword [0x4f2a14]
fadd dword [esp + 0xb8]
fstp dword [esp + 0x10]
mov edi, edi
fild dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
xor eax, eax
mov dword [esp + 0x24], eax
fmul dword [0x4f2a14]
mov dword [esp + 0x28], eax
mov edx, ecx
mov dword [esp + 0x24], ecx
fadd dword [esp + 0xbc]
mov dword [esp + 0x1c], edx
fstp dword [esp + 0x28]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x20], eax
xor eax, eax
jmp 0x487af0
fld dword [esp + eax + 0x1c]
add eax, 4
cmp eax, 8
fsub dword [esp + eax + 0x98]
fstp dword [esp + eax + 0x18]
jb 0x487af0
mov ecx, dword [esp + 0x1c]
fld dword [0x4fc4b8]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x94], ecx
mov dword [esp + 0x98], edx
xor eax, eax
fld dword [esp + eax*4 + 0x94]
inc eax
cmp eax, 2
fld st(0)
fmul st(1)
faddp st(2)
fstp st(0)
jb 0x487b25
fcom dword [0x4fc4b8]
fnstsw ax
test ah, 0x44
jnp 0x487b58
fsqrt
fcomp dword [0x4f7128]
fnstsw ax
test ah, 5
jp 0x487bb2
jmp 0x487b5a
fstp st(0)
test ebp, ebp
je 0x487b95
mov ecx, dword [esp + 0x74]
mov eax, ebx
sub eax, ebp
sub ecx, ebp
sar eax, 3
sar ecx, 3
cmp eax, ecx
jae 0x487b95
mov eax, dword [esp + 0x10]
push eax
lea ecx, [esp + 0x6c]
push ecx
lea edx, [esp + 0x2c]
push edx
push 1
push ebx
call fcn.0041c040
add esp, 0x14
add ebx, 8
mov dword [esp + 0x70], ebx
jmp 0x487bb2
lea eax, [esp + 0x24]
push eax
push 1
push ecx
mov eax, esp
lea ecx, [esp + 0x74]
mov dword [eax], ebx
call fcn.0041ce10
mov ebx, dword [esp + 0x70]
mov ebp, dword [esp + 0x6c]
inc edi
cmp edi, 2
mov dword [esp + 0x18], edi
jl 0x487ab0
mov eax, dword [esp + 0x14]
inc eax
cmp eax, 2
mov dword [esp + 0x14], eax
jl 0x487a90
xor eax, eax
mov dword [esp + 0x18], eax
cmp dword [esi + 0xc4], 4
mov byte [esp + 0xac], 3
mov byte [esp + 0x7c], al
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], 0xf
jne 0x487c5a
mov eax, str._objects_bonus_on_catapult_magic_fire_release.xml
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x487c07
sub eax, edx
push eax
push str._objects_bonus_on_catapult_magic_fire_release.xml
lea ecx, [esp + 0x80]
call fcn.00402cd0
push 0
push 0
lea ecx, [esp + 0x80]
push ecx
lea edx, [esp + 0x1c]
push edx
mov byte [esp + 0xbc], 4
call fcn.00415620
mov ecx, eax
call fcn.00431b90
mov esi, dword [eax]
test esi, esi
je 0x487c50
inc dword [esi + 4]
mov byte [esp + 0xac], 4
jmp 0x487cb3
mov eax, 0x4f70c0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x487c62
sub eax, edx
push eax
push 0x4f70c0
lea ecx, [esp + 0x80]
call fcn.00402cd0
push 0
push 0
lea ecx, [esp + 0x80]
push ecx
lea edx, [esp + 0x1c]
push edx
mov byte [esp + 0xbc], 6
call fcn.00415620
mov ecx, eax
call fcn.00431b90
mov esi, dword [eax]
test esi, esi
je 0x487cab
inc dword [esi + 4]
mov byte [esp + 0xac], 6
mov eax, dword [esp + 0x10]
test eax, eax
mov dword [esp + 0x18], esi
je 0x487cd8
mov edx, dword [eax + 4]
mov ecx, eax
add eax, 4
dec edx
mov dword [eax], edx
mov eax, edx
mov dword [esp + 0x14], eax
jne 0x487cd8
mov edx, dword [ecx]
push 1
call dword [edx]
cmp dword [esp + 0x90], 0x10
mov byte [esp + 0xac], 3
jb 0x487cf7
mov eax, dword [esp + 0x7c]
push eax
call fcn.004ade5d
add esp, 4
xor edi, edi
lea esp, [esp]
test ebp, ebp
jne 0x487d08
xor eax, eax
jmp 0x487d0f
mov eax, ebx
sub eax, ebp
sar eax, 3
test eax, eax
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
jge 0x487d21
fadd dword [0x4f15e0]
fsub dword [0x4f26c8]
fstp dword [esp + 0x14]
fld dword [0x4fc4b8]
fcomp dword [esp + 0x14]
fnstsw ax
test ah, 1
jne 0x487d44
fld dword [0x4fc4b8]
jmp 0x487d63
call fcn.004af0f4
cdq
mov ecx, 0x2710
idiv ecx
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fmul dword [0x4f3088]
fmul dword [esp + 0x14]
call fcn.004adeb4
test ebp, ebp
jne 0x487d70
xor ecx, ecx
jmp 0x487d77
mov ecx, ebx
sub ecx, ebp
sar ecx, 3
cmp eax, ecx
jl 0x487d7d
xor eax, eax
mov edx, dword [ebp + eax*8 + 4]
mov eax, dword [ebp + eax*8]
push 0xc4188000
push edx
push eax
mov ecx, esi
call fcn.00424870
push 1
push edi
mov ecx, esi
call fcn.0042f400
add edi, 0x41
cmp edi, 0xc3
jl 0x487d00
test esi, esi
mov byte [esp + 0xac], 2
je 0x487dcd
mov ecx, dword [esi + 4]
dec ecx
mov eax, ecx
test eax, eax
mov dword [esi + 4], ecx
jne 0x487dcd
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx]
test ebp, ebp
je 0x487dda
push ebp
call fcn.004ade5d
add esp, 4
mov bl, byte [esp + 0xc0]
mov esi, dword [esp + 0xb4]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov dword [esi], eax
mov eax, dword [esp + 0x3c]
mov dword [esi + 4], ecx
mov ecx, dword [esp + 0x40]
mov dword [esi + 8], edx
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], ecx
mov ecx, dword [esp + 0x44]
test ecx, ecx
mov dword [esi + 0x14], ecx
je 0x487e18
inc dword [ecx + 4]
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x50]
mov byte [esi + 0x18], bl
mov dword [esi + 0x1c], edx
mov edx, dword [esp + 0x58]
mov dword [esi + 0x20], eax
mov eax, dword [esp + 0x5c]
mov byte [esi + 0x24], bl
mov dword [esi + 0x28], edx
mov edx, dword [esp + 0x60]
mov dword [esi + 0x2c], eax
mov eax, dword [esp + 0x64]
mov dword [esi + 0x30], edx
mov dword [esi + 0x34], eax
test ecx, ecx
mov dword [esp + 0x2c], 1
mov byte [esp + 0xac], 0
je 0x487e96
dec dword [ecx + 4]
jne 0x487e96
push 1
jmp 0x487e92
mov esi, dword [esp + 0xb4]
lea eax, [esp + 0x30]
push eax
mov ecx, esi
call fcn.004845c0
mov ecx, dword [esp + 0x44]
cmp ecx, ebx
mov dword [esp + 0x2c], ebp
mov byte [esp + 0xac], 0
je 0x487e96
dec dword [ecx + 4]
jne 0x487e96
push ebp
mov edx, dword [ecx]
call dword [edx]
mov ecx, dword [esp + 0xa4]
pop edi
mov eax, esi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0xa0
ret 0x10