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

Disassembly:
mov ecx, dword [0x12ff7a0]
xor eax, eax
sub esp, 0x98
cmp dword [ecx + 0x40c], eax
jle 0x4a93e8
mov dword [0x12ffde0], 0x200000
mov edx, dword [ecx + 0x40c]
cmp edx, eax
mov dword [esp + 0x24], eax
jle 0x4a93de
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x30], eax
mov ebp, dword [ecx + 0x410]
mov esi, dword [esp + 0x30]
mov edx, dword [0x12ff784]
add ebp, esi
mov dword [esp + 0x14], ebp
mov ecx, dword [ebp + 0xd4]
cmp ecx, edx
jne 0x4a93af
mov esi, dword [ebp + 0xd8]
test esi, esi
mov dword [esp + 0x1c], esi
je 0x4a93af
mov dword [0x12ffdd4], eax
push 0x1300024
shl eax, 8
push 0x12ffde8
push ebp
mov dword [0x12ffddc], eax
call fcn.00497bc0
fld dword [ebp + 0xc8]
fmul dword [esi + 0x14]
lea edx, [esp + 0x48]
lea eax, [esp + 0x60]
push edx
push eax
xor ebx, ebx
fst dword [esp + 0x24]
fmul dword [esi + 0x2c]
fstp dword [esp + 0x68]
fld dword [esp + 0x24]
fmul dword [esi + 0x30]
fstp dword [esp + 0x6c]
fld dword [esp + 0x24]
fmul dword [esi + 0x34]
fstp dword [esp + 0x70]
call fcn.00497490
mov ecx, dword [ebp + 0x2e4]
lea edx, [esp + 0x50]
push ecx
push edx
call fcn.004971e0
mov ecx, dword [0x13d0c5c]
add esp, 0x1c
test byte [ecx + 0x20], 8
je 0x4a8f76
mov ecx, eax
sub ecx, ebx
je 0x4a8f44
sub ecx, 2
jne 0x4a8f76
fld dword [ebp + 0x2e4]
fmul dword [0x5321f4]
push ebx
push 0x3f000000
push 0x3e4ccccd
push 0x3e4ccccd
fadd dword [0x531744]
push 0x3f800000
push ecx
lea edx, [esp + 0x54]
fstp dword [esp]
push edx
call fcn.004969a0
add esp, 0x1c
jmp 0x4a93af
fld dword [ebp + 0x2e4]
fmul dword [0x5321f0]
push 0
push 0x3f000000
push 0
push 0x3f800000
push 0
push ecx
lea eax, [esp + 0x54]
fstp dword [esp]
push eax
call fcn.004969a0
add esp, 0x1c
jmp 0x4a90a6
cmp eax, 2
je 0x4a93af
cmp eax, 1
jne 0x4a90a6
mov ecx, dword [esi + 4]
add ecx, 0x30
xor eax, eax
fld dword [esp + 0x10]
fmul dword [ecx - 0xc]
add eax, 4
add ecx, 4
cmp eax, 0xc
fadd dword [esp + eax + 0x50]
fstp dword [esp + eax + 0x64]
fld dword [esp + 0x10]
fmul dword [ecx - 4]
fadd dword [esp + eax + 0x50]
fstp dword [esp + eax + 0x70]
jl 0x4a8f90
lea ecx, [esp + 0x68]
push ecx
call fcn.004970a0
mov edx, dword [0x13d0c5c]
mov edi, eax
add esp, 4
test byte [edx + 0x20], 4
je 0x4a9083
mov eax, edi
sub eax, 0
je 0x4a9020
dec eax
mov dword [esp + 0x18], 0x3f800000
je 0x4a9028
mov dword [esp + 0x2c], 0x3e4ccccd
mov dword [esp + 0x24], 0x3e4ccccd
xor eax, eax
fld dword [esp + eax*4 + 0x68]
fsub dword [0x531744]
inc eax
cmp eax, 3
fstp dword [esp + eax*4 + 0x64]
fld dword [esp + eax*4 + 0x70]
fadd dword [0x531744]
fstp dword [esp + eax*4 + 0x70]
jl 0x4a8ffc
jmp 0x4a9038
mov dword [esp + 0x18], 0
mov dword [esp + 0x2c], 0x3f800000
mov dword [esp + 0x24], 0
lea eax, [esp + 0x84]
push eax
push 0x1300030
call fcn.00460f20
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
push 0x3f000000
push ecx
push edx
lea ecx, [esp + 0x88]
push eax
lea edx, [esp + 0x80]
push ecx
lea eax, [esp + 0xa0]
push edx
push eax
push 0x1300024
call fcn.004b5af0
add esp, 0x28
mov eax, edi
sub eax, 0
je 0x4a90a0
dec eax
je 0x4a9098
inc dword [0x1300298]
jmp 0x4a93af
inc dword [0x1300294]
jmp 0x4a90a6
inc dword [0x1300290]
fld dword [ebp + 0x2e4]
fdiv dword [ebp + 0xc8]
mov eax, dword [0x12ffeec]
push ecx
test eax, eax
fstp dword [esp]
je 0x4a90d1
lea ecx, [esp + 0x40]
push ecx
call fcn.004c8ca0
fstp dword [ebp + 0x2f0]
jmp 0x4a90e1
lea edx, [esp + 0x40]
push edx
call fcn.004c8ca0
fstp dword [ebp + 0x2ec]
mov eax, dword [esi + 0x10]
add esp, 8
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x1d4]
test eax, eax
mov dword [esp + 0x20], 0
jle 0x4a9278
lea ecx, [esi + 0x1d8]
mov dword [esp + 0x28], ecx
mov edx, dword [esp + 0x28]
movsx eax, word [edx]
push eax
call fcn.00512800
add esp, 4
mov dword [esp + 0x64], eax
test eax, eax
je 0x4a9256
mov ecx, dword [eax + 0x44]
mov edi, dword [eax + 0x50]
test ecx, ecx
mov dword [esp + 0x38], 0
jle 0x4a9256
mov eax, dword [0x7f1e08]
cmp eax, 0x2000
jl 0x4a9164
mov ecx, dword [esi + 4]
mov edx, dword [ecx]
push edx
push str._ERROR:_MAX_STATIC_MODELS_SURFS_exceeded___surface_of__s_skipped_n
push 1
call dword [0x12ff6a0]
add esp, 0xc
jmp 0x4a923e
mov esi, eax
mov ecx, dword [esp + 0x10]
shl esi, 4
add esi, 0x7d1e08
inc eax
mov dword [0x7f1e08], eax
mov eax, dword [esp + 0x20]
mov dword [esi], 9
mov dword [esi + 4], ebx
mov dword [esi + 8], edi
mov dword [esi + 0xc], eax
mov edx, dword [ecx + 0x140]
mov ebp, dword [edx*4 + 0x134a480]
cmp dword [ebp + 0x170], 1
jne 0x4a920a
mov eax, dword [ebp + 0x174]
mov eax, dword [eax + 0x2ac]
cmp eax, 0x12
jne 0x4a91e2
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x3c]
fld dword [ebp + 0xb0]
mov edx, dword [ecx + 0x2e4]
fadd dword [ebp + 0xac]
push edx
push eax
push ecx
fstp dword [esp]
call fcn.00497390
add esp, 0xc
cmp eax, 2
jne 0x4a920a
jmp 0x4a9221
cmp eax, 0x13
jne 0x4a920a
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x3c]
mov edx, dword [ecx + 0x2e4]
mov ecx, dword [ebp + 0xb0]
push edx
push eax
push ecx
call fcn.00497390
add esp, 0xc
test eax, eax
je 0x4a9221
mov edx, dword [esp + 0x14]
push 0
push ebp
push esi
mov dword [edx + 8], 1
call fcn.00499350
add esp, 0xc
mov ecx, dword [edi + 0x48]
mov eax, dword [esp + 0x10]
mov edi, dword [edi + 0x64]
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x14]
add ebx, ecx
add eax, 0x15c
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x64]
mov eax, dword [esp + 0x38]
inc eax
mov edx, dword [ecx + 0x44]
mov dword [esp + 0x38], eax
cmp eax, edx
jl 0x4a913d
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x28]
mov ecx, dword [esi + 0x1d4]
inc eax
add edx, 2
cmp eax, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], edx
jl 0x4a910b
mov eax, dword [0x13d36c0]
mov ecx, dword [eax + 0x20]
test ecx, ecx
je 0x4a9333
fld dword [ebp + 0x94]
mov edx, dword [ebp + 0x8c]
mov ecx, dword [ebp + 0x90]
fadd qword [0x5321e8]
mov dword [esp + 0x48], edx
mov edx, dword [ebp + 0x2ec]
mov dword [esp + 0x4c], ecx
push 3
push 0
push 0x3f800000
fstp dword [esp + 0x5c]
fld dword [eax + 0x1c]
fadd st(0), st(0)
push 0x3f800000
push ecx
lea eax, [esp + 0x5c]
fstp dword [esp]
push edx
push eax
call fcn.004b57c0
fld dword [esp + 0x6c]
fadd qword [0x5321e0]
mov eax, dword [ebp + 0x2ec]
lea ecx, [esp + 0x9c]
lea edx, [esp + 0x7c]
push ecx
push edx
push eax
fstp dword [esp + 0x78]
push esi
call fcn.004c8e90
mov ecx, dword [0x13d36c0]
add esp, 0x2c
lea edx, [esp + 0x48]
fld dword [ecx + 0x1c]
push 0
push 0
push 0x3f800000
push 0x3f800000
fadd st(0), st(0)
sub esp, 8
fstp dword [esp + 4]
fild dword [esp + 0x78]
fstp dword [esp]
push edx
call fcn.004b57c0
add esp, 0x1c
mov eax, dword [0x13d0c54]
mov ecx, dword [eax + 0x20]
test ecx, ecx
je 0x4a93af
mov ecx, dword [esi + 4]
add ecx, 0x30
xor eax, eax
fld dword [ecx - 0xc]
fmul dword [ebp + 0xc8]
add eax, 4
add ecx, 4
cmp eax, 0xc
fmul dword [esi + 0x14]
fstp dword [esp + eax + 0x8c]
fld dword [ebp + 0xc8]
fmul dword [ecx - 4]
fmul dword [esi + 0x14]
fstp dword [esp + eax + 0x98]
jl 0x4a9347
push 0x3f400000
push 0x3f800000
push 0
lea ecx, [esp + 0xa8]
push 0x3f800000
lea edx, [esp + 0xa0]
push ecx
lea eax, [ebp + 0x98]
push edx
add ebp, 0x8c
push eax
push ebp
call fcn.004b5af0
add esp, 0x20
mov ecx, dword [0x12ff7a0]
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x30]
inc eax
mov edx, dword [ecx + 0x40c]
add esi, 0x2f4
cmp eax, edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], esi
jl 0x4a8e4e
pop edi
pop esi
pop ebp
pop ebx
mov dword [0x12ffde0], 0
add esp, 0x98
ret