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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
mov eax, dword [0x57a040]
xor eax, esp
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
push esi
lea ecx, [eax + 1]
push edi
cmp ecx, 0xa
ja case.default.0x41948b
mov dword [ebx + 0x28], eax
jmp dword [ecx*4 + 0x4197e4]
push str.SET_SetState_IDLE_1__
push 0
call fcn.005262e0
add esp, 8
cmp dword [ebp + 0xc], 0
je 0x419732
movzx eax, word [ebx + 0xb8]
xorps xmm0, xmm0
sub eax, 0x76c
movlpd qword [esp + 0x20], xmm0
mov dword [esp + 0x34], eax
movzx eax, word [ebx + 0xba]
dec eax
mov dword [esp + 0x28], 0
mov dword [esp + 0x30], eax
movzx eax, word [ebx + 0xbe]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x20]
push eax
movlpd qword [esp + 0x3c], xmm0
mov dword [esp + 0x44], 0
call fcn.0052ff23
add esp, 4
mov edi, eax
lea eax, [esp + 0x10]
mov esi, edx
push eax
call fcn.0052d9f5
add esp, 4
push dword [esp + 0x14]
push dword [esp + 0x14]
push esi
push edi
call fcn.0052d9b0
fmul qword [0x56a7f0]
push 0
fstp qword [esp + 0x2c]
cvttsd2si eax, qword [esp + 0x2c]
mov dword [ebx + 0x68], eax
call fcn.0052d9f5
mov esi, eax
add esp, 0x14
mov eax, 0x10624dd3
imul dword [ebx + 0x68]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add ecx, esi
mov dword [ebx + 0x6c], ecx
jmp 0x419732
push str.SET_SetState_REGSIEGE__
push 0
call fcn.005262e0
add esp, 8
cmp dword [ebp + 0xc], 0
je 0x4195ab
push 1
mov ecx, ebx
call fcn.0041b860
test eax, eax
js 0x41977e
imul eax, eax, 0x3e8
push 0
mov dword [ebx + 0x68], eax
call fcn.0052d9f5
mov esi, eax
add esp, 4
mov eax, 0x10624dd3
imul dword [ebx + 0x68]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add ecx, esi
mov dword [ebx + 0x6c], ecx
mov eax, dword [ebx + 0x18]
test eax, eax
js 0x419732
mov word [esp + 0x14], ax
mov ecx, 0x7509e0
push 6
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0xe8006c1
push eax
call fcn.00440610
jmp 0x419732
push str.SET_SetState_IDLE_2__
push 0
call fcn.005262e0
add esp, 8
cmp dword [ebp + 0xc], 0
je 0x419732
push 2
mov ecx, ebx
call fcn.0041b860
test eax, eax
js 0x41978f
imul eax, eax, 0x3e8
push 0
mov dword [ebx + 0x68], eax
call fcn.0052d9f5
mov esi, eax
add esp, 4
mov eax, 0x10624dd3
imul dword [ebx + 0x68]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add ecx, esi
mov dword [ebx + 0x6c], ecx
jmp 0x419732
push str.SET_SetState_REGMARK__
push 0
call fcn.005262e0
add esp, 8
cmp dword [ebp + 0xc], 0
je 0x419732
push 3
mov ecx, ebx
call fcn.0041b860
test eax, eax
js 0x4197a0
jmp 0x419603
push str.SET_SetState_IDLE_3__
push 0
call fcn.005262e0
add esp, 8
cmp dword [ebp + 0xc], 0
je 0x419732
push 4
mov ecx, ebx
call fcn.0041b860
test eax, eax
js 0x4197b1
jmp 0x419603
push str.SET_SetState_NOTIFY__
push 0
call fcn.005262e0
add esp, 8
cmp dword [ebp + 0xc], 0
je 0x419709
push 5
mov ecx, ebx
call fcn.0041b860
test eax, eax
js 0x4197c2
jmp 0x4196dd
push str.SET_SetState_READYSIEGE__
push 0
call fcn.005262e0
add esp, 8
cmp dword [ebp + 0xc], 0
je 0x419709
push 6
mov ecx, ebx
call fcn.0041b860
test eax, eax
js 0x4197d3
imul eax, eax, 0x3e8
push 0
mov dword [ebx + 0x68], eax
call fcn.0052d9f5
mov esi, eax
add esp, 4
mov eax, 0x10624dd3
imul dword [ebx + 0x68]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add ecx, esi
mov dword [ebx + 0x6c], ecx
mov ecx, ebx
call fcn.0041df70
jmp 0x419732
push dword [ebp + 0xc]
mov ecx, ebx
call fcn.00419f50
jmp 0x419732
push dword [ebp + 0xc]
mov ecx, ebx
call fcn.0041a350
jmp 0x419732
push ecx
mov ecx, ebx
call fcn.0041a530
cmp dword [ebx + 0x150], 0
jne 0x41974c
mov ecx, ebx
mov dword [ebx + 0x150], 1
call fcn.0041bb30
lea eax, [ebx + 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov dword [ebx + 0x9c], 0
mov dword [ebx + 0xa0], 0
mov ecx, dword [esp + 0x44]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00529f01
mov esp, ebp
pop ebp
ret 8
push str._CastleSiege__CCastleSiege::SetState_REGSIEGE_____iGAP_SEC___0
mov dword [ebx + 0x14], 0
call fcn.00526250
push str._CastleSiege__CCastleSiege::SetState_IDLE_2_____iGAP_SEC___0
mov dword [ebx + 0x14], 0
call fcn.00526250
push str._CastleSiege__CCastleSiege::SetState_REGMARK_____iGAP_SEC___0
mov dword [ebx + 0x14], 0
call fcn.00526250
push str._CastleSiege__CCastleSiege::SetState_IDLE_3_____iGAP_SEC___0
mov dword [ebx + 0x14], 0
call fcn.00526250
push str._CastleSiege__CCastleSiege::SetState_NOTIFY_____iGAP_SEC___0
mov dword [ebx + 0x14], 0
call fcn.00526250
push str._CastleSiege__CCastleSiege::SetState_READYSIEGE_____iGAP_SEC___0
mov dword [ebx + 0x14], 0
call fcn.00526250
xor dl, byte [edi - 0x6b6dffbf]
inc ecx
add byte [ecx - 0x6b], bl
inc ecx
add cl, bl
xchg ebp, eax
inc ecx
add byte [esi + edx*4], dh
inc ecx
add byte [eax - 0x6a], ah
inc ecx
add byte [edi - 0x48ffbe6a], cl
xchg esi, eax
inc ecx
add byte [edx], dl
xchg edi, eax
inc ecx
add byte [esi], bl
xchg edi, eax
inc ecx
add byte [edx], ch
xchg edi, eax
inc ecx
add byte [ebp - 0x75], dl
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x18
cmp dword [0x5d8f9c], 0
push esi
push edi
je 0x419f14
cmp dword [0x5d8f90], 0
je 0x419f14
mov eax, dword [0x5d8fb0]
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
inc eax
cmp eax, 0xa
ja case.default.0x41984a
jmp dword [eax*4 + 0x419f1c]
call edi
sub eax, dword [0x5d8ff8]
cmp eax, 0x3e8
jl 0x41989a
push 0
call fcn.0052d9f5
add esp, 4
mov esi, eax
mov eax, dword [0x5d8ff4]
push edx
cdq
push esi
push edx
push eax
call fcn.0052d9b0
fmul qword [0x56a7f0]
add esp, 0x10
fstp qword [esp + 8]
cvttsd2si eax, qword [esp + 8]
mov dword [0x5d8ff0], eax
call edi
mov dword [0x5d8ff8], eax
cmp dword [0x5d8ff0], 0
jg case.default.0x41984a
push 1
push 1
jmp 0x419dbd
call edi
sub eax, dword [0x5d8ff8]
cmp eax, 0x3e8
jl 0x419995
push 0
call fcn.0052d9f5
add esp, 4
mov esi, eax
mov eax, dword [0x5d8ff4]
push edx
cdq
push esi
push edx
push eax
call fcn.0052d9b0
fmul qword [0x56a7f0]
add esp, 0x10
fstp qword [esp + 8]
cvttsd2si eax, qword [esp + 8]
mov dword [0x5d8ff0], eax
call edi
mov dword [0x5d8ff8], eax
call edi
sub eax, dword [0x5d9024]
cmp eax, 0x1b7740
jbe 0x419995
lea eax, [esp + 8]
mov dword [esp + 8], 0x1a1
push eax
lea eax, [esp + 0x18]
mov ecx, 0xa9b83c
push eax
call fcn.00405650
mov eax, dword [esp + 0x1c]
mov ecx, dword [0xa9b83c]
cmp byte [eax + 0xd], 0
jne 0x419945
cmp dword [eax + 0x10], 0x1a1
jle 0x419947
mov eax, ecx
cmp eax, ecx
jne 0x41996a
push 0x1a1
push str.Could_not_find_message__d_
push 0xa9b7bc
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov eax, 0xa9b7bc
jmp 0x41996f
add eax, 0x18
je 0x41998e
mov ecx, dword [0xa0cdb0]
test ecx, ecx
jne 0x41997e
or ecx, 0xffffffff
jmp 0x419982
movzx ecx, byte [ecx + 8]
push eax
sub esp, 0x14
call fcn.00472920
add esp, 0x18
call edi
mov dword [0x5d9024], eax
cmp dword [0x5d8ff0], 0
jg case.default.0x41984a
push 1
push 2
jmp 0x419dbd
call edi
sub eax, dword [0x5d8ff8]
cmp eax, 0x3e8
jl 0x4199f4
push 0
call fcn.0052d9f5
add esp, 4
mov esi, eax
mov eax, dword [0x5d8ff4]
push edx
cdq
push esi
push edx
push eax
call fcn.0052d9b0
fmul qword [0x56a7f0]
add esp, 0x10
fstp qword [esp + 8]
cvttsd2si eax, qword [esp + 8]
mov dword [0x5d8ff0], eax
call edi
mov dword [0x5d8ff8], eax
cmp dword [0x5d8ff0], 0
jg case.default.0x41984a
push 1
push 3
jmp 0x419dbd
call edi
sub eax, dword [0x5d8ff8]
cmp eax, 0x3e8
jl 0x419aef
push 0
call fcn.0052d9f5
add esp, 4
mov esi, eax
mov eax, dword [0x5d8ff4]
push edx
cdq
push esi
push edx
push eax
call fcn.0052d9b0
fmul qword [0x56a7f0]
add esp, 0x10
fstp qword [esp + 8]
cvttsd2si eax, qword [esp + 8]
mov dword [0x5d8ff0], eax
call edi
mov dword [0x5d8ff8], eax
call edi
sub eax, dword [0x5d9024]
cmp eax, 0x1b7740
jbe 0x419aef
lea eax, [esp + 8]
mov dword [esp + 8], 0x1a2
push eax
lea eax, [esp + 0x18]
mov ecx, 0xa9b83c
push eax
call fcn.00405650
mov eax, dword [esp + 0x1c]
mov ecx, dword [0xa9b83c]
cmp byte [eax + 0xd], 0
jne 0x419a9f
cmp dword [eax + 0x10], 0x1a2
jle 0x419aa1
mov eax, ecx
cmp eax, ecx
jne 0x419ac4
push 0x1a2
push str.Could_not_find_message__d_
push 0xa9b7bc
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov eax, 0xa9b7bc
jmp 0x419ac9
add eax, 0x18
je 0x419ae8
mov ecx, dword [0xa0cdb0]
test ecx, ecx
jne 0x419ad8
or ecx, 0xffffffff
jmp 0x419adc
movzx ecx, byte [ecx + 8]
push eax
sub esp, 0x14
call fcn.00472920
add esp, 0x18
call edi
mov dword [0x5d9024], eax
cmp dword [0x5d8ff0], 0
jg case.default.0x41984a
push 1
push 4
jmp 0x419dbd
call edi
sub eax, dword [0x5d8ff8]
cmp eax, 0x3e8
jl 0x419bea
push 0
call fcn.0052d9f5
add esp, 4
mov esi, eax
mov eax, dword [0x5d8ff4]
push edx
cdq
push esi
push edx
push eax
call fcn.0052d9b0
fmul qword [0x56a7f0]
add esp, 0x10
fstp qword [esp + 8]
cvttsd2si eax, qword [esp + 8]
mov dword [0x5d8ff0], eax
call edi
mov dword [0x5d8ff8], eax
call edi
sub eax, dword [0x5d9024]
cmp eax, 0x6ddd00
jbe 0x419bea
lea eax, [esp + 8]
mov dword [esp + 8], 0x1a3
push eax
lea eax, [esp + 0x18]
mov ecx, 0xa9b83c
push eax
call fcn.00405650
mov eax, dword [esp + 0x1c]
mov ecx, dword [0xa9b83c]
cmp byte [eax + 0xd], 0
jne 0x419b9a
cmp dword [eax + 0x10], 0x1a3
jle 0x419b9c
mov eax, ecx
cmp eax, ecx
jne 0x419bbf
push 0x1a3
push str.Could_not_find_message__d_
push 0xa9b7bc
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov eax, 0xa9b7bc
jmp 0x419bc4
add eax, 0x18
je 0x419be3
mov ecx, dword [0xa0cdb0]
test ecx, ecx
jne 0x419bd3
or ecx, 0xffffffff
jmp 0x419bd7
movzx ecx, byte [ecx + 8]
push eax
sub esp, 0x14
call fcn.00472920
add esp, 0x18
call edi
mov dword [0x5d9024], eax
cmp dword [0x5d8ff0], 0
jg case.default.0x41984a
push 1
push 5
jmp 0x419dbd
call edi
sub eax, dword [0x5d8ff8]
cmp eax, 0x3e8
jl 0x419ce5
push 0
call fcn.0052d9f5
add esp, 4
mov esi, eax
mov eax, dword [0x5d8ff4]
push edx
cdq
push esi
push edx
push eax
call fcn.0052d9b0
fmul qword [0x56a7f0]
add esp, 0x10
fstp qword [esp + 8]
cvttsd2si eax, qword [esp + 8]
mov dword [0x5d8ff0], eax
call edi
mov dword [0x5d8ff8], eax
call edi
sub eax, dword [0x5d9024]
cmp eax, 0x1b7740
jbe 0x419ce5
lea eax, [esp + 8]
mov dword [esp + 8], 0x1a4
push eax
lea eax, [esp + 0x18]
mov ecx, 0xa9b83c
push eax
call fcn.00405650
mov eax, dword [esp + 0x1c]
mov ecx, dword [0xa9b83c]
cmp byte [eax + 0xd], 0
jne 0x419c95
cmp dword [eax + 0x10], 0x1a4
jle 0x419c97
mov eax, ecx
cmp eax, ecx
jne 0x419cba
push 0x1a4
push str.Could_not_find_message__d_
push 0xa9b7bc
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov eax, 0xa9b7bc
jmp 0x419cbf
add eax, 0x18
je 0x419cde
mov ecx, dword [0xa0cdb0]
test ecx, ecx
jne 0x419cce
or ecx, 0xffffffff
jmp 0x419cd2
movzx ecx, byte [ecx + 8]
push eax
sub esp, 0x14
call fcn.00472920
add esp, 0x18
call edi
mov dword [0x5d9024], eax
cmp dword [0x5d8ff0], 0
jg case.default.0x41984a
push 1
push 6
jmp 0x419dbd
call fcn.0041a720
jmp case.default.0x41984a
call fcn.0041a940
jmp case.default.0x41984a
call edi
sub eax, dword [0x5d8ff8]
cmp eax, 0x3e8
jl 0x419d58
push 0
call fcn.0052d9f5
add esp, 4
mov esi, eax
mov eax, dword [0x5d8ff4]
push edx
cdq
push esi
push edx
push eax
call fcn.0052d9b0
fmul qword [0x56a7f0]
add esp, 0x10
fstp qword [esp + 8]
cvttsd2si eax, qword [esp + 8]
mov dword [0x5d8ff0], eax
call edi
mov dword [0x5d8ff8], eax
cmp dword [0x5d8ff0], 0
jg case.default.0x41984a
push 1
push 9
jmp 0x419dbd
call edi
sub eax, dword [0x5d8ff8]
cmp eax, 0x3e8
jl 0x419db0
push 0
call fcn.0052d9f5
add esp, 4
mov esi, eax
mov eax, dword [0x5d8ff4]
push edx
cdq
push esi
push edx
push eax
call fcn.0052d9b0
fmul qword [0x56a7f0]
add esp, 0x10
fstp qword [esp + 8]
cvttsd2si eax, qword [esp + 8]
mov dword [0x5d8ff0], eax
call edi
mov dword [0x5d8ff8], eax
cmp dword [0x5d8ff0], 0
jg case.default.0x41984a
push 1
push 0
mov ecx, 0x5d8f88
call fcn.00419460
cmp dword [0xbdae34], 0
jne 0x419de5
cmp dword [0xbd9014], 0xffffffff
je 0x419e09
mov dword [0xbd9014], 0xffffffff
jmp 0x419e09
mov eax, 0x10624dd3
imul dword [0x5d8ff0]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [0xbd9014], eax
mov eax, dword [0x5d8fb0]
mov dword [0xbd9018], eax
call edi
sub eax, dword [0x5d901c]
cmp eax, 0x493e0
jbe 0x419e32
cmp dword [0x5d8fb0], 7
je 0x419e2b
mov ecx, 0x5d8f88
call fcn.0041d2e0
call edi
mov dword [0x5d901c], eax
call edi
sub eax, dword [0x5d9020]
cmp eax, 0x2710
jbe 0x419e4d
call edi
mov dword [0x5d9020], eax
call fcn.0041b8c0
call edi
sub eax, dword [0x20b2458]
cmp eax, 0xea60
jbe 0x419f14
call edi
mov dword [0x20b2458], eax
call fcn.0041b8c0
mov edx, eax
test edx, edx
js 0x419ecc
movups xmm1, xmmword [0x5d900c]
pextrw ecx, xmm1, 6
movaps xmm0, xmm1
psrldq xmm0, 8
movzx ecx, cx
push ecx
movd ecx, xmm0
movaps xmm0, xmm1
psrldq xmm0, 4
mov eax, ecx
shr eax, 0x10
push eax
movzx eax, cx
push eax
movd eax, xmm0
movd ecx, xmm1
shr eax, 0x10
push eax
mov eax, ecx
shr eax, 0x10
push eax
movzx eax, cx
push eax
push edx
push str.LEFT_:_SEC__d___SIEGE_DAY__04d__02d__02d__02d:_02d:_02d_
push 3
call fcn.005262e0
add esp, 0x24
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp edx, 0xfffffffd
je 0x419f05
cmp edx, 0xfffffffe
je 0x419ef0
cmp edx, 0xffffffff
jne 0x419f14
push str._CastleSiege__LEFT_TIME_:_CASTLESIEGE_LEFTTIME_ONSIGE
push 3
call fcn.005262e0
add esp, 8
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push str._CastleSiege__LEFT_TIME_:_CASTLESIEGE_LEFTTIME_ENDSIEGE
push 3
call fcn.005262e0
add esp, 8
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push str._CastleSiege__LEFT_TIME_:_CASTLESIEGE_LEFTTIME_NOTRUNNING
push 3
call fcn.005262e0
add esp, 8
pop edi
pop esi
mov esp, ebp
pop ebp
ret