Function at 0x4039b0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x442008]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [ebp + 8]
mov eax, 0x11
mov ecx, 6
mov dword [ebp - 0x28], ebx
push esi
push edi
cmp byte [ebx + 0x11], 0
cmovne ecx, eax
mov ax, word [ecx + ebx + 8]
movq xmm0, qword [ecx + ebx]
mov word [ebp - 0xc], ax
mov al, byte [ecx + ebx + 0xa]
mov byte [ebp - 0xa], al
lea eax, [ebp - 0x14]
push eax
push str.SELECT_WCoinC_WCoinP_GoblinPoint__Ruud_FROM_CashShopData_WHERE_AccountID_s
push 0x447690
movq qword [ebp - 0x14], xmm0
call fcn.00416db0
add esp, 0xc
test al, al
je 0x403bb2
push dword [0x44769c]
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x403bb2
push str.WCoinC
call fcn.00417040
cmp eax, 0xffffffff
jne 0x403a3c
mov dword [ebp - 0x24], eax
jmp 0x403a50
shl eax, 0xd
add eax, 0x4482be
push eax
call fcn.00420b26
add esp, 4
mov dword [ebp - 0x24], eax
push str.WCoinP
call fcn.00417040
cmp eax, 0xffffffff
jne 0x403a64
mov dword [ebp - 0x20], eax
jmp 0x403a78
shl eax, 0xd
add eax, 0x4482be
push eax
call fcn.00420b26
add esp, 4
mov dword [ebp - 0x20], eax
push str.GoblinPoint
call fcn.00417040
cmp eax, 0xffffffff
jne 0x403a8c
mov dword [ebp - 0x1c], eax
jmp 0x403aa0
shl eax, 0xd
add eax, 0x4482be
push eax
call fcn.00420b26
add esp, 4
mov dword [ebp - 0x1c], eax
push str.Ruud
call fcn.00417040
cmp eax, 0xffffffff
jne 0x403ab4
mov dword [ebp - 0x18], eax
jmp 0x403ac8
shl eax, 0xd
add eax, 0x4482be
push eax
call fcn.00420b26
add esp, 4
mov dword [ebp - 0x18], eax
push dword [0x44769c]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x44769c]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov edx, dword [ebx + 0x28]
lea eax, [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
mov esi, dword [ebx + 0x24]
sub ecx, edx
mov edi, dword [ebx + 0x20]
push eax
mov ebx, dword [ebx + 0x1c]
xor eax, eax
cmp edx, dword [ebp - 0x18]
cmovbe eax, ecx
mov ecx, dword [ebp - 0x1c]
push eax
sub ecx, esi
xor eax, eax
cmp esi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x24]
cmovbe eax, ecx
mov ecx, dword [ebp - 0x20]
push eax
sub ecx, edi
xor eax, eax
cmp edi, dword [ebp - 0x20]
cmovbe eax, ecx
mov ecx, esi
push eax
sub ecx, ebx
xor eax, eax
cmp ebx, esi
cmovbe eax, ecx
push eax
push str.UPDATE_CashShopData_SET_WCoinC_d__WCoinP_d__GoblinPoint_d__Ruud_d_WHERE_AccountID_s
push 0x447690
call fcn.00416db0
mov edi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
add esp, 0x1c
push dword [0x44769c]
call edi
mov ebx, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push dword [0x44769c]
call ebx
mov eax, dword [ebp - 0x28]
mov edx, dword [eax + 0x1c]
test edx, edx
je 0x403c00
mov ecx, edx
xor eax, eax
neg ecx
cmp edx, esi
push 4
cmovbe eax, ecx
push eax
lea eax, [ebp - 0x14]
push eax
push str.INSERT_INTO_LOG_CREDITOS__login_valor_tipo__VALUES___s__d__d_
push 0x447690
call fcn.00416db0
add esp, 0x14
push dword [0x44769c]
call edi
push 2
push dword [0x44769c]
call ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004198d7
mov esp, ebp
pop ebp
ret 4
push dword [0x44769c]
mov edi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
call edi
mov esi, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push dword [0x44769c]
call esi
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x14]
push eax
push str.INSERT_INTO_CashShopData__AccountID_WCoinC_WCoinP_GoblinPoint__Ruud__VALUES___s__d__d__d__d_
push 0x447690
call fcn.00416db0
add esp, 0x1c
push dword [0x44769c]
call edi
push 2
push dword [0x44769c]
call esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004198d7
mov esp, ebp
pop ebp
ret 4