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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5eb7f8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x7c
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x24]
mov dword [esp + 0x38], esi
call fcn.005df190
xor edi, edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x90], edi
call fcn.005df190
mov ebx, 1
push edi
mov byte [esp + 0x94], bl
call dword [0x5fca40]
push eax
call dword [0x5fca44]
mov eax, dword [ebp + 0xc]
add esp, 8
sub eax, edi
mov dword [esp + 0x18], edi
je 0x4d1a04
dec eax
je 0x4d19fa
dec eax
jne 0x4d1a08
mov dword [esp + 0x20], 0x3e8
jmp 0x4d1a08
mov dword [esp + 0x20], 0x64
jmp 0x4d1a08
mov dword [esp + 0x20], edi
mov ecx, esi
call fcn.005df37c
mov edi, dword [ebp + 0x28]
cmp dword [ebp + 8], 2
jge 0x4d1c03
fld qword [ebp + 0x10]
fsub qword [ebp + 0x20]
fdiv qword [ebp + 0x20]
call fcn.005dfdf0
fld qword [ebp + 0x18]
fadd qword [ebp + 0x20]
mov esi, eax
fdiv qword [ebp + 0x20]
fadd qword [0x5ff1b8]
call fcn.005dfdf0
cmp esi, 1
mov ebx, eax
jae 0x4d1a4c
mov esi, 1
shr edi, 1
mov dword [esp + 0x10], edi
lea eax, [edi - 1]
cmp esi, eax
jbe 0x4d1a5b
mov esi, eax
cmp ebx, 1
jae 0x4d1a65
mov ebx, 1
cmp ebx, eax
jbe 0x4d1a6b
mov ebx, eax
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x4d1b08
cmp esi, ebx
mov dword [esp + 0xc], esi
ja 0x4d1baf
mov ecx, dword [ebp + 0x30]
mov eax, dword [ebp + 0x2c]
sub eax, ecx
lea edi, [ecx + esi*8]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
test eax, eax
jne 0x4d1aaa
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0x3ff00000
jmp 0x4d1aba
fild dword [esp + 0xc]
fsqrt
fdivr qword [0x5fd8a8]
fstp qword [esp + 0x44]
call dword [0x5fca48]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x14]
fild dword [esp + 0x28]
add edi, 8
fmul qword [0x602418]
fsub qword [0x5ff1b8]
fmul qword [0x5ff4f0]
fld st(0)
fcos
fmul qword [esp + 0x44]
fstp qword [eax + edi - 8]
mov eax, dword [esp + 0xc]
fsin
inc eax
cmp eax, ebx
mov dword [esp + 0xc], eax
fmul qword [esp + 0x44]
fstp qword [edi - 8]
jbe 0x4d1a91
jmp 0x4d1bab
mov ecx, esi
cmp esi, ebx
mov dword [esp + 0xc], ecx
ja 0x4d1baf
mov edx, dword [ebp + 0x30]
mov edi, dword [ebp + 0x30]
lea eax, [edx + esi*8]
mov edx, dword [ebp + 0x2c]
sub edx, edi
mov edi, dword [ebp + 8]
test edi, edi
jne 0x4d1b33
fld qword [0x5fd8a8]
jmp 0x4d1b3f
fild dword [esp + 0xc]
fsqrt
fdivr qword [0x5fd8a8]
mov edi, dword [esp + 0x18]
test edi, edi
jne 0x4d1b81
lea edi, [ecx + 1]
mov dword [esp + 0x60], 0
mov dword [esp + 0x28], edi
mov edi, ebx
fild dword [esp + 0x28]
sub edi, esi
inc edi
fimul dword [esp + 0xc]
mov dword [esp + 0x5c], edi
fild qword [esp + 0x5c]
fdivp st(1)
fmul qword [0x5ff1b8]
fmul qword [0x5ff4f0]
fsubr qword [0x604fc0]
jmp 0x4d1b88
fld qword [eax]
fld qword [eax + edx]
fpatan
fld st(0)
fcos
inc ecx
add eax, 8
cmp ecx, ebx
mov dword [esp + 0xc], ecx
fmul st(2)
fstp qword [eax + edx - 8]
fsin
fmul st(1)
fstp qword [eax - 8]
fstp st(0)
jbe 0x4d1b24
mov edi, dword [esp + 0x10]
test esi, esi
jbe 0x4d1bcf
mov eax, dword [ebp + 0x30]
mov ecx, dword [ebp + 0x2c]
sub ecx, eax
xor edx, edx
mov dword [ecx + eax], edx
mov dword [ecx + eax + 4], edx
mov dword [eax], edx
mov dword [eax + 4], edx
add eax, 8
dec esi
jne 0x4d1bbb
inc ebx
cmp ebx, edi
ja 0x4d1ef0
mov ecx, dword [ebp + 0x30]
mov edx, dword [ebp + 0x2c]
sub edx, ecx
lea eax, [ecx + ebx*8]
mov ecx, dword [esp + 0x10]
sub ecx, ebx
inc ecx
xor esi, esi
mov dword [edx + eax], esi
mov dword [edx + eax + 4], esi
mov dword [eax], esi
mov dword [eax + 4], esi
add eax, 8
dec ecx
jne 0x4d1bec
jmp 0x4d1ef0
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x4d1d69
mov eax, edi
mov dword [esp + 0xc], ebx
shr eax, 1
cmp eax, ebx
mov dword [esp + 0x10], eax
jbe 0x4d1f2d
mov ecx, dword [ebp + 0x30]
mov eax, dword [ebp + 0x2c]
sub eax, ecx
lea esi, [ecx + 8]
mov dword [esp + 0x14], eax
fild dword [esp + 0xc]
mov ecx, dword [ebp + 0x38]
fmul qword [ebp + 0x20]
fst qword [esp + 0x3c]
fcomp qword [ecx]
fnstsw ax
test ah, 1
jne 0x4d1c95
fld qword [esp + 0x3c]
fcomp qword [ecx]
fnstsw ax
test ah, 0x40
je 0x4d1c71
mov eax, dword [ebp + 0x3c]
fld qword [0x5ff518]
fld qword [eax]
fmul qword [0x6002d8]
call fcn.005dffc6
fstp qword [esp + 0x44]
jmp 0x4d1ca5
mov edx, dword [ebp + 0x34]
mov edi, ebx
cmp ebx, edx
jae 0x4d1c95
mov ecx, dword [ebp + 0x38]
lea ecx, [ecx + ebx*8]
fld qword [esp + 0x3c]
fcomp qword [ecx]
fnstsw ax
test ah, 1
jne 0x4d1cfb
inc edi
add ecx, 8
cmp edi, edx
jb 0x4d1c80
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
call dword [0x5fca48]
mov dword [esp + 0x28], eax
mov ecx, dword [esp + 0x14]
fild dword [esp + 0x28]
mov eax, dword [esp + 0xc]
add esi, 8
inc eax
fmul qword [0x602418]
mov dword [esp + 0xc], eax
fsub qword [0x5ff1b8]
fmul qword [0x5ff4f0]
fld st(0)
fcos
fmul qword [esp + 0x44]
fstp qword [ecx + esi - 8]
mov ecx, dword [esp + 0x10]
fsin
cmp eax, ecx
fmul qword [esp + 0x44]
fstp qword [esi - 8]
jb 0x4d1c31
jmp 0x4d1ef0
mov edx, dword [ebp + 0x38]
fld qword [edx + edi*8 - 8]
fcom qword [0x5fd8b0]
fnstsw ax
test ah, 0x41
je 0x4d1d17
fstp st(0)
fld qword [0x604b08]
fldlg2
mov eax, dword [ebp + 0x3c]
fxch st(1)
fyl2x
lea ecx, [eax + edi*8 - 8]
fstp qword [esp + 0x2c]
fld qword [0x5ff518]
fldlg2
fld qword [esp + 0x3c]
fyl2x
fsub qword [esp + 0x2c]
fld qword [eax + edi*8]
fsub qword [ecx]
mov eax, dword [ebp + 0x38]
fmulp st(1)
fldlg2
fld qword [eax + edi*8]
fyl2x
fsub qword [esp + 0x2c]
fdivp st(1)
fadd qword [ecx]
fmul qword [0x6002d8]
call fcn.005dffc6
fstp qword [esp + 0x44]
mov ebx, edi
jmp 0x4d1ca5
mov eax, edi
mov dword [esp + 0x28], ebx
shr eax, 1
cmp eax, ebx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], eax
jbe 0x4d1f2d
mov eax, dword [ebp + 0x30]
mov edi, dword [ebp + 0x2c]
sub edi, eax
lea esi, [eax + 8]
mov dword [esp + 0x14], edi
jmp 0x4d1d96
mov ebx, dword [esp + 0x28]
fild dword [esp + 0xc]
mov ecx, dword [ebp + 0x38]
fst qword [esp + 0x64]
fmul qword [ebp + 0x20]
fst qword [esp + 0x3c]
fcomp qword [ecx]
fnstsw ax
test ah, 1
je 0x4d1db9
fld qword [0x5fd8b0]
jmp 0x4d1e10
fld qword [esp + 0x3c]
fcomp qword [ecx]
fnstsw ax
test ah, 0x40
je 0x4d1dde
mov edx, dword [ebp + 0x3c]
fld qword [0x5ff518]
fld qword [edx]
fmul qword [0x6002d8]
call fcn.005dffc6
jmp 0x4d1e10
mov edx, dword [ebp + 0x34]
mov edi, ebx
cmp ebx, edx
jae 0x4d1e06
mov ebx, dword [ebp + 0x38]
mov eax, dword [esp + 0x28]
lea ecx, [ebx + eax*8]
fld qword [esp + 0x3c]
fcomp qword [ecx]
fnstsw ax
test ah, 1
jne 0x4d1e58
inc edi
add ecx, 8
cmp edi, edx
jb 0x4d1df1
fld qword [0x5fd8b0]
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x4d1ebe
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
inc ecx
dec edx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x70], edx
fild dword [esp + 0x2c]
mov dword [esp + 0x74], 0
fmul qword [esp + 0x64]
fild qword [esp + 0x70]
fdivp st(1)
fmul qword [0x5ff1b8]
fmul qword [0x5ff4f0]
fsubr qword [0x604fc0]
jmp 0x4d1ec5
fld qword [ebx + edi*8 - 8]
fcom qword [0x5fd8b0]
fnstsw ax
test ah, 0x41
je 0x4d1e71
fstp st(0)
fld qword [0x604b08]
fldlg2
mov eax, dword [ebp + 0x3c]
fxch st(1)
fyl2x
lea ecx, [eax + edi*8 - 8]
fstp qword [esp + 0x2c]
fld qword [0x5ff518]
fldlg2
fld qword [esp + 0x3c]
fyl2x
fsub qword [esp + 0x2c]
fld qword [eax + edi*8]
fsub qword [ecx]
fmulp st(1)
fldlg2
fld qword [ebx + edi*8]
fyl2x
fsub qword [esp + 0x2c]
fdivp st(1)
fadd qword [ecx]
fmul qword [0x6002d8]
call fcn.005dffc6
mov dword [esp + 0x28], edi
jmp 0x4d1e0c
fld qword [esi]
fld qword [edi + esi]
fpatan
fld st(0)
fcos
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
inc eax
add esi, 8
cmp eax, ecx
mov dword [esp + 0xc], eax
fmul st(2)
fstp qword [edi + esi - 8]
fsin
fmul st(1)
fstp qword [esi - 8]
fstp st(0)
jb 0x4d1d92
mov edi, dword [esp + 0x10]
cmp edi, 1
jbe 0x4d1f2d
mov esi, dword [ebp + 0x30]
mov eax, dword [ebp + 0x28]
lea edx, [esi + eax*8 - 8]
mov eax, dword [ebp + 0x2c]
lea ecx, [esi + 8]
sub eax, esi
lea esi, [edi - 1]
mov edi, dword [eax + ecx]
add ecx, 8
mov dword [eax + edx], edi
mov edi, dword [eax + ecx - 4]
mov dword [eax + edx + 4], edi
sub edx, 8
fld qword [ecx - 8]
fchs
fstp qword [edx + 8]
dec esi
jne 0x4d1f0e
mov esi, dword [ebp + 0x2c]
mov ecx, dword [esp + 0x10]
mov eax, dword [ebp + 0x30]
mov ebx, dword [ebp + 0x28]
xor edi, edi
push 1
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + ecx*8], edi
mov dword [esi + ecx*8 + 4], edi
mov dword [eax], edi
push ebx
mov dword [eax + 4], edi
push eax
mov dword [eax + ecx*8], edi
push esi
mov dword [eax + ecx*8 + 4], edi
call fcn.0051fa60
mov eax, dword [ebp + 0xc]
add esp, 0x10
cmp eax, edi
jle 0x4d1f7c
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
cmp ecx, eax
mov dword [esp + 0x28], 1
jb 0x4d1f80
mov dword [esp + 0x28], edi
cmp dword [ebp + 0x40], edi
jne 0x4d1f8f
cmp dword [esp + 0x28], edi
je 0x4d21a2
mov edx, dword [esi]
mov eax, dword [esi + 4]
fld qword [esi]
mov dword [esp + 0x4c], edx
mov ecx, edx
mov edx, eax
cmp ebx, 1
fld st(0)
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], ecx
mov dword [esp + 0x58], edx
fmulp st(1)
jbe 0x4d2001
lea ecx, [esi + 8]
lea edx, [ebx - 1]
fld qword [esp + 0x4c]
fcomp qword [ecx]
fnstsw ax
test ah, 1
je 0x4d1fd5
mov edi, dword [ecx + 4]
mov eax, dword [ecx]
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], eax
xor edi, edi
fld qword [esp + 0x54]
fcomp qword [ecx]
fnstsw ax
test ah, 0x41
jne 0x4d1ff1
mov edi, dword [ecx + 4]
mov eax, dword [ecx]
mov dword [esp + 0x58], edi
mov dword [esp + 0x54], eax
xor edi, edi
fld qword [ecx]
fld st(0)
fmul st(1)
add ecx, 8
dec edx
faddp st(2)
fstp st(0)
jne 0x4d1fb9
fld qword [esp + 0x4c]
fabs
fld qword [esp + 0x54]
fabs
fstp qword [esp + 0x2c]
fcom qword [esp + 0x2c]
fnstsw ax
test ah, 1
je 0x4d2030
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
fstp st(0)
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], edx
jmp 0x4d2034
fstp qword [esp + 0x3c]
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], edi
fild qword [esp + 0x78]
cmp dword [esp + 0x28], edi
fdivp st(1)
fsqrt
fdivr qword [esp + 0x3c]
fst qword [esp + 0x64]
je 0x4d2120
fcomp qword [0x604a48]
fnstsw ax
test ah, 0x41
jne 0x4d2122
mov eax, dword [esp + 0x18]
xor edx, edx
div dword [esp + 0x20]
mov dword [esp + 0x84], edi
mov dword [esp + 0x80], eax
fild qword [esp + 0x80]
fld qword [0x5ff1b8]
call fcn.005dffc6
fmul qword [0x5ff750]
cmp ebx, edi
fadd qword [0x604fb8]
fmul qword [esp + 0x3c]
fstp qword [esp + 0x2c]
jbe 0x4d20e0
fld qword [esp + 0x2c]
fchs
mov ecx, esi
mov edx, ebx
fld qword [ecx]
fcomp qword [esp + 0x2c]
fnstsw ax
test ah, 0x41
jne 0x4d20cd
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x30]
mov dword [ecx], eax
mov dword [ecx + 4], edi
fcom qword [ecx]
fnstsw ax
test ah, 0x41
jne 0x4d20d8
fst qword [ecx]
add ecx, 8
dec edx
jne 0x4d20b3
fstp st(0)
mov edi, dword [ebp + 0x30]
lea ecx, [ebx*8]
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
and ecx, 3
push ebx
rep stosb byte es:[edi], al
mov eax, dword [ebp + 0x30]
push eax
push esi
call fcn.0051fc40
mov eax, dword [esp + 0x28]
mov edi, dword [ebp + 0x28]
add esp, 0x10
inc eax
mov dword [esp + 0x18], eax
mov ebx, 1
jmp 0x4d1a12
fstp st(0)
cmp dword [ebp + 0x40], edi
je 0x4d21a2
push 0x2ee
lea ecx, [esp + 0x20]
call fcn.005df18a
lea ecx, [esp + 0x1c]
push 0x62ae08
lea edx, [esp + 0x30]
push ecx
push edx
call fcn.005df262
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x94], 2
call fcn.005df340
lea ecx, [esp + 0x2c]
mov byte [esp + 0x90], 1
call fcn.005df184
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x64]
push eax
push ecx
lea edx, [esp + 0x24]
push 0x62b62c
push edx
call fcn.005df346
add esp, 0x10
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x24]
push eax
call fcn.005df340
mov ecx, dword [esp + 0x24]
push edi
push edi
push ecx
call fcn.005df352
mov ecx, dword [esp + 0x38]
call fcn.005df376
mov edi, dword [ebp + 0x30]
lea ecx, [ebx*8]
mov edx, ecx
mov byte [esp + 0x90], 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
call fcn.005df184
lea ecx, [esp + 0x24]
mov dword [esp + 0x90], 0xffffffff
call fcn.005df184
mov ecx, dword [esp + 0x88]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x3c