Function at 0x40a560
Capabilities:
Check for time delay via gettickcount
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x120
push ebx
push ebp
mov ebp, ecx
push esi
push edi
push ecx
fld dword [ebp + 0x22c4]
fmul dword [0x47f45c]
mov dword [esp + 0x30], 0
fstp dword [esp]
push 0
push 0
push 0x4bee18
call fcn.00439780
mov ecx, dword [0x4aef34]
add esp, 0x10
mov eax, dword [ecx]
push 0x4bee18
push 0x4bee0c
push 0x4bee0c
call dword [eax + 8]
cmp dword [0x4c3d00], 5
je 0x40a5d7
fld dword [0x4c351c]
fmul dword [0x47f458]
push ecx
fstp dword [esp]
call fcn.00420fa0
add esp, 4
mov ecx, ebp
call fcn.0040a380
xor ecx, ecx
mov dword [esp + 0x28], ecx
mov eax, ecx
shl eax, 5
add eax, ecx
lea edx, [eax + eax*2]
lea edi, [ecx + edx*8]
shl edi, 2
cmp word [edi + 0x4b70f0], 0xffff
lea esi, [edi + 0x4b70f0]
je 0x40b365
fld dword [ebp + 0x22c4]
fmul dword [0x47f454]
fsubr dword [esi + 0xc54]
fst dword [esi + 0xc54]
fcomp dword [0x47f354]
fnstsw ax
test ah, 5
jp 0x40a630
mov dword [esi + 0xc54], 0x3f800000
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esi + 0xa24]
mov ebx, eax
mov eax, dword [esi + 0xbac]
test ecx, ecx
mov dword [esp + 0x10], eax
jne 0x40a676
mov ecx, dword [esi + 0xa68]
test ecx, ecx
jne 0x40a676
mov ecx, dword [esi + 0xaac]
test ecx, ecx
jne 0x40a676
mov ecx, dword [esi + 0xaf0]
test ecx, ecx
jne 0x40a676
test eax, eax
jne 0x40a680
mov dword [esi + 0xbac], ebx
jmp 0x40a680
mov dword [esi + 0xbac], 0
mov eax, dword [esi + 0xbac]
lea ecx, [ebx - 0x15e]
cmp eax, ecx
jae 0x40a72a
lea edx, [ebx - 0x1c2]
cmp eax, edx
jbe 0x40a72a
cmp word [esi + 0x910], 0xffff
jne 0x40a72a
mov eax, dword [esi + 0xb74]
push eax
call fcn.00442e80
add esp, 4
test eax, eax
jne 0x40a72a
mov ecx, dword [0x4b6120]
push ecx
call fcn.00442e80
add esp, 4
test eax, eax
jne 0x40a72a
fld dword [esi + 0xb4c]
fcomp dword [0x47f344]
fnstsw ax
test ah, 0x44
jp 0x40a72a
mov al, byte [ebp + 0x2a6c]
test al, al
je 0x40a780
fld dword [0x494868]
fcomp dword [0x47f344]
fnstsw ax
test ah, 0x41
jp 0x40a72a
movsx edx, word [esi]
push 0x2710
push 0xc8
lea eax, [edx*8 + 0x85]
push eax
push 0
call fcn.00423a20
add esp, 0x10
mov dword [0x4b6120], eax
mov al, byte [ebp + 0x2a6c]
test al, al
je 0x40a780
fld dword [0x494868]
fcomp dword [0x47f344]
fnstsw ax
test ah, 0x41
jp 0x40a780
cmp word [edi + 0x4b7a00], 0xffff
jne 0x40a780
mov eax, dword [esi + 0xbac]
test eax, eax
jne 0x40a780
mov eax, dword [esp + 0x10]
test eax, eax
jbe 0x40a780
add ebx, 0xffffff06
cmp eax, ebx
jae 0x40a780
push 0
push 0x96
push 0x27
push 0
call fcn.00423a20
add esp, 0x10
mov ecx, dword [0x4c7ee4]
push ecx
push esi
call fcn.0040c8c0
mov al, byte [esi + 0xb0c]
add esp, 8
test al, al
jne 0x40a7ae
mov al, byte [esi + 0xb64]
test al, al
jne 0x40a7ae
mov al, byte [esi + 0xb6c]
test al, al
je 0x40a7b7
push esi
call fcn.0040be10
add esp, 4
push esi
call fcn.0040cce0
or ebx, 0xffffffff
add esp, 4
cmp word [esi + 0x910], bx
jne 0x40a85b
cmp dword [0x4c3d00], 6
jne 0x40a9b9
mov edi, dword [esi + 0xb9c]
cmp edi, ebx
jne 0x40a7ec
mov edi, 1
mov al, byte [ebp + 0x2a6c]
test al, al
je 0x40a857
mov eax, dword [esi + 0xbac]
test eax, eax
jne 0x40a835
test edi, edi
jle 0x40a826
fld dword [esi + 0xb94]
movsx edx, word [esi]
fmul dword [0x47f400]
push edx
call fcn.004650b8
push eax
mov eax, dword [ebp + 0x2a64]
lea ecx, [eax + edi + 2]
jmp 0x40a847
movsx eax, word [esi]
mov ecx, dword [ebp + 0x2a64]
push eax
push 0
inc ecx
jmp 0x40a847
movsx eax, word [esi]
mov ecx, dword [ebp + 0x2a64]
push eax
push 0x2ee0
add ecx, 5
mov edx, dword [esp + 0x34]
push ecx
push 1
push edx
call fcn.00423bd0
add esp, 0x14
inc dword [esp + 0x2c]
cmp dword [0x4c3d00], 6
jne 0x40a9b9
cmp word [esi + 0x910], bx
jne 0x40a9b9
mov eax, dword [0x783a5c]
xor edx, edx
mov dword [ebp + 0x2a64], edx
mov edi, 0x13
lea ecx, [eax + eax*2]
shl ecx, 5
add ecx, 0x4a5cd0
fld dword [ecx]
fcomp dword [0x47f344]
fnstsw ax
test ah, 0x44
jnp 0x40a8de
fld dword [ecx - 8]
fsub dword [esi + 0x848]
fld dword [ecx - 4]
fsub dword [esi + 0x84c]
fld dword [ecx]
fld st(1)
fmul st(2)
fld st(3)
fmul st(4)
faddp st(1)
fsqrt
fcompp
fnstsw ax
fstp st(0)
test ah, 5
fstp st(0)
jp 0x40a8d5
mov dword [ebp + 0x2a64], edi
inc edx
add ecx, 0xc
cmp edx, 8
jl 0x40a893
push 0
push esi
mov ecx, ebp
call fcn.0040a0d0
push esi
mov ecx, ebp
call fcn.0040b470
mov eax, dword [0x4c3d08]
test eax, eax
je 0x40a9b9
mov eax, dword [ebp + 0x2a70]
push eax
call fcn.00442e80
add esp, 4
test eax, eax
jne 0x40a92a
push 1
push 0xff
push eax
push 0x64
push eax
push eax
call fcn.00442890
add esp, 0x18
mov dword [ebp + 0x2a70], eax
fld dword [0x47f344]
xor ecx, ecx
mov eax, 0x4b7a00
cmp word [eax - 0x910], bx
je 0x40a970
cmp word [eax], bx
je 0x40a970
fld dword [eax - 0xc8]
fsub dword [ebp + 0x2460]
fld dword [eax - 0xc4]
fsub dword [ebp + 0x2464]
inc ecx
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fsqrt
fstp st(2)
fstp st(0)
faddp st(1)
add eax, 0xc64
cmp eax, 0x4bf5e8
jl 0x40a937
test ecx, ecx
jle 0x40a98b
lea ecx, [ecx + ecx*4]
mov dword [esp + 0x18], ecx
fidiv dword [esp + 0x18]
call fcn.004650b8
mov ecx, 0x64
sub ecx, eax
jns 0x40a99d
xor ecx, ecx
jmp 0x40a9a7
cmp ecx, 0x64
jle 0x40a9a7
mov ecx, 0x64
mov edx, dword [ebp + 0x2a70]
push 0
push ecx
push edx
call fcn.00442d30
add esp, 0xc
mov al, byte [ebp + 0x2a6c]
test al, al
je 0x40aba1
mov eax, dword [esi + 0xbac]
test eax, eax
jne 0x40aba1
mov ax, word [esi + 0x910]
mov di, ax
inc di
neg di
sbb edi, edi
and edi, 0xffffffa6
add edi, 0x64
cmp ax, bx
je 0x40a9fe
mov eax, dword [0x7dee08]
test eax, eax
jbe 0x40aba1
mov eax, dword [esi + 0xba0]
test eax, eax
je 0x40aba1
mov eax, dword [esi + 0x9a4]
fld dword [eax + 0x6c]
fld dword [eax + 0x70]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
mov ecx, dword [eax + 4]
mov edx, dword [eax]
push ecx
mov ecx, dword [ebp + 0x246c]
faddp st(1)
push edx
mov edx, dword [ebp + 0x2464]
fsqrt
fstp st(2)
fstp st(0)
fmul dword [0x47f450]
fstp dword [esp + 0x1c]
fld dword [eax]
fsub dword [ebp + 0x2460]
fld dword [eax + 4]
fsub dword [ebp + 0x2464]
mov eax, dword [ebp + 0x2470]
push eax
mov eax, dword [ebp + 0x2460]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
push ecx
push edx
push eax
faddp st(1)
fsqrt
fstp st(2)
fstp st(0)
fadd st(0), st(0)
fstp dword [esp + 0x28]
call fcn.00423cb0
movsx ecx, ax
add esp, 0x18
cmp word [esi + 0x910], bx
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
jne 0x40aaa0
fstp st(0)
fld dword [0x47f344]
fld dword [esp + 0x14]
fcomp dword [0x47f44c]
fnstsw ax
and eax, 0x4100
jne 0x40aae5
call fcn.004650b8
fld dword [esp + 0x10]
push eax
call fcn.004650b8
mov edx, dword [ebp + 0x2a64]
push eax
push 0x4e2
push edi
mov edi, dword [esp + 0x38]
add edx, 0xb
push edx
push edi
call fcn.00423b50
add esp, 0x18
jmp 0x40aba5
fld dword [esp + 0x14]
fcomp dword [0x47f448]
fnstsw ax
and eax, 0x4100
jne 0x40ab2a
call fcn.004650b8
fld dword [esp + 0x10]
push eax
call fcn.004650b8
add eax, 0x14
push eax
mov eax, dword [ebp + 0x2a64]
push 0x4e2
push edi
mov edi, dword [esp + 0x38]
add eax, 0xa
push eax
push edi
call fcn.00423b50
add esp, 0x18
jmp 0x40aba5
fld dword [esp + 0x14]
fcomp dword [0x47f374]
fnstsw ax
and eax, 0x4100
jne 0x40ab6f
call fcn.004650b8
fld dword [esp + 0x10]
push eax
call fcn.004650b8
mov ecx, dword [ebp + 0x2a64]
add eax, 0x28
push eax
push 0x4e2
push edi
mov edi, dword [esp + 0x38]
add ecx, 9
push ecx
push edi
call fcn.00423b50
add esp, 0x18
jmp 0x40aba5
call fcn.004650b8
fld dword [esp + 0x10]
push eax
call fcn.004650b8
mov edx, dword [ebp + 0x2a64]
add eax, 0x3c
push eax
push 0x4e2
push edi
mov edi, dword [esp + 0x38]
add edx, 8
push edx
push edi
call fcn.00423b50
add esp, 0x18
jmp 0x40aba5
mov edi, dword [esp + 0x28]
mov eax, dword [esi + 0x9a4]
mov cl, byte [eax + 0xe4]
test cl, cl
jbe 0x40b036
fld dword [eax + 0x88]
fmul dword [0x47f450]
fcom dword [0x47f34c]
fnstsw ax
and eax, 0x4100
je 0x40abe7
fcomp dword [0x47f444]
fnstsw ax
test ah, 5
jp 0x40b036
jmp 0x40abe9
fstp st(0)
lea eax, [esi + 0x9a8]
lea ecx, [esp + 0xf0]
push eax
push ecx
call fcn.00414100
mov al, byte [0x4bef78]
add esp, 8
test al, al
mov eax, dword [esi + 0x9a4]
mov cl, byte [eax + 0xe4]
je 0x40ad26
test cl, 1
je 0x40ac60
mov dword [esp + 0xb4], 0xbf75c28f
mov edx, dword [esp + 0xb4]
mov dword [esp + 0xb8], 0x40400000
mov ecx, dword [esp + 0xb8]
mov dword [esp + 0xbc], 0x3f000000
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0xbc]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
test byte [eax + 0xe4], 2
je 0x40acab
mov dword [esp + 0xc0], 0x3f75c28f
mov ecx, dword [esp + 0xc0]
mov dword [esp + 0xc4], 0x40400000
mov edx, dword [esp + 0xc4]
mov dword [esp + 0xc8], 0x3f000000
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0xc8]
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], ecx
test byte [eax + 0xe4], 4
je 0x40ace4
mov dword [esp + 0x6c], 0x3f000000
mov edx, dword [esp + 0x6c]
mov dword [esp + 0x70], 0xc0000000
mov ecx, dword [esp + 0x70]
mov dword [esp + 0x74], 0x3f4ccccd
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x74]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
test byte [eax + 0xe4], 8
je 0x40ae3c
mov dword [esp + 0x48], 0xbf000000
mov eax, dword [esp + 0x48]
mov dword [esp + 0x4c], 0xc0000000
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x50], 0x3f4ccccd
mov edx, dword [esp + 0x50]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
jmp 0x40ae3c
test cl, 1
je 0x40ad6d
mov dword [esp + 0x84], 0xbf70a3d7
mov ecx, dword [esp + 0x84]
mov dword [esp + 0x88], 0x40400000
mov edx, dword [esp + 0x88]
mov dword [esp + 0x8c], 0x3f000000
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x8c]
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], ecx
test byte [eax + 0xe4], 2
je 0x40adb8
mov dword [esp + 0xa8], 0x3f70a3d7
mov edx, dword [esp + 0xa8]
mov dword [esp + 0xac], 0x40400000
mov ecx, dword [esp + 0xac]
mov dword [esp + 0xb0], 0x3f000000
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0xb0]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], edx
test byte [eax + 0xe4], 4
je 0x40ae03
mov dword [esp + 0x9c], 0x3f70a3d7
mov ecx, dword [esp + 0x9c]
mov dword [esp + 0xa0], 0xc0400000
mov edx, dword [esp + 0xa0]
mov dword [esp + 0xa4], 0x3f666666
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0xa4]
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], ecx
test byte [eax + 0xe4], 8
je 0x40ae3c
mov dword [esp + 0x54], 0xbf70a3d7
mov edx, dword [esp + 0x54]
mov dword [esp + 0x58], 0xc0400000
mov eax, dword [esp + 0x58]
mov dword [esp + 0x5c], 0x3f666666
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
mov ecx, dword [0x4aef34]
lea eax, [esp + 0xf0]
push eax
lea eax, [esp + 0x20]
mov edx, dword [ecx]
push eax
lea eax, [esp + 0x24]
push eax
call dword [edx + 8]
fld dword [esp + 0x1c]
fadd dword [esi + 0x858]
fstp dword [esp + 0x60]
fld dword [esp + 0x20]
fadd dword [esi + 0x85c]
mov ecx, dword [esp + 0x60]
mov dword [esp + 0xd8], ecx
fstp dword [esp + 0x64]
fld dword [esp + 0x24]
fadd dword [esi + 0x860]
mov edx, dword [esp + 0x64]
mov dword [esp + 0xdc], edx
fstp dword [esp + 0x68]
fld dword [esi + 0xa08]
fsub dword [esi + 0xa14]
mov eax, dword [esp + 0x68]
mov dword [esp + 0xe0], eax
fstp dword [esp + 0xe4]
fld dword [esi + 0xa0c]
fsub dword [esi + 0xa18]
fstp dword [esp + 0xe8]
fld dword [esi + 0xa10]
fsub dword [esi + 0xa1c]
fstp dword [esp + 0xec]
call fcn.00464f9a
cdq
mov ecx, 0x32
idiv ecx
mov dword [esp + 0x18], edx
fild dword [esp + 0x18]
fmul dword [0x47f398]
fadd dword [0x47f378]
fstp dword [esp + 0x14]
call fcn.00464f9a
cdq
mov ecx, 0x32
idiv ecx
mov dword [esp + 0x18], edx
fild dword [esp + 0x18]
fmul dword [0x47f398]
fsub dword [0x47f358]
fstp dword [esp + 0x10]
call fcn.00464f9a
cdq
mov ecx, 0x32
mov dword [esp + 0x90], 0
idiv ecx
mov eax, dword [esp + 0x14]
mov dword [esp + 0x94], 0
mov dword [esp + 0x80], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x98], 0
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x10]
fild dword [esp + 0x18]
mov dword [esp + 0x7c], edx
mov dword [esp + 0x34], edx
fmul dword [0x47f398]
fsub dword [0x47f358]
fstp dword [esp + 0x78]
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x30], ecx
mov eax, dword [esp + 0x98]
mov ecx, dword [esp + 0x90]
mov edx, dword [esp + 0x94]
mov dword [esp + 0xd4], eax
lea eax, [esp + 0xf0]
mov dword [esp + 0xcc], ecx
mov ecx, dword [0x4aef34]
push eax
lea eax, [esp + 0x34]
mov dword [esp + 0xd4], edx
mov edx, dword [ecx]
push eax
lea eax, [esp + 0x38]
push eax
call dword [edx + 8]
fld dword [esp + 0x30]
fmul dword [0x47f440]
push 0xa
push 0
push ebx
push 0xa
push 1
lea ecx, [esp + 0xe0]
fstp dword [esp + 0x44]
fld dword [esp + 0x48]
fmul dword [0x47f440]
push 0x3ef33333
lea edx, [esp + 0x48]
push ecx
lea eax, [esp + 0x100]
push edx
lea ecx, [esp + 0xf8]
fstp dword [esp + 0x54]
fld dword [esp + 0x58]
fmul dword [0x47f440]
push eax
push ecx
mov ecx, 0x4c1120
fstp dword [esp + 0x60]
call fcn.00418140
mov al, byte [ebp + 0x2a6c]
test al, al
je 0x40b23b
mov edx, dword [esi + 0x9a4]
fld dword [edx + 0x20c]
fcomp dword [0x47f344]
fnstsw ax
test ah, 0x44
jnp 0x40b23b
call fcn.00464f9a
mov eax, dword [esi + 0x9a4]
fld dword [eax + 0x6c]
fld dword [eax + 0x70]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
mov ecx, dword [eax + 4]
mov edx, dword [eax]
push ecx
mov ecx, dword [ebp + 0x246c]
faddp st(1)
push edx
mov edx, dword [ebp + 0x2464]
fsqrt
fstp st(2)
fstp st(0)
fmul dword [0x47f450]
fstp dword [esp + 0x20]
fld dword [eax]
fsub dword [ebp + 0x2460]
fld dword [eax + 4]
fsub dword [ebp + 0x2464]
mov eax, dword [ebp + 0x2470]
push eax
mov eax, dword [ebp + 0x2460]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
push ecx
push edx
push eax
faddp st(1)
fsqrt
fstp st(2)
fstp st(0)
fadd st(0), st(0)
fstp dword [esp + 0x28]
call fcn.00423cb0
movsx ecx, ax
mov dword [esp + 0x2c], ecx
add esp, 0x18
fild dword [esp + 0x14]
cmp word [esi + 0x910], bx
fstp dword [esp + 0x14]
jne 0x40b0fe
mov dword [esp + 0x14], 0
mov eax, dword [esi + 0xbac]
test eax, eax
je 0x40b11f
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esi + 0xbac]
cmp eax, 0xfa
ja 0x40b23b
mov eax, dword [esi + 0xbd4]
test eax, eax
jne 0x40b1c8
fld dword [esp + 0x18]
fcomp dword [0x47f37c]
fnstsw ax
test ah, 5
jp 0x40b168
fld dword [esp + 0x14]
call fcn.004650b8
fld dword [esp + 0x10]
push eax
call fcn.004650b8
mov edx, dword [ebp + 0x2a64]
push eax
push 0x3e8
add edx, 0x11
push 0x10
push edx
jmp 0x40b232
fld dword [esp + 0x18]
fcomp dword [0x47f43c]
fld dword [esp + 0x14]
fnstsw ax
test ah, 5
jp 0x40b1a2
call fcn.004650b8
fld dword [esp + 0x10]
push eax
call fcn.004650b8
push eax
mov eax, dword [ebp + 0x2a64]
push 0x3e8
push 0x10
add eax, 0x12
jmp 0x40b231
call fcn.004650b8
fld dword [esp + 0x10]
push eax
call fcn.004650b8
mov ecx, dword [ebp + 0x2a64]
add eax, 0x28
push eax
push 0x3e8
add ecx, 0x13
push 0x10
push ecx
jmp 0x40b232
cmp eax, 2
jne 0x40b1f6
fld dword [esp + 0x14]
call fcn.004650b8
fld dword [esp + 0x10]
push eax
call fcn.004650b8
add eax, 0x28
push eax
push 0x3e8
push 0x10
push 0x28
push edi
call fcn.00423b50
add esp, 0x18
cmp dword [esi + 0xbd4], 1
jne 0x40b23b
fld dword [esp + 0x14]
call fcn.004650b8
fld dword [esp + 0x10]
push eax
call fcn.004650b8
add eax, 0x28
push eax
push 0x3e8
push 0x10
call fcn.00464f9a
and eax, reloc.DSOUND.dll_DirectSoundCreate
jns 0x40b22e
dec eax
or eax, 0xfffffffe
inc eax
add eax, 0x29
push eax
push edi
call fcn.00423b50
add esp, 0x18
push esi
call fcn.0040c610
movsx eax, word [esi]
xor edx, edx
add esp, 4
mov dx, word [esi + 2]
lea ecx, [edx + eax]
mov edx, ecx
shl edx, 5
add edx, ecx
mov eax, dword [edx*4 + 0x4b61d0]
cmp eax, ebx
je 0x40b2df
mov ebx, ecx
mov edi, dword [esi + 0x9a4]
shl ebx, 5
add ebx, ecx
lea edx, [esi + 0xa3c]
fld dword [edi + 0x88]
mov ecx, dword [ebx*4 + 0x4b6250]
lea ebx, [eax*8]
sub ebx, eax
mov ecx, dword [ecx + 0x58]
lea ebx, [eax + ebx*4]
lea eax, [eax + ebx*2]
fdiv dword [ecx + eax*4 + 0x5c]
fmul dword [ebp + 0x22c4]
fsubr dword [edx]
fld dword [0x47f3a8]
fmul dword [0x47f438]
fld st(1)
fcomp st(1)
fnstsw ax
and eax, 0x4100
jne 0x40b2bd
fsubp st(1)
jmp 0x40b2ce
fld st(1)
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x40b2cc
faddp st(1)
jmp 0x40b2ce
fstp st(0)
mov eax, edx
mov ecx, 4
fst dword [eax]
add eax, 0x44
dec ecx
jne 0x40b2d5
fstp st(0)
mov eax, dword [esi + 0x9a4]
lea edx, [esi + 0x848]
fld dword [eax]
fstp dword [esp + 0x3c]
fld dword [eax + 4]
mov ecx, dword [esp + 0x3c]
fstp dword [esp + 0x40]
fld dword [eax + 8]
mov eax, dword [esp + 0x40]
mov dword [edx], ecx
fstp dword [esp + 0x44]
mov dword [edx + 4], eax
mov eax, dword [esp + 0x44]
mov dword [edx + 8], eax
lea eax, [esi + 0x858]
mov edi, eax
lea edx, [esi + 0x864]
mov ebx, dword [edi]
mov dword [edx], ebx
mov ebx, dword [edi + 4]
mov dword [edx + 4], ebx
mov edi, dword [edi + 8]
mov dword [edx + 8], edi
mov dl, byte [esi + 0x874]
test dl, dl
jne 0x40b34d
mov edx, dword [esp + 0x44]
mov dword [eax], ecx
mov ecx, dword [esp + 0x40]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
jmp 0x40b359
mov eax, dword [esp + 0x28]
mov ecx, ebp
push eax
call fcn.00407f90
push esi
mov ecx, ebp
call fcn.00426ac0
mov ecx, dword [esp + 0x28]
inc ecx
cmp ecx, 0xa
mov dword [esp + 0x28], ecx
jl 0x40a5dd
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x120
ret