Function at 0x51bb30
Capabilities:
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x72dcab
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push ebp
push esi
mov ebx, ecx
push edi
mov ecx, 0x7cb478
mov byte [esp + 0x13], 0
call fcn.004d51b0
mov ecx, 0x7cb478
mov ebp, eax
call fcn.004d51e0
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push str..Morrowind.ini
push 0xf
push str.SurfaceFPS
mov esi, eax
push str.Water
mov dword [esp + 0x24], esi
call edi
push str..Morrowind.ini
push 8
push str.SurfaceTileCount
push str.Water
mov dword [ebx + 0x2c], eax
call edi
test eax, eax
mov dword [ebx + 0xc0], eax
ja 0x51bbb2
mov dword [ebx + 0xc0], 1
push str..Morrowind.ini
push 2
push str.TileTextureDivisor
push str.Water
call edi
test eax, eax
mov dword [ebx + 0xc4], eax
ja 0x51bbd9
mov dword [ebx + 0xc4], 1
push str..Morrowind.ini
push 0x200
push ebp
push 0x7c6180
push str.SurfaceTexture
push str.Water
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x51bc14
push ebp
push str.Textures
push str._swater_s
push esi
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
jmp 0x51bc2d
push str.Textures
push str._swaterCAUST
push esi
mov byte [esp + 0x1f], 1
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
or ecx, 0xffffffff
xor eax, eax
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
or ecx, 0xffffffff
add esp, 4
mov edx, eax
mov edi, esi
mov dword [ebx + 0xbc], edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
push str..Morrowind.ini
push 0x200
push ebp
mov ecx, eax
push 0x7c6180
and ecx, 3
push str.SurfaceFrameCount
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push str.Water
call esi
test eax, eax
je 0x51bca3
lea ecx, [ebx + 0x18]
push ecx
push 0x775d8c
push ebp
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0xc
jmp 0x51bca8
mov byte [esp + 0x13], 1
push str..Morrowind.ini
push 0x200
push ebp
push 0x7c6180
push str.RippleTexture
push str.Water
call esi
test eax, eax
je 0x51bce3
mov esi, dword [esp + 0x14]
push ebp
push str.Textures
push str._swater_s
push esi
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
jmp 0x51bd04
mov edx, dword [esp + 0x14]
push str.Textures
push str._swater_ripple
push edx
mov byte [esp + 0x1f], 1
call dword [sym.imp.MSVCRT.dll_sprintf]
mov esi, dword [esp + 0x20]
add esp, 0xc
or ecx, 0xffffffff
xor eax, eax
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
or ecx, 0xffffffff
add esp, 4
mov edx, eax
mov edi, esi
mov dword [ebx + 8], edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
push str..Morrowind.ini
push 0x200
push ebp
mov ecx, eax
push 0x7c6180
and ecx, 3
push str.RippleFrameCount
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push str.Water
call esi
test eax, eax
je 0x51bd79
mov edi, dword [sym.imp.MSVCRT.dll_sscanf]
lea ecx, [ebx + 0x1c]
push ecx
push 0x775d8c
push ebp
call edi
add esp, 0xc
jmp 0x51bd84
mov edi, dword [sym.imp.MSVCRT.dll_sscanf]
mov byte [esp + 0x13], 1
push str..Morrowind.ini
push 0x200
push ebp
push 0x7c6180
push str.RippleLifetime
push str.Water
call esi
test eax, eax
je 0x51bdb5
lea edx, [ebx + 0x34]
push edx
push 0x7b106c
push ebp
call edi
add esp, 0xc
jmp 0x51bdba
mov byte [esp + 0x13], 1
push str..Morrowind.ini
push 0x200
push ebp
push 0x7c6180
push str.MaxNumberRipples
push str.Water
call esi
test eax, eax
je 0x51bdeb
lea eax, [ebx + 0x50]
push eax
push 0x775d8c
push ebp
call edi
add esp, 0xc
jmp 0x51bdf0
mov byte [esp + 0x13], 1
push str..Morrowind.ini
push 0x200
push ebp
push 0x7c6180
push str.RippleScale
push str.Water
call esi
test eax, eax
je 0x51be25
lea ecx, [ebx + 0x3c]
push ecx
lea edx, [ebx + 0x38]
push edx
push str._f___f
push ebp
call edi
add esp, 0x10
jmp 0x51be2a
mov byte [esp + 0x13], 1
push str..Morrowind.ini
push 0x200
push ebp
push 0x7c6180
push str.RippleRotSpeed
push str.Water
call esi
test eax, eax
je 0x51be5b
lea eax, [ebx + 0x4c]
push eax
push 0x7b106c
push ebp
call edi
add esp, 0xc
jmp 0x51be60
mov byte [esp + 0x13], 1
push str..Morrowind.ini
push 0x200
push ebp
push 0x7c6180
push str.RippleAlphas
push str.Water
call esi
test eax, eax
je 0x51be99
lea ecx, [ebx + 0x48]
push ecx
lea edx, [ebx + 0x44]
push edx
lea eax, [ebx + 0x40]
push eax
push str._f___f___f
push ebp
call edi
add esp, 0x14
jmp 0x51be9e
mov byte [esp + 0x13], 1
push str..Morrowind.ini
push 0x200
push ebp
push 0x7b1014
push str.NearWaterRadius
push str.Water
call esi
test eax, eax
je 0x51becd
push ebp
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
mov dword [ebx + 0x58], eax
jmp 0x51bed2
mov byte [esp + 0x13], 1
push str..Morrowind.ini
push 0x200
push ebp
push 0x786a98
push str.NearWaterPoints
push str.Water
call esi
test eax, eax
je 0x51bf01
push ebp
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
mov dword [ebx + 0x5c], eax
jmp 0x51bf06
mov byte [esp + 0x13], 1
push str..Morrowind.ini
push 0x200
push ebp
push 0x777770
push str.NearWaterUnderwaterFreq
push str.Water
call esi
test eax, eax
je 0x51bf37
lea ecx, [ebx + 0x60]
push ecx
push 0x7b106c
push ebp
call edi
add esp, 0xc
jmp 0x51bf3c
mov byte [esp + 0x13], 1
push str..Morrowind.ini
push 0x200
push ebp
push str.0.75
push str.NearWaterUnderwaterVolume
push str.Water
call esi
test eax, eax
je 0x51bf6d
lea edx, [ebx + 0x64]
push edx
push 0x7b106c
push ebp
call edi
add esp, 0xc
jmp 0x51bf72
mov byte [esp + 0x13], 1
push str..Morrowind.ini
push 0x200
push ebp
push 0x7b0fbc
push str.NearWaterIndoorTolerance
push str.Water
call esi
test eax, eax
je 0x51bfa3
lea eax, [ebx + 0x68]
push eax
push 0x7b106c
push ebp
call edi
add esp, 0xc
jmp 0x51bfa8
mov byte [esp + 0x13], 1
push str..Morrowind.ini
push 0x200
push ebp
push 0x7b0f9c
push str.NearWaterOutdoorTolerance
push str.Water
call esi
test eax, eax
je 0x51bfd9
lea ecx, [ebx + 0x6c]
push ecx
push 0x7b106c
push ebp
call edi
add esp, 0xc
jmp 0x51bfde
mov byte [esp + 0x13], 1
push str..Morrowind.ini
push 0x200
push ebp
push str.NearWaterIndoorLoop
push str.NearWaterIndoorID
push str.Water
call esi
test eax, eax
je 0x51c028
or ecx, 0xffffffff
xor eax, eax
mov edi, ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
lea edx, [ebx + 0x70]
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
jmp 0x51c02d
mov byte [esp + 0x13], 1
push str..Morrowind.ini
push 0x200
push ebp
push str.NearWaterOutoorLoop
push str.NearWaterOutdoorID
push str.Water
call esi
test eax, eax
je 0x51c07a
or ecx, 0xffffffff
xor eax, eax
mov edi, ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edx, [ebx + 0x90]
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov al, byte [esp + 0x13]
and ecx, 3
test al, al
rep movsb byte es:[edi], byte [esi]
je 0x51c087
push str.Add_the___Water___stuff_to_your_Morrowind.ini_file._r_n
call fcn.00477400
add esp, 4
mov ecx, dword [0x7c6cdc]
mov al, byte [ecx + 0x20]
test al, al
je 0x51c0be
mov edx, dword [0x7c67dc]
mov eax, dword [edx + 0x30]
test eax, eax
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
mov dword [ecx], eax
je 0x51c0ad
inc dword [eax + 4]
mov ecx, ebx
call fcn.0051db90
test al, al
je 0x51c0be
mov byte [ebx + 4], 1
jmp 0x51c0cf
mov byte [ebx + 4], 0
mov ecx, dword [0x7c6cdc]
mov eax, dword [ecx]
push 0
call dword [eax + 0x24]
mov esi, dword [ebx]
test esi, esi
je 0x51c0eb
mov ecx, esi
call fcn.0065bdf0
push esi
call fcn.00727530
add esp, 4
mov dword [ebx], 0
mov al, byte [ebx + 4]
test al, al
je 0x51c161
push str.Creating_Lake_water_n_n_n
call fcn.00657d80
push 0x278
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
mov dword [esp + 0x20], 0
je 0x51c122
mov ecx, eax
call fcn.0065bc30
jmp 0x51c124
xor eax, eax
mov ecx, ebx
mov dword [esp + 0x20], 0xffffffff
mov dword [ebx], eax
call fcn.0051d790
mov esi, dword [esp + 0x28]
mov ecx, dword [ebx + 0xb4]
push esi
push ecx
mov ecx, ebx
call fcn.0051e240
mov edx, dword [ebx + 0xc4]
mov eax, dword [ebx + 0xc0]
mov ecx, dword [ebx]
push esi
push edx
push eax
push ebx
call fcn.0065bf80
jmp 0x51c17b
mov ecx, ebx
call fcn.0051d790
mov ecx, dword [esp + 0x28]
mov edx, dword [ebx + 0xb4]
push ecx
push edx
mov ecx, ebx
call fcn.0051e240
mov al, byte [ebx + 4]
test al, al
jne 0x51c19e
mov eax, dword [ebx + 0xb4]
push eax
mov ecx, ebx
call fcn.0051d2f0
mov ecx, dword [ebx + 0xb0]
push ecx
mov ecx, ebx
call fcn.0051c9a0
mov ecx, dword [ebx + 0xb4]
call fcn.006eb0e0
mov ecx, dword [ebx + 0xb4]
call fcn.006eb380
mov ecx, dword [ebx + 0xb4]
push 1
push 0
push 0
call fcn.006eb000
mov ecx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x14
ret 4