Function at 0x40c120
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x860
mov eax, dword [0x41d018]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, ecx
movzx eax, word [edi + 4]
mov ecx, dword [edi + 6]
mov edx, dword [edi + 0xa]
lea esi, [edi + 6]
mov dword [ebp - 0x82c], ecx
mov cl, byte [esi + 0xa]
mov word [ebp - 0x82e], ax
movzx eax, word [esi + 8]
mov byte [ebp - 0x822], cl
push esi
mov ebx, 0x16
push str.WZ_UserGuidCreate__s
mov ecx, 0x41ee38
mov dword [ebp - 0x838], edi
mov byte [ebp - 0x834], 0xc2
mov word [ebp - 0x831], 0xb0
mov dword [ebp - 0x840], ebx
mov dword [ebp - 0x828], edx
mov word [ebp - 0x824], ax
mov byte [ebp - 0x821], 0
call fcn.00412310
mov edx, dword [0x41ee44]
add esp, 8
push edx
call dword [sym.imp.ODBC32.dll_SQLFetch]
mov eax, dword [0x41ee44]
push eax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov ecx, dword [0x41ee44]
push 2
push ecx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push esi
push str.SELECT_GUID_MemoTotal_FROM_T_FriendMain_WHERE_Name_s
mov ecx, 0x41ee38
call fcn.00412310
mov edx, dword [0x41ee44]
add esp, 8
push edx
call dword [sym.imp.ODBC32.dll_SQLFetch]
push str.GUID
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x40c206
mov dword [ebp - 0x81c], eax
jmp 0x40c21e
shl eax, 0xd
add eax, 0x41fa66
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov dword [ebp - 0x81c], eax
push str.MemoTotal
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x40c231
or eax, eax
jmp 0x40c243
shl eax, 0xd
add eax, 0x41fa66
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov byte [ebp - 0x820], al
mov eax, dword [0x41ee44]
push eax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov ecx, dword [0x41ee44]
push 2
push ecx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov edx, dword [ebp - 0x81c]
push edx
push str.SELECT_FriendName_Del_FROM_T_FriendList_WHERE_GUID_d
mov ecx, 0x41ee38
call fcn.00412310
add esp, 8
test al, al
je 0x40c3d8
mov eax, dword [0x41ee44]
push eax
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
je 0x40c3d8
lea ecx, [ebp - 0x7f6]
mov dword [ebp - 0x83c], ecx
xor edx, edx
xor edi, edi
cmp dx, word [0x41eeac]
jge 0x40c304
mov ebx, 0x41eeae
lea esp, [esp]
push ebx
push str.FriendName
call dword [sym.imp.MSVCR100.dll__stricmp]
add esp, 8
test eax, eax
je 0x40c2ff
movsx eax, word [0x41eeac]
inc edi
add ebx, 0x1e
cmp edi, eax
jl 0x40c2c0
xor eax, eax
mov dword [ebp - 0x818], eax
mov dword [ebp - 0x814], eax
mov word [ebp - 0x810], ax
mov byte [ebp - 0x80e], al
jmp 0x40c33f
cmp edi, 0xffffffff
jne 0x40c321
xor eax, eax
mov dword [ebp - 0x818], eax
mov dword [ebp - 0x814], eax
mov word [ebp - 0x810], ax
mov byte [ebp - 0x80e], al
jmp 0x40c33f
push 0xa
shl edi, 0xd
add edi, 0x41fa66
push edi
lea ecx, [ebp - 0x818]
push 0xb
push ecx
call dword [sym.imp.MSVCR100.dll_strncpy_s]
add esp, 0x10
xor edx, edx
xor edi, edi
cmp dx, word [0x41eeac]
jge 0x40c377
mov ebx, 0x41eeae
push ebx
push 0x419220
call dword [sym.imp.MSVCR100.dll__stricmp]
add esp, 8
test eax, eax
je 0x40c4a4
movsx eax, word [0x41eeac]
inc edi
add ebx, 0x1e
cmp edi, eax
jl 0x40c351
mov byte [ebp - 0x80d], 0xff
mov eax, dword [ebp - 0x83c]
mov edx, dword [ebp - 0x818]
mov ecx, dword [ebp - 0x814]
mov ebx, dword [ebp - 0x840]
inc byte [ebp - 0x821]
mov dword [eax], edx
mov edx, dword [ebp - 0x810]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
add eax, 0xc
mov dword [ebp - 0x83c], eax
mov eax, dword [0x41ee44]
add ebx, 0xc
push eax
mov dword [ebp - 0x840], ebx
call dword [sym.imp.ODBC32.dll_SQLFetch]
cmp ax, 0x64
jne 0x40c2a7
mov edi, dword [ebp - 0x838]
mov ecx, dword [0x41ee44]
push ecx
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov edx, dword [0x41ee44]
push 2
push edx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov edx, dword [ebp - 0x830]
mov eax, ebx
shr eax, 8
mov byte [ebp - 0x833], al
mov eax, dword [ebp - 0x82c]
mov byte [ebp - 0x832], bl
mov ecx, dword [ebp - 0x834]
mov dword [ebp - 0x80c], ecx
mov ecx, dword [ebp - 0x828]
mov dword [ebp - 0x808], edx
mov edx, dword [ebp - 0x824]
mov dword [ebp - 0x800], ecx
lea ecx, [ebp - 0x80c]
mov dword [ebp - 0x7fc], edx
mov edx, dword [ebp + 8]
mov dword [ebp - 0x804], eax
mov ax, word [ebp - 0x820]
push ecx
push edx
mov word [ebp - 0x7f8], ax
call fcn.00413de0
movzx eax, word [edi + 4]
mov ecx, dword [ebp - 0x81c]
mov edx, dword [ebp + 8]
push eax
push ecx
push edx
mov edi, esi
call fcn.0040d2c0
mov eax, dword [ebp - 0x838]
movzx ecx, word [eax + 4]
mov edx, dword [ebp + 8]
push esi
push ecx
mov ecx, dword [ebp - 0x81c]
push edx
call fcn.0040d610
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00415636
mov esp, ebp
pop ebp
ret 4
cmp edi, 0xffffffff
je 0x40c377
shl edi, 0xd
add edi, 0x41fa66
push edi
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
test eax, eax
jne 0x40c377
lea ecx, [ebp - 0x85c]
push ecx
lea ecx, [ebp - 0x818]
call fcn.004053a0
test al, al
mov eax, 0xffff
je 0x40c4ea
movzx eax, word [ebp - 0x844]
mov byte [ebp - 0x80d], al
jmp 0x40c37e