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

Disassembly:
sub esp, 0x140
push ebx
push ebp
push esi
mov esi, ecx
mov eax, dword [esi]
push edi
call dword [eax + 0x94]
cmp eax, 1
je 0x51f3b5
mov ecx, esi
call fcn.0063e7f0
cmp eax, 1
je 0x51f3b5
mov ecx, esi
call fcn.004ef890
cmp eax, 1
je 0x51f3b5
mov eax, dword [esp + 0x154]
mov ecx, dword [eax + 0x38]
mov edx, dword [eax + 0x3c]
mov ebx, dword [eax + 0x48]
mov edi, dword [eax + 0x50]
mov dword [esp + 0xf0], ecx
mov ecx, dword [eax + 0x40]
mov dword [esp + 0x24], ecx
mov ecx, dword [eax + 0x4c]
mov dword [esp + 0xf4], edx
mov edx, dword [eax + 0x44]
mov dword [esp + 0xb8], ecx
mov ecx, esi
mov dword [esp + 0xf8], 0
mov dword [esp + 0xbc], edx
mov dword [esp + 0x44], ebx
call fcn.004cb120
mov ebp, eax
test ebp, ebp
mov dword [esp + 0xc0], ebp
je 0x51f3b5
mov ecx, dword [esi + 0x8e8]
mov eax, 1
cmp ecx, eax
mov dword [esi + 0xa14], eax
jne 0x51e768
mov edx, ebx
and edx, 3
cmp dl, 3
jne 0x51e768
and ebx, 0xfffffffd
or ebx, eax
mov dword [esp + 0x44], ebx
test edi, edi
lea ebx, [esi + 0x90]
mov eax, ebx
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], eax
je 0x51f33d
fild dword [esp + 0x24]
mov eax, dword [esp + 0x44]
test al, 4
mov ecx, dword [esp + 0x154]
fmul qword [0x747e08]
mov edi, 0x3f800000
mov dword [esi + 0xa0c], edi
mov dword [ecx + 0x50], 0
fmul qword [0x747e00]
mov dword [esp + 0x68], 0
mov dword [esp + 0x24], edi
fld st(0)
mov dword [esp + 0x40], 0
fcos
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
fstp dword [esp + 0x60]
fsin
fstp dword [esp + 0x64]
je 0x51e810
fld dword [esp + 0x64]
mov edx, dword [esp + 0x60]
fchs
lea eax, [esp + 0x10]
fstp dword [esp + 0x10]
mov dword [esp + 0x14], edx
push eax
jmp 0x51e82b
test al, 8
je 0x51e848
fld dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
fchs
lea edx, [esp + 0x10]
fstp dword [esp + 0x14]
mov dword [esp + 0x10], ecx
push edx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x1c], 0
call fcn.004a9740
mov eax, dword [esp + 0x44]
mov dword [esp + 0x40], 0x3f4ccccd
mov ecx, eax
and ecx, 3
cmp cl, 3
jne 0x51e869
lea edx, [esp + 0x60]
push edx
lea ecx, [esp + 0x2c]
call fcn.004a9740
mov ecx, esi
call fcn.004f1be0
jmp 0x51e896
test al, 1
je 0x51e87d
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x2c]
call fcn.004a9740
jmp 0x51e88f
test al, 2
je 0x51e8a4
lea ecx, [esp + 0x60]
push ecx
lea ecx, [esp + 0x2c]
call fcn.004a9770
mov ecx, esi
call fcn.004f1b20
fmul dword [0x747df8]
mov eax, dword [esp + 0x44]
fstp dword [esp + 0x40]
test al, 0x10
je 0x51e903
push 0
push 0
lea edx, [esp + 0xe8]
push 0x41f00000
push edx
call fcn.004acac0
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0xf4]
push ecx
lea edx, [esp + 0x84]
push edx
call fcn.004a9bb0
mov ecx, dword [eax]
mov dword [esp + 0x44], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x48], edx
mov eax, dword [eax + 8]
lea ecx, [esp + 0x7c]
push ecx
lea edx, [esp + 0x100]
mov dword [esp + 0x50], eax
push edx
lea eax, [esp + 0x90]
push eax
jmp 0x51e960
test al, 0x20
je 0x51e982
push 0
push 0
lea ecx, [esp + 0xe8]
push 0xc1f00000
push ecx
call fcn.004acac0
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0xf4]
push eax
lea ecx, [esp + 0x84]
push ecx
call fcn.004a9bb0
mov edx, dword [eax]
mov dword [esp + 0x44], edx
mov ecx, dword [eax + 4]
mov dword [esp + 0x48], ecx
mov edx, dword [eax + 8]
lea eax, [esp + 0x7c]
push eax
lea ecx, [esp + 0x100]
mov dword [esp + 0x50], edx
push ecx
lea edx, [esp + 0x90]
push edx
call fcn.004a9bb0
mov ecx, dword [eax]
mov dword [esp + 0x88], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x8c], edx
mov eax, dword [eax + 8]
add esp, 0x28
mov dword [esp + 0x68], eax
lea ecx, [esp + 0x60]
call fcn.004ab130
lea ecx, [esp + 0x60]
push ecx
mov ecx, esi
call fcn.004cd170
lea ecx, [esp + 0x28]
call fcn.004ab130
push ebx
lea edx, [esp + 0xf4]
push edx
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
call fcn.00423bc0
fld dword [esp + 0x24]
fmul dword [esp + 0x24]
add esp, 0xc
fld dword [esp + 0x14]
fmul dword [esp + 0x14]
faddp st(1)
fld dword [esp + 0x10]
fmul dword [esp + 0x10]
faddp st(1)
fcomp dword [0x73edf0]
fnstsw ax
test ah, 0x41
jne 0x51ea31
mov eax, dword [esi + 0x340]
lea ecx, [esp + 0x54]
push ecx
push 0
push eax
push 0x3f000000
lea edx, [esp + 0x100]
push edx
mov ecx, ebp
call fcn.004be860
test eax, eax
je 0x51ea31
push 0
push 1
push 1
lea eax, [esp + 0x60]
push eax
mov ecx, esi
call fcn.004cd1a0
jmp 0x51ea47
mov ecx, ebx
mov edx, dword [ecx]
mov eax, dword [ecx + 4]
mov ecx, dword [ecx + 8]
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], ecx
mov eax, dword [esi + 0x94]
mov edx, dword [ebx]
mov dword [esp + 0x8c], eax
mov eax, dword [esi + 0x340]
mov ecx, dword [eax + 4]
mov dword [esp + 0x84], edx
mov dword [esp + 0x88], ecx
mov edx, dword [eax + 0x14]
mov eax, dword [esp + 0x40]
push eax
lea ecx, [esp + 0x2c]
mov dword [esp + 0x94], edx
push ecx
lea edx, [esp + 0x74]
push edx
mov dword [esi + 0xa0c], edi
call fcn.00423bf0
add esp, 0xc
push eax
lea ecx, [esp + 0x58]
call fcn.004a9740
push 0
push 0
lea eax, [esp + 0x5c]
push eax
mov ecx, esi
call fcn.004cb120
mov ecx, eax
call fcn.004bc380
fstp dword [esp + 0x5c]
mov eax, dword [esi + 0x340]
xor edi, edi
push edi
push edi
lea ecx, [esp + 0xcc]
push ecx
push edi
push 1
push eax
lea edx, [esp + 0x6c]
push edx
push ebx
mov ecx, ebp
call fcn.004bc590
test eax, eax
jne 0x51eb0f
mov eax, dword [esp + 0xc4]
cmp eax, 0x7f000000
je 0x51eb0f
mov ecx, dword [0x7a39fc]
mov ecx, dword [ecx + 8]
push eax
call fcn.004ae770
test eax, eax
je 0x51eb0f
lea edx, [esp + 0x54]
push edx
push ebx
push eax
mov ecx, esi
call fcn.004f6390
mov eax, dword [esp + 0x84]
mov edx, dword [esp + 0x90]
mov ecx, dword [esp + 0x8c]
push 0
push 0
push edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
lea eax, [esp + 0x94]
push eax
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0x24]
push edx
mov ecx, ebp
mov dword [esp + 0x30], 0
call fcn.004bcb70
cmp eax, 1
jne 0x51eb74
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], edx
jmp 0x51f252
mov dword [esp + 0x1c], 0x3f000000
mov dword [esp + 0x20], 0x3e800000
fld dword [esp + 0x54]
push 0
fsub dword [ebx]
push 0
fld dword [esp + 0x60]
mov dword [esp + 0xbc], 0
fsub dword [ebx + 4]
fld dword [esp + 0x64]
fsub dword [ebx + 8]
fstp dword [esp + 0x7c]
fxch st(1)
fmul dword [esp + 0x24]
fstp dword [esp + 0xdc]
fmul dword [esp + 0x24]
fld dword [esp + 0x7c]
fmul dword [esp + 0x24]
fld dword [esp + 0xdc]
fadd dword [ebx]
fstp dword [esp + 0x18]
mov eax, dword [esp + 0x18]
fxch st(1)
mov dword [esp + 0xa8], eax
fadd dword [ebx + 4]
mov eax, dword [esp + 0x8c]
mov dword [esp + 0xb4], eax
lea eax, [esp + 0x90]
fstp dword [esp + 0x1c]
mov ecx, dword [esp + 0x1c]
fadd dword [ebx + 8]
mov dword [esp + 0xac], ecx
mov ecx, dword [esp + 0x94]
mov dword [esp + 0xb8], ecx
fstp dword [esp + 0x20]
mov edx, dword [esp + 0x20]
mov dword [esp + 0xb0], edx
mov edx, dword [esp + 0x98]
push edx
push eax
lea ecx, [esp + 0xb0]
push ecx
lea edx, [esp + 0xc0]
push edx
mov ecx, ebp
call fcn.004bcb70
cmp eax, 1
jne 0x51ec7a
mov eax, dword [esp + 0xa0]
fld dword [esp + 0x20]
mov ecx, dword [esp + 0xa4]
fadd dword [esp + 0x1c]
mov edx, dword [esp + 0xa8]
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], edx
mov edi, 1
jmp 0x51ec82
fld dword [esp + 0x1c]
fsub dword [esp + 0x20]
fstp dword [esp + 0x1c]
fld dword [esp + 0x20]
fmul dword [0x73e9ac]
fst dword [esp + 0x20]
fcomp dword [0x73dff4]
fnstsw ax
test ah, 0x41
je 0x51eb84
cmp edi, 1
jne 0x51ecc9
mov eax, dword [esp + 0xb8]
cmp eax, edi
jle 0x51f252
mov ecx, dword [esp + 0x154]
dec eax
mov dword [ecx + 0x4c], eax
jmp 0x51f252
test edi, edi
jne 0x51f249
fld dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
lea eax, [esp + 0x10]
fchs
push eax
lea ecx, [esp + 0x7c]
fstp dword [esp + 0x18]
push ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], edi
call fcn.004ab180
fld dword [esp + 0x80]
fmul dword [0x740cbc]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0xa0]
fstp dword [esp + 0x1c]
push eax
fld dword [esp + 0x8c]
fmul dword [0x740cbc]
fstp dword [esp + 0x24]
fld dword [esp + 0x90]
fmul dword [0x740cbc]
fstp dword [esp + 0x28]
call fcn.004ab180
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov ebp, dword [esp + 0xd4]
mov dword [esp + 0xbc], eax
mov dword [esp + 0x20], eax
mov eax, 1
mov dword [esp + 0x34], edi
mov edi, dword [esp + 0xd4]
add esp, 0x10
mov dword [esp + 0xb0], ecx
mov dword [esp + 0xb4], edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], eax
lea ebx, [ebx]
mov ecx, dword [esp + 0x20]
test ecx, ecx
jne 0x51eda4
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x51f0ac
fld dword [esp + 0xac]
lea ecx, [esp + 0xfc]
fadd dword [esp + 0x94]
push ecx
lea edx, [esp + 0x148]
push edx
fstp dword [esp + 0x104]
fld dword [esp + 0xb8]
fadd dword [esp + 0xa0]
fstp dword [esp + 0x108]
fld dword [esp + 0xbc]
fadd dword [esp + 0xa4]
fstp dword [esp + 0x10c]
call fcn.004ab180
fld dword [esp + 0x18]
fadd dword [esp + 0x80]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [eax + 8]
fstp dword [esp + 0x110]
mov dword [esp + 0x3c], ecx
fld dword [esp + 0x1c]
lea ecx, [esp + 0x110]
fadd dword [esp + 0x84]
mov dword [esp + 0x40], edx
push ecx
lea edx, [esp + 0x120]
fstp dword [esp + 0x118]
fld dword [esp + 0x24]
push edx
fadd dword [esp + 0x90]
mov dword [esp + 0x4c], eax
fstp dword [esp + 0x120]
call fcn.004ab180
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [esp + 0xe0], eax
mov eax, dword [esp + 0x30]
add esp, 0x10
test eax, eax
mov dword [esp + 0xc8], ecx
mov dword [esp + 0xcc], edx
je 0x51ef28
mov ecx, dword [esp + 0x40]
push ecx
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x140]
push eax
call fcn.00423bf0
push eax
lea ecx, [esp + 0x130]
push ebx
push ecx
call fcn.00423b90
mov edx, dword [eax]
mov dword [esp + 0xb8], edx
mov ecx, dword [eax + 4]
add esp, 0x18
mov dword [esp + 0xa4], ecx
mov edx, dword [eax + 8]
mov eax, dword [esp + 0x84]
mov ecx, dword [esp + 0x8c]
push 0
push 0
mov dword [esp + 0xb0], edx
mov edx, dword [esp + 0x98]
push edx
mov dword [esp + 0xe0], eax
mov dword [esp + 0xe4], ecx
lea eax, [esp + 0x94]
push eax
lea ecx, [esp + 0xb0]
push ecx
mov ecx, dword [esp + 0xd4]
lea edx, [esp + 0xe8]
push edx
mov dword [esp + 0xf4], 0
call fcn.004bcb70
mov ebp, eax
dec ebp
neg ebp
sbb ebp, ebp
inc ebp
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x51efd9
mov eax, dword [esp + 0x40]
push eax
lea ecx, [esp + 0xcc]
push ecx
lea edx, [esp + 0x134]
push edx
call fcn.00423bf0
push eax
lea eax, [esp + 0xf0]
push ebx
push eax
call fcn.00423b90
mov ecx, dword [eax]
mov dword [esp + 0xb8], ecx
mov edx, dword [eax + 4]
mov ecx, dword [esp + 0x9c]
add esp, 0x18
mov dword [esp + 0xa4], edx
mov eax, dword [eax + 8]
mov edx, dword [esp + 0x8c]
push 0
push 0
mov dword [esp + 0xb0], eax
mov eax, dword [esp + 0x98]
push eax
mov dword [esp + 0x78], ecx
lea ecx, [esp + 0x94]
push ecx
mov ecx, dword [esp + 0xd0]
mov dword [esp + 0x80], edx
lea edx, [esp + 0xb0]
push edx
lea eax, [esp + 0x80]
push eax
mov dword [esp + 0x8c], 0
call fcn.004bcb70
mov edi, eax
dec edi
neg edi
sbb edi, edi
inc edi
mov eax, dword [esp + 0x20]
test eax, eax
je 0x51f034
test ebp, ebp
je 0x51f008
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x94], ecx
mov dword [esp + 0x98], edx
mov dword [esp + 0x9c], eax
jmp 0x51f034
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
xor ecx, ecx
test edi, edi
sete cl
mov dword [esp + 0xac], edx
mov dword [esp + 0xb0], eax
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0xb4], ecx
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x51f092
test edi, edi
je 0x51f066
mov edx, dword [esp + 0xc8]
mov eax, dword [esp + 0xcc]
mov ecx, dword [esp + 0xd0]
mov dword [esp + 0x78], edx
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], ecx
jmp 0x51f092
mov eax, dword [esp + 0xc8]
mov ecx, dword [esp + 0xcc]
xor edx, edx
test ebp, ebp
sete dl
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0xd0]
mov dword [esp + 0x18], edx
mov eax, dword [esp + 0x24]
inc eax
cmp eax, 0xf
mov dword [esp + 0x24], eax
jl 0x51ed90
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
cmp ecx, eax
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
jne 0x51f12c
fld dword [esp + 0x98]
fmul dword [esp + 0x2c]
fld dword [esp + 0x94]
fmul dword [esp + 0x28]
faddp st(1)
fld dword [esp + 0x9c]
fmul dword [esp + 0x30]
faddp st(1)
fld dword [esp + 0x7c]
fmul dword [esp + 0x2c]
fld dword [esp + 0x78]
fmul dword [esp + 0x28]
faddp st(1)
fld dword [esp + 0x80]
fmul dword [esp + 0x30]
faddp st(1)
fcompp
fnstsw ax
test ah, 5
jp 0x51f14b
mov eax, dword [esp + 0x94]
mov ecx, dword [esp + 0x98]
mov edx, dword [esp + 0x9c]
jmp 0x51f15a
test ecx, ecx
je 0x51f147
mov eax, dword [esp + 0x94]
mov ecx, dword [esp + 0x98]
mov edx, dword [esp + 0x9c]
jmp 0x51f15a
test eax, eax
je 0x51f166
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x80]
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edx
fld dword [esp + 0x38]
fmul dword [esp + 0x2c]
fld dword [esp + 0x34]
fmul dword [esp + 0x28]
faddp st(1)
fld dword [esp + 0x3c]
fmul dword [esp + 0x30]
faddp st(1)
fst dword [esp + 0x24]
fcomp dword [0x73edf0]
fnstsw ax
test ah, 0x41
je 0x51f19b
mov dword [esp + 0x24], 0x3e800000
fld dword [esp + 0x40]
push 0
fmul dword [esp + 0x28]
push 0
fld dword [esp + 0x3c]
fmul st(1)
fld dword [esp + 0x40]
fmul st(2)
fstp dword [esp + 0x78]
fld dword [esp + 0x44]
fmul st(2)
fstp dword [esp + 0x7c]
fadd dword [ebx]
fstp dword [esp + 0x18]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x8c]
fstp st(0)
fld dword [esp + 0x78]
mov dword [esp + 0x74], eax
fadd dword [ebx + 4]
lea eax, [esp + 0x90]
fstp dword [esp + 0x1c]
fld dword [esp + 0x7c]
mov ecx, dword [esp + 0x1c]
fadd dword [ebx + 8]
mov dword [esp + 0x54], ecx
mov ecx, dword [esp + 0x94]
mov dword [esp + 0x78], ecx
fstp dword [esp + 0x20]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x58], edx
mov edx, dword [esp + 0x98]
push edx
push eax
lea ecx, [esp + 0x58]
push ecx
mov ecx, dword [esp + 0xd4]
lea edx, [esp + 0x80]
push edx
mov dword [esp + 0x8c], 0
call fcn.004bcb70
mov edi, eax
dec edi
neg edi
sbb edi, edi
inc edi
cmp edi, 1
jne 0x51f387
mov eax, dword [esp + 0x24]
push 8
mov dword [esi + 0xa0c], eax
call fcn.006fa7e6
mov ecx, dword [esp + 0x4c]
mov dword [eax], ecx
mov edx, dword [esp + 0x50]
mov dword [eax + 4], edx
mov ecx, dword [esi + 0x340]
mov dword [ecx + 0x8c], 2
mov edx, dword [esi + 0x340]
mov dword [edx + 0x90], eax
mov eax, dword [esi + 0x340]
mov dword [eax], 1
mov ecx, dword [esi + 0x340]
mov edx, dword [esi + 4]
mov dword [ecx + 0x2c], edx
mov eax, dword [esi + 0x340]
mov dword [eax + 0x30], 0x7f000000
mov ecx, dword [esi + 0x340]
add esp, 4
xor eax, eax
mov dword [ecx + 0x84], eax
mov edx, dword [esi + 0x340]
mov ecx, dword [esi + 0x8c]
mov dword [edx + 0x70], ecx
mov edx, dword [esi + 0x340]
mov ecx, dword [esp + 0x48]
mov dword [edx + 0x5c], ecx
mov edx, dword [esi + 0x340]
mov ecx, dword [esp + 0x4c]
mov dword [edx + 0x60], ecx
mov edx, dword [esi + 0x340]
mov ecx, dword [esp + 0x50]
mov dword [edx + 0x64], ecx
mov edx, dword [esi + 0x340]
mov ecx, dword [ebx]
mov dword [edx + 0x74], ecx
mov edx, dword [esi + 0x340]
mov ecx, dword [esi + 0x94]
mov dword [edx + 0x78], ecx
fld dword [esi + 0x98]
mov edx, dword [esi + 0x340]
fstp dword [edx + 0x7c]
mov ecx, dword [esi + 0x340]
mov dword [ecx + 0x9c], eax
mov edx, dword [esi + 0x340]
mov eax, dword [esp + 0xbc]
mov dword [edx + 0x28], eax
mov eax, dword [esi + 0x340]
fld dword [eax + 0x60]
mov ecx, dword [eax + 0x5c]
fstp dword [esp + 0x14]
fld dword [eax + 0x64]
mov eax, dword [esp + 0x14]
mov edx, ecx
mov dword [esp + 0x10], ecx
fstp dword [esp + 0x18]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x44]
mov edi, ecx
xor ebp, ebp
and edi, 4
mov dword [esp + 0x4c], eax
mov dword [esp + 0x48], edx
mov eax, 0x2714
je 0x51f3c7
mov eax, 0x275e
jmp 0x51f3d1
mov ecx, dword [esi + 0x340]
mov eax, dword [esp + 0xbc]
mov dword [ecx + 0x28], eax
push eax
mov ecx, esi
call fcn.005110b0
mov edx, dword [esi]
push 0x2710
mov ecx, esi
mov dword [esi + 0xa14], 0
call dword [edx + 0x7c]
mov eax, dword [0x745dc4]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x140
ret 4
test cl, 8
je 0x51f3d1
mov eax, 0x275f
mov edx, ecx
and edx, 3
cmp dl, 3
jne 0x51f3ff
test edi, edi
mov ebp, 1
je 0x51f3eb
mov eax, 0x2766
jmp 0x51f42d
and cl, 8
neg cl
sbb ecx, ecx
and ecx, 0x53
add ecx, 0x2714
mov eax, ecx
jmp 0x51f42d
test cl, 1
je 0x51f423
test edi, edi
je 0x51f40f
mov eax, 0x2764
jmp 0x51f42d
and cl, 8
neg cl
sbb ecx, ecx
and ecx, 0x53
add ecx, 0x2712
mov eax, ecx
jmp 0x51f42d
test cl, 2
je 0x51f42d
mov eax, 0x2713
mov edx, dword [esi]
movzx eax, ax
push eax
mov ecx, esi
call dword [edx + 0x7c]
push ebp
mov ecx, esi
call fcn.0051cd20
mov edi, eax
cmp edi, dword [0x745dbc]
je 0x51f4e1
mov ecx, dword [esp + 0xb8]
cmp ecx, 1
jle 0x51f4cb
cmp edi, dword [0x745dc0]
jne 0x51f4cb
fld dword [esi + 0xa0]
fld dword [esi + 0x9c]
fpatan
fmul qword [0x743888]
fcom qword [0x73edf8]
fnstsw ax
test ah, 5
jp 0x51f489
fadd qword [0x747df0]
mov edx, dword [esp + 0xbc]
dec ecx
push ecx
mov ecx, dword [esp + 0x48]
push ecx
push edx
call fcn.006fae8c
mov edx, dword [esp + 0x160]
lea eax, [eax + eax*4]
shl eax, 1
movzx ecx, ax
xor eax, eax
mov ax, word [edx + 0x6c]
push ecx
push ebx
mov ecx, esi
push eax
call fcn.004eb510
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x140
ret 4
mov edx, dword [esi]
push 0x2710
mov ecx, esi
mov dword [esi + 0xa14], 0
call dword [edx + 0x7c]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x140
ret 4