Function at 0x40cd00
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x11dc
call fcn.0042e9b0
mov eax, dword [0x43d040]
xor eax, ebp
mov dword [ebp - 4], eax
movzx eax, word [ecx + 4]
add ecx, 6
push ebx
push esi
push edi
movq xmm0, qword [ecx]
mov word [ebp - 0x11c4], ax
movzx eax, word [ecx + 8]
push ecx
mov word [ebp - 0x11ba], ax
mov al, byte [ecx + 0xa]
push str.SELECT_Id_FROM_AccountCharacter_WHERE_Id_s
push 0x43ddd8
mov dword [ebp - 0x11dc], edx
mov byte [ebp - 0x11c8], 0xc2
mov byte [ebp - 0x11c5], 1
mov dword [ebp - 0x11b0], 0x16
mov dword [ebp - 0x11a8], ecx
movq qword [ebp - 0x11c2], xmm0
mov byte [ebp - 0x11b8], al
call fcn.00414490
mov esi, dword [sym.imp.ODBC32.dll_SQLFetch]
add esp, 0xc
mov dword [ebp - 0x11d0], esi
test al, al
je 0x40cdbf
push dword [0x43dde4]
call esi
cmp ax, 0x64
je 0x40cdbf
push dword [0x43dde4]
mov ebx, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov dword [ebp - 0x11ac], ebx
call ebx
mov edi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov dword [ebp - 0x11a0], edi
jmp 0x40ce09
push dword [0x43dde4]
mov ebx, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov dword [ebp - 0x11ac], ebx
call ebx
mov edi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push dword [0x43dde4]
mov dword [ebp - 0x11a0], edi
call edi
push dword [ebp - 0x11a8]
push str.INSERT_INTO_AccountCharacter__Id__VALUES___s_
push 0x43ddd8
call fcn.00414490
add esp, 0xc
push dword [0x43dde4]
call ebx
push 2
push dword [0x43dde4]
call edi
push 0x6e
lea eax, [ebp - 0x78]
push 0
push eax
call fcn.00418c30
add esp, 0xc
push dword [ebp - 0x11a8]
push str.SELECT__FROM_AccountCharacter_WHERE_Id_s
push 0x43ddd8
call fcn.00414490
add esp, 0xc
push dword [0x43dde4]
call esi
push str.MoveCnt
call fcn.004146e0
cmp eax, 0xffffffff
jne 0x40ce56
or eax, eax
jmp 0x40ce67
shl eax, 0xd
add eax, 0x43f5be
push eax
call fcn.0041d98e
add esp, 4
push str.ExtClass
mov byte [ebp - 0x11b7], al
call fcn.004146e0
cmp eax, 0xffffffff
jne 0x40ce80
or eax, eax
jmp 0x40ce91
shl eax, 0xd
add eax, 0x43f5be
push eax
call fcn.0041d98e
add esp, 4
push str.ExtWarehouse
mov byte [ebp - 0x11b6], al
call fcn.004146e0
cmp eax, 0xffffffff
jne 0x40ceaa
or eax, eax
jmp 0x40cebb
shl eax, 0xd
add eax, 0x43f5be
push eax
call fcn.0041d98e
add esp, 4
push str.MaxCharacter
mov byte [ebp - 0x11b5], al
call fcn.004146e0
cmp eax, 0xffffffff
jne 0x40ced4
or eax, eax
jmp 0x40cee5
shl eax, 0xd
add eax, 0x43f5be
push eax
call fcn.0041d98e
add esp, 4
push str.GameID1
mov byte [ebp - 0x11b4], al
call fcn.004146e0
cmp eax, 0xffffffff
je 0x40cf13
shl eax, 0xd
push 0xa
add eax, 0x43f5be
push eax
lea eax, [ebp - 0x78]
push 0xb
push eax
call fcn.00420d3d
add esp, 0x10
push str.GameID2
call fcn.004146e0
cmp eax, 0xffffffff
jne 0x40cf36
xorps xmm0, xmm0
mov word [ebp - 0x65], 0
movq qword [ebp - 0x6d], xmm0
mov byte [ebp - 0x63], 0
jmp 0x40cf4f
shl eax, 0xd
push 0xa
add eax, 0x43f5be
push eax
lea eax, [ebp - 0x6d]
push 0xb
push eax
call fcn.00420d3d
add esp, 0x10
push str.GameID3
call fcn.004146e0
cmp eax, 0xffffffff
jne 0x40cf72
xorps xmm0, xmm0
mov word [ebp - 0x5a], 0
movq qword [ebp - 0x62], xmm0
mov byte [ebp - 0x58], 0
jmp 0x40cf8b
shl eax, 0xd
push 0xa
add eax, 0x43f5be
push eax
lea eax, [ebp - 0x62]
push 0xb
push eax
call fcn.00420d3d
add esp, 0x10
push str.GameID4
call fcn.004146e0
cmp eax, 0xffffffff
jne 0x40cfae
xorps xmm0, xmm0
mov word [ebp - 0x4f], 0
movq qword [ebp - 0x57], xmm0
mov byte [ebp - 0x4d], 0
jmp 0x40cfc7
shl eax, 0xd
push 0xa
add eax, 0x43f5be
push eax
lea eax, [ebp - 0x57]
push 0xb
push eax
call fcn.00420d3d
add esp, 0x10
push str.GameID5
call fcn.004146e0
cmp eax, 0xffffffff
jne 0x40cfea
xorps xmm0, xmm0
mov word [ebp - 0x44], 0
movq qword [ebp - 0x4c], xmm0
mov byte [ebp - 0x42], 0
jmp 0x40d003
shl eax, 0xd
push 0xa
add eax, 0x43f5be
push eax
lea eax, [ebp - 0x4c]
push 0xb
push eax
call fcn.00420d3d
add esp, 0x10
push str.GameID6
call fcn.004146e0
cmp eax, 0xffffffff
jne 0x40d026
xorps xmm0, xmm0
mov word [ebp - 0x39], 0
movq qword [ebp - 0x41], xmm0
mov byte [ebp - 0x37], 0
jmp 0x40d03f
shl eax, 0xd
push 0xa
add eax, 0x43f5be
push eax
lea eax, [ebp - 0x41]
push 0xb
push eax
call fcn.00420d3d
add esp, 0x10
push str.GameID7
call fcn.004146e0
cmp eax, 0xffffffff
jne 0x40d062
xorps xmm0, xmm0
mov word [ebp - 0x2e], 0
movq qword [ebp - 0x36], xmm0
mov byte [ebp - 0x2c], 0
jmp 0x40d07b
shl eax, 0xd
push 0xa
add eax, 0x43f5be
push eax
lea eax, [ebp - 0x36]
push 0xb
push eax
call fcn.00420d3d
add esp, 0x10
push str.GameID8
call fcn.004146e0
cmp eax, 0xffffffff
jne 0x40d09e
xorps xmm0, xmm0
mov word [ebp - 0x23], 0
movq qword [ebp - 0x2b], xmm0
mov byte [ebp - 0x21], 0
jmp 0x40d0b7
shl eax, 0xd
push 0xa
add eax, 0x43f5be
push eax
lea eax, [ebp - 0x2b]
push 0xb
push eax
call fcn.00420d3d
add esp, 0x10
push str.GameID9
call fcn.004146e0
cmp eax, 0xffffffff
jne 0x40d0da
xorps xmm0, xmm0
mov word [ebp - 0x18], 0
movq qword [ebp - 0x20], xmm0
mov byte [ebp - 0x16], 0
jmp 0x40d0f3
shl eax, 0xd
push 0xa
add eax, 0x43f5be
push eax
lea eax, [ebp - 0x20]
push 0xb
push eax
call fcn.00420d3d
add esp, 0x10
push str.GameID10
call fcn.004146e0
cmp eax, 0xffffffff
jne 0x40d116
xorps xmm0, xmm0
mov word [ebp - 0xd], 0
movq qword [ebp - 0x15], xmm0
mov byte [ebp - 0xb], 0
jmp 0x40d12f
shl eax, 0xd
push 0xa
add eax, 0x43f5be
push eax
lea eax, [ebp - 0x15]
push 0xb
push eax
call fcn.00420d3d
add esp, 0x10
push dword [0x43dde4]
call ebx
push 2
push dword [0x43dde4]
call edi
xor al, al
mov byte [ebp - 0x119a], al
mov byte [ebp - 0x11b3], al
xor eax, eax
mov dword [ebp - 0x11a4], eax
cmp dword [0x5d1700], eax
jle 0x40d439
lea ecx, [ebp - 0x10f2]
lea esi, [ebp - 0x78]
mov dword [ebp - 0x11d4], ecx
mov dword [ebp - 0x11d8], esi
nop dword [eax + eax]
cmp byte [esi], 0
je 0x40d41d
push esi
push dword [ebp - 0x11a8]
push str.SELECT_cLevel_Class_Inventory_CtlCode_FROM_Character_WHERE_AccountID_s_AND_Name_s
push 0x43ddd8
call fcn.00414490
add esp, 0x10
test al, al
je 0x40d405
push dword [0x43dde4]
call dword [ebp - 0x11d0]
cmp ax, 0x64
je 0x40d405
mov eax, dword [ebp - 0x11a4]
movq xmm0, qword [esi]
mov byte [ebp - 0x1198], al
mov ax, word [esi + 8]
mov word [ebp - 0x118f], ax
mov al, byte [esi + 0xa]
push str.cLevel
movq qword [ebp - 0x1197], xmm0
mov byte [ebp - 0x118d], al
call fcn.004146e0
cmp eax, 0xffffffff
jne 0x40d1ff
or eax, eax
jmp 0x40d210
shl eax, 0xd
add eax, 0x43f5be
push eax
call fcn.0041d98e
add esp, 4
push str.Class
mov word [ebp - 0x118c], ax
call fcn.004146e0
cmp eax, 0xffffffff
jne 0x40d22a
or eax, eax
jmp 0x40d23b
shl eax, 0xd
add eax, 0x43f5be
push eax
call fcn.0041d98e
add esp, 4
mov byte [ebp - 0x118a], al
lea eax, [ebp - 0x138]
push 0xc0
push eax
push str.Inventory
call fcn.00414730
push str.CtlCode
call fcn.004146e0
cmp eax, 0xffffffff
jne 0x40d26a
or eax, eax
jmp 0x40d27b
shl eax, 0xd
add eax, 0x43f5be
push eax
call fcn.0041d98e
add esp, 4
push dword [0x43dde4]
mov byte [ebp - 0x1189], al
call ebx
push 2
push dword [0x43dde4]
call edi
push 0x78
lea eax, [ebp - 0x1188]
push 0xff
push eax
call fcn.00418c30
lea edx, [ebp - 0x1187]
add esp, 0xc
mov dword [ebp - 0x11cc], edx
lea ecx, [ebp - 0x131]
mov edi, 0xc
mov bl, byte [ecx - 7]
cmp bl, 0xff
jne 0x40d2e6
cmp byte [ecx], 0
jge 0x40d2e6
mov al, byte [ecx + 2]
and al, 0xf0
cmp al, 0xf0
jne 0x40d2e6
or al, bl
mov byte [ebp - 0x1199], bl
or ah, bl
or bh, bl
or bl, bl
jmp 0x40d2fd
mov dl, byte [ecx - 6]
mov al, byte [ecx + 2]
mov ah, byte [ecx + 1]
mov bh, byte [ecx]
mov byte [ebp - 0x1199], dl
mov edx, dword [ebp - 0x11cc]
mov byte [edx - 1], bl
add ecx, 0x10
mov bl, byte [ebp - 0x1199]
mov byte [edx], bl
mov byte [edx + 1], bh
mov byte [edx + 2], ah
mov byte [edx + 3], al
add edx, 0xa
mov dword [ebp - 0x11cc], edx
sub edi, 1
jne 0x40d2c0
push esi
push str.SELECT_G_Status_FROM_GuildMember_WHERE_Name_s
push 0x43ddd8
call fcn.00414490
add esp, 0xc
test al, al
je 0x40d393
push dword [0x43dde4]
call dword [ebp - 0x11d0]
cmp ax, 0x64
je 0x40d393
push str.G_Status
call fcn.004146e0
cmp eax, 0xffffffff
jne 0x40d35e
or eax, eax
jmp 0x40d36f
shl eax, 0xd
add eax, 0x43f5be
push eax
call fcn.0041d98e
add esp, 4
push dword [0x43dde4]
mov ebx, dword [ebp - 0x11ac]
mov byte [ebp - 0x1110], al
call ebx
push 2
push dword [0x43dde4]
call dword [ebp - 0x11a0]
jmp 0x40d3b6
push dword [0x43dde4]
mov ebx, dword [ebp - 0x11ac]
call ebx
push 2
push dword [0x43dde4]
call dword [ebp - 0x11a0]
mov byte [ebp - 0x1110], 0xff
mov edx, dword [ebp - 0x11d4]
lea esi, [ebp - 0x1198]
add dword [ebp - 0x11b0], 0x8a
mov edi, edx
mov ecx, 0x22
add edx, 0x8a
rep movsd dword es:[edi], dword [esi]
mov cl, byte [ebp - 0x119a]
inc cl
mov dword [ebp - 0x11d4], edx
mov byte [ebp - 0x119a], cl
movsw word es:[edi], word [esi]
mov esi, dword [ebp - 0x11d8]
mov edi, dword [ebp - 0x11a0]
mov byte [ebp - 0x11b3], cl
jmp 0x40d417
push dword [0x43dde4]
call ebx
push 2
push dword [0x43dde4]
call edi
mov eax, dword [ebp - 0x11a4]
inc eax
add esi, 0xb
mov dword [ebp - 0x11a4], eax
mov dword [ebp - 0x11d8], esi
cmp eax, dword [0x5d1700]
jl 0x40d180
mov ecx, dword [ebp - 0x11b0]
mov eax, ecx
shr eax, 8
mov byte [ebp - 0x11c7], al
mov eax, dword [ebp - 0x11b8]
mov dword [ebp - 0x10f8], eax
mov ax, word [ebp - 0x11b4]
mov word [ebp - 0x10f4], ax
lea eax, [ebp - 0x1108]
push ecx
mov byte [ebp - 0x11c6], cl
movups xmm0, xmmword [ebp - 0x11c8]
push eax
push dword [ebp - 0x11dc]
movups xmmword [ebp - 0x1108], xmm0
call fcn.00415d90
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00417417
mov esp, ebp
pop ebp
ret