Function at 0x4061f0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x47c
mov eax, dword [0x422008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x4eb1c8
mov ebx, ecx
mov dword [ebp - 0x454], edx
movq xmm0, qword [ebx + 0xc]
lea esi, [ebx + 0xc]
push 0
mov dword [ebp - 0x474], ebx
movzx eax, word [ebx + 4]
lea edi, [ebx + 0x17]
push edi
push 0
push 0xb
push 0xc
mov word [ebp - 0x46c], ax
movzx eax, word [esi + 8]
push 1
push 1
mov word [ebp - 0x462], ax
mov al, byte [esi + 0xa]
push 1
push dword [0x422414]
mov byte [ebp - 0x460], al
mov eax, dword [ebx + 8]
mov word [ebp - 0x470], 0x18c1
mov byte [ebp - 0x46e], 0x70
movq qword [ebp - 0x46a], xmm0
mov byte [ebp - 0x45f], 1
mov dword [ebp - 0x45c], eax
mov dword [0x4eb1c8], 0xfffffffd
call dword [sym.imp.ODBC32.dll_SQLBindParameter]
push 0x4eb1cc
push 0
lea eax, [ebx + 0x22]
mov dword [0x4eb1cc], 0xfffffffd
push eax
push 0
push 0x20
push 0xc
push 1
push 1
push 2
push dword [0x422414]
call dword [sym.imp.ODBC32.dll_SQLBindParameter]
movzx eax, byte [ebx + 0x43]
push eax
movzx eax, byte [ebx + 0x42]
push eax
push esi
push str.WZ_WriteMail__s______d__d
push 0x422408
call fcn.00414eb0
add esp, 0x14
push dword [0x422414]
call dword [sym.imp.ODBC32.dll_SQLFetch]
mov esi, dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
push 0x423036
call esi
add esp, 4
mov ebx, eax
push 0x425036
call esi
add esp, 4
mov dword [ebp - 0x478], eax
push dword [0x422414]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x422414]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
cmp ebx, 0xa
ja 0x406354
mov ecx, dword [ebp - 0x454]
lea edx, [ebp - 0x470]
push 0x18
mov byte [ebp - 0x45f], bl
call fcn.004053e0
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00417e1d
mov esp, ebp
pop ebp
ret
push 0x3e8
lea eax, [ebp - 0x3f0]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov esi, dword [ebp - 0x474]
add esp, 0xc
movsx eax, word [esi + 0x44]
push eax
lea eax, [esi + 0x58]
push eax
lea eax, [ebp - 0x3f0]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov dword [0x4eb1c8], 0x3e8
lea eax, [ebp - 0x3f0]
push 0x4eb1c8
push 0
push eax
push 0
push 0x3e8
push 0xfffffffffffffffd
push 0xfffffffffffffffe
push 1
push 1
push dword [0x422414]
call dword [sym.imp.ODBC32.dll_SQLBindParameter]
push 0x4eb1cc
push 0
lea eax, [esi + 0x46]
mov dword [0x4eb1cc], 0x12
push eax
push 0
push 0x12
push 0xfffffffffffffffd
push 0xfffffffffffffffe
push 1
push 2
push dword [0x422414]
call dword [sym.imp.ODBC32.dll_SQLBindParameter]
mov esi, dword [ebp - 0x478]
push esi
push ebx
push str.UPDATE_T_FriendMail_SET_Memo__Photo__WHERE_MemoIndex_d_AND_GUID_d
push 0x422408
call fcn.00414eb0
add esp, 0x10
push dword [0x422414]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x422414]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov ecx, dword [ebp - 0x454]
lea edx, [ebp - 0x470]
push 0x18
call fcn.004053e0
add esp, 4
cmp byte [ebp - 0x45f], 1
jne 0x406650
push edi
lea eax, [ebp - 0x470]
push eax
call fcn.00404510
test al, al
je 0x406650
push esi
push ebx
push str.SELECT_MemoIndex_FriendName_wDate_Subject_bRead_FROM_T_FriendMail_WHERE_MemoIndex_d_AND_GUID_d
push 0x422408
call fcn.00414eb0
add esp, 0x10
push dword [0x422414]
call dword [sym.imp.ODBC32.dll_SQLFetch]
mov ax, word [ebp - 0x45a]
push str.MemoIndex
mov dword [ebp - 0x450], 0x715e00c2
mov word [ebp - 0x44c], ax
call fcn.00415100
mov ebx, dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
cmp eax, 0xffffffff
jne 0x4064a5
or eax, eax
jmp 0x4064b3
shl eax, 0xd
add eax, 0x423036
push eax
call ebx
add esp, 4
push str.FriendName
mov word [ebp - 0x44a], ax
call fcn.00415100
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy_s]
cmp eax, 0xffffffff
jne 0x4064ec
xorps xmm0, xmm0
mov word [ebp - 0x440], 0
movq qword [ebp - 0x448], xmm0
mov byte [ebp - 0x43e], 0
jmp 0x406505
shl eax, 0xd
push 0xa
add eax, 0x423036
push eax
lea eax, [ebp - 0x448]
push 0xb
push eax
call esi
add esp, 0x10
mov ax, word [edi + 8]
movq xmm0, qword [edi]
mov word [ebp - 0x435], ax
mov al, byte [edi + 0xa]
push str.wDate
movq qword [ebp - 0x43d], xmm0
mov byte [ebp - 0x433], al
call fcn.00415100
cmp eax, 0xffffffff
jne 0x40655b
xorps xmm0, xmm0
mov dword [ebp - 0x41a], 0
movups xmmword [ebp - 0x432], xmm0
mov word [ebp - 0x416], 0
movq qword [ebp - 0x422], xmm0
jmp 0x406574
shl eax, 0xd
push 0x1d
add eax, 0x423036
push eax
lea eax, [ebp - 0x432]
push 0x1e
push eax
call esi
add esp, 0x10
push str.Subject
call fcn.00415100
cmp eax, 0xffffffff
jne 0x406596
xorps xmm0, xmm0
movups xmmword [ebp - 0x414], xmm0
movups xmmword [ebp - 0x404], xmm0
jmp 0x4065af
shl eax, 0xd
push 0x1f
add eax, 0x423036
push eax
lea eax, [ebp - 0x414]
push 0x20
push eax
call esi
add esp, 0x10
push str.bRead
call fcn.00415100
cmp eax, 0xffffffff
jne 0x4065c2
or eax, eax
jmp 0x4065d0
shl eax, 0xd
add eax, 0x423036
push eax
call ebx
add esp, 4
mov si, word [ebp - 0x458]
xor edx, edx
mov byte [ebp - 0x3f4], al
xor eax, eax
mov ecx, dword [eax + 0x4ec6b4]
test ecx, ecx
js 0x40660b
cmp ecx, 0x14
jge 0x40660b
cmp dword [eax + 0x4ec6b8], 0
je 0x40660b
cmp dword [eax + 0x4ec6cc], 0xffffffff
je 0x40660b
cmp word [eax + 0x4ec70c], si
je 0x406618
add eax, 0x68
inc edx
cmp eax, 0x820
jl 0x4065e1
jmp 0x406636
imul ecx, edx, 0x68
add ecx, 0x4ec6b0
je 0x406636
mov ecx, dword [ecx + 4]
lea edx, [ebp - 0x450]
push 0x5e
call fcn.004053e0
add esp, 4
push dword [0x422414]
call dword [sym.imp.ODBC32.dll_SQLCloseCursor]
push 2
push dword [0x422414]
call dword [sym.imp.ODBC32.dll_SQLFreeStmt]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00417e1d
mov esp, ebp
pop ebp
ret