Function at 0x1005884a
Capabilities:
Print debug messages

Disassembly:
mov eax, 0x100c938a
call fcn.1009a804
sub esp, 0x38
cmp dword [0x10123004], 0
push ebx
push esi
push edi
je 0x10058a69
mov eax, 0x40e4e0
call eax
xor ebx, ebx
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
call fcn.10058b81
mov dword [ebp - 0x24], eax
mov eax, ebx
mov dword [ebp - 4], ebx
mov edi, 0xb7d0b8
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], edi
mov ebx, dword [edi]
test ebx, ebx
je 0x1005895a
mov edi, dword [ebp - 0x10]
mov esi, dword [ebx]
mov dword [ebp - 0x1c], esi
mov eax, dword [esi]
cmp dword [eax + 0x20], 0x534030
je 0x100588ed
mov eax, edi
cdq
sub eax, edx
push 0x78
pop ecx
sar eax, 1
cdq
idiv ecx
push eax
movzx eax, word [esi + 0x22]
push edx
push eax
push esi
lea eax, [ebp - 0x44]
push str.Entity_0x_08x__with_model__d__at_ARRAY_StreamSectors__d__d__is_invalid_n
push eax
call fcn.10057772
add esp, 0x18
cmp dword [eax + 0x14], 0x10
jb 0x100588dc
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea ecx, [ebp - 0x44]
call fcn.1000b31a
jmp 0x10058947
mov ecx, dword [0x10148e14]
movzx eax, word [esi + 0x22]
push eax
mov edx, dword [ecx]
call dword [edx + 0xb8]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x54]
movzx eax, ax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push 0x10123000
call fcn.10057079
pop ecx
pop ecx
test al, al
je 0x10058947
test dword [esi + 0x1c], 0x2400
jne 0x10058947
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx]
call dword [eax + 0x20]
lea eax, [esi + 0x22]
lea ecx, [ebp - 0x24]
push dword [ebp - 0x1c]
push eax
push 0
lea eax, [ebp - 0x2c]
push eax
call fcn.10057481
mov eax, dword [ebx + 4]
mov ebx, eax
test eax, eax
jne 0x1005889e
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
add edi, 4
inc eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], edi
cmp edi, 0xb992b8
jl 0x10058891
mov edi, 0xb992c0
mov esi, dword [edi]
jmp 0x100589db
mov ebx, dword [esi]
mov ecx, dword [0x10148e14]
mov dword [ebp - 0x18], ebx
movzx eax, word [ebx + 0x22]
mov edx, dword [ecx]
push eax
call dword [edx + 0xb8]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x54]
movzx eax, ax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
push 0x10123000
call fcn.10057079
pop ecx
pop ecx
test al, al
je 0x100589d8
test dword [ebx + 0x1c], 0x2400
jne 0x100589d8
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx]
call dword [eax + 0x20]
lea eax, [ebx + 0x22]
lea ecx, [ebp - 0x24]
push dword [ebp - 0x1c]
push eax
push 0
lea eax, [ebp - 0x2c]
push eax
call fcn.10057481
mov esi, dword [esi + 4]
test esi, esi
jne 0x10058979
add edi, 0xc
cmp edi, 0xb99ec0
jl 0x10058975
mov esi, dword [0x10123000]
mov ecx, 0x10123000
mov byte [ebp - 4], 1
push dword [esi + 4]
call fcn.10021635
mov eax, dword [0x10123000]
xor ebx, ebx
mov byte [ebp - 4], bl
mov dword [eax + 4], esi
mov eax, dword [0x10123000]
mov dword [eax], esi
mov eax, dword [0x10123000]
mov dword [eax + 8], esi
mov eax, dword [ebp - 0x24]
mov dword [0x10123004], ebx
mov esi, dword [eax]
mov dword [ebp - 0x14], esi
cmp esi, eax
je 0x10058a61
movzx eax, word [esi + 0xe]
push eax
mov eax, 0x4089a0
call eax
movzx eax, word [esi + 0xe]
imul eax, eax, 0x14
push ebx
add eax, 0x8e4cd0
push eax
call fcn.1003be29
add esp, 0xc
lea ecx, [ebp - 0x14]
call fcn.10007e80
mov esi, dword [ebp - 0x14]
cmp esi, dword [ebp - 0x24]
jne 0x10058a2f
lea ecx, [ebp - 0x24]
call fcn.100577b3
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret