Function at 0x409b20
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1034
call fcn.00416020
mov eax, dword [0x41d018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
cmp byte [esi + 0x12], 0
movzx eax, word [esi + 4]
mov ecx, dword [esi + 6]
mov edx, dword [esi + 0xa]
mov word [ebp - 0x1018], ax
movzx eax, word [esi + 0xe]
mov dword [ebp - 0x1016], ecx
mov cl, byte [esi + 0x10]
mov dword [ebp - 0x1012], edx
mov dl, byte [esi + 0x11]
mov ebx, 0x14
mov dword [ebp - 0x1024], esi
mov byte [ebp - 0x101c], 0xc2
mov byte [ebp - 0x1019], 9
mov dword [ebp - 0x1008], ebx
mov word [ebp - 0x100e], ax
mov byte [ebp - 0x100c], cl
mov byte [ebp - 0x100b], dl
mov byte [ebp - 0x100a], 0
mov dword [ebp - 0x1020], 0
jbe 0x409d2c
push edi
lea edi, [ebp - 0xff0]
add esi, 0x18
lea esp, [esp]
mov eax, dword [esi]
push eax
push str.SELECT_Pet_Level_Pet_Exp_FROM_T_PetItem_Info_WHERE_ItemSerial_d
mov ecx, 0x41ee38
call fcn.00412310
add esp, 8
test al, al
je 0x409c7b
mov ecx, dword [0x41ee44]
push ecx
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x409c7b
mov dl, byte [esi - 4]
mov eax, dword [esi]
push str.Pet_Level
mov byte [ebp - 0x1034], dl
mov dword [ebp - 0x1030], eax
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x409c18
or eax, eax
jmp 0x409c2a
shl eax, 0xd
add eax, 0x41fa66
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
push str.Pet_Exp
mov byte [ebp - 0x102c], al
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x409c43
or eax, eax
jmp 0x409c55
shl eax, 0xd
add eax, 0x41fa66
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov ecx, dword [0x41ee44]
push ecx
mov ebx, eax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov edx, dword [0x41ee44]
push 2
push edx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov eax, dword [ebp - 0x1030]
jmp 0x409cdc
mov eax, dword [0x41ee44]
mov ebx, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push eax
call ebx
mov ecx, dword [0x41ee44]
push 2
push ecx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov edx, dword [esi]
push 0
push 1
push edx
push str.INSERT_INTO_T_PetItem_Info__ItemSerial_Pet_Level_Pet_Exp__VALUES___d__d__d_
mov ecx, 0x41ee38
call fcn.00412310
mov eax, dword [0x41ee44]
add esp, 0x10
push eax
call ebx
mov ecx, dword [0x41ee44]
push 2
push ecx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov dl, byte [esi - 4]
mov eax, dword [esi]
mov byte [ebp - 0x1034], dl
mov byte [ebp - 0x102c], 1
xor ebx, ebx
mov ecx, dword [ebp - 0x1034]
mov edx, dword [ebp - 0x102c]
add dword [ebp - 0x1008], 0x10
inc byte [ebp - 0x100a]
mov dword [edi], ecx
mov ecx, dword [ebp - 0x1024]
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x1020]
mov dword [edi + 8], edx
movzx edx, byte [ecx + 0x12]
inc eax
mov dword [edi + 0xc], ebx
add edi, 0x10
add esi, 8
mov dword [ebp - 0x1020], eax
cmp eax, edx
jl 0x409bc0
mov ebx, dword [ebp - 0x1008]
pop edi
mov edx, dword [ebp - 0x1018]
mov eax, ebx
shr eax, 8
mov byte [ebp - 0x101b], al
mov eax, dword [ebp - 0x1014]
mov byte [ebp - 0x101a], bl
mov ecx, dword [ebp - 0x101c]
mov dword [ebp - 0x1004], ecx
mov ecx, dword [ebp - 0x1010]
mov dword [ebp - 0xffc], eax
lea eax, [ebp - 0x1004]
mov dword [ebp - 0xff8], ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x1000], edx
mov edx, dword [ebp - 0x100c]
push eax
push ecx
mov dword [ebp - 0xff4], edx
call fcn.00413de0
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00415636
mov esp, ebp
pop ebp
ret