Function at 0x40caa0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x480
mov eax, dword [0x41d018]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
mov esi, ecx
movzx eax, word [esi + 6]
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 0x10]
push edi
mov edi, dword [sym.imp.ODBC32.dll_SQLBindParameter]
push 0x4e7bf8
lea ebx, [esi + 0xc]
mov word [ebp - 0x46c], ax
movzx eax, word [ebx + 8]
push 0
mov word [ebp - 0x462], ax
lea eax, [esi + 0x17]
push eax
push 0
push 0xb
push 0xc
push 1
push 1
mov dword [ebp - 0x47c], eax
mov eax, dword [0x41ee44]
mov dword [ebp - 0x46a], ecx
mov cl, byte [ebx + 0xa]
mov dword [ebp - 0x466], edx
mov edx, dword [esi + 8]
push 1
push eax
mov dword [ebp - 0x470], 0x5b018c1
mov byte [ebp - 0x460], cl
mov byte [ebp - 0x45f], 1
mov dword [ebp - 0x45c], edx
mov dword [0x4e7bf8], 0xfffffffd
call edi
mov edx, dword [0x41ee44]
push 0x4e7bfc
push 0
lea ecx, [esi + 0x22]
push ecx
push 0
push 0x20
push 0xc
push 1
push 1
push 2
push edx
mov dword [0x4e7bfc], 0xfffffffd
call edi
movzx eax, byte [esi + 0x43]
movzx ecx, byte [esi + 0x42]
push eax
push ecx
push ebx
push str.WZ_WriteMail__s______d__d
mov ecx, 0x41ee38
call fcn.00412310
mov edx, dword [0x41ee44]
add esp, 0x10
push edx
call dword [sym.imp.ODBC32.dll_SQLFetch]
push 0x41fa66
call dword [sym.imp.MSVCR100.dll_atoi]
mov ebx, eax
push 0x421a66
mov dword [ebp - 0x478], ebx
call dword [sym.imp.MSVCR100.dll_atoi]
mov dword [ebp - 0x458], eax
mov eax, dword [0x41ee44]
add esp, 8
push eax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov ecx, dword [0x41ee44]
push 2
push ecx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
cmp ebx, 0xa
ja 0x40cc04
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x470]
push edx
mov byte [ebp - 0x45f], bl
push eax
mov ebx, 0x18
call fcn.00413de0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00415636
mov esp, ebp
pop ebp
ret 4
push 0x3e8
lea ecx, [ebp - 0x3f4]
push 0
push ecx
call sub.MSVCR100.dll_memset
movzx edx, word [esi + 0x44]
push edx
lea eax, [esi + 0x58]
push eax
lea ecx, [ebp - 0x3f4]
push ecx
call sub.MSVCR100.dll_memcpy
mov eax, dword [0x41ee44]
add esp, 0x18
push 0x4e7bf8
push 0
lea edx, [ebp - 0x3f4]
push edx
push 0
push 0x3e8
push 0xfffffffffffffffd
push 0xfffffffffffffffe
push 1
push 1
push eax
mov dword [0x4e7bf8], 0x3e8
call edi
mov ecx, dword [0x41ee44]
push 0x4e7bfc
push 0
add esi, 0x46
push esi
push 0
push 0x12
push 0xfffffffffffffffd
push 0xfffffffffffffffe
push 1
push 2
push ecx
mov dword [0x4e7bfc], 0x12
call edi
mov edx, dword [ebp - 0x458]
push edx
push ebx
push str.UPDATE_T_FriendMail_SET_Memo__Photo__WHERE_MemoIndex_d_AND_GUID_d
mov ecx, 0x41ee38
call fcn.00412310
mov eax, dword [0x41ee44]
add esp, 0xc
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 eax, dword [ebp + 8]
lea edx, [ebp - 0x470]
push edx
push eax
mov ebx, 0x18
call fcn.00413de0
cmp byte [ebp - 0x45f], 1
jne 0x40cf06
mov edi, dword [ebp - 0x47c]
lea ecx, [ebp - 0x474]
push ecx
mov ecx, edi
call fcn.004053a0
test al, al
je 0x40cf06
mov edx, dword [ebp - 0x458]
mov eax, dword [ebp - 0x478]
push edx
push eax
push str.SELECT_MemoIndex_FriendName_wDate_Subject_bRead_FROM_T_FriendMail_WHERE_MemoIndex_d_AND_GUID_d
mov ecx, 0x41ee38
call fcn.00412310
mov ecx, dword [0x41ee44]
add esp, 0xc
push ecx
call dword [sym.imp.ODBC32.dll_SQLFetch]
mov dx, word [ebp - 0x45e]
push str.MemoIndex
mov ebx, 0x60
mov dword [ebp - 0x454], 0xb06000c2
mov byte [ebp - 0x450], 6
mov word [ebp - 0x44e], dx
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x40cd5f
or eax, eax
jmp 0x40cd71
shl eax, 0xd
add eax, 0x41fa66
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
push str.FriendName
mov word [ebp - 0x44c], ax
call fcn.004124d0
mov esi, dword [sym.imp.MSVCR100.dll_strncpy_s]
cmp eax, 0xffffffff
jne 0x40cdaa
xor eax, eax
mov dword [ebp - 0x44a], eax
mov dword [ebp - 0x446], eax
mov word [ebp - 0x442], ax
mov byte [ebp - 0x440], al
jmp 0x40cdc3
shl eax, 0xd
push 0xa
add eax, 0x41fa66
push eax
lea eax, [ebp - 0x44a]
push 0xb
push eax
call esi
add esp, 0x10
mov ecx, dword [edi]
mov edx, dword [edi + 4]
mov ax, word [edi + 8]
mov dword [ebp - 0x43f], ecx
mov cl, byte [edi + 0xa]
push str.wDate
mov dword [ebp - 0x43b], edx
mov word [ebp - 0x437], ax
mov byte [ebp - 0x435], cl
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x40ce2c
xor eax, eax
mov dword [ebp - 0x434], eax
mov dword [ebp - 0x430], eax
mov dword [ebp - 0x42c], eax
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x424], eax
mov dword [ebp - 0x420], eax
mov dword [ebp - 0x41c], eax
mov word [ebp - 0x418], ax
jmp 0x40ce45
shl eax, 0xd
push 0x1d
add eax, 0x41fa66
push eax
lea edx, [ebp - 0x434]
push 0x1e
push edx
call esi
add esp, 0x10
push str.Subject
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x40ce88
xor eax, eax
mov dword [ebp - 0x416], eax
mov dword [ebp - 0x412], eax
mov dword [ebp - 0x40e], eax
mov dword [ebp - 0x40a], eax
mov dword [ebp - 0x406], eax
mov dword [ebp - 0x402], eax
mov dword [ebp - 0x3fe], eax
mov dword [ebp - 0x3fa], eax
jmp 0x40cea1
shl eax, 0xd
push 0x1f
add eax, 0x41fa66
push eax
lea eax, [ebp - 0x416]
push 0x20
push eax
call esi
add esp, 0x10
push str.bRead
call fcn.004124d0
cmp eax, 0xffffffff
jne 0x40ceb4
or eax, eax
jmp 0x40cec6
shl eax, 0xd
add eax, 0x41fa66
push eax
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
mov edx, dword [ebp - 0x45c]
mov byte [ebp - 0x3f6], al
call fcn.004149c0
test eax, eax
je 0x40ceeb
mov edx, dword [eax + 4]
lea ecx, [ebp - 0x454]
push ecx
push edx
call fcn.00413de0
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 ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00415636
mov esp, ebp
pop ebp
ret 4