Function at 0x474590
Capabilities:
Reference sql statements

Disassembly:
push 0xffffffffffffffff
push 0x4a2b33
mov eax, dword fs:[0]
push eax
mov eax, 0x3838
mov dword fs:[0], esp
call fcn.0047f090
mov eax, dword [0x4d2084]
xor eax, esp
push ebx
push ebp
push esi
mov dword [esp + 0x3840], eax
push edi
mov ebp, ecx
xor edi, edi
mov dword [esp + 0x3850], edi
mov dword [esp + 0x10], edi
mov ebx, dword [esp + 0x3870]
cmp ebx, 0x10
mov esi, dword [esp + 0x385c]
mov eax, esi
jae 0x4745ec
lea eax, [esp + 0x385c]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4745f0
mov ecx, dword [ebp + 4]
sub eax, edx
cmp dword [edi + ecx + 0x18], 0x10
jb 0x474609
mov ecx, dword [edi + ecx + 4]
jmp 0x47460d
lea ecx, [edi + ecx + 4]
cmp ebx, 0x10
mov edx, esi
jae 0x47461b
lea edx, [esp + 0x385c]
push eax
push ecx
push edx
call fcn.004809e0
add esp, 0xc
test eax, eax
je 0x47464e
mov edx, dword [esp + 0x10]
inc edx
add edi, 0xac
cmp edi, 0x204
mov dword [esp + 0x10], edx
jl 0x4745d0
cmp dword [esp + 0x3870], 0x10
jmp 0x4746f7
mov esi, dword [esp + 0x10]
cmp esi, 3
jl 0x474664
cmp dword [esp + 0x3870], 0x10
jmp 0x4746f7
xor eax, eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov byte [esp + 0x44], al
mov eax, dword [esp + 0x3870]
mov edi, 0x10
cmp eax, edi
mov eax, dword [esp + 0x385c]
jae 0x474694
lea eax, [esp + 0x385c]
push eax
lea ecx, [esp + 0x48]
push str.SELECT_DefWeekDay__DefHour__DefMinute__DefDuration__LatestTime_FROM_T_castlewar_time_set_WHERE__FeodName__LIKE_CONVERT___utf8__s_USING_gb2312__
push ecx
call fcn.0047f034
add esp, 0xc
push 1
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x4c]
push eax
mov ecx, 0x4d8c60
call fcn.00404b50
test al, al
jne 0x4746e1
cmp dword [esp + 0x3870], edi
jb 0x474709
mov ecx, dword [esp + 0x385c]
push ecx
call fcn.0047e60d
add esp, 4
xor al, al
jmp 0x47487e
mov edx, dword [esp + 0x14]
push edx
call sub.LIBMYSQL.dll_mysql_num_rows
cmp eax, 1
je 0x474710
cmp dword [esp + 0x3870], edi
jb 0x474709
mov eax, dword [esp + 0x385c]
push eax
call fcn.0047e60d
add esp, 4
xor al, al
jmp 0x47487e
mov ecx, dword [esp + 0x14]
push ecx
call sub.LIBMYSQL.dll_mysql_fetch_row
mov edi, eax
mov edx, dword [edi]
push edx
call fcn.0047f135
mov dword [ebp + 0x10], eax
mov eax, dword [edi + 4]
push eax
call fcn.0047f135
mov dword [ebp + 0x14], eax
mov ecx, dword [edi + 8]
push ecx
call fcn.0047f135
mov dword [ebp + 0x18], eax
mov edx, dword [edi + 0xc]
push edx
call fcn.0047f135
imul esi, esi, 0xac
mov ebx, dword [ebp + 4]
mov dword [ebp + 0x1c], eax
mov eax, dword [edi + 0x10]
push eax
call fcn.0047f135
add esp, 0x14
push eax
lea ecx, [esi + ebx + 0x7c]
push ecx
mov ecx, ebp
call fcn.00473780
mov eax, dword [ebp + 4]
mov edx, dword [esi + eax + 0x7c]
push 0x4b0720
push 0x4b071c
push 0x4b0718
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 0x24], edx
call fcn.0043d510
add esp, 0x14
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x1c]
mov edx, 0x10
cmp eax, edx
mov byte [esp + 0x3850], 1
jae 0x4747b6
lea ecx, [esp + 0x1c]
mov eax, dword [ebp + 4]
mov ebx, dword [eax + esi + 0x18]
add eax, esi
cmp ebx, edx
jb 0x4747c8
mov eax, dword [eax + 4]
jmp 0x4747cb
add eax, 4
mov edx, dword [0x52f0f8]
push ecx
push eax
push str.__s__Reload_CastleWarTime_is___s__n
push edx
call fcn.0048dda0
mov ecx, dword [edi + 0xc]
mov eax, dword [ebp + 4]
push ecx
lea ebx, [esi + eax]
call fcn.0047f135
imul eax, eax, 0xe10
add eax, dword [ebx + 0x7c]
mov dword [ebx + 0x80], eax
mov ebp, dword [ebp + 4]
mov eax, dword [esp + 0x3884]
add ebp, esi
mov esi, dword [esp + 0x3870]
mov ebx, 0x10
add esp, 0x14
cmp eax, ebx
jae 0x474822
lea esi, [esp + 0x385c]
mov edx, dword [edi + 0xc]
push edx
call fcn.0047f135
push eax
mov eax, dword [ebp + 0x7c]
push eax
push esi
call fcn.00475eb0
mov eax, dword [esp + 0x40]
add esp, 0x10
cmp eax, ebx
jb 0x47484e
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0047e60d
add esp, 4
cmp dword [esp + 0x3870], ebx
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], 0
mov byte [esp + 0x1c], 0
jb 0x47487c
mov edx, dword [esp + 0x385c]
push edx
call fcn.0047e60d
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x3848]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x3838]
pop ebx
xor ecx, esp
call fcn.0047ece2
add esp, 0x3844
ret 0x1c