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

Disassembly:
mov ecx, dword [0x160cd60]
xor eax, eax
sub esp, 0x98
cmp dword [ecx + 0x40c], eax
jle 0x4b6f0f
mov dword [0x160d39c], 0x200000
mov edx, dword [ecx + 0x40c]
cmp edx, eax
mov dword [esp + 0x30], eax
jle 0x4b6f05
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x34], eax
mov ebx, dword [ecx + 0x410]
mov esi, dword [esp + 0x34]
mov edx, dword [0x160cd44]
add ebx, esi
mov dword [esp + 0x14], ebx
mov ecx, dword [ebx + 0xd4]
cmp ecx, edx
jne 0x4b6ed6
mov edi, dword [ebx + 0xd8]
test edi, edi
mov dword [esp + 0x18], edi
je 0x4b6ed6
mov dword [0x160d390], eax
push 0x160d5ec
shl eax, 8
push 0x160d3a4
push ebx
mov dword [0x160d398], eax
call fcn.004ad310
fld dword [ebx + 0xc8]
fmul dword [edi + 0x14]
lea edx, [esp + 0x28]
lea eax, [esp + 0x60]
push edx
push eax
xor ebp, ebp
fst dword [esp + 0x24]
fmul dword [edi + 0x2c]
fstp dword [esp + 0x68]
fld dword [esp + 0x24]
fmul dword [edi + 0x30]
fstp dword [esp + 0x6c]
fld dword [esp + 0x24]
fmul dword [edi + 0x34]
fstp dword [esp + 0x70]
call fcn.004acbe0
mov ecx, dword [ebx + 0x2e4]
lea edx, [esp + 0x30]
push ecx
push edx
call fcn.004ac930
mov ecx, dword [0x16dd234]
add esp, 0x1c
test byte [ecx + 0x20], 8
je 0x4b69c6
mov ecx, eax
sub ecx, ebp
je 0x4b6994
sub ecx, 2
jne 0x4b69c6
fld dword [ebx + 0x2e4]
fmul dword [0x54f824]
push ebp
push 0x3f000000
push 0x3e4ccccd
push 0x3e4ccccd
fadd dword [0x54e768]
push 0x3f800000
push ecx
lea edx, [esp + 0x34]
fstp dword [esp]
push edx
call fcn.004ac0f0
add esp, 0x1c
jmp 0x4b6ed6
fld dword [ebx + 0x2e4]
fmul dword [0x54f820]
push 0
push 0x3f000000
push 0
push 0x3f800000
push 0
push ecx
lea eax, [esp + 0x34]
fstp dword [esp]
push eax
call fcn.004ac0f0
add esp, 0x1c
jmp 0x4b6af6
cmp eax, 2
je 0x4b6ed6
cmp eax, 1
jne 0x4b6af6
mov ecx, dword [edi + 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 0x4b69e0
lea ecx, [esp + 0x68]
push ecx
call fcn.004ac7f0
mov edx, dword [0x16dd234]
mov esi, eax
add esp, 4
test byte [edx + 0x20], 4
je 0x4b6ad3
mov eax, esi
sub eax, 0
je 0x4b6a70
dec eax
mov dword [esp + 0x30], 0x3f800000
je 0x4b6a78
mov dword [esp + 0x28], 0x3e4ccccd
mov dword [esp + 0x3c], 0x3e4ccccd
xor eax, eax
fld dword [esp + eax*4 + 0x68]
fsub dword [0x54e768]
inc eax
cmp eax, 3
fstp dword [esp + eax*4 + 0x64]
fld dword [esp + eax*4 + 0x70]
fadd dword [0x54e768]
fstp dword [esp + eax*4 + 0x70]
jl 0x4b6a4c
jmp 0x4b6a88
mov dword [esp + 0x30], 0
mov dword [esp + 0x28], 0x3f800000
mov dword [esp + 0x3c], 0
lea eax, [esp + 0x84]
push eax
push 0x160d5f8
call fcn.004727b0
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x38]
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 0x160d5ec
call fcn.004cdc70
add esp, 0x28
mov eax, esi
sub eax, 0
je 0x4b6af0
dec eax
je 0x4b6ae8
inc dword [0x160d864]
jmp 0x4b6ed6
inc dword [0x160d860]
jmp 0x4b6af6
inc dword [0x160d85c]
mov eax, dword [0x160d4a8]
test eax, eax
je 0x4b6b18
mov ecx, dword [ebx + 0x2e4]
lea edx, [esp + 0x1c]
push ecx
push edx
call fcn.004e0fa0
fstp dword [ebx + 0x2f0]
jmp 0x4b6b2f
mov eax, dword [ebx + 0x2e4]
lea ecx, [esp + 0x1c]
push eax
push ecx
call fcn.004e0fa0
fstp dword [ebx + 0x2ec]
mov eax, dword [edi + 0x1d4]
mov edx, dword [edi + 0x10]
add esp, 8
mov dword [esp + 0x10], edx
test eax, eax
mov dword [esp + 0x38], 0
jle 0x4b6d9b
lea eax, [edi + 0x1d8]
mov dword [esp + 0x2c], eax
mov ecx, dword [esp + 0x2c]
movsx edx, word [ecx]
push edx
call fcn.0052d290
add esp, 4
mov dword [esp + 0x60], eax
test eax, eax
je 0x4b6d79
mov ecx, dword [eax + 0x48]
mov esi, dword [eax + 0x54]
test ecx, ecx
mov dword [esp + 0x44], 0
jle 0x4b6d79
mov eax, dword [0x9c08e8]
cmp eax, 0x2000
jl 0x4b6bb2
mov eax, dword [edi + 4]
mov ecx, dword [eax]
push ecx
push str._ERROR:_MAX_STATIC_MODELS_SURFS_exceeded___surface_of__s_skipped_n
push 1
call dword [0x160cc60]
add esp, 0xc
jmp 0x4b6d61
mov edi, eax
mov edx, dword [esp + 0x38]
shl edi, 4
add edi, 0x9a08e8
inc eax
mov dword [0x9c08e8], eax
mov eax, dword [esp + 0x10]
mov dword [edi], 9
mov dword [edi + 4], ebp
mov dword [edi + 8], esi
mov dword [edi + 0xc], edx
mov ecx, dword [eax + 0x140]
mov ebx, dword [ecx*4 + 0x1657a4c]
cmp dword [ebx + 0x170], 1
jne 0x4b6d2d
mov edx, dword [0x16e0cd0]
mov eax, dword [edx + 0x20]
test eax, eax
jne 0x4b6d2d
mov eax, dword [ebx + 0x174]
mov eax, dword [eax + 0x2ac]
cmp eax, 0x12
jne 0x4b6c4c
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
fld dword [ebx + 0xb0]
mov edx, dword [ecx + 0x2e4]
fadd dword [ebx + 0xac]
push edx
push eax
push ecx
fstp dword [esp]
call fcn.004acae0
add esp, 0xc
cmp eax, 2
jne 0x4b6d2d
jmp 0x4b6d44
cmp eax, 0x13
jne 0x4b6c87
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
fld dword [ebx + 0xb0]
mov edx, dword [ecx + 0x2e4]
fsub dword [ebx + 0xac]
push edx
push eax
push ecx
fstp dword [esp]
call fcn.004acae0
add esp, 0xc
cmp eax, 2
je 0x4b6d2d
jmp 0x4b6d44
cmp eax, 0x14
jne 0x4b6cdd
fld dword [esp + 0x1c]
fsub dword [0x160d3a4]
fld dword [esp + 0x20]
fsub dword [0x160d3a8]
fld dword [esp + 0x24]
fsub dword [0x160d3ac]
fld dword [ebx + 0xb0]
fadd dword [ebx + 0xac]
fld st(1)
fmul st(2)
fld st(3)
fmul st(4)
faddp st(1)
fld st(4)
fmul st(5)
faddp st(1)
fld st(1)
fmul st(2)
fcompp
fstp st(0)
fstp st(0)
fnstsw ax
fstp st(0)
test ah, 0x41
fstp st(0)
jp 0x4b6d2d
jmp 0x4b6d44
cmp eax, 0x15
jne 0x4b6d2d
fld dword [esp + 0x1c]
fsub dword [0x160d3a4]
fld dword [esp + 0x20]
fsub dword [0x160d3a8]
fld dword [esp + 0x24]
fsub dword [0x160d3ac]
fld dword [ebx + 0xb0]
fld st(1)
fmul st(2)
fld st(3)
fmul st(4)
faddp st(1)
fld st(4)
fmul st(5)
faddp st(1)
fld st(1)
fmul st(2)
fcompp
fstp st(0)
fstp st(0)
fnstsw ax
fstp st(0)
and eax, 0x100
fstp st(0)
je 0x4b6d44
mov ecx, dword [esp + 0x14]
push 0
push ebx
push edi
mov dword [ecx + 8], 1
call fcn.004aead0
add esp, 0xc
mov ecx, dword [esi + 0x48]
mov eax, dword [esp + 0x10]
mov esi, dword [esi + 0x64]
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
add ebp, ecx
add eax, 0x15c
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x44]
inc eax
mov ecx, dword [edx + 0x48]
mov dword [esp + 0x44], eax
cmp eax, ecx
jl 0x4b6b8b
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x2c]
mov ecx, dword [edi + 0x1d4]
inc eax
add edx, 2
cmp eax, ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x2c], edx
jl 0x4b6b59
mov eax, dword [0x16e0cbc]
mov ecx, dword [eax + 0x20]
test ecx, ecx
je 0x4b6e59
fld dword [ebx + 0x94]
mov ecx, dword [ebx + 0x8c]
mov edx, dword [ebx + 0x90]
fadd qword [0x54f818]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], edx
push 3
push 0
push 0x3f800000
push 0x3f800000
fstp dword [esp + 0x60]
fld dword [eax + 0x1c]
mov eax, dword [ebx + 0x2ec]
push ecx
fadd st(0), st(0)
lea ecx, [esp + 0x5c]
fstp dword [esp]
push eax
push ecx
call fcn.004cd940
fld dword [esp + 0x6c]
fadd qword [0x54f810]
mov ecx, dword [ebx + 0x2ec]
lea edx, [esp + 0x9c]
lea eax, [esp + 0x80]
push edx
push eax
push ecx
fstp dword [esp + 0x78]
push edi
call fcn.004e1190
mov edx, dword [0x16e0cbc]
add esp, 0x2c
lea eax, [esp + 0x48]
fld dword [edx + 0x1c]
push 0
push 0
push 0x3f800000
push 0x3f800000
fadd st(0), st(0)
sub esp, 8
fstp dword [esp + 4]
fild dword [esp + 0x7c]
fstp dword [esp]
push eax
call fcn.004cd940
add esp, 0x1c
mov ecx, dword [0x16dd22c]
mov eax, dword [ecx + 0x20]
test eax, eax
je 0x4b6ed6
mov ecx, dword [edi + 4]
add ecx, 0x30
xor eax, eax
fld dword [ecx - 0xc]
fmul dword [ebx + 0xc8]
add eax, 4
add ecx, 4
cmp eax, 0xc
fmul dword [edi + 0x14]
fstp dword [esp + eax + 0x8c]
fld dword [ebx + 0xc8]
fmul dword [ecx - 4]
fmul dword [edi + 0x14]
fstp dword [esp + eax + 0x98]
jl 0x4b6e6e
push 0x3f400000
push 0x3f800000
push 0
lea edx, [esp + 0xa8]
push 0x3f800000
lea eax, [esp + 0xa0]
push edx
lea ecx, [ebx + 0x98]
push eax
add ebx, 0x8c
push ecx
push ebx
call fcn.004cdc70
add esp, 0x20
mov ecx, dword [0x160cd60]
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 0x34]
inc eax
mov edx, dword [ecx + 0x40c]
add esi, 0x2f4
cmp eax, edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x34], esi
jl 0x4b689e
pop edi
pop esi
pop ebp
pop ebx
mov dword [0x160d39c], 0
add esp, 0x98
ret