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

Disassembly:
push 0xffffffffffffffff
push 0x593df8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
push ebp
push esi
push edi
push 0xd
xor ebp, ebp
push str.collisiontype
lea ecx, [esp + 0x40]
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], ebp
mov byte [esp + 0x44], 0
call fcn.00404250
mov edi, dword [esp + 0x84]
mov esi, dword [esp + 0x80]
lea eax, [edi + 4]
push eax
lea ecx, [esp + 0x3c]
push ecx
mov ecx, esi
mov dword [esp + 0x80], ebp
call fcn.004d15a0
mov ebx, eax
mov eax, dword [esp + 0x50]
neg ebx
sbb bl, bl
inc bl
cmp eax, 0x10
mov dword [esp + 0x78], 0xffffffff
jb 0x515a1a
mov edx, dword [esp + 0x3c]
push edx
call fcn.004796fd
add esp, 4
test bl, bl
jne 0x515c92
push 0xf
push str.spheredatacount
lea ecx, [esp + 0x40]
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], ebp
mov byte [esp + 0x44], bl
call fcn.00404250
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x3c]
push ecx
mov ecx, esi
mov dword [esp + 0x80], 1
call fcn.004d1640
mov ebx, eax
mov eax, dword [esp + 0x50]
neg ebx
sbb bl, bl
inc bl
cmp eax, 0x10
mov dword [esp + 0x78], 0xffffffff
jb 0x515a84
mov edx, dword [esp + 0x3c]
push edx
call fcn.004796fd
add esp, 4
test bl, bl
jne 0x515c92
mov eax, dword [edi + 0xc]
cmp eax, ebp
lea ebx, [edi + 8]
je 0x515a9f
push eax
call fcn.004796fd
add esp, 4
mov ecx, dword [esp + 0x18]
sub esp, 0x14
mov eax, esp
mov dword [ebx + 4], ebp
mov dword [ebx + 8], ebp
mov dword [ebx + 0xc], ebp
push ecx
mov dword [eax], 0x5ac474
mov ecx, ebx
mov dword [eax], 0x5ac49c
call fcn.00515360
cmp dword [esp + 0x18], ebp
mov dword [esp + 0x10], ebp
jbe 0x515c7a
mov dword [esp + 0x14], ebp
jmp 0x515ae0
mov edi, dword [esp + 0x84]
mov eax, dword [edi + 0xc]
mov ecx, dword [esp + 0x14]
add ecx, eax
call fcn.004bf480
push 0xa
push str.spheredata
lea ecx, [esp + 0x24]
mov edi, eax
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebp
mov byte [esp + 0x28], 0
call fcn.00404250
mov edx, dword [esp + 0x10]
push edx
lea eax, [esp + 0x20]
push eax
mov ecx, esi
mov dword [esp + 0x80], 2
call fcn.004d0860
mov ebx, eax
mov eax, dword [esp + 0x34]
neg ebx
sbb bl, bl
inc bl
cmp eax, 0x10
mov dword [esp + 0x78], 0xffffffff
jb 0x515b53
mov ecx, dword [esp + 0x20]
push ecx
call fcn.004796fd
add esp, 4
test bl, bl
mov eax, 0xf
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], ebp
mov byte [esp + 0x20], 0
jne 0x515c92
push 6
push str.radius
lea ecx, [esp + 0x40]
mov dword [esp + 0x58], eax
mov dword [esp + 0x54], ebp
mov byte [esp + 0x44], bl
call fcn.00404250
lea edx, [edi + 0xc]
push edx
lea eax, [esp + 0x3c]
push eax
mov ecx, esi
mov dword [esp + 0x80], 3
call fcn.004d1650
mov ebx, eax
mov eax, dword [esp + 0x50]
neg ebx
sbb bl, bl
inc bl
cmp eax, 0x10
mov dword [esp + 0x78], 0xffffffff
jb 0x515bca
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.004796fd
add esp, 4
test bl, bl
mov eax, 0xf
mov dword [esp + 0x50], eax
mov dword [esp + 0x4c], ebp
mov byte [esp + 0x3c], 0
jne 0x515c92
push 8
push str.position
lea ecx, [esp + 0x5c]
mov dword [esp + 0x74], eax
mov dword [esp + 0x70], ebp
mov byte [esp + 0x60], bl
call fcn.00404250
push edi
lea edx, [esp + 0x58]
push edx
mov ecx, esi
mov dword [esp + 0x80], 4
call fcn.004d1910
mov ebx, eax
mov eax, dword [esp + 0x6c]
neg ebx
sbb bl, bl
inc bl
cmp eax, 0x10
mov dword [esp + 0x78], 0xffffffff
jb 0x515c3e
mov eax, dword [esp + 0x58]
push eax
call fcn.004796fd
add esp, 4
test bl, bl
mov dword [esp + 0x6c], 0xf
mov dword [esp + 0x68], ebp
mov byte [esp + 0x58], 0
jne 0x515c92
mov ecx, esi
call fcn.004d0510
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
inc eax
add edx, 0x14
cmp eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
jb 0x515ad9
mov eax, 1
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret
mov ecx, dword [esp + 0x70]
pop edi
pop esi
pop ebp
xor eax, eax
mov dword fs:[0], ecx
pop ebx
add esp, 0x6c
ret