Function at 0x5a9370
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x747110
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x82c
push ebx
mov ebx, ecx
push esi
push edi
mov eax, dword [ebx + 0x5e4]
mov dword [ebp - 0x10], esp
mov ecx, eax
lea edx, [ebp - 0x438]
xor ecx, 0xbe6e0
xor esi, esi
push ecx
push eax
push str.cq_card
push str.SELECT__FROM__s_WHERE_account_id_u__used0__chk_sum_u_ref_id__1_
push edx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
call fcn.0070258b
mov ecx, dword [0x7fd5f0]
add esp, 0x14
lea edx, [ebp - 0x438]
mov eax, dword [ecx]
push 1
push edx
call dword [eax]
mov edi, eax
mov dword [ebp - 0x30], edi
cmp eax, esi
mov dword [ebp - 4], esi
je 0x5a9602
mov byte [ebp - 4], 1
mov dword [ebp - 0x14], esi
cmp edi, esi
jne 0x5a9419
push 0x22
push str.....common_autoptr.h
push str.m_ptr
push str.ASSERT
push 0x793720
call fcn.00401080
add esp, 0x14
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x60]
cmp dword [ebp - 0x14], eax
jae 0x5a95f8
mov edi, dword [ebp - 0x30]
test edi, edi
jne 0x5a944e
push 0x22
push str.....common_autoptr.h
push str.m_ptr
push str.ASSERT
push 0x793720
call fcn.00401080
add esp, 0x14
mov edx, dword [edi]
push str.ref_id
mov ecx, edi
call dword [edx + 0x20]
test edi, edi
mov dword [ebp - 0x20], eax
jne 0x5a947f
push 0x22
push str.....common_autoptr.h
push str.m_ptr
push str.ASSERT
push 0x793720
call fcn.00401080
add esp, 0x14
mov eax, dword [edi]
push 1
push str.used
mov ecx, edi
call dword [eax + 0x24]
test edi, edi
jne 0x5a94af
push 0x22
push str.....common_autoptr.h
push str.m_ptr
push str.ASSERT
push 0x793720
call fcn.00401080
add esp, 0x14
push 0
push 2
call fcn.0040ab00
mov edx, dword [edi]
add esp, 8
mov ecx, edi
push eax
push str.time_stamp
call dword [edx + 0x24]
test edi, edi
jne 0x5a94ea
push 0x22
push str.....common_autoptr.h
push str.m_ptr
push str.ASSERT
push 0x793720
call fcn.00401080
add esp, 0x14
mov eax, dword [edi]
push 0
mov ecx, edi
call dword [eax + 0xc]
call fcn.0064adc0
mov ebx, dword [ebp - 0x24]
push 0
cdq
mov ecx, dword [ebx + 8]
lea esi, [ebx + 8]
push edx
mov edx, ecx
push eax
push 0x2e
mov ecx, esi
call dword [edx + 0x138]
call fcn.0064adc0
mov dword [ebp - 0x18], eax
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x20]
push ecx
push eax
push edx
push 6
call fcn.0046fa60
add esp, 0x10
call fcn.0064adc0
mov dword [ebp - 0x18], eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
mov edx, dword [ebx]
mov ecx, ebx
mov esi, eax
call dword [edx + 4]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x20]
push ecx
push edx
push esi
push eax
push str.Checkout_card1_userid:_u_user_name:_s_idRef:_u_price:_u
push str.gmlog_card_checkout
call fcn.0040a4e0
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x14]
add esp, 0x18
inc edx
inc ecx
mov dword [ebp - 0x2c], edx
test edi, edi
mov dword [ebp - 0x14], ecx
jne 0x5a9598
push 0x22
push str.....common_autoptr.h
push str.m_ptr
push str.ASSERT
push 0x793720
call fcn.00401080
add esp, 0x14
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x64]
xor esi, esi
jmp 0x5a93f7
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 4], 0
mov ecx, 0x100
xor eax, eax
lea edi, [ebp - 0x438]
lea edx, [ebp - 0x438]
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x1c]
mov ecx, eax
xor ecx, 0xbe6e1
push ecx
push eax
push str.cq_card2
push str.SELECT__FROM__s_WHERE_account_id_u__used0__chk_sum_u_ref_id__1_
push edx
call fcn.0070258b
mov ecx, dword [0x7fd5f0]
add esp, 0x14
lea edx, [ebp - 0x438]
mov eax, dword [ecx]
push 1
push edx
call dword [eax]
mov edi, eax
mov dword [ebp - 0x18], edi
test eax, eax
mov byte [ebp - 4], 3
je 0x5a986c
mov byte [ebp - 4], 4
mov dword [ebp - 0x14], 0
test edi, edi
jne 0x5a9688
push 0x22
push str.....common_autoptr.h
push str.m_ptr
push str.ASSERT
push 0x793720
call fcn.00401080
add esp, 0x14
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x60]
cmp dword [ebp - 0x14], eax
jae 0x5a9862
test edi, edi
jne 0x5a96ba
push 0x22
push str.....common_autoptr.h
push str.m_ptr
push str.ASSERT
push 0x793720
call fcn.00401080
add esp, 0x14
mov edx, dword [edi]
push str.ref_id
mov ecx, edi
call dword [edx + 0x20]
test edi, edi
mov dword [ebp - 0x20], eax
jne 0x5a96eb
push 0x22
push str.....common_autoptr.h
push str.m_ptr
push str.ASSERT
push 0x793720
call fcn.00401080
add esp, 0x14
mov eax, dword [edi]
push 1
push str.used
mov ecx, edi
call dword [eax + 0x24]
test edi, edi
jne 0x5a971b
push 0x22
push str.....common_autoptr.h
push str.m_ptr
push str.ASSERT
push 0x793720
call fcn.00401080
add esp, 0x14
push 0
push 2
call fcn.0040ab00
mov edx, dword [edi]
add esp, 8
mov ecx, edi
push eax
push str.time_stamp
call dword [edx + 0x24]
test edi, edi
jne 0x5a9756
push 0x22
push str.....common_autoptr.h
push str.m_ptr
push str.ASSERT
push 0x793720
call fcn.00401080
add esp, 0x14
mov eax, dword [edi]
push 0
mov ecx, edi
call dword [eax + 0xc]
call fcn.0064add0
mov ebx, dword [ebp - 0x24]
push 0
cdq
mov ecx, dword [ebx + 8]
lea esi, [ebx + 8]
push edx
mov edx, ecx
push eax
push 0x2e
mov ecx, esi
call dword [edx + 0x138]
call fcn.0064add0
mov dword [ebp - 0x1c], eax
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
push ecx
push eax
push edx
push 8
call fcn.0046fa60
add esp, 0x10
call fcn.0064add0
mov ebx, eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
mov ecx, dword [ebp - 0x24]
mov esi, eax
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [ebp - 0x20]
push ebx
push ecx
push esi
push eax
push str.Checkout_card2_userid:_u_user_name:_s_idRef:_u_price:_u
push str.gmlog_card_checkout
call fcn.0040a4e0
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x14]
add esp, 0x18
inc edx
inc ecx
mov dword [ebp - 0x28], edx
test edi, edi
mov dword [ebp - 0x14], ecx
jne 0x5a9801
push 0x22
push str.....common_autoptr.h
push str.m_ptr
push str.ASSERT
push 0x793720
call fcn.00401080
add esp, 0x14
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0x64]
jmp 0x5a9666
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 4], 3
push 1
push 0x2e
mov ecx, ebx
call fcn.00464060
mov eax, dword [ebp - 0x2c]
test eax, eax
jg 0x5a9885
mov eax, dword [ebp - 0x28]
test eax, eax
jle 0x5a98ad
call fcn.0064add0
mov esi, eax
imul esi, dword [ebp - 0x28]
call fcn.0064adc0
imul eax, dword [ebp - 0x2c]
mov edx, dword [ebx]
add esi, eax
push esi
push 0x7bb91c
push ebx
call dword [edx + 0xcc]
add esp, 0xc
test edi, edi
mov byte [ebp - 4], 0
je 0x5a98bc
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 4], 0xffffffff
test ecx, ecx
je 0x5a98cf
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov al, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret