Function at 0x4064a0
Capabilities:
Check for time delay via gettickcount
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0xf8
mov eax, dword [0x43f014]
xor eax, esp
mov dword [esp + 0xf4], eax
push esi
mov esi, ecx
mov byte [esp + 7], dl
imul ecx, esi, 0x70
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x20], ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x20]
mov dword [ecx + 0x50cf64], eax
movzx eax, byte [esp + 0xb]
cmp eax, 0x30
ja case.0x4064f5.6
movzx eax, byte [eax + 0x406a44]
jmp dword [eax*4 + 0x406a14]
push 8
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 0x10008c1
push eax
push esi
mov dword [esp + 0x34], 0
call fcn.004095c0
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x20]
add eax, 6
movzx esi, word [edi + 0x38]
movzx edi, word [edi + 4]
push eax
lea ecx, [ecx + 0x50cf28]
push 0x32
push ecx
call fcn.00410f63
mov ecx, dword [esp + 0x2c]
add esp, 0xc
push esi
push edi
lea eax, [ecx + 0x50cf28]
mov word [ecx + 0x50cf5a], di
push eax
push dword [ecx + 0x50cf04]
mov word [ecx + 0x50cf5c], si
push str._ServerManager___d__ServerInfo___s____d____d_
push 0
call fcn.0040a200
add esp, 0x18
pop edi
pop esi
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.0040c25d
mov esp, ebp
pop ebp
ret
mov edx, esi
mov ecx, edi
call fcn.00406a80
pop edi
pop esi
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.0040c25d
mov esp, ebp
pop ebp
ret
movzx eax, word [edi + 4]
lea ecx, [edi + 6]
movq xmm0, qword [ecx]
mov word [esp + 0x10], ax
movzx eax, word [ecx + 8]
mov word [esp + 0x1a], ax
mov al, byte [ecx + 0xa]
mov byte [esp + 0x1c], al
lea eax, [esp + 0x30]
push ecx
push eax
mov word [esp + 0x14], 0x12c1
mov byte [esp + 0x16], 2
movq qword [esp + 0x1a], xmm0
mov byte [esp + 0x25], 1
call fcn.004039c0
test al, al
jne 0x40660b
push 0x12
lea eax, [esp + 0x10]
mov byte [esp + 0x21], 0
push eax
push esi
call fcn.004095c0
pop edi
pop esi
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.0040c25d
mov esp, ebp
pop ebp
ret
mov ax, word [esp + 0x4c]
cmp ax, word [edi + 4]
jne 0x4065e5
mov ecx, dword [esp + 0x20]
mov ax, word [esp + 0x4e]
cmp ax, word [ecx + 0x50cf5c]
jne 0x4065e5
cmp byte [esp + 0x50], 0
je 0x406640
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x54]
cmp eax, 0x7530
jb 0x4065e5
lea eax, [edi + 6]
push eax
push str.EXEC_WZ_DISCONNECT_MEMB__s
push 0x43ff40
call fcn.00408430
add esp, 0xc
push dword [0x43ff4c]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x43ff4c]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 0x12
lea eax, [esp + 0x10]
push eax
push esi
call fcn.004095c0
movups xmm0, xmmword [esp + 0x30]
sub esp, 0x40
mov eax, esp
movups xmmword [eax], xmm0
movups xmm0, xmmword [esp + 0x80]
movups xmmword [eax + 0x10], xmm0
movups xmm0, xmmword [esp + 0x90]
movups xmmword [eax + 0x20], xmm0
movups xmm0, xmmword [esp + 0xa0]
movups xmmword [eax + 0x30], xmm0
call fcn.00403ef0
movzx eax, word [esp + 0x4e]
push eax
lea eax, [esp + 0x3f]
push eax
lea eax, [esp + 0x38]
push eax
push str._AccountInfo__Account_disconnected__Account:__s__IpAddress:__s__GameServerCode:__d_
push 1
push 0x43fb10
call fcn.00407a30
add esp, 0x18
pop edi
pop esi
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.0040c25d
mov esp, ebp
pop ebp
ret
mov edx, esi
mov ecx, edi
call fcn.00407340
pop edi
pop esi
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.0040c25d
mov esp, ebp
pop ebp
ret
mov edx, esi
mov ecx, edi
call fcn.00407530
pop edi
pop esi
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.0040c25d
mov esp, ebp
pop ebp
ret
lea eax, [edi + 6]
push eax
lea eax, [esp + 0x34]
push eax
call fcn.004039c0
test al, al
je case.0x4064f5.6
movzx eax, word [edi + 4]
lea ecx, [edi + 6]
movq xmm0, qword [ecx]
push ecx
push 0x50cd24
push 0x50cd8c
mov word [esp + 0x1c], ax
movzx eax, word [ecx + 8]
push 0x50cd58
mov word [esp + 0x2a], ax
mov al, byte [ecx + 0xa]
push str.SELECT__s_FROM__s_WHERE__s_s
push 0x43ff40
mov word [esp + 0x24], 0x14c1
mov byte [esp + 0x26], 5
movq qword [esp + 0x2a], xmm0
mov byte [esp + 0x34], al
call fcn.00408430
add esp, 0x18
test al, al
je 0x4067ef
push dword [0x43ff4c]
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x4067ef
push 0x50cd58
call fcn.004086d0
push dword [0x43ff4c]
mov word [esp + 0x22], ax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x43ff4c]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 0x14
lea eax, [esp + 0x10]
push eax
push esi
call fcn.004095c0
pop edi
pop esi
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.0040c25d
mov esp, ebp
pop ebp
ret
push dword [0x43ff4c]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x43ff4c]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
xor eax, eax
mov word [esp + 0x1e], ax
lea eax, [esp + 0xc]
push 0x14
push eax
push esi
call fcn.004095c0
pop edi
pop esi
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.0040c25d
mov esp, ebp
pop ebp
ret
lea eax, [edi + 6]
push eax
lea eax, [esp + 0x34]
push eax
call fcn.004039c0
test al, al
je case.0x4064f5.6
movups xmm0, xmmword [esp + 0x30]
xor eax, eax
mov byte [esp + 0x50], 0
mov dword [esp + 0x5c], eax
sub esp, 0x40
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], eax
mov eax, esp
mov dword [esp + 0x94], 0
mov dword [esp + 0x98], 0xffffffff
movups xmmword [eax], xmm0
movups xmm0, xmmword [esp + 0x80]
movups xmmword [eax + 0x10], xmm0
movups xmm0, xmmword [esp + 0x90]
movups xmmword [eax + 0x20], xmm0
movups xmm0, xmmword [esp + 0xa0]
movups xmmword [eax + 0x30], xmm0
call fcn.00403b80
pop edi
pop esi
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.0040c25d
mov esp, ebp
pop ebp
ret
push dword [edi + 0x14]
movzx eax, word [edi + 0x12]
push eax
lea eax, [edi + 6]
push eax
push str.EXEC_WZ_SetAccountLevel__s__d__d
push 0x43ff40
call fcn.00408430
add esp, 0x14
push dword [0x43ff4c]
call dword [sym.imp.ODBC32.dll_SQLFetch]
push dword [0x43ff4c]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x43ff4c]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
pop edi
pop esi
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.0040c25d
mov esp, ebp
pop ebp
ret
movzx eax, word [edi + 4]
mov dword [ecx + 0x50cf68], eax
movzx eax, word [edi + 6]
mov dword [ecx + 0x50cf6c], eax
pop edi
pop esi
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.0040c25d
mov esp, ebp
pop ebp
ret
lea eax, [edi + 3]
push eax
lea eax, [esp + 0x34]
push eax
call fcn.004039c0
test al, al
je case.0x4064f5.6
movzx edx, word [esp + 0x4c]
lea eax, [esp + 0x30]
movzx ecx, word [esp + 0x4e]
push eax
call fcn.004077f0
add esp, 4
pop edi
pop esi
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.0040c25d
mov esp, ebp
pop ebp
ret
lea eax, [edi + 8]
mov word [esp + 0x70], 0x88c1
push eax
lea eax, [esp + 0x7c]
mov byte [esp + 0x76], 0x2f
push 0x7d
push eax
call fcn.00410f63
mov eax, dword [edi + 4]
add esp, 0xc
mov dword [esp + 0x74], eax
xor esi, esi
nop word [eax + eax]
mov ecx, dword [esi + 0x50cf04]
test ecx, ecx
js 0x4069f5
cmp ecx, 0x190
jge 0x4069f5
cmp dword [esi + 0x50cf08], 0
je 0x4069f5
cmp dword [esi + 0x50cf1c], 0xffffffff
je 0x4069f5
movzx eax, byte [esp + 0x71]
push eax
lea eax, [esp + 0x74]
push eax
push ecx
call fcn.004095c0
add esi, 0x70
cmp esi, 0xaf00
jl 0x4069c0
mov ecx, dword [esp + 0xfc]
pop edi
pop esi
xor ecx, esp
call fcn.0040c25d
mov esp, ebp
pop ebp
ret