Function at 0x59063940
Capabilities:
Reference sql statements

Disassembly:
push 0xffffffffffffffff
push 0x591440c8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push esi
push edi
mov edi, dword [esp + 0x2c]
xor eax, eax
cmp edi, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], eax
je 0x59063d77
mov ebx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov eax, ebx
or eax, ecx
je 0x59063d77
mov ecx, dword [edi + 4]
push ebp
push ecx
call fcn.59062f80
mov edx, dword [edi + 4]
mov esi, eax
push edx
call fcn.59062d50
add esp, 8
mov ebp, eax
test esi, esi
je 0x59063d50
test ebp, ebp
je 0x59063d50
add edi, 0x20
lea ecx, [esp + 0x14]
push edi
call fcn.59099c70
mov eax, dword [esi + 4]
mov ecx, dword [ebp + 4]
push eax
push ecx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x30], 0
call fcn.5909c350
mov eax, dword [0x59194a20]
test eax, eax
je 0x590639fa
mov edx, dword [esp + 0x14]
push edx
push str.MailMasterGetCompleteBody___s_
push str.History
push 0xffffffffffffffff
push 0x591949b4
call fcn.59078030
add esp, 0x14
mov eax, dword [esp + 0x14]
push 0
push eax
call fcn.590b7880
add esp, 8
test eax, eax
je 0x59063ce9
mov ecx, 0x59194948
call fcn.59002060
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
push edx
mov ecx, 0x59194948
call fcn.59002240
test eax, eax
jne 0x59063d3f
mov eax, dword [esp + 0x18]
test eax, eax
je 0x59063d3f
mov eax, dword [0x5914f850]
mov dword [esp + 0x30], eax
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
push ecx
mov ecx, dword [esi + 0x18]
push edx
mov edx, dword [esi + 0x14]
push eax
mov eax, dword [esi + 0x1c]
push ecx
push edx
push eax
lea ecx, [esp + 0x48]
push str.SELECT__s__s__s_FROM__s_WHERE__s___1_AND__s__1
push ecx
mov byte [esp + 0x48], 1
call fcn.5909d390
mov eax, dword [0x59194a20]
mov edi, dword [esp + 0x58]
add esp, 0x20
test eax, eax
je 0x59063aa8
mov edx, dword [esp + 0x30]
push edi
push ebx
push edx
push str.MailMasterGetCompleteBody_wstrSql__s_nId__d_
push str.History
push 0xffffffffffffffff
push 0x591949b4
call fcn.59078030
add esp, 0x1c
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x10]
push 0
push eax
push 0xffffffffffffffff
push ecx
push edx
mov ecx, 0x59194948
mov ebp, 1
call fcn.59002260
test eax, eax
je 0x59063b44
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 8]
push eax
mov eax, dword [esi + 0x14]
push ecx
mov ecx, dword [esi + 0x1c]
push edx
push eax
push ecx
lea edx, [esp + 0x44]
push str.SELECT__s__s_FROM__s_WHERE__s___1_AND__s__1
push edx
xor ebp, ebp
call fcn.5909d390
mov eax, dword [0x59194a20]
add esp, 0x1c
test eax, eax
je 0x59063b1f
mov eax, dword [esp + 0x30]
push edi
push ebx
push eax
push str.MailMasterGetCompleteBody_wstrSql2__s_nId__d_
push str.History
push 0xffffffffffffffff
push 0x591949b4
call fcn.59078030
add esp, 0x1c
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x10]
push 0
push ecx
push 0xffffffffffffffff
push edx
push eax
mov ecx, 0x59194948
call fcn.59002260
test eax, eax
jne 0x59063d0d
mov ecx, dword [esp + 0x10]
push edi
push ebx
push 1
push ecx
mov ecx, 0x59194948
call fcn.59002290
mov edx, dword [esp + 0x10]
mov ecx, 0x59194948
push edx
call fcn.590022f0
cmp eax, 0x64
jne 0x59063d31
mov ebx, 2
mov eax, dword [esp + 0x10]
push 0
push eax
mov ecx, 0x59194948
call fcn.59002310
test edx, edx
jl 0x59063c8d
jg 0x59063b97
test eax, eax
jbe 0x59063c8d
mov ecx, dword [esp + 0x10]
push 1
push ecx
mov ecx, 0x59194948
call fcn.59002360
mov edx, dword [esp + 0x10]
push 1
push edx
mov ecx, 0x59194948
mov edi, eax
call fcn.59002380
push 0x591959c4
lea ecx, [esp + 0x38]
mov esi, eax
call fcn.59099c70
test ebp, ebp
mov byte [esp + 0x28], bl
je 0x59063bed
mov eax, dword [esp + 0x10]
push ebx
push eax
mov ecx, 0x59194948
call fcn.59002340
push eax
lea ecx, [esp + 0x38]
call fcn.5909a690
push esi
lea ecx, [esp + 0x20]
push edi
push ecx
call fcn.59063850
add esp, 0xc
mov eax, dword [esp + 0x34]
mov byte [esp + 0x28], 3
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x59063c2e
push str.utf_8
push eax
call fcn.5907da38
add esp, 8
test eax, eax
je 0x59063c2e
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x40]
push edx
call fcn.5909a770
jmp 0x59063c41
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x40]
push 0xfde9
push eax
call fcn.5909e870
mov eax, dword [0x59194a20]
test eax, eax
je 0x59063c70
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x34]
mov edx, dword [ecx]
push edx
push esi
push eax
push str.MailMasterGetCompleteBody_wstrCharset__s_nLen__d_wstrHtml__s_
push str.History
push 0xffffffffffffffff
push 0x591949b4
call fcn.59078030
add esp, 0x1c
lea ecx, [esp + 0x1c]
mov byte [esp + 0x28], bl
call fcn.59095090
lea ecx, [esp + 0x34]
mov byte [esp + 0x28], 1
call fcn.5909a410
jmp 0x59063ccf
mov ecx, dword [esp + 0x10]
push 1
push ecx
mov ecx, 0x59194948
call fcn.59002340
mov esi, dword [esp + 0x3c]
push eax
mov ecx, esi
call fcn.5909a690
mov eax, dword [0x59194a20]
test eax, eax
je 0x59063ccf
mov edx, dword [esi]
push edx
push str.MailMasterGetCompleteBody_wstrText__s_
push str.History
push 0xffffffffffffffff
push 0x591949b4
call fcn.59078030
add esp, 0x14
mov eax, dword [esp + 0x10]
mov ecx, 0x59194948
push eax
call fcn.590022f0
cmp eax, 0x64
je 0x59063b74
jmp 0x59063d31
mov eax, dword [0x59194a20]
test eax, eax
je 0x59063d3f
push str.MailMasterGetCompleteBody__IsFileExistW
push str.History
push 0xffffffffffffffff
push 0x591949b4
call fcn.59078030
add esp, 0x10
jmp 0x59063d3f
mov ecx, dword [0x59194a20]
test ecx, ecx
je 0x59063d31
push eax
push str.MailMasterGetCompleteBody_sqlite3_prepare16_v2__Failed__nSqlRet:__d_
push str.History
push 0xffffffffffffffff
push 0x591949b4
call fcn.59078030
add esp, 0x14
lea ecx, [esp + 0x30]
mov byte [esp + 0x28], 0
call fcn.5909a410
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], 0xffffffff
call fcn.5909a410
mov eax, dword [esp + 0x10]
pop ebp
test eax, eax
je 0x59063d64
push eax
mov ecx, 0x59194948
call fcn.590024a0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x59063d77
push eax
mov ecx, 0x59194948
call fcn.59002480
mov esi, dword [esp + 0x3c]
mov ecx, dword [esi]
mov eax, dword [ecx - 8]
test eax, eax
je 0x59063dd2
call fcn.590adb40
test eax, eax
je 0x59063dd2
push 0
call dword [0x59190db0]
test eax, eax
jl 0x59063dd2
mov eax, dword [esi]
lea edx, [esp + 0x3c]
push eax
push edx
call fcn.5900abe0
add esp, 8
mov ecx, dword [esp + 0x38]
push eax
mov dword [esp + 0x28], 4
call fcn.5909a5a0
lea ecx, [esp + 0x3c]
mov dword [esp + 0x24], 0xffffffff
call fcn.5909a410
call dword [0x59190dbc]
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret