Function at 0x402a50
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8f4
mov eax, dword [0x422008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
movq xmm0, qword [esi + 6]
lea ecx, [esi + 6]
push edi
mov dword [ebp - 0x8f0], esi
movzx eax, word [esi + 4]
mov word [ebp - 0x8e2], ax
movzx eax, word [ecx + 8]
mov word [ebp - 0x8d8], ax
mov al, byte [ecx + 0xa]
mov byte [ebp - 0x8d6], al
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x8d4], eax
mov al, byte [esi + 0x18]
mov byte [ebp - 0x8d0], al
movzx eax, al
push eax
push ecx
push str.SELECT__FROM_CashShopInventory_WHERE_AccountID_s_AND_InventoryType_d
push 0x422408
mov dword [ebp - 0x8e8], 0x18e008c2
mov byte [ebp - 0x8e4], 3
movq qword [ebp - 0x8e0], xmm0
mov byte [ebp - 0x8d5], 0
mov dword [ebp - 0x8cc], 0
mov dword [ebp - 0x8c8], 0
call fcn.00414eb0
add esp, 0x10
push dword [0x422414]
test al, al
jne 0x402b1d
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x422414]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov byte [ebp - 0x8d5], 1
jmp 0x402daa
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x402d90
mov edi, dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov ebx, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy_s]
nop dword [eax]
mov ecx, dword [ebp - 0x8cc]
mov eax, 0x38e38e39
mul ecx
inc ecx
shr edx, 1
inc edx
mov dword [ebp - 0x8cc], ecx
cmp edx, dword [esi + 0x14]
jne 0x402d7a
push str.BaseItemCode
call fcn.00415100
cmp eax, 0xffffffff
jne 0x402b73
or eax, eax
jmp 0x402b81
shl eax, 0xd
add eax, 0x423036
push eax
call edi
add esp, 4
imul ecx, dword [ebp - 0x8c8], 0xf8
push str.MainItemCode
mov dword [ebp + ecx - 0x8c0], eax
call fcn.00415100
cmp eax, 0xffffffff
jne 0x402ba5
or eax, eax
jmp 0x402bb3
shl eax, 0xd
add eax, 0x423036
push eax
call edi
add esp, 4
imul ecx, dword [ebp - 0x8c8], 0xf8
push str.PackageMainIndex
mov dword [ebp + ecx - 0x8bc], eax
call fcn.00415100
cmp eax, 0xffffffff
jne 0x402bd7
or eax, eax
jmp 0x402be5
shl eax, 0xd
add eax, 0x423036
push eax
call edi
add esp, 4
imul ecx, dword [ebp - 0x8c8], 0xf8
push str.ProductBaseIndex
mov dword [ebp + ecx - 0x8b8], eax
call fcn.00415100
cmp eax, 0xffffffff
jne 0x402c09
or eax, eax
jmp 0x402c17
shl eax, 0xd
add eax, 0x423036
push eax
call edi
add esp, 4
imul ecx, dword [ebp - 0x8c8], 0xf8
push str.ProductMainIndex
mov dword [ebp + ecx - 0x8b4], eax
call fcn.00415100
cmp eax, 0xffffffff
jne 0x402c3b
or eax, eax
jmp 0x402c49
shl eax, 0xd
add eax, 0x423036
push eax
call edi
add esp, 4
imul ecx, dword [ebp - 0x8c8], 0xf8
push str.CoinValue
mov dword [ebp + ecx - 0x8b0], eax
call fcn.00415100
cmp eax, 0xffffffff
jne 0x402c73
movss xmm0, dword [0x41f360]
jmp 0x402c93
shl eax, 0xd
add eax, 0x423036
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atof]
fstp dword [ebp - 0x8ec]
movss xmm0, dword [ebp - 0x8ec]
add esp, 4
imul eax, dword [ebp - 0x8c8], 0xf8
cvtps2pd xmm0, xmm0
push str.ProductType
movsd qword [ebp + eax - 0x8a8], xmm0
call fcn.00415100
cmp eax, 0xffffffff
jne 0x402cbc
or eax, eax
jmp 0x402cca
shl eax, 0xd
add eax, 0x423036
push eax
call edi
add esp, 4
imul ecx, dword [ebp - 0x8c8], 0xf8
lea esi, [ebp - 0x89f]
push str.GiftName
mov byte [ebp + ecx - 0x8a0], al
imul eax, dword [ebp - 0x8c8], 0xf8
add esi, eax
call fcn.00415100
cmp eax, 0xffffffff
jne 0x402d0f
xorps xmm0, xmm0
movq qword [esi], xmm0
mov word [esi + 8], 0
mov byte [esi + 0xa], 0
jmp 0x402d22
shl eax, 0xd
push 0xa
add eax, 0x423036
push eax
push 0xb
push esi
call ebx
add esp, 0x10
imul eax, dword [ebp - 0x8c8], 0xf8
lea esi, [ebp - 0x894]
push str.GiftText
add esi, eax
call fcn.00415100
cmp eax, 0xffffffff
jne 0x402d55
push 0xc8
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
jmp 0x402d6e
shl eax, 0xd
push 0xc7
add eax, 0x423036
push eax
push 0xc8
push esi
call ebx
add esp, 0x10
inc dword [ebp - 0x8c8]
mov esi, dword [ebp - 0x8f0]
push dword [0x422414]
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
jne 0x402b40
push dword [0x422414]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x422414]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 0x8e0
lea eax, [ebp - 0x8e8]
push eax
push dword [ebp + 0xc]
call fcn.004163f0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00417e1d
mov esp, ebp
pop ebp
ret 8