Function at 0x40c840
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x454f50
push 0x4375c0
mov eax, dword fs:[0]
push eax
add esp, 0xfffffbe0
mov eax, dword [0x458330]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x2c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov dword [ebp - 4], 0
mov dword [ebp - 0x428], 0x14
mov dword [ebp - 0x1c], 0x14
mov byte [ebp - 0x424], 0
xor eax, eax
mov dword [ebp - 0x423], eax
mov dword [ebp - 0x41f], eax
mov word [ebp - 0x41b], ax
mov byte [ebp - 0x418], 0
push 0x3e7
push 0
lea ecx, [ebp - 0x417]
push ecx
call fcn.00435470
add esp, 0xc
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
lea edx, [ebp - 0x418]
mov dword [ebp - 0x28], edx
push 0xa
mov eax, dword [ebp + 0x10]
add eax, 4
push eax
lea ecx, [ebp - 0x424]
push ecx
call fcn.004360a0
add esp, 0xc
mov dword [ebp - 0x42c], 0
jmp 0x40c914
mov edx, dword [ebp - 0x42c]
add edx, 1
mov dword [ebp - 0x42c], edx
mov eax, dword [ebp + 0x10]
movzx ecx, byte [eax + 0x13]
cmp dword [ebp - 0x42c], ecx
jge 0x40ca79
mov edx, dword [ebp + 0x10]
add edx, dword [ebp - 0x428]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp + eax - 0x418]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 4]
push eax
push str.SELECT_Pet_Level__Pet_Exp_FROM_T_PetItem_Info_WHERE_ItemSerial_d
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
push ecx
call fcn.00407950
add esp, 0xc
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407bb0
movsx edx, ax
cmp edx, 0x64
jne 0x40c9ec
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407b60
push 0
push 1
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 4]
push ecx
push str.INSERT_INTO_T_PetItem_Info__ItemSerial__Pet_Level__Pet_Exp__VALUES___d___d___d_
mov edx, dword [ebp + 8]
add edx, 0x7dc0
push edx
call fcn.00407950
add esp, 0x14
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407bb0
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407b60
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 4]
push ecx
push str.SELECT_Pet_Level__Pet_Exp_FROM_T_PetItem_Info_WHERE_ItemSerial_d
mov edx, dword [ebp + 8]
add edx, 0x7dc0
push edx
call fcn.00407950
add esp, 0xc
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407bb0
mov eax, dword [ebp - 0x20]
cmp dword [eax + 4], 0
jne 0x40c9f7
jmp 0x40ca3f
push str.Pet_Level
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407cf0
mov ecx, dword [ebp - 0x24]
mov byte [ecx + 8], al
push str.Pet_Exp
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407cf0
mov edx, dword [ebp - 0x24]
mov dword [edx + 0xc], eax
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
mov dl, byte [ecx]
mov byte [eax], dl
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov ecx, dword [ebp + 8]
add ecx, 0x7dc0
call fcn.00407b60
mov eax, dword [ebp - 0x28]
mov cl, byte [eax + 0x13]
add cl, 1
mov edx, dword [ebp - 0x28]
mov byte [edx + 0x13], cl
mov eax, dword [ebp - 0x428]
add eax, 8
mov dword [ebp - 0x428], eax
mov ecx, dword [ebp - 0x1c]
add ecx, 0x10
mov dword [ebp - 0x1c], ecx
jmp 0x40c905
mov edx, dword [ebp - 0x28]
movzx eax, byte [edx + 0x13]
shl eax, 4
add eax, 0x14
push eax
push 0x56
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.00405450
add esp, 0xc
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp + 0x10]
mov cl, byte [eax + 0x12]
mov byte [edx + 0x12], cl
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp + 0x10]
mov cx, word [eax + 0x10]
mov word [edx + 0x10], cx
push 0xa
lea edx, [ebp - 0x424]
push edx
mov eax, dword [ebp - 0x28]
add eax, 4
push eax
call fcn.004360a0
add esp, 0xc
mov ecx, dword [ebp - 0x28]
movzx edx, byte [ecx + 0x13]
shl edx, 4
add edx, 0x14
push edx
lea eax, [ebp - 0x418]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00406820
mov dword [ebp - 4], 0xfffffffe
jmp 0x40cb31
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x2c]
xor ecx, ebp
call fcn.00435f91
mov esp, ebp
pop ebp
ret