Function at 0x40d180
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9cc
mov eax, dword [0x43e040]
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 - 0x9b4], ax
movzx eax, word [ecx + 8]
push ecx
mov word [ebp - 0x9aa], ax
mov al, byte [ecx + 0xa]
push str.SELECT_Id_FROM_AccountCharacter_WHERE_Id_s
push 0x43edd8
mov dword [ebp - 0x9cc], edx
mov byte [ebp - 0x9b8], 0xc2
mov byte [ebp - 0x9b5], 1
mov dword [ebp - 0x9a0], 0x16
mov dword [ebp - 0x998], ecx
movq qword [ebp - 0x9b2], xmm0
mov byte [ebp - 0x9a8], al
call fcn.00414960
mov esi, dword [sym.imp.ODBC32.dll_SQLFetch]
add esp, 0xc
mov dword [ebp - 0x9c0], esi
test al, al
je 0x40d23b
push dword [0x43ede4]
call esi
cmp ax, 0x64
je 0x40d23b
push dword [0x43ede4]
mov ebx, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov dword [ebp - 0x99c], ebx
call ebx
mov edi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov dword [ebp - 0x990], edi
jmp 0x40d285
push dword [0x43ede4]
mov ebx, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov dword [ebp - 0x99c], ebx
call ebx
mov edi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push dword [0x43ede4]
mov dword [ebp - 0x990], edi
call edi
push dword [ebp - 0x998]
push str.INSERT_INTO_AccountCharacter__Id__VALUES___s_
push 0x43edd8
call fcn.00414960
add esp, 0xc
push dword [0x43ede4]
call ebx
push 2
push dword [0x43ede4]
call edi
push 0x6e
lea eax, [ebp - 0x78]
push 0
push eax
call fcn.004190e0
add esp, 0xc
push dword [ebp - 0x998]
push str.SELECT__FROM_AccountCharacter_WHERE_Id_s
push 0x43edd8
call fcn.00414960
add esp, 0xc
push dword [0x43ede4]
call esi
push str.MoveCnt
call fcn.00414bb0
cmp eax, 0xffffffff
jne 0x40d2d2
or eax, eax
jmp 0x40d2e3
shl eax, 0xd
add eax, 0x4405be
push eax
call fcn.0041de3e
add esp, 4
push str.ExtClass
mov byte [ebp - 0x9a7], al
call fcn.00414bb0
cmp eax, 0xffffffff
jne 0x40d2fc
or eax, eax
jmp 0x40d30d
shl eax, 0xd
add eax, 0x4405be
push eax
call fcn.0041de3e
add esp, 4
push str.ExtWarehouse
mov byte [ebp - 0x9a6], al
call fcn.00414bb0
cmp eax, 0xffffffff
jne 0x40d326
or eax, eax
jmp 0x40d337
shl eax, 0xd
add eax, 0x4405be
push eax
call fcn.0041de3e
add esp, 4
push str.MaxCharacter
mov byte [ebp - 0x9a5], al
call fcn.00414bb0
cmp eax, 0xffffffff
jne 0x40d350
or eax, eax
jmp 0x40d361
shl eax, 0xd
add eax, 0x4405be
push eax
call fcn.0041de3e
add esp, 4
push str.GameID1
mov byte [ebp - 0x9a4], al
call fcn.00414bb0
cmp eax, 0xffffffff
je 0x40d38f
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x78]
push 0xb
push eax
call fcn.004211ed
add esp, 0x10
push str.GameID2
call fcn.00414bb0
cmp eax, 0xffffffff
jne 0x40d3b2
xorps xmm0, xmm0
mov word [ebp - 0x65], 0
movq qword [ebp - 0x6d], xmm0
mov byte [ebp - 0x63], 0
jmp 0x40d3cb
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x6d]
push 0xb
push eax
call fcn.004211ed
add esp, 0x10
push str.GameID3
call fcn.00414bb0
cmp eax, 0xffffffff
jne 0x40d3ee
xorps xmm0, xmm0
mov word [ebp - 0x5a], 0
movq qword [ebp - 0x62], xmm0
mov byte [ebp - 0x58], 0
jmp 0x40d407
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x62]
push 0xb
push eax
call fcn.004211ed
add esp, 0x10
push str.GameID4
call fcn.00414bb0
cmp eax, 0xffffffff
jne 0x40d42a
xorps xmm0, xmm0
mov word [ebp - 0x4f], 0
movq qword [ebp - 0x57], xmm0
mov byte [ebp - 0x4d], 0
jmp 0x40d443
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x57]
push 0xb
push eax
call fcn.004211ed
add esp, 0x10
push str.GameID5
call fcn.00414bb0
cmp eax, 0xffffffff
jne 0x40d466
xorps xmm0, xmm0
mov word [ebp - 0x44], 0
movq qword [ebp - 0x4c], xmm0
mov byte [ebp - 0x42], 0
jmp 0x40d47f
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x4c]
push 0xb
push eax
call fcn.004211ed
add esp, 0x10
push str.GameID6
call fcn.00414bb0
cmp eax, 0xffffffff
jne 0x40d4a2
xorps xmm0, xmm0
mov word [ebp - 0x39], 0
movq qword [ebp - 0x41], xmm0
mov byte [ebp - 0x37], 0
jmp 0x40d4bb
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x41]
push 0xb
push eax
call fcn.004211ed
add esp, 0x10
push str.GameID7
call fcn.00414bb0
cmp eax, 0xffffffff
jne 0x40d4de
xorps xmm0, xmm0
mov word [ebp - 0x2e], 0
movq qword [ebp - 0x36], xmm0
mov byte [ebp - 0x2c], 0
jmp 0x40d4f7
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x36]
push 0xb
push eax
call fcn.004211ed
add esp, 0x10
push str.GameID8
call fcn.00414bb0
cmp eax, 0xffffffff
jne 0x40d51a
xorps xmm0, xmm0
mov word [ebp - 0x23], 0
movq qword [ebp - 0x2b], xmm0
mov byte [ebp - 0x21], 0
jmp 0x40d533
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x2b]
push 0xb
push eax
call fcn.004211ed
add esp, 0x10
push str.GameID9
call fcn.00414bb0
cmp eax, 0xffffffff
jne 0x40d556
xorps xmm0, xmm0
mov word [ebp - 0x18], 0
movq qword [ebp - 0x20], xmm0
mov byte [ebp - 0x16], 0
jmp 0x40d56f
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x20]
push 0xb
push eax
call fcn.004211ed
add esp, 0x10
push str.GameID10
call fcn.00414bb0
cmp eax, 0xffffffff
jne 0x40d592
xorps xmm0, xmm0
mov word [ebp - 0xd], 0
movq qword [ebp - 0x15], xmm0
mov byte [ebp - 0xb], 0
jmp 0x40d5ab
shl eax, 0xd
push 0xa
add eax, 0x4405be
push eax
lea eax, [ebp - 0x15]
push 0xb
push eax
call fcn.004211ed
add esp, 0x10
push dword [0x43ede4]
call ebx
push 2
push dword [0x43ede4]
call edi
xor al, al
mov byte [ebp - 0x98a], al
mov byte [ebp - 0x9a3], al
xor eax, eax
mov dword [ebp - 0x994], eax
cmp dword [0x5d2700], eax
jle 0x40d8a7
lea ecx, [ebp - 0x922]
lea esi, [ebp - 0x78]
mov dword [ebp - 0x9c4], ecx
mov dword [ebp - 0x9c8], esi
cmp byte [esi], 0
je 0x40d88b
push esi
push dword [ebp - 0x998]
push str.SELECT_cLevel_Class_Inventory_CtlCode_FROM_Character_WHERE_AccountID_s_AND_Name_s
push 0x43edd8
call fcn.00414960
add esp, 0x10
test al, al
je 0x40d873
push dword [0x43ede4]
call dword [ebp - 0x9c0]
cmp ax, 0x64
je 0x40d873
mov eax, dword [ebp - 0x994]
movq xmm0, qword [esi]
mov byte [ebp - 0x988], al
mov ax, word [esi + 8]
mov word [ebp - 0x97f], ax
mov al, byte [esi + 0xa]
push str.cLevel
movq qword [ebp - 0x987], xmm0
mov byte [ebp - 0x97d], al
call fcn.00414bb0
cmp eax, 0xffffffff
jne 0x40d673
or eax, eax
jmp 0x40d684
shl eax, 0xd
add eax, 0x4405be
push eax
call fcn.0041de3e
add esp, 4
push str.Class
mov word [ebp - 0x97c], ax
call fcn.00414bb0
cmp eax, 0xffffffff
jne 0x40d69e
or eax, eax
jmp 0x40d6af
shl eax, 0xd
add eax, 0x4405be
push eax
call fcn.0041de3e
add esp, 4
mov byte [ebp - 0x97a], al
lea eax, [ebp - 0x138]
push 0xc0
push eax
push str.Inventory
call fcn.00414c00
push str.CtlCode
call fcn.00414bb0
cmp eax, 0xffffffff
jne 0x40d6de
or eax, eax
jmp 0x40d6ef
shl eax, 0xd
add eax, 0x4405be
push eax
call fcn.0041de3e
add esp, 4
push dword [0x43ede4]
mov byte [ebp - 0x979], al
call ebx
push 2
push dword [0x43ede4]
call edi
push 0x3c
lea eax, [ebp - 0x978]
push 0xff
push eax
call fcn.004190e0
lea edx, [ebp - 0x977]
add esp, 0xc
mov dword [ebp - 0x9bc], edx
lea ecx, [ebp - 0x131]
mov edi, 0xc
mov bl, byte [ecx - 7]
cmp bl, 0xff
jne 0x40d75a
cmp byte [ecx], 0
jge 0x40d75a
mov al, byte [ecx + 2]
and al, 0xf0
cmp al, 0xf0
jne 0x40d75a
or al, bl
mov byte [ebp - 0x989], bl
or ah, bl
or bh, bl
or bl, bl
jmp 0x40d771
mov dl, byte [ecx - 6]
mov al, byte [ecx + 2]
mov ah, byte [ecx + 1]
mov bh, byte [ecx]
mov byte [ebp - 0x989], dl
mov edx, dword [ebp - 0x9bc]
mov byte [edx - 1], bl
add ecx, 0x10
mov bl, byte [ebp - 0x989]
mov byte [edx], bl
mov byte [edx + 1], bh
mov byte [edx + 2], ah
mov byte [edx + 3], al
add edx, 5
mov dword [ebp - 0x9bc], edx
sub edi, 1
jne 0x40d734
push esi
push str.SELECT_G_Status_FROM_GuildMember_WHERE_Name_s
push 0x43edd8
call fcn.00414960
add esp, 0xc
test al, al
je 0x40d807
push dword [0x43ede4]
call dword [ebp - 0x9c0]
cmp ax, 0x64
je 0x40d807
push str.G_Status
call fcn.00414bb0
cmp eax, 0xffffffff
jne 0x40d7d2
or eax, eax
jmp 0x40d7e3
shl eax, 0xd
add eax, 0x4405be
push eax
call fcn.0041de3e
add esp, 4
push dword [0x43ede4]
mov ebx, dword [ebp - 0x99c]
mov byte [ebp - 0x93c], al
call ebx
push 2
push dword [0x43ede4]
call dword [ebp - 0x990]
jmp 0x40d82a
push dword [0x43ede4]
mov ebx, dword [ebp - 0x99c]
call ebx
push 2
push dword [0x43ede4]
call dword [ebp - 0x990]
mov byte [ebp - 0x93c], 0xff
mov edx, dword [ebp - 0x9c4]
lea esi, [ebp - 0x988]
add dword [ebp - 0x9a0], 0x4e
mov edi, edx
mov ecx, 0x13
add edx, 0x4e
rep movsd dword es:[edi], dword [esi]
mov cl, byte [ebp - 0x98a]
inc cl
mov dword [ebp - 0x9c4], edx
mov byte [ebp - 0x98a], cl
movsw word es:[edi], word [esi]
mov esi, dword [ebp - 0x9c8]
mov edi, dword [ebp - 0x990]
mov byte [ebp - 0x9a3], cl
jmp 0x40d885
push dword [0x43ede4]
call ebx
push 2
push dword [0x43ede4]
call edi
mov eax, dword [ebp - 0x994]
inc eax
add esi, 0xb
mov dword [ebp - 0x994], eax
mov dword [ebp - 0x9c8], esi
cmp eax, dword [0x5d2700]
jl 0x40d5f4
mov ecx, dword [ebp - 0x9a0]
mov eax, ecx
shr eax, 8
mov byte [ebp - 0x9b7], al
mov eax, dword [ebp - 0x9a8]
mov dword [ebp - 0x928], eax
mov ax, word [ebp - 0x9a4]
mov word [ebp - 0x924], ax
lea eax, [ebp - 0x938]
push ecx
mov byte [ebp - 0x9b6], cl
movups xmm0, xmmword [ebp - 0x9b8]
push eax
push dword [ebp - 0x9cc]
movups xmmword [ebp - 0x938], xmm0
call fcn.00416260
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004178c7
mov esp, ebp
pop ebp
ret