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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
mov eax, dword [0x57a040]
xor eax, esp
mov dword [esp + 0x20], eax
cmp dword [0xbda900], 0
mov edx, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [esp + 0x14], esi
je 0x51af1d
mov ebx, dword [esi*4 + 0x20a514c]
test esi, esi
js 0x51af1d
cmp esi, 0x1194
jge 0x51af1d
cmp dword [ebx + 4], 3
jne 0x51af1d
movzx eax, word [ebx + 0x78]
cmp eax, 1
je 0x51ab35
cmp eax, 6
jne 0x51af1d
cmp byte [ebx + 0xa], 0
jg 0x51af1d
cmp byte [ebx + 0x9c0], 0
jne 0x51af1d
movzx ecx, byte [edx + 3]
movzx eax, byte [edx + 4]
shl ecx, 8
or ecx, eax
mov dword [esp + 0x10], ecx
cmp ecx, 0x1194
jae 0x51af1d
mov edi, dword [ecx*4 + 0x20a514c]
cmp dword [edi + 4], 3
jne 0x51af1d
movzx eax, word [edi + 0x78]
cmp eax, 1
je 0x51ab8c
cmp eax, 6
jne 0x51af1d
cmp byte [edi + 0xa], 0
jg 0x51af1d
cmp byte [edi + 0x9c0], 0
jne 0x51af1d
test byte [ebx + 0x384], 3
jne 0x51af1d
test byte [edi + 0x384], 3
jne 0x51af1d
cmp byte [ebx + 0x3b5], 0
jne 0x51af1d
cmp byte [edi + 0x3b5], 0
jne 0x51af1d
movzx eax, byte [ebx + 0x149]
mov ecx, 0x9f436c
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.00405650
mov eax, dword [esp + 0x20]
mov ecx, dword [0x9f436c]
cmp byte [eax + 0xd], 0
jne 0x51ac0f
mov edx, dword [esp + 0xc]
cmp edx, dword [eax + 0x10]
jge 0x51ac11
mov eax, ecx
cmp eax, ecx
je 0x51ac27
mov ecx, dword [eax + 0x48]
cmp ecx, 0xffffffff
je 0x51ac27
xor eax, eax
cmp ecx, 1
sete al
jmp 0x51ac2c
mov eax, dword [0xbda900]
test eax, eax
je 0x51aee3
mov al, byte [edi + 0x149]
cmp al, 0x28
je 0x51aee3
cmp al, 9
je 0x51aee3
cmp al, 0x20
je 0x51aee3
cmp al, 0xb
jb 0x51aca2
cmp al, 0x11
jbe 0x51aee3
cmp al, 0x34
je 0x51aee3
cmp al, 0x17
jbe 0x51aee3
cmp al, 0x35
je 0x51aee3
cmp al, 0x2d
jb 0x51aca2
cmp al, 0x32
jbe 0x51aee3
cmp al, 0x40
je 0x51aee3
cmp al, 0x41
jb 0x51aca2
cmp al, 0x44
jbe 0x51aee3
cmp al, 0x45
jb 0x51aca2
cmp al, 0x48
jbe 0x51aee3
movsx ecx, word [edi + 0x144]
movsx edx, word [ebx + 0x144]
lea eax, [ecx - 2]
cmp edx, eax
jl 0x51aee3
lea eax, [ecx + 2]
cmp edx, eax
jg 0x51aee3
movsx ecx, word [edi + 0x146]
movsx edx, word [ebx + 0x146]
lea eax, [ecx - 2]
cmp edx, eax
jl 0x51aee3
lea eax, [ecx + 2]
cmp edx, eax
jg 0x51aee3
cmp byte [ebx + 0x400], 0
jne 0x51aee3
cmp byte [edi + 0x400], 0
jne 0x51aee3
cmp dword [0xbda8fc], 1
jne 0x51adf9
cmp byte [ebx + 0x13d], 5
jl 0x51adab
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0x35d
push eax
lea eax, [esp + 0x1c]
mov ecx, 0xa9b83c
push eax
call fcn.00405650
mov eax, dword [esp + 0x20]
mov ecx, dword [0xa9b83c]
cmp byte [eax + 0xd], 0
jne 0x51ad53
cmp dword [eax + 0x10], 0x35d
jle 0x51ad55
mov eax, ecx
cmp eax, ecx
jne 0x51ad78
push 0x35d
push str.Could_not_find_message__d_
push 0xa9b7bc
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov eax, 0xa9b7bc
jmp 0x51ad7b
add eax, 0x18
push eax
push 0
push 0
push 0
push 0
push 0
push 1
push dword [ebx]
push 0xb90558
call fcn.004cdc70
add esp, 0x24
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.00529f01
mov esp, ebp
pop ebp
ret 8
cmp byte [edi + 0x13d], 5
jl 0x51adf9
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0x35e
push eax
lea eax, [esp + 0x1c]
mov ecx, 0xa9b83c
push eax
call fcn.00405650
mov eax, dword [esp + 0x20]
mov ecx, dword [0xa9b83c]
cmp byte [eax + 0xd], 0
jne 0x51ade9
cmp dword [eax + 0x10], 0x35e
jle 0x51adeb
mov eax, ecx
cmp eax, ecx
jne 0x51ad78
push 0x35e
jmp 0x51ad5e
test byte [edi + 0x3e4], 1
je 0x51aee3
mov eax, dword [esp + 0x10]
cmp eax, 0x1193
jbe 0x51ae3f
push eax
push 0xd0
push str.E:Work_S6_Free_Edition_UPDATE_1.0UPDATE_1.0GameServerGameServerTrade.cpp
push str.Error_:__s__d___d_
push 0
call fcn.005262e0
add esp, 0x14
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.00529f01
mov esp, ebp
pop ebp
ret 8
cmp eax, esi
je 0x51af1d
push eax
push esi
mov ecx, 0xbf8ca0
call fcn.00413160
cmp eax, 1
je 0x51af1d
mov eax, dword [ebx + 0x384]
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
and eax, 0xffff0041
or eax, 0x41
mov dword [ebx + 0x384], eax
call esi
mov dword [ebx + 0x388], eax
mov eax, dword [esp + 0x10]
mov word [ebx + 0x2b0], ax
mov eax, dword [edi + 0x384]
and eax, 0xffff0041
or eax, 0x41
mov dword [edi + 0x384], eax
call esi
mov dword [edi + 0x388], eax
mov eax, dword [esp + 0x14]
mov word [edi + 0x2b0], ax
mov ax, word [ebx + 0x8e]
movq xmm0, qword [ebx + 0x86]
mov word [esp + 0x23], ax
lea eax, [esp + 0x18]
push 0xd
push eax
push dword [esp + 0x18]
mov word [esp + 0x24], 0xdc3
mov byte [esp + 0x26], 0x36
movq qword [esp + 0x27], xmm0
jmp 0x51af18
mov ax, word [edi + 0x8e]
movq xmm0, qword [edi + 0x86]
mov word [esp + 0x24], ax
xor eax, eax
mov word [esp + 0x26], ax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x18]
push 0x14
push eax
push esi
mov dword [esp + 0x24], 0x3714c1
movq qword [esp + 0x28], xmm0
call fcn.005192f0
mov ecx, dword [esp + 0x2c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00529f01
mov esp, ebp
pop ebp
ret 8