Function at 0x486620
Capabilities:
Read .ini file
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, ecx
cmp dword [esi], 0
push edi
jne 0x48663b
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp - 0x1c], ecx
fld dword [ebp - 0x1c]
fistp dword [ebp - 0x18]
mov edx, dword [esi + 0xa0]
mov ecx, dword [ebp - 0x18]
mov eax, dword [eax + 4]
shl edx, 0xd
sub ecx, edx
sub ecx, 0x1000
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], eax
fld dword [ebp - 0x1c]
fistp dword [ebp - 0x14]
mov eax, dword [esi + 0xa4]
mov edx, dword [ebp - 0x14]
mov edi, eax
shl edi, 0xd
sub edx, edi
mov edi, dword [esi + 0xa0]
sub edx, 0x1000
cmp edi, 0x7fffffff
mov dword [ebp - 0x1c], edx
je 0x48669a
cmp eax, 0x7fffffff
jne 0x4866a7
mov ecx, DirectSoundCreate
mov edx, ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], edx
mov eax, dword [esi + 0xac]
test eax, eax
jne 0x486821
mov al, byte [esi + 0xb530]
test al, al
je 0x486821
xor eax, eax
cmp ecx, 0xfffff800
mov byte [0x7c9c90], 0
jge 0x4866db
mov eax, 4
jmp 0x4866e8
cmp ecx, 0x800
jle 0x4866e8
mov eax, 8
cmp edx, 0xfffff800
jge 0x4866f5
or eax, 1
jmp 0x486700
cmp edx, 0x800
jle 0x486700
or eax, 2
test eax, eax
je 0x486821
mov ecx, eax
mov edx, eax
mov ebx, eax
and ecx, 4
and edx, 8
xor edi, edi
and ebx, 1
and eax, 2
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x10], eax
jmp 0x48672a
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x486765
test ebx, ebx
je 0x486748
test edi, edi
jne 0x48673f
or byte [0x7c9c90], 0x10
jmp 0x486748
push 0x10
mov ecx, esi
call fcn.0048f180
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x486765
test edi, edi
jne 0x48675c
or byte [0x7c9c90], 0x20
jmp 0x486765
push 0x20
mov ecx, esi
call fcn.0048f180
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x4867a6
test ebx, ebx
je 0x486786
test edi, edi
jne 0x48677d
or byte [0x7c9c90], 0x40
jmp 0x486786
push 0x40
mov ecx, esi
call fcn.0048f180
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4867a6
test edi, edi
jne 0x48679a
or byte [0x7c9c90], 0x80
jmp 0x4867a6
push 0x80
mov ecx, esi
call fcn.0048f180
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4867c3
test edi, edi
jne 0x4867ba
or byte [0x7c9c90], 4
jmp 0x4867c3
push 4
mov ecx, esi
call fcn.0048f180
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x4867e0
test edi, edi
jne 0x4867d7
or byte [0x7c9c90], 8
jmp 0x4867e0
push 8
mov ecx, esi
call fcn.0048f180
test ebx, ebx
je 0x4867fa
test edi, edi
jne 0x4867f1
or byte [0x7c9c90], 1
jmp 0x4867fa
push 1
mov ecx, esi
call fcn.0048f180
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x486817
test edi, edi
jne 0x48680e
or byte [0x7c9c90], 2
jmp 0x486817
push 2
mov ecx, esi
call fcn.0048f180
inc edi
cmp edi, 2
jl 0x486727
mov eax, dword [ebp - 0x18]
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x1c]
fild dword [ebp - 0x18]
fld dword [0x747860]
cdq
xor eax, edx
fsub st(1)
sub eax, edx
mov dword [ebp - 0x1c], eax
fstp dword [esi + 0xb528]
fild dword [ebp - 0x1c]
fstp dword [ebp - 0x1c]
fld dword [0x747860]
fsub dword [ebp - 0x1c]
fstp dword [esi + 0xb52c]
fcomp dword [0x747860]
fnstsw ax
test ah, 1
je 0x486897
fld dword [ebp - 0x1c]
fcomp dword [0x747860]
fnstsw ax
test ah, 1
je 0x486897
mov al, byte [0x7c9bcc]
test al, al
je 0x48688c
push 0
mov ecx, esi
call fcn.00488950
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov byte [esi + 0xb530], 1
mov ecx, dword [0x7c67dc]
push 0
call fcn.004119c0
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [esi + 0xb520], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp + 8], ecx
fld dword [ebp + 8]
fistp dword [ebp - 0x1c]
mov edx, dword [ebp - 0x1c]
mov eax, dword [eax + 4]
sar edx, 0xd
mov dword [ebp - 4], edx
mov dword [ebp + 8], eax
fld dword [ebp + 8]
fistp dword [ebp - 0x1c]
mov bx, word [esi + 0xa0]
mov di, word [esi + 0xa4]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [esi + 0xac]
sar eax, 0xd
test ecx, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], edi
je 0x486915
mov ecx, dword [ebp - 4]
mov dword [esi + 0xa0], ecx
mov dword [esi + 0xa4], eax
jmp 0x4869a8
push 0
push 1
mov ecx, esi
call fcn.0048f5f0
mov eax, dword [esi + 0xa0]
mov ecx, dword [ebp - 4]
cmp ecx, eax
jle 0x48693e
push 4
mov ecx, esi
call fcn.004872a0
mov edx, dword [ebp - 4]
push edx
push 8
jmp 0x48694f
jge 0x48695d
push 8
mov ecx, esi
call fcn.004872a0
mov eax, dword [ebp - 4]
push eax
push 4
mov ecx, esi
call fcn.004873d0
mov byte [esi + 0xa8], 1
mov eax, dword [esi + 0xa4]
mov ecx, dword [ebp - 8]
cmp ecx, eax
jle 0x48697b
push 1
mov ecx, esi
call fcn.004872a0
mov ecx, dword [ebp - 8]
push ecx
push 2
jmp 0x48698c
jge 0x48699a
push 2
mov ecx, esi
call fcn.004872a0
mov edx, dword [ebp - 8]
push edx
push 1
mov ecx, esi
call fcn.004873d0
mov byte [esi + 0xa8], 1
mov byte [0x7c9a88], 0
mov byte [esi + 0xb50c], 1
mov ecx, esi
call fcn.0048e150
push 1
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 4]
push ecx
push 2
mov ecx, esi
call fcn.004901f0
test al, al
je 0x486a6d
push str..Morrowind.ini
push 0
push str.DontThreadLoad
push str.General
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
cmp eax, 1
je 0x486a62
mov ecx, dword [esi + 0xb538]
push str.TES::Resume_Thread
call fcn.00693f00
mov al, byte [esi + 0xb511]
test al, al
jne 0x486a50
mov edx, dword [0x7c9b30]
mov eax, dword [esi + 0xb504]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov ecx, dword [esi + 0xb504]
push ecx
push str.Resuming_Background_Thread__d_n
call fcn.006e9a00
add esp, 8
mov byte [esi + 0xb518], 0
mov byte [esi + 0xb511], 1
mov ecx, dword [esi + 0xb538]
call fcn.00693f10
mov edx, dword [esi + 0xb504]
push edx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x486a5b
mov ecx, dword [esi + 0xb538]
call fcn.00693f10
mov byte [esi + 0xb50c], 1
push 0
push 0
mov ecx, esi
call fcn.0048f5f0
push 0
mov ecx, esi
call fcn.00488950
mov ecx, esi
call fcn.0048d930
mov eax, dword [esi + 0xa4]
mov ecx, dword [esi + 0xa0]
push eax
push ecx
mov ecx, dword [esi + 0xb4ec]
call fcn.0051ba20
mov eax, dword [esi + 0xac]
test eax, eax
mov edx, dword [0x7c67dc]
jne 0x486f35
mov eax, dword [edx + 0xc0]
fld dword [eax + 0x34]
fcomp dword [0x746468]
fnstsw ax
test ah, 0x40
jne 0x486f35
mov eax, dword [esi + 0xa0]
movsx ecx, bx
mov ebx, dword [esi + 0xa4]
sub eax, ecx
movsx ecx, di
sub ebx, ecx
cmp eax, 1
mov dword [ebp + 8], eax
jg 0x486f29
cmp eax, 0xffffffff
jl 0x486f29
cmp ebx, 1
jg 0x486f29
cmp ebx, 0xffffffff
jl 0x486f29
mov ecx, dword [edx + 0x2e0]
xor edi, edi
call fcn.00420db0
mov ecx, dword [ebp + 8]
mov edx, dword [0x7c67dc]
push ecx
mov ecx, dword [edx + 0x2e0]
neg ebx
push ebx
call fcn.0041e100
movsx eax, word [ebp - 0xc]
cmp dword [esi + 0xa0], eax
jle 0x486c36
mov dword [ebp + 8], 0
lea ebx, [esi + 0x1c]
mov dword [ebp - 0x1c], 8
push 0
push 0
sub esp, 0xc
mov ecx, esp
push 0x7de6cc
call fcn.0040a7e0
mov ecx, dword [ebx]
call fcn.0050fba0
mov ecx, dword [ebp + 8]
push eax
mov eax, 2
sub eax, ecx
mov ecx, dword [0x7c67dc]
mov ecx, dword [ecx + 0x2e0]
push 2
push eax
call fcn.0041fea0
mov edx, dword [ebx]
mov eax, dword [edx + 4]
push eax
mov ecx, esi
call fcn.00484e50
mov ecx, dword [ebp - 0x1c]
mov edx, 1
shl edx, cl
sub ecx, 3
add ebx, 4
mov dword [ebp - 0x1c], ecx
or edi, edx
mov edx, dword [ebp + 8]
inc edx
cmp ecx, 0xffffffff
mov dword [ebp + 8], edx
jg 0x486b47
lea eax, [esi + 0x10]
mov dword [ebp + 8], 0
mov dword [ebp - 0x14], eax
mov ebx, 7
push 0
push 0
sub esp, 0xc
mov ecx, esp
push 0x7de6cc
call fcn.0040a7e0
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx]
call fcn.0050fba0
push eax
mov eax, dword [ebp + 8]
mov edx, 2
sub edx, eax
mov eax, dword [0x7c67dc]
mov ecx, dword [eax + 0x2e0]
push 1
push edx
call fcn.0041fea0
mov eax, dword [ebp + 8]
mov ecx, ebx
mov edx, 1
shl edx, cl
sub ebx, 3
or edi, edx
mov edx, dword [ebp - 0x14]
inc eax
add edx, 4
cmp ebx, 0xfffffffe
mov dword [ebp + 8], eax
mov dword [ebp - 0x14], edx
jg 0x486bc0
mov eax, dword [ebp - 0xc]
mov ecx, dword [esi + 0xa0]
inc eax
mov dword [ebp - 0xc], eax
movsx eax, ax
cmp ecx, eax
jg 0x486b36
movsx ecx, word [ebp - 0xc]
cmp dword [esi + 0xa0], ecx
jge 0x486d46
mov dword [ebp + 8], 0
mov dword [ebp - 0x1c], 6
lea ebx, [esi + 4]
push 0
push 0
sub esp, 0xc
mov ecx, esp
push 0x7de6cc
call fcn.0040a7e0
mov ecx, dword [ebx]
call fcn.0050fba0
push eax
mov eax, dword [ebp + 8]
mov edx, 2
sub edx, eax
mov eax, dword [0x7c67dc]
mov ecx, dword [eax + 0x2e0]
push 0
push edx
call fcn.0041fea0
mov ecx, dword [ebx]
mov edx, dword [ecx + 4]
push edx
mov ecx, esi
call fcn.00484e50
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp + 8]
mov eax, 1
shl eax, cl
sub ecx, 3
add ebx, 4
mov dword [ebp - 0x1c], ecx
or edi, eax
inc edx
cmp ecx, 0xfffffffd
mov dword [ebp + 8], edx
jg 0x486c57
lea ecx, [esi + 0x10]
mov dword [ebp + 8], 0
mov dword [ebp - 0x14], ecx
mov ebx, 7
push 0
push 0
sub esp, 0xc
mov ecx, esp
push 0x7de6cc
call fcn.0040a7e0
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx]
call fcn.0050fba0
mov edx, dword [ebp + 8]
mov ecx, dword [0x7c67dc]
mov ecx, dword [ecx + 0x2e0]
push eax
mov eax, 2
push 1
sub eax, edx
push eax
call fcn.0041fea0
mov eax, dword [ebp + 8]
mov ecx, ebx
mov edx, 1
shl edx, cl
sub ebx, 3
or edi, edx
mov edx, dword [ebp - 0x14]
inc eax
add edx, 4
cmp ebx, 0xfffffffe
mov dword [ebp + 8], eax
mov dword [ebp - 0x14], edx
jg 0x486ccf
mov eax, dword [ebp - 0xc]
mov ecx, dword [esi + 0xa0]
dec eax
mov dword [ebp - 0xc], eax
movsx eax, ax
cmp ecx, eax
jl 0x486c46
movsx eax, word [ebp - 0x10]
cmp dword [esi + 0xa4], eax
jle 0x486e1a
lea ecx, [esi + 0xc]
xor ebx, ebx
mov dword [ebp + 8], ecx
push 0
push 0
sub esp, 0xc
mov ecx, esp
push 0x7de6cc
call fcn.0040a7e0
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
call fcn.0050fba0
push eax
mov eax, dword [0x7c67dc]
mov ecx, dword [eax + 0x2e0]
push ebx
push 0
call fcn.0041fea0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push eax
mov ecx, esi
call fcn.00484e50
mov ecx, ebx
mov edx, 1
shl edx, cl
add dword [ebp + 8], 0xc
or edi, edx
inc ebx
cmp ebx, 3
jl 0x486d5e
lea eax, [esi + 8]
xor ebx, ebx
mov dword [ebp + 8], eax
push 0
push 0
sub esp, 0xc
mov ecx, esp
push 0x7de6cc
call fcn.0040a7e0
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
call fcn.0050fba0
mov edx, dword [0x7c67dc]
mov ecx, dword [edx + 0x2e0]
push eax
push ebx
push 1
call fcn.0041fea0
lea ecx, [ebx + 3]
mov eax, 1
shl eax, cl
add dword [ebp + 8], 0xc
or edi, eax
inc ebx
cmp ebx, 3
jl 0x486dbc
mov eax, dword [ebp - 0x10]
inc eax
movsx ecx, ax
mov dword [ebp - 0x10], eax
cmp dword [esi + 0xa4], ecx
jg 0x486d56
movsx edx, word [ebp - 0x10]
cmp dword [esi + 0xa4], edx
jge 0x486ef1
lea eax, [esi + 4]
xor ebx, ebx
mov dword [ebp + 8], eax
push 0
push 0
sub esp, 0xc
mov ecx, esp
push 0x7de6cc
call fcn.0040a7e0
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
call fcn.0050fba0
mov edx, dword [0x7c67dc]
mov ecx, dword [edx + 0x2e0]
push eax
push ebx
push 2
call fcn.0041fea0
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push edx
mov ecx, esi
call fcn.00484e50
lea ecx, [ebx + 6]
mov eax, 1
shl eax, cl
add dword [ebp + 8], 0xc
or edi, eax
inc ebx
cmp ebx, 3
jl 0x486e32
lea ecx, [esi + 8]
xor ebx, ebx
mov dword [ebp + 8], ecx
push 0
push 0
sub esp, 0xc
mov ecx, esp
push 0x7de6cc
call fcn.0040a7e0
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
call fcn.0050fba0
push eax
mov eax, dword [0x7c67dc]
mov ecx, dword [eax + 0x2e0]
push ebx
push 1
call fcn.0041fea0
lea ecx, [ebx + 3]
mov edx, 1
shl edx, cl
add dword [ebp + 8], 0xc
or edi, edx
inc ebx
cmp ebx, 3
jl 0x486e92
mov eax, dword [ebp - 0x10]
mov ecx, dword [esi + 0xa4]
dec eax
mov dword [ebp - 0x10], eax
movsx eax, ax
cmp ecx, eax
jl 0x486e2a
mov ecx, dword [0x7c67dc]
mov ecx, dword [ecx + 0x2e0]
push edi
call fcn.004214f0
mov edx, dword [0x7c67dc]
mov ecx, dword [edx + 0x2e0]
call fcn.00421100
mov eax, dword [0x7c67dc]
mov ecx, dword [eax + 0x2e0]
call fcn.00420400
jmp 0x486fbc
mov ecx, esi
call fcn.00485490
jmp 0x486fbc
mov ecx, dword [edx + 0xc0]
fld dword [ecx + 0x34]
fcomp dword [0x746468]
fnstsw ax
test ah, 0x40
jne 0x486fbc
mov al, byte [esi + 0xa8]
test al, al
je 0x486fbc
mov ecx, dword [edx + 0x2e0]
call fcn.00420db0
mov edx, dword [esi + 0xac]
mov eax, dword [0x7c67dc]
mov ecx, dword [eax + 0x2e0]
push edx
call fcn.0041f680
mov ecx, dword [0x7c67dc]
mov ecx, dword [ecx + 0x2e0]
push 0xffff
call fcn.004214f0
mov edx, dword [0x7c67dc]
mov ecx, dword [edx + 0x2e0]
call fcn.00421100
mov eax, dword [0x7c67dc]
mov ecx, dword [eax + 0x2e0]
call fcn.00420400
mov ecx, dword [esi + 0xac]
push ecx
mov ecx, esi
call fcn.00484e50
mov ecx, esi
call fcn.00485c50
mov ecx, dword [esi]
call fcn.004b8940
call dword [sym.imp.WINMM.dll_timeGetTime]
sub eax, dword [esi + 0xb520]
pop edi
mov dword [esi + 0xb520], eax
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 4