Function at 0x417830
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x57a040]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 0x18]
movzx ebx, byte [ebp - 0x16]
movzx ecx, word [ebp - 0xe]
shl eax, 8
or ebx, eax
movzx eax, byte [ebp - 0x12]
shl ebx, 8
or ebx, eax
movzx eax, word [ebp - 0x10]
shl eax, 0x10
or eax, ecx
mov dword [ebp - 0x2c], ebx
cdq
mov dword [ebp - 0x3c], eax
mov esi, edx
push str..DataGameServerInfo___Event.dat
mov eax, ebx
push 0
cdq
or esi, eax
push str.CastleSiegeEvent
mov dword [ebp - 0x38], esi
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push str.GameServerInfo
call esi
push str..DataGameServerInfo___Event.dat
push 0
push str.CastleSiegeCycleStartYear
push str.GameServerInfo
mov dword [0x5d8f90], eax
call esi
push str..DataGameServerInfo___Event.dat
push 0
push str.CastleSiegeCycleStartMonth
push str.GameServerInfo
mov word [0x5d8fc8], ax
call esi
push str..DataGameServerInfo___Event.dat
push 0
push str.CastleSiegeCycleStartDay
push str.GameServerInfo
mov word [0x5d8fca], ax
call esi
push str..DataGameServerInfo___Event.dat
push 0
push str.CastleSiegeSpecificState
push str.GameServerInfo
mov word [0x5d8fce], ax
call esi
push str..DataGameServerInfo___Event.dat
push 0
push str.CastleSiegeStateStartYear
push str.GameServerInfo
mov dword [0x5d8fd8], eax
call esi
push str..DataGameServerInfo___Event.dat
push 0
push str.CastleSiegeStateStartMonth
push str.GameServerInfo
mov word [0x5d8fe0], ax
call esi
push str..DataGameServerInfo___Event.dat
push 0
push str.CastleSiegeStateStartDay
push str.GameServerInfo
mov word [0x5d8fe2], ax
call esi
push str..DataGameServerInfo___Event.dat
push 0
push str.CastleSiegeStateStartHour
push str.GameServerInfo
mov word [0x5d8fe6], ax
call esi
mov word [0x5d8fe8], ax
push str..DataGameServerInfo___Event.dat
push 0
push str.CastleSiegeStateStartMinute
push str.GameServerInfo
call esi
cmp word [0x5d8fc8], 0
mov di, ax
mov word [0x5d8fea], di
je 0x417a25
cmp word [0x5d8fca], 0
je 0x417a25
cmp word [0x5d8fce], 0
je 0x417a25
movups xmm0, xmmword [0x5d8fc8]
push 0
push 0
push 0
push dword [0x5d8fac]
lea eax, [ebp - 0x28]
push eax
movups xmmword [ebp - 0x28], xmm0
call fcn.0041b760
movzx esi, word [ebp - 0x28]
movzx edx, word [ebp - 0x26]
mov eax, esi
movzx ebx, word [ebp - 0x22]
shl eax, 8
movzx ecx, dl
or ecx, eax
movzx eax, bl
shl ecx, 8
or ecx, eax
cmp ecx, dword [ebp - 0x2c]
jle 0x417c03
cmp word [0x5d8fca], 0xc
mov dword [0x5d8fc4], 1
ja 0x417a1e
movzx eax, word [0x5d8fce]
cmp eax, 1
jb 0x417a1e
cmp eax, 0x1f
ja 0x417a1e
mov di, word [0x5d8fea]
jmp 0x417a2f
mov di, word [0x5d8fea]
mov dword [0x5d8fc4], 0
movzx ecx, word [0x5d8fe0]
test cx, cx
je 0x417b0f
movzx eax, word [0x5d8fe2]
mov edx, eax
mov dword [ebp - 0x48], edx
test ax, ax
je 0x417b0f
movzx edx, word [0x5d8fe6]
test dx, dx
je 0x417b0f
mov esi, dword [0x5d8fd8]
cmp esi, 1
jl 0x417b0f
cmp esi, 9
jg 0x417b0f
mov dword [ebp - 0x2c], eax
mov ebx, edx
movzx eax, word [0x5d8fe8]
mov dword [ebp - 0x34], eax
movzx eax, di
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x2c]
movzx eax, al
mov dword [ebp - 0x44], ecx
shl ecx, 8
or eax, ecx
mov dword [ebp - 0x30], 0
shl eax, 8
movzx ecx, bl
or eax, ecx
cdq
mov ecx, eax
movzx edx, di
mov eax, dword [ebp - 0x34]
shl eax, 0x10
or eax, edx
cdq
or dword [ebp - 0x30], eax
or ecx, edx
cmp ecx, dword [ebp - 0x38]
jg 0x417ad9
jl 0x417c29
mov eax, dword [ebp - 0x3c]
cmp dword [ebp - 0x30], eax
jbe 0x417c29
mov dword [0x5d8fdc], 1
cmp esi, 8
je 0x417c71
cmp word [ebp - 0x48], 0xc
ja 0x417b0f
lea eax, [ebx - 1]
test eax, eax
js 0x417b0f
cmp eax, 0x1e
jg 0x417b0f
cmp word [0x5d8fe8], 0x17
ja 0x417b0f
cmp di, 0x3b
jbe 0x417b19
mov dword [0x5d8fdc], 0
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push str..DataGameServerInfo___Event.dat
push 0x55526c
push str.CastleSiegeCycleStartYear
push str.GameServerInfo
call esi
push str..DataGameServerInfo___Event.dat
push 0x55526c
push str.CastleSiegeCycleStartMonth
push str.GameServerInfo
call esi
push str..DataGameServerInfo___Event.dat
push 0x55526c
push str.CastleSiegeCycleStartDay
push str.GameServerInfo
call esi
push str..DataGameServerInfo___Event.dat
push 0x55526c
push str.CastleSiegeSpecificState
push str.GameServerInfo
call esi
push str..DataGameServerInfo___Event.dat
push 0x55526c
push str.CastleSiegeStateStartYear
push str.GameServerInfo
call esi
push str..DataGameServerInfo___Event.dat
push 0x55526c
push str.CastleSiegeStateStartMonth
push str.GameServerInfo
call esi
push str..DataGameServerInfo___Event.dat
push 0x55526c
push str.CastleSiegeStateStartDay
push str.GameServerInfo
call esi
push str..DataGameServerInfo___Event.dat
push 0x55526c
push str.CastleSiegeStateStartHour
push str.GameServerInfo
call esi
push str..DataGameServerInfo___Event.dat
push 0x55526c
push str.CastleSiegeStateStartMinute
push str.GameServerInfo
call esi
mov ecx, dword [ebp - 8]
mov eax, dword [0x5d8fdc]
xor ecx, ebp
and eax, dword [0x5d8fc4]
pop edi
pop esi
pop ebx
call fcn.00529f01
mov esp, ebp
pop ebp
ret 4
movzx eax, word [ebp - 0x12]
push eax
movzx eax, word [ebp - 0x16]
push eax
movzx eax, word [ebp - 0x18]
push eax
push ebx
push edx
push esi
push str._CastleSiege__CCastleSiege::LoadPreFixData_____iEVENT_END_DATE_NUM___04d__02d__02d____iTODAY_DATE_NUM___04d__02d__02d_
mov dword [0x5d8fc4], 0
call fcn.00526250
movzx eax, word [ebp - 0xc]
push eax
movzx eax, word [ebp - 0xe]
push eax
movzx eax, word [ebp - 0x10]
push eax
movzx eax, word [ebp - 0x12]
push eax
movzx eax, word [ebp - 0x16]
push eax
movzx eax, word [ebp - 0x18]
push eax
movzx eax, word [0x5d8fec]
push eax
push dword [ebp - 0x40]
mov dword [0x5d8fdc], 0
push dword [ebp - 0x34]
push ebx
push dword [ebp - 0x2c]
push dword [ebp - 0x44]
push esi
push str._CastleSiege__CCastleSiege::LoadPreFixData_____iSIEGE_DATE_NUM64__STATE:_d___04d__02d__02d__02d:_02d:_02d____iTODAY_DATE_NUM64___04d__02d__02d__02d:_02d:_02d_
call fcn.00526250
push str._CastleSiege__CCastleSiege::LoadPreFixData_____FIX_STATE_CASTLESIEGE_STATE_ENDSIEGE_CANT_BE_USED
call fcn.00526250
int3