Function at 0x5972c0
Capabilities:
Read .ini file
Resolve function by parsing pe exports

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x50
push esi
push edi
call fcn.00582ef0
xor edi, edi
push edi
push edi
push 0x10
mov esi, eax
push 0xffff8072
lea eax, [esp + 0x6c]
push eax
mov ecx, esi
call fcn.00581440
cmp word [eax], 0x80bd
je 0x5972f6
pop edi
xor al, al
pop esi
add esp, 0x50
ret
mov ecx, dword [0x7c67dc]
mov eax, dword [esp + 0x60]
cmp ax, di
mov dword [esp + 0x20], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 0x14], edi
mov dword [esp + 0x30], edi
mov edx, dword [ecx + 0x2e4]
push ebx
mov bx, word [edx + 0x3c]
mov byte [esp + 0x60], 0
mov dword [esp + 0x20], ebx
je 0x597337
mov ebx, eax
mov dword [esp + 0x20], ebx
cmp bx, word [esi + 0x14]
jne 0x597346
mov ebx, 0xffff80b4
mov dword [esp + 0x20], ebx
mov ecx, dword [esi + 0x70]
test ecx, ecx
push ebp
mov ecx, esi
setne byte [esp + 0x13]
call fcn.00583b60
mov ecx, 0x7cb478
call fcn.004d51b0
mov ecx, 0x7cb478
mov edi, eax
call fcn.004d51e0
cmp bx, 0x80b4
mov ebp, eax
mov eax, dword [esi + 8]
je 0x5973a7
test eax, eax
jne 0x597383
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push ebx
mov dword [esp + 0x6c], eax
call fcn.0057b220
mov ecx, dword [esp + 0x6c]
add esp, 4
push eax
push ecx
push str._s__s
push edi
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
jmp 0x5973c0
test eax, eax
jne 0x5973b0
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
push 0x775998
push edi
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
push str..Morrowind.ini
push 0x200
push ebp
push 0x7c6180
push edi
push str.MenuStates
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x59782e
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x68]
push edx
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x54]
push ecx
push str._f___f__f__f__f____f__f__f__f____i__i__i
push ebp
call dword [sym.imp.MSVCRT.dll_sscanf]
mov eax, dword [esp + 0x4c]
add esp, 0x38
test eax, eax
jne 0x59743f
mov dword [esp + 0x1c], 0
fld dword [esp + 0x28]
fcomp dword [0x74b46c]
fnstsw ax
test ah, 0x40
je 0x59782e
mov eax, dword [0x7c67dc]
fild dword [eax + 0x78]
fild dword [eax + 0x7c]
fstp dword [esp + 0x18]
fld st(0)
fmul dword [esp + 0x3c]
call sub.MSVCRT.dll__ftol
fld dword [esp + 0x18]
fmul dword [esp + 0x40]
mov ebx, eax
mov dword [esp + 0x68], ebx
call sub.MSVCRT.dll__ftol
fld st(0)
fmul dword [0x746498]
mov dword [esp + 0x20], eax
fild dword [esp + 0x68]
fsubr st(2)
fmul dword [esp + 0x44]
fsub st(1)
call sub.MSVCRT.dll__ftol
fld dword [esp + 0x18]
fmul dword [0x746498]
mov dword [esp + 0x30], eax
fstp dword [esp + 0x2c]
fild dword [esp + 0x20]
fsubr dword [esp + 0x18]
fmul dword [esp + 0x48]
fchs
fadd dword [esp + 0x2c]
call sub.MSVCRT.dll__ftol
fld st(1)
fmul dword [esp + 0x4c]
mov dword [esp + 0x34], eax
call sub.MSVCRT.dll__ftol
fld dword [esp + 0x18]
fmul dword [esp + 0x50]
mov ebp, eax
mov dword [esp + 0x54], ebp
call sub.MSVCRT.dll__ftol
fild dword [esp + 0x54]
mov dword [esp + 0x68], eax
fsubr st(2)
fmul dword [esp + 0x58]
fsub st(1)
call sub.MSVCRT.dll__ftol
fstp st(0)
fstp st(0)
mov edi, eax
fild dword [esp + 0x68]
fsubr dword [esp + 0x18]
fmul dword [esp + 0x5c]
fchs
fadd dword [esp + 0x2c]
call sub.MSVCRT.dll__ftol
push 0
push 0
push 1
push 0xffff807a
lea edx, [esp + 0x64]
push edx
mov ecx, esi
mov dword [esp + 0x2c], eax
call fcn.00581440
cmp ebp, dword [eax]
jne 0x59762d
push 0
push 0
push 1
push 0xffff807b
lea eax, [esp + 0x64]
push eax
mov ecx, esi
call fcn.00581440
mov ecx, dword [esp + 0x68]
cmp ecx, dword [eax]
jne 0x59762d
push 0
push 0
push 1
push 0xffff8078
lea edx, [esp + 0x64]
push edx
mov ecx, esi
call fcn.00581440
cmp edi, dword [eax]
jne 0x59762d
push 0
push 0
push 1
push 0xffff8079
lea eax, [esp + 0x64]
push eax
mov ecx, esi
call fcn.00581440
mov ecx, dword [esp + 0x18]
cmp ecx, dword [eax]
jne 0x59762d
push 0
push 0
push 1
push 0xffff807e
lea edx, [esp + 0x64]
push edx
mov ecx, esi
call fcn.00581440
cmp ebx, dword [eax]
jne 0x59762d
push 0
push 0
push 1
push 0xffff807f
lea eax, [esp + 0x64]
push eax
mov ecx, esi
call fcn.00581440
mov ecx, dword [esp + 0x20]
cmp ecx, dword [eax]
jne 0x59762d
push 0
push 0
push 1
push 0xffff807c
lea edx, [esp + 0x64]
push edx
mov ecx, esi
call fcn.00581440
mov ecx, dword [esp + 0x30]
cmp ecx, dword [eax]
jne 0x59762d
push 0
push 0
push 1
push 0xffff807d
lea edx, [esp + 0x64]
push edx
mov ecx, esi
call fcn.00581440
mov ecx, dword [esp + 0x34]
cmp ecx, dword [eax]
jne 0x59762d
mov cl, byte [esi + 0x76]
mov eax, dword [esp + 0x1c]
xor edx, edx
test cl, cl
sete dl
cmp eax, edx
je 0x597632
mov byte [esp + 0x64], 1
push 1
push ebp
push 0xffff807a
mov ecx, esi
call fcn.00581f30
mov eax, dword [esp + 0x68]
push 1
push eax
push 0xffff807b
mov ecx, esi
call fcn.00581f30
push 1
push edi
push 0xffff8078
mov ecx, esi
call fcn.00581f30
mov ecx, dword [esp + 0x18]
push 1
push ecx
push 0xffff8079
mov ecx, esi
call fcn.00581f30
push 1
push ebx
push 0xffff807e
mov ecx, esi
call fcn.00581f30
mov edx, dword [esp + 0x20]
push 1
push edx
push 0xffff807f
mov ecx, esi
call fcn.00581f30
mov eax, dword [esp + 0x30]
push 1
push eax
push 0xffff807c
mov ecx, esi
call fcn.00581f30
mov ecx, dword [esp + 0x34]
push 1
push ecx
push 0xffff807d
mov ecx, esi
call fcn.00581f30
mov edx, dword [esp + 0x1c]
xor eax, eax
test edx, edx
setne al
push 0x10
mov ecx, esi
add eax, 0xffff80bd
push eax
push 0xffff8075
call fcn.00581f30
mov eax, dword [esp + 0x38]
test eax, eax
jle 0x59772f
push 0x10
mov eax, 0xffff80bd
push eax
push 0xffff8074
mov ecx, esi
call fcn.00581f30
push 0
push 0
push 0x20
push 0xffff8076
lea edx, [esp + 0x78]
push edx
mov ecx, esi
call fcn.00581440
mov eax, dword [eax]
test eax, eax
je 0x59782e
push esi
push 0
push 0
push 0xffff8076
push esi
call eax
add esp, 0x14
jmp 0x5979fb
push 0
push 0
push 0x10
push 0xffff8074
lea eax, [esp + 0x64]
push eax
mov ecx, esi
call fcn.00581440
cmp word [eax], 0x80be
jne 0x5977b4
mov ecx, dword [esi + 0x28]
test ecx, ecx
mov ebx, 0xffff80cd
je 0x597768
cmp dword [esi + 0xec], ebx
jne 0x597768
call fcn.0041d1b0
jmp 0x597773
mov eax, dword [esi + 0xec]
cdq
xor eax, edx
sub eax, edx
cmp eax, ebp
jne 0x5977b4
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x59778d
cmp dword [esi + 0xf0], ebx
jne 0x59778d
call fcn.0041d1e0
jmp 0x597798
mov eax, dword [esi + 0xf0]
cdq
xor eax, edx
sub eax, edx
cmp eax, dword [esp + 0x68]
jne 0x5977b4
cmp dword [esi + 0xdc], edi
jne 0x5977b4
mov ebx, dword [esp + 0x18]
cmp dword [esi + 0xe0], ebx
je 0x5977bd
jmp 0x5977b8
mov ebx, dword [esp + 0x18]
mov byte [esp + 0x64], 1
push 0x10
mov eax, 0xffff80be
push eax
push 0xffff8074
mov ecx, esi
call fcn.00581f30
push ebp
mov ecx, esi
call fcn.00581130
mov ecx, dword [esp + 0x68]
push ecx
mov ecx, esi
call fcn.00581210
mov eax, dword [esi + 0xdc]
cmp eax, edi
je 0x5977f3
mov byte [esi + 0x78], 1
mov ebp, dword [esi + 0x94]
mov edx, edi
sub edx, eax
mov eax, dword [esi + 0xe0]
add ebp, edx
cmp eax, ebx
mov dword [esi + 0x94], ebp
mov dword [esi + 0xdc], edi
je 0x597819
mov byte [esi + 0x78], 1
mov ecx, ebx
sub ecx, eax
add dword [esi + 0x98], ecx
mov dword [esi + 0xe0], ebx
jmp 0x5979fb
mov edi, dword [0x7c67dc]
test edi, edi
je 0x59786f
mov eax, dword [edi + 0x2e4]
test eax, eax
je 0x59786f
mov edx, dword [0x7d1c28]
mov eax, dword [edx + 0x1c]
mov ecx, dword [edx + 0x20]
cmp eax, ecx
je 0x59786f
mov bx, word [0x7d4ab0]
mov ebp, dword [eax]
cmp word [ebp + 0x14], bx
je 0x59786a
add eax, 4
cmp eax, ecx
jne 0x597859
jmp 0x59786f
cmp dword [eax], 0
jne 0x59788c
push 1
call fcn.005f43a0
mov edi, dword [0x7c67dc]
mov bx, word [0x7d4ab0]
mov edx, dword [0x7d1c28]
add esp, 4
test edi, edi
je 0x5978b7
mov eax, dword [edi + 0x2e4]
test eax, eax
je 0x5978b7
mov eax, dword [edx + 0x1c]
mov ecx, dword [edx + 0x20]
cmp eax, ecx
je 0x5978b7
mov edx, dword [eax]
cmp word [edx + 0x14], bx
je 0x597a53
add eax, 4
cmp eax, ecx
jne 0x5978a4
fild dword [edi + 0x78]
fmul dword [0x749938]
call sub.MSVCRT.dll__ftol
fild dword [edi + 0x7c]
mov ebx, eax
fmul dword [0x749938]
call sub.MSVCRT.dll__ftol
mov ecx, eax
mov eax, ebx
cdq
sub eax, edx
sar eax, 1
mov ebp, eax
mov eax, ecx
cdq
sub eax, edx
mov edi, eax
neg ebp
mov dword [esp + 0x68], ecx
sar edi, 1
push ebx
mov ecx, esi
mov dword [esp + 0x18], 1
call fcn.00581130
mov eax, dword [esp + 0x68]
push eax
mov ecx, esi
call fcn.00581210
mov eax, dword [esi + 0xdc]
cmp eax, ebp
je 0x597919
mov byte [esi + 0x78], 1
mov edx, dword [esi + 0x94]
mov ecx, ebp
sub ecx, eax
mov eax, dword [esi + 0xe0]
add edx, ecx
cmp eax, edi
mov dword [esi + 0x94], edx
mov dword [esi + 0xdc], ebp
je 0x59793f
mov byte [esi + 0x78], 1
mov ecx, dword [esi + 0x98]
mov edx, edi
sub edx, eax
push 1
add ecx, edx
push ebx
mov dword [esi + 0x98], ecx
push 0xffff807a
mov ecx, esi
mov dword [esi + 0xe0], edi
call fcn.00581f30
mov eax, dword [esp + 0x68]
push 1
push eax
push 0xffff807b
mov ecx, esi
call fcn.00581f30
push 1
push ebp
push 0xffff8078
mov ecx, esi
call fcn.00581f30
push 1
push edi
push 0xffff8079
mov ecx, esi
call fcn.00581f30
push 1
push ebx
push 0xffff807e
mov ecx, esi
call fcn.00581f30
mov ecx, dword [esp + 0x68]
push 1
push ecx
push 0xffff807f
mov ecx, esi
call fcn.00581f30
push 1
push ebp
push 0xffff807c
mov ecx, esi
call fcn.00581f30
push 1
push edi
push 0xffff807d
mov ecx, esi
call fcn.00581f30
push 0x10
mov eax, 0xffff80bd
push eax
push 0xffff8075
mov ecx, esi
call fcn.00581f30
push 0
push esi
mov byte [esp + 0x6c], 1
call fcn.00596fa0
add esp, 8
mov ax, word [esi + 0x14]
push eax
call fcn.005f65a0
add esp, 4
cmp eax, 0xffffffff
je 0x597c4a
cmp word [esp + 0x24], 0x80b4
jne 0x597c4a
mov eax, dword [esp + 0x14]
test eax, eax
jle 0x597c1e
push 0x10
mov eax, 0xffff80bd
push eax
push 0xffff8073
mov ecx, esi
call fcn.00581f30
push esi
push 0
push 0
push 0xffff8073
push esi
call fcn.005f6080
jmp 0x597c42
mov eax, dword [eax]
test eax, eax
je 0x5978b7
xor ecx, ecx
mov cx, word [0x7d4b02]
push ecx
mov ecx, eax
call fcn.00582de0
mov ecx, dword [esi + 0x28]
test ecx, ecx
mov edx, dword [0x7d4b60]
mov ebx, dword [0x7d4b5c]
mov ebp, dword [0x7d4b64]
mov edi, dword [0x7d4b68]
mov dword [esp + 0x68], edx
je 0x597aa4
cmp dword [esi + 0x104], 0xffff80cd
jne 0x597aa4
call fcn.0058a750
jmp 0x597aae
mov eax, dword [esi + 0x104]
test eax, eax
jl 0x597ab6
test eax, eax
je 0x597b44
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x597ad0
cmp dword [esi + 0x104], 0xffff80cd
jne 0x597ad0
call fcn.0058a750
jmp 0x597adf
mov eax, dword [esi + 0x104]
test eax, eax
jge 0x597adf
mov eax, 0x3fffffff
cmp eax, ebx
jg 0x597b44
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x597aff
cmp dword [esi + 0x104], 0xffff80cd
jne 0x597aff
call fcn.0058a750
mov ecx, eax
jmp 0x597b0e
mov ecx, dword [esi + 0x104]
test ecx, ecx
jge 0x597b0e
mov ecx, 0x3fffffff
mov eax, ebx
sub eax, ecx
mov ecx, dword [esi + 0x28]
cdq
sub eax, edx
sar eax, 1
add ebp, eax
test ecx, ecx
je 0x597b35
cmp dword [esi + 0x104], 0xffff80cd
jne 0x597b35
call fcn.0058a750
mov ebx, eax
jmp 0x597b44
mov ebx, dword [esi + 0x104]
test ebx, ebx
jge 0x597b44
mov ebx, 0x3fffffff
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x597b5e
cmp dword [esi + 0x108], 0xffff80cd
jne 0x597b5e
call fcn.0058a780
jmp 0x597b68
mov eax, dword [esi + 0x108]
test eax, eax
jl 0x597b70
test eax, eax
je 0x5978ef
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x597b8a
cmp dword [esi + 0x108], 0xffff80cd
jne 0x597b8a
call fcn.0058a780
jmp 0x597b99
mov eax, dword [esi + 0x108]
test eax, eax
jge 0x597b99
mov eax, 0x3fffffff
cmp eax, dword [esp + 0x68]
jg 0x5978ef
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x597bbf
cmp dword [esi + 0x108], 0xffff80cd
jne 0x597bbf
call fcn.0058a780
mov ecx, eax
jmp 0x597bce
mov ecx, dword [esi + 0x108]
test ecx, ecx
jge 0x597bce
mov ecx, 0x3fffffff
mov eax, dword [esp + 0x68]
sub eax, ecx
mov ecx, dword [esi + 0x28]
cdq
sub eax, edx
sar eax, 1
neg eax
add edi, eax
test ecx, ecx
je 0x597bfe
cmp dword [esi + 0x108], 0xffff80cd
jne 0x597bfe
call fcn.0058a780
mov dword [esp + 0x68], eax
jmp 0x5978ef
mov eax, dword [esi + 0x108]
test eax, eax
jl 0x597c11
mov dword [esp + 0x68], eax
jmp 0x5978ef
mov dword [esp + 0x68], 0x3fffffff
jmp 0x5978ef
push 0x10
mov eax, 0xffff80be
push eax
push 0xffff8073
mov ecx, esi
call fcn.00581f30
push esi
push 0
push 0
push 0xffff8073
push esi
call fcn.005f5df0
add esp, 0x14
mov byte [esp + 0x64], 1
mov eax, dword [0x7c67dc]
mov cl, byte [eax + 0xd5]
test cl, cl
jne 0x597c63
mov cl, byte [eax + 0xd6]
test cl, cl
je 0x597c96
push 0
push 0
push 0x10
push 0xffff8073
lea edx, [esp + 0x78]
push edx
mov ecx, esi
call fcn.00581440
cmp word [eax], 0x80be
jne 0x597c96
mov al, byte [esi + 0x76]
test al, al
je 0x597e0d
mov byte [esp + 0x64], 1
jmp 0x597e04
xor eax, eax
mov ax, word [esi + 0x14]
cmp ax, word [0x7d2ecc]
je 0x597e0d
mov ebx, dword [esp + 0x1c]
test ebx, ebx
sete bl
push eax
mov byte [esp + 0x6c], bl
call fcn.005f65a0
mov edi, dword [0x7c67dc]
add esp, 4
cmp eax, 0xffffffff
je 0x597d0b
test edi, edi
je 0x597d0b
mov eax, dword [edi + 0x2e4]
test eax, eax
je 0x597d0b
mov ecx, dword [0x7d1c28]
mov eax, dword [ecx + 0x1c]
mov ecx, dword [ecx + 0x20]
cmp eax, ecx
je 0x597d0b
mov dx, word [0x7d4f10]
mov ebp, dword [eax]
cmp word [ebp + 0x14], dx
je 0x597d00
add eax, 4
cmp eax, ecx
jne 0x597cef
jmp 0x597d0b
cmp dword [eax], 0
je 0x597d0b
xor bl, bl
mov byte [esp + 0x68], bl
mov eax, dword [esp + 0x14]
test eax, eax
je 0x597d2d
mov al, byte [edi + 0xd6]
test al, al
jne 0x597d2d
mov al, byte [edi + 0xd4]
test al, al
jne 0x597d2d
xor bl, bl
mov byte [esp + 0x68], bl
cmp byte [esi + 0x76], bl
je 0x597e0d
mov eax, dword [esp + 0x68]
push eax
mov ecx, esi
mov byte [esp + 0x68], 1
call fcn.0057f2a0
mov ecx, dword [0x7c67dc]
test ecx, ecx
mov ebp, dword [0x7d1c28]
je 0x597d85
mov eax, dword [ecx + 0x2e4]
test eax, eax
je 0x597d85
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x20]
cmp eax, edx
je 0x597d85
mov di, word [0x7d3988]
mov ebx, dword [eax]
cmp word [ebx + 0x14], di
je 0x597db4
add eax, 4
cmp eax, edx
jne 0x597d72
mov bl, byte [esp + 0x68]
xor eax, eax
cmp esi, eax
jne 0x597dbc
test bl, bl
je 0x597dbc
call fcn.0040ff20
mov ecx, dword [eax + 0x10]
shr ecx, 0xa
test cl, 1
jne 0x597e04
push esi
push 0
push 0
push 0xffff80c4
push esi
call fcn.005d1ad0
add esp, 0x14
jmp 0x597e0d
mov eax, dword [eax]
mov bl, byte [esp + 0x68]
jmp 0x597d87
test ecx, ecx
je 0x597dea
mov eax, dword [ecx + 0x2e4]
test eax, eax
je 0x597dea
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x20]
cmp eax, edx
je 0x597dea
mov di, word [0x7d431e]
mov ebp, dword [eax]
cmp word [ebp + 0x14], di
je 0x597e50
add eax, 4
cmp eax, edx
jne 0x597ddb
xor eax, eax
cmp esi, eax
jne 0x597e0d
test bl, bl
je 0x597e0d
call fcn.0040ff20
mov edx, dword [eax + 0x10]
shr edx, 0xa
test dl, 1
je 0x597e0d
push 0
mov ecx, esi
call fcn.0057f2a0
xor eax, eax
mov ax, word [0x7d49f6]
mov ecx, esi
push eax
call fcn.00582de0
xor ecx, ecx
mov cx, word [0x7d4a14]
mov edi, eax
push ecx
mov ecx, esi
call fcn.00582de0
test edi, edi
mov ebp, eax
je 0x597e88
test ebp, ebp
je 0x597e88
mov eax, dword [esp + 0x14]
test eax, eax
mov dl, byte [ebp + 0x76]
mov bl, byte [edi + 0x76]
mov byte [esp + 0x68], dl
jge 0x597e54
push 0
jmp 0x597e65
mov eax, dword [eax]
jmp 0x597dec
jne 0x597e63
push 0
mov ecx, edi
call fcn.0057f2a0
push 1
jmp 0x597e6e
push 1
mov ecx, edi
call fcn.0057f2a0
push 0
mov ecx, ebp
call fcn.0057f2a0
cmp bl, byte [edi + 0x76]
jne 0x597e83
mov al, byte [esp + 0x68]
cmp al, byte [ebp + 0x76]
je 0x597e88
mov byte [esp + 0x64], 1
mov bl, byte [esp + 0x13]
test bl, bl
pop ebp
jne 0x597e9a
push 1
mov ecx, esi
call fcn.00583b70
mov al, byte [esp + 0x60]
test al, al
je 0x597eb2
test bl, bl
je 0x597eb2
pop ebx
pop edi
mov eax, 1
pop esi
add esp, 0x50
ret
pop ebx
pop edi
xor eax, eax
pop esi
add esp, 0x50
ret