Function at 0x40e970
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x442008]
xor eax, ebp
mov dword [ebp - 4], eax
movzx eax, word [ecx + 4]
movq xmm0, qword [ecx + 6]
mov dword [ebp - 0x58], edx
lea edx, [ecx + 6]
mov word [ebp - 0x50], ax
movzx eax, word [edx + 8]
push ebx
mov word [ebp - 0x46], ax
mov al, byte [edx + 0xa]
push esi
push edi
mov byte [ebp - 0x44], al
lea edi, [ecx + 0x11]
mov word [ebp - 0x54], 0x12c1
xor eax, eax
mov byte [ebp - 0x52], 3
mov dword [ebp - 0x40], edx
movq qword [ebp - 0x4e], xmm0
nop dword [eax + eax]
mov cl, byte [edi + eax]
cmp cl, 0x20
je 0x40ebf5
cmp cl, 0x22
je 0x40ebf5
cmp cl, 0x27
je 0x40ebf5
inc eax
cmp eax, 0xb
jl 0x40e9c0
push edi
push edx
push str.EXEC_WZ_DeleteCharacter__s__s
push 0x447690
call fcn.00416db0
add esp, 0x10
test al, al
je 0x40ebf5
push dword [0x44769c]
mov esi, dword [sym.imp.ODBC32.dll_SQLFetch]
call esi
cmp ax, 0x64
je 0x40ebf5
push 0x4482be
call fcn.00420b26
add esp, 4
mov bl, al
mov byte [ebp - 0x43], bl
push dword [0x44769c]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x44769c]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
cmp bl, 1
jne 0x40ec13
push 0x37
lea eax, [ebp - 0x3c]
push 0
push eax
call fcn.0041b210
add esp, 0xc
push dword [ebp - 0x40]
push str.SELECT__FROM_AccountCharacter_WHERE_Id_s
push 0x447690
call fcn.00416db0
add esp, 0xc
test al, al
je 0x40ebea
push dword [0x44769c]
call esi
cmp ax, 0x64
je 0x40ebea
push str.GameID1
call fcn.00417040
cmp eax, 0xffffffff
je 0x40eab4
shl eax, 0xd
push 0xa
add eax, 0x4482be
push eax
lea eax, [ebp - 0x3c]
push 0xb
push eax
call fcn.00423e56
add esp, 0x10
push str.GameID2
call fcn.00417040
cmp eax, 0xffffffff
jne 0x40ead7
xorps xmm0, xmm0
mov word [ebp - 0x29], 0
movq qword [ebp - 0x31], xmm0
mov byte [ebp - 0x27], 0
jmp 0x40eaf0
shl eax, 0xd
push 0xa
add eax, 0x4482be
push eax
lea eax, [ebp - 0x31]
push 0xb
push eax
call fcn.00423e56
add esp, 0x10
push str.GameID3
call fcn.00417040
cmp eax, 0xffffffff
jne 0x40eb13
xorps xmm0, xmm0
mov word [ebp - 0x1e], 0
movq qword [ebp - 0x26], xmm0
mov byte [ebp - 0x1c], 0
jmp 0x40eb2c
shl eax, 0xd
push 0xa
add eax, 0x4482be
push eax
lea eax, [ebp - 0x26]
push 0xb
push eax
call fcn.00423e56
add esp, 0x10
push str.GameID4
call fcn.00417040
cmp eax, 0xffffffff
jne 0x40eb4f
xorps xmm0, xmm0
mov word [ebp - 0x13], 0
movq qword [ebp - 0x1b], xmm0
mov byte [ebp - 0x11], 0
jmp 0x40eb68
shl eax, 0xd
push 0xa
add eax, 0x4482be
push eax
lea eax, [ebp - 0x1b]
push 0xb
push eax
call fcn.00423e56
add esp, 0x10
push str.GameID5
call fcn.00417040
cmp eax, 0xffffffff
jne 0x40eb8b
xorps xmm0, xmm0
mov word [ebp - 8], 0
movq qword [ebp - 0x10], xmm0
mov byte [ebp - 6], 0
jmp 0x40eba4
shl eax, 0xd
push 0xa
add eax, 0x4482be
push eax
lea eax, [ebp - 0x10]
push 0xb
push eax
call fcn.00423e56
add esp, 0x10
call fcn.00417020
xor ebx, ebx
lea esi, [ebp - 0x3c]
nop
push edi
push esi
call fcn.0041d8c5
add esp, 8
test eax, eax
je 0x40ebc9
inc ebx
add esi, 0xb
cmp ebx, 5
jl 0x40ebb0
jmp 0x40ec13
push dword [ebp - 0x40]
movzx eax, bl
inc eax
push eax
push str.UPDATE_AccountCharacter_SET_GameID_dNULL_WHERE_Id_s
push 0x447690
call fcn.00416db0
add esp, 0x10
call fcn.00417020
jmp 0x40ec13
call fcn.00417020
mov byte [ebp - 0x43], 1
jmp 0x40ec13
push dword [0x44769c]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x44769c]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov byte [ebp - 0x43], 0
push 0x12
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x58]
call fcn.004182a0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004198d7
mov esp, ebp
pop ebp
ret