Function at 0x40ac7c
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 0x40aca2
xor eax, eax
jmp 0x40af1e
push str.MAPISendMail
push edi
call sub.KERNEL32.DLL_GetProcAddress
mov dword [esp + 4], eax
cmp dword [esp + 4], 0
jne 0x40acc5
push edi
call sub.KERNEL32.DLL_FreeLibrary
xor eax, eax
jmp 0x40af1e
test ebp, ebp
je 0x40acd3
xor edx, edx
mov dl, byte [ebp]
cmp edx, 0x2e
je 0x40acd7
xor ecx, ecx
jmp 0x40acdc
mov ecx, 1
mov byte [esp + 8], cl
cmp byte [esp + 8], 0
je 0x40acf0
inc ebp
cmp byte [ebp], 0
jne 0x40acf0
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.004353e8
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.004353e8
add esp, 0xc
mov dword [esp + 0x154], 1
lea eax, [esp + 0x114]
mov dword [esp + 0x158], eax
lea eax, [esp + 0x15c]
call fcn.0040af2c
test ebp, ebp
je 0x40ae67
mov ebx, ebp
test ebx, ebx
je 0x40ae47
lea eax, [esp + 0x15c]
mov edx, 1
call fcn.0040af68
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.004353e8
add esp, 0xc
push str.SMTP:
lea eax, [esp + 0x16c]
push eax
call fcn.00435568
add esp, 8
push ebx
lea edx, [esp + 0x16c]
push edx
call fcn.0043548c
add esp, 8
push 0x43d2a6
push ebx
call fcn.00435641
add esp, 8
mov ebx, eax
test ebx, ebx
je 0x40ae04
inc ebx
xor ecx, ecx
mov cl, byte [ebx]
push ecx
call fcn.00437b68
pop ecx
test eax, eax
jne 0x40adf4
push 0x43d2a6
lea eax, [esp + 0x16c]
push eax
call fcn.00435641
add esp, 8
test eax, eax
je 0x40ae20
mov byte [eax], 0
mov dword [esi + 4], 1
lea edx, [esp + 0x168]
push edx
call fcn.004356cc
pop ecx
mov dword [esi + 0xc], eax
inc dword [esp + 0x14c]
test ebx, ebx
jne 0x40ad88
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
test ebp, ebp
je 0x40ae86
mov ecx, 1
jmp 0x40ae8b
mov ecx, 9
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 0x40aebd
lea eax, [esi + esi*2]
mov edx, dword [esp + 0x15c]
push dword [edx + eax*8 + 0xc]
call fcn.00434570
pop ecx
inc esi
cmp esi, dword [esp + 0x160]
jl 0x40aea8
lea ecx, [esp + 0x550]
push ecx
call sub.KERNEL32.DLL_SetCurrentDirectoryA
push edi
call sub.KERNEL32.DLL_FreeLibrary
test bl, bl
je 0x40aeed
cmp byte [esp + 8], 0
je 0x40aeed
push dword [esp]
call fcn.00436be8
pop ecx
test bl, bl
jne 0x40af09
push dword [esp]
mov eax, 0xe46
call fcn.0040d8a4
push eax
push 0
call fcn.00426600
add esp, 0xc
mov eax, ebx
push eax
lea eax, [esp + 0x160]
mov edx, 2
call fcn.0040af3c
pop eax
add esp, 0x950
pop ebp
pop edi
pop esi
pop ebx
ret