Function at 0x40b170
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x439008]
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 0x40b432
cmp cl, 0x22
je 0x40b432
cmp cl, 0x27
je 0x40b432
inc eax
cmp eax, 0xb
jl 0x40b1c0
push edi
push edx
push str.EXEC_WZ_DeleteCharacter__s__s
push 0x439d58
call fcn.004112b0
add esp, 0x10
test al, al
je 0x40b432
push dword [0x439d64]
mov esi, dword [sym.imp.ODBC32.dll_SQLFetch]
call esi
cmp ax, 0x64
je 0x40b432
push 0x43b53e
call fcn.0041a6da
add esp, 4
mov bl, al
mov byte [ebp - 0x43], bl
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
cmp bl, 1
jne 0x40b450
push 0x37
lea eax, [ebp - 0x3c]
push 0
push eax
call fcn.004159a0
add esp, 0xc
push dword [ebp - 0x40]
push str.SELECT__FROM_AccountCharacter_WHERE_Id_s
push 0x439d58
call fcn.004112b0
add esp, 0xc
test al, al
je 0x40b412
push dword [0x439d64]
call esi
cmp ax, 0x64
je 0x40b412
push str.GameID1
call fcn.00411500
cmp eax, 0xffffffff
je 0x40b2b4
shl eax, 0xd
push 0xa
add eax, 0x43b53e
push eax
lea eax, [ebp - 0x3c]
push 0xb
push eax
call fcn.0041d9ba
add esp, 0x10
push str.GameID2
call fcn.00411500
cmp eax, 0xffffffff
jne 0x40b2d7
xorps xmm0, xmm0
mov word [ebp - 0x29], 0
movq qword [ebp - 0x31], xmm0
mov byte [ebp - 0x27], 0
jmp 0x40b2f0
shl eax, 0xd
push 0xa
add eax, 0x43b53e
push eax
lea eax, [ebp - 0x31]
push 0xb
push eax
call fcn.0041d9ba
add esp, 0x10
push str.GameID3
call fcn.00411500
cmp eax, 0xffffffff
jne 0x40b313
xorps xmm0, xmm0
mov word [ebp - 0x1e], 0
movq qword [ebp - 0x26], xmm0
mov byte [ebp - 0x1c], 0
jmp 0x40b32c
shl eax, 0xd
push 0xa
add eax, 0x43b53e
push eax
lea eax, [ebp - 0x26]
push 0xb
push eax
call fcn.0041d9ba
add esp, 0x10
push str.GameID4
call fcn.00411500
cmp eax, 0xffffffff
jne 0x40b34f
xorps xmm0, xmm0
mov word [ebp - 0x13], 0
movq qword [ebp - 0x1b], xmm0
mov byte [ebp - 0x11], 0
jmp 0x40b368
shl eax, 0xd
push 0xa
add eax, 0x43b53e
push eax
lea eax, [ebp - 0x1b]
push 0xb
push eax
call fcn.0041d9ba
add esp, 0x10
push str.GameID5
call fcn.00411500
cmp eax, 0xffffffff
jne 0x40b38b
xorps xmm0, xmm0
mov word [ebp - 8], 0
movq qword [ebp - 0x10], xmm0
mov byte [ebp - 6], 0
jmp 0x40b3a4
shl eax, 0xd
push 0xa
add eax, 0x43b53e
push eax
lea eax, [ebp - 0x10]
push 0xb
push eax
call fcn.0041d9ba
add esp, 0x10
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
xor ebx, ebx
lea esi, [ebp - 0x3c]
push edi
push esi
call fcn.00417ae0
add esp, 8
test eax, eax
je 0x40b3dc
inc ebx
add esi, 0xb
cmp ebx, 5
jl 0x40b3c3
jmp 0x40b450
push dword [ebp - 0x40]
movzx eax, bl
inc eax
push eax
push str.UPDATE_AccountCharacter_SET_GameID_dNULL_WHERE_Id_s
push 0x439d58
call fcn.004112b0
add esp, 0x10
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
jmp 0x40b450
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov byte [ebp - 0x43], 1
jmp 0x40b450
push dword [0x439d64]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x439d64]
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.00412cb0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00414177
mov esp, ebp
pop ebp
ret