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

Disassembly:
mov ecx, dword [0x1313d80]
xor eax, eax
sub esp, 0x98
cmp dword [ecx + 0x40c], eax
jle 0x4a68e8
mov dword [0x13143bc], 0x200000
mov edx, dword [ecx + 0x40c]
cmp edx, eax
mov dword [esp + 0x24], eax
jle 0x4a68de
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 [0x1313d64]
add ebp, esi
mov dword [esp + 0x14], ebp
mov ecx, dword [ebp + 0xd4]
cmp ecx, edx
jne 0x4a68af
mov esi, dword [ebp + 0xd8]
test esi, esi
mov dword [esp + 0x1c], esi
je 0x4a68af
mov dword [0x13143b0], eax
push 0x1314600
shl eax, 8
push 0x13143c4
push ebp
mov dword [0x13143b8], eax
call fcn.0049b4f0
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.0049adc0
mov ecx, dword [ebp + 0x2e4]
lea edx, [esp + 0x50]
push ecx
push edx
call fcn.0049ab10
mov ecx, dword [0x13e423c]
add esp, 0x1c
test byte [ecx + 0x20], 8
je 0x4a6476
mov ecx, eax
sub ecx, ebx
je 0x4a6444
sub ecx, 2
jne 0x4a6476
fld dword [ebp + 0x2e4]
fmul dword [0x536304]
push ebx
push 0x3f000000
push 0x3e4ccccd
push 0x3e4ccccd
fadd dword [0x535738]
push 0x3f800000
push ecx
lea edx, [esp + 0x54]
fstp dword [esp]
push edx
call fcn.0049a2d0
add esp, 0x1c
jmp 0x4a68af
fld dword [ebp + 0x2e4]
fmul dword [0x536300]
push 0
push 0x3f000000
push 0
push 0x3f800000
push 0
push ecx
lea eax, [esp + 0x54]
fstp dword [esp]
push eax
call fcn.0049a2d0
add esp, 0x1c
jmp 0x4a65a6
cmp eax, 2
je 0x4a68af
cmp eax, 1
jne 0x4a65a6
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 0x4a6490
lea ecx, [esp + 0x68]
push ecx
call fcn.0049a9d0
mov edx, dword [0x13e423c]
mov edi, eax
add esp, 4
test byte [edx + 0x20], 4
je 0x4a6583
mov eax, edi
sub eax, 0
je 0x4a6520
dec eax
mov dword [esp + 0x18], 0x3f800000
je 0x4a6528
mov dword [esp + 0x2c], 0x3e4ccccd
mov dword [esp + 0x24], 0x3e4ccccd
xor eax, eax
fld dword [esp + eax*4 + 0x68]
fsub dword [0x535738]
inc eax
cmp eax, 3
fstp dword [esp + eax*4 + 0x64]
fld dword [esp + eax*4 + 0x70]
fadd dword [0x535738]
fstp dword [esp + eax*4 + 0x70]
jl 0x4a64fc
jmp 0x4a6538
mov dword [esp + 0x18], 0
mov dword [esp + 0x2c], 0x3f800000
mov dword [esp + 0x24], 0
lea eax, [esp + 0x84]
push eax
push 0x131460c
call fcn.004635d0
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 0x1314600
call fcn.004b9530
add esp, 0x28
mov eax, edi
sub eax, 0
je 0x4a65a0
dec eax
je 0x4a6598
inc dword [0x1314874]
jmp 0x4a68af
inc dword [0x1314870]
jmp 0x4a65a6
inc dword [0x131486c]
fld dword [ebp + 0x2e4]
fdiv dword [ebp + 0xc8]
mov eax, dword [0x13144c8]
push ecx
test eax, eax
fstp dword [esp]
je 0x4a65d1
lea ecx, [esp + 0x40]
push ecx
call fcn.004cc700
fstp dword [ebp + 0x2f0]
jmp 0x4a65e1
lea edx, [esp + 0x40]
push edx
call fcn.004cc700
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 0x4a6778
lea ecx, [esi + 0x1d8]
mov dword [esp + 0x28], ecx
mov edx, dword [esp + 0x28]
movsx eax, word [edx]
push eax
call fcn.00516330
add esp, 4
mov dword [esp + 0x64], eax
test eax, eax
je 0x4a6756
mov ecx, dword [eax + 0x44]
mov edi, dword [eax + 0x50]
test ecx, ecx
mov dword [esp + 0x38], 0
jle 0x4a6756
mov eax, dword [0x82a280]
cmp eax, 0x2000
jl 0x4a6664
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 [0x1313c80]
add esp, 0xc
jmp 0x4a673e
mov esi, eax
mov ecx, dword [esp + 0x10]
shl esi, 4
add esi, 0x80a280
inc eax
mov dword [0x82a280], 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 + 0x135ea5c]
cmp dword [ebp + 0x170], 1
jne 0x4a670a
mov eax, dword [ebp + 0x174]
mov eax, dword [eax + 0x2ac]
cmp eax, 0x12
jne 0x4a66e2
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.0049acc0
add esp, 0xc
cmp eax, 2
jne 0x4a670a
jmp 0x4a6721
cmp eax, 0x13
jne 0x4a670a
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.0049acc0
add esp, 0xc
test eax, eax
je 0x4a6721
mov edx, dword [esp + 0x14]
push 0
push ebp
push esi
mov dword [edx + 8], 1
call fcn.0049cc80
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 0x4a663d
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 0x4a660b
mov eax, dword [0x13e6ca0]
mov ecx, dword [eax + 0x20]
test ecx, ecx
je 0x4a6833
fld dword [ebp + 0x94]
mov edx, dword [ebp + 0x8c]
mov ecx, dword [ebp + 0x90]
fadd qword [0x5362f8]
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.004b9200
fld dword [esp + 0x6c]
fadd qword [0x5362f0]
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.004cc8f0
mov ecx, dword [0x13e6ca0]
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.004b9200
add esp, 0x1c
mov eax, dword [0x13e4234]
mov ecx, dword [eax + 0x20]
test ecx, ecx
je 0x4a68af
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 0x4a6847
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.004b9530
add esp, 0x20
mov ecx, dword [0x1313d80]
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 0x4a634e
pop edi
pop esi
pop ebp
pop ebx
mov dword [0x13143bc], 0
add esp, 0x98
ret