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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x9f4
push ebx
push esi
push edi
xor edi, edi
mov ebx, 1
mov esi, ecx
mov byte [esp + 0x3e8], 0
mov byte [esp + 0x700], 0
mov dword [esp + 0x6e8], edi
mov dword [esp + 0x6fc], edi
mov dword [esp + 0x6f4], edi
mov dword [esp + 0x6f8], edi
mov byte [esp + 0x6ec], bl
call fcn.00585800
push 0x644f50
call fcn.0058d629
add esp, 4
lea ecx, [esp + 0x170]
call fcn.005648e0
mov eax, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
push eax
push edi
lea ecx, [esp + 0x17c]
call fcn.00564a80
test al, al
jne 0x585a6c
push edi
push str.Could_not_open__s_n
lea ecx, [esp + 0x2d8]
push ecx
call fcn.00589571
add esp, 0xc
lea ecx, [esp + 0x2d0]
call fcn.00585170
lea ecx, [esp + 0x170]
call fcn.00564980
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
xor eax, eax
push 0x300
lea edx, [esp + 0x704]
push edx
lea ecx, [esp + 0x178]
mov dword [esi], eax
mov dword [esi + 8], eax
mov dword [esi + 0x10], eax
mov dword [esi + 0x18], eax
call fcn.00564c00
test eax, eax
je 0x585cfe
lea ebx, [ebx]
lea ecx, [esp + 0x3e8]
call fcn.00564e10
test eax, eax
jne 0x585cdd
lea eax, [esp + 0x700]
push str._BODY_
push eax
call fcn.00588710
add esp, 8
test eax, eax
je 0x585b1d
add dword [esi], ebx
push 0x300
lea ecx, [esp + 0x704]
push ecx
lea ecx, [esp + 0x178]
call fcn.00564c00
test eax, eax
je 0x585b1d
lea esp, [esp]
lea ecx, [esp + 0x3e8]
call fcn.00564e10
cmp eax, ebx
je 0x585b1d
push 0x300
lea edx, [esp + 0x704]
push edx
lea ecx, [esp + 0x178]
call fcn.00564c00
test eax, eax
jne 0x585af0
lea eax, [esp + 0x700]
push str._JOINT_
push eax
call fcn.00588710
add esp, 8
test eax, eax
je 0x585b8d
add dword [esi + 8], ebx
push 0x300
lea ecx, [esp + 0x704]
push ecx
lea ecx, [esp + 0x178]
call fcn.00564c00
test eax, eax
je 0x585b8d
jmp 0x585b60
lea ecx, [esp + 0x3e8]
call fcn.00564e10
cmp eax, ebx
je 0x585b8d
push 0x300
lea edx, [esp + 0x704]
push edx
lea ecx, [esp + 0x178]
call fcn.00564c00
test eax, eax
jne 0x585b60
lea eax, [esp + 0x700]
push str._HINGE_
push eax
call fcn.00588710
add esp, 8
test eax, eax
je 0x585bfd
add dword [esi + 0x10], ebx
push 0x300
lea ecx, [esp + 0x704]
push ecx
lea ecx, [esp + 0x178]
call fcn.00564c00
test eax, eax
je 0x585bfd
jmp 0x585bd0
lea ecx, [esp + 0x3e8]
call fcn.00564e10
cmp eax, ebx
je 0x585bfd
push 0x300
lea edx, [esp + 0x704]
push edx
lea ecx, [esp + 0x178]
call fcn.00564c00
test eax, eax
jne 0x585bd0
lea eax, [esp + 0x700]
push str._BAR_
push eax
call fcn.00588710
add esp, 8
test eax, eax
je 0x585c6d
add dword [esi + 0x18], ebx
push 0x300
lea ecx, [esp + 0x704]
push ecx
lea ecx, [esp + 0x178]
call fcn.00564c00
test eax, eax
je 0x585c6d
jmp 0x585c40
lea ecx, [esp + 0x3e8]
call fcn.00564e10
cmp eax, ebx
je 0x585c6d
push 0x300
lea edx, [esp + 0x704]
push edx
lea ecx, [esp + 0x178]
call fcn.00564c00
test eax, eax
jne 0x585c40
lea eax, [esp + 0x700]
push str._JOINTHINGE_
push eax
call fcn.00588710
add esp, 8
test eax, eax
je 0x585cdd
add dword [esi + 8], ebx
add dword [esi + 0x10], ebx
push 0x300
lea ecx, [esp + 0x704]
push ecx
lea ecx, [esp + 0x178]
call fcn.00564c00
test eax, eax
je 0x585cdd
lea esp, [esp]
lea ecx, [esp + 0x3e8]
call fcn.00564e10
cmp eax, ebx
je 0x585cdd
push 0x300
lea edx, [esp + 0x704]
push edx
lea ecx, [esp + 0x178]
call fcn.00564c00
test eax, eax
jne 0x585cb0
push 0x300
lea eax, [esp + 0x704]
push eax
lea ecx, [esp + 0x178]
call fcn.00564c00
test eax, eax
jne 0x585aa0
mov edi, dword [esi]
xor ecx, ecx
mov eax, edi
mov edx, 0x244
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.00588cb9
add esp, 4
test eax, eax
je 0x585d45
push fcn.00575410
push edi
lea ebx, [eax + 4]
push 0x244
push ebx
mov dword [eax], edi
call fcn.004011a0
mov eax, ebx
jmp 0x585d47
xor eax, eax
mov edi, dword [esi + 8]
mov dword [esi + 4], eax
xor ecx, ecx
mov eax, edi
mov edx, 0x30
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.00588cb9
add esp, 4
test eax, eax
je 0x585d8f
push fcn.00584950
push edi
lea ebx, [eax + 4]
push 0x30
push ebx
mov dword [eax], edi
call fcn.004011a0
mov eax, ebx
jmp 0x585d91
xor eax, eax
mov edi, dword [esi + 0x10]
mov dword [esi + 0xc], eax
xor ecx, ecx
mov eax, edi
mov edx, 0x30
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.00588cb9
add esp, 4
test eax, eax
je 0x585dd9
push fcn.00584950
push edi
lea ebx, [eax + 4]
push 0x30
push ebx
mov dword [eax], edi
call fcn.004011a0
mov eax, ebx
jmp 0x585ddb
xor eax, eax
mov edi, dword [esi + 0x18]
mov dword [esi + 0x14], eax
xor ecx, ecx
mov eax, edi
mov edx, 0x48
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.00588cb9
add esp, 4
test eax, eax
je 0x585e23
push fcn.00584950
push edi
lea ebx, [eax + 4]
push 0x48
push ebx
mov dword [eax], edi
call fcn.004011a0
mov eax, ebx
jmp 0x585e25
xor eax, eax
xor edi, edi
lea ecx, [esp + 0x170]
mov dword [esi + 0x1c], eax
mov dword [esp + 0x40], edi
mov dword [esp + 0x68], edi
call fcn.00564de0
push 0x300
lea ecx, [esp + 0x704]
push ecx
lea ecx, [esp + 0x178]
call fcn.00564c00
test eax, eax
je 0x5869b1
mov dword [esp + 0x74], edi
mov dword [esp + 0x6c], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0xc0], edi
lea ecx, [esp + 0x3e8]
call fcn.00564e10
test eax, eax
jne 0x586990
lea edx, [esp + 0x700]
push str._BODY_
push edx
call fcn.00588710
add esp, 8
test eax, eax
je 0x586223
fld1
xor eax, eax
fst qword [esp + 0xf8]
mov dword [esp + 0xe0], eax
fstp qword [esp + 0xc8]
mov dword [esp + 0xe4], eax
mov ecx, dword [esp + 0xcc]
mov dword [esp + 0xe8], eax
mov dword [esp + 0xec], eax
mov dword [esp + 0xf0], eax
mov dword [esp + 0xf4], eax
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], eax
mov dword [esp + 0xb0], eax
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], eax
mov dword [esp + 0xbc], eax
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0xc8]
mov dword [esp + 0xd0], eax
mov dword [esp + 0xd8], eax
push 0x300
lea eax, [esp + 0x704]
mov dword [esp + 0xd8], ecx
mov dword [esp + 0xe0], ecx
push eax
lea ecx, [esp + 0x178]
mov byte [esp + 0x138], 0
call fcn.00564c00
test eax, eax
je 0x5860f5
lea ecx, [esp + 0x3e8]
call fcn.00564e10
test eax, eax
jne 0x5860cf
push eax
lea ecx, [esp + 0x134]
push ecx
push 0x5da624
lea ecx, [esp + 0x3f4]
call fcn.00565d50
test eax, eax
je 0x585fe0
lea edx, [esp + 0x130]
push edx
call fcn.0058b0cc
add esp, 4
push 0
push 0
push 0
lea eax, [esp + 0x104]
push eax
push str.mass
lea ecx, [esp + 0x3fc]
call fcn.005657a0
push 0
lea ecx, [esp + 0xdc]
push ecx
lea edx, [esp + 0xd8]
push edx
lea eax, [esp + 0xd4]
push eax
push str.inertia
lea ecx, [esp + 0x3fc]
call fcn.005657a0
push 0
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x5c]
push eax
push 0x645018
lea ecx, [esp + 0x3fc]
call fcn.005657a0
push 0
lea ecx, [esp + 0xa4]
push ecx
lea edx, [esp + 0xa0]
push edx
lea eax, [esp + 0x9c]
push eax
push 0x645014
lea ecx, [esp + 0x3fc]
call fcn.005657a0
push 0
lea ecx, [esp + 0xbc]
push ecx
lea edx, [esp + 0xb8]
push edx
lea eax, [esp + 0xb4]
push eax
push 0x645010
lea ecx, [esp + 0x3fc]
call fcn.005657a0
push 0
lea ecx, [esp + 0xf4]
push ecx
lea edx, [esp + 0xf0]
push edx
lea eax, [esp + 0xec]
push eax
push 0x64500c
lea ecx, [esp + 0x3fc]
call fcn.005657a0
jmp 0x5860d4
cmp eax, 1
je 0x5860f5
push 0x300
lea ecx, [esp + 0x704]
push ecx
lea ecx, [esp + 0x178]
call fcn.00564c00
test eax, eax
jne 0x585f9e
cmp byte [esp + 0x130], 0
je 0x586d24
xor edi, edi
cmp dword [esp + 0x40], edi
jle 0x586146
xor ebx, ebx
lea ecx, [ecx]
mov edx, dword [esi + 4]
mov eax, dword [ebx + edx]
lea ecx, [esp + 0x130]
push ecx
push eax
call fcn.00588ead
add esp, 8
test eax, eax
je 0x58613c
add edi, 1
add ebx, 0x244
cmp edi, dword [esp + 0x40]
jl 0x586110
jmp 0x586146
cmp edi, dword [esp + 0x40]
jl 0x586d3b
fld qword [esp + 0xf8]
mov ecx, dword [esi + 4]
mov edi, dword [esp + 0xc0]
lea edx, [esp + 0xc8]
push edx
sub esp, 8
lea eax, [esp + 0x13c]
fstp qword [esp]
push eax
add ecx, edi
call fcn.00575450
mov ecx, dword [esi + 4]
mov edx, dword [esp + 0x50]
lea eax, [edi + ecx + 4]
mov dword [eax], edx
mov ecx, dword [esp + 0x54]
mov dword [eax + 4], ecx
mov edx, dword [esp + 0x58]
mov dword [eax + 8], edx
mov ecx, dword [esp + 0x5c]
mov dword [eax + 0xc], ecx
mov edx, dword [esp + 0x60]
mov dword [eax + 0x10], edx
mov ecx, dword [esp + 0x64]
mov dword [eax + 0x14], ecx
mov ecx, dword [esi + 4]
lea edx, [esp + 0x90]
push edx
add ecx, edi
call fcn.00575520
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0xa8]
mov dword [edi + eax + 0x64], ecx
mov edx, dword [esp + 0xac]
lea eax, [edi + eax + 0x64]
mov dword [eax + 4], edx
mov ecx, dword [esp + 0xb0]
mov dword [eax + 8], ecx
mov edx, dword [esp + 0xb4]
mov dword [eax + 0xc], edx
mov ecx, dword [esp + 0xb8]
mov dword [eax + 0x10], ecx
mov edx, dword [esp + 0xbc]
mov dword [eax + 0x14], edx
mov ecx, dword [esi + 4]
lea eax, [esp + 0xe0]
push eax
add ecx, edi
call fcn.00575550
add dword [esp + 0x40], 1
add edi, 0x244
mov dword [esp + 0xc0], edi
jmp 0x586990
lea ecx, [esp + 0x700]
push str._JOINT_
push ecx
call fcn.00588710
add esp, 8
test eax, eax
jne 0x58628b
lea edx, [esp + 0x700]
push str._HINGE_
push edx
call fcn.00588710
add esp, 8
test eax, eax
jne 0x58628b
lea eax, [esp + 0x700]
push str._BAR_
push eax
call fcn.00588710
add esp, 8
test eax, eax
jne 0x58628b
lea ecx, [esp + 0x700]
push str._JOINTHINGE_
push ecx
call fcn.00588710
add esp, 8
test eax, eax
je 0x586990
lea edx, [esp + 0x700]
push str._JOINT_
push edx
mov byte [esp + 0x4e], 0
mov byte [esp + 0x4f], 0
mov byte [esp + 0x57], 0
call fcn.00588710
add esp, 8
test eax, eax
je 0x5862b8
mov byte [esp + 0x46], 1
lea eax, [esp + 0x700]
push str._HINGE_
push eax
call fcn.00588710
add esp, 8
test eax, eax
je 0x5862d6
mov byte [esp + 0x47], 1
lea ecx, [esp + 0x700]
push str._BAR_
push ecx
call fcn.00588710
add esp, 8
test eax, eax
je 0x5862f4
mov byte [esp + 0x4f], 1
lea edx, [esp + 0x700]
push str._JOINTHINGE_
push edx
call fcn.00588710
add esp, 8
test eax, eax
je 0x586317
mov byte [esp + 0x46], 1
mov byte [esp + 0x47], 1
xor eax, eax
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
push 0x300
lea eax, [esp + 0x704]
push eax
lea ecx, [esp + 0x178]
mov byte [esp + 0x138], 0
mov byte [esp + 0x258], 0
mov byte [esp + 0x298], 0
mov byte [esp + 0x218], 0
call fcn.00564c00
test eax, eax
je 0x58653c
lea esp, [esp]
lea ecx, [esp + 0x3e8]
call fcn.00564e10
test eax, eax
jne 0x586516
push eax
lea ecx, [esp + 0x134]
push ecx
push 0x5da624
lea ecx, [esp + 0x3f4]
call fcn.00565d50
test eax, eax
je 0x5863e2
lea edx, [esp + 0x130]
push edx
call fcn.0058b0cc
add esp, 4
push 0
lea eax, [esp + 0x254]
push eax
push str.posbody
lea ecx, [esp + 0x3f4]
call fcn.00565d50
push 0
lea ecx, [esp + 0x294]
push ecx
push str.negbody
lea ecx, [esp + 0x3f4]
call fcn.00565d50
push 0
lea edx, [esp + 0xa4]
push edx
lea eax, [esp + 0xa0]
push eax
lea ecx, [esp + 0x9c]
push ecx
push str.axis
lea ecx, [esp + 0x3fc]
call fcn.005657a0
push 0
lea edx, [esp + 0x114]
push edx
lea eax, [esp + 0x110]
push eax
lea ecx, [esp + 0x10c]
push ecx
push 0x644ff0
lea ecx, [esp + 0x3fc]
call fcn.005657a0
push 0
lea edx, [esp + 0x12c]
push edx
lea eax, [esp + 0x128]
push eax
lea ecx, [esp + 0x124]
push ecx
push 0x645018
lea ecx, [esp + 0x3fc]
mov byte [esp + 0x700], 0
call fcn.005657a0
test eax, eax
je 0x5864f1
mov edx, dword [esp + 0x118]
mov eax, dword [esp + 0x11c]
mov ecx, dword [esp + 0x120]
mov dword [esp + 0x50], edx
mov edx, dword [esp + 0x124]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x128]
mov dword [esp + 0x58], ecx
mov ecx, dword [esp + 0x12c]
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], ecx
mov byte [esp + 0x6ec], 1
jmp 0x58651b
push 0
lea edx, [esp + 0x214]
push edx
push 0x645018
lea ecx, [esp + 0x3f4]
call fcn.00565d50
mov byte [esp + 0x6ec], 1
jmp 0x58651b
cmp eax, 1
je 0x58653c
push 0x300
lea eax, [esp + 0x704]
push eax
lea ecx, [esp + 0x178]
call fcn.00564c00
test eax, eax
jne 0x5863a0
cmp byte [esp + 0x210], 0
je 0x5865bc
xor edi, edi
cmp dword [esp + 0x40], edi
jle 0x58657a
xor ebx, ebx
mov ecx, dword [esi + 4]
mov eax, dword [ebx + ecx]
push eax
lea edx, [esp + 0x214]
push edx
call fcn.00588ead
add esp, 8
test eax, eax
je 0x58657a
add edi, 1
add ebx, 0x244
cmp edi, dword [esp + 0x40]
jl 0x586550
cmp edi, dword [esp + 0x40]
je 0x586d4d
mov eax, dword [esi + 4]
imul edi, edi, 0x244
mov ecx, dword [edi + eax + 4]
lea edi, [edi + eax + 4]
mov dword [esp + 0x50], ecx
mov edx, dword [edi + 4]
mov dword [esp + 0x54], edx
mov eax, dword [edi + 8]
mov dword [esp + 0x58], eax
mov ecx, dword [edi + 0xc]
mov dword [esp + 0x5c], ecx
mov edx, dword [edi + 0x10]
mov dword [esp + 0x60], edx
mov eax, dword [edi + 0x14]
mov dword [esp + 0x64], eax
xor edi, edi
cmp dword [esp + 0x40], edi
jle 0x5865f0
xor ebx, ebx
mov ecx, dword [esi + 4]
mov eax, dword [ebx + ecx]
push eax
lea edx, [esp + 0x254]
push edx
call fcn.00588ead
add esp, 8
test eax, eax
je 0x5865f0
add edi, 1
add ebx, 0x244
cmp edi, dword [esp + 0x40]
jl 0x5865c6
cmp edi, dword [esp + 0x40]
mov ebx, dword [esp + 0x48]
je 0x586d67
cmp byte [esp + 0x46], 0
je 0x586625
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0xc]
mov eax, edi
imul eax, eax, 0x244
add ecx, eax
mov dword [ebx + edx + 4], ecx
mov ecx, dword [esi + 4]
add ecx, eax
add dword [ecx + 0x22c], 1
cmp byte [esp + 0x47], 0
je 0x586654
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0x14]
mov ebx, dword [esp + 0x6c]
mov eax, edi
imul eax, eax, 0x244
add ecx, eax
mov dword [ebx + edx + 4], ecx
mov ecx, dword [esi + 4]
mov ebx, dword [esp + 0x48]
add ecx, eax
add dword [ecx + 0x234], 1
cmp byte [esp + 0x4f], 0
je 0x58667d
mov eax, dword [esi + 4]
imul edi, edi, 0x244
mov ecx, dword [esi + 0x1c]
mov edx, dword [esp + 0x74]
add eax, edi
mov dword [edx + ecx + 4], eax
mov eax, dword [esi + 4]
add eax, edi
add dword [eax + 0x23c], 1
xor eax, eax
cmp dword [esp + 0x40], eax
mov dword [esp + 0x70], eax
jle 0x5866c6
xor edi, edi
jmp 0x586690
mov eax, dword [esi + 4]
mov eax, dword [edi + eax]
push eax
lea ecx, [esp + 0x294]
push ecx
call fcn.00588ead
add esp, 8
test eax, eax
je 0x5866c2
mov eax, dword [esp + 0x70]
add eax, 1
add edi, 0x244
cmp eax, dword [esp + 0x40]
mov dword [esp + 0x70], eax
jl 0x586690
mov eax, dword [esp + 0x70]
cmp eax, dword [esp + 0x40]
je 0x586d81
cmp byte [esp + 0x46], 0
je 0x58679d
mov edx, dword [esi + 4]
imul eax, eax, 0x244
mov ecx, dword [esi + 0xc]
add edx, eax
mov dword [ebx + ecx + 0xc], edx
mov ecx, dword [esi + 4]
add dword [ecx + eax + 0x22c], 1
add ecx, eax
cmp byte [esp + 0x130], 0
je 0x58674e
lea eax, [esp + 0x130]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x586710
sub eax, edx
add eax, 1
push eax
call fcn.00588cb9
mov edx, dword [esi + 0xc]
mov dword [ebx + edx], eax
mov eax, dword [esi + 0xc]
mov edx, dword [ebx + eax]
add esp, 4
lea ecx, [esp + 0x130]
lea ebx, [ebx]
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x586740
mov ecx, dword [esi + 0xc]
mov edx, dword [esp + 0x50]
mov dword [ebx + ecx + 0x14], edx
lea eax, [ebx + ecx + 0x14]
mov ecx, dword [esp + 0x54]
mov dword [eax + 4], ecx
mov edx, dword [esp + 0x58]
mov dword [eax + 8], edx
mov ecx, dword [esp + 0x5c]
mov dword [eax + 0xc], ecx
mov edx, dword [esp + 0x60]
mov dword [eax + 0x10], edx
mov ecx, dword [esp + 0x64]
mov dword [eax + 0x14], ecx
mov eax, dword [esp + 0x68]
mov edx, dword [esi + 0xc]
mov dword [ebx + edx + 0x2c], eax
add eax, 1
add ebx, 0x30
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x48], ebx
cmp byte [esp + 0x47], 0
je 0x586881
mov ecx, dword [esi + 4]
imul eax, eax, 0x244
mov edx, dword [esi + 0x14]
mov edi, dword [esp + 0x6c]
add ecx, eax
mov dword [edi + edx + 0xc], ecx
mov ecx, dword [esi + 4]
add dword [ecx + eax + 0x234], 1
add ecx, eax
cmp byte [esp + 0x130], 0
je 0x58681e
lea eax, [esp + 0x130]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x5867e0
sub eax, edx
add eax, 1
push eax
call fcn.00588cb9
mov ecx, dword [esi + 0x14]
mov edx, dword [esp + 0x70]
mov dword [edx + ecx], eax
mov eax, dword [esi + 0x14]
mov edx, dword [edx + eax]
add esp, 4
lea ecx, [esp + 0x130]
mov edi, edi
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x586810
mov edx, dword [esi + 0x14]
mov ecx, dword [esp + 0x6c]
lea eax, [ecx + edx + 0x14]
mov edx, dword [esp + 0x90]
mov dword [eax], edx
mov edx, dword [esp + 0x94]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x98]
mov dword [eax + 8], edx
mov edx, dword [esp + 0x9c]
mov dword [eax + 0xc], edx
mov edx, dword [esp + 0xa0]
mov dword [eax + 0x10], edx
mov edx, dword [esp + 0xa4]
mov dword [eax + 0x14], edx
mov eax, dword [esp + 0x68]
mov edx, dword [esi + 0x14]
mov dword [ecx + edx + 0x2c], eax
add eax, 1
add ecx, 0x30
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x6c], ecx
cmp byte [esp + 0x4f], 0
je 0x586990
mov ecx, dword [esi + 4]
imul eax, eax, 0x244
mov edx, dword [esi + 0x1c]
mov edi, dword [esp + 0x74]
add ecx, eax
mov dword [edi + edx + 0xc], ecx
mov ecx, dword [esi + 4]
add dword [ecx + eax + 0x23c], 1
add ecx, eax
cmp byte [esp + 0x130], 0
je 0x5868ff
lea eax, [esp + 0x130]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x5868c3
sub eax, edx
add eax, 1
push eax
call fcn.00588cb9
mov ecx, dword [esi + 0x1c]
mov edx, dword [esp + 0x78]
mov dword [edx + ecx], eax
mov eax, dword [esi + 0x1c]
mov edx, dword [edx + eax]
add esp, 4
lea ecx, [esp + 0x130]
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x5868f1
mov edx, dword [esi + 0x1c]
mov ecx, dword [esp + 0x74]
lea eax, [ecx + edx + 0x14]
mov edx, dword [esp + 0x50]
mov dword [eax], edx
mov edx, dword [esp + 0x54]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x58]
mov dword [eax + 8], edx
mov edx, dword [esp + 0x5c]
mov dword [eax + 0xc], edx
mov edx, dword [esp + 0x60]
mov dword [eax + 0x10], edx
mov edx, dword [esp + 0x64]
mov dword [eax + 0x14], edx
mov eax, dword [esi + 0x1c]
mov edx, dword [esp + 0x100]
mov dword [ecx + eax + 0x2c], edx
mov edx, dword [esp + 0x104]
lea eax, [ecx + eax + 0x2c]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x108]
mov dword [eax + 8], edx
mov edx, dword [esp + 0x10c]
mov dword [eax + 0xc], edx
mov edx, dword [esp + 0x110]
mov dword [eax + 0x10], edx
mov edx, dword [esp + 0x114]
mov dword [eax + 0x14], edx
mov eax, dword [esp + 0x68]
mov edx, dword [esi + 0x1c]
mov dword [ecx + edx + 0x44], eax
add eax, 1
add ecx, 0x48
mov dword [esp + 0x68], eax
mov dword [esp + 0x74], ecx
push 0x300
lea eax, [esp + 0x704]
push eax
lea ecx, [esp + 0x178]
call fcn.00564c00
test eax, eax
jne 0x585e72
xor edi, edi
cmp dword [esi], edi
jle 0x5869d7
xor ebx, ebx
lea esp, [esp]
mov ecx, dword [esi + 4]
add ecx, ebx
call fcn.00574d50
add edi, 1
add ebx, 0x244
cmp edi, dword [esi]
jl 0x5869c0
mov ecx, esi
call fcn.00584c10
cmp dword [esi + 8], 0
mov dword [esi + 0x20], eax
mov dword [esp + 0x40], 0
jle 0x586a96
mov dword [esp + 0x48], 0
jmp 0x586a00
mov edi, dword [esi + 0xc]
add edi, dword [esp + 0x48]
push 1
mov edx, dword [edi + 0x14]
mov dword [esp + 0x7c], edx
mov eax, dword [edi + 0x18]
mov dword [esp + 0x80], eax
mov ecx, dword [edi + 0x1c]
mov dword [esp + 0x84], ecx
mov edx, dword [edi + 0x20]
mov dword [esp + 0x88], edx
mov eax, dword [edi + 0x24]
mov dword [esp + 0x8c], eax
mov ecx, dword [edi + 0x28]
mov dword [esp + 0x90], ecx
mov ebx, dword [edi + 0x2c]
mov ecx, dword [edi + 4]
push ebx
lea edx, [esp + 0x80]
push edx
call fcn.00574de0
mov ecx, dword [edi + 0xc]
push 0
mov dword [edi + 8], eax
push ebx
lea eax, [esp + 0x80]
push eax
call fcn.00574de0
mov ecx, edi
mov dword [edi + 0x10], eax
mov dword [edi + 0x2c], 0
call fcn.00584960
mov eax, dword [esp + 0x40]
add dword [esp + 0x48], 0x30
add eax, 1
cmp eax, dword [esi + 8]
mov dword [esp + 0x40], eax
jl 0x586a00
cmp dword [esi + 0x10], 0
mov dword [esp + 0x40], 0
jle 0x586b45
mov dword [esp + 0x48], 0
mov edi, dword [esi + 0x14]
add edi, dword [esp + 0x48]
mov ecx, dword [edi + 0x14]
mov dword [esp + 0x78], ecx
mov edx, dword [edi + 0x18]
mov dword [esp + 0x7c], edx
mov eax, dword [edi + 0x1c]
mov dword [esp + 0x80], eax
mov ecx, dword [edi + 0x20]
mov dword [esp + 0x84], ecx
mov edx, dword [edi + 0x24]
mov dword [esp + 0x88], edx
mov eax, dword [edi + 0x28]
push edi
mov dword [esp + 0x90], eax
mov ebx, dword [edi + 0x2c]
push 1
push ebx
lea ecx, [esp + 0x84]
push ecx
mov ecx, dword [edi + 4]
call fcn.00574e30
mov ecx, dword [edi + 0xc]
push edi
push 0
push ebx
lea edx, [esp + 0x84]
push edx
mov dword [edi + 8], eax
call fcn.00574e30
mov ecx, edi
mov dword [edi + 0x10], eax
mov dword [edi + 0x2c], 0
call fcn.00585610
mov eax, dword [esp + 0x40]
add dword [esp + 0x48], 0x30
add eax, 1
cmp eax, dword [esi + 0x10]
mov dword [esp + 0x40], eax
jl 0x586ab0
cmp dword [esi + 0x18], 0
mov dword [esp + 0x40], 0
jle 0x586c63
mov dword [esp + 0x48], 0
nop
mov edi, dword [esi + 0x1c]
add edi, dword [esp + 0x48]
sub esp, 8
mov eax, dword [edi + 0x14]
mov dword [esp + 0x80], eax
mov ecx, dword [edi + 0x18]
mov dword [esp + 0x84], ecx
mov edx, dword [edi + 0x1c]
mov dword [esp + 0x88], edx
mov eax, dword [edi + 0x20]
mov dword [esp + 0x8c], eax
mov ecx, dword [edi + 0x24]
mov dword [esp + 0x90], ecx
mov edx, dword [edi + 0x28]
mov dword [esp + 0x94], edx
fld qword [edi + 0x2c]
fst qword [esp + 0x200]
lea eax, [esp + 0x80]
fld qword [edi + 0x34]
fst qword [esp + 0x208]
fld qword [edi + 0x3c]
fst qword [esp + 0x210]
mov ebx, dword [edi + 0x44]
fld qword [esp + 0x80]
mov ecx, dword [edi + 4]
fst qword [esp + 0x3d8]
fld qword [esp + 0x88]
fxch st(1)
fsubrp st(4)
fsubrp st(2)
fsubr qword [esp + 0x90]
fmul st(0), st(0)
fld st(1)
fmulp st(2)
faddp st(1)
fld st(1)
fmulp st(2)
faddp st(1)
fsqrt
fst qword [esp + 0xc8]
fstp qword [esp]
push 1
push ebx
push eax
call fcn.00574ee0
fld qword [esp + 0xc0]
sub esp, 8
fstp qword [esp]
push 0
push ebx
lea ecx, [esp + 0x208]
push ecx
mov ecx, dword [edi + 0xc]
mov dword [edi + 8], eax
call fcn.00574ee0
mov ecx, edi
mov dword [edi + 0x10], eax
mov dword [edi + 0x44], 0
call fcn.00584ae0
mov eax, dword [esp + 0x40]
add dword [esp + 0x48], 0x48
add eax, 1
cmp eax, dword [esi + 0x18]
mov dword [esp + 0x40], eax
jl 0x586b60
mov eax, dword [esi + 0x20]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00588cb9
mov dword [esi + 0x28], eax
mov eax, dword [esi + 0x20]
imul eax, eax
xor ecx, ecx
mov edx, 8
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00588cb9
mov dword [esi + 0x24], eax
xor eax, eax
add esp, 8
cmp dword [esi + 0x20], eax
jle 0x586cca
jmp 0x586cb0
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0x24]
imul ecx, eax
lea ecx, [edx + ecx*8]
mov edx, dword [esi + 0x28]
mov dword [edx + eax*4], ecx
add eax, 1
cmp eax, dword [esi + 0x20]
jl 0x586cb0
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x28]
push eax
push ecx
mov ecx, esi
call fcn.005850c0
xor ecx, ecx
mov dword [esi + 0x30], 0
call fcn.0058323a
mov edi, eax
test edi, edi
mov ebx, 1
je 0x586dc9
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x28]
mov edx, dword [edi]
mov edx, dword [edx + 0x10]
push eax
push ecx
mov ecx, edi
call edx
test al, al
jne 0x586d93
mov ecx, ebx
call fcn.0058323a
mov edi, eax
add ebx, 1
test edi, edi
jne 0x586cf6
jmp 0x586dc9
mov ecx, dword [esp + 0x40]
push ecx
push str.Body__d_must_be_named_n
lea edx, [esp + 0x2d8]
push edx
jmp 0x585a40
lea eax, [esp + 0x130]
push eax
push str.Two_bodies_named___s__n
jmp 0x585a38
lea edx, [esp + 0x210]
push edx
push str.Invalid_copy_body_name___s__in_hinge_or_joint_n
lea eax, [esp + 0x2d8]
push eax
jmp 0x585a40
lea ecx, [esp + 0x250]
push ecx
push str.Invalid_body_name___s__in_hinge_or_joint_n
lea edx, [esp + 0x2d8]
push edx
jmp 0x585a40
lea eax, [esp + 0x290]
push eax
push str.Invalid_body_name___s__in_hinge_or_joint_n
jmp 0x585a38
mov eax, dword [esi + 0x24]
push eax
call fcn.00588796
mov ecx, dword [esi + 0x28]
push ecx
mov dword [esi + 0x24], 0
call fcn.00588796
mov edx, dword [edi]
mov eax, dword [edx + 8]
add esp, 8
mov ecx, edi
call eax
mov dword [esi + 0x28], eax
mov edx, dword [edi]
mov eax, dword [edx]
mov ecx, edi
call eax
mov dword [esi + 0x2c], eax
mov dword [esi + 0x30], edi
cmp dword [esi + 0x30], 0
jne 0x586e0e
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0x28]
push ecx
push edx
mov ecx, esi
call fcn.005850c0
mov eax, dword [esi + 0x20]
xor ecx, ecx
mov edx, 8
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00588cb9
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0x28]
add esp, 4
push ecx
push eax
push edx
lea ecx, [esi + 0x34]
mov dword [esi + 0x2c], eax
call fcn.005843a0
xor ecx, ecx
cmp dword [esi], ecx
jle 0x586e3a
xor edx, edx
mov eax, dword [esi + 4]
mov edi, dword [esi + 0x2c]
mov ebx, dword [esi + 0x28]
add eax, edx
add ecx, 1
mov dword [eax + 0x228], ebx
mov dword [eax + 0x224], edi
add edx, 0x244
cmp ecx, dword [esi]
jl 0x586e16
lea ecx, [esp + 0x170]
call fcn.00563940
lea ecx, [esp + 0x170]
call fcn.00564980
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8