Function at 0x4097f0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x424018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
push edi
lea edi, [esi + 8]
push edi
push str.SELECT_GUID_FROM_T_FriendMain_WHERE_Name_s
mov ecx, 0x424ee0
call fcn.00417790
mov eax, dword [0x424eec]
mov ebx, dword [sym.imp.ODBC32.dll_SQLFetch]
add esp, 8
push eax
call ebx
push str.GUID
call fcn.00417950
cmp eax, 0xffffffff
jne 0x409843
mov dword [ebp - 0x41c], eax
jmp 0x40985b
shl eax, 0xd
add eax, 0x425b0e
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov dword [ebp - 0x41c], eax
mov ecx, dword [0x424eec]
push ecx
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov edx, dword [0x424eec]
push 2
push edx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
movzx eax, word [esi + 4]
mov edx, dword [edi + 4]
mov ecx, dword [edi]
mov word [ebp - 0x414], ax
movzx eax, word [edi + 8]
mov dword [ebp - 0x40e], edx
mov edx, dword [ebp - 0x41c]
mov word [ebp - 0x40a], ax
movzx eax, word [esi + 6]
mov dword [ebp - 0x412], ecx
mov cl, byte [edi + 0xa]
push edx
push eax
mov byte [ebp - 0x408], cl
push str.SELECT_Memo_Photo_Dir_Act_FROM_T_FriendMail_WHERE_MemoIndex_d_AND_GUID_d
mov ecx, 0x424ee0
mov dword [ebp - 0x418], 0x721204c2
mov word [ebp - 0x406], ax
call fcn.00417790
mov ecx, dword [0x424eec]
add esp, 0xc
push ecx
call ebx
push str.Photo
call fcn.00417950
cmp eax, 0xffffffff
jne 0x409911
xor eax, eax
mov dword [ebp - 0x402], eax
mov dword [ebp - 0x3fe], eax
mov dword [ebp - 0x3fa], eax
mov dword [ebp - 0x3f6], eax
mov word [ebp - 0x3f2], ax
jmp 0x40992a
shl eax, 0xd
add eax, 0x425b0e
push eax
mov ebx, 0x12
lea edi, [ebp - 0x402]
call fcn.00417ab0
push 0x41e7d4
call fcn.00417950
cmp eax, 0xffffffff
jne 0x40993d
or eax, eax
jmp 0x40994f
shl eax, 0xd
add eax, 0x425b0e
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
push 0x41e7d8
mov byte [ebp - 0x3f0], al
call fcn.00417950
cmp eax, 0xffffffff
jne 0x409968
or eax, eax
jmp 0x40997a
shl eax, 0xd
add eax, 0x425b0e
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
push str.Memo
mov byte [ebp - 0x3ef], al
call fcn.00417950
cmp eax, 0xffffffff
jne 0x4099a7
push 0x3e8
lea edx, [ebp - 0x3ee]
push 0
push edx
call sub.MSVCR100.dll_memset
add esp, 0xc
jmp 0x4099c0
shl eax, 0xd
add eax, 0x425b0e
push eax
mov ebx, 0x3e8
lea edi, [ebp - 0x3ee]
call fcn.00417ab0
lea eax, [ebp - 0x3ee]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4099d0
mov edi, dword [sym.imp.ODBC32.dll_SQLCloseCursor]
sub eax, edx
mov word [ebp - 0x404], ax
mov eax, dword [0x424eec]
push eax
call edi
mov ecx, dword [0x424eec]
mov ebx, dword [sym.imp.ODBC32.dll_SQLFreeStmt]
push 2
push ecx
call ebx
mov edx, dword [ebp - 0x41c]
movzx eax, word [esi + 6]
push edx
push eax
push str.UPDATE_T_FriendMail_SET_bRead1_WHERE_MemoIndex_d_AND_GUID_d
mov ecx, 0x424ee0
call fcn.00417790
mov ecx, dword [0x424eec]
add esp, 0xc
push ecx
call edi
mov edx, dword [0x424eec]
push 2
push edx
call ebx
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x418]
push eax
mov ecx, 0x412
call fcn.004086c0
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041ae5c
mov esp, ebp
pop ebp
ret