Function at 0x51cce0
Capabilities:
Check for software breakpoints
Check for time delay via gettickcount
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
mov eax, dword [0x57a040]
xor eax, esp
mov dword [esp + 0x40], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
push esi
push edi
mov esi, 0xd2f37c
mov dword [esp + 0x24], ebx
mov edi, 0x2710
nop dword [eax + eax]
call ebx
sub eax, dword [esi - 4]
cmp eax, dword [esi]
jbe 0x51cd5c
call ebx
mov dword [esi - 4], eax
call fcn.00526930
cdq
idiv edi
add edx, edi
mov dword [esi], edx
call fcn.00526930
cdq
mov ecx, 0xa
idiv ecx
mov byte [esi - 7], dl
call fcn.00526930
cdq
mov ecx, 3
idiv ecx
lea ecx, [esi - 0xc]
mov byte [esi - 8], dl
shl dl, 4
or dl, byte [esi - 7]
movzx eax, dl
push eax
call fcn.004b32a0
add esi, 0x15d38
cmp esi, 0x169018c
jl 0x51cd10
call fcn.00523d70
mov eax, 0xdac
mov dword [esp + 0x2c], 0x2000
nop dword [eax]
mov edi, dword [eax*4 + 0x20a514c]
cmp dword [edi + 4], 3
jne 0x51ce5b
movzx ecx, word [edi + 0x78]
cmp ecx, 1
je 0x51cda3
cmp ecx, 6
jne 0x51ce5b
cmp byte [edi + 0xa], 0
jg 0x51ce5b
cmp byte [edi + 0x9c0], 0
jne 0x51ce5b
xor ebx, ebx
mov dword [esp + 0x28], eax
xor esi, esi
mov ecx, dword [edi + 0x390]
movzx eax, word [esi + ecx + 4]
mov edx, eax
test ax, ax
js 0x51ce44
mov eax, 0x2000
cmp dx, ax
jge 0x51ce44
cmp byte [esi + ecx + 0xba], 0
je 0x51ce44
cmp byte [esi + ecx + 0xbb], 0
je 0x51ce44
push 0
call fcn.0052d9f5
mov ecx, dword [edi + 0x390]
add esp, 4
mov dword [esp + 0x1c], edx
cmp dword [esi + ecx + 0xbc], eax
jg 0x51ce44
push ebx
push dword [edi]
call fcn.0049de90
mov ecx, dword [edi]
lea edx, [esp + 0x10]
push 5
mov word [esp + 0x14], 0x5c1
mov byte [esp + 0x16], 0x28
mov byte [esp + 0x17], bl
mov byte [esp + 0x18], 1
call fcn.00526480
add esp, 4
push ebx
push dword [edi]
call fcn.0049f3c0
add esi, 0x10c
inc ebx
cmp esi, 0xf710
jl 0x51cdc2
mov eax, dword [esp + 0x28]
inc eax
cmp eax, 0x1194
jl 0x51cd80
mov ebx, 0xdac
xorps xmm1, xmm1
nop
mov edx, dword [ebx*4 + 0x20a514c]
mov dword [esp + 0x10], edx
cmp dword [edx + 4], 3
jne 0x51cf3c
movzx eax, word [edx + 0x78]
cmp eax, 1
je 0x51ce97
cmp eax, 6
jne 0x51cf3c
cmp byte [edx + 0xa], 0
jg 0x51cf3c
cmp byte [edx + 0x9c0], 0
jne 0x51cf3c
lea ecx, [edx + 0x114c]
xor esi, esi
xor edi, edi
mov dword [esp + 0x18], ecx
nop dword [eax]
mov eax, dword [edx + 0x11bc]
movzx eax, word [eax + edi + 4]
mov ecx, eax
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x18]
test ax, ax
js 0x51cf26
mov eax, 0x2000
cmp word [esp + 0x28], ax
jge 0x51cf26
mov eax, dword [edx + 0x11bc]
movss xmm0, dword [eax + edi + 0x20]
comiss xmm0, xmm1
jbe 0x51cf26
cmp esi, 0xd
je 0x51cf06
cmp esi, 0xe
je 0x51cf06
cmp esi, 0xc
jne 0x51cf26
xor eax, eax
cmp dword [ecx], eax
sete al
mov dword [ecx], eax
mov ecx, 0x6509a4
push dword [edx]
call fcn.004d9990
mov ecx, dword [esp + 0x18]
xorps xmm1, xmm1
mov edx, dword [esp + 0x10]
add ecx, 4
add edi, 0x10c
inc esi
mov dword [esp + 0x18], ecx
cmp edi, 0x10c0
jl 0x51cec0
inc ebx
cmp ebx, 0x1194
jl 0x51ce70
mov esi, 0xdac
nop
mov eax, dword [esi*4 + 0x20a514c]
cmp dword [eax + 4], 3
jne 0x51cf9f
movzx ecx, word [eax + 0x78]
cmp ecx, 1
je 0x51cf6b
cmp ecx, 6
jne 0x51cf9f
cmp byte [eax + 0xa], 0
jg 0x51cf9f
cmp byte [eax + 0x9c0], 0
jne 0x51cf9f
cmp dword [eax + 0x668], 0
jle 0x51cf89
push eax
call fcn.0043a0a0
mov eax, dword [esi*4 + 0x20a514c]
cmp dword [eax + 0x680], 0
je 0x51cf9f
push eax
call fcn.0043a210
inc esi
cmp esi, 0x1194
jl 0x51cf50
call fcn.00474fa0
xor eax, eax
nop
mov ebx, dword [eax*4 + 0x20a514c]
cmp dword [ebx + 4], 3
jne 0x51d04d
xor edi, edi
mov dword [esp + 0x10], eax
nop word [eax + eax]
mov esi, dword [ebx + 0x624]
add esi, edi
cmp byte [esi + 4], 0xff
je 0x51d03e
mov eax, dword [esi + 0x10]
test eax, eax
je 0x51d03e
push esi
dec eax
push ebx
mov dword [esi + 0x10], eax
call fcn.00478900
cmp dword [esi + 0x10], 0
jne 0x51d03e
push esi
push ebx
mov ecx, 0x6460e0
call fcn.00478000
movzx eax, byte [esi + 4]
mov ecx, 0x6460e0
push eax
movzx eax, byte [esi + 5]
push 0
push 1
push eax
push 0
push ebx
call fcn.00478bb0
xor eax, eax
mov dword [esi + 4], 0xff
mov byte [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
add edi, 0x1c
cmp edi, 0x380
jl 0x51cfd0
mov eax, dword [esp + 0x10]
inc eax
cmp eax, 0x1194
jl 0x51cfb0
call fcn.00489cd0
movss xmm1, dword [0x56a818]
mov eax, 0xdac
nop dword [eax + eax]
mov esi, dword [eax*4 + 0x20a514c]
mov dword [esp + 0x18], esi
cmp dword [esi + 4], 3
jne 0x51d171
movzx ecx, word [esi + 0x78]
cmp ecx, 1
je 0x51d097
cmp ecx, 6
jne 0x51d171
cmp byte [esi + 0xa], 0
jg 0x51d171
cmp byte [esi + 0x9c0], 0
jne 0x51d171
xor ebx, ebx
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x624]
mov al, byte [ebx + eax + 4]
cmp al, 0xff
je 0x51d15e
cmp al, 0x7a
je 0x51d0e2
cmp al, 0x7b
je 0x51d0e2
cmp al, 0x7c
je 0x51d0e2
cmp al, 0x7d
je 0x51d0e2
cmp al, 0x7e
je 0x51d0e2
cmp al, 0x7f
je 0x51d0e2
cmp al, 0x80
jne 0x51d15e
movzx ecx, al
imul eax, ecx, 0x4c
cmp dword [eax + 0x6460e4], ecx
lea edi, [eax + 0x6460e4]
jne 0x51d15e
test edi, edi
je 0x51d15e
mov ecx, dword [esi + 0x390]
mov edx, 0xc
add ecx, 0xcb0
nop dword [eax + eax]
movzx eax, word [ecx - 0x1c]
mov esi, eax
test ax, ax
js 0x51d135
cmp si, word [esp + 0x2c]
jge 0x51d135
cwde
cmp eax, dword [edi + 8]
jne 0x51d135
movss xmm0, dword [ecx]
ucomiss xmm0, xmm1
lahf
test ah, 0x44
jnp 0x51d15a
inc edx
add ecx, 0x10c
cmp edx, 0xcc
jl 0x51d110
push dword [edi]
mov esi, dword [esp + 0x1c]
push esi
call fcn.004774b0
movss xmm1, dword [0x56a818]
jmp 0x51d15e
mov esi, dword [esp + 0x18]
add ebx, 0x1c
cmp ebx, 0x380
jl 0x51d0b4
mov eax, dword [esp + 0x10]
inc eax
cmp eax, 0x1194
jl 0x51d070
cmp dword [0xb9424c], 0
mov ebx, dword [esp + 0x24]
je 0x51d208
imul esi, dword [0xb94250], 0x9c
add esi, 0xb9055c
call ebx
sub eax, dword [0xb94254]
cmp eax, dword [esi + 0x98]
jb 0x51d208
mov eax, dword [0xb94250]
xor ecx, ecx
inc eax
cmp eax, dword [0xb9424c]
cmovge eax, ecx
mov dword [0xb94250], eax
call ebx
push esi
mov dword [0xb94254], eax
movzx eax, byte [esi + 0x94]
push 0x554320
push eax
push dword [esi + 0x90]
movzx eax, word [esi + 0x8c]
push eax
movzx eax, byte [esi + 0x88]
push eax
movzx eax, byte [esi + 0x84]
push eax
movzx eax, byte [esi + 0x80]
push eax
push 0xb90558
call fcn.004cdd70
add esp, 0x24
mov eax, dword [0xbcd224]
mov esi, dword [eax]
mov dword [esp + 0x18], esi
cmp esi, eax
je 0x51d264
call ebx
imul ecx, dword [0xbdaca8], 0x3e8
sub eax, dword [esi + 0x34]
cmp eax, ecx
lea ecx, [esp + 0x18]
jbe 0x51d253
mov dword [esp + 0x18], esi
call fcn.00406210
push esi
mov ecx, 0xbcd224
call fcn.00406270
mov edx, eax
call fcn.004f5850
mov esi, dword [esp + 0x18]
mov dword [esp + 0x18], esi
jmp 0x51d25c
call fcn.00406210
mov esi, dword [esp + 0x18]
cmp esi, dword [0xbcd224]
jne 0x51d217
mov esi, dword [0x5d9194]
test esi, esi
jns 0x51d27f
xor eax, eax
mov ecx, 0x5d9194
xchg dword [ecx], eax
mov esi, dword [0x5d9194]
test esi, esi
je 0x51d2e0
mov ecx, dword [0x5d91a8]
mov eax, 0xb60b60b7
inc ecx
imul ecx
add edx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0xb4
sub ecx, eax
mov dword [0x5d91a8], ecx
jne 0x51d2e0
mov eax, dword [0xa0cdb0]
test eax, eax
je 0x51d2e5
mov cl, byte [eax + 8]
test esi, esi
js 0x51d2e5
movzx eax, cl
mov ecx, 0x7509e0
mov word [esp + 0x30], ax
lea eax, [esp + 0x2c]
push 0xc
push eax
mov dword [esp + 0x34], 0x18800cc1
mov dword [esp + 0x3c], esi
call fcn.00440610
mov eax, dword [0xa0cdb0]
cmp dword [0x5ddcf8], 0
je 0x51d33f
test eax, eax
jne 0x51d2f9
mov eax, 0xffff
jmp 0x51d2fd
movzx eax, byte [eax + 8]
mov word [esp + 0x30], ax
mov ecx, 0x7509e0
mov eax, dword [0x61f4ac]
mov dword [esp + 0x34], eax
mov eax, dword [0x61f4b0]
mov dword [esp + 0x38], eax
lea eax, [esp + 0x2c]
push 0x10
push eax
mov word [esp + 0x34], 0x10c1
mov byte [esp + 0x36], 0x1e
call fcn.00440610
cmp dword [0x5ddcf8], 0
jne 0x51d383
mov eax, dword [0xa0cdb0]
cmp dword [0x5ddcfc], 0
jne 0x51d383
mov dword [0x5ddcfc], 1
test eax, eax
jne 0x51d35d
mov eax, 0xffff
jmp 0x51d361
movzx eax, byte [eax + 8]
mov word [esp + 0x30], ax
mov ecx, 0x7509e0
push 6
lea eax, [esp + 0x30]
mov word [esp + 0x30], 0x6c1
push eax
mov byte [esp + 0x36], 0x1f
call fcn.00440610
cmp dword [0x5d8fa4], 2
jne 0x51d441
cmp dword [0x5d8f94], 0
jne 0x51d3ad
push str._CastleSiege__CCastleSiege::DataRequest_____m_bFileDataLoadOK__FALSE
push 1
call fcn.005262e0
add esp, 8
jmp 0x51d441
cmp dword [0x5d8fa0], 0
jge 0x51d3c7
push str._CastleSiege__CCastleSiege::DataRequest_____m_iMapSvrGroup___0
push 1
call fcn.005262e0
add esp, 8
jmp 0x51d441
cmp dword [0x5d8fa8], 0
jne 0x51d3e3
call ebx
mov dword [0x5d8fa8], eax
mov ecx, str._CastleSiege__CCastleSiege::DataRequest_____REQUEST_DATA_FIRST
mov eax, 2
jmp 0x51d403
call ebx
sub eax, dword [0x5d8fa8]
cmp eax, 0xbb8
jbe 0x51d441
call ebx
mov dword [0x5d8fa8], eax
mov ecx, str._CastleSiege__CCastleSiege::DataRequest_____REQUEST_DATA_AGAIN
mov eax, 1
push ecx
push eax
call fcn.005262e0
mov eax, dword [0x5d8fa0]
add esp, 8
test eax, eax
js 0x51d441
mov word [esp + 0x30], ax
mov ecx, 0x7509e0
mov eax, dword [0x5d8fac]
mov dword [esp + 0x34], eax
lea eax, [esp + 0x2c]
push 0xc
push eax
mov word [esp + 0x34], 0xcc1
mov byte [esp + 0x36], 0x81
call fcn.00440610
mov eax, dword [0x5d8fa0]
test eax, eax
js 0x51d49f
mov edx, dword [0x5d9067]
mov ecx, 0x7509e0
mov word [esp + 0x30], ax
mov eax, dword [0x5d8fb0]
mov dword [esp + 0x34], eax
mov eax, dword [0x5d9080]
mov dword [esp + 0x38], eax
mov eax, dword [0x5d9084]
mov dword [esp + 0x3c], eax
mov eax, dword [0x5d9088]
mov dword [esp + 0x40], eax
mov eax, dword [0x5d9063]
mov dword [esp + 0x44], eax
lea eax, [esp + 0x2c]
push 0x20
push eax
mov dword [esp + 0x34], 0x178020c1
mov dword [esp + 0x50], edx
call fcn.00440610
call fcn.004c7220
mov esi, 0xdac
nop dword [eax]
mov edi, dword [esi*4 + 0x20a514c]
cmp dword [edi + 4], 3
jne 0x51d5be
movzx eax, word [edi + 0x78]
cmp eax, 1
je 0x51d4d3
cmp eax, 6
jne 0x51d5be
cmp byte [edi + 0xa], 0
jg 0x51d5be
cmp byte [edi + 0x9c0], 0
jne 0x51d5be
mov dword [esp + 0x28], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x2c], 0
call ebx
imul ecx, dword [0xbdcd6c], 0xea60
sub eax, dword [edi + 0x720]
cmp eax, ecx
jb 0x51d533
call dword [esp + 0x24]
mov dword [edi + 0x720], eax
mov eax, dword [edi + 0x644]
mov eax, dword [eax*4 + 0xbdcd70]
mov dword [esp + 0x28], eax
call dword [esp + 0x24]
imul ecx, dword [0xbdcd80], 0xea60
sub eax, dword [edi + 0x724]
cmp eax, ecx
jb 0x51d566
call dword [esp + 0x24]
mov dword [edi + 0x724], eax
mov eax, dword [edi + 0x644]
mov eax, dword [eax*4 + 0xbdcd84]
mov dword [esp + 0x18], eax
call dword [esp + 0x24]
imul ecx, dword [0xbdcd94], 0xea60
sub eax, dword [edi + 0x728]
cmp eax, ecx
jb 0x51d597
call dword [esp + 0x24]
mov dword [edi + 0x728], eax
mov eax, dword [edi + 0x644]
mov ecx, dword [eax*4 + 0xbdcd98]
jmp 0x51d59b
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
test edx, edx
jg 0x51d5af
test eax, eax
jg 0x51d5af
test ecx, ecx
jle 0x51d5be
push ecx
push 0
push ecx
mov ecx, dword [edi]
push eax
call fcn.004740a0
add esp, 0x10
mov ebx, dword [esp + 0x24]
inc esi
cmp esi, 0x1194
jl 0x51d4b0
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00529f01
mov esp, ebp
pop ebp
ret