Function at 0x52d660
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x7435eb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x814
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
mov dword [ebp - 0x14], ecx
jne 0x52d69f
push 0x16a
push 0x7afcec
push str.pInfo
jmp 0x52da59
cmp word [edi + 4], 1
je 0x52d6ba
push 0x16b
push 0x7afcec
push str.pInfo__usType__GIVEBACK_TYPE_ITEM
jmp 0x52da59
mov eax, dword [ebp + 8]
test eax, eax
je 0x52da4a
lea esi, [eax + 8]
mov ecx, esi
mov eax, dword [esi]
call dword [eax + 0xe0]
test al, al
je 0x52da4a
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0xc]
push eax
push ecx
push 0x79a1d8
lea edx, [ebp - 0x820]
push str.SELECT__FROM__s_WHERE_player_id_u_AND_id_u_LIMIT_1
push edx
mov byte [ebp + 0xf], 0
call fcn.0070258b
mov ecx, dword [0x7fd5f0]
add esp, 0x14
lea edx, [ebp - 0x820]
mov eax, dword [ecx]
push 1
push edx
call dword [eax]
mov ebx, eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
test ebx, ebx
mov dword [ebp - 4], 0
je 0x52da11
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x60]
test eax, eax
jbe 0x52da11
push 0x24
call fcn.005d7e60
add esp, 4
mov dword [ebp - 0x10], eax
test eax, eax
mov byte [ebp - 4], 1
je 0x52d758
mov ecx, eax
call fcn.005d7f00
mov esi, eax
jmp 0x52d75a
xor esi, esi
mov dword [ebp - 0x20], esi
test esi, esi
mov byte [ebp - 4], 2
jne 0x52d799
push 0x179
push 0x7afcec
push str.pItem
push str.CHECKF
push 0x793720
call fcn.00401080
mov edx, dword [ebx]
add esp, 0x14
mov ecx, ebx
mov dword [ebp - 4], 0xffffffff
call dword [edx + 4]
jmp 0x52da6b
mov eax, dword [esi]
push ebx
mov ecx, esi
call dword [eax + 0x18]
test al, al
jne 0x52d7d6
push 0x17b
push 0x7afcec
push str.pItem__CreateByRes_pRes_
push str.IF_OK
push 0x793720
call fcn.00401080
mov edx, dword [esi]
add esp, 0x14
mov ecx, esi
mov byte [ebp - 4], 0
call dword [edx + 0x10]
jmp 0x52da22
mov ecx, dword [0x7fd5e4]
mov eax, dword [edi + 0xc]
push eax
mov byte [ebp + 0xf], 1
mov edx, dword [ecx]
call dword [edx + 0x54]
mov ebx, eax
test ebx, ebx
je 0x52d81e
mov ecx, dword [0x7fd5e4]
mov eax, dword [ebx + 0x5e4]
push 0x258
push eax
mov edx, dword [ecx]
call dword [edx + 0x40]
mov ecx, dword [0x7fd5e4]
mov bx, word [ebx + 0x7ea]
push 0x7b0040
push ebx
mov eax, dword [ecx]
call dword [eax + 0x34]
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
mov ecx, dword [ebp - 0x14]
push eax
mov eax, dword [edi + 0xc]
push eax
call fcn.0052e7e0
mov eax, dword [edi + 0x10]
mov edx, dword [esi]
push 0
push eax
push 2
mov ecx, esi
call dword [edx + 0x3c]
mov eax, dword [edi + 0x10]
mov edx, dword [esi]
push 0
push eax
push 3
mov ecx, esi
call dword [edx + 0x3c]
mov edx, dword [esi]
push 0
push 0xd8
push 7
mov ecx, esi
call dword [edx + 0x3c]
mov eax, dword [esi]
push 1
push 0
push 0x19
mov ecx, esi
call dword [eax + 0x3c]
mov ecx, dword [0x7fd5e4]
mov eax, dword [edi + 0x10]
push eax
mov edx, dword [ecx]
call dword [edx + 0x54]
mov ebx, eax
test ebx, ebx
je 0x52d919
mov eax, dword [0x7fd504]
test eax, eax
jne 0x52d8b9
push 0x18f
push 0x797a90
push str.g_pItemType
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
mov dword [ebp - 0x10], 0
jmp 0x52d8bc
mov dword [ebp - 0x10], eax
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx + 0x34]
mov ecx, dword [ebp - 0x10]
push eax
call fcn.004f0bb0
test eax, eax
jne 0x52d8f5
push 0x198
push 0x7afcec
push str.pItemType
push str.IF_OK
push 0x793720
call fcn.00401080
add esp, 0x14
jmp 0x52d919
lea edx, [ebx + 8]
push 1
mov dword [ebp - 0x10], edx
mov ecx, eax
mov ebx, dword [edx]
mov edx, dword [eax]
call dword [edx + 0xc]
push eax
mov eax, dword [ebp - 0x10]
push 0x7afff8
push eax
call dword [ebx + 0x1b4]
add esp, 0xc
mov ecx, dword [edi]
mov edx, dword [esi]
push ecx
push 1
mov ecx, esi
call dword [edx + 0x34]
push eax
xor eax, eax
mov ax, word [edi + 4]
lea ecx, [ebp - 0x420]
push eax
push str._d__u__u
push ecx
call fcn.0070258b
mov ebx, dword [0x7fd600]
add esp, 0x14
test ebx, ebx
jne 0x52d96c
push 0x17d
push 0x797a90
push str.g_pLeaveWord
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
mov ecx, dword [edi + 0xc]
push eax
lea eax, [ebp - 0x420]
push 2
push eax
push ecx
push 0x7e5328
push str.SYSTEM
mov ecx, ebx
call fcn.004db250
mov ebx, dword [0x7fd600]
test ebx, ebx
jne 0x52d9bd
push 0x17d
push 0x797a90
push str.g_pLeaveWord
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
mov ecx, dword [edi + 0x10]
push eax
lea eax, [ebp - 0x420]
push 3
push eax
lea edx, [edi + 0x14]
push ecx
push edx
push str.SYSTEM
mov ecx, ebx
call fcn.004db250
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax + 0x34]
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 4]
mov ecx, dword [ebp - 0x14]
push eax
mov eax, dword [ebp + 8]
push edi
push eax
call fcn.0052e9b0
mov edx, dword [esi]
mov ebx, dword [ebp - 0x18]
mov ecx, esi
mov byte [ebp - 4], 0
call dword [edx + 0x10]
jmp 0x52da22
mov eax, dword [esi]
push 0x7affc0
push esi
call dword [eax + 0x1b4]
add esp, 8
test ebx, ebx
mov dword [ebp - 4], 0xffffffff
je 0x52da34
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 4]
mov al, byte [ebp + 0xf]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
push 0x16c
push 0x7afcec
push str.pUser__pUser__IsGM__
push str.CHECKF
push 0x793720
call fcn.00401080
add esp, 0x14
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor al, al
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8