Function at 0x477c90
Capabilities:
Reference sql statements

Disassembly:
mov eax, 0x385c
call fcn.0047f090
mov eax, dword [0x4d2084]
xor eax, esp
push ebx
mov ebx, dword [esp + 0x3864]
push edi
push ebx
mov ecx, 0x4d8ac8
mov dword [esp + 0x3864], eax
call fcn.0042b870
xor edi, edi
cmp eax, edi
mov dword [esp + 0x10], eax
je 0x477f8b
push ebp
lea ecx, [esp + 0x1c]
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], edi
mov dword [esp + 0x60], edi
mov byte [esp + 0x64], 0
xor ebp, ebp
mov byte [esp + 0xf], 0
call fcn.0041f340
push ebx
lea eax, [esp + 0x68]
push str.SELECT_sum__Money___FROM__T_auction_result__WHERE__ChrID__d_and__Type_0
push eax
call fcn.0047f034
add esp, 0xc
push 1
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x6c]
push edx
mov ecx, 0x4d8c60
call fcn.00404b50
test al, al
jne 0x477d33
mov eax, dword [0x52f0ec]
push str._GwAuction::GetItems__Can_NOT_access_Auction_DB__n
push eax
call fcn.0048dda0
add esp, 8
xor al, al
jmp 0x477ec9
mov ecx, dword [esp + 0x10]
push ecx
call sub.LIBMYSQL.dll_mysql_fetch_row
cmp eax, edi
je 0x477d56
mov eax, dword [eax]
cmp eax, edi
jne 0x477d4b
xor ebp, ebp
jmp 0x477d56
push eax
call fcn.0047f135
add esp, 4
mov ebp, eax
mov edx, dword [esp + 0x10]
push edx
call sub.LIBMYSQL.dll_mysql_free_result
cmp ebp, edi
je 0x477dc1
push ebx
lea eax, [esp + 0x68]
push str.DELETE_FROM__T_auction_result__WHERE__ChrID__d_and__Type_0
push eax
call fcn.0047f034
add esp, 0xc
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x6c]
push eax
mov ecx, 0x4d8c60
call fcn.00404b70
test al, al
jne 0x477daf
mov ecx, dword [0x52f0ec]
push str._GwAuction::GetItems__Can_NOT_access_Auction_DB__n
push ecx
call fcn.0048dda0
add esp, 8
xor al, al
jmp 0x477ec9
mov edx, dword [esp + 0x10]
push edx
call sub.LIBMYSQL.dll_mysql_free_result
cmp dword [esp + 0x18], edi
jne 0x477dc1
xor ebp, ebp
push ebx
lea eax, [esp + 0x68]
push str.SELECT__ItemVer___ItemID___Index__FROM__T_auction_result__WHERE__ChrID__d_and__Type_1_LIMIT_1
push eax
call fcn.0047f034
add esp, 0xc
push 1
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x6c]
push edx
mov ecx, 0x4d8c60
call fcn.00404b50
test al, al
je 0x477d19
mov ecx, dword [esp + 0x10]
push esi
push ecx
call sub.LIBMYSQL.dll_mysql_fetch_row
mov esi, eax
test esi, esi
je 0x477e40
mov eax, dword [esi]
test eax, eax
jne 0x477e0d
xor edi, edi
jmp 0x477e18
push eax
call fcn.0047f135
add esp, 4
mov edi, eax
mov edx, dword [esi + 4]
push 0x4d96a8
push edx
push edi
lea ecx, [esp + 0x2c]
call fcn.00460ba0
and byte [esp + 0x29], 0xfb
mov eax, dword [esi + 8]
push eax
call fcn.0047f1bd
add esp, 4
mov esi, eax
jmp 0x477e44
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push ecx
call sub.LIBMYSQL.dll_mysql_free_result
test edi, edi
je 0x477ef7
mov eax, dword [esp + 0x3874]
test eax, eax
jne 0x477e83
push 0
push str.MSG_AUCTION_BAG_FULL
call fcn.00455f10
add esp, 4
push eax
push ebx
mov ecx, 0x4d8ac8
call fcn.0042bae0
mov byte [esp + 0x13], 1
jmp 0x477ef5
push esi
lea edx, [esp + 0x6c]
push 0x4b5e68
push edx
call fcn.0047f034
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x70]
push edx
mov ecx, 0x4d8c60
call fcn.00404b70
test al, al
jne 0x477ee3
mov eax, dword [0x52f0ec]
push str._GwAuction::GetItems__Can_NOT_access_Auction_DB__n
push eax
call fcn.0048dda0
add esp, 8
xor al, al
pop esi
pop ebp
mov ecx, dword [esp + 0x3860]
pop edi
pop ebx
xor ecx, esp
call fcn.0047ece2
add esp, 0x385c
ret 8
mov ecx, dword [esp + 0x14]
push ecx
call sub.LIBMYSQL.dll_mysql_free_result
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x477ef7
xor edi, edi
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 0x2b0]
push eax
mov ecx, 0x4d8ac8
call fcn.004013d0
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
je 0x477f84
push 0xaa
mov ecx, 0x4d8ea0
call fcn.00401010
mov esi, eax
push ebx
mov ecx, esi
call fcn.00436940
test ebp, ebp
setne cl
push ecx
mov ecx, esi
call fcn.00436820
test ebp, ebp
je 0x477f47
push ebp
mov ecx, esi
call fcn.00436940
test edi, edi
je 0x477f52
mov eax, 1
jmp 0x477f5d
mov al, byte [esp + 0x13]
neg al
sbb eax, eax
and eax, 2
push eax
mov ecx, esi
call fcn.00436820
test edi, edi
je 0x477f75
push 0
push esi
lea ecx, [esp + 0x28]
call fcn.0045dbf0
mov edx, dword [esp + 0x18]
push edx
mov ecx, 0x4d8ea0
call fcn.00435110
mov al, 1
jmp 0x477ec8
mov al, 1
jmp 0x477eca