Function at 0x40fc10
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
lea eax, [ebp - 4]
push esi
push edi
push 0
push eax
push 0xffffffffffffffff
push str.SELECT_ItemNum_FROM_Item__WHERE_Uin__AND_ItemID__
push dword [0x4918d8]
mov dword [ebp - 8], edx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 4], 0
call ebx
mov esi, dword [sym.imp.sqlite3.dll_sqlite3_bind_int]
add esp, 0x14
mov edi, dword [sym.imp.sqlite3.dll_sqlite3_step]
test eax, eax
jne 0x410037
push dword [ebp - 8]
push 1
push dword [ebp - 4]
call esi
push dword [ebp + 8]
push 2
push dword [ebp - 4]
call esi
push dword [ebp - 4]
call edi
add esp, 0x1c
cmp eax, 0x64
jne 0x40fc9a
push 0
push dword [ebp - 4]
call dword [sym.imp.sqlite3.dll_sqlite3_column_int]
push dword [ebp - 4]
mov edi, dword [sym.imp.sqlite3.dll_sqlite3_finalize]
mov dword [ebp - 0x10], eax
call edi
add esp, 0xc
jmp 0x41004c
push dword [ebp - 4]
mov ebx, dword [sym.imp.sqlite3.dll_sqlite3_finalize]
call ebx
push 0
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
push 0xffffffffffffffff
push str.INSERT_INTO_Item__Uin_ItemID_ItemNum_AvailPeriod_Status__VALUES_____________
push dword [0x4918d8]
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x18
test eax, eax
jne 0x40fd08
push dword [ebp - 8]
push 1
push dword [ebp - 4]
call esi
push dword [ebp + 8]
push 2
push dword [ebp - 4]
call esi
push dword [ebp + 0xc]
push 3
push dword [ebp - 4]
call esi
push dword [ebp + 0x10]
push 4
push dword [ebp - 4]
call esi
movzx eax, byte [ebp + 0x14]
push eax
push 5
push dword [ebp - 4]
call esi
push dword [ebp - 4]
call edi
add esp, 0x40
push dword [ebp - 4]
call ebx
mov eax, dword [ebp + 8]
add esp, 4
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
mov dword [ebp - 4], 0
push eax
call fcn.0041d440
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov eax, dword [eax]
test eax, eax
je 0x4100a5
cmp dword [eax + 4], 1
mov dword [ebp - 0x10], ecx
jne 0x4100a5
xor edi, edi
lea eax, [ebp - 4]
push edi
push eax
push 0xffffffffffffffff
push str.SELECT_ID__FROM_KartStoneGroove__WHERE_Uin__AND_KartID__
push dword [0x4918d8]
mov dword [ebp - 0xc], edi
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x14
test eax, eax
jne 0x40fda1
push dword [ebp - 8]
push 1
push dword [ebp - 4]
call esi
push dword [ebp + 8]
push 2
push dword [ebp - 4]
call esi
push dword [ebp - 4]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 0x1c
cmp eax, 0x64
jne 0x40fe61
push edi
push dword [ebp - 4]
call dword [sym.imp.sqlite3.dll_sqlite3_column_int]
mov edi, eax
add esp, 8
mov dword [ebp - 0xc], edi
push dword [ebp - 4]
call ebx
add esp, 4
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], 0
test edi, edi
jne 0x40ff61
mov edi, dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
lea eax, [ebp - 4]
push 0
push eax
push 0xffffffffffffffff
push str.INSERT_INTO_KartStoneGroove__Uin_KartID__VALUES_______
push dword [0x4918d8]
call edi
add esp, 0x14
test eax, eax
jne 0x40fe01
push dword [ebp - 8]
push 1
push dword [ebp - 4]
call esi
push dword [ebp + 8]
push 2
push dword [ebp - 4]
call esi
push dword [ebp - 4]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 0x1c
push dword [ebp - 4]
call ebx
push 0
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
push 0xffffffffffffffff
push str.SELECT_ID__FROM_KartStoneGroove__WHERE_Uin__AND_KartID__
push dword [0x4918d8]
call edi
add esp, 0x18
test eax, eax
jne 0x40fe7b
push dword [ebp - 8]
push 1
push dword [ebp - 4]
call esi
push dword [ebp + 8]
push 2
push dword [ebp - 4]
call esi
push dword [ebp - 4]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 0x1c
cmp eax, 0x64
jne 0x40fe74
push 0
push dword [ebp - 4]
call dword [sym.imp.sqlite3.dll_sqlite3_column_int]
add esp, 8
mov dword [ebp - 0xc], eax
jmp 0x40fe7b
push dword [ebp - 4]
mov dword [ebp - 0xc], edi
call ebx
add esp, 4
mov dword [ebp - 4], edi
jmp 0x40fdbf
mov dword [ebp - 0xc], 0
push dword [ebp - 4]
call ebx
add esp, 4
mov dword [ebp - 4], 0
mov edi, 1
mov dword [ebp - 0x10], 0
push 0
lea eax, [ebp - 4]
push eax
push 0xffffffffffffffff
push str.INSERT_INTO_KartStone__ID_StoneGrooveID_StoneUseOccaType__VALUES_________
push dword [0x4918d8]
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x14
test eax, eax
jne 0x40fedd
push dword [ebp - 0xc]
push 1
push dword [ebp - 4]
call esi
push edi
push 2
push dword [ebp - 4]
call esi
push 0
push 3
push dword [ebp - 4]
call esi
push dword [ebp - 4]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 0x28
push dword [ebp - 4]
call ebx
inc edi
mov dword [ebp - 4], 0
add esp, 4
cmp edi, 3
jle 0x40fe96
mov edi, 1
push 0
lea eax, [ebp - 4]
push eax
push 0xffffffffffffffff
push str.INSERT_INTO_KartStone__ID_StoneGrooveID_StoneUseOccaType__VALUES_________
push dword [0x4918d8]
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x14
test eax, eax
jne 0x40ff3e
push dword [ebp - 0xc]
push 1
push dword [ebp - 4]
call esi
push edi
push 2
push dword [ebp - 4]
call esi
push 1
push 3
push dword [ebp - 4]
call esi
push dword [ebp - 4]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 0x28
push dword [ebp - 4]
call ebx
inc edi
mov dword [ebp - 4], 0
add esp, 4
cmp edi, 2
jle 0x40fef7
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
call fcn.00427a40
mov edi, dword [ebp - 0xc]
push 0
lea eax, [ebp - 4]
push eax
push 0xffffffffffffffff
push str.SELECT_KartID_FROM_KartRefit_WHERE_Uin__AND_KartID__
push dword [0x4918d8]
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x14
test eax, eax
jne 0x40ffb8
push dword [ebp - 8]
push 1
push dword [ebp - 4]
call esi
push dword [ebp + 8]
push 2
push dword [ebp - 4]
call esi
push dword [ebp - 4]
mov edi, dword [sym.imp.sqlite3.dll_sqlite3_step]
call edi
add esp, 0x1c
cmp eax, 0x64
jne 0x410026
push 0
push dword [ebp - 4]
call dword [sym.imp.sqlite3.dll_sqlite3_column_int]
add esp, 8
mov edi, eax
push dword [ebp - 4]
call ebx
add esp, 4
mov dword [ebp - 4], 0
test edi, edi
jne 0x4100a5
mov edi, dword [sym.imp.sqlite3.dll_sqlite3_step]
push 0
lea eax, [ebp - 4]
push eax
push 0xffffffffffffffff
push str.INSERT_INTO_KartRefit_Uin_KartID__VALUES_______
push dword [0x4918d8]
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x14
test eax, eax
jne 0x410011
push dword [ebp - 8]
push 1
push dword [ebp - 4]
call esi
push dword [ebp + 8]
push 2
push dword [ebp - 4]
call esi
push dword [ebp - 4]
call edi
add esp, 0x1c
push dword [ebp - 4]
call ebx
mov eax, dword [ebp - 0x10]
add esp, 4
add eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebp - 4]
call ebx
add esp, 4
mov dword [ebp - 4], 0
jmp 0x40ffd5
push dword [ebp - 4]
mov edi, dword [sym.imp.sqlite3.dll_sqlite3_finalize]
call edi
add esp, 4
mov dword [ebp - 0x10], 0
push 0
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
push 0xffffffffffffffff
push str.UPDATE_Item_SET_ItemNum___WHERE_Uin__AND_ItemID__
push dword [0x4918d8]
call ebx
add esp, 0x14
test eax, eax
jne 0x41009d
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x10]
push eax
push 1
push dword [ebp - 4]
call esi
push dword [ebp - 8]
push 2
push dword [ebp - 4]
call esi
push dword [ebp + 8]
push 3
push dword [ebp - 4]
call esi
push dword [ebp - 4]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 0x28
push dword [ebp - 4]
call edi
add esp, 4
mov eax, dword [ebp - 0x10]
add eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret