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

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffff6b0
mov ebp, edx
mov dword [esp], eax
push str.MAPI32.DLL
call sub.KERNEL32.DLL_LoadLibraryA
mov edi, eax
test edi, edi
jne 0x40bd5a
xor eax, eax
jmp 0x40bfd2
push str.MAPISendMail
push edi
call sub.KERNEL32.DLL_GetProcAddress
mov dword [esp + 4], eax
cmp dword [esp + 4], 0
jne 0x40bd7d
push edi
call sub.KERNEL32.DLL_FreeLibrary
xor eax, eax
jmp 0x40bfd2
test ebp, ebp
je 0x40bd8b
xor edx, edx
mov dl, byte [ebp]
cmp edx, 0x2e
je 0x40bd8f
xor ecx, ecx
jmp 0x40bd94
mov ecx, 1
mov byte [esp + 8], cl
cmp byte [esp + 8], 0
je 0x40bda8
inc ebp
cmp byte [ebp], 0
jne 0x40bda8
xor ebp, ebp
lea eax, [esp + 0xc]
push eax
lea edx, [esp + 0x14]
push edx
push 0x104
push dword [esp + 0xc]
call sub.KERNEL32.DLL_GetFullPathNameA
push 0x18
push 0
lea ecx, [esp + 0x11c]
push ecx
call fcn.0043a750
add esp, 0xc
mov dword [esp + 0x11c], 0xffffffff
lea eax, [esp + 0x10]
mov dword [esp + 0x120], eax
mov edx, dword [esp + 0xc]
mov dword [esp + 0x124], edx
push 0x30
push 0
lea ecx, [esp + 0x134]
push ecx
call fcn.0043a750
add esp, 0xc
mov dword [esp + 0x154], 1
lea eax, [esp + 0x114]
mov dword [esp + 0x158], eax
lea eax, [esp + 0x15c]
call fcn.0040bfe0
test ebp, ebp
je 0x40bf1f
mov ebx, ebp
test ebx, ebx
je 0x40beff
lea eax, [esp + 0x15c]
mov edx, 1
call fcn.0040c01c
mov esi, dword [esp + 0x14c]
shl esi, 3
lea esi, [esi + esi*2]
add esi, dword [esp + 0x15c]
push 0x18
push 0
push esi
call fcn.0043a750
add esp, 0xc
push str.SMTP:
lea eax, [esp + 0x16c]
push eax
call fcn.0043a8d0
add esp, 8
push ebx
lea edx, [esp + 0x16c]
push edx
call fcn.0043a7f4
add esp, 8
push 0x4432ee
push ebx
call fcn.0043a9a9
add esp, 8
mov ebx, eax
test ebx, ebx
je 0x40bebc
inc ebx
xor ecx, ecx
mov cl, byte [ebx]
push ecx
call fcn.0043ccf4
pop ecx
test eax, eax
jne 0x40beac
push 0x4432ee
lea eax, [esp + 0x16c]
push eax
call fcn.0043a9a9
add esp, 8
test eax, eax
je 0x40bed8
mov byte [eax], 0
mov dword [esi + 4], 1
lea edx, [esp + 0x168]
push edx
call fcn.0043aa34
pop ecx
mov dword [esi + 0xc], eax
inc dword [esp + 0x14c]
test ebx, ebx
jne 0x40be40
mov ecx, dword [esp + 0x15c]
mov dword [esp + 0x150], ecx
mov eax, dword [esp + 0xc]
mov dword [esp + 0x134], eax
mov dword [esp + 0x130], eax
lea edx, [esp + 0x550]
push edx
push 0x400
call sub.KERNEL32.DLL_GetCurrentDirectoryA
push 0
mov ecx, 1
test ebp, ebp
jne 0x40bf3f
add ecx, 8
push ecx
lea eax, [esp + 0x134]
push eax
push 0
push 0
call dword [esp + 0x18]
test eax, eax
sete bl
and ebx, 1
xor esi, esi
jmp 0x40bf71
lea eax, [esi + esi*2]
mov edx, dword [esp + 0x15c]
push dword [edx + eax*8 + 0xc]
call fcn.00439910
pop ecx
inc esi
cmp esi, dword [esp + 0x160]
jl 0x40bf5c
lea ecx, [esp + 0x550]
push ecx
call sub.KERNEL32.DLL_SetCurrentDirectoryA
push edi
call sub.KERNEL32.DLL_FreeLibrary
test bl, bl
je 0x40bfa1
cmp byte [esp + 8], 0
je 0x40bfa1
push dword [esp]
call fcn.0043be10
pop ecx
test bl, bl
jne 0x40bfbd
push dword [esp]
mov eax, 0xe5c
call fcn.0040e8b4
push eax
push 0
call fcn.0042acac
add esp, 0xc
mov eax, ebx
push eax
lea eax, [esp + 0x160]
mov edx, 2
call fcn.0040bff0
pop eax
add esp, 0x950
pop ebp
pop edi
pop esi
pop ebx
ret