Function at 0x412360
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49f75d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
push ebx
mov eax, edx
mov dword [ebp - 0x24], ecx
push esi
mov esi, dword [0x4d1304]
mov ecx, eax
push edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x1c], esi
call fcn.0045aff0
mov ebx, dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
push 0
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x10]
push eax
push 0xffffffffffffffff
push str.SELECT_ItemNum_AvailPeriod_FROM_Item__WHERE_Uin__AND_ItemID__
push esi
call ebx
mov edi, dword [sym.imp.sqlite3.dll_sqlite3_bind_int]
add esp, 0x14
test eax, eax
jne 0x412a19
push dword [ebp - 0x14]
push 1
push dword [ebp - 0x10]
call edi
mov ecx, dword [ebp + 8]
add esp, 0xc
push ecx
push 2
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp - 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
cmp eax, 0x64
jne 0x4124a1
mov esi, dword [sym.imp.sqlite3.dll_sqlite3_column_int]
push 0
push dword [ebp - 0x10]
call esi
push 1
push dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
call esi
push dword [ebp - 0x10]
mov esi, dword [sym.imp.sqlite3.dll_sqlite3_finalize]
mov dword [ebp - 0x28], eax
call esi
mov eax, dword [ebp - 0x28]
add esp, 0x14
mov dword [ebp - 0x10], 0
test eax, eax
jle 0x412496
mov eax, dword [ebp + 0x10]
cmp eax, 0xffffffff
jne 0x412469
push 0
lea eax, [ebp - 0x10]
push eax
push 0xffffffffffffffff
push str.UPDATE_Item_SET_AvailPeriod___1__WHERE_Uin__AND_ItemID__
push dword [ebp - 0x1c]
call ebx
add esp, 0x14
test eax, eax
jne 0x412a81
push dword [ebp - 0x14]
push 1
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp + 8]
push 2
jmp 0x412a6d
test eax, eax
jle 0x412a89
push 0
lea eax, [ebp - 0x10]
push eax
push 0xffffffffffffffff
push str.UPDATE_Item_SET_AvailPeriod__AvailPeriod_____WHERE_Uin__AND_ItemID__
push dword [ebp - 0x1c]
call ebx
add esp, 0x14
test eax, eax
jne 0x412a81
push dword [ebp + 0x10]
jmp 0x412a51
jne 0x412a89
jmp 0x412a35
push dword [ebp - 0x10]
mov ebx, dword [sym.imp.sqlite3.dll_sqlite3_finalize]
call ebx
mov eax, dword [ebp + 8]
add esp, 4
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
mov dword [ebp - 0x10], 0
push eax
call fcn.0042b840
mov ecx, dword [ebp + 8]
mov eax, dword [eax]
test eax, eax
je 0x41280b
cmp dword [eax + 4], 1
jne 0x41280b
cmp ecx, 0x2724
je 0x41280b
push 0x4d2b4c
mov dword [ebp - 0x30], 0x4d2b4c
call fcn.00461a04
add esp, 4
test eax, eax
jne 0x412aa2
cmp dword [0x4d2b78], 0x7fffffff
je 0x412aa9
mov dword [ebp - 4], eax
push eax
lea eax, [ebp - 0x10]
push eax
push 0xffffffffffffffff
push str.SELECT_1_FROM_KartStoneGroove__WHERE_Uin__AND_KartID__
push esi
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x14
test eax, eax
jne 0x41257e
push dword [ebp - 0x14]
push 1
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp + 8]
push 2
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp - 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
cmp eax, 0x64
jne 0x41257e
push dword [ebp - 0x10]
mov dword [ebp - 0x20], 1
call ebx
add esp, 4
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
jmp 0x412732
push dword [ebp - 0x10]
call ebx
add esp, 4
mov dword [ebp - 0x10], 0
lea eax, [ebp - 0x10]
push 0
push eax
push 0xffffffffffffffff
push str.INSERT_INTO_KartStoneGroove__Uin_KartID__VALUES_______
push esi
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x14
test eax, eax
jne 0x4125ce
push dword [ebp - 0x14]
push 1
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp + 8]
push 2
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp - 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
push dword [ebp - 0x10]
call ebx
add esp, 4
mov dword [ebp - 0x10], 0
push esi
call dword [sym.imp.sqlite3.dll_sqlite3_last_insert_rowid]
mov dword [ebp - 0x20], eax
add esp, 4
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x24], 2
push eax
mov dword [ebp - 0x28], 2
call fcn.00412c60
mov ecx, dword [eax]
test ecx, ecx
je 0x41261b
mov eax, dword [ecx + 4]
mov ecx, dword [ecx + 8]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], ecx
jmp 0x412620
mov eax, 2
mov esi, 1
xor ecx, ecx
mov dword [ebp - 0x18], ecx
cmp eax, esi
jb 0x41269f
mov dword [ebp - 0x18], ecx
push 0
lea eax, [ebp - 0x10]
push eax
push 0xffffffffffffffff
push str.INSERT_INTO_KartStone__ID_StoneGrooveID_StoneUseOccaType_SkillStoneID__VALUES___________
push dword [ebp - 0x1c]
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x14
test eax, eax
jne 0x41268a
push dword [ebp - 0x20]
push 1
push dword [ebp - 0x10]
call edi
add esp, 0xc
push esi
push 2
push dword [ebp - 0x10]
call edi
add esp, 0xc
push 0
push 3
push dword [ebp - 0x10]
call edi
add esp, 0xc
push 0
push 4
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp - 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
push dword [ebp - 0x10]
call ebx
inc esi
mov dword [ebp - 0x10], 0
add esp, 4
cmp esi, dword [ebp - 0x24]
jbe 0x412631
mov eax, dword [ebp - 0x28]
dec eax
add eax, esi
mov dword [ebp - 0x28], eax
cmp esi, eax
jg 0x41271e
nop dword [eax]
push 0
lea eax, [ebp - 0x10]
push eax
push 0xffffffffffffffff
push str.INSERT_INTO_KartStone__ID_StoneGrooveID_StoneUseOccaType_SkillStoneID__VALUES___________
push dword [ebp - 0x1c]
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x14
test eax, eax
jne 0x412709
push dword [ebp - 0x20]
push 1
push dword [ebp - 0x10]
call edi
add esp, 0xc
push esi
push 2
push dword [ebp - 0x10]
call edi
add esp, 0xc
push 1
push 3
push dword [ebp - 0x10]
call edi
add esp, 0xc
push 0
push 4
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp - 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
push dword [ebp - 0x10]
call ebx
inc esi
mov dword [ebp - 0x10], 0
add esp, 4
cmp esi, dword [ebp - 0x28]
jle 0x4126b0
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x41272f
mov edx, dword [ebp + 8]
mov ecx, eax
call fcn.0044f0f0
mov esi, dword [ebp - 0x1c]
push 0
lea eax, [ebp - 0x10]
push eax
push 0xffffffffffffffff
push str.SELECT_1_FROM_KartRefit_WHERE_Uin__AND_KartID__
push esi
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x14
test eax, eax
jne 0x412789
push dword [ebp - 0x14]
push 1
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp + 8]
push 2
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp - 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
push dword [ebp - 0x10]
cmp eax, 0x64
je 0x4127e2
call ebx
add esp, 4
mov dword [ebp - 0x10], 0
jmp 0x41279e
push dword [ebp - 0x10]
call ebx
add esp, 4
mov dword [ebp - 0x10], 0
cmp dword [ebp - 0x20], 0
jne 0x4127ee
push 0
lea eax, [ebp - 0x10]
push eax
push 0xffffffffffffffff
push str.INSERT_INTO_KartRefit_Uin_KartID__VALUES_______
push esi
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x14
test eax, eax
jne 0x4127df
push dword [ebp - 0x14]
push 1
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp + 8]
push 2
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp - 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
push dword [ebp - 0x10]
call ebx
mov dword [ebp - 0x10], 0
add esp, 4
mov dword [ebp - 4], 0xffffffff
push 0x4d2b4c
call fcn.00461a15
mov dword [ebp - 0x1c], 1
jmp 0x412984
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], ecx
push eax
call fcn.0042b840
mov ecx, dword [eax]
xor eax, eax
test ecx, ecx
je 0x412822
mov eax, dword [ecx + 4]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
cmp eax, 3
jne 0x412987
push 0
lea eax, [ebp - 0x10]
push eax
push 0xffffffffffffffff
push str.SELECT_1_FROM_PlayerPetInfo_WHERE_Uin__AND_PetID__
push esi
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x14
test eax, eax
jne 0x412890
push dword [ebp - 0x14]
push 1
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp + 8]
push 2
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp - 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
cmp eax, 0x64
jne 0x412890
push dword [ebp - 0x10]
call ebx
mov dword [ebp - 0x18], 0
jmp 0x412976
push dword [ebp - 0x10]
call ebx
mov eax, dword [ebp + 8]
add esp, 4
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x20], 0
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00445550
mov eax, dword [ebp - 0x34]
mov edx, dword [0x4d2c54]
cmp byte [eax + 0xd], 0
jne 0x4128d0
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 0x10]
jge 0x4128d2
mov eax, edx
mov dword [ebp - 0x18], 0
cmp eax, edx
je 0x4128e5
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x20], eax
jmp 0x4128e7
xor eax, eax
mov dword [ebp - 0x1c], 0
test eax, eax
je 0x412987
mov ecx, dword [ebp - 0x24]
mov edx, eax
call fcn.0044bf30
push 0
lea eax, [ebp - 0x10]
push eax
push 0xffffffffffffffff
push str.INSERT_INTO_PlayerPetInfo__Uin_PetID_PetLevel_PetStatus_PetStrengLevel__VALUES_____________
push esi
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x14
test eax, eax
jne 0x412971
push dword [ebp - 0x14]
push 1
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp + 8]
push 2
push dword [ebp - 0x10]
call edi
mov eax, dword [ebp - 0x20]
add esp, 0xc
movzx eax, word [eax + 0x16]
push eax
push 3
push dword [ebp - 0x10]
call edi
mov eax, dword [ebp - 0x20]
add esp, 0xc
movzx eax, word [eax + 0x18]
push eax
push 4
push dword [ebp - 0x10]
call edi
add esp, 0xc
push 0
push 5
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp - 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
push dword [ebp - 0x10]
call ebx
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x10], 0
add esp, 4
push 0
lea eax, [ebp - 0x10]
push eax
push 0xffffffffffffffff
push str.INSERT_INTO_Item__Uin_ItemID_ItemNum_AvailPeriod_Status_ItemType__VALUES_______________
push esi
call dword [sym.imp.sqlite3.dll_sqlite3_prepare_v2]
add esp, 0x14
test eax, eax
jne 0x412a0c
push dword [ebp - 0x14]
push 1
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp + 8]
push 2
push dword [ebp - 0x10]
call edi
mov esi, dword [ebp + 0xc]
add esp, 0xc
push esi
push 3
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp + 0x10]
push 4
push dword [ebp - 0x10]
call edi
movzx eax, byte [ebp + 0x14]
add esp, 0xc
push eax
push 5
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp - 0x1c]
push 6
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp - 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
push dword [ebp - 0x10]
call ebx
add esp, 4
jmp 0x412a8c
push dword [ebp - 0x10]
mov esi, dword [ebp + 0xc]
call ebx
add esp, 4
jmp 0x412a8c
push dword [ebp - 0x10]
mov esi, dword [sym.imp.sqlite3.dll_sqlite3_finalize]
call esi
add esp, 4
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
push 0
lea eax, [ebp - 0x10]
push eax
push 0xffffffffffffffff
push str.UPDATE_Item_SET_ItemNum__ItemNum_____WHERE_Uin__AND_ItemID__
push dword [ebp - 0x1c]
call ebx
add esp, 0x14
test eax, eax
jne 0x412a81
push dword [ebp + 0xc]
push 1
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp - 0x14]
push 2
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp + 8]
push 3
push dword [ebp - 0x10]
call edi
add esp, 0xc
push dword [ebp - 0x10]
call dword [sym.imp.sqlite3.dll_sqlite3_step]
add esp, 4
push dword [ebp - 0x10]
call esi
add esp, 4
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
add eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
push 5
call fcn.0046194a
push 6
mov dword [0x4d2b78], 0x7ffffffe
call fcn.0046194a
int3