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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5cadeb
mov eax, dword fs:[0]
push eax
sub esp, 0xcd0
push ebx
push esi
push edi
mov eax, dword [0x61a654]
xor eax, esp
push eax
lea eax, [esp + 0xce0]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x20], edi
cmp dword [ebp + 0xc], 3
jl 0x4a65d1
call fcn.004850d0
test al, al
je 0x4a65d1
mov esi, dword [ebp + 0x14]
mov eax, dword [ebp + 0x18]
push 0
push esi
push eax
mov ecx, edi
call fcn.00485da0
mov ebx, dword [esi + 0xc]
mov eax, dword [edi + 0x20]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x8c]
shl ebx, 8
or ebx, dword [esi]
push str.SetTexture_NULL
shl ebx, 8
or ebx, dword [esi + 4]
shl ebx, 8
or ebx, dword [esi + 8]
xor esi, esi
push esi
push esi
push eax
call edx
push eax
call fcn.004a44c0
lea eax, [esp + 0x54]
add esp, 8
mov dword [esp + 0xccc], eax
mov dword [esp + 0xcd0], esi
mov dword [esp + 0xcd4], 0x64
xor eax, eax
cmp dword [ebp + 0xc], esi
mov dword [esp + 0xce8], esi
mov dword [esp + 0x10], eax
jle 0x4a6567
fldz
jmp 0x4a6441
mov eax, dword [esp + 0x10]
xor esi, esi
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + eax*8]
add edx, dword [ebp + 0x1c]
mov eax, dword [ecx + eax*8 + 4]
add eax, dword [ebp + 0x20]
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
mov dword [esp + 0x14], eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], esi
fstp dword [esp + 0x24]
fild dword [esp + 0x14]
fstp dword [esp + 0x28]
fst dword [esp + 0x2c]
fld1
fstp dword [esp + 0x30]
fst dword [esp + 0x3c]
fst dword [esp + 0x40]
cmp dword [edi + 0x78], esi
je 0x4a650c
mov esi, dword [edi + 0x74]
fstp st(0)
fld dword [esp + 0x24]
mov edi, dword [edi + 0x60]
fstp dword [esp + 0x18]
fld dword [esp + 0x28]
fstp dword [esp + 0x1c]
test edi, edi
jne 0x4a64ad
call fcn.0059ec50
mov esi, dword [esi + 4]
test edi, edi
je 0x4a64b8
mov eax, dword [edi]
jmp 0x4a64ba
xor eax, eax
cmp esi, dword [eax + 0x14]
jne 0x4a64c4
call fcn.0059ec50
test edi, edi
jne 0x4a6580
call fcn.0059ec50
cmp esi, dword [edi + 0x14]
jne 0x4a64db
call fcn.0059ec50
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x48]
lea ecx, [esi + 8]
push eax
call fcn.00468030
mov ecx, dword [eax]
mov dword [esp + 0x18], ecx
fld dword [esp + 0x18]
mov edx, dword [eax + 4]
fstp dword [esp + 0x24]
mov dword [esp + 0x1c], edx
fld dword [esp + 0x1c]
fstp dword [esp + 0x28]
fldz
mov eax, dword [esp + 0xcd4]
cmp dword [esp + 0xcd0], eax
jne 0x4a652c
add eax, eax
fstp st(0)
push eax
lea ecx, [esp + 0x50]
call fcn.00485490
fldz
mov edi, dword [esp + 0xcd0]
mov eax, dword [esp + 0x10]
shl edi, 5
add edi, dword [esp + 0xccc]
mov ecx, 8
lea esi, [esp + 0x24]
rep movsd dword es:[edi], dword [esi]
inc dword [esp + 0xcd0]
mov edi, dword [esp + 0x20]
inc eax
cmp eax, dword [ebp + 0xc]
mov dword [esp + 0x10], eax
jl 0x4a643b
fstp st(0)
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x4a6587
mov ecx, dword [edi + 0x20]
push ecx
lea edi, [esp + 0x50]
call fcn.004a4fc0
add esp, 4
jmp 0x4a65b9
mov edi, dword [edi]
jmp 0x4a64d1
mov eax, dword [esp + 0xcd0]
mov ecx, dword [esp + 0xccc]
mov edi, dword [edi + 0x20]
mov edx, dword [edi]
mov edx, dword [edx + 0x64]
push str.DrawPrimitive__FillPoly_
push 0
push eax
push ecx
push 0x1c4
push 6
push edi
call edx
push eax
call fcn.004a44c0
add esp, 8
mov eax, dword [esp + 0xccc]
lea ecx, [esp + 0x4c]
cmp eax, ecx
je 0x4a65d1
push eax
call fcn.0059e6bb
add esp, 4
mov ecx, dword [esp + 0xce0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c