Function at 0x419f50
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x548e80
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x88
push esi
push edi
mov eax, dword [0x57a040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x14], edi
push str.SET_SetState_STARTSIEGE__
push 0
call fcn.005262e0
add esp, 8
cmp dword [ebx + 8], 0
je 0x419fe5
push 7
mov ecx, edi
call fcn.0041b860
test eax, eax
js 0x41a33d
imul eax, eax, 0x3e8
push 0
mov dword [edi + 0x68], eax
call fcn.0052d9f5
mov esi, eax
add esp, 4
mov eax, 0x10624dd3
imul dword [edi + 0x68]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add ecx, esi
mov dword [edi + 0x6c], ecx
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x1c8], 0
mov dword [edi + 0x1cc], 0
mov dword [edi + 0x1d4], 0xffffffff
mov word [edi + 0x1d8], 0
mov dword [edi + 0x1dc], 0xffffffff
mov dword [edi + 0x1e0], 0xffffffff
mov dword [edi + 0x1e4], 0
mov dword [edi + 0xa0], 0
mov dword [edi + 0xb4], 0
call esi
mov dword [edi + 0xb0], eax
call esi
mov dword [edi + 0xa4], eax
mov dword [edi + 0xa8], 0
call esi
mov dword [edi + 0xac], eax
xorps xmm0, xmm0
movups xmmword [edi + 0x1e8], xmm0
add edi, 0x17c
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebp - 0x14]
push edi
mov esi, dword [esi + 0x178]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
jne 0x41a0b9
mov ecx, dword [ebp - 0x14]
call fcn.0041fd80
mov ecx, dword [ebp - 0x14]
push 1
push 8
call fcn.00419460
push str._CastleSiege__CCastleSiege::SetState_STARTSIEGE_____CheckAttackGuildExist____FALSE
push 1
call fcn.005262e0
add esp, 8
jmp 0x41a327
mov edi, dword [ebp - 0x14]
mov ecx, edi
call fcn.0041d2e0
call fcn.0041ba10
mov ecx, edi
call fcn.00420110
call fcn.0041f6d0
test eax, eax
jne 0x41a115
xor esi, esi
mov ecx, 0xd7
nop
mov eax, dword [esi*4 + 0x20a514c]
cmp dword [eax + 4], 3
jne 0x41a102
cmp word [eax + 0xcc], cx
jne 0x41a102
mov ecx, esi
call fcn.0051f250
mov ecx, 0xd7
inc esi
cmp esi, 0x9c4
jl 0x41a0e0
mov dword [edi + 0x1c8], 1
lea eax, [edi + 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [edi + 0x12c]
cmp esi, dword [edi + 0x130]
je 0x41a23f
push esi
lea ecx, [ebp - 0x98]
call fcn.00419150
cmp dword [ebp - 0x94], 1
jne 0x41a14f
cmp dword [ebp - 0x30], 0
jg 0x41a15f
add esi, 0x74
cmp esi, dword [edi + 0x130]
jne 0x41a134
jmp 0x41a23f
mov esi, dword [ebp - 0x80]
test esi, esi
js 0x41a23f
xor eax, eax
cmp esi, 0x1194
setl al
test eax, eax
je 0x41a23f
mov edx, dword [esi*4 + 0x20a514c]
cmp dword [edx + 4], 3
jne 0x41a23f
movzx eax, word [edx + 0xcc]
cmp eax, dword [ebp - 0x90]
jne 0x41a23f
cmp byte [edx + 0xdc0], 0
je 0x41a23f
mov ecx, dword [edx + 0xdbc]
cmp ecx, dword [ebp - 0x28]
jne 0x41a23f
test ecx, ecx
je 0x41a23f
sub eax, 0x115
je 0x41a211
sub eax, 6
jne 0x41a23f
mov eax, dword [ebp - 0x7c]
xor ecx, ecx
test eax, eax
cmovns ecx, eax
mov eax, 3
cmp ecx, eax
cmovg ecx, eax
mov byte [edx + 0xdc8], cl
mov eax, dword [esi*4 + 0x20a514c]
mov ecx, dword [ecx*4 + 0x5d8f74]
mov dword [eax + 0x300], ecx
mov ecx, dword [esi*4 + 0x20a514c]
mov al, byte [ebp - 0x78]
mov byte [ecx + 0xdc9], al
jmp 0x41a23f
mov eax, dword [ebp - 0x7c]
xor ecx, ecx
test eax, eax
cmovns ecx, eax
mov eax, 3
cmp ecx, eax
cmovg ecx, eax
mov byte [edx + 0xdc8], cl
mov eax, dword [esi*4 + 0x20a514c]
mov ecx, dword [ecx*4 + 0x5d8f64]
mov dword [eax + 0x300], ecx
lea esi, [edi + 0x138]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [edi + 0x12c]
cmp esi, dword [edi + 0x130]
je 0x41a305
nop word [eax + eax]
push esi
lea ecx, [ebp - 0x98]
call fcn.00419150
mov dword [ebp - 4], 0
cmp dword [ebp - 0x90], 0x115
jne 0x41a2ef
mov ecx, dword [ebp - 0x80]
test ecx, ecx
js 0x41a2ef
xor eax, eax
cmp ecx, 0x1194
setl al
test eax, eax
je 0x41a2ef
mov eax, dword [ecx*4 + 0x20a514c]
cmp dword [eax + 4], 3
jne 0x41a2ef
mov ecx, 0x115
cmp word [eax + 0xcc], cx
jne 0x41a2ef
push 0
push dword [ebp - 0x68]
push dword [ebp - 0x6c]
call fcn.0041dea0
mov eax, dword [ebp - 0x80]
push 0xd
push dword [eax*4 + 0x20a514c]
call fcn.004774b0
mov ecx, dword [ebp - 0x80]
mov eax, dword [ecx*4 + 0x20a514c]
mov byte [eax + 0xdc1], 0
add esi, 0x74
mov dword [ebp - 4], 0xffffffff
cmp esi, dword [edi + 0x130]
jne 0x41a270
lea eax, [edi + 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, edi
call fcn.0041f1a0
push 1
call fcn.00420390
push 1
call fcn.00420740
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4
push str._CastleSiege__CCastleSiege::SetState_STARTSIEGE_____iGAP_SEC___0
mov dword [edi + 0x14], 0
call fcn.00526250
int3