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

Disassembly:
sub esp, 0x74
mov eax, dword [0x72641c]
push ebx
push ebp
push esi
mov esi, dword [0xa1102c]
mov dword [esp + 0x2c], eax
xor eax, eax
test esi, esi
push edi
mov dword [esp + 0x44], esi
mov dword [esp + 0x28], eax
jbe 0x511200
mov ecx, dword [eax*4 + 0xa10fec]
mov edx, dword [ecx + 0x8010]
xor ebp, ebp
test edx, edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x40], edx
mov dword [esp + 0x14], ebp
jbe 0x5111f1
lea edx, [ecx + 0x50]
mov dword [esp + 0x18], edx
jmp 0x510f18
mov ecx, dword [esp + 0x20]
movzx eax, bp
movzx eax, ax
shl eax, 8
mov esi, dword [eax + ecx + 0x74]
lea edx, [eax + ecx]
mov ecx, dword [edx + 0x70]
mov eax, ecx
or eax, esi
mov dword [esp + 0x1c], edx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], esi
je 0x5111d0
mov eax, dword [esp + 0x18]
mov ebx, dword [eax]
mov eax, dword [ebx + 4]
xor edi, edi
test eax, eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x48], 1
mov dword [esp + 0x4c], 0
mov dword [esp + 0x3c], eax
mov dword [esp + 0x24], edi
jbe 0x5111d0
add ebx, 0x1b8
jmp 0x510f8c
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x50]
mov esi, dword [esp + 0x54]
mov eax, dword [esp + 0x48]
and eax, ecx
mov ecx, dword [esp + 0x4c]
and ecx, esi
or eax, ecx
je 0x51119f
mov eax, dword [ebx]
mov ecx, eax
shr ecx, 0x1a
and ecx, 1
cmp dword [esp + 0x90], ecx
jne 0x51119f
and eax, 0x1c0
cmp dword [esp + 0x88], eax
jne 0x51119f
mov edx, dword [edx + 0x7c]
movzx eax, di
movzx esi, ax
mov eax, dword [0x9d2c30]
imul esi, esi, 0xe0
imul eax, eax, 0x4d0
add eax, 0x9ce230
lea ebp, [esi + edx + 0x8c]
lea ecx, [eax + 0x80]
push ecx
mov edx, ebp
call fcn.00417fc0
add esp, 4
test eax, eax
je 0x51119f
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 0x7c]
movzx ecx, word [esi + eax + 6]
mov dword [esp + 0x38], ecx
mov ecx, ebp
call fcn.0058caf0
movss dword [esp + 0x2c], xmm0
fld dword [esp + 0x2c]
fld dword [ebx - 0xac]
fcompi st(1)
jb 0x51119d
mov esi, dword [esp + 0x8c]
mov ecx, dword [esi + 0x2800]
cmp ecx, 0x100
jae 0x51118c
xor eax, eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
lea eax, [ecx + ecx*4]
lea eax, [esi + eax*8]
test eax, eax
lea edx, [ecx + 1]
mov dword [esi + 0x2800], edx
je 0x5110a5
mov ecx, 0xa
lea esi, [esp + 0x58]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x8c]
mov edi, dword [esp + 0x24]
fmul qword [0x6f9ff8]
sub esp, 8
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fstp dword [esp + 4]
fldz
fstp dword [esp]
call fcn.00402e80
fstp dword [esp + 0x2c]
add esp, 8
cvttss2si eax, dword [esp + 0x24]
and eax, 0x7fffffff
cmp eax, dword [esp + 0x30]
jb 0x5110e0
mov ecx, eax
jmp 0x5110ea
mov ecx, dword [ebx]
and ecx, 0x80000000
or ecx, eax
mov eax, dword [esi + 0x2800]
lea edx, [eax + eax*4]
lea eax, [esi + edx*8 - 0x28]
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x34]
mov dword [eax + 8], edx
lea edx, [ebx - 0x1a4]
mov dword [eax + 0x14], edx
movzx edx, word [esp + 0x14]
mov word [eax + 0x1c], dx
movzx edx, di
mov word [eax + 0x1e], dx
mov edx, dword [esp + 0x38]
mov dword [eax + 0x18], edx
mov dword [eax + 0x20], ecx
mov dword [eax + 0xc], ebp
mov dword [eax + 0x10], esi
mov ecx, dword [ebx]
mov esi, dword [esi + 8]
and ecx, 0xc00007
xor edx, edx
xor ebp, ebp
or edx, esi
or ecx, ebp
cmp dword [esp + 0x94], ebp
mov dword [eax], edx
mov dword [eax + 4], ecx
jne 0x511172
test dword [ebx], 0x10000000
jne 0x511172
mov ecx, dword [ebx]
test ecx, 7
jne 0x511165
xor ecx, ecx
mov dword [eax + 0x24], ecx
jmp 0x511179
shr ecx, 0x1c
not ecx
and ecx, 1
mov dword [eax + 0x24], ecx
jmp 0x511179
mov dword [eax + 0x24], 0
cmp dword [esp + 0x90], 0
je 0x51119f
mov dword [eax + 0x24], 1
jmp 0x51119f
push str.CollectBatch::_WARNING__Not_enough_batches._Your_particles_are_being_ignored
fstp st(0)
call fcn.00408d10
add esp, 4
jmp 0x51119f
fstp st(0)
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
shld ecx, eax, 1
add edi, 1
add eax, eax
add ebx, 0x1b0
cmp edi, dword [esp + 0x3c]
mov dword [esp + 0x24], edi
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ecx
jb 0x510f80
mov ebp, dword [esp + 0x14]
add dword [esp + 0x18], 0x100
add ebp, 1
cmp ebp, dword [esp + 0x40]
mov dword [esp + 0x14], ebp
jb 0x510f14
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x44]
add eax, 1
cmp eax, esi
mov dword [esp + 0x28], eax
jb 0x510ee8
mov esi, dword [esp + 0x8c]
mov eax, dword [esi + 0x2800]
cmp eax, 1
jbe 0x511240
lea edx, [eax + eax*4]
mov eax, dword [esp + 0x8c]
lea edi, [esi + edx*8]
push eax
mov ecx, edi
sub ecx, esi
mov eax, 0x66666667
imul ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
push edi
push esi
call fcn.0041f520
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret