Function at 0x461b90
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a9640
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xda8
mov eax, dword [0x4e5bb8]
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov ecx, dword [0x4e6178]
push eax
push 2
push str.WriteScriptSectorNum
push ecx
mov dword [ebp - 0x64], ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
lea esi, [ebx + 0x124]
push str.H27UCG8T2MYR
mov ecx, esi
mov byte [ebp - 0x11], al
call sub.MFC42.DLL_CString::Find_1
cmp eax, 0xffffffff
jne 0x461c42
push str.H27UBG8T2BTR
mov ecx, esi
call sub.MFC42.DLL_CString::Find_1
cmp eax, 0xffffffff
jne 0x461c42
push str.H27UCG8T2ATR
mov ecx, esi
call sub.MFC42.DLL_CString::Find_1
cmp eax, 0xffffffff
jne 0x461c42
push str.H27UBG8T2CTR
mov ecx, esi
call sub.MFC42.DLL_CString::Find_1
cmp eax, 0xffffffff
jne 0x461c42
push str.H27UCG8T2BYR
mov ecx, esi
call sub.MFC42.DLL_CString::Find_1
cmp eax, 0xffffffff
jne 0x461c42
push str.H27UCG8T2BLR
mov ecx, esi
call sub.MFC42.DLL_CString::Find_1
cmp eax, 0xffffffff
je 0x461c54
mov al, byte [ebp - 0x11]
cmp al, 0xa
jbe 0x461c4e
mov byte [ebp - 0x11], al
jmp 0x461c57
mov byte [ebp - 0x11], 0xa
jmp 0x461c67
mov al, byte [ebp - 0x11]
cmp al, 0x10
ja 0x462364
cmp al, 1
jb 0x462364
mov ecx, 0x10
or eax, 0xffffffff
lea edi, [ebp - 0xa4]
mov dx, word [ebx + 0x148]
rep stosd dword es:[edi], eax
mov ax, word [ebx + 0x14a]
lea ecx, [ebp - 0xdb4]
mov word [ebp - 0x60], ax
mov al, byte [ebx + 0xa0]
inc al
mov word [ebp - 0x54], dx
imul byte [ebx + 0x14c]
mov byte [ebp - 0x40], al
mov ax, word [ebx + 0x26]
mov edx, dword [ebx]
push eax
lea eax, [ebp - 0x13]
push ecx
push eax
lea ecx, [ebp - 0x1f]
lea eax, [ebp - 0x1e]
push ecx
push eax
mov ecx, ebx
call dword [edx + 0xc]
mov cl, byte [ebx + 0xa0]
test cl, cl
setne al
inc eax
imul byte [ebx + 0x14c]
mov byte [ebp - 0x24], al
mov al, byte [ebx + 0x24]
cmp al, 0x92
je 0x461cea
cmp al, 0x90
je 0x461cea
cmp al, 0x96
je 0x461cea
test byte [ebx + 0x110], 8
je 0x461cfb
test cl, cl
jne 0x461cf8
mov eax, dword [ebx + 0x130]
test eax, eax
je 0x461cfb
shr byte [ebp - 0x24], 1
test byte [ebx + 0x110], 2
mov al, byte [ebp - 0x13]
je 0x461d0c
shl al, 1
mov byte [ebp - 0x13], al
cmp byte [ebp - 0x24], al
jb 0x461d14
mov byte [ebp - 0x24], al
mov dl, byte [ebp - 0x11]
xor al, al
mov byte [ebp - 0x18], al
mov byte [ebp - 0x12], al
cmp byte [ebp - 0x12], 3
jae 0x46234b
cmp al, dl
je 0x46234b
xor cl, cl
mov byte [ebp - 0x1c], cl
cmp cl, byte [ebp - 0x1e]
jae 0x462343
cmp al, dl
je 0x462343
cmp cl, byte [ebx + 0x34]
jae 0x46232d
mov byte [ebp - 0x34], 0
mov cl, byte [ebp - 0x34]
mov al, byte [ebp - 0x1f]
cmp cl, al
jae 0x46232d
mov dl, byte [ebp - 0x11]
mov al, byte [ebp - 0x18]
cmp al, dl
je 0x46232d
mov eax, dword [ebp - 0x34]
xor esi, esi
mov si, word [ebx + 0x14a]
and eax, 0xff
xor edx, edx
mov edi, dword [ebp - 0x60]
mov ecx, dword [ebp + eax*4 - 0xdb4]
and edi, 0xffff
mov eax, ecx
div esi
xor edx, edx
mov esi, eax
mov eax, ecx
div edi
push esi
mov ecx, ebx
mov edi, edx
mov dword [ebp - 0x30], edi
call fcn.0043b2f0
cmp ax, 0xffff
mov dword [ebp - 0x3c], eax
je 0x4622f4
cmp byte [ebx + 0x152], 0xa3
jne 0x461ddf
mov ecx, edi
and ecx, 0xffff
and ecx, 0x80000003
jns 0x461dd7
dec ecx
or ecx, 0xfffffffc
inc ecx
jne 0x4622f4
jmp 0x461e2e
cmp di, word [ebx + 0x148]
jae 0x4622f4
push edi
mov ecx, ebx
call fcn.0044d1c0
test eax, eax
jne 0x4622f4
cmp byte [ebx + 0x152], 0xc
jne 0x461e2e
push 0
push edi
mov ecx, ebx
call fcn.00479e80
cmp al, 1
jb 0x461e2e
mov edx, edi
and edx, 0xffff
and edx, 0x80000001
jns 0x461e28
dec edx
or edx, 0xfffffffe
inc edx
je 0x4622f4
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebx + 0x16c]
and ecx, 0xff
mov eax, dword [ebp - 0x3c]
imul edx, ecx
and eax, 0xffff
mov dword [ebp - 0x28], eax
add edx, eax
mov eax, dword [ebp + 0xc]
cmp byte [edx + eax], 0xf0
jae 0x4622f4
lea esi, [ebx + 0x124]
push str.H27UCG8T2MYR
mov ecx, esi
call sub.MFC42.DLL_CString::Find_1
cmp eax, 0xffffffff
jne 0x461ec6
push str.H27UBG8T2BTR
mov ecx, esi
call sub.MFC42.DLL_CString::Find_1
cmp eax, 0xffffffff
jne 0x461ec6
push str.H27UCG8T2ATR
mov ecx, esi
call sub.MFC42.DLL_CString::Find_1
cmp eax, 0xffffffff
jne 0x461ec6
push str.H27UBG8T2CTR
mov ecx, esi
call sub.MFC42.DLL_CString::Find_1
cmp eax, 0xffffffff
jne 0x461ec6
push str.H27UCG8T2BYR
mov ecx, esi
call sub.MFC42.DLL_CString::Find_1
cmp eax, 0xffffffff
jne 0x461ec6
push str.H27UCG8T2BLR
mov ecx, esi
call sub.MFC42.DLL_CString::Find_1
cmp eax, 0xffffffff
je 0x461edf
mov al, byte [ebp - 0x12]
test al, al
jne 0x461edf
push 0
push edi
mov ecx, ebx
call fcn.00479e80
test al, al
jne 0x4622f4
lea ecx, [ebp - 0x1d]
lea edx, [ebp - 0x2c]
push ecx
mov ecx, dword [ebp - 0x3c]
lea eax, [ebp - 0x38]
push edx
mov edx, dword [ebp - 0x1c]
push eax
push ecx
push edx
mov ecx, ebx
call fcn.0043dfd0
cmp byte [ebp - 0x12], 1
ja 0x461f9e
mov al, byte [ebp - 0x1d]
test al, al
jne 0x4622f4
test di, di
je 0x461f21
cmp byte [ebx + 0x12e], 2
je 0x4622f4
mov ecx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x38]
and ecx, 0xffff
mov eax, esi
mov edx, ecx
and eax, 0xff
shr edx, 3
mov edi, dword [ebx + eax*4 + 0x19c]
and ecx, 0x80000007
jns 0x461f4d
dec ecx
or ecx, 0xfffffff8
inc ecx
mov eax, 1
shl eax, cl
test byte [edi + edx], al
jne 0x4622f4
mov al, byte [ebx + 0xf2]
test al, 4
jne 0x461f6b
cmp al, 2
jne 0x461fa1
mov ecx, dword [ebp - 0x54]
xor eax, eax
test cx, cx
jbe 0x461f91
mov edx, eax
and edx, 0xffff
mov dx, word [ebx + edx*2 + 0x3f8]
cmp dx, word [ebp - 0x30]
je 0x461fa1
inc eax
cmp ax, cx
jb 0x461f75
mov al, byte [ebp - 0x12]
test al, al
je 0x4622f4
jmp 0x461fa1
mov esi, dword [ebp - 0x38]
mov cl, byte [ebp - 0x18]
xor al, al
test cl, cl
mov byte [ebp - 0x48], al
jbe 0x461fe3
mov ecx, dword [ebp - 0x2c]
and esi, 0xff
shl esi, 0xa
and ecx, 0xffff
add esi, ecx
mov ecx, dword [ebp - 0x48]
and ecx, 0xff
cmp dword [ebp + ecx*4 - 0xa4], esi
je 0x4622f4
mov cl, byte [ebp - 0x18]
inc al
cmp al, cl
mov byte [ebp - 0x48], al
jb 0x461fc1
lea edx, [ebp - 0x9b4]
mov ecx, ebx
push edx
mov dword [ebp - 4], 0
call fcn.0045c9f0
mov al, byte [ebp - 0x1c]
mov ecx, dword [ebp - 0x28]
mov dl, byte [ebx + 0x192]
mov byte [ebp - 0x9b4], al
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x9b0], ecx
and eax, 0xffff
mov byte [ebp - 0x9ac], dl
mov byte [ebp + eax - 0x228], 0
lea esi, [ebp + eax*4 - 0x9a8]
mov byte [ebp + eax - 0x3a8], 2
mov byte [ebp - 0xa8], 1
mov eax, dword [esi]
mov dword [ebp - 0x28], esi
test eax, eax
jne 0x46205b
mov eax, dword [ebp - 0x40]
and eax, 0xff
shl eax, 9
push eax
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esi], eax
mov dl, byte [ebp - 0x40]
xor al, al
mov byte [ebp - 0x44], al
cmp al, dl
jae 0x46208b
mov edi, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x28]
and edi, 0xff
mov esi, dword [ecx]
mov ecx, 0x80
shl edi, 9
add edi, esi
mov esi, dword [ebp + 8]
inc al
rep movsd dword es:[edi], dword [esi]
mov byte [ebp - 0x44], al
jmp 0x462063
mov edx, dword [ebp - 0x30]
push 0
push edx
mov ecx, ebx
call fcn.00479e80
mov ecx, ebx
call fcn.00435fc0
mov dword [ebp - 0x4c], eax
xor edi, edi
cmp di, word [ebp - 0x4c]
mov dword [ebp - 0x28], edi
jae 0x46219d
mov cx, word [ebx + 0x34b0]
mov eax, edi
and eax, 0xffff
lea edx, [ebx + 0x34b2]
push ecx
push edx
mov si, word [ebx + eax*2 + 0x3f8]
mov ecx, ebx
push esi
call fcn.00479e30
mov cl, byte [ebp - 0x1c]
mov edx, dword [ebp - 0x3c]
mov byte [ebp - 0x9b4], cl
mov cl, byte [ebx + 0x192]
and edx, 0xffff
cmp si, word [ebp - 0x30]
mov dword [ebp - 0x9b0], edx
mov byte [ebp - 0x9ac], cl
je 0x462197
cmp ax, 0xffff
je 0x462115
mov eax, dword [ebx + 0x5844]
test eax, eax
jne 0x46211f
mov eax, dword [ebx + 0x5844]
test eax, eax
jne 0x462197
and esi, 0xffff
lea edi, [ebp + esi*4 - 0x9a8]
mov byte [ebp + esi - 0x228], 0
mov byte [ebp + esi - 0x3a8], 1
cmp dword [edi], 0
jne 0x46215b
mov edx, dword [ebp - 0x9ac]
and edx, 0xff
shl edx, 9
push edx
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [edi], eax
mov ecx, dword [ebp - 0x9ac]
and ecx, 0xff
shl ecx, 9
and esi, 0x800000ff
jns 0x46217a
dec esi
or esi, 0xffffff00
inc esi
mov eax, dword [0x4e601c]
mov edi, dword [edi]
shl esi, 0xc
add esi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x28]
inc edi
jmp 0x4620a4
mov al, byte [ebp - 0x12]
xor edi, edi
test al, al
jne 0x4621f1
test byte [ebx + 0xf2], 8
je 0x4621cd
mov cl, byte [ebp - 0x24]
mov di, word [ebx + 0xf4]
mov eax, 1
shl eax, cl
dec eax
and di, ax
neg di
sbb edi, edi
neg edi
jmp 0x4621d2
mov edi, 1
mov eax, dword [ebx + 0x110]
test ah, 0x10
jne 0x4621f1
mov cl, byte [ebx + 0x2a98]
push ecx
mov ecx, ebx
call fcn.004498f0
cmp al, 0x18
jb 0x4621f1
xor edi, edi
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 0x14]
push edx
lea ecx, [ebp - 0x9b4]
push eax
push ecx
mov ecx, ebx
mov byte [ebp - 0x14], 0
call fcn.00462c00
test al, al
jne 0x4622fc
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x38]
and eax, 0xffff
and edx, 0xff
mov ecx, eax
and eax, 7
mov edx, dword [ebx + edx*4 + 0x19c]
mov al, byte [eax + 0x4c1a1c]
shr ecx, 3
add ecx, edx
mov dl, byte [ecx]
or dl, al
mov eax, dword [ebp - 0x18]
and eax, 0xff
mov byte [ecx], dl
mov dl, byte [ebp - 0x1c]
inc word [ebx + 0x39e]
lea ecx, [eax + eax*4]
lea esi, [ebx + ecx*4]
mov cx, word [ebp - 0x3c]
mov byte [esi + 0x6f8], dl
mov dx, word [ebp - 0x30]
mov word [esi + 0x6fa], cx
mov cl, byte [ebp - 0x14]
mov word [esi + 0x6fc], dx
mov edx, dword [ebp - 0x38]
mov byte [esi + 0x6fe], cl
mov cx, word [ebp - 0x2c]
mov byte [esi + 0x6ff], dl
mov word [esi + 0x700], cx
lea ecx, [eax + eax*4 + 0x1c2]
mov esi, dword [ebp + 8]
and edx, 0xff
mov dword [ebx + ecx*4], edi
mov ecx, eax
shl ecx, 9
shl edx, 0xa
lea edi, [ecx + ebx + 0xa98]
mov ecx, 0x80
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x2c]
and ecx, 0xffff
add edx, ecx
mov dword [ebp + eax*4 - 0xa4], edx
mov al, byte [ebp - 0x18]
inc al
mov byte [ebp - 0x18], al
lea eax, [ebp - 0x9b4]
mov ecx, ebx
push eax
call fcn.0045ca30
mov cl, byte [ebp - 0x11]
mov al, byte [ebp - 0x18]
cmp al, cl
mov dword [ebp - 4], 0xffffffff
je 0x46232d
inc byte [ebp - 0x34]
jmp 0x461d54
test edi, edi
je 0x4622d5
lea edx, [ebp - 0x5c]
push 0x4d8340
push edx
mov dword [ebp - 0x5c], 0x40f00
call sub.MSVCRT.dll__CxxThrowException
mov ecx, dword [ebp - 0x64]
lea edx, [ebp - 0x9b4]
push edx
call fcn.0045ca30
push 0
push 0
call sub.MSVCRT.dll__CxxThrowException
mov al, byte [ebp - 0x1c]
mov dl, byte [ebp - 0x11]
inc al
mov byte [ebp - 0x1c], al
mov al, byte [ebp - 0x18]
mov cl, byte [ebp - 0x1c]
jmp 0x461d36
inc byte [ebp - 0x12]
jmp 0x461d1f
test al, al
jne 0x462379
lea eax, [ebp - 0x50]
push 0x4d8340
push eax
mov dword [ebp - 0x50], 0x40f00
call sub.MSVCRT.dll__CxxThrowException
lea ecx, [ebp - 0x58]
push 0x4d8340
push ecx
mov dword [ebp - 0x58], 0x41200
call sub.MSVCRT.dll__CxxThrowException
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8