Function at 0x40b0c0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x478
mov eax, dword [0x41f018]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
push 0x5b4680
mov esi, ecx
movzx eax, word [esi + 6]
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 0x10]
push 0
lea edi, [esi + 0x17]
push edi
push 0
push 0xb
lea ebx, [esi + 0xc]
push 0xc
mov word [ebp - 0x46c], ax
movzx eax, word [ebx + 8]
push 1
push 1
mov word [ebp - 0x462], ax
mov eax, dword [0x4eb8cc]
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 [0x5b4680], 0xfffffffd
call dword [sym.imp.ODBC32.dll_SQLBindParameter]
mov edx, dword [0x4eb8cc]
push 0x5b4684
push 0
lea ecx, [esi + 0x22]
push ecx
push 0
push 0x20
push 0xc
push 1
push 1
push 2
push edx
mov dword [0x5b4684], 0xfffffffd
call dword [sym.imp.ODBC32.dll_SQLBindParameter]
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, 0x4eb8c0
call fcn.00412e90
mov edx, dword [0x4eb8cc]
add esp, 0x10
push edx
call dword [sym.imp.ODBC32.dll_SQLFetch]
push 0x4ec4ee
call dword [sym.imp.MSVCR100.dll_atoi]
mov ebx, eax
push 0x4ee4ee
mov dword [ebp - 0x478], ebx
call dword [sym.imp.MSVCR100.dll_atoi]
mov dword [ebp - 0x458], eax
mov eax, dword [0x4eb8cc]
add esp, 8
push eax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov ecx, dword [0x4eb8cc]
push 2
push ecx
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
cmp ebx, 0xa
ja 0x40b220
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x470]
push edx
mov byte [ebp - 0x45f], bl
push eax
mov ebx, 0x18
call fcn.00414a90
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00415bda
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 [0x4eb8cc]
add esp, 0x18
push 0x5b4680
push 0
lea edx, [ebp - 0x3f4]
push edx
push 0
push 0x3e8
push 0xfffffffffffffffd
push 0xfffffffffffffffe
push 1
push 1
push eax
mov dword [0x5b4680], 0x3e8
call dword [sym.imp.ODBC32.dll_SQLBindParameter]
mov ecx, dword [0x4eb8cc]
push 0x5b4684
push 0
add esi, 0x46
push esi
push 0
push 0x12
push 0xfffffffffffffffd
push 0xfffffffffffffffe
push 1
push 2
push ecx
mov dword [0x5b4684], 0x12
call dword [sym.imp.ODBC32.dll_SQLBindParameter]
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, 0x4eb8c0
call fcn.00412e90
mov eax, dword [0x4eb8cc]
add esp, 0xc
push eax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov ecx, dword [0x4eb8cc]
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.00414a90
cmp byte [ebp - 0x45f], 1
jne 0x40b428
lea ecx, [ebp - 0x474]
push ecx
mov ecx, edi
call fcn.00405210
test al, al
je 0x40b428
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, 0x4eb8c0
call fcn.00412e90
mov ecx, dword [0x4eb8cc]
add esp, 0xc
push ecx
call dword [sym.imp.ODBC32.dll_SQLFetch]
mov dx, word [ebp - 0x45e]
push str.MemoIndex
mov ebx, 0x4eb8c0
mov dword [ebp - 0x454], 0xb06000c2
mov byte [ebp - 0x450], 6
mov word [ebp - 0x44e], dx
call fcn.00413050
mov word [ebp - 0x44c], ax
push 0xb
lea eax, [ebp - 0x44a]
push eax
push str.FriendName
call fcn.004131c0
mov edx, dword [edi + 4]
mov ecx, dword [edi]
mov ax, word [edi + 8]
mov dword [ebp - 0x43b], edx
push 0x1e
lea edx, [ebp - 0x434]
mov dword [ebp - 0x43f], ecx
mov cl, byte [edi + 0xa]
push edx
push str.wDate
mov word [ebp - 0x437], ax
mov byte [ebp - 0x435], cl
call fcn.004131c0
push 0x20
lea eax, [ebp - 0x416]
push eax
push str.Subject
call fcn.004131c0
push str.bRead
call fcn.00413050
mov edx, dword [ebp - 0x45c]
mov byte [ebp - 0x3f6], al
call fcn.004155b0
test eax, eax
je 0x40b40d
mov edx, dword [eax + 4]
lea ecx, [ebp - 0x454]
push ecx
push edx
mov ebx, 0x60
call fcn.00414a90
mov eax, dword [0x4eb8cc]
push eax
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
mov ecx, dword [0x4eb8cc]
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.00415bda
mov esp, ebp
pop ebp
ret 4