Function at 0x51c500
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x649afb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x208
push ebx
push ebp
push esi
mov esi, dword [esp + 0x23c]
push edi
mov edi, ecx
push str.createMultipartSigned
push esi
lea ecx, [esp + 0x30]
call fcn.004f0370
mov eax, dword [edi + 0xc]
mov dword [esp + 0x220], 0
cmp eax, 0xf592c107
jne 0x51c922
mov eax, dword [edi + 0x10]
test eax, eax
je 0x51c922
push esi
mov ecx, edi
call fcn.005188f0
test eax, eax
lea ecx, [esp + 0x7c]
setg byte [esp + 0x13]
call fcn.004e57f0
lea eax, [esp + 0x7c]
mov ecx, edi
push eax
mov byte [esp + 0x224], 1
call fcn.00516880
lea ecx, [esp + 0x7c]
push ecx
push str.fromEmailAddress
mov ecx, esi
call fcn.004efcb0
lea ecx, [esp + 0xf0]
call fcn.004e57f0
push 0
lea ecx, [esp + 0x38]
mov byte [esp + 0x224], 2
call fcn.00532c00
push 1
push 0
push 0
lea edx, [esp + 0x40]
push esi
push edx
push str.CKX_
push 0
lea eax, [esp + 0x10c]
push 0
push eax
mov ecx, edi
mov byte [esp + 0x244], 3
call fcn.0051d0c0
mov eax, dword [edi + 0x10]
test eax, eax
je 0x51c8ec
mov ecx, dword [esp + 0x23c]
push 0
push esi
push ecx
push 0
lea edx, [esp + 0x100]
push 0
push edx
push eax
call fcn.0051a300
mov ebx, eax
add esp, 0x1c
test ebx, ebx
mov dword [esp + 0x40], ebx
je 0x51c8ec
lea ecx, [esp + 0x14]
call fcn.004f5bf0
mov eax, dword [edi + 0x10]
mov byte [esp + 0x220], 4
test eax, eax
mov dword [esp + 0x18], ebx
je 0x51c8db
push eax
call fcn.0051f1e0
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x51c8db
lea ecx, [esp + 0x1c]
call fcn.004f5bf0
lea eax, [edi + 0x50]
push esi
push eax
mov ecx, ebp
mov byte [esp + 0x228], 5
mov dword [esp + 0x28], ebp
call fcn.0051c3d0
lea ecx, [esp + 0x1a4]
call fcn.004e57f0
lea ecx, [esp + 0x1a4]
mov byte [esp + 0x220], 6
push ecx
call fcn.005a19e0
lea ebx, [edi + 0x5f4]
add esp, 4
mov ecx, ebx
call fcn.004e2930
test eax, eax
je 0x51c6b2
mov ecx, ebx
call fcn.004dda00
mov dword [esp + 0x24], eax
jmp 0x51c6ba
mov dword [esp + 0x24], str.sha1
push esi
push 0
push 0
lea ecx, [esp + 0x1b0]
call fcn.004dda00
push eax
mov ecx, edi
call fcn.00516370
mov edx, dword [esp + 0x34]
push eax
push edx
push str.application_pkcs7_signature
push 0
push str.multipart_signed
mov ecx, ebp
call fcn.0051df20
mov eax, dword [edi + 0x10]
mov ecx, dword [eax + 0x210]
test ecx, ecx
je 0x51c707
mov edx, dword [esi]
push str.Using_pre_specified_certificate.
mov ecx, esi
call dword [edx + 0x18]
jmp 0x51c74a
mov eax, dword [esi]
push str.Searching_for_certificate_based_on_email_address..
mov ecx, esi
call dword [eax + 0x18]
push esi
push 0
lea ecx, [esp + 0x84]
call fcn.004dda00
mov ecx, dword [esp + 0x244]
push eax
call fcn.00526a90
mov ecx, dword [edi + 0x10]
mov dword [ecx + 0x210], eax
mov edx, dword [edi + 0x10]
mov ecx, dword [edx + 0x210]
test ecx, ecx
je 0x51c74a
call fcn.004d7fa0
mov eax, dword [edi + 0x10]
mov ecx, dword [eax + 0x210]
test ecx, ecx
jne 0x51c779
mov edx, dword [esi]
push str.Failed_to_find_certificate_for_detached_digital_signature
mov ecx, esi
call dword [edx + 0x14]
lea eax, [esp + 0x7c]
mov ecx, esi
push eax
push str.email_address
call fcn.004efcb0
jmp 0x51c8b6
push ebx
push str.micalg
mov ecx, esi
call fcn.004efcb0
mov ecx, ebx
call fcn.004dda00
push eax
call fcn.0055c9b0
add esp, 4
lea ecx, [esp + 0x60]
mov ebx, eax
call fcn.004dfe70
lea ecx, [esp + 0x164]
mov byte [esp + 0x220], 7
call fcn.005a2ec0
lea ecx, [esp + 0xf0]
mov byte [esp + 0x220], 8
call fcn.004e2930
push eax
lea ecx, [esp + 0xf4]
call fcn.004dda00
push eax
lea ecx, [esp + 0x16c]
call fcn.005a2de0
lea ecx, [esp + 0x44]
call fcn.00507040
mov edx, dword [edi + 0x10]
mov byte [esp + 0x5c], 1
lea ecx, [esp + 0x44]
push esi
mov eax, dword [edx + 0x210]
push ecx
push eax
mov byte [esp + 0x22c], 9
call fcn.0059eb80
mov edx, dword [esp + 0x248]
lea ecx, [esp + 0x6c]
push esi
push ecx
mov ecx, dword [esp + 0x248]
lea eax, [esp + 0x58]
push edx
mov edx, dword [esp + 0x244]
push eax
mov eax, dword [esp + 0x244]
push ecx
mov ecx, dword [esp + 0x250]
push edx
push eax
push ebx
push ecx
lea edx, [esp + 0x194]
push 1
push edx
call fcn.0054a8a0
add esp, 0x38
test al, al
jne 0x51c866
mov eax, dword [esi]
push str.Failed_to_create_digitally_signed_email.
mov ecx, esi
call dword [eax + 0x14]
jmp 0x51c880
mov edi, dword [edi + 0x10]
test edi, edi
je 0x51c880
push edi
call fcn.0051f150
mov edi, eax
add esp, 4
test edi, edi
jne 0x51c93d
lea ecx, [esp + 0x44]
mov byte [esp + 0x220], 8
call fcn.00507070
lea ecx, [esp + 0x164]
mov byte [esp + 0x220], 7
call fcn.005a2f50
lea ecx, [esp + 0x60]
mov byte [esp + 0x220], 6
call fcn.004e0890
lea ecx, [esp + 0x1a4]
mov byte [esp + 0x220], 5
call fcn.004e58d0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x220], 4
call fcn.004f5c20
lea ecx, [esp + 0x14]
mov byte [esp + 0x220], 3
call fcn.004f5c20
lea ecx, [esp + 0x34]
mov byte [esp + 0x220], 2
call fcn.00532c40
lea ecx, [esp + 0xf0]
mov byte [esp + 0x220], 1
call fcn.004e58d0
lea ecx, [esp + 0x7c]
mov byte [esp + 0x220], 0
call fcn.004e58d0
lea ecx, [esp + 0x28]
mov dword [esp + 0x220], 0xffffffff
call fcn.004f03e0
xor eax, eax
jmp 0x51cae0
push str.MIME_Version
mov ecx, edi
call fcn.00517150
push str.date
mov ecx, edi
call fcn.00517150
push str.message_id
mov ecx, edi
call fcn.00517150
push str.x_mailer
mov ecx, edi
call fcn.00517150
push str.x_priority
mov ecx, edi
call fcn.00517150
push 0x6e8a50
mov ecx, edi
call fcn.00517150
push str.content_transfer_encoding
mov ecx, edi
call fcn.00517150
push esi
push str.base64
mov ecx, edi
call fcn.0051e5f0
push esi
push 0
push 0
push 0
push 0
push 0
push 0
push str.smime.p7s
push str.application_pkcs7_signature
mov ecx, edi
call fcn.0051df20
mov ecx, dword [esp + 0x238]
push esi
push ecx
push str.attachment
mov ecx, edi
call fcn.0051e4e0
lea ebx, [edi + 0x18]
mov ecx, ebx
call fcn.004dd9e0
lea edx, [esp + 0x60]
mov ecx, ebx
push edx
call fcn.004de6c0
mov eax, dword [esp + 0x40]
lea ebx, [ebp + 0x34]
push eax
mov ecx, ebx
call fcn.00507640
push edi
mov ecx, ebx
mov dword [esp + 0x1c], 0
call fcn.00507640
mov al, byte [esp + 0x13]
test al, al
je 0x51ca20
push esi
push 0x6b5c18
push str.X_MS_Has_Attach
mov ecx, ebp
call fcn.00517770
lea ecx, [esp + 0x44]
mov dword [esp + 0x20], 0
mov byte [esp + 0x220], 8
call fcn.00507070
lea ecx, [esp + 0x164]
mov byte [esp + 0x220], 7
call fcn.005a2f50
lea ecx, [esp + 0x60]
mov byte [esp + 0x220], 6
call fcn.004e0890
lea ecx, [esp + 0x1a4]
mov byte [esp + 0x220], 5
call fcn.004e58d0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x220], 4
call fcn.004f5c20
lea ecx, [esp + 0x14]
mov byte [esp + 0x220], 3
call fcn.004f5c20
lea ecx, [esp + 0x34]
mov byte [esp + 0x220], 2
call fcn.00532c40
lea ecx, [esp + 0xf0]
mov byte [esp + 0x220], 1
call fcn.004e58d0
lea ecx, [esp + 0x7c]
mov byte [esp + 0x220], 0
call fcn.004e58d0
lea ecx, [esp + 0x28]
mov dword [esp + 0x220], 0xffffffff
call fcn.004f03e0
mov eax, ebp
mov ecx, dword [esp + 0x218]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x214
ret 0x1c