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

Disassembly:
push 0xffffffffffffffff
push 0x100dc876
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x88
push ebx
push ebp
push esi
push edi
mov esi, ecx
lea eax, [esp + 0xa8]
push eax
lea ecx, [esp + 0x14]
lea ebp, [esi + 0x60]
push ecx
mov ecx, ebp
mov dword [esp + 0x1c], ebp
call fcn.10057d10
mov eax, dword [esi + 0x64]
mov ecx, dword [esp + 0x10]
cmp ecx, eax
je 0x100599bf
mov eax, dword [ecx + 0x1c]
mov ecx, dword [esi + 0x58]
cmp eax, ecx
lea edi, [esi + 0x54]
je 0x10059983
mov edx, dword [eax + 4]
mov ecx, dword [eax]
mov dword [edx], ecx
mov edx, dword [eax]
mov ecx, dword [eax + 4]
push eax
mov dword [edx + 4], ecx
call sub.MSVCR71.dll_void___cdecl_operator_delete_void__
mov eax, dword [edi + 8]
add esp, 4
dec eax
mov dword [edi + 8], eax
mov ebx, dword [edi + 4]
mov eax, dword [ebx + 4]
lea edx, [esp + 0xa8]
push edx
push eax
push ebx
mov ecx, edi
call fcn.10013c10
push 1
mov ecx, edi
mov ebp, eax
call fcn.100578d0
mov dword [ebx + 4], ebp
mov ecx, dword [ebp + 4]
mov dword [ecx], ebp
mov edx, dword [esi + 0x58]
mov eax, dword [edx + 4]
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x1c], eax
jmp 0x10059c28
mov eax, dword [esi + 0x5c]
cmp eax, 0x200
jb 0x10059b05
mov eax, dword [esi + 0x58]
mov edi, dword [eax]
mov dword [esp + 0x10], 0x66
lea ebx, [ebx]
cmp edi, dword [esi + 0x58]
je 0x10059a85
mov ebx, dword [edi + 8]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x2c]
push eax
mov ecx, ebp
mov dword [esp + 0x20], ebx
call fcn.10057d10
mov ecx, dword [esi + 0x64]
mov eax, dword [esp + 0x28]
cmp eax, ecx
je 0x10059a38
mov ebp, dword [sym.imp.OgreMain.dll_unsigned_int_Ogre::ResourceGroupManager::RESOURCE_SYSTEM_NUM_REFERENCE_COUNTS]
mov ebp, dword [ebp]
mov edx, dword [eax + 0x18]
mov edx, dword [edx]
inc ebp
cmp edx, ebp
mov ebp, dword [esp + 0x14]
jbe 0x10059a27
mov edi, dword [edi]
jmp 0x10059a79
cmp eax, ecx
je 0x10059a38
push eax
lea eax, [esp + 0x1c]
push eax
mov ecx, ebp
call fcn.10059170
mov edx, dword [esp + 0x10]
mov ecx, dword [esi + 0x58]
mov eax, edi
mov edi, dword [edi]
dec edx
cmp eax, ecx
mov dword [esp + 0x10], edx
je 0x10059a6b
mov ecx, dword [eax + 4]
mov edx, dword [eax]
mov dword [ecx], edx
mov ecx, dword [eax]
mov edx, dword [eax + 4]
push eax
mov dword [ecx + 4], edx
call sub.MSVCR71.dll_void___cdecl_operator_delete_void__
mov eax, dword [esi + 0x5c]
add esp, 4
dec eax
mov dword [esi + 0x5c], eax
call dword [sym.imp.OgreMain.dll_public:_static_class_Ogre::MaterialManager____cdecl_Ogre::MaterialManager::getSingleton_void_]
mov edx, dword [eax]
push ebx
mov ecx, eax
call dword [edx + 0x34]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x100599e0
mov ebp, dword [esp + 0x10]
push 0
push 0x20
mov eax, 0x66
push 0
sub eax, ebp
push eax
lea ecx, [esp + 0x8c]
push ecx
call dword [sym.imp.OgreMain.dll_public:_static_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_Ogre::StringConverter::toString_unsigned_int__unsigned_short_int__char__int_]
push eax
lea edx, [esp + 0x78]
push str.Material_Pool_Remove
push edx
mov dword [esp + 0xc0], 0
call fcn.10001480
add esp, 0x20
push 0
push 2
push eax
mov byte [esp + 0xac], 1
call dword [sym.imp.OgreMain.dll_public:_static_class_Ogre::LogManager____cdecl_Ogre::LogManager::getSingleton_void_]
mov ecx, eax
call dword [sym.imp.OgreMain.dll_public:_void___thiscall_Ogre::LogManager::logMessage_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___enum_Ogre::LogMessageLevel__bool_]
lea ecx, [esp + 0x60]
mov byte [esp + 0xa0], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x7c]
mov dword [esp + 0xa0], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov ebp, dword [esi + 0x58]
mov ecx, dword [ebp + 4]
lea edi, [esi + 0x54]
lea eax, [esp + 0xa8]
push eax
push ecx
push ebp
mov ecx, edi
call fcn.10013c10
push 1
mov ecx, edi
mov ebx, eax
call fcn.100578d0
mov dword [ebp + 4], ebx
mov eax, dword [ebx + 4]
mov dword [eax], ebx
call dword [sym.imp.OgreMain.dll_public:_static_class_Ogre::MaterialManager____cdecl_Ogre::MaterialManager::getSingleton_void_]
mov edi, dword [esp + 0xa8]
mov edx, dword [eax]
push edi
lea ecx, [esp + 0x20]
push ecx
mov ecx, eax
call dword [edx + 0x48]
push eax
lea ecx, [esp + 0x58]
mov dword [esp + 0xa4], 2
call dword [sym.imp.OgreMain.dll_public:_void___thiscall_Ogre::MaterialPtr::constructor_class_Ogre::SharedPtr_class_Ogre::Resource__const__]
mov esi, dword [esi + 0x58]
mov esi, dword [esi + 4]
lea edx, [esp + 0x54]
push edx
lea ecx, [esp + 0x34]
mov byte [esp + 0xa4], 3
call dword [sym.imp.OgreMain.dll_public:_void___thiscall_Ogre::MaterialPtr::constructor_class_Ogre::MaterialPtr_const__]
mov dword [esp + 0x3c], esi
lea eax, [esp + 0x30]
mov bl, 4
push eax
lea ecx, [esp + 0x48]
mov byte [esp + 0xa4], bl
mov dword [esp + 0x44], edi
call dword [sym.imp.OgreMain.dll_public:_void___thiscall_Ogre::MaterialPtr::constructor_class_Ogre::MaterialPtr_const__]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0xa8], 5
call fcn.100590b0
lea ecx, [esp + 0x44]
mov byte [esp + 0xa0], bl
call dword [sym.imp.OgreMain.dll_public_virtual:_void___thiscall_Ogre::MaterialPtr::destructor_void_]
lea ecx, [esp + 0x30]
mov byte [esp + 0xa0], 3
call dword [sym.imp.OgreMain.dll_public_virtual:_void___thiscall_Ogre::MaterialPtr::destructor_void_]
lea ecx, [esp + 0x54]
mov byte [esp + 0xa0], 2
call dword [sym.imp.OgreMain.dll_public_virtual:_void___thiscall_Ogre::MaterialPtr::destructor_void_]
mov eax, dword [esp + 0x24]
test eax, eax
mov dword [esp + 0xa0], 0xffffffff
mov dword [esp + 0x1c], 0x100ec508
je 0x10059c28
dec dword [eax]
mov ecx, dword [esp + 0x24]
cmp dword [ecx], 0
jne 0x10059c28
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x1c]
call dword [edx + 4]
mov ecx, dword [esp + 0x98]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x94
ret 4