Function at 0x405ca0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x854
mov eax, dword [0x442008]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
movq xmm0, qword [ecx + 6]
push ebx
push esi
movzx eax, word [ecx + 4]
xor bl, bl
push edi
lea edi, [ecx + 6]
mov word [ebp - 0x84c], ax
movzx eax, word [edi + 8]
push edi
mov word [ebp - 0x842], ax
mov al, byte [edi + 0xa]
push str.WZ_UserGuidCreate__s
push 0x447690
mov dword [ebp - 0x83c], ecx
mov byte [ebp - 0x850], 0xc2
mov byte [ebp - 0x84d], 0x60
mov dword [ebp - 0x838], 0x14
movq qword [ebp - 0x84a], xmm0
mov byte [ebp - 0x840], al
mov byte [ebp - 0x83f], bl
call fcn.00416db0
mov esi, dword [sym.imp.ODBC32.dll_SQLFetch]
add esp, 0xc
push dword [0x44769c]
call esi
push dword [0x44769c]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x44769c]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push edi
push str.SELECT_GUID_MemoTotal_FROM_T_FriendMain_WHERE_Name_s
push 0x447690
call fcn.00416db0
add esp, 0xc
push dword [0x44769c]
call esi
push str.GUID
call fcn.00417040
cmp eax, 0xffffffff
jne 0x405d7b
mov dword [ebp - 0x834], eax
jmp 0x405d92
shl eax, 0xd
add eax, 0x4482be
push eax
call fcn.00420b26
add esp, 4
mov dword [ebp - 0x834], eax
push str.MemoTotal
call fcn.00417040
cmp eax, 0xffffffff
jne 0x405da5
or eax, eax
jmp 0x405db6
shl eax, 0xd
add eax, 0x4482be
push eax
call fcn.00420b26
add esp, 4
push dword [0x44769c]
mov byte [ebp - 0x83e], al
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x44769c]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push dword [ebp - 0x834]
push str.SELECT_FriendName_Del_FROM_T_FriendList_WHERE_GUID_d
push 0x447690
call fcn.00416db0
add esp, 0xc
test al, al
je 0x405f1b
push dword [0x44769c]
call esi
cmp ax, 0x64
je 0x405f1b
lea esi, [ebp - 0x7f4]
nop
mov ecx, dword [0x4429b4]
movzx eax, bl
cmp eax, ecx
jge 0x405f02
push str.FriendName
call fcn.00417040
cmp eax, 0xffffffff
jne 0x405e4d
xorps xmm0, xmm0
mov word [ebp - 0x80c], 0
movq qword [ebp - 0x814], xmm0
mov byte [ebp - 0x80a], 0
jmp 0x405e69
shl eax, 0xd
push 0xa
add eax, 0x4482be
push eax
lea eax, [ebp - 0x814]
push 0xb
push eax
call fcn.00423e56
add esp, 0x10
push 0x43ad94
call fcn.00417040
cmp eax, 0xffffffff
jne 0x405e7c
or eax, eax
jmp 0x405e8d
shl eax, 0xd
add eax, 0x4482be
push eax
call fcn.00420b26
add esp, 4
test eax, eax
jne 0x405ebc
lea eax, [ebp - 0x814]
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.00404710
test al, al
mov eax, 0xffff
je 0x405eb4
movzx eax, word [ebp - 0x818]
mov byte [ebp - 0x809], al
jmp 0x405ec3
mov byte [ebp - 0x809], 0xff
movq xmm0, qword [ebp - 0x814]
inc bl
mov eax, dword [ebp - 0x80c]
push dword [0x44769c]
add dword [ebp - 0x838], 0xc
movq qword [esi], xmm0
mov dword [esi + 8], eax
add esi, 0xc
mov byte [ebp - 0x83f], bl
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
jne 0x405e10
jmp 0x405f1b
push edi
push ecx
push str._ChatServer__Database_contains_more_then__d_friends_for___s__character
push 0xff
push 0x442a08
call fcn.00415470
add esp, 0x14
push dword [0x44769c]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x44769c]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov ecx, dword [ebp - 0x838]
mov eax, ecx
mov esi, dword [ebp + 0xc]
shr eax, 8
mov byte [ebp - 0x84f], al
mov eax, dword [ebp - 0x840]
mov dword [ebp - 0x7f8], eax
lea eax, [ebp - 0x808]
push ecx
mov byte [ebp - 0x84e], cl
movups xmm0, xmmword [ebp - 0x850]
push eax
push esi
movups xmmword [ebp - 0x808], xmm0
call fcn.00405770
push dword [ebp - 0x834]
mov eax, dword [ebp - 0x83c]
push str.SELECT_FriendName_FROM_T_WaitFriend_WHERE_GUID_d
push 0x447690
movzx ebx, word [eax + 4]
call fcn.00416db0
add esp, 0xc
test al, al
je 0x40606a
push dword [0x44769c]
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x40606a
nop word [eax + eax]
mov ax, word [edi + 8]
movq xmm0, qword [edi]
mov word [ebp - 0x822], ax
mov al, byte [edi + 0xa]
push str.FriendName
mov word [ebp - 0x830], 0x1cc1
mov byte [ebp - 0x82e], 0x61
mov word [ebp - 0x82c], bx
movq qword [ebp - 0x82a], xmm0
mov byte [ebp - 0x820], al
call fcn.00417040
cmp eax, 0xffffffff
jne 0x406023
xorps xmm0, xmm0
mov word [ebp - 0x817], 0
movq qword [ebp - 0x81f], xmm0
mov byte [ebp - 0x815], 0
jmp 0x40603f
shl eax, 0xd
push 0xa
add eax, 0x4482be
push eax
lea eax, [ebp - 0x81f]
push 0xb
push eax
call fcn.00423e56
add esp, 0x10
movzx eax, byte [ebp - 0x82f]
push eax
lea eax, [ebp - 0x830]
push eax
push esi
call fcn.00405770
push dword [0x44769c]
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
jne 0x405fc0
push dword [0x44769c]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x44769c]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov eax, dword [ebp - 0x83c]
push edi
movzx eax, word [eax + 4]
push eax
push dword [ebp - 0x834]
push esi
call fcn.00406e70
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004198d7
mov esp, ebp
pop ebp
ret 8