Function at 0x40d510
Capabilities:
Reference sql statements

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42ef30
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0xc8
mov eax, dword [0x43e040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x9c], edx
mov edx, ecx
mov dword [ebp - 0x94], edx
movzx eax, word [edx + 4]
lea edi, [edx + 0x11]
movq xmm0, qword [edx + 6]
mov word [ebp - 0xd4], ax
movzx eax, word [edx + 0xe]
mov word [ebp - 0xca], ax
mov al, byte [edx + 0x10]
mov byte [ebp - 0xc8], al
movzx eax, word [edi + 8]
mov word [ebp - 0xbf], ax
mov al, byte [edi + 0xa]
movq qword [ebp - 0xd2], xmm0
movq xmm0, qword [edi]
mov byte [ebp - 0xbd], al
xor eax, eax
mov word [ebp - 0xd8], 0x3ac1
mov byte [ebp - 0xd6], 2
movq qword [ebp - 0xc7], xmm0
mov cl, byte [edi + eax]
cmp cl, 0x20
je 0x40d654
cmp cl, 0x22
je 0x40d654
cmp cl, 0x27
je 0x40d654
inc eax
cmp eax, 0xb
jl 0x40d5c0
mov esi, dword [0x43eac0]
cmp esi, dword [0x43eac4]
je 0x40d609
nop
push esi
push edi
call fcn.004187e0
add esp, 8
test eax, eax
jne 0x40d654
add esi, 0x20
cmp esi, dword [0x43eac4]
jne 0x40d5f0
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x98], esp
push str._a_zA_Z0_9___
call fcn.00401f80
sub esp, 0x18
mov dword [ebp - 4], 0
mov ecx, esp
push edi
call fcn.00401f80
push 0
mov dword [ebp - 4], 0xffffffff
call fcn.00405170
test al, al
jne 0x40d64b
cmp dword [0x5d26fc], 0
je 0x40d654
mov byte [ebp - 0x89], 1
jmp 0x40d65b
mov byte [ebp - 0x89], 0
mov esi, dword [ebp - 0x94]
movaps xmm0, xmmword [0x43a4e0]
push 0x6e
push 0
mov al, byte [esi + 0x1c]
mov byte [ebp - 0xba], al
mov eax, 1
mov word [ebp - 0xa0], ax
lea eax, [ebp - 0x88]
push eax
mov byte [ebp - 0xbb], 0
movups xmmword [ebp - 0xb9], xmm0
movq qword [ebp - 0xa9], xmm0
call fcn.00418c90
add esp, 0xc
cmp byte [ebp - 0x89], 0
je 0x40db19
lea eax, [esi + 6]
push eax
push str.SELECT__FROM_AccountCharacter_WHERE_Id_s
push 0x43edd8
call fcn.00414560
add esp, 0xc
test al, al
je 0x40db19
push dword [0x43ede4]
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x40db19
push str.GameID1
call fcn.004147b0
cmp eax, 0xffffffff
je 0x40d712
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x88]
push 0xb
push eax
call fcn.00420d9d
add esp, 0x10
push str.GameID2
call fcn.004147b0
cmp eax, 0xffffffff
jne 0x40d735
xorps xmm0, xmm0
mov word [ebp - 0x75], 0
movq qword [ebp - 0x7d], xmm0
mov byte [ebp - 0x73], 0
jmp 0x40d74e
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x7d]
push 0xb
push eax
call fcn.00420d9d
add esp, 0x10
push str.GameID3
call fcn.004147b0
cmp eax, 0xffffffff
jne 0x40d771
xorps xmm0, xmm0
mov word [ebp - 0x6a], 0
movq qword [ebp - 0x72], xmm0
mov byte [ebp - 0x68], 0
jmp 0x40d78a
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x72]
push 0xb
push eax
call fcn.00420d9d
add esp, 0x10
push str.GameID4
call fcn.004147b0
cmp eax, 0xffffffff
jne 0x40d7ad
xorps xmm0, xmm0
mov word [ebp - 0x5f], 0
movq qword [ebp - 0x67], xmm0
mov byte [ebp - 0x5d], 0
jmp 0x40d7c6
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x67]
push 0xb
push eax
call fcn.00420d9d
add esp, 0x10
push str.GameID5
call fcn.004147b0
cmp eax, 0xffffffff
jne 0x40d7e9
xorps xmm0, xmm0
mov word [ebp - 0x54], 0
movq qword [ebp - 0x5c], xmm0
mov byte [ebp - 0x52], 0
jmp 0x40d802
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x5c]
push 0xb
push eax
call fcn.00420d9d
add esp, 0x10
push str.GameID6
call fcn.004147b0
cmp eax, 0xffffffff
jne 0x40d825
xorps xmm0, xmm0
mov word [ebp - 0x49], 0
movq qword [ebp - 0x51], xmm0
mov byte [ebp - 0x47], 0
jmp 0x40d83e
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x51]
push 0xb
push eax
call fcn.00420d9d
add esp, 0x10
push str.GameID7
call fcn.004147b0
cmp eax, 0xffffffff
jne 0x40d861
xorps xmm0, xmm0
mov word [ebp - 0x3e], 0
movq qword [ebp - 0x46], xmm0
mov byte [ebp - 0x3c], 0
jmp 0x40d87a
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x46]
push 0xb
push eax
call fcn.00420d9d
add esp, 0x10
push str.GameID8
call fcn.004147b0
cmp eax, 0xffffffff
jne 0x40d89d
xorps xmm0, xmm0
mov word [ebp - 0x33], 0
movq qword [ebp - 0x3b], xmm0
mov byte [ebp - 0x31], 0
jmp 0x40d8b6
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x3b]
push 0xb
push eax
call fcn.00420d9d
add esp, 0x10
push str.GameID9
call fcn.004147b0
cmp eax, 0xffffffff
jne 0x40d8d9
xorps xmm0, xmm0
mov word [ebp - 0x28], 0
movq qword [ebp - 0x30], xmm0
mov byte [ebp - 0x26], 0
jmp 0x40d8f2
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x30]
push 0xb
push eax
call fcn.00420d9d
add esp, 0x10
push str.GameID10
call fcn.004147b0
cmp eax, 0xffffffff
jne 0x40d915
xorps xmm0, xmm0
mov word [ebp - 0x1d], 0
movq qword [ebp - 0x25], xmm0
mov byte [ebp - 0x1b], 0
jmp 0x40d92e
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x25]
push 0xb
push eax
call fcn.00420d9d
add esp, 0x10
push dword [0x43ede4]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x43ede4]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
xor eax, eax
lea esi, [ebp - 0x88]
mov dword [ebp - 0x90], eax
nop word [eax + eax]
push 0x436e74
push esi
call fcn.0041add0
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x90]
je 0x40d993
inc eax
add esi, 0xb
mov dword [ebp - 0x90], eax
cmp eax, 0xa
jl 0x40d960
mov byte [ebp - 0xbc], 2
jmp 0x40db3a
mov byte [ebp - 0xbb], al
movzx eax, al
mov dword [ebp - 0x98], eax
cmp eax, dword [0x5d2700]
jge 0x40da3a
mov eax, dword [ebp - 0x94]
add eax, 6
push eax
push str.SELECT_MaxCharacter_FROM_AccountCharacter_WHERE_Id_s
push 0x43edd8
call fcn.00414560
add esp, 0xc
test al, al
je 0x40da46
push dword [0x43ede4]
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x40da46
push str.MaxCharacter
call fcn.004147b0
cmp eax, 0xffffffff
jne 0x40d9f7
mov dword [ebp - 0x90], eax
jmp 0x40da0e
shl eax, 0xd
add eax, 0x4405be
push eax
call fcn.0041d9ee
add esp, 4
mov dword [ebp - 0x90], eax
push dword [0x43ede4]
mov esi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
call esi
mov ecx, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push dword [0x43ede4]
call ecx
mov eax, dword [ebp - 0x98]
cmp eax, dword [ebp - 0x90]
jl 0x40da64
mov byte [ebp - 0xbc], 2
jmp 0x40db3a
push dword [0x43ede4]
mov esi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
call esi
mov ecx, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push dword [0x43ede4]
call ecx
mov ecx, dword [ebp - 0x94]
movzx eax, byte [ecx + 0x1c]
push eax
push edi
lea eax, [ecx + 6]
push eax
push str.EXEC_WZ_CreateCharacter__s__s__d
push 0x43edd8
call fcn.00414560
add esp, 0x14
test al, al
je 0x40db0f
push dword [0x43ede4]
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x40db0f
push 0x4405be
call fcn.0041d9ee
add esp, 4
mov byte [ebp - 0xbc], al
push dword [0x43ede4]
call esi
push 2
push dword [0x43ede4]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
cmp byte [ebp - 0xbc], 1
jne 0x40db3a
mov eax, dword [ebp - 0x94]
add eax, 6
push eax
mov eax, dword [ebp - 0x98]
push edi
inc eax
push eax
push str.UPDATE_AccountCharacter_SET_GameID_d_s_WHERE_Id_s
push 0x43edd8
call fcn.00414560
add esp, 0x14
push dword [0x43ede4]
call esi
push 2
push dword [0x43ede4]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
jmp 0x40db3a
push dword [0x43ede4]
call esi
jmp 0x40db25
push dword [0x43ede4]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x43ede4]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov byte [ebp - 0xbc], 0
movzx eax, byte [ebp - 0xd7]
push eax
lea eax, [ebp - 0xd8]
push eax
push dword [ebp - 0x9c]
call fcn.00415e20
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00417477
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret