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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
mov eax, dword [0x57a040]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
push edi
xor edi, edi
nop dword [eax]
mov ebx, edi
mov dword [esp + 0x14], ebx
mov esi, dword [ebx*4 + 0x20a514c]
mov dword [esp + 0x10], esi
cmp dword [esi + 4], 3
jne 0x4d236c
mov cl, byte [esi + 0x214]
xor edx, edx
cmp cl, 3
movzx eax, cl
cmovne edx, eax
cmp dword [esi + 0x200], 1
mov byte [esi + 0x214], dl
jne 0x4d1cfc
mov cl, byte [esi + 0x217]
xor edx, edx
cmp cl, 3
movzx eax, cl
mov dword [esi + 0x200], 2
cmovne edx, eax
mov byte [esi + 0x217], dl
cmp word [esi + 0x78], 2
jne 0x4d1f86
cmp byte [esi + 0x216], 2
mov edi, ebx
jne 0x4d236e
cmp dword [esi + 0xe40], 0
mov byte [esi + 0x254], 0
je 0x4d1d33
cmp dword [esi + 0xe58], 0
jne 0x4d236e
mov cl, byte [esi + 0x149]
cmp cl, 0xb
jb 0x4d1dd8
cmp cl, 0x11
jbe 0x4d1d4c
cmp cl, 0x34
jne 0x4d1d6d
mov ax, word [esi + 0xcc]
mov edx, 0x83
sub ax, dx
cmp ax, 3
ja 0x4d1d6d
mov ecx, dword [esi]
call fcn.0051f250
jmp 0x4d236c
cmp cl, 0x12
jb 0x4d1dd8
cmp cl, 0x17
jbe 0x4d1d61
cmp cl, 0x35
je 0x4d1d61
cmp cl, 0x41
jae 0x4d1db1
cmp cl, 0x22
jne 0x4d1d95
cmp dword [0x61f4ac], 3
mov edi, ebx
je 0x4d236e
mov edi, ebx
cmp cl, 0x27
je 0x4d236e
cmp cl, 0x3a
jne 0x4d1dd8
mov ecx, dword [esi]
call fcn.0051f250
jmp 0x4d236c
cmp cl, 0x44
ja 0x4d1dc2
mov ecx, dword [esi]
call fcn.0051f250
jmp 0x4d236c
cmp cl, 0x45
jb 0x4d1dd8
cmp cl, 0x48
ja 0x4d1dd8
mov ecx, dword [esi]
call fcn.0051f250
jmp 0x4d236c
movzx eax, word [esi + 0x316]
cmp ax, 0x3c
je 0x4d1d61
cmp ax, 0x3d
je 0x4d1d61
cmp ax, 0x3e
jne 0x4d1e4f
movzx eax, word [esi + 0xcc]
mov edx, 0x127
mov ecx, eax
cmp ax, dx
jne 0x4d1e18
mov ecx, dword [esi]
call fcn.0051f250
jmp 0x4d236c
lea eax, [ecx - 0x12c]
cmp ax, 3
ja 0x4d1e30
mov ecx, dword [esi]
call fcn.0051f250
jmp 0x4d236c
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esi + 0xf0c]
cmp eax, 0x927c0
jbe 0x4d1e4f
mov ecx, dword [esi]
call fcn.0051f250
jmp 0x4d236c
movzx eax, word [esi + 0xcc]
mov edx, 0x116
mov ecx, eax
cmp ax, dx
jne 0x4d1eab
mov eax, dword [esi]
cmp eax, 0x1193
ja 0x4d1e9f
mov edi, dword [eax*4 + 0x20a514c]
mov eax, dword [edi + 0x290]
test eax, eax
je 0x4d1e9f
add eax, 4
push eax
push str._CastleSiege__LifeStone_is_broken_____s_
push 0
call fcn.005262e0
mov eax, dword [edi + 0x290]
add esp, 0xc
mov dword [eax + 0x734], 0
mov ecx, dword [esi]
call fcn.0051f250
jmp 0x4d236c
mov edx, 0x11e
cmp ax, dx
je 0x4d2160
mov edx, 0x11f
cmp ax, dx
je 0x4d2160
lea eax, [ecx - 0x287]
cmp ax, 3
ja 0x4d1edf
mov ecx, dword [esi]
call fcn.0051f250
jmp 0x4d236c
lea eax, [ecx - 0x28c]
cmp ax, 5
ja 0x4d1ef7
mov ecx, dword [esi]
call fcn.0051f250
jmp 0x4d236c
lea eax, [ecx - 0x2a2]
cmp ax, 3
ja 0x4d1f0f
mov ecx, dword [esi]
call fcn.0051f250
jmp 0x4d236c
movd xmm0, dword [esi + 0x14c]
cvtdq2ps xmm0, xmm0
push esi
mov byte [esi + 0x7a], 1
mov byte [esi + 0x205], 0
mov byte [esi + 0x214], 0
addss xmm0, dword [esi + 0x100]
movss dword [esi + 0xfc], xmm0
movd xmm0, dword [esi + 0x150]
cvtdq2ps xmm0, xmm0
addss xmm0, dword [esi + 0x10c]
movss dword [esi + 0x108], xmm0
call fcn.00478880
mov ecx, esi
mov edi, ebx
call fcn.004bc880
test al, al
je 0x4d236e
mov ecx, esi
mov byte [esi + 0x216], 0
mov dword [esi + 0x200], 1
call fcn.00520340
cmp word [esi + 0x78], 1
mov edi, ebx
jne 0x4d236e
cmp byte [esi + 0x216], 2
jne 0x4d236e
movd xmm0, dword [esi + 0x14c]
mov eax, dword [esi + 0x130]
add eax, dword [esi + 0x12c]
cvtdq2ps xmm0, xmm0
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x128], eax
mov eax, dword [esi + 0x15c]
add eax, dword [esi + 0x158]
mov byte [esi + 0x7a], 1
addss xmm0, dword [esi + 0x100]
mov byte [esi + 0x205], 0
mov byte [esi + 0x214], 0
mov dword [esi + 0x154], eax
mov dword [esi + 0x6c4], 0
movss dword [esi + 0xfc], xmm0
movd xmm0, dword [esi + 0x150]
cvtdq2ps xmm0, xmm0
mov dword [esi + 0x6c8], 0xffffffff
addss xmm0, dword [esi + 0x10c]
movss dword [esi + 0x108], xmm0
call edi
mov dword [esi + 0x72c], eax
call edi
mov dword [esi + 0x730], eax
call edi
mov dword [esi + 0x734], eax
call edi
mov dword [esi + 0x738], eax
xorps xmm0, xmm0
movzx eax, byte [esi + 0x149]
mov ecx, esi
mov dword [esi + 0x9a4], eax
movsx eax, word [esi + 0x144]
mov dword [esi + 0x9a8], eax
movsx eax, word [esi + 0x146]
mov dword [esi + 0x9a0], 1
mov dword [esi + 0x9ac], eax
movups xmmword [esi + 0x26c], xmm0
mov dword [esi + 0x27c], 0
call fcn.00525280
push esi
call fcn.00478880
cmp dword [esi + 0x718], 0
je 0x4d20e0
push 0x10
lea eax, [esp + 0x28]
mov dword [esi + 0x718], 0
push eax
push dword [esi]
mov dword [esi + 0x71c], 0
mov dword [esp + 0x30], 0x51bf10c1
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov byte [esp + 0x3c], 1
call fcn.005192f0
mov ecx, esi
call fcn.005202c0
mov eax, dword [esi]
lea ecx, [eax + eax*4]
shl ecx, 3
mov edi, dword [ecx + 0xcd73c4]
test edi, edi
js 0x4d2149
cmp edi, 0x1194
jge 0x4d2149
mov eax, dword [edi*4 + 0x20a514c]
cmp word [eax + 0xcc], 4
jne 0x4d2149
cmp dword [ecx + 0xcd73d0], 0
je 0x4d2149
mov dword [ecx + 0xcd73d0], 0
lea edx, [esp + 0x1c]
push 7
mov ecx, edi
mov dword [esp + 0x20], 0xa707c1
mov word [esp + 0x24], 0xff00
mov byte [esp + 0x26], 0xff
call fcn.00526480
add esp, 4
movsx eax, byte [esi + 0x215]
cmp eax, 3
ja case.default.0x4d2159
jmp dword [eax*4 + 0x4d24d0]
mov ecx, dword [esi]
cmp ecx, 0x1193
ja 0x4d2199
mov eax, dword [0xa9b7b4]
dec eax
push eax
push ecx
push str._CastleSiege__Mercenary_is_broken___d______d_
push 0
mov dword [0xa9b7b4], eax
call fcn.005262e0
add esp, 0x10
cmp dword [0xa9b7b4], 0
jge 0x4d2199
mov dword [0xa9b7b4], 0
mov ecx, dword [esi]
call fcn.0051f250
jmp 0x4d236c
push esi
mov ecx, 0x6509a4
call fcn.004d3780
test al, al
jne case.default.0x4d2159
movzx ecx, byte [esi + 0x149]
lea eax, [esi + 0x146]
push eax
lea eax, [esi + 0x144]
push eax
push ecx
imul ecx, ecx, 0x15d38
add ecx, 0xd2f370
call fcn.004b3300
jmp case.default.0x4d2159
mov eax, dword [esi + 0x290]
test eax, eax
je 0x4d2260
cmp byte [eax + 0x592], 1
jne 0x4d2260
movzx eax, byte [eax + 0x593]
cmp eax, 1
jae case.default.0x4d2159
mov ebx, dword [eax*4 + 0xbf8c98]
mov eax, 1
mov esi, dword [ebx + 0x40]
sub esi, dword [ebx + 0x38]
mov edi, dword [ebx + 0x44]
sub edi, dword [ebx + 0x3c]
cmp esi, 1
cmovl esi, eax
cmp edi, eax
cmovl edi, eax
call fcn.00526930
cdq
idiv esi
movzx eax, word [ebx + 0x38]
mov esi, dword [esp + 0x10]
add ax, dx
mov word [esi + 0x144], ax
call fcn.00526930
cdq
idiv edi
movzx eax, word [ebx + 0x3c]
mov ebx, dword [esp + 0x14]
add ax, dx
mov word [esi + 0x146], ax
jmp case.default.0x4d2159
push ecx
lea eax, [esi + 0x146]
push eax
lea eax, [esi + 0x144]
push eax
movzx eax, byte [esi + 0x149]
imul ecx, eax, 0x15d38
add ecx, 0xd2f370
call fcn.004b33f0
jmp case.default.0x4d2159
push esi
call fcn.004752c0
movzx eax, word [esi + 0x146]
mov edi, dword [esi]
movzx ecx, byte [esi + 0x149]
mov dword [esp + 0x14], eax
movzx eax, word [esi + 0x144]
mov dword [esp + 0x10], eax
mov eax, dword [edi*4 + 0x20a514c]
mov dword [esp + 0x18], ecx
movzx eax, word [eax + 0x9ca]
push eax
push ecx
push edi
call fcn.004b5840
movzx ecx, ax
mov eax, dword [edi*4 + 0x20a514c]
mov word [eax + 0x9c8], cx
cmp cx, 0xffff
je 0x4d2310
mov eax, dword [edi*4 + 0x20a514c]
movzx edx, word [eax + 0x9c8]
movsx eax, dx
cmp eax, dword [0xbda7bc]
je 0x4d2310
push dword [esp + 0x14]
mov ecx, edi
push dword [esp + 0x14]
push dword [esp + 0x20]
call fcn.004ac8f0
add esp, 0xc
jmp 0x4d236c
movzx eax, word [esi + 0x144]
mov ecx, esi
mov word [esi + 0x166], ax
movzx eax, word [esi + 0x146]
mov word [esi + 0x168], ax
mov dword [esi + 0x174], 0
mov dword [esi + 0x170], 0
mov byte [esi + 0x178], 0
mov byte [esi + 0x216], 0
mov dword [esi + 0x200], 1
call fcn.004e9b20
mov ecx, esi
call fcn.00520340
push esi
call fcn.004d3660
mov edi, ebx
inc edi
cmp edi, 0x1194
jl 0x4d1ca0
mov edi, 0xd450a0
mov edx, 0x2000
nop word [eax + eax]
lea esi, [edi - 0x15d08]
mov ebx, 0x12c
nop dword [eax + eax]
movzx eax, word [esi]
mov ecx, eax
test ax, ax
js 0x4d2472
cmp cx, dx
jge 0x4d2472
mov eax, dword [esi + 0x10c]
sub eax, 1
je 0x4d24c4
sub eax, 7
je 0x4d24b1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, dword [esi + 0x110]
jbe 0x4d246d
mov eax, dword [edi]
cmp eax, 0x2d
jl 0x4d24a5
cmp eax, 0x32
jg 0x4d24a5
add eax, 0xffffffd3
imul eax, eax, 0x2ac
mov eax, dword [eax + 0x9d2b98]
cmp eax, 0xffffffff
je 0x4d24a5
mov ecx, 0x1c40
cmp word [esi], cx
jne 0x4d24a5
cmp dword [esi - 4], eax
jne 0x4d24a5
mov eax, dword [edi]
add eax, 0xffffffd3
mov dword [esi + 0x10c], 8
imul eax, eax, 0x2ac
mov dword [eax + 0x9d2b98], 0xffffffff
mov dword [eax + 0x9d2b9c], 0xffffffff
mov dword [eax + 0x9d2ba0], 0xffffffff
mov dword [eax + 0x9d2ba4], 0xffffffff
lea eax, [eax + 0x9d2b6c]
push eax
call fcn.0048c620
mov edx, 0x2000
add esi, 0x124
sub ebx, 1
jne 0x4d23a0
add edi, 0x15d38
cmp edi, 0x16a5eb0
jl 0x4d2390
mov ecx, dword [esp + 0x34]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00529f01
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x10c], 8
jmp 0x4d246d
lea ecx, [esi - 4]
call fcn.00493c10
mov word [esi + 0x10a], 0
jmp 0x4d2472
mov dword [esi + 0x10c], 2
jmp 0x4d2472