Function at 0x51b128
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xfc
jmp 0x51b126
jmp 0x401279
push ebx
push ebp
push esi
mov esi, ecx
mov byte [0xb6f059], 0
mov eax, dword [esi + 0x21c]
test eax, eax
push edi
mov dword [esp + 0x48], esi
je 0x51b748
mov al, byte [eax + 0x36]
and al, 7
cmp al, 2
jne 0x51b748
lea ecx, [esp + 0x8c]
push ecx
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x70]
push edx
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0xa4]
push eax
mov ecx, esi
call fcn.00517130
mov eax, dword [0xb70078]
test al, 1
mov edx, dword [0xb7cb84]
mov dword [esp + 0x5c], edx
jne 0x51b1b6
or eax, 1
mov dword [0xb70078], eax
test al, 2
mov ecx, dword [0x8ccd58]
jne 0x51b1ce
or eax, 2
mov dword [0xb70078], eax
mov dword [0xb70074], ecx
mov edi, dword [0x8cc488]
mov eax, 0x39
cmp edi, eax
jne 0x51b1f2
mov edi, dword [0xb7cb4c]
mov ebx, dword [0x8ccb9c]
dec edi
cmp ebx, edi
jae 0x51b4e9
mov dword [0x8cc488], eax
mov eax, dword [0x8ccbac]
add eax, edx
mov dword [0xb70074], ecx
mov ecx, 0xb6eca0
mov byte [0xb6ec71], 0
mov dword [0x8ccba0], edx
mov dword [0x8ccba4], eax
call fcn.0050d860
fld dword [esp + 0x50]
fmul dword [0x8ccd54]
mov eax, dword [0x8ccd54]
fld dword [esp + 0x54]
push 1
fmul dword [0x8ccd54]
push 1
fld dword [esp + 0x60]
xor ebp, ebp
fmul dword [0x8ccd54]
push ebp
push ebp
push ebp
fstp dword [esp + 0x6c]
fxch st(1)
lea ecx, [esp + 0xb4]
fadd dword [esp + 0x2c]
push ecx
push 0xf
lea edx, [esp + 0x2c]
fstp dword [esp + 0x88]
push edx
fld dword [esp + 0x3c]
push 1
fadd st(1)
push eax
lea ecx, [esp + 0x94]
push ecx
fstp dword [esp + 0x9c]
fstp st(0)
fld dword [esp + 0x4c]
fadd dword [esp + 0x84]
fstp dword [esp + 0xa0]
call fcn.00564a20
xor ebx, ebx
add esp, 0x2c
cmp word [esp + 0x10], bx
mov dword [esp + 0x4c], 0x461c4000
jle 0x51b741
jmp 0x51b2c0
movsx esi, bx
mov edi, dword [esp + esi*4 + 0xa0]
mov eax, dword [edi + 0x1c]
test al, 4
lea esi, [esp + esi*4 + 0xa0]
jne 0x51b2e3
test eax, 0x40000
je 0x51b4cd
mov eax, dword [edi + 0x14]
test eax, eax
jne 0x51b2fd
mov ecx, edi
call fcn.0054f560
mov edx, dword [edi + 0x14]
push edx
lea ecx, [edi + 4]
call fcn.0054f1b0
mov eax, dword [edi + 0x14]
fld dword [eax + 0x28]
fcomp dword [0x858c20]
fnstsw ax
test ah, 0x41
jne 0x51b4cd
mov edi, dword [esi]
movsx ecx, word [edi + 0x22]
push ecx
call fcn.00509a30
add esp, 4
test al, al
je 0x51b4cd
mov eax, dword [edi + 0x14]
test eax, eax
je 0x51b337
add eax, 0x30
jmp 0x51b33a
lea eax, [edi + 4]
fld dword [eax]
fsub dword [esp + 0x18]
fld dword [eax + 4]
fsub dword [esp + 0x1c]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fsqrt
fstp st(2)
fstp st(0)
fst dword [esp + 0x14]
fcomp dword [esp + 0x4c]
fnstsw ax
test ah, 5
jp 0x51b4cd
fld dword [esp + 0x14]
fcomp dword [0x8ccd50]
fnstsw ax
test ah, 0x41
jne 0x51b4cd
mov ecx, edi
call fcn.00535300
add eax, 0xc
mov edx, dword [eax]
mov dword [esp + 0x3c], edx
mov ecx, dword [eax + 4]
mov dword [esp + 0x40], ecx
mov edx, dword [eax + 8]
mov ecx, dword [esi]
lea eax, [esp + 0x3c]
push eax
mov dword [esp + 0x48], edx
call fcn.00411990
push eax
lea ecx, [esp + 0x88]
push ecx
call fcn.0059c890
mov edx, dword [eax]
mov dword [esp + 0x48], edx
mov ecx, dword [eax + 4]
mov dword [esp + 0x4c], ecx
mov edx, dword [eax + 8]
mov ecx, dword [esi]
add esp, 0xc
mov dword [esp + 0x44], edx
call fcn.00535300
fld dword [esp + 0x44]
fsub dword [eax + 0x14]
mov ecx, dword [esi]
fstp dword [esp + 0x44]
call fcn.00535300
fld dword [eax + 8]
fmul dword [0x858b8c]
fadd dword [esp + 0x44]
fstp dword [esp + 0x44]
fld dword [esp + 0x3c]
fsub dword [esp + 0x18]
fstp dword [esp + 0x50]
mov eax, dword [esp + 0x50]
fld dword [esp + 0x40]
mov dword [esp + 0x30], eax
fsub dword [esp + 0x1c]
fstp dword [esp + 0x54]
fld dword [esp + 0x44]
mov ecx, dword [esp + 0x54]
fsub dword [esp + 0x20]
mov dword [esp + 0x34], ecx
lea ecx, [esp + 0x30]
fstp dword [esp + 0x58]
mov edx, dword [esp + 0x58]
mov dword [esp + 0x38], edx
call fcn.0059c910
fld dword [esp + 0x30]
fadd dword [esp + 0x18]
fstp dword [esp + 0x30]
fld dword [esp + 0x34]
fadd dword [esp + 0x1c]
fstp dword [esp + 0x34]
fld dword [esp + 0x20]
fadd dword [esp + 0x38]
fstp dword [esp + 0x38]
fld qword [0x859ef8]
fabs
fcomp dword [0x8ccd4c]
fnstsw ax
test ah, 5
jp 0x51b4cd
push 1
push 1
push 0
push 0
push 0
push 0
push 1
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x5c]
push ecx
call fcn.0056a490
add esp, 0x24
test al, al
je 0x51b4cd
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
mov ebp, dword [esi]
mov dword [esp + 0x4c], edx
mov edx, dword [esp + 0x44]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
mov dword [0xb70068], eax
mov dword [0xb7006c], ecx
mov dword [0xb70070], edx
inc ebx
cmp bx, word [esp + 0x10]
jl 0x51b2c0
test ebp, ebp
je 0x51b741
mov edx, dword [esp + 0x5c]
mov esi, dword [esp + 0x48]
mov eax, dword [0x8ccba0]
mov ecx, dword [0x8ccba4]
sub edx, eax
mov dword [esp + 0x48], edx
fild dword [esp + 0x48]
sub ecx, eax
mov dword [esp + 0x48], ecx
mov al, byte [0xb6ec71]
test al, al
fidiv dword [esp + 0x48]
fstp dword [esp + 0x10]
jne 0x51b5a9
fld dword [esp + 0x18]
mov ecx, dword [0xb70070]
fsub dword [0xb70068]
mov edx, dword [0xb70068]
mov eax, dword [0xb7006c]
mov dword [esp + 0x2c], ecx
fstp dword [esp + 0x30]
lea ecx, [esp + 0x30]
fld dword [esp + 0x1c]
mov dword [esp + 0x24], edx
fsub dword [0xb7006c]
mov dword [esp + 0x28], eax
fstp dword [esp + 0x34]
fld dword [esp + 0x20]
fsub dword [0xb70070]
fstp dword [esp + 0x38]
call fcn.0059c910
fld dword [esp + 0x30]
fmul dword [0x8ccd48]
fld dword [esp + 0x34]
fmul dword [0x8ccd48]
fld dword [esp + 0x38]
fmul dword [0x8ccd48]
fstp dword [esp + 0x74]
fxch st(1)
fadd dword [esp + 0x24]
fstp dword [esp + 0x24]
fadd dword [esp + 0x28]
fstp dword [esp + 0x28]
fld dword [esp + 0x74]
fadd dword [esp + 0x2c]
fstp dword [esp + 0x2c]
fld dword [esp + 0x18]
fsub dword [esp + 0x24]
fld dword [esp + 0x1c]
fsub dword [esp + 0x28]
fld dword [esp + 0x20]
fsub dword [esp + 0x2c]
fld st(2)
fmulp st(3)
fld st(0)
fmul st(1)
faddp st(3)
fld st(1)
fmul st(2)
faddp st(3)
fxch st(2)
fsqrt
fstp st(2)
fstp st(0)
fdiv dword [0x8ccd44]
fcom dword [0x858b50]
fnstsw ax
test ah, 5
jp 0x51b5f6
fstp st(0)
fld dword [0x858b50]
jmp 0x51b60b
fcom dword [0x858624]
fnstsw ax
test ah, 0x41
jne 0x51b60b
fstp st(0)
fld dword [0x858624]
fmul dword [0x85a994]
fsubr dword [0x859070]
fmul dword [0x8595ec]
fsin
fadd dword [0x858624]
fmul dword [0x858b8c]
fld dword [0x8ccd40]
fsub dword [0x8ccd3c]
fmulp st(1)
fadd dword [0x8ccd3c]
fstp dword [esp + 0x14]
fld dword [esp + 0x10]
fcomp dword [0x8ccd38]
fnstsw ax
test ah, 5
jp 0x51b6c0
fld dword [esp + 0x10]
fdiv dword [0x8ccd38]
fcom dword [0x858b50]
fnstsw ax
test ah, 5
jp 0x51b675
fstp st(0)
fld dword [0x858b50]
jmp 0x51b68a
fcom dword [0x858624]
fnstsw ax
test ah, 0x41
jne 0x51b68a
fstp st(0)
fld dword [0x858624]
fmul dword [0x85a994]
fsubr dword [0x859070]
fmul dword [0x8595ec]
fsin
fadd dword [0x858624]
fmul dword [0x858b8c]
fld dword [esp + 0x14]
fsub dword [0x8ccd34]
fmulp st(1)
fadd dword [0x8ccd34]
fstp dword [esp + 0x14]
mov edx, dword [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x30]
push ecx
push 0x15
mov ecx, esi
call fcn.00517400
test al, al
jne 0x51b741
mov edx, dword [esp + 0x78]
push 0
push 0
push 0
push 0
push 0
push 0
push 1
push 1
lea eax, [esp + 0x9c]
push eax
lea ecx, [esp + 0x104]
mov dword [0xb7cd68], edx
push ecx
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x44]
push eax
call fcn.0056ba00
add esp, 0x30
neg al
sbb al, al
inc al
mov byte [esp + 0x10], al
mov eax, dword [0xb70074]
mov dword [0xb7cd68], 0
jne 0x51b757
mov ecx, eax
dec eax
test ecx, ecx
mov dword [0xb70074], eax
jne 0x51b76d
mov byte [0xb6ec71], 1
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xfc
ret 4
mov edx, eax
inc eax
mov dword [0xb70074], eax
mov eax, dword [0x8ccd58]
cmp edx, eax
jle 0x51b76d
mov dword [0xb70074], eax
fld dword [esp + 0x60]
fmul dword [esp + 0x60]
fld dword [esp + 0x68]
fmul dword [esp + 0x68]
faddp st(1)
fld dword [esp + 0x64]
fmul dword [esp + 0x64]
faddp st(1)
fsqrt
fmul dword [0x8ccd30]
fcom dword [0x8ccd2c]
fst dword [esp + 0x10]
fnstsw ax
test ah, 0x41
je 0x51b7aa
fstp st(0)
fld dword [0x8ccd2c]
fcomp dword [0x858b50]
fnstsw ax
test ah, 5
jp 0x51b7c1
mov dword [esp + 0x10], 0
jmp 0x51b808
fld dword [esp + 0x10]
fcom dword [0x8ccd2c]
fnstsw ax
test ah, 0x41
je 0x51b7da
fstp st(0)
fld dword [0x8ccd2c]
fcomp dword [0x858624]
fnstsw ax
test ah, 0x41
jne 0x51b7f1
mov dword [esp + 0x10], 0x3f800000
jmp 0x51b808
mov eax, dword [0x8ccd2c]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.00420800
fstp dword [esp + 0x18]
add esp, 8
fld dword [esp + 0x14]
mov edx, dword [esp + 0x10]
fmul dword [0x85b328]
mov eax, dword [esp + 0x14]
push edx
push ecx
fmul dword [0x863200]
lea ecx, [esp + 0x20]
lea edx, [esp + 0x2c]
fsubr dword [0x85862c]
fstp dword [esp]
push eax
push 0
push ecx
push edx
mov ecx, esi
call fcn.0050dd70
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0xfc
ret 4