Function at 0x40c360
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff6a0
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
push str.MAPI32.DLL
call sub.KERNEL32.DLL_LoadLibraryA
mov edi, eax
test edi, edi
jne 0x40c389
xor eax, eax
jmp 0x40c70c
push str.MAPISendMail
push edi
call sub.KERNEL32.DLL_GetProcAddress
mov dword [ebp - 0xc], eax
push str.MAPIResolveName
push edi
call sub.KERNEL32.DLL_GetProcAddress
mov dword [ebp - 0x10], eax
push str.MAPIFreeBuffer
push edi
call sub.KERNEL32.DLL_GetProcAddress
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0xc], 0
je 0x40c3c5
cmp dword [ebp - 0x10], 0
je 0x40c3c5
cmp dword [ebp - 0x14], 0
jne 0x40c3d2
push edi
call sub.KERNEL32.DLL_FreeLibrary
xor eax, eax
jmp 0x40c70c
cmp dword [ebp - 8], 0
je 0x40c3e4
mov edx, dword [ebp - 8]
xor ecx, ecx
mov cl, byte [edx]
cmp ecx, 0x2e
je 0x40c3e8
xor eax, eax
jmp 0x40c3ed
mov eax, 1
mov byte [ebp - 0x15], al
cmp byte [ebp - 0x15], 0
je 0x40c406
inc dword [ebp - 8]
mov edx, dword [ebp - 8]
cmp byte [edx], 0
jne 0x40c406
xor ecx, ecx
mov dword [ebp - 8], ecx
lea eax, [ebp - 0x420]
push eax
push 0x400
call sub.KERNEL32.DLL_GetCurrentDirectoryA
lea edx, [ebp - 0x1c]
push edx
lea ecx, [ebp - 0x524]
push ecx
push 0x104
push dword [ebp - 4]
call sub.KERNEL32.DLL_GetFullPathNameA
push 0x18
push 0
lea eax, [ebp - 0x53c]
push eax
call fcn.0043bba4
mov dword [ebp - 0x534], 0xffffffff
lea edx, [ebp - 0x524]
add esp, 0xc
mov dword [ebp - 0x530], edx
lea eax, [ebp - 0x56c]
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x52c], ecx
push 0x30
push 0
push eax
call fcn.0043bba4
mov dword [ebp - 0x544], 1
lea edx, [ebp - 0x53c]
add esp, 0xc
mov dword [ebp - 0x540], edx
lea eax, [ebp - 0x578]
call fcn.0040c714
cmp dword [ebp - 8], 0
je 0x40c61a
mov ebx, dword [ebp - 8]
test ebx, ebx
je 0x40c5ff
lea eax, [ebp - 0x578]
mov edx, 1
call fcn.0040c750
mov esi, dword [ebp - 0x54c]
shl esi, 3
lea esi, [esi + esi*2]
add esi, dword [ebp - 0x578]
push 0x18
push 0
push esi
call fcn.0043bba4
add esp, 0xc
push str.SMTP:
lea eax, [ebp - 0x960]
push eax
call fcn.0043bd24
add esp, 8
push ebx
lea edx, [ebp - 0x960]
push edx
call fcn.0043bc48
add esp, 8
push 0x444365
push ebx
call fcn.0043bdfd
add esp, 8
mov ebx, eax
test ebx, ebx
je 0x40c521
inc ebx
xor ecx, ecx
mov cl, byte [ebx]
push ecx
call fcn.0043e124
pop ecx
test eax, eax
jne 0x40c511
push 0x444365
lea eax, [ebp - 0x960]
push eax
call fcn.0043bdfd
add esp, 8
test eax, eax
je 0x40c53c
mov byte [eax], 0
mov dword [esi + 4], 1
lea edx, [ebp - 0x20]
lea ecx, [ebp - 0x95b]
push edx
push 0
push 1
push ecx
push 0
push 0
call dword [ebp - 0x10]
test eax, eax
jne 0x40c5e1
mov eax, dword [ebp - 0x20]
mov edx, dword [eax]
mov dword [esi], edx
mov ecx, dword [ebp - 0x20]
cmp dword [ecx + 8], 0
je 0x40c580
mov eax, dword [ebp - 0x20]
push dword [eax + 8]
call fcn.0043be88
pop ecx
mov dword [esi + 8], eax
mov edx, dword [ebp - 0x20]
cmp dword [edx + 0xc], 0
je 0x40c598
mov ecx, dword [ebp - 0x20]
push dword [ecx + 0xc]
call fcn.0043be88
pop ecx
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x20]
mov edx, dword [eax + 0x10]
mov dword [esi + 0x10], edx
mov ecx, dword [ebp - 0x20]
cmp dword [ecx + 0x14], 0
je 0x40c5d9
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0x10], 0
je 0x40c5d9
mov edx, dword [ebp - 0x20]
push dword [edx + 0x10]
call fcn.0043ad54
pop ecx
mov dword [esi + 0x14], eax
mov ecx, dword [ebp - 0x20]
push dword [ecx + 0x10]
mov eax, dword [ebp - 0x20]
push dword [eax + 0x14]
push dword [esi + 0x14]
call fcn.0043bb34
add esp, 0xc
push dword [ebp - 0x20]
call dword [ebp - 0x14]
jmp 0x40c5f1
lea edx, [ebp - 0x960]
push edx
call fcn.0043be88
pop ecx
mov dword [esi + 0xc], eax
inc dword [ebp - 0x54c]
test ebx, ebx
jne 0x40c4aa
mov ecx, dword [ebp - 0x578]
mov dword [ebp - 0x548], ecx
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x564], eax
mov dword [ebp - 0x568], eax
push 0
mov edx, 1
cmp dword [ebp - 8], 0
jne 0x40c62a
add edx, 8
push edx
lea ecx, [ebp - 0x56c]
push ecx
push 0
push 0
call dword [ebp - 0xc]
test eax, eax
sete bl
and ebx, 1
xor esi, esi
jmp 0x40c6af
lea eax, [esi + esi*2]
mov edx, dword [ebp - 0x578]
cmp dword [edx + eax*8 + 8], 0
je 0x40c668
lea ecx, [esi + esi*2]
mov eax, dword [ebp - 0x578]
push dword [eax + ecx*8 + 8]
call fcn.0043ad64
pop ecx
lea edx, [esi + esi*2]
mov ecx, dword [ebp - 0x578]
cmp dword [ecx + edx*8 + 0xc], 0
je 0x40c68b
lea eax, [esi + esi*2]
mov edx, dword [ebp - 0x578]
push dword [edx + eax*8 + 0xc]
call fcn.0043ad64
pop ecx
lea ecx, [esi + esi*2]
mov eax, dword [ebp - 0x578]
cmp dword [eax + ecx*8 + 0x14], 0
je 0x40c6ae
lea edx, [esi + esi*2]
mov ecx, dword [ebp - 0x578]
push dword [ecx + edx*8 + 0x14]
call fcn.0043ad64
pop ecx
inc esi
cmp esi, dword [ebp - 0x574]
jl 0x40c645
lea eax, [ebp - 0x420]
push eax
call sub.KERNEL32.DLL_SetCurrentDirectoryA
push edi
call sub.KERNEL32.DLL_FreeLibrary
test bl, bl
je 0x40c6dc
cmp byte [ebp - 0x15], 0
je 0x40c6dc
push dword [ebp - 4]
call fcn.0043d25c
pop ecx
test bl, bl
jne 0x40c6f8
push dword [ebp - 4]
mov eax, 0xe60
call fcn.0040f04c
push eax
push 0
call fcn.0042bb80
add esp, 0xc
mov eax, ebx
push eax
lea eax, [ebp - 0x578]
mov edx, 2
call fcn.0040c724
pop eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret