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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x100db744
push eax
mov dword fs:[0], esp
sub esp, 0x1d4
push ebp
push esi
mov esi, ecx
mov eax, dword [esi]
mov ecx, dword [esi + 4]
inc eax
inc ecx
imul eax, ecx
push edi
push 0
lea ebp, [esi + 0x70]
push eax
mov ecx, ebp
call fcn.100491a0
mov edi, dword [esp + 0x1f0]
mov eax, dword [edi + 0x14]
test eax, eax
jne 0x1004a2c5
mov eax, dword [esi + 0x78]
mov esi, dword [esi + 0x74]
cmp esi, eax
je 0x1004abf1
mov dword [esi], 0
add esi, 4
cmp esi, eax
jne 0x1004a2b3
jmp 0x1004abf1
push ebx
mov ebx, dword [esp + 0x1f8]
push str.image
push ebx
call dword [sym.imp.MSVCP71.dll_bool___cdecl_std::operator_char__struct_std::char_traits_char___class_std::allocator_char___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
add esp, 8
test al, al
je 0x1004a80e
lea ecx, [esp + 0x30]
call dword [sym.imp.OgreMain.dll_public:_void___thiscall_Ogre::Image::constructor_void_]
mov edx, dword [esp + 0x1fc]
push edx
push edi
lea ecx, [esp + 0x38]
mov dword [esp + 0x1f4], 0
call dword [sym.imp.OgreMain.dll_public:_class_Ogre::Image____thiscall_Ogre::Image::load_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [esp + 0x30]
call dword [sym.imp.OgreMain.dll_public:_enum_Ogre::PixelFormat___thiscall_Ogre::Image::getFormat_void_]
mov edi, eax
cmp edi, 1
je 0x1004a33e
cmp edi, 2
je 0x1004a33e
push 0x11b
push str..CoreTerrainData.cpp
push str.DemoApplication::createScene
push 0x100f007c
push 4
call dword [sym.imp.OgreMain.dll_public:_static_void___cdecl_Ogre::Exception::_throw_int__char_const___char_const___char_const___long_int_]
lea ecx, [esp + 0x30]
call dword [sym.imp.OgreMain.dll_public:_unsigned_int___thiscall_Ogre::Image::getWidth_void_const]
mov ecx, dword [esi]
mov ebp, dword [sym.imp.OgreMain.dll_public:_unsigned_int___thiscall_Ogre::Image::getDepth_void_const]
inc ecx
cmp eax, ecx
jne 0x1004a542
lea ecx, [esp + 0x30]
call dword [sym.imp.OgreMain.dll_public:_unsigned_int___thiscall_Ogre::Image::getHeight_void_const]
mov edx, dword [esi + 4]
inc edx
cmp eax, edx
jne 0x1004a542
lea ecx, [esp + 0x30]
call ebp
cmp eax, 1
jne 0x1004a542
lea ecx, [esp + 0x30]
call dword [sym.imp.OgreMain.dll_public:_unsigned_char____thiscall_Ogre::Image::getData_void_]
mov ecx, dword [esi + 0x74]
cmp edi, 2
mov edi, dword [esi]
mov esi, dword [esi + 4]
sete dl
inc esi
test dl, dl
lea ebx, [edi + 1]
je 0x1004a47c
mov dword [esp + 0x14], esi
jmp 0x1004a3b0
xor esi, esi
cmp ebx, 4
jl 0x1004a442
lea edx, [edi + 1]
shr edx, 2
lea esi, [edx*4]
jmp 0x1004a3d0
movzx ebp, word [eax]
mov dword [esp + 0x10], ebp
add eax, 2
add ecx, 4
fild dword [esp + 0x10]
add eax, 2
add ecx, 4
add eax, 2
fmul dword [0x100f0078]
add ecx, 4
add ecx, 4
add eax, 2
dec edx
fstp dword [ecx - 0x10]
movzx ebp, word [eax - 6]
mov dword [esp + 0x10], ebp
fild dword [esp + 0x10]
fmul dword [0x100f0078]
fstp dword [ecx - 0xc]
movzx ebp, word [eax - 4]
mov dword [esp + 0x10], ebp
fild dword [esp + 0x10]
fmul dword [0x100f0078]
fstp dword [ecx - 8]
movzx ebp, word [eax - 2]
mov dword [esp + 0x10], ebp
fild dword [esp + 0x10]
fmul dword [0x100f0078]
fstp dword [ecx - 4]
jne 0x1004a3d0
cmp esi, edi
ja 0x1004a46d
mov edx, edi
sub edx, esi
inc edx
jmp 0x1004a450
movzx esi, word [eax]
mov dword [esp + 0x10], esi
add ecx, 4
add eax, 2
dec edx
fild dword [esp + 0x10]
fmul dword [0x100f0078]
fstp dword [ecx - 4]
jne 0x1004a450
dec dword [esp + 0x14]
jne 0x1004a3b0
jmp 0x1004a528
mov dword [esp + 0x14], esi
xor esi, esi
cmp ebx, 4
jl 0x1004a4fe
lea edx, [edi + 1]
shr edx, 2
lea esi, [edx*4]
movzx ebp, byte [eax]
mov dword [esp + 0x10], ebp
add ecx, 4
inc eax
fild dword [esp + 0x10]
add ecx, 4
inc eax
add ecx, 4
fmul dword [0x100edb5c]
inc eax
add ecx, 4
inc eax
dec edx
fstp dword [ecx - 0x10]
movzx ebp, byte [eax - 3]
mov dword [esp + 0x10], ebp
fild dword [esp + 0x10]
fmul dword [0x100edb5c]
fstp dword [ecx - 0xc]
movzx ebp, byte [eax - 2]
mov dword [esp + 0x10], ebp
fild dword [esp + 0x10]
fmul dword [0x100edb5c]
fstp dword [ecx - 8]
movzx ebp, byte [eax - 1]
mov dword [esp + 0x10], ebp
fild dword [esp + 0x10]
fmul dword [0x100edb5c]
fstp dword [ecx - 4]
jne 0x1004a494
cmp esi, edi
ja 0x1004a51e
mov edx, edi
sub edx, esi
inc edx
movzx esi, byte [eax]
mov dword [esp + 0x10], esi
add ecx, 4
inc eax
dec edx
fild dword [esp + 0x10]
fmul dword [0x100edb5c]
fstp dword [ecx - 4]
jne 0x1004a503
dec dword [esp + 0x14]
jne 0x1004a480
lea ecx, [esp + 0x30]
mov dword [esp + 0x1ec], 0xffffffff
call dword [sym.imp.OgreMain.dll_public_virtual:_void___thiscall_Ogre::Image::destructor_void_]
jmp 0x1004abf0
mov eax, dword [esi + 4]
mov edi, 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_int__unsigned_short_int__char__int_]
push 0
push 0x20
push 0
inc eax
push eax
lea ecx, [esp + 0xa4]
push ecx
call edi
mov ebx, eax
mov edx, dword [esi]
push 0
push 0x20
push 0
inc edx
push edx
lea eax, [esp + 0x10c]
push eax
mov byte [esp + 0x214], 1
call edi
add esp, 0x28
mov edi, eax
push 0
push 0x20
push 0
lea ecx, [esp + 0x3c]
mov byte [esp + 0x1f8], 2
call ebp
mov esi, 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 ecx, [esp + 0x114]
push ecx
call esi
add esp, 0x14
mov ebp, eax
push 0
push 0x20
push 0
lea ecx, [esp + 0x3c]
mov byte [esp + 0x1f8], 3
call dword [sym.imp.OgreMain.dll_public:_unsigned_int___thiscall_Ogre::Image::getHeight_void_const]
push eax
lea edx, [esp + 0x1bc]
push edx
call esi
add esp, 0x14
mov dword [esp + 0x10], eax
push 0
push 0x20
push 0
lea ecx, [esp + 0x3c]
mov byte [esp + 0x1f8], 4
call dword [sym.imp.OgreMain.dll_public:_unsigned_int___thiscall_Ogre::Image::getWidth_void_const]
push eax
lea eax, [esp + 0x1d8]
push eax
call esi
push eax
lea ecx, [esp + 0x1a8]
push str.Error:_Invalid_heightmap_size_:
push ecx
mov byte [esp + 0x20c], 5
call fcn.10001480
push 0x100f0050
push eax
lea edx, [esp + 0x180]
push edx
mov byte [esp + 0x218], 6
call fcn.10001500
mov ecx, dword [esp + 0x3c]
push ecx
mov byte [esp + 0x21c], 7
push eax
lea edx, [esp + 0x154]
push edx
call fcn.10001400
push 0x100f0050
push eax
lea eax, [esp + 0x1b4]
push eax
mov byte [esp + 0x230], 8
call fcn.10001500
add esp, 0x44
push ebp
push eax
lea ecx, [esp + 0x144]
push ecx
mov byte [esp + 0x1f8], 9
call fcn.10001400
push str.._Should_be
push eax
lea edx, [esp + 0x8c]
push edx
mov byte [esp + 0x204], 0xa
call fcn.10001500
push edi
push eax
lea eax, [esp + 0xd0]
push eax
mov byte [esp + 0x210], 0xb
call fcn.10001400
push 0x100f0050
push eax
lea ecx, [esp + 0xf8]
push ecx
mov byte [esp + 0x21c], 0xc
call fcn.10001500
push ebx
push eax
lea edx, [esp + 0x94]
push edx
mov byte [esp + 0x228], 0xd
call fcn.10001400
add esp, 0x3c
lea ecx, [esp + 0xcc]
mov byte [esp + 0x1ec], 0x1b
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 + 0xb0]
mov byte [esp + 0x1ec], 0x1a
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 + 0x78]
mov byte [esp + 0x1ec], 0x19
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 + 0x13c]
mov byte [esp + 0x1ec], 0x18
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 + 0x174]
mov byte [esp + 0x1ec], 0x17
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 + 0x120]
mov byte [esp + 0x1ec], 0x16
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 byte [esp + 0x1ec], 0x15
lea ecx, [esp + 0x158]
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 + 0x190]
mov byte [esp + 0x1ec], 0x14
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 + 0x1c8]
mov byte [esp + 0x1ec], 0x13
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 + 0x1ac]
mov byte [esp + 0x1ec], 0x12
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 + 0x104]
mov byte [esp + 0x1ec], 0x11
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 + 0xe8]
mov byte [esp + 0x1ec], 0x10
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 + 0x94]
mov byte [esp + 0x1ec], 0xf
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push 0x128
push str..CoreTerrainData.cpp
push str.HeightmapTerrainPageSource::loadHeightmap
lea eax, [esp + 0x68]
push eax
push 4
call dword [sym.imp.OgreMain.dll_public:_static_void___cdecl_Ogre::Exception::_throw_int__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const___char_const___long_int_]
push str.standard
push ebx
call dword [sym.imp.MSVCP71.dll_bool___cdecl_std::operator_char__struct_std::char_traits_char___class_std::allocator_char___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
mov ecx, dword [esp + 0x204]
add esp, 8
test al, al
push 0
push 1
push ecx
push edi
je 0x1004aaf2
lea edx, [esp + 0x34]
push edx
call dword [sym.imp.OgreMain.dll_public:_static_class_Ogre::ResourceGroupManager____cdecl_Ogre::ResourceGroupManager::getSingleton_void_]
mov ecx, eax
call dword [sym.imp.OgreMain.dll_public:_class_Ogre::SharedPtr_class_Ogre::DataStream____thiscall_Ogre::ResourceGroupManager::openResource_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___bool__class_Ogre::Resource__]
lea eax, [esp + 0x24]
mov ebx, 0x1c
push eax
lea ecx, [esp + 0xb4]
mov dword [esp + 0x1f0], ebx
call fcn.10046ce0
push 4
lea ecx, [esp + 0x7c]
push ecx
lea ecx, [esp + 0xb8]
mov byte [esp + 0x1f4], 0x1d
call fcn.1008f110
cmp dword [esp + 0x78], 0x4645484d
je 0x1004a911
push edi
lea edx, [esp + 0x60]
push str.Invalid_magic_of_heightmap_file_
push edx
call fcn.10001480
push str.while_loading_terrain_
push eax
lea eax, [esp + 0xa8]
push eax
mov byte [esp + 0x204], 0x1e
call fcn.10001500
add esi, 0xc4
push esi
push eax
lea ecx, [esp + 0x108]
push ecx
mov byte [esp + 0x210], 0x1f
call fcn.10001400
push 0x100efe3c
push eax
lea edx, [esp + 0x130]
push edx
mov byte [esp + 0x21c], 0x20
call fcn.10001500
add esp, 0x30
push 0x16c
push str..CoreTerrainData.cpp
push str.TerrainData::load
push eax
push 4
mov byte [esp + 0x200], 0x21
call dword [sym.imp.OgreMain.dll_public:_static_void___cdecl_Ogre::Exception::_throw_int__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const___char_const___long_int_]
cmp dword [esp + 0x7c], 0x100000
je 0x1004a9a5
push edi
lea eax, [esp + 0x60]
push str.Invalid_version_of_heightmap_file_
push eax
call fcn.10001480
push str.while_loading_terrain_
push eax
lea ecx, [esp + 0xa8]
push ecx
mov byte [esp + 0x204], 0x22
call fcn.10001500
add esi, 0xc4
push esi
push eax
lea edx, [esp + 0x108]
push edx
mov byte [esp + 0x210], 0x23
call fcn.10001400
push 0x100efe3c
push eax
lea eax, [esp + 0x130]
push eax
mov byte [esp + 0x21c], 0x24
call fcn.10001500
add esp, 0x30
push 0x172
push str..CoreTerrainData.cpp
push str.TerrainData::load
push eax
push 4
mov byte [esp + 0x200], 0x25
call dword [sym.imp.OgreMain.dll_public:_static_void___cdecl_Ogre::Exception::_throw_int__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const___char_const___long_int_]
mov ecx, dword [esi]
mov eax, dword [esp + 0x80]
inc ecx
cmp eax, ecx
jne 0x1004aa6c
mov edx, dword [esi + 4]
mov eax, dword [esp + 0x84]
inc edx
cmp eax, edx
jne 0x1004aa6c
mov esi, dword [esi + 0x74]
mov ecx, ebp
call fcn.100147b0
push eax
push esi
lea ecx, [esp + 0xb8]
call fcn.1008f110
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx]
mov esi, dword [ecx + 0x20]
call dword [eax + 0x20]
cmp eax, esi
je 0x1004aa40
push edi
lea ecx, [esp + 0x60]
push str.Invalid_heightmap_file_
push ecx
call fcn.10001480
push 0x100efe3c
push eax
lea edx, [esp + 0xa8]
push edx
mov byte [esp + 0x204], 0x2a
call fcn.10001500
add esp, 0x18
push 0x185
push str..CoreTerrainData.cpp
push str.TerrainData::_loadHeightmap
push eax
push 4
mov byte [esp + 0x200], 0x2b
call dword [sym.imp.OgreMain.dll_public:_static_void___cdecl_Ogre::Exception::_throw_int__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const___char_const___long_int_]
lea ecx, [esp + 0xb0]
mov byte [esp + 0x1ec], bl
call fcn.10046d20
lea ecx, [esp + 0x24]
mov dword [esp + 0x1ec], 0xffffffff
call fcn.10003280
jmp 0x1004abf0
push edi
lea eax, [esp + 0x60]
push str.Dimensions_of_heightmap_file_
push eax
call fcn.10001480
push str._doesnt_match_the_dimensions_of_the_terrain_
push eax
lea ecx, [esp + 0xa8]
push ecx
mov byte [esp + 0x204], 0x26
call fcn.10001500
add esi, 0xc4
push esi
push eax
lea edx, [esp + 0x108]
push edx
mov byte [esp + 0x210], 0x27
call fcn.10001400
push 0x100efe3c
push eax
lea eax, [esp + 0x130]
push eax
mov byte [esp + 0x21c], 0x28
call fcn.10001500
add esp, 0x30
push 0x178
push str..CoreTerrainData.cpp
push str.TerrainData::load
push eax
push 4
mov byte [esp + 0x200], 0x29
call dword [sym.imp.OgreMain.dll_public:_static_void___cdecl_Ogre::Exception::_throw_int__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const___char_const___long_int_]
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.OgreMain.dll_public:_static_class_Ogre::ResourceGroupManager____cdecl_Ogre::ResourceGroupManager::getSingleton_void_]
mov ecx, eax
call dword [sym.imp.OgreMain.dll_public:_class_Ogre::SharedPtr_class_Ogre::DataStream____thiscall_Ogre::ResourceGroupManager::openResource_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___bool__class_Ogre::Resource__]
lea eax, [esp + 0x18]
mov ebx, 0x2c
push eax
lea ecx, [esp + 0xd0]
mov dword [esp + 0x1f0], ebx
call fcn.10046ce0
mov ecx, dword [ebp + 4]
test ecx, ecx
mov byte [esp + 0x1ec], 0x2d
jne 0x1004ab35
xor eax, eax
jmp 0x1004ab3d
mov eax, dword [ebp + 8]
sub eax, ecx
sar eax, 2
mov esi, dword [esi + 0x74]
push eax
push esi
lea ecx, [esp + 0xd4]
call fcn.1008f110
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx]
mov esi, dword [ecx + 0x20]
call dword [edx + 0x20]
cmp eax, esi
je 0x1004abac
push edi
lea eax, [esp + 0x60]
push str.Invalid_heightmap_file_
push eax
call fcn.10001480
push 0x100efe3c
push eax
lea ecx, [esp + 0xa8]
push ecx
mov byte [esp + 0x204], 0x2e
call fcn.10001500
add esp, 0x18
push 0x195
push str..CoreTerrainData.cpp
push str.TerrainData::_loadHeightmap
push eax
push 4
mov byte [esp + 0x200], 0x2f
call dword [sym.imp.OgreMain.dll_public:_static_void___cdecl_Ogre::Exception::_throw_int__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const___char_const___long_int_]
lea ecx, [esp + 0xcc]
mov byte [esp + 0x1ec], bl
call fcn.10046d20
mov eax, dword [esp + 0x20]
test eax, eax
mov dword [esp + 0x1ec], 0xffffffff
mov dword [esp + 0x18], 0x100e934c
je 0x1004abf0
dec dword [eax]
mov edx, dword [esp + 0x20]
cmp dword [edx], 0
jne 0x1004abf0
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x18]
call dword [eax + 4]
pop ebx
mov ecx, dword [esp + 0x1e0]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x1e0
ret 0xc