Function at 0x414eb0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push 0x27
lea eax, [ebp - 0x2b]
mov dword [ebp - 4], edx
push 0
push eax
mov ebx, ecx
call fcn.0041f470
mov ax, word [ebx + 4]
add esp, 0xc
mov word [ebp - 0x26], ax
xor eax, eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
push dword [ebx + 0xc]
mov dword [ebp - 0x1c], eax
push dword [ebx + 8]
mov dword [ebp - 0x18], eax
mov byte [ebp - 0x14], al
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
movzx eax, word [ebx + 6]
push eax
push str.SELECT_top_1__FROM_GremoryCase_WHERE_ItemIndex_d_and_ItemGUID_d_and_AuthCode_d
push 0x446e50
mov dword [ebp - 0x2c], 0x24f28c1
mov byte [ebp - 0x28], 0
call fcn.0041ad00
add esp, 0x14
test al, al
je 0x415282
push dword [0x446e5c]
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x415282
push str.ItemIndex
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x414f47
or eax, eax
jmp 0x414f58
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ItemLevel
mov word [ebp - 0x24], ax
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x414f6f
or eax, eax
jmp 0x414f80
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ItemDurability
mov byte [ebp - 0x22], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x414f96
or eax, eax
jmp 0x414fa7
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ItemSkill
mov byte [ebp - 0x21], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x414fbd
or eax, eax
jmp 0x414fce
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ItemLuck
mov byte [ebp - 0x20], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x414fe4
or eax, eax
jmp 0x414ff5
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ItemOption
mov byte [ebp - 0x1f], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x41500b
or eax, eax
jmp 0x41501c
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ItemExcOpt
mov byte [ebp - 0x1e], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x415032
or eax, eax
jmp 0x415043
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ItemSetOpt
mov byte [ebp - 0x1d], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x415059
or eax, eax
jmp 0x41506a
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ItemJoH
mov byte [ebp - 0x1c], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x415080
or eax, eax
jmp 0x415091
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ItemOex
mov byte [ebp - 0x1b], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x4150a7
or eax, eax
jmp 0x4150b8
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ItemSocket1
mov byte [ebp - 0x1a], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x4150ce
or eax, eax
jmp 0x4150df
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ItemSocket2
mov byte [ebp - 0x19], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x4150f5
or eax, eax
jmp 0x415106
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ItemSocket3
mov byte [ebp - 0x18], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x41511c
or eax, eax
jmp 0x41512d
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ItemSocket4
mov byte [ebp - 0x17], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x415143
or eax, eax
jmp 0x415154
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ItemSocket5
mov byte [ebp - 0x16], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x41516a
or eax, eax
jmp 0x41517b
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ItemSocketBonus
mov byte [ebp - 0x15], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x415191
or eax, eax
jmp 0x4151a2
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ItemDuration
mov byte [ebp - 0x14], al
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x4151b8
or eax, eax
jmp 0x4151c9
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.ItemGUID
mov dword [ebp - 0x10], eax
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x4151df
or eax, eax
jmp 0x4151f0
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push str.AuthCode
mov dword [ebp - 0xc], eax
call fcn.0041af50
cmp eax, 0xffffffff
jne 0x415206
or eax, eax
jmp 0x415217
shl eax, 0xd
add eax, 0x447a7e
push eax
call fcn.0042415e
add esp, 4
push dword [0x446e5c]
mov dword [ebp - 8], eax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x446e5c]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push dword [ebx + 0xc]
movzx eax, word [ebx + 6]
push dword [ebx + 8]
push eax
push str.DELETE_FROM_GremoryCase_WHERE_ItemIndex_d_and_ItemGUID_d_and_AuthCode_d
push 0x446e50
call fcn.0041ad00
add esp, 0x14
push dword [0x446e5c]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x446e5c]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 0x28
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x28], 1
push eax
push dword [ebp - 4]
call fcn.0041c330
pop ebx
mov esp, ebp
pop ebp
ret
push dword [0x446e5c]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x446e5c]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 0x28
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 4]
call fcn.0041c330
pop ebx
mov esp, ebp
pop ebp
ret