Function at 0x40c740
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x43d008]
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 0x40c9c5
cmp cl, 0x22
je 0x40c9c5
cmp cl, 0x27
je 0x40c9c5
inc eax
cmp eax, 0xb
jl 0x40c790
push edi
push edx
push str.EXEC_WZ_DeleteCharacter__s__s
push 0x442698
call fcn.00413700
add esp, 0x10
test al, al
je 0x40c9c5
push dword [0x4426a4]
mov esi, dword [sym.imp.ODBC32.dll_SQLFetch]
call esi
cmp ax, 0x64
je 0x40c9c5
push 0x443e7e
call fcn.0041acc9
add esp, 4
mov bl, al
mov byte [ebp - 0x43], bl
push dword [0x4426a4]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x4426a4]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
cmp bl, 1
jne 0x40c9e3
push 0x37
lea eax, [ebp - 0x3c]
push 0
push eax
call fcn.00417d10
add esp, 0xc
push dword [ebp - 0x40]
push str.SELECT__FROM_AccountCharacter_WHERE_Id_s
push 0x442698
call fcn.00413700
add esp, 0xc
test al, al
je 0x40c9ba
push dword [0x4426a4]
call esi
cmp ax, 0x64
je 0x40c9ba
push str.GameID1
call fcn.00413990
cmp eax, 0xffffffff
je 0x40c884
shl eax, 0xd
push 0xa
add eax, 0x443e7e
push eax
lea eax, [ebp - 0x3c]
push 0xb
push eax
call fcn.00420956
add esp, 0x10
push str.GameID2
call fcn.00413990
cmp eax, 0xffffffff
jne 0x40c8a7
xorps xmm0, xmm0
mov word [ebp - 0x29], 0
movq qword [ebp - 0x31], xmm0
mov byte [ebp - 0x27], 0
jmp 0x40c8c0
shl eax, 0xd
push 0xa
add eax, 0x443e7e
push eax
lea eax, [ebp - 0x31]
push 0xb
push eax
call fcn.00420956
add esp, 0x10
push str.GameID3
call fcn.00413990
cmp eax, 0xffffffff
jne 0x40c8e3
xorps xmm0, xmm0
mov word [ebp - 0x1e], 0
movq qword [ebp - 0x26], xmm0
mov byte [ebp - 0x1c], 0
jmp 0x40c8fc
shl eax, 0xd
push 0xa
add eax, 0x443e7e
push eax
lea eax, [ebp - 0x26]
push 0xb
push eax
call fcn.00420956
add esp, 0x10
push str.GameID4
call fcn.00413990
cmp eax, 0xffffffff
jne 0x40c91f
xorps xmm0, xmm0
mov word [ebp - 0x13], 0
movq qword [ebp - 0x1b], xmm0
mov byte [ebp - 0x11], 0
jmp 0x40c938
shl eax, 0xd
push 0xa
add eax, 0x443e7e
push eax
lea eax, [ebp - 0x1b]
push 0xb
push eax
call fcn.00420956
add esp, 0x10
push str.GameID5
call fcn.00413990
cmp eax, 0xffffffff
jne 0x40c95b
xorps xmm0, xmm0
mov word [ebp - 8], 0
movq qword [ebp - 0x10], xmm0
mov byte [ebp - 6], 0
jmp 0x40c974
shl eax, 0xd
push 0xa
add eax, 0x443e7e
push eax
lea eax, [ebp - 0x10]
push 0xb
push eax
call fcn.00420956
add esp, 0x10
call fcn.00413970
xor ebx, ebx
lea esi, [ebp - 0x3c]
nop
push edi
push esi
call fcn.0041a3c5
add esp, 8
test eax, eax
je 0x40c999
inc ebx
add esi, 0xb
cmp ebx, 5
jl 0x40c980
jmp 0x40c9e3
push dword [ebp - 0x40]
movzx eax, bl
inc eax
push eax
push str.UPDATE_AccountCharacter_SET_GameID_dNULL_WHERE_Id_s
push 0x442698
call fcn.00413700
add esp, 0x10
call fcn.00413970
jmp 0x40c9e3
call fcn.00413970
mov byte [ebp - 0x43], 1
jmp 0x40c9e3
push dword [0x4426a4]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x4426a4]
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.00414e90
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004163e0
mov esp, ebp
pop ebp
ret