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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
mov al, byte [ebp + 0xc]
sub esp, 0x94
push ebx
push esi
mov ebx, ecx
push edi
mov byte [ebx + 0x48], al
test al, al
je 0x5102f0
fld1
mov eax, dword [ebp + 0x14]
push ecx
fstp dword [esp]
mov ecx, dword [ebp + 0x10]
push eax
push ecx
mov ecx, ebx
call fcn.00511bb0
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
lea edx, [ebx + 0x74]
mov dword [esp + 0x28], edx
lea edx, [ebx + 0x20]
push edx
lea edx, [ebx + 0x10]
push edx
lea edx, [esp + 0x2c]
push edx
mov dword [esp + 0x30], vtable.._AUQuantizedNodeTriangleCallback__2__build_btOptimizedBvh__QAEXPAVbtStridingMeshInterface___NABVbtVector3__2_Z_.0
mov dword [esp + 0x38], ebx
call eax
mov eax, dword [ebx + 0x78]
mov esi, dword [ebx + 0x8c]
lea edi, [eax + eax]
cmp edi, esi
pxor xmm0, xmm0
mov dword [esp + 0x18], eax
movdqa xmmword [esp + 0x30], xmm0
mov dword [esp + 0x1c], esi
jl 0x5102e1
jle 0x5102ab
cmp dword [ebx + 0x90], edi
jge 0x5102ab
test edi, edi
je 0x510220
mov ecx, edi
shl ecx, 4
push 0x10
push ecx
call fcn.005475c0
add esp, 8
mov dword [esp + 0x14], eax
jmp 0x510228
mov dword [esp + 0x14], 0
mov eax, dword [ebx + 0x8c]
test eax, eax
jle 0x51026e
mov ecx, dword [esp + 0x14]
xor edx, edx
mov esi, eax
lea ebx, [ebx]
test ecx, ecx
je 0x51025f
mov eax, dword [ebx + 0x94]
movq xmm0, qword [eax + edx]
add eax, edx
movq qword [ecx], xmm0
movq xmm0, qword [eax + 8]
movq qword [ecx + 8], xmm0
add edx, 0x10
add ecx, 0x10
sub esi, 1
jne 0x510240
mov esi, dword [esp + 0x1c]
mov eax, dword [ebx + 0x94]
test eax, eax
je 0x510294
cmp byte [ebx + 0x98], 0
je 0x51028a
push eax
call fcn.00547600
add esp, 4
mov dword [ebx + 0x94], 0
mov edx, dword [esp + 0x14]
mov byte [ebx + 0x98], 1
mov dword [ebx + 0x94], edx
mov dword [ebx + 0x90], edi
cmp esi, edi
jge 0x5102e1
movq xmm0, qword [esp + 0x38]
mov eax, esi
mov edx, edi
shl eax, 4
sub edx, esi
mov edi, edi
mov ecx, dword [ebx + 0x94]
add ecx, eax
je 0x5102d9
movq xmm1, qword [esp + 0x30]
movq qword [ecx], xmm1
movq qword [ecx + 8], xmm0
add eax, 0x10
sub edx, 1
jne 0x5102c0
mov dword [ebx + 0x8c], edi
lea ecx, [esp + 0x24]
jmp 0x51043b
movss xmm0, dword [0x592938]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
xorps xmm1, xmm1
mov edx, dword [edx + 4]
lea eax, [ebx + 0x4c]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x2c]
movss dword [esp + 0x38], xmm0
movss dword [esp + 0x3c], xmm0
movss dword [esp + 0x40], xmm0
movss xmm0, dword [0x592bf8]
push eax
mov dword [esp + 0x30], vtable.._AUNodeTriangleCallback__1__build_btOptimizedBvh__QAEXPAVbtStridingMeshInterface___NABVbtVector3__2_Z_.0
movss dword [esp + 0x48], xmm1
movss dword [esp + 0x5c], xmm0
movss dword [esp + 0x60], xmm0
movss dword [esp + 0x64], xmm0
movss dword [esp + 0x68], xmm1
call edx
mov edi, dword [ebx + 0x50]
mov esi, dword [ebx + 0x64]
lea eax, [edi + edi]
cmp eax, esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], esi
jl 0x51042e
jle 0x510409
cmp dword [ebx + 0x68], eax
jge 0x510409
test eax, eax
je 0x51039b
shl eax, 6
push 0x10
push eax
call fcn.005475c0
add esp, 8
mov dword [esp + 0x14], eax
jmp 0x5103a3
mov dword [esp + 0x14], 0
mov ecx, dword [ebx + 0x64]
test ecx, ecx
jle 0x5103db
mov eax, dword [esp + 0x14]
xor edx, edx
mov dword [esp + 0x1c], ecx
test eax, eax
je 0x5103ca
mov esi, dword [ebx + 0x6c]
add esi, edx
mov ecx, 0x10
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x20]
add edx, 0x40
add eax, 0x40
sub dword [esp + 0x1c], 1
jne 0x5103b4
mov edi, dword [esp + 0x18]
mov eax, dword [ebx + 0x6c]
test eax, eax
je 0x5103f8
cmp byte [ebx + 0x70], 0
je 0x5103f1
push eax
call fcn.00547600
add esp, 4
mov dword [ebx + 0x6c], 0
mov eax, dword [esp + 0x14]
mov dword [ebx + 0x6c], eax
lea eax, [edi + edi]
mov byte [ebx + 0x70], 1
mov dword [ebx + 0x68], eax
cmp esi, eax
jge 0x51042e
mov edx, esi
shl edx, 6
sub eax, esi
mov edi, dword [ebx + 0x6c]
add edi, edx
je 0x510426
mov ecx, 0x10
lea esi, [esp + 0x60]
rep movsd dword es:[edi], dword [esi]
add edx, 0x40
sub eax, 1
jne 0x510414
mov eax, dword [esp + 0x18]
add eax, eax
mov dword [ebx + 0x64], eax
lea ecx, [esp + 0x24]
call fcn.00515990
mov ecx, dword [esp + 0x18]
push ecx
xor edi, edi
push edi
mov ecx, ebx
mov dword [ebx + 0x44], edi
call fcn.00514ce0
cmp byte [ebx + 0x48], 0
je 0x5105de
cmp dword [ebx + 0xa4], edi
jne 0x5105de
mov esi, dword [ebx + 0xa4]
mov eax, dword [ebx + 0xa8]
mov dword [esp + 0x20], esi
cmp esi, eax
jne 0x510546
cmp esi, edi
je 0x51048d
lea edx, [esi + esi]
mov dword [esp + 0x14], edx
jmp 0x510495
mov dword [esp + 0x14], 1
mov ecx, dword [esp + 0x14]
cmp eax, ecx
jge 0x510546
cmp ecx, edi
je 0x5104b5
shl ecx, 5
push 0x10
push ecx
call fcn.005475c0
add esp, 8
mov edi, eax
mov eax, dword [ebx + 0xa4]
test eax, eax
jle 0x510507
xor edx, edx
mov ecx, edi
mov esi, eax
test ecx, ecx
je 0x5104f8
mov eax, dword [ebx + 0xac]
movq xmm0, qword [eax + edx]
add eax, edx
movq qword [ecx], xmm0
movq xmm0, qword [eax + 8]
movq qword [ecx + 8], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ecx + 0x10], xmm0
movq xmm0, qword [eax + 0x18]
movq qword [ecx + 0x18], xmm0
add edx, 0x20
add ecx, 0x20
sub esi, 1
jne 0x5104c5
mov esi, dword [esp + 0x20]
mov eax, dword [ebx + 0xac]
test eax, eax
je 0x51052d
cmp byte [ebx + 0xb0], 0
je 0x510523
push eax
call fcn.00547600
add esp, 4
mov dword [ebx + 0xac], 0
mov eax, dword [esp + 0x14]
mov dword [ebx + 0xac], edi
mov byte [ebx + 0xb0], 1
mov dword [ebx + 0xa8], eax
xor edi, edi
mov eax, dword [ebx + 0xac]
inc dword [ebx + 0xa4]
shl esi, 5
mov ecx, esi
add eax, ecx
je 0x510586
movq xmm0, qword [esp + 0x30]
movq qword [eax], xmm0
movq xmm0, qword [esp + 0x38]
movq qword [eax + 8], xmm0
movq xmm0, qword [esp + 0x40]
movq qword [eax + 0x10], xmm0
movq xmm0, qword [esp + 0x48]
movq qword [eax + 0x18], xmm0
mov eax, dword [ebx + 0xac]
add eax, ecx
mov ecx, dword [ebx + 0x94]
movzx edx, word [ecx]
mov word [eax], dx
movzx edx, word [ecx + 2]
mov word [eax + 2], dx
movzx edx, word [ecx + 4]
mov word [eax + 4], dx
movzx edx, word [ecx + 6]
mov word [eax + 6], dx
movzx edx, word [ecx + 8]
mov word [eax + 8], dx
mov cx, word [ecx + 0xa]
mov word [eax + 0xa], cx
mov dword [eax + 0xc], edi
mov edx, dword [ebx + 0x94]
mov ecx, dword [edx + 0xc]
cmp ecx, edi
jl 0x5105d9
mov ecx, 1
jmp 0x5105db
neg ecx
mov dword [eax + 0x10], ecx
mov eax, dword [ebx + 0xa4]
mov dword [ebx + 0xb4], eax
mov eax, dword [ebx + 0x80]
cmp eax, edi
je 0x51060c
cmp byte [ebx + 0x84], 0
je 0x510606
push eax
call fcn.00547600
add esp, 4
mov dword [ebx + 0x80], edi
mov byte [ebx + 0x84], 1
mov dword [ebx + 0x80], edi
mov dword [ebx + 0x78], edi
mov dword [ebx + 0x7c], edi
mov eax, dword [ebx + 0x58]
cmp eax, edi
je 0x510638
cmp byte [ebx + 0x5c], 0
je 0x510635
push eax
call fcn.00547600
add esp, 4
mov dword [ebx + 0x58], edi
mov dword [ebx + 0x58], edi
mov dword [ebx + 0x50], edi
mov dword [ebx + 0x54], edi
pop edi
pop esi
mov byte [ebx + 0x5c], 1
pop ebx
mov esp, ebp
pop ebp
ret 0x10