Function at 0x50138c
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
cmp dword [0x6812c8], 0
je 0x5013ab
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x501395
mov dword [0x6812c8], 1
push 0x80
push 0
lea eax, [ebp - 0x100]
push eax
call fcn.0054bf90
add esp, 0xc
mov dword [ebp - 0x210], 0
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x1d7c], 0
je 0x501554
lea edx, [ebp - 0x20c]
push edx
call fcn.00529440
add esp, 4
push str.MyExtSNFile.ini
lea eax, [ebp - 0x20c]
push eax
call fcn.0054bea0
add esp, 8
lea ecx, [ebp - 0x20c]
push ecx
push 0
push str.TotalCount
push 0x5c94c4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [ebp - 0x104], eax
lea edx, [ebp - 0x20c]
push edx
push 0
push 0x5c94cc
push 0x5c94d8
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [ebp - 0x108], eax
mov eax, dword [ebp - 0x108]
cmp eax, dword [ebp - 0x104]
jge 0x501538
mov ecx, dword [ebp - 0x108]
push ecx
push str.SN_d
lea edx, [ebp - 0x80]
push edx
call fcn.0054c6e3
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
push 0x80
lea ecx, [ebp - 0x100]
push ecx
push 0x685814
lea edx, [ebp - 0x80]
push edx
push 0x5c94e8
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x50151f
lea eax, [ebp - 0x100]
push eax
call fcn.0054ce70
add esp, 4
test eax, eax
je 0x50151f
lea ecx, [ebp - 0x100]
push ecx
mov edx, dword [ebp + 8]
add edx, 0x5190
push edx
call fcn.0054be90
add esp, 8
mov eax, dword [ebp - 0x108]
add eax, 1
mov dword [ebp - 0x108], eax
mov ecx, dword [ebp - 0x108]
push ecx
push 0x5c94f0
lea edx, [ebp - 0x100]
push edx
call fcn.0054c6e3
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x100]
push ecx
push str.CurrentIdx
push str.ExtSN
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov dword [ebp - 0x210], 1
jmp 0x501536
mov edx, dword [ebp + 8]
mov dword [edx + 0x67c4], 0x19
mov dword [ebp - 0x210], 0
jmp 0x50154f
mov eax, dword [ebp + 8]
mov dword [eax + 0x67c4], 0x19
mov dword [ebp - 0x210], 0
jmp 0x501678
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x59a0], 0
jne 0x501678
mov edx, dword [ebp + 8]
cmp dword [edx + 0x6458], 0
je 0x501678
push 0x678884
lea eax, [ebp - 0x250]
push eax
call fcn.0054be90
add esp, 8
push 0x678d58
lea ecx, [ebp - 0x250]
push ecx
call fcn.0054cf00
add esp, 8
test eax, eax
jg 0x501661
push 0x678f58
lea edx, [ebp - 0x250]
push edx
call fcn.005295ac
add esp, 8
push 0x678884
lea eax, [ebp - 0x250]
push eax
call fcn.0054cf00
add esp, 8
test eax, eax
jle 0x501619
push 0x678884
push 0x5ebf78
call fcn.0054be90
add esp, 8
push 0x678884
mov ecx, dword [ebp + 8]
add ecx, 0x5190
push ecx
call fcn.0054be90
add esp, 8
lea edx, [ebp - 0x250]
push edx
push 0x678884
call fcn.0054be90
add esp, 8
mov dword [ebp - 0x210], 1
jmp 0x50165f
push 0x678884
push 0x5ebf78
call fcn.0054be90
add esp, 8
push 0x678884
mov eax, dword [ebp + 8]
add eax, 0x5190
push eax
call fcn.0054be90
add esp, 8
lea ecx, [ebp - 0x250]
push ecx
push 0x678884
call fcn.0054be90
add esp, 8
mov dword [ebp - 0x210], 1
jmp 0x501678
mov edx, dword [ebp + 8]
mov dword [edx + 0x67c4], 0x17
mov dword [ebp - 0x210], 0
mov eax, dword [ebp + 8]
cmp dword [eax + 0x1d7c], 0
jne 0x5016a9
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x6458], 0
je 0x5016a9
mov edx, dword [ebp + 8]
cmp dword [edx + 0x59a0], 0
je 0x5016a9
mov eax, dword [ebp + 8]
mov dword [eax + 0x67c4], 0x17
mov dword [0x6812c8], 0
mov eax, dword [ebp - 0x210]
mov esp, ebp
pop ebp
ret